@zeniai/web-app-ui 5.0.74-qa → 5.0.75-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-COsIlMtO.js +1 -0
- package/dist/assets/{AddressScreen-CuUKXSzu.js → AddressScreen-CuesyANu.js} +1 -1
- package/dist/assets/{AiCfoScreen-ar8phnJj.js → AiCfoScreen-DXMqFLdU.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-C9yprVKV.js → BillPayApprovalRoutes-CHSOiIst.js} +1 -1
- package/dist/assets/{BillPayRoutes-BwckjZdM.js → BillPayRoutes-uvDrZLmb.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BmpszVa6.js → BusinessVerificationPageScreen-DCsTb_7D.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-BxuEDDTO.js → ChargeCardRoutes-B-TlIDmJ.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-QLJSDasM.js → CompanyPassportScreen-D4G9u_te.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-BLkKgUWY.js → ConnectionAuthScreen-sX2zdu83.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-D0NGTrWg.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CjZn-P_R.js → CustomerOnboardingRoutes-DlpRh6C4.js} +1 -1
- package/dist/assets/{DashboardRoutes-BEdTreDV.js → DashboardRoutes-Crg2Ziap.js} +1 -1
- package/dist/assets/{DefaultTenantHome-CKMvFqyU.js → DefaultTenantHome-CNO1S6ei.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-B6iZuZi9.js → DomesticWireDetailScreen-C9ulkIw9.js} +1 -1
- package/dist/assets/{DrawerScreen-D9KNdVWU.js → DrawerScreen-ByL7MAwq.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-h1r5F4lk.js → EntityDetailRoutes-CA17aPT4.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DAMKNWnc.js → ExpenseAutomationRoutes-CEEMUvHj.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-B8pdIx01.js → FeaturePreviewScreen-bQK5qT60.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-C8WGP4r8.js → HubSpotOAuthCallbackScreen-BmRbtxFh.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CZyhodZT.js → MagicLinkRoutes-DIVtqeJR.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CeeQ9_4n.js → MagicLinkSignInScreen-ChR_stER.js} +1 -1
- package/dist/assets/{MobileAppDrawer-D63DUeYO.js → MobileAppDrawer-0_yL5YFX.js} +1 -1
- package/dist/assets/NotFoundScreen-Ci6yz6WX.js +1 -0
- package/dist/assets/{NotificationRoutes-D2GyAhqQ.js → NotificationRoutes-Ck1YesCT.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-CBnSZQkP.js → OAuthConsentScreen-BYXEgJID.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CP-r1RAR.js → PandLWithForecastRoutes-DQQ1hRWF.js} +1 -1
- package/dist/assets/{PeopleRoutes-ffakgU88.js → PeopleRoutes-ClxtRwH2.js} +1 -1
- package/dist/assets/{PerformanceRoutes-CtBeVFZs.js → PerformanceRoutes-Ca7HBuS2.js} +1 -1
- package/dist/assets/{Preview-CgeohER3.js → Preview-Dvgse15s.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DwjTsdr-.js → QBOConnectionScreen-BIW-FO4V.js} +1 -1
- package/dist/assets/{ReferralListScreen-BN980Avs.js → ReferralListScreen-CwGh20kJ.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-BU939_9A.js → ReimbursementApprovalRoutes-Cf6BarJG.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-D-Epy7s3.js → ReimbursementApprovalRuleDetailScreen-BBECpmB2.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Cijh7790.js → ReimbursementRoutes-B20LEqUp.js} +1 -1
- package/dist/assets/{ReportsRoutes-C7GuLF9Y.js → ReportsRoutes-BVmtY26f.js} +1 -1
- package/dist/assets/{RewardsRoutes-C4GJzsSR.js → RewardsRoutes-XsLArqCP.js} +1 -1
- package/dist/assets/{ScreenRoutes-d397mPpj.js → ScreenRoutes-C35sHH74.js} +2 -2
- package/dist/assets/{SettingsRoutes-Btxj7MHd.js → SettingsRoutes--SSJDegy.js} +1 -1
- package/dist/assets/{SetupPagesScreen-CaZ5sjLL.js → SetupPagesScreen-Da3YdcQb.js} +1 -1
- package/dist/assets/{SignInScreen-BxBTBlxt.js → SignInScreen-Ci9v-21t.js} +1 -1
- package/dist/assets/{SignOutScreen-CMu9PUV8.js → SignOutScreen-BWruTfIH.js} +1 -1
- package/dist/assets/{TaskListScreen-DMmT5kH1.js → TaskListScreen-DC7qqFAx.js} +1 -1
- package/dist/assets/{TaskRoutes-oU4646H2.js → TaskRoutes-uINUIi7W.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-CuP-8ufb.js +1 -0
- package/dist/assets/{TransactionDetailScreen-BT_8PHE1.js → TransactionDetailScreen-iNXvpE1w.js} +1 -1
- package/dist/assets/{TransactionListRoutes-PPd6O4oz.js → TransactionListRoutes-C9rGFSj-.js} +1 -1
- package/dist/assets/{TreasuryRoutes-C6IEAW99.js → TreasuryRoutes-sA1JEayP.js} +1 -1
- package/dist/assets/{VendorsRoutes-CqHiW9YV.js → VendorsRoutes-DShLk93H.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-Db5wrG9p.js → WiseConfirmationScreen-DOTv8LdT.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-D3t36m88.js → ZeniAccountRoutes-BDmJQZCV.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-DPYnn_zH.js → ZeniAccountStatementScreen-vmG0CkUU.js} +1 -1
- package/dist/assets/{accountMappingHelper-BadOJrgB.js → accountMappingHelper-CA87QOme.js} +1 -1
- package/dist/assets/{analytics-XmeShL-b.js → analytics-Bz7QO_-D.js} +1 -1
- package/dist/assets/{analyticsHelper-D78arCNY.js → analyticsHelper-UJaOADor.js} +1 -1
- package/dist/assets/{core-BKodLOTU.js → core-BBjwfZ-w.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-Dz-FxAXh.js → decodeURIComponentSafe-B_FKdp2Y.js} +1 -1
- package/dist/assets/{dnd-BfyJbD1v.js → dnd-DJzJQwXe.js} +1 -1
- package/dist/assets/{empty-Bs2V19XY.js → empty-B0oub_Lt.js} +1 -1
- package/dist/assets/{empty-C0DVvfgl.js → empty-D3ckVh54.js} +1 -1
- package/dist/assets/{emptyVideoElement-DD_qlIiS.js → emptyVideoElement-Ct7IC36t.js} +1 -1
- package/dist/assets/{epic-CCdQAsSW.js → epic-CAic41N9.js} +1 -1
- package/dist/assets/{getLocaleForTenant-xCoWhIqf.js → getLocaleForTenant-BoZerb2M.js} +1 -1
- package/dist/assets/{index-DgXtqBbG.js → index-Bc6xMvHW.js} +5 -5
- package/dist/assets/{index-DD_0oz3z.js → index-BkZDwv6J.js} +1 -1
- package/dist/assets/{index-MsoGT9WZ.js → index-Cw97YPt2.js} +2 -2
- package/dist/assets/{index-BTQkz0ne.js → index-D7NL7rjz.js} +1 -1
- package/dist/assets/{index-CIVbsoN9.js → index-DDGk-hPA.js} +1 -1
- package/dist/assets/{index-DJlAjjHg.js → index-DLSB5hfW.js} +1 -1
- package/dist/assets/{index-DVypn_X5.js → index-DU1ywBn3.js} +1 -1
- package/dist/assets/{index-Bx-YAKxu.js → index-bvnR32t9.js} +1 -1
- package/dist/assets/{lexical-QHBaN_fi.js → lexical-kIQltxPy.js} +1 -1
- package/dist/assets/{liveblocks-BIjmAr8D.js → liveblocks-B39PlnRv.js} +1 -1
- package/dist/assets/{lottie-CoPzS9gq.js → lottie-BNnxBBZv.js} +1 -1
- package/dist/assets/{mui-DlcK-nJn.js → mui-DDDUCYEf.js} +1 -1
- package/dist/assets/{pathToGoBack-DYSbx7nv.js → pathToGoBack-Dd9CUJlE.js} +1 -1
- package/dist/assets/{pdf-BfwwIhDV.js → pdf-C5ZEZLIF.js} +3 -3
- package/dist/assets/{pdf-lib-Cw1vv-7M.js → pdf-lib-dhF6OL1F.js} +1 -1
- package/dist/assets/{plaid-BGq6dat6.js → plaid-CIX5Leq7.js} +1 -1
- package/dist/assets/{pusher-Ba7GdFnU.js → pusher-BRG267MZ.js} +1 -1
- package/dist/assets/{react-Bv1Y4QDF.js → react-67D64sDS.js} +1 -1
- package/dist/assets/{react-B0jvhR0C.js → react-B86GMXaO.js} +1 -1
- package/dist/assets/{react-FneXzKm6.js → react-BpitgstR.js} +1 -1
- package/dist/assets/{react-C5n0iyPE.js → react-D0m-lREF.js} +1 -1
- package/dist/assets/{react-D1VRQLOa.js → react-DUGCzBVh.js} +1 -1
- package/dist/assets/{react-B8I1LySP.js → react-helYoKoK.js} +1 -1
- package/dist/assets/{recharts-DpNbjrAJ.js → recharts-BHIDIaKt.js} +1 -1
- package/dist/assets/{routePaths-B97q6EVJ.js → routePaths-ljEPT-cS.js} +1 -1
- package/dist/assets/{sentry-C7Z-vgKp.js → sentry-DIjLwCle.js} +1 -1
- package/dist/assets/{url-DKuXMSAi.js → url-BmC62H-f.js} +1 -1
- package/dist/assets/{url-D1xX9P3E.js → url-CT9KNEn_.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-W_9VZ3t4.js → useAskAiCfoHostNavButtonProps-B2Clt3Vs.js} +1 -1
- package/dist/assets/{useDeviceId-SVGHxs8k.js → useDeviceId-oyXcRIxn.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-Cz8Tf2BI.js → useFetchSuggestedQuestionsWhenReady-rXmnxLOI.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CAZ-K4F8.js → useInitialThreadRequest-RW-Kpf3I.js} +1 -1
- package/dist/assets/{utils-DuhvVf2U.js → utils-JGBDmufg.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-L5vbffjs.js → withTransactionSidePanel-BlS3p_C_.js} +1 -1
- package/dist/assets/{zeni-epic-state-BIWtgoix.js → zeni-epic-state-Cm1-MwJ0.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-D36Y3UuL.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-BmA6le42.js +0 -1
- package/dist/assets/NotFoundScreen-CqbkZ3cL.js +0 -1
- package/dist/assets/TransactionDetailRoutes-IsbVRnff.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-B39PlnRv.js";import{A as i}from"./AddressScreen-CuesyANu.js";import s from"./NotFoundScreen-Ci6yz6WX.js";import"./sentry-DIjLwCle.js";import{n as d,o as r}from"./core-BBjwfZ-w.js";import"./zeni-epic-state-Cm1-MwJ0.js";import"./recharts-BHIDIaKt.js";import"./index-Bc6xMvHW.js";import"./mui-DDDUCYEf.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./utils-JGBDmufg.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]="624154e3-3694-4a3c-b645-a66b8e12404c",t._sentryDebugIdIdentifier="sentry-dbid-624154e3-3694-4a3c-b645-a66b8e12404c")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-B39PlnRv.js";import{a as S}from"./sentry-DIjLwCle.js";import{j as T,h as _,u as E,l as j,g as B,k as M}from"./core-BBjwfZ-w.js";import{Z as $,m as D,z as L,k as K,B as F,s as G,c as C,e as m,i as J,f as h,p as z}from"./index-Bc6xMvHW.js";import{JE as k,gW as O,eO as R,JF as U,c1 as N,JG as V,kg as q}from"./zeni-epic-state-Cm1-MwJ0.js";import{n as H}from"./mui-DDDUCYEf.js";import W from"./NotFoundScreen-Ci6yz6WX.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]="aa0ab6ad-6b24-43be-b4e4-0b79ccba5d03",e._sentryDebugIdIdentifier="sentry-dbid-aa0ab6ad-6b24-43be-b4e4-0b79ccba5d03")}catch{}})();const Z=H.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-B39PlnRv.js";import{a as l}from"./sentry-DIjLwCle.js";import{h as ue,j as me,u as pe,g as V,l as he,k as fe}from"./core-BBjwfZ-w.js";import{Q as Se,cJ as ge,z as Ce,Z as ke,cK as be,cL as we,cM as $,cN as Ie,cO as Y,p as U,s as q,c as T,cP as z,cQ as Ee,V as Pe,e as Te,a3 as ye,cR as xe,W as _e,j as ve,aY as Oe,cS as Ae}from"./index-Bc6xMvHW.js";import{fE as Qe,f3 as J,eO as Ue,hA as De,Qc as je,eN as Fe,hK as Be,hG as Le,fu as W,fo as Re,fh as Me,fl as H,fp as Ge,fq as Ne,fr as Ve,fs as $e,ft as qe}from"./zeni-epic-state-Cm1-MwJ0.js";import{D as ze,n as b,S as We,P as He}from"./mui-DDDUCYEf.js";import{p as Ke}from"./pathToGoBack-Dd9CUJlE.js";import"./recharts-BHIDIaKt.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./utils-JGBDmufg.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="501ddadf-1de8-43ce-bc6a-37e616002144",s._sentryDebugIdIdentifier="sentry-dbid-501ddadf-1de8-43ce-bc6a-37e616002144")}catch{}})();const Z="chat-response-generated",Ye=fe(function(s,r){const t=J(s),m=r.isSubmitting;return{showSampleQuestions:r.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:m,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${_e}/tableDownload`,emailLinkQuestion:r.emailLinkQuestion,autoSubmitEmailLinkQuestion:r.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:r.onEmailLinkQuestionProcessed,isFileUploadEnabled:r.isFileUploadEnabled,isUploadPromoVisible:r.isUploadPromoVisible,onUploadPromoClose:r.onUploadPromoClose}},function(s,r){const{location:t,currentTenant:m,userId:c,navigate:S,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:C,setIsAiCfoOpen:d}=r;return{onEventReceived:(e,o)=>{if(e===Z&&typeof o.text=="string"&&typeof o.metadata=="object"){const n=o,p=Ne(n.type),u=n.metadata.chat_session_id??null,{currentChatSession:a,currentQuestionAnswer:w,currentQuestionAnswerSummary:y}=Y(C,u);p!=="answer"?T.trackAICFOChatResponseGenerated(p,w?.question.questionText??"",n.text,u,Ae(y,a),n.metadata.message_id??null):T.trackAICFOChatAnswerGenerated(n.text,w?.question.questionText??"",(n.follow_up_questions?.length??0)>0,!!n.assumptions,!!n.insights,n.visualization!=null,Ve(n.visualization?.type??"")??null,u,n.summarized_title,n.metadata.message_id??null),s($e({chatSessionId:n.metadata.chat_session_id,responseType:p,fetchState:{fetchState:"Completed",error:void 0}})),s(qe({chatSessionId:n.metadata.chat_session_id,answerPayload:n,userId:c}))}},onSubmit:(e,o,n,p)=>{e&&Oe(s,e,o,f,C,c,p,n)},updateCurrentInput:e=>{s(H(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Ge(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{S(-1)},onCloseClick:()=>{const e=U(t.state?.pathnameStackToGoBack),o=e.poppedPathname??Ke(1);S(o,{state:{...t.state,pathnameStackToGoBack:e.newStack}}),s(H(""))},togglePageView:()=>{const e=U(t.state?.pathnameStackToGoBack),o=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;S(o,{state:{...t.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),d(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{S(-1)},onNewChatClick:()=>{f!=null&&s(Me());const e=ve(t.state?.pathnameStackToGoBack,t.pathname);S(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,o)=>{s(Re({questionAnswerId:e,isCollapsed:o}))},onMenuClick:r.onMenuClick}})(ye(xe)),gt=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:r}=Se(),t=ue(),m=me(),c=pe(),[S,f]=l.useState(!1);l.useEffect(()=>{t(Qe())},[t]);const{customPageTitle:C}=ge(),d=V(i=>J(i)),e=Ce.getSignedInUser(),{session_id:o}=he(),n=ke(),p=Pe(n),u=V(i=>Ue(i)),a=d.uiState.currentChatSessionId,w=u.tenantEmailDomain,{handleUploadPromoClose:y,isUploadPromoVisible:X}=be({isFileUploadEnabled:s,tenantEmailDomain:w}),x=we({currentTenant:u,currentChatSessionId:a,aiCfoView:d}),I=c.state,E=I?.aiCfoInitialQuestion,D=!!I?.aiCfoShouldSubmit;l.useEffect(()=>{const i=c.state;if(i?.[$]!==!0)return;f(!0);const g={...i};delete g[$],m(c,{replace:!0,state:g})},[c.pathname,c.search,c.state,m]);const[ee,_]=l.useState(null),[te,v]=l.useState(!1),j=l.useRef(!1);l.useEffect(()=>{j.current||E==null||E===""||(_(E),v(D),j.current=!0)},[E,D]);const ae=l.useCallback(()=>{_(null),v(!1)},[]),F=l.useMemo(()=>new URLSearchParams(c.search),[c.search]),B=F.get("ref")??I?.aiCfoRef,O=F.get("emailRefId")??I?.aiCfoEmailRefId,L=l.useRef(!1);l.useEffect(()=>{L.current||B!=="month-end-email"||O==null||a!=null||e==null||(t(De("controller",e.userId,O,"MONTH_END_EMAIL")),L.current=!0)},[B,O,a,t,e]);const P=d.uiState.lastContextMessage;l.useEffect(()=>{P!=null&&P!==""&&a!=null&&(_(P),v(!0),t(je()))},[P,a,t]);const se=u.masterTOSInfo,k=se?.isMasterTOSAccepted??!1,{visitedSessions:R}=Ie(a),A=d.fetchState,Q=d.uiState.chatSessionsNextPageToken.hasMore||!d.uiState.chatSessionsFirstPageFetched,M=a!=null?d.fetchChatSessionHistoryByChatSessionId?.[a]?.fetchState??"Not-Started":"Not-Started",G=a==null||(d.uiState.chatHistoryNextPageToken[a]?.hasMore??!0),N=d.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:oe}=Y(N,a),ne=oe.length===0;l.useEffect(()=>{k||p||m("../dashboard",{state:{...c.state,message:"open_ai_cfo_drawer"}})},[k,p,m,c.state]);const ie=l.useCallback(()=>{const i=U(c.state?.pathnameStackToGoBack),g=u.tenantEmailDomain;m(i.poppedPathname??(g!=null?`/${g}/dashboard`:".."),{state:{...c.state,pathnameStackToGoBack:i.newStack}})},[u.tenantEmailDomain,c.state,m]);l.useEffect(()=>{a!=null&&o!==a&&m(`../ai-cfo/${a}`,{state:{...c.state}})},[a,o]),l.useEffect(()=>{o!=null&&a==null&&o!=="new_chat"&&o!=="explore"&&t(Fe({sessionId:o,agentId:"controller"}))},[]);const le=l.useMemo(()=>({events:R.map(i=>`private-encrypted-chat-${i}.${Z}`),eventCallback:(i,g,de)=>de.onEventReceived(i,g)}),[R]);l.useEffect(()=>{A!=="In-Progress"&&Q&&t(Be())},[A,Q,t]),l.useEffect(()=>{a!=null&&M!=="In-Progress"&&G&&e!=null&&A==="Completed"&&!Q&&t(Le(a,e.userId))},[M,G,a,e,t]);const re=i=>i.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(e==null||o==null)throw Error("Can't access AI Controller page without signing in...");const ce=a!=null&&d.responseStateByChatSessionId?.[a]?.answer?.fetchState==="In-Progress";return!k&&p?h.jsxs(Ze,{children:[h.jsx(q,{analytics:T,onLoad:re}),x.drawerElement,h.jsx(Xe,{children:h.jsx(K,{children:h.jsx(z,{isTOSAccepted:!1,acceptMasterTOSState:d.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:ie,onCompleteClick:()=>{u.userRoleId!=null&&t(W(u.userRoleId))}})})})]}):h.jsxs(Je,{children:[h.jsx(q,{analytics:T,onLoad:i=>i.trackPageLoaded(Te.Event.aiCFOPage)}),p&&x.drawerElement,h.jsx(Ye,{...le,currentChatSessionId:a,allSessionsWithOrderedQuestionAnswers:N,openOnboardingPage:()=>f(!0),userId:e.userId,setIsAiCfoOpen:r,navigate:m,sessionFromUrl:o,location:c,isSubmitting:ce,isEmptyChatWithSession:ne,customPageTitle:C,currentTenant:u,emailLinkQuestion:ee??void 0,autoSubmitEmailLinkQuestion:te,onEmailLinkQuestionProcessed:ae,onMenuClick:p?x.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:X,onUploadPromoClose:y}),h.jsx(ze,{anchor:"right",open:S,transitionDuration:250,PaperProps:{component:et,style:{width:p?"100%":`${Ee}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:h.jsx(K,{onClick:i=>i.stopPropagation(),children:h.jsx(z,{isTOSAccepted:k,acceptMasterTOSState:d.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:()=>f(!1),onCompleteClick:()=>{k||u.userRoleId==null||t(W(u.userRoleId)),f(!1)}})})})]})},K=b(We)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-B39PlnRv.js";import{a as y}from"./sentry-DIjLwCle.js";import{j as B,u as U,h as j,g as v,N as O,k as T,l as $,n as F,o as h}from"./core-BBjwfZ-w.js";import{eO as N,MX as R,MD as b,xp as x,xj as L,xn as I,xc as M,MF as q,xf as z,xr as W,xq as E}from"./zeni-epic-state-Cm1-MwJ0.js";import{m as P,z as k,B as V,a3 as X,by as G,ac as _,bz as H}from"./index-Bc6xMvHW.js";import"./mui-DDDUCYEf.js";import{i as J}from"./ReimbursementApprovalRuleDetailScreen-BBECpmB2.js";import K from"./NotFoundScreen-Ci6yz6WX.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="496507a6-e6f9-4345-aa2b-74fcd44e3c5b",e._sentryDebugIdIdentifier="sentry-dbid-496507a6-e6f9-4345-aa2b-74fcd44e3c5b")}catch{}})();const w="bill-approval-rule-update",Q=T(function(e){return{approvalView:R(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:n}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(w)&&e(q(!1))},onBackClick:()=>{_(n)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(M(a))},onEditRuleClick:a=>{a!=null?(e(I(a)),t(`./${a}/edit`)):(e(I()),t("./new"))}}})(X(G)),Y=()=>{const e=B(),o=U(),t=j(),[n,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),p=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>N(i)),r=v(i=>R(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(x())},[g]),y.useEffect(()=>{n||p!=="Not-Started"||(a(!0),t(L(!0)))},[n,p,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");y.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(I())),e("./new"))},[u,r,t]);const f={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${w}`]:[],eventCallback:(i,A,m)=>{i.endsWith(w)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx(O,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(V,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(Q,{currentTenant:c,location:o,navigate:e,...f})},Z=T(function(e,o){const t=b(e),n=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=n==="approval_create"&&t.allApprovalRules.length!==0;let u=t.allApprovalRules.length===0;return o.approvalRuleId&&(u=t.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:u,approvalUpdateActionType:n}},function(e,o){const{navigate:t,approvalUpdateDataView:n,approverViewData:a,approvalRuleId:u}=o,s=n.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:p=>{const c=r=>{const g=[];return r.forEach(f=>{const i=f.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),A=f.actors.selectedNonUsers.map(S=>{const D=!!J(S.value);return{type:D?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!D}}),m=i.concat(A);g.push({action:f.stepType.selectedOption,actors:m,operator:m.length>1?f.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g};if(s==="approval_create"){const r={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:p.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:p.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(E(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:p.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:p.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(E(r))}},onResetClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(W())},onSaveRuleSuccess:()=>{t("../")}}})(H);function C(){const e=B(),o=j(),t=U(),{approvalRuleId:n}=$(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>R(r)),[p,c]=y.useState(!1);if(y.useEffect(()=>{p||(c(!0),o(z(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(n!=null?"../../":"../")},[d,n]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(V,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Z,{navigate:e,approvalUpdateDataView:s,approvalRuleId:n,approverViewData:d,location:t})}function se(){return l.jsxs(F,{children:[l.jsx(h,{path:"/",element:l.jsx(Y,{})}),l.jsx(h,{path:"/new",element:l.jsx(C,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(C,{})}),l.jsx(h,{path:"*",element:l.jsx(K,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BIjmAr8D.js";import{j as K,h as se,u as Y,l as ae,g as v,N as te,k as X,i as na,n as ia,o as y}from"./core-BKodLOTU.js";import{eO as Z,Md as Le,bv as It,H6 as oa,bo as wt,bE as pe,Me as xt,wJ as Bt,xT as Ve,xg as la,bn as De,Mf as sa,Mg as ra,c1 as ca,Mh as da,jA as Ct,Mi as At,Mj as Et,ys as _e,wY as Ce,Mk as ua,wx as tt,Ml as pa,BE as ma,wB as ba,wH as Dt,Mm as ke,Mn as Ge,xU as Oe,Mo as ha,Mp as ga,xX as Ne,Mq as Sa,y8 as ya,Mr as jt,xE as at,xJ as fa,Ms as ka,Mt as ue,Mu as Tt,Mv as Pt,Mw as Ft,fI as va,x1 as $e,cw as Rt,Mx as Ia,gM as wa,My as xa,Mz as Ba,eU as Mt,eS as Vt,MA as ze,MB as Ca,MC as Aa,JY as Ze,MD as Ea,JZ as oe,J_ as He,ME as Da,MF as ja,MG as Ta,xL as nt,xI as Pa,MH as Fa,MI as Ra,MJ as Ma,xu as Va,MK as $a,ML as Ua,MM as La,ck as $t,cM as Ut,jL as _a,bK as Ga,bq as Lt,bL as _t,vP as Oa,MN as Na,Br as za,Bx as Za,sm as Ha,xV as Wa,yz as qa,jY as fe,MO as Ja,MP as Gt,kq as Ka,jS as Ot,kb as Nt,ka as it,bD as be,bJ as Ya,MQ as Xa,MR as ve,iv as Qa,MS as ot,MT as en,iz as tn,iU as an,yN as nn,MU as on,kj as ln,yD as sn,MV as lt,yH as rn,yM as cn,yJ as dn,yB as un,MW as zt,wS as pn,MX as mn,MY as bn,fA as hn,fz as gn,fy as Sn,j$ as yn,kh as st,ks as fn,pO as kn,k8 as vn,yF as In,iF as wn,kx as xn,MZ as Bn,ix as Cn,pF as An,M_ as En,xA as Dn,bF as jn,bs as Tn,IS as Pn,cO as Fn,cN as Rn,cv as Mn,cB as Vn}from"./zeni-epic-state-BIWtgoix.js";import{m as me,z as M,k as Ie,y as le,S,aK as Ae,B as re,o as A,s as je,c as D,b5 as $n,p as z,W as We,j as E,Z as we,b6 as rt,b7 as ct,b8 as Un,ah as Ln,E as _n,aE as Gn,C as Zt,D as qe,G as Je,b9 as On,aq as Ht,ba as Nn,R as zn,e as Wt,a3 as Zn,bb as Hn,bc as Wn,bd as qn,be as Jn,bf as Kn,bg as Yn,bh as Xn,bi as Qn,bj as ei,n as ti,bk as ai,b1 as ni,bl as ii,bm as oi,a6 as li}from"./index-DgXtqBbG.js";import{n as U,S as si}from"./mui-DlcK-nJn.js";import{A as dt}from"./AddressScreen-CuUKXSzu.js";import{g as ie,a as Te,i as qt,V as Ke,b as Ye,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-B6iZuZi9.js";import{a as f}from"./sentry-C7Z-vgKp.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-W_9VZ3t4.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-Cz8Tf2BI.js";import{u as Jt}from"./useInitialThreadRequest-CAZ-K4F8.js";import Ee from"./NotFoundScreen-CqbkZ3cL.js";import{D as ui}from"./DrawerScreen-D9KNdVWU.js";import{M as Kt}from"./MobileAppDrawer-D63DUeYO.js";import{F as Yt}from"./FeaturePreviewScreen-B8pdIx01.js";import{S as Pe}from"./SetupPagesScreen-CaZ5sjLL.js";import{B as pi}from"./BillPayApprovalRoutes-C9yprVKV.js";import{FallBackRoute as mi}from"./ScreenRoutes-d397mPpj.js";import"./recharts-DpNbjrAJ.js";import"./analytics-XmeShL-b.js";import"./plaid-BGq6dat6.js";import"./dnd-BfyJbD1v.js";import"./stripe-DMRn4zHo.js";import"./lottie-CoPzS9gq.js";import"./lexical-QHBaN_fi.js";import"./pdf-BfwwIhDV.js";import"./utils-DuhvVf2U.js";import"./analyticsHelper-D78arCNY.js";import"./routePaths-B97q6EVJ.js";import"./BusinessVerificationPageScreen-BmpszVa6.js";import"./ReimbursementApprovalRuleDetailScreen-D-Epy7s3.js";import"./getLocaleForTenant-xCoWhIqf.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]="aa7486b3-c592-449d-9b95-9e3238f14d3e",e._sentryDebugIdIdentifier="sentry-dbid-aa7486b3-c592-449d-9b95-9e3238f14d3e")}catch{}})();const bi=X(function(e,t){const l=Le(e,t.billId),i=M.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},u=z(t.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;const n=De(i);n||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let d=!1,p=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:g,isMarkAsPaidBtnVisible:b}=sa(l.billActivities,ra(t.currentTenant),i);d=g,p=b}const m=ca(t.currentTenant?.userRole??[]),h=l.transactionDetails!=null&&da(l.transactionDetails,m,i);return{billDetails:l,isAccountingClassesEnabled:Ct(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${We}/transaction_attachment`,signedInUser:i,showBackButton:o,isAdmin:m,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:D,showMarkAsPaidButtonToCreator:h,isZeniUser:n}},function(e,t){const{billId:l,currentTenant:i,location:c,navigate:r}=t,{tenantEmailDomain:u}=i;return{redirectToBillsScreen:()=>{const o=ie(u),s=E(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(ke({}))},deleteBill:o=>{D.trackBillPayDeleteBill(l,o),e(Dt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?D.trackBillPayCancelAndDeleteBill(l,o):D.trackBillPayCancelBill(l),e(ba(l,s))},onSaveRealTimeApprovals:o=>{e(ma(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(pa({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(tt(l,o.type,"")):e(tt(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Ce(l,"retry")):e(Ce(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const n=Te(u,o,s),d=E(c.state?.pathnameStackToGoBack,c.pathname);r(n,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=z(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ie(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ua({billId:t.billId}))},onRefundPaymentClick:()=>{e(Ce(t.billId,"refund"))},saveBillDetails:(o,s,n)=>{o&&e(Et({data:n,billId:l})),e(_e(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(At({billId:l}))}}})($n);function hi(){const e=K(),t=se(),l=Y(),{billId:i}=ae(),c=me(),r=M.getSignedInUser(),u=Ie(),o=v(O=>Z(O)),s=v(O=>Le(O,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Jt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Xe({mobileExploreReferrer:"Bill Details"});Qe({isDataReady:s.fetchState==="Completed"});const h=o?.userRole!=null&&It(o?.userRole),g=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h,[b,k]=f.useState(!1),[j,x]=f.useState(!1),[B,_]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:L}=le(),{isFeatureEnabled:V}=T(S.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(S.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(S.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=L(Ae.zeniAssistConfig),C=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),$=G.user_ids!=null&&r?.userId!=null&&G.user_ids.includes(r?.userId),{isFeatureEnabled:J}=T(S.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Q}=T(S.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{V&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&C===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(O=>O.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,C,r]),f.useEffect(()=>{i!=null&&t(xt(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Bt(i??"",V,$,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),t(Ve(!1,V,$,Q,i)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(la()))},[j,s,i,t]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?a.jsx(te,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(re,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(je,{analytics:D,onLoad:O=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(O)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:V,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:B,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:J,hasZeniAssistAccess:$,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const Se=qe.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=X(function(e,t){const l=M.getSignedInUser(),i=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Ht.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:D,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=M.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Ne(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(ya({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Oe(i))},onDeleteClick:()=>{e(Sa({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Gn);function w({appContent:e}){const t=se(),l=K(),{billId:i}=ae(),c=Y(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=M.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=le(),{isFeatureEnabled:m}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:h}=d(S.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:g}=d(S.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(S.billPaySetupShowInternationalPaymentByWise),{configValue:k}=p(Ae.zeniAssistConfig),j=k.user_ids!=null&&n?.userId!=null&&k.user_ids.includes(n?.userId),x=v(F=>Z(F)),[B,_]=f.useState(!1),[T,L]=f.useState(!1),[V,I]=f.useState(!1),[H,G]=f.useState(),C=v(F=>Ge(F,m,g,i));let q=C.fetchState,W=C.file,$=C.showAutofill;const J=v(F=>Le(F,i??""));u===!1&&(q=J.fetchState,W=J.transactionDetails?.attachments?.[0],$=!1);const Q=C.billPayInfo!=null&&C.billPayInfo.stage.code==="pending_approval"?C.billPayInfo.billStatus.code:C.billStage;f.useEffect(()=>{i==null&&t(Oe(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?L(!1):!u&&B&&_(!1))},[i]),f.useEffect(()=>{B||i==null||u||(_(!0),t(Bt(i,h,j,!1)),T||(L(!0),t(Ve(!1,h,j,b,i)))),u&&!T&&(L(!0),t(Ve(!1,h,j,b,i)))},[B,T,u,i,t]);const O={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Ne(H,m,i))},onCancelClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(x.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,x.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||J.fetchState==="Error")return a.jsx(Ee,{});if(q!="Completed")return i==null&&o!=="small"?a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[a.jsx(mt,{}),a.jsx(Re,{}),a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:!0,uploadStatus:C.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!C.isInitialEdit,billStage:Q}),a.jsx(Me,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||$?null:a.jsx(pt,{children:a.jsx(Xt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Un,{}),a.jsx(Me,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=C.billPayInfo!=null&&C.billPayInfo.stage.code==="pending_approval"?C.billPayInfo.billStatus.code:C.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[$&&o!=="small"?a.jsx(mt,{}):null,V?a.jsx(Ln,{titleComponent:a.jsx(wi,{children:Se.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:Se.overwriteDescription}),primaryButtonText:Se.buttons.yes,secondaryButtonText:Se.buttons.no,action:O,isEditPopup:!0}):null,o==="small"||$?null:a.jsx(pt,{children:a.jsx(Si,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:$,uploadStatus:C.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:yi(u,J,C),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,C),isInitialEdit:!!C.isInitialEdit,billStage:F}),a.jsx(Me,{windowSize:o,children:e})]})})}}function Si(){const{triggerBack:e}=On();return a.jsx(Xt,{onClick:e,"data-testid":"nav-bar-back-click"})}function yi(e,t,l){let i,c;return e?(i=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(i=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(ki,{children:[a.jsx(vi,{children:`${Se.recurringBill.recurringCycle}
|
|
1
|
+
import{j as a}from"./liveblocks-B39PlnRv.js";import{j as K,h as se,u as Y,l as ae,g as v,N as te,k as X,i as na,n as ia,o as y}from"./core-BBjwfZ-w.js";import{eO as Z,Md as Le,bv as It,H6 as oa,bo as wt,bE as pe,Me as xt,wJ as Bt,xT as Ve,xg as la,bn as De,Mf as sa,Mg as ra,c1 as ca,Mh as da,jA as Ct,Mi as At,Mj as Et,ys as _e,wY as Ce,Mk as ua,wx as tt,Ml as pa,BE as ma,wB as ba,wH as Dt,Mm as ke,Mn as Ge,xU as Oe,Mo as ha,Mp as ga,xX as Ne,Mq as Sa,y8 as ya,Mr as jt,xE as at,xJ as fa,Ms as ka,Mt as ue,Mu as Tt,Mv as Pt,Mw as Ft,fI as va,x1 as $e,cw as Rt,Mx as Ia,gM as wa,My as xa,Mz as Ba,eU as Mt,eS as Vt,MA as ze,MB as Ca,MC as Aa,JY as Ze,MD as Ea,JZ as oe,J_ as He,ME as Da,MF as ja,MG as Ta,xL as nt,xI as Pa,MH as Fa,MI as Ra,MJ as Ma,xu as Va,MK as $a,ML as Ua,MM as La,ck as $t,cM as Ut,jL as _a,bK as Ga,bq as Lt,bL as _t,vP as Oa,MN as Na,Br as za,Bx as Za,sm as Ha,xV as Wa,yz as qa,jY as fe,MO as Ja,MP as Gt,kq as Ka,jS as Ot,kb as Nt,ka as it,bD as be,bJ as Ya,MQ as Xa,MR as ve,iv as Qa,MS as ot,MT as en,iz as tn,iU as an,yN as nn,MU as on,kj as ln,yD as sn,MV as lt,yH as rn,yM as cn,yJ as dn,yB as un,MW as zt,wS as pn,MX as mn,MY as bn,fA as hn,fz as gn,fy as Sn,j$ as yn,kh as st,ks as fn,pO as kn,k8 as vn,yF as In,iF as wn,kx as xn,MZ as Bn,ix as Cn,pF as An,M_ as En,xA as Dn,bF as jn,bs as Tn,IS as Pn,cO as Fn,cN as Rn,cv as Mn,cB as Vn}from"./zeni-epic-state-Cm1-MwJ0.js";import{m as me,z as M,k as Ie,y as le,S,aK as Ae,B as re,o as A,s as je,c as D,b5 as $n,p as z,W as We,j as E,Z as we,b6 as rt,b7 as ct,b8 as Un,ah as Ln,E as _n,aE as Gn,C as Zt,D as qe,G as Je,b9 as On,aq as Ht,ba as Nn,R as zn,e as Wt,a3 as Zn,bb as Hn,bc as Wn,bd as qn,be as Jn,bf as Kn,bg as Yn,bh as Xn,bi as Qn,bj as ei,n as ti,bk as ai,b1 as ni,bl as ii,bm as oi,a6 as li}from"./index-Bc6xMvHW.js";import{n as U,S as si}from"./mui-DDDUCYEf.js";import{A as dt}from"./AddressScreen-CuesyANu.js";import{g as ie,a as Te,i as qt,V as Ke,b as Ye,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-C9ulkIw9.js";import{a as f}from"./sentry-DIjLwCle.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-B2Clt3Vs.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-rXmnxLOI.js";import{u as Jt}from"./useInitialThreadRequest-RW-Kpf3I.js";import Ee from"./NotFoundScreen-Ci6yz6WX.js";import{D as ui}from"./DrawerScreen-ByL7MAwq.js";import{M as Kt}from"./MobileAppDrawer-0_yL5YFX.js";import{F as Yt}from"./FeaturePreviewScreen-bQK5qT60.js";import{S as Pe}from"./SetupPagesScreen-Da3YdcQb.js";import{B as pi}from"./BillPayApprovalRoutes-CHSOiIst.js";import{FallBackRoute as mi}from"./ScreenRoutes-C35sHH74.js";import"./recharts-BHIDIaKt.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./utils-JGBDmufg.js";import"./analyticsHelper-UJaOADor.js";import"./routePaths-ljEPT-cS.js";import"./BusinessVerificationPageScreen-DCsTb_7D.js";import"./ReimbursementApprovalRuleDetailScreen-BBECpmB2.js";import"./getLocaleForTenant-BoZerb2M.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]="aa7486b3-c592-449d-9b95-9e3238f14d3e",e._sentryDebugIdIdentifier="sentry-dbid-aa7486b3-c592-449d-9b95-9e3238f14d3e")}catch{}})();const bi=X(function(e,t){const l=Le(e,t.billId),i=M.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},u=z(t.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;const n=De(i);n||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let d=!1,p=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:g,isMarkAsPaidBtnVisible:b}=sa(l.billActivities,ra(t.currentTenant),i);d=g,p=b}const m=ca(t.currentTenant?.userRole??[]),h=l.transactionDetails!=null&&da(l.transactionDetails,m,i);return{billDetails:l,isAccountingClassesEnabled:Ct(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${We}/transaction_attachment`,signedInUser:i,showBackButton:o,isAdmin:m,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:D,showMarkAsPaidButtonToCreator:h,isZeniUser:n}},function(e,t){const{billId:l,currentTenant:i,location:c,navigate:r}=t,{tenantEmailDomain:u}=i;return{redirectToBillsScreen:()=>{const o=ie(u),s=E(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(ke({}))},deleteBill:o=>{D.trackBillPayDeleteBill(l,o),e(Dt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?D.trackBillPayCancelAndDeleteBill(l,o):D.trackBillPayCancelBill(l),e(ba(l,s))},onSaveRealTimeApprovals:o=>{e(ma(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(pa({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(tt(l,o.type,"")):e(tt(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Ce(l,"retry")):e(Ce(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const n=Te(u,o,s),d=E(c.state?.pathnameStackToGoBack,c.pathname);r(n,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=z(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ie(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ua({billId:t.billId}))},onRefundPaymentClick:()=>{e(Ce(t.billId,"refund"))},saveBillDetails:(o,s,n)=>{o&&e(Et({data:n,billId:l})),e(_e(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(At({billId:l}))}}})($n);function hi(){const e=K(),t=se(),l=Y(),{billId:i}=ae(),c=me(),r=M.getSignedInUser(),u=Ie(),o=v(O=>Z(O)),s=v(O=>Le(O,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Jt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Xe({mobileExploreReferrer:"Bill Details"});Qe({isDataReady:s.fetchState==="Completed"});const h=o?.userRole!=null&&It(o?.userRole),g=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h,[b,k]=f.useState(!1),[j,x]=f.useState(!1),[B,_]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:L}=le(),{isFeatureEnabled:V}=T(S.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(S.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(S.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=L(Ae.zeniAssistConfig),C=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),$=G.user_ids!=null&&r?.userId!=null&&G.user_ids.includes(r?.userId),{isFeatureEnabled:J}=T(S.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Q}=T(S.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{V&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&C===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(O=>O.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,C,r]),f.useEffect(()=>{i!=null&&t(xt(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Bt(i??"",V,$,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),t(Ve(!1,V,$,Q,i)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(la()))},[j,s,i,t]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?a.jsx(te,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(re,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(je,{analytics:D,onLoad:O=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(O)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:V,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:B,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:J,hasZeniAssistAccess:$,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const Se=qe.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=X(function(e,t){const l=M.getSignedInUser(),i=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Ht.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:D,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=M.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Ne(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(ya({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Oe(i))},onDeleteClick:()=>{e(Sa({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Gn);function w({appContent:e}){const t=se(),l=K(),{billId:i}=ae(),c=Y(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=M.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=le(),{isFeatureEnabled:m}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:h}=d(S.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:g}=d(S.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(S.billPaySetupShowInternationalPaymentByWise),{configValue:k}=p(Ae.zeniAssistConfig),j=k.user_ids!=null&&n?.userId!=null&&k.user_ids.includes(n?.userId),x=v(F=>Z(F)),[B,_]=f.useState(!1),[T,L]=f.useState(!1),[V,I]=f.useState(!1),[H,G]=f.useState(),C=v(F=>Ge(F,m,g,i));let q=C.fetchState,W=C.file,$=C.showAutofill;const J=v(F=>Le(F,i??""));u===!1&&(q=J.fetchState,W=J.transactionDetails?.attachments?.[0],$=!1);const Q=C.billPayInfo!=null&&C.billPayInfo.stage.code==="pending_approval"?C.billPayInfo.billStatus.code:C.billStage;f.useEffect(()=>{i==null&&t(Oe(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?L(!1):!u&&B&&_(!1))},[i]),f.useEffect(()=>{B||i==null||u||(_(!0),t(Bt(i,h,j,!1)),T||(L(!0),t(Ve(!1,h,j,b,i)))),u&&!T&&(L(!0),t(Ve(!1,h,j,b,i)))},[B,T,u,i,t]);const O={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Ne(H,m,i))},onCancelClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(x.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,x.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||J.fetchState==="Error")return a.jsx(Ee,{});if(q!="Completed")return i==null&&o!=="small"?a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[a.jsx(mt,{}),a.jsx(Re,{}),a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:!0,uploadStatus:C.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!C.isInitialEdit,billStage:Q}),a.jsx(Me,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||$?null:a.jsx(pt,{children:a.jsx(Xt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Un,{}),a.jsx(Me,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=C.billPayInfo!=null&&C.billPayInfo.stage.code==="pending_approval"?C.billPayInfo.billStatus.code:C.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[$&&o!=="small"?a.jsx(mt,{}):null,V?a.jsx(Ln,{titleComponent:a.jsx(wi,{children:Se.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:Se.overwriteDescription}),primaryButtonText:Se.buttons.yes,secondaryButtonText:Se.buttons.no,action:O,isEditPopup:!0}):null,o==="small"||$?null:a.jsx(pt,{children:a.jsx(Si,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:$,uploadStatus:C.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:yi(u,J,C),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,C),isInitialEdit:!!C.isInitialEdit,billStage:F}),a.jsx(Me,{windowSize:o,children:e})]})})}}function Si(){const{triggerBack:e}=On();return a.jsx(Xt,{onClick:e,"data-testid":"nav-bar-back-click"})}function yi(e,t,l){let i,c;return e?(i=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(i=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(ki,{children:[a.jsx(vi,{children:`${Se.recurringBill.recurringCycle}
|
|
2
2
|
${i}/${c}`}),a.jsx(Ii,{})]}):void 0}function fi(e,t){const l=t.billActivities?.[0],i=t.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(t.billStage==="draft"||i)}const pt=U.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as T}from"./liveblocks-
|
|
1
|
+
import{j as T}from"./liveblocks-B39PlnRv.js";import{a as V}from"./sentry-DIjLwCle.js";import{j as ae,u as ne,h as se,l as ie,g as C,N as oe,k as re}from"./core-BBjwfZ-w.js";import{k as ce,y as ue,aK as de,z as E,s as pe,c as B,ac as x,e as z,bu as le,aq as me,j as R,ar as M}from"./index-Bc6xMvHW.js";import{ML as fe,eO as G,rN as ye,Ha as Se,xu as ge,Ab as Ie,CK as he,Dn as be,Eg as Oe,N6 as De,N7 as ke,N8 as Te,N9 as Ce,Na as Ve,JF as Ne,M8 as we,JR as Ae,kg as Fe,fA as _e,fz as ve,fy as xe,pO as ze,pF as Ee,pC as Be,k8 as Re,rW as Me,rU as P,bD as L,s6 as U,cu as Pe}from"./zeni-epic-state-Cm1-MwJ0.js";import{n as Le}from"./mui-DDDUCYEf.js";import{c as j}from"./routePaths-ljEPT-cS.js";import{M as Ue}from"./MobileAppDrawer-0_yL5YFX.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="1747fe39-2a8f-453f-a804-0a492321ffe5",e._sentryDebugIdIdentifier="sentry-dbid-1747fe39-2a8f-453f-a804-0a492321ffe5")}catch{}})();const je=Le.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BIjmAr8D.js";import{j as le,l as ia,h as ue,g as y,u as ge,k as pe,N as ga,q as ut,n as Wt,o as te}from"./core-BKodLOTU.js";import{eO as ie,bs as Re,OD as ka,eS as be,eT as ye,eU as Se,fP as $e,cr as Ge,OE as Ye,OF as Ma,t0 as ba,jI as ya,OG as Sa,gM as oa,zu as Xe,zw as za,zx as $a,jy as mt,OH as Ze,zi as Ct,OI as qt,OJ as Jt,zl as Da,OK as Qt,N3 as _a,rc as pt,zr as Ga,gX as Xt,OL as ht,OM as Ke,bq as en,ON as an,fA as Pa,fz as wa,z$ as tn,fy as Ta,ML as nn,OO as ft,ck as gt,cM as rn,N2 as da,AB as sn,OP as tt,Ab as Fa,OQ as bt,AC as on,Nu as cn,AD as dn,Bx as ln,sm as un,Br as mn,zM as yt,zF as Cn,OR as pn,fR as hn,zV as St,zZ as It,fQ as fn,OS as gn,An as At,OT as bn,OU as yn,OV as Sn,zX as Et,zI as kt,zo as Dt,zR as _t,zP as Pt,zT as In,zv as nt,OW as wt,OX as va,A8 as Ia,JK as Tt,cN as Ya,OY as An,OZ as En,O_ as kn,O$ as Dn,A5 as Na,Au as _n,Aq as Pn,A1 as wn,As as Tn,Ai as Fn,Ak as vn,P0 as Ft,AA as vt,H6 as xn,P1 as Ln,P2 as Bn,P3 as On,P4 as xt,P5 as Rn,AX as Un,Aa as Lt,A4 as ca,A9 as jn,P6 as Nn,P7 as Vn,zf as Hn,P8 as Bt,P9 as Ot,Pa as Mn,zh as zn,zg as rt,Pb as $n,Pc as Gn,Pd as Yn,JG as Zn,Pe as Za,Pf as Kn,vS as Rt,kg as Wn,gN as qn,B0 as Jn,Pg as Ut,Ph as Qn,B1 as Xn,Pi as er,dd as ar,sW as tr,AS as nr,AM as Oe,bv as rr,bE as sr,cw as or,bF as cr,IS as ir}from"./zeni-epic-state-BIWtgoix.js";import{z as X,k as je,y as ce,S as Y,B as la,bY as xa,c7 as dr,p as ve,c8 as lr,c9 as ur,Z as ua,aK as Fe,j as fe,bf as Ka,ca as mr,C as ma,f as La,m as Wa,c as J,D as qa,cb as Cr,an as Ja,br as Je,cc as Va,cd as pr,s as Qa,a3 as hr,ce as fr,aq as jt,W as Ha,R as Nt,e as Vt,cf as gr,cg as br,ch as yr,ci as Sr,cj as Ir,ck as Ar,o as Aa,cl as Er,cm as kr,cn as Ra,n as Dr,co as _r,cp as Pr,cq as wr,cr as Tr,cs as Fr,a6 as vr}from"./index-DgXtqBbG.js";import{n as _e,D as Ht,S as xr}from"./mui-DlcK-nJn.js";import{a as i}from"./sentry-C7Z-vgKp.js";import{g as Ce,a as Ca,b as Mt,c as Ie,d as Ae,e as Ue,f as Ne,A as Lr,h as Xa,P as Br,i as et,s as Qe,j as zt,k as Me,l as $t,m as Or,n as Gt,p as Rr,S as st}from"./SetupPagesScreen-CaZ5sjLL.js";import Ba from"./NotFoundScreen-CqbkZ3cL.js";import{M as ze}from"./MobileAppDrawer-D63DUeYO.js";import{u as Yt}from"./useAskAiCfoHostNavButtonProps-W_9VZ3t4.js";import{c as Zt}from"./useFetchSuggestedQuestionsWhenReady-Cz8Tf2BI.js";import{v as ot}from"./utils-DuhvVf2U.js";import{t as Ur}from"./AddressScreen-CuUKXSzu.js";import"./recharts-DpNbjrAJ.js";import"./analytics-XmeShL-b.js";import"./plaid-BGq6dat6.js";import"./dnd-BfyJbD1v.js";import"./stripe-DMRn4zHo.js";import"./lottie-CoPzS9gq.js";import"./lexical-QHBaN_fi.js";import"./pdf-BfwwIhDV.js";import"./analyticsHelper-D78arCNY.js";import"./routePaths-B97q6EVJ.js";import"./BusinessVerificationPageScreen-BmpszVa6.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]="688401fc-61a3-4160-bb2d-b908f990f0dc",e._sentryDebugIdIdentifier="sentry-dbid-688401fc-61a3-4160-bb2d-b908f990f0dc")}catch{}})();function jr(){const e=le(),{cardId:t}=ia(),a=ue(),r=X.getSignedInUser(),n=y(Q=>ie(Q)),C=je(),p=Re(C?.loggedInUserRoleMap),{useFeatureGate:u}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(Q=>ka(Q).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=u(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=u(Y.isDebitCardFeatureEnabled),F=be(n),k=ye(n),h=Se(R,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:h}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,v=y(Q=>$e(Q,n.companyId)),N=Ge(v.controllers),{creditAccount:B,creditAccountRepayment:w}=y(Q=>Ye(Q)),V=y(Q=>Q.classListState.fetchState),m=!_&&d&&f,l=y(Q=>Ma(Q,t,m,d)),[P,T]=i.useState(!1),H=l.chargeCard,O=H?.cardCreatedByUser?.userId,K=y(Q=>O!=null?ba(Q.userRoleState,O):void 0),I=K?.accountingClassIDs[0],L=y(Q=>I!=null?ya(Q.classState,{classId:I,reportId:"class_list"}):void 0),j=H?.cardHolderUser?.userId,U=y(Q=>j!=null?ba(Q.userRoleState,j):void 0),W=U?.accountingClassIDs[0],E=y(Q=>W!=null?ya(Q.classState,{classId:W,reportId:"class_list"}):void 0),G=H?.type.code==="business_physical_credit_card"||H?.type.code==="business_physical_debit_card",q=H?.type.code==="business_physical_debit_card";i.useEffect(()=>{c&&S===!1&&G&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[c,S,G,q]),i.useEffect(()=>{P||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(T(!0),a(Xe(t,m,!1)))},[P,l,t,a]),i.useEffect(()=>{if(l.fetchState==="Completed"&&(G===!1||G&&H?.status?.code!=="active"||H?.cardHolderUserId!==r.userId||c===!1&&S===!1||H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card")){const Q=Ce(n.tenantEmailDomain,t,r,H,c);e(Q)}},[l.fetchState,c,G]),i.useEffect(()=>{B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&d&&f&&p&&a(za()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&d&&f&&p&&a($a()),V!=="Completed"&&V!=="In-Progress"&&a(mt())},[B.fetchState,w.fetchState,a,d,f,p,V]);const $=()=>{if(r!=null&&t!=null){a(Sa());const Q=Ce(n.tenantEmailDomain,t,r);e(Q)}},x=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Ue(d,g,D,f),ae=Ca(d,f,p,B,w),ne=Mt(x,l);return l.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:c}),s.jsx(dr,{onGotItClick:$,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:N,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:B,classListFetchState:V,creditAccountRepayment:w,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:L?.className,cardHolderRoles:U?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=pe(function(e){const t=Ze(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(qt({uiState:{sortKey:t,sortOrder:a}}))}}})(ur);function Vr(){const e=le(),t=ue(),a=ge(),r=X.getSignedInUser(),n=y(o=>ie(o)),[C,p]=i.useState(!1),u=y(o=>Ze(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??Hr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{C||u.fetchState==="Completed"||u.fetchState==="In-Progress"||(p(!0),t(Ct()))},[C,u,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return u.fetchState==="In-Progress"?s.jsx(lr,{onBackClick:S}):u.cashbackSummary.cashbackEarned.amount===0&&u.fetchState==="Completed"?s.jsx(Ba,{}):s.jsx(Nr,{onBackClick:S})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new ma(100,58)},zr=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ia(),C=ge(),{useDynamicConfig:p}=ce(),[u,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,R]=i.useState(!1),F=X.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const k=y(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=p(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=y(E=>Jt(E,n)),d=g.chargeCard,D=y(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:v}=ce(),{isFeatureEnabled:N}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:B}=v(Y.isDebitCardFeatureEnabled),w=Se(B,k),V=Ie({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:w}),m=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),P=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,O=Ae({isCardsOnlyTenant:P,isChargeCardFeatureEnabled:N,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&O&&m;i.useEffect(()=>{u===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Xe(n,K,O)))},[o,g.fetchState,u,D]);const I=d?.type.code==="business_physical_credit_card"||d?.type.code==="business_physical_debit_card";i.useEffect(()=>{if(g.fetchState==="Completed"){if(_===!1&&(I===!1||I&&d?.status?.code!=="inactive"||d?.cardHolderUserId!==F.userId)){const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(C.state?.pathnameStackToGoBack,C.pathname);r(E,{state:{pathnameStackToGoBack:G}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Qt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(C.state?.pathnameStackToGoBack,C.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:G}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const L=X.getZeniOtpTokenForCardHolder(n),j=y(E=>pt(E.userState,F.userId)),U=()=>{d?.status?.code!=="active"&&a(Ga(n,!0))};i.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&_===!1&&(setTimeout(U,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=E=>{R(E)};if(D!=="Completed"||d==null)return s.jsx(la,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(j?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Yr,{children:[s.jsx(ze,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx($r,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:j.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:L,navigate:r,currentTenant:k,location:C,maxChargeCardActivationAttempts:b[n]!=null?b[n]:h.default_max_charge_card_activation_attempts!=null?h.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(Gr,{windowSize:t,children:e}):null]})},$r=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const C=Xt(e.addressState,a);if(C==null)throw Error("Can't access shippingAddress.");const p=ht(e,n),u=t.updateStatus,S=Ke(e,!1,!1,!1);let o=!1;S.fetchState==="Completed"&&S.cards.length<=1&&(o=!0);const c=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(en())||c,showMenuIcon:o,shippingAddress:C,vgsVaultId:La.cardVaultId,twoFAView:p,activationWaitStatus:u,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:C,chargeCardDetailState:p}=t,u=p.chargeCard?.cardProviderID,{tenantEmailDomain:S}=C;return{onGetOtp:o=>{u!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(tn(r,o))},onResendOtp:o=>{u!=null&&e(wa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{u!=null&&e(Pa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(an({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),c=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ne(S):o.poppedPathname;a(c,{state:{pathnameStackToGoBack:o.newStack}})}}})(mr),Gr=_e.div`
|
|
1
|
+
import{j as s}from"./liveblocks-B39PlnRv.js";import{j as le,l as ia,h as ue,g as y,u as ge,k as pe,N as ga,q as ut,n as Wt,o as te}from"./core-BBjwfZ-w.js";import{eO as ie,bs as Re,OD as ka,eS as be,eT as ye,eU as Se,fP as $e,cr as Ge,OE as Ye,OF as Ma,t0 as ba,jI as ya,OG as Sa,gM as oa,zu as Xe,zw as za,zx as $a,jy as mt,OH as Ze,zi as Ct,OI as qt,OJ as Jt,zl as Da,OK as Qt,N3 as _a,rc as pt,zr as Ga,gX as Xt,OL as ht,OM as Ke,bq as en,ON as an,fA as Pa,fz as wa,z$ as tn,fy as Ta,ML as nn,OO as ft,ck as gt,cM as rn,N2 as da,AB as sn,OP as tt,Ab as Fa,OQ as bt,AC as on,Nu as cn,AD as dn,Bx as ln,sm as un,Br as mn,zM as yt,zF as Cn,OR as pn,fR as hn,zV as St,zZ as It,fQ as fn,OS as gn,An as At,OT as bn,OU as yn,OV as Sn,zX as Et,zI as kt,zo as Dt,zR as _t,zP as Pt,zT as In,zv as nt,OW as wt,OX as va,A8 as Ia,JK as Tt,cN as Ya,OY as An,OZ as En,O_ as kn,O$ as Dn,A5 as Na,Au as _n,Aq as Pn,A1 as wn,As as Tn,Ai as Fn,Ak as vn,P0 as Ft,AA as vt,H6 as xn,P1 as Ln,P2 as Bn,P3 as On,P4 as xt,P5 as Rn,AX as Un,Aa as Lt,A4 as ca,A9 as jn,P6 as Nn,P7 as Vn,zf as Hn,P8 as Bt,P9 as Ot,Pa as Mn,zh as zn,zg as rt,Pb as $n,Pc as Gn,Pd as Yn,JG as Zn,Pe as Za,Pf as Kn,vS as Rt,kg as Wn,gN as qn,B0 as Jn,Pg as Ut,Ph as Qn,B1 as Xn,Pi as er,dd as ar,sW as tr,AS as nr,AM as Oe,bv as rr,bE as sr,cw as or,bF as cr,IS as ir}from"./zeni-epic-state-Cm1-MwJ0.js";import{z as X,k as je,y as ce,S as Y,B as la,bY as xa,c7 as dr,p as ve,c8 as lr,c9 as ur,Z as ua,aK as Fe,j as fe,bf as Ka,ca as mr,C as ma,f as La,m as Wa,c as J,D as qa,cb as Cr,an as Ja,br as Je,cc as Va,cd as pr,s as Qa,a3 as hr,ce as fr,aq as jt,W as Ha,R as Nt,e as Vt,cf as gr,cg as br,ch as yr,ci as Sr,cj as Ir,ck as Ar,o as Aa,cl as Er,cm as kr,cn as Ra,n as Dr,co as _r,cp as Pr,cq as wr,cr as Tr,cs as Fr,a6 as vr}from"./index-Bc6xMvHW.js";import{n as _e,D as Ht,S as xr}from"./mui-DDDUCYEf.js";import{a as i}from"./sentry-DIjLwCle.js";import{g as Ce,a as Ca,b as Mt,c as Ie,d as Ae,e as Ue,f as Ne,A as Lr,h as Xa,P as Br,i as et,s as Qe,j as zt,k as Me,l as $t,m as Or,n as Gt,p as Rr,S as st}from"./SetupPagesScreen-Da3YdcQb.js";import Ba from"./NotFoundScreen-Ci6yz6WX.js";import{M as ze}from"./MobileAppDrawer-0_yL5YFX.js";import{u as Yt}from"./useAskAiCfoHostNavButtonProps-B2Clt3Vs.js";import{c as Zt}from"./useFetchSuggestedQuestionsWhenReady-rXmnxLOI.js";import{v as ot}from"./utils-JGBDmufg.js";import{t as Ur}from"./AddressScreen-CuesyANu.js";import"./recharts-BHIDIaKt.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./analyticsHelper-UJaOADor.js";import"./routePaths-ljEPT-cS.js";import"./BusinessVerificationPageScreen-DCsTb_7D.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]="688401fc-61a3-4160-bb2d-b908f990f0dc",e._sentryDebugIdIdentifier="sentry-dbid-688401fc-61a3-4160-bb2d-b908f990f0dc")}catch{}})();function jr(){const e=le(),{cardId:t}=ia(),a=ue(),r=X.getSignedInUser(),n=y(Q=>ie(Q)),C=je(),p=Re(C?.loggedInUserRoleMap),{useFeatureGate:u}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(Q=>ka(Q).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=u(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=u(Y.isDebitCardFeatureEnabled),F=be(n),k=ye(n),h=Se(R,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:h}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,v=y(Q=>$e(Q,n.companyId)),N=Ge(v.controllers),{creditAccount:B,creditAccountRepayment:w}=y(Q=>Ye(Q)),V=y(Q=>Q.classListState.fetchState),m=!_&&d&&f,l=y(Q=>Ma(Q,t,m,d)),[P,T]=i.useState(!1),H=l.chargeCard,O=H?.cardCreatedByUser?.userId,K=y(Q=>O!=null?ba(Q.userRoleState,O):void 0),I=K?.accountingClassIDs[0],L=y(Q=>I!=null?ya(Q.classState,{classId:I,reportId:"class_list"}):void 0),j=H?.cardHolderUser?.userId,U=y(Q=>j!=null?ba(Q.userRoleState,j):void 0),W=U?.accountingClassIDs[0],E=y(Q=>W!=null?ya(Q.classState,{classId:W,reportId:"class_list"}):void 0),G=H?.type.code==="business_physical_credit_card"||H?.type.code==="business_physical_debit_card",q=H?.type.code==="business_physical_debit_card";i.useEffect(()=>{c&&S===!1&&G&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[c,S,G,q]),i.useEffect(()=>{P||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(T(!0),a(Xe(t,m,!1)))},[P,l,t,a]),i.useEffect(()=>{if(l.fetchState==="Completed"&&(G===!1||G&&H?.status?.code!=="active"||H?.cardHolderUserId!==r.userId||c===!1&&S===!1||H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card")){const Q=Ce(n.tenantEmailDomain,t,r,H,c);e(Q)}},[l.fetchState,c,G]),i.useEffect(()=>{B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&d&&f&&p&&a(za()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&d&&f&&p&&a($a()),V!=="Completed"&&V!=="In-Progress"&&a(mt())},[B.fetchState,w.fetchState,a,d,f,p,V]);const $=()=>{if(r!=null&&t!=null){a(Sa());const Q=Ce(n.tenantEmailDomain,t,r);e(Q)}},x=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Ue(d,g,D,f),ae=Ca(d,f,p,B,w),ne=Mt(x,l);return l.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:c}),s.jsx(dr,{onGotItClick:$,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:N,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:B,classListFetchState:V,creditAccountRepayment:w,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:L?.className,cardHolderRoles:U?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=pe(function(e){const t=Ze(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(qt({uiState:{sortKey:t,sortOrder:a}}))}}})(ur);function Vr(){const e=le(),t=ue(),a=ge(),r=X.getSignedInUser(),n=y(o=>ie(o)),[C,p]=i.useState(!1),u=y(o=>Ze(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??Hr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{C||u.fetchState==="Completed"||u.fetchState==="In-Progress"||(p(!0),t(Ct()))},[C,u,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return u.fetchState==="In-Progress"?s.jsx(lr,{onBackClick:S}):u.cashbackSummary.cashbackEarned.amount===0&&u.fetchState==="Completed"?s.jsx(Ba,{}):s.jsx(Nr,{onBackClick:S})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new ma(100,58)},zr=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ia(),C=ge(),{useDynamicConfig:p}=ce(),[u,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,R]=i.useState(!1),F=X.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const k=y(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=p(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=y(E=>Jt(E,n)),d=g.chargeCard,D=y(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:v}=ce(),{isFeatureEnabled:N}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:B}=v(Y.isDebitCardFeatureEnabled),w=Se(B,k),V=Ie({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:w}),m=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),P=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,O=Ae({isCardsOnlyTenant:P,isChargeCardFeatureEnabled:N,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&O&&m;i.useEffect(()=>{u===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Xe(n,K,O)))},[o,g.fetchState,u,D]);const I=d?.type.code==="business_physical_credit_card"||d?.type.code==="business_physical_debit_card";i.useEffect(()=>{if(g.fetchState==="Completed"){if(_===!1&&(I===!1||I&&d?.status?.code!=="inactive"||d?.cardHolderUserId!==F.userId)){const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(C.state?.pathnameStackToGoBack,C.pathname);r(E,{state:{pathnameStackToGoBack:G}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Qt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(C.state?.pathnameStackToGoBack,C.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:G}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const L=X.getZeniOtpTokenForCardHolder(n),j=y(E=>pt(E.userState,F.userId)),U=()=>{d?.status?.code!=="active"&&a(Ga(n,!0))};i.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&_===!1&&(setTimeout(U,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=E=>{R(E)};if(D!=="Completed"||d==null)return s.jsx(la,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(j?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Yr,{children:[s.jsx(ze,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx($r,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:j.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:L,navigate:r,currentTenant:k,location:C,maxChargeCardActivationAttempts:b[n]!=null?b[n]:h.default_max_charge_card_activation_attempts!=null?h.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(Gr,{windowSize:t,children:e}):null]})},$r=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const C=Xt(e.addressState,a);if(C==null)throw Error("Can't access shippingAddress.");const p=ht(e,n),u=t.updateStatus,S=Ke(e,!1,!1,!1);let o=!1;S.fetchState==="Completed"&&S.cards.length<=1&&(o=!0);const c=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(en())||c,showMenuIcon:o,shippingAddress:C,vgsVaultId:La.cardVaultId,twoFAView:p,activationWaitStatus:u,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:C,chargeCardDetailState:p}=t,u=p.chargeCard?.cardProviderID,{tenantEmailDomain:S}=C;return{onGetOtp:o=>{u!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(tn(r,o))},onResendOtp:o=>{u!=null&&e(wa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{u!=null&&e(Pa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(an({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),c=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ne(S):o.poppedPathname;a(c,{state:{pathnameStackToGoBack:o.newStack}})}}})(mr),Gr=_e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: ${e=>`${Mr.containerWidth.value(e.windowSize)}%`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-B39PlnRv.js";import{a as g}from"./sentry-DIjLwCle.js";import{j as w,h as k,u as x,l as T,g as O,k as E}from"./core-BBjwfZ-w.js";import{z as N,b1 as P,s as F,c as V,e as j,ac as b,b2 as A,aq as L,ar as M,j as U}from"./index-Bc6xMvHW.js";import{eO as D,fC as B,rN as _,fx as R,c1 as z,M8 as G,bn as Y,pO as q,pC as H,k8 as Z,lE as S,M9 as $,bD as J,cu as C,lM as K,lP as Q}from"./zeni-epic-state-Cm1-MwJ0.js";import"./mui-DDDUCYEf.js";import{c as W}from"./routePaths-ljEPT-cS.js";import{M as X}from"./MobileAppDrawer-0_yL5YFX.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]="d90474b9-5c8b-44cd-ac07-204cb4d8e9d3",t._sentryDebugIdIdentifier="sentry-dbid-d90474b9-5c8b-44cd-ac07-204cb4d8e9d3")}catch{}})();const ee=E(function(t){const a=R(t),i=N.getSignedInUser(),l=D(t),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(l?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(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:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Y(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=U(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(K({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,v={companyInfo:{...n,website:u!=""&&u!=null?C(u):void 0,meetingLink:y!=""&&y!=null?C(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:M(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?J(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:v}))},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(Z({files:e}))},onDeleteFile:e=>{t(H(e))},onEditFileName:(e,n)=>{t(q(e,n.split(".")[0]))}}})(A);function de(){const t=w(),a=k(),i=x(),{tenantEmailDomain:l}=T(),[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=>D(s)),d=r.companyId??N.getSignedInUserTenant(l)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||n!=="Not-Started"||d==null||(p(!0),a(B(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(P,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(F,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-
|
|
1
|
+
import{j as C}from"./liveblocks-B39PlnRv.js";import{a}from"./sentry-DIjLwCle.js";import{h as D,u as v,g as u,N as w}from"./core-BBjwfZ-w.js";import{IO as O,eO as A,fj as j,mv as L,fL as h,fi as U,eP as _,IV as F}from"./zeni-epic-state-Cm1-MwJ0.js";import{u as $,z as c,L as g,D as k,o as H}from"./index-Bc6xMvHW.js";import{n as P}from"./mui-DDDUCYEf.js";import{t as z}from"./getLocaleForTenant-BoZerb2M.js";import{g as R,Q as V}from"./QBOConnectionScreen-BIW-FO4V.js";import"./recharts-BHIDIaKt.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./utils-JGBDmufg.js";import"./empty-D3ckVh54.js";import"./pdf-lib-dhF6OL1F.js";import"./index-DDGk-hPA.js";import"./url-BmC62H-f.js";import"./index-BkZDwv6J.js";import"./decodeURIComponentSafe-B_FKdp2Y.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]="a30747ce-8ad1-4595-93a5-8c52b283213e",t._sentryDebugIdIdentifier="sentry-dbid-a30747ce-8ad1-4595-93a5-8c52b283213e")}catch{}})();const G=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
flex-direction: row;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./liveblocks-B39PlnRv.js";import{z as a}from"./index-Bc6xMvHW.js";import{g as n}from"./QBOConnectionScreen-BIW-FO4V.js";import"./sentry-DIjLwCle.js";import{u as p,N as s}from"./core-BBjwfZ-w.js";import"./zeni-epic-state-Cm1-MwJ0.js";import"./recharts-BHIDIaKt.js";import"./mui-DDDUCYEf.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./utils-JGBDmufg.js";import"./empty-D3ckVh54.js";import"./pdf-lib-dhF6OL1F.js";import"./index-DDGk-hPA.js";import"./url-BmC62H-f.js";import"./index-BkZDwv6J.js";import"./decodeURIComponentSafe-B_FKdp2Y.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]="8d904e89-6b8e-4c86-980c-585a84d9d789",t._sentryDebugIdIdentifier="sentry-dbid-8d904e89-6b8e-4c86-980c-585a84d9d789")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),d=a.getSignedInUser()?.userId??"";if(f(o,r,e,d)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:m})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
package/dist/assets/{CustomerOnboardingRoutes-CjZn-P_R.js → CustomerOnboardingRoutes-DlpRh6C4.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-B39PlnRv.js";import{t as $e,A as Ce}from"./AddressScreen-CuesyANu.js";import ze from"./NotFoundScreen-Ci6yz6WX.js";import{a as g}from"./sentry-DIjLwCle.js";import{j as oe,u as se,h as ie,l as re,g as D,N as T,k as ce,i as Me,n as Qe,o as M}from"./core-BBjwfZ-w.js";import{n as de,k as le,z as B,y as ue,m as qe,S as _,j as V,s as H,c as N,B as we,e as X,am as Je,Z as Ke,an as ke,f as te,ao as Ze,ap as Ie,o as He,aq as We,ar as Te,as as Xe}from"./index-Bc6xMvHW.js";import{bn as Ye,eO as ee,fb as et,eU as pe,eS as me,bv as tt,mt as at,f7 as nt,bN as ot,jc as ae,jf as ve,Ji as st,bS as it,c1 as ge,r$ as he,rM as rt,JP as Y,s0 as _e,Ha as ct,kg as Ue,JQ as Ve,JR as dt,JS as lt,JT as ut,ja as pt,jd as mt,rO as Be,r_ as gt,bD as Ee,cu as ht,sc as xe,pO as ft,pC as yt,k8 as bt,fA as St,fz as Ct,fy as kt,JU as It,rG as Tt,sd as Et,sg as xt,sj as Ot,sp as Pt,cT as At}from"./zeni-epic-state-Cm1-MwJ0.js";import{n as fe}from"./mui-DDDUCYEf.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-BIW-FO4V.js";import"./recharts-BHIDIaKt.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./utils-JGBDmufg.js";import"./empty-D3ckVh54.js";import"./pdf-lib-dhF6OL1F.js";import"./index-DDGk-hPA.js";import"./url-BmC62H-f.js";import"./index-BkZDwv6J.js";import"./decodeURIComponentSafe-B_FKdp2Y.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]="b8039bed-f420-4b9e-a681-0ca49dbe93bb",t._sentryDebugIdIdentifier="sentry-dbid-b8039bed-f420-4b9e-a681-0ca49dbe93bb")}catch{}})();const jt=ce(function(t,o){const s=[];o.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),o.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),o.shouldFetchZeniAccountsPromoCard===!1&&s.push("zeni_accounts_promo_card"),o.shouldFetchRewardsPlanCard===!1&&s.push("rewards_card"),o.isExpenseAutomationEnabledForUser===!1&&s.push("expense_automation_card");const u=nt(t,s,o.signedInUser,o.isExpenseAutomationFeatureEnabledV2,o.isExpenseAutomationEnabledForUser,o.isTreasuryEnabled);return{dashboardFetchState:ot(u.reportsInOrder.map(d=>({fetchState:d.fetchState,error:d.error}))).fetchState}},function(t,o){const{themeState:s,navigate:u,location:d}=o;return{onZeniLogoClick:()=>{s.toggle()},onDashboardFetchDone:()=>{const r=V(d.state?.pathnameStackToGoBack,d.pathname);u("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Je),wt=()=>{const t=oe(),o=se(),s=ie(),u=de(),[d,r]=g.useState(!1),[p,b]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=B.getSignedInUser(),h=Ye(i),{useFeatureGate:m}=ue(),I=qe(),{isFeatureEnabled:E}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:x}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:k}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),$=C||U&&h,c=D(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),j=c.company!=null&&et(c.company),R=L&&j,O=D(l=>l.onboardingCustomerViewState.fetchState),S=c.excludedResources,G=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const w=pe(F,c),P=me(c),A=[],J=S?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,z=S?.resources?.find(l=>l.resource==="/reports/task_card")==null,Q=c?.userRole!=null&&tt(c?.userRole),v=S?.resources?.find(l=>l.resource==="/bills")==null&&!Q,q=S?.resources?.find(l=>l.resource==="/reimbursements")==null;if(J===!1&&A.push("top_expenses"),z===!1&&A.push("task_card"),v===!1&&A.push("bill_pay_card","bill_pay_promo_card"),q===!1&&A.push("reimbursement_card","reimbursement_promo_card"),k===!1&&A.push("zeni_accounts_promo_card"),f===!1&&A.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||w||P||(r(!0),s(at(i.userId,G,c.tenantId,!0,!1,A)))},[d,O,w,P,i,c.tenantId,s]),g.useEffect(()=>{(w||P)&&setTimeout(()=>{b(!0)},5e3)},[w,P]),O!=="Completed")return a.jsx(T,{to:"../"});if(O==="Completed"&&p){const l=V(o.state?.pathnameStackToGoBack,o.pathname);if(w)return a.jsx(T,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}});if(P)return a.jsx(T,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(H,{analytics:N,onLoad:l=>(K=>K.trackPageLoaded(X.Event.onboardingDashboardActivation))(l)}),a.jsx(jt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:E,isArAgingFeatureEnabled:x,shouldFetchZeniAccountsPromoCard:k,shouldFetchRewardsPlanCard:f,isExpenseAutomationEnabledForUser:$,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:R,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(we,{fetchState:"In-Progress",style:{backgroundColor:I.colors.grey5}})},Oe=fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
background-color: ${t=>t.theme.colors.grey4};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-BIjmAr8D.js";import{l as $,g as S,u as q,h as N,j as Z,k as Q,s as Ka,n as st,o as w}from"./core-BKodLOTU.js";import{eO as L,K8 as Ye,bD as Gt,bq as he,Ll as qa,i0 as Za,Lm as wt,Ln as Ha,i3 as rt,Lo as je,Lp as Qa,i8 as Ja,Lq as Dt,Lr as Wa,ic as it,Ls as Me,Lt as Xa,ck as lt,Lu as en,Lv as tn,Ks as an,j6 as nn,Lw as on,bn as Ee,Lx as Nt,JY as ae,bc as zt,jk as $t,mD as Kt,j3 as qt,J_ as ne,JZ as H,f3 as sn,eL as rn,fl as cn,Ly as ln,Lz as dn,LA as Zt,LB as _e,tR as Ie,tS as Te,ud as fe,u7 as oe,tW as xe,LC as un,LD as mn,LE as pn,LF as Ht,LG as ke,LH as hn,dC as Ve,qm as Qt,LI as fn,LJ as gn,LK as Cn,LL as dt,Jl as ut,jA as ge,ul as mt,qu as bn,LM as _n,tT as Ft,qp as me,ql as Jt,LN as ie,LO as kn,LP as pt,Jj as ht,st as Wt,LQ as Sn,LR as yn,LS as An,LT as ft,sG as vn,LU as En,tV as Ot,ss as Xt,LV as ce,LW as In,bv as ea,up as ta,LX as Tn,LY as xn,LZ as wn,L_ as gt,uk as Dn,L$ as Fn,tU as Pt,uo as aa,M0 as le,M1 as On,M2 as Pn,M3 as na,jp as oa,mA as sa,ju as ra,my as ia,mx as ca,mw as la,rR as Rn,fb as Bn,cN as Ln,cO as jn,mt as Mn,f7 as Un,mK as Yn,Dt as Rt,M4 as Vn,M5 as Gn,M6 as Nn,M7 as zn,b5 as Ct,e_ as $n,gK as Kn,fC as qn,mE as Zn,iY as Hn,mB as Qn,mz as Jn,eU as Wn,eS as Xn}from"./zeni-epic-state-BIWtgoix.js";import{z as B,W as J,j as D,c as E,D as K,aR as eo,s as we,aS as da,e as V,aT as to,k as De,aU as ua,y as Ge,S as j,m as ao,aV as no,aW as oo,Q as ma,Z as so,a as pa,a1 as ro,aK as ha,aX as io,aY as co,V as lo,aZ as uo,a_ as mo,an as po,p as ho,R as fo,a$ as go,b0 as ye}from"./index-DgXtqBbG.js";import{n as bt}from"./mui-DlcK-nJn.js";import{a as b}from"./sentry-C7Z-vgKp.js";import{w as fa}from"./withTransactionSidePanel-L5vbffjs.js";import{b as ga,t as Ce,e as se,a as _t,v as Co}from"./routePaths-B97q6EVJ.js";import{u as W}from"./useAskAiCfoHostNavButtonProps-W_9VZ3t4.js";import{c as Fe,b as bo,u as _o}from"./useFetchSuggestedQuestionsWhenReady-Cz8Tf2BI.js";import ve from"./NotFoundScreen-CqbkZ3cL.js";import{t as Ca}from"./analyticsHelper-D78arCNY.js";import{C as ko}from"./CompanyPassportScreen-QLJSDasM.js";import{F as So}from"./FeaturePreviewScreen-B8pdIx01.js";import{R as yo}from"./ReferralListScreen-BN980Avs.js";import"./recharts-DpNbjrAJ.js";import"./analytics-XmeShL-b.js";import"./plaid-BGq6dat6.js";import"./dnd-BfyJbD1v.js";import"./stripe-DMRn4zHo.js";import"./lottie-CoPzS9gq.js";import"./lexical-QHBaN_fi.js";import"./pdf-BfwwIhDV.js";import"./utils-DuhvVf2U.js";import"./TransactionDetailScreen-BT_8PHE1.js";import"./decodeURIComponentSafe-Dz-FxAXh.js";import"./MobileAppDrawer-D63DUeYO.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]="7a534423-93f6-4d04-997d-a7320fd012fc",e._sentryDebugIdIdentifier="sentry-dbid-7a534423-93f6-4d04-997d-a7320fd012fc")}catch{}})();const Ao=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=$(),s=B.getSignedInUser(),i=S(I=>I.tenantState.currentTenantId),d=S(I=>L(I)),{tenantEmailDomain:p}=$(),_=q(),g=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo(()=>({authParams:u,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Ye()}),[]),m=b.useMemo(()=>r!=null?Gt(r):he(),[r]),h=N(),f=Z(),k=S(I=>qa(I,m,o)),y=b.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&h(Za(o,m))},[m]),C=b.useCallback(()=>{f("../../",{relative:"path"})},[]),A=b.useCallback((I,z)=>{h(wt({sortKey:I,sortOrder:z}))},[]),T=b.useCallback(I=>{h(wt({downloadState:I}))},[]),M=b.useCallback(I=>{if(e)e(I.transactionId,I.transactionType);else if(p!=null){const z=ga({id:I.transactionId,type:I.transactionType},p);f(z);const de=D(_.state?.pathnameStackToGoBack,_.pathname);f(z,{state:{pathnameStackToGoBack:de}})}},[p,e]),F=b.useCallback(()=>{k.vendor!=null&&E.trackApAgingDetail("AP Aging",m.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)},[k.vendor,m]);return b.useEffect(()=>{y()},[]),b.useEffect(()=>{k.fetchState==="Completed"&&F()},[F,k.fetchState]),l.jsx(eo,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:E,onTransactionClick:M,onReload:y,onBackClick:C,onColumnSortConfigChanged:A,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),vo=()=>{const e=N(),a=Z(),t=S(A=>Ha(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=W({mobileExploreReferrer:"AP Aging"});Fe({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>L(A)),d=i?.companyName??"",p={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},_=b.useMemo(()=>({authParams:p,companyName:d,downloadEndPoint:`${J}/agingReport`,timezone:Ye()}),[]),g=t.apAgingUIState.selectedDate??he(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(rt(g))},[]);b.useEffect(()=>{u()},[]);const c=b.useCallback(()=>{a("../",{relative:"path"})},[]),m=b.useCallback(A=>{e(je({searchString:A}))},[]),h=b.useCallback((A,T)=>{e(je({sortKey:T,sortOrder:A}))},[]),f=b.useCallback(A=>{a(`./${A}/${g.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=b.useCallback(A=>{e(je({downloadState:A}))},[]),y=b.useCallback((A,T)=>{},[]),C=b.useCallback((A,T)=>{e(je({selectedDate:A,agingDateSelectionType:T})),e(rt(A))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:E,onLoad:A=>A.trackPageLoaded(V.Event.agingReport,"AP Aging")}):null,l.jsx(da,{uiState:t.apAgingUIState,report:t,downloadParams:_,analytics:E,onReloadReport:u,onBackClick:c,onSearchTextChange:m,onSortOrderChange:h,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:C,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Eo=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=$(),s=B.getSignedInUser(),i=S(F=>L(F)),{tenantEmailDomain:d}=$(),p=q(),_=i.companyName,g={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:g,companyName:_,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Ye()}),[]),c=b.useMemo(()=>r!=null?Gt(r):he(),[r]),m=N(),h=Z(),f=S(F=>Qa(F,c,o)),k=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&m(Ja(o,c))},[c]),y=b.useCallback(()=>{h("../../",{relative:"path"})},[]),C=b.useCallback((F,I)=>{m(Dt({sortKey:F,sortOrder:I}))},[]),A=b.useCallback(F=>{m(Dt({downloadState:F}))},[]),T=b.useCallback(F=>{if(e)e(F.transactionId,F.transactionType);else if(d!=null){const I=ga({id:F.transactionId,type:F.transactionType},d);h(I);const z=D(p.state?.pathnameStackToGoBack,p.pathname);h(I,{state:{pathnameStackToGoBack:z}})}},[d,e]),M=b.useCallback(()=>{f.customer!=null&&E.trackArAgingDetail("AR Aging",c.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,c]);return b.useEffect(()=>{k()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&M()},[f.fetchState,M]),l.jsx(to,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:E,onTransactionClick:T,onReload:k,onBackClick:y,onColumnSortConfigChanged:C,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const e=N(),a=Z(),t=S(C=>Wa(C)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=W({mobileExploreReferrer:"AR Aging"});Fe({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S(C=>L(C)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},p=b.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${J}/agingReport`,timezone:Ye()}),[]),_=t.arAgingUIState.selectedDate??he(),g=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(it(_))},[]);b.useEffect(()=>{g()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),c=b.useCallback(C=>{e(Me({searchString:C}))},[]),m=b.useCallback((C,A)=>{e(Me({sortKey:A,sortOrder:C}))},[]),h=b.useCallback(C=>{a(`./${C}/${_.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[_]),f=b.useCallback(C=>{e(Me({downloadState:C}))},[]),k=b.useCallback((C,A)=>{e(Me({selectedDate:C,agingDateSelectionType:A})),e(it(C))},[]),y=b.useCallback((C,A)=>{e(Xa({nodeId:C,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:E,onLoad:C=>C.trackPageLoaded(V.Event.agingReport,"AR Aging")}):null,l.jsx(da,{uiState:t.arAgingUIState,report:t,downloadParams:p,analytics:E,onReloadReport:g,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:h,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ba=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function _a(e,a){const t=an(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Ce(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(nn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?E.trackZeniAccountsCashBalancePromoClicked("Move Money"):(E.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else E.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const To=Q(function(e){const a=en(e).accountsInOrder.map((n,o)=>ba(n,o)),t=tn(e);return{sectionTitle:K.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:E}},_a)(ua),xo=Q(function(e){const a=on(e).accountsInOrder.map((o,r)=>ba(o,r)),t=B.getSignedInUser(),n=Ee(t);return{sectionTitle:K.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:E}},_a)(ua);function wo(){const e=Z(),a=q(),{tenantEmailDomain:t}=$(),n=De(),o=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=lt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(To,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function Do(){const e=Z(),a=q(),{tenantEmailDomain:t}=$(),n=De(),o=lt(n?.loggedInUserRoleMap),r=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(xo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Fo=bt.div`
|
|
1
|
+
import{j as l}from"./liveblocks-B39PlnRv.js";import{l as $,g as S,u as q,h as N,j as Z,k as Q,s as Ka,n as st,o as w}from"./core-BBjwfZ-w.js";import{eO as L,K8 as Ye,bD as Gt,bq as he,Ll as qa,i0 as Za,Lm as wt,Ln as Ha,i3 as rt,Lo as je,Lp as Qa,i8 as Ja,Lq as Dt,Lr as Wa,ic as it,Ls as Me,Lt as Xa,ck as lt,Lu as en,Lv as tn,Ks as an,j6 as nn,Lw as on,bn as Ee,Lx as Nt,JY as ae,bc as zt,jk as $t,mD as Kt,j3 as qt,J_ as ne,JZ as H,f3 as sn,eL as rn,fl as cn,Ly as ln,Lz as dn,LA as Zt,LB as _e,tR as Ie,tS as Te,ud as fe,u7 as oe,tW as xe,LC as un,LD as mn,LE as pn,LF as Ht,LG as ke,LH as hn,dC as Ve,qm as Qt,LI as fn,LJ as gn,LK as Cn,LL as dt,Jl as ut,jA as ge,ul as mt,qu as bn,LM as _n,tT as Ft,qp as me,ql as Jt,LN as ie,LO as kn,LP as pt,Jj as ht,st as Wt,LQ as Sn,LR as yn,LS as An,LT as ft,sG as vn,LU as En,tV as Ot,ss as Xt,LV as ce,LW as In,bv as ea,up as ta,LX as Tn,LY as xn,LZ as wn,L_ as gt,uk as Dn,L$ as Fn,tU as Pt,uo as aa,M0 as le,M1 as On,M2 as Pn,M3 as na,jp as oa,mA as sa,ju as ra,my as ia,mx as ca,mw as la,rR as Rn,fb as Bn,cN as Ln,cO as jn,mt as Mn,f7 as Un,mK as Yn,Dt as Rt,M4 as Vn,M5 as Gn,M6 as Nn,M7 as zn,b5 as Ct,e_ as $n,gK as Kn,fC as qn,mE as Zn,iY as Hn,mB as Qn,mz as Jn,eU as Wn,eS as Xn}from"./zeni-epic-state-Cm1-MwJ0.js";import{z as B,W as J,j as D,c as E,D as K,aR as eo,s as we,aS as da,e as V,aT as to,k as De,aU as ua,y as Ge,S as j,m as ao,aV as no,aW as oo,Q as ma,Z as so,a as pa,a1 as ro,aK as ha,aX as io,aY as co,V as lo,aZ as uo,a_ as mo,an as po,p as ho,R as fo,a$ as go,b0 as ye}from"./index-Bc6xMvHW.js";import{n as bt}from"./mui-DDDUCYEf.js";import{a as b}from"./sentry-DIjLwCle.js";import{w as fa}from"./withTransactionSidePanel-BlS3p_C_.js";import{b as ga,t as Ce,e as se,a as _t,v as Co}from"./routePaths-ljEPT-cS.js";import{u as W}from"./useAskAiCfoHostNavButtonProps-B2Clt3Vs.js";import{c as Fe,b as bo,u as _o}from"./useFetchSuggestedQuestionsWhenReady-rXmnxLOI.js";import ve from"./NotFoundScreen-Ci6yz6WX.js";import{t as Ca}from"./analyticsHelper-UJaOADor.js";import{C as ko}from"./CompanyPassportScreen-D4G9u_te.js";import{F as So}from"./FeaturePreviewScreen-bQK5qT60.js";import{R as yo}from"./ReferralListScreen-CwGh20kJ.js";import"./recharts-BHIDIaKt.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./utils-JGBDmufg.js";import"./TransactionDetailScreen-iNXvpE1w.js";import"./decodeURIComponentSafe-B_FKdp2Y.js";import"./MobileAppDrawer-0_yL5YFX.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]="7a534423-93f6-4d04-997d-a7320fd012fc",e._sentryDebugIdIdentifier="sentry-dbid-7a534423-93f6-4d04-997d-a7320fd012fc")}catch{}})();const Ao=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=$(),s=B.getSignedInUser(),i=S(I=>I.tenantState.currentTenantId),d=S(I=>L(I)),{tenantEmailDomain:p}=$(),_=q(),g=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo(()=>({authParams:u,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Ye()}),[]),m=b.useMemo(()=>r!=null?Gt(r):he(),[r]),h=N(),f=Z(),k=S(I=>qa(I,m,o)),y=b.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&h(Za(o,m))},[m]),C=b.useCallback(()=>{f("../../",{relative:"path"})},[]),A=b.useCallback((I,z)=>{h(wt({sortKey:I,sortOrder:z}))},[]),T=b.useCallback(I=>{h(wt({downloadState:I}))},[]),M=b.useCallback(I=>{if(e)e(I.transactionId,I.transactionType);else if(p!=null){const z=ga({id:I.transactionId,type:I.transactionType},p);f(z);const de=D(_.state?.pathnameStackToGoBack,_.pathname);f(z,{state:{pathnameStackToGoBack:de}})}},[p,e]),F=b.useCallback(()=>{k.vendor!=null&&E.trackApAgingDetail("AP Aging",m.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)},[k.vendor,m]);return b.useEffect(()=>{y()},[]),b.useEffect(()=>{k.fetchState==="Completed"&&F()},[F,k.fetchState]),l.jsx(eo,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:E,onTransactionClick:M,onReload:y,onBackClick:C,onColumnSortConfigChanged:A,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),vo=()=>{const e=N(),a=Z(),t=S(A=>Ha(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=W({mobileExploreReferrer:"AP Aging"});Fe({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>L(A)),d=i?.companyName??"",p={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},_=b.useMemo(()=>({authParams:p,companyName:d,downloadEndPoint:`${J}/agingReport`,timezone:Ye()}),[]),g=t.apAgingUIState.selectedDate??he(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(rt(g))},[]);b.useEffect(()=>{u()},[]);const c=b.useCallback(()=>{a("../",{relative:"path"})},[]),m=b.useCallback(A=>{e(je({searchString:A}))},[]),h=b.useCallback((A,T)=>{e(je({sortKey:T,sortOrder:A}))},[]),f=b.useCallback(A=>{a(`./${A}/${g.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=b.useCallback(A=>{e(je({downloadState:A}))},[]),y=b.useCallback((A,T)=>{},[]),C=b.useCallback((A,T)=>{e(je({selectedDate:A,agingDateSelectionType:T})),e(rt(A))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:E,onLoad:A=>A.trackPageLoaded(V.Event.agingReport,"AP Aging")}):null,l.jsx(da,{uiState:t.apAgingUIState,report:t,downloadParams:_,analytics:E,onReloadReport:u,onBackClick:c,onSearchTextChange:m,onSortOrderChange:h,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:C,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Eo=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=$(),s=B.getSignedInUser(),i=S(F=>L(F)),{tenantEmailDomain:d}=$(),p=q(),_=i.companyName,g={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:g,companyName:_,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Ye()}),[]),c=b.useMemo(()=>r!=null?Gt(r):he(),[r]),m=N(),h=Z(),f=S(F=>Qa(F,c,o)),k=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&m(Ja(o,c))},[c]),y=b.useCallback(()=>{h("../../",{relative:"path"})},[]),C=b.useCallback((F,I)=>{m(Dt({sortKey:F,sortOrder:I}))},[]),A=b.useCallback(F=>{m(Dt({downloadState:F}))},[]),T=b.useCallback(F=>{if(e)e(F.transactionId,F.transactionType);else if(d!=null){const I=ga({id:F.transactionId,type:F.transactionType},d);h(I);const z=D(p.state?.pathnameStackToGoBack,p.pathname);h(I,{state:{pathnameStackToGoBack:z}})}},[d,e]),M=b.useCallback(()=>{f.customer!=null&&E.trackArAgingDetail("AR Aging",c.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,c]);return b.useEffect(()=>{k()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&M()},[f.fetchState,M]),l.jsx(to,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:E,onTransactionClick:T,onReload:k,onBackClick:y,onColumnSortConfigChanged:C,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const e=N(),a=Z(),t=S(C=>Wa(C)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=W({mobileExploreReferrer:"AR Aging"});Fe({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S(C=>L(C)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},p=b.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${J}/agingReport`,timezone:Ye()}),[]),_=t.arAgingUIState.selectedDate??he(),g=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(it(_))},[]);b.useEffect(()=>{g()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),c=b.useCallback(C=>{e(Me({searchString:C}))},[]),m=b.useCallback((C,A)=>{e(Me({sortKey:A,sortOrder:C}))},[]),h=b.useCallback(C=>{a(`./${C}/${_.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[_]),f=b.useCallback(C=>{e(Me({downloadState:C}))},[]),k=b.useCallback((C,A)=>{e(Me({selectedDate:C,agingDateSelectionType:A})),e(it(C))},[]),y=b.useCallback((C,A)=>{e(Xa({nodeId:C,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:E,onLoad:C=>C.trackPageLoaded(V.Event.agingReport,"AR Aging")}):null,l.jsx(da,{uiState:t.arAgingUIState,report:t,downloadParams:p,analytics:E,onReloadReport:g,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:h,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ba=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function _a(e,a){const t=an(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Ce(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(nn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?E.trackZeniAccountsCashBalancePromoClicked("Move Money"):(E.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else E.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const To=Q(function(e){const a=en(e).accountsInOrder.map((n,o)=>ba(n,o)),t=tn(e);return{sectionTitle:K.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:E}},_a)(ua),xo=Q(function(e){const a=on(e).accountsInOrder.map((o,r)=>ba(o,r)),t=B.getSignedInUser(),n=Ee(t);return{sectionTitle:K.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:E}},_a)(ua);function wo(){const e=Z(),a=q(),{tenantEmailDomain:t}=$(),n=De(),o=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=lt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(To,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function Do(){const e=Z(),a=q(),{tenantEmailDomain:t}=$(),n=De(),o=lt(n?.loggedInUserRoleMap),r=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(xo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Fo=bt.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-
|
|
1
|
+
import{j as v}from"./liveblocks-B39PlnRv.js";import{a as u}from"./sentry-DIjLwCle.js";import{h as y,g as b,k as w,u as A,N as k}from"./core-BBjwfZ-w.js";import{IO as N,eO as _,fj as U,IP as L,mv as O,IQ as R}from"./zeni-epic-state-Cm1-MwJ0.js";import{u as z,z as f,L as T,t as S,D as j,b as $}from"./index-Bc6xMvHW.js";import"./mui-DDDUCYEf.js";import{t as P}from"./getLocaleForTenant-BoZerb2M.js";import"./recharts-BHIDIaKt.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./utils-JGBDmufg.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]="ba04bac4-2a9e-46f5-a872-db8f8cb6a481",t._sentryDebugIdIdentifier="sentry-dbid-ba04bac4-2a9e-46f5-a872-db8f8cb6a481")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:R(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,I=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,I=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(k,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:I}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=z(),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&&S.shouldFetchActiveTenant(e)&&(h.current=!0,S.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,I=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&I&&S.shouldFetchAllTenants()&&(r.current=!0,S.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(O(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(Q,{})}const q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],G={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of q)if(t.toLocaleLowerCase().includes(s))return G[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-B6iZuZi9.js → DomesticWireDetailScreen-C9ulkIw9.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-B39PlnRv.js";import{j as w,u as C,g as h,k as A,l as B}from"./core-BBjwfZ-w.js";import{MR as k,MY as _,fA as J,fz as Q,fy as W,ix as Y,JZ as q,pF as K,eO as V,Mn as D,iv as F,MS as S,M$ as T,it as G,iQ as j}from"./zeni-epic-state-Cm1-MwJ0.js";import{bn as L,Z as R,y as N,z as U,m as Z,p,S as v,B as M,bo as X,o as O,bp as ee,j as te}from"./index-Bc6xMvHW.js";import{n as z}from"./mui-DDDUCYEf.js";import"./sentry-DIjLwCle.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]="0781d8c8-4318-4fa1-b554-bfe8596adffa",e._sentryDebugIdIdentifier="sentry-dbid-0781d8c8-4318-4fa1-b554-bfe8596adffa")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),n!=null&&e(K(n))},onGetOtp:n=>{e(W(n,"BillPayVendor"))},onResendOtp:n=>{e(Q(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(J(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(L);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(i=>k(i,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-B39PlnRv.js";import{Z as l,C as c,m as f}from"./index-Bc6xMvHW.js";import{D as p}from"./mui-DDDUCYEf.js";import"./sentry-DIjLwCle.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]="f8ace2f2-59d3-4d7c-88a8-3d7139be3b09",e._sentryDebugIdIdentifier="sentry-dbid-f8ace2f2-59d3-4d7c-88a8-3d7139be3b09")}catch{}})();const b={drawerLeftMargin:new c(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=l(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=f();return i.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{m as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-B39PlnRv.js";import{a as d}from"./sentry-DIjLwCle.js";import{j as B,h as G,u as q,l as O,g as l,N as F,k as _,n as N,o as z}from"./core-BBjwfZ-w.js";import{L4 as H,eO as J,Kt as K,kA as Y,H2 as k,L9 as L,JY as M,jA as R,H3 as S,Ky as W,Kz as $,J_ as V,JZ as Z}from"./zeni-epic-state-Cm1-MwJ0.js";import{aO as Q,c as U,p as X,j as tt}from"./index-Bc6xMvHW.js";import"./mui-DDDUCYEf.js";import{d as b}from"./decodeURIComponentSafe-B_FKdp2Y.js";import{w as et}from"./withTransactionSidePanel-BlS3p_C_.js";import{e as at,b as nt}from"./routePaths-ljEPT-cS.js";import"./recharts-BHIDIaKt.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./utils-JGBDmufg.js";import"./useAskAiCfoHostNavButtonProps-B2Clt3Vs.js";import"./useFetchSuggestedQuestionsWhenReady-rXmnxLOI.js";import"./TransactionDetailScreen-iNXvpE1w.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]="9ed777a8-ba8e-4435-b0c9-32284e6e9ab9",a._sentryDebugIdIdentifier="sentry-dbid-9ed777a8-ba8e-4435-b0c9-32284e6e9ab9")}catch{}})();const ot=_(function(a,t){const e=t.entity,o=L(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:M(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:R(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(V({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Z("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(W()),a($()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=X(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=B(),o=G(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:w}=O(),r=b(j??""),p=b(w??""),u=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>H(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=l(n=>J(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>K(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(Y(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,A=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:I(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(N,{children:s.jsx(z,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-DAMKNWnc.js → ExpenseAutomationRoutes-CEEMUvHj.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-
|
|
1
|
+
import{j as C}from"./liveblocks-B39PlnRv.js";import xn from"./NotFoundScreen-Ci6yz6WX.js";import{a,b as Tt}from"./sentry-DIjLwCle.js";import{n as Fe,S as Rn}from"./mui-DDDUCYEf.js";import{h as ce,j as wt,u as Ge,g as U,k as Dn,l as rt,n as Un,o as Le}from"./core-BBjwfZ-w.js";import{eO as Re,Po as Fn,mF as Se,fe as Bn,qg as _n,mX as xt,ng as Rt,Pp as Dt,nq as Vn,Pq as Ut,mQ as Mn,pO as On,eZ as pe,Pr as De,sm as Ft,Bx as Bt,Ps as _t,Pt as jn,pt as Je,L5 as dt,L7 as Ln,jD as zn,L8 as $n,jK as qn,cV as Gn,tp as Ne,n1 as Vt,nv as Ue,Pu as Jn,J_ as ut,JZ as Te,Pv as mt,j$ as Nn,Pw as Yn,Px as Kn,Py as Qn,Pz as Zn,n8 as Hn,mV as ie,ny as we,PA as Wn,PB as Xn,PC as ea,nF as ta,jO as na,jF as aa,PD as oa,jN as ht,Lf as sa,PE as ca,PF as ia,pp as la,p4 as ra,nw as ge,p3 as ze,PG as da,PH as ua,li as ma,bq as ha,ld as pt,k$ as pa,PI as ga,gM as gt,fQ as Ca,la as Sa,vi as fa,PJ as Ia,o4 as ka,n$ as Ea,o3 as va,nQ as ya,PK as ba,f0 as Mt,nj as Pa,n4 as Aa,ff as Ct,nA as Ta,PL as wa,nx as Ot,PM as xa,PN as Ra,PO as Da,PP as Ua,PQ as St,pB as Fa,oW as Ba,JY as _a,jM as Va,PR as Ma,G3 as Oa,jL as ja,jA as La,e$ as za,ov as jt,oO as $a,nu as ft,nz as qa,bD as Ga,l7 as Ja,l4 as Na,PS as Ya,nP as It,oM as kt,oK as Ka,oA as Qa,of as Za,oN as Ha,PT as Wa,PU as Xa,oj as eo,PV as to,o9 as no,oi as ao,og as oo,oR as so}from"./zeni-epic-state-Cm1-MwJ0.js";import{y as Lt,S as Ce,c as L,j as Z,R as zt,cw as co,z as Be,cx as io,aq as xe,cy as lo,aQ as Et,B as $t,cz as ro,an as $e,D as uo,cA as mo,W as ho,cB as po,Q as go,cC as Co,cD as So,n as fo,k as Io,aK as ko,b1 as Eo,C as vo,cE as yo}from"./index-Bc6xMvHW.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-B2Clt3Vs.js";import{c as Gt}from"./useFetchSuggestedQuestionsWhenReady-rXmnxLOI.js";import{c as vt,C as bo}from"./TransactionDetailScreen-iNXvpE1w.js";import{w as Po}from"./withTransactionSidePanel-BlS3p_C_.js";import{h as Ao,v as To}from"./routePaths-ljEPT-cS.js";import{g as qe}from"./accountMappingHelper-CA87QOme.js";import{D as wo}from"./DrawerScreen-ByL7MAwq.js";import"./recharts-BHIDIaKt.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./utils-JGBDmufg.js";import"./decodeURIComponentSafe-B_FKdp2Y.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]="dd9f7f9f-abe6-483d-a954-11da34098bb7",t._sentryDebugIdIdentifier="sentry-dbid-dd9f7f9f-abe6-483d-a954-11da34098bb7")}catch{}})();const xo=()=>{const t=ce(),i=wt(),P=Ge(),I=U(d=>Re(d)),{useFeatureGate:E}=Lt(),{isFeatureEnabled:g}=E(Ce.isRealtimeInsightsFeatureEnabled),u=U(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=U(d=>Fn(d,I.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=qt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,K=!1)=>{t(Se({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:K}))},[]),y=a.useCallback(d=>{const R=P.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(Bn(I.tenantId,d))},[I.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[I.tenantId],B=a.useCallback(()=>{const d=P.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,I.tenantId,!0)},[m,r,I.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=Z(P.state?.pathnameStackToGoBack,P.pathname),A=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:f}=zt();return Gt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&f&&m(r,I.tenantId)},[m,r,o.fetchState,I.tenantId,f]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&f&&t(_n(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,f]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&B()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=P.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Ro,{children:C.jsx(co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:A,onBackClick:()=>{i("../../dashboard")},onReload:B,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Ro=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-B39PlnRv.js";import{a as r}from"./sentry-DIjLwCle.js";import{X as l,Y as p,a0 as b,p as d}from"./index-Bc6xMvHW.js";import"./mui-DDDUCYEf.js";import m from"./NotFoundScreen-Ci6yz6WX.js";import{j as c,u}from"./core-BBjwfZ-w.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]="3e0f241e-ef5a-4985-bb0b-24a3b9aea331",e._sentryDebugIdIdentifier="sentry-dbid-3e0f241e-ef5a-4985-bb0b-24a3b9aea331")}catch{}})();const D=()=>{const e=c(),a=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=d(a.state?.pathnameStackToGoBack),f=n.poppedPathname??k();e(f,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:b(o),onDemoClick:t,onGoBack:i}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{D as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-
|
|
1
|
+
import{a as r}from"./sentry-DIjLwCle.js";import{h as l,j as f,u as m}from"./core-BBjwfZ-w.js";import{gt as p,Ja as g,Jb as b}from"./zeni-epic-state-Cm1-MwJ0.js";import{u as _,L as h,z as y}from"./index-Bc6xMvHW.js";import"./liveblocks-B39PlnRv.js";import"./recharts-BHIDIaKt.js";import"./mui-DDDUCYEf.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./utils-JGBDmufg.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]="768ad7e3-0477-4b5f-8592-ca18cc93b2ab",e._sentryDebugIdIdentifier="sentry-dbid-768ad7e3-0477-4b5f-8592-ca18cc93b2ab")}catch{}})();function C(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:d}=_(),a=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{C as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-B39PlnRv.js";import{l as S,k as f,j as C,u as y,h as ee,q as ae,g as E,N as te,n as ne,o as p}from"./core-BBjwfZ-w.js";import{J3 as k,J4 as j,J5 as T,z8 as B,yW as G,J6 as D,J7 as oe,J8 as se,y_ as ie,eP as $,z5 as le,z2 as re}from"./zeni-epic-state-Cm1-MwJ0.js";import{Z as g,o as r,O as de,c as v,f as J,i as ce,p as me,h as pe,j as _,y as ue,S as he,F as fe,n as ge,m as xe,q as we,B as be,s as Se,T as ye,w as ke,A as je,C as ve,N as $e}from"./index-Bc6xMvHW.js";import{n as m}from"./mui-DDDUCYEf.js";import x from"./NotFoundScreen-Ci6yz6WX.js";import{a as I}from"./sentry-DIjLwCle.js";import"./recharts-BHIDIaKt.js";import"./analytics-Bz7QO_-D.js";import"./plaid-CIX5Leq7.js";import"./dnd-DJzJQwXe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BNnxBBZv.js";import"./lexical-kIQltxPy.js";import"./pdf-C5ZEZLIF.js";import"./utils-JGBDmufg.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]="80c421df-fab2-45ca-8b5b-f6cac0fd53f9",e._sentryDebugIdIdentifier="sentry-dbid-80c421df-fab2-45ca-8b5b-f6cac0fd53f9")}catch{}})();const Ie=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|