@zeniai/web-app-ui 5.0.63-dev → 5.0.63-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-RwSajKrp.js → AddressRoutes-BGixhU4F.js} +1 -1
- package/dist/assets/{AddressScreen-CEJ2EDwb.js → AddressScreen-BCfbWbk_.js} +1 -1
- package/dist/assets/{AiCfoScreen-C6yOeSXT.js → AiCfoScreen-NDN5qE_4.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-Clait2oB.js → BillPayApprovalRoutes-Cvl_sQRW.js} +1 -1
- package/dist/assets/{BillPayRoutes-CNxKKr85.js → BillPayRoutes-D-I6yBtH.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-D1YPo8Z4.js → BusinessVerificationPageScreen-C57FErKR.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-CnwrVVuL.js → ChargeCardRoutes-DNNVmQba.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-1FjaBc8x.js → CompanyPassportScreen-D2jISk-U.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-HH9X732t.js → ConnectionAuthScreen-BUE9aXs1.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-BkQxPYWy.js → CustomerOnboardingAuthScreen-BVuWNptI.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-9nN3_YTL.js → CustomerOnboardingRoutes-D-Ufd69Z.js} +1 -1
- package/dist/assets/{DashboardRoutes-D9JTnMJm.js → DashboardRoutes-D1kbvPs7.js} +1 -1
- package/dist/assets/{DefaultTenantHome-DrGDVd8p.js → DefaultTenantHome-JkQ2goKW.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BlARsGBU.js → DomesticWireDetailScreen-DTmfTwYq.js} +1 -1
- package/dist/assets/{DrawerScreen-CeOGUHHx.js → DrawerScreen-DNHIo9Ek.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-S1Q1dSD0.js → EntityDetailRoutes-8YxmqISQ.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-p-exYuWV.js → ExpenseAutomationRoutes-DYuR5p-K.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BXc7ySeT.js → FeaturePreviewScreen-Xv2JpkA8.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-DDJqLHEp.js → MagicLinkRoutes-D_-f5EfR.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CkHH4Az-.js → MagicLinkSignInScreen-D8SWcZwO.js} +1 -1
- package/dist/assets/{MobileAppDrawer-BT6_YvGi.js → MobileAppDrawer-CMz8hWRn.js} +1 -1
- package/dist/assets/{NotFoundScreen-DmUDPIT7.js → NotFoundScreen-CojoL2wq.js} +1 -1
- package/dist/assets/{NotificationRoutes-7z0fHxrA.js → NotificationRoutes-DKuetMHQ.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DFvaaNlx.js → PandLWithForecastRoutes-D4EEGjw5.js} +1 -1
- package/dist/assets/{PeopleRoutes-gY3Aav8U.js → PeopleRoutes-CR2pc_sW.js} +1 -1
- package/dist/assets/{PerformanceRoutes-D6Rtmi-s.js → PerformanceRoutes-cynXsyNj.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-Bjej94BR.js → QBOConnectionScreen-B1II2TpX.js} +1 -1
- package/dist/assets/{ReferralListScreen-kApKqS2k.js → ReferralListScreen-8R81rrOx.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CR2bmPGc.js → ReimbursementApprovalRoutes-BGrrVRS6.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BZpuIdR9.js → ReimbursementApprovalRuleDetailScreen-5oJldpZm.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-uEvSbixb.js → ReimbursementRoutes-BH3HNrZk.js} +1 -1
- package/dist/assets/{ReportsRoutes-CQZXb-9e.js → ReportsRoutes-Dh0vOSd5.js} +1 -1
- package/dist/assets/{RewardsRoutes-CyW8SzZH.js → RewardsRoutes-RRnzfk9s.js} +1 -1
- package/dist/assets/{ScreenRoutes-DNGTyhx_.js → ScreenRoutes-DOHIbDe4.js} +2 -2
- package/dist/assets/{SettingsRoutes-CfiC51bV.js → SettingsRoutes-BJyRTm4m.js} +1 -1
- package/dist/assets/{SetupPagesScreen-QyIIGt5H.js → SetupPagesScreen-BWmxAg5_.js} +1 -1
- package/dist/assets/{SignInScreen-B4cdN2NA.js → SignInScreen-B2_szOVQ.js} +1 -1
- package/dist/assets/{SignOutScreen-D0SwBrWQ.js → SignOutScreen-BKysr8-j.js} +1 -1
- package/dist/assets/{TaskListScreen-BfkcXalq.js → TaskListScreen-DYCQWF7u.js} +1 -1
- package/dist/assets/{TaskRoutes-C9gGJAZI.js → TaskRoutes-GImULClZ.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-CsBGCgAL.js → TransactionDetailRoutes-Dv6VDhjQ.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-_-jSXb2F.js → TransactionDetailScreen-ByHgtPQ5.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BELszHz8.js → TransactionListRoutes-Bo3hqgom.js} +1 -1
- package/dist/assets/{TreasuryRoutes-Cb0h8yIL.js → TreasuryRoutes-VJBsZB_Q.js} +1 -1
- package/dist/assets/{VendorsRoutes-BoHy1d4r.js → VendorsRoutes-DafxPLzK.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-COxzjKOT.js → WiseConfirmationScreen-CsrsS8Xt.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-B4dKyLOa.js → ZeniAccountRoutes-COMo322y.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-VHDsCowc.js → ZeniAccountStatementScreen-B1lnm1eV.js} +1 -1
- package/dist/assets/{analyticsHelper-DNvULkv0.js → analyticsHelper-CwPfLmD8.js} +1 -1
- package/dist/assets/{getLocaleForTenant-CsrZKOZW.js → getLocaleForTenant-D8dvZJzp.js} +1 -1
- package/dist/assets/{index-DT4MXfVf.js → index-D7leYkuC.js} +5 -5
- package/dist/assets/{routePaths-C4fFm5dh.js → routePaths-DhV05MHP.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-B8Pz--PX.js → useAskAiCfoHostNavButtonProps-BYwM8iQc.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-BKx6d-d7.js → useFetchSuggestedQuestionsWhenReady-CLFroGaE.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CdMafJlm.js → useInitialThreadRequest-XOr6mP2N.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DEEtwy0r.js → withTransactionSidePanel-caCfdZEh.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-CzlYoB8q.js";import{A as d}from"./AddressScreen-
|
|
1
|
+
import{j as e}from"./liveblocks-CzlYoB8q.js";import{A as d}from"./AddressScreen-BCfbWbk_.js";import i from"./NotFoundScreen-CojoL2wq.js";import"./sentry-CNCwYM02.js";import{n as s,o as r}from"./core-CGhI3jCZ.js";import"./zeni-epic-state-lenVK-tm.js";import"./recharts-D6qS-pdV.js";import"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.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]="4bd15e18-5b5f-4be1-8d33-8bd696c76da2",t._sentryDebugIdIdentifier="sentry-dbid-4bd15e18-5b5f-4be1-8d33-8bd696c76da2")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-CzlYoB8q.js";import{a as h}from"./sentry-CNCwYM02.js";import{j as T,h as _,u as j,l as E,g as B,k as M}from"./core-CGhI3jCZ.js";import{Z as $,h as D,z as L,I as K,B as J,A as N,d as C,f as m,y as z,k as b,q as F}from"./index-
|
|
1
|
+
import{j as d}from"./liveblocks-CzlYoB8q.js";import{a as h}from"./sentry-CNCwYM02.js";import{j as T,h as _,u as j,l as E,g as B,k as M}from"./core-CGhI3jCZ.js";import{Z as $,h as D,z as L,I as K,B as J,A as N,d as C,f as m,y as z,k as b,q as F}from"./index-D7leYkuC.js";import{Je as k,gN as O,eO as R,Jf as U,c1 as q,Jg as G,k7 as V}from"./zeni-epic-state-lenVK-tm.js";import{n as H}from"./mui-ILn-Gd-L.js";import Z from"./NotFoundScreen-CojoL2wq.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]="6ef395ee-b1ca-4365-98c7-26b360513fb4",e._sentryDebugIdIdentifier="sentry-dbid-6ef395ee-b1ca-4365-98c7-26b360513fb4")}catch{}})();const Q=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-CzlYoB8q.js";import{a as r}from"./sentry-CNCwYM02.js";import{h as oe,j as ne,u as ie,g as j,l as re,k as le}from"./core-CGhI3jCZ.js";import{M as ce,cH as ue,z as de,Z as me,cI as pe,cJ as fe,cK as he,cL as G,A as Se,d as v,R as V,cM as ge,cN as Ce,f as be,a2 as ke,cO as we,T as Ie,s as Pe,q as $,aY as Ee,cP as Te}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-CzlYoB8q.js";import{a as r}from"./sentry-CNCwYM02.js";import{h as oe,j as ne,u as ie,g as j,l as re,k as le}from"./core-CGhI3jCZ.js";import{M as ce,cH as ue,z as de,Z as me,cI as pe,cJ as fe,cK as he,cL as G,A as Se,d as v,R as V,cM as ge,cN as Ce,f as be,a2 as ke,cO as we,T as Ie,s as Pe,q as $,aY as Ee,cP as Te}from"./index-D7leYkuC.js";import{fE as ye,f3 as H,eO as _e,hr as xe,PN as ve,eN as Ue,hB as Ae,hx as Oe,fu as Qe,fo as De,fh as Fe,fl as q,fp as Me,fq as Be,fr as Le,fs as Re,ft as Ne}from"./zeni-epic-state-lenVK-tm.js";import{D as je,n as U,P as Ve,S as $e}from"./mui-ILn-Gd-L.js";import{p as qe}from"./pathToGoBack-B-0xWAao.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new s.Error().stack;i&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[i]="d906364a-751b-47b7-9043-1d69cd5ed858",s._sentryDebugIdIdentifier="sentry-dbid-d906364a-751b-47b7-9043-1d69cd5ed858")}catch{}})();const W="chat-response-generated",Ge=le(function(s,i){const a=H(s),m=i.isSubmitting;return{showSampleQuestions:i.sessionFromUrl==="explore"&&a.uiState.currentChatSessionId==null,aiCfoView:a,isSubmitting:m,isNewChatSession:i.sessionFromUrl==="new_chat"||i.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${Ie}/tableDownload`,emailLinkQuestion:i.emailLinkQuestion,autoSubmitEmailLinkQuestion:i.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:i.onEmailLinkQuestionProcessed,isFileUploadEnabled:i.isFileUploadEnabled,isUploadPromoVisible:i.isUploadPromoVisible,onUploadPromoClose:i.onUploadPromoClose}},function(s,i){const{location:a,currentTenant:m,userId:d,navigate:p,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:S,setIsAiCfoOpen:l}=i;return{onEventReceived:(e,o)=>{if(e===W&&typeof o.text=="string"&&typeof o.metadata=="object"){const n=o,c=Be(n.type),t=n.metadata.chat_session_id??null,{currentChatSession:I,currentQuestionAnswer:g,currentQuestionAnswerSummary:P}=G(S,t);c!=="answer"?v.trackAICFOChatResponseGenerated(c,g?.question.questionText??"",n.text,t,Te(P,I),n.metadata.message_id??null):v.trackAICFOChatAnswerGenerated(n.text,g?.question.questionText??"",(n.follow_up_questions?.length??0)>0,!!n.assumptions,!!n.insights,n.visualization!=null,Le(n.visualization?.type??"")??null,t,n.summarized_title,n.metadata.message_id??null),s(Re({chatSessionId:n.metadata.chat_session_id,responseType:c,fetchState:{fetchState:"Completed",error:void 0}})),s(Ne({chatSessionId:n.metadata.chat_session_id,answerPayload:n,userId:d}))}},onSubmit:(e,o,n,c)=>{e&&Ee(s,e,o,f,S,d,c,n)},updateCurrentInput:e=>{s(q(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Me(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{p(-1)},onCloseClick:()=>{const e=$(a.state?.pathnameStackToGoBack),o=e.poppedPathname??qe(1);p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack}}),s(q(""))},togglePageView:()=>{const e=$(a.state?.pathnameStackToGoBack),o=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),l(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{p(-1)},onNewChatClick:()=>{f!=null&&s(Fe());const e=Pe(a.state?.pathnameStackToGoBack,a.pathname);p(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,o)=>{s(De({questionAnswerId:e,isCollapsed:o}))},onMenuClick:i.onMenuClick}})(ke(we)),dt=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:i}=ce(),a=oe(),m=ne(),d=ie(),[p,f]=r.useState(!1);r.useEffect(()=>{a(ye())},[a]);const{customPageTitle:S}=ue(),l=j(u=>H(u)),e=de.getSignedInUser(),{session_id:o}=re(),n=me(),c=j(u=>_e(u)),t=l.uiState.currentChatSessionId,I=c.tenantEmailDomain,{handleUploadPromoClose:g,isUploadPromoVisible:P}=pe({isFileUploadEnabled:s,tenantEmailDomain:I}),A=fe({currentTenant:c,currentChatSessionId:t,aiCfoView:l}),C=d.state,b=C?.aiCfoInitialQuestion,O=!!C?.aiCfoShouldSubmit,[z,E]=r.useState(null),[Y,T]=r.useState(!1),Q=r.useRef(!1);r.useEffect(()=>{Q.current||b==null||b===""||(E(b),T(O),Q.current=!0)},[b,O]);const J=r.useCallback(()=>{E(null),T(!1)},[]),D=r.useMemo(()=>new URLSearchParams(d.search),[d.search]),F=D.get("ref")??C?.aiCfoRef,y=D.get("emailRefId")??C?.aiCfoEmailRefId,M=r.useRef(!1);r.useEffect(()=>{M.current||F!=="month-end-email"||y==null||t!=null||e==null||(a(xe("controller",e.userId,y,"MONTH_END_EMAIL")),M.current=!0)},[F,y,t,a,e]);const k=l.uiState.lastContextMessage;r.useEffect(()=>{k!=null&&k!==""&&t!=null&&(E(k),T(!0),a(ve()))},[k,t,a]);const Z=c.masterTOSInfo,w=Z?.isMasterTOSAccepted??!1,{visitedSessions:B}=he(t),_=l.fetchState,x=l.uiState.chatSessionsNextPageToken.hasMore||!l.uiState.chatSessionsFirstPageFetched,L=t!=null?l.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",R=t==null||(l.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),N=l.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:K}=G(N,t),X=K.length===0;r.useEffect(()=>{w||m("../dashboard",{state:{...d.state,message:"open_ai_cfo_drawer"}})},[w]),r.useEffect(()=>{t!=null&&o!==t&&m(`../ai-cfo/${t}`,{state:{...d.state}})},[t,o]),r.useEffect(()=>{o!=null&&t==null&&o!=="new_chat"&&o!=="explore"&&a(Ue({sessionId:o,agentId:"controller"}))},[]);const ee=r.useMemo(()=>({events:B.map(u=>`private-encrypted-chat-${u}.${W}`),eventCallback:(u,se,ae)=>ae.onEventReceived(u,se)}),[B]);if(r.useEffect(()=>{_!=="In-Progress"&&x&&a(Ae())},[_,x,a]),r.useEffect(()=>{t!=null&&L!=="In-Progress"&&R&&e!=null&&_==="Completed"&&!x&&a(Oe(t,e.userId))},[L,R,t,e,a]),e==null||o==null)throw Error("Can't access AI Controller page without signing in...");const te=t!=null&&l.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";return h.jsxs(We,{children:[h.jsx(Se,{analytics:v,onLoad:u=>u.trackPageLoaded(be.Event.aiCFOPage)}),V(n)&&A.drawerElement,h.jsx(Ge,{...ee,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:N,openOnboardingPage:()=>f(!0),userId:e.userId,setIsAiCfoOpen:i,navigate:m,sessionFromUrl:o,location:d,isSubmitting:te,isEmptyChatWithSession:X,customPageTitle:S,currentTenant:c,emailLinkQuestion:z??void 0,autoSubmitEmailLinkQuestion:Y,onEmailLinkQuestionProcessed:J,onMenuClick:V(n)?A.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:P,onUploadPromoClose:g}),h.jsx(je,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:ze,style:{width:`${ge}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:h.jsx(He,{onClick:u=>u.stopPropagation(),children:h.jsx(Ce,{isTOSAccepted:w,acceptMasterTOSState:l.masterTOSAcceptanceState,customPageTitle:S,onCloseClick:()=>f(!1),onCompleteClick:()=>{w||c.userRoleId==null||a(Qe(c.userRoleId)),f(!1)}})})})]})},He=U($e)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-CzlYoB8q.js";import{a as y}from"./sentry-CNCwYM02.js";import{j as B,u as U,h as j,g as v,N as $,k as T,l as O,n as N,o as h}from"./core-CGhI3jCZ.js";import{eO as F,Mx as A,Md as b,x9 as w,x3 as L,x7 as x,wY as M,Mf as z,w$ as W,xb as q,xa as C}from"./zeni-epic-state-lenVK-tm.js";import{h as P,z as k,B as V,a2 as Y,by as G,ab as _,bz as H}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-CzlYoB8q.js";import{a as y}from"./sentry-CNCwYM02.js";import{j as B,u as U,h as j,g as v,N as $,k as T,l as O,n as N,o as h}from"./core-CGhI3jCZ.js";import{eO as F,Mx as A,Md as b,x9 as w,x3 as L,x7 as x,wY as M,Mf as z,w$ as W,xb as q,xa as C}from"./zeni-epic-state-lenVK-tm.js";import{h as P,z as k,B as V,a2 as Y,by as G,ab as _,bz as H}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import{i as J}from"./ReimbursementApprovalRuleDetailScreen-5oJldpZm.js";import K from"./NotFoundScreen-CojoL2wq.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]="249628e7-1d36-47d6-a7ab-d855a706132d",e._sentryDebugIdIdentifier="sentry-dbid-249628e7-1d36-47d6-a7ab-d855a706132d")}catch{}})();const I="bill-approval-rule-update",Q=T(function(e){return{approvalView:A(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(I)&&e(z(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(M(a))},onEditRuleClick:a=>{a!=null?(e(x(a)),t(`./${a}/edit`)):(e(x()),t("./new"))}}})(Y(G)),X=()=>{const e=B(),o=U(),t=j(),[p,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>F(i)),r=v(i=>A(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(w())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(L(!0)))},[p,n,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(x())),e("./new"))},[u,r,t]);const f={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${I}`]:[],eventCallback:(i,R,m)=>{i.endsWith(I)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx($,{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),p=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=p==="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:p}},function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:a,approvalRuleId:u}=o,s=p.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(f=>{const i=f.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),R=f.actors.selectedNonUsers.map(S=>{const E=!!J(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(R);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:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}},onResetClick:()=>{e(w()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(w()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(q())},onSaveRuleSuccess:()=>{t("../")}}})(H);function D(){const e=B(),o=j(),t=U(),{approvalRuleId:p}=O(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>A(r)),[n,c]=y.useState(!1);if(y.useEffect(()=>{n||(c(!0),o(W(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[d,p]),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:p,approverViewData:d,location:t})}function se(){return l.jsxs(N,{children:[l.jsx(h,{path:"/",element:l.jsx(X,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(K,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CzlYoB8q.js";import{j as K,h as se,u as X,l as ae,g as v,N as te,k as Q,i as na,n as ia,o as S}from"./core-CGhI3jCZ.js";import{eO as Z,LP as Ue,bv as It,GS as oa,bo as wt,bE as pe,LQ as xt,wt as Bt,xD as Le,x0 as la,bn as De,LR as sa,LS as ra,c1 as ca,LT as da,jr as At,LU as Ct,LV as Et,yc as _e,wI as Ae,LW as ua,wh as tt,LX as pa,Bo as ma,wl as ba,wr as Dt,LY as ke,LZ as Ge,xE as Oe,L_ as ha,L$ as ga,xH as Ne,M0 as ya,xU as Sa,M1 as jt,xo as at,xt as fa,M2 as ka,M3 as ue,M4 as Tt,M5 as Pt,M6 as Ft,fI as va,wN as Me,cw as Rt,M7 as Ia,gD as wa,M8 as xa,M9 as Ba,eU as Vt,eS as Lt,Ma as ze,Mb as Aa,Mc as Ca,Jy as Ze,Md as Ea,Jz as oe,JA as He,Me as Da,Mf as ja,Mg as Ta,xv as nt,xs as Pa,Mh as Fa,Mi as Ra,Mj as Va,xe as La,Mk as Ma,Ml as $a,Mm as Ua,ck as Mt,cM as $t,jC as _a,bK as Ga,bq as Ut,bL as _t,vz as Oa,Mn as Na,Bb as za,Bh as Za,s6 as Ha,xF as Wa,yj as qa,jP as fe,Mo as Ja,Mp as Gt,kh as Ka,jJ as Ot,k2 as Nt,k1 as it,bD as be,bJ as Xa,Mq as Qa,Mr as ve,il as Ya,Ms as ot,Mt as en,iq as tn,iL as an,yx as nn,Mu as on,ka as ln,yn as sn,Mv as lt,yr as rn,yw as cn,yt as dn,yl as un,Mw as zt,wC as pn,Mx as mn,My as bn,fA as hn,fz as gn,fy as yn,jS as Sn,k8 as st,kj as fn,pF as kn,j$ as vn,yp as In,iw as wn,ko as xn,Mz as Bn,io as An,pw as Cn,MA as En,xk as Dn,bF as jn,bs as Tn,Iz as Pn,cO as Fn,cN as Rn,cv as Vn,cB as Ln}from"./zeni-epic-state-lenVK-tm.js";import{h as me,z as V,I as Ie,x as le,c as y,aJ as Ce,B as re,o as C,A as je,d as D,b5 as Mn,q as z,T as We,s as E,Z as we,b6 as rt,b7 as ct,b8 as $n,ag as Un,H as _n,aD as Gn,E as Zt,D as qe,X as Je,b9 as On,ap as Ht,ba as Nn,N as zn,f as Wt,a2 as Zn,bb as Hn,bc as Wn,bd as qn,be as Jn,bf as Kn,bg as Xn,bh as Qn,bi as Yn,bj as ei,v as ti,bk as ai,b1 as ni,bl as ii,bm as oi,a5 as li}from"./index-DT4MXfVf.js";import{n as $,S as si}from"./mui-ILn-Gd-L.js";import{A as dt}from"./AddressScreen-CEJ2EDwb.js";import{g as ie,a as Te,i as qt,V as Ke,b as Xe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-BlARsGBU.js";import{a as f}from"./sentry-CNCwYM02.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-B8Pz--PX.js";import{c as Ye}from"./useFetchSuggestedQuestionsWhenReady-BKx6d-d7.js";import{u as Jt}from"./useInitialThreadRequest-CdMafJlm.js";import Ee from"./NotFoundScreen-DmUDPIT7.js";import{D as ui}from"./DrawerScreen-CeOGUHHx.js";import{M as Kt}from"./MobileAppDrawer-BT6_YvGi.js";import{F as Xt}from"./FeaturePreviewScreen-BXc7ySeT.js";import{S as Pe}from"./SetupPagesScreen-QyIIGt5H.js";import{B as pi}from"./BillPayApprovalRoutes-Clait2oB.js";import{FallBackRoute as mi}from"./ScreenRoutes-DNGTyhx_.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./analyticsHelper-DNvULkv0.js";import"./routePaths-C4fFm5dh.js";import"./BusinessVerificationPageScreen-D1YPo8Z4.js";import"./ReimbursementApprovalRuleDetailScreen-BZpuIdR9.js";import"./getLocaleForTenant-CsrZKOZW.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]="f1804b22-a359-40df-974c-1b16b84de345",e._sentryDebugIdIdentifier="sentry-dbid-f1804b22-a359-40df-974c-1b16b84de345")}catch{}})();const bi=Q(function(e,t){const l=Ue(e,t.billId),i=V.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:At(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(Ae(l,"retry")):e(Ae(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(Ae(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(Ct({billId:l}))}}})(Mn);function hi(){const e=K(),t=se(),l=X(),{billId:i}=ae(),c=me(),r=V.getSignedInUser(),u=Ie(),o=v(O=>Z(O)),s=v(O=>Ue(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}=Qe({mobileExploreReferrer:"Bill Details"});Ye({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:U}=le(),{isFeatureEnabled:L}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=U(Ce.zeniAssistConfig),A=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),M=G.user_ids!=null&&r?.userId!=null&&G.user_ids.includes(r?.userId),{isFeatureEnabled:J}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Y}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{L&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&A===!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,A,r]),f.useEffect(()=>{i!=null&&t(xt(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Bt(i??"",L,M,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),t(Le(!1,L,M,Y,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 ${C.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:L,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:B,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:J,hasZeniAssistAccess:M,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=qe.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=Q(function(e,t){const l=V.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:C.sp10,paddingRight:C.sp3,paddingBottom:"15px",paddingLeft:C.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=V.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(Sa({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Oe(i))},onDeleteClick:()=>{e(ya({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=X(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=V.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=le(),{isFeatureEnabled:m}=d(y.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:h}=d(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:g}=d(y.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(y.billPaySetupShowInternationalPaymentByWise),{configValue:k}=p(Ce.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,U]=f.useState(!1),[L,I]=f.useState(!1),[H,G]=f.useState(),A=v(F=>Ge(F,m,g,i));let q=A.fetchState,W=A.file,M=A.showAutofill;const J=v(F=>Ue(F,i??""));u===!1&&(q=J.fetchState,W=J.transactionDetails?.attachments?.[0],M=!1);const Y=A.billPayInfo!=null&&A.billPayInfo.stage.code==="pending_approval"?A.billPayInfo.billStatus.code:A.billStage;f.useEffect(()=>{i==null&&t(Oe(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?U(!1):!u&&B&&_(!1))},[i]),f.useEffect(()=>{B||i==null||u||(_(!0),t(Bt(i,h,j,!1)),T||(U(!0),t(Le(!1,h,j,b,i)))),u&&!T&&(U(!0),t(Le(!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(Y??"",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(Y??"",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:A.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!A.isInitialEdit,billStage:Y}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||M?null:a.jsx(pt,{children:a.jsx(Qt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx($n,{}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=A.billPayInfo!=null&&A.billPayInfo.stage.code==="pending_approval"?A.billPayInfo.billStatus.code:A.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[M&&o!=="small"?a.jsx(mt,{}):null,L?a.jsx(Un,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:O,isEditPopup:!0}):null,o==="small"||M?null:a.jsx(pt,{children:a.jsx(yi,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:M,uploadStatus:A.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,J,A),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,A),isInitialEdit:!!A.isInitialEdit,billStage:F}),a.jsx(Ve,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=On();return a.jsx(Qt,{onClick:e,"data-testid":"nav-bar-back-click"})}function Si(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:`${ye.recurringBill.recurringCycle}
|
|
1
|
+
import{j as a}from"./liveblocks-CzlYoB8q.js";import{j as K,h as se,u as X,l as ae,g as v,N as te,k as Q,i as na,n as ia,o as S}from"./core-CGhI3jCZ.js";import{eO as Z,LP as Ue,bv as It,GS as oa,bo as wt,bE as pe,LQ as xt,wt as Bt,xD as Le,x0 as la,bn as De,LR as sa,LS as ra,c1 as ca,LT as da,jr as At,LU as Ct,LV as Et,yc as _e,wI as Ae,LW as ua,wh as tt,LX as pa,Bo as ma,wl as ba,wr as Dt,LY as ke,LZ as Ge,xE as Oe,L_ as ha,L$ as ga,xH as Ne,M0 as ya,xU as Sa,M1 as jt,xo as at,xt as fa,M2 as ka,M3 as ue,M4 as Tt,M5 as Pt,M6 as Ft,fI as va,wN as Me,cw as Rt,M7 as Ia,gD as wa,M8 as xa,M9 as Ba,eU as Vt,eS as Lt,Ma as ze,Mb as Aa,Mc as Ca,Jy as Ze,Md as Ea,Jz as oe,JA as He,Me as Da,Mf as ja,Mg as Ta,xv as nt,xs as Pa,Mh as Fa,Mi as Ra,Mj as Va,xe as La,Mk as Ma,Ml as $a,Mm as Ua,ck as Mt,cM as $t,jC as _a,bK as Ga,bq as Ut,bL as _t,vz as Oa,Mn as Na,Bb as za,Bh as Za,s6 as Ha,xF as Wa,yj as qa,jP as fe,Mo as Ja,Mp as Gt,kh as Ka,jJ as Ot,k2 as Nt,k1 as it,bD as be,bJ as Xa,Mq as Qa,Mr as ve,il as Ya,Ms as ot,Mt as en,iq as tn,iL as an,yx as nn,Mu as on,ka as ln,yn as sn,Mv as lt,yr as rn,yw as cn,yt as dn,yl as un,Mw as zt,wC as pn,Mx as mn,My as bn,fA as hn,fz as gn,fy as yn,jS as Sn,k8 as st,kj as fn,pF as kn,j$ as vn,yp as In,iw as wn,ko as xn,Mz as Bn,io as An,pw as Cn,MA as En,xk as Dn,bF as jn,bs as Tn,Iz as Pn,cO as Fn,cN as Rn,cv as Vn,cB as Ln}from"./zeni-epic-state-lenVK-tm.js";import{h as me,z as V,I as Ie,x as le,c as y,aJ as Ce,B as re,o as C,A as je,d as D,b5 as Mn,q as z,T as We,s as E,Z as we,b6 as rt,b7 as ct,b8 as $n,ag as Un,H as _n,aD as Gn,E as Zt,D as qe,X as Je,b9 as On,ap as Ht,ba as Nn,N as zn,f as Wt,a2 as Zn,bb as Hn,bc as Wn,bd as qn,be as Jn,bf as Kn,bg as Xn,bh as Qn,bi as Yn,bj as ei,v as ti,bk as ai,b1 as ni,bl as ii,bm as oi,a5 as li}from"./index-D7leYkuC.js";import{n as $,S as si}from"./mui-ILn-Gd-L.js";import{A as dt}from"./AddressScreen-BCfbWbk_.js";import{g as ie,a as Te,i as qt,V as Ke,b as Xe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-DTmfTwYq.js";import{a as f}from"./sentry-CNCwYM02.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-BYwM8iQc.js";import{c as Ye}from"./useFetchSuggestedQuestionsWhenReady-CLFroGaE.js";import{u as Jt}from"./useInitialThreadRequest-XOr6mP2N.js";import Ee from"./NotFoundScreen-CojoL2wq.js";import{D as ui}from"./DrawerScreen-DNHIo9Ek.js";import{M as Kt}from"./MobileAppDrawer-CMz8hWRn.js";import{F as Xt}from"./FeaturePreviewScreen-Xv2JpkA8.js";import{S as Pe}from"./SetupPagesScreen-BWmxAg5_.js";import{B as pi}from"./BillPayApprovalRoutes-Cvl_sQRW.js";import{FallBackRoute as mi}from"./ScreenRoutes-DOHIbDe4.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./analyticsHelper-CwPfLmD8.js";import"./routePaths-DhV05MHP.js";import"./BusinessVerificationPageScreen-C57FErKR.js";import"./ReimbursementApprovalRuleDetailScreen-5oJldpZm.js";import"./getLocaleForTenant-D8dvZJzp.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]="f1804b22-a359-40df-974c-1b16b84de345",e._sentryDebugIdIdentifier="sentry-dbid-f1804b22-a359-40df-974c-1b16b84de345")}catch{}})();const bi=Q(function(e,t){const l=Ue(e,t.billId),i=V.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:At(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(Ae(l,"retry")):e(Ae(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(Ae(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(Ct({billId:l}))}}})(Mn);function hi(){const e=K(),t=se(),l=X(),{billId:i}=ae(),c=me(),r=V.getSignedInUser(),u=Ie(),o=v(O=>Z(O)),s=v(O=>Ue(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}=Qe({mobileExploreReferrer:"Bill Details"});Ye({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:U}=le(),{isFeatureEnabled:L}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=U(Ce.zeniAssistConfig),A=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),M=G.user_ids!=null&&r?.userId!=null&&G.user_ids.includes(r?.userId),{isFeatureEnabled:J}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Y}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{L&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&A===!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,A,r]),f.useEffect(()=>{i!=null&&t(xt(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Bt(i??"",L,M,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),t(Le(!1,L,M,Y,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 ${C.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:L,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:B,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:J,hasZeniAssistAccess:M,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=qe.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=Q(function(e,t){const l=V.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:C.sp10,paddingRight:C.sp3,paddingBottom:"15px",paddingLeft:C.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=V.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(Sa({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Oe(i))},onDeleteClick:()=>{e(ya({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=X(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=V.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=le(),{isFeatureEnabled:m}=d(y.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:h}=d(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:g}=d(y.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(y.billPaySetupShowInternationalPaymentByWise),{configValue:k}=p(Ce.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,U]=f.useState(!1),[L,I]=f.useState(!1),[H,G]=f.useState(),A=v(F=>Ge(F,m,g,i));let q=A.fetchState,W=A.file,M=A.showAutofill;const J=v(F=>Ue(F,i??""));u===!1&&(q=J.fetchState,W=J.transactionDetails?.attachments?.[0],M=!1);const Y=A.billPayInfo!=null&&A.billPayInfo.stage.code==="pending_approval"?A.billPayInfo.billStatus.code:A.billStage;f.useEffect(()=>{i==null&&t(Oe(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?U(!1):!u&&B&&_(!1))},[i]),f.useEffect(()=>{B||i==null||u||(_(!0),t(Bt(i,h,j,!1)),T||(U(!0),t(Le(!1,h,j,b,i)))),u&&!T&&(U(!0),t(Le(!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(Y??"",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(Y??"",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:A.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!A.isInitialEdit,billStage:Y}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||M?null:a.jsx(pt,{children:a.jsx(Qt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx($n,{}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=A.billPayInfo!=null&&A.billPayInfo.stage.code==="pending_approval"?A.billPayInfo.billStatus.code:A.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[M&&o!=="small"?a.jsx(mt,{}):null,L?a.jsx(Un,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:O,isEditPopup:!0}):null,o==="small"||M?null:a.jsx(pt,{children:a.jsx(yi,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:M,uploadStatus:A.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,J,A),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,A),isInitialEdit:!!A.isInitialEdit,billStage:F}),a.jsx(Ve,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=On();return a.jsx(Qt,{onClick:e,"data-testid":"nav-bar-back-click"})}function Si(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:`${ye.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=$.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-CzlYoB8q.js";import{a as V}from"./sentry-CNCwYM02.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-CGhI3jCZ.js";import{I as ce,x as ue,aJ as de,z,A as pe,d as E,ab as v,f as M,bu as le,ap as me,s as B,aq as L}from"./index-
|
|
1
|
+
import{j as k}from"./liveblocks-CzlYoB8q.js";import{a as V}from"./sentry-CNCwYM02.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-CGhI3jCZ.js";import{I as ce,x as ue,aJ as de,z,A as pe,d as E,ab as v,f as M,bu as le,ap as me,s as B,aq as L}from"./index-D7leYkuC.js";import{Ml as fe,eO as G,rx as ye,GW as Se,xe as ge,zX as Ie,Cu as be,D7 as he,E0 as De,MI as Oe,MJ as Te,MK as ke,ML as Ce,MM as Ve,Jf as we,LK as Ae,Jr as Ne,k7 as _e,fA as Fe,fz as xe,fy as ve,pF as Me,pw as ze,pt as Ee,j$ as Be,rG as Le,rE as P,bD as R,rS as U,cu as Pe}from"./zeni-epic-state-lenVK-tm.js";import{n as Re}from"./mui-ILn-Gd-L.js";import{c as j}from"./routePaths-DhV05MHP.js";import{M as Ue}from"./MobileAppDrawer-CMz8hWRn.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]="078e7be9-0194-4eb1-b0aa-054acf54e205",e._sentryDebugIdIdentifier="sentry-dbid-078e7be9-0194-4eb1-b0aa-054acf54e205")}catch{}})();const je=Re.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-CzlYoB8q.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 lt,n as Kt,o as te}from"./core-CGhI3jCZ.js";import{eO as ie,bs as Re,Oc as ka,eS as be,eT as ye,eU as Se,fP as ze,cr as Ge,Od as $e,Oe as Ma,sM as ba,jz as ya,Of as Sa,gD as oa,ze as Xe,zg as za,zh as Ga,jp as ut,Og as Ye,z2 as mt,Oh as Wt,Oi as qt,z5 as Da,Oj as Qt,MF as _a,qY as Ct,zb as $a,gO as Jt,Ok as pt,Ol as Ze,bq as Xt,Om as en,fA as wa,fz as Pa,zL as an,fy as Ta,Ml as tn,On as ht,ck as ft,cM as nn,ME as da,Al as rn,Oo as tt,zX as Fa,Op as gt,Am as sn,N3 as on,An as cn,Bh as dn,s6 as ln,Bb as un,zw as bt,zp as mn,Oq as Cn,fR as pn,zF as yt,zJ as St,fQ as hn,Or as fn,A7 as It,Os as gn,Ot as bn,Ou as yn,zH as At,zs as Et,z8 as kt,zB as Dt,zz as _t,zD as Sn,zf as nt,Ov as wt,Ow as va,zU as Ia,Jk as Pt,cN as Ya,Ox as In,Oy as An,Oz as En,OA as kn,zR as Na,Ae as Dn,Aa as _n,zN as wn,Ac as Pn,A2 as Tn,A4 as Fn,OB as Tt,Ak as Ft,GS as vn,OC as On,OD as xn,OE as Bn,OF as vt,OG as Ln,AH as Rn,zW as Ot,zQ as ca,zV as Un,OH as jn,OI as Nn,y$ as Vn,OJ as xt,OK as Bt,OL as Hn,z1 as Mn,z0 as rt,OM as zn,ON as Gn,OO as $n,Jg as Yn,OP as Za,OQ as Zn,vC as Lt,k7 as Kn,gE as Wn,AM as qn,OR as Rt,OS as Qn,AN as Jn,OT as Xn,dd as er,sG as ar,AC as tr,Aw as Le,bv as nr,bE as rr,cw as sr,bF as or,Iz as cr}from"./zeni-epic-state-lenVK-tm.js";import{z as X,I as je,x as ce,c as Y,B as Ke,bY as Oa,c7 as ir,q as ve,c8 as dr,c9 as lr,Z as la,aJ as Fe,s as fe,bf as Ka,ca as ur,E as ua,k as xa,h as Wa,d as Q,D as qa,cb as mr,am as Qa,br as Qe,cc as Va,cd as Cr,A as Ja,a2 as pr,ce as hr,ap as Ut,T as Ha,N as jt,f as Nt,cf as fr,cg as gr,ch as br,ci as yr,cj as Sr,o as Aa,ck as Ir,cl as Ar,cm as Ra,v as Er,cn as kr,co as Dr,cp as _r,cq as wr,a5 as Pr}from"./index-DT4MXfVf.js";import{n as _e,D as Vt,S as Tr}from"./mui-ILn-Gd-L.js";import{a as i}from"./sentry-CNCwYM02.js";import{g as Ce,a as ma,b as Ht,c as Ie,d as Ae,e as Ue,f as Ne,A as Fr,h as Xa,P as vr,i as et,s as Je,j as Mt,k as Me,l as zt,m as Or,n as Gt,p as xr,S as st}from"./SetupPagesScreen-QyIIGt5H.js";import Ba from"./NotFoundScreen-DmUDPIT7.js";import{M as Ca}from"./MobileAppDrawer-BT6_YvGi.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-B8Pz--PX.js";import{c as Yt}from"./useFetchSuggestedQuestionsWhenReady-BKx6d-d7.js";import{v as ot}from"./utils-zvjLmBW4.js";import{t as Br}from"./AddressScreen-CEJ2EDwb.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./analyticsHelper-DNvULkv0.js";import"./routePaths-C4fFm5dh.js";import"./BusinessVerificationPageScreen-D1YPo8Z4.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]="004bfa2e-823c-411f-b5ed-5a8d624307b5",e._sentryDebugIdIdentifier="sentry-dbid-004bfa2e-823c-411f-b5ed-5a8d624307b5")}catch{}})();function Lr(){const e=le(),{cardId:t}=ia(),a=ue(),r=X.getSignedInUser(),n=y(J=>ie(J)),m=je(),C=Re(m?.loggedInUserRoleMap),{useFeatureGate:p}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(J=>ka(J).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=p(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=p(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(J=>ze(J,n.companyId)),j=Ge(v.controllers),{creditAccount:B,creditAccountRepayment:P}=y(J=>$e(J)),V=y(J=>J.classListState.fetchState),u=!_&&d&&f,l=y(J=>Ma(J,t,u,d)),[w,T]=i.useState(!1),H=l.chargeCard,L=H?.cardCreatedByUser?.userId,K=y(J=>L!=null?ba(J.userRoleState,L):void 0),I=K?.accountingClassIDs[0],x=y(J=>I!=null?ya(J.classState,{classId:I,reportId:"class_list"}):void 0),N=H?.cardHolderUser?.userId,U=y(J=>N!=null?ba(J.userRoleState,N):void 0),W=U?.accountingClassIDs[0],E=y(J=>W!=null?ya(J.classState,{classId:W,reportId:"class_list"}):void 0),$=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&&$&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[c,S,$,q]),i.useEffect(()=>{w||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(T(!0),a(Xe(t,u,!1)))},[w,l,t,a]),i.useEffect(()=>{if(l.fetchState==="Completed"&&($===!1||$&&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 J=Ce(n.tenantEmailDomain,t,r,H,c);e(J)}},[l.fetchState,c,$]),i.useEffect(()=>{B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&d&&f&&C&&a(za()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&d&&f&&C&&a(Ga()),V!=="Completed"&&V!=="In-Progress"&&a(ut())},[B.fetchState,P.fetchState,a,d,f,C,V]);const G=()=>{if(r!=null&&t!=null){a(Sa());const J=Ce(n.tenantEmailDomain,t,r);e(J)}},O=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Ue(d,g,D,f),ae=ma(d,f,C,B,P),ne=Ht(O,l);return l.fetchState!=="Completed"?s.jsx(Ke,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(Oa,{showConfetti:c}),s.jsx(ir,{onGotItClick:G,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:B,classListFetchState:V,creditAccountRepayment:P,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:x?.className,cardHolderRoles:U?.userRoles,cardHolderDepartmentName:E?.className})]})}const Rr=pe(function(e){const t=Ye(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(Wt({uiState:{sortKey:t,sortOrder:a}}))}}})(lr);function Ur(){const e=le(),t=ue(),a=ge(),r=X.getSignedInUser(),n=y(o=>ie(o)),[m,C]=i.useState(!1),p=y(o=>Ye(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??jr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{m||p.fetchState==="Completed"||p.fetchState==="In-Progress"||(C(!0),t(mt()))},[m,p,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return p.fetchState==="In-Progress"?s.jsx(dr,{onBackClick:S}):p.cashbackSummary.cashbackEarned.amount===0&&p.fetchState==="Completed"?s.jsx(Ba,{}):s.jsx(Rr,{onBackClick:S})}const jr=e=>`/${e}/cards`,Nr={containerWidth:new ua(100,58)},Vr=({appContent:e})=>{const t=la(),a=ue(),r=le(),{cardId:n}=ia(),m=ge(),{useDynamicConfig:C}=ce(),[p,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}=C(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=y(E=>qt(E,n)),d=g.chargeCard,D=y(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:v}=ce(),{isFeatureEnabled:j}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:B}=v(Y.isDebitCardFeatureEnabled),P=Se(B,k),V=Ie({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:P}),u=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),w=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,L=Ae({isCardsOnlyTenant:w,isChargeCardFeatureEnabled:j,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&L&&u;i.useEffect(()=>{p===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Xe(n,K,L)))},[o,g.fetchState,p,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),$=fe(m.state?.pathnameStackToGoBack,m.pathname);r(E,{state:{pathnameStackToGoBack:$}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Qt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),$=fe(m.state?.pathnameStackToGoBack,m.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:$}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const x=X.getZeniOtpTokenForCardHolder(n),N=y(E=>Ct(E.userState,F.userId)),U=()=>{d?.status?.code!=="active"&&a($a(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(Ke,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(N?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(zr,{children:[s.jsx(Ca,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx(Hr,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:N.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:x,navigate:r,currentTenant:k,location:m,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(Mr,{windowSize:t,children:e}):null]})},Hr=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const m=Jt(e.addressState,a);if(m==null)throw Error("Can't access shippingAddress.");const C=pt(e,n),p=t.updateStatus,S=Ze(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(Xt())||c,showMenuIcon:o,shippingAddress:m,vgsVaultId:xa.cardVaultId,twoFAView:C,activationWaitStatus:p,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:m,chargeCardDetailState:C}=t,p=C.chargeCard?.cardProviderID,{tenantEmailDomain:S}=m;return{onGetOtp:o=>{p!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(an(r,o))},onResendOtp:o=>{p!=null&&e(Pa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{p!=null&&e(wa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(en({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}})}}})(ur),Mr=_e.div`
|
|
1
|
+
import{j as s}from"./liveblocks-CzlYoB8q.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 lt,n as Kt,o as te}from"./core-CGhI3jCZ.js";import{eO as ie,bs as Re,Oc as ka,eS as be,eT as ye,eU as Se,fP as ze,cr as Ge,Od as $e,Oe as Ma,sM as ba,jz as ya,Of as Sa,gD as oa,ze as Xe,zg as za,zh as Ga,jp as ut,Og as Ye,z2 as mt,Oh as Wt,Oi as qt,z5 as Da,Oj as Qt,MF as _a,qY as Ct,zb as $a,gO as Jt,Ok as pt,Ol as Ze,bq as Xt,Om as en,fA as wa,fz as Pa,zL as an,fy as Ta,Ml as tn,On as ht,ck as ft,cM as nn,ME as da,Al as rn,Oo as tt,zX as Fa,Op as gt,Am as sn,N3 as on,An as cn,Bh as dn,s6 as ln,Bb as un,zw as bt,zp as mn,Oq as Cn,fR as pn,zF as yt,zJ as St,fQ as hn,Or as fn,A7 as It,Os as gn,Ot as bn,Ou as yn,zH as At,zs as Et,z8 as kt,zB as Dt,zz as _t,zD as Sn,zf as nt,Ov as wt,Ow as va,zU as Ia,Jk as Pt,cN as Ya,Ox as In,Oy as An,Oz as En,OA as kn,zR as Na,Ae as Dn,Aa as _n,zN as wn,Ac as Pn,A2 as Tn,A4 as Fn,OB as Tt,Ak as Ft,GS as vn,OC as On,OD as xn,OE as Bn,OF as vt,OG as Ln,AH as Rn,zW as Ot,zQ as ca,zV as Un,OH as jn,OI as Nn,y$ as Vn,OJ as xt,OK as Bt,OL as Hn,z1 as Mn,z0 as rt,OM as zn,ON as Gn,OO as $n,Jg as Yn,OP as Za,OQ as Zn,vC as Lt,k7 as Kn,gE as Wn,AM as qn,OR as Rt,OS as Qn,AN as Jn,OT as Xn,dd as er,sG as ar,AC as tr,Aw as Le,bv as nr,bE as rr,cw as sr,bF as or,Iz as cr}from"./zeni-epic-state-lenVK-tm.js";import{z as X,I as je,x as ce,c as Y,B as Ke,bY as Oa,c7 as ir,q as ve,c8 as dr,c9 as lr,Z as la,aJ as Fe,s as fe,bf as Ka,ca as ur,E as ua,k as xa,h as Wa,d as Q,D as qa,cb as mr,am as Qa,br as Qe,cc as Va,cd as Cr,A as Ja,a2 as pr,ce as hr,ap as Ut,T as Ha,N as jt,f as Nt,cf as fr,cg as gr,ch as br,ci as yr,cj as Sr,o as Aa,ck as Ir,cl as Ar,cm as Ra,v as Er,cn as kr,co as Dr,cp as _r,cq as wr,a5 as Pr}from"./index-D7leYkuC.js";import{n as _e,D as Vt,S as Tr}from"./mui-ILn-Gd-L.js";import{a as i}from"./sentry-CNCwYM02.js";import{g as Ce,a as ma,b as Ht,c as Ie,d as Ae,e as Ue,f as Ne,A as Fr,h as Xa,P as vr,i as et,s as Je,j as Mt,k as Me,l as zt,m as Or,n as Gt,p as xr,S as st}from"./SetupPagesScreen-BWmxAg5_.js";import Ba from"./NotFoundScreen-CojoL2wq.js";import{M as Ca}from"./MobileAppDrawer-CMz8hWRn.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-BYwM8iQc.js";import{c as Yt}from"./useFetchSuggestedQuestionsWhenReady-CLFroGaE.js";import{v as ot}from"./utils-zvjLmBW4.js";import{t as Br}from"./AddressScreen-BCfbWbk_.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./analyticsHelper-CwPfLmD8.js";import"./routePaths-DhV05MHP.js";import"./BusinessVerificationPageScreen-C57FErKR.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]="004bfa2e-823c-411f-b5ed-5a8d624307b5",e._sentryDebugIdIdentifier="sentry-dbid-004bfa2e-823c-411f-b5ed-5a8d624307b5")}catch{}})();function Lr(){const e=le(),{cardId:t}=ia(),a=ue(),r=X.getSignedInUser(),n=y(J=>ie(J)),m=je(),C=Re(m?.loggedInUserRoleMap),{useFeatureGate:p}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(J=>ka(J).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=p(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=p(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(J=>ze(J,n.companyId)),j=Ge(v.controllers),{creditAccount:B,creditAccountRepayment:P}=y(J=>$e(J)),V=y(J=>J.classListState.fetchState),u=!_&&d&&f,l=y(J=>Ma(J,t,u,d)),[w,T]=i.useState(!1),H=l.chargeCard,L=H?.cardCreatedByUser?.userId,K=y(J=>L!=null?ba(J.userRoleState,L):void 0),I=K?.accountingClassIDs[0],x=y(J=>I!=null?ya(J.classState,{classId:I,reportId:"class_list"}):void 0),N=H?.cardHolderUser?.userId,U=y(J=>N!=null?ba(J.userRoleState,N):void 0),W=U?.accountingClassIDs[0],E=y(J=>W!=null?ya(J.classState,{classId:W,reportId:"class_list"}):void 0),$=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&&$&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[c,S,$,q]),i.useEffect(()=>{w||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(T(!0),a(Xe(t,u,!1)))},[w,l,t,a]),i.useEffect(()=>{if(l.fetchState==="Completed"&&($===!1||$&&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 J=Ce(n.tenantEmailDomain,t,r,H,c);e(J)}},[l.fetchState,c,$]),i.useEffect(()=>{B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&d&&f&&C&&a(za()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&d&&f&&C&&a(Ga()),V!=="Completed"&&V!=="In-Progress"&&a(ut())},[B.fetchState,P.fetchState,a,d,f,C,V]);const G=()=>{if(r!=null&&t!=null){a(Sa());const J=Ce(n.tenantEmailDomain,t,r);e(J)}},O=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Ue(d,g,D,f),ae=ma(d,f,C,B,P),ne=Ht(O,l);return l.fetchState!=="Completed"?s.jsx(Ke,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(Oa,{showConfetti:c}),s.jsx(ir,{onGotItClick:G,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:B,classListFetchState:V,creditAccountRepayment:P,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:x?.className,cardHolderRoles:U?.userRoles,cardHolderDepartmentName:E?.className})]})}const Rr=pe(function(e){const t=Ye(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(Wt({uiState:{sortKey:t,sortOrder:a}}))}}})(lr);function Ur(){const e=le(),t=ue(),a=ge(),r=X.getSignedInUser(),n=y(o=>ie(o)),[m,C]=i.useState(!1),p=y(o=>Ye(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??jr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{m||p.fetchState==="Completed"||p.fetchState==="In-Progress"||(C(!0),t(mt()))},[m,p,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return p.fetchState==="In-Progress"?s.jsx(dr,{onBackClick:S}):p.cashbackSummary.cashbackEarned.amount===0&&p.fetchState==="Completed"?s.jsx(Ba,{}):s.jsx(Rr,{onBackClick:S})}const jr=e=>`/${e}/cards`,Nr={containerWidth:new ua(100,58)},Vr=({appContent:e})=>{const t=la(),a=ue(),r=le(),{cardId:n}=ia(),m=ge(),{useDynamicConfig:C}=ce(),[p,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}=C(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=y(E=>qt(E,n)),d=g.chargeCard,D=y(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:v}=ce(),{isFeatureEnabled:j}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:B}=v(Y.isDebitCardFeatureEnabled),P=Se(B,k),V=Ie({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:P}),u=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),w=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,L=Ae({isCardsOnlyTenant:w,isChargeCardFeatureEnabled:j,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&L&&u;i.useEffect(()=>{p===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Xe(n,K,L)))},[o,g.fetchState,p,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),$=fe(m.state?.pathnameStackToGoBack,m.pathname);r(E,{state:{pathnameStackToGoBack:$}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Qt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),$=fe(m.state?.pathnameStackToGoBack,m.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:$}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const x=X.getZeniOtpTokenForCardHolder(n),N=y(E=>Ct(E.userState,F.userId)),U=()=>{d?.status?.code!=="active"&&a($a(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(Ke,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(N?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(zr,{children:[s.jsx(Ca,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx(Hr,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:N.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:x,navigate:r,currentTenant:k,location:m,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(Mr,{windowSize:t,children:e}):null]})},Hr=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const m=Jt(e.addressState,a);if(m==null)throw Error("Can't access shippingAddress.");const C=pt(e,n),p=t.updateStatus,S=Ze(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(Xt())||c,showMenuIcon:o,shippingAddress:m,vgsVaultId:xa.cardVaultId,twoFAView:C,activationWaitStatus:p,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:m,chargeCardDetailState:C}=t,p=C.chargeCard?.cardProviderID,{tenantEmailDomain:S}=m;return{onGetOtp:o=>{p!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(an(r,o))},onResendOtp:o=>{p!=null&&e(Pa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{p!=null&&e(wa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(en({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}})}}})(ur),Mr=_e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: ${e=>`${Nr.containerWidth.value(e.windowSize)}%`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-CzlYoB8q.js";import{a as g}from"./sentry-CNCwYM02.js";import{j as w,h as x,u as k,l as T,g as O,k as E}from"./core-CGhI3jCZ.js";import{z as D,b1 as F,A as L,d as P,f as V,ab as b,b2 as j,ap as A,aq as U,s as B}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-CzlYoB8q.js";import{a as g}from"./sentry-CNCwYM02.js";import{j as w,h as x,u as k,l as T,g as O,k as E}from"./core-CGhI3jCZ.js";import{z as D,b1 as F,A as L,d as P,f as V,ab as b,b2 as j,ap as A,aq as U,s as B}from"./index-D7leYkuC.js";import{eO as C,fC as M,rx as _,fx as G,c1 as R,LK as z,bn as Y,pF as $,pt as q,j$ as H,lv as S,LL as K,bD as Z,cu as N,lD as J,lG as Q}from"./zeni-epic-state-lenVK-tm.js";import"./mui-ILn-Gd-L.js";import{c as W}from"./routePaths-DhV05MHP.js";import{M as X}from"./MobileAppDrawer-CMz8hWRn.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]="bda3cb92-eea2-440c-9025-d21db0f4871b",t._sentryDebugIdIdentifier="sentry-dbid-bda3cb92-eea2-440c-9025-d21db0f4871b")}catch{}})();const ee=E(function(t){const a=G(t),i=D.getSignedInUser(),l=C(t),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=R(l?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=z(t.companyConfigState),n=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser: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=B(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...n,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:U(I))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?Z(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(K(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(H({files:e}))},onDeleteFile:e=>{t(q(e))},onEditFileName:(e,n)=>{t($(e,n.split(".")[0]))}}})(j);function de(){const t=w(),a=x(),i=k(),{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=>C(s)),d=r.companyId??D.getSignedInUserTenant(l)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||n!=="Not-Started"||d==null||(p(!0),a(M(d)))},[c,n,d,a]),g.useEffect(()=>{o==="Not-Started"&&a(_())},[o,a]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(L,{analytics:P,onLoad:s=>s.trackPageLoaded(V.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-CzlYoB8q.js";import{a}from"./sentry-CNCwYM02.js";import{h as D,u as v,g as m,N as w}from"./core-CGhI3jCZ.js";import{Iv as O,eO as A,fj as j,mm as L,fL as h,fi as U,eP as _,IC as F}from"./zeni-epic-state-lenVK-tm.js";import{u as $,z as u,L as g,D as k,o as H}from"./index-
|
|
1
|
+
import{j as C}from"./liveblocks-CzlYoB8q.js";import{a}from"./sentry-CNCwYM02.js";import{h as D,u as v,g as m,N as w}from"./core-CGhI3jCZ.js";import{Iv as O,eO as A,fj as j,mm as L,fL as h,fi as U,eP as _,IC as F}from"./zeni-epic-state-lenVK-tm.js";import{u as $,z as u,L as g,D as k,o as H}from"./index-D7leYkuC.js";import{n as P}from"./mui-ILn-Gd-L.js";import{t as z}from"./getLocaleForTenant-D8dvZJzp.js";import{g as R,Q as G}from"./QBOConnectionScreen-B1II2TpX.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./empty-CzOjtD5w.js";import"./pdf-lib-CWTnCbuI.js";import"./index-BRtx8cu_.js";import"./url-CWzi7k2i.js";import"./index-DH8cVwcc.js";import"./decodeURIComponentSafe-CZEzMrgK.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]="64e7d4a8-3ff6-4511-9adf-12e0a696c66f",t._sentryDebugIdIdentifier="sentry-dbid-64e7d4a8-3ff6-4511-9adf-12e0a696c66f")}catch{}})();const Q=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
flex-direction: row;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-CzlYoB8q.js";import{z as n}from"./index-
|
|
1
|
+
import{j as d}from"./liveblocks-CzlYoB8q.js";import{z as n}from"./index-D7leYkuC.js";import{g as p}from"./QBOConnectionScreen-B1II2TpX.js";import"./sentry-CNCwYM02.js";import{u as a,N as i}from"./core-CGhI3jCZ.js";import"./zeni-epic-state-lenVK-tm.js";import"./recharts-D6qS-pdV.js";import"./mui-ILn-Gd-L.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./empty-CzOjtD5w.js";import"./pdf-lib-CWTnCbuI.js";import"./index-BRtx8cu_.js";import"./url-CWzi7k2i.js";import"./index-DH8cVwcc.js";import"./decodeURIComponentSafe-CZEzMrgK.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]="b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd",t._sentryDebugIdIdentifier="sentry-dbid-b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd")}catch{}})();const U=()=>{const t=a(),{code:o,realmId:r,state:e}=p(t.search),s=n.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return d.jsx(i,{to:m})}return d.jsx(i,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
package/dist/assets/{CustomerOnboardingRoutes-9nN3_YTL.js → CustomerOnboardingRoutes-D-Ufd69Z.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CzlYoB8q.js";import{t as $e,A as Ce}from"./AddressScreen-
|
|
1
|
+
import{j as a}from"./liveblocks-CzlYoB8q.js";import{t as $e,A as Ce}from"./AddressScreen-BCfbWbk_.js";import ze from"./NotFoundScreen-CojoL2wq.js";import{a as g}from"./sentry-CNCwYM02.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-CGhI3jCZ.js";import{v as de,I as le,z as B,x as ue,h as Je,c as _,s as V,A as W,d as N,B as we,f as Y,al as Ke,Z as Qe,am as ke,k as te,an as Ze,ao as Ie,o as We,ap as He,aq as Te,ar as Ye}from"./index-D7leYkuC.js";import{bn as Xe,eO as ee,fb as et,eU as pe,eS as me,bv as tt,mk as at,f7 as nt,bN as ot,j3 as ae,j6 as ve,Jd as st,bS as it,c1 as ge,rL as he,rw as rt,Jp as X,rM as _e,GW as ct,k7 as Ue,Jq as Ve,Jr as dt,Js as lt,Jt as ut,j1 as pt,j4 as mt,ry as Be,rK as gt,bD as xe,cu as ht,rY as Ee,pF as ft,pt as yt,j$ as St,fA as bt,fz as Ct,fy as kt,Ju as It,rq as Tt,rZ as xt,s0 as Et,s3 as Ot,s9 as At,cT as Pt}from"./zeni-epic-state-lenVK-tm.js";import{n as fe}from"./mui-ILn-Gd-L.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-B1II2TpX.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./empty-CzOjtD5w.js";import"./pdf-lib-CWTnCbuI.js";import"./index-BRtx8cu_.js";import"./url-CWzi7k2i.js";import"./index-DH8cVwcc.js";import"./decodeURIComponentSafe-CZEzMrgK.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]="4860e52c-6ae3-48c8-b7c1-0269a0cc2bac",t._sentryDebugIdIdentifier="sentry-dbid-4860e52c-6ae3-48c8-b7c1-0269a0cc2bac")}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"}})}}})(Ke),wt=()=>{const t=oe(),o=se(),s=ie(),u=de(),[d,r]=g.useState(!1),[p,S]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=B.getSignedInUser(),h=Xe(i),{useFeatureGate:m}=ue(),I=Je(),{isFeatureEnabled:x}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:E}=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),G=L&&j,O=D(l=>l.onboardingCustomerViewState.fetchState),b=c.excludedResources,R=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const w=pe(F,c),A=me(c),P=[],K=b?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,z=b?.resources?.find(l=>l.resource==="/reports/task_card")==null,q=c?.userRole!=null&&tt(c?.userRole),v=b?.resources?.find(l=>l.resource==="/bills")==null&&!q,J=b?.resources?.find(l=>l.resource==="/reimbursements")==null;if(K===!1&&P.push("top_expenses"),z===!1&&P.push("task_card"),v===!1&&P.push("bill_pay_card","bill_pay_promo_card"),J===!1&&P.push("reimbursement_card","reimbursement_promo_card"),k===!1&&P.push("zeni_accounts_promo_card"),f===!1&&P.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||w||A||(r(!0),s(at(i.userId,R,c.tenantId,!0,!1,P)))},[d,O,w,A,i,c.tenantId,s]),g.useEffect(()=>{(w||A)&&setTimeout(()=>{S(!0)},5e3)},[w,A]),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(A)return a.jsx(T,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(W,{analytics:N,onLoad:l=>(Q=>Q.trackPageLoaded(Y.Event.onboardingDashboardActivation))(l)}),a.jsx(jt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:x,isArAgingFeatureEnabled:E,shouldFetchZeniAccountsPromoCard:k,shouldFetchRewardsPlanCard:f,isExpenseAutomationEnabledForUser:$,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:G,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-CzlYoB8q.js";import{l as z,g as S,u as K,h as V,j as q,k as H,s as $a,n as at,o as w}from"./core-CGhI3jCZ.js";import{eO as L,JK as Me,bD as Ut,bq as ue,KX as Ka,hT as qa,KY as xt,KZ as Za,hW as nt,K_ as Re,K$ as Ha,h$ as Ja,L0 as Tt,L1 as Qa,i3 as ot,L2 as Le,L3 as Wa,ck as rt,L4 as Xa,L5 as en,K2 as tn,iZ as an,L6 as nn,bn as Ae,L7 as Yt,Jy as ee,bc as Gt,jb as Nt,mu as Vt,iW as zt,JA as te,Jz as Z,f3 as on,fl as sn,L8 as rn,L9 as cn,La as $t,Lb as be,tB as ve,tC as Ie,tZ as me,tT as ae,tG as Ee,Lc as ln,Ld as dn,Le as un,Lf as Kt,Lg as Ce,Lh as mn,dC as Ue,qd as qt,Li as pn,Lj as hn,Lk as fn,Ll as it,IW as ct,jr as pe,u5 as lt,ql as gn,Lm as bn,tD as wt,qg as le,qc as Zt,Ln as se,Lo as Cn,Lp as dt,IU as ut,sd as Ht,Lq as _n,Lr as kn,Ls as Sn,Lt as mt,sq as yn,Lu as An,tF as Dt,sc as Jt,Lv as re,Lw as vn,bv as Qt,u9 as Wt,Lx as In,Ly as En,Lz as xn,LA as pt,u4 as Tn,LB as wn,tE as Ft,u8 as Xt,LC as ie,LD as Dn,LE as Fn,LF as ea,jg as ta,mr as aa,jl as na,mp as oa,mo as sa,mn as ra,rB as On,fb as Pn,cN as Bn,cO as Rn,mk as Ln,f7 as jn,mB as Mn,LG as Un,Dd as Yn,LH as Gn,LI as Nn,LJ as Vn,b5 as ht,e_ as zn,gB as $n,fC as Kn,mv as qn,iP as Zn,ms as Hn,mq as Jn,eU as Qn,eS as Wn}from"./zeni-epic-state-lenVK-tm.js";import{z as R,T as J,s as D,d as I,D as $,aQ as Xn,A as xe,aR as ia,f as G,aS as eo,I as Te,aT as ca,x as Ye,c as j,h as to,aU as ao,aV as no,M as la,Z as oo,a as da,a0 as so,aW as ro,aJ as ua,aX as io,aY as co,R as lo,aZ as uo,a_ as mo,am as po,q as ho,N as fo,a$ as go,b0 as ke}from"./index-DT4MXfVf.js";import{n as ft}from"./mui-ILn-Gd-L.js";import{a as b}from"./sentry-CNCwYM02.js";import{w as ma}from"./withTransactionSidePanel-DEEtwy0r.js";import{b as pa,t as he,e as ne,a as gt,v as bo}from"./routePaths-C4fFm5dh.js";import{u as Q}from"./useAskAiCfoHostNavButtonProps-B8Pz--PX.js";import{c as we,b as Co}from"./useFetchSuggestedQuestionsWhenReady-BKx6d-d7.js";import ye from"./NotFoundScreen-DmUDPIT7.js";import{t as ha}from"./analyticsHelper-DNvULkv0.js";import{C as _o}from"./CompanyPassportScreen-1FjaBc8x.js";import{F as ko}from"./FeaturePreviewScreen-BXc7ySeT.js";import{R as So}from"./ReferralListScreen-kApKqS2k.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./TransactionDetailScreen-_-jSXb2F.js";import"./decodeURIComponentSafe-CZEzMrgK.js";import"./MobileAppDrawer-BT6_YvGi.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]="1d63f681-95ae-4bc5-946d-468f775ef028",e._sentryDebugIdIdentifier="sentry-dbid-1d63f681-95ae-4bc5-946d-468f775ef028")}catch{}})();const yo=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=z(),s=R.getSignedInUser(),i=S(x=>x.tenantState.currentTenantId),d=S(x=>L(x)),{tenantEmailDomain:p}=z(),C=K(),g=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo(()=>({authParams:u,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Me()}),[]),m=b.useMemo(()=>r!=null?Ut(r):ue(),[r]),h=V(),f=q(),k=S(x=>Ka(x,m,o)),y=b.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&h(qa(o,m))},[m]),_=b.useCallback(()=>{f("../../",{relative:"path"})},[]),A=b.useCallback((x,P)=>{h(xt({sortKey:x,sortOrder:P}))},[]),E=b.useCallback(x=>{h(xt({downloadState:x}))},[]),M=b.useCallback(x=>{if(e)e(x.transactionId,x.transactionType);else if(p!=null){const P=pa({id:x.transactionId,type:x.transactionType},p);f(P);const fe=D(C.state?.pathnameStackToGoBack,C.pathname);f(P,{state:{pathnameStackToGoBack:fe}})}},[p,e]),F=b.useCallback(()=>{k.vendor!=null&&I.trackApAgingDetail("AP Aging",m.format($.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(Xn,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:I,onTransactionClick:M,onReload:y,onBackClick:_,onColumnSortConfigChanged:A,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Ao=()=>{const e=V(),a=q(),t=S(A=>Za(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=Q({mobileExploreReferrer:"AP Aging"});we({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>L(A)),d=i?.companyName??"",p={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},C=b.useMemo(()=>({authParams:p,companyName:d,downloadEndPoint:`${J}/agingReport`,timezone:Me()}),[]),g=t.apAgingUIState.selectedDate??ue(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(nt(g))},[]);b.useEffect(()=>{u()},[]);const c=b.useCallback(()=>{a("../",{relative:"path"})},[]),m=b.useCallback(A=>{e(Re({searchString:A}))},[]),h=b.useCallback((A,E)=>{e(Re({sortKey:E,sortOrder:A}))},[]),f=b.useCallback(A=>{a(`./${A}/${g.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=b.useCallback(A=>{e(Re({downloadState:A}))},[]),y=b.useCallback((A,E)=>{},[]),_=b.useCallback((A,E)=>{e(Re({selectedDate:A,agingDateSelectionType:E})),e(nt(A))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(xe,{analytics:I,onLoad:A=>A.trackPageLoaded(G.Event.agingReport,"AP Aging")}):null,l.jsx(ia,{uiState:t.apAgingUIState,report:t,downloadParams:C,analytics:I,onReloadReport:u,onBackClick:c,onSearchTextChange:m,onSortOrderChange:h,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:_,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},vo=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=z(),s=R.getSignedInUser(),i=S(F=>L(F)),{tenantEmailDomain:d}=z(),p=K(),C=i.companyName,g={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:g,companyName:C,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Me()}),[]),c=b.useMemo(()=>r!=null?Ut(r):ue(),[r]),m=V(),h=q(),f=S(F=>Ha(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"})},[]),_=b.useCallback((F,x)=>{m(Tt({sortKey:F,sortOrder:x}))},[]),A=b.useCallback(F=>{m(Tt({downloadState:F}))},[]),E=b.useCallback(F=>{if(e)e(F.transactionId,F.transactionType);else if(d!=null){const x=pa({id:F.transactionId,type:F.transactionType},d);h(x);const P=D(p.state?.pathnameStackToGoBack,p.pathname);h(x,{state:{pathnameStackToGoBack:P}})}},[d,e]),M=b.useCallback(()=>{f.customer!=null&&I.trackArAgingDetail("AR Aging",c.format($.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(eo,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:I,onTransactionClick:E,onReload:k,onBackClick:y,onColumnSortConfigChanged:_,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const e=V(),a=q(),t=S(_=>Qa(_)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=Q({mobileExploreReferrer:"AR Aging"});we({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(_=>L(_)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},p=b.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${J}/agingReport`,timezone:Me()}),[]),C=t.arAgingUIState.selectedDate??ue(),g=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ot(C))},[]);b.useEffect(()=>{g()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),c=b.useCallback(_=>{e(Le({searchString:_}))},[]),m=b.useCallback((_,A)=>{e(Le({sortKey:A,sortOrder:_}))},[]),h=b.useCallback(_=>{a(`./${_}/${C.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),f=b.useCallback(_=>{e(Le({downloadState:_}))},[]),k=b.useCallback((_,A)=>{e(Le({selectedDate:_,agingDateSelectionType:A})),e(ot(_))},[]),y=b.useCallback((_,A)=>{e(Wa({nodeId:_,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(xe,{analytics:I,onLoad:_=>_.trackPageLoaded(G.Event.agingReport,"AR Aging")}):null,l.jsx(ia,{uiState:t.arAgingUIState,report:t,downloadParams:p,analytics:I,onReloadReport:g,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:h,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},fa=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function ga(e,a){const t=tn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=he(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(an(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?I.trackZeniAccountsCashBalancePromoClicked("Move Money"):(I.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 I.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const Eo=H(function(e){const a=Xa(e).accountsInOrder.map((n,o)=>fa(n,o)),t=en(e);return{sectionTitle:$.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:I}},ga)(ca),xo=H(function(e){const a=nn(e).accountsInOrder.map((o,r)=>fa(o,r)),t=R.getSignedInUser(),n=Ae(t);return{sectionTitle:$.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ga)(ca);function To(){const e=q(),a=K(),{tenantEmailDomain:t}=z(),n=Te(),o=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=rt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ye,{}):l.jsx(Eo,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function wo(){const e=q(),a=K(),{tenantEmailDomain:t}=z(),n=Te(),o=rt(n?.loggedInUserRoleMap),r=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ye,{}):l.jsx(xo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Do=ft.div`
|
|
1
|
+
import{j as l}from"./liveblocks-CzlYoB8q.js";import{l as z,g as S,u as K,h as V,j as q,k as H,s as $a,n as at,o as w}from"./core-CGhI3jCZ.js";import{eO as L,JK as Me,bD as Ut,bq as ue,KX as Ka,hT as qa,KY as xt,KZ as Za,hW as nt,K_ as Re,K$ as Ha,h$ as Ja,L0 as Tt,L1 as Qa,i3 as ot,L2 as Le,L3 as Wa,ck as rt,L4 as Xa,L5 as en,K2 as tn,iZ as an,L6 as nn,bn as Ae,L7 as Yt,Jy as ee,bc as Gt,jb as Nt,mu as Vt,iW as zt,JA as te,Jz as Z,f3 as on,fl as sn,L8 as rn,L9 as cn,La as $t,Lb as be,tB as ve,tC as Ie,tZ as me,tT as ae,tG as Ee,Lc as ln,Ld as dn,Le as un,Lf as Kt,Lg as Ce,Lh as mn,dC as Ue,qd as qt,Li as pn,Lj as hn,Lk as fn,Ll as it,IW as ct,jr as pe,u5 as lt,ql as gn,Lm as bn,tD as wt,qg as le,qc as Zt,Ln as se,Lo as Cn,Lp as dt,IU as ut,sd as Ht,Lq as _n,Lr as kn,Ls as Sn,Lt as mt,sq as yn,Lu as An,tF as Dt,sc as Jt,Lv as re,Lw as vn,bv as Qt,u9 as Wt,Lx as In,Ly as En,Lz as xn,LA as pt,u4 as Tn,LB as wn,tE as Ft,u8 as Xt,LC as ie,LD as Dn,LE as Fn,LF as ea,jg as ta,mr as aa,jl as na,mp as oa,mo as sa,mn as ra,rB as On,fb as Pn,cN as Bn,cO as Rn,mk as Ln,f7 as jn,mB as Mn,LG as Un,Dd as Yn,LH as Gn,LI as Nn,LJ as Vn,b5 as ht,e_ as zn,gB as $n,fC as Kn,mv as qn,iP as Zn,ms as Hn,mq as Jn,eU as Qn,eS as Wn}from"./zeni-epic-state-lenVK-tm.js";import{z as R,T as J,s as D,d as I,D as $,aQ as Xn,A as xe,aR as ia,f as G,aS as eo,I as Te,aT as ca,x as Ye,c as j,h as to,aU as ao,aV as no,M as la,Z as oo,a as da,a0 as so,aW as ro,aJ as ua,aX as io,aY as co,R as lo,aZ as uo,a_ as mo,am as po,q as ho,N as fo,a$ as go,b0 as ke}from"./index-D7leYkuC.js";import{n as ft}from"./mui-ILn-Gd-L.js";import{a as b}from"./sentry-CNCwYM02.js";import{w as ma}from"./withTransactionSidePanel-caCfdZEh.js";import{b as pa,t as he,e as ne,a as gt,v as bo}from"./routePaths-DhV05MHP.js";import{u as Q}from"./useAskAiCfoHostNavButtonProps-BYwM8iQc.js";import{c as we,b as Co}from"./useFetchSuggestedQuestionsWhenReady-CLFroGaE.js";import ye from"./NotFoundScreen-CojoL2wq.js";import{t as ha}from"./analyticsHelper-CwPfLmD8.js";import{C as _o}from"./CompanyPassportScreen-D2jISk-U.js";import{F as ko}from"./FeaturePreviewScreen-Xv2JpkA8.js";import{R as So}from"./ReferralListScreen-8R81rrOx.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./TransactionDetailScreen-ByHgtPQ5.js";import"./decodeURIComponentSafe-CZEzMrgK.js";import"./MobileAppDrawer-CMz8hWRn.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]="1d63f681-95ae-4bc5-946d-468f775ef028",e._sentryDebugIdIdentifier="sentry-dbid-1d63f681-95ae-4bc5-946d-468f775ef028")}catch{}})();const yo=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=z(),s=R.getSignedInUser(),i=S(x=>x.tenantState.currentTenantId),d=S(x=>L(x)),{tenantEmailDomain:p}=z(),C=K(),g=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo(()=>({authParams:u,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Me()}),[]),m=b.useMemo(()=>r!=null?Ut(r):ue(),[r]),h=V(),f=q(),k=S(x=>Ka(x,m,o)),y=b.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&h(qa(o,m))},[m]),_=b.useCallback(()=>{f("../../",{relative:"path"})},[]),A=b.useCallback((x,P)=>{h(xt({sortKey:x,sortOrder:P}))},[]),E=b.useCallback(x=>{h(xt({downloadState:x}))},[]),M=b.useCallback(x=>{if(e)e(x.transactionId,x.transactionType);else if(p!=null){const P=pa({id:x.transactionId,type:x.transactionType},p);f(P);const fe=D(C.state?.pathnameStackToGoBack,C.pathname);f(P,{state:{pathnameStackToGoBack:fe}})}},[p,e]),F=b.useCallback(()=>{k.vendor!=null&&I.trackApAgingDetail("AP Aging",m.format($.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(Xn,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:I,onTransactionClick:M,onReload:y,onBackClick:_,onColumnSortConfigChanged:A,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Ao=()=>{const e=V(),a=q(),t=S(A=>Za(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=Q({mobileExploreReferrer:"AP Aging"});we({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>L(A)),d=i?.companyName??"",p={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},C=b.useMemo(()=>({authParams:p,companyName:d,downloadEndPoint:`${J}/agingReport`,timezone:Me()}),[]),g=t.apAgingUIState.selectedDate??ue(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(nt(g))},[]);b.useEffect(()=>{u()},[]);const c=b.useCallback(()=>{a("../",{relative:"path"})},[]),m=b.useCallback(A=>{e(Re({searchString:A}))},[]),h=b.useCallback((A,E)=>{e(Re({sortKey:E,sortOrder:A}))},[]),f=b.useCallback(A=>{a(`./${A}/${g.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=b.useCallback(A=>{e(Re({downloadState:A}))},[]),y=b.useCallback((A,E)=>{},[]),_=b.useCallback((A,E)=>{e(Re({selectedDate:A,agingDateSelectionType:E})),e(nt(A))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(xe,{analytics:I,onLoad:A=>A.trackPageLoaded(G.Event.agingReport,"AP Aging")}):null,l.jsx(ia,{uiState:t.apAgingUIState,report:t,downloadParams:C,analytics:I,onReloadReport:u,onBackClick:c,onSearchTextChange:m,onSortOrderChange:h,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:_,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},vo=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=z(),s=R.getSignedInUser(),i=S(F=>L(F)),{tenantEmailDomain:d}=z(),p=K(),C=i.companyName,g={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:g,companyName:C,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Me()}),[]),c=b.useMemo(()=>r!=null?Ut(r):ue(),[r]),m=V(),h=q(),f=S(F=>Ha(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"})},[]),_=b.useCallback((F,x)=>{m(Tt({sortKey:F,sortOrder:x}))},[]),A=b.useCallback(F=>{m(Tt({downloadState:F}))},[]),E=b.useCallback(F=>{if(e)e(F.transactionId,F.transactionType);else if(d!=null){const x=pa({id:F.transactionId,type:F.transactionType},d);h(x);const P=D(p.state?.pathnameStackToGoBack,p.pathname);h(x,{state:{pathnameStackToGoBack:P}})}},[d,e]),M=b.useCallback(()=>{f.customer!=null&&I.trackArAgingDetail("AR Aging",c.format($.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(eo,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:I,onTransactionClick:E,onReload:k,onBackClick:y,onColumnSortConfigChanged:_,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const e=V(),a=q(),t=S(_=>Qa(_)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=Q({mobileExploreReferrer:"AR Aging"});we({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(_=>L(_)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},p=b.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${J}/agingReport`,timezone:Me()}),[]),C=t.arAgingUIState.selectedDate??ue(),g=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ot(C))},[]);b.useEffect(()=>{g()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),c=b.useCallback(_=>{e(Le({searchString:_}))},[]),m=b.useCallback((_,A)=>{e(Le({sortKey:A,sortOrder:_}))},[]),h=b.useCallback(_=>{a(`./${_}/${C.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),f=b.useCallback(_=>{e(Le({downloadState:_}))},[]),k=b.useCallback((_,A)=>{e(Le({selectedDate:_,agingDateSelectionType:A})),e(ot(_))},[]),y=b.useCallback((_,A)=>{e(Wa({nodeId:_,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(xe,{analytics:I,onLoad:_=>_.trackPageLoaded(G.Event.agingReport,"AR Aging")}):null,l.jsx(ia,{uiState:t.arAgingUIState,report:t,downloadParams:p,analytics:I,onReloadReport:g,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:h,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},fa=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function ga(e,a){const t=tn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=he(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(an(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?I.trackZeniAccountsCashBalancePromoClicked("Move Money"):(I.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 I.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const Eo=H(function(e){const a=Xa(e).accountsInOrder.map((n,o)=>fa(n,o)),t=en(e);return{sectionTitle:$.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:I}},ga)(ca),xo=H(function(e){const a=nn(e).accountsInOrder.map((o,r)=>fa(o,r)),t=R.getSignedInUser(),n=Ae(t);return{sectionTitle:$.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ga)(ca);function To(){const e=q(),a=K(),{tenantEmailDomain:t}=z(),n=Te(),o=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=rt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ye,{}):l.jsx(Eo,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function wo(){const e=q(),a=K(),{tenantEmailDomain:t}=z(),n=Te(),o=rt(n?.loggedInUserRoleMap),r=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ye,{}):l.jsx(xo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Do=ft.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-CzlYoB8q.js";import{a as u}from"./sentry-CNCwYM02.js";import{h as w,g as b,k as y,u as A,N as k}from"./core-CGhI3jCZ.js";import{Iv as N,eO as _,fj as U,Iw as L,mm as R,Ix as z}from"./zeni-epic-state-lenVK-tm.js";import{u as O,z as f,L as T,t as S,D as j,b as $}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-CzlYoB8q.js";import{a as u}from"./sentry-CNCwYM02.js";import{h as w,g as b,k as y,u as A,N as k}from"./core-CGhI3jCZ.js";import{Iv as N,eO as _,fj as U,Iw as L,mm as R,Ix as z}from"./zeni-epic-state-lenVK-tm.js";import{u as O,z as f,L as T,t as S,D as j,b as $}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import{t as P}from"./getLocaleForTenant-D8dvZJzp.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.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]="cf247005-59f6-41f4-a081-b4997d245f5a",t._sentryDebugIdIdentifier="sentry-dbid-cf247005-59f6-41f4-a081-b4997d245f5a")}catch{}})();const Q=y(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,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=w(),{setLoading:s,clearAllLoading:o}=O(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>N(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&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(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(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-BlARsGBU.js → DomesticWireDetailScreen-DTmfTwYq.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-CzlYoB8q.js";import{j as w,u as C,g as h,k as A,l as P}from"./core-CGhI3jCZ.js";import{Mr as k,My as _,fA as q,fz as J,fy as L,io as W,Jz as K,pw as Q,eO as V,LZ as D,il as T,Ms as S,MB as F,ij as G,iH as j}from"./zeni-epic-state-lenVK-tm.js";import{bn as X,Z as R,x as N,z as U,h as Z,q as p,c as v,B as z,bo as Y,o as O,bp as ee,s as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-CzlYoB8q.js";import{j as w,u as C,g as h,k as A,l as P}from"./core-CGhI3jCZ.js";import{Mr as k,My as _,fA as q,fz as J,fy as L,io as W,Jz as K,pw as Q,eO as V,LZ as D,il as T,Ms as S,MB as F,ij as G,iH as j}from"./zeni-epic-state-lenVK-tm.js";import{bn as X,Z as R,x as N,z as U,h as Z,q as p,c as v,B as z,bo as Y,o as O,bp as ee,s as te}from"./index-D7leYkuC.js";import{n as H}from"./mui-ILn-Gd-L.js";import"./sentry-CNCwYM02.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]="a7c59b17-200f-4f1a-931e-424ecde4bb7f",e._sentryDebugIdIdentifier="sentry-dbid-a7c59b17-200f-4f1a-931e-424ecde4bb7f")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(K("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(L(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(X);function M({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(c=>k(c,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=H.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-CzlYoB8q.js";import{Z as c,E as l,h as f}from"./index-
|
|
1
|
+
import{j as d}from"./liveblocks-CzlYoB8q.js";import{Z as c,E as l,h as f}from"./index-D7leYkuC.js";import{D as p}from"./mui-ILn-Gd-L.js";import"./sentry-CNCwYM02.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]="10c380cc-f513-470e-9bfa-e47a49402143",e._sentryDebugIdIdentifier="sentry-dbid-10c380cc-f513-470e-9bfa-e47a49402143")}catch{}})();const u={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=c(),s=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),i=f();return d.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CzlYoB8q.js";import{a as d}from"./sentry-CNCwYM02.js";import{j as A,h as B,u as q,l as K,g as c,N,k as O,n as F,o as _}from"./core-CGhI3jCZ.js";import{KG as z,eO as J,K3 as M,kr as R,GO as I,KL as W,Jy as Y,jr as $,GP as S,K8 as L,K9 as V,JA as H,Jz as Q}from"./zeni-epic-state-lenVK-tm.js";import{aN as U,d as X,q as Z,s as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-CzlYoB8q.js";import{a as d}from"./sentry-CNCwYM02.js";import{j as A,h as B,u as q,l as K,g as c,N,k as O,n as F,o as _}from"./core-CGhI3jCZ.js";import{KG as z,eO as J,K3 as M,kr as R,GO as I,KL as W,Jy as Y,jr as $,GP as S,K8 as L,K9 as V,JA as H,Jz as Q}from"./zeni-epic-state-lenVK-tm.js";import{aN as U,d as X,q as Z,s as tt}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import{d as k}from"./decodeURIComponentSafe-CZEzMrgK.js";import{w as et}from"./withTransactionSidePanel-caCfdZEh.js";import{e as at,b as nt}from"./routePaths-DhV05MHP.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./useAskAiCfoHostNavButtonProps-BYwM8iQc.js";import"./useFetchSuggestedQuestionsWhenReady-CLFroGaE.js";import"./TransactionDetailScreen-ByHgtPQ5.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]="66c8f577-29f0-47d1-9c92-6d9dc40aa3c6",a._sentryDebugIdIdentifier="sentry-dbid-66c8f577-29f0-47d1-9c92-6d9dc40aa3c6")}catch{}})();const ot=O(function(a,t){const e=t.entity,o=W(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:$(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(L()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();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(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),l=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:G,entityNameEncoded:j}=K(),r=k(G??""),p=k(j??""),u=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=c(n=>J(n).company?.companyInfo.firstMonthOfFY??1),f=c(n=>M(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(R(i)))},[m,u,i]);const P=c(n=>n.trendState.fetchState),E=f?.selectedPeriod?.timePeriod??g,w=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&P==="Completed"&&(D(!0),E!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))},[m,h,P]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:b,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(N,{to:C(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(F,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-p-exYuWV.js → ExpenseAutomationRoutes-DYuR5p-K.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-CzlYoB8q.js";import wn from"./NotFoundScreen-
|
|
1
|
+
import{j as C}from"./liveblocks-CzlYoB8q.js";import wn from"./NotFoundScreen-CojoL2wq.js";import{a as o,b as Tt}from"./sentry-CNCwYM02.js";import{n as De,S as xn}from"./mui-ILn-Gd-L.js";import{h as se,j as wt,u as qe,g as F,k as Rn,l as rt,n as Dn,o as je}from"./core-CGhI3jCZ.js";import{eO as we,OZ as Un,mw as Ce,fe as Fn,q7 as Bn,mO as xt,n7 as Rt,O_ as Dt,nh as _n,O$ as Ut,mH as On,pF as Mn,eZ as he,P0 as xe,s6 as Ft,Bh as Bt,P1 as _t,P2 as Vn,pk as Ge,KH as dt,KJ as jn,ju as zn,KK as Ln,jB as $n,cV as qn,t9 as Je,jr as Gn,mU as Ot,nm as Re,P3 as Jn,JA as ut,Jz as Pe,P4 as mt,jS as Nn,P5 as Kn,P6 as Yn,P7 as Hn,P8 as Zn,m$ as Wn,mM as ce,np as Ae,P9 as Qn,Pa as Xn,Pb as ea,nw as ta,jF as na,jw as aa,Pc as oa,jE as ht,KR as sa,Pd as ca,Pe as ia,pg as la,oX as ra,nn as pe,oW as ze,Pf as da,Pg as ua,l9 as ma,bq as ha,l4 as pt,kS as pa,Ph as ga,gD as gt,fQ as Ca,l1 as Sa,v2 as Ia,Pi as fa,nX as ka,nS as Ea,nW as va,nH as ya,Pj as ba,f0 as Mt,na as Pa,mX as Aa,ff as Ct,nr as Ta,Pk as wa,no as Vt,Pl as xa,Pm as Ra,Pn as Da,Po as Ua,Pp as St,ps as Fa,oN as Ba,Jy as _a,jD as Oa,Pq as Ma,FP as Va,jC as ja,e$ as za,om as jt,oF as La,nl as It,nq as $a,bD as qa,k_ as Ga,kX as Ja,Pr as Na,nG as ft,oD as kt,oB as Ka,or as Ya,o6 as Ha,oE as Za,Ps as Wa,Pt as Qa,oa as Xa,Pu as eo,o0 as to,o9 as no,o7 as ao,oI as oo}from"./zeni-epic-state-lenVK-tm.js";import{x as zt,c as ge,d as z,s as W,N as Lt,cu as so,z as Ue,cv as co,ap as Te,cw as io,aP as Et,B as $t,cx as lo,am as Le,D as ro,cy as uo,T as mo,cz as ho,M as po,cA as go,cB as Co,v as So,I as Io,aJ as fo,b1 as ko,E as Eo,cC as vo}from"./index-D7leYkuC.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-BYwM8iQc.js";import{c as Gt}from"./useFetchSuggestedQuestionsWhenReady-CLFroGaE.js";import{c as vt,C as yo}from"./TransactionDetailScreen-ByHgtPQ5.js";import{w as bo}from"./withTransactionSidePanel-caCfdZEh.js";import{h as Po,v as Ao}from"./routePaths-DhV05MHP.js";import{g as $e}from"./accountMappingHelper-D6w4MCc5.js";import{D as To}from"./DrawerScreen-DNHIo9Ek.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./decodeURIComponentSafe-CZEzMrgK.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="c678bf00-c625-4038-b45e-8b92a02c9401",t._sentryDebugIdIdentifier="sentry-dbid-c678bf00-c625-4038-b45e-8b92a02c9401")}catch{}})();const wo=()=>{const t=se(),l=wt(),A=qe(),f=F(d=>we(d)),{useFeatureGate:b}=zt(),{isFeatureEnabled:S}=b(ge.isRealtimeInsightsFeatureEnabled),s=F(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),i=F(d=>Un(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=qt({mobileExploreReferrer:"Month-End Close Overview"}),E=o.useCallback((d,w,Z=!1)=>{t(Ce({tenantId:w,period:{month:d.month,year:d.year},refreshViewInBackground:Z}))},[]),v=o.useCallback(d=>{const w=A.state?.referrer;i.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(d.month,d.year,i.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",i.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,w??null),t(Fn(f.tenantId,d))},[f.tenantId,i.monthEndCloseChecks?.auditSummary,i.monthEndCloseChecks?.reportEmailSentDate]),h=s[f.tenantId],B=o.useCallback(()=>{const d=A.state?.referrer;i.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(h.month,h.year,i.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",i.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),E(h,f.tenantId,!0)},[E,h,f.tenantId,i.monthEndCloseChecks?.auditSummary,i.monthEndCloseChecks?.reportEmailSentDate]),u=W(A.state?.pathnameStackToGoBack,A.pathname),g=o.useCallback(()=>{if(i.monthEndCloseChecks!=null&&h!=null){const d=i.monthEndCloseChecks.monthEndCloseCheckList.find(w=>w.progress<100);if(d!=null)return void l(`./${d.id}/${h.month}-${h.year}`,{state:{pathnameStackToGoBack:u,message:"comingFromOverview"}});l(`./month_end_insights/${h.month}-${h.year}`,{state:{pathnameStackToGoBack:u,message:"comingFromOverview"}})}},[i.monthEndCloseChecks,h]),{areTenantIdsInSync:T}=Lt();return Gt({isDataReady:i.fetchState==="Completed"}),o.useEffect(()=>{h!=null&&i.fetchState!=="In-Progress"&&i.fetchState!=="Completed"&&T&&E(h,f.tenantId)},[E,h,i.fetchState,f.tenantId,T]),o.useEffect(()=>{h!=null&&i.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&i.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&T&&t(Bn(h))},[h,i.monthClosePerformanceTrendFetchStatus.fetchState,T]),o.useEffect(()=>{const d=setInterval(()=>{i.fetchState!=="In-Progress"&&i.fetchState==="Completed"&&B()},3e5);return()=>clearInterval(d)},[i.fetchState]),o.useEffect(()=>{if(i.fetchState==="Completed"&&i.monthEndCloseChecks?.auditSummary!=null){const d=A.state?.referrer;z.trackMonthCloseAuditPage(i.selectedPeriod.month,i.selectedPeriod.year,i.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",i.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[i.fetchState,i.selectedPeriod,i.monthEndCloseChecks?.auditSummary,i.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(xo,{children:C.jsx(so,{monthEndCloseChecksView:i,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${h.month}-${h.year}`,{state:{pathnameStackToGoBack:u,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:g,onBackClick:()=>{l("../../dashboard")},onReload:B,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})})},xo=De.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CzlYoB8q.js";import{a as r}from"./sentry-CNCwYM02.js";import{Y as l,_ as p,$ as d,q as f}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-CzlYoB8q.js";import{a as r}from"./sentry-CNCwYM02.js";import{Y as l,_ as p,$ as d,q as f}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import m from"./NotFoundScreen-CojoL2wq.js";import{j as b,u}from"./core-CGhI3jCZ.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]="9a8f45b6-966c-4537-bc45-9574650b4550",e._sentryDebugIdIdentifier="sentry-dbid-9a8f45b6-966c-4537-bc45-9574650b4550")}catch{}})();const j=()=>{const e=b(),t=u(),a=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=f(t.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(t.pathname);return o!=null?s.jsx(p,{menuItem:d(o),onDemoClick:a,onGoBack:i}):s.jsx(m,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{j as F};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-CzlYoB8q.js";import{l as y,k as x,j as C,u as S,h as ee,q as te,g as E,N as ae,n as ne,o as p}from"./core-CGhI3jCZ.js";import{IM as k,IN as v,IO as T,yU as B,yG as G,IP as D,IQ as oe,IR as se,yK as ie,eP as j,yR as le,yO as re}from"./zeni-epic-state-lenVK-tm.js";import{Z as g,o as r,p as de,d as I,k as M,y as ce,q as me,r as pe,s as K,x as ue,c as he,C as xe,v as ge,h as fe,w as we,B as be,A as ye,m as Se,S as ke,O as ve,E as Ie,G as je}from"./index-
|
|
1
|
+
import{j as t}from"./liveblocks-CzlYoB8q.js";import{l as y,k as x,j as C,u as S,h as ee,q as te,g as E,N as ae,n as ne,o as p}from"./core-CGhI3jCZ.js";import{IM as k,IN as v,IO as T,yU as B,yG as G,IP as D,IQ as oe,IR as se,yK as ie,eP as j,yR as le,yO as re}from"./zeni-epic-state-lenVK-tm.js";import{Z as g,o as r,p as de,d as I,k as M,y as ce,q as me,r as pe,s as K,x as ue,c as he,C as xe,v as ge,h as fe,w as we,B as be,A as ye,m as Se,S as ke,O as ve,E as Ie,G as je}from"./index-D7leYkuC.js";import{n as m}from"./mui-ILn-Gd-L.js";import f from"./NotFoundScreen-CojoL2wq.js";import{a as $}from"./sentry-CNCwYM02.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.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]="74983f87-9ff3-459c-99c3-993f0c4a9571",e._sentryDebugIdIdentifier="sentry-dbid-74983f87-9ff3-459c-99c3-993f0c4a9571")}catch{}})();const $e=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-CzlYoB8q.js";import{a as g}from"./sentry-CNCwYM02.js";import{h as O,u as _,j as w,q as P,g as l,N as D}from"./core-CGhI3jCZ.js";import{z as r,h as M,D as V,e as A,d as N,f as H,n as q,m as J,i as R}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-CzlYoB8q.js";import{a as g}from"./sentry-CNCwYM02.js";import{h as O,u as _,j as w,q as P,g as l,N as D}from"./core-CGhI3jCZ.js";import{z as r,h as M,D as V,e as A,d as N,f as H,n as q,m as J,i as R}from"./index-D7leYkuC.js";import{eO as W,Ix as $,IH as B,Iy as G,eP as K,fi as Q,ID as X,fH as Y,cT as Z,II as ee,IJ as te}from"./zeni-epic-state-lenVK-tm.js";import{n as ne}from"./mui-ILn-Gd-L.js";import{u as se}from"./useDeviceId-D_8GbJBB.js";import{f as ae}from"./analyticsHelper-CwPfLmD8.js";import{t as ie}from"./getLocaleForTenant-D8dvZJzp.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.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]="3bde9e74-25da-4812-a5e6-53b1878e3397",t._sentryDebugIdIdentifier="sentry-dbid-3bde9e74-25da-4812-a5e6-53b1878e3397")}catch{}})();const T=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Te(){const t=O(),a=_(),f=w(),[b]=P(),n=b.get("token"),p=b.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:z}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),k=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>W(e)),y=l(e=>$(e)),E=r.getSignedInUser(),v=M().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&T(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,m)))},[n,p,t,i,m,s?.zeniSessionId]),g.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(G(y.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,y.tenantsInOrder),Y().then(()=>{const e=R();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(H.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,k,s,o,y,v,a.state,t]);const U=g.useCallback(()=>{f("/signin/auth")},[f]),j=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(q,{phoneNumber:x,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:U});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(D,{to:e,state:{...a.state,origin:""}})}if(!T(n,p)||m==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(D,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(J,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|