@zeniai/web-app-ui 5.4.14-dev → 5.4.15-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 (177) hide show
  1. package/dist/assets/{AccountMappingScreen-BZk8jrAP.js → AccountMappingScreen-BjOLn722.js} +2 -2
  2. package/dist/assets/ActualMatchingMatchDetailScreen-DxeGt00n.js +1 -0
  3. package/dist/assets/AddressRoutes-wf3jLMp6.js +1 -0
  4. package/dist/assets/AddressScreen-6MrKOfvb.js +9 -0
  5. package/dist/assets/AiCfoScreen-D2IsGTI7.js +22 -0
  6. package/dist/assets/{AppDrawer-BnkAekbe.js → AppDrawer-51tmFCqo.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-2Q-AgKCr.js → BillPayApprovalRoutes-CqcByft0.js} +1 -1
  8. package/dist/assets/BillPayRoutes-DjTR6LDc.js +119 -0
  9. package/dist/assets/BusinessVerificationPageScreen-C8E7IOrb.js +9 -0
  10. package/dist/assets/CardsAiCfoScreen-CyjNAzbg.js +14 -0
  11. package/dist/assets/ChargeCardRoutes-D1jDUnLE.js +71 -0
  12. package/dist/assets/CompanyPassportScreen-CCrHjEm4.js +1 -0
  13. package/dist/assets/ConnectionAuthScreen-u25O8YEL.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-DP56g3tx.js +1 -0
  15. package/dist/assets/CustomerOnboardingRoutes-CdWk604C.js +30 -0
  16. package/dist/assets/{DashboardRoutes-VCRBM_Lo.js → DashboardRoutes-CxVvIZyr.js} +4 -4
  17. package/dist/assets/{DefaultTenantHome-Bnjp4uin.js → DefaultTenantHome-B1dhRA7X.js} +1 -1
  18. package/dist/assets/DomesticWireDetailScreen-HGMMXsdl.js +18 -0
  19. package/dist/assets/DrawerScreen-DpM9V-h3.js +1 -0
  20. package/dist/assets/EntityDetailRoutes-CiWU9eOR.js +1 -0
  21. package/dist/assets/{ExpenseAutomationRoutes-C-dPVJak.js → ExpenseAutomationRoutes-BykEoKxY.js} +6 -6
  22. package/dist/assets/FeaturePreviewScreen-5jpbyDlq.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-B-Qgi5tZ.js +1 -0
  24. package/dist/assets/{InboxNotificationsProvider-CPjcPE2w.js → InboxNotificationsProvider-CJ59FBLr.js} +1 -1
  25. package/dist/assets/InvoicingRoutes-DVzjxAr7.js +3 -0
  26. package/dist/assets/MagicLinkRoutes-BulcIao_.js +72 -0
  27. package/dist/assets/MagicLinkSignInScreen-B3s3dqD3.js +12 -0
  28. package/dist/assets/MobileAppDrawer-Diz4hNBc.js +1 -0
  29. package/dist/assets/NotFoundScreen-l_eBhBHD.js +1 -0
  30. package/dist/assets/NotificationRoutes-P-tvBMkz.js +1 -0
  31. package/dist/assets/OAuthConsentScreen-CH9Lv95g.js +1 -0
  32. package/dist/assets/PandLWithForecastRoutes-D7LURgK7.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-B77tcNGP.js → PaymentLinkScreen-BWyxCLTs.js} +5 -5
  34. package/dist/assets/PeopleRoutes-rbgPpJey.js +22 -0
  35. package/dist/assets/PerformanceRoutes-CoOModp8.js +1 -0
  36. package/dist/assets/{Preview-DyDyLMFa.js → Preview-0DfltTWd.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-DdhMvyre.js → QBOConnectionScreen-Det19rnQ.js} +2 -2
  38. package/dist/assets/ReimbursementApprovalRoutes-D5ZwAxEx.js +1 -0
  39. package/dist/assets/ReimbursementApprovalRuleDetailScreen-BQTsJiep.js +1 -0
  40. package/dist/assets/ReimbursementRoutes-B_5omRv6.js +68 -0
  41. package/dist/assets/ReportsRoutes-CRvQbciE.js +1 -0
  42. package/dist/assets/RewardsRoutes-5nWEeQ99.js +1 -0
  43. package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-ehyhu56d.js +33 -0
  44. package/dist/assets/ScreenRoutes-Cg0QxFx2.js +2 -0
  45. package/dist/assets/SettingsRoutes-foH5ZJ3w.js +49 -0
  46. package/dist/assets/{SetupPagesScreen-CfUfKDWM.js → SetupPagesScreen-CAejgxls.js} +5 -5
  47. package/dist/assets/SignInScreen-BLMRggvG.js +1 -0
  48. package/dist/assets/SignOutScreen-6HU69Hwf.js +9 -0
  49. package/dist/assets/TaskListScreen-BuEk-5wI.js +9 -0
  50. package/dist/assets/TaskRoutes-C7UfLoX_.js +9 -0
  51. package/dist/assets/TransactionDetailRoutes-CKuWykLU.js +1 -0
  52. package/dist/assets/TransactionDetailScreen-D1z9X11O.js +5 -0
  53. package/dist/assets/TransactionListRoutes-DZvkZnS3.js +1 -0
  54. package/dist/assets/TreasuryRoutes-Bm4PZ59U.js +37 -0
  55. package/dist/assets/{VendorsRoutes-DWNg-EPe.js → VendorsRoutes-ThVY1BXz.js} +20 -20
  56. package/dist/assets/WiseConfirmationScreen-CnXwL3Zk.js +12 -0
  57. package/dist/assets/{ZeniAccountRoutes-BI00gqox.js → ZeniAccountRoutes-gVqLclSg.js} +11 -11
  58. package/dist/assets/ZeniAccountStatementScreen-n4s_O46n.js +9 -0
  59. package/dist/assets/{accountMappingHelper-DPBaxZAX.js → accountMappingHelper-C2thHMMO.js} +1 -1
  60. package/dist/assets/{analytics-D_VVN36A.js → analytics-WkSvCk9z.js} +4 -4
  61. package/dist/assets/analyticsHelper-PDBXl7Se.js +1 -0
  62. package/dist/assets/{core-Cc1CwF93.js → core-DtTeGJWB.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-BhSMetwg.js → decodeURIComponentSafe-Dnku9ZdA.js} +1 -1
  64. package/dist/assets/{dnd-AdUHoEcy.js → dnd-DR4eaoV-.js} +1 -1
  65. package/dist/assets/{empty-PD8ivveW.js → empty-BNegk5KG.js} +1 -1
  66. package/dist/assets/{empty-DhAh77JM.js → empty-DmZnYBE2.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-BKPO_tn0.js → emptyVideoElement-CGit-XA8.js} +1 -1
  68. package/dist/assets/{epic-BJGEeb_3.js → epic-C0vaCxPe.js} +1 -1
  69. package/dist/assets/expenseAutomationHelper-CNcHl26i.js +1 -0
  70. package/dist/assets/getLocaleForTenant-Bqc2BhMq.js +1 -0
  71. package/dist/assets/{index-Bp8ijVbG.js → index-BRw-S0Do.js} +1 -1
  72. package/dist/assets/{index-zmOdoQIt.js → index-B_U4bcDF.js} +14753 -14753
  73. package/dist/assets/{index-BJg1S6MG.js → index-BoDMWS6Z.js} +2 -2
  74. package/dist/assets/index-CnQ2Hwrv.js +1 -0
  75. package/dist/assets/{index-Cxx08j41.js → index-D79Yg4Pa.js} +1 -1
  76. package/dist/assets/{index-cHP9lO1h.js → index-DQOY5nqW.js} +1 -1
  77. package/dist/assets/{index-BJ8vYoNR.js → index-X62DPOrd.js} +1 -1
  78. package/dist/assets/{index-zhmkax0y.js → index-gtxCOQrD.js} +1 -1
  79. package/dist/assets/{lexical-BRekJTpF.js → lexical-DF0K2978.js} +1 -1
  80. package/dist/assets/{liveblocks-CM1vcHN_.js → liveblocks-DXlRhlw7.js} +15 -15
  81. package/dist/assets/{lottie-BXg_FLck.js → lottie-DOEy9FLJ.js} +1 -1
  82. package/dist/assets/{mui-ehyt9jca.js → mui-UvvMpioS.js} +2 -2
  83. package/dist/assets/{pathToGoBack-jAeSfAQ9.js → pathToGoBack-CTzkpPUW.js} +1 -1
  84. package/dist/assets/{pdf-lib-kwPPw7gn.js → pdf-lib-C8URdnXW.js} +1 -1
  85. package/dist/assets/{pdf-CHwZP-Er.js → pdf-rdPHFveP.js} +4 -4
  86. package/dist/assets/{plaid-WRjvFkFp.js → plaid-CIpr1Lyg.js} +1 -1
  87. package/dist/assets/{pusher-C0WLqP6E.js → pusher-DfQYB_JN.js} +1 -1
  88. package/dist/assets/{react-miDI-z35.js → react-BS0hNTf7.js} +1 -1
  89. package/dist/assets/{react-CvCXtyEQ.js → react-BTgc9osR.js} +1 -1
  90. package/dist/assets/{react-CQgMB5FX.js → react-By3kCyTX.js} +1 -1
  91. package/dist/assets/{react-ZP71p6P6.js → react-CQQuAOkD.js} +1 -1
  92. package/dist/assets/{react-L2WtUuXe.js → react-DEp3ukzS.js} +1 -1
  93. package/dist/assets/{react-Bw2LIZU7.js → react-H6WPphNY.js} +1 -1
  94. package/dist/assets/{recharts-tLFME7sM.js → recharts-VBeTlX07.js} +1 -1
  95. package/dist/assets/{reportTimeframe-DX5pHUc_.js → reportTimeframe-CAbHy0y8.js} +1 -1
  96. package/dist/assets/routePaths-DsLddvmS.js +1 -0
  97. package/dist/assets/{sentry-Bh68thgn.js → sentry-CtZyo70D.js} +2 -2
  98. package/dist/assets/stripSplatSuffix-DUYOfZtR.js +1 -0
  99. package/dist/assets/{url-DqRIAQ9M.js → url-DDEUDnJw.js} +4 -4
  100. package/dist/assets/{url-BTt3PKLo.js → url-ZY4Nz4s5.js} +1 -1
  101. package/dist/assets/useActualMatchingMatchDetail-cU8XyJV-.js +1 -0
  102. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-Du9fPfH0.js +1 -0
  103. package/dist/assets/useAskAiCfoHostNavButtonProps-Rl6Dxu4t.js +1 -0
  104. package/dist/assets/useChargeCardPusherEvents-CREE1zcc.js +1 -0
  105. package/dist/assets/{useDeviceId-B4dK-Ywm.js → useDeviceId-CUrjU4ja.js} +1 -1
  106. package/dist/assets/useEmailConnectResultRefresh-DfCz3FA3.js +1 -0
  107. package/dist/assets/useEnsureVendorListLoaded-CoE84-0L.js +1 -0
  108. package/dist/assets/useInitialThreadRequest-B9aUCLGn.js +1 -0
  109. package/dist/assets/useTaskManagerAccess-jB_YQM25.js +1 -0
  110. package/dist/assets/useTaskManagerPusherEvents-UGiOcEas.js +1 -0
  111. package/dist/assets/{utils-CjDqL2uk.js → utils-Bmb8VI_4.js} +2 -2
  112. package/dist/assets/withTransactionSidePanel-DCK_khop.js +25 -0
  113. package/dist/assets/{zeni-epic-state-DFhlE0W3.js → zeni-epic-state-DZFeYKWz.js} +7 -7
  114. package/dist/index.html +1 -1
  115. package/package.json +4 -4
  116. package/dist/assets/ActualMatchingMatchDetailScreen-DdqC6TYo.js +0 -1
  117. package/dist/assets/AddressRoutes-DZnn8xs0.js +0 -1
  118. package/dist/assets/AddressScreen-DpzckL13.js +0 -9
  119. package/dist/assets/AiCfoScreen-BuC0DF7-.js +0 -22
  120. package/dist/assets/BillPayRoutes-CV19o_tt.js +0 -119
  121. package/dist/assets/BusinessVerificationPageScreen-NPjj2cPM.js +0 -9
  122. package/dist/assets/CardsAiCfoScreen-CadRu1yE.js +0 -14
  123. package/dist/assets/ChargeCardRoutes-BRNnHx29.js +0 -71
  124. package/dist/assets/CompanyPassportScreen-d_xThxF-.js +0 -1
  125. package/dist/assets/ConnectionAuthScreen-B-GQ_uXR.js +0 -11
  126. package/dist/assets/CustomerOnboardingAuthScreen-Dv-djr6z.js +0 -1
  127. package/dist/assets/CustomerOnboardingRoutes-KQwdDIjg.js +0 -30
  128. package/dist/assets/DomesticWireDetailScreen-FhF-Oy51.js +0 -18
  129. package/dist/assets/DrawerScreen-DOVfIfbY.js +0 -1
  130. package/dist/assets/EntityDetailRoutes-BKu8bIme.js +0 -1
  131. package/dist/assets/FallBackRoute-BsefzYi4.js +0 -2
  132. package/dist/assets/FeaturePreviewScreen-CEvvSUOY.js +0 -1
  133. package/dist/assets/HubSpotOAuthCallbackScreen-BRLjqcM8.js +0 -1
  134. package/dist/assets/InvoicingRoutes-Cn0ho2Ac.js +0 -3
  135. package/dist/assets/MagicLinkRoutes-DETheAv8.js +0 -72
  136. package/dist/assets/MagicLinkSignInScreen-hwNEJu9D.js +0 -12
  137. package/dist/assets/MobileAppDrawer-YElMwyTk.js +0 -1
  138. package/dist/assets/NotFoundScreen-DD1ftXbM.js +0 -1
  139. package/dist/assets/NotificationRoutes-j31qfFA3.js +0 -1
  140. package/dist/assets/OAuthConsentScreen-CQV1J_Nj.js +0 -1
  141. package/dist/assets/PandLWithForecastRoutes-CUitXoy8.js +0 -1
  142. package/dist/assets/PeopleRoutes-BbZuMgKW.js +0 -22
  143. package/dist/assets/PerformanceRoutes-D6iGCdx1.js +0 -1
  144. package/dist/assets/ReimbursementApprovalRoutes-lGHZV1sd.js +0 -1
  145. package/dist/assets/ReimbursementApprovalRuleDetailScreen-CtdOG2XT.js +0 -1
  146. package/dist/assets/ReimbursementRoutes-DjGiFO3h.js +0 -68
  147. package/dist/assets/ReportsRoutes-DNhWXb3T.js +0 -1
  148. package/dist/assets/RewardsRoutes-C0czxWPN.js +0 -1
  149. package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-CkM33AZC.js +0 -33
  150. package/dist/assets/ScreenRoutes-DYGYxgwA.js +0 -2
  151. package/dist/assets/SettingsRoutes-DRSU5I7g.js +0 -49
  152. package/dist/assets/SignInScreen-DDQ1e38Q.js +0 -1
  153. package/dist/assets/SignOutScreen-CmYRhks4.js +0 -9
  154. package/dist/assets/TaskListScreen-D8jqZbNF.js +0 -9
  155. package/dist/assets/TaskRoutes-Cu7kReic.js +0 -9
  156. package/dist/assets/TransactionDetailRoutes-B7AzD4hg.js +0 -1
  157. package/dist/assets/TransactionDetailScreen-CpvJY1a3.js +0 -5
  158. package/dist/assets/TransactionListRoutes-BejbKDzL.js +0 -1
  159. package/dist/assets/TreasuryRoutes-DTax48Tc.js +0 -37
  160. package/dist/assets/WiseConfirmationScreen-C4KbEpAc.js +0 -12
  161. package/dist/assets/ZeniAccountStatementScreen-BUg2sDXI.js +0 -9
  162. package/dist/assets/analyticsHelper-DcUdLdtd.js +0 -1
  163. package/dist/assets/expenseAutomationHelper-CCv2kRkH.js +0 -1
  164. package/dist/assets/getLocaleForTenant-CSUvt8Gt.js +0 -1
  165. package/dist/assets/index-foi_vl2g.js +0 -1
  166. package/dist/assets/routePaths-RxstHRDw.js +0 -1
  167. package/dist/assets/stripSplatSuffix-B0jus2nC.js +0 -1
  168. package/dist/assets/useActualMatchingMatchDetail-Dr6cKA7B.js +0 -1
  169. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-CC8PIy8S.js +0 -1
  170. package/dist/assets/useAskAiCfoHostNavButtonProps-Bl76c5H-.js +0 -1
  171. package/dist/assets/useChargeCardPusherEvents-C6oeFa4_.js +0 -1
  172. package/dist/assets/useEmailConnectResultRefresh-nv6tTKw5.js +0 -1
  173. package/dist/assets/useEnsureVendorListLoaded-zh5PaZPv.js +0 -1
  174. package/dist/assets/useInitialThreadRequest-DqCJRXyQ.js +0 -1
  175. package/dist/assets/useTaskManagerAccess-DhT542co.js +0 -1
  176. package/dist/assets/useTaskManagerPusherEvents-B9F1i19u.js +0 -1
  177. package/dist/assets/withTransactionSidePanel-BaaDGWl5.js +0 -25
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-zmOdoQIt.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-Bh68thgn.js"><link rel="modulepreload" crossorigin href="/assets/core-Cc1CwF93.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-DFhlE0W3.js"><link rel="modulepreload" crossorigin href="/assets/mui-ehyt9jca.js"><link rel="modulepreload" crossorigin href="/assets/analytics-D_VVN36A.js"><link rel="modulepreload" crossorigin href="/assets/utils-CjDqL2uk.js"><link rel="stylesheet" crossorigin href="/assets/index-BQ3cXEYt.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-B_U4bcDF.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CtZyo70D.js"><link rel="modulepreload" crossorigin href="/assets/core-DtTeGJWB.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-DZFeYKWz.js"><link rel="modulepreload" crossorigin href="/assets/mui-UvvMpioS.js"><link rel="modulepreload" crossorigin href="/assets/analytics-WkSvCk9z.js"><link rel="modulepreload" crossorigin href="/assets/utils-Bmb8VI_4.js"><link rel="stylesheet" crossorigin href="/assets/index-BQ3cXEYt.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/web-app-ui",
3
- "version": "5.4.14-dev",
3
+ "version": "5.4.15-dev",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -28,9 +28,9 @@
28
28
  "@sentry/core": "^9.42.1",
29
29
  "@sentry/react": "^9.42.1",
30
30
  "@stripe/stripe-js": "^4.4.0",
31
- "@zeniai/client-analytics": "2.1.12",
32
- "@zeniai/client-epic-state": "5.3.3",
33
- "@zeniai/web-components": "4.4.47",
31
+ "@zeniai/client-analytics": "2.1.11",
32
+ "@zeniai/client-epic-state": "5.3.5",
33
+ "@zeniai/web-components": "4.4.49",
34
34
  "color": "3.1.3",
35
35
  "crypto-js": "4.2.0",
36
36
  "dnd-core": "^16.0.1",
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-CM1vcHN_.js";import{a as y}from"./sentry-Bh68thgn.js";import{a5 as A,c1 as R}from"./index-zmOdoQIt.js";import"./mui-ehyt9jca.js";import{u as F}from"./useActualMatchingMatchDetail-Dr6cKA7B.js";import b from"./NotFoundScreen-DD1ftXbM.js";import{i as P,h as U,g as w}from"./core-Cc1CwF93.js";import"./zeni-epic-state-DFhlE0W3.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./stripSplatSuffix-B0jus2nC.js";import"./decodeURIComponentSafe-BhSMetwg.js";import"./routePaths-RxstHRDw.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]="5d1e58e7-9d32-481b-a5a9-fbb96cf6d066",t._sentryDebugIdIdentifier="sentry-dbid-5d1e58e7-9d32-481b-a5a9-fbb96cf6d066")}catch{}})();function V(){const{matchId:t,tenantEmailDomain:e}=P(),o=U(),n=w(),k=F(t??""),r=y.useCallback((()=>{const v=A(n.state?.pathnameStackToGoBack);o(v.poppedPathname??`/${e??""}/month_end_close_checks/review`,{state:{pathnameStackToGoBack:v.newStack}})}),[n.state,o,e]);if(t==null)return s.jsx(b,{});const{match:i,detailFetchState:a,handleOpenBill:l,handleRefresh:h,handleUndoReversal:d,handleApproveAndReverse:c,handleIgnoreMatchSuggestion:f,lastMatchResults:p,lastUndoResults:g,refreshStatus:m,ignoreStatus:u,matchAndReverseStatus:S,undoReversalStatus:I}=k;return i==null?a.fetchState==="Not-Started"||a.fetchState==="In-Progress"?s.jsx(R,{detailFetchState:a.fetchState,isIgnoreInFlight:u.fetchState==="In-Progress",isApproveInFlight:S.fetchState==="In-Progress",isUndoInFlight:I.fetchState==="In-Progress",refreshStatus:m.fetchState,onNavigateBack:r,onOpenBill:l,onApproveAndReverse:c,onIgnoreMatchSuggestion:f,onRefresh:h,onUndoReversal:d,lastMatchResults:p,lastUndoResults:g}):s.jsx(b,{}):s.jsx(R,{match:i,detailFetchState:a.fetchState,isIgnoreInFlight:u.fetchState==="In-Progress",isApproveInFlight:S.fetchState==="In-Progress",isUndoInFlight:I.fetchState==="In-Progress",refreshStatus:m.fetchState,onNavigateBack:r,onOpenBill:l,onApproveAndReverse:c,onIgnoreMatchSuggestion:f,onRefresh:h,onUndoReversal:d,lastMatchResults:p,lastUndoResults:g})}export{V as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-CM1vcHN_.js";import{A as i}from"./AddressScreen-DpzckL13.js";import s from"./NotFoundScreen-DD1ftXbM.js";import"./sentry-Bh68thgn.js";import{n as d,o as r}from"./core-Cc1CwF93.js";import"./zeni-epic-state-DFhlE0W3.js";import"./recharts-tLFME7sM.js";import"./index-zmOdoQIt.js";import"./mui-ehyt9jca.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="759b3caa-23db-47f6-8a7f-f9beb9346558",t._sentryDebugIdIdentifier="sentry-dbid-759b3caa-23db-47f6-8a7f-f9beb9346558")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
@@ -1,9 +0,0 @@
1
- import{j as n}from"./liveblocks-CM1vcHN_.js";import{a as h}from"./sentry-Bh68thgn.js";import{h as T,u as P,g as j,i as E,j as B,l as M}from"./core-Cc1CwF93.js";import{a2 as $,z as D,V as L,a8 as K,a9 as U,e as _,U as S,a4 as z,_ as b,a5 as F}from"./index-zmOdoQIt.js";import{a1z as C,iA as N,fI as R,a1a as V,c7 as G,_g as O,mS as q}from"./zeni-epic-state-DFhlE0W3.js";import{u as H,n as J}from"./mui-ehyt9jca.js";import Q from"./NotFoundScreen-DD1ftXbM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="2acea80b-03d5-4c66-ad37-78d8a71c2a0e",e._sentryDebugIdIdentifier="sentry-dbid-2acea80b-03d5-4c66-ad37-78d8a71c2a0e")}catch{}})();const W=J.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,X=M((function(e,s){const{addressId:o,isSubPage:i,addressType:c}=s,l=R(e),t=s.roleMap!=null&&V(s.roleMap),d=i||c==="user_address"||G(l?.userRole??[])||t?void 0:"readonly";if(o==null){const a=O(c,e);return{addressToEdit:a?.addressToCreate,loadingState:a?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:s.dontShowSaveConfirmation}}const r=C(e,o);return{addressToEdit:r.address,loadingState:r.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d}}),(function(e,s){const{navigate:o,location:i,addressType:c}=s,l=t=>{if(t==="express-pay")o("../express-pay/add-wire");else{const d=i.state,r=F(d?.pathnameStackToGoBack);let a=r.poppedPathname??v();const u=d?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(a=`${a}?${g}`)}o(a,{state:{pathnameStackToGoBack:r.newStack}})}};return{onSubmitHandler:t=>{const d=Y(t);e(q({addressType:c,addressToCreate:d})),_?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:t.street.addressString,city:t.city,state:t.state,country:t.country.selectedOption??"",postalCode:t.postalCode,suite:t.suite,secondaryInfo:t.secondaryInfo}),l(s.bankAccountContext)},onCancel:()=>{l(s.bankAccountContext)}}}))(z);function ne({isSubPage:e,hideAddressSubTitle:s=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const t=T(),d=P(),r=j(),{addressId:a,addressType:u}=E(),g=$(),w=H(),I=D.getSignedInUser(),[p,k]=h.useState(a==null),f=B((m=>a!=null?C(m,a).fetchState:"Not-Started")),x=L();if(I==null)throw Error("Can't access address page without signing in...");const A=m=>m.trackPageLoaded(a!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return h.useEffect((()=>{p||a==null||(k(!0),d(N(a,!1)))}),[p,a,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address|invoicing_customer_billing_address|invoicing_subscription_shipping_address|invoicing_business_address)$/g)?!p&&f==="Not-Started"||p&&f==="In-Progress"?n.jsx(K,{fetchState:f,style:{backgroundColor:w.colors.grey5}}):a!=null&&f==="Error"?(t(`${v(1)}/new`,{replace:!0}),n.jsx(n.Fragment,{})):n.jsxs(n.Fragment,{children:[n.jsx(U,{analytics:_,onLoad:A}),n.jsx(W,{windowSize:g,children:n.jsx(X,{location:r,navigate:t,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:s,addressId:a,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:x?.loggedInUserRoleMap})})]}):n.jsx(Q,{})}const v=(e=2)=>{let s="../";for(let o=0;o<e;o++)s=`${s}../`;return s},Y=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{ne as A,Y as t};
@@ -1,22 +0,0 @@
1
- import{j as S}from"./liveblocks-CM1vcHN_.js";import{a}from"./sentry-Bh68thgn.js";import{u as Qt,h as Lt,i as Bt,g as Mt,j as v,l as Ft}from"./core-Cc1CwF93.js";import{ec as Vt,j as $t,q as Nt,ed as Gt,z as qt,a2 as Ht,ee as zt,ef as Wt,eg as Jt,aE as Be,eh as We,ei as Xt,aD as Je,a5 as ge,a9 as ce,e as V,ej as me,ek as Yt,el as Zt,ax as Kt,U as es,w as ts,em as ss,en as as,aj as ns,eo as os,ep as is,eq as rs,er as ls,v as us,aw as Me,es as ds}from"./index-zmOdoQIt.js";import{fH as F,gw as R,UZ as cs,a3l as ms,a3m as Ss,jX as hs,a3n as ps,jU as fs,a3o as Se,jA as X,k1 as Y,jG as Ie,jn as he,jl as gs,k3 as Is,jP as Xe,V5 as Fe,gy as $,gN as Cs,V4 as ks,US as Ve,fI as bs,je as vs,a3p as Es,gb as Ps,jw as ws,js as ys,fJ as pe,gi as xs,a3q as Rs,a3r as Ts,a3s as Os,gx as js,gr as $e,kf as Ne,gt as Ge,gz as As,a3t as qe,k4 as Ds,jp as _s,jJ as Us,j$ as He,jM as Qs,gA as Ls,gB as Bs,gC as Ms,gD as Fs}from"./zeni-epic-state-DFhlE0W3.js";import{D as Vs,n as N,S as $s,v as Ns}from"./mui-ehyt9jca.js";import{u as Gs}from"./useAiCfoDashboardSuggestedQuestionsChips-CC8PIy8S.js";import{p as qs}from"./pathToGoBack-jAeSfAQ9.js";import{k as Hs}from"./routePaths-RxstHRDw.js";import{u as zs}from"./useTaskManagerPusherEvents-B9F1i19u.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="585a61ba-d1b3-48a0-bac4-328c2f2621db",t._sentryDebugIdIdentifier="sentry-dbid-585a61ba-d1b3-48a0-bac4-328c2f2621db")}catch{}})();const Ws=["claimed","running","succeeded","failed","timeout"],fe=t=>typeof t=="string"&&t!=="",Ye="chat-response-generated";function Js(t,r){if(r.kind!=="save")return;if(r.fetchState==="In-Progress")return{status:"saving"};if(r.fetchState==="Error")return{status:"failed"};if(r.fetchState!=="Completed")return;const h=R(t).skills.find((s=>s.macroId===r.savedMacroId));return h==null?void 0:{status:"saved",command:h.name}}const Xs=Ft((function(t,r){const h=F(t),s=r.isSubmitting,d=h.uiState?.currentChatSessionId,l=d!=null?xs(t.aiCfoState,d):[],i=as(t,{allUsers:r.allUsers,onCardPolicyVendorSearchTextChange:r.onCardPolicyVendorSearchTextChange}),g=Rs(t),p=Ts(t),f=Os(t);return{showSampleQuestions:r.sessionFromUrl==="explore"&&h.uiState.currentChatSessionId==null,aiCfoView:h,isSubmitting:s,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${ns}/tableDownload`,exportDownloadEndPoint:rs(),emailLinkQuestion:r.emailLinkQuestion,autoSubmitEmailLinkQuestion:r.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:r.onEmailLinkQuestionProcessed,routedInitialQuestionSource:r.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:r.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:r.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:r.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:r.isFileUploadEnabled,isUploadPromoVisible:r.isUploadPromoVisible,onUploadPromoClose:r.onUploadPromoClose,skills:R(t).skills,skillSaveState:Js(t,f),skillsEnabled:R(t).skillsEnabled,skillsList:R(t).skills,skillsListError:R(t).fetchState==="Error",skillsListLoading:R(t).fetchState==="In-Progress",skillsCanPublish:R(t).canPublish,skillSaving:f.fetchState==="In-Progress",skillSaveError:f.fetchState==="Error",skillVersionHistory:g.macroId!=null?{macroId:g.macroId,versions:g.versions,error:g.fetchState==="Error",loading:g.fetchState==="In-Progress"}:void 0,skillRestoreBody:p.macroId!=null&&p.version!=null?{macroId:p.macroId,version:p.version,instructions:p.instructions,error:p.fetchState==="Error",loading:p.fetchState==="In-Progress"}:void 0,skillDetail:Y(t).detail,skillDetailError:Y(t).fetchState==="Error",skillDetailLoading:Y(t).fetchState==="In-Progress",syntheticAnswers:l,resolveSyntheticAnswerCardTile:is(t),resolveSyntheticAnswerPolicyTile:os(t),...i}}),(function(t,r){const{location:h,currentTenant:s,userId:d,navigate:l,currentChatSessionId:i,allSessionsWithOrderedQuestionAnswers:g,isAiCardCreationEnabled:p,isCardPolicyEnabled:f,setIsAiCfoOpen:L}=r,B=s.tenantEmailDomain;return{onEventReceived:(n,o)=>{if(n===Ye&&typeof o.text=="string"&&typeof o.metadata=="object"){const c=o,O=Ls(c.type),E=c.metadata.chat_session_id??null,{currentChatSession:j,currentQuestionAnswer:G,currentQuestionAnswerSummary:A}=Je(g,E);O!=="answer"?V.trackAICFOChatResponseGenerated(O,G?.question.questionText??"",c.text,E,ds(A,j),c.metadata.message_id??null):V.trackAICFOChatAnswerGenerated(c.text,G?.question.questionText??"",(c.follow_up_questions?.length??0)>0,!!c.assumptions,!!c.insights,c.visualization!=null,Bs(c.visualization?.type??"")??null,E,c.summarized_title,c.metadata.message_id??null),t(Ms({chatSessionId:c.metadata.chat_session_id,responseType:O,fetchState:{fetchState:"Completed",error:void 0}})),t(Fs({chatSessionId:c.metadata.chat_session_id,answerPayload:c,userId:d}))}},onSubmit:(n,o,c,O,E)=>{n&&Me(t,n,o,i,g,d,O,c,void 0,E)},onFetchSkills:()=>{t(Xe())},onOpenSkill:n=>{t(Ie({macroId:n})),t(Qs({macroId:n}))},onSaveSkill:(n,o)=>{t(He({draft:n,macroId:o}))},onSaveSkillDraft:n=>{const o=n.displayName?.trim()??"",c=n.name?.trim()??"";t(He({draft:{name:o.length>0?o:c,description:n.description?.trim()??null,instructions:n.instructions,visibility:"private"}}))},onFetchSkillVersionBody:(n,o)=>{t(Us({macroId:n,version:o}))},onDeleteSkill:n=>{t(_s({macroId:n}))},onSetSkillVisibility:(n,o)=>{t(Ds({macroId:n,visibility:o}))},onCloseSkillDetail:()=>{t(qe())},onRunSkill:(n,o)=>{t($()),t($e()),Me(t,o,"user_input",void 0,g,d,void 0,void 0,void 0,n),t(qe())},updateCurrentInput:n=>{t(Ge(n))},onStopSubmit:()=>{},onUpdateScrollYOffset:n=>{t(As(n))},onSelectSampleQuestion:()=>{},onBackClick:()=>{l(-1)},onCloseClick:()=>{const n=ge(h.state?.pathnameStackToGoBack),o=n.poppedPathname??qs(1);l(o,{state:{...h.state,pathnameStackToGoBack:n.newStack}}),t(Ge(""))},togglePageView:()=>{const n=ge(h.state?.pathnameStackToGoBack),o=n.poppedPathname??`/${s.tenantEmailDomain}/dashboard`;l(o,{state:{...We(h.state),pathnameStackToGoBack:n.newStack,message:"open_ai_cfo_drawer"}}),L(!0)},onCopy:()=>{},onThumbsUp:(n,o)=>{i!=null&&o?.messageId!=null&&t(Ne(i,o.messageId,"positive",o.questionText,o.answerText))},onThumbsDown:(n,o)=>{i!=null&&o?.messageId!=null&&t(Ne(i,o.messageId,"negative",o.questionText,o.answerText))},onTogglePageView:()=>{l(-1)},onNewChatClick:()=>{t($()),i!=null&&t($e());const n=us(h.state?.pathnameStackToGoBack,h.pathname);l(`/${s.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:n.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(n,o)=>{t(js({questionAnswerId:n,isCollapsed:o}))},onMenuClick:r.onMenuClick,...ls(t,{isAiCardCreationEnabled:p,isCardPolicyEnabled:f,currentChatSessionId:i,onAfterCardsCreationSubmit:()=>{L(!0),l(`/${B}/cards`,{state:{...h.state}})},onAfterCardPolicySubmit:()=>{L(!0),l(`/${B}/cards/policy`,{state:{...h.state}})}})}}))(ts(ss)),ka=({isFileUploadEnabled:t})=>{const r=Vt(),{setIsAiCfoOpen:h}=$t(),s=Qt(),d=Lt(),{session_id:l}=Bt(),i=Mt(),g=new URLSearchParams(i.search).get("routine")??void 0,[p,f]=a.useState(!1),L=v((e=>F(e).uiState.isSkillsBrowserOpen===!0)),B=v((e=>R(e).skillsEnabled)),n=v((e=>F(e).uiState.isRoutinesBrowserOpen===!0)),o=v((e=>cs(e))),c=v((e=>ms(e))),O=v((e=>Ss(e))),[E,j]=a.useState(void 0),[G,A]=a.useState(!1),[Ze,Ce]=a.useState(void 0),Ke=a.useCallback((()=>{Ce(void 0),j(void 0),A(!0)}),[]),et=a.useCallback((e=>{j(e),A(!0)}),[]),tt=a.useCallback((()=>{j(void 0),A(!1)}),[]),st=a.useCallback((e=>{s(hs({draft:e,...E!=null&&{scheduleId:E.scheduleId}})),j(void 0),A(!1)}),[s,E]),P=g,ke=o.routines.find((e=>e.scheduleId===P)),C=v((e=>ps(e))),at=a.useCallback((e=>{s(fs({scheduleId:e.scheduleId}))}),[s]);a.useEffect((()=>{s(P!=null?X({scheduleId:P}):Se())}),[s,P]);const M=ke?.macroId,nt=v((e=>Y(e))),be=M!=null&&M!==""&&nt.fetchState==="Not-Started";a.useEffect((()=>{be&&M!=null&&s(Ie({macroId:M}))}),[s,be,M]);const ot=v((e=>F(e).uiState.currentChatSessionId))??l,k=o.routines.find((e=>e.scheduleId===g))??o.routines.find((e=>e.scheduleId===Nt(ot))),T=k?.scheduleId??null,[ve,it]=a.useState(!0);a.useEffect((()=>{T!=null&&s(X({scheduleId:T}))}),[s,T]);const Ee=C.runs.some((e=>e.status==="claimed"||e.status==="running"))===!0;a.useEffect((()=>{if(P==null||Ee!==!0)return;const e=window.setInterval((()=>{s(X({scheduleId:P})),s(he())}),5e3);return()=>window.clearInterval(e)}),[s,Ee,P]);const rt=a.useCallback((e=>{Ce(e),j(void 0),A(!0)}),[]),lt=a.useCallback((e=>{s(gs({scheduleId:e.scheduleId}))}),[s]),ut=a.useCallback(((e,m)=>{s(Is({enabled:m,scheduleId:e.scheduleId}))}),[s]);a.useEffect((()=>{n&&s(he())}),[s,n]);const Pe=v((e=>R(e).skills)),Z=a.useMemo((()=>Pe.map((e=>({macroId:e.macroId,name:e.displayName??e.name})))),[Pe]),dt=a.useCallback((e=>{s(Ie({macroId:e}))}),[s]),K=a.useCallback((()=>{s(Xe()),s(Fe())}),[s]),ct=a.useCallback((()=>{s($())}),[s]),{allUsers:mt,isAiCardCreationEnabled:St,isCardPolicyEnabled:ht,onCardPolicyVendorSearchTextChange:pt}=Gt();a.useEffect((()=>{s(Cs())}),[s]);const I=v((e=>F(e))),y=qt.getSignedInUser();a.useEffect((()=>l==="routines"?(s($()),void s(ks())):l==="skills"?(s(Se()),s(Ve()),void s(Fe())):(T==null&&s(Se()),s(Ve()),void s($()))),[s,T,g,l]);const ft=Ht(),D=Kt(ft),b=v((e=>bs(e))),u=I.uiState.currentChatSessionId,w=b.tenantEmailDomain,Q=w!=null&&w!=="",ee=a.useCallback((e=>{Q&&d(`/${w}/ai-cfo/routines?routine=${encodeURIComponent(e.scheduleId)}`)}),[Q,d,w]),te=a.useCallback((()=>{Q&&d(`/${w}/ai-cfo/routines`)}),[Q,d,w]),se=a.useCallback(((e,m)=>{const _=e.sessionId??C.sessionId;_!=null&&Q&&d(`/${w}/ai-cfo/${_}?routine=${encodeURIComponent(m)}`)}),[Q,d,C.sessionId,w]),gt=a.useMemo((()=>k==null?void 0:{error:C.fetchState==="Error",kind:"routineRuns",loading:C.fetchState==="In-Progress"||C.fetchState==="Not-Started",routineName:k.name,schedule:zt(k),skillName:k.isAdHoc===!0?void 0:Z.find((e=>e.macroId===k.macroId))?.name,onOpenSkill:k.isAdHoc===!0?void 0:K,runs:C.runs,tzName:k.tzName,unreadCount:k.unreadRuns,open:ve,onToggle:()=>it((e=>!e)),onOpenRun:e=>se(e,k.scheduleId),onOpenRoutine:()=>ee(k),onOpenRoutines:te}),[K,te,ee,se,ve,k,C.fetchState,C.runs,Z]),{handleUploadPromoClose:It,isUploadPromoVisible:Ct}=Wt({isFileUploadEnabled:t,tenantEmailDomain:w}),ae=Jt({currentTenant:b,currentChatSessionId:u,aiCfoView:I,skillsEnabled:B,onCloseSkills:ct,onOpenSkills:K}),{isSuggestedQuestionsLoading:kt,suggestedPromptQuestions:bt}=Gs(),q=i.state,H=q?.aiCfoInitialQuestion,we=!!q?.aiCfoShouldSubmit;a.useEffect((()=>{const e=i.state;if(e?.[Be]!==!0)return;f(!0);const m={...e};delete m[Be],d(i,{replace:!0,state:m})}),[i.pathname,i.search,i.state,d]);const[vt,ne]=a.useState(null),[Et,oe]=a.useState(!1),[Pt,ie]=a.useState(void 0),[wt,re]=a.useState(void 0),ye=a.useRef(!1);a.useEffect((()=>{if(!ye.current&&H!=null&&H!==""){const e=i.state;ne(H),oe(we),ie(e?.aiCfoInitialSubmissionSource!=null?e.aiCfoInitialSubmissionSource:void 0);const m=e?.aiCfoSuggestionIndex;re(typeof m=="number"?m:void 0),ye.current=!0}}),[H,we,i.state]);const yt=a.useCallback((()=>{ne(null),oe(!1),ie(void 0),re(void 0),d(i.pathname,{replace:!0,state:We(i.state)})}),[i.pathname,i.state,d]),xe=a.useMemo((()=>new URLSearchParams(i.search)),[i.search]),Re=xe.get("ref")??q?.aiCfoRef,le=xe.get("emailRefId")??q?.aiCfoEmailRefId,Te=a.useRef(!1);a.useEffect((()=>{Te.current||Re!=="month-end-email"||le==null||u!=null||y==null||(s(vs("controller",y.userId,le,"MONTH_END_EMAIL")),Te.current=!0)}),[Re,le,u,s,y]);const z=I.uiState.lastContextMessage;a.useEffect((()=>{z!=null&&z!==""&&u!=null&&(ne(z),oe(!0),ie(void 0),re(void 0),s(Es()))}),[z,u,s]);const xt=b.masterTOSInfo,x=xt?.isMasterTOSAccepted??!1,{visitedSessions:Oe}=Xt(u),W=I.fetchState,J=I.uiState.chatSessionsNextPageToken.hasMore||!I.uiState.chatSessionsFirstPageFetched,je=u!=null?I.fetchChatSessionHistoryByChatSessionId?.[u]?.fetchState??"Not-Started":"Not-Started",Ae=u==null||(I.uiState.chatHistoryNextPageToken[u]?.hasMore??!0),De=I.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:Rt}=Je(De,u),Tt=Rt.length===0;a.useEffect((()=>{x||D||d("../dashboard",{state:{...i.state,message:"open_ai_cfo_drawer"}})}),[x,D,d,i.state]);const Ot=a.useCallback((()=>{const e=ge(i.state?.pathnameStackToGoBack),m=b.tenantEmailDomain;d(e.poppedPathname??(m!=null?`/${m}/dashboard`:".."),{state:{...i.state,pathnameStackToGoBack:e.newStack}})}),[b.tenantEmailDomain,i.state,d]),_e=a.useRef(void 0),Ue=a.useRef(void 0);a.useEffect((()=>{const e=l!==_e.current,m=u!==Ue.current;_e.current=l,Ue.current=u,l!==u&&(!e||l==null||Hs(l)?m&&u!=null&&d(`../ai-cfo/${u}`,{state:{...i.state}}):s(Ps({sessionId:l,agentId:"controller"})))}),[u,l]);const jt=a.useMemo((()=>({events:Oe.map((e=>`private-encrypted-chat-${e}.${Ye}`)),eventCallback:(e,m,_)=>_.onEventReceived(e,m)})),[Oe]);a.useEffect((()=>{W!=="In-Progress"&&J&&s(ws())}),[W,J,s]),a.useEffect((()=>{u!=null&&je!=="In-Progress"&&Ae&&y!=null&&(l===u||W==="Completed"&&!J)&&s(ys(u,y.userId))}),[je,W,Ae,J,u,y,l,s]);const ue=y?.userId,At=a.useMemo((()=>{return ue==null?[]:[(e=ue,`private-encrypted-routines-${e}.routine-run-updated`)];var e}),[ue]),Qe=a.useCallback((e=>{const m=e!=null&&(e===P||e===T);(n||m)&&s(he()),m&&s(X({scheduleId:e}))}),[s,n,T,P]);zs({events:At,onSubscribed:()=>Qe(P??T),onEvent:(e,m)=>{const _=(de=>{if(de==null||typeof de!="object")return null;const U=de;return fe(U.schedule_id)&&fe(U.run_id)?{scheduleId:U.schedule_id,runId:U.run_id,status:Ws.find((Ut=>Ut===U.status))??null,finishedAt:fe(U.finished_at)?U.finished_at:null}:null})(m);_!=null&&Qe(_.scheduleId)}});const Le=e=>e.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(y==null||l==null)throw Error("Can't access AI Controller page without signing in...");const Dt=u!=null&&I.responseStateByChatSessionId?.[u]?.answer?.fetchState==="In-Progress";if(!x&&D)return S.jsxs(Zs,{children:[S.jsx(ce,{analytics:V,onLoad:Le}),ae.drawerElement,S.jsx(Ks,{children:S.jsx(ze,{children:S.jsx(me,{isTOSAccepted:!1,acceptMasterTOSState:I.masterTOSAcceptanceState,onCloseClick:Ot,onCompleteClick:()=>{b.userRoleId!=null&&s(pe(b.userRoleId))}})})})]});const _t=S.jsxs(S.Fragment,{children:[p&&!x?S.jsx(ce,{analytics:V,onLoad:Le}):null,S.jsx(me,{isTOSAccepted:x,acceptMasterTOSState:I.masterTOSAcceptanceState,showHeader:!1,togglePageView:x?()=>f(!1):void 0,onCloseClick:()=>f(!1),onCompleteClick:()=>{x||b.userRoleId==null||s(pe(b.userRoleId)),f(!1)}})]});return S.jsxs(S.Fragment,{children:[S.jsxs(Ys,{children:[S.jsx(ce,{analytics:V,onLoad:e=>e.trackPageLoaded(es.Event.aiCFOPage)}),D&&ae.drawerElement,S.jsx(Xs,{answerExportEndPoint:r,...jt,currentChatSessionId:u,allSessionsWithOrderedQuestionAnswers:De,allUsers:mt,isAiCardCreationEnabled:St,isCardPolicyEnabled:ht,openOnboardingPage:()=>f(!0),userId:y.userId,setIsAiCfoOpen:h,navigate:d,sessionFromUrl:l,location:i,isSubmitting:Dt,isEmptyChatWithSession:Tt,currentTenant:b,emailLinkQuestion:vt??void 0,autoSubmitEmailLinkQuestion:Et,onEmailLinkQuestionProcessed:yt,routedInitialQuestionSource:Pt,routedInitialQuestionSuggestionIndex:wt,onCardPolicyVendorSearchTextChange:pt,onMenuClick:D?ae.open:void 0,isFileUploadEnabled:t,isUploadPromoVisible:Ct,onUploadPromoClose:It,exploreSuggestedPromptQuestions:bt,exploreSuggestedPromptQuestionsLoading:kt,isSkillsOpen:L,isRoutinesOpen:n,routineCanCreate:O,routineEditing:E,routineEditorOpen:G,routineListError:o.fetchState==="Error",routineListLoading:o.fetchState==="In-Progress",routineMaxRoutines:o.maxRoutines,routineSaveError:c.fetchState==="Error",routineSaving:c.fetchState==="In-Progress",routineSchedulableSkills:Z,routines:o.routines,onRoutineCreate:Ke,onRoutineDelete:lt,routineHistoryError:C.fetchState==="Error",routineHistoryLoading:C.fetchState==="In-Progress",chatSidePanel:gt,routineDetail:ke,routineRunningScheduleId:c.runningScheduleId,routineRuns:C.runs,onRoutineEdit:et,onRoutineOpenRun:(e,m)=>se(m,e.scheduleId),onRoutineRun:at,onRoutineCloseDetail:te,onRoutineDraft:rt,routineDraftPrompt:Ze,onRoutineOpenDetail:ee,onRoutineEditorCancel:tt,onRoutineLoadSkillInstructions:dt,onRoutineSave:st,onRoutineSetEnabled:ut,isCreateSkillEnabled:B,promoDismissalScope:w}),p&&D?S.jsx(Vs,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:ea,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:S.jsx(ze,{onClick:e=>e.stopPropagation(),children:S.jsx(me,{isTOSAccepted:x,acceptMasterTOSState:I.masterTOSAcceptanceState,onCloseClick:()=>f(!1),onCompleteClick:()=>{x||b.userRoleId==null||s(pe(b.userRoleId)),f(!1)}})})}):null]}),p&&!D?S.jsx(Yt,{open:p,onClose:()=>f(!1),children:S.jsx(Zt,{children:_t})}):null]})},ze=N($s)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Ys=N.div`
6
- height: 100vh;
7
- width: 100%;
8
- `,Zs=N.div`
9
- height: 100vh;
10
- width: 100%;
11
- display: flex;
12
- flex-direction: column;
13
- min-height: 0;
14
- `,Ks=N.div`
15
- flex: 1;
16
- min-height: 0;
17
- display: flex;
18
- flex-direction: column;
19
- `,ea=N(Ns)`
20
- box-shadow: ${({theme:t})=>t.colors.elevation2};
21
- color: ${({theme:t})=>t.colors.grey4};
22
- `;export{ka as default};
@@ -1,119 +0,0 @@
1
- import{j as t}from"./liveblocks-CM1vcHN_.js";import{h as q,u as le,g as K,i as ee,j as v,N as Q,l as Y,q as tt,n as nt,o as y}from"./core-Cc1CwF93.js";import{fI as X,WB as _e,bp as Ia,T8 as it,bn as va,bJ as de,WC as ka,HB as wa,I_ as Re,Ic as ot,bm as Ce,WD as lt,WE as st,c7 as rt,WF as ct,ma as xa,WG as Ba,WH as Ca,Js as Ue,HU as xe,WI as dt,Hp as ea,WJ as ut,Nk as pt,Ht as mt,Hz as Aa,WK as Se,WL as Ge,I$ as Me,HR as Da,WM as bt,WN as ht,J2 as Ne,WO as gt,J8 as St,WP as Ea,ID as aa,II as yt,WQ as ft,WR as ce,WS as Ta,WT as ja,WU as Pa,gZ as It,HZ as Ve,cx as Fa,WV as vt,gk as kt,WW as wt,WX as xt,eq as Ra,ep as Va,WY as Oe,WZ as Bt,W_ as Ct,VH as We,W$ as At,VJ as ie,VI as ze,X0 as Dt,X1 as Et,X2 as Tt,IK as ta,IH as jt,X3 as Pt,X4 as Ft,X5 as Rt,It as Vt,X6 as $t,X7 as Lt,cl as $a,eb as La,ml as _t,bO as Ut,bv as _a,bP as Ua,GF as Gt,X8 as Mt,N7 as Nt,Nd as Ot,CJ as Wt,J0 as zt,Jz as Ht,my as ge,X9 as Zt,Xa as Ga,n0 as Xt,ms as Ma,mN as Na,mM as na,bE as pe,bN as Jt,Xb as qt,Xc as ye,kY as Kt,Xd as ia,Xe as Yt,l0 as Qt,ll as en,JN as an,Xf as tn,mV as nn,JD as on,Xg as oa,JH as ln,JM as sn,JK as rn,JB as cn,Xh as Oa,HK as dn,Xi as un,Xj as pn,gJ as mn,gI as bn,gH as hn,mB as gn,mT as la,n2 as Sn,vc as yn,mK as fn,JF as In,l6 as vn,n7 as kn,Xk as wn,k_ as xn,v3 as Bn,Xl as Cn,Iz as An,bK as Dn,br as En,ha as Tn,ee as jn,ed as Pn,cw as Fn,cD as Rn}from"./zeni-epic-state-DFhlE0W3.js";import{z as V,V as fe,al as He,p as oe,b as f,au as Ze,a8 as se,R as A,a9 as Ae,e as E,aH as Vn,a5 as Z,aj as Xe,v as D,a2 as Ie,aI as sa,aJ as ra,aK as $n,aL as Ln,ag as _n,aM as Un,ac as Wa,G as De,ah as Je,aN as Gn,af as za,aO as Mn,aC as Nn,U as Ha,w as On,aP as Wn,aQ as zn,aR as Hn,aS as Zn,aT as Xn,aU as Jn,aV as qn,aW as Kn,aX as Yn,k as Qn,aY as ei,aZ as ai,a_ as ti,az as ni,a$ as ii,i as oi}from"./index-zmOdoQIt.js";import{u as ue,n as _,S as li}from"./mui-ehyt9jca.js";import{A as ca}from"./AddressScreen-DpzckL13.js";import{g as ne,a as Ee,i as Za,V as qe,b as Ke,c as si,v as ri,d as ci,A as me,D as be}from"./DomesticWireDetailScreen-FhF-Oy51.js";import{a as g}from"./sentry-Bh68thgn.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-Bl76c5H-.js";import{u as Xa}from"./useInitialThreadRequest-DqCJRXyQ.js";import{u as di}from"./BusinessVerificationPageScreen-NPjj2cPM.js";import Be from"./NotFoundScreen-DD1ftXbM.js";import{D as ui}from"./DrawerScreen-DOVfIfbY.js";import{M as Ja}from"./MobileAppDrawer-YElMwyTk.js";import{F as qa}from"./FeaturePreviewScreen-CEvvSUOY.js";import{S as Te}from"./SetupPagesScreen-CfUfKDWM.js";import{B as pi}from"./BillPayApprovalRoutes-2Q-AgKCr.js";import{F as mi}from"./FallBackRoute-BsefzYi4.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./routePaths-RxstHRDw.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-DhT542co.js";import"./analyticsHelper-DcUdLdtd.js";import"./useEnsureVendorListLoaded-zh5PaZPv.js";import"./ReimbursementApprovalRuleDetailScreen-CtdOG2XT.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]="03e5c061-3c03-4a56-8e70-2bca02e2619a",e._sentryDebugIdIdentifier="sentry-dbid-03e5c061-3c03-4a56-8e70-2bca02e2619a")}catch{}})();const bi=Y((function(e,a){const l=_e(e,a.billId),n=V.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:c??""},u=Z(a.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;Ce(n)||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let i=!1,d=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:S,isMarkAsPaidBtnVisible:h}=lt(l.billActivities,st(a.currentTenant),n);i=S,d=h}const p=rt(a.currentTenant?.userRole??[]),m=l.transactionDetails!=null&&ct(l.transactionDetails,p,n);return{billDetails:l,isAccountingClassesEnabled:xa(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${Xe}/transaction_attachment`,signedInUser:n,showBackButton:o,isAdmin:p,isRealTimeApprovalEnabled:a.isRealTimeApprovalEnabled,showApproveRejectBtns:i,showMarkAsPaidButtonToApprover:d,hasZeniAssistAccess:a.hasZeniAssistAccess,analytics:E,showMarkAsPaidButtonToCreator:m}}),(function(e,a){const{billId:l,currentTenant:n,location:c,navigate:r}=a,{tenantEmailDomain:u}=n;return{redirectToBillsScreen:()=>{const o=ne(u),s=D(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(Se({}))},deleteBill:o=>{E.trackBillPayDeleteBill(l,o),e(Aa(l))},cancelAndDeleteBill:(o,s)=>{s===!0?E.trackBillPayCancelAndDeleteBill(l,o):E.trackBillPayCancelBill(l),e(mt(l,s))},onSaveRealTimeApprovals:o=>{e(pt(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(ut({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(ea(l,o.type,"")):e(ea(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(xe(l,"retry")):e(xe(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const i=Ee(u,o,s),d=D(c.state?.pathnameStackToGoBack,c.pathname);r(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=Z(a.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ne(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(dt({billId:a.billId}))},onRefundPaymentClick:()=>{e(xe(a.billId,"refund"))},saveBillDetails:(o,s,i)=>{o&&e(Ca({data:i,billId:l})),e(Ue(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(Ba({billId:l}))}}}))(Vn);function hi(){const e=q(),a=le(),l=K(),{billId:n}=ee(),c=ue(),r=V.getSignedInUser(),u=fe(),o=v((U=>X(U))),s=v((U=>_e(U,n??""))),i=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Xa(o?.companyId,{clearParams:s.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Ye({mobileExploreReferrer:"Bill Details"});He({isDataReady:s.fetchState==="Completed"});const S=o?.userRole!=null&&Ia(o?.userRole),h=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!S,[b,C]=g.useState(!1),[I,j]=g.useState(!1),[B,T]=g.useState(!1),{useFeatureGate:k,useDynamicConfig:$}=oe(),{isFeatureEnabled:O}=k(f.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:G}=k(f.isBillPayDetectInsufficientFundsEnabled),{configValue:W}=$(Ze.zeniAssistConfig),z=it(o),w=va(o.userRole),M=h&&de(u?.loggedInUserRoleMap),L=W.user_ids!=null&&r?.userId!=null&&W.user_ids.includes(r?.userId),{isFeatureEnabled:H}=k(f.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:J}=k(f.billPaySetupShowInternationalPaymentByWise);if(g.useEffect((()=>{O&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&z===!1?T(!1):T(s.billActivities[0]?.isRealTimeApprovalEnabled&&(w||M||s.allApprovers.find((U=>U.user.userId===r?.userId))!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))}),[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,w,M,o.isZeni,z,r]),g.useEffect((()=>{n!=null&&a(ka(n))}),[n]),g.useEffect((()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(C(!0),a(wa(n??"",O,L,!1)))}),[b,s,n,a]),g.useEffect((()=>{I||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(j(!0),a(Re(!1,O,L,J,n)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&a(ot()))}),[I,s,n,a,O,L,J]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?t.jsx(Q,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?t.jsx(se,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[t.jsx(Ae,{analytics:E,onLoad:U=>(N=>{n!=null&&N.trackBillPayBillDetails(n,s.isRecurring)})(U)}),t.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:O,location:l,navigate:e,isRealTimeApprovalEnabled:B,currentTenant:o,billId:n??"",isInternationalPaymentShaVsOurEnabled:H,hasZeniAssistAccess:L,isDetectInsufficientFundsEnabled:G,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const $e=De.getLocalizedStrings().spendManagement.billPay.billDetails,da=De.getLocalizedStrings().common,gi={containerWidth:new Wa(100,58)},ua=Y((function(e,a){const l=V.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=a.showActionButtons,u=r&&a.file==null;return{uploadInvoiceEndPoint:`${za.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:a.billId,file:a.file,showAutofill:a.showAutofill,analytics:E,entityId:a.billId,showTitlebarIcon:r,showTitlebar:r&&a?.file!=null,uploadStatus:a.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...a.showAutofill?{}:{backgroundColor:a.backgroundColor,paddingBottom:"128px"}}}}),(function(e,a){const l=V.getSignedInUser();return{onInvoiceUpload:n=>{n!=null&&(a.file!=null||a.billId!=null||a.isInitialEdit?(a.setPayload(n),a.setShowConfirmationPopup(!0)):e(Ne(n,a.isVendorRecommendationEnabled,a.billId)))},updateInvoiceUploadFetchState:n=>{e(St({fetchState:{fetchState:n,error:void 0},billId:a.billId}))},onSkipAutofill:n=>{E?.trackBillPaySkipAutofill(),e(Me(n))},onDeleteClick:()=>{e(gt({billId:a.billId})),E?.trackInvoiceActionClick(a.billStage??"","delete",l?.userEmail??"",null)}}}))(Un);function x({appContent:e}){const a=le(),l=q(),{billId:n}=ee(),c=K(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=Ie(),s=ue(),i=V.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=oe(),{isFeatureEnabled:m}=d(f.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:S}=d(f.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:h}=d(f.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(f.billPaySetupShowInternationalPaymentByWise),{configValue:C}=p(Ze.zeniAssistConfig),I=C.user_ids!=null&&i?.userId!=null&&C.user_ids.includes(i?.userId),j=v((P=>X(P)));di();const[B,T]=g.useState(!1),[k,$]=g.useState(!1),[O,G]=g.useState(!1),[W,z]=g.useState(),w=v((P=>Ge(P,m,h,n)));let M=w.fetchState,L=w.file,H=w.showAutofill;const J=v((P=>_e(P,n??"")));u===!1&&(M=J.fetchState,L=J.transactionDetails?.attachments?.[0],H=!1);const U=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;g.useEffect((()=>{n==null&&a(Me(!0))}),[n,a]),g.useEffect((()=>{M==="Not-Started"&&(u&&k?$(!1):!u&&B&&T(!1))}),[n]),g.useEffect((()=>{B||n==null||u||(T(!0),a(wa(n,S,I,!1)),a(Da(n)),k||($(!0),a(Re(!1,S,I,b,n)))),u&&!k&&($(!0),a(Re(!1,S,I,b,n)))}),[B,k,u,n,a,S,I,b]);const N={onOkClick:()=>{if(G(!1),!W)return;const P=L!=null?"replace":"upload";E?.trackInvoiceActionClick(U??"",P,i?.userEmail??"","yes"),a(ht({replaceBillData:!0,billId:n})),a(Ne(W,m,n))},onCancelClick:()=>{if(G(!1),!W)return;const P=L!=null?"replace":"upload";E?.trackInvoiceActionClick(U??"",P,i?.userEmail??"","no"),a(bt({file:W,billId:n}))}},ae=g.useCallback((()=>{const P=Z(c.state?.pathnameStackToGoBack),ve=P.poppedPathname??ne(j.tenantEmailDomain);a(Se({billId:n})),l(ve,{state:{pathnameStackToGoBack:P.newStack}})}),[c.state,j.tenantEmailDomain,n,a,l]);if(i==null)throw Error("Can't access address page without signing in...");if(M==="Error"||J.fetchState==="Error")return t.jsx(Be,{});if(M!="Completed")return n==null&&o!=="small"?t.jsx(sa,{fallback:ae,children:t.jsxs(je,{windowSize:o,children:[t.jsx(ma,{}),t.jsx(Pe,{}),t.jsx(ua,{backgroundColor:s.colors.grey4,billId:n,file:L,showAutofill:!0,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:G,setPayload:z,showActionButtons:!1,isInitialEdit:!!w.isInitialEdit,billStage:U}),t.jsx(Fe,{windowSize:o,children:t.jsx(ra,{isNewBill:!0})})]})}):t.jsxs(je,{windowSize:o,children:[o==="small"||H?null:t.jsx(pa,{children:t.jsx(Ka,{onClick:ae,"data-testid":"nav-bar-back-click"})}),o!=="small"?t.jsx(Pe,{}):null,t.jsx($n,{}),t.jsx(Fe,{windowSize:o,children:t.jsx(ra,{isNewBill:n==null})})]});{const P=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;return t.jsx(sa,{fallback:ae,children:t.jsxs(je,{windowSize:o,children:[H&&o!=="small"?t.jsx(ma,{}):null,O?t.jsx(Ln,{titleComponent:t.jsx(wi,{children:$e.overwriteTitle}),descriptionComponent:t.jsx(xi,{children:$e.overwriteDescription}),primaryButtonText:da.yes,secondaryButtonText:da.no,action:N,isEditPopup:!0}):null,o==="small"||H?null:t.jsx(pa,{children:t.jsx(Si,{})}),o!=="small"?t.jsx(Pe,{}):null,t.jsx(ua,{backgroundColor:s.colors.grey4,billId:n,file:L,showAutofill:H,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:yi(u,J,w),setShowConfirmationPopup:G,setPayload:z,showActionButtons:fi(u,w),isInitialEdit:!!w.isInitialEdit,billStage:P}),t.jsx(Fe,{windowSize:o,children:e})]})})}}function Si(){const{triggerBack:e}=Gn();return t.jsx(Ka,{onClick:e,"data-testid":"nav-bar-back-click"})}function yi(e,a,l){let n,c;return e?(n=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(n=a.transactionDetails?.recurringBillInstance,c=a.recurringBillConfigDetail?.totalPaymentCycles),a?.isRecurring===!0?t.jsxs(Ii,{children:[t.jsx(vi,{children:`${$e.recurringBill.recurringCycle}
2
- ${n}/${c}`}),t.jsx(ki,{})]}):void 0}function fi(e,a){const l=a.billActivities?.[0],n=a.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(a.billStage==="draft"||n)}const pa=_.div`
3
- margin-bottom: 20px;
4
- margin-top: 20px;
5
- margin-left: ${A.sp5};
6
- position: absolute;
7
- display: flex;
8
- align-items: center;
9
- `,Ii=_.div`
10
- display: flex;
11
- justify-content: center;
12
- align-items: center;
13
- padding-top: 9px;
14
- gap: ${A.sp2};
15
- margin-bottom: -${A.sp2};
16
- `,vi=_(Je.StandardMedium)``,ki=_((e=>g.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M3.35001 15L3.35001 10.125C3.35001 6.81129 6.0363 4.125 9.35001 4.125H16.475M16.475 4.125L13.85 1.5M16.475 4.125L13.85 6.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M20.6 9V13.875C20.6 17.1887 17.9137 19.875 14.6 19.875H7.47501M7.47501 19.875L10.1 22.5M7.47501 19.875L10.1 17.25",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))))`
17
- color: ${e=>e.theme.colors.hero};
18
- height: ${A.sp3};
19
- width: ${A.sp3};
20
- `,Ka=_((e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M10 13L5 8L10 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))))`
21
- width: ${A.sp3};
22
- height: ${A.sp3};
23
- cursor: pointer;
24
- color: ${e=>e.theme.colors.champion};
25
- &:hover {
26
- color: ${e=>e.theme.colors.primary};
27
- }
28
- `,je=_.div`
29
- display: flex;
30
- height: 100vh;
31
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
32
- background-color: ${e=>e.theme.colors.grey4};
33
- position: relative;
34
- &::after {
35
- content: "";
36
- position: absolute;
37
- top: 57px;
38
- left: 42%;
39
- width: 1px;
40
- height: calc(100% - 57px);
41
- background-color: ${e=>e.theme.colors.grey2};
42
- pointer-events: none;
43
- z-index: 3;
44
- display: ${e=>e.windowSize==="small"?"none":"block"};
45
- }
46
- `,Pe=_.div`
47
- position: absolute;
48
- top: 56px;
49
- left: 0;
50
- width: 42%;
51
- height: 1px;
52
- background-color: ${e=>e.theme.colors.grey2};
53
- z-index: 3;
54
- `,ma=_.div`
55
- position: fixed;
56
- top: 0;
57
- left: 0;
58
- right: 0;
59
- bottom: 0;
60
- background-color: ${_n.overlayBackgroundBlack};
61
- z-index: 5;
62
- `,Fe=_.div`
63
- display: flex;
64
- flex-direction: column;
65
- width: ${e=>`${gi.containerWidth.value(e.windowSize)}%`};
66
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
67
- `,wi=_(Je.H6Regular)`
68
- margin-top: ${A.sp7};
69
- padding-left: ${A.sp8};
70
- padding-right: ${A.sp8};
71
- color: ${e=>e.theme.colors.primary};
72
- word-break: break-word;
73
- `,xi=_(Je.LargeRegularSp)`
74
- color: ${e=>e.theme.colors.hero};
75
- padding-left: ${A.sp8};
76
- padding-right: ${A.sp8};
77
- margin-bottom: 30px;
78
- margin-top: ${A.sp4};
79
- white-space: pre-line;
80
- `,Bi=Y((function(e,a){return{billsReviewView:Ea(e),analytics:a.analytics}}),(function(e,a){return{onCloseOverlay:()=>{a.navigate(`/${a.tenantEmailDomain}/bills`),e(ce())},onCloseReviewItem:l=>{e(ft(l))},onProceedForBulkActionClick:(l,n)=>{switch(l){case"send_for_approval":e(yt());break;case"approve":case"review":e(aa("approved",n??""));break;case"reject":e(aa("rejected",n??""))}}}}))(Mn);function Ci({tenantEmailDomain:e}){const a=q(),l=v((c=>c.billsBulkActionViewState.bulkSubmissionFetchState.fetchState)),{billsForReview:n}=v((c=>Ea(c)));return g.useEffect((()=>{l!=="Completed"&&n.length!==0||a(`/${e}/bills`)}),[l,n.length,e]),t.jsx(Bi,{navigate:a,analytics:E,tenantEmailDomain:e})}const te=Ct(),Ya="bulk-operation-update",Le="bill-approval-rule-update",{common:ke}=De.getLocalizedStrings(),Ai=_.div`
81
- display: flex;
82
- min-height: 100%;
83
- width: 100%;
84
- flex: 1 1 auto;
85
- flex-direction: column;
86
- align-items: center;
87
- background-color: ${e=>e.theme.colors.grey4};
88
- `,Di=Y((function(e,a){const l=V.getSignedInUser(),n=Ce(l),c=Pa(e,te,a.isBulkActionEnabled,l?.userId);let r=c.allSubTabs;a.isUserHasOnlyBillpayAccess&&a.roleMap&&c.currentTab==="pending_approval"&&(a.roleMap.bill_pay_analyst?r=r.filter((b=>b==="all"||b==="overdue"||b==="rejected"||b==="deleted")):a.roleMap.bill_pay_approver&&(r=r.filter((b=>b==="all"||b==="awaiting_my_approval"||b==="overdue"||b==="rejected"||b==="deleted")))),a.isShowDeletedBillsEnabled===!1&&(r=r.filter((b=>b!=="deleted")));const u=e.entityAutoCompleteState.autoCompleteText.common,o=We(e,"common"),s=e.tenantState.currentTenantId,i=X(e),d=i?.companyName??"",p={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},m=e.billListState.downloadUIState.downloadState,S=c.fetchState,h=At(e);return{transactionList:a.isShowDeletedBillsEnabled?c.transactions:c.transactions.filter((b=>b.isDeleted===!1)),currentTab:c.currentTab,currentSubTab:c.currentSubTab,approvalCount:c.approvalCount,allSubTabs:r,fetchState:S,analytics:E,botEmail:c.billPayBotEmail,searchText:c.searchText,filters:c.filters,vendorSearchAutoCompleteData:{autoCompleteText:u,entityAutoCompleteView:o},downloadParams:{authParams:p,companyName:d,timePeriod:te,spendManagementEndPoint:`${Xe}/spendManagement`,isShowDeletedBillsEnabled:a.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:a.isShowDeletedReimbursementEnabled},downloadState:m,isBulkActionAllowed:c.billListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:c.billListBulkActionInfo?.billsSelectedForBulkAction,allowedBulkActions:c.billListBulkActionInfo?.allowedBulkActions,isZeniUser:n,billPayApprovalRulesAffectedEntityIds:h.affectedEntityIds}}),(function(e,a){const{navigate:l,currentTenant:n,location:c,period:r}=a,{tenantEmailDomain:u}=n;return{updateTabToState:o=>{e(ce()),e(Ta(o))},onSubtabChange:o=>{e(ce()),e(ja(o))},onTransactionClick:(o,s)=>{const i=Ee(u,o,s),d=D(c.state?.pathnameStackToGoBack,c.pathname);l(i,{state:{pathnameStackToGoBack:d}})},onClickSetupIcon:()=>{const o=Ti(u),s=D(c.state?.pathnameStackToGoBack,c.pathname);l(o,{state:{pathnameStackToGoBack:s}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=a.currentTenant;E?.trackBillPayNewBill();const s=`/${o}/bill/new`,i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i}})},onSearchTextChanged:o=>{e($t(o))},onReloadTransactions:()=>{e(Ve(r,!0,a.isShowDeletedBillsEnabled,a.isInternationalWireEnabled)),e(Vt(n.companyId,!0))},onNavigateToSettings:()=>{l("../bills/setup")},onBackClick:()=>{l("../",{relative:"path"})},onFiltersChange:o=>{e(Rt({filters:o})),o.categories.every((s=>s.field!=null&&s.values?.length!==0))&&E.trackSpendManagmentFilterChange("bill_pay",o.categories.map((s=>`${s.field}-${JSON.stringify(s.values)}`)))},updateDownloadStateHandler:o=>{o==="In-Progress"&&E.trackSpendManagementDownloadClick("bill_pay"),e(Ft({uiState:{downloadState:o}}))},updateBulkActionList:o=>{e(Pt(o))},removeAllTransactionsFromBulkActionList:()=>{e(ce())},onProceedForBulkActionClick:(o,s)=>{switch(o){case"delete":case"cancel":e(jt(o,s??""));break;case"send_for_approval":e(ta("send_for_approval")),a.navigate("./bulk-review");break;case"approve":e(ta("approve")),a.navigate("./bulk-review");break;case"review":e(Tt()),a.navigate("./bulk-review")}},onBillPayApprovalRulesEventReceived:o=>{o.endsWith(Le)&&e(Et(!1))},onEventReceived:o=>{o===Ya&&e(Dt())},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(ze({searchString:o,entityType:"vendor",searchOrigin:"common"})):o.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}}}}))(On(Wn));function Ei(){const e=q(),a=le(),l=K(),n=Ie(),c=l.state,r=fe(),[u,o]=g.useState(!1),[s,i]=g.useState(null),d=tt("/:tenantEmailDomain/bills/bulk-review")!=null;g.useEffect((()=>(c?.tab!=null&&c?.subTab!=null&&(a(Ta(c?.tab)),a(ja(c?.subTab))),()=>{a(ce())})),[]);const p=V.getSignedInUser(),m=v((F=>X(F))),{areTenantIdsInSync:S}=Nn(),[h,b]=g.useState(!1),{useFeatureGate:C}=oe(),{isFeatureEnabled:I}=C(f.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:j}=C(f.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:B}=C(f.isBillPayBulkActionEnabled),{isFeatureEnabled:T}=C(f.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:k}=C(f.isBillPayDetectInsufficientFundsEnabled),$=v((F=>Pa(F,te,B,p?.userId))),{isFeatureEnabled:O}=C(f.isDebitCardFeatureEnabled),G=$.fetchState,{isAiCfoAccessEnabled:W,onAskAiCfoClick:z}=Ye({mobileExploreReferrer:"Bills List"});He({isDataReady:G==="Completed"});const w=!!m.companyBillPayInfo?.info?.isBillPayTOSAccepted,M=!!m.companyBillPayInfo?.info?.isBillPayEnabled,L=v((F=>It(F.companyState,m.companyId))),H=L?.company.featuresActivationInfo.connectedAccountProvider;if(g.useEffect((()=>{!h&&M&&S&&(b(!0),a(Ve(te,!0,I,T)))}),[h,te,S,a]),p==null)throw Error("Can't access address page without signing in...");const J=(F,re)=>{a(Bt({uiState:{sortKey:F,sortOrder:re},period:te}))},U=Fa(r?.loggedInUserRoleMap),N=de(r?.loggedInUserRoleMap),ae=F=>{o(F)},{billsProcessed:P,billsProcessing:ve}=v((F=>vt(F)));g.useEffect((()=>{P===ve&&s!=null&&(a(kt({messageSection:"bill_pay_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_bill_",variableValue:P>1?ke.headers.bills:ke.texts.bill2},{variableName:"_has_",variableValue:P>1?ke.texts.have:ke.texts.has},{variableName:"_action_",variableValue:wt(s)}]})),a(xt()),setTimeout((()=>{a(Ve(te,!0,I,!0,T))}),3e3),i(null))}),[P,ve]);const Qa={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${Ya}`,`private-encrypted-${m.companyId}.${Le}`]:[],eventCallback:(F,re,Qe)=>{F.endsWith(Le)?Qe.onBillPayApprovalRulesEventReceived?.(F):re?.entity_type==="bill"&&(i(re.operation_type),Qe.onEventReceived(F))}},et=Ra(O,m),at=Va(m);return l.pathname.endsWith("/bills/")||l.pathname.endsWith("/bills")||l.pathname.endsWith("/bills/bulk-review")?et===!0||at===!0?t.jsx(qa,{}):M?t.jsxs(t.Fragment,{children:[G==="Completed"?t.jsx(Ae,{analytics:E,onLoad:F=>(re=>re.trackPageLoaded(Ha.Event.billPayHome))(F)}):null,t.jsxs(Ai,{windowSize:n,children:[t.jsx(Ja,{isAppContentDrawerOpen:u,handleDrawerToggle:ae}),t.jsx(ui,{isOpen:d,drawerLeftMargin:new Wa(0,0,300,600),onClose:()=>{e(`/${m.tenantEmailDomain}/bills`),a(ce())},children:t.jsx(ji,{onClick:F=>F.stopPropagation(),children:t.jsx(Ci,{tenantEmailDomain:m.tenantEmailDomain})})}),t.jsx(Di,{location:l,navigate:e,currentTenant:m,entity:"bill_pay",period:te,isAdmin:!1,uiState:$.uiState,onColumnSortConfigChanged:J,isUserHasOnlyBillpayAccess:U,isShowDeletedBillsEnabled:I,isShowDeletedReimbursementEnabled:j,isBulkActionEnabled:B,roleMap:r?.loggedInUserRoleMap,onClickMenuIcon:()=>{ae(!0)},isDownloadEnabled:$.isDownloadEnabled,connectedAccountProvider:H,bulkSubmissionLimit:$.billBulkSubmissionLimit,bulkSubmissionFetchState:$.billListBulkActionInfo.bulkSubmissionFetchState,isRecurringBillInBulkActionList:$.billListBulkActionInfo.isRecurringBillInBulkActionList,isInternationalWireEnabled:T,isDetectInsufficientFundsEnabled:k,isAiCfoAccessEnabled:W,onAskAiCfoClick:z,...Qa})]})]}):w===!0&&N===!0?t.jsx(Q,{to:"../setup"}):r!=null&&Oe(m,r.loggedInUserRoleMap)?t.jsx(Q,{to:"../promo"}):t.jsx(se,{fetchState:G}):t.jsx(Be,{})}const Ti=e=>`/${e}/bills/setup`,ji=_(li)`
89
- display: flex;
90
- min-height: 100%;
91
- flex-direction: column;
92
- `,{common:{currency:he},spendManagement:{billPay:{billDetails:Pi}},appName:Fi}=De.getLocalizedStrings(),Ri=Y((function(e,a){const l=V.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=Z(a.location.state?.pathnameStackToGoBack);let u=!0;r.poppedPathname?.includes("bills")===!0&&(u=!1);const o=e.entityAutoCompleteState.autoCompleteText.common,s=We(e,"common");let i=`${l?.firstName} ${l?.lastName}`;const d=Ce(l);a.billId!=null&&a.billDetailsView!=null&&(i=`${a.billDetailsView.createdBy?.firstName??Fi} ${a.billDetailsView.createdBy?.lastName??""}`),d||!a.billDetailsView.createdBy?.email?.includes("zeni.ai")||(i="Zeni");const p=a.billDetailsView.editBillInitialDetails?.totalAmount?.amount,m=Ut(a.billDetailsView.paymentDetailsSection?.paymentType?.method),S=a.currentTenant.createTime,h=_a(),b=a.sameDayAchDisablementConfig.newTenantTenureLimitMonths,C=S.add(b,"month").isAfter(h),I=!!(a.billDetailsView.billStage==="draft"&&m&&p!=null&&p>0)&&!Ua(p,a.billDetailsView.approvalRules.allApprovalRules,l,a.billDetailsView.vendor?.id,a.billDetailsView.classId),j=X(e);return{billDetails:a.billDetailsView,isAccountingClassesEnabled:xa(e),billId:a.billId,createdBy:i,createTime:a.billDetailsView?.createTime,authParams:c,transactionAttachmentEndpoint:`${Xe}/transaction_attachment`,analytics:E,showBackButton:u,isAdmin:a.isBillPayAdmin,isSuperAdmin:a.isSuperAdmin,connectedAccountProvider:j.company?.featuresActivationInfo.connectedAccountProvider??"",customerSearchAutoCompleteData:{autoCompleteText:o,entityAutoCompleteView:s},showMarkAsPaidInfo:I,isZeniUser:d,isNewUser:C,sameDayAchDisablementConfig:a.sameDayAchDisablementConfig}}),(function(e,a){const{billId:l,companyId:n,currentTenant:c,location:r,navigate:u,billDetailsView:o}=a,{tenantEmailDomain:s}=c;return{editVendor:i=>{e(na(i));const d=ha(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},chooseNewVendor:i=>{const d=i??a.billDetailsView.addBillAutoFields.tentativeVendorName;d!=null&&e(Ma(d,!1)),e(Na({localData:{vendorName:i??a.billDetailsView.addBillAutoFields.tentativeVendorName}})),e(na());const p=ha(s,void 0,l),m=D(r.state?.pathnameStackToGoBack,r.pathname);u(p,{state:{pathnameStackToGoBack:m}})},onInvoiceUpload:i=>{i!=null&&e(Ne(i,a.isVendorRecommendationEnabled))},updateShowAutofill:i=>{e(Me(i))},onSaveChangesToLocalStore:(i,d,p,m,S)=>{const h=_i(a.billDetailsView,{...i,paymentDetails:{...i?.paymentDetails,paymentDate:S}},p,d,a.isInternationalPaymentShaVsOurEnabled,m,a.vendor);e(Xt({billDetailLocalData:h,billId:l}))},saveBillDetails:()=>{e(Ue("draft",!1,!1,l)),e(ie("common"))},updateBillDetailSaveBillCode:()=>{e(Ga("draft"))},reviewBillDetails:()=>{const i=Vi(s,l),d=D(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d,message:"coming_from_edit_page"}})},discardBillDetailsFromLocalStore:({billId:i})=>{e(Se({billId:i}))},clearBillPayReviewLocalState:()=>e(Zt()),onClickDismiss:()=>{const i=ne(s),d=D(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d}})},onClickDiscard:()=>{const i=ne(s),d=D(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d}})},setBillDetailPageMode:i=>{if(i==="edit_bill"){let d=window.location.pathname;d=d.concat("/edit");const p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})}},redirectToACHScreen:i=>{e(ge(!1,i));const d=$i(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToWireScreen:i=>{e(ge(!1,i));const d=Li(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToInternationalScreen:i=>{e(ge(!1,i));const d=Za(s,l,i),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToBillsScreen:()=>{const i=ne(s),d=D(r.state?.pathnameStackToGoBack,r.pathname);e(Se({})),u(i,{state:{pathnameStackToGoBack:d}})},redirectToBillDetailPage:()=>{a.navigate("../")},deleteBill:()=>{l!=null&&e(Aa(l))},onAttachmentClick:(i,d)=>{const p=Ee(s,i,d);window.open(`${p}`,"_blank")},onBackClick:()=>{const i=Z(a.location.state?.pathnameStackToGoBack),d=i.poppedPathname??ne(s);u(d,{state:{pathnameStackToGoBack:i.newStack}})},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,d)=>{i.trim().length>=2?e(ze({searchString:i,entityType:d,searchOrigin:"common"})):i.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}},addVendorContactEmail(i,d){e(Ht(i,d,l))},onWiseVerifyClick:()=>{let i="";i=Xn()?"https://sandbox.transferwise.tech":"https://wise.com";const d=`${i}/login`;window.open(d,"_blank")},onVendorSelected:i=>{e(zt(!0,i,l))},onInternationalWireVerifyClick:()=>{window.open(`/${s}/bills/international-wire`)},onFetchLinkTokenClick:(i,d)=>{e(Wt("bill_pay_detail",i,d))},onEstablishConnectionClick:i=>{e(Ot(i,n,"bill_pay_detail","bill_pay"))},onUpdatePaymentAccountStatus:(i,d,p)=>{e(Nt(i,d,"bill_pay","bill_pay_detail",p))},onEstablishConnectionSuccess:()=>{e(Gt("bill_pay","bill_pay_detail")),e(Mt({billId:l,withdrawFromAccountId:o.newAddedBillPaymentAccountId,withdrawFromList:o.withdrawFromList}))}}}))(zn);function ba(){const e=q(),a=K(),l=le(),{billId:n,tenantEmailDomain:c}=ee(),{useFeatureGate:r,useDynamicConfig:u}=oe(),{isFeatureEnabled:o,isFeatureGateLoading:s}=r(f.isVendorMagicLinkFeatureEnabled),{isFeatureEnabled:i}=r(f.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:d}=r(f.isBillPayLocalCurrencyFeatureEnabled),{isFeatureEnabled:p}=r(f.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:m}=r(f.isRecurringBillsFeatureEnabled),{isFeatureEnabled:S}=r(f.isDepositAccountsFeatureEnabled),{isFeatureEnabled:h}=r(f.isShaDisabled),{isFeatureEnabled:b}=r(f.isOurDisabled),{isFeatureEnabled:C}=r(f.isBillPayDetectInsufficientFundsEnabled),{configValue:I}=u(Ze.sameDayAchDisablementConfig),j=Lt(I),B=V.getSignedInUser(),T=v((N=>X(N))),k=v((N=>Ge(N,p,S,n))),$=Xa(T?.companyId,{clearParams:k.fetchState==="Completed"}),{isAiCfoAccessEnabled:O,onAskAiCfoClick:G}=Ye({mobileExploreReferrer:"Bill Details"});He({isDataReady:k.fetchState==="Completed"});const W=T.companyId??V.getSignedInUserTenant(c)?.companyId,z=fe(),w=$a(z?.loggedInUserRoleMap),M=La(z?.loggedInUserRoleMap),L=de(z?.loggedInUserRoleMap),H=va(T.userRole);if(g.useEffect((()=>{n!=null&&l(ka(n))}),[n]),g.useEffect((()=>{n!=null&&l(Da(n))}),[n,l]),B==null)throw Error("Can't access address page without signing in...");const J=v((N=>_t(N.accountState,N.accountListState,"billPayAccountList"))),U={pathname:"../",search:a.search};return k.isDeleted===!0||k.billStage=="paid"||k.fetchState=="Not-Started"?t.jsx(Q,{to:U}):k.deleteStatus.fetchState==="In-Progress"||s?t.jsx(se,{fetchState:k.deleteStatus.fetchState}):t.jsxs(t.Fragment,{children:[t.jsx(Ae,{analytics:E,onLoad:N=>(ae=>{n!=null&&k.deleteStatus.fetchState!=="Completed"&&ae.trackBillPayEditBill(n,k.isRecurring)})(N)}),t.jsx(Ri,{initialOpenThreadRequest:$??void 0,location:a,navigate:e,currentTenant:T,billId:n,companyId:W,billDetailsView:k,isMagicLinkEnabled:o,isVendorRecommendationEnabled:p,isLocalCurrencyEnabled:d,uncategorizedAccounts:J,isInternationalPaymentShaVsOurEnabled:i,vendor:k.vendor,isShaDisabled:h,isOurDisabled:b,isRecurringBillsFeatureEnabled:m,hasZeniAccountsAdminAccess:w,isZeniAccountsUser:M,isBillPayAdmin:L,isSuperAdmin:H,isDetectInsufficientFundsEnabled:C,sameDayAchDisablementConfig:j,isAiCfoAccessEnabled:O,onAskAiCfoClick:G})]})}const ha=(e,a,l)=>{let n=`/${e}/bill/`;return l==null?n=a!=null?n.concat(`new/vendor/${encodeURIComponent(a)}/edit`):n.concat("new/vendor/create"):(n=n.concat(`${encodeURIComponent(l)}/edit/vendor/`),n=a!=null?n.concat(`${encodeURIComponent(a)}/edit`):n.concat("create")),n},Vi=(e,a)=>{let l=`/${e}/bill/`;return l=a===void 0?l.concat("new/review"):l.concat(`${a}/edit/review`),l},$i=(e,a,l)=>{let n=`/${e}/bill/`;return n=l!=null?n.concat(`${encodeURIComponent(l)}/edit/`):n.concat("new/"),n=n.concat(`vendor/${encodeURIComponent(a)}/edit/ach`),n},Li=(e,a,l)=>{let n=`/${e}/bill/`;return n=l!=null?n.concat(`${encodeURIComponent(l)}/edit/`):n.concat("new/"),n=n.concat(`vendor/${encodeURIComponent(a)}/edit/domestic`),n},R="paymentDetails",_i=(e,a,l,n,c,r,u)=>{const o={invoiceNumber:a.whatFor.invoiceNumber,memo:a.whatFor.memo,invoiceDate:a.whatFor.invoiceDate?pe(a.whatFor.invoiceDate.toString()):_a(),billDueDate:a.whatFor.billDueDate?pe(a.whatFor.billDueDate.toString()):void 0,currencyCode:a.whatFor.currency,recipientCurrencyCode:a.whatFor.recipientCurrency,isInvoiceDateAutoUpdated:a.whatFor.isInvoiceDateAutoUpdated},s={paymentDate:a[R]?.paymentDate?pe(a[R].paymentDate.toString()):void 0,paymentType:a[R]?.paymentType!=null?a[R]?.paymentType:void 0,paymentTo:r?.id,withdrawFrom:e.withdrawFromList.find((b=>b.id===a[R]?.withdrawFrom?.selectedOption)),internationalTransferFeeBearerPaymentMethod:a[R]?.paymentType?.method!=null&&a[R].paymentType.method.includes(Jt)&&u?.vendorCurrencyCode===he.currencyCode&&c?a[R]?.internationalTransferFeeBearerPaymentMethod:void 0,conversionRate:e.paymentDetailsSection?.conversionRate},i=r?.type==="Contact"?r?.email:void 0,d=!!i,p=a[R]?.recurringPaymentType?.selectedOption===Pi.recurringBill.paymentTypeOptions[1],m={isActive:e.recurringConfig?.isActive??!1,currentInstance:e.recurringConfig?.currentInstance,isApprovalRequired:a[R]?.recurringPaymentDetails?.requireApproval?.selectedOption==="all",frequency:qt(a[R]?.recurringPaymentDetails?.frequency?.selectedOption),endDate:a[R]?.recurringPaymentDetails?.endDateSelector?.date!=null?pe(a[R]?.recurringPaymentDetails?.endDateSelector.date.toString()):void 0,startDate:a[R]?.recurringPaymentDetails?.startDate?pe(a[R]?.recurringPaymentDetails?.startDate.toString()):void 0,endDateSelectorOptionType:a[R]?.recurringPaymentDetails?.endDateSelector?.type,totalPaymentCycles:a[R]?.recurringPaymentDetails?.endDateSelector?.recurringCount??0,updateRecurringBills:a[R]?.recurringPaymentDetails?.updateRecurringBills},S=Ui(e.accountList.accounts,e.classList.classes,e.lineDetailSection,a.lineItems,n,l),h=Object.keys(S).length>0?Hn(S):e.editBillInitialDetails?.recipientTotalAmount;return{showVendorGptRecommendationText:e.showVendorGptRecommendationText,vendor:u,whatForSection:o,paymentDetailsSection:s,isCancelled:e.isCancelled,totalAmount:h,recipientTotalAmount:h,file:e.file,updatesByLineId:S,toAccountVendorEmail:i,isCollectToAccountInfoFromVendorContact:d,isRecurring:p,recurringConfig:m}},Ui=(e,a,l,n,c,r)=>{const u={};return n.forEach((o=>{let s,i;o.account.selectedOption!=null&&(s=e.find((p=>p.qboId===o.account.selectedOption||p.accountId===o.account.selectedOption))),o.class?.selectedOption!=null&&(i=a.find((p=>p.classId===o.class.selectedOption)));const d=Zn(l[o.lineId],o,c,r);u[o.lineId]={...l[o.lineId],...o,platformLineDetailType:l[o.lineId]?.platformLineDetailType??"account_based_expense_line_detail",amount:{amount:o.amount??0,currencyCode:o.currency?.currencyCode??he.currencyCode,currencySymbol:o.currency?.currencySymbol??he.currencySymbol},recipientAmount:{amount:o.recipientAmount??0,currencyCode:o.recipientCurrency?.currencyCode??he.currencyCode,currencySymbol:o.recipientCurrency?.currencySymbol??he.currencySymbol},id:o.lineId,lineDescription:o.lineDescription??"",account:s,class:i,billable:o.billable?.selectedOption??"not_billable",customer:{id:d?.id??"",name:d?.name??"",qboId:d?.qboId,logo:d?.logo},type:"journal_entry_transaction_line",isCategoryMiscategorized:!1,isClassMiscategorized:!1}})),u},Gi=_.div`
93
- display: flex;
94
- height: 100vh;
95
- width: 100%;
96
- flex: 1 1 auto;
97
- flex-direction: column;
98
- align-items: center;
99
- background-color: ${e=>e.theme.colors.grey4};
100
- box-shadow: ${e=>`0px 2px ${A.sp1} ${e.theme.colors.dropShadowNormal}`};
101
- `,Mi=Y((function(e,a){const{vendorId:l,billId:n}=a,c=ye(e,l),r=Ge(e,a.isVendorRecommendationEnabled,a.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:c.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:c,file:r.file,bankAccountContext:a.bankAccountContext}}),(function(e,a){const{billId:l,navigate:n,location:c,vendorId:r,currentTenant:u}=a,{tenantEmailDomain:o}=u;return{onFetchBankNameBySwift:s=>{e(en(s))},onSaveHandler:()=>{e(Qt(a.bankAccountContext,r))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:i}=s;e(Yt({data:i}))},onCancel:()=>{(()=>{const s=Z(c.state?.pathnameStackToGoBack),i=s.poppedPathname??ga();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(ia())},onAddressClick:s=>{const i=Ke(o,s,l),d=D(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{e(Kt({fetchState:"Not-Started"}));const s=Z(a.location.state?.pathnameStackToGoBack),i=s.poppedPathname??ga(0);a.navigate(i,{state:{pathnameStackToGoBack:s.newStack}}),e(ia())}}}))(Jn);function Ni(){const e=q(),a=K(),l=Ie(),{vendorId:n,billId:c}=ee(),{useFeatureGate:r}=oe(),u=ue(),o=V.getSignedInUser(),s=v((h=>X(h))),i=Z(a.state?.pathnameStackToGoBack),d=i.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail",p=v((h=>ye(h,n))),{isFeatureEnabled:m}=r(f.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:S}=r(f.isDepositAccountsFeatureEnabled);if(o==null)throw Error("Can't access address page without signing in...");return d==="billDetail"&&p.editVendorState?.saveStatus.fetchState==="In-Progress"?t.jsx(se,{fetchState:p.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:u.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${u.colors.dropShadowNormal}`}}):t.jsxs(Gi,{windowSize:l,children:[t.jsx(qe,{vendorId:n,billId:c}),t.jsx(Mi,{location:a,navigate:e,billId:c,vendorId:n,currentTenant:s,bankAccountContext:d,isVendorRecommendationEnabled:m,isZeniAccountsFeatureEnabled:S})]})}const ga=(e=2)=>{let a="../";for(let l=0;l<e;l++)a=`${a}../`;return a},Oi=_.div`
102
- display: flex;
103
- height: 100vh;
104
- width: 100%;
105
- flex: 1 1 auto;
106
- flex-direction: column;
107
- align-items: center;
108
- background-color: ${e=>e.theme.colors.grey4};
109
- box-shadow: ${e=>`0px 2px ${A.sp1} ${e.theme.colors.dropShadowNormal}`};
110
- `,Wi=Y((function(e,a){const{vendorId:l}=a,n=ye(e,l),c=l!=null?n.editVendorState?.vendorDetailLocalData?.vendorType:n.newVendorState?.vendorDetailLocalData?.vendorType,r=tn(e,c||"international_business",a.billId),u=n.editVendorState??n.newVendorState,o=a.billId!=null?e.editBillDetailViewState.editBillStateById[nn(a.billId)].billDetailLocalData.recipientTotalAmount?.amount:e.editBillDetailViewState.newBillState.billDetailLocalData.recipientTotalAmount?.amount;return{internationalWireView:r,vendorViewDetails:n,bankAccountContext:a.bankAccountContext,vendorType:c||"international_business",addressType:"vendor_address",addressToEdit:u?.vendorNewAddressStatus?.addressToCreate,mailingAddress:u?.vendorAddress,billAmount:o??0}}),(function(e,a){const{billId:l,navigate:n,location:c,vendorId:r,currentTenant:u}=a,{tenantEmailDomain:o}=u;return{onSaveHandler:()=>{e(cn(a.bankAccountContext,r))},onAccountDetailsUpdated:(s,i,d,p)=>{e(sn(s)),p&&e(rn(i,d))},onCurrencyUpdated:(s,i,d)=>{e(ln(s,i,d,!1))},onCancel:()=>{(()=>{const s=Z(c.state?.pathnameStackToGoBack),i=s.poppedPathname??Sa();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(oa())},onAddressClick:s=>{const i=Ke(o,s,l),d=D(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{e(on({fetchState:"Not-Started"}));const s=Z(a.location.state?.pathnameStackToGoBack),i=s.poppedPathname??Sa(0);a.navigate(i,{state:{pathnameStackToGoBack:s.newStack}}),e(oa())}}}))(qn);function zi(){const e=q(),a=K(),l=Ie(),{vendorId:n,billId:c}=ee(),r=le(),u=ue(),o=V.getSignedInUser(),s=v((B=>X(B))),i=Z(a.state?.pathnameStackToGoBack),[d,p]=g.useState(!1),m=v((B=>B.vendorViewState.newVendorState.fetchStatus.fetchState)),S=v((B=>n!=null?B.vendorViewState.editVendorStateById[n]?.fetchStatus.fetchState??"Not-Started":"Not-Started")),h=n!==void 0?S:m;g.useEffect((()=>{d===!1&&h==="Not-Started"&&n!=null&&(r(ge(!1,n)),p(!0))}),[d,h,n]);const[b,C]=g.useState(!1);g.useEffect((()=>{b||h==="In-Progress"||(C(!0),r(an(c,n)))}),[b,h,r]);const I=i.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail",j=v((B=>ye(B,n)));if(o==null)throw Error("Can't access international wire page without signing in...");return I==="billDetail"&&j.editVendorState?.saveStatus.fetchState==="In-Progress"?t.jsx(se,{fetchState:j.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:u.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${u.colors.dropShadowNormal}`}}):t.jsxs(Oi,{windowSize:l,children:[t.jsx(qe,{vendorId:n,billId:c}),t.jsx(Wi,{location:a,navigate:e,billId:c,vendorId:n,currentTenant:s,bankAccountContext:I})]})}const Sa=(e=2)=>{let a="../";for(let l=0;l<e;l++)a=`${a}../`;return a},ya=_.div`
111
- display: flex;
112
- height: 100vh;
113
- width: 100%;
114
- flex: 1 1 auto;
115
- flex-direction: column;
116
- align-items: center;
117
- background-color: ${e=>e.theme.colors.grey4};
118
- box-shadow: ${e=>`0px 2px ${A.sp1} ${e.theme.colors.dropShadowNormal}`};
119
- `,Hi=Y((function(e,a){const l=V.getSignedInUser(),n=Oa(e,a.billId),c=un(e),r=Ce(l),u=n.totalAmount.amount,o=n.billPayInfo?.stage.code!=="scheduled"&&c.allApprovalRules.length>0&&!Ua(u,c.allApprovalRules,l,n.vendor?.id,n.classId);return{billDetails:n,billId:a.billId,billpayApprovalView:c,analytics:E,isApprovalRequiredForMarkAsPaid:o,isZeniUser:r}}),(function(e,a){const{location:l,billId:n,currentTenant:c,navigate:r}=a,{tenantEmailDomain:u}=c;return{redirectToBillsScreen:()=>{const o=ne(c.tenantEmailDomain),s=D(l.state?.pathnameStackToGoBack,l.pathname);r(o,{state:{pathnameStackToGoBack:s}})},discardBillDetailsFromLocalStore:()=>{e(Se({}))},saveBillDetails:(o,s)=>{o&&e(Ca({billId:n,data:s})),e(Ue(o?"paid":"pending_approval",o,!1,n))},discardOutsideZeniPaymentData:()=>{e(Ba({billId:n}))},updateBillDetailSaveBillCode:()=>{e(Ga("pending_approval"))},onClickEdit:()=>{a.navigate("../",{relative:"path"})},onAttachmentClick:(o,s)=>{const i=Ee(u,o,s);window.open(`${i}`,"_blank")},retryPayment:()=>{a.billId!=null&&e(xe(a.billId,"retry"))}}}))(Yn);function fa(){const e=q(),a=le(),l=K(),{billId:n}=ee(),{useFeatureGate:c}=oe(),{isFeatureEnabled:r}=c(f.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:u}=c(f.isBillPayDetectInsufficientFundsEnabled),o=Ie(),s=V.getSignedInUser(),{isFeatureEnabled:i}=c(f.isBillPayLocalCurrencyFeatureEnabled),{isFeatureEnabled:d}=c(f.isVendorRecommendationFeatureEnabled),p=Z(l.state?.pathnameStackToGoBack),{poppedPathname:m}=p,{isFeatureEnabled:S}=c(f.isRecurringBillsFeatureEnabled),h=v((I=>X(I))),b=v((I=>Oa(I,n))),C=b.fetchState??"Not-Started";if(g.useEffect((()=>(window.onbeforeunload=function(){return e(l,{state:{message:""}}),!0},()=>{window.onbeforeunload=null})),[e]),g.useEffect((()=>{l.state?.message!=="coming_from_edit_page"&&e(`../${n}`)}),[]),g.useEffect((()=>{const I=b.vendor?.name,j=b.vendor?.id,B=b.totalAmount.amount,T=b.recipientTotalAmount.amount,k=b.invoiceNumber;I&&j&&a(dn(I,j,B,T,k,n))}),[]),m==null)return t.jsx(Q,{to:`../${n}`});if(s==null)throw Error("Can't access address page without signing in...");return C==="In-Progress"?t.jsx(ya,{windowSize:o,children:t.jsx(Kn,{})}):t.jsx(ya,{windowSize:o,children:t.jsx(Hi,{location:l,navigate:e,currentTenant:h,billId:n,isLocalCurrencyEnabled:i,isVendorRecommendationEnabled:d,isInternationalPaymentShaVsOurEnabled:r,isRecurringBillsFeatureEnabled:S,isDetectInsufficientFundsEnabled:u})})}const Zi=Y((function(e,a){const{vendorId:l}=a,n=e.entityAutoCompleteState.autoCompleteText.common,c=We(e,"common"),r=l!=null?"edit":"create",u=X(e),o=V.getSignedInUser(),s=u.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:s??""};return{vendorViewDetails:a.vendorViewDetails,screenType:r,filesEndPoint:`${za.fileMicroServiceBaseUrl}`,authParams:i,analytics:E,vendorSearchAutoCompleteData:{autoCompleteText:n,entityAutoCompleteView:c}}}),(function(e,a){const{billId:l,currentTenant:n,navigate:c,location:r,vendorId:u,themeState:o}=a,{tenantEmailDomain:s}=n;return{onSaveVendor:i=>{e(xn(u??void 0,a.billId)),i!=null&&e(Bn(i))},saveVendorDetailLocalData:i=>{e(Na({vendorId:u,localData:i}))},saveContactsInVendorDetailLocalData:i=>{e(wn({vendorId:u,contacts:i}))},resetVendorDetailLocalData:()=>{e(la(u))},updateSelectedVendorForCreate:i=>{e(kn(i))},navigateToBankDetailPage:(i,d)=>{let p;i==="wire"?p=d==="international"?Za(s,a.billId,u):ci(s,a.billId,u):p=ri(s,a.billId,u);const m=D(r.state?.pathnameStackToGoBack,r.pathname);c(p,{state:{pathnameStackToGoBack:m}})},onRemoveBankAccount:(i,d)=>{e(d===!0?In(i,"vendor",u):vn(i,"vendor",u))},navigateToMailingAddressPage:i=>{const d=Ke(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);c(d,{state:{pathnameStackToGoBack:p}})},updateFilesEntity:i=>{e(fn({files:i}))},onEditFileName:(i,d)=>{e(yn(i,d.split(".")[0]))},handleZeniLogoClick:()=>{o.toggle()},updateSaveFetchState:()=>{u==null&&e(la(a.vendorViewDetails.newVendorState?.vendorBasic?.id)),e(Sn("Not-Started",u))},onVendorSelected:i=>{i!=null&&e(gn(i,!0))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,d)=>{i.trim().length>=2?e(ze({searchString:i,entityType:d,searchOrigin:"common"})):i.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}},onBackClick:()=>{e(ie("common"));const i=Z(a.location.state?.pathnameStackToGoBack),d=i.poppedPathname??si(n.tenantEmailDomain,a.billId);c(d,{state:{pathnameStackToGoBack:i.newStack}})},onGetOtp:i=>{e(hn(i,"BillPayVendor"))},onResendOtp:i=>{e(bn(i,"BillPayVendor"))},onVerifyOtp:(i,d)=>{e(mn(i,d,"BillPayVendor"))},onVerifyOtpSuccess:(i,d,p)=>{e(pn(i,d,p))},onFetchAndUpdateVendorRecommendations:i=>{e(Ma(i,!1))}}}))(ti),we=()=>{const e=q(),a=le(),l=Qn(),n=K(),{billId:c,vendorId:r}=ee(),u=v((b=>X(b))),{useFeatureGate:o}=oe(),{isFeatureEnabled:s}=o(f.isBillPayLocalCurrencyFeatureEnabled),[i,d]=g.useState(!1),p=v((b=>b.vendorViewState.newVendorState.fetchStatus.fetchState)),m=v((b=>ye(b,r))),S=v((b=>r!==void 0?b.vendorViewState.editVendorStateById[r]?.fetchStatus??"Not-Started":"Not-Started")),h=r!==void 0?S:p;return g.useEffect((()=>{i===!1&&h==="Not-Started"&&r!=null&&(a(ge(!1,r)),d(!0))}),[i,h,r]),m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?t.jsx(ei,{}):h==="Error"?t.jsx(ai,{onGoHome:()=>e("../",{replace:!0}),onReload:()=>window.location.reload()}):t.jsxs(t.Fragment,{children:[t.jsx(qe,{vendorId:r,billId:c}),t.jsx(Zi,{navigate:e,location:n,themeState:l,currentTenant:u,vendorId:r,billId:c,vendorViewDetails:m,isLocalCurrencyEnabled:s})]})},Xi=Y((function(e,a){const{companyId:l}=a;return{billPaySetupView:Cn(e,l),analytics:E,videoUrl:"https://player.vimeo.com/video/787873426?h=9d9389b1dc&badge=0&autopause=0&player_id=0&app_id=58479"}}),(function(e,a){const{companyId:l,navigate:n}=a;return{onButtonClick:()=>{e(An(l))},onBackClick:()=>{n("../..",{relative:"path"})},onSetupBillPaySuccess:()=>{n("../bills/setup",{relative:"path"})}}}))(ii),Ji=()=>{const e=ni(),a=q(),l=K(),{tenantEmailDomain:n}=ee(),[c,r]=g.useState(!1),u=ue(),o=v((h=>X(h))),s=o.companyId??V.getSignedInUserTenant(n)?.companyId,i=V.getSignedInUser(),d=fe(),p=!!o.companyBillPayInfo?.info?.isBillPayTOSAccepted,m=de(d?.loggedInUserRoleMap),S=h=>{r(h)};if(i==null)throw Error("Can't access bill pay promo page without signing in...");return o.companyBillPayInfo?.info?.isBillPayEnabled===!0?t.jsx(Q,{to:"../../../bills"}):p===!0&&m===!0?t.jsx(Q,{to:"../../bills/setup"}):p===!1||d!=null&&Oe(o,d.loggedInUserRoleMap)?t.jsxs(t.Fragment,{children:[t.jsx(Ae,{analytics:E,onLoad:h=>(b=>b.trackPageLoaded(Ha.Event.billPayPromoPage))(h)}),t.jsx(Ja,{isAppContentDrawerOpen:c,handleDrawerToggle:S}),t.jsx(Xi,{companyId:s,navigate:a,location:l,meetingUrl:e("bill_pay_promo"),onClickMenuIcon:()=>{S(!0)}})]}):t.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:u.colors.grey5}})};function To(){const e=v((H=>X(H))),a=fe(),l=de(a?.loggedInUserRoleMap),n=ue(),{useFeatureGate:c}=oe(),{isFeatureEnabled:r}=c(f.isBillPayLocalCurrencyFeatureEnabled),u=r===!0?zi:Ni,{isFeatureEnabled:o}=c(f.isDebitCardFeatureEnabled),s=Ra(o,e),i=Va(e),d=K(),p=e?.userRole!=null&&Ia(e?.userRole),m=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&de(a?.loggedInUserRoleMap),S=Fa(a?.loggedInUserRoleMap),h=(e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p)&&Dn(a?.loggedInUserRoleMap),b=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!p,C=b&&$a(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(f.isChargeCardFeatureEnabled),j=oi(e,I,o)&&!p,B=j&&En(a?.loggedInUserRoleMap),T=Tn(a?.loggedInUserRoleMap),k=La(a?.loggedInUserRoleMap),$=jn(a?.loggedInUserRoleMap),O=b&&k,G=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!p&&$,W=Pn(a?.loggedInUserRoleMap),z=Fn(a?.loggedInUserRoleMap),w=Rn(a?.loggedInUserRoleMap),M=j&&W,{tenantEmailDomain:L}=ee();return t.jsxs(nt,{children:[d.pathname.includes("/bills")?t.jsxs(t.Fragment,{children:[t.jsx(y,{path:"setup",element:t.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"setup"})}),t.jsx(y,{path:"verification",element:t.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"verification"})}),t.jsx(y,{path:"promo",element:t.jsx(Ji,{})}),t.jsx(y,{path:"approval-rules/*",element:m?t.jsx(pi,{}):t.jsx(mi,{showZeniAccountRoute:O,isUserHasBillPayAccess:z,isUserHasReimbursementAccess:w,showTreasuryRoute:G,isTenantBankingOnly:s,showChargeCardRoute:M,tenantEmailDomain:L??""})}),t.jsx(y,{path:"international-wire",element:t.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"international-wire"})}),e.companyBillPayInfo?.info?.isBillPayEnabled===!0&&t.jsx(y,{path:"*",element:t.jsx(Ei,{})}),(s===!0||i===!0)&&t.jsx(y,{path:"/*",element:t.jsx(qa,{})}),e.companyBillPayInfo?.info?.isBillPayTOSAccepted===!0&&l&&t.jsx(y,{path:"*",element:t.jsx(Q,{to:"../setup"})}),a!=null&&Oe(e,a.loggedInUserRoleMap)&&t.jsx(y,{path:"*",element:t.jsx(Q,{to:"../promo"})})]}):d.pathname.includes("/bill")?t.jsxs(t.Fragment,{children:[t.jsx(y,{path:"new",element:t.jsx(x,{appContent:t.jsx(ba,{})})}),t.jsx(y,{path:":billId",element:t.jsx(x,{appContent:t.jsx(hi,{})})}),t.jsx(y,{path:":billId/edit",element:t.jsx(x,{appContent:t.jsx(ba,{})})}),t.jsx(y,{path:"new/review",element:t.jsx(x,{appContent:t.jsx(fa,{})})}),t.jsx(y,{path:":billId/edit/review",element:t.jsx(x,{appContent:t.jsx(fa,{})})}),t.jsx(y,{path:"/:billId/:addressType",element:t.jsx(x,{appContent:t.jsx(ca,{isSubPage:!0})})}),t.jsx(y,{path:"/new/:addressType",element:t.jsx(x,{appContent:t.jsx(ca,{isSubPage:!0})})}),t.jsx(y,{path:"new/vendor/create",element:t.jsx(x,{appContent:t.jsx(we,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit",element:t.jsx(x,{appContent:t.jsx(we,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:"new/vendor/create/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:"new/vendor/create/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:"new/vendor/create/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create",element:t.jsx(x,{appContent:t.jsx(we,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit",element:t.jsx(x,{appContent:t.jsx(we,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:"*",element:t.jsx(Be,{})})]}):t.jsx(y,{path:"*",element:t.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:n.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${n.colors.dropShadowNormal}`}})}),t.jsx(y,{path:"*",element:t.jsx(Be,{})})]})}export{To as default};
@@ -1,9 +0,0 @@
1
- import{a as O}from"./sentry-Bh68thgn.js";import{u as q,j as h,h as se,g as oe,i as ie,N as re,l as ce}from"./core-Cc1CwF93.js";import{fI as z,If as ue,It as de,LF as le,Ov as pe,P9 as fe,P_ as me,a0T as ye,C8 as Se,Tc as ge,a14 as Ie,a15 as he,a16 as be,a17 as Te,a18 as De,a19 as Ce,a1a as Oe,YE as ke,a1b as Ve,MR as Ae,MJ as ve,a1c as we,MN as Ne,mS as Fe,gJ as _e,gI as Ee,gH as xe,vc as Re,v3 as ze,v0 as Pe,mK as Be,Ch as Me,Cf as P,bE as B,Ct as M,cv as Ue}from"./zeni-epic-state-DFhlE0W3.js";import{b0 as Le,V as je,p as Ge,au as Ke,z as R,a9 as qe,e as U,D as E,U as x,d0 as Je,af as Ze,v as L,bg as j}from"./index-zmOdoQIt.js";import{n as $e}from"./mui-ehyt9jca.js";import{j as A}from"./liveblocks-CM1vcHN_.js";import{d as G}from"./routePaths-RxstHRDw.js";import{M as He}from"./MobileAppDrawer-YElMwyTk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="3fa0ab64-e01e-40a0-8647-186a4fbaf628",e._sentryDebugIdIdentifier="sentry-dbid-3fa0ab64-e01e-40a0-8647-186a4fbaf628")}catch{}})();function it(){const e=q(),r=h((u=>z(u))),a=r?.tenantId,{isApprovalRulesV3Enabled:s,isLoading:l}=Le(a),p=h((u=>u.billPaySetupApproverViewState.fetchState));O.useEffect((()=>{a==null||l||p==="Not-Started"&&e(ue(!0,!0,s))}),[a,l,s,p,e])}function K(e,r,a,s=!1){switch(r){case"zeni_accounts":e(me(a,!0,s));break;case"zeni_treasury":e(fe(a,!0,s));break;case"reimbursement":e(pe(a,!0,s));break;case"charge_cards":e(le(a,!0,s));break;default:e(de(a,!0,s))}}const We=$e.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,Ye=ce((function(e,r){const{businessVerificationDetails:a}=r,s=z(e),l=R.getSignedInUser(),p=s.tenantId,u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:p??""},b=Oe(r.roleMap)&&a.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",t=ke(e.companyConfigState),o=Ve(e.userRoleConfigState);return{businessVerificationDetails:a,verficationDetailsFetchState:a.fetchState,isRefreshingViewInBackground:a.isRefreshingViewInBackground,allNationalityCountries:a.allNationalityCountries,filesEndPoint:`${Ze.fileMicroServiceBaseUrl}`,authParams:u,isDisabled:b,allIndustries:t.companyIndustries??[],companyTitles:o.companyTitles}}),(function(e,r){const{companyId:a,productType:s,currentTenant:l,navigate:p,location:u}=r,{tenantEmailDomain:b}=l;return{onCompanyDetailsChanged:t=>{const{companyDescription:o,companyIndustry:f,companyIndustryType:k,companyLegalName:V,companyTaxId:y,companyWebsite:m,companyPhone:S,primaryContactEmail:d,primaryContactName:i,primaryContactUserId:T,primaryContactSyncToken:D,syncToken:c,fileIds:C,incDate:n,typeOfIncorporation:g,stateOfIncorporation:v,sourceOfFunds:w,companySubIndustry:N,countriesOfOperations:I,companySourceOfFunds:J,companySourceOfFundsDescription:Z,transactionVolume:$,transactionVolumeDescription:H,purposeOfAccount:W,purposeOfAccountDescription:Y,regulatedStatus:Q,regulatedStatusDescription:X,usNexus:ee,usNexusTypes:te}=t,F=k?.selectedOption,ae={companyId:a,companyDescription:o,companyIndustry:f.selectedOption,companyIndustryType:F==null||F===""?void 0:F,companyLegalName:V,taxIdOrEIN:y,website:m!=""&&m!=null?Ue(m):void 0,phone:S,syncToken:c,fileIds:C,incDate:n!=null?B(n?.toString()):n,typeOfIncorporation:g?.selectedOption??"",stateOfIncorporation:v?.selectedOption??"",sourceOfFunds:w?.selectedOption??"",companySubIndustry:N?.selectedOption??"",countriesOfOperations:I?.selectedOptions.map((_=>_.length===2?_:j(_)))??[],companySourceOfFunds:J?.selectedOption??"",companySourceOfFundsDescription:Z,transactionVolume:$?.selectedOption??"",transactionVolumeDescription:H,purposeOfAccount:W?.selectedOption??"",purposeOfAccountDescription:Y,regulatedStatus:Q??"",regulatedStatusDescription:X,usNexus:ee,usNexusTypes:te?.selectedOptions??[]},ne={userId:T,firstName:i.firstName,lastName:i.lastName,email:d,syncToken:D};e(M({companyDetails:ae,primaryContactDetails:ne}))},onCompanyOfficerUpdated:t=>{const o=t.map((f=>{const{officerType:k,userId:V,name:y,email:m,nationalityCountryCode:S,ssn:d,dob:i,phone:T,syncToken:D,selectDocument:c,role:C,ownership:n,isSelectedForVerification:g,userVerificationStatus:v,treasuryUserVerificationStatus:w,fileIds:N}=f;let I;return c.selectDocumentType==="driverLicense"?I="driving_license":c.selectDocumentType==="passport"?I="passport":c.selectDocumentType==="stateId"?I="id_document":c.selectDocumentType==="ssnCard"&&(I="social_security_card"),{officerType:k,userId:V,firstName:y.firstName,lastName:y.lastName,email:m,ssn:d,nationalityCountryCode:S?.selectedOption!=null?j(S.selectedOption):void 0,phone:T,birthday:i!=null?B(i?.toString()):i,syncToken:D,titleAtCompany:C.selectedOption,ownershipInCompany:n,documentTypeSelectedForVerification:I,isSelectedForVerification:g,userVerificationStatus:v,treasuryUserVerificationStatus:w,fileIds:N,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(M({officers:o}))},onSaveDetailsClick:t=>{e(P(a,t,s))},onSendForVerificationClick:t=>{e(P(a,t,s,!0))},onAddressClick:t=>{const o=G(b,t),f=L(u.state?.pathnameStackToGoBack,u.pathname);p(o,{state:{pathnameStackToGoBack:f}})},onRegisteredAddressClick:t=>{const o=G(b,t),f=L(u.state?.pathnameStackToGoBack,u.pathname);p(o,{state:{pathnameStackToGoBack:f}})},onBackClick:()=>{e(Me({companyId:a})),p("../setup")},updateFilesEntity:t=>{e(Be({files:t}))},onDeleteFile:t=>{e(Pe(t))},onDeleteFileList:t=>{e(ze(t))},onEditFileName:(t,o)=>{e(Re(t,o.split(".")[0]))},onGetOtp:t=>{e(xe(t,"SpendManagementSetup"))},onResendOtp:t=>{e(Ee(t,"SpendManagementSetup"))},onVerifyOtp:(t,o)=>{e(_e(t,o,"SpendManagementSetup"))},saveNewAddressInLocalStore:(t,o)=>{e(Fe({addressType:t,addressToCreate:o}))},onIdentityDocumentUploadedForAutofill:t=>{if(a==null)return;const o=we(t.documentType);o!=null&&e(Ne({target:"setup",companyId:a,officerType:t.officerType,fileId:t.fileId,documentType:o}))},onCompanyDocumentUploadedForAutofill:t=>{a!=null&&e(ve({target:"setup",companyId:a,fileId:t.fileId,documentType:t.documentType}))},onResetKycKybClick:()=>{e(Ae())}}}))(Je),rt=({productType:e})=>{const r=se(),a=oe(),s=q(),[l,p]=O.useState(!1),[u,b]=O.useState(!1),{tenantEmailDomain:t}=ie(),o=je(),{useDynamicConfig:f}=Ge(),{configValue:k}=f(Ke.zeniAccountsConfig),V=ye(k),y=h((n=>{switch(e){case"zeni_accounts":return n.zeniAccountSetupViewState.fetchState;case"reimbursement":return n.remiSetupViewState.fetchState;case"charge_cards":return n.chargeCardSetupViewState.fetchState;case"zeni_treasury":return n.treasurySetupViewState.fetchState;default:return n.billPaySetupViewState.fetchState}})),m=h((n=>n.companyConfigState.fetchState)),S=h((n=>n.userRoleConfigState.fetchState)),d=h((n=>z(n))),i=d.companyId??R.getSignedInUserTenant(t)?.companyId;O.useEffect((()=>{m==="Not-Started"&&s(Se()),S==="Not-Started"&&s(ge(!0))}),[m,S,s]),O.useEffect((()=>{l||y!=="Not-Started"||i==null||(p(!0),K(s,e,i))}),[l,y,i,s]);const T=h((n=>{switch(e){case"zeni_accounts":return De(n,i);case"zeni_treasury":return Te(n,i);case"charge_cards":return be(n,i);case"reimbursement":return he(n,i);default:return Ie(n,i)}})),D=T.kycKybResetStatus.fetchState;if(O.useEffect((()=>{D==="Completed"&&i!=null&&(K(s,e,i,!0),s(Ce()))}),[D,i,e,s]),R.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let c;switch(e){case"zeni_accounts":c=d.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":c=d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":c=d.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||d.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":c=d.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:c=d.companyBillPayInfo?.info?.isBillPayTOSAccepted}const C=n=>{b(n)};return c===!1?A.jsx(re,{to:"../promo"}):A.jsxs(We,{children:[A.jsx(qe,{analytics:U,onLoad:n=>(g=>{switch(e){case"zeni_accounts":return g.trackPageLoaded(x.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return g.trackPageLoaded(x.Event.reimbursementBusinessVerification);default:return g.trackPageLoaded(x.Event.billPayBusinessVerification,E(a)?"Settings":void 0)}})(n)}),E(a)?A.jsx(He,{isAppContentDrawerOpen:u,handleDrawerToggle:C}):null,A.jsx(Ye,{businessVerificationDetails:T,navigate:r,location:a,companyId:i,analytics:U,currentTenant:d,productType:e,isSettings:E(a),roleMap:o?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{C(!0)},maxInsuredAmount:V.maxInsuredAmount})]})};export{rt as B,K as d,it as u};
@@ -1,14 +0,0 @@
1
- import{j as g}from"./liveblocks-CM1vcHN_.js";import{a as r}from"./sentry-Bh68thgn.js";import{u as he,h as fe,g as Ce,j as H,i as Se,l as ge}from"./core-Cc1CwF93.js";import{ec as be,j as Pe,ed as ye,z as we,ef as Ie,eh as W,ei as Ee,aD as G,a9 as xe,e as F,ej as M,et as Ae,G as Te,U as ke,w as Ue,em as Oe,en as _e,aj as ve,eq as Qe,er as je,aw as De,es as Fe}from"./index-zmOdoQIt.js";import{gN as $e,fH as J,fI as Le,gb as Ve,jw as qe,js as Re,fJ as N,gx as Be,gr as He,gt as z,gz as Me,gA as Ne,gB as ze,gC as We,gD as Ge}from"./zeni-epic-state-DFhlE0W3.js";import{D as Je,n as L,v as Ye,S as Ke}from"./mui-ehyt9jca.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="d8e3f675-038b-4227-b575-1875f9d6fd25",t._sentryDebugIdIdentifier="sentry-dbid-d8e3f675-038b-4227-b575-1875f9d6fd25")}catch{}})();const Y="chat-response-generated",K="cards/ask",X="card_policy_hero";function $(t){return`/${t}/cards`}function Z(t){return`/${t}/cards/policy`}const Xe=ge((function(t,s){const d=J(t),l=s.isSubmitting,u=_e(t,{allUsers:s.allUsers,onCardPolicyVendorSearchTextChange:s.onCardPolicyVendorSearchTextChange});return{showSampleQuestions:s.sessionFromUrl==="new_chat"&&d.uiState.currentChatSessionId==null,aiCfoView:d,isSubmitting:l,isNewChatSession:s.sessionFromUrl==="new_chat",isFullView:!0,tableDownloadEndPoint:`${ve}/tableDownload`,exportDownloadEndPoint:Qe(),emailLinkQuestion:s.emailLinkQuestion,autoSubmitEmailLinkQuestion:s.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:s.onEmailLinkQuestionProcessed,isFileUploadEnabled:s.isFileUploadEnabled,isUploadPromoVisible:s.isUploadPromoVisible,onUploadPromoClose:s.onUploadPromoClose,...u}}),(function(t,s){const{location:d,currentTenant:l,userId:u,navigate:o,currentChatSessionId:P,allSessionsWithOrderedQuestionAnswers:f,isAiCardCreationEnabled:A,isCardPolicyEnabled:T,cardPolicyPageContext:k}=s,C=l.tenantEmailDomain,c=d.state?.referrer,h=c===X?Z(C):$(C);return{onEventReceived:(a,n)=>{if(a===Y&&typeof n.text=="string"&&typeof n.metadata=="object"){const e=n,m=Ne(e.type),y=e.metadata.chat_session_id??null,{currentChatSession:U,currentQuestionAnswer:b,currentQuestionAnswerSummary:p}=G(f,y);m!=="answer"?F.trackAICFOChatResponseGenerated(m,b?.question.questionText??"",e.text,y,Fe(p,U),e.metadata.message_id??null):F.trackAICFOChatAnswerGenerated(e.text,b?.question.questionText??"",(e.follow_up_questions?.length??0)>0,!!e.assumptions,!!e.insights,e.visualization!=null,ze(e.visualization?.type??"")??null,y,e.summarized_title,e.metadata.message_id??null),t(We({chatSessionId:e.metadata.chat_session_id,responseType:m,fetchState:{fetchState:"Completed",error:void 0}})),t(Ge({chatSessionId:e.metadata.chat_session_id,answerPayload:e,userId:u}))}},onSubmit:(a,n,e,m)=>{a&&De(t,a,n,P,f,u,m,e,k)},updateCurrentInput:a=>{t(z(a))},onStopSubmit:()=>{},onUpdateScrollYOffset:a=>{t(Me(a))},onSelectSampleQuestion:()=>{},onBackClick:()=>{o(-1)},onCloseClick:()=>{o(h,{state:{...d.state}}),t(z(""))},togglePageView:()=>{o(h,{state:W(d.state)}),s.setIsAiCfoOpen(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{o(-1)},onNewChatClick:()=>{P!=null&&t(He()),o((function(a){return`/${a}/${K}`})(C),{state:{...d.state}})},onToggleCotCollapsed:(a,n)=>{t(Be({questionAnswerId:a,isCollapsed:n}))},...je(t,{isAiCardCreationEnabled:A,isCardPolicyEnabled:T,currentChatSessionId:P,onAfterCardsCreationSubmit:()=>{s.setIsAiCfoOpen(!0),o($(C),{state:{...d.state}})},onAfterCardPolicySubmit:()=>{s.setIsAiCfoOpen(!0),o(`/${C}/cards/policy`,{state:{...d.state}})}})}}))(Ue(Oe)),{spendManagement:{chargeCard:{cardsAiCfoHero:ee,cardPolicyAiCfoHero:te}}}=Te.getLocalizedStrings(),x=ee.pageTitle,Ze=te.pageTitle,et=ee.chatHeaderSubtitle,tt=te.chatHeaderSubtitle,Pt=({isFileUploadEnabled:t})=>{const s=be(),{setIsAiCfoOpen:d}=Pe(),l=he(),u=fe(),o=Ce(),[P,f]=r.useState(!1),{allUsers:A,isAiCardCreationEnabled:T,isCardPolicyEnabled:k,onCardPolicyVendorSearchTextChange:C}=ye();r.useEffect((()=>{l($e())}),[l]);const c=H((i=>J(i))),h=we.getSignedInUser(),{session_id:a}=Se(),n=H((i=>Le(i))),e=c.uiState.currentChatSessionId,m=n.tenantEmailDomain,{handleUploadPromoClose:y,isUploadPromoVisible:U}=Ie({isFileUploadEnabled:t,tenantEmailDomain:m}),b=o.state,p=b?.aiCfoInitialQuestion??null,O=!!b?.aiCfoShouldSubmit,w=b?.referrer===X,se=w?"card_policy":void 0,ae=r.useMemo((()=>({title:w?Ze:x,subtitle:w?tt:et})),[w]),[oe,_]=r.useState(null),[ne,v]=r.useState(!1),Q=r.useRef(!1);r.useEffect((()=>{Q.current||p==null||p===""||(_(p),v(O),Q.current=!0)}),[p,O]);const ie=r.useCallback((()=>{_(null),v(!1),u(o.pathname,{replace:!0,state:W(o.state)})}),[o.pathname,o.state,u]),re=n.masterTOSInfo,S=re?.isMasterTOSAccepted??!1,E=r.useRef(null);r.useEffect((()=>{if(S&&E.current!=null){const{question:i,shouldSubmit:I}=E.current;E.current=null,_(i),v(I),Q.current=!1}}),[S]);const{visitedSessions:V}=Ee(e),j=c.fetchState,D=c.uiState.chatSessionsNextPageToken.hasMore||!c.uiState.chatSessionsFirstPageFetched,q=e!=null?c.fetchChatSessionHistoryByChatSessionId?.[e]?.fetchState??"Not-Started":"Not-Started",R=e==null||(c.uiState.chatHistoryNextPageToken[e]?.hasMore??!0),B=c.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:le}=G(B,e),de=le.length===0;r.useEffect((()=>{e!=null&&a!==e&&u((function(i,I){return`/${i}/${K}/${I}`})(m,e),{state:{...o.state},replace:!0})}),[e,a,m,u,o.state]),r.useEffect((()=>{a!=null&&e==null&&a!=="new_chat"&&l(Ve({sessionId:a,agentId:"controller"}))}),[]);const ce=r.useMemo((()=>({events:V.map((i=>`private-encrypted-chat-${i}.${Y}`)),eventCallback:(i,I,pe)=>pe.onEventReceived(i,I)})),[V]);if(r.useEffect((()=>{j!=="In-Progress"&&D&&l(qe())}),[j,D,l]),r.useEffect((()=>{e!=null&&q!=="In-Progress"&&R&&h!=null&&j==="Completed"&&!D&&l(Re(e,h.userId))}),[q,R,e,h,l]),h==null)throw Error("Can't access Cards AI CFO page without signing in...");const ue=a??"new_chat",me=e!=null&&c.responseStateByChatSessionId?.[e]?.answer?.fetchState==="In-Progress";return g.jsxs(at,{children:[g.jsx(xe,{analytics:F,onLoad:i=>i.trackPageLoaded(ke.Event.aiCFOPage)}),S?g.jsx(Xe,{answerExportEndPoint:s,...ce,currentChatSessionId:e,allSessionsWithOrderedQuestionAnswers:B,allUsers:A,isAiCardCreationEnabled:T,isCardPolicyEnabled:k,openOnboardingPage:()=>f(!0),userId:h.userId,setIsAiCfoOpen:d,navigate:u,sessionFromUrl:ue,location:o,isSubmitting:me,isEmptyChatWithSession:de,customPageTitle:x,chatHeader:ae,currentTenant:n,emailLinkQuestion:oe??void 0,autoSubmitEmailLinkQuestion:ne,onEmailLinkQuestionProcessed:ie,isFileUploadEnabled:t,isUploadPromoVisible:U,onUploadPromoClose:y,onCardPolicyVendorSearchTextChange:C,cardPolicyPageContext:se}):g.jsx(M,{isTOSAccepted:S,acceptMasterTOSState:c.masterTOSAcceptanceState,customPageTitle:x,onCloseClick:()=>{u(w?Z(m):$(m),{state:{...o.state}})},onCompleteClick:()=>{S||n.userRoleId==null||(p!=null&&p!==""&&(E.current={question:p,shouldSubmit:O}),l(N(n.userRoleId)))}}),g.jsx(Je,{anchor:"right",open:P,transitionDuration:250,PaperProps:{component:ot,style:{width:`${Ae}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:g.jsx(st,{onClick:i=>i.stopPropagation(),children:g.jsx(M,{isTOSAccepted:S,acceptMasterTOSState:c.masterTOSAcceptanceState,customPageTitle:x,onCloseClick:()=>f(!1),onCompleteClick:()=>{S||n.userRoleId==null||l(N(n.userRoleId)),f(!1)}})})})]})},st=L(Ke)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,at=L.div`
6
- flex: 1 1 auto;
7
- display: flex;
8
- flex-direction: column;
9
- min-height: 0;
10
- width: 100%;
11
- `,ot=L(Ye)`
12
- box-shadow: ${({theme:t})=>t.colors.elevation2};
13
- color: ${({theme:t})=>t.colors.grey4};
14
- `;export{Pt as default};