@zeniai/web-app-ui 5.0.24-dev → 5.0.24-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-CWm4LI2A.js → AddressRoutes-BlwKMaxv.js} +1 -1
- package/dist/assets/{AddressScreen-BRfd-CkJ.js → AddressScreen-DmuzVSpn.js} +1 -1
- package/dist/assets/{AiCfoScreen-CSI2_D3j.js → AiCfoScreen-xOhPFfP0.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CVMR--P9.js → BillPayApprovalRoutes-M1yXHkwT.js} +1 -1
- package/dist/assets/{BillPayRoutes-CiAJiA46.js → BillPayRoutes-DIZnZzN-.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-surI_CG-.js → BusinessVerificationPageScreen-nI2MGxd-.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DfK6AK1Y.js → ChargeCardRoutes-CdBZk3zl.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-D3MdOGSR.js → CompanyPassportScreen-euq0zzkh.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-m1ZrPmfY.js → ConnectionAuthScreen-ZhxPdXaU.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-C_ov5V1M.js → CustomerOnboardingAuthScreen-Cuf2yUew.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-igtoru6q.js → CustomerOnboardingRoutes-DJRocOcG.js} +1 -1
- package/dist/assets/{DashboardRoutes-btp07KOK.js → DashboardRoutes-CFIOs0Nt.js} +1 -1
- package/dist/assets/{DefaultTenantHome-wOBWCdoB.js → DefaultTenantHome-CnzNhAiZ.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-Cq9OTpl5.js → DomesticWireDetailScreen-CacBxbO_.js} +1 -1
- package/dist/assets/{DrawerScreen-BddqtTBk.js → DrawerScreen-DQY8g3HS.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-J5KxaFpN.js → EntityDetailRoutes-CGPCXRhi.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-XSCKWGJC.js → ExpenseAutomationRoutes-CVsvgtLV.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-C7s5EUEI.js → FeaturePreviewScreen-BUE1IhYi.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-Bnt1hH7o.js → MagicLinkRoutes-DBuQgUiO.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CiUBjUKX.js → MagicLinkSignInScreen-Cb8la_Xu.js} +1 -1
- package/dist/assets/{MobileAppDrawer-BTO_dO8H.js → MobileAppDrawer-Bgn6WvPn.js} +1 -1
- package/dist/assets/{NotFoundScreen-CQPWWkLY.js → NotFoundScreen-D1ntYwuX.js} +1 -1
- package/dist/assets/{NotificationRoutes-DfFcHUc_.js → NotificationRoutes-3cq3CSYC.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CY2JRBex.js → PandLWithForecastRoutes-Cg8XHJAF.js} +1 -1
- package/dist/assets/{PeopleRoutes-Ah1x0pI6.js → PeopleRoutes-DwYHZ53s.js} +1 -1
- package/dist/assets/{PerformanceRoutes-D-In2h69.js → PerformanceRoutes-WeyRpahz.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-D6CMF20W.js → QBOConnectionScreen-Cw_9-l3E.js} +1 -1
- package/dist/assets/{ReferralListScreen-D4dSsS9f.js → ReferralListScreen-BUISJYbr.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CQWk5hg2.js → ReimbursementApprovalRoutes-CVL6d68J.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CLK4qljf.js → ReimbursementApprovalRuleDetailScreen-a8uFx7B0.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Dle1xRUS.js → ReimbursementRoutes-CgNlW8Ko.js} +1 -1
- package/dist/assets/{ReportsRoutes-BVE7O3pM.js → ReportsRoutes-ow6X0mHD.js} +1 -1
- package/dist/assets/{RewardsRoutes-BUOQCgBW.js → RewardsRoutes-ByY4Dr-9.js} +1 -1
- package/dist/assets/{ScreenRoutes-CU85YNC5.js → ScreenRoutes-SJ48oAtS.js} +2 -2
- package/dist/assets/{SettingsRoutes-C1UlKVfn.js → SettingsRoutes-MS6J8y8K.js} +1 -1
- package/dist/assets/{SetupPagesScreen-D5f_S2gA.js → SetupPagesScreen-DyDXUs_E.js} +1 -1
- package/dist/assets/{SignInScreen-nIZ9894Z.js → SignInScreen-DjIBZSAO.js} +1 -1
- package/dist/assets/{SignOutScreen-BBR56tjP.js → SignOutScreen-CAS08fDR.js} +1 -1
- package/dist/assets/{TaskListScreen-vtDblzrs.js → TaskListScreen-DillWpPZ.js} +1 -1
- package/dist/assets/{TaskRoutes-6NyFYqIE.js → TaskRoutes-bEECYMwU.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-D3tlJJHj.js → TransactionDetailRoutes-DvqYP600.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DORvf_A0.js → TransactionDetailScreen-CCL-hNKp.js} +1 -1
- package/dist/assets/{TransactionListRoutes-Dm17WsQR.js → TransactionListRoutes-DJi3xIjv.js} +1 -1
- package/dist/assets/{TreasuryRoutes-B_ttsGpb.js → TreasuryRoutes-S2wF3FW7.js} +1 -1
- package/dist/assets/{VendorsRoutes-xehzdyOP.js → VendorsRoutes-Cp3d3WhH.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-BURwrNzz.js → WiseConfirmationScreen-CvjWmLcA.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-D4VHQXPj.js → ZeniAccountRoutes-IG2z5xkD.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-DCQ_lEqk.js → ZeniAccountStatementScreen-D22w5XUI.js} +1 -1
- package/dist/assets/{analyticsHelper-ByMo5A8t.js → analyticsHelper-BLpyhiq6.js} +1 -1
- package/dist/assets/{getLocaleForTenant-BYC6p0GO.js → getLocaleForTenant-DSkWweMK.js} +1 -1
- package/dist/assets/{index-Co04ey3-.js → index-DYZnhdtQ.js} +5 -5
- package/dist/assets/{routePaths-CHVZiiJU.js → routePaths-BInZ9Oyt.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-BW2SwSZE.js → useAskAiCfoHostNavButtonProps-B1RRjyxi.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-cPo0or_6.js → useFetchSuggestedQuestionsWhenReady-Cy4jydJp.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BV4XmA3t.js → useInitialThreadRequest-BrJWEdrN.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-ykEXkuoH.js → withTransactionSidePanel-BuR2K69z.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-CGYcZ7Lh.js";import{A as d}from"./AddressScreen-
|
|
1
|
+
import{j as e}from"./liveblocks-CGYcZ7Lh.js";import{A as d}from"./AddressScreen-DmuzVSpn.js";import i from"./NotFoundScreen-D1ntYwuX.js";import"./sentry-DCGk37l1.js";import{n as s,o as r}from"./core-CNZua1e0.js";import"./zeni-epic-state-eW2EQdSt.js";import"./recharts-Dq7pGiC-.js";import"./index-DYZnhdtQ.js";import"./mui-DtCOffvy.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.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 r}from"./liveblocks-CGYcZ7Lh.js";import{a as b}from"./sentry-DCGk37l1.js";import{j as P,h as _,u as j,l as E,g as M,k as $}from"./core-CNZua1e0.js";import{K as B,h as D,z as K,S as L,x as R,y as z,d as I,f as m,s as F,j as h,p as N}from"./index-
|
|
1
|
+
import{j as r}from"./liveblocks-CGYcZ7Lh.js";import{a as b}from"./sentry-DCGk37l1.js";import{j as P,h as _,u as j,l as E,g as M,k as $}from"./core-CNZua1e0.js";import{K as B,h as D,z as K,S as L,x as R,y as z,d as I,f as m,s as F,j as h,p as N}from"./index-DYZnhdtQ.js";import{IY as C,gI as U,eM as G,IZ as O,b$ as V,I_ as q,k2 as H}from"./zeni-epic-state-eW2EQdSt.js";import{n as Y}from"./mui-DtCOffvy.js";import Z from"./NotFoundScreen-D1ntYwuX.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]="6875d472-4e6e-46e1-aee9-0b7fd1b04b99",e._sentryDebugIdIdentifier="sentry-dbid-6875d472-4e6e-46e1-aee9-0b7fd1b04b99")}catch{}})();const J=Y.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-CGYcZ7Lh.js";import{a as r}from"./sentry-DCGk37l1.js";import{h as oe,j as ne,u as ie,g as G,l as re,k as le}from"./core-CNZua1e0.js";import{H as ce,cF as ue,z as de,K as me,cG as pe,cH as fe,cI as he,cJ as q,y as Se,d as v,J as N,cK as ge,cL as Ce,f as be,a1 as ke,cM as we,M as Ie,n as Pe,p as V,aX as Ee,cN as Te}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-CGYcZ7Lh.js";import{a as r}from"./sentry-DCGk37l1.js";import{h as oe,j as ne,u as ie,g as G,l as re,k as le}from"./core-CNZua1e0.js";import{H as ce,cF as ue,z as de,K as me,cG as pe,cH as fe,cI as he,cJ as q,y as Se,d as v,J as N,cK as ge,cL as Ce,f as be,a1 as ke,cM as we,M as Ie,n as Pe,p as V,aX as Ee,cN as Te}from"./index-DYZnhdtQ.js";import{fD as ye,f2 as H,eM as _e,hm as xe,Pu as ve,eL as Ue,hw as Ae,hs as Qe,ft as Oe,fn as De,fg as Fe,fk as $,fo as Le,fp as Me,fq as Be,fr as Re,fs as je}from"./zeni-epic-state-eW2EQdSt.js";import{D as Ge,n as U,P as Ne,S as Ve}from"./mui-DtCOffvy.js";import{p as $e}from"./pathToGoBack-gmEN-6lU.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.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]="ad5e6ca3-303c-4e7b-be06-92da7e3d5a67",s._sentryDebugIdIdentifier="sentry-dbid-ad5e6ca3-303c-4e7b-be06-92da7e3d5a67")}catch{}})();const W="chat-response-generated",qe=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=Me(n.type),t=n.metadata.chat_session_id??null,{currentChatSession:I,currentQuestionAnswer:g,currentQuestionAnswerSummary:P}=q(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,Be(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(je({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($(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Le(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{p(-1)},onCloseClick:()=>{const e=V(a.state?.pathnameStackToGoBack),o=e.poppedPathname??$e(1);p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack}}),s($(""))},togglePageView:()=>{const e=V(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=G(u=>H(u)),e=de.getSignedInUser(),{session_id:o}=re(),n=me(),c=G(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,Q=!!C?.aiCfoShouldSubmit,[z,E]=r.useState(null),[J,T]=r.useState(!1),O=r.useRef(!1);r.useEffect(()=>{O.current||b==null||b===""||(E(b),T(Q),O.current=!0)},[b,Q]);const K=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,L=r.useRef(!1);r.useEffect(()=>{L.current||F!=="month-end-email"||y==null||t!=null||e==null||(a(xe("controller",e.userId,y,"MONTH_END_EMAIL")),L.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 X=c.masterTOSInfo,w=X?.isMasterTOSAccepted??!1,{visitedSessions:M}=he(t),_=l.fetchState,x=l.uiState.chatSessionsNextPageToken.hasMore||!l.uiState.chatSessionsFirstPageFetched,B=t!=null?l.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",R=t==null||(l.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),j=l.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:Y}=q(j,t),Z=Y.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:M.map(u=>`private-chat-${u}.${W}`),eventCallback:(u,se,ae)=>ae.onEventReceived(u,se)}),[M]);if(r.useEffect(()=>{_!=="In-Progress"&&x&&a(Ae())},[_,x,a]),r.useEffect(()=>{t!=null&&B!=="In-Progress"&&R&&e!=null&&_==="Completed"&&!x&&a(Qe(t,e.userId))},[B,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)}),N(n)&&A.drawerElement,h.jsx(qe,{...ee,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:j,openOnboardingPage:()=>f(!0),userId:e.userId,setIsAiCfoOpen:i,navigate:m,sessionFromUrl:o,location:d,isSubmitting:te,isEmptyChatWithSession:Z,customPageTitle:S,currentTenant:c,emailLinkQuestion:z??void 0,autoSubmitEmailLinkQuestion:J,onEmailLinkQuestionProcessed:K,onMenuClick:N(n)?A.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:P,onUploadPromoClose:g}),h.jsx(Ge,{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(Oe(c.userRoleId)),f(!1)}})})})]})},He=U(Ve)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-CGYcZ7Lh.js";import{a as f}from"./sentry-DCGk37l1.js";import{j as U,u as B,h as T,g as v,N as $,k as j,l as L,n as O,o as h}from"./core-CNZua1e0.js";import{eM as N,Mf as R,LX as b,x4 as w,w_ as F,x2 as x,wT as W,LZ as M,wW as q,x6 as z,x5 as C}from"./zeni-epic-state-eW2EQdSt.js";import{h as P,z as k,x as V,a1 as X,bx as Z,aa as _,by as G}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-CGYcZ7Lh.js";import{a as f}from"./sentry-DCGk37l1.js";import{j as U,u as B,h as T,g as v,N as $,k as j,l as L,n as O,o as h}from"./core-CNZua1e0.js";import{eM as N,Mf as R,LX as b,x4 as w,w_ as F,x2 as x,wT as W,LZ as M,wW as q,x6 as z,x5 as C}from"./zeni-epic-state-eW2EQdSt.js";import{h as P,z as k,x as V,a1 as X,bx as Z,aa as _,by as G}from"./index-DYZnhdtQ.js";import"./mui-DtCOffvy.js";import{i as H}from"./ReimbursementApprovalRuleDetailScreen-a8uFx7B0.js";import J from"./NotFoundScreen-D1ntYwuX.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]="2eb814ca-1935-4eb4-8305-06ca0d428ff5",e._sentryDebugIdIdentifier="sentry-dbid-2eb814ca-1935-4eb4-8305-06ca0d428ff5")}catch{}})();const I="bill-approval-rule-update",K=j(function(e){return{approvalView:R(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(I)&&e(M(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(W(a))},onEditRuleClick:a=>{a!=null?(e(x(a)),t(`./${a}/edit`)):(e(x()),t("./new"))}}})(X(Z)),Q=()=>{const e=U(),o=B(),t=T(),[p,a]=f.useState(!1),[u,s]=f.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>N(i)),r=v(i=>R(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(f.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(w())},[g]),f.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(F(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");f.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(x())),e("./new"))},[u,r,t]);const y={events:c.companyId!=null?[`private-${c.companyId}.${I}`]:[],eventCallback:(i,A,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(K,{currentTenant:c,location:o,navigate:e,...y})},Y=j(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(y=>{const i=y.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),A=y.actors.selectedNonUsers.map(S=>{const E=!!H(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(A);g.push({action:y.stepType.selectedOption,actors:m,operator:m.length>1?y.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(z())},onSaveRuleSuccess:()=>{t("../")}}})(G);function D(){const e=U(),o=T(),t=B(),{approvalRuleId:p}=L(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>R(r)),[n,c]=f.useState(!1);if(f.useEffect(()=>{n||(c(!0),o(q(!0)))}),f.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(Y,{navigate:e,approvalUpdateDataView:s,approvalRuleId:p,approverViewData:d,location:t})}function se(){return l.jsxs(O,{children:[l.jsx(h,{path:"/",element:l.jsx(Q,{})}),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(J,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CGYcZ7Lh.js";import{j as K,h as re,u as Q,l as te,g as k,N as ee,k as X,i as la,n as sa,o as S}from"./core-CNZua1e0.js";import{eM as Z,Lx as Ge,bu as At,Gz as ra,bn as xt,bC as pe,Ly as Bt,wo as Et,xy as Ue,wX as ca,bm as je,Lz as da,LA as ua,b$ as pa,LB as ma,jm as Dt,LC as jt,LD as Tt,y7 as Oe,wD as Be,LE as ba,wc as it,LF as ha,Bj as ga,wg as ya,wm as Pt,LG as Ie,LH as Ne,xz as ze,LI as Sa,LJ as fa,xC as Ze,LK as Ia,xP as ka,LL as Ft,xj as ot,xo as va,LM as wa,LN as ue,LO as Rt,LP as Lt,LQ as Vt,fG as Ca,wI as Me,ct as $t,LR as Aa,gy as xa,LS as Ba,LT as Ea,eS as Ut,eQ as Mt,LU as He,LV as Da,LW as ja,Jg as We,LX as Ta,Jh as ie,Ji as qe,LY as Pa,LZ as Fa,L_ as Ra,xq as lt,xn as La,L$ as Va,M0 as $a,M1 as Ua,x9 as Ma,M2 as _a,M3 as Ga,M4 as Oa,cN as _t,cJ as Gt,jx as Na,bI as za,bp as Ot,bJ as Nt,vu as Za,M5 as Ha,B6 as Wa,Bc as qa,s1 as Ja,xA as Ka,ye as Qa,jK as fe,M6 as Xa,M7 as zt,kc as Ya,jE as Zt,jZ as Ht,jY as st,bB as be,bH as en,M8 as tn,M9 as ke,ig as an,Ma as rt,Mb as nn,ik as on,iG as ln,ys as sn,Mc as rn,k5 as cn,yi as dn,Md as ct,ym as un,yr as pn,yo as mn,yg as bn,Me as Wt,wx as hn,Mf as gn,Mg as yn,fz as Sn,fy as fn,fx as In,jN as kn,k3 as dt,ke as vn,pA as wn,jW as Cn,yk as An,ir as xn,kj as Bn,Mh as En,ii as Dn,pr as jn,Mi as Tn,xf as Pn,bD as Fn,br as Rn,If as Ln,cL as Vn,cK as $n,cs as Un,cy as Mn}from"./zeni-epic-state-eW2EQdSt.js";import{h as me,z as L,S as ve,H as Je,i as oe,c as y,aI as Ee,x as ce,o as E,y as Te,d as j,b4 as _n,p as z,M as Ke,n as D,K as we,b5 as ut,b6 as pt,b7 as Gn,af as On,F as Nn,aC as zn,C as qt,D as Qe,Q as Xe,b8 as Zn,ao as Jt,b9 as Hn,I as Wn,f as Kt,a1 as qn,ba as Jn,bb as Kn,bc as Qn,bd as Xn,be as Yn,bf as ei,bg as ti,bh as ai,bi as ni,v as ii,bj as oi,b0 as li,bk as si,bl as ri,a4 as ci}from"./index-Co04ey3-.js";import{n as V,S as di}from"./mui-DtCOffvy.js";import{A as mt}from"./AddressScreen-BRfd-CkJ.js";import{g as ne,a as Pe,i as Qt,V as Ye,b as et,c as ui,v as pi,d as mi,A as he,D as ge}from"./DomesticWireDetailScreen-Cq9OTpl5.js";import{a as f}from"./sentry-DCGk37l1.js";import{u as tt}from"./useAskAiCfoHostNavButtonProps-BW2SwSZE.js";import{c as at}from"./useFetchSuggestedQuestionsWhenReady-cPo0or_6.js";import{u as Xt}from"./useInitialThreadRequest-BV4XmA3t.js";import De from"./NotFoundScreen-CQPWWkLY.js";import{D as bi}from"./DrawerScreen-BddqtTBk.js";import{M as Yt}from"./MobileAppDrawer-BTO_dO8H.js";import{F as ea}from"./FeaturePreviewScreen-C7s5EUEI.js";import{S as Re}from"./SetupPagesScreen-D5f_S2gA.js";import{B as hi}from"./BillPayApprovalRoutes-CVMR--P9.js";import{FallBackRoute as gi}from"./ScreenRoutes-CU85YNC5.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./analyticsHelper-ByMo5A8t.js";import"./routePaths-CHVZiiJU.js";import"./BusinessVerificationPageScreen-surI_CG-.js";import"./ReimbursementApprovalRuleDetailScreen-CLK4qljf.js";import"./getLocaleForTenant-BYC6p0GO.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]="cc4eda85-a246-404b-a35d-a5b69dadb03a",e._sentryDebugIdIdentifier="sentry-dbid-cc4eda85-a246-404b-a35d-a5b69dadb03a")}catch{}})();const yi=X(function(e,t){const l=Ge(e,t.billId),n=L.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:n?.userId??"",sessionId:n?.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 i=je(n);i||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let d=!1,p=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:m,isMarkAsPaidBtnVisible:b}=da(l.billActivities,ua(t.currentTenant),n);d=m,p=b}const h=pa(t.currentTenant?.userRole??[]),g=l.transactionDetails!=null&&ma(l.transactionDetails,h,n);return{billDetails:l,isAccountingClassesEnabled:Dt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${Ke}/transaction_attachment`,signedInUser:n,showBackButton:o,isAdmin:h,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:j,showMarkAsPaidButtonToCreator:g,isZeniUser:i}},function(e,t){const{billId:l,currentTenant:n,location:c,navigate:r}=t,{tenantEmailDomain:u}=n;return{redirectToBillsScreen:()=>{const o=ne(u),s=D(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(Ie({}))},deleteBill:o=>{j.trackBillPayDeleteBill(l,o),e(Pt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?j.trackBillPayCancelAndDeleteBill(l,o):j.trackBillPayCancelBill(l),e(ya(l,s))},onSaveRealTimeApprovals:o=>{e(ga(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(ha({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(it(l,o.type,"")):e(it(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Be(l,"retry")):e(Be(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const i=Pe(u,o,s),d=D(c.state?.pathnameStackToGoBack,c.pathname);r(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=z(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ne(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ba({billId:t.billId}))},onRefundPaymentClick:()=>{e(Be(t.billId,"refund"))},saveBillDetails:(o,s,i)=>{o&&e(Tt({data:i,billId:l})),e(Oe(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(jt({billId:l}))}}})(_n);function Si(){const e=K(),t=re(),l=Q(),{billId:n}=te(),c=me(),r=L.getSignedInUser(),u=ve(),o=k(w=>Z(w)),s=k(w=>Ge(w,n??"")),i=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Xt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!i}),{isAiCfoOpen:p,setIsAiCfoOpen:h}=Je(),{isAiCfoAccessEnabled:g,onAskAiCfoClick:m}=tt({isAiCfoOpen:p,setIsAiCfoOpen:h,mobileExploreReferrer:"Bill Details"});at({isDataReady:s.fetchState==="Completed"});const b=o?.userRole!=null&&At(o?.userRole),A=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b,[T,I]=f.useState(!1),[v,H]=f.useState(!1),[M,_]=f.useState(!1),{useFeatureGate:F,useDynamicConfig:x}=oe(),{isFeatureEnabled:$}=F(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:U}=F(y.isBillPayCommentingEnabled),{isFeatureEnabled:B}=F(y.isBillPayDetectInsufficientFundsEnabled),{configValue:O}=x(Ee.zeniAssistConfig),W=ra(o),q=xt(o.userRole),J=A&&pe(u?.loggedInUserRoleMap),G=O.user_ids!=null&&r?.userId!=null&&O.user_ids.includes(r?.userId),{isFeatureEnabled:le}=F(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Y}=F(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{$&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&W===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||J||s.allApprovers.find(w=>w.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,J,o.isZeni,W,r]),f.useEffect(()=>{n!=null&&t(Bt(n))},[n]),f.useEffect(()=>{T||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(I(!0),t(Et(n??"",$,G,!1)))},[T,s,n,t]),f.useEffect(()=>{v||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(H(!0),t(Ue(!1,$,G,Y,n)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(ca()))},[v,s,n,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(ee,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(ce,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${E.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(Te,{analytics:j,onLoad:w=>(se=>{n!=null&&se.trackBillPayBillDetails(n,s.isRecurring)})(w)}),a.jsx(yi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:$,location:l,navigate:e,isBillPayCommentingEnabled:U,isRealTimeApprovalEnabled:M,currentTenant:o,billId:n??"",isInternationalPaymentShaVsOurEnabled:le,hasZeniAssistAccess:G,isDetectInsufficientFundsEnabled:B,isAiCfoAccessEnabled:g,onAskAiCfoClick:m})]})}const ye=Qe.getLocalizedStrings().spendManagement.billPay.billDetails,fi={containerWidth:new qt(100,58)},bt=X(function(e,t){const l=L.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Jt.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:j,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:E.sp10,paddingRight:E.sp3,paddingBottom:"15px",paddingLeft:E.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=L.getSignedInUser();return{onInvoiceUpload:n=>{n!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(n),t.setShowConfirmationPopup(!0)):e(Ze(n,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:n=>{e(ka({fetchState:{fetchState:n,error:void 0},billId:t.billId}))},onSkipAutofill:n=>{j?.trackBillPaySkipAutofill(),e(ze(n))},onDeleteClick:()=>{e(Ia({billId:t.billId})),j?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(zn);function C({appContent:e}){const t=re(),l=K(),{billId:n}=te(),c=Q(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),i=L.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=oe(),{isFeatureEnabled:h}=d(y.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:g}=d(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:m}=d(y.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(y.billPaySetupShowInternationalPaymentByWise),{configValue:A}=p(Ee.zeniAssistConfig),T=A.user_ids!=null&&i?.userId!=null&&A.user_ids.includes(i?.userId),I=k(w=>Z(w)),[v,H]=f.useState(!1),[M,_]=f.useState(!1),[F,x]=f.useState(!1),[$,U]=f.useState(),B=k(w=>Ne(w,h,m,n));let O=B.fetchState,W=B.file,q=B.showAutofill;const J=k(w=>Ge(w,n??""));u===!1&&(O=J.fetchState,W=J.transactionDetails?.attachments?.[0],q=!1);const G=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;f.useEffect(()=>{n==null&&t(ze(!0))},[n,t]),f.useEffect(()=>{O==="Not-Started"&&(u&&M?_(!1):!u&&v&&H(!1))},[n]),f.useEffect(()=>{v||n==null||u||(H(!0),t(Et(n,g,T,!1)),M||(_(!0),t(Ue(!1,g,T,b,n)))),u&&!M&&(_(!0),t(Ue(!1,g,T,b,n)))},[v,M,u,n,t]);const le={onOkClick:()=>{if(x(!1),!$)return;const w=W!=null?"replace":"upload";j?.trackInvoiceActionClick(G??"",w,i?.userEmail??"","yes"),t(fa({replaceBillData:!0,billId:n})),t(Ze($,h,n))},onCancelClick:()=>{if(x(!1),!$)return;const w=W!=null?"replace":"upload";j?.trackInvoiceActionClick(G??"",w,i?.userEmail??"","no"),t(Sa({file:$,billId:n}))}},Y=f.useCallback(()=>{const w=z(c.state?.pathnameStackToGoBack),se=w.poppedPathname??ne(I.tenantEmailDomain);t(Ie({billId:n})),l(se,{state:{pathnameStackToGoBack:w.newStack}})},[c.state,I.tenantEmailDomain,n,t,l]);if(i==null)throw Error("Can't access address page without signing in...");if(O==="Error"||J.fetchState==="Error")return a.jsx(De,{});if(O!="Completed")return n==null&&o!=="small"?a.jsx(ut,{fallback:Y,children:a.jsxs(Le,{windowSize:o,children:[a.jsx(gt,{}),a.jsx(Ve,{}),a.jsx(bt,{backgroundColor:s.colors.grey4,billId:n,file:W,showAutofill:!0,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:h,attachmentTitle:void 0,setShowConfirmationPopup:x,setPayload:U,showActionButtons:!1,isInitialEdit:!!B.isInitialEdit,billStage:G}),a.jsx($e,{windowSize:o,children:a.jsx(pt,{isNewBill:!0})})]})}):a.jsxs(Le,{windowSize:o,children:[o==="small"||q?null:a.jsx(ht,{children:a.jsx(ta,{onClick:Y})}),o!=="small"?a.jsx(Ve,{}):null,a.jsx(Gn,{}),a.jsx($e,{windowSize:o,children:a.jsx(pt,{isNewBill:n==null})})]});{const w=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;return a.jsx(ut,{fallback:Y,children:a.jsxs(Le,{windowSize:o,children:[q&&o!=="small"?a.jsx(gt,{}):null,F?a.jsx(On,{titleComponent:a.jsx(xi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(Bi,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:le,isEditPopup:!0}):null,o==="small"||q?null:a.jsx(ht,{children:a.jsx(Ii,{})}),o!=="small"?a.jsx(Ve,{}):null,a.jsx(bt,{backgroundColor:s.colors.grey4,billId:n,file:W,showAutofill:q,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:h,attachmentTitle:ki(u,J,B),setShowConfirmationPopup:x,setPayload:U,showActionButtons:vi(u,B),isInitialEdit:!!B.isInitialEdit,billStage:w}),a.jsx($e,{windowSize:o,children:e})]})})}}function Ii(){const{triggerBack:e}=Zn();return a.jsx(ta,{onClick:e})}function ki(e,t,l){let n,c;return e?(n=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(n=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(wi,{children:[a.jsx(Ci,{children:`${ye.recurringBill.recurringCycle}
|
|
1
|
+
import{j as a}from"./liveblocks-CGYcZ7Lh.js";import{j as K,h as re,u as Q,l as te,g as k,N as ee,k as X,i as la,n as sa,o as S}from"./core-CNZua1e0.js";import{eM as Z,Lx as Ge,bu as At,Gz as ra,bn as xt,bC as pe,Ly as Bt,wo as Et,xy as Ue,wX as ca,bm as je,Lz as da,LA as ua,b$ as pa,LB as ma,jm as Dt,LC as jt,LD as Tt,y7 as Oe,wD as Be,LE as ba,wc as it,LF as ha,Bj as ga,wg as ya,wm as Pt,LG as Ie,LH as Ne,xz as ze,LI as Sa,LJ as fa,xC as Ze,LK as Ia,xP as ka,LL as Ft,xj as ot,xo as va,LM as wa,LN as ue,LO as Rt,LP as Lt,LQ as Vt,fG as Ca,wI as Me,ct as $t,LR as Aa,gy as xa,LS as Ba,LT as Ea,eS as Ut,eQ as Mt,LU as He,LV as Da,LW as ja,Jg as We,LX as Ta,Jh as ie,Ji as qe,LY as Pa,LZ as Fa,L_ as Ra,xq as lt,xn as La,L$ as Va,M0 as $a,M1 as Ua,x9 as Ma,M2 as _a,M3 as Ga,M4 as Oa,cN as _t,cJ as Gt,jx as Na,bI as za,bp as Ot,bJ as Nt,vu as Za,M5 as Ha,B6 as Wa,Bc as qa,s1 as Ja,xA as Ka,ye as Qa,jK as fe,M6 as Xa,M7 as zt,kc as Ya,jE as Zt,jZ as Ht,jY as st,bB as be,bH as en,M8 as tn,M9 as ke,ig as an,Ma as rt,Mb as nn,ik as on,iG as ln,ys as sn,Mc as rn,k5 as cn,yi as dn,Md as ct,ym as un,yr as pn,yo as mn,yg as bn,Me as Wt,wx as hn,Mf as gn,Mg as yn,fz as Sn,fy as fn,fx as In,jN as kn,k3 as dt,ke as vn,pA as wn,jW as Cn,yk as An,ir as xn,kj as Bn,Mh as En,ii as Dn,pr as jn,Mi as Tn,xf as Pn,bD as Fn,br as Rn,If as Ln,cL as Vn,cK as $n,cs as Un,cy as Mn}from"./zeni-epic-state-eW2EQdSt.js";import{h as me,z as L,S as ve,H as Je,i as oe,c as y,aI as Ee,x as ce,o as E,y as Te,d as j,b4 as _n,p as z,M as Ke,n as D,K as we,b5 as ut,b6 as pt,b7 as Gn,af as On,F as Nn,aC as zn,C as qt,D as Qe,Q as Xe,b8 as Zn,ao as Jt,b9 as Hn,I as Wn,f as Kt,a1 as qn,ba as Jn,bb as Kn,bc as Qn,bd as Xn,be as Yn,bf as ei,bg as ti,bh as ai,bi as ni,v as ii,bj as oi,b0 as li,bk as si,bl as ri,a4 as ci}from"./index-DYZnhdtQ.js";import{n as V,S as di}from"./mui-DtCOffvy.js";import{A as mt}from"./AddressScreen-DmuzVSpn.js";import{g as ne,a as Pe,i as Qt,V as Ye,b as et,c as ui,v as pi,d as mi,A as he,D as ge}from"./DomesticWireDetailScreen-CacBxbO_.js";import{a as f}from"./sentry-DCGk37l1.js";import{u as tt}from"./useAskAiCfoHostNavButtonProps-B1RRjyxi.js";import{c as at}from"./useFetchSuggestedQuestionsWhenReady-Cy4jydJp.js";import{u as Xt}from"./useInitialThreadRequest-BrJWEdrN.js";import De from"./NotFoundScreen-D1ntYwuX.js";import{D as bi}from"./DrawerScreen-DQY8g3HS.js";import{M as Yt}from"./MobileAppDrawer-Bgn6WvPn.js";import{F as ea}from"./FeaturePreviewScreen-BUE1IhYi.js";import{S as Re}from"./SetupPagesScreen-DyDXUs_E.js";import{B as hi}from"./BillPayApprovalRoutes-M1yXHkwT.js";import{FallBackRoute as gi}from"./ScreenRoutes-SJ48oAtS.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./analyticsHelper-BLpyhiq6.js";import"./routePaths-BInZ9Oyt.js";import"./BusinessVerificationPageScreen-nI2MGxd-.js";import"./ReimbursementApprovalRuleDetailScreen-a8uFx7B0.js";import"./getLocaleForTenant-DSkWweMK.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]="cc4eda85-a246-404b-a35d-a5b69dadb03a",e._sentryDebugIdIdentifier="sentry-dbid-cc4eda85-a246-404b-a35d-a5b69dadb03a")}catch{}})();const yi=X(function(e,t){const l=Ge(e,t.billId),n=L.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:n?.userId??"",sessionId:n?.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 i=je(n);i||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let d=!1,p=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:m,isMarkAsPaidBtnVisible:b}=da(l.billActivities,ua(t.currentTenant),n);d=m,p=b}const h=pa(t.currentTenant?.userRole??[]),g=l.transactionDetails!=null&&ma(l.transactionDetails,h,n);return{billDetails:l,isAccountingClassesEnabled:Dt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${Ke}/transaction_attachment`,signedInUser:n,showBackButton:o,isAdmin:h,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:j,showMarkAsPaidButtonToCreator:g,isZeniUser:i}},function(e,t){const{billId:l,currentTenant:n,location:c,navigate:r}=t,{tenantEmailDomain:u}=n;return{redirectToBillsScreen:()=>{const o=ne(u),s=D(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(Ie({}))},deleteBill:o=>{j.trackBillPayDeleteBill(l,o),e(Pt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?j.trackBillPayCancelAndDeleteBill(l,o):j.trackBillPayCancelBill(l),e(ya(l,s))},onSaveRealTimeApprovals:o=>{e(ga(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(ha({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(it(l,o.type,"")):e(it(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Be(l,"retry")):e(Be(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const i=Pe(u,o,s),d=D(c.state?.pathnameStackToGoBack,c.pathname);r(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=z(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ne(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ba({billId:t.billId}))},onRefundPaymentClick:()=>{e(Be(t.billId,"refund"))},saveBillDetails:(o,s,i)=>{o&&e(Tt({data:i,billId:l})),e(Oe(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(jt({billId:l}))}}})(_n);function Si(){const e=K(),t=re(),l=Q(),{billId:n}=te(),c=me(),r=L.getSignedInUser(),u=ve(),o=k(w=>Z(w)),s=k(w=>Ge(w,n??"")),i=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Xt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!i}),{isAiCfoOpen:p,setIsAiCfoOpen:h}=Je(),{isAiCfoAccessEnabled:g,onAskAiCfoClick:m}=tt({isAiCfoOpen:p,setIsAiCfoOpen:h,mobileExploreReferrer:"Bill Details"});at({isDataReady:s.fetchState==="Completed"});const b=o?.userRole!=null&&At(o?.userRole),A=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b,[T,I]=f.useState(!1),[v,H]=f.useState(!1),[M,_]=f.useState(!1),{useFeatureGate:F,useDynamicConfig:x}=oe(),{isFeatureEnabled:$}=F(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:U}=F(y.isBillPayCommentingEnabled),{isFeatureEnabled:B}=F(y.isBillPayDetectInsufficientFundsEnabled),{configValue:O}=x(Ee.zeniAssistConfig),W=ra(o),q=xt(o.userRole),J=A&&pe(u?.loggedInUserRoleMap),G=O.user_ids!=null&&r?.userId!=null&&O.user_ids.includes(r?.userId),{isFeatureEnabled:le}=F(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Y}=F(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{$&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&W===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||J||s.allApprovers.find(w=>w.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,J,o.isZeni,W,r]),f.useEffect(()=>{n!=null&&t(Bt(n))},[n]),f.useEffect(()=>{T||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(I(!0),t(Et(n??"",$,G,!1)))},[T,s,n,t]),f.useEffect(()=>{v||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(H(!0),t(Ue(!1,$,G,Y,n)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(ca()))},[v,s,n,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(ee,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(ce,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${E.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(Te,{analytics:j,onLoad:w=>(se=>{n!=null&&se.trackBillPayBillDetails(n,s.isRecurring)})(w)}),a.jsx(yi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:$,location:l,navigate:e,isBillPayCommentingEnabled:U,isRealTimeApprovalEnabled:M,currentTenant:o,billId:n??"",isInternationalPaymentShaVsOurEnabled:le,hasZeniAssistAccess:G,isDetectInsufficientFundsEnabled:B,isAiCfoAccessEnabled:g,onAskAiCfoClick:m})]})}const ye=Qe.getLocalizedStrings().spendManagement.billPay.billDetails,fi={containerWidth:new qt(100,58)},bt=X(function(e,t){const l=L.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Jt.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:j,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:E.sp10,paddingRight:E.sp3,paddingBottom:"15px",paddingLeft:E.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=L.getSignedInUser();return{onInvoiceUpload:n=>{n!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(n),t.setShowConfirmationPopup(!0)):e(Ze(n,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:n=>{e(ka({fetchState:{fetchState:n,error:void 0},billId:t.billId}))},onSkipAutofill:n=>{j?.trackBillPaySkipAutofill(),e(ze(n))},onDeleteClick:()=>{e(Ia({billId:t.billId})),j?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(zn);function C({appContent:e}){const t=re(),l=K(),{billId:n}=te(),c=Q(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),i=L.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=oe(),{isFeatureEnabled:h}=d(y.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:g}=d(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:m}=d(y.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(y.billPaySetupShowInternationalPaymentByWise),{configValue:A}=p(Ee.zeniAssistConfig),T=A.user_ids!=null&&i?.userId!=null&&A.user_ids.includes(i?.userId),I=k(w=>Z(w)),[v,H]=f.useState(!1),[M,_]=f.useState(!1),[F,x]=f.useState(!1),[$,U]=f.useState(),B=k(w=>Ne(w,h,m,n));let O=B.fetchState,W=B.file,q=B.showAutofill;const J=k(w=>Ge(w,n??""));u===!1&&(O=J.fetchState,W=J.transactionDetails?.attachments?.[0],q=!1);const G=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;f.useEffect(()=>{n==null&&t(ze(!0))},[n,t]),f.useEffect(()=>{O==="Not-Started"&&(u&&M?_(!1):!u&&v&&H(!1))},[n]),f.useEffect(()=>{v||n==null||u||(H(!0),t(Et(n,g,T,!1)),M||(_(!0),t(Ue(!1,g,T,b,n)))),u&&!M&&(_(!0),t(Ue(!1,g,T,b,n)))},[v,M,u,n,t]);const le={onOkClick:()=>{if(x(!1),!$)return;const w=W!=null?"replace":"upload";j?.trackInvoiceActionClick(G??"",w,i?.userEmail??"","yes"),t(fa({replaceBillData:!0,billId:n})),t(Ze($,h,n))},onCancelClick:()=>{if(x(!1),!$)return;const w=W!=null?"replace":"upload";j?.trackInvoiceActionClick(G??"",w,i?.userEmail??"","no"),t(Sa({file:$,billId:n}))}},Y=f.useCallback(()=>{const w=z(c.state?.pathnameStackToGoBack),se=w.poppedPathname??ne(I.tenantEmailDomain);t(Ie({billId:n})),l(se,{state:{pathnameStackToGoBack:w.newStack}})},[c.state,I.tenantEmailDomain,n,t,l]);if(i==null)throw Error("Can't access address page without signing in...");if(O==="Error"||J.fetchState==="Error")return a.jsx(De,{});if(O!="Completed")return n==null&&o!=="small"?a.jsx(ut,{fallback:Y,children:a.jsxs(Le,{windowSize:o,children:[a.jsx(gt,{}),a.jsx(Ve,{}),a.jsx(bt,{backgroundColor:s.colors.grey4,billId:n,file:W,showAutofill:!0,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:h,attachmentTitle:void 0,setShowConfirmationPopup:x,setPayload:U,showActionButtons:!1,isInitialEdit:!!B.isInitialEdit,billStage:G}),a.jsx($e,{windowSize:o,children:a.jsx(pt,{isNewBill:!0})})]})}):a.jsxs(Le,{windowSize:o,children:[o==="small"||q?null:a.jsx(ht,{children:a.jsx(ta,{onClick:Y})}),o!=="small"?a.jsx(Ve,{}):null,a.jsx(Gn,{}),a.jsx($e,{windowSize:o,children:a.jsx(pt,{isNewBill:n==null})})]});{const w=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;return a.jsx(ut,{fallback:Y,children:a.jsxs(Le,{windowSize:o,children:[q&&o!=="small"?a.jsx(gt,{}):null,F?a.jsx(On,{titleComponent:a.jsx(xi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(Bi,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:le,isEditPopup:!0}):null,o==="small"||q?null:a.jsx(ht,{children:a.jsx(Ii,{})}),o!=="small"?a.jsx(Ve,{}):null,a.jsx(bt,{backgroundColor:s.colors.grey4,billId:n,file:W,showAutofill:q,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:h,attachmentTitle:ki(u,J,B),setShowConfirmationPopup:x,setPayload:U,showActionButtons:vi(u,B),isInitialEdit:!!B.isInitialEdit,billStage:w}),a.jsx($e,{windowSize:o,children:e})]})})}}function Ii(){const{triggerBack:e}=Zn();return a.jsx(ta,{onClick:e})}function ki(e,t,l){let n,c;return e?(n=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(n=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(wi,{children:[a.jsx(Ci,{children:`${ye.recurringBill.recurringCycle}
|
|
2
2
|
${n}/${c}`}),a.jsx(Ai,{})]}):void 0}function vi(e,t){const l=t.billActivities?.[0],n=t.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(t.billStage==="draft"||n)}const ht=V.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-CGYcZ7Lh.js";import{a as V}from"./sentry-DCGk37l1.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-CNZua1e0.js";import{S as ce,i as ue,aI as de,z as M,y as pe,d as B,aa as x,f as z,bt as le,ao as me,n as E,ap as P}from"./index-
|
|
1
|
+
import{j as k}from"./liveblocks-CGYcZ7Lh.js";import{a as V}from"./sentry-DCGk37l1.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-CNZua1e0.js";import{S as ce,i as ue,aI as de,z as M,y as pe,d as B,aa as x,f as z,bt as le,ao as me,n as E,ap as P}from"./index-DYZnhdtQ.js";import{M3 as fe,eM as G,rs as ye,GD as Se,x9 as ge,zS as Ie,Cp as he,D2 as be,DX as De,Mq as Oe,Mr as Te,Ms as ke,Mt as Ce,Mu as Ve,IZ as we,Ls as Ae,J9 as Ne,k2 as _e,fz as Fe,fy as ve,fx as xe,pA as ze,pr as Me,po as Be,jW as Ee,rB as Pe,rz as R,bB as L,rN as U,cr as Re}from"./zeni-epic-state-eW2EQdSt.js";import{n as Le}from"./mui-DtCOffvy.js";import{c as j}from"./routePaths-BInZ9Oyt.js";import{M as Ue}from"./MobileAppDrawer-Bgn6WvPn.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]="ee4899b8-21d3-4512-a9c1-13823f0615bf",e._sentryDebugIdIdentifier="sentry-dbid-ee4899b8-21d3-4512-a9c1-13823f0615bf")}catch{}})();const je=Le.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CGYcZ7Lh.js";import{j as ue,l as la,h as me,g as S,u as ye,k as ge,N as ya,q as mt,n as Xt,o as te}from"./core-CNZua1e0.js";import{eM as ie,br as Le,NW as _a,eQ as Se,eR as Ie,eS as Ae,fK as Me,co as ze,NX as $e,NY as $a,sH as Sa,ju as Ia,NZ as Aa,gy as ca,z9 as aa,zb as Ga,zc as Za,jk as Ct,N_ as Ge,yZ as pt,N$ as Qt,O0 as Jt,z0 as wa,O1 as en,Mn as Pa,qT as ht,z6 as Ya,gJ as an,O2 as ft,O3 as Ze,bp as tn,O4 as nn,fz as Ta,fy as Fa,zG as rn,fx as va,M3 as sn,O5 as gt,cN as bt,cJ as on,Mm as ua,Ag as cn,O6 as rt,zS as xa,O7 as yt,Ah as dn,MN as ln,Ai as un,Bc as mn,s1 as Cn,B6 as pn,zr as St,zk as hn,O8 as fn,fM as gn,zA as It,zE as At,fL as bn,O9 as yn,A2 as Et,Oa as Sn,Ob as In,Oc as An,zC as kt,zn as Dt,z3 as _t,zw as wt,zu as Pt,zy as En,za as st,Od as Tt,Oe as Oa,zP as Ea,J2 as Ft,cK as Ka,Of as kn,Og as Dn,Oh as _n,Oi as wn,zM as Ha,A9 as Pn,A5 as Tn,zI as Fn,A7 as vn,zZ as xn,z$ as On,Oj as vt,Af as xt,Gz as Ln,Ok as Bn,Ol as Rn,Om as Un,On as Ot,Oo as jn,AC as Nn,zR as Lt,zL as da,zQ as Vn,Op as Hn,Oq as Mn,yW as zn,Or as Bt,Os as Rt,Ot as $n,yY as Gn,yX as ot,Ou as Zn,Ov as Yn,Ow as Kn,I_ as Wn,Ox as Wa,Oy as qn,vx as Ut,k2 as Xn,gz as Qn,AH as Jn,Oz as jt,OA as er,AI as ar,OB as tr,db as nr,sB as rr,Ax as sr,Ar as Oe,bu as or,bC as ir,ct as cr,bD as dr,If as lr}from"./zeni-epic-state-eW2EQdSt.js";import{z as J,S as Re,i as oe,c as Y,x as Ye,bX as La,c6 as ur,p as ve,c7 as mr,c8 as Cr,K as ma,aI as Fe,n as be,be as qa,c9 as pr,C as Ca,j as Ba,h as Xa,d as X,D as Qa,ca as hr,H as Nt,al as Ja,bq as Je,cb as Ma,cc as fr,y as et,a1 as gr,cd as br,ao as Vt,M as za,I as Ht,f as Mt,ce as yr,cf as Sr,cg as Ir,ch as Ar,ci as Er,o as ka,cj as kr,ck as Dr,cl as ja,v as _r,cm as wr,cn as Pr,co as Tr,cp as Fr,a4 as vr}from"./index-Co04ey3-.js";import{n as _e,D as zt,S as xr}from"./mui-DtCOffvy.js";import{a as c}from"./sentry-DCGk37l1.js";import{g as fe,a as pa,b as $t,c as Ee,d as ke,e as Be,f as Ue,A as Or,h as at,P as Lr,i as tt,s as ea,j as Gt,k as He,l as Zt,m as Br,n as Yt,p as Rr,S as it}from"./SetupPagesScreen-D5f_S2gA.js";import Ra from"./NotFoundScreen-CQPWWkLY.js";import{M as ha}from"./MobileAppDrawer-BTO_dO8H.js";import{u as Kt}from"./useAskAiCfoHostNavButtonProps-BW2SwSZE.js";import{c as Wt}from"./useFetchSuggestedQuestionsWhenReady-cPo0or_6.js";import{v as ct}from"./utils-DWAOcXZK.js";import{t as Ur}from"./AddressScreen-BRfd-CkJ.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./analyticsHelper-ByMo5A8t.js";import"./routePaths-CHVZiiJU.js";import"./BusinessVerificationPageScreen-surI_CG-.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]="37d1b417-9bfa-439d-a730-1e2b35336af9",e._sentryDebugIdIdentifier="sentry-dbid-37d1b417-9bfa-439d-a730-1e2b35336af9")}catch{}})();function jr(){const e=ue(),{cardId:t}=la(),a=me(),r=J.getSignedInUser(),n=S(G=>ie(G)),u=Re(),m=Le(u?.loggedInUserRoleMap),{useFeatureGate:C}=oe();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[I,o]=c.useState(!1),i=S(G=>_a(G).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const D=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=C(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:L}=C(Y.isDebitCardFeatureEnabled),v=Se(n),k=Ie(n),h=Ae(L,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ee({isDebitCardFeatureEnabled:L,isBankingOnlyTenant:h}),l=ke({isCardsOnlyTenant:v,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),w=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,B=S(G=>Me(G,n.companyId)),j=ze(B.controllers),{creditAccount:T,creditAccountRepayment:P}=S(G=>$e(G)),N=S(G=>G.classListState.fetchState),p=!D&&l&&f,d=S(G=>$a(G,t,p,l)),[_,F]=c.useState(!1),U=d.chargeCard,M=U?.cardCreatedByUser?.userId,W=S(G=>M!=null?Sa(G.userRoleState,M):void 0),y=W?.accountingClassIDs[0],x=S(G=>y!=null?Ia(G.classState,{classId:y,reportId:"class_list"}):void 0),$=U?.cardHolderUser?.userId,R=S(G=>$!=null?Sa(G.userRoleState,$):void 0),Z=R?.accountingClassIDs[0],E=S(G=>Z!=null?Ia(G.classState,{classId:Z,reportId:"class_list"}):void 0),q=U?.type.code==="business_physical_credit_card"||U?.type.code==="business_physical_debit_card",K=U?.type.code==="business_physical_debit_card";c.useEffect(()=>{i&&I===!1&&q&&(o(!0),setTimeout(()=>{a(Aa()),K&&a(ca({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[i,I,q,K]),c.useEffect(()=>{_||d.fetchState==="Completed"||d.fetchState==="In-Progress"||t==null||(F(!0),a(aa(t,p,!1)))},[_,d,t,a]),c.useEffect(()=>{if(d.fetchState==="Completed"&&(q===!1||q&&U?.status?.code!=="active"||U?.cardHolderUserId!==r.userId||i===!1&&I===!1||U?.type.code==="business_physical_debit_card"||U?.type.code==="business_virtual_debit_card")){const G=fe(n.tenantEmailDomain,t,r,U,i);e(G)}},[d.fetchState,i,q]),c.useEffect(()=>{T.fetchState!=="Completed"&&T.fetchState!=="In-Progress"&&l&&f&&m&&a(Ga()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&l&&f&&m&&a(Za()),N!=="Completed"&&N!=="In-Progress"&&a(Ct())},[T.fetchState,P.fetchState,a,l,f,m,N]);const z=()=>{if(r!=null&&t!=null){a(Aa());const G=fe(n.tenantEmailDomain,t,r);e(G)}},Ce=U?.type.code==="business_physical_debit_card"||U?.type.code==="business_virtual_debit_card",ae=Be(l,g,w,f),O=pa(l,f,m,T,P),pe=$t(Ce,d);return d.fetchState!=="Completed"?s.jsx(Ye,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(La,{showConfetti:i}),s.jsx(ur,{onGotItClick:z,isDebitCard:U?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:l,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:w,isChargeCardSetupEnabled:f,productInformation:ae,creditAccountInformation:O,debitAccountInformation:pe,chargeCardDetailView:d,creditAccount:T,classListFetchState:N,creditAccountRepayment:P,cardIssuedByRoles:W?.userRoles,cardIssuedByDepartmentName:x?.className,cardHolderRoles:R?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=ge(function(e){const t=Ge(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(Qt({uiState:{sortKey:t,sortOrder:a}}))}}})(Cr);function Vr(){const e=ue(),t=me(),a=ye(),r=J.getSignedInUser(),n=S(o=>ie(o)),[u,m]=c.useState(!1),C=S(o=>Ge(o)),I=c.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),i=o.poppedPathname??Hr(n.tenantEmailDomain);e(i,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(c.useEffect(()=>{u||C.fetchState==="Completed"||C.fetchState==="In-Progress"||(m(!0),t(pt()))},[u,C,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return C.fetchState==="In-Progress"?s.jsx(mr,{onBackClick:I}):C.cashbackSummary.cashbackEarned.amount===0&&C.fetchState==="Completed"?s.jsx(Ra,{}):s.jsx(Nr,{onBackClick:I})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new Ca(100,58)},zr=({appContent:e})=>{const t=ma(),a=me(),r=ue(),{cardId:n}=la(),u=ye(),{useDynamicConfig:m}=oe(),[C,I]=c.useState(!1),[o,i]=c.useState(!1),[D,A]=c.useState(!1),[f,L]=c.useState(!1),v=J.getSignedInUser();if(v==null)throw Error("Can't access onboarding card page without signing in...");const k=S(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=m(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=S(E=>Jt(E,n)),l=g.chargeCard,w=S(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:B}=oe(),{isFeatureEnabled:j}=B(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=B(Y.isDebitCardFeatureEnabled),P=Ae(T,k),N=Ee({isDebitCardFeatureEnabled:T,isBankingOnlyTenant:P}),p=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,d=k.userRole.includes("charge_card_user"),_=Se(k),F=Ie(k),U=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,M=ke({isCardsOnlyTenant:_,isChargeCardFeatureEnabled:j,isBookKeepingTenant:F,isDebitCardProductVisible:N,chargeCardsCreditAccountLimit:U}),W=!d&&M&&p;c.useEffect(()=>{C===!1&&w!=="In-Progress"&&w!=="Completed"&&(a(wa()),I(!0)),o===!1&&g.fetchState==="Not-Started"&&(i(!0),a(aa(n,W,M)))},[o,g.fetchState,C,w]);const y=l?.type.code==="business_physical_credit_card"||l?.type.code==="business_physical_debit_card";c.useEffect(()=>{if(g.fetchState==="Completed"){if(D===!1&&(y===!1||y&&l?.status?.code!=="inactive"||l?.cardHolderUserId!==v.userId)){const E=fe(k.tenantEmailDomain,n,v,l,!0),q=be(u.state?.pathnameStackToGoBack,u.pathname);r(E,{state:{pathnameStackToGoBack:q}})}else if(D&&g.isRefreshingViewInBackground===!1&&l?.status?.code==="active"){a(en({chargeCardId:n}));const E=fe(k.tenantEmailDomain,n,v,l,!0),q=be(u.state?.pathnameStackToGoBack,u.pathname);a(Pa()),r(E,{state:{pathnameStackToGoBack:q}})}}},[g.fetchState,l?.type.code,D,g.isRefreshingViewInBackground]);const x=J.getZeniOtpTokenForCardHolder(n),$=S(E=>ht(E.userState,v.userId)),R=()=>{l?.status?.code!=="active"&&a(Ya(n,!0))};c.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&l?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&D===!1&&(setTimeout(R,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,l?.cardActivationAttemptHistory]);const Z=E=>{L(E)};if(w!=="Completed"||l==null)return s.jsx(Ye,{fetchState:"In-Progress"});if(l.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if($?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Zr,{children:[s.jsx(ha,{isAppContentDrawerOpen:f,handleDrawerToggle:Z}),s.jsx($r,{cardId:n,card:l,shippingAddressId:l.shippingAddressId,phone:$.phone,signedInUser:v,isSandboxEnv:qa(),chargeCardDetailState:g,signedInUserToken:x,navigate:r,currentTenant:k,location:u,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:()=>{Z(!0)}}),e!=null?s.jsx(Gr,{windowSize:t,children:e}):null]})},$r=ge(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const u=an(e.addressState,a);if(u==null)throw Error("Can't access shippingAddress.");const m=ft(e,n),C=t.updateStatus,I=Ze(e,!1,!1,!1);let o=!1;I.fetchState==="Completed"&&I.cards.length<=1&&(o=!0);const i=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(tn())||i,showMenuIcon:o,shippingAddress:u,vgsVaultId:Ba.cardVaultId,twoFAView:m,activationWaitStatus:C,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:u,chargeCardDetailState:m}=t,C=m.chargeCard?.cardProviderID,{tenantEmailDomain:I}=u;return{onGetOtp:o=>{C!=null&&e(va(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(rn(r,o))},onResendOtp:o=>{C!=null&&e(Fa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,i)=>{C!=null&&e(Ta(o,i,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&J.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(nn({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),i=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ue(I):o.poppedPathname;a(i,{state:{pathnameStackToGoBack:o.newStack}})}}})(pr),Gr=_e.div`
|
|
1
|
+
import{j as s}from"./liveblocks-CGYcZ7Lh.js";import{j as ue,l as la,h as me,g as S,u as ye,k as ge,N as ya,q as mt,n as Xt,o as te}from"./core-CNZua1e0.js";import{eM as ie,br as Le,NW as _a,eQ as Se,eR as Ie,eS as Ae,fK as Me,co as ze,NX as $e,NY as $a,sH as Sa,ju as Ia,NZ as Aa,gy as ca,z9 as aa,zb as Ga,zc as Za,jk as Ct,N_ as Ge,yZ as pt,N$ as Qt,O0 as Jt,z0 as wa,O1 as en,Mn as Pa,qT as ht,z6 as Ya,gJ as an,O2 as ft,O3 as Ze,bp as tn,O4 as nn,fz as Ta,fy as Fa,zG as rn,fx as va,M3 as sn,O5 as gt,cN as bt,cJ as on,Mm as ua,Ag as cn,O6 as rt,zS as xa,O7 as yt,Ah as dn,MN as ln,Ai as un,Bc as mn,s1 as Cn,B6 as pn,zr as St,zk as hn,O8 as fn,fM as gn,zA as It,zE as At,fL as bn,O9 as yn,A2 as Et,Oa as Sn,Ob as In,Oc as An,zC as kt,zn as Dt,z3 as _t,zw as wt,zu as Pt,zy as En,za as st,Od as Tt,Oe as Oa,zP as Ea,J2 as Ft,cK as Ka,Of as kn,Og as Dn,Oh as _n,Oi as wn,zM as Ha,A9 as Pn,A5 as Tn,zI as Fn,A7 as vn,zZ as xn,z$ as On,Oj as vt,Af as xt,Gz as Ln,Ok as Bn,Ol as Rn,Om as Un,On as Ot,Oo as jn,AC as Nn,zR as Lt,zL as da,zQ as Vn,Op as Hn,Oq as Mn,yW as zn,Or as Bt,Os as Rt,Ot as $n,yY as Gn,yX as ot,Ou as Zn,Ov as Yn,Ow as Kn,I_ as Wn,Ox as Wa,Oy as qn,vx as Ut,k2 as Xn,gz as Qn,AH as Jn,Oz as jt,OA as er,AI as ar,OB as tr,db as nr,sB as rr,Ax as sr,Ar as Oe,bu as or,bC as ir,ct as cr,bD as dr,If as lr}from"./zeni-epic-state-eW2EQdSt.js";import{z as J,S as Re,i as oe,c as Y,x as Ye,bX as La,c6 as ur,p as ve,c7 as mr,c8 as Cr,K as ma,aI as Fe,n as be,be as qa,c9 as pr,C as Ca,j as Ba,h as Xa,d as X,D as Qa,ca as hr,H as Nt,al as Ja,bq as Je,cb as Ma,cc as fr,y as et,a1 as gr,cd as br,ao as Vt,M as za,I as Ht,f as Mt,ce as yr,cf as Sr,cg as Ir,ch as Ar,ci as Er,o as ka,cj as kr,ck as Dr,cl as ja,v as _r,cm as wr,cn as Pr,co as Tr,cp as Fr,a4 as vr}from"./index-DYZnhdtQ.js";import{n as _e,D as zt,S as xr}from"./mui-DtCOffvy.js";import{a as c}from"./sentry-DCGk37l1.js";import{g as fe,a as pa,b as $t,c as Ee,d as ke,e as Be,f as Ue,A as Or,h as at,P as Lr,i as tt,s as ea,j as Gt,k as He,l as Zt,m as Br,n as Yt,p as Rr,S as it}from"./SetupPagesScreen-DyDXUs_E.js";import Ra from"./NotFoundScreen-D1ntYwuX.js";import{M as ha}from"./MobileAppDrawer-Bgn6WvPn.js";import{u as Kt}from"./useAskAiCfoHostNavButtonProps-B1RRjyxi.js";import{c as Wt}from"./useFetchSuggestedQuestionsWhenReady-Cy4jydJp.js";import{v as ct}from"./utils-DWAOcXZK.js";import{t as Ur}from"./AddressScreen-DmuzVSpn.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./analyticsHelper-BLpyhiq6.js";import"./routePaths-BInZ9Oyt.js";import"./BusinessVerificationPageScreen-nI2MGxd-.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]="37d1b417-9bfa-439d-a730-1e2b35336af9",e._sentryDebugIdIdentifier="sentry-dbid-37d1b417-9bfa-439d-a730-1e2b35336af9")}catch{}})();function jr(){const e=ue(),{cardId:t}=la(),a=me(),r=J.getSignedInUser(),n=S(G=>ie(G)),u=Re(),m=Le(u?.loggedInUserRoleMap),{useFeatureGate:C}=oe();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[I,o]=c.useState(!1),i=S(G=>_a(G).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const D=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=C(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:L}=C(Y.isDebitCardFeatureEnabled),v=Se(n),k=Ie(n),h=Ae(L,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ee({isDebitCardFeatureEnabled:L,isBankingOnlyTenant:h}),l=ke({isCardsOnlyTenant:v,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),w=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,B=S(G=>Me(G,n.companyId)),j=ze(B.controllers),{creditAccount:T,creditAccountRepayment:P}=S(G=>$e(G)),N=S(G=>G.classListState.fetchState),p=!D&&l&&f,d=S(G=>$a(G,t,p,l)),[_,F]=c.useState(!1),U=d.chargeCard,M=U?.cardCreatedByUser?.userId,W=S(G=>M!=null?Sa(G.userRoleState,M):void 0),y=W?.accountingClassIDs[0],x=S(G=>y!=null?Ia(G.classState,{classId:y,reportId:"class_list"}):void 0),$=U?.cardHolderUser?.userId,R=S(G=>$!=null?Sa(G.userRoleState,$):void 0),Z=R?.accountingClassIDs[0],E=S(G=>Z!=null?Ia(G.classState,{classId:Z,reportId:"class_list"}):void 0),q=U?.type.code==="business_physical_credit_card"||U?.type.code==="business_physical_debit_card",K=U?.type.code==="business_physical_debit_card";c.useEffect(()=>{i&&I===!1&&q&&(o(!0),setTimeout(()=>{a(Aa()),K&&a(ca({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[i,I,q,K]),c.useEffect(()=>{_||d.fetchState==="Completed"||d.fetchState==="In-Progress"||t==null||(F(!0),a(aa(t,p,!1)))},[_,d,t,a]),c.useEffect(()=>{if(d.fetchState==="Completed"&&(q===!1||q&&U?.status?.code!=="active"||U?.cardHolderUserId!==r.userId||i===!1&&I===!1||U?.type.code==="business_physical_debit_card"||U?.type.code==="business_virtual_debit_card")){const G=fe(n.tenantEmailDomain,t,r,U,i);e(G)}},[d.fetchState,i,q]),c.useEffect(()=>{T.fetchState!=="Completed"&&T.fetchState!=="In-Progress"&&l&&f&&m&&a(Ga()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&l&&f&&m&&a(Za()),N!=="Completed"&&N!=="In-Progress"&&a(Ct())},[T.fetchState,P.fetchState,a,l,f,m,N]);const z=()=>{if(r!=null&&t!=null){a(Aa());const G=fe(n.tenantEmailDomain,t,r);e(G)}},Ce=U?.type.code==="business_physical_debit_card"||U?.type.code==="business_virtual_debit_card",ae=Be(l,g,w,f),O=pa(l,f,m,T,P),pe=$t(Ce,d);return d.fetchState!=="Completed"?s.jsx(Ye,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(La,{showConfetti:i}),s.jsx(ur,{onGotItClick:z,isDebitCard:U?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:l,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:w,isChargeCardSetupEnabled:f,productInformation:ae,creditAccountInformation:O,debitAccountInformation:pe,chargeCardDetailView:d,creditAccount:T,classListFetchState:N,creditAccountRepayment:P,cardIssuedByRoles:W?.userRoles,cardIssuedByDepartmentName:x?.className,cardHolderRoles:R?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=ge(function(e){const t=Ge(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(Qt({uiState:{sortKey:t,sortOrder:a}}))}}})(Cr);function Vr(){const e=ue(),t=me(),a=ye(),r=J.getSignedInUser(),n=S(o=>ie(o)),[u,m]=c.useState(!1),C=S(o=>Ge(o)),I=c.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),i=o.poppedPathname??Hr(n.tenantEmailDomain);e(i,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(c.useEffect(()=>{u||C.fetchState==="Completed"||C.fetchState==="In-Progress"||(m(!0),t(pt()))},[u,C,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return C.fetchState==="In-Progress"?s.jsx(mr,{onBackClick:I}):C.cashbackSummary.cashbackEarned.amount===0&&C.fetchState==="Completed"?s.jsx(Ra,{}):s.jsx(Nr,{onBackClick:I})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new Ca(100,58)},zr=({appContent:e})=>{const t=ma(),a=me(),r=ue(),{cardId:n}=la(),u=ye(),{useDynamicConfig:m}=oe(),[C,I]=c.useState(!1),[o,i]=c.useState(!1),[D,A]=c.useState(!1),[f,L]=c.useState(!1),v=J.getSignedInUser();if(v==null)throw Error("Can't access onboarding card page without signing in...");const k=S(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=m(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=S(E=>Jt(E,n)),l=g.chargeCard,w=S(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:B}=oe(),{isFeatureEnabled:j}=B(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=B(Y.isDebitCardFeatureEnabled),P=Ae(T,k),N=Ee({isDebitCardFeatureEnabled:T,isBankingOnlyTenant:P}),p=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,d=k.userRole.includes("charge_card_user"),_=Se(k),F=Ie(k),U=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,M=ke({isCardsOnlyTenant:_,isChargeCardFeatureEnabled:j,isBookKeepingTenant:F,isDebitCardProductVisible:N,chargeCardsCreditAccountLimit:U}),W=!d&&M&&p;c.useEffect(()=>{C===!1&&w!=="In-Progress"&&w!=="Completed"&&(a(wa()),I(!0)),o===!1&&g.fetchState==="Not-Started"&&(i(!0),a(aa(n,W,M)))},[o,g.fetchState,C,w]);const y=l?.type.code==="business_physical_credit_card"||l?.type.code==="business_physical_debit_card";c.useEffect(()=>{if(g.fetchState==="Completed"){if(D===!1&&(y===!1||y&&l?.status?.code!=="inactive"||l?.cardHolderUserId!==v.userId)){const E=fe(k.tenantEmailDomain,n,v,l,!0),q=be(u.state?.pathnameStackToGoBack,u.pathname);r(E,{state:{pathnameStackToGoBack:q}})}else if(D&&g.isRefreshingViewInBackground===!1&&l?.status?.code==="active"){a(en({chargeCardId:n}));const E=fe(k.tenantEmailDomain,n,v,l,!0),q=be(u.state?.pathnameStackToGoBack,u.pathname);a(Pa()),r(E,{state:{pathnameStackToGoBack:q}})}}},[g.fetchState,l?.type.code,D,g.isRefreshingViewInBackground]);const x=J.getZeniOtpTokenForCardHolder(n),$=S(E=>ht(E.userState,v.userId)),R=()=>{l?.status?.code!=="active"&&a(Ya(n,!0))};c.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&l?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&D===!1&&(setTimeout(R,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,l?.cardActivationAttemptHistory]);const Z=E=>{L(E)};if(w!=="Completed"||l==null)return s.jsx(Ye,{fetchState:"In-Progress"});if(l.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if($?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Zr,{children:[s.jsx(ha,{isAppContentDrawerOpen:f,handleDrawerToggle:Z}),s.jsx($r,{cardId:n,card:l,shippingAddressId:l.shippingAddressId,phone:$.phone,signedInUser:v,isSandboxEnv:qa(),chargeCardDetailState:g,signedInUserToken:x,navigate:r,currentTenant:k,location:u,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:()=>{Z(!0)}}),e!=null?s.jsx(Gr,{windowSize:t,children:e}):null]})},$r=ge(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const u=an(e.addressState,a);if(u==null)throw Error("Can't access shippingAddress.");const m=ft(e,n),C=t.updateStatus,I=Ze(e,!1,!1,!1);let o=!1;I.fetchState==="Completed"&&I.cards.length<=1&&(o=!0);const i=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(tn())||i,showMenuIcon:o,shippingAddress:u,vgsVaultId:Ba.cardVaultId,twoFAView:m,activationWaitStatus:C,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:u,chargeCardDetailState:m}=t,C=m.chargeCard?.cardProviderID,{tenantEmailDomain:I}=u;return{onGetOtp:o=>{C!=null&&e(va(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(rn(r,o))},onResendOtp:o=>{C!=null&&e(Fa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,i)=>{C!=null&&e(Ta(o,i,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&J.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(nn({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),i=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ue(I):o.poppedPathname;a(i,{state:{pathnameStackToGoBack:o.newStack}})}}})(pr),Gr=_e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: ${e=>`${Mr.containerWidth.value(e.windowSize)}%`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-CGYcZ7Lh.js";import{a as g}from"./sentry-DCGk37l1.js";import{j as w,h as k,u as x,l as T,g as O,k as E}from"./core-CNZua1e0.js";import{z as C,b0 as F,y as P,d as L,f as V,aa as b,b1 as j,ao as A,ap as B,n as U}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-CGYcZ7Lh.js";import{a as g}from"./sentry-DCGk37l1.js";import{j as w,h as k,u as x,l as T,g as O,k as E}from"./core-CNZua1e0.js";import{z as C,b0 as F,y as P,d as L,f as V,aa as b,b1 as j,ao as A,ap as B,n as U}from"./index-DYZnhdtQ.js";import{eM as D,fB as M,rs as _,fw as R,b$ as z,Ls as G,bm as Y,pA as $,po as q,jW as H,lq as S,Lt as W,bB as Z,cr as N,ly as J,lB as K}from"./zeni-epic-state-eW2EQdSt.js";import"./mui-DtCOffvy.js";import{c as Q}from"./routePaths-BInZ9Oyt.js";import{M as X}from"./MobileAppDrawer-Bgn6WvPn.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="aeae6fa2-06cf-4466-8133-b171bed1a320",n._sentryDebugIdIdentifier="sentry-dbid-aeae6fa2-06cf-4466-8133-b171bed1a320")}catch{}})();const ee=E(function(n){const t=R(n),i=C.getSignedInUser(),l=D(n),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(l?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}},function(n,t){const{companyId:i,currentTenant:l,navigate:c,location:p}=t,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(K())},onAddressClick:e=>{const a=Q(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...a,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:B(I))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.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]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(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=>{n(W(e))},onCompanyOfficerUpdated:e=>{n(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=>{n(H({files:e}))},onDeleteFile:e=>{n(q(e))},onEditFileName:(e,a)=>{n($(e,a.split(".")[0]))}}})(j);function de(){const n=w(),t=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),a=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>D(s)),d=r.companyId??C.getSignedInUserTenant(l)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||a!=="Not-Started"||d==null||(p(!0),t(M(d)))},[c,a,d,t]),g.useEffect(()=>{o==="Not-Started"&&t(_())},[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:L,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:n,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-CGYcZ7Lh.js";import{a}from"./sentry-DCGk37l1.js";import{h as D,u as v,g as u,N as w}from"./core-CNZua1e0.js";import{Ib as A,eM as O,fi as _,mh as j,fJ as E,fh as U,eN as L,Ij as F}from"./zeni-epic-state-eW2EQdSt.js";import{u as $,z as c,L as g,D as k,o as H}from"./index-
|
|
1
|
+
import{j as C}from"./liveblocks-CGYcZ7Lh.js";import{a}from"./sentry-DCGk37l1.js";import{h as D,u as v,g as u,N as w}from"./core-CNZua1e0.js";import{Ib as A,eM as O,fi as _,mh as j,fJ as E,fh as U,eN as L,Ij as F}from"./zeni-epic-state-eW2EQdSt.js";import{u as $,z as c,L as g,D as k,o as H}from"./index-DYZnhdtQ.js";import{n as z}from"./mui-DtCOffvy.js";import{t as R}from"./getLocaleForTenant-DSkWweMK.js";import{g as P,Q as G}from"./QBOConnectionScreen-Cw_9-l3E.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./empty-BLoZtodd.js";import"./pdf-lib-CE0iOBgb.js";import"./index-QWM1qpc0.js";import"./url-C3uYKzo6.js";import"./index-jE-fly2Z.js";import"./decodeURIComponentSafe-Dac6kcoy.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]="c08af164-5c04-4610-8810-33ba1b562bd6",t._sentryDebugIdIdentifier="sentry-dbid-c08af164-5c04-4610-8810-33ba1b562bd6")}catch{}})();const J=z.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-CGYcZ7Lh.js";import{z as n}from"./index-
|
|
1
|
+
import{j as d}from"./liveblocks-CGYcZ7Lh.js";import{z as n}from"./index-DYZnhdtQ.js";import{g as p}from"./QBOConnectionScreen-Cw_9-l3E.js";import"./sentry-DCGk37l1.js";import{u as a,N as i}from"./core-CNZua1e0.js";import"./zeni-epic-state-eW2EQdSt.js";import"./recharts-Dq7pGiC-.js";import"./mui-DtCOffvy.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./empty-BLoZtodd.js";import"./pdf-lib-CE0iOBgb.js";import"./index-QWM1qpc0.js";import"./url-C3uYKzo6.js";import"./index-jE-fly2Z.js";import"./decodeURIComponentSafe-Dac6kcoy.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-igtoru6q.js → CustomerOnboardingRoutes-DJRocOcG.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CGYcZ7Lh.js";import{t as $e,A as Ce}from"./AddressScreen-
|
|
1
|
+
import{j as a}from"./liveblocks-CGYcZ7Lh.js";import{t as $e,A as Ce}from"./AddressScreen-DmuzVSpn.js";import ze from"./NotFoundScreen-D1ntYwuX.js";import{a as g}from"./sentry-DCGk37l1.js";import{j as oe,u as se,h as ie,l as re,g as D,N as x,k as ce,i as Me,n as Qe,o as M}from"./core-CNZua1e0.js";import{v as de,S as le,z as B,i as ue,h as qe,c as _,n as V,y as H,d as N,x as je,f as X,ak as Ke,K as Je,al as Ie,j as te,am as Ze,an as ke,o as He,ao as We,ap as xe,aq as Xe}from"./index-DYZnhdtQ.js";import{bm as Ye,eM as ee,fa as et,eS as pe,eQ as me,bu as tt,mf as at,f6 as nt,bL as ot,i_ as ae,j1 as ve,IX as st,bQ as it,b$ as ge,rG as fe,rr as rt,J7 as Y,rH as _e,GD as ct,k2 as Ue,J8 as Ve,J9 as dt,Ja as lt,Jb as ut,iY as pt,i$ as mt,rt as Be,rF as gt,bB as Ee,cr as ft,rT as Te,pA as ht,po as yt,jW as bt,fz as St,fy as Ct,fx as It,Jc as kt,rl as xt,rU as Et,rX as Tt,r_ as Ot,s4 as Pt,cR as At}from"./zeni-epic-state-eW2EQdSt.js";import{n as he}from"./mui-DtCOffvy.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-Cw_9-l3E.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./empty-BLoZtodd.js";import"./pdf-lib-CE0iOBgb.js";import"./index-QWM1qpc0.js";import"./url-C3uYKzo6.js";import"./index-jE-fly2Z.js";import"./decodeURIComponentSafe-Dac6kcoy.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]="f2c31ff3-df79-4b94-a84b-c53db2878b9f",t._sentryDebugIdIdentifier="sentry-dbid-f2c31ff3-df79-4b94-a84b-c53db2878b9f")}catch{}})();const wt=ce(function(t,o){const s=[];o.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),o.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),o.shouldFetchZeniAccountsPromoCard===!1&&s.push("zeni_accounts_promo_card"),o.shouldFetchRewardsPlanCard===!1&&s.push("rewards_card"),o.isExpenseAutomationEnabledForUser===!1&&s.push("expense_automation_card");const u=nt(t,s,o.signedInUser,o.isExpenseAutomationFeatureEnabledV2,o.isExpenseAutomationEnabledForUser,o.isTreasuryEnabled);return{dashboardFetchState:ot(u.reportsInOrder.map(d=>({fetchState:d.fetchState,error:d.error}))).fetchState}},function(t,o){const{themeState:s,navigate:u,location:d}=o;return{onZeniLogoClick:()=>{s.toggle()},onDashboardFetchDone:()=>{const r=V(d.state?.pathnameStackToGoBack,d.pathname);u("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Ke),jt=()=>{const t=oe(),o=se(),s=ie(),u=de(),[d,r]=g.useState(!1),[p,b]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=B.getSignedInUser(),f=Ye(i),{useFeatureGate:m}=ue(),k=qe(),{isFeatureEnabled:E}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:T}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:I}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:h}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),$=C||U&&f,c=D(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),w=c.company!=null&&et(c.company),G=L&&w,O=D(l=>l.onboardingCustomerViewState.fetchState),S=c.excludedResources,R=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const j=pe(F,c),P=me(c),A=[],K=S?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,z=S?.resources?.find(l=>l.resource==="/reports/task_card")==null,Q=c?.userRole!=null&&tt(c?.userRole),v=S?.resources?.find(l=>l.resource==="/bills")==null&&!Q,q=S?.resources?.find(l=>l.resource==="/reimbursements")==null;if(K===!1&&A.push("top_expenses"),z===!1&&A.push("task_card"),v===!1&&A.push("bill_pay_card","bill_pay_promo_card"),q===!1&&A.push("reimbursement_card","reimbursement_promo_card"),I===!1&&A.push("zeni_accounts_promo_card"),h===!1&&A.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||j||P||(r(!0),s(at(i.userId,R,c.tenantId,!0,!1,A)))},[d,O,j,P,i,c.tenantId,s]),g.useEffect(()=>{(j||P)&&setTimeout(()=>{b(!0)},5e3)},[j,P]),O!=="Completed")return a.jsx(x,{to:"../"});if(O==="Completed"&&p){const l=V(o.state?.pathnameStackToGoBack,o.pathname);if(j)return a.jsx(x,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}});if(P)return a.jsx(x,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(H,{analytics:N,onLoad:l=>(J=>J.trackPageLoaded(X.Event.onboardingDashboardActivation))(l)}),a.jsx(wt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:E,isArAgingFeatureEnabled:T,shouldFetchZeniAccountsPromoCard:I,shouldFetchRewardsPlanCard:h,isExpenseAutomationEnabledForUser:$,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:G,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(je,{fetchState:"In-Progress",style:{backgroundColor:k.colors.grey5}})},Oe=he.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-CGYcZ7Lh.js";import{l as N,g as k,u as z,h as V,j as q,k as H,s as $a,n as at,o as D}from"./core-CNZua1e0.js";import{eM as L,Js as Le,bB as Yt,bp as de,KF as za,hO as qa,KG as Tt,KH as Za,hR as nt,KI as Be,KJ as Ha,hW as Ja,KK as xt,KL as Qa,h_ as ot,KM as Re,KN as Wa,cN as rt,KO as Xa,KP as en,JM as tn,iU as an,KQ as nn,bm as Se,KR as Kt,Jg as X,bc as Gt,j6 as Vt,mp as Nt,iR as $t,Ji as ee,Jh as Z,f2 as on,fk as sn,KS as rn,KT as cn,KU as zt,KV as fe,tw as ye,tx as ve,tU as ue,tO as te,tB as Ie,KW as ln,KX as dn,KY as un,KZ as qt,K_ as ge,K$ as mn,dA as Me,q8 as Zt,L0 as pn,L1 as hn,L2 as fn,L3 as it,ID as ct,jm as lt,u0 as dt,qg as gn,L4 as bn,ty as Dt,qb as ce,q7 as Ht,L5 as oe,L6 as Cn,L7 as ut,IC as mt,s8 as Jt,L8 as _n,L9 as kn,La as Sn,Lb as pt,sl as yn,Lc as vn,tA as Ot,s7 as Qt,Ld as se,Le as In,bu as Wt,u4 as Xt,Lf as An,Lg as En,Lh as wn,Li as ht,t$ as Tn,Lj as xn,tz as Ft,u3 as ea,Lk as re,Ll as Dn,Lm as On,Ln as ta,jb as aa,mm as na,jg as oa,mk as sa,mj as ra,mi as ia,rw as Fn,fa as Pn,cK as Bn,cL as Rn,mf as jn,f6 as Ln,mv as Mn,Lo as Un,D8 as Yn,Lp as Kn,Lq as Gn,Lr as Vn,b5 as ft,eY as Nn,gw as $n,fB as zn,mq as qn,iK as Zn,mn as Hn,ml as Jn,eS as Qn,eQ as Wn}from"./zeni-epic-state-eW2EQdSt.js";import{z as j,M as J,n as O,d as I,D as $,aP as Xn,H as Ae,y as Ee,aQ as ca,f as K,aR as eo,S as we,aS as la,i as Ue,c as M,h as to,aT as ao,aU as no,K as oo,a as da,$ as so,aV as ro,aI as ua,aW as io,aX as co,J as lo,aY as Te,aZ as uo,al as mo,p as po,I as ho,a_ as fo,a$ as Ce}from"./index-Co04ey3-.js";import{n as gt}from"./mui-DtCOffvy.js";import{a as _}from"./sentry-DCGk37l1.js";import{w as ma}from"./withTransactionSidePanel-ykEXkuoH.js";import{b as pa,t as me,e as ae,a as bt,v as go}from"./routePaths-CHVZiiJU.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-BW2SwSZE.js";import{c as xe,b as bo}from"./useFetchSuggestedQuestionsWhenReady-cPo0or_6.js";import ke from"./NotFoundScreen-CQPWWkLY.js";import{t as ha}from"./analyticsHelper-ByMo5A8t.js";import{C as Co}from"./CompanyPassportScreen-D3MdOGSR.js";import{F as _o}from"./FeaturePreviewScreen-C7s5EUEI.js";import{R as ko}from"./ReferralListScreen-D4dSsS9f.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./TransactionDetailScreen-DORvf_A0.js";import"./decodeURIComponentSafe-Dac6kcoy.js";import"./MobileAppDrawer-BTO_dO8H.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]="7aacab15-04c0-4ada-beb0-5f09d3e48f9f",e._sentryDebugIdIdentifier="sentry-dbid-7aacab15-04c0-4ada-beb0-5f09d3e48f9f")}catch{}})();const So=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=N(),s=j.getSignedInUser(),i=k(w=>w.tenantState.currentTenantId),d=k(w=>L(w)),{tenantEmailDomain:f}=N(),g=z(),b=d?.companyName??"",p={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=_.useMemo(()=>({authParams:p,companyName:b,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Le()}),[]),u=_.useMemo(()=>r!=null?Yt(r):de(),[r]),h=V(),m=q(),C=k(w=>za(w,u,o)),S=_.useCallback(()=>{o!=null&&C.fetchState!=="In-Progress"&&C.fetchState!=="Completed"&&h(qa(o,u))},[u]),A=_.useCallback(()=>{m("../../",{relative:"path"})},[]),P=_.useCallback((w,B)=>{h(Tt({sortKey:w,sortOrder:B}))},[]),E=_.useCallback(w=>{h(Tt({downloadState:w}))},[]),y=_.useCallback(w=>{if(e)e(w.transactionId,w.transactionType);else if(f!=null){const B=pa({id:w.transactionId,type:w.transactionType},f);m(B);const pe=O(g.state?.pathnameStackToGoBack,g.pathname);m(B,{state:{pathnameStackToGoBack:pe}})}},[f,e]),T=_.useCallback(()=>{C.vendor!=null&&I.trackApAgingDetail("AP Aging",u.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),C.vendor.id,C.vendor.name)},[C.vendor,u]);return _.useEffect(()=>{S()},[]),_.useEffect(()=>{C.fetchState==="Completed"&&T()},[T,C.fetchState]),l.jsx(Xn,{apAgingDetail:C,downloadParams:c,reportDate:u,analytics:I,onTransactionClick:y,onReload:S,onBackClick:A,onColumnSortConfigChanged:P,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),yo=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ae(),t=V(),n=q(),o=k(y=>Za(y)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AP Aging"});xe({isDataReady:o.fetchState==="Completed"});const i=j.getSignedInUser(),d=k(y=>y.tenantState.currentTenantId),f=k(y=>L(y)),g=f?.companyName??"",b={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d??""},p=_.useMemo(()=>({authParams:b,companyName:g,downloadEndPoint:`${J}/agingReport`,timezone:Le()}),[]),c=o.apAgingUIState.selectedDate??de(),u=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(nt(c))},[]);_.useEffect(()=>{u()},[]);const h=_.useCallback(()=>{n("../",{relative:"path"})},[]),m=_.useCallback(y=>{t(Be({searchString:y}))},[]),C=_.useCallback((y,T)=>{t(Be({sortKey:T,sortOrder:y}))},[]),S=_.useCallback(y=>{n(`./${y}/${c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[c]),A=_.useCallback(y=>{t(Be({downloadState:y}))},[]),P=_.useCallback((y,T)=>{},[]),E=_.useCallback((y,T)=>{t(Be({selectedDate:y,agingDateSelectionType:T})),t(nt(y))},[]);return l.jsxs(l.Fragment,{children:[o.fetchState==="Completed"?l.jsx(Ee,{analytics:I,onLoad:y=>y.trackPageLoaded(K.Event.agingReport,"AP Aging")}):null,l.jsx(ca,{uiState:o.apAgingUIState,report:o,downloadParams:p,analytics:I,onReloadReport:u,onBackClick:h,onSearchTextChange:m,onSortOrderChange:C,onEntityNameClick:S,updateDownloadStateHandler:A,onSelectedDateChanged:E,onNodeCollapseToggled:P,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},vo=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=N(),s=j.getSignedInUser(),i=k(T=>L(T)),{tenantEmailDomain:d}=N(),f=z(),g=i.companyName,b={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},p=_.useMemo(()=>({authParams:b,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Le()}),[]),c=_.useMemo(()=>r!=null?Yt(r):de(),[r]),u=V(),h=q(),m=k(T=>Ha(T,c,o)),C=_.useCallback(()=>{o!=null&&m.fetchState!=="In-Progress"&&m.fetchState!=="Completed"&&u(Ja(o,c))},[c]),S=_.useCallback(()=>{h("../../",{relative:"path"})},[]),A=_.useCallback((T,w)=>{u(xt({sortKey:T,sortOrder:w}))},[]),P=_.useCallback(T=>{u(xt({downloadState:T}))},[]),E=_.useCallback(T=>{if(e)e(T.transactionId,T.transactionType);else if(d!=null){const w=pa({id:T.transactionId,type:T.transactionType},d);h(w);const B=O(f.state?.pathnameStackToGoBack,f.pathname);h(w,{state:{pathnameStackToGoBack:B}})}},[d,e]),y=_.useCallback(()=>{m.customer!=null&&I.trackArAgingDetail("AR Aging",c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),m.customer.id,m.customer.name)},[m.customer,c]);return _.useEffect(()=>{C()},[]),_.useEffect(()=>{m.fetchState==="Completed"&&y()},[m.fetchState,y]),l.jsx(eo,{arAgingDetail:m,downloadParams:p,reportDate:c,analytics:I,onTransactionClick:E,onReload:C,onBackClick:S,onColumnSortConfigChanged:A,updateDownloadStateHandler:P,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ae(),t=V(),n=q(),o=k(E=>Qa(E)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AR Aging"});xe({isDataReady:o.fetchState==="Completed"});const i=j.getSignedInUser(),d=k(E=>L(E)),f=d.companyName,g={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d.tenantId},b=_.useMemo(()=>({authParams:g,companyName:f,downloadEndPoint:`${J}/agingReport`,timezone:Le()}),[]),p=o.arAgingUIState.selectedDate??de(),c=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(ot(p))},[]);_.useEffect(()=>{c()},[]);const u=_.useCallback(()=>{n("../",{relative:"path"})},[]),h=_.useCallback(E=>{t(Re({searchString:E}))},[]),m=_.useCallback((E,y)=>{t(Re({sortKey:y,sortOrder:E}))},[]),C=_.useCallback(E=>{n(`./${E}/${p.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[p]),S=_.useCallback(E=>{t(Re({downloadState:E}))},[]),A=_.useCallback((E,y)=>{t(Re({selectedDate:E,agingDateSelectionType:y})),t(ot(E))},[]),P=_.useCallback((E,y)=>{t(Wa({nodeId:E,isCollapsed:y}))},[]);return l.jsxs(l.Fragment,{children:[o.fetchState==="Completed"?l.jsx(Ee,{analytics:I,onLoad:E=>E.trackPageLoaded(K.Event.agingReport,"AR Aging")}):null,l.jsx(ca,{uiState:o.arAgingUIState,report:o,downloadParams:b,analytics:I,onReloadReport:c,onBackClick:u,onSearchTextChange:h,onSortOrderChange:m,onEntityNameClick:C,updateDownloadStateHandler:S,onSelectedDateChanged:A,onNodeCollapseToggled:P,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},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=me(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(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=O(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 Ao=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)(la),Eo=H(function(e){const a=nn(e).accountsInOrder.map((o,r)=>fa(o,r)),t=j.getSignedInUser(),n=Se(t);return{sectionTitle:$.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ga)(la);function wo(){const e=q(),a=z(),{tenantEmailDomain:t}=N(),n=we(),o=k(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=rt(n?.loggedInUserRoleMap);return k(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ke,{}):l.jsx(Ao,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function To(){const e=q(),a=z(),{tenantEmailDomain:t}=N(),n=we(),o=rt(n?.loggedInUserRoleMap),r=k(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return k(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ke,{}):l.jsx(Eo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const xo=gt.div`
|
|
1
|
+
import{j as l}from"./liveblocks-CGYcZ7Lh.js";import{l as N,g as k,u as z,h as V,j as q,k as H,s as $a,n as at,o as D}from"./core-CNZua1e0.js";import{eM as L,Js as Le,bB as Yt,bp as de,KF as za,hO as qa,KG as Tt,KH as Za,hR as nt,KI as Be,KJ as Ha,hW as Ja,KK as xt,KL as Qa,h_ as ot,KM as Re,KN as Wa,cN as rt,KO as Xa,KP as en,JM as tn,iU as an,KQ as nn,bm as Se,KR as Kt,Jg as X,bc as Gt,j6 as Vt,mp as Nt,iR as $t,Ji as ee,Jh as Z,f2 as on,fk as sn,KS as rn,KT as cn,KU as zt,KV as fe,tw as ye,tx as ve,tU as ue,tO as te,tB as Ie,KW as ln,KX as dn,KY as un,KZ as qt,K_ as ge,K$ as mn,dA as Me,q8 as Zt,L0 as pn,L1 as hn,L2 as fn,L3 as it,ID as ct,jm as lt,u0 as dt,qg as gn,L4 as bn,ty as Dt,qb as ce,q7 as Ht,L5 as oe,L6 as Cn,L7 as ut,IC as mt,s8 as Jt,L8 as _n,L9 as kn,La as Sn,Lb as pt,sl as yn,Lc as vn,tA as Ot,s7 as Qt,Ld as se,Le as In,bu as Wt,u4 as Xt,Lf as An,Lg as En,Lh as wn,Li as ht,t$ as Tn,Lj as xn,tz as Ft,u3 as ea,Lk as re,Ll as Dn,Lm as On,Ln as ta,jb as aa,mm as na,jg as oa,mk as sa,mj as ra,mi as ia,rw as Fn,fa as Pn,cK as Bn,cL as Rn,mf as jn,f6 as Ln,mv as Mn,Lo as Un,D8 as Yn,Lp as Kn,Lq as Gn,Lr as Vn,b5 as ft,eY as Nn,gw as $n,fB as zn,mq as qn,iK as Zn,mn as Hn,ml as Jn,eS as Qn,eQ as Wn}from"./zeni-epic-state-eW2EQdSt.js";import{z as j,M as J,n as O,d as I,D as $,aP as Xn,H as Ae,y as Ee,aQ as ca,f as K,aR as eo,S as we,aS as la,i as Ue,c as M,h as to,aT as ao,aU as no,K as oo,a as da,$ as so,aV as ro,aI as ua,aW as io,aX as co,J as lo,aY as Te,aZ as uo,al as mo,p as po,I as ho,a_ as fo,a$ as Ce}from"./index-DYZnhdtQ.js";import{n as gt}from"./mui-DtCOffvy.js";import{a as _}from"./sentry-DCGk37l1.js";import{w as ma}from"./withTransactionSidePanel-BuR2K69z.js";import{b as pa,t as me,e as ae,a as bt,v as go}from"./routePaths-BInZ9Oyt.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-B1RRjyxi.js";import{c as xe,b as bo}from"./useFetchSuggestedQuestionsWhenReady-Cy4jydJp.js";import ke from"./NotFoundScreen-D1ntYwuX.js";import{t as ha}from"./analyticsHelper-BLpyhiq6.js";import{C as Co}from"./CompanyPassportScreen-euq0zzkh.js";import{F as _o}from"./FeaturePreviewScreen-BUE1IhYi.js";import{R as ko}from"./ReferralListScreen-BUISJYbr.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./TransactionDetailScreen-CCL-hNKp.js";import"./decodeURIComponentSafe-Dac6kcoy.js";import"./MobileAppDrawer-Bgn6WvPn.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]="7aacab15-04c0-4ada-beb0-5f09d3e48f9f",e._sentryDebugIdIdentifier="sentry-dbid-7aacab15-04c0-4ada-beb0-5f09d3e48f9f")}catch{}})();const So=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=N(),s=j.getSignedInUser(),i=k(w=>w.tenantState.currentTenantId),d=k(w=>L(w)),{tenantEmailDomain:f}=N(),g=z(),b=d?.companyName??"",p={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=_.useMemo(()=>({authParams:p,companyName:b,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Le()}),[]),u=_.useMemo(()=>r!=null?Yt(r):de(),[r]),h=V(),m=q(),C=k(w=>za(w,u,o)),S=_.useCallback(()=>{o!=null&&C.fetchState!=="In-Progress"&&C.fetchState!=="Completed"&&h(qa(o,u))},[u]),A=_.useCallback(()=>{m("../../",{relative:"path"})},[]),P=_.useCallback((w,B)=>{h(Tt({sortKey:w,sortOrder:B}))},[]),E=_.useCallback(w=>{h(Tt({downloadState:w}))},[]),y=_.useCallback(w=>{if(e)e(w.transactionId,w.transactionType);else if(f!=null){const B=pa({id:w.transactionId,type:w.transactionType},f);m(B);const pe=O(g.state?.pathnameStackToGoBack,g.pathname);m(B,{state:{pathnameStackToGoBack:pe}})}},[f,e]),T=_.useCallback(()=>{C.vendor!=null&&I.trackApAgingDetail("AP Aging",u.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),C.vendor.id,C.vendor.name)},[C.vendor,u]);return _.useEffect(()=>{S()},[]),_.useEffect(()=>{C.fetchState==="Completed"&&T()},[T,C.fetchState]),l.jsx(Xn,{apAgingDetail:C,downloadParams:c,reportDate:u,analytics:I,onTransactionClick:y,onReload:S,onBackClick:A,onColumnSortConfigChanged:P,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),yo=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ae(),t=V(),n=q(),o=k(y=>Za(y)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AP Aging"});xe({isDataReady:o.fetchState==="Completed"});const i=j.getSignedInUser(),d=k(y=>y.tenantState.currentTenantId),f=k(y=>L(y)),g=f?.companyName??"",b={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d??""},p=_.useMemo(()=>({authParams:b,companyName:g,downloadEndPoint:`${J}/agingReport`,timezone:Le()}),[]),c=o.apAgingUIState.selectedDate??de(),u=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(nt(c))},[]);_.useEffect(()=>{u()},[]);const h=_.useCallback(()=>{n("../",{relative:"path"})},[]),m=_.useCallback(y=>{t(Be({searchString:y}))},[]),C=_.useCallback((y,T)=>{t(Be({sortKey:T,sortOrder:y}))},[]),S=_.useCallback(y=>{n(`./${y}/${c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[c]),A=_.useCallback(y=>{t(Be({downloadState:y}))},[]),P=_.useCallback((y,T)=>{},[]),E=_.useCallback((y,T)=>{t(Be({selectedDate:y,agingDateSelectionType:T})),t(nt(y))},[]);return l.jsxs(l.Fragment,{children:[o.fetchState==="Completed"?l.jsx(Ee,{analytics:I,onLoad:y=>y.trackPageLoaded(K.Event.agingReport,"AP Aging")}):null,l.jsx(ca,{uiState:o.apAgingUIState,report:o,downloadParams:p,analytics:I,onReloadReport:u,onBackClick:h,onSearchTextChange:m,onSortOrderChange:C,onEntityNameClick:S,updateDownloadStateHandler:A,onSelectedDateChanged:E,onNodeCollapseToggled:P,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},vo=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=N(),s=j.getSignedInUser(),i=k(T=>L(T)),{tenantEmailDomain:d}=N(),f=z(),g=i.companyName,b={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},p=_.useMemo(()=>({authParams:b,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Le()}),[]),c=_.useMemo(()=>r!=null?Yt(r):de(),[r]),u=V(),h=q(),m=k(T=>Ha(T,c,o)),C=_.useCallback(()=>{o!=null&&m.fetchState!=="In-Progress"&&m.fetchState!=="Completed"&&u(Ja(o,c))},[c]),S=_.useCallback(()=>{h("../../",{relative:"path"})},[]),A=_.useCallback((T,w)=>{u(xt({sortKey:T,sortOrder:w}))},[]),P=_.useCallback(T=>{u(xt({downloadState:T}))},[]),E=_.useCallback(T=>{if(e)e(T.transactionId,T.transactionType);else if(d!=null){const w=pa({id:T.transactionId,type:T.transactionType},d);h(w);const B=O(f.state?.pathnameStackToGoBack,f.pathname);h(w,{state:{pathnameStackToGoBack:B}})}},[d,e]),y=_.useCallback(()=>{m.customer!=null&&I.trackArAgingDetail("AR Aging",c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),m.customer.id,m.customer.name)},[m.customer,c]);return _.useEffect(()=>{C()},[]),_.useEffect(()=>{m.fetchState==="Completed"&&y()},[m.fetchState,y]),l.jsx(eo,{arAgingDetail:m,downloadParams:p,reportDate:c,analytics:I,onTransactionClick:E,onReload:C,onBackClick:S,onColumnSortConfigChanged:A,updateDownloadStateHandler:P,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ae(),t=V(),n=q(),o=k(E=>Qa(E)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AR Aging"});xe({isDataReady:o.fetchState==="Completed"});const i=j.getSignedInUser(),d=k(E=>L(E)),f=d.companyName,g={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d.tenantId},b=_.useMemo(()=>({authParams:g,companyName:f,downloadEndPoint:`${J}/agingReport`,timezone:Le()}),[]),p=o.arAgingUIState.selectedDate??de(),c=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(ot(p))},[]);_.useEffect(()=>{c()},[]);const u=_.useCallback(()=>{n("../",{relative:"path"})},[]),h=_.useCallback(E=>{t(Re({searchString:E}))},[]),m=_.useCallback((E,y)=>{t(Re({sortKey:y,sortOrder:E}))},[]),C=_.useCallback(E=>{n(`./${E}/${p.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[p]),S=_.useCallback(E=>{t(Re({downloadState:E}))},[]),A=_.useCallback((E,y)=>{t(Re({selectedDate:E,agingDateSelectionType:y})),t(ot(E))},[]),P=_.useCallback((E,y)=>{t(Wa({nodeId:E,isCollapsed:y}))},[]);return l.jsxs(l.Fragment,{children:[o.fetchState==="Completed"?l.jsx(Ee,{analytics:I,onLoad:E=>E.trackPageLoaded(K.Event.agingReport,"AR Aging")}):null,l.jsx(ca,{uiState:o.arAgingUIState,report:o,downloadParams:b,analytics:I,onReloadReport:c,onBackClick:u,onSearchTextChange:h,onSortOrderChange:m,onEntityNameClick:C,updateDownloadStateHandler:S,onSelectedDateChanged:A,onNodeCollapseToggled:P,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},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=me(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(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=O(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 Ao=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)(la),Eo=H(function(e){const a=nn(e).accountsInOrder.map((o,r)=>fa(o,r)),t=j.getSignedInUser(),n=Se(t);return{sectionTitle:$.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ga)(la);function wo(){const e=q(),a=z(),{tenantEmailDomain:t}=N(),n=we(),o=k(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=rt(n?.loggedInUserRoleMap);return k(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ke,{}):l.jsx(Ao,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function To(){const e=q(),a=z(),{tenantEmailDomain:t}=N(),n=we(),o=rt(n?.loggedInUserRoleMap),r=k(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return k(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ke,{}):l.jsx(Eo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const xo=gt.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-CGYcZ7Lh.js";import{a as u}from"./sentry-DCGk37l1.js";import{h as y,g as b,k as w,u as A,N as k}from"./core-CNZua1e0.js";import{Ib as N,eM as _,fi as U,Ic as L,mh as R,Id as z}from"./zeni-epic-state-eW2EQdSt.js";import{u as O,z as h,L as T,t as S,D as $,b as j}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-CGYcZ7Lh.js";import{a as u}from"./sentry-DCGk37l1.js";import{h as y,g as b,k as w,u as A,N as k}from"./core-CNZua1e0.js";import{Ib as N,eM as _,fi as U,Ic as L,mh as R,Id as z}from"./zeni-epic-state-eW2EQdSt.js";import{u as O,z as h,L as T,t as S,D as $,b as j}from"./index-DYZnhdtQ.js";import"./mui-DtCOffvy.js";import{t as P}from"./getLocaleForTenant-DSkWweMK.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.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]="3d360737-e2d3-4130-bd72-c1b8c16ca050",t._sentryDebugIdIdentifier="sentry-dbid-3d360737-e2d3-4130-bd72-c1b8c16ca050")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:f}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=f.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,I=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,I=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=j(c,p);return v.jsx(k,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:I}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=O(),f=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>N(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=h.getSignedInUser();return u.useLayoutEffect(()=>{const e=h.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,f.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!f.current||a!=="Completed"&&a!=="Error"||(f.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=h.getActiveTenantForUser()?.tenantId;f.current===!1&&d!=null&&e!=null&&S.shouldFetchActiveTenant(e)&&(f.current=!0,S.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=h.getSignedInUser(),g=h.getActiveTenantForUser()?.tenantId,I=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&I&&S.shouldFetchAllTenants()&&(r.current=!0,S.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{h.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(h.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!h.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||($.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],G={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of q)if(t.toLocaleLowerCase().includes(s))return G[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-Cq9OTpl5.js → DomesticWireDetailScreen-CacBxbO_.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-CGYcZ7Lh.js";import{j as w,u as C,g as h,k as A,l as V}from"./core-CNZua1e0.js";import{M9 as k,Mg as _,fz as J,fy as K,fx as L,ii as W,Jh as q,pr as Q,eM as B,LH as D,ig as T,Ma as S,Mj as F,id as G,iC as j}from"./zeni-epic-state-eW2EQdSt.js";import{bm as X,K as R,i as N,z as U,h as M,p,c as v,x as z,bn as Y,o as H,bo as ee,n as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-CGYcZ7Lh.js";import{j as w,u as C,g as h,k as A,l as V}from"./core-CNZua1e0.js";import{M9 as k,Mg as _,fz as J,fy as K,fx as L,ii as W,Jh as q,pr as Q,eM as B,LH as D,ig as T,Ma as S,Mj as F,id as G,iC as j}from"./zeni-epic-state-eW2EQdSt.js";import{bm as X,K as R,i as N,z as U,h as M,p,c as v,x as z,bn as Y,o as H,bo as ee,n as te}from"./index-DYZnhdtQ.js";import{n as O}from"./mui-DtCOffvy.js";import"./sentry-DCGk37l1.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]="1ba112ce-4aa2-43dc-b60f-6e7caef7fc51",e._sentryDebugIdIdentifier="sentry-dbid-1ba112ce-4aa2-43dc-b60f-6e7caef7fc51")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(L(n,"BillPayVendor"))},onResendOtp:n=>{e(K(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(J(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(X);function Z({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-CGYcZ7Lh.js";import{K as f,C as l,h as c}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-CGYcZ7Lh.js";import{K as f,C as l,h as c}from"./index-DYZnhdtQ.js";import{D as p}from"./mui-DtCOffvy.js";import"./sentry-DCGk37l1.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]="d3dd7346-4961-45dd-895f-3ffbae5d7e32",e._sentryDebugIdIdentifier="sentry-dbid-d3dd7346-4961-45dd-895f-3ffbae5d7e32")}catch{}})();const u={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:n,onClose:t}=e,d=f(),s=o?.valuePx(d)??u.drawerLeftMargin.valuePx(d),a=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:n})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CGYcZ7Lh.js";import{a as d}from"./sentry-DCGk37l1.js";import{j as A,h as B,u as J,l as N,g as l,N as q,k as F,n as M,o as O}from"./core-CNZua1e0.js";import{Ko as _,eM as K,JN as R,km as W,Gv as I,Kt as Y,Jg as $,jm as z,Gw as S,JS as V,JT as H,Ji as L,Jh as Q}from"./zeni-epic-state-eW2EQdSt.js";import{aM as U,d as X,p as Z,n as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-CGYcZ7Lh.js";import{a as d}from"./sentry-DCGk37l1.js";import{j as A,h as B,u as J,l as N,g as l,N as q,k as F,n as M,o as O}from"./core-CNZua1e0.js";import{Ko as _,eM as K,JN as R,km as W,Gv as I,Kt as Y,Jg as $,jm as z,Gw as S,JS as V,JT as H,Ji as L,Jh as Q}from"./zeni-epic-state-eW2EQdSt.js";import{aM as U,d as X,p as Z,n as tt}from"./index-DYZnhdtQ.js";import"./mui-DtCOffvy.js";import{d as k}from"./decodeURIComponentSafe-Dac6kcoy.js";import{w as et}from"./withTransactionSidePanel-BuR2K69z.js";import{e as at,b as nt}from"./routePaths-BInZ9Oyt.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./useAskAiCfoHostNavButtonProps-B1RRjyxi.js";import"./useFetchSuggestedQuestionsWhenReady-Cy4jydJp.js";import"./TransactionDetailScreen-CCL-hNKp.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]="4f451a17-7446-4403-82cf-e50dba19293e",a._sentryDebugIdIdentifier="sentry-dbid-4f451a17-7446-4403-82cf-e50dba19293e")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:z(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(H()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();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(),c=J(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:w}=N(),r=k(j??""),p=k(w??""),u=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),G=l(n=>K(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(W(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??D,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,D);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(q,{to:b(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(M,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-XSCKWGJC.js → ExpenseAutomationRoutes-CVsvgtLV.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-CGYcZ7Lh.js";import xn from"./NotFoundScreen-
|
|
1
|
+
import{j as p}from"./liveblocks-CGYcZ7Lh.js";import xn from"./NotFoundScreen-D1ntYwuX.js";import{a as s,b as Pt}from"./sentry-DCGk37l1.js";import{n as De,S as Rn}from"./mui-DtCOffvy.js";import{h as se,j as wt,u as Ge,g as B,k as Dn,l as rt,n as On,o as je}from"./core-CNZua1e0.js";import{eM as we,OH as Un,e$ as Ce,fd as Bn,q2 as Fn,mI as xt,mO as Rt,OI as Dt,nb as _n,OJ as Ot,mB as Mn,pA as Vn,eX as he,OK as xe,s1 as Ut,Bc as Bt,OL as Ft,OM as jn,pf as qe,Kp as dt,Kr as zn,jp as Ln,Ks as $n,jw as Gn,cT as qn,t4 as Je,jm as Jn,mP as _t,ng as Re,ON as Nn,Ji as ut,Jh as Ae,OO as mt,jN as Yn,OP as Kn,OQ as Zn,OR as Hn,OS as Qn,mY as Wn,mG as ce,nj as Te,OT as Xn,OU as ea,OV as ta,nq as na,jA as aa,jr as oa,OW as sa,jz as ht,Kz as ca,OX as ia,OY as la,pb as ra,oS as da,nh as pe,oR as ze,OZ as ua,O_ as ma,l4 as ha,bp as pa,k$ as pt,kN as ga,O$ as Ca,gy as gt,fL as Sa,kY as Ia,uZ as fa,P0 as ka,nR as Ea,nM as va,nQ as ya,nB as ba,P1 as Aa,e_ as Mt,n4 as Ta,mV as Pa,fe as Ct,nl as wa,P2 as xa,ni as Vt,P3 as Ra,P4 as Da,P5 as Oa,P6 as Ua,P7 as St,pn as Ba,oB as Fa,Jg as _a,jy as Ma,P8 as Va,Fw as ja,jx as za,eZ as La,ob as jt,oJ as $a,nf as It,nk as Ga,bB as qa,kV as Ja,kS as Na,P9 as Ya,nA as ft,ok as kt,ot as Ka,og as Za,oG as Ha,ol as Qa,Pa as Wa,Pb as Xa,n_ as eo,Pc as to,nY as no,nZ as ao,nW as oo,ov as so}from"./zeni-epic-state-eW2EQdSt.js";import{H as zt,i as Lt,c as ge,d as L,n as Q,I as $t,ct as co,z as Oe,cu as io,ao as Pe,cv as lo,aO as Et,x as Gt,cw as ro,al as Le,D as uo,cx as mo,M as ho,cy as po,cz as go,cA as Co,v as So,S as Io,aI as fo,b0 as ko,C as Eo,cB as vo}from"./index-DYZnhdtQ.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-B1RRjyxi.js";import{c as Jt}from"./useFetchSuggestedQuestionsWhenReady-Cy4jydJp.js";import{c as vt,C as yo}from"./TransactionDetailScreen-CCL-hNKp.js";import{w as bo}from"./withTransactionSidePanel-BuR2K69z.js";import{h as Ao,v as To}from"./routePaths-BInZ9Oyt.js";import{g as $e}from"./accountMappingHelper-Dr0t2P70.js";import{D as Po}from"./DrawerScreen-DQY8g3HS.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./decodeURIComponentSafe-Dac6kcoy.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="20b06f81-58d5-4bdb-accd-aebf0a4b63e7",t._sentryDebugIdIdentifier="sentry-dbid-20b06f81-58d5-4bdb-accd-aebf0a4b63e7")}catch{}})();const wo=()=>{const{isAiCfoOpen:t,setIsAiCfoOpen:d}=zt(),O=se(),E=wt(),S=Ge(),u=B(g=>we(g)),{useFeatureGate:c}=Lt(),{isFeatureEnabled:F}=c(ge.isRealtimeInsightsFeatureEnabled),m=B(g=>g.expenseAutomationViewState.selectedPeriodByTenantId),o=B(g=>Un(g,u.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:f}=qt({isAiCfoOpen:t,setIsAiCfoOpen:d,mobileExploreReferrer:"Month-End Close Overview"}),y=s.useCallback((g,T,_=!1)=>{O(Ce({tenantId:T,period:{month:g.month,year:g.year},refreshViewInBackground:_}))},[]),M=s.useCallback(g=>{const T=S.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(g.month,g.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,T??null),O(Bn(u.tenantId,g))},[u.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),i=m[u.tenantId],h=s.useCallback(()=>{const g=S.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(i.month,i.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,g??null),y(i,u.tenantId,!0)},[y,i,u.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),w=Q(S.state?.pathnameStackToGoBack,S.pathname),A=s.useCallback(()=>{if(o.monthEndCloseChecks!=null&&i!=null){const g=o.monthEndCloseChecks.monthEndCloseCheckList.find(T=>T.progress<100);if(g!=null)return void E(`./${g.id}/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview"}});E(`./month_end_insights/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,i]),{areTenantIdsInSync:x}=$t();return Jt({isDataReady:o.fetchState==="Completed"}),s.useEffect(()=>{i!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&x&&y(i,u.tenantId)},[y,i,o.fetchState,u.tenantId,x]),s.useEffect(()=>{i!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&x&&O(Fn(i))},[i,o.monthClosePerformanceTrendFetchStatus.fetchState,x]),s.useEffect(()=>{const g=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&h()},3e5);return()=>clearInterval(g)},[o.fetchState]),s.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const g=S.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,g??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),p.jsx(xo,{children:p.jsx(co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:F,onMonthEndCheckClick:g=>{E(`./${g}/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:M,handleReviewButtonClick:A,onBackClick:()=>{E("../../dashboard")},onReload:h,isAiCfoAccessEnabled:v,onAskAiCfoClick:f})})},xo=De.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CGYcZ7Lh.js";import{a as r}from"./sentry-DCGk37l1.js";import{V as p,X as d,Z as m,p as b}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-CGYcZ7Lh.js";import{a as r}from"./sentry-DCGk37l1.js";import{V as p,X as d,Z as m,p as b}from"./index-DYZnhdtQ.js";import"./mui-DtCOffvy.js";import c from"./NotFoundScreen-D1ntYwuX.js";import{j as f,u}from"./core-CNZua1e0.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]="e19593e8-a6b1-4b24-a047-412781eae32b",e._sentryDebugIdIdentifier="sentry-dbid-e19593e8-a6b1-4b24-a047-412781eae32b")}catch{}})();const D=()=>{const e=f(),a=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=b(a.state?.pathnameStackToGoBack),l=n.poppedPathname??k();e(l,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=p(a.pathname);return o!=null?s.jsx(d,{menuItem:m(o),onDemoClick:t,onGoBack:i}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{D as F};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-CGYcZ7Lh.js";import{l as b,k as x,j,u as y,h as Z,q as ee,g as A,N as te,n as ae,o as p}from"./core-CNZua1e0.js";import{It as S,Iu as k,Iv as N,yP as $,yB as L,Iw as C,Ix as ne,Iy as oe,yF as ie,eN as I,yM as se,yJ as le}from"./zeni-epic-state-eW2EQdSt.js";import{K as g,o as r,k as re,d as v,j as E,s as de,p as ce,m as me,n as F,i as pe,c as ue,r as he,v as xe,h as ge,x as fe,y as we,w as be,A as ye,_ as Se,C as ke,E as ve}from"./index-
|
|
1
|
+
import{j as t}from"./liveblocks-CGYcZ7Lh.js";import{l as b,k as x,j,u as y,h as Z,q as ee,g as A,N as te,n as ae,o as p}from"./core-CNZua1e0.js";import{It as S,Iu as k,Iv as N,yP as $,yB as L,Iw as C,Ix as ne,Iy as oe,yF as ie,eN as I,yM as se,yJ as le}from"./zeni-epic-state-eW2EQdSt.js";import{K as g,o as r,k as re,d as v,j as E,s as de,p as ce,m as me,n as F,i as pe,c as ue,r as he,v as xe,h as ge,x as fe,y as we,w as be,A as ye,_ as Se,C as ke,E as ve}from"./index-DYZnhdtQ.js";import{n as c}from"./mui-DtCOffvy.js";import f from"./NotFoundScreen-D1ntYwuX.js";import{a as P}from"./sentry-DCGk37l1.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.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]="19b1f73b-1111-424b-94e2-0f55cd8f45ed",e._sentryDebugIdIdentifier="sentry-dbid-19b1f73b-1111-424b-94e2-0f55cd8f45ed")}catch{}})();const Ie=c.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-CGYcZ7Lh.js";import{a as u}from"./sentry-DCGk37l1.js";import{h as U,u as w,j as _,q as M,g as l,N as T}from"./core-CNZua1e0.js";import{z as r,h as P,D as V,e as A,d as N,f as q,q as R,w as W,g as $}from"./index-
|
|
1
|
+
import{j as f}from"./liveblocks-CGYcZ7Lh.js";import{a as u}from"./sentry-DCGk37l1.js";import{h as U,u as w,j as _,q as M,g as l,N as T}from"./core-CNZua1e0.js";import{z as r,h as P,D as V,e as A,d as N,f as q,q as R,w as W,g as $}from"./index-DYZnhdtQ.js";import{eM as B,Id as G,Io as H,Ie as J,eN as K,fh as Q,Ik as X,fF as Y,cR as Z,Ip as ee,Iq as te}from"./zeni-epic-state-eW2EQdSt.js";import{n as ne}from"./mui-DtCOffvy.js";import{u as se}from"./useDeviceId-SQLvKnL0.js";import{f as ae}from"./analyticsHelper-BLpyhiq6.js";import{t as ie}from"./getLocaleForTenant-DSkWweMK.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.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]="96bcedf1-f1e6-45b2-a573-b147fc6f53ee",t._sentryDebugIdIdentifier="sentry-dbid-96bcedf1-f1e6-45b2-a573-b147fc6f53ee")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=U(),a=w(),m=_(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),y=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=>B(e)),b=l(e=>G(e)),E=r.getSignedInUser(),v=P().mode;u.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,g)))},[n,p,t,i,g,s?.zeniSessionId]),u.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(J(b.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,b.tenantsInOrder),Y().then(()=>{const e=$();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,y,s,o,b,v,a.state,t]);const F=u.useCallback(()=>{m("/signin/auth")},[m]),j=u.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=u.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 f.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:j,onVerifyOtp:O,onCancelVerifyDevice:F});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return f.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||g==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return f.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return f.jsx(oe,{"data-testid":"smooth-loader",children:f.jsx(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|