@zeniai/web-app-ui 5.4.17-dev → 5.4.18-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/assets/{AccountMappingScreen-DIZ1qWql.js → AccountMappingScreen-4Zeu95kU.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-C6MMW6xe.js → ActualMatchingMatchDetailScreen-B6pl-MVl.js} +1 -1
  3. package/dist/assets/AddressRoutes-zjWkB0xf.js +1 -0
  4. package/dist/assets/{AddressScreen-CxRV-hrD.js → AddressScreen-Czlolp2X.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-Ct8ctLoM.js → AiCfoScreen-BhfmD__h.js} +1 -1
  6. package/dist/assets/{AppDrawer-DDlKiLbC.js → AppDrawer-B7GEeTxi.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-WPV-16X0.js → BillPayApprovalRoutes-B4dh4WxY.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-PQbxiOB3.js → BillPayRoutes-DZx-x_-P.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-DaAqJAwC.js → BusinessVerificationPageScreen-je1np7-9.js} +2 -2
  10. package/dist/assets/{CardsAiCfoScreen-CVenT1_U.js → CardsAiCfoScreen-abedaxWu.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-uCAqAWIA.js → ChargeCardRoutes-Db9V9An_.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-DtXzsb3x.js → CompanyPassportScreen-Db20J8Yl.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-BC1VQ6tg.js → ConnectionAuthScreen-BmJpUHtJ.js} +1 -1
  14. package/dist/assets/CustomerOnboardingAuthScreen-Deo-LVYJ.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-B6np-cNh.js → CustomerOnboardingRoutes-De4sHn4O.js} +3 -3
  16. package/dist/assets/{DashboardRoutes-9dawbCei.js → DashboardRoutes-CCGs4e1_.js} +3 -3
  17. package/dist/assets/{DefaultTenantHome-BgSSAKid.js → DefaultTenantHome-BN__AQ5l.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-u2HKaCWA.js → DomesticWireDetailScreen-6W-Er5_q.js} +3 -3
  19. package/dist/assets/{DrawerScreen-BmZb1i83.js → DrawerScreen-DUhkZI2Z.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-DV-gNWAZ.js → EntityDetailRoutes-BrJAd36h.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-DJyIDCG4.js → ExpenseAutomationRoutes-DcjeaHHd.js} +1 -1
  22. package/dist/assets/{FallBackRoute--cXyuVDR.js → FallBackRoute-orqRsHMl.js} +2 -2
  23. package/dist/assets/{FeaturePreviewScreen-DjPPDYKv.js → FeaturePreviewScreen-Dcu53_tf.js} +1 -1
  24. package/dist/assets/{HubSpotOAuthCallbackScreen-DL6_G6pe.js → HubSpotOAuthCallbackScreen-ClZsPGpZ.js} +1 -1
  25. package/dist/assets/{InboxNotificationsProvider-Daf1RQwd.js → InboxNotificationsProvider-DiTDJFwP.js} +1 -1
  26. package/dist/assets/{InvoicingRoutes-DKlu_pXq.js → InvoicingRoutes-BTvzZ8JV.js} +2 -2
  27. package/dist/assets/{MagicLinkRoutes-BkZcOPcj.js → MagicLinkRoutes-V1DxaNiW.js} +5 -5
  28. package/dist/assets/{MagicLinkSignInScreen-CmIZfa-U.js → MagicLinkSignInScreen-DnCx8Y6G.js} +1 -1
  29. package/dist/assets/{MobileAppDrawer-DTqKEh3f.js → MobileAppDrawer-Bql3K6nh.js} +1 -1
  30. package/dist/assets/NotFoundScreen-CTik05r2.js +1 -0
  31. package/dist/assets/{NotificationRoutes-BwTXq37O.js → NotificationRoutes-wSm6mA8N.js} +1 -1
  32. package/dist/assets/{OAuthConsentScreen-NPetpQky.js → OAuthConsentScreen-BELrcqAy.js} +1 -1
  33. package/dist/assets/{PandLWithForecastRoutes-eI5sgFXq.js → PandLWithForecastRoutes-Dpao8SIb.js} +1 -1
  34. package/dist/assets/{PaymentLinkScreen-C3fxjzB1.js → PaymentLinkScreen-vbM_NtP3.js} +1 -1
  35. package/dist/assets/{PeopleRoutes-B4kdNKMm.js → PeopleRoutes-CJeBX2Ca.js} +1 -1
  36. package/dist/assets/PerformanceRoutes-W4NxEUmH.js +1 -0
  37. package/dist/assets/{Preview-Cr2n9zp9.js → Preview-Db0nRlxD.js} +1 -1
  38. package/dist/assets/{QBOConnectionScreen-BLLJy6Ug.js → QBOConnectionScreen-BEn_CddB.js} +1 -1
  39. package/dist/assets/{ReimbursementApprovalRoutes-DX03V50m.js → ReimbursementApprovalRoutes-CSZJghRB.js} +1 -1
  40. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-y6N7Iuxh.js → ReimbursementApprovalRuleDetailScreen-kqCAU4nf.js} +1 -1
  41. package/dist/assets/{ReimbursementRoutes-50C6Ebhr.js → ReimbursementRoutes-BUZKWvJ7.js} +1 -1
  42. package/dist/assets/{ReportsRoutes-CPbwIPP-.js → ReportsRoutes-BUZ4r7hx.js} +1 -1
  43. package/dist/assets/{RewardsRoutes-cADkol8X.js → RewardsRoutes-DuYZ4TXP.js} +1 -1
  44. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-Bb90T06-.js → ScheduleDetailsPrepaidExpensesScreen-DN2DZsFw.js} +4 -4
  45. package/dist/assets/{ScreenRoutes-BOM6GDiC.js → ScreenRoutes-CxP9HSCe.js} +2 -2
  46. package/dist/assets/{SettingsRoutes-Dd8PYfpt.js → SettingsRoutes-CCWla9X1.js} +6 -6
  47. package/dist/assets/{SetupPagesScreen-BY0N32JD.js → SetupPagesScreen-C5PRNruc.js} +1 -1
  48. package/dist/assets/{SignInScreen-DGgeSRO8.js → SignInScreen-BScZ138a.js} +1 -1
  49. package/dist/assets/{SignOutScreen-DPsA_-Qd.js → SignOutScreen-Bk-Y8Sbv.js} +1 -1
  50. package/dist/assets/{TaskListScreen-yze1VNuP.js → TaskListScreen-C7smUYFP.js} +2 -2
  51. package/dist/assets/{TaskRoutes-B5s7sZXk.js → TaskRoutes-DPcu4NRR.js} +2 -2
  52. package/dist/assets/{TransactionDetailRoutes-D5llvRhv.js → TransactionDetailRoutes-yEwix446.js} +1 -1
  53. package/dist/assets/{TransactionDetailScreen-CebcYk9B.js → TransactionDetailScreen-CHzsnTr9.js} +1 -1
  54. package/dist/assets/{TransactionListRoutes-PnEvh6qc.js → TransactionListRoutes-ChJOrV96.js} +1 -1
  55. package/dist/assets/{TreasuryRoutes-DbBm2doo.js → TreasuryRoutes-C24SAGLB.js} +1 -1
  56. package/dist/assets/{VendorsRoutes-CQjAHjxC.js → VendorsRoutes-CVu8jS5h.js} +1 -1
  57. package/dist/assets/{WiseConfirmationScreen-d0_FJyyD.js → WiseConfirmationScreen-Dt6hB5m-.js} +1 -1
  58. package/dist/assets/{ZeniAccountRoutes-CrROItmj.js → ZeniAccountRoutes-D3ONSR9y.js} +7 -7
  59. package/dist/assets/{ZeniAccountStatementScreen-DiwM8zAQ.js → ZeniAccountStatementScreen-CmfHt6Wr.js} +1 -1
  60. package/dist/assets/{accountMappingHelper-DHkHknqJ.js → accountMappingHelper-CHQgwqfy.js} +1 -1
  61. package/dist/assets/{analytics-CabaUa1L.js → analytics-D051O7ML.js} +1 -1
  62. package/dist/assets/{analyticsHelper-BOs1nNPv.js → analyticsHelper-DkNc3mKz.js} +1 -1
  63. package/dist/assets/{core-BQ6YlWys.js → core-BBlQ3ArL.js} +1 -1
  64. package/dist/assets/{decodeURIComponentSafe-D_MvDEMm.js → decodeURIComponentSafe-YbpxzvKa.js} +1 -1
  65. package/dist/assets/{dnd-DL41lZFs.js → dnd-CU3yeazS.js} +1 -1
  66. package/dist/assets/{empty-CmBSqEpE.js → empty-B3C-udVF.js} +1 -1
  67. package/dist/assets/{empty-mwfdcHvm.js → empty-BiAWzWBi.js} +1 -1
  68. package/dist/assets/{emptyVideoElement-BIOkPHF6.js → emptyVideoElement-CRPwTqUS.js} +1 -1
  69. package/dist/assets/{epic-PdviWWJR.js → epic-DwBfFPJQ.js} +1 -1
  70. package/dist/assets/{expenseAutomationHelper-Bn2j121J.js → expenseAutomationHelper-SA0jUIyg.js} +1 -1
  71. package/dist/assets/{getLocaleForTenant-jg4r2V28.js → getLocaleForTenant-DTPcYF0O.js} +1 -1
  72. package/dist/assets/{index-Bfsx1pdD.js → index--CQENyaz.js} +1 -1
  73. package/dist/assets/{index-BNuLRh9K.js → index-CaztP9tz.js} +1 -1
  74. package/dist/assets/{index-DZBfE5XI.js → index-ClwW47Zs.js} +899 -904
  75. package/dist/assets/{index-Du1SP9oT.js → index-MRZKoeCT.js} +2 -2
  76. package/dist/assets/{index-B7zYAj-7.js → index-ae04Qn4V.js} +1 -1
  77. package/dist/assets/{index-CamOdFyi.js → index-fVadamkP.js} +1 -1
  78. package/dist/assets/{index-Deo5Hnb2.js → index-jomr_c-N.js} +1 -1
  79. package/dist/assets/{index-BiyVMPcR.js → index-s4pcd-16.js} +1 -1
  80. package/dist/assets/{lexical-BmxGnuDE.js → lexical-DVH-xgq1.js} +1 -1
  81. package/dist/assets/{liveblocks-UAxYbctH.js → liveblocks-CuUK5O_2.js} +1 -1
  82. package/dist/assets/{lottie-BPF4ysWw.js → lottie-Du4lbH8J.js} +1 -1
  83. package/dist/assets/{mui-DYo6Z7Si.js → mui--aGBnNu2.js} +1 -1
  84. package/dist/assets/{pathToGoBack-CxX9ql3A.js → pathToGoBack-DOePc_e5.js} +1 -1
  85. package/dist/assets/{pdf-CHT1_0Mk.js → pdf-CrvsvvW3.js} +3 -3
  86. package/dist/assets/{pdf-lib-BMce44-8.js → pdf-lib-Cvsvldn7.js} +1 -1
  87. package/dist/assets/{plaid-BNcFec4W.js → plaid-7P9b69CP.js} +1 -1
  88. package/dist/assets/{pusher-C1AzfTgV.js → pusher-DdvpIMG0.js} +1 -1
  89. package/dist/assets/{react-DZjZzXEf.js → react-B8GJK4jq.js} +1 -1
  90. package/dist/assets/{react-CT8AAIAI.js → react-Bz6aBujY.js} +1 -1
  91. package/dist/assets/{react-BnffftLd.js → react-CUlf2ISA.js} +1 -1
  92. package/dist/assets/{react-CSOME4pA.js → react-CjVSd3S9.js} +1 -1
  93. package/dist/assets/{react-B13-Yejj.js → react-D-JjM7p6.js} +1 -1
  94. package/dist/assets/{react-CjoLUzLz.js → react-DoYRVAKa.js} +1 -1
  95. package/dist/assets/{recharts-VJtr9O-6.js → recharts-CkREU3LH.js} +1 -1
  96. package/dist/assets/{reportTimeframe-D2vFkQK6.js → reportTimeframe-ChAOzqo_.js} +1 -1
  97. package/dist/assets/{routePaths-CaZTJQOM.js → routePaths-D0jOibXk.js} +1 -1
  98. package/dist/assets/{sentry-CQfqw6mU.js → sentry-D0lP5-8e.js} +1 -1
  99. package/dist/assets/{stripSplatSuffix-TzoGXcwz.js → stripSplatSuffix-CFosfir7.js} +1 -1
  100. package/dist/assets/{url-dVvWrnA9.js → url-GwD82u5j.js} +1 -1
  101. package/dist/assets/{url-OL55dppf.js → url-nN4BnP9N.js} +1 -1
  102. package/dist/assets/useActualMatchingMatchDetail-nJ3hpXEY.js +1 -0
  103. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-B4OxQoVy.js → useAiCfoDashboardSuggestedQuestionsChips-usJW6KKQ.js} +1 -1
  104. package/dist/assets/useAskAiCfoHostNavButtonProps-CWWQxV2L.js +1 -0
  105. package/dist/assets/{useChargeCardPusherEvents-Gp7Qmy_v.js → useChargeCardPusherEvents-DPfHk-vM.js} +1 -1
  106. package/dist/assets/{useDeviceId-B6KB8W5T.js → useDeviceId-pp3Grc-z.js} +1 -1
  107. package/dist/assets/{useEmailConnectResultRefresh-DJgvOf06.js → useEmailConnectResultRefresh-B6j7j1rG.js} +1 -1
  108. package/dist/assets/{useEnsureVendorListLoaded-BbjOUcqm.js → useEnsureVendorListLoaded-COBYTL2U.js} +1 -1
  109. package/dist/assets/{useInitialThreadRequest-BpNcTGLt.js → useInitialThreadRequest-DmfmyzKI.js} +1 -1
  110. package/dist/assets/{useTaskManagerAccess-CP331xWN.js → useTaskManagerAccess-DrmpkeUw.js} +1 -1
  111. package/dist/assets/{useTaskManagerPusherEvents-BmjCwNse.js → useTaskManagerPusherEvents-CHhZ2DRZ.js} +1 -1
  112. package/dist/assets/{utils-BpLD-La5.js → utils-Ctp9Zfhk.js} +1 -1
  113. package/dist/assets/{withTransactionSidePanel-7NlWHlVm.js → withTransactionSidePanel-CKC1_4cy.js} +1 -1
  114. package/dist/assets/{zeni-epic-state-j9Po26Lg.js → zeni-epic-state-aUBx6G2Q.js} +3 -3
  115. package/dist/index.html +1 -1
  116. package/package.json +2 -2
  117. package/dist/assets/AddressRoutes-DneYortX.js +0 -1
  118. package/dist/assets/CustomerOnboardingAuthScreen-DGFpytn-.js +0 -1
  119. package/dist/assets/NotFoundScreen-CY-XFa3a.js +0 -1
  120. package/dist/assets/PerformanceRoutes-CT8b6LEZ.js +0 -1
  121. package/dist/assets/useActualMatchingMatchDetail-DglThU_y.js +0 -1
  122. package/dist/assets/useAskAiCfoHostNavButtonProps-DV6iNvbF.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as r}from"./liveblocks-UAxYbctH.js";import Te from"./NotFoundScreen-CY-XFa3a.js";import{a as u}from"./sentry-CQfqw6mU.js";import{h as ee,u as ae,j as h,g as he,i as ge,N as Ee,l as be,n as Ie,o as g}from"./core-BQ6YlWys.js";import{QI as se,QL as De,QF as Ce,a1Q as Re,fI as te,a1H as ne,R7 as b,QZ as E,QC as _e,RC as ye,Rv as Ue,a1R as oe,gk as ie,a1S as J,a1T as Ge,Qy as ve,Qv as Ae,vc as xe,v0 as Be,mK as we,QX as je,a1U as Pe,RO as Fe,QT as Le,Rh as Ke,Re as Ne,QO as $e,Rb as Qe,R6 as Ze}from"./zeni-epic-state-j9Po26Lg.js";import{z as I,dj as Oe,j as ze,p as Ve,N as _,a5 as re,s as y,a9 as qe,d as W,U as Me,dk as He,_ as X,af as Je}from"./index-DZBfE5XI.js";import{n as We}from"./mui-DYo6Z7Si.js";import{u as Xe}from"./useInitialThreadRequest-BpNcTGLt.js";import{M as Ye}from"./MobileAppDrawer-DTqKEh3f.js";import{T as m,t as ea,b as aa,a as sa,c as ta,d as Y,e as na}from"./TaskListScreen-yze1VNuP.js";import{u as oa}from"./useTaskManagerPusherEvents-BmjCwNse.js";import"./recharts-VJtr9O-6.js";import"./analytics-CabaUa1L.js";import"./plaid-BNcFec4W.js";import"./dnd-DL41lZFs.js";import"./stripe-cKAAJElX.js";import"./lottie-BPF4ysWw.js";import"./lexical-BmxGnuDE.js";import"./pdf-CHT1_0Mk.js";import"./utils-BpLD-La5.js";import"./InboxNotificationsProvider-Daf1RQwd.js";import"./useTaskManagerAccess-CP331xWN.js";import"./useAskAiCfoHostNavButtonProps-DV6iNvbF.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]="646aae3a-3e01-452f-a2ce-cb9fbfd1c7ce",e._sentryDebugIdIdentifier="sentry-dbid-646aae3a-3e01-452f-a2ce-cb9fbfd1c7ce")}catch{}})();function ia(){const e=ee(),a=ae(),n=I.getSignedInUser(),{cannedResponses:c,fetchState:t,saveFetchState:l}=h((i=>i.cannedResponsesState)),d=u.useCallback((()=>{a(se())}),[a]),S=u.useCallback(((i,D,C)=>{a(De({name:i,content:D,cannedResponseId:C}))}),[a]),s=u.useCallback((i=>{a(Ce({cannedResponseId:i}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Oe,{cannedResponses:c,isLoading:t==="In-Progress"||t==="Not-Started",isSaving:l==="In-Progress",onBackClick:()=>e(-1),onDelete:s,onFetch:d,onSave:S})}const K=e=>e?.taskState?.taskByID,F=(e,a)=>{const n=K(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},ra=Re([F,(e,a)=>{const n=F(e,a),c=K(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=F(e,a),c=K(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}})),ca=be((function(e,a){const{location:n,taskGroupId:c}=a,t=oe(e,a.taskId),l=te(e),d=ra(e,a.taskId),S=t.taskGroupId??c,s=S!=null?J(e.taskGroupState,S):void 0,i=I.getSignedInUser(),D=l.tenantId,C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:D??""},A=ne(e),{tenantEmailDomain:x}=l,U=t.recurringSourceTaskId,B=U!=null?`${X.appUrl}/${x}/tasks/${encodeURIComponent(U)}`:void 0;return{taskDetailSelectorView:t,authParams:C,isZeniUser:I.isZeniUser(),userGroupList:Ge(e),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Je.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${X.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:B,tagListView:A,taskGroupName:S!=null&&s!=null&&s.isDefault===!1?s.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((f=>J(e.taskGroupState,f))).filter((f=>f!=null&&!f.isDeleted)).map((f=>({id:f.id,name:f.name,isDefault:f.isDefault}))),subtasks:t.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:t,location:l,taskGroupId:d}=a,{tenantEmailDomain:S}=t;return{onSaveChangesToLocalStore:s=>{e(Ze({taskDetailLocalData:s,taskId:n}))},onSaveDetailClick:s=>{e(Qe(n,s??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e($e(a.taskId))},onSnoozeTask:(s,i)=>{e(Ne(s,i))},onUnsnoozeTask:s=>{e(Ke(s))},onCreateSubtask:(s,i)=>{e(Le({...i,parentTaskId:s}))},onSubtaskUpdate:(s,i)=>{e(Fe({task:s,updates:i}))},onShowToast:s=>{e(ie(s))},onSubtaskRowClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:y(l.state?.pathnameStackToGoBack,l.pathname)}})},onParentBreadcrumbClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:y(l.state?.pathnameStackToGoBack,l.pathname)}})},onDismissClick:()=>{if(l.state?.message==="triggerBackClick"){const s=re(l.state?.pathnameStackToGoBack),i=s.poppedPathname??"../../dashboard";c(i,{state:{pathnameStackToGoBack:s.newStack}})}else{const s=v(S),i=y(l.state?.pathnameStackToGoBack,l.pathname);c(s,{state:{pathnameStackToGoBack:i}})}e(Pe({taskId:n}))},onDeleteTaskClick:()=>{e(je(n))},updateFilesEntity:s=>{e(we({files:s}))},onDeleteFile:s=>{e(Be(s))},onEditFileName:(s,i)=>{e(xe(s,i.split(".")[0]))},onReloadTaskDetailPage:()=>{e(b(!1,n))},onCreateTagClick:s=>{e(Ae(s,n))},onDeleteTagClick:s=>{e(ve(s,n))},onFetchCannedResponses:()=>{e(se())},onManageTemplatesClick:()=>{c(`/${t.tenantEmailDomain}/tasks/quick-responses`)}}}))(He);function L(){const e=ee(),a=ae(),n=he(),c=ze(),{taskId:t,taskGroupId:l}=ge(),d=h((o=>te(o))),S=Xe(d?.companyId),{useFeatureGate:s}=Ve(),{isFeatureEnabled:i}=s(_.isTaskSnoozeEnabled),{isFeatureEnabled:D}=s(_.isTaskVisibilityEnabled),{isFeatureEnabled:C}=s(_.isTaskCannedResponsesEnabled),{isFeatureEnabled:A}=s(_.isTaskRecurringParentEnabled),{isFeatureEnabled:x}=s(_.isTaskGroupAssigneesEnabled),[U,B]=u.useState(!1),[f,ce]=u.useState(!1),[N,le]=u.useState(!1),[$,w]=u.useState(!1),R=u.useRef(!1),G=h((o=>o.taskListState.updateTasksFetchState.fetchState)),Q=h((o=>ne(o))),Z=h((o=>o.taskGroupViewState.fetchState));u.useEffect((()=>{a(b(!1,t)),t!=null&&a(E(t))}),[a,t]);const O=I.getSignedInUser()?.userId,de=I.isZeniUser(),ke=h((o=>t!=null?o.taskState.taskByID[t]?.syncToken:void 0)),z=()=>{d?.tenantEmailDomain!=null&&e(v(d.tenantEmailDomain))},V=()=>{a(ie({messageSection:"delete_task",messageText:"success",type:"success"})),z()},ue=u.useMemo((()=>{const o=[m.TASK_CREATED,m.TASK_UPDATED,m.TASKS_BULK_UPDATED,m.TASKS_BULK_DELETED],k=[...o,m.TASK_SNOOZE_RESURFACED];return[...aa(d?.companyId,o),...sa(O,k)]}),[d?.companyId,O]);oa({events:ue,onSubscribed:()=>{t!=null&&(a(b(!0,t)),a(E(t)))},onEvent:(o,k)=>{if(t!=null)switch(o){case m.TASK_CREATED:case m.TASK_UPDATED:{const p=((P,me,{isZeniUser:Se,storedSyncToken:fe,taskId:H})=>{if(P!==m.TASK_CREATED&&P!==m.TASK_UPDATED)return"none";const T=ea(me);return T==null?"none":T.parent_task_id===H?"refreshSubtasks":P!==m.TASK_UPDATED||T.task_id!==H?"none":T.is_deleted===!0?"leaveDeleted":T.is_private!==!0||Se?T.sync_token!=null&&T.sync_token===fe?"none":"refreshTask":"leaveNoAccess"})(o,k,{isZeniUser:de,storedSyncToken:ke,taskId:t});p==="refreshTask"?(a(b(!0,t)),a(E(t))):p==="refreshSubtasks"?a(E(t)):p==="leaveDeleted"?V():p==="leaveNoAccess"&&z();break}case m.TASKS_BULK_UPDATED:{const p=Y(k);if(p==null)break;p.task_ids.includes(t)&&a(b(!0,t)),a(E(t));break}case m.TASKS_BULK_DELETED:{const p=Y(k);if(p==null)break;if(p.task_ids.includes(t)){V();break}a(E(t));break}case m.TASK_SNOOZE_RESURFACED:{ta(k)?.task_id===t&&a(b(!0,t));break}}}}),u.useEffect((()=>{f||Q.fetchState==="Completed"||(ce(!0),a(_e()))}),[f,a,Q.fetchState]),u.useEffect((()=>{N||Z==="Completed"||(le(!0),a(ye()))}),[N,a,Z]);const pe=u.useCallback((()=>{t!=null&&(R.current=!1,a(Ue([t],null,{isArchived:!1})),w(!0))}),[a,t]);u.useEffect((()=>{if($)if(G!=="In-Progress"){if(R.current){if(G==="Error")return w(!1),void(R.current=!1);if(G==="Completed"){w(!1),R.current=!1;const{tenantEmailDomain:o}=d;if(n.state?.message==="triggerBackClick"){const k=re(n.state?.pathnameStackToGoBack);e(k.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:k.newStack}})}else{const k=v(o);e(k,{state:{pathnameStackToGoBack:y(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else R.current=!0}),[$,G,d,n,e]);const q=h((o=>oe(o,t))),j=q.fetchState,M=I.getSignedInUser();if(M==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&q.error?.code===400){const{tenantEmailDomain:o}=d,k=v(o),p=y(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(Ee,{to:k,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[j==="Completed"?r.jsx(qe,{analytics:W,onLoad:o=>(k=>k.trackPageLoaded(Me.Event.taskDetailPage))(o)}):null,r.jsxs(la,{children:[r.jsx(Ye,{isAppContentDrawerOpen:U,handleDrawerToggle:o=>{B(o)}}),r.jsx(ca,{analytics:W,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:S,location:n,loggedInUser:M,navigate:e,taskGroupId:l,taskId:t,taskDetailFetchState:j,onUnarchiveTaskClick:pe,isTaskSnoozeEnabled:i,isTaskVisibilityEnabled:D,isTaskCannedResponsesEnabled:C,isTaskRecurringParentEnabled:A,isTaskGroupAssigneesEnabled:x})]})]})}const la=We.div`
1
+ import{j as r}from"./liveblocks-CuUK5O_2.js";import fe from"./NotFoundScreen-CTik05r2.js";import{a as u}from"./sentry-D0lP5-8e.js";import{h as ee,u as ae,j as h,g as he,i as ge,N as Ee,l as be,n as Ie,o as g}from"./core-BBlQ3ArL.js";import{QI as se,QL as De,QF as Ce,a1Q as Re,fI as te,a1H as ne,R7 as b,QZ as E,QC as _e,RC as ye,Rv as Ue,a1R as oe,gk as ie,a1S as J,a1T as Ge,Qy as ve,Qv as Ae,vc as xe,v0 as Be,mK as we,QX as je,a1U as Pe,RO as Fe,QT as Le,Rh as Ke,Re as Ne,QO as $e,Rb as Qe,R6 as Ze}from"./zeni-epic-state-aUBx6G2Q.js";import{z as I,dj as Oe,h as ze,p as Ve,N as _,a5 as re,q as y,a9 as qe,d as W,U as Me,dk as He,_ as X,af as Je}from"./index-ClwW47Zs.js";import{n as We}from"./mui--aGBnNu2.js";import{u as Xe}from"./useInitialThreadRequest-DmfmyzKI.js";import{M as Ye}from"./MobileAppDrawer-Bql3K6nh.js";import{T as m,t as ea,b as aa,a as sa,c as ta,d as Y,e as na}from"./TaskListScreen-C7smUYFP.js";import{u as oa}from"./useTaskManagerPusherEvents-CHhZ2DRZ.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./InboxNotificationsProvider-DiTDJFwP.js";import"./useTaskManagerAccess-DrmpkeUw.js";import"./useAskAiCfoHostNavButtonProps-CWWQxV2L.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]="03585e19-e699-4a2d-add3-4c71bbf78f5c",e._sentryDebugIdIdentifier="sentry-dbid-03585e19-e699-4a2d-add3-4c71bbf78f5c")}catch{}})();function ia(){const e=ee(),a=ae(),n=I.getSignedInUser(),{cannedResponses:c,fetchState:t,saveFetchState:l}=h((i=>i.cannedResponsesState)),d=u.useCallback((()=>{a(se())}),[a]),S=u.useCallback(((i,D,C)=>{a(De({name:i,content:D,cannedResponseId:C}))}),[a]),s=u.useCallback((i=>{a(Ce({cannedResponseId:i}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Oe,{cannedResponses:c,isLoading:t==="In-Progress"||t==="Not-Started",isSaving:l==="In-Progress",onBackClick:()=>e(-1),onDelete:s,onFetch:d,onSave:S})}const K=e=>e?.taskState?.taskByID,F=(e,a)=>{const n=K(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},ra=Re([F,(e,a)=>{const n=F(e,a),c=K(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=F(e,a),c=K(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}})),ca=be((function(e,a){const{location:n,taskGroupId:c}=a,t=oe(e,a.taskId),l=te(e),d=ra(e,a.taskId),S=t.taskGroupId??c,s=S!=null?J(e.taskGroupState,S):void 0,i=I.getSignedInUser(),D=l.tenantId,C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:D??""},A=ne(e),{tenantEmailDomain:x}=l,U=t.recurringSourceTaskId,B=U!=null?`${X.appUrl}/${x}/tasks/${encodeURIComponent(U)}`:void 0;return{taskDetailSelectorView:t,authParams:C,isZeniUser:I.isZeniUser(),userGroupList:Ge(e),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Je.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${X.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:B,tagListView:A,taskGroupName:S!=null&&s!=null&&s.isDefault===!1?s.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((T=>J(e.taskGroupState,T))).filter((T=>T!=null&&!T.isDeleted)).map((T=>({id:T.id,name:T.name,isDefault:T.isDefault}))),subtasks:t.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:t,location:l,taskGroupId:d}=a,{tenantEmailDomain:S}=t;return{onSaveChangesToLocalStore:s=>{e(Ze({taskDetailLocalData:s,taskId:n}))},onSaveDetailClick:s=>{e(Qe(n,s??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e($e(a.taskId))},onSnoozeTask:(s,i)=>{e(Ne(s,i))},onUnsnoozeTask:s=>{e(Ke(s))},onCreateSubtask:(s,i)=>{e(Le({...i,parentTaskId:s}))},onSubtaskUpdate:(s,i)=>{e(Fe({task:s,updates:i}))},onShowToast:s=>{e(ie(s))},onSubtaskRowClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:y(l.state?.pathnameStackToGoBack,l.pathname)}})},onParentBreadcrumbClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:y(l.state?.pathnameStackToGoBack,l.pathname)}})},onDismissClick:()=>{if(l.state?.message==="triggerBackClick"){const s=re(l.state?.pathnameStackToGoBack),i=s.poppedPathname??"../../dashboard";c(i,{state:{pathnameStackToGoBack:s.newStack}})}else{const s=v(S),i=y(l.state?.pathnameStackToGoBack,l.pathname);c(s,{state:{pathnameStackToGoBack:i}})}e(Pe({taskId:n}))},onDeleteTaskClick:()=>{e(je(n))},updateFilesEntity:s=>{e(we({files:s}))},onDeleteFile:s=>{e(Be(s))},onEditFileName:(s,i)=>{e(xe(s,i.split(".")[0]))},onReloadTaskDetailPage:()=>{e(b(!1,n))},onCreateTagClick:s=>{e(Ae(s,n))},onDeleteTagClick:s=>{e(ve(s,n))},onFetchCannedResponses:()=>{e(se())},onManageTemplatesClick:()=>{c(`/${t.tenantEmailDomain}/tasks/quick-responses`)}}}))(He);function L(){const e=ee(),a=ae(),n=he(),c=ze(),{taskId:t,taskGroupId:l}=ge(),d=h((o=>te(o))),S=Xe(d?.companyId),{useFeatureGate:s}=Ve(),{isFeatureEnabled:i}=s(_.isTaskSnoozeEnabled),{isFeatureEnabled:D}=s(_.isTaskVisibilityEnabled),{isFeatureEnabled:C}=s(_.isTaskCannedResponsesEnabled),{isFeatureEnabled:A}=s(_.isTaskRecurringParentEnabled),{isFeatureEnabled:x}=s(_.isTaskGroupAssigneesEnabled),[U,B]=u.useState(!1),[T,ce]=u.useState(!1),[N,le]=u.useState(!1),[$,w]=u.useState(!1),R=u.useRef(!1),G=h((o=>o.taskListState.updateTasksFetchState.fetchState)),Q=h((o=>ne(o))),Z=h((o=>o.taskGroupViewState.fetchState));u.useEffect((()=>{a(b(!1,t)),t!=null&&a(E(t))}),[a,t]);const O=I.getSignedInUser()?.userId,de=I.isZeniUser(),ke=h((o=>t!=null?o.taskState.taskByID[t]?.syncToken:void 0)),z=()=>{d?.tenantEmailDomain!=null&&e(v(d.tenantEmailDomain))},V=()=>{a(ie({messageSection:"delete_task",messageText:"success",type:"success"})),z()},ue=u.useMemo((()=>{const o=[m.TASK_CREATED,m.TASK_UPDATED,m.TASKS_BULK_UPDATED,m.TASKS_BULK_DELETED],k=[...o,m.TASK_SNOOZE_RESURFACED];return[...aa(d?.companyId,o),...sa(O,k)]}),[d?.companyId,O]);oa({events:ue,onSubscribed:()=>{t!=null&&(a(b(!0,t)),a(E(t)))},onEvent:(o,k)=>{if(t!=null)switch(o){case m.TASK_CREATED:case m.TASK_UPDATED:{const p=((P,me,{isZeniUser:Se,storedSyncToken:Te,taskId:H})=>{if(P!==m.TASK_CREATED&&P!==m.TASK_UPDATED)return"none";const f=ea(me);return f==null?"none":f.parent_task_id===H?"refreshSubtasks":P!==m.TASK_UPDATED||f.task_id!==H?"none":f.is_deleted===!0?"leaveDeleted":f.is_private!==!0||Se?f.sync_token!=null&&f.sync_token===Te?"none":"refreshTask":"leaveNoAccess"})(o,k,{isZeniUser:de,storedSyncToken:ke,taskId:t});p==="refreshTask"?(a(b(!0,t)),a(E(t))):p==="refreshSubtasks"?a(E(t)):p==="leaveDeleted"?V():p==="leaveNoAccess"&&z();break}case m.TASKS_BULK_UPDATED:{const p=Y(k);if(p==null)break;p.task_ids.includes(t)&&a(b(!0,t)),a(E(t));break}case m.TASKS_BULK_DELETED:{const p=Y(k);if(p==null)break;if(p.task_ids.includes(t)){V();break}a(E(t));break}case m.TASK_SNOOZE_RESURFACED:{ta(k)?.task_id===t&&a(b(!0,t));break}}}}),u.useEffect((()=>{T||Q.fetchState==="Completed"||(ce(!0),a(_e()))}),[T,a,Q.fetchState]),u.useEffect((()=>{N||Z==="Completed"||(le(!0),a(ye()))}),[N,a,Z]);const pe=u.useCallback((()=>{t!=null&&(R.current=!1,a(Ue([t],null,{isArchived:!1})),w(!0))}),[a,t]);u.useEffect((()=>{if($)if(G!=="In-Progress"){if(R.current){if(G==="Error")return w(!1),void(R.current=!1);if(G==="Completed"){w(!1),R.current=!1;const{tenantEmailDomain:o}=d;if(n.state?.message==="triggerBackClick"){const k=re(n.state?.pathnameStackToGoBack);e(k.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:k.newStack}})}else{const k=v(o);e(k,{state:{pathnameStackToGoBack:y(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else R.current=!0}),[$,G,d,n,e]);const q=h((o=>oe(o,t))),j=q.fetchState,M=I.getSignedInUser();if(M==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&q.error?.code===400){const{tenantEmailDomain:o}=d,k=v(o),p=y(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(Ee,{to:k,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[j==="Completed"?r.jsx(qe,{analytics:W,onLoad:o=>(k=>k.trackPageLoaded(Me.Event.taskDetailPage))(o)}):null,r.jsxs(la,{children:[r.jsx(Ye,{isAppContentDrawerOpen:U,handleDrawerToggle:o=>{B(o)}}),r.jsx(ca,{analytics:W,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:S,location:n,loggedInUser:M,navigate:e,taskGroupId:l,taskId:t,taskDetailFetchState:j,onUnarchiveTaskClick:pe,isTaskSnoozeEnabled:i,isTaskVisibilityEnabled:D,isTaskCannedResponsesEnabled:C,isTaskRecurringParentEnabled:A,isTaskGroupAssigneesEnabled:x})]})]})}const la=We.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,4 +6,4 @@ import{j as r}from"./liveblocks-UAxYbctH.js";import Te from"./NotFoundScreen-CY-
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,v=e=>`/${e}/tasks`;function Ba(){return r.jsxs(Ie,{children:[r.jsx(g,{path:"/new",element:r.jsx(L,{})}),r.jsx(g,{path:"/new/:taskGroupId",element:r.jsx(L,{})}),r.jsx(g,{path:"/group/:taskGroupId",element:r.jsx(na,{})}),r.jsx(g,{path:"/quick-responses",element:r.jsx(ia,{})}),r.jsx(g,{path:"/:taskId",element:r.jsx(L,{})}),r.jsx(g,{path:"*",element:r.jsx(Te,{})})]})}export{Ba as default};
9
+ `,v=e=>`/${e}/tasks`;function Ba(){return r.jsxs(Ie,{children:[r.jsx(g,{path:"/new",element:r.jsx(L,{})}),r.jsx(g,{path:"/new/:taskGroupId",element:r.jsx(L,{})}),r.jsx(g,{path:"/group/:taskGroupId",element:r.jsx(na,{})}),r.jsx(g,{path:"/quick-responses",element:r.jsx(ia,{})}),r.jsx(g,{path:"/:taskId",element:r.jsx(L,{})}),r.jsx(g,{path:"*",element:r.jsx(fe,{})})]})}export{Ba as default};
@@ -1 +1 @@
1
- import{j as c}from"./liveblocks-UAxYbctH.js";import G from"./NotFoundScreen-CY-XFa3a.js";import{a as n}from"./sentry-CQfqw6mU.js";import{u as ft,h as yt,g as bt,i as St,j as o,n as ht,o as f}from"./core-BQ6YlWys.js";import{fI as It,gZ as Lt,ma as Tt,ur as jt,a21 as Ct,VH as Et,a22 as gt,S7 as At,S8 as kt,ia as L,m8 as vt,us as xt,RZ as Dt,Sy as Nt,a23 as _t,a24 as wt,S4 as Ft,S1 as Mt,a25 as Rt,a26 as Ht,a27 as Pt}from"./zeni-epic-state-j9Po26Lg.js";import{p as qt,V as zt,N as z,dr as Ut,z as Vt,m as Bt,ci as Gt,d as U,ds as $t,af as Ot,G as Zt}from"./index-DZBfE5XI.js";import"./mui-DYo6Z7Si.js";import{d as Qt}from"./decodeURIComponentSafe-D_MvDEMm.js";import{u as Wt}from"./useEnsureVendorListLoaded-BbjOUcqm.js";import{a as Jt,i as T}from"./TransactionDetailScreen-CebcYk9B.js";import{t as Kt}from"./routePaths-CaZTJQOM.js";import"./recharts-VJtr9O-6.js";import"./analytics-CabaUa1L.js";import"./plaid-BNcFec4W.js";import"./dnd-DL41lZFs.js";import"./stripe-cKAAJElX.js";import"./lottie-BPF4ysWw.js";import"./lexical-BmxGnuDE.js";import"./pdf-CHT1_0Mk.js";import"./utils-BpLD-La5.js";import"./useAskAiCfoHostNavButtonProps-DV6iNvbF.js";import"./useInitialThreadRequest-BpNcTGLt.js";import"./expenseAutomationHelper-Bn2j121J.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]="2634a99c-e848-4ef8-99dd-778a50b5752d",e._sentryDebugIdIdentifier="sentry-dbid-2634a99c-e848-4ef8-99dd-778a50b5752d")}catch{}})();const Xt=["bank","credit_card","other_current_assets"],V=e=>`/${e}/month_end_close_checks/review/transaction_categorization`,{common:{currency:B}}=Zt.getLocalizedStrings();function Yt(){const e=ft(),d=yt(),m=bt(),{tenantEmailDomain:u,transactionTypeEncoded:$}=St(),{useFeatureGate:j}=qt(),O=zt(),{isFeatureEnabled:Z}=j(z.isCreateTransactionEnabled),{isFeatureEnabled:C}=j(z.isProjectsTransactionsEnabled),Q=Qt($??""),a=Pt.find((t=>t===Q)),S=o((t=>It(t))),E=Ut(S.companyId,a),g=o((t=>Lt(t.companyState,S.companyId)?.company.companyLocaleInfo)),W=g?.currencyCode??B.currencyCode,J=g?.currencySymbol??B.currencySymbol,A=o((t=>t.tenantState.currentTenantId)),k=Vt.getSignedInUser(),v=k?.userId??"",x=k?.zeniSessionId??"",K=n.useMemo((()=>({userId:v,sessionId:x,tenantId:A??""})),[v,x,A]),X=o((t=>Tt(t))),D=o((t=>jt(t))),N=D&&C===!0,h=o((t=>t.projectListState)),_=o((t=>t.projectState)),Y=n.useMemo((()=>Ct(_,h).projects),[_,h]),I=o((t=>Et(t,"common"))),w=o((t=>t.accountListState.byReportId.accountList.fetchState)),F=o((t=>t.accountListState.byReportId.createTransactionLineAccountList.fetchState)),M=o((t=>t.accountListState.byReportId.createTransactionPaymentAccountList.fetchState)),R=o((t=>t.classListState.fetchState)),s=o((t=>a!=null?gt(t,a):void 0));n.useEffect((()=>{if(a!=null)return e(At(a)),()=>{e(kt(a))}}),[e,a]);const tt=Bt(),et=o((t=>{const{activeTenantFetchState:i,currentTenantId:b,fetchState:mt,tenantsById:pt}=t.tenantState;return b!=null&&pt[b]!=null&&(i.fetchState==="Completed"||mt==="Completed")})),r=tt&&et;n.useEffect((()=>{r&&a==="transfer"&&w==="Not-Started"&&e(L("accountList"))}),[e,r,a,w]),n.useEffect((()=>{r&&F==="Not-Started"&&e(L("createTransactionLineAccountList"))}),[e,r,F]),n.useEffect((()=>{r&&M==="Not-Started"&&e(L("createTransactionPaymentAccountList",!1,!1,!1,!1,Xt))}),[e,r,M]),n.useEffect((()=>{r&&R==="Not-Started"&&e(vt())}),[e,r,R]);const H=h.fetchState;n.useEffect((()=>{r&&N&&H==="Not-Started"&&e(xt())}),[e,r,N,H]),Wt(r),Jt(r&&a==="transfer",!1);const at=n.useCallback(((t,i=[])=>{if(i.length>0&&e(Dt(i)),u==null)return;const b=Gt(m.state)??[V(u)];d(Kt(t,u),{replace:!0,state:{pathnameStackToGoBack:b}})}),[e,u,d,m.state]),nt=n.useCallback((()=>{m.key==="default"?u!=null&&d(V(u)):d(-1)}),[m.key,d,u]),ot=n.useCallback((t=>{e(Nt(t))}),[e]),P=n.useRef(void 0),p=s?.createStatus.error;n.useEffect((()=>{if(a==null||p==null)return;const t=`${p.code??""}-${p.message??""}`;P.current!==t&&(P.current=t,U.trackCreateTransactionFailed({transactionType:a,errorCode:p.code}))}),[p,a]);const y=n.useCallback((t=>t),[]),l=n.useMemo((()=>(s?.vendorList??[]).filter((t=>!t.isDeleted)).sort(((t,i)=>t.name.localeCompare(i.name)))),[s?.vendorList]),q=s?.localData.vendorId,st=n.useMemo((()=>{const t=l.find((i=>i.id===q));if(t!=null)return t.qboId!==""&&t.qboId!==t.name?t.qboId:t.name}),[l,q]),ct=o((t=>_t(t,st))),rt=n.useMemo((()=>y(l.map((t=>({id:t.id,label:t.name}))))),[l,y]),it=n.useMemo((()=>({...I,vendor:[...l.map((t=>({id:t.id,name:t.name,qboId:t.qboId,type:"vendor",zeniId:t.id}))),...I.vendor]})),[I,l]),dt=n.useMemo((()=>y((s?.transferAccountsList??[]).map((t=>({id:t.accountId,label:t.accountName}))))),[s?.transferAccountsList,y]),ut=n.useCallback((t=>{a!=null&&e(wt(a,t))}),[e,a]),lt=n.useCallback(((t,i)=>{a!=null&&e(Ft(a,i,t))}),[e,a]);return E==null?null:a!=null&&s!=null&&Z===!0&&E&&O?.connectionName!=="netsuite"?c.jsx($t,{analytics:U,attachmentUploadEndpoint:Ot.accountMicroServiceBaseUrl,authParams:K,createdTransactionId:s.createdTransactionId,transactionType:a,localData:s.localData,createStatus:s.createStatus,accountsHierarchyList:s.accountListNestedAccountHierarchy,paymentAccountsHierarchyList:s.paymentAccountListNestedAccountHierarchy,classHierarchyList:s.classListNestedAccountHierarchy,vendorOptions:rt,transferAccountOptions:dt,isAccountingClassesEnabled:X,isAccountingProjectsEnabled:D,isProjectsTransactionsEnabled:C===!0,projects:Y,currencyCode:W,currencySymbol:J,bookCloseDate:S.bookCloseDate?.toDate(),entityAutoCompleteView:it,vendorRecommendationFetchState:ct.fetchState,onUpdateLocalData:ut,onAddLine:()=>e(Ht(a)),onRemoveLine:t=>e(Rt(a,t)),onSubmit:()=>e(Mt(a)),onCancel:nt,onCreateTransactionComplete:at,onUploadAttachmentAttachment:ot,onFetchRecommendationsForVendor:lt}):c.jsx(G,{})}function Ce(){return c.jsxs(ht,{children:[c.jsx(f,{path:"/new/:transactionTypeEncoded",element:c.jsx(Yt,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId",element:c.jsx(T,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:c.jsx(G,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:c.jsx(T,{})}),c.jsx(f,{path:"/*",element:c.jsx(T,{})})]})}export{Ce as default};
1
+ import{j as c}from"./liveblocks-CuUK5O_2.js";import G from"./NotFoundScreen-CTik05r2.js";import{a as n}from"./sentry-D0lP5-8e.js";import{u as ft,h as yt,g as bt,i as St,j as o,n as ht,o as f}from"./core-BBlQ3ArL.js";import{fI as It,gZ as Lt,ma as Tt,ur as jt,a21 as Ct,VH as Et,a22 as gt,S7 as At,S8 as kt,ia as L,m8 as vt,us as xt,RZ as Dt,Sy as Nt,a23 as _t,a24 as wt,S4 as Ft,S1 as Mt,a25 as Rt,a26 as Ht,a27 as Pt}from"./zeni-epic-state-aUBx6G2Q.js";import{p as qt,V as zt,N as z,dr as Ut,z as Vt,k as Bt,ci as Gt,d as U,ds as $t,af as Ot,G as Zt}from"./index-ClwW47Zs.js";import"./mui--aGBnNu2.js";import{d as Qt}from"./decodeURIComponentSafe-YbpxzvKa.js";import{u as Wt}from"./useEnsureVendorListLoaded-COBYTL2U.js";import{a as Jt,i as T}from"./TransactionDetailScreen-CHzsnTr9.js";import{t as Kt}from"./routePaths-D0jOibXk.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./useAskAiCfoHostNavButtonProps-CWWQxV2L.js";import"./useInitialThreadRequest-DmfmyzKI.js";import"./expenseAutomationHelper-SA0jUIyg.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]="8dba798c-3b92-47b7-a252-903cdf7da52d",e._sentryDebugIdIdentifier="sentry-dbid-8dba798c-3b92-47b7-a252-903cdf7da52d")}catch{}})();const Xt=["bank","credit_card","other_current_assets"],V=e=>`/${e}/month_end_close_checks/review/transaction_categorization`,{common:{currency:B}}=Zt.getLocalizedStrings();function Yt(){const e=ft(),d=yt(),m=bt(),{tenantEmailDomain:u,transactionTypeEncoded:$}=St(),{useFeatureGate:j}=qt(),O=zt(),{isFeatureEnabled:Z}=j(z.isCreateTransactionEnabled),{isFeatureEnabled:C}=j(z.isProjectsTransactionsEnabled),Q=Qt($??""),a=Pt.find((t=>t===Q)),S=o((t=>It(t))),E=Ut(S.companyId,a),g=o((t=>Lt(t.companyState,S.companyId)?.company.companyLocaleInfo)),W=g?.currencyCode??B.currencyCode,J=g?.currencySymbol??B.currencySymbol,A=o((t=>t.tenantState.currentTenantId)),k=Vt.getSignedInUser(),v=k?.userId??"",x=k?.zeniSessionId??"",K=n.useMemo((()=>({userId:v,sessionId:x,tenantId:A??""})),[v,x,A]),X=o((t=>Tt(t))),D=o((t=>jt(t))),N=D&&C===!0,h=o((t=>t.projectListState)),_=o((t=>t.projectState)),Y=n.useMemo((()=>Ct(_,h).projects),[_,h]),I=o((t=>Et(t,"common"))),w=o((t=>t.accountListState.byReportId.accountList.fetchState)),F=o((t=>t.accountListState.byReportId.createTransactionLineAccountList.fetchState)),M=o((t=>t.accountListState.byReportId.createTransactionPaymentAccountList.fetchState)),R=o((t=>t.classListState.fetchState)),s=o((t=>a!=null?gt(t,a):void 0));n.useEffect((()=>{if(a!=null)return e(At(a)),()=>{e(kt(a))}}),[e,a]);const tt=Bt(),et=o((t=>{const{activeTenantFetchState:i,currentTenantId:b,fetchState:mt,tenantsById:pt}=t.tenantState;return b!=null&&pt[b]!=null&&(i.fetchState==="Completed"||mt==="Completed")})),r=tt&&et;n.useEffect((()=>{r&&a==="transfer"&&w==="Not-Started"&&e(L("accountList"))}),[e,r,a,w]),n.useEffect((()=>{r&&F==="Not-Started"&&e(L("createTransactionLineAccountList"))}),[e,r,F]),n.useEffect((()=>{r&&M==="Not-Started"&&e(L("createTransactionPaymentAccountList",!1,!1,!1,!1,Xt))}),[e,r,M]),n.useEffect((()=>{r&&R==="Not-Started"&&e(vt())}),[e,r,R]);const H=h.fetchState;n.useEffect((()=>{r&&N&&H==="Not-Started"&&e(xt())}),[e,r,N,H]),Wt(r),Jt(r&&a==="transfer",!1);const at=n.useCallback(((t,i=[])=>{if(i.length>0&&e(Dt(i)),u==null)return;const b=Gt(m.state)??[V(u)];d(Kt(t,u),{replace:!0,state:{pathnameStackToGoBack:b}})}),[e,u,d,m.state]),nt=n.useCallback((()=>{m.key==="default"?u!=null&&d(V(u)):d(-1)}),[m.key,d,u]),ot=n.useCallback((t=>{e(Nt(t))}),[e]),P=n.useRef(void 0),p=s?.createStatus.error;n.useEffect((()=>{if(a==null||p==null)return;const t=`${p.code??""}-${p.message??""}`;P.current!==t&&(P.current=t,U.trackCreateTransactionFailed({transactionType:a,errorCode:p.code}))}),[p,a]);const y=n.useCallback((t=>t),[]),l=n.useMemo((()=>(s?.vendorList??[]).filter((t=>!t.isDeleted)).sort(((t,i)=>t.name.localeCompare(i.name)))),[s?.vendorList]),q=s?.localData.vendorId,st=n.useMemo((()=>{const t=l.find((i=>i.id===q));if(t!=null)return t.qboId!==""&&t.qboId!==t.name?t.qboId:t.name}),[l,q]),ct=o((t=>_t(t,st))),rt=n.useMemo((()=>y(l.map((t=>({id:t.id,label:t.name}))))),[l,y]),it=n.useMemo((()=>({...I,vendor:[...l.map((t=>({id:t.id,name:t.name,qboId:t.qboId,type:"vendor",zeniId:t.id}))),...I.vendor]})),[I,l]),dt=n.useMemo((()=>y((s?.transferAccountsList??[]).map((t=>({id:t.accountId,label:t.accountName}))))),[s?.transferAccountsList,y]),ut=n.useCallback((t=>{a!=null&&e(wt(a,t))}),[e,a]),lt=n.useCallback(((t,i)=>{a!=null&&e(Ft(a,i,t))}),[e,a]);return E==null?null:a!=null&&s!=null&&Z===!0&&E&&O?.connectionName!=="netsuite"?c.jsx($t,{analytics:U,attachmentUploadEndpoint:Ot.accountMicroServiceBaseUrl,authParams:K,createdTransactionId:s.createdTransactionId,transactionType:a,localData:s.localData,createStatus:s.createStatus,accountsHierarchyList:s.accountListNestedAccountHierarchy,paymentAccountsHierarchyList:s.paymentAccountListNestedAccountHierarchy,classHierarchyList:s.classListNestedAccountHierarchy,vendorOptions:rt,transferAccountOptions:dt,isAccountingClassesEnabled:X,isAccountingProjectsEnabled:D,isProjectsTransactionsEnabled:C===!0,projects:Y,currencyCode:W,currencySymbol:J,bookCloseDate:S.bookCloseDate?.toDate(),entityAutoCompleteView:it,vendorRecommendationFetchState:ct.fetchState,onUpdateLocalData:ut,onAddLine:()=>e(Ht(a)),onRemoveLine:t=>e(Rt(a,t)),onSubmit:()=>e(Mt(a)),onCancel:nt,onCreateTransactionComplete:at,onUploadAttachmentAttachment:ot,onFetchRecommendationsForVendor:lt}):c.jsx(G,{})}function Ce(){return c.jsxs(ht,{children:[c.jsx(f,{path:"/new/:transactionTypeEncoded",element:c.jsx(Yt,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId",element:c.jsx(T,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:c.jsx(G,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:c.jsx(T,{})}),c.jsx(f,{path:"/*",element:c.jsx(T,{})})]})}export{Ce as default};
@@ -1,4 +1,4 @@
1
- import{j as _}from"./liveblocks-UAxYbctH.js";import{a as i}from"./sentry-CQfqw6mU.js";import{u as M,k as st,j as b,s as be,g as De,h as Ce,i as Ae,N as ct,l as it}from"./core-BQ6YlWys.js";import{pK as Ie,fI as te,gZ as rt,Yy as lt,oQ as dt,om as ut,E9 as Q,a1i as mt,gk as pt,bm as ft,eg as _e,bp as Re,t7 as H,$J as Y,a1j as we,_E as le,a03 as Pe,ml as Fe,a1k as xe,a07 as de,a08 as ue,na as Ue,T4 as me,VJ as $,mf as Ve,md as Le,mp as ht,px as St,_F as yt,_G as Tt,E0 as Z,mk as Be,Sp as Oe,cd as gt,d5 as bt,a1l as It,VH as vt,a1m as Et,a1n as kt,a1o as Dt,a1p as Ct,DY as At,a1q as _t,a1r as Rt,a1s as wt,a1t as Pt,$1 as Ft,mo as xt,a1u as Ut,a1v as Vt,VI as Lt,a1w as Bt,a1x as Ot,a1y as Nt,Sj as zt,S9 as jt,Sy as Mt,mq as Gt,T5 as ve,pC as $t}from"./zeni-epic-state-j9Po26Lg.js";import{p as J,N as w,d as q,dc as qt,z as Ne,a2 as Wt,dd as Ht,ac as Yt,a5 as ie,V as Jt,cg as Kt,s as re,al as Qt,ch as Zt,cj as Xt,de as en,af as tn,aj as ce}from"./index-DZBfE5XI.js";import{n as nn,S as an,u as on,D as sn}from"./mui-DYo6Z7Si.js";import{u as cn}from"./useAskAiCfoHostNavButtonProps-DV6iNvbF.js";import{d as ze}from"./decodeURIComponentSafe-D_MvDEMm.js";import{u as rn}from"./useInitialThreadRequest-BpNcTGLt.js";import{h as je,t as Me,g as ln,j as dn}from"./routePaths-CaZTJQOM.js";import{u as un}from"./expenseAutomationHelper-Bn2j121J.js";import{B as mn}from"./utils-BpLD-La5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ee4d30f8-c22b-40f5-8aa4-45ed0b2c7fee",t._sentryDebugIdIdentifier="sentry-dbid-ee4d30f8-c22b-40f5-8aa4-45ed0b2c7fee")}catch{}})();function pn(t=!0,e=!0){const o=M(),n=st(),{useFeatureGate:a}=J(),{isFeatureEnabled:s}=a(w.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||e&&s!==!0)return;const c=d=>{const f=n.getState().createTransferEntryState.transferAccountsByType[d].fetchState;return f!=="In-Progress"&&f!=="Completed"};c("transferEntryEligible")&&o(Ie({kind:"transferEntryEligible"})),c("creditCardOnlyEligible")&&o(Ie({kind:"creditCardOnlyEligible"}))}),[t,e,s,o,n])}function fn(t,e){const o=(function(){const d=M(),[f,h]=i.useState(!1),[D,p]=i.useState(null),[l,u]=i.useState(null),{useDynamicConfig:y}=J(),{configValue:v,isDynamicConfigLoading:S}=y("transaction_categorization_config"),T=!S&&v?.capitalization_enabled===!0,k=b((I=>te(I))),C=k.companyId,P=b((I=>rt(I.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:A,capitalizableAccountOverrides:F,dismissedAccounts:x}=b((I=>{const g=I.tenantState.currentTenantId,R=g!=null?I.tenantState.tenantsById[g]:void 0;return{capitalizableAccounts:R?.capitalizableAccounts??null,capitalizableAccountOverrides:R?.capitalizableAccountOverrides??null,dismissedAccounts:R?.capitalizationOnboardingDismissedAccounts??null}}),be),L=i.useRef(A);L.current=A;const U=i.useRef(F);U.current=F;const B=i.useRef(x);B.current=x;const O=b((I=>lt(I.accountState)),be),G=i.useMemo((()=>{const I={};for(const g of O)g.accountId!=null&&g.accountName!=null&&(I[g.accountId]=g.accountName);return I}),[O]),W=l!=null?G[l]??null:null,N=i.useCallback((I=>{if(!T)return;const g=L.current;if(g==null)return;const R=g.accounts??[],K=new Set(I),ne=U.current??{},ae=B.current;for(const z of R)if(K.has(z.accountId)&&ne[z.accountId]==null&&ae?.[z.accountId]==null)return p(z.classificationType),u(z.accountId),void h(!0)}),[T]),E=i.useCallback(((I,g)=>{d(dt(C,I,g,!0)),h(!1),p(null),u(null)}),[d,C]),r=i.useCallback((()=>{l!=null&&(d(ut(C,l)),h(!1),p(null),u(null))}),[d,C,l]);return{showPopup:f&&T,popupType:D,popupAccountId:l,popupAccountName:W,currencySymbol:P,checkAndShowPopup:N,handleSubmit:E,handleDismiss:r}})(),n=i.useRef(void 0),a=i.useRef([]),s=i.useRef(o.checkAndShowPopup);s.current=o.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(a.current=c.current()),t==="Completed"&&n.current==="In-Progress"&&a.current.length>0&&(s.current(a.current),a.current=[]),n.current=t}),[t]),o}const j=new Map,Ge=(t,e,o)=>`${t}|${e??""}|${o}`,X=(t,e)=>{const[o,n]=t.shownRecommendations;return{recommendationFor:t.dimension,recommendation:o?.name??"",recommendationSource:o?.engine??null,recommendationConfidencePercentage:o?.confidencePercentage??null,alternativeRecommendation:n?.name??null,alternativeRecommendationSource:n?.engine??null,alternativeRecommendationConfidencePercentage:n?.confidencePercentage??null,selectedValue:t.selected.name,numberOfRecommendations:t.shownRecommendations.length,transactionId:e,lineId:t.lineId??null}},ee=(t,e,o)=>({transactionId:e,lineId:t.lineId,dimension:t.dimension,outcome:t.outcome,selected:{name:t.selected.name,id:t.selected.id},matchedSource:t.matchedSource,matchedRank:t.matchedRank,topPickSource:t.topPickSource,shownRecommendations:t.shownRecommendations.map((n=>({source:n.source,rank:n.rank,value:{name:n.name,id:n.id},confidence:n.confidencePercentage!=null?n.confidencePercentage/100:void 0}))),...o}),Ee=(t,e)=>{j.set(Ge(e,t.lineId,t.dimension),{feedback:t,transactionId:e})},$e=(t,e,o)=>{q.trackRecommendationFeedbackRetracted(X(e,o)),t(Q(ee(e,o,{outcome:"retracted"})))},Bn=(t,e)=>{const o=new Set(e.map(String));j.forEach(((n,a)=>{o.has(n.transactionId)&&(j.delete(a),$e(t,n.feedback,n.transactionId))}))},On=t=>{const e=new Set(t.map(String));j.forEach(((o,n)=>{e.has(o.transactionId)&&j.delete(n)}))};function hn(t){const e=M(),[o,n]=i.useState(null),[a,s]=i.useState(!1),{fetchState:c}=b(mt),{isEnabled:d,fallbackTransactionId:f}=t,h=i.useCallback((u=>u.transactionId??f??""),[f]),D=i.useCallback((u=>{if(!d)return;const y=h(u);if(y==="")return;if(u.outcome!=="accepted")return void n(u);((S,T,k,C)=>{const P=Ge(T,k,C),A=j.get(P);return A!=null&&(j.delete(P),$e(S,A.feedback,A.transactionId),!0)})(e,y,u.lineId,u.dimension)||(((S,T)=>{q.trackRecommendationAccepted(X(S,T))})(u,y),e(Q(ee(u,y,{}))))}),[d,h,e]),p=i.useCallback((u=>{if(o==null)return;const y=h(o);((v,S,T)=>{q.trackRecommendationFeedbackSubmitted({...X(v,S),feedbackReason:T})})(o,y,u),e(Q(ee(o,y,{reasonText:u,skipped:!1}))),Ee(o,y),s(!0)}),[o,h,e]),l=i.useCallback((()=>{if(o==null)return;const u=h(o);((y,v)=>{q.trackRecommendationFeedbackSkipped(X(y,v))})(o,u),e(Q(ee(o,u,{skipped:!0}))),Ee(o,u),s(!1),n(null)}),[o,h,e]);return i.useEffect((()=>{if(!a||c!=="Completed"&&c!=="Error")return;s(!1),n(null);const u=c==="Completed";e(pt({messageSection:"recommendation_feedback",messageText:u?"success":"failed",type:u?"success":"error",showStatusIcon:!0}))}),[a,c,e]),{onRecommendationSelection:D,popup:o!=null?_.jsx(qt,{feedback:o,submitState:a?c:"Not-Started",onSubmit:p,onSkip:l}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=J(),{isFeatureEnabled:o}=e(w.isChainOfThoughtEnabled);return i.useMemo((()=>ft(t)&&o),[t,o])};function qe(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Nn(t,e){const o=M(),{useFeatureGate:n}=J(),a=b((r=>te(r))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&_e(a.userRole),d=a.userRole!=null&&Re(a.userRole),{isFeatureEnabled:f}=n(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=n(w.isExpenseAutomationEnabled),D=pe(),p=i.useMemo((()=>({id:t,type:H(e)})),[t,e]),l=b((r=>Y(r,p))),u=l?.transactionDetailUpdateStatus?.fetchState,y=l?.transactionDetailLocalData?.lineItemById,v=b((r=>{const I=Y(r,p)?.transactionDetailLocalData.vendorUpdates?.id;return I==null?"Not-Started":r.transactionVendorViewState.editVendorStateById[I]?.saveStatus.fetchState??"Not-Started"})),S=i.useMemo((()=>l?.fetchState==="Completed"?qe(l?.transaction):void 0),[l?.fetchState,l?.transaction]),T=b((r=>{if(S!=null)return we(r.customerIncomeState,r.vendorExpenseState,r.trendState,S,"month")})),k=b((r=>le(r))),C=b((r=>{if(S!=null)return Pe(r.trendWithTransactionsState,S,"TransactionDetail")})),P=a.company?.companyInfo.firstMonthOfFY??1,A=b((r=>Fe(r.accountState,r.accountListState,"accountList"))),[F,x]=i.useState(!1),[L,U]=i.useState(!1),[B,O]=i.useState(!1);i.useEffect((()=>{x(!1),U(!1),O(!1)}),[t,e]);const G=i.useCallback((()=>{x(!1),U(!1)}),[]),[W,N]=i.useState(!1),E=C?.selectedPeriod?.timePeriod;return i.useEffect((()=>{B||l==null||l.transaction==null||(o(xe({id:l.transaction.id,type:l.transaction.type})),O(!0)),S!=null&&(!s||c&&d===!1)&&(F?L||T==null||(U(!0),o(me(S,"TransactionDetail",{timeframe:"month",timePeriod:E??T}))):(o(de()),o(ue()),x(!0),o(Ue(S))))}),[o,B,l?.fetchState,l?.transaction,S,s,c,d,F,L,T,E]),i.useEffect((()=>{k.newVendorState?.vendorDetailLocalData?.vendorName!=null?N(!0):N(!1)}),[k.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o($("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:d,isVendorBulkUpdateOnTransactionEnabled:f,isExpenseAutomationEnabled:h,isChainOfThoughtEnabled:D,selectedTransaction:p,transactionDetail:l,rawDetailSaveStatus:u,rawDetailLineItemById:y,vendorSaveStatus:v,tranEntity:S,defaultTrendTransactionTimePeriod:T,vendorViewDetails:k,uiState:C,firstMonthOfFY:P,uncategorizedAccounts:A,resetTrendIsFetchedStates:G,isCreateVendorDrawerOpen:W,setIsCreateVendorDrawerOpen:N}}const Sn={overlayWidth:new Yt(100,100,58)},yn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=on(),c=Wt(),d=M(),f=b((p=>le(p))),h=()=>{n()},D={vendorDetailView:a??f,onSaveSuccess:()=>{d(Le()),d(ht("Not-Started")),o()},onSaveVendor:e,onCancelClick:h,saveVendorDetailLocalData:p=>{d(Ve({vendorId:void 0,localData:p}))}};return _.jsx(sn,{anchor:"right",open:t,PaperProps:{style:{width:Sn.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.4,cursor:"pointer"}}},onClose:h,children:_.jsx(Tn,{onClick:p=>p.stopPropagation(),children:_.jsx(Ht,{...D})})})},Tn=nn(an)`
1
+ import{j as _}from"./liveblocks-CuUK5O_2.js";import{a as i}from"./sentry-D0lP5-8e.js";import{u as M,k as st,j as b,s as be,g as De,h as Ce,i as Ae,N as ct,l as it}from"./core-BBlQ3ArL.js";import{pK as Ie,fI as te,gZ as rt,Yy as lt,oQ as dt,om as ut,E9 as Q,a1i as mt,gk as pt,bm as ft,eg as _e,bp as Re,t7 as H,$J as Y,a1j as we,_E as le,a03 as Pe,ml as Fe,a1k as xe,a07 as de,a08 as ue,na as Ue,T4 as me,VJ as $,mf as Ve,md as Le,mp as ht,px as St,_F as yt,_G as Tt,E0 as Z,mk as Be,Sp as Oe,cd as gt,d5 as bt,a1l as It,VH as vt,a1m as Et,a1n as kt,a1o as Dt,a1p as Ct,DY as At,a1q as _t,a1r as Rt,a1s as wt,a1t as Pt,$1 as Ft,mo as xt,a1u as Ut,a1v as Vt,VI as Lt,a1w as Bt,a1x as Ot,a1y as Nt,Sj as zt,S9 as jt,Sy as Mt,mq as Gt,T5 as ve,pC as $t}from"./zeni-epic-state-aUBx6G2Q.js";import{p as J,N as w,d as q,dc as qt,z as Ne,a2 as Wt,dd as Ht,ac as Yt,a5 as ie,V as Jt,cg as Kt,q as re,al as Qt,ch as Zt,cj as Xt,de as en,af as tn,aj as ce}from"./index-ClwW47Zs.js";import{n as nn,S as an,u as on,D as sn}from"./mui--aGBnNu2.js";import{u as cn}from"./useAskAiCfoHostNavButtonProps-CWWQxV2L.js";import{d as ze}from"./decodeURIComponentSafe-YbpxzvKa.js";import{u as rn}from"./useInitialThreadRequest-DmfmyzKI.js";import{h as je,t as Me,g as ln,j as dn}from"./routePaths-D0jOibXk.js";import{u as un}from"./expenseAutomationHelper-SA0jUIyg.js";import{B as mn}from"./utils-Ctp9Zfhk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="c51a14d6-def9-487c-8041-d06e56b3e7bb",t._sentryDebugIdIdentifier="sentry-dbid-c51a14d6-def9-487c-8041-d06e56b3e7bb")}catch{}})();function pn(t=!0,e=!0){const o=M(),n=st(),{useFeatureGate:a}=J(),{isFeatureEnabled:s}=a(w.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||e&&s!==!0)return;const c=d=>{const f=n.getState().createTransferEntryState.transferAccountsByType[d].fetchState;return f!=="In-Progress"&&f!=="Completed"};c("transferEntryEligible")&&o(Ie({kind:"transferEntryEligible"})),c("creditCardOnlyEligible")&&o(Ie({kind:"creditCardOnlyEligible"}))}),[t,e,s,o,n])}function fn(t,e){const o=(function(){const d=M(),[f,h]=i.useState(!1),[D,p]=i.useState(null),[l,u]=i.useState(null),{useDynamicConfig:y}=J(),{configValue:v,isDynamicConfigLoading:S}=y("transaction_categorization_config"),T=!S&&v?.capitalization_enabled===!0,k=b((I=>te(I))),C=k.companyId,P=b((I=>rt(I.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:A,capitalizableAccountOverrides:F,dismissedAccounts:x}=b((I=>{const g=I.tenantState.currentTenantId,R=g!=null?I.tenantState.tenantsById[g]:void 0;return{capitalizableAccounts:R?.capitalizableAccounts??null,capitalizableAccountOverrides:R?.capitalizableAccountOverrides??null,dismissedAccounts:R?.capitalizationOnboardingDismissedAccounts??null}}),be),L=i.useRef(A);L.current=A;const U=i.useRef(F);U.current=F;const B=i.useRef(x);B.current=x;const O=b((I=>lt(I.accountState)),be),G=i.useMemo((()=>{const I={};for(const g of O)g.accountId!=null&&g.accountName!=null&&(I[g.accountId]=g.accountName);return I}),[O]),W=l!=null?G[l]??null:null,N=i.useCallback((I=>{if(!T)return;const g=L.current;if(g==null)return;const R=g.accounts??[],K=new Set(I),ne=U.current??{},ae=B.current;for(const z of R)if(K.has(z.accountId)&&ne[z.accountId]==null&&ae?.[z.accountId]==null)return p(z.classificationType),u(z.accountId),void h(!0)}),[T]),E=i.useCallback(((I,g)=>{d(dt(C,I,g,!0)),h(!1),p(null),u(null)}),[d,C]),r=i.useCallback((()=>{l!=null&&(d(ut(C,l)),h(!1),p(null),u(null))}),[d,C,l]);return{showPopup:f&&T,popupType:D,popupAccountId:l,popupAccountName:W,currencySymbol:P,checkAndShowPopup:N,handleSubmit:E,handleDismiss:r}})(),n=i.useRef(void 0),a=i.useRef([]),s=i.useRef(o.checkAndShowPopup);s.current=o.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(a.current=c.current()),t==="Completed"&&n.current==="In-Progress"&&a.current.length>0&&(s.current(a.current),a.current=[]),n.current=t}),[t]),o}const j=new Map,Ge=(t,e,o)=>`${t}|${e??""}|${o}`,X=(t,e)=>{const[o,n]=t.shownRecommendations;return{recommendationFor:t.dimension,recommendation:o?.name??"",recommendationSource:o?.engine??null,recommendationConfidencePercentage:o?.confidencePercentage??null,alternativeRecommendation:n?.name??null,alternativeRecommendationSource:n?.engine??null,alternativeRecommendationConfidencePercentage:n?.confidencePercentage??null,selectedValue:t.selected.name,numberOfRecommendations:t.shownRecommendations.length,transactionId:e,lineId:t.lineId??null}},ee=(t,e,o)=>({transactionId:e,lineId:t.lineId,dimension:t.dimension,outcome:t.outcome,selected:{name:t.selected.name,id:t.selected.id},matchedSource:t.matchedSource,matchedRank:t.matchedRank,topPickSource:t.topPickSource,shownRecommendations:t.shownRecommendations.map((n=>({source:n.source,rank:n.rank,value:{name:n.name,id:n.id},confidence:n.confidencePercentage!=null?n.confidencePercentage/100:void 0}))),...o}),Ee=(t,e)=>{j.set(Ge(e,t.lineId,t.dimension),{feedback:t,transactionId:e})},$e=(t,e,o)=>{q.trackRecommendationFeedbackRetracted(X(e,o)),t(Q(ee(e,o,{outcome:"retracted"})))},Bn=(t,e)=>{const o=new Set(e.map(String));j.forEach(((n,a)=>{o.has(n.transactionId)&&(j.delete(a),$e(t,n.feedback,n.transactionId))}))},On=t=>{const e=new Set(t.map(String));j.forEach(((o,n)=>{e.has(o.transactionId)&&j.delete(n)}))};function hn(t){const e=M(),[o,n]=i.useState(null),[a,s]=i.useState(!1),{fetchState:c}=b(mt),{isEnabled:d,fallbackTransactionId:f}=t,h=i.useCallback((u=>u.transactionId??f??""),[f]),D=i.useCallback((u=>{if(!d)return;const y=h(u);if(y==="")return;if(u.outcome!=="accepted")return void n(u);((S,T,k,C)=>{const P=Ge(T,k,C),A=j.get(P);return A!=null&&(j.delete(P),$e(S,A.feedback,A.transactionId),!0)})(e,y,u.lineId,u.dimension)||(((S,T)=>{q.trackRecommendationAccepted(X(S,T))})(u,y),e(Q(ee(u,y,{}))))}),[d,h,e]),p=i.useCallback((u=>{if(o==null)return;const y=h(o);((v,S,T)=>{q.trackRecommendationFeedbackSubmitted({...X(v,S),feedbackReason:T})})(o,y,u),e(Q(ee(o,y,{reasonText:u,skipped:!1}))),Ee(o,y),s(!0)}),[o,h,e]),l=i.useCallback((()=>{if(o==null)return;const u=h(o);((y,v)=>{q.trackRecommendationFeedbackSkipped(X(y,v))})(o,u),e(Q(ee(o,u,{skipped:!0}))),Ee(o,u),s(!1),n(null)}),[o,h,e]);return i.useEffect((()=>{if(!a||c!=="Completed"&&c!=="Error")return;s(!1),n(null);const u=c==="Completed";e(pt({messageSection:"recommendation_feedback",messageText:u?"success":"failed",type:u?"success":"error",showStatusIcon:!0}))}),[a,c,e]),{onRecommendationSelection:D,popup:o!=null?_.jsx(qt,{feedback:o,submitState:a?c:"Not-Started",onSubmit:p,onSkip:l}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=J(),{isFeatureEnabled:o}=e(w.isChainOfThoughtEnabled);return i.useMemo((()=>ft(t)&&o),[t,o])};function qe(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Nn(t,e){const o=M(),{useFeatureGate:n}=J(),a=b((r=>te(r))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&_e(a.userRole),d=a.userRole!=null&&Re(a.userRole),{isFeatureEnabled:f}=n(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=n(w.isExpenseAutomationEnabled),D=pe(),p=i.useMemo((()=>({id:t,type:H(e)})),[t,e]),l=b((r=>Y(r,p))),u=l?.transactionDetailUpdateStatus?.fetchState,y=l?.transactionDetailLocalData?.lineItemById,v=b((r=>{const I=Y(r,p)?.transactionDetailLocalData.vendorUpdates?.id;return I==null?"Not-Started":r.transactionVendorViewState.editVendorStateById[I]?.saveStatus.fetchState??"Not-Started"})),S=i.useMemo((()=>l?.fetchState==="Completed"?qe(l?.transaction):void 0),[l?.fetchState,l?.transaction]),T=b((r=>{if(S!=null)return we(r.customerIncomeState,r.vendorExpenseState,r.trendState,S,"month")})),k=b((r=>le(r))),C=b((r=>{if(S!=null)return Pe(r.trendWithTransactionsState,S,"TransactionDetail")})),P=a.company?.companyInfo.firstMonthOfFY??1,A=b((r=>Fe(r.accountState,r.accountListState,"accountList"))),[F,x]=i.useState(!1),[L,U]=i.useState(!1),[B,O]=i.useState(!1);i.useEffect((()=>{x(!1),U(!1),O(!1)}),[t,e]);const G=i.useCallback((()=>{x(!1),U(!1)}),[]),[W,N]=i.useState(!1),E=C?.selectedPeriod?.timePeriod;return i.useEffect((()=>{B||l==null||l.transaction==null||(o(xe({id:l.transaction.id,type:l.transaction.type})),O(!0)),S!=null&&(!s||c&&d===!1)&&(F?L||T==null||(U(!0),o(me(S,"TransactionDetail",{timeframe:"month",timePeriod:E??T}))):(o(de()),o(ue()),x(!0),o(Ue(S))))}),[o,B,l?.fetchState,l?.transaction,S,s,c,d,F,L,T,E]),i.useEffect((()=>{k.newVendorState?.vendorDetailLocalData?.vendorName!=null?N(!0):N(!1)}),[k.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o($("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:d,isVendorBulkUpdateOnTransactionEnabled:f,isExpenseAutomationEnabled:h,isChainOfThoughtEnabled:D,selectedTransaction:p,transactionDetail:l,rawDetailSaveStatus:u,rawDetailLineItemById:y,vendorSaveStatus:v,tranEntity:S,defaultTrendTransactionTimePeriod:T,vendorViewDetails:k,uiState:C,firstMonthOfFY:P,uncategorizedAccounts:A,resetTrendIsFetchedStates:G,isCreateVendorDrawerOpen:W,setIsCreateVendorDrawerOpen:N}}const Sn={overlayWidth:new Yt(100,100,58)},yn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=on(),c=Wt(),d=M(),f=b((p=>le(p))),h=()=>{n()},D={vendorDetailView:a??f,onSaveSuccess:()=>{d(Le()),d(ht("Not-Started")),o()},onSaveVendor:e,onCancelClick:h,saveVendorDetailLocalData:p=>{d(Ve({vendorId:void 0,localData:p}))}};return _.jsx(sn,{anchor:"right",open:t,PaperProps:{style:{width:Sn.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.4,cursor:"pointer"}}},onClose:h,children:_.jsx(Tn,{onClick:p=>p.stopPropagation(),children:_.jsx(Ht,{...D})})})},Tn=nn(an)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-UAxYbctH.js";import{h as W,g as N,u as Z,i as H,j as g,N as U,l as K,n as Ce,o as C}from"./core-BQ6YlWys.js";import{fI as q,ur as Q,lq as p,eI as ee,SX as Ae,bv as me,XU as Me,ma as te,XV as ae,XW as pe,XX as Be,bE as k,ST as Se,XY as Le,XZ as fe,X_ as Fe,SW as he,X$ as Oe,Y0 as Te,Y1 as ze,Y2 as ge,Y3 as Ge,Y4 as we,Y5 as De,U8 as $e}from"./zeni-epic-state-j9Po26Lg.js";import{p as ne,N as ce,d as L,G as Ie,b6 as oe,s as R,a5 as se,aC as Re,f as Xe}from"./index-DZBfE5XI.js";import"./mui-DYo6Z7Si.js";import{a as y}from"./sentry-CQfqw6mU.js";import{w as ie}from"./withTransactionSidePanel-7NlWHlVm.js";import{p as re,t as de}from"./routePaths-CaZTJQOM.js";import{c as _e}from"./utils-BpLD-La5.js";import{d as j}from"./decodeURIComponentSafe-D_MvDEMm.js";import{Z as Ve}from"./ZeniAccountStatementScreen-DiwM8zAQ.js";import"./recharts-VJtr9O-6.js";import"./analytics-CabaUa1L.js";import"./plaid-BNcFec4W.js";import"./dnd-DL41lZFs.js";import"./stripe-cKAAJElX.js";import"./lottie-BPF4ysWw.js";import"./lexical-BmxGnuDE.js";import"./pdf-CHT1_0Mk.js";import"./useAskAiCfoHostNavButtonProps-DV6iNvbF.js";import"./TransactionDetailScreen-CebcYk9B.js";import"./useInitialThreadRequest-BpNcTGLt.js";import"./expenseAutomationHelper-Bn2j121J.js";import"./stripSplatSuffix-TzoGXcwz.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="490ba5bf-7260-459e-8b51-042c01e0b4df",a._sentryDebugIdIdentifier="sentry-dbid-490ba5bf-7260-459e-8b51-042c01e0b4df")}catch{}})();const Ne=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],V=a=>_e(a),ke=()=>{const{common:a,uncategorizedTransactionList:e}=Ie.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},Ue=K((function(a,e){const t=Me(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,V(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=V(e.selectedAccount.tranListType),d=We(t,n,c,o,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(pe({uiState:{dateRange:d},type:V(e.selectedAccount.tranListType)})),a(Ae(o,p(d),!1,o==="missingReceipts"?ke():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({uiState:{scrollYOffset:t},type:V(e.selectedAccount.tranListType)}))}}}))(oe),_=ie((function({...a}){const e=W(),t=N(),n=Z(),c=t.pathname.split("/").find((l=>Ne.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=H(),{accountType:Y,title:b,subTitle:A}=qe(o),f="month",T=g((l=>q(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ne(),{isFeatureEnabled:h}=S(ce.isProjectsTransactionsEnabled),I=g((l=>Q(l)))&&h,{dataAvailable:x,initialTimeframeTick:F}=Je(o,v,T.bookCloseDate),[P,O]=y.useState(!1),[E,z]=y.useState(void 0),u=y.useMemo((()=>{const l=p(F);return{tranListType:o,accountType:ee(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const l=V(u.tranListType);n(Ae(l,u.period,!0,l==="missingReceipts"?ke():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(U,{to:"../"}):s.jsx(Ue,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>z(l),...a})})),qe=a=>{let e="",t="";const n=Ie.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},Je=(a,e,t)=>{const n=me();let c=me().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},We=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ze=K((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ye();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(Se(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),He=ie((function({referrerType:a,...e}){const t=W(),n=N(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=H(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),F=g((r=>Be(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[E,z]=y.useState(void 0),u=g((r=>q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),w=g((r=>Q(r)))&&m;let i;const G=Ke(S,h,I,A,f,T,x);if(G){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=Qe(F?.dateRange,r);i={accountId:h,accountType:ee(S),classId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(Se(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const X=[d,Y,b,A,f,T,v].filter((r=>r!=null));return G&&B!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>z(r),...e}):s.jsx(U,{to:Ye(X.length)})})),Ye=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ke=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,Qe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),et=K((function(a,e){const t=Oe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),tt=ie((function({referrerType:a,...e}){const t=W(),n=N(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=H(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),F=g((r=>Fe(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[E,z]=y.useState(void 0),u=g((r=>q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),w=g((r=>Q(r)))&&m;let i;const G=at(S,h,I,A,f,T,x);if(G){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=nt(F?.dateRange,r);i={accountId:h,accountType:ee(S),projectId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const X=[d,Y,b,A,f,T,v].filter((r=>r!=null));return G&&B!=null?s.jsx(et,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>z(r),...e}):s.jsx(U,{to:be(X.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},at=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,nt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ct=K((function(a,e){const t=Ge(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=it(e.tenantEmailDomain),n=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),ye=ie((function({referrerType:a,...e}){const t=W(),n=N(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=H(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(v!=null&&v==="exclude_subaccounts"),F=g((D=>ze(D.transactionListState,h,S))),[P,O]=y.useState(!1),[E,z]=y.useState(void 0),u=g((D=>q(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const w=ot(S,h,b,A,f,I);if(w){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=st(F?.dateRange,D);m={accountId:h,accountType:ee(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:G}=ne(),B=y.useCallback(((D,le)=>{if(o==null)return;const ue=D.url.split(`/${o}/`)[1];if(ue==null)return;const[Ee,je]=ue.split("?"),J=new URLSearchParams(je??"");J.set("view","full"),J.set("thread_id",le),J.set("entity_type",D.entityType);const xe=R(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${Ee}?${J.toString()}`,{state:{pathnameStackToGoBack:xe}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:X}=G(ce.isProjectsTransactionsEnabled),r=g((D=>Q(D)))&&X,{areTenantIdsInSync:$}=Re();y.useEffect((()=>{!P&&m!=null&&$&&(O(!0),L.trackTransactionList(m.accountId,void 0,a,m.title),c(ge(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,$]);const Pe=[d,Y,b,A,f,T].filter((D=>D!=null));return w&&i!=null?s.jsx(ct,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,onCommentThreadClick:B,showProjectField:r,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>z(D),...e}):s.jsx(U,{to:ve(Pe.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},ot=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,st=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),it=a=>`/${a}/transactions/${$e}/statements`;function Mt(){const a=N().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>q(n))).tenantId],t=Xe();return s.jsxs(Ce,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Ve,{})}),s.jsx(C,{path:"/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(_,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(_,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(_,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(_,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(U,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(_,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(He,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(tt,{referrerType:a})})]})}export{Mt as default};
1
+ import{j as s}from"./liveblocks-CuUK5O_2.js";import{h as W,g as N,u as Z,i as H,j as g,N as q,l as K,n as Ce,o as C}from"./core-BBlQ3ArL.js";import{fI as U,ur as Q,lq as p,eI as ee,SX as Ae,bv as me,XU as Me,ma as te,XV as ae,XW as pe,XX as Be,bE as k,ST as Se,XY as Le,XZ as fe,X_ as Fe,SW as he,X$ as Oe,Y0 as Te,Y1 as ze,Y2 as ge,Y3 as Ge,Y4 as we,Y5 as De,U8 as $e}from"./zeni-epic-state-aUBx6G2Q.js";import{p as ne,N as ce,d as L,G as Ie,b6 as oe,q as R,a5 as se,aC as Re,x as Xe}from"./index-ClwW47Zs.js";import"./mui--aGBnNu2.js";import{a as y}from"./sentry-D0lP5-8e.js";import{w as ie}from"./withTransactionSidePanel-CKC1_4cy.js";import{p as re,t as de}from"./routePaths-D0jOibXk.js";import{c as _e}from"./utils-Ctp9Zfhk.js";import{d as j}from"./decodeURIComponentSafe-YbpxzvKa.js";import{Z as Ve}from"./ZeniAccountStatementScreen-CmfHt6Wr.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./useAskAiCfoHostNavButtonProps-CWWQxV2L.js";import"./TransactionDetailScreen-CHzsnTr9.js";import"./useInitialThreadRequest-DmfmyzKI.js";import"./expenseAutomationHelper-SA0jUIyg.js";import"./stripSplatSuffix-CFosfir7.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="bd37c9b9-4905-429f-b0b8-ab362965bcb9",a._sentryDebugIdIdentifier="sentry-dbid-bd37c9b9-4905-429f-b0b8-ab362965bcb9")}catch{}})();const Ne=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],V=a=>_e(a),ke=()=>{const{common:a,uncategorizedTransactionList:e}=Ie.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},qe=K((function(a,e){const t=Me(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,V(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=V(e.selectedAccount.tranListType),d=We(t,n,c,o,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(pe({uiState:{dateRange:d},type:V(e.selectedAccount.tranListType)})),a(Ae(o,p(d),!1,o==="missingReceipts"?ke():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({uiState:{scrollYOffset:t},type:V(e.selectedAccount.tranListType)}))}}}))(oe),_=ie((function({...a}){const e=W(),t=N(),n=Z(),c=t.pathname.split("/").find((l=>Ne.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=H(),{accountType:Y,title:b,subTitle:A}=Ue(o),f="month",T=g((l=>U(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ne(),{isFeatureEnabled:h}=S(ce.isProjectsTransactionsEnabled),I=g((l=>Q(l)))&&h,{dataAvailable:x,initialTimeframeTick:F}=Je(o,v,T.bookCloseDate),[P,O]=y.useState(!1),[E,z]=y.useState(void 0),u=y.useMemo((()=>{const l=p(F);return{tranListType:o,accountType:ee(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const l=V(u.tranListType);n(Ae(l,u.period,!0,l==="missingReceipts"?ke():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(q,{to:"../"}):s.jsx(qe,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>z(l),...a})})),Ue=a=>{let e="",t="";const n=Ie.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},Je=(a,e,t)=>{const n=me();let c=me().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},We=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ze=K((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ye();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(Se(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),He=ie((function({referrerType:a,...e}){const t=W(),n=N(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=H(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),F=g((r=>Be(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[E,z]=y.useState(void 0),u=g((r=>U(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),w=g((r=>Q(r)))&&m;let i;const G=Ke(S,h,I,A,f,T,x);if(G){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=Qe(F?.dateRange,r);i={accountId:h,accountType:ee(S),classId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(Se(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const X=[d,Y,b,A,f,T,v].filter((r=>r!=null));return G&&B!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>z(r),...e}):s.jsx(q,{to:Ye(X.length)})})),Ye=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ke=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,Qe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),et=K((function(a,e){const t=Oe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),tt=ie((function({referrerType:a,...e}){const t=W(),n=N(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=H(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),F=g((r=>Fe(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[E,z]=y.useState(void 0),u=g((r=>U(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),w=g((r=>Q(r)))&&m;let i;const G=at(S,h,I,A,f,T,x);if(G){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=nt(F?.dateRange,r);i={accountId:h,accountType:ee(S),projectId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const X=[d,Y,b,A,f,T,v].filter((r=>r!=null));return G&&B!=null?s.jsx(et,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>z(r),...e}):s.jsx(q,{to:be(X.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},at=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,nt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ct=K((function(a,e){const t=Ge(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=it(e.tenantEmailDomain),n=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),ye=ie((function({referrerType:a,...e}){const t=W(),n=N(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=H(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(v!=null&&v==="exclude_subaccounts"),F=g((D=>ze(D.transactionListState,h,S))),[P,O]=y.useState(!1),[E,z]=y.useState(void 0),u=g((D=>U(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const w=ot(S,h,b,A,f,I);if(w){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=st(F?.dateRange,D);m={accountId:h,accountType:ee(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:G}=ne(),B=y.useCallback(((D,le)=>{if(o==null)return;const ue=D.url.split(`/${o}/`)[1];if(ue==null)return;const[Ee,je]=ue.split("?"),J=new URLSearchParams(je??"");J.set("view","full"),J.set("thread_id",le),J.set("entity_type",D.entityType);const xe=R(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${Ee}?${J.toString()}`,{state:{pathnameStackToGoBack:xe}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:X}=G(ce.isProjectsTransactionsEnabled),r=g((D=>Q(D)))&&X,{areTenantIdsInSync:$}=Re();y.useEffect((()=>{!P&&m!=null&&$&&(O(!0),L.trackTransactionList(m.accountId,void 0,a,m.title),c(ge(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,$]);const Pe=[d,Y,b,A,f,T].filter((D=>D!=null));return w&&i!=null?s.jsx(ct,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,onCommentThreadClick:B,showProjectField:r,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>z(D),...e}):s.jsx(q,{to:ve(Pe.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},ot=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,st=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),it=a=>`/${a}/transactions/${$e}/statements`;function Mt(){const a=N().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>U(n))).tenantId],t=Xe();return s.jsxs(Ce,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Ve,{})}),s.jsx(C,{path:"/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(_,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(_,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(_,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(_,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(q,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(_,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(He,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(tt,{referrerType:a})})]})}export{Mt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-UAxYbctH.js";import{h as L,g as P,u as F,i as V,j as y,N as D,l as M,n as xe,o as k}from"./core-BQ6YlWys.js";import{cm as N,fI as E,$x as U,P9 as ae,OS as q,OT as ne,$y as Ie,Pc as Te,$z as we,$A as se,Yg as Ce,Nd as ke,CJ as je,$B as Ae,Pj as be,$C as oe,ee as Z,Hk as re,ep as ve,eq as Ee,$D as De,$E as Le,OU as Pe,$F as Fe,OV as Ue,P2 as Be,bp as Re,bJ as Oe,cx as Ve,bK as Me,cl as Ne,br as $e,ha as ze,ck as _e}from"./zeni-epic-state-j9Po26Lg.js";import{V as $,q as Ge,z as v,a9 as z,d as A,co as qe,cp as Ze,cq as G,a2 as H,aC as He,al as Ke,p as ie,N as O,ac as We,a8 as Je,cr as Ye,af as K,s as Qe,cs as Xe,a5 as W,ct as et,az as tt,a0 as Q,cu as at,i as nt}from"./index-DZBfE5XI.js";import{u as st,D as ot,n as R,S as rt}from"./mui-DYo6Z7Si.js";import it from"./NotFoundScreen-CY-XFa3a.js";import{S as X}from"./SetupPagesScreen-BY0N32JD.js";import{a as p}from"./sentry-CQfqw6mU.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-DV6iNvbF.js";import{u as lt}from"./useInitialThreadRequest-BpNcTGLt.js";import{M as ce}from"./MobileAppDrawer-DTqKEh3f.js";import{F as ut}from"./FeaturePreviewScreen-DjPPDYKv.js";import{a as ee}from"./analyticsHelper-BOs1nNPv.js";import"./recharts-VJtr9O-6.js";import"./analytics-CabaUa1L.js";import"./plaid-BNcFec4W.js";import"./dnd-DL41lZFs.js";import"./stripe-cKAAJElX.js";import"./lottie-BPF4ysWw.js";import"./lexical-BmxGnuDE.js";import"./pdf-CHT1_0Mk.js";import"./utils-BpLD-La5.js";import"./BusinessVerificationPageScreen-DaAqJAwC.js";import"./routePaths-CaZTJQOM.js";import"./InboxNotificationsProvider-Daf1RQwd.js";import"./useTaskManagerAccess-CP331xWN.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]="84d0ae36-6149-4baa-be78-80c179f6afdd",t._sentryDebugIdIdentifier="sentry-dbid-84d0ae36-6149-4baa-be78-80c179f6afdd")}catch{}})();const dt=M((function(t,a){const{companyId:n}=a;return{treasurySetupView:U(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:r,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const o=i.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(o.riskScore,ee(o)),t(Te(!0))},onUpdateFundAllocation:o=>{r.trackTreasuryAllocationAction("update",ee(o)),t(Ie(o))}}}))(qe);function pt(){const t=L(),a=P(),n=F(),{tenantEmailDomain:r}=V(),i=$(),o=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=Ge(o),s=N(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,I]=p.useState(!1),[l,u]=p.useState(!1),x=y((w=>E(w))),f=v.getSignedInUserTenant(r)?.companyId??x.companyId,C=v.getSignedInUser(),h=y((w=>U(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),T=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||T!=="Not-Started"||f==null||(u(!0),n(q()))}),[l,T,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(I(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&o==="Completed"&&t("../")}),[m,o,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const B=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!B&&e.jsx(z,{analytics:A,onLoad:()=>{}}),e.jsx(dt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:B,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const mt=M((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:Ce(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:U(t,n)}}),(function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:i}=a,o=r.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{G(a.analytics,"cancel",o,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{G(a.analytics,"confirm",o,m,"Transfer"),t(be())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(ke(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(Ze),ft=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:r}=V(),i=F(),[o,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[I,l]=p.useState(!1),u=y((T=>T.treasurySetupViewState.fetchState)),x=y((T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((T=>E(T))),h=v.getSignedInUserTenant(r)?.companyId??C.companyId,g=y((T=>we(T))),j=y((T=>U(T,h)));if(v.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(q()))}),[c,x,h,i]),p.useEffect((()=>{I||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[I,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:A,onLoad:()=>{}}),e.jsx(mt,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:o,maxInsuredAmount:5e5,onReviewClick:()=>{G(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},yt=R.div`
1
+ import{j as e}from"./liveblocks-CuUK5O_2.js";import{h as L,g as P,u as F,i as V,j as y,N as D,l as M,n as xe,o as k}from"./core-BBlQ3ArL.js";import{cm as N,fI as E,$x as U,P9 as ae,OS as q,OT as ne,$y as Ie,Pc as Te,$z as we,$A as se,Yg as Ce,Nd as ke,CJ as je,$B as Ae,Pj as be,$C as oe,ee as Z,Hk as re,ep as ve,eq as Ee,$D as De,$E as Le,OU as Pe,$F as Fe,OV as Ue,P2 as Be,bp as Re,bJ as Oe,cx as Ve,bK as Me,cl as Ne,br as $e,ha as ze,ck as _e}from"./zeni-epic-state-aUBx6G2Q.js";import{V as $,m as Ge,z as v,a9 as z,d as A,co as qe,cp as Ze,cq as G,a2 as H,aC as He,al as Ke,p as ie,N as O,ac as We,a8 as Je,cr as Ye,af as K,q as Qe,cs as Xe,a5 as W,ct as et,az as tt,a0 as Q,cu as at,i as nt}from"./index-ClwW47Zs.js";import{u as st,D as ot,n as R,S as rt}from"./mui--aGBnNu2.js";import it from"./NotFoundScreen-CTik05r2.js";import{S as X}from"./SetupPagesScreen-C5PRNruc.js";import{a as p}from"./sentry-D0lP5-8e.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-CWWQxV2L.js";import{u as lt}from"./useInitialThreadRequest-DmfmyzKI.js";import{M as ce}from"./MobileAppDrawer-Bql3K6nh.js";import{F as ut}from"./FeaturePreviewScreen-Dcu53_tf.js";import{a as ee}from"./analyticsHelper-DkNc3mKz.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./BusinessVerificationPageScreen-je1np7-9.js";import"./routePaths-D0jOibXk.js";import"./InboxNotificationsProvider-DiTDJFwP.js";import"./useTaskManagerAccess-DrmpkeUw.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]="f403a1d2-523f-4a62-ba8a-e7df26615d27",t._sentryDebugIdIdentifier="sentry-dbid-f403a1d2-523f-4a62-ba8a-e7df26615d27")}catch{}})();const dt=M((function(t,a){const{companyId:n}=a;return{treasurySetupView:U(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:r,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const o=i.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(o.riskScore,ee(o)),t(Te(!0))},onUpdateFundAllocation:o=>{r.trackTreasuryAllocationAction("update",ee(o)),t(Ie(o))}}}))(qe);function pt(){const t=L(),a=P(),n=F(),{tenantEmailDomain:r}=V(),i=$(),o=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=Ge(o),s=N(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,I]=p.useState(!1),[l,u]=p.useState(!1),x=y((w=>E(w))),f=v.getSignedInUserTenant(r)?.companyId??x.companyId,C=v.getSignedInUser(),h=y((w=>U(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),T=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||T!=="Not-Started"||f==null||(u(!0),n(q()))}),[l,T,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(I(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&o==="Completed"&&t("../")}),[m,o,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const B=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!B&&e.jsx(z,{analytics:A,onLoad:()=>{}}),e.jsx(dt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:B,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const mt=M((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:Ce(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:U(t,n)}}),(function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:i}=a,o=r.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{G(a.analytics,"cancel",o,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{G(a.analytics,"confirm",o,m,"Transfer"),t(be())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(ke(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(Ze),ft=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:r}=V(),i=F(),[o,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[I,l]=p.useState(!1),u=y((T=>T.treasurySetupViewState.fetchState)),x=y((T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((T=>E(T))),h=v.getSignedInUserTenant(r)?.companyId??C.companyId,g=y((T=>we(T))),j=y((T=>U(T,h)));if(v.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(q()))}),[c,x,h,i]),p.useEffect((()=>{I||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[I,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:A,onLoad:()=>{}}),e.jsx(mt,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:o,maxInsuredAmount:5e5,onReviewClick:()=>{G(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},yt=R.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-UAxYbctH.js";import{a as u}from"./sentry-CQfqw6mU.js";import{h as M,u as N,i as Y,j as f,l as G,g as H,n as Oe,o as P,N as L}from"./core-BQ6YlWys.js";import{$G as gt,$H as Ze,Sp as et,$I as vt,fI as U,h2 as ge,$J as Tt,cv as xt,$K as bt,Gh as yt,$L as wt,$M as oe,$N as te,Vt as ve,T$ as ue,U0 as ke,Gx as pe,T_ as he,Gk as tt,FT as Pe,$O as It,U1 as J,ma as me,$P as je,FN as Ct,$9 as Dt,$a as Et,$Q as _e,$R as Ve,$S as Ae,$T as Re,Gr as Te,$U as nt,G8 as at,$V as Ft,$W as kt,$X as Pt,$Y as jt,$Z as _t,$_ as Vt,$$ as At,a00 as Rt,CV as Ut,D1 as Lt,CW as Bt,T5 as we,a01 as $t,a02 as Ot,lq as Ie,bv as Mt,VE as Gt,a03 as Nt,n8 as zt,nh as Yt,T4 as Ce,bE as Me,a04 as ot,SH as st,XV as Jt,a05 as qt,a06 as Kt,nj as Ht,a07 as Ge,a08 as Ne,a09 as ze,a0a as Ye,a0b as Wt,nf as Qt,a0c as Xt,ni as Zt,a0d as en,a0e as it,Tr as rt,my as tn,a0f as nn,a0g as De,a0h as dt,Tp as lt,I$ as an,a0i as on,a0j as sn,mS as ct,a0k as rn,a0l as dn,TD as ln,vx as cn,a0m as ut,a0n as Je,TA as Ee,a0o as qe,a0p as un,TF as pn,a0q as hn,a0r as mn,a0s as fn,a0t as Sn,a0u as gn,vA as vn,a0v as Tn,U2 as xn,YA as bn,Ti as Fe,im as yn,YD as wn,YC as In,ik as Cn,a0w as Dn,a0x as En,J4 as Fn,a0y as kn,a0z as Pn,a0A as jn,a0B as _n,mC as Vn,bm as An,eq as Rn,ep as Un}from"./zeni-epic-state-j9Po26Lg.js";import{a2 as ne,ac as Ue,p as W,N as O,z as R,a8 as Ln,cv as Bn,d as j,_ as Le,j as xe,aj as ee,al as se,cw as $n,cx as pt,aC as On,a9 as Se,cy as Mn,s as K,V as Gn,G as ht,cz as Nn,af as mt,a5 as zn,q as Ke,cA as Yn,R as q,aa as Jn,ag as ft,ah as qn,aM as Kn,cB as Hn,U as Be,cC as Wn,cD as Qn,a4 as Xn,cE as Zn,cF as ea}from"./index-DZBfE5XI.js";import{u as ta,D as na,n as B,S as St}from"./mui-DYo6Z7Si.js";import{t as aa,A as oa}from"./AddressScreen-CxRV-hrD.js";import fe from"./NotFoundScreen-CY-XFa3a.js";import{F as sa}from"./FeaturePreviewScreen-DjPPDYKv.js";import{a as ia,b as ra,J as da,S as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-Bb90T06-.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-DV6iNvbF.js";import{M as re}from"./MobileAppDrawer-DTqKEh3f.js";import{v as $e,t as ua,d as pa}from"./routePaths-CaZTJQOM.js";import{D as ha}from"./DrawerScreen-BmZb1i83.js";import{a as ma,m as fa}from"./accountMappingHelper-DHkHknqJ.js";import"./recharts-VJtr9O-6.js";import"./analytics-CabaUa1L.js";import"./plaid-BNcFec4W.js";import"./dnd-DL41lZFs.js";import"./stripe-cKAAJElX.js";import"./lottie-BPF4ysWw.js";import"./lexical-BmxGnuDE.js";import"./pdf-CHT1_0Mk.js";import"./utils-BpLD-La5.js";import"./pathToGoBack-CxX9ql3A.js";import"./useActualMatchingMatchDetail-DglThU_y.js";import"./stripSplatSuffix-TzoGXcwz.js";import"./decodeURIComponentSafe-D_MvDEMm.js";import"./InboxNotificationsProvider-Daf1RQwd.js";import"./useTaskManagerAccess-CP331xWN.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]="655d02aa-d11f-4ff5-9847-8eeb9799bae4",e._sentryDebugIdIdentifier="sentry-dbid-655d02aa-d11f-4ff5-9847-8eeb9799bae4")}catch{}})();const Sa={drawerLeftMargin:new Ue(0,0,100,200)},ga=G((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=U(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:xt(Le.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(Bn),va=()=>{const e=ta(),a=M(),s=N(),{scheduleDetailId:t}=Y(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=Y(),{useFeatureGate:p}=W(),{isFeatureEnabled:h}=p(O.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>U(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Ln,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=B(St)`
1
+ import{j as o}from"./liveblocks-CuUK5O_2.js";import{a as u}from"./sentry-D0lP5-8e.js";import{h as M,u as N,i as Y,j as f,l as G,g as H,n as Oe,o as P,N as L}from"./core-BBlQ3ArL.js";import{$G as gt,$H as Ze,Sp as et,$I as vt,fI as U,h2 as ge,$J as Tt,cv as xt,$K as bt,Gh as yt,$L as wt,$M as oe,$N as te,Vt as ve,T$ as ue,U0 as ke,Gx as pe,T_ as he,Gk as tt,FT as Pe,$O as It,U1 as J,ma as me,$P as je,FN as Ct,$9 as Dt,$a as Et,$Q as _e,$R as Ve,$S as Ae,$T as Re,Gr as Te,$U as nt,G8 as at,$V as Ft,$W as kt,$X as Pt,$Y as jt,$Z as _t,$_ as Vt,$$ as At,a00 as Rt,CV as Ut,D1 as Lt,CW as Bt,T5 as we,a01 as $t,a02 as Ot,lq as Ie,bv as Mt,VE as Gt,a03 as Nt,n8 as zt,nh as Yt,T4 as Ce,bE as Me,a04 as ot,SH as st,XV as Jt,a05 as qt,a06 as Kt,nj as Ht,a07 as Ge,a08 as Ne,a09 as ze,a0a as Ye,a0b as Wt,nf as Qt,a0c as Xt,ni as Zt,a0d as en,a0e as it,Tr as rt,my as tn,a0f as nn,a0g as De,a0h as dt,Tp as lt,I$ as an,a0i as on,a0j as sn,mS as ct,a0k as rn,a0l as dn,TD as ln,vx as cn,a0m as ut,a0n as Je,TA as Ee,a0o as qe,a0p as un,TF as pn,a0q as hn,a0r as mn,a0s as fn,a0t as Sn,a0u as gn,vA as vn,a0v as Tn,U2 as xn,YA as bn,Ti as Fe,im as yn,YD as wn,YC as In,ik as Cn,a0w as Dn,a0x as En,J4 as Fn,a0y as kn,a0z as Pn,a0A as jn,a0B as _n,mC as Vn,bm as An,eq as Rn,ep as Un}from"./zeni-epic-state-aUBx6G2Q.js";import{a2 as ne,ac as Ue,p as W,N as O,z as R,a8 as Ln,cv as Bn,d as j,_ as Le,h as xe,aj as ee,al as se,cw as $n,cx as pt,aC as On,a9 as Se,cy as Mn,q as K,V as Gn,G as ht,cz as Nn,af as mt,a5 as zn,m as Ke,cA as Yn,R as q,aa as Jn,ag as ft,ah as qn,aM as Kn,cB as Hn,U as Be,cC as Wn,cD as Qn,a4 as Xn,cE as Zn,cF as ea}from"./index-ClwW47Zs.js";import{u as ta,D as na,n as B,S as St}from"./mui--aGBnNu2.js";import{t as aa,A as oa}from"./AddressScreen-Czlolp2X.js";import fe from"./NotFoundScreen-CTik05r2.js";import{F as sa}from"./FeaturePreviewScreen-Dcu53_tf.js";import{a as ia,b as ra,J as da,S as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-DN2DZsFw.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-CWWQxV2L.js";import{M as re}from"./MobileAppDrawer-Bql3K6nh.js";import{v as $e,t as ua,d as pa}from"./routePaths-D0jOibXk.js";import{D as ha}from"./DrawerScreen-DUhkZI2Z.js";import{a as ma,m as fa}from"./accountMappingHelper-CHQgwqfy.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./pathToGoBack-DOePc_e5.js";import"./useActualMatchingMatchDetail-nJ3hpXEY.js";import"./stripSplatSuffix-CFosfir7.js";import"./decodeURIComponentSafe-YbpxzvKa.js";import"./InboxNotificationsProvider-DiTDJFwP.js";import"./useTaskManagerAccess-DrmpkeUw.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]="5151d176-3746-42d5-8842-773312d9befa",e._sentryDebugIdIdentifier="sentry-dbid-5151d176-3746-42d5-8842-773312d9befa")}catch{}})();const Sa={drawerLeftMargin:new Ue(0,0,100,200)},ga=G((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=U(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:xt(Le.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(Bn),va=()=>{const e=ta(),a=M(),s=N(),{scheduleDetailId:t}=Y(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=Y(),{useFeatureGate:p}=W(),{isFeatureEnabled:h}=p(O.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>U(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Ln,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=B(St)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-UAxYbctH.js";import{a as f}from"./sentry-CQfqw6mU.js";import{t as u,u as h,j as b,N as y}from"./core-BQ6YlWys.js";import{Vk as I,gl as w,Kd as j}from"./zeni-epic-state-j9Po26Lg.js";import{z as l,a8 as x,ag as S,ah as D}from"./index-DZBfE5XI.js";import{n as c}from"./mui-DYo6Z7Si.js";import"./recharts-VJtr9O-6.js";import"./analytics-CabaUa1L.js";import"./plaid-BNcFec4W.js";import"./dnd-DL41lZFs.js";import"./stripe-cKAAJElX.js";import"./lottie-BPF4ysWw.js";import"./lexical-BmxGnuDE.js";import"./pdf-CHT1_0Mk.js";import"./utils-BpLD-La5.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]="5de6bc68-1d81-41f7-ac60-d0fcba1b5fd0",e._sentryDebugIdIdentifier="sentry-dbid-5de6bc68-1d81-41f7-ac60-d0fcba1b5fd0")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=b((m=>I(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
1
+ import{j as o}from"./liveblocks-CuUK5O_2.js";import{a as f}from"./sentry-D0lP5-8e.js";import{t as u,u as h,j as b,N as y}from"./core-BBlQ3ArL.js";import{Vk as I,gl as w,Kd as j}from"./zeni-epic-state-aUBx6G2Q.js";import{z as l,a8 as x,ag as S,ah as D}from"./index-ClwW47Zs.js";import{n as c}from"./mui--aGBnNu2.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.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]="5de6bc68-1d81-41f7-ac60-d0fcba1b5fd0",e._sentryDebugIdIdentifier="sentry-dbid-5de6bc68-1d81-41f7-ac60-d0fcba1b5fd0")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=b((m=>I(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100vh;
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-UAxYbctH.js";import{u as z,h as ne,g as W,i as G,j as k,l as ae,N as Q,n as Le,o as x}from"./core-BQ6YlWys.js";import{a0H as Ue,M5 as Fe,a0I as _e,fI as L,Hi as ze,a0J as An,cl as ee,cm as Me,Hc as wn,a0K as Dn,a0L as kn,Hf as In,Hm as me,H9 as Sn,H6 as Pn,Xd as ce,a0M as bn,PF as vn,VH as jn,PH as En,mT as Pe,a0N as Tn,vc as Ve,v0 as $e,mK as He,mN as be,VJ as ve,VI as Bn,a0O as On,mM as Rn,n7 as Ln,mB as Un,k$ as Fn,k_ as _n,a0P as zn,a0Q as ge,Pm as Mn,a0R as Vn,a0S as $n,a0T as fe,a0U as je,a0V as Hn,PS as Nn,Yg as Zn,Nd as Ne,CJ as Ze,a0W as Wn,PP as Gn,a0X as We,eb as ye,PW as Ge,ep as Je,eq as xe,PU as Jn,N7 as Kn,PM as Yn,a0Y as Ke,a0Z as Ye,Po as Xe,Py as Ee,a0_ as Xn,a0$ as qn,PX as Qn,bp as ea,bJ as na,cx as aa,bK as ta,br as oa,ha as sa}from"./zeni-epic-state-j9Po26Lg.js";import{V as te,p as H,N as $,z as b,aj as Ce,a8 as le,cM as ra,a2 as M,ac as J,a5 as qe,q as ia,C as Te,d as R,cN as ca,af as Ae,cO as la,a9 as de,cP as da,U as we,au as Z,cQ as ua,aC as pa,al as Qe,cR as Be,cS as ma,s as ie,cT as ga,az as ha,bB as fa,cU as ya,i as xa,R as Ca}from"./index-DZBfE5XI.js";import{u as U,n as F,D as K,S as Y}from"./mui-DYo6Z7Si.js";import q from"./NotFoundScreen-CY-XFa3a.js";import{S as Oe}from"./SetupPagesScreen-BY0N32JD.js";import{F as en}from"./FeaturePreviewScreen-DjPPDYKv.js";import{a as g}from"./sentry-CQfqw6mU.js";import{M as ue}from"./MobileAppDrawer-DTqKEh3f.js";import{A as Aa,D as wa,V as Da}from"./DomesticWireDetailScreen-u2HKaCWA.js";import{A as ka}from"./AddressScreen-CxRV-hrD.js";import{u as nn}from"./useAskAiCfoHostNavButtonProps-DV6iNvbF.js";import{Z as Ia}from"./ZeniAccountStatementScreen-DiwM8zAQ.js";import"./recharts-VJtr9O-6.js";import"./analytics-CabaUa1L.js";import"./plaid-BNcFec4W.js";import"./dnd-DL41lZFs.js";import"./stripe-cKAAJElX.js";import"./lottie-BPF4ysWw.js";import"./lexical-BmxGnuDE.js";import"./pdf-CHT1_0Mk.js";import"./utils-BpLD-La5.js";import"./BusinessVerificationPageScreen-DaAqJAwC.js";import"./routePaths-CaZTJQOM.js";import"./analyticsHelper-BOs1nNPv.js";import"./InboxNotificationsProvider-Daf1RQwd.js";import"./useTaskManagerAccess-CP331xWN.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="6d3eda0e-bbb2-4c8e-a88f-6515b391d3a2",n._sentryDebugIdIdentifier="sentry-dbid-6d3eda0e-bbb2-4c8e-a88f-6515b391d3a2")}catch{}})();const Sa=F.div`
1
+ import{j as e}from"./liveblocks-CuUK5O_2.js";import{u as z,h as ne,g as W,i as G,j as k,l as ae,N as Q,n as Le,o as x}from"./core-BBlQ3ArL.js";import{a0H as Ue,M5 as Fe,a0I as _e,fI as L,Hi as ze,a0J as An,cl as ee,cm as Me,Hc as wn,a0K as Dn,a0L as kn,Hf as In,Hm as me,H9 as Sn,H6 as Pn,Xd as ce,a0M as bn,PF as vn,VH as jn,PH as En,mT as Pe,a0N as Tn,vc as Ve,v0 as $e,mK as He,mN as be,VJ as ve,VI as Bn,a0O as On,mM as Rn,n7 as Ln,mB as Un,k$ as Fn,k_ as _n,a0P as zn,a0Q as ge,Pm as Mn,a0R as Vn,a0S as $n,a0T as he,a0U as je,a0V as Hn,PS as Nn,Yg as Zn,Nd as Ne,CJ as Ze,a0W as Wn,PP as Gn,a0X as We,eb as ye,PW as Ge,ep as Je,eq as xe,PU as Jn,N7 as Kn,PM as Yn,a0Y as Ke,a0Z as Ye,Po as Xe,Py as Ee,a0_ as Xn,a0$ as qn,PX as Qn,bp as ea,bJ as na,cx as aa,bK as ta,br as oa,ha as sa}from"./zeni-epic-state-aUBx6G2Q.js";import{V as te,p as H,N as $,z as b,aj as Ce,a8 as le,cM as ra,a2 as M,ac as J,a5 as qe,m as ia,C as Te,d as R,cN as ca,af as Ae,cO as la,a9 as de,cP as da,U as we,au as Z,cQ as ua,aC as pa,al as Qe,cR as Be,cS as ma,q as ie,cT as ga,az as fa,bB as ha,cU as ya,i as xa,R as Ca}from"./index-ClwW47Zs.js";import{u as U,n as F,D as K,S as Y}from"./mui--aGBnNu2.js";import q from"./NotFoundScreen-CTik05r2.js";import{S as Oe}from"./SetupPagesScreen-C5PRNruc.js";import{F as en}from"./FeaturePreviewScreen-Dcu53_tf.js";import{a as g}from"./sentry-D0lP5-8e.js";import{M as ue}from"./MobileAppDrawer-Bql3K6nh.js";import{A as Aa,D as wa,V as Da}from"./DomesticWireDetailScreen-6W-Er5_q.js";import{A as ka}from"./AddressScreen-Czlolp2X.js";import{u as nn}from"./useAskAiCfoHostNavButtonProps-CWWQxV2L.js";import{Z as Ia}from"./ZeniAccountStatementScreen-CmfHt6Wr.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./BusinessVerificationPageScreen-je1np7-9.js";import"./routePaths-D0jOibXk.js";import"./analyticsHelper-DkNc3mKz.js";import"./InboxNotificationsProvider-DiTDJFwP.js";import"./useTaskManagerAccess-DrmpkeUw.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="91eea1e1-f740-48bf-a4b3-8ce4ce9ab0d5",n._sentryDebugIdIdentifier="sentry-dbid-91eea1e1-f740-48bf-a4b3-8ce4ce9ab0d5")}catch{}})();const Sa=F.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as e}from"./liveblocks-UAxYbctH.js";import{u as z,h as ne,g as W,i as G
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${n=>n.theme.colors.grey4};
9
- `;function Re({isEditDrawerOpen:n}){const a=U(),[r,t]=g.useState(!1),{autoTransferRulePageProps:o,isLoading:i}=(function({isEditDrawerOpen:d=!1}={}){const c=z(),p=ne(),h=W(),{ruleId:y,tenantEmailDomain:s}=G(),l=te(),{useFeatureGate:f}=H(),m=k((u=>Ue(u))),P=k((u=>Fe(u.depositAccountState,u.depositAccountListState))),D=k((u=>_e(u))),w=k((u=>L(u))),{isFeatureEnabled:I}=f($.isTreasuryEnabled),C=m?.fetchState??"Not-Started",A=w?.companyId??(s==null?void 0:b.getSignedInUserTenant(s)?.companyId);g.useEffect((()=>{C==="Not-Started"&&A!=null&&c(ze(!0))}),[c,C,A]);const E=m?.fetchState!=="Completed";if(E)return{autoTransferRulePageProps:void 0,isLoading:E};const T=w?.company!=null&&An(w.company),v=!!(I&&T),j=ee(l?.loggedInUserRoleMap)||Me(l?.loggedInUserRoleMap),O=b.getSignedInUser(),S={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:w?.tenantId??""},B=!!h.state?.scrollToAddRule;return{isLoading:E,autoTransferRulePageProps:{autoTransferRuleView:m,companyName:w?.companyName??"",hasAdminLevelAccess:j,includeTreasuryOption:v,transferLimit:5e5,authParams:S,currentTenant:w,depositAccountListView:P,downloadAccountDetailEndPoint:`${Ce}/account_details`,editingRuleId:y,isEditDrawerOpen:d,scrollToAddRule:B,zeniAccountsConfigDetail:D,onBackClick:()=>p(".."),onCreateRule:()=>{c(Pn())},onUpdateRule:u=>{c(me(u))},onDeleteClick:u=>{c(Sn(u))},onPauseClick:u=>{c(me(u,!0,!1))},onResumeClick:u=>{c(me(u,!1,!0))},onActivityClick:(u,V)=>{c(In(u,V))},onUpdateRuleLocalData:u=>{c(kn(u))},clearRuleLocalData:()=>{c(Dn())},onEditClick:u=>{p(`./${u}/edit`)},onEditDrawerClose:()=>{p("../../",{relative:"path"})},onReviewClick:()=>{c(wn())}}}})({isEditDrawerOpen:n});return i||o==null?e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(Sa,{children:[e.jsx(ue,{isAppContentDrawerOpen:r,handleDrawerToggle:d=>{t(d)}}),e.jsx(ra,{...o})]})}const Pa={overlayWidth:new J(100,100,58)},ba=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=z(),o=U(),i=M();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(K,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(va,{onClick:d=>d.stopPropagation(),children:e.jsx(Aa,{vendorIdParam:n,accountContext:"express-pay"})})})},va=F(Y)`
9
+ `;function Re({isEditDrawerOpen:n}){const a=U(),[r,t]=g.useState(!1),{autoTransferRulePageProps:o,isLoading:i}=(function({isEditDrawerOpen:d=!1}={}){const c=z(),p=ne(),f=W(),{ruleId:y,tenantEmailDomain:s}=G(),l=te(),{useFeatureGate:h}=H(),m=k((u=>Ue(u))),P=k((u=>Fe(u.depositAccountState,u.depositAccountListState))),D=k((u=>_e(u))),w=k((u=>L(u))),{isFeatureEnabled:I}=h($.isTreasuryEnabled),C=m?.fetchState??"Not-Started",A=w?.companyId??(s==null?void 0:b.getSignedInUserTenant(s)?.companyId);g.useEffect((()=>{C==="Not-Started"&&A!=null&&c(ze(!0))}),[c,C,A]);const E=m?.fetchState!=="Completed";if(E)return{autoTransferRulePageProps:void 0,isLoading:E};const T=w?.company!=null&&An(w.company),v=!!(I&&T),j=ee(l?.loggedInUserRoleMap)||Me(l?.loggedInUserRoleMap),O=b.getSignedInUser(),S={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:w?.tenantId??""},B=!!f.state?.scrollToAddRule;return{isLoading:E,autoTransferRulePageProps:{autoTransferRuleView:m,companyName:w?.companyName??"",hasAdminLevelAccess:j,includeTreasuryOption:v,transferLimit:5e5,authParams:S,currentTenant:w,depositAccountListView:P,downloadAccountDetailEndPoint:`${Ce}/account_details`,editingRuleId:y,isEditDrawerOpen:d,scrollToAddRule:B,zeniAccountsConfigDetail:D,onBackClick:()=>p(".."),onCreateRule:()=>{c(Pn())},onUpdateRule:u=>{c(me(u))},onDeleteClick:u=>{c(Sn(u))},onPauseClick:u=>{c(me(u,!0,!1))},onResumeClick:u=>{c(me(u,!1,!0))},onActivityClick:(u,V)=>{c(In(u,V))},onUpdateRuleLocalData:u=>{c(kn(u))},clearRuleLocalData:()=>{c(Dn())},onEditClick:u=>{p(`./${u}/edit`)},onEditDrawerClose:()=>{p("../../",{relative:"path"})},onReviewClick:()=>{c(wn())}}}})({isEditDrawerOpen:n});return i||o==null?e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(Sa,{children:[e.jsx(ue,{isAppContentDrawerOpen:r,handleDrawerToggle:d=>{t(d)}}),e.jsx(ra,{...o})]})}const Pa={overlayWidth:new J(100,100,58)},ba=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=z(),o=U(),i=M();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(K,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(va,{onClick:d=>d.stopPropagation(),children:e.jsx(Aa,{vendorIdParam:n,accountContext:"express-pay"})})})},va=F(Y)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
@@ -26,15 +26,15 @@ import{j as e}from"./liveblocks-UAxYbctH.js";import{u as z,h as ne,g as W,i as G
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${n=>n.theme.colors.grey4};
29
- `,Ua=ae((function(n,a){const r=L(n),t=b.getSignedInUser(),o=r.tenantId,i={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},d=a.expressPayDetails,c=n.entityAutoCompleteState.autoCompleteText.common,p=jn(n,"common");return{expressPayDetails:d,fileProps:{authParams:i,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:a.analytics}}),(function(n,a){const{navigate:r}=a;return{onSaveVendor:t=>{n(_n(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(be({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(Fn({localData:t}))},onVendorSelected:t=>{t!=null&&n(Un(t,!1))},updateSelectedVendorForCreate:t=>{n(Ln(t))},initializeVendorAddress:()=>{n(Rn())},resetVendorSaveStatus:t=>{n(On({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(Bn({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(ve("common"))},onCancelAutoComplete:()=>{n(ve("common"))}},chooseNewVendor:t=>{n(be({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?r("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&r("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(He({files:t}))},onDeleteFile:t=>{n($e(t))},onEditFileName:(t,o)=>{n(Ve(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Pe(t)),n(Pe()),n(Tn()),n(ce()),r("../",{relative:"path"})},onSchedulePayment:()=>{n(En())}}}))(ca);function se({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:r}){const t=ne(),o=W(),i=z(),[d,c]=g.useState(!1),{tenantEmailDomain:p}=G(),h=te(),y=k((u=>u.expressPayState.fetchState)),s=k((u=>L(u))),l=k((u=>bn(u))),f=l.expressPayLocalData?.vendorId,m=s.companyId??b.getSignedInUserTenant(p)?.companyId,[P,D]=g.useState(!1),[w,I]=g.useState(!1),[C,A]=g.useState(!1),E=qe(o.state?.pathnameStackToGoBack),{poppedPathname:T}=E,v=T?.split("/"),j=v?.[v.length-1];g.useEffect((()=>{n===!0?D(!0):(D(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{a===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[a]),g.useEffect((()=>{r===!0?A(!0):(A(!1),document.body.style.overflow="auto")}),[r]),g.useEffect((()=>{y==="Not-Started"&&i(vn(!0,!0))}),[y,i]);const O=ia(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(g.useEffect((()=>{O==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&B()}),[O,l.vendorViewDetails.bankAccountCreationState?.fetchState]),b.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=u=>{c(u)},B=()=>{D(!1),I(!1),t("../",{relative:"path"})};return e.jsxs(La,{children:[Te(o)?e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:S}):null,P===!0?e.jsx(ba,{vendorId:f,closeDrawerHandler:B,isDrawerOpen:P}):null,w===!0?e.jsx(Oa,{vendorId:f,closeDrawerHandler:B,isDrawerOpen:w}):null,C===!0?e.jsx(Ea,{closeDrawerHandler:B,isDrawerOpen:C}):null,e.jsx(Da,{vendorId:f,isExpressPayPage:!0}),e.jsx(Ua,{navigate:t,location:o,companyId:m,accountId:j,analytics:R,currentTenant:s,vendorId:f,roleMap:h?.loggedInUserRoleMap,isSettings:Te(o),expressPayDetails:l,onClickMenuIcon:()=>{S(!0)}})]})}const Fa={overlayWidth:new J(100,100,58)},_a=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:r,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const i=U(),d=M(),c=k((s=>_e(s))),p=k((s=>L(s)));if(b.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{o(!0)},y={depositAccount:t,onDismissClick:h,zeniAccountsConfigDetail:c,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:p};return e.jsx(K,{anchor:"right",open:r,PaperProps:{style:{width:Fa.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:e.jsx(za,{onClick:s=>s.stopPropagation(),children:e.jsx(la,{...y})})})},za=F(Y)`
29
+ `,Ua=ae((function(n,a){const r=L(n),t=b.getSignedInUser(),o=r.tenantId,i={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},d=a.expressPayDetails,c=n.entityAutoCompleteState.autoCompleteText.common,p=jn(n,"common");return{expressPayDetails:d,fileProps:{authParams:i,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:a.analytics}}),(function(n,a){const{navigate:r}=a;return{onSaveVendor:t=>{n(_n(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(be({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(Fn({localData:t}))},onVendorSelected:t=>{t!=null&&n(Un(t,!1))},updateSelectedVendorForCreate:t=>{n(Ln(t))},initializeVendorAddress:()=>{n(Rn())},resetVendorSaveStatus:t=>{n(On({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(Bn({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(ve("common"))},onCancelAutoComplete:()=>{n(ve("common"))}},chooseNewVendor:t=>{n(be({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?r("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&r("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(He({files:t}))},onDeleteFile:t=>{n($e(t))},onEditFileName:(t,o)=>{n(Ve(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Pe(t)),n(Pe()),n(Tn()),n(ce()),r("../",{relative:"path"})},onSchedulePayment:()=>{n(En())}}}))(ca);function se({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:r}){const t=ne(),o=W(),i=z(),[d,c]=g.useState(!1),{tenantEmailDomain:p}=G(),f=te(),y=k((u=>u.expressPayState.fetchState)),s=k((u=>L(u))),l=k((u=>bn(u))),h=l.expressPayLocalData?.vendorId,m=s.companyId??b.getSignedInUserTenant(p)?.companyId,[P,D]=g.useState(!1),[w,I]=g.useState(!1),[C,A]=g.useState(!1),E=qe(o.state?.pathnameStackToGoBack),{poppedPathname:T}=E,v=T?.split("/"),j=v?.[v.length-1];g.useEffect((()=>{n===!0?D(!0):(D(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{a===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[a]),g.useEffect((()=>{r===!0?A(!0):(A(!1),document.body.style.overflow="auto")}),[r]),g.useEffect((()=>{y==="Not-Started"&&i(vn(!0,!0))}),[y,i]);const O=ia(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(g.useEffect((()=>{O==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&B()}),[O,l.vendorViewDetails.bankAccountCreationState?.fetchState]),b.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=u=>{c(u)},B=()=>{D(!1),I(!1),t("../",{relative:"path"})};return e.jsxs(La,{children:[Te(o)?e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:S}):null,P===!0?e.jsx(ba,{vendorId:h,closeDrawerHandler:B,isDrawerOpen:P}):null,w===!0?e.jsx(Oa,{vendorId:h,closeDrawerHandler:B,isDrawerOpen:w}):null,C===!0?e.jsx(Ea,{closeDrawerHandler:B,isDrawerOpen:C}):null,e.jsx(Da,{vendorId:h,isExpressPayPage:!0}),e.jsx(Ua,{navigate:t,location:o,companyId:m,accountId:j,analytics:R,currentTenant:s,vendorId:h,roleMap:f?.loggedInUserRoleMap,isSettings:Te(o),expressPayDetails:l,onClickMenuIcon:()=>{S(!0)}})]})}const Fa={overlayWidth:new J(100,100,58)},_a=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:r,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const i=U(),d=M(),c=k((s=>_e(s))),p=k((s=>L(s)));if(b.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const f=()=>{o(!0)},y={depositAccount:t,onDismissClick:f,zeniAccountsConfigDetail:c,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:p};return e.jsx(K,{anchor:"right",open:r,PaperProps:{style:{width:Fa.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>f(),children:e.jsx(za,{onClick:s=>s.stopPropagation(),children:e.jsx(la,{...y})})})},za=F(Y)`
30
30
  display: flex;
31
31
  min-height: 100%;
32
32
  flex-direction: column;
33
- `,Ma={overlayWidth:new J(100,100,58)},an=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const r=U(),t=M(),o=z(),i=k((s=>L(s))),d=b.getSignedInUser(),c=i.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const h=k((s=>zn(s))),y={analytics:R,checkDeposit:h,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:s=>{o(Vn(s))},updateFilesEntity:s=>{o(He({files:s}))},onAnotherTransferClick:()=>{o(ge())},onDeleteFile:s=>{o($e(s))},onEditFileName:(s,l)=>{o(Ve(s,l.split(".")[0]))},onCheckDpositClick:()=>{o(Mn())},onDismissClick:()=>{a(!0),o(ge())}};return e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:R,onLoad:s=>(l=>l.trackPageLoaded(we.Event.accountsDepositCheckFormViewed))(s)}),e.jsx(K,{anchor:"right",open:n,PaperProps:{style:{width:Ma.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(s,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(ge())),children:e.jsx(Va,{onClick:s=>s.stopPropagation(),children:e.jsx(da,{...y})})})]})},Va=F(Y)`
33
+ `,Ma={overlayWidth:new J(100,100,58)},an=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const r=U(),t=M(),o=z(),i=k((s=>L(s))),d=b.getSignedInUser(),c=i.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const f=k((s=>zn(s))),y={analytics:R,checkDeposit:f,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:s=>{o(Vn(s))},updateFilesEntity:s=>{o(He({files:s}))},onAnotherTransferClick:()=>{o(ge())},onDeleteFile:s=>{o($e(s))},onEditFileName:(s,l)=>{o(Ve(s,l.split(".")[0]))},onCheckDpositClick:()=>{o(Mn())},onDismissClick:()=>{a(!0),o(ge())}};return e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:R,onLoad:s=>(l=>l.trackPageLoaded(we.Event.accountsDepositCheckFormViewed))(s)}),e.jsx(K,{anchor:"right",open:n,PaperProps:{style:{width:Ma.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(s,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(ge())),children:e.jsx(Va,{onClick:s=>s.stopPropagation(),children:e.jsx(da,{...y})})})]})},Va=F(Y)`
34
34
  display: flex;
35
35
  min-height: 100%;
36
36
  flex-direction: column;
37
- `,$a={overlayWidth:new J(100,100,58)},Ha=ae((function(n,a){const r=a.currentTenant?.companyId;return{plaidConnectionDetails:Zn(n,r,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Fe(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(Gn()),clearReviewTransferDetail:()=>n(Wn()),onFetchLinkTokenClick:r=>{n(Ze("external_account",r))},onEstablishConnectionClick:r=>{n(Ne(r,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(ua),tn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:r,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const i=k((C=>$n(C))),d=k((C=>L(C))),c=U(),p=M(),h=z(),{accountId:y}=G(),[s,l]=g.useState("achTransfer"),[f,m]=g.useState(!1);if(b.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:P}=H(),{configValue:D}=P(Z.zeniAccountsConfig),w=fe(D),I=()=>{t(!0),h(je())};return g.useEffect((()=>{i.reviewTransferDetail.fetchState==="Completed"&&m(!0)}),[m,i.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:R,onLoad:C=>(A=>A.trackPageLoaded(we.Event.zeniAccountsTransferFormViewed))(C)}),e.jsx(K,{onClose:()=>{(s==="achTransfer"&&f===!1||s==="achTransfer"&&f&&i.fetchState==="Completed")&&I()},anchor:"right",open:n,PaperProps:{style:{width:$a.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Na,{onClick:C=>C.stopPropagation(),children:e.jsx(Ha,{analytics:R,transferDetails:i,authParams:a,downloadAccountDetailEndPoint:r,onTransferClick:()=>{R.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(Nn(y))},onDismissClick:I,onSaveChangesToLocalStore:C=>{h(Hn(C))},onAnotherTransferClick:()=>{m(!1),h(je())},currentTenant:d,zeniAccountsConfigDetail:o,currentDrawerContent:s,setCurrentDrawerContent:l,showReviewContent:f,setShowReviewContent:m,onBackClick:()=>{},maxInsuredAmount:w.maxInsuredAmount})})})]})},Na=F(Y)`
37
+ `,$a={overlayWidth:new J(100,100,58)},Ha=ae((function(n,a){const r=a.currentTenant?.companyId;return{plaidConnectionDetails:Zn(n,r,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Fe(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(Gn()),clearReviewTransferDetail:()=>n(Wn()),onFetchLinkTokenClick:r=>{n(Ze("external_account",r))},onEstablishConnectionClick:r=>{n(Ne(r,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(ua),tn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:r,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const i=k((C=>$n(C))),d=k((C=>L(C))),c=U(),p=M(),f=z(),{accountId:y}=G(),[s,l]=g.useState("achTransfer"),[h,m]=g.useState(!1);if(b.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:P}=H(),{configValue:D}=P(Z.zeniAccountsConfig),w=he(D),I=()=>{t(!0),f(je())};return g.useEffect((()=>{i.reviewTransferDetail.fetchState==="Completed"&&m(!0)}),[m,i.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:R,onLoad:C=>(A=>A.trackPageLoaded(we.Event.zeniAccountsTransferFormViewed))(C)}),e.jsx(K,{onClose:()=>{(s==="achTransfer"&&h===!1||s==="achTransfer"&&h&&i.fetchState==="Completed")&&I()},anchor:"right",open:n,PaperProps:{style:{width:$a.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Na,{onClick:C=>C.stopPropagation(),children:e.jsx(Ha,{analytics:R,transferDetails:i,authParams:a,downloadAccountDetailEndPoint:r,onTransferClick:()=>{R.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),f(Nn(y))},onDismissClick:I,onSaveChangesToLocalStore:C=>{f(Hn(C))},onAnotherTransferClick:()=>{m(!1),f(je())},currentTenant:d,zeniAccountsConfigDetail:o,currentDrawerContent:s,setCurrentDrawerContent:l,showReviewContent:h,setShowReviewContent:m,onBackClick:()=>{},maxInsuredAmount:w.maxInsuredAmount})})})]})},Na=F(Y)`
38
38
  display: flex;
39
39
  min-height: 100%;
40
40
  flex-direction: column;
@@ -46,7 +46,7 @@ import{j as e}from"./liveblocks-UAxYbctH.js";import{u as z,h as ne,g as W,i as G
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${n=>n.theme.colors.grey4};
49
- `,Wa=ae((function(n,a){return{zeniAccountListView:We(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,companyId:i,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:h}=a,{tenantEmailDomain:y}=t;return{onZeniAccountClick:(s,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const f=Ga(y,s),m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:m}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),r("setup")},onReloadTransactions:()=>{n(Ge(!1))},handleMoveMoneyOptionSelection:(s,l)=>{let f="page-not-found";s==="sendMoney"&&(f=cn(y)),s==="payBill"?f=on(t,p,h):s==="transfer"?(f=sn(y),l!=null&&n(Ke(l))):s==="checkDeposit"&&(f=rn(y));const m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:m}})},unlinkPaymentAccount:(s,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),n(Yn(s))},onFetchLinkTokenClick:(s,l)=>{n(Ze("external_account",s,l))},onUpdatePaymentAccountStatus:(s,l,f)=>{n(Kn(s,l,"zeni_accounts","external_account",f))},onEstablishConnectionClick:s=>{n(Ne(s,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:s=>{n(Jn(s))},onClickMenuIcon:()=>{d(!0)},onAutoTransferClick:s=>{const l="./auto-transfer";s?r(l,{state:{...o.state,scrollToAddRule:!0}}):r(l)}}}))(ma);function he({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const r=W(),t=ne(),o=z(),i=M(),{tenantEmailDomain:d}=G(),{useDynamicConfig:c,useFeatureGate:p}=H(),h=U(),{configValue:y}=c(Z.zeniAccountsConfig),{isFeatureEnabled:s}=p($.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p($.isAutoTransferRuleEnabled),f=fe(y),m=k((_=>L(_))),P=m.companyId??b.getSignedInUserTenant(d)?.companyId,{configValue:D}=c(Z.expressPayConfig),w=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(m.tenantId),[I,C]=g.useState(!1),[A,E]=g.useState(!1),[T,v]=g.useState(!1),[j,O]=g.useState(!1),S=k((_=>We(_))),B=S.fetchState,u=k((_=>Ue(_))),V=u?.fetchState??"Not-Started",pe=!!m.companyZeniAccountInfo?.info?.isZeniAccountEnabled,oe=te(),N=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,X=ee(oe?.loggedInUserRoleMap),ln=ye(oe?.loggedInUserRoleMap),dn=!!m.companyBillPayInfo?.info?.isBillPayEnabled,De=b.getSignedInUser(),un={userId:De?.userId??"",sessionId:De?.zeniSessionId??"",tenantId:m.tenantId??""},pn=`${Ce}/account_details`,{areTenantIdsInSync:ke}=pa();g.useEffect((()=>{!I&&ke&&(C(!0),o(Ge(!1)))}),[I,o,B,ke]),g.useEffect((()=>{!A&&V==="Not-Started"&&P&&(E(!0),o(ze(!0)))}),[A,V,P,o]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const Ie=()=>{v(!1),t("..")},[mn,gn]=g.useState(!1),Se=_=>{gn(_)},{isAiCfoAccessEnabled:hn,onAskAiCfoClick:fn}=nn({mobileExploreReferrer:"Checking Accounts"});Qe({isDataReady:B==="Completed"});const yn=Je(m),xn=xe(s,m);return yn===!0&&xn!==!0?e.jsx(en,{}):pe?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&T===!1&&j===!1?e.jsx(de,{analytics:R,onLoad:_=>(Cn=>{Cn.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Be(S.summary?.totalBalance.available.amount??0),Be(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield)})(_)}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Ie,isTransferDrawerOpen:T,zeniAccountsConfig:S.zeniAccountsConfig,authParams:un,downloadAccountDetailEndPoint:pn}):null,j===!0?e.jsx(an,{closeDrawerHandler:Ie,isCheckDepositDrawerOpen:j}):null,e.jsxs(Za,{windowSize:i,children:[e.jsx(ue,{isAppContentDrawerOpen:mn,handleDrawerToggle:Se}),e.jsx(Wa,{zeniBankListView:S,navigate:t,currentTenant:m,location:r,companyId:P,analytics:R,maxInsuredAmount:f.maxInsuredAmount,isExpressPayEnabled:w,isBillPayEnabled:dn,isDebitCardFeatureEnabled:s,isAutoTransferRuleEnabled:l,handleDrawerToggle:Se,isAiCfoAccessEnabled:hn,onAskAiCfoClick:fn})]})]}):N&&X?e.jsx(Q,{to:"../setup"}):m.companyZeniAccountInfo?.info&&!N&&ln?e.jsx(Q,{to:"../promo",state:r.state}):e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const on=(n,a,r)=>{const t=xe(r,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},Ga=(n,a)=>`/${n}/checking/${a}`,sn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,rn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,cn=n=>`/${n}/checking/express-pay`,Ja=F.div`
49
+ `,Wa=ae((function(n,a){return{zeniAccountListView:We(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,companyId:i,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:f}=a,{tenantEmailDomain:y}=t;return{onZeniAccountClick:(s,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const h=Ga(y,s),m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(h,{state:{pathnameStackToGoBack:m}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),r("setup")},onReloadTransactions:()=>{n(Ge(!1))},handleMoveMoneyOptionSelection:(s,l)=>{let h="page-not-found";s==="sendMoney"&&(h=cn(y)),s==="payBill"?h=on(t,p,f):s==="transfer"?(h=sn(y),l!=null&&n(Ke(l))):s==="checkDeposit"&&(h=rn(y));const m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(h,{state:{pathnameStackToGoBack:m}})},unlinkPaymentAccount:(s,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),n(Yn(s))},onFetchLinkTokenClick:(s,l)=>{n(Ze("external_account",s,l))},onUpdatePaymentAccountStatus:(s,l,h)=>{n(Kn(s,l,"zeni_accounts","external_account",h))},onEstablishConnectionClick:s=>{n(Ne(s,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:s=>{n(Jn(s))},onClickMenuIcon:()=>{d(!0)},onAutoTransferClick:s=>{const l="./auto-transfer";s?r(l,{state:{...o.state,scrollToAddRule:!0}}):r(l)}}}))(ma);function fe({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const r=W(),t=ne(),o=z(),i=M(),{tenantEmailDomain:d}=G(),{useDynamicConfig:c,useFeatureGate:p}=H(),f=U(),{configValue:y}=c(Z.zeniAccountsConfig),{isFeatureEnabled:s}=p($.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p($.isAutoTransferRuleEnabled),h=he(y),m=k((_=>L(_))),P=m.companyId??b.getSignedInUserTenant(d)?.companyId,{configValue:D}=c(Z.expressPayConfig),w=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(m.tenantId),[I,C]=g.useState(!1),[A,E]=g.useState(!1),[T,v]=g.useState(!1),[j,O]=g.useState(!1),S=k((_=>We(_))),B=S.fetchState,u=k((_=>Ue(_))),V=u?.fetchState??"Not-Started",pe=!!m.companyZeniAccountInfo?.info?.isZeniAccountEnabled,oe=te(),N=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,X=ee(oe?.loggedInUserRoleMap),ln=ye(oe?.loggedInUserRoleMap),dn=!!m.companyBillPayInfo?.info?.isBillPayEnabled,De=b.getSignedInUser(),un={userId:De?.userId??"",sessionId:De?.zeniSessionId??"",tenantId:m.tenantId??""},pn=`${Ce}/account_details`,{areTenantIdsInSync:ke}=pa();g.useEffect((()=>{!I&&ke&&(C(!0),o(Ge(!1)))}),[I,o,B,ke]),g.useEffect((()=>{!A&&V==="Not-Started"&&P&&(E(!0),o(ze(!0)))}),[A,V,P,o]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const Ie=()=>{v(!1),t("..")},[mn,gn]=g.useState(!1),Se=_=>{gn(_)},{isAiCfoAccessEnabled:fn,onAskAiCfoClick:hn}=nn({mobileExploreReferrer:"Checking Accounts"});Qe({isDataReady:B==="Completed"});const yn=Je(m),xn=xe(s,m);return yn===!0&&xn!==!0?e.jsx(en,{}):pe?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&T===!1&&j===!1?e.jsx(de,{analytics:R,onLoad:_=>(Cn=>{Cn.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Be(S.summary?.totalBalance.available.amount??0),Be(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield)})(_)}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Ie,isTransferDrawerOpen:T,zeniAccountsConfig:S.zeniAccountsConfig,authParams:un,downloadAccountDetailEndPoint:pn}):null,j===!0?e.jsx(an,{closeDrawerHandler:Ie,isCheckDepositDrawerOpen:j}):null,e.jsxs(Za,{windowSize:i,children:[e.jsx(ue,{isAppContentDrawerOpen:mn,handleDrawerToggle:Se}),e.jsx(Wa,{zeniBankListView:S,navigate:t,currentTenant:m,location:r,companyId:P,analytics:R,maxInsuredAmount:h.maxInsuredAmount,isExpressPayEnabled:w,isBillPayEnabled:dn,isDebitCardFeatureEnabled:s,isAutoTransferRuleEnabled:l,handleDrawerToggle:Se,isAiCfoAccessEnabled:fn,onAskAiCfoClick:hn})]})]}):N&&X?e.jsx(Q,{to:"../setup"}):m.companyZeniAccountInfo?.info&&!N&&ln?e.jsx(Q,{to:"../promo",state:r.state}):e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const on=(n,a,r)=>{const t=xe(r,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},Ga=(n,a)=>`/${n}/checking/${a}`,sn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,rn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,cn=n=>`/${n}/checking/express-pay`,Ja=F.div`
50
50
  display: flex;
51
51
  width: 100%;
52
52
  flex: 1 1 auto;
@@ -54,4 +54,4 @@ import{j as e}from"./liveblocks-UAxYbctH.js";import{u as z,h as ne,g as W,i as G
54
54
  align-items: center;
55
55
  min-height: 100vh;
56
56
  background-color: ${n=>n.theme.colors.grey4};
57
- `,Ka=ae((function(n,a){const{currentTenant:r}=a,t=Ye(n,a.accountId),o=b.getSignedInUser(),i=n.tenantState.currentTenantId,d={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:i??""},c=t.accountDetail?.id??"";return{currentTenantCompanyName:r.companyName??"",authParams:d,downloadEndPoint:`${Ae.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,accountId:i}=a,{tenantEmailDomain:d}=t;return{handleMoveMoneyOptionSelection:(c,p)=>{let h="page-not-found";c==="sendMoney"?h=cn(d):c==="payBill"?h=on(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):c==="transfer"?(h=sn(d,i),p!=null&&n(Ke(p))):c==="checkDeposit"?(h=rn(d,i),p!=null&&n(Xn(p))):c==="accountStatement"&&(h=Xa(d,i));const y=ie(o.state?.pathnameStackToGoBack,o.pathname);r(h,{state:{pathnameStackToGoBack:y}})},onAccountDetailClick:()=>{const c=Ya(d,i),p=ie(o.state?.pathnameStackToGoBack,o.pathname);r(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{n(Ee(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{n(Xe(i,!1))},onCloseAccountClick:()=>{n(Ee(i,"closeAccount",""))},onBackClick:()=>{r("../",{relative:"path"})}}}))(ga);function re({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:r}){const t=W(),o=ne(),i=z(),d=M(),{tenantEmailDomain:c,accountId:p}=G(),{useDynamicConfig:h}=H(),{useFeatureGate:y}=H(),{isFeatureEnabled:s}=y($.isDebitCardFeatureEnabled),l=k((X=>L(X))),{configValue:f}=h(Z.expressPayConfig),m=f.is_enable_all_tenants===!0||f.tenant_ids!=null&&f.tenant_ids.includes(l.tenantId),P=!!l.companyBillPayInfo?.info?.isBillPayEnabled,D=b.getSignedInUser(),w=l.companyId??b.getSignedInUserTenant(c)?.companyId,I={userId:D?.userId??"",sessionId:D?.zeniSessionId??"",tenantId:l.tenantId??""},C=`${Ce}/account_details`,[A,E]=g.useState(!1),[T,v]=g.useState(!1),[j,O]=g.useState(!1),[S,B]=g.useState(!1),u=k((X=>Ye(X,p??""))),V=u.fetchState,{isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe}=nn({mobileExploreReferrer:"Checking Account Detail"});Qe({isDataReady:V==="Completed"}),g.useEffect((()=>{A||(i(Xe(p??"",!1)),E(!0))}),[A,i,V]),g.useEffect((()=>{B(r!=null&&r===!0)}),[r]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const N=()=>{B(!1),o("..")};return e.jsxs(e.Fragment,{children:[S===!0&&u.accountDetail!=null?e.jsx(_a,{authParams:I,downloadAccountDetailEndPoint:C,closeDrawerHandler:N,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:u.accountDetail}):null,T===!0?e.jsx(tn,{closeDrawerHandler:N,isTransferDrawerOpen:T,zeniAccountsConfig:u.zeniAccountsConfig,authParams:I,downloadAccountDetailEndPoint:C}):null,j===!0?e.jsx(an,{closeDrawerHandler:N,isCheckDepositDrawerOpen:j}):null,e.jsx(Ja,{windowSize:d,children:e.jsx(Ka,{navigate:o,currentTenant:l,location:t,companyId:w,isDebitCardFeatureEnabled:s,accountId:p??"",isBillPayEnabled:P,isExpressPayEnabled:m,isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe})})]})}const Ya=(n,a)=>`/${n}/checking/${a}/account-info`,Xa=(n,a)=>`/${n}/checking/${a}/statements`,qa=ae((function(n,a){const{companyId:r}=a;return{zeniAccountSetupView:qn(n,r)}}),(function(n,a){const{navigate:r,companyId:t}=a;return{onSetupButtonClick:()=>{R.trackAccountsPromoPageClicked("Setup Accounts"),n(Qn(t))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{r("../setup",{relative:"path"})}}}))(ya),Qa=()=>{const n=ne(),a=W(),{tenantEmailDomain:r}=G(),{useDynamicConfig:t}=H(),o=ha(),i=U(),[d,c]=g.useState(!1),[p,h]=g.useState(!1),y=k((A=>L(A))),{configValue:s}=t(Z.zeniAccountsConfig),l=fe(s);g.useEffect((()=>{p===!1&&a.state?.message==="activation"&&h(!0)}),[a.state]);const f=b.getSignedInUserTenant(r)?.companyId??y.companyId,m=b.getSignedInUser(),P=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,D=A=>{c(A)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const w=te(),I=ee(w?.loggedInUserRoleMap),C=ye(w?.loggedInUserRoleMap);if(P&&I)return e.jsx(Q,{to:"../../checking/setup"});if(y.company?.companyZeniAccountInfo&&(!P&&I||C)){if(a.state?.message==="activation"){const A=qe(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:A.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(fa,{showConfetti:p}),e.jsx(de,{analytics:R,onLoad:A=>(E=>E.trackPageLoaded(we.Event.accountsPromoPageViewed))(A)}),e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:D}),e.jsx(qa,{analytics:R,navigate:n,companyId:f,meetingUrl:o("zeni_accounts_promo"),onClickMenuIcon:()=>{D(!0)},maxAnnualPercentageYield:l.maxAnnualPercentageYield,maxInsuredAmount:l.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})};function jt(){const n=W(),a=k((S=>L(S))),r=U(),{useFeatureGate:t,useDynamicConfig:o}=H(),i=te(),d=ee(i?.loggedInUserRoleMap),c=ye(i?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:y}=t($.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=t($.isDebitCardFeatureEnabled),l=Je(a),f=xe(s,a),m=a?.userRole!=null&&ea(a?.userRole),P=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!m)&&na(i?.loggedInUserRoleMap),D=aa(i?.loggedInUserRoleMap),w=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!m)&&ta(i?.loggedInUserRoleMap),I=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!m,{configValue:C}=o(Z.expressPayConfig),A=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(a.tenantId),{isFeatureEnabled:E}=t($.isAutoTransferRuleEnabled),T=xa(a,y,s)&&!m&&oa(i?.loggedInUserRoleMap),v=sa(i?.loggedInUserRoleMap),j=I&&ee(i?.loggedInUserRoleMap),O=j||Me(i?.loggedInUserRoleMap);return e.jsxs(Le,{children:[e.jsx(x,{path:"setup",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),e.jsx(x,{path:"verification",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),E?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"auto-transfer",element:e.jsx(Re,{})}),O?e.jsx(x,{path:"auto-transfer/:ruleId/edit",element:e.jsx(Re,{isEditDrawerOpen:!0})}):null]}):e.jsx(x,{path:"auto-transfer",element:e.jsx(q,{})}),A&&d?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"express-pay",element:e.jsx(se,{})}),e.jsx(x,{path:"express-pay/add-ach",element:e.jsx(se,{isAddACHDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire/add-address",element:e.jsx(se,{isAddAddressDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire",element:e.jsx(se,{isAddWireDrawerOpen:!0})})]}):e.jsx(x,{path:"express-pay",element:e.jsx(q,{})}),e.jsx(x,{path:"promo",element:e.jsx(Qa,{})}),l&&!f?e.jsx(x,{path:"/*",element:e.jsx(en,{})}):p?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/",element:e.jsx(he,{})}),e.jsx(x,{path:"transfer",element:e.jsx(he,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(he,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"cash_management/*",element:e.jsx(q,{})}),e.jsx(x,{path:":accountId/*",element:e.jsx(et,{})}),e.jsx(x,{path:"*",element:e.jsx(q,{})})]}):h&&d?e.jsx(x,{path:"*",element:e.jsx(Q,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&c?e.jsx(x,{path:"*",element:e.jsx(Q,{to:"../promo",state:n.state})}):e.jsx(x,{path:"*",element:e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${Ca.sp1} ${r.colors.dropShadowNormal}`}})})]})}function et(){return e.jsxs(Le,{children:[e.jsx(x,{path:"/",element:e.jsx(re,{})}),e.jsx(x,{path:"account-info",element:e.jsx(re,{isAccountInfoDrawerOpen:!0})}),e.jsx(x,{path:"transfer",element:e.jsx(re,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(re,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"statements",element:e.jsx(Ia,{})}),e.jsx(x,{path:"*",element:e.jsx(q,{})})]})}export{jt as default};
57
+ `,Ka=ae((function(n,a){const{currentTenant:r}=a,t=Ye(n,a.accountId),o=b.getSignedInUser(),i=n.tenantState.currentTenantId,d={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:i??""},c=t.accountDetail?.id??"";return{currentTenantCompanyName:r.companyName??"",authParams:d,downloadEndPoint:`${Ae.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,accountId:i}=a,{tenantEmailDomain:d}=t;return{handleMoveMoneyOptionSelection:(c,p)=>{let f="page-not-found";c==="sendMoney"?f=cn(d):c==="payBill"?f=on(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):c==="transfer"?(f=sn(d,i),p!=null&&n(Ke(p))):c==="checkDeposit"?(f=rn(d,i),p!=null&&n(Xn(p))):c==="accountStatement"&&(f=Xa(d,i));const y=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:y}})},onAccountDetailClick:()=>{const c=Ya(d,i),p=ie(o.state?.pathnameStackToGoBack,o.pathname);r(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{n(Ee(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{n(Xe(i,!1))},onCloseAccountClick:()=>{n(Ee(i,"closeAccount",""))},onBackClick:()=>{r("../",{relative:"path"})}}}))(ga);function re({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:r}){const t=W(),o=ne(),i=z(),d=M(),{tenantEmailDomain:c,accountId:p}=G(),{useDynamicConfig:f}=H(),{useFeatureGate:y}=H(),{isFeatureEnabled:s}=y($.isDebitCardFeatureEnabled),l=k((X=>L(X))),{configValue:h}=f(Z.expressPayConfig),m=h.is_enable_all_tenants===!0||h.tenant_ids!=null&&h.tenant_ids.includes(l.tenantId),P=!!l.companyBillPayInfo?.info?.isBillPayEnabled,D=b.getSignedInUser(),w=l.companyId??b.getSignedInUserTenant(c)?.companyId,I={userId:D?.userId??"",sessionId:D?.zeniSessionId??"",tenantId:l.tenantId??""},C=`${Ce}/account_details`,[A,E]=g.useState(!1),[T,v]=g.useState(!1),[j,O]=g.useState(!1),[S,B]=g.useState(!1),u=k((X=>Ye(X,p??""))),V=u.fetchState,{isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe}=nn({mobileExploreReferrer:"Checking Account Detail"});Qe({isDataReady:V==="Completed"}),g.useEffect((()=>{A||(i(Xe(p??"",!1)),E(!0))}),[A,i,V]),g.useEffect((()=>{B(r!=null&&r===!0)}),[r]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const N=()=>{B(!1),o("..")};return e.jsxs(e.Fragment,{children:[S===!0&&u.accountDetail!=null?e.jsx(_a,{authParams:I,downloadAccountDetailEndPoint:C,closeDrawerHandler:N,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:u.accountDetail}):null,T===!0?e.jsx(tn,{closeDrawerHandler:N,isTransferDrawerOpen:T,zeniAccountsConfig:u.zeniAccountsConfig,authParams:I,downloadAccountDetailEndPoint:C}):null,j===!0?e.jsx(an,{closeDrawerHandler:N,isCheckDepositDrawerOpen:j}):null,e.jsx(Ja,{windowSize:d,children:e.jsx(Ka,{navigate:o,currentTenant:l,location:t,companyId:w,isDebitCardFeatureEnabled:s,accountId:p??"",isBillPayEnabled:P,isExpressPayEnabled:m,isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe})})]})}const Ya=(n,a)=>`/${n}/checking/${a}/account-info`,Xa=(n,a)=>`/${n}/checking/${a}/statements`,qa=ae((function(n,a){const{companyId:r}=a;return{zeniAccountSetupView:qn(n,r)}}),(function(n,a){const{navigate:r,companyId:t}=a;return{onSetupButtonClick:()=>{R.trackAccountsPromoPageClicked("Setup Accounts"),n(Qn(t))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{r("../setup",{relative:"path"})}}}))(ya),Qa=()=>{const n=ne(),a=W(),{tenantEmailDomain:r}=G(),{useDynamicConfig:t}=H(),o=fa(),i=U(),[d,c]=g.useState(!1),[p,f]=g.useState(!1),y=k((A=>L(A))),{configValue:s}=t(Z.zeniAccountsConfig),l=he(s);g.useEffect((()=>{p===!1&&a.state?.message==="activation"&&f(!0)}),[a.state]);const h=b.getSignedInUserTenant(r)?.companyId??y.companyId,m=b.getSignedInUser(),P=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,D=A=>{c(A)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const w=te(),I=ee(w?.loggedInUserRoleMap),C=ye(w?.loggedInUserRoleMap);if(P&&I)return e.jsx(Q,{to:"../../checking/setup"});if(y.company?.companyZeniAccountInfo&&(!P&&I||C)){if(a.state?.message==="activation"){const A=qe(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:A.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(ha,{showConfetti:p}),e.jsx(de,{analytics:R,onLoad:A=>(E=>E.trackPageLoaded(we.Event.accountsPromoPageViewed))(A)}),e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:D}),e.jsx(qa,{analytics:R,navigate:n,companyId:h,meetingUrl:o("zeni_accounts_promo"),onClickMenuIcon:()=>{D(!0)},maxAnnualPercentageYield:l.maxAnnualPercentageYield,maxInsuredAmount:l.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})};function jt(){const n=W(),a=k((S=>L(S))),r=U(),{useFeatureGate:t,useDynamicConfig:o}=H(),i=te(),d=ee(i?.loggedInUserRoleMap),c=ye(i?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,f=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:y}=t($.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=t($.isDebitCardFeatureEnabled),l=Je(a),h=xe(s,a),m=a?.userRole!=null&&ea(a?.userRole),P=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!m)&&na(i?.loggedInUserRoleMap),D=aa(i?.loggedInUserRoleMap),w=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!m)&&ta(i?.loggedInUserRoleMap),I=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!m,{configValue:C}=o(Z.expressPayConfig),A=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(a.tenantId),{isFeatureEnabled:E}=t($.isAutoTransferRuleEnabled),T=xa(a,y,s)&&!m&&oa(i?.loggedInUserRoleMap),v=sa(i?.loggedInUserRoleMap),j=I&&ee(i?.loggedInUserRoleMap),O=j||Me(i?.loggedInUserRoleMap);return e.jsxs(Le,{children:[e.jsx(x,{path:"setup",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),e.jsx(x,{path:"verification",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),E?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"auto-transfer",element:e.jsx(Re,{})}),O?e.jsx(x,{path:"auto-transfer/:ruleId/edit",element:e.jsx(Re,{isEditDrawerOpen:!0})}):null]}):e.jsx(x,{path:"auto-transfer",element:e.jsx(q,{})}),A&&d?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"express-pay",element:e.jsx(se,{})}),e.jsx(x,{path:"express-pay/add-ach",element:e.jsx(se,{isAddACHDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire/add-address",element:e.jsx(se,{isAddAddressDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire",element:e.jsx(se,{isAddWireDrawerOpen:!0})})]}):e.jsx(x,{path:"express-pay",element:e.jsx(q,{})}),e.jsx(x,{path:"promo",element:e.jsx(Qa,{})}),l&&!h?e.jsx(x,{path:"/*",element:e.jsx(en,{})}):p?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/",element:e.jsx(fe,{})}),e.jsx(x,{path:"transfer",element:e.jsx(fe,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(fe,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"cash_management/*",element:e.jsx(q,{})}),e.jsx(x,{path:":accountId/*",element:e.jsx(et,{})}),e.jsx(x,{path:"*",element:e.jsx(q,{})})]}):f&&d?e.jsx(x,{path:"*",element:e.jsx(Q,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&c?e.jsx(x,{path:"*",element:e.jsx(Q,{to:"../promo",state:n.state})}):e.jsx(x,{path:"*",element:e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${Ca.sp1} ${r.colors.dropShadowNormal}`}})})]})}function et(){return e.jsxs(Le,{children:[e.jsx(x,{path:"/",element:e.jsx(re,{})}),e.jsx(x,{path:"account-info",element:e.jsx(re,{isAccountInfoDrawerOpen:!0})}),e.jsx(x,{path:"transfer",element:e.jsx(re,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(re,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"statements",element:e.jsx(Ia,{})}),e.jsx(x,{path:"*",element:e.jsx(q,{})})]})}export{jt as default};
@@ -1,4 +1,4 @@
1
- import{j as i}from"./liveblocks-UAxYbctH.js";import{a as m}from"./sentry-CQfqw6mU.js";import{h as x,u as $,g as j,i as v,j as p}from"./core-BQ6YlWys.js";import{U8 as s,U7 as B,a10 as C,fI as T,a11 as U}from"./zeni-epic-state-j9Po26Lg.js";import{a2 as z,af as g,z as D,a8 as E,cY as L,a5 as P}from"./index-DZBfE5XI.js";import{u as N,n as _}from"./mui-DYo6Z7Si.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6e15e5b0-0d26-42e3-bfb0-ac00c8b9f2eb",e._sentryDebugIdIdentifier="sentry-dbid-6e15e5b0-0d26-42e3-bfb0-ac00c8b9f2eb")}catch{}})();const G=_.div`
1
+ import{j as i}from"./liveblocks-CuUK5O_2.js";import{a as m}from"./sentry-D0lP5-8e.js";import{h as x,u as $,g as j,i as v,j as p}from"./core-BBlQ3ArL.js";import{U8 as s,U7 as B,a10 as C,fI as T,a11 as U}from"./zeni-epic-state-aUBx6G2Q.js";import{a2 as z,af as g,z as D,a8 as E,cY as L,a5 as P}from"./index-ClwW47Zs.js";import{u as N,n as _}from"./mui--aGBnNu2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6e15e5b0-0d26-42e3-bfb0-ac00c8b9f2eb",e._sentryDebugIdIdentifier="sentry-dbid-6e15e5b0-0d26-42e3-bfb0-ac00c8b9f2eb")}catch{}})();const G=_.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import"./sentry-CQfqw6mU.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]="459d6150-40e4-4fe0-88f2-7336312ca00a",e._sentryDebugIdIdentifier="sentry-dbid-459d6150-40e4-4fe0-88f2-7336312ca00a")}catch{}})();function d(e,t){if(t!=null)return e.find((n=>n.qboId===t))}function i(e,t){return e.filter((n=>n.qboId!=null&&t.includes(n.qboId)))}function s(e,t){return t.map((n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""})))}export{i as a,d as g,s as m};
1
+ import"./sentry-D0lP5-8e.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]="459d6150-40e4-4fe0-88f2-7336312ca00a",e._sentryDebugIdIdentifier="sentry-dbid-459d6150-40e4-4fe0-88f2-7336312ca00a")}catch{}})();function d(e,t){if(t!=null)return e.find((n=>n.qboId===t))}function i(e,t){return e.filter((n=>n.qboId!=null&&t.includes(n.qboId)))}function s(e,t){return t.map((n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""})))}export{i as a,d as g,s as m};