@zeniai/web-app-ui 5.3.63-dev → 5.3.64-dev-beta0KB

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 (157) hide show
  1. package/dist/assets/{AccountMappingScreen-BRZHYOUR.js → AccountMappingScreen-C_GVFaoh.js} +2 -2
  2. package/dist/assets/ActualMatchingMatchDetailScreen-Br9CFUye.js +1 -0
  3. package/dist/assets/AddressRoutes-Bw_nh--O.js +1 -0
  4. package/dist/assets/AddressScreen-CvhZrOl1.js +9 -0
  5. package/dist/assets/AiCfoScreen-enlKpZc4.js +22 -0
  6. package/dist/assets/{AppDrawer-DZIMVdFc.js → AppDrawer-BvDyxQG-.js} +1 -1
  7. package/dist/assets/BillPayApprovalRoutes-D18TxHMc.js +1 -0
  8. package/dist/assets/{BillPayRoutes-CUUjBefv.js → BillPayRoutes-CloKoO0m.js} +6 -6
  9. package/dist/assets/{BusinessVerificationPageScreen-DFamYzxa.js → BusinessVerificationPageScreen-wzhfqwbN.js} +2 -2
  10. package/dist/assets/{CardsAiCfoScreen-Cx5KkOYw.js → CardsAiCfoScreen-CsPjsbB8.js} +2 -2
  11. package/dist/assets/{ChargeCardRoutes-DzIBuJeY.js → ChargeCardRoutes-CeG2_2Iv.js} +9 -9
  12. package/dist/assets/CompanyPassportScreen-CTdU0eT4.js +1 -0
  13. package/dist/assets/ConnectionAuthScreen-tQkR0Qdq.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-Cfna6QXU.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-CjmJGGJm.js → CustomerOnboardingRoutes-C2PIK8CC.js} +3 -3
  16. package/dist/assets/{DashboardRoutes-ByHBLKcB.js → DashboardRoutes-B6PQcDII.js} +4 -4
  17. package/dist/assets/DefaultTenantHome-R8lvjrth.js +1 -0
  18. package/dist/assets/DomesticWireDetailScreen-BOXpXEFg.js +18 -0
  19. package/dist/assets/{DrawerScreen-B5BqRZEJ.js → DrawerScreen-kd-vUIOU.js} +1 -1
  20. package/dist/assets/EntityDetailRoutes-CKVztcFF.js +1 -0
  21. package/dist/assets/ExpenseAutomationRoutes-CZBhc5OO.js +38 -0
  22. package/dist/assets/FeaturePreviewScreen-DlYWStt_.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-BiVfvVOh.js +1 -0
  24. package/dist/assets/{InboxNotificationsProvider-x0fdv66l.js → InboxNotificationsProvider-jZPrqdDf.js} +1 -1
  25. package/dist/assets/InvoicingRoutes-CTeBd6HD.js +2 -0
  26. package/dist/assets/{MagicLinkRoutes-C5BKMtwW.js → MagicLinkRoutes-DBawNNk_.js} +20 -20
  27. package/dist/assets/MagicLinkSignInScreen-CKyZ86AC.js +12 -0
  28. package/dist/assets/MobileAppDrawer-thURFqdR.js +1 -0
  29. package/dist/assets/NotFoundScreen-CjcmfT5h.js +1 -0
  30. package/dist/assets/{NotificationRoutes-DICT3yoM.js → NotificationRoutes-B5kGRr3c.js} +1 -1
  31. package/dist/assets/OAuthConsentScreen-DKPtywIw.js +1 -0
  32. package/dist/assets/PandLWithForecastRoutes-DuKFzXpp.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-Cz1wlNqO.js → PaymentLinkScreen-DgjfMeF_.js} +9 -9
  34. package/dist/assets/PeopleRoutes-BFFXxsrW.js +22 -0
  35. package/dist/assets/PerformanceRoutes-DlDpAJN4.js +1 -0
  36. package/dist/assets/{Preview-Dz6yJNce.js → Preview-CFep9b6s.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-D8eeXRWb.js → QBOConnectionScreen-zn7s2M2b.js} +1 -1
  38. package/dist/assets/ReimbursementApprovalRoutes-h6pN24Dd.js +1 -0
  39. package/dist/assets/ReimbursementApprovalRuleDetailScreen-La5bMk76.js +1 -0
  40. package/dist/assets/ReimbursementRoutes-DpjqJ1j9.js +68 -0
  41. package/dist/assets/{ReportsRoutes-CqUKv9Uh.js → ReportsRoutes-Tu97hQPr.js} +1 -1
  42. package/dist/assets/RewardsRoutes-C7-L_VuA.js +1 -0
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-CLEogplJ.js → ScheduleDetailsPrepaidExpensesScreen-BNVCc0tE.js} +5 -5
  44. package/dist/assets/ScreenRoutes-DUiJb0LC.js +2 -0
  45. package/dist/assets/{SettingsRoutes-QcMcR-j3.js → SettingsRoutes-BVrPYY3-.js} +6 -6
  46. package/dist/assets/{SetupPagesScreen-fuvb0IYd.js → SetupPagesScreen-Cx3OOUGr.js} +4 -4
  47. package/dist/assets/SignInScreen-BXBlASFY.js +1 -0
  48. package/dist/assets/SignOutScreen-BN1O2qGb.js +9 -0
  49. package/dist/assets/{TaskListScreen-C2urPjKT.js → TaskListScreen-DrflApgr.js} +2 -2
  50. package/dist/assets/{TaskRoutes-BuzkCbPW.js → TaskRoutes-BxW92Ol2.js} +2 -2
  51. package/dist/assets/TransactionDetailRoutes-CUdtnWL8.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-CQr1YyP0.js → TransactionDetailScreen-C2qhnA5b.js} +2 -2
  53. package/dist/assets/TransactionListRoutes-Bt_C_073.js +1 -0
  54. package/dist/assets/{TreasuryRoutes-CbD79DO8.js → TreasuryRoutes-DJK_7z5t.js} +5 -5
  55. package/dist/assets/{VendorsRoutes-CCYu89Uf.js → VendorsRoutes-dr-KQ_Nk.js} +13 -13
  56. package/dist/assets/WiseConfirmationScreen-BjSMumPA.js +12 -0
  57. package/dist/assets/{ZeniAccountRoutes-CoRmS3Mc.js → ZeniAccountRoutes-mpb2ppPH.js} +11 -11
  58. package/dist/assets/ZeniAccountStatementScreen-C6P6WNnP.js +9 -0
  59. package/dist/assets/{accountMappingHelper-tmyjt9rr.js → accountMappingHelper-D5I8xPpR.js} +1 -1
  60. package/dist/assets/analytics-CVpLIXYS.js +68 -0
  61. package/dist/assets/{analyticsHelper-BEL0ra9X.js → analyticsHelper-DIAaX2E9.js} +1 -1
  62. package/dist/assets/{core-CHD8T-IM.js → core-BmXpopk3.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-p_nrn8Pg.js → decodeURIComponentSafe-CmNiiSLm.js} +1 -1
  64. package/dist/assets/{dnd-Dwi6R-ey.js → dnd-CFbFq_On.js} +1 -1
  65. package/dist/assets/{empty-CeRjDJvl.js → empty-0E71-pkh.js} +1 -1
  66. package/dist/assets/{empty-CZC5CrVC.js → empty-IUpx8pFE.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-BQ5qxpg6.js → emptyVideoElement-DvAsJwe7.js} +1 -1
  68. package/dist/assets/epic-Dp0UOOW0.js +2 -0
  69. package/dist/assets/expenseAutomationHelper-wsi-w_Qs.js +1 -0
  70. package/dist/assets/{getLocaleForTenant-D-or0iZO.js → getLocaleForTenant-CLcFXXBi.js} +1 -1
  71. package/dist/assets/{index-DKH4PK2B.js → index-BH7Z90Ry.js} +16554 -16011
  72. package/dist/assets/{index-BMy5YH8G.js → index-BwG9RDJd.js} +1 -1
  73. package/dist/assets/{index-yiW1aZfy.js → index-DaYn0dIv.js} +2 -2
  74. package/dist/assets/{index-CKiMoeFX.js → index-Diiw4rJ6.js} +1 -1
  75. package/dist/assets/{index-BVHBHjSe.js → index-_EB0AYfG.js} +1 -1
  76. package/dist/assets/{index-XRUedCJ0.js → index-n9iskFtR.js} +1 -1
  77. package/dist/assets/{index-C1KaIuMT.js → index-nMXCGK26.js} +1 -1
  78. package/dist/assets/{index-w09kaOHP.js → index-xAn5v5dB.js} +1 -1
  79. package/dist/assets/{lexical-CMNdypK6.js → lexical-CUqOWG_f.js} +1 -1
  80. package/dist/assets/{liveblocks-e6rGc1UF.js → liveblocks-2F3ER8H4.js} +1 -1
  81. package/dist/assets/{lottie-B778bt56.js → lottie-Do5BYuHO.js} +1 -1
  82. package/dist/assets/{mui-NTaF3UaY.js → mui-DpZKsKJ-.js} +1 -1
  83. package/dist/assets/{pathToGoBack-3T3qt1CN.js → pathToGoBack-IYhrTF3T.js} +1 -1
  84. package/dist/assets/{pdf-Bx92ZlM_.js → pdf-CaVqV5T4.js} +3 -3
  85. package/dist/assets/{pdf-lib-CSbJ_JNk.js → pdf-lib-DgpGz3__.js} +1 -1
  86. package/dist/assets/{plaid-DdTo7m1-.js → plaid-B0sfsJHV.js} +1 -1
  87. package/dist/assets/{pusher-TnSBrmnt.js → pusher-BZ4RRfso.js} +1 -1
  88. package/dist/assets/{react-BRi8TcMI.js → react-B40uyjvd.js} +1 -1
  89. package/dist/assets/{react-COkaiBQo.js → react-BlQV6oEC.js} +1 -1
  90. package/dist/assets/{react-Ba46BK4D.js → react-CM6JlJfX.js} +1 -1
  91. package/dist/assets/{react-Ci1ltUcy.js → react-CVdpmzlC.js} +1 -1
  92. package/dist/assets/{react-DJOUavGZ.js → react-Cx2vmGsH.js} +1 -1
  93. package/dist/assets/{react-B75Gnqob.js → react-cC2pOmRW.js} +1 -1
  94. package/dist/assets/{recharts-C6xUtcdL.js → recharts-lgPPofcu.js} +1 -1
  95. package/dist/assets/routePaths-DuFLBwyX.js +1 -0
  96. package/dist/assets/{sentry-DsyKtMW2.js → sentry-Dwi3Xpu2.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-CKrdD9MQ.js → stripSplatSuffix-Cm_Bj9mb.js} +1 -1
  98. package/dist/assets/{url-Zl9uXQ4e.js → url-B3IdPeRD.js} +1 -1
  99. package/dist/assets/{url-ClJewK9Y.js → url-CuCw2GYz.js} +1 -1
  100. package/dist/assets/useActualMatchingMatchDetail-CTL9QRWv.js +1 -0
  101. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-B1hI9_5p.js +1 -0
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-B82QOIYm.js +1 -0
  103. package/dist/assets/{useChargeCardPusherEvents-BWi4_PP5.js → useChargeCardPusherEvents-CNgbxhoK.js} +1 -1
  104. package/dist/assets/{useDeviceId-VsdzmSZI.js → useDeviceId-Dklpg4lb.js} +1 -1
  105. package/dist/assets/useEmailConnectResultRefresh-BfOhSDOo.js +1 -0
  106. package/dist/assets/useEnsureVendorListLoaded-BtOYIHPo.js +1 -0
  107. package/dist/assets/{useInitialThreadRequest-DDr_z_RH.js → useInitialThreadRequest-DagpMHc1.js} +1 -1
  108. package/dist/assets/useTaskManagerAccess-DvrYqbN3.js +1 -0
  109. package/dist/assets/{useTaskManagerPusherEvents-DCIopLVZ.js → useTaskManagerPusherEvents-Be2DL4pK.js} +1 -1
  110. package/dist/assets/{utils-CCA3F0sZ.js → utils-DAgs23EZ.js} +1 -1
  111. package/dist/assets/withTransactionSidePanel-Dn8x-lme.js +25 -0
  112. package/dist/assets/{zeni-epic-state-BO3zdDfL.js → zeni-epic-state-DtY6MD5C.js} +6 -6
  113. package/dist/index.html +1 -1
  114. package/package.json +4 -4
  115. package/dist/assets/ActualMatchingMatchDetailScreen-CT_TfQgQ.js +0 -1
  116. package/dist/assets/AddressRoutes-CisWqyoC.js +0 -1
  117. package/dist/assets/AddressScreen-CrINuapd.js +0 -9
  118. package/dist/assets/AiCfoScreen-BXw0LDjo.js +0 -22
  119. package/dist/assets/BillPayApprovalRoutes-Dp_PkbIk.js +0 -1
  120. package/dist/assets/CompanyPassportScreen-CENbDnLW.js +0 -1
  121. package/dist/assets/ConnectionAuthScreen-DTyZxcME.js +0 -11
  122. package/dist/assets/CustomerOnboardingAuthScreen-zLmHJyqv.js +0 -1
  123. package/dist/assets/DefaultTenantHome-Dm9FOXup.js +0 -1
  124. package/dist/assets/DomesticWireDetailScreen-086WQWRB.js +0 -18
  125. package/dist/assets/EntityDetailRoutes-BuN3sXNp.js +0 -1
  126. package/dist/assets/ExpenseAutomationRoutes-Ce3IicTe.js +0 -38
  127. package/dist/assets/FeaturePreviewScreen-D54Nwanb.js +0 -1
  128. package/dist/assets/HubSpotOAuthCallbackScreen-BRUwb2B6.js +0 -1
  129. package/dist/assets/InvoicingRoutes-IQsFojD0.js +0 -2
  130. package/dist/assets/MagicLinkSignInScreen-9LYlxmop.js +0 -12
  131. package/dist/assets/MobileAppDrawer-DX2JnkbM.js +0 -1
  132. package/dist/assets/NotFoundScreen-CtgFRYZy.js +0 -1
  133. package/dist/assets/OAuthConsentScreen-BmiLDdxn.js +0 -1
  134. package/dist/assets/PandLWithForecastRoutes-DAq9XRB1.js +0 -1
  135. package/dist/assets/PeopleRoutes-DgYtveDU.js +0 -22
  136. package/dist/assets/PerformanceRoutes-B6iTINLg.js +0 -1
  137. package/dist/assets/ReimbursementApprovalRoutes-CE6y6IwA.js +0 -1
  138. package/dist/assets/ReimbursementApprovalRuleDetailScreen-BT_O_PEv.js +0 -1
  139. package/dist/assets/ReimbursementRoutes-BmOT-3C-.js +0 -68
  140. package/dist/assets/RewardsRoutes-D5CR9NnI.js +0 -1
  141. package/dist/assets/ScreenRoutes-xDjhbdP1.js +0 -2
  142. package/dist/assets/SignInScreen-ekGlkjLH.js +0 -1
  143. package/dist/assets/SignOutScreen-9NJIr2hr.js +0 -9
  144. package/dist/assets/TransactionDetailRoutes-D99Yv6kv.js +0 -1
  145. package/dist/assets/TransactionListRoutes-BTidVr9Z.js +0 -1
  146. package/dist/assets/WiseConfirmationScreen-B0HeU8Sh.js +0 -12
  147. package/dist/assets/ZeniAccountStatementScreen-BnpFJ5jB.js +0 -9
  148. package/dist/assets/analytics-C3e3An3a.js +0 -68
  149. package/dist/assets/epic-BW8jUHg5.js +0 -2
  150. package/dist/assets/expenseAutomationHelper-kGR6VZFG.js +0 -1
  151. package/dist/assets/routePaths-CGyE-cU7.js +0 -1
  152. package/dist/assets/useActualMatchingMatchDetail-Cc17Q5Tv.js +0 -1
  153. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-CHbHmZzx.js +0 -1
  154. package/dist/assets/useAskAiCfoHostNavButtonProps-BcCbRGDK.js +0 -1
  155. package/dist/assets/useEmailConnectResultRefresh-ClXdZp-6.js +0 -1
  156. package/dist/assets/useTaskManagerAccess-CUv6a62x.js +0 -1
  157. package/dist/assets/withTransactionSidePanel-B_xgLNm6.js +0 -25
@@ -1,4 +1,4 @@
1
- import{a as V}from"./sentry-DsyKtMW2.js";import{u as G,j as b,h as ne,g as se,i as oe,N as ie,l as re}from"./core-CHD8T-IM.js";import{fF as z,HF as ce,Zb as ue,BE as de,Sm as pe,HT as le,L3 as me,NS as fe,Ow as ye,Pl as Se,Zc as ge,Zd as Ie,Ze as he,Zf as be,Zg as Te,Vq as De,Yh as Oe,VF as Ce,M7 as ke,VG as Ve,Mb as we,mH as Ae,gG as Ne,gF as Fe,gE as ve,uX as _e,uO as Ee,uL as Be,mz as xe,BN as ze,BL as L,bE as P,BZ as U,cE as Le}from"./zeni-epic-state-BO3zdDfL.js";import{bU as Pe,W as Ue,N as Me,bj as Re,z as x,a9 as je,k as M,r as E,U as B,bW as Ze,af as Ge,p as R,aH as j}from"./index-DKH4PK2B.js";import{n as He}from"./mui-NTaF3UaY.js";import{j as k}from"./liveblocks-e6rGc1UF.js";import{d as Z}from"./routePaths-CGyE-cU7.js";import{M as qe}from"./MobileAppDrawer-DX2JnkbM.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="3a20a4c0-982e-498d-967d-2787d5dec010",t._sentryDebugIdIdentifier="sentry-dbid-3a20a4c0-982e-498d-967d-2787d5dec010")}catch{}})();function nt(){const t=G(),u=b((r=>z(r))),n=u?.tenantId,{isApprovalRulesV3Enabled:i,isLoading:d}=Pe(n),p=b((r=>r.billPaySetupApproverViewState.fetchState));V.useEffect((()=>{n==null||d||p==="Not-Started"&&t(ce(!0,!0,i))}),[n,d,i,p,t])}const We=He.div`
1
+ import{a as V}from"./sentry-Dwi3Xpu2.js";import{u as G,j as h,h as ne,g as se,i as oe,N as ie,l as re}from"./core-BmXpopk3.js";import{fF as z,HF as ce,Zq as ue,BE as de,Sw as pe,HT as le,L3 as me,NS as fe,Ow as ye,Pl as Se,Zr as ge,Zs as Ie,Zt as be,Zu as he,Zv as Te,VA as Oe,Yw as De,VP as Ce,M7 as ke,VQ as Ve,Mb as we,mH as Ae,gG as Ne,gF as Fe,gE as ve,uX as _e,uO as Ee,uL as Be,mz as xe,BN as ze,BL as P,bE as L,BZ as R,cE as Pe}from"./zeni-epic-state-DtY6MD5C.js";import{bV as Le,O as Re,d as Me,bk as Ue,z as x,a9 as Ze,m as M,s as E,U as B,bX as je,af as Ge,p as U,aH as Z}from"./index-BH7Z90Ry.js";import{n as He}from"./mui-DpZKsKJ-.js";import{j as k}from"./liveblocks-2F3ER8H4.js";import{d as j}from"./routePaths-DuFLBwyX.js";import{M as qe}from"./MobileAppDrawer-thURFqdR.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="60832caa-db7a-4ebe-be38-9829ec92f7a6",t._sentryDebugIdIdentifier="sentry-dbid-60832caa-db7a-4ebe-be38-9829ec92f7a6")}catch{}})();function nt(){const t=G(),u=h((r=>z(r))),n=u?.tenantId,{isApprovalRulesV3Enabled:i,isLoading:d}=Le(n),p=h((r=>r.billPaySetupApproverViewState.fetchState));V.useEffect((()=>{n==null||d||p==="Not-Started"&&t(ce(!0,!0,i))}),[n,d,i,p,t])}const Xe=He.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,4 +6,4 @@ import{a as V}from"./sentry-DsyKtMW2.js";import{u as G,j as b,h as ne,g as se,i
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${t=>t.theme.colors.grey4};
9
- `,$e=re((function(t,u){const{businessVerificationDetails:n}=u,i=z(t),d=x.getSignedInUser(),p=i.tenantId,r={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:p??""},T=De(u.roleMap)&&n.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Oe(t.companyConfigState),s=Ce(t.userRoleConfigState);return{businessVerificationDetails:n,verficationDetailsFetchState:n.fetchState,isRefreshingViewInBackground:n.isRefreshingViewInBackground,allNationalityCountries:n.allNationalityCountries,filesEndPoint:`${Ge.fileMicroServiceBaseUrl}`,authParams:r,isDisabled:T,allIndustries:e.companyIndustries??[],companyTitles:s.companyTitles}}),(function(t,u){const{companyId:n,productType:i,currentTenant:d,navigate:p,location:r}=u,{tenantEmailDomain:T}=d;return{onCompanyDetailsChanged:e=>{const{companyDescription:s,companyIndustry:m,companyIndustryType:O,companyLegalName:C,companyTaxId:g,companyWebsite:y,companyPhone:I,primaryContactEmail:c,primaryContactName:o,primaryContactUserId:l,primaryContactSyncToken:D,syncToken:S,fileIds:a,incDate:f,typeOfIncorporation:w,stateOfIncorporation:A,sourceOfFunds:N,companySubIndustry:F,countriesOfOperations:h,companySourceOfFunds:H,companySourceOfFundsDescription:q,transactionVolume:W,transactionVolumeDescription:$,purposeOfAccount:X,purposeOfAccountDescription:Y,regulatedStatus:J,regulatedStatusDescription:K,usNexus:Q,usNexusTypes:ee}=e,v=O?.selectedOption,te={companyId:n,companyDescription:s,companyIndustry:m.selectedOption,companyIndustryType:v==null||v===""?void 0:v,companyLegalName:C,taxIdOrEIN:g,website:y!=""&&y!=null?Le(y):void 0,phone:I,syncToken:S,fileIds:a,incDate:f!=null?P(f?.toString()):f,typeOfIncorporation:w?.selectedOption??"",stateOfIncorporation:A?.selectedOption??"",sourceOfFunds:N?.selectedOption??"",companySubIndustry:F?.selectedOption??"",countriesOfOperations:h?.selectedOptions.map((_=>_.length===2?_:j(_)))??[],companySourceOfFunds:H?.selectedOption??"",companySourceOfFundsDescription:q,transactionVolume:W?.selectedOption??"",transactionVolumeDescription:$,purposeOfAccount:X?.selectedOption??"",purposeOfAccountDescription:Y,regulatedStatus:J??"",regulatedStatusDescription:K,usNexus:Q,usNexusTypes:ee?.selectedOptions??[]},ae={userId:l,firstName:o.firstName,lastName:o.lastName,email:c,syncToken:D};t(U({companyDetails:te,primaryContactDetails:ae}))},onCompanyOfficerUpdated:e=>{const s=e.map((m=>{const{officerType:O,userId:C,name:g,email:y,nationalityCountryCode:I,ssn:c,dob:o,phone:l,syncToken:D,selectDocument:S,role:a,ownership:f,isSelectedForVerification:w,userVerificationStatus:A,treasuryUserVerificationStatus:N,fileIds:F}=m;let h;return S.selectDocumentType==="driverLicense"?h="driving_license":S.selectDocumentType==="passport"?h="passport":S.selectDocumentType==="stateId"?h="id_document":S.selectDocumentType==="ssnCard"&&(h="social_security_card"),{officerType:O,userId:C,firstName:g.firstName,lastName:g.lastName,email:y,ssn:c,nationalityCountryCode:I?.selectedOption!=null?j(I.selectedOption):void 0,phone:l,birthday:o!=null?P(o?.toString()):o,syncToken:D,titleAtCompany:a.selectedOption,ownershipInCompany:f,documentTypeSelectedForVerification:h,isSelectedForVerification:w,userVerificationStatus:A,treasuryUserVerificationStatus:N,fileIds:F,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));t(U({officers:s}))},onSaveDetailsClick:e=>{t(L(n,e,i))},onSendForVerificationClick:e=>{t(L(n,e,i,!0))},onAddressClick:e=>{const s=Z(T,e),m=R(r.state?.pathnameStackToGoBack,r.pathname);p(s,{state:{pathnameStackToGoBack:m}})},onRegisteredAddressClick:e=>{const s=Z(T,e),m=R(r.state?.pathnameStackToGoBack,r.pathname);p(s,{state:{pathnameStackToGoBack:m}})},onBackClick:()=>{t(ze({companyId:n})),p("../setup")},updateFilesEntity:e=>{t(xe({files:e}))},onDeleteFile:e=>{t(Be(e))},onDeleteFileList:e=>{t(Ee(e))},onEditFileName:(e,s)=>{t(_e(e,s.split(".")[0]))},onGetOtp:e=>{t(ve(e,"SpendManagementSetup"))},onResendOtp:e=>{t(Fe(e,"SpendManagementSetup"))},onVerifyOtp:(e,s)=>{t(Ne(e,s,"SpendManagementSetup"))},saveNewAddressInLocalStore:(e,s)=>{t(Ae({addressType:e,addressToCreate:s}))},onIdentityDocumentUploadedForAutofill:e=>{if(n==null)return;const s=Ve(e.documentType);s!=null&&t(we({target:"setup",companyId:n,officerType:e.officerType,fileId:e.fileId,documentType:s}))},onCompanyDocumentUploadedForAutofill:e=>{n!=null&&t(ke({target:"setup",companyId:n,fileId:e.fileId,documentType:e.documentType}))}}}))(Ze),st=({productType:t})=>{const u=ne(),n=se(),i=G(),[d,p]=V.useState(!1),[r,T]=V.useState(!1),{tenantEmailDomain:e}=oe(),s=Ue(),{useDynamicConfig:m}=Me(),{configValue:O}=m(Re.zeniAccountsConfig),C=ue(O),g=b((a=>{switch(t){case"zeni_accounts":return a.zeniAccountSetupViewState.fetchState;case"reimbursement":return a.remiSetupViewState.fetchState;case"charge_cards":return a.chargeCardSetupViewState.fetchState;case"zeni_treasury":return a.treasurySetupViewState.fetchState;default:return a.billPaySetupViewState.fetchState}})),y=b((a=>a.companyConfigState.fetchState)),I=b((a=>a.userRoleConfigState.fetchState)),c=b((a=>z(a))),o=c.companyId??x.getSignedInUserTenant(e)?.companyId;if(V.useEffect((()=>{y==="Not-Started"&&i(de()),I==="Not-Started"&&i(pe(!0))}),[y,I,i]),V.useEffect((()=>{if(!d&&g==="Not-Started"&&o!=null)switch(p(!0),t){case"zeni_accounts":i(Se(o,!0));break;case"zeni_treasury":i(ye(o,!0));break;case"reimbursement":i(fe(o,!0));break;case"charge_cards":i(me(o,!0));break;default:i(le(o,!0))}}),[d,g,o,i]),x.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let l;switch(t){case"zeni_accounts":l=c.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":l=c.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":l=c.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||c.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":l=c.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:l=c.companyBillPayInfo?.info?.isBillPayTOSAccepted}const D=a=>{T(a)},S=b((a=>{switch(t){case"zeni_accounts":return Te(a,o);case"zeni_treasury":return be(a,o);case"charge_cards":return he(a,o);case"reimbursement":return Ie(a,o);default:return ge(a,o)}}));return l===!1?k.jsx(ie,{to:"../promo"}):k.jsxs(We,{children:[k.jsx(je,{analytics:M,onLoad:a=>(f=>{switch(t){case"zeni_accounts":return f.trackPageLoaded(B.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return f.trackPageLoaded(B.Event.reimbursementBusinessVerification);default:return f.trackPageLoaded(B.Event.billPayBusinessVerification,E(n)?"Settings":void 0)}})(a)}),E(n)?k.jsx(qe,{isAppContentDrawerOpen:r,handleDrawerToggle:D}):null,k.jsx($e,{businessVerificationDetails:S,navigate:u,location:n,companyId:o,analytics:M,currentTenant:c,productType:t,isSettings:E(n),roleMap:s?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{D(!0)},maxInsuredAmount:C.maxInsuredAmount})]})};export{st as B,nt as u};
9
+ `,$e=re((function(t,u){const{businessVerificationDetails:n}=u,i=z(t),d=x.getSignedInUser(),p=i.tenantId,r={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:p??""},T=Oe(u.roleMap)&&n.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=De(t.companyConfigState),s=Ce(t.userRoleConfigState);return{businessVerificationDetails:n,verficationDetailsFetchState:n.fetchState,isRefreshingViewInBackground:n.isRefreshingViewInBackground,allNationalityCountries:n.allNationalityCountries,filesEndPoint:`${Ge.fileMicroServiceBaseUrl}`,authParams:r,isDisabled:T,allIndustries:e.companyIndustries??[],companyTitles:s.companyTitles}}),(function(t,u){const{companyId:n,productType:i,currentTenant:d,navigate:p,location:r}=u,{tenantEmailDomain:T}=d;return{onCompanyDetailsChanged:e=>{const{companyDescription:s,companyIndustry:m,companyIndustryType:D,companyLegalName:C,companyTaxId:g,companyWebsite:y,companyPhone:I,primaryContactEmail:c,primaryContactName:o,primaryContactUserId:l,primaryContactSyncToken:O,syncToken:S,fileIds:a,incDate:f,typeOfIncorporation:w,stateOfIncorporation:A,sourceOfFunds:N,companySubIndustry:F,countriesOfOperations:b,companySourceOfFunds:H,companySourceOfFundsDescription:q,transactionVolume:X,transactionVolumeDescription:$,purposeOfAccount:Q,purposeOfAccountDescription:W,regulatedStatus:Y,regulatedStatusDescription:J,usNexus:K,usNexusTypes:ee}=e,v=D?.selectedOption,te={companyId:n,companyDescription:s,companyIndustry:m.selectedOption,companyIndustryType:v==null||v===""?void 0:v,companyLegalName:C,taxIdOrEIN:g,website:y!=""&&y!=null?Pe(y):void 0,phone:I,syncToken:S,fileIds:a,incDate:f!=null?L(f?.toString()):f,typeOfIncorporation:w?.selectedOption??"",stateOfIncorporation:A?.selectedOption??"",sourceOfFunds:N?.selectedOption??"",companySubIndustry:F?.selectedOption??"",countriesOfOperations:b?.selectedOptions.map((_=>_.length===2?_:Z(_)))??[],companySourceOfFunds:H?.selectedOption??"",companySourceOfFundsDescription:q,transactionVolume:X?.selectedOption??"",transactionVolumeDescription:$,purposeOfAccount:Q?.selectedOption??"",purposeOfAccountDescription:W,regulatedStatus:Y??"",regulatedStatusDescription:J,usNexus:K,usNexusTypes:ee?.selectedOptions??[]},ae={userId:l,firstName:o.firstName,lastName:o.lastName,email:c,syncToken:O};t(R({companyDetails:te,primaryContactDetails:ae}))},onCompanyOfficerUpdated:e=>{const s=e.map((m=>{const{officerType:D,userId:C,name:g,email:y,nationalityCountryCode:I,ssn:c,dob:o,phone:l,syncToken:O,selectDocument:S,role:a,ownership:f,isSelectedForVerification:w,userVerificationStatus:A,treasuryUserVerificationStatus:N,fileIds:F}=m;let b;return S.selectDocumentType==="driverLicense"?b="driving_license":S.selectDocumentType==="passport"?b="passport":S.selectDocumentType==="stateId"?b="id_document":S.selectDocumentType==="ssnCard"&&(b="social_security_card"),{officerType:D,userId:C,firstName:g.firstName,lastName:g.lastName,email:y,ssn:c,nationalityCountryCode:I?.selectedOption!=null?Z(I.selectedOption):void 0,phone:l,birthday:o!=null?L(o?.toString()):o,syncToken:O,titleAtCompany:a.selectedOption,ownershipInCompany:f,documentTypeSelectedForVerification:b,isSelectedForVerification:w,userVerificationStatus:A,treasuryUserVerificationStatus:N,fileIds:F,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));t(R({officers:s}))},onSaveDetailsClick:e=>{t(P(n,e,i))},onSendForVerificationClick:e=>{t(P(n,e,i,!0))},onAddressClick:e=>{const s=j(T,e),m=U(r.state?.pathnameStackToGoBack,r.pathname);p(s,{state:{pathnameStackToGoBack:m}})},onRegisteredAddressClick:e=>{const s=j(T,e),m=U(r.state?.pathnameStackToGoBack,r.pathname);p(s,{state:{pathnameStackToGoBack:m}})},onBackClick:()=>{t(ze({companyId:n})),p("../setup")},updateFilesEntity:e=>{t(xe({files:e}))},onDeleteFile:e=>{t(Be(e))},onDeleteFileList:e=>{t(Ee(e))},onEditFileName:(e,s)=>{t(_e(e,s.split(".")[0]))},onGetOtp:e=>{t(ve(e,"SpendManagementSetup"))},onResendOtp:e=>{t(Fe(e,"SpendManagementSetup"))},onVerifyOtp:(e,s)=>{t(Ne(e,s,"SpendManagementSetup"))},saveNewAddressInLocalStore:(e,s)=>{t(Ae({addressType:e,addressToCreate:s}))},onIdentityDocumentUploadedForAutofill:e=>{if(n==null)return;const s=Ve(e.documentType);s!=null&&t(we({target:"setup",companyId:n,officerType:e.officerType,fileId:e.fileId,documentType:s}))},onCompanyDocumentUploadedForAutofill:e=>{n!=null&&t(ke({target:"setup",companyId:n,fileId:e.fileId,documentType:e.documentType}))}}}))(je),st=({productType:t})=>{const u=ne(),n=se(),i=G(),[d,p]=V.useState(!1),[r,T]=V.useState(!1),{tenantEmailDomain:e}=oe(),s=Re(),{useDynamicConfig:m}=Me(),{configValue:D}=m(Ue.zeniAccountsConfig),C=ue(D),g=h((a=>{switch(t){case"zeni_accounts":return a.zeniAccountSetupViewState.fetchState;case"reimbursement":return a.remiSetupViewState.fetchState;case"charge_cards":return a.chargeCardSetupViewState.fetchState;case"zeni_treasury":return a.treasurySetupViewState.fetchState;default:return a.billPaySetupViewState.fetchState}})),y=h((a=>a.companyConfigState.fetchState)),I=h((a=>a.userRoleConfigState.fetchState)),c=h((a=>z(a))),o=c.companyId??x.getSignedInUserTenant(e)?.companyId;if(V.useEffect((()=>{y==="Not-Started"&&i(de()),I==="Not-Started"&&i(pe(!0))}),[y,I,i]),V.useEffect((()=>{if(!d&&g==="Not-Started"&&o!=null)switch(p(!0),t){case"zeni_accounts":i(Se(o,!0));break;case"zeni_treasury":i(ye(o,!0));break;case"reimbursement":i(fe(o,!0));break;case"charge_cards":i(me(o,!0));break;default:i(le(o,!0))}}),[d,g,o,i]),x.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let l;switch(t){case"zeni_accounts":l=c.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":l=c.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":l=c.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||c.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":l=c.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:l=c.companyBillPayInfo?.info?.isBillPayTOSAccepted}const O=a=>{T(a)},S=h((a=>{switch(t){case"zeni_accounts":return Te(a,o);case"zeni_treasury":return he(a,o);case"charge_cards":return be(a,o);case"reimbursement":return Ie(a,o);default:return ge(a,o)}}));return l===!1?k.jsx(ie,{to:"../promo"}):k.jsxs(Xe,{children:[k.jsx(Ze,{analytics:M,onLoad:a=>(f=>{switch(t){case"zeni_accounts":return f.trackPageLoaded(B.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return f.trackPageLoaded(B.Event.reimbursementBusinessVerification);default:return f.trackPageLoaded(B.Event.billPayBusinessVerification,E(n)?"Settings":void 0)}})(a)}),E(n)?k.jsx(qe,{isAppContentDrawerOpen:r,handleDrawerToggle:O}):null,k.jsx($e,{businessVerificationDetails:S,navigate:u,location:n,companyId:o,analytics:M,currentTenant:c,productType:t,isSettings:E(n),roleMap:s?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{O(!0)},maxInsuredAmount:C.maxInsuredAmount})]})};export{st as B,nt as u};
@@ -1,4 +1,4 @@
1
- import{j as S}from"./liveblocks-e6rGc1UF.js";import{a as l}from"./sentry-DsyKtMW2.js";import{u as pe,h as he,g as Ce,j as M,i as fe,l as ge}from"./core-CHD8T-IM.js";import{a as Se,e7 as be,z as ye,e9 as Pe,eb as N,ec as we,bp as W,a9 as Ie,k as $,ed as H,en as Ee,G as ke,U as Ae,w as xe,eg as Te,eh as Ue,aw as _e,ek as Oe,el as ve,bl as Qe,em as Fe}from"./index-DKH4PK2B.js";import{gK as $e,fE as G,fF as je,g8 as De,jl as Le,jh as Ve,fG as z,gu as qe,go as Re,gq as B,gw as Me,gx as He,gy as ze,gz as Be,gA as Ne}from"./zeni-epic-state-BO3zdDfL.js";import{D as We,n as D,P as Ge,S as Ke}from"./mui-NTaF3UaY.js";import"./recharts-C6xUtcdL.js";import"./analytics-C3e3An3a.js";import"./plaid-DdTo7m1-.js";import"./dnd-Dwi6R-ey.js";import"./stripe-cKAAJElX.js";import"./lottie-B778bt56.js";import"./lexical-CMNdypK6.js";import"./pdf-Bx92ZlM_.js";import"./utils-CCA3F0sZ.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]="efc22e3a-ad71-483d-86a3-fca2d3c8b5f4",e._sentryDebugIdIdentifier="sentry-dbid-efc22e3a-ad71-483d-86a3-fca2d3c8b5f4")}catch{}})();const K="chat-response-generated",Y="cards/ask",J="card_policy_hero";function j(e){return`/${e}/cards`}function X(e){return`/${e}/cards/policy`}const Ye=ge((function(e,a){const o=G(e),c=a.isSubmitting,d=Ue(e,{allUsers:a.allUsers,onCardPolicyVendorSearchTextChange:a.onCardPolicyVendorSearchTextChange});return{showSampleQuestions:a.sessionFromUrl==="new_chat"&&o.uiState.currentChatSessionId==null,aiCfoView:o,isSubmitting:c,isNewChatSession:a.sessionFromUrl==="new_chat",isFullView:!0,tableDownloadEndPoint:`${_e}/tableDownload`,exportDownloadEndPoint:Oe(),emailLinkQuestion:a.emailLinkQuestion,autoSubmitEmailLinkQuestion:a.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:a.onEmailLinkQuestionProcessed,isFileUploadEnabled:a.isFileUploadEnabled,isUploadPromoVisible:a.isUploadPromoVisible,onUploadPromoClose:a.onUploadPromoClose,...d}}),(function(e,a){const{location:o,currentTenant:c,userId:d,navigate:m,currentChatSessionId:h,allSessionsWithOrderedQuestionAnswers:E,isAiCardCreationEnabled:x,isCardPolicyEnabled:T,cardPolicyPageContext:U}=a,i=c.tenantEmailDomain,C=o.state?.referrer,p=C===J?X(i):j(i);return{onEventReceived:(n,t)=>{if(n===K&&typeof t.text=="string"&&typeof t.metadata=="object"){const s=t,f=He(s.type),b=s.metadata.chat_session_id??null,{currentChatSession:y,currentQuestionAnswer:u,currentQuestionAnswerSummary:P}=W(E,b);f!=="answer"?$.trackAICFOChatResponseGenerated(f,u?.question.questionText??"",s.text,b,Fe(P,y),s.metadata.message_id??null):$.trackAICFOChatAnswerGenerated(s.text,u?.question.questionText??"",(s.follow_up_questions?.length??0)>0,!!s.assumptions,!!s.insights,s.visualization!=null,ze(s.visualization?.type??"")??null,b,s.summarized_title,s.metadata.message_id??null),e(Be({chatSessionId:s.metadata.chat_session_id,responseType:f,fetchState:{fetchState:"Completed",error:void 0}})),e(Ne({chatSessionId:s.metadata.chat_session_id,answerPayload:s,userId:d}))}},onSubmit:(n,t,s,f)=>{n&&Qe(e,n,t,h,E,d,f,s,U)},updateCurrentInput:n=>{e(B(n))},onStopSubmit:()=>{},onUpdateScrollYOffset:n=>{e(Me(n))},onSelectSampleQuestion:()=>{},onBackClick:()=>{m(-1)},onCloseClick:()=>{m(p,{state:{...o.state}}),e(B(""))},togglePageView:()=>{m(p,{state:N(o.state)}),a.setIsAiCfoOpen(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{m(-1)},onNewChatClick:()=>{h!=null&&e(Re()),m((function(n){return`/${n}/${Y}`})(i),{state:{...o.state}})},onToggleCotCollapsed:(n,t)=>{e(qe({questionAnswerId:n,isCollapsed:t}))},...ve(e,{isAiCardCreationEnabled:x,isCardPolicyEnabled:T,currentChatSessionId:h,onAfterCardsCreationSubmit:()=>{a.setIsAiCfoOpen(!0),m(j(i),{state:{...o.state}})},onAfterCardPolicySubmit:()=>{a.setIsAiCfoOpen(!0),m(`/${i}/cards/policy`,{state:{...o.state}})}})}}))(xe(Te)),{spendManagement:{chargeCard:{cardsAiCfoHero:Z,cardPolicyAiCfoHero:ee}}}=ke.getLocalizedStrings(),A=Z.pageTitle,Je=ee.pageTitle,Xe=Z.chatHeaderSubtitle,Ze=ee.chatHeaderSubtitle,St=({isFileUploadEnabled:e})=>{const{setIsAiCfoOpen:a}=Se(),o=pe(),c=he(),d=Ce(),[m,h]=l.useState(!1),{allUsers:E,isAiCardCreationEnabled:x,isCardPolicyEnabled:T,onCardPolicyVendorSearchTextChange:U}=be();l.useEffect((()=>{o($e())}),[o]);const i=M((r=>G(r))),C=ye.getSignedInUser(),{session_id:p}=fe(),n=M((r=>je(r))),t=i.uiState.currentChatSessionId,s=n.tenantEmailDomain,{handleUploadPromoClose:f,isUploadPromoVisible:b}=Pe({isFileUploadEnabled:e,tenantEmailDomain:s}),y=d.state,u=y?.aiCfoInitialQuestion??null,P=!!y?.aiCfoShouldSubmit,w=y?.referrer===J,te=w?"card_policy":void 0,se=l.useMemo((()=>({title:w?Je:A,subtitle:w?Ze:Xe})),[w]),[ae,_]=l.useState(null),[oe,O]=l.useState(!1),v=l.useRef(!1);l.useEffect((()=>{v.current||u==null||u===""||(_(u),O(P),v.current=!0)}),[u,P]);const ne=l.useCallback((()=>{_(null),O(!1),c(d.pathname,{replace:!0,state:N(d.state)})}),[d.pathname,d.state,c]),ie=n.masterTOSInfo,g=ie?.isMasterTOSAccepted??!1,k=l.useRef(null);l.useEffect((()=>{if(g&&k.current!=null){const{question:r,shouldSubmit:I}=k.current;k.current=null,_(r),O(I),v.current=!1}}),[g]);const{visitedSessions:L}=we(t),Q=i.fetchState,F=i.uiState.chatSessionsNextPageToken.hasMore||!i.uiState.chatSessionsFirstPageFetched,V=t!=null?i.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",q=t==null||(i.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),R=i.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:re}=W(R,t),le=re.length===0;l.useEffect((()=>{t!=null&&p!==t&&c((function(r,I){return`/${r}/${Y}/${I}`})(s,t),{state:{...d.state},replace:!0})}),[t,p,s,c,d.state]),l.useEffect((()=>{p!=null&&t==null&&p!=="new_chat"&&o(De({sessionId:p,agentId:"controller"}))}),[]);const de=l.useMemo((()=>({events:L.map((r=>`private-encrypted-chat-${r}.${K}`)),eventCallback:(r,I,me)=>me.onEventReceived(r,I)})),[L]);if(l.useEffect((()=>{Q!=="In-Progress"&&F&&o(Le())}),[Q,F,o]),l.useEffect((()=>{t!=null&&V!=="In-Progress"&&q&&C!=null&&Q==="Completed"&&!F&&o(Ve(t,C.userId))}),[V,q,t,C,o]),C==null)throw Error("Can't access Cards AI CFO page without signing in...");const ce=p??"new_chat",ue=t!=null&&i.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";return S.jsxs(tt,{children:[S.jsx(Ie,{analytics:$,onLoad:r=>r.trackPageLoaded(Ae.Event.aiCFOPage)}),g?S.jsx(Ye,{...de,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:R,allUsers:E,isAiCardCreationEnabled:x,isCardPolicyEnabled:T,openOnboardingPage:()=>h(!0),userId:C.userId,setIsAiCfoOpen:a,navigate:c,sessionFromUrl:ce,location:d,isSubmitting:ue,isEmptyChatWithSession:le,customPageTitle:A,chatHeader:se,currentTenant:n,emailLinkQuestion:ae??void 0,autoSubmitEmailLinkQuestion:oe,onEmailLinkQuestionProcessed:ne,isFileUploadEnabled:e,isUploadPromoVisible:b,onUploadPromoClose:f,onCardPolicyVendorSearchTextChange:U,cardPolicyPageContext:te}):S.jsx(H,{isTOSAccepted:g,acceptMasterTOSState:i.masterTOSAcceptanceState,customPageTitle:A,onCloseClick:()=>{c(w?X(s):j(s),{state:{...d.state}})},onCompleteClick:()=>{g||n.userRoleId==null||(u!=null&&u!==""&&(k.current={question:u,shouldSubmit:P}),o(z(n.userRoleId)))}}),S.jsx(We,{anchor:"right",open:m,transitionDuration:250,PaperProps:{component:st,style:{width:`${Ee}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>h(!1),children:S.jsx(et,{onClick:r=>r.stopPropagation(),children:S.jsx(H,{isTOSAccepted:g,acceptMasterTOSState:i.masterTOSAcceptanceState,customPageTitle:A,onCloseClick:()=>h(!1),onCompleteClick:()=>{g||n.userRoleId==null||o(z(n.userRoleId)),h(!1)}})})})]})},et=D(Ke)`
1
+ import{j as g}from"./liveblocks-2F3ER8H4.js";import{a as l}from"./sentry-Dwi3Xpu2.js";import{u as pe,h as he,g as Ce,j as M,i as fe,l as Se}from"./core-BmXpopk3.js";import{a as ge,e8 as be,z as ye,ea as Pe,ec as N,ed as we,bq as W,a9 as Ie,m as $,ee as H,eo as Ee,G as Ae,U as ke,w as xe,eh as Te,ei as Ue,aw as _e,el as Oe,em as ve,bm as Qe,en as Fe}from"./index-BH7Z90Ry.js";import{gK as $e,fE as G,fF as je,g8 as De,jl as Le,jh as Ve,fG as z,gu as qe,go as Re,gq as B,gw as Me,gx as He,gy as ze,gz as Be,gA as Ne}from"./zeni-epic-state-DtY6MD5C.js";import{D as We,n as D,P as Ge,S as Ke}from"./mui-DpZKsKJ-.js";import"./recharts-lgPPofcu.js";import"./analytics-CVpLIXYS.js";import"./plaid-B0sfsJHV.js";import"./dnd-CFbFq_On.js";import"./stripe-cKAAJElX.js";import"./lottie-Do5BYuHO.js";import"./lexical-CUqOWG_f.js";import"./pdf-CaVqV5T4.js";import"./utils-DAgs23EZ.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]="a3e86d18-5d75-46ac-a26a-0211e551ceb7",e._sentryDebugIdIdentifier="sentry-dbid-a3e86d18-5d75-46ac-a26a-0211e551ceb7")}catch{}})();const K="chat-response-generated",Y="cards/ask",J="card_policy_hero";function j(e){return`/${e}/cards`}function X(e){return`/${e}/cards/policy`}const Ye=Se((function(e,a){const o=G(e),c=a.isSubmitting,d=Ue(e,{allUsers:a.allUsers,onCardPolicyVendorSearchTextChange:a.onCardPolicyVendorSearchTextChange});return{showSampleQuestions:a.sessionFromUrl==="new_chat"&&o.uiState.currentChatSessionId==null,aiCfoView:o,isSubmitting:c,isNewChatSession:a.sessionFromUrl==="new_chat",isFullView:!0,tableDownloadEndPoint:`${_e}/tableDownload`,exportDownloadEndPoint:Oe(),emailLinkQuestion:a.emailLinkQuestion,autoSubmitEmailLinkQuestion:a.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:a.onEmailLinkQuestionProcessed,isFileUploadEnabled:a.isFileUploadEnabled,isUploadPromoVisible:a.isUploadPromoVisible,onUploadPromoClose:a.onUploadPromoClose,...d}}),(function(e,a){const{location:o,currentTenant:c,userId:d,navigate:m,currentChatSessionId:h,allSessionsWithOrderedQuestionAnswers:E,isAiCardCreationEnabled:x,isCardPolicyEnabled:T,cardPolicyPageContext:U}=a,i=c.tenantEmailDomain,C=o.state?.referrer,p=C===J?X(i):j(i);return{onEventReceived:(n,t)=>{if(n===K&&typeof t.text=="string"&&typeof t.metadata=="object"){const s=t,f=He(s.type),b=s.metadata.chat_session_id??null,{currentChatSession:y,currentQuestionAnswer:u,currentQuestionAnswerSummary:P}=W(E,b);f!=="answer"?$.trackAICFOChatResponseGenerated(f,u?.question.questionText??"",s.text,b,Fe(P,y),s.metadata.message_id??null):$.trackAICFOChatAnswerGenerated(s.text,u?.question.questionText??"",(s.follow_up_questions?.length??0)>0,!!s.assumptions,!!s.insights,s.visualization!=null,ze(s.visualization?.type??"")??null,b,s.summarized_title,s.metadata.message_id??null),e(Be({chatSessionId:s.metadata.chat_session_id,responseType:f,fetchState:{fetchState:"Completed",error:void 0}})),e(Ne({chatSessionId:s.metadata.chat_session_id,answerPayload:s,userId:d}))}},onSubmit:(n,t,s,f)=>{n&&Qe(e,n,t,h,E,d,f,s,U)},updateCurrentInput:n=>{e(B(n))},onStopSubmit:()=>{},onUpdateScrollYOffset:n=>{e(Me(n))},onSelectSampleQuestion:()=>{},onBackClick:()=>{m(-1)},onCloseClick:()=>{m(p,{state:{...o.state}}),e(B(""))},togglePageView:()=>{m(p,{state:N(o.state)}),a.setIsAiCfoOpen(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{m(-1)},onNewChatClick:()=>{h!=null&&e(Re()),m((function(n){return`/${n}/${Y}`})(i),{state:{...o.state}})},onToggleCotCollapsed:(n,t)=>{e(qe({questionAnswerId:n,isCollapsed:t}))},...ve(e,{isAiCardCreationEnabled:x,isCardPolicyEnabled:T,currentChatSessionId:h,onAfterCardsCreationSubmit:()=>{a.setIsAiCfoOpen(!0),m(j(i),{state:{...o.state}})},onAfterCardPolicySubmit:()=>{a.setIsAiCfoOpen(!0),m(`/${i}/cards/policy`,{state:{...o.state}})}})}}))(xe(Te)),{spendManagement:{chargeCard:{cardsAiCfoHero:Z,cardPolicyAiCfoHero:ee}}}=Ae.getLocalizedStrings(),k=Z.pageTitle,Je=ee.pageTitle,Xe=Z.chatHeaderSubtitle,Ze=ee.chatHeaderSubtitle,gt=({isFileUploadEnabled:e})=>{const{setIsAiCfoOpen:a}=ge(),o=pe(),c=he(),d=Ce(),[m,h]=l.useState(!1),{allUsers:E,isAiCardCreationEnabled:x,isCardPolicyEnabled:T,onCardPolicyVendorSearchTextChange:U}=be();l.useEffect((()=>{o($e())}),[o]);const i=M((r=>G(r))),C=ye.getSignedInUser(),{session_id:p}=fe(),n=M((r=>je(r))),t=i.uiState.currentChatSessionId,s=n.tenantEmailDomain,{handleUploadPromoClose:f,isUploadPromoVisible:b}=Pe({isFileUploadEnabled:e,tenantEmailDomain:s}),y=d.state,u=y?.aiCfoInitialQuestion??null,P=!!y?.aiCfoShouldSubmit,w=y?.referrer===J,te=w?"card_policy":void 0,se=l.useMemo((()=>({title:w?Je:k,subtitle:w?Ze:Xe})),[w]),[ae,_]=l.useState(null),[oe,O]=l.useState(!1),v=l.useRef(!1);l.useEffect((()=>{v.current||u==null||u===""||(_(u),O(P),v.current=!0)}),[u,P]);const ne=l.useCallback((()=>{_(null),O(!1),c(d.pathname,{replace:!0,state:N(d.state)})}),[d.pathname,d.state,c]),ie=n.masterTOSInfo,S=ie?.isMasterTOSAccepted??!1,A=l.useRef(null);l.useEffect((()=>{if(S&&A.current!=null){const{question:r,shouldSubmit:I}=A.current;A.current=null,_(r),O(I),v.current=!1}}),[S]);const{visitedSessions:L}=we(t),Q=i.fetchState,F=i.uiState.chatSessionsNextPageToken.hasMore||!i.uiState.chatSessionsFirstPageFetched,V=t!=null?i.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",q=t==null||(i.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),R=i.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:re}=W(R,t),le=re.length===0;l.useEffect((()=>{t!=null&&p!==t&&c((function(r,I){return`/${r}/${Y}/${I}`})(s,t),{state:{...d.state},replace:!0})}),[t,p,s,c,d.state]),l.useEffect((()=>{p!=null&&t==null&&p!=="new_chat"&&o(De({sessionId:p,agentId:"controller"}))}),[]);const de=l.useMemo((()=>({events:L.map((r=>`private-encrypted-chat-${r}.${K}`)),eventCallback:(r,I,me)=>me.onEventReceived(r,I)})),[L]);if(l.useEffect((()=>{Q!=="In-Progress"&&F&&o(Le())}),[Q,F,o]),l.useEffect((()=>{t!=null&&V!=="In-Progress"&&q&&C!=null&&Q==="Completed"&&!F&&o(Ve(t,C.userId))}),[V,q,t,C,o]),C==null)throw Error("Can't access Cards AI CFO page without signing in...");const ce=p??"new_chat",ue=t!=null&&i.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";return g.jsxs(tt,{children:[g.jsx(Ie,{analytics:$,onLoad:r=>r.trackPageLoaded(ke.Event.aiCFOPage)}),S?g.jsx(Ye,{...de,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:R,allUsers:E,isAiCardCreationEnabled:x,isCardPolicyEnabled:T,openOnboardingPage:()=>h(!0),userId:C.userId,setIsAiCfoOpen:a,navigate:c,sessionFromUrl:ce,location:d,isSubmitting:ue,isEmptyChatWithSession:le,customPageTitle:k,chatHeader:se,currentTenant:n,emailLinkQuestion:ae??void 0,autoSubmitEmailLinkQuestion:oe,onEmailLinkQuestionProcessed:ne,isFileUploadEnabled:e,isUploadPromoVisible:b,onUploadPromoClose:f,onCardPolicyVendorSearchTextChange:U,cardPolicyPageContext:te}):g.jsx(H,{isTOSAccepted:S,acceptMasterTOSState:i.masterTOSAcceptanceState,customPageTitle:k,onCloseClick:()=>{c(w?X(s):j(s),{state:{...d.state}})},onCompleteClick:()=>{S||n.userRoleId==null||(u!=null&&u!==""&&(A.current={question:u,shouldSubmit:P}),o(z(n.userRoleId)))}}),g.jsx(We,{anchor:"right",open:m,transitionDuration:250,PaperProps:{component:st,style:{width:`${Ee}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>h(!1),children:g.jsx(et,{onClick:r=>r.stopPropagation(),children:g.jsx(H,{isTOSAccepted:S,acceptMasterTOSState:i.masterTOSAcceptanceState,customPageTitle:k,onCloseClick:()=>h(!1),onCompleteClick:()=>{S||n.userRoleId==null||o(z(n.userRoleId)),h(!1)}})})})]})},et=D(Ke)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -11,4 +11,4 @@ import{j as S}from"./liveblocks-e6rGc1UF.js";import{a as l}from"./sentry-DsyKtMW
11
11
  `,st=D(Ge)`
12
12
  box-shadow: ${({theme:e})=>e.colors.elevation2};
13
13
  color: ${({theme:e})=>e.colors.grey4};
14
- `;export{St as default};
14
+ `;export{gt as default};