@zeniai/web-app-ui 5.3.39-prod → 5.3.40-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 (129) hide show
  1. package/dist/assets/{AccountMappingScreen-CYKESKzr.js → AccountMappingScreen-BIUIsIRE.js} +2 -2
  2. package/dist/assets/AddressRoutes--gUEIlXc.js +1 -0
  3. package/dist/assets/AddressScreen-Bej9zQot.js +9 -0
  4. package/dist/assets/{AiCfoScreen-CUzkdnk3.js → AiCfoScreen-BQaocZqa.js} +1 -1
  5. package/dist/assets/{AppDrawer-DXgubk8e.js → AppDrawer-BYM-DSkR.js} +1 -1
  6. package/dist/assets/{BillPayApprovalRoutes-C2jlHQ7M.js → BillPayApprovalRoutes-qtIPcgB0.js} +1 -1
  7. package/dist/assets/BillPayRoutes-CnpuGuHe.js +119 -0
  8. package/dist/assets/{BusinessVerificationPageScreen-DahCdFps.js → BusinessVerificationPageScreen-D2Ary0QP.js} +1 -1
  9. package/dist/assets/{CardsAiCfoScreen-CGnwOYJ8.js → CardsAiCfoScreen-V1ZiSm5h.js} +3 -3
  10. package/dist/assets/{ChargeCardRoutes-BazlPF9u.js → ChargeCardRoutes-DgTzZTph.js} +1 -1
  11. package/dist/assets/{CompanyPassportScreen-DUdRbkF8.js → CompanyPassportScreen-CNlNZlol.js} +1 -1
  12. package/dist/assets/ConnectionAuthScreen-5CXbYx5t.js +11 -0
  13. package/dist/assets/CustomerOnboardingAuthScreen-Dwb1vXcC.js +1 -0
  14. package/dist/assets/{CustomerOnboardingRoutes-B50wTNox.js → CustomerOnboardingRoutes-BKJm_JEE.js} +3 -3
  15. package/dist/assets/{DashboardRoutes-Crkjw3Id.js → DashboardRoutes-BKHZJKkt.js} +1 -1
  16. package/dist/assets/{DefaultTenantHome-Bt9vmYHR.js → DefaultTenantHome-ttl2hapk.js} +1 -1
  17. package/dist/assets/DomesticWireDetailScreen-BZaPu7aX.js +18 -0
  18. package/dist/assets/{DrawerScreen-C1TXRcww.js → DrawerScreen-CeUxZGpo.js} +1 -1
  19. package/dist/assets/EntityDetailRoutes-CjcEzz2g.js +1 -0
  20. package/dist/assets/{ExpenseAutomationRoutes-DBIvjop9.js → ExpenseAutomationRoutes-BJzy8xal.js} +6 -6
  21. package/dist/assets/FeaturePreviewScreen-ClB4hfhH.js +1 -0
  22. package/dist/assets/{HubSpotOAuthCallbackScreen-DT13Wh7A.js → HubSpotOAuthCallbackScreen-CvNAfhTh.js} +1 -1
  23. package/dist/assets/{InboxNotificationsProvider-Bce8xb55.js → InboxNotificationsProvider-BU6hQETc.js} +1 -1
  24. package/dist/assets/InvoicingRoutes-B1gAqEf9.js +2 -0
  25. package/dist/assets/{MagicLinkRoutes-Br2hoo0f.js → MagicLinkRoutes-B0E48n4q.js} +20 -20
  26. package/dist/assets/MagicLinkSignInScreen-DmrCJmgr.js +12 -0
  27. package/dist/assets/{MobileAppDrawer-C1pxYQQs.js → MobileAppDrawer-ezuGFNmX.js} +1 -1
  28. package/dist/assets/NotFoundScreen-BHK2wcy4.js +1 -0
  29. package/dist/assets/{NotificationRoutes-CoyKkx8E.js → NotificationRoutes-CJaAWW0k.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-BEcg5zam.js → OAuthConsentScreen-Lh-iiFIq.js} +1 -1
  31. package/dist/assets/{PandLWithForecastRoutes-Ct9R8yRZ.js → PandLWithForecastRoutes-BbdTHIrJ.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-Bpem65oz.js → PaymentLinkScreen-DtmVsAJS.js} +5 -5
  33. package/dist/assets/PeopleRoutes-CNtwYayL.js +22 -0
  34. package/dist/assets/PerformanceRoutes-DKKm8Wqd.js +1 -0
  35. package/dist/assets/{Preview-HOriLeq_.js → Preview-Cbn9H8uJ.js} +1 -1
  36. package/dist/assets/{QBOConnectionScreen-Wj2P3Fde.js → QBOConnectionScreen-IJewO3Tq.js} +23 -23
  37. package/dist/assets/ReimbursementApprovalRoutes-CaWqEdpt.js +1 -0
  38. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-D2GP0etd.js → ReimbursementApprovalRuleDetailScreen-C9pFfWce.js} +1 -1
  39. package/dist/assets/{ReimbursementRoutes-K81h5TuA.js → ReimbursementRoutes-DxyXmLRP.js} +7 -7
  40. package/dist/assets/{ReportsRoutes-C2snVdy8.js → ReportsRoutes-C6GStBGQ.js} +1 -1
  41. package/dist/assets/RewardsRoutes-DsLNX64E.js +1 -0
  42. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-V7gtE8RC.js → ScheduleDetailsPrepaidExpensesScreen-BsuRR9R3.js} +4 -4
  43. package/dist/assets/ScreenRoutes-L97Vug0k.js +2 -0
  44. package/dist/assets/{SettingsRoutes-Cqwd2uda.js → SettingsRoutes-BOJoESyV.js} +6 -6
  45. package/dist/assets/{SetupPagesScreen-f1N9Cz0q.js → SetupPagesScreen-D-0MxRfj.js} +5 -5
  46. package/dist/assets/SignInScreen-BE9J9fIz.js +1 -0
  47. package/dist/assets/SignOutScreen-CTevoMDc.js +9 -0
  48. package/dist/assets/{TaskListScreen-UbcwhPqf.js → TaskListScreen-CnVcsAwc.js} +2 -2
  49. package/dist/assets/{TaskRoutes-B60I9FKM.js → TaskRoutes-CQy6J4IF.js} +2 -2
  50. package/dist/assets/TransactionDetailRoutes-WkmYYr0f.js +1 -0
  51. package/dist/assets/{TransactionDetailScreen-DkBKkmlJ.js → TransactionDetailScreen-DE0VBfkC.js} +1 -1
  52. package/dist/assets/{TransactionListRoutes-CT56obE2.js → TransactionListRoutes-D9kITRhY.js} +1 -1
  53. package/dist/assets/{TreasuryRoutes-DMbv4CWu.js → TreasuryRoutes-C6jv6nMF.js} +1 -1
  54. package/dist/assets/{VendorsRoutes-BqIaCgRw.js → VendorsRoutes-CaVrball.js} +17 -17
  55. package/dist/assets/{WiseConfirmationScreen-M1yWfm7t.js → WiseConfirmationScreen-CzbEV-Z5.js} +1 -1
  56. package/dist/assets/{ZeniAccountRoutes-CZZ2L9Kc.js → ZeniAccountRoutes-GdGf0SYA.js} +9 -9
  57. package/dist/assets/{ZeniAccountStatementScreen-CNDmdAfe.js → ZeniAccountStatementScreen-Cy-_EAj7.js} +2 -2
  58. package/dist/assets/{accountMappingHelper-IZT3VRrm.js → accountMappingHelper-DeDocU0d.js} +1 -1
  59. package/dist/assets/{analytics-BraOqOO1.js → analytics-N153TuwK.js} +1 -1
  60. package/dist/assets/{analyticsHelper-BM5BTTUi.js → analyticsHelper-Cw60VlOq.js} +1 -1
  61. package/dist/assets/{core-BTcTlweO.js → core-1xnf2RtE.js} +1 -1
  62. package/dist/assets/{decodeURIComponentSafe-BtKRHKiX.js → decodeURIComponentSafe-DcD-XNVX.js} +1 -1
  63. package/dist/assets/{dnd-BoQ5C62n.js → dnd-DsH8jkrb.js} +1 -1
  64. package/dist/assets/{empty-xKpGK8On.js → empty-Cvto7Qa_.js} +1 -1
  65. package/dist/assets/{empty-B0NiNSvB.js → empty-GMcl-a5k.js} +1 -1
  66. package/dist/assets/{emptyVideoElement-2b9d4olX.js → emptyVideoElement-3SZu1zsn.js} +1 -1
  67. package/dist/assets/{epic-DBHknCRT.js → epic-FXcGvl3F.js} +2 -2
  68. package/dist/assets/{expenseAutomationHelper-B9yXZ1rw.js → expenseAutomationHelper-CNRtAWpH.js} +1 -1
  69. package/dist/assets/{getLocaleForTenant-BEhIaWEh.js → getLocaleForTenant-Cb4ANH4Q.js} +1 -1
  70. package/dist/assets/{index-BSH2P79i.js → index-B9A0BRu3.js} +1 -1
  71. package/dist/assets/{index-DOPPIiem.js → index-Bdznf1tI.js} +1 -1
  72. package/dist/assets/{index-C2R5hhyT.js → index-BuVXkUYw.js} +2 -2
  73. package/dist/assets/{index-CPfXu-MN.js → index-CAK36XTm.js} +1 -1
  74. package/dist/assets/{index-BG5XnXjP.js → index-C_EhkY0q.js} +1 -1
  75. package/dist/assets/{index-Bv_gAW4_.js → index-Ctq16f6K.js} +1 -1
  76. package/dist/assets/{index-BJGQmd5Z.js → index-Dc3AC-iD.js} +1 -1
  77. package/dist/assets/{index-TGDDWC5W.js → index-nXM19luG.js} +25828 -25822
  78. package/dist/assets/{lexical-DXRGtjuN.js → lexical-d2so_3As.js} +1 -1
  79. package/dist/assets/{liveblocks-BxYL1OgN.js → liveblocks-C_WAhyd7.js} +1 -1
  80. package/dist/assets/{lottie-NpyKchhe.js → lottie-NIzYzhlS.js} +1 -1
  81. package/dist/assets/{mui-pCWXyHva.js → mui-BAsIRnB1.js} +1 -1
  82. package/dist/assets/{pathToGoBack-CzIcoraG.js → pathToGoBack-BmzgWhs1.js} +1 -1
  83. package/dist/assets/{pdf-OKLicNBW.js → pdf-BKNPlqtE.js} +4 -4
  84. package/dist/assets/{pdf-lib-De_6kPvr.js → pdf-lib-RqzDns79.js} +1 -1
  85. package/dist/assets/{plaid-CQ3219ms.js → plaid-dW1_MCaE.js} +1 -1
  86. package/dist/assets/{pusher-CNBK0rIV.js → pusher-BVnEdZ0V.js} +1 -1
  87. package/dist/assets/{react-CQp_LE2T.js → react-BFlpt3K4.js} +1 -1
  88. package/dist/assets/{react-DFmLhP3W.js → react-ClcLrViu.js} +1 -1
  89. package/dist/assets/{react-BmlMM4Hc.js → react-Dq2pDn48.js} +1 -1
  90. package/dist/assets/{react-DOtOHej0.js → react-gANl8FSl.js} +1 -1
  91. package/dist/assets/{react-C2eUkZYQ.js → react-hvFnEVKT.js} +1 -1
  92. package/dist/assets/{react-BxRRbSNz.js → react-xy8FhgjK.js} +1 -1
  93. package/dist/assets/{recharts-DITYpsYw.js → recharts-C2rsrRI6.js} +1 -1
  94. package/dist/assets/{routePaths-3cJbMI-5.js → routePaths-WEgtxKVV.js} +1 -1
  95. package/dist/assets/{sentry-CBGLGt6C.js → sentry-lC29HHPj.js} +1 -1
  96. package/dist/assets/{url-CjdSzyHM.js → url-B8rnjauu.js} +1 -1
  97. package/dist/assets/{url-UnzJzFFd.js → url-LYbpMOZt.js} +1 -1
  98. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DbTimNwr.js → useAiCfoDashboardSuggestedQuestionsChips-DJIBd7UL.js} +1 -1
  99. package/dist/assets/useAskAiCfoHostNavButtonProps-CRADLi0_.js +1 -0
  100. package/dist/assets/{useChargeCardPusherEvents-B893sZ5F.js → useChargeCardPusherEvents-BwfDpPGN.js} +1 -1
  101. package/dist/assets/{useDeviceId-DebjpKwR.js → useDeviceId-BX84j5B2.js} +1 -1
  102. package/dist/assets/{useEmailConnectResultRefresh-DWnaVvBR.js → useEmailConnectResultRefresh-f-R3NS2J.js} +1 -1
  103. package/dist/assets/{useInitialThreadRequest-BREcdNRj.js → useInitialThreadRequest-CbTk8gTV.js} +1 -1
  104. package/dist/assets/{useTaskManagerAccess-CxGYFCdI.js → useTaskManagerAccess-CCKD6ndI.js} +1 -1
  105. package/dist/assets/{utils-SKzA7CXw.js → utils-BBaMea9r.js} +1 -1
  106. package/dist/assets/{withTransactionSidePanel-CMzfl6nd.js → withTransactionSidePanel-D-Ctl_K2.js} +1 -1
  107. package/dist/assets/{zeni-epic-state-BnWuRnd6.js → zeni-epic-state-BVNUxmav.js} +5 -5
  108. package/dist/index.html +1 -1
  109. package/package.json +4 -4
  110. package/dist/assets/AddressRoutes-DAo3WseZ.js +0 -1
  111. package/dist/assets/AddressScreen-CVh8BPrB.js +0 -9
  112. package/dist/assets/BillPayRoutes-COsfWSu_.js +0 -119
  113. package/dist/assets/ConnectionAuthScreen-HV_NFV_a.js +0 -11
  114. package/dist/assets/CustomerOnboardingAuthScreen-wj5uUCdd.js +0 -1
  115. package/dist/assets/DomesticWireDetailScreen-B_RnpssZ.js +0 -18
  116. package/dist/assets/EntityDetailRoutes-BWiLL1YS.js +0 -1
  117. package/dist/assets/FeaturePreviewScreen-DwYCYDOn.js +0 -1
  118. package/dist/assets/InvoicingRoutes-BO0X-UM5.js +0 -2
  119. package/dist/assets/MagicLinkSignInScreen-CONCFbGH.js +0 -12
  120. package/dist/assets/NotFoundScreen-CIYbJrC7.js +0 -1
  121. package/dist/assets/PeopleRoutes-DL4GGMh5.js +0 -22
  122. package/dist/assets/PerformanceRoutes-Cfy42E_F.js +0 -1
  123. package/dist/assets/ReimbursementApprovalRoutes-oqwIMUnj.js +0 -1
  124. package/dist/assets/RewardsRoutes-CCv8pMCB.js +0 -1
  125. package/dist/assets/ScreenRoutes-BcwURyWe.js +0 -2
  126. package/dist/assets/SignInScreen-v9sXWzQJ.js +0 -1
  127. package/dist/assets/SignOutScreen-BZPhHb4h.js +0 -9
  128. package/dist/assets/TransactionDetailRoutes-B1Fq5bWn.js +0 -1
  129. package/dist/assets/useAskAiCfoHostNavButtonProps-zn3r_NtN.js +0 -1
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-TGDDWC5W.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CBGLGt6C.js"><link rel="modulepreload" crossorigin href="/assets/core-BTcTlweO.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-BnWuRnd6.js"><link rel="modulepreload" crossorigin href="/assets/mui-pCWXyHva.js"><link rel="modulepreload" crossorigin href="/assets/analytics-BraOqOO1.js"><link rel="modulepreload" crossorigin href="/assets/utils-SKzA7CXw.js"><link rel="stylesheet" crossorigin href="/assets/index-BhC2LNQw.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-nXM19luG.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-lC29HHPj.js"><link rel="modulepreload" crossorigin href="/assets/core-1xnf2RtE.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-BVNUxmav.js"><link rel="modulepreload" crossorigin href="/assets/mui-BAsIRnB1.js"><link rel="modulepreload" crossorigin href="/assets/analytics-N153TuwK.js"><link rel="modulepreload" crossorigin href="/assets/utils-BBaMea9r.js"><link rel="stylesheet" crossorigin href="/assets/index-BhC2LNQw.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.3.39-prod",
3
+ "version": "5.3.40-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.0.90",
32
- "@zeniai/client-epic-state": "5.2.40",
33
- "@zeniai/web-components": "4.3.74",
31
+ "@zeniai/client-analytics": "2.0.89",
32
+ "@zeniai/client-epic-state": "5.2.41",
33
+ "@zeniai/web-components": "4.3.75",
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 e}from"./liveblocks-BxYL1OgN.js";import{A as o}from"./AddressScreen-CVh8BPrB.js";import i from"./NotFoundScreen-CIYbJrC7.js";import"./sentry-CBGLGt6C.js";import{n as s,o as r}from"./core-BTcTlweO.js";import"./zeni-epic-state-BnWuRnd6.js";import"./recharts-DITYpsYw.js";import"./index-TGDDWC5W.js";import"./mui-pCWXyHva.js";import"./analytics-BraOqOO1.js";import"./plaid-CQ3219ms.js";import"./dnd-BoQ5C62n.js";import"./stripe-cKAAJElX.js";import"./lottie-NpyKchhe.js";import"./lexical-DXRGtjuN.js";import"./pdf-OKLicNBW.js";import"./utils-SKzA7CXw.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="31d0e0e8-dcf1-419d-b2be-6dc359df28c9",t._sentryDebugIdIdentifier="sentry-dbid-31d0e0e8-dcf1-419d-b2be-6dc359df28c9")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(o,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(o,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
@@ -1,9 +0,0 @@
1
- import{j as r}from"./liveblocks-BxYL1OgN.js";import{a as b}from"./sentry-CBGLGt6C.js";import{h as T,u as P,g as E,i as j,j as U,l as D}from"./core-BTcTlweO.js";import{a1 as B,E as M,z as $,V as L,a7 as K,a8 as z,j as C,U as S,a3 as F,Z as h,a4 as G}from"./index-TGDDWC5W.js";import{UC as _,io as R,fE as V,UD as N,c8 as O,UE as q,mG as H}from"./zeni-epic-state-BnWuRnd6.js";import{n as Z}from"./mui-pCWXyHva.js";import J from"./NotFoundScreen-CIYbJrC7.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]="8b5850c9-5fe7-4b96-95fc-b00f6194e2d0",e._sentryDebugIdIdentifier="sentry-dbid-8b5850c9-5fe7-4b96-95fc-b00f6194e2d0")}catch{}})();const Q=Z.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
- `,W=D((function(e,s){const{addressId:o,isSubPage:i,addressType:c}=s,l=V(e),a=s.roleMap!=null&&N(s.roleMap),n=i||c==="user_address"||O(l?.userRole??[])||a?void 0:"readonly";if(o==null){const t=q(c,e);return{addressToEdit:t?.addressToCreate,loadingState:t?.status?.fetchState,googleAPIKey:h.googleMapsAPIKey,isDisabled:n,isSubPage:i,dontShowSaveConfirmationPopup:s.dontShowSaveConfirmation}}const d=_(e,o);return{addressToEdit:d.address,loadingState:d.fetchState,googleAPIKey:h.googleMapsAPIKey,isDisabled:n}}),(function(e,s){const{navigate:o,location:i,addressType:c}=s,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const n=i.state,d=G(n?.pathnameStackToGoBack);let t=d.poppedPathname??v();const u=n?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(t=`${t}?${g}`)}o(t,{state:{pathnameStackToGoBack:d.newStack}})}};return{onSubmitHandler:a=>{const n=X(a);e(H({addressType:c,addressToCreate:n})),C?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(s.bankAccountContext)},onCancel:()=>{l(s.bankAccountContext)}}}))(F);function re({isSubPage:e,hideAddressSubTitle:s=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),n=P(),d=E(),{addressId:t,addressType:u}=j(),g=B(),I=M(),k=$.getSignedInUser(),[f,w]=b.useState(t==null),p=U((m=>t!=null?_(m,t).fetchState:"Not-Started")),x=L();if(k==null)throw Error("Can't access address page without signing in...");const A=m=>m.trackPageLoaded(t!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return b.useEffect((()=>{f||t==null||(w(!0),n(R(t,!1)))}),[f,t,n]),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)?!f&&p==="Not-Started"||f&&p==="In-Progress"?r.jsx(K,{fetchState:p,style:{backgroundColor:I.colors.grey5}}):t!=null&&p==="Error"?(a(`${v(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(z,{analytics:C,onLoad:A}),r.jsx(Q,{windowSize:g,children:r.jsx(W,{location:d,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:s,addressId:t,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:x?.loggedInUserRoleMap})})]}):r.jsx(J,{})}const v=(e=2)=>{let s="../";for(let o=0;o<e;o++)s=`${s}../`;return s},X=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{re as A,X as t};
@@ -1,119 +0,0 @@
1
- import{j as t}from"./liveblocks-BxYL1OgN.js";import{h as J,u as le,g as K,i as ae,j as k,N as ee,l as Q,q as nt,n as it,o as y}from"./core-BTcTlweO.js";import{fE as Z,Xv as Ue,bq as ka,Rx as ot,bo as wa,bJ as de,Xw as Ba,Gi as xa,Hv as Ve,GR as lt,bn as Ae,Xx as st,Xy as rt,c8 as ct,Xz as dt,l_ as Ca,XA as Aa,XB as Ea,I4 as _e,Gx as xe,XC as ut,G6 as ta,XD as pt,LV as mt,Ga as bt,Gg as Da,XE as Se,XF as Me,Hw as Oe,XG as ht,XH as gt,Hz as Ne,XI as St,HM as yt,XJ as Ta,Hg as na,Hl as ft,XK as It,XL as ce,XM as ja,XN as Pa,XO as Fa,gU as vt,GC as $e,cG as Ra,XP as kt,gg as wt,XQ as Bt,XR as xt,dY as Va,dX as $a,XS as ze,XT as Ct,XU as At,W4 as Xe,XV as Et,W5 as ie,W6 as He,XW as Dt,XX as Tt,XY as jt,Hn as ia,Hk as Pt,XZ as Ft,X_ as Rt,X$ as Vt,H6 as $t,Y0 as Lt,Y1 as Gt,cu as La,d9 as Ga,m9 as Ut,bO as _t,br as Ua,bP as _a,Fl as Mt,Y2 as Ot,LI as Nt,LO as zt,Bx as Xt,Hx as Ht,Ib as Zt,mm as ge,Y3 as Wt,Y4 as Ma,mQ as Yt,mg as Oa,mB as Na,mA as oa,bE as pe,bN as qt,Y5 as Jt,Y6 as ye,kM as Kt,Y7 as la,Y8 as Qt,kQ as en,l9 as an,Ip as tn,Y9 as nn,mJ as on,If as ln,Ya as sa,Ij as sn,Io as rn,Im as cn,Id as dn,Yb as za,Gr as un,Yc as pn,Yd as mn,gF as bn,gE as hn,gD as gn,mp as Sn,mH as ra,mS as yn,ul as fn,my as In,Ih as vn,kW as kn,mX as wn,Ye as Bn,kO as xn,uc as Cn,Yf as An,Hc as En,bK as Dn,bt as Tn,Tw as jn,dc as Pn,db as Fn,cF as Rn,cM as Vn}from"./zeni-epic-state-BnWuRnd6.js";import{E as ue,z as L,V as fe,as as Ze,M as oe,y as g,bi as We,a7 as se,N as A,a8 as Ee,j,bu as $n,a4 as H,av as Ye,k as T,a1 as Ie,bv as ca,bw as da,bx as Ln,az as Gn,af as Un,aS as _n,ab as Xa,G as De,ag as qe,by as Mn,ae as Ha,bz as On,aq as Nn,U as Za,w as zn,bA as Xn,bB as Hn,bC as Zn,bD as Wn,bE as Yn,bF as qn,bG as Jn,bH as Kn,bI as Qn,K as ei,bJ as ai,br as ti,bK as ni,ai as ii,bL as oi,f as li}from"./index-TGDDWC5W.js";import{n as U,S as si}from"./mui-pCWXyHva.js";import{A as ua}from"./AddressScreen-CVh8BPrB.js";import{g as ne,a as Te,i as Wa,V as Je,b as Ke,c as ri,v as ci,d as di,A as me,D as be}from"./DomesticWireDetailScreen-B_RnpssZ.js";import{a as f}from"./sentry-CBGLGt6C.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-zn3r_NtN.js";import{u as Ya}from"./useInitialThreadRequest-BREcdNRj.js";import{u as ui}from"./BusinessVerificationPageScreen-DahCdFps.js";import Ce from"./NotFoundScreen-CIYbJrC7.js";import{D as pi}from"./DrawerScreen-C1TXRcww.js";import{M as qa}from"./MobileAppDrawer-C1pxYQQs.js";import{F as Ja}from"./FeaturePreviewScreen-DwYCYDOn.js";import{S as je}from"./SetupPagesScreen-f1N9Cz0q.js";import{B as mi}from"./BillPayApprovalRoutes-C2jlHQ7M.js";import{F as bi}from"./ScreenRoutes-BcwURyWe.js";import"./recharts-DITYpsYw.js";import"./analytics-BraOqOO1.js";import"./plaid-CQ3219ms.js";import"./dnd-BoQ5C62n.js";import"./stripe-cKAAJElX.js";import"./lottie-NpyKchhe.js";import"./lexical-DXRGtjuN.js";import"./pdf-OKLicNBW.js";import"./utils-SKzA7CXw.js";import"./routePaths-3cJbMI-5.js";import"./InboxNotificationsProvider-Bce8xb55.js";import"./useTaskManagerAccess-CxGYFCdI.js";import"./analyticsHelper-BM5BTTUi.js";import"./ReimbursementApprovalRuleDetailScreen-D2GP0etd.js";import"./getLocaleForTenant-BEhIaWEh.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]="4bea5651-4a55-4a13-9d4b-a4ad4ab36378",e._sentryDebugIdIdentifier="sentry-dbid-4bea5651-4a55-4a13-9d4b-a4ad4ab36378")}catch{}})();const hi=Q((function(e,a){const l=Ue(e,a.billId),n=L.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:c??""},u=H(a.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;Ae(n)||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let i=!1,d=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:S,isMarkAsPaidBtnVisible:h}=st(l.billActivities,rt(a.currentTenant),n);i=S,d=h}const p=ct(a.currentTenant?.userRole??[]),m=l.transactionDetails!=null&&dt(l.transactionDetails,p,n);return{billDetails:l,isAccountingClassesEnabled:Ca(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${Ye}/transaction_attachment`,signedInUser:n,showBackButton:o,isAdmin:p,isRealTimeApprovalEnabled:a.isRealTimeApprovalEnabled,showApproveRejectBtns:i,showMarkAsPaidButtonToApprover:d,hasZeniAssistAccess:a.hasZeniAssistAccess,analytics:j,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=T(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=T(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(Se({}))},deleteBill:o=>{j.trackBillPayDeleteBill(l,o),e(Da(l))},cancelAndDeleteBill:(o,s)=>{s===!0?j.trackBillPayCancelAndDeleteBill(l,o):j.trackBillPayCancelBill(l),e(bt(l,s))},onSaveRealTimeApprovals:o=>{e(mt(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(pt({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(ta(l,o.type,"")):e(ta(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=Te(u,o,s),d=T(c.state?.pathnameStackToGoBack,c.pathname);r(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=H(a.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ne(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=T(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ut({billId:a.billId}))},onRefundPaymentClick:()=>{e(xe(a.billId,"refund"))},saveBillDetails:(o,s,i)=>{o&&e(Ea({data:i,billId:l})),e(_e(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(Aa({billId:l}))}}}))($n);function gi(){const e=J(),a=le(),l=K(),{billId:n}=ae(),c=ue(),r=L.getSignedInUser(),u=fe(),o=k((X=>Z(X))),s=k((X=>Ue(X,n??""))),i=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Ya(o?.companyId,{clearParams:s.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Qe({mobileExploreReferrer:"Bill Details"});Ze({isDataReady:s.fetchState==="Completed"});const S=o?.userRole!=null&&ka(o?.userRole),h=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!S,[b,I]=f.useState(!1),[E,x]=f.useState(!1),[C,_]=f.useState(!1),{useFeatureGate:D,useDynamicConfig:B}=oe(),{isFeatureEnabled:O}=D(g.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:V}=D(g.isBillPayCommentingEnabled),{isFeatureEnabled:W}=D(g.isBillPayDetectInsufficientFundsEnabled),{configValue:N}=B(We.zeniAssistConfig),v=ot(o),z=wa(o.userRole),M=h&&de(u?.loggedInUserRoleMap),$=N.user_ids!=null&&r?.userId!=null&&N.user_ids.includes(r?.userId),{isFeatureEnabled:Y}=D(g.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:q}=D(g.billPaySetupShowInternationalPaymentByWise);if(f.useEffect((()=>{O&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&v===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(z||M||s.allApprovers.find((X=>X.user.userId===r?.userId))!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))}),[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,z,M,o.isZeni,v,r]),f.useEffect((()=>{n!=null&&a(Ba(n))}),[n]),f.useEffect((()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(I(!0),a(xa(n??"",O,$,!1)))}),[b,s,n,a]),f.useEffect((()=>{E||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),a(Ve(!1,O,$,q,n)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&a(lt()))}),[E,s,n,a,O,$,q]),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(ee,{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(Ee,{analytics:j,onLoad:X=>(G=>{n!=null&&G.trackBillPayBillDetails(n,s.isRecurring)})(X)}),t.jsx(hi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:O,location:l,navigate:e,isBillPayCommentingEnabled:V,isRealTimeApprovalEnabled:C,currentTenant:o,billId:n??"",isInternationalPaymentShaVsOurEnabled:Y,hasZeniAssistAccess:$,isDetectInsufficientFundsEnabled:W,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const Le=De.getLocalizedStrings().spendManagement.billPay.billDetails,pa=De.getLocalizedStrings().common,Si={containerWidth:new Xa(100,58)},ma=Q((function(e,a){const l=L.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=a.showActionButtons,u=r&&a.file==null;return{uploadInvoiceEndPoint:`${Ha.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:a.billId,file:a.file,showAutofill:a.showAutofill,analytics:j,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=L.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(yt({fetchState:{fetchState:n,error:void 0},billId:a.billId}))},onSkipAutofill:n=>{j?.trackBillPaySkipAutofill(),e(Oe(n))},onDeleteClick:()=>{e(St({billId:a.billId})),j?.trackInvoiceActionClick(a.billStage??"","delete",l?.userEmail??"",null)}}}))(_n);function w({appContent:e}){const a=le(),l=J(),{billId:n}=ae(),c=K(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=Ie(),s=ue(),i=L.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=oe(),{isFeatureEnabled:m}=d(g.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:S}=d(g.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:h}=d(g.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(g.billPaySetupShowInternationalPaymentByWise),{configValue:I}=p(We.zeniAssistConfig),E=I.user_ids!=null&&i?.userId!=null&&I.user_ids.includes(i?.userId),x=k((F=>Z(F)));ui();const[C,_]=f.useState(!1),[D,B]=f.useState(!1),[O,V]=f.useState(!1),[W,N]=f.useState(),v=k((F=>Me(F,m,h,n)));let z=v.fetchState,M=v.file,$=v.showAutofill;const Y=k((F=>Ue(F,n??"")));u===!1&&(z=Y.fetchState,M=Y.transactionDetails?.attachments?.[0],$=!1);const q=v.billPayInfo!=null&&v.billPayInfo.stage.code==="pending_approval"?v.billPayInfo.billStatus.code:v.billStage;f.useEffect((()=>{n==null&&a(Oe(!0))}),[n,a]),f.useEffect((()=>{z==="Not-Started"&&(u&&D?B(!1):!u&&C&&_(!1))}),[n]),f.useEffect((()=>{C||n==null||u||(_(!0),a(xa(n,S,E,!1)),D||(B(!0),a(Ve(!1,S,E,b,n)))),u&&!D&&(B(!0),a(Ve(!1,S,E,b,n)))}),[C,D,u,n,a,S,E,b]);const X={onOkClick:()=>{if(V(!1),!W)return;const F=M!=null?"replace":"upload";j?.trackInvoiceActionClick(q??"",F,i?.userEmail??"","yes"),a(gt({replaceBillData:!0,billId:n})),a(Ne(W,m,n))},onCancelClick:()=>{if(V(!1),!W)return;const F=M!=null?"replace":"upload";j?.trackInvoiceActionClick(q??"",F,i?.userEmail??"","no"),a(ht({file:W,billId:n}))}},G=f.useCallback((()=>{const F=H(c.state?.pathnameStackToGoBack),ve=F.poppedPathname??ne(x.tenantEmailDomain);a(Se({billId:n})),l(ve,{state:{pathnameStackToGoBack:F.newStack}})}),[c.state,x.tenantEmailDomain,n,a,l]);if(i==null)throw Error("Can't access address page without signing in...");if(z==="Error"||Y.fetchState==="Error")return t.jsx(Ce,{});if(z!="Completed")return n==null&&o!=="small"?t.jsx(ca,{fallback:G,children:t.jsxs(Pe,{windowSize:o,children:[t.jsx(ha,{}),t.jsx(Fe,{}),t.jsx(ma,{backgroundColor:s.colors.grey4,billId:n,file:M,showAutofill:!0,uploadStatus:v.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:V,setPayload:N,showActionButtons:!1,isInitialEdit:!!v.isInitialEdit,billStage:q}),t.jsx(Re,{windowSize:o,children:t.jsx(da,{isNewBill:!0})})]})}):t.jsxs(Pe,{windowSize:o,children:[o==="small"||$?null:t.jsx(ba,{children:t.jsx(Ka,{onClick:G,"data-testid":"nav-bar-back-click"})}),o!=="small"?t.jsx(Fe,{}):null,t.jsx(Ln,{}),t.jsx(Re,{windowSize:o,children:t.jsx(da,{isNewBill:n==null})})]});{const F=v.billPayInfo!=null&&v.billPayInfo.stage.code==="pending_approval"?v.billPayInfo.billStatus.code:v.billStage;return t.jsx(ca,{fallback:G,children:t.jsxs(Pe,{windowSize:o,children:[$&&o!=="small"?t.jsx(ha,{}):null,O?t.jsx(Gn,{titleComponent:t.jsx(Bi,{children:Le.overwriteTitle}),descriptionComponent:t.jsx(xi,{children:Le.overwriteDescription}),primaryButtonText:pa.yes,secondaryButtonText:pa.no,action:X,isEditPopup:!0}):null,o==="small"||$?null:t.jsx(ba,{children:t.jsx(yi,{})}),o!=="small"?t.jsx(Fe,{}):null,t.jsx(ma,{backgroundColor:s.colors.grey4,billId:n,file:M,showAutofill:$,uploadStatus:v.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:fi(u,Y,v),setShowConfirmationPopup:V,setPayload:N,showActionButtons:Ii(u,v),isInitialEdit:!!v.isInitialEdit,billStage:F}),t.jsx(Re,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Mn();return t.jsx(Ka,{onClick:e,"data-testid":"nav-bar-back-click"})}function fi(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(vi,{children:[t.jsx(ki,{children:`${Le.recurringBill.recurringCycle}
2
- ${n}/${c}`}),t.jsx(wi,{})]}):void 0}function Ii(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 ba=U.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
- `,vi=U.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
- `,ki=U(qe.StandardMedium)``,wi=U((e=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.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"}),f.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=U((e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.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
- `,Pe=U.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
- `,Fe=U.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
- `,ha=U.div`
55
- position: fixed;
56
- top: 0;
57
- left: 0;
58
- right: 0;
59
- bottom: 0;
60
- background-color: ${Un.overlayBackgroundBlack};
61
- z-index: 5;
62
- `,Re=U.div`
63
- display: flex;
64
- flex-direction: column;
65
- width: ${e=>`${Si.containerWidth.value(e.windowSize)}%`};
66
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
67
- `,Bi=U(qe.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=U(qe.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
- `,Ci=Q((function(e,a){return{billsReviewView:Ta(e),analytics:a.analytics}}),(function(e,a){return{onCloseOverlay:()=>{a.navigate(`/${a.tenantEmailDomain}/bills`),e(ce())},onCloseReviewItem:l=>{e(It(l))},onProceedForBulkActionClick:(l,n)=>{switch(l){case"send_for_approval":e(ft());break;case"approve":case"review":e(na("approved",n??""));break;case"reject":e(na("rejected",n??""))}}}}))(On);function Ai({tenantEmailDomain:e}){const a=J(),l=k((c=>c.billsBulkActionViewState.bulkSubmissionFetchState.fetchState)),{billsForReview:n}=k((c=>Ta(c)));return f.useEffect((()=>{l!=="Completed"&&n.length!==0||a(`/${e}/bills`)}),[l,n.length,e]),t.jsx(Ci,{navigate:a,analytics:j,tenantEmailDomain:e})}const te=At(),Qa="bulk-operation-update",Ge="bill-approval-rule-update",{common:we}=De.getLocalizedStrings(),Ei=U.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=Q((function(e,a){const l=L.getSignedInUser(),n=Ae(l),c=Fa(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=Xe(e,"common"),s=e.tenantState.currentTenantId,i=Z(e),d=i?.companyName??"",p={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},m=e.billListState.downloadUIState.downloadState,S=c.fetchState,h=Et(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:j,botEmail:c.billPayBotEmail,searchText:c.searchText,filters:c.filters,vendorSearchAutoCompleteData:{autoCompleteText:u,entityAutoCompleteView:o},downloadParams:{authParams:p,companyName:d,timePeriod:te,spendManagementEndPoint:`${Ye}/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(ja(o))},onSubtabChange:o=>{e(ce()),e(Pa(o))},onTransactionClick:(o,s)=>{const i=Te(u,o,s),d=T(c.state?.pathnameStackToGoBack,c.pathname);l(i,{state:{pathnameStackToGoBack:d}})},onClickSetupIcon:()=>{const o=ji(u),s=T(c.state?.pathnameStackToGoBack,c.pathname);l(o,{state:{pathnameStackToGoBack:s}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=a.currentTenant;j?.trackBillPayNewBill();const s=`/${o}/bill/new`,i=T(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i}})},onSearchTextChanged:o=>{e(Lt(o))},onReloadTransactions:()=>{e($e(r,!0,a.isShowDeletedBillsEnabled,a.isInternationalWireEnabled)),e($t(n.companyId,!0))},onNavigateToSettings:()=>{l("../bills/setup")},onBackClick:()=>{l("../",{relative:"path"})},onFiltersChange:o=>{e(Vt({filters:o})),o.categories.every((s=>s.field!=null&&s.values?.length!==0))&&j.trackSpendManagmentFilterChange("bill_pay",o.categories.map((s=>`${s.field}-${JSON.stringify(s.values)}`)))},updateDownloadStateHandler:o=>{o==="In-Progress"&&j.trackSpendManagementDownloadClick("bill_pay"),e(Rt({uiState:{downloadState:o}}))},updateBulkActionList:o=>{e(Ft(o))},removeAllTransactionsFromBulkActionList:()=>{e(ce())},onProceedForBulkActionClick:(o,s)=>{switch(o){case"delete":case"cancel":e(Pt(o,s??""));break;case"send_for_approval":e(ia("send_for_approval")),a.navigate("./bulk-review");break;case"approve":e(ia("approve")),a.navigate("./bulk-review");break;case"review":e(jt()),a.navigate("./bulk-review")}},onBillPayApprovalRulesEventReceived:o=>{o.endsWith(Ge)&&e(Tt(!1))},onEventReceived:o=>{o===Qa&&e(Dt())},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(He({searchString:o,entityType:"vendor",searchOrigin:"common"})):o.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}}}}))(zn(Xn));function Ti(){const e=J(),a=le(),l=K(),n=Ie(),c=l.state,r=fe(),[u,o]=f.useState(!1),[s,i]=f.useState(null),d=nt("/:tenantEmailDomain/bills/bulk-review")!=null;f.useEffect((()=>(c?.tab!=null&&c?.subTab!=null&&(a(ja(c?.tab)),a(Pa(c?.subTab))),()=>{a(ce())})),[]);const p=L.getSignedInUser(),m=k((P=>Z(P))),{areTenantIdsInSync:S}=Nn(),[h,b]=f.useState(!1),{useFeatureGate:I}=oe(),{isFeatureEnabled:E}=I(g.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:x}=I(g.isBillPayCommentingEnabled),{isFeatureEnabled:C}=I(g.isReimbursementCommentingEnabled),{isFeatureEnabled:_}=I(g.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:D}=I(g.isBillPayBulkActionEnabled),{isFeatureEnabled:B}=I(g.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:O}=I(g.isBillPayDetectInsufficientFundsEnabled),V=k((P=>Fa(P,te,D,p?.userId))),{isFeatureEnabled:W}=I(g.isDebitCardFeatureEnabled),N=V.fetchState,{isAiCfoAccessEnabled:v,onAskAiCfoClick:z}=Qe({mobileExploreReferrer:"Bills List"});Ze({isDataReady:N==="Completed"});const M=!!m.companyBillPayInfo?.info?.isBillPayTOSAccepted,$=!!m.companyBillPayInfo?.info?.isBillPayEnabled,Y=k((P=>vt(P.companyState,m.companyId))),q=Y?.company.featuresActivationInfo.connectedAccountProvider;if(f.useEffect((()=>{!h&&$&&S&&(b(!0),a($e(te,!0,E,B)))}),[h,te,S,a]),p==null)throw Error("Can't access address page without signing in...");const X=(P,re)=>{a(Ct({uiState:{sortKey:P,sortOrder:re},period:te}))},G=Ra(r?.loggedInUserRoleMap),F=de(r?.loggedInUserRoleMap),ve=P=>{o(P)},{billsProcessed:ke,billsProcessing:ea}=k((P=>kt(P)));f.useEffect((()=>{ke===ea&&s!=null&&(a(wt({messageSection:"bill_pay_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_bill_",variableValue:ke>1?we.headers.bills:we.texts.bill2},{variableName:"_has_",variableValue:ke>1?we.texts.have:we.texts.has},{variableName:"_action_",variableValue:Bt(s)}]})),a(xt()),setTimeout((()=>{a($e(te,!0,E,!0,B))}),3e3),i(null))}),[ke,ea]);const et={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${Qa}`,`private-encrypted-${m.companyId}.${Ge}`]:[],eventCallback:(P,re,aa)=>{P.endsWith(Ge)?aa.onBillPayApprovalRulesEventReceived?.(P):re?.entity_type==="bill"&&(i(re.operation_type),aa.onEventReceived(P))}},at=Va(W,m),tt=$a(m);return l.pathname.endsWith("/bills/")||l.pathname.endsWith("/bills")||l.pathname.endsWith("/bills/bulk-review")?at===!0||tt===!0?t.jsx(Ja,{}):$?t.jsxs(t.Fragment,{children:[N==="Completed"?t.jsx(Ee,{analytics:j,onLoad:P=>(re=>re.trackPageLoaded(Za.Event.billPayHome))(P)}):null,t.jsxs(Ei,{windowSize:n,children:[t.jsx(qa,{isAppContentDrawerOpen:u,handleDrawerToggle:ve}),t.jsx(pi,{isOpen:d,drawerLeftMargin:new Xa(0,0,300,600),onClose:()=>{e(`/${m.tenantEmailDomain}/bills`),a(ce())},children:t.jsx(Pi,{onClick:P=>P.stopPropagation(),children:t.jsx(Ai,{tenantEmailDomain:m.tenantEmailDomain})})}),t.jsx(Di,{location:l,navigate:e,currentTenant:m,entity:"bill_pay",isBillPayCommentingEnabled:x,isReimbursementCommentingEnabled:C,period:te,isAdmin:!1,uiState:V.uiState,onColumnSortConfigChanged:X,isUserHasOnlyBillpayAccess:G,isShowDeletedBillsEnabled:E,isShowDeletedReimbursementEnabled:_,isBulkActionEnabled:D,roleMap:r?.loggedInUserRoleMap,onClickMenuIcon:()=>{ve(!0)},isDownloadEnabled:V.isDownloadEnabled,connectedAccountProvider:q,bulkSubmissionLimit:V.billBulkSubmissionLimit,bulkSubmissionFetchState:V.billListBulkActionInfo.bulkSubmissionFetchState,isRecurringBillInBulkActionList:V.billListBulkActionInfo.isRecurringBillInBulkActionList,isInternationalWireEnabled:B,isDetectInsufficientFundsEnabled:O,isAiCfoAccessEnabled:v,onAskAiCfoClick:z,...et})]})]}):M===!0&&F===!0?t.jsx(ee,{to:"../setup"}):r!=null&&ze(m,r.loggedInUserRoleMap)?t.jsx(ee,{to:"../promo"}):t.jsx(se,{fetchState:N}):t.jsx(Ce,{})}const ji=e=>`/${e}/bills/setup`,Pi=U(si)`
89
- display: flex;
90
- min-height: 100%;
91
- flex-direction: column;
92
- `,{common:{currency:he},spendManagement:{billPay:{billDetails:Fi}},appName:Ri}=De.getLocalizedStrings(),Vi=Q((function(e,a){const l=L.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=H(a.location.state?.pathnameStackToGoBack);let u=!0;r.poppedPathname?.includes("bills")===!0&&(u=!1);const o=e.entityAutoCompleteState.autoCompleteText.common,s=Xe(e,"common");let i=`${l?.firstName} ${l?.lastName}`;const d=Ae(l);a.billId!=null&&a.billDetailsView!=null&&(i=`${a.billDetailsView.createdBy?.firstName??Ri} ${a.billDetailsView.createdBy?.lastName??""}`),d||!a.billDetailsView.createdBy?.email?.includes("zeni.ai")||(i="Zeni");const p=a.billDetailsView.editBillInitialDetails?.totalAmount?.amount,m=_t(a.billDetailsView.paymentDetailsSection?.paymentType?.method),S=a.currentTenant.createTime,h=Ua(),b=a.sameDayAchDisablementConfig.newTenantTenureLimitMonths,I=S.add(b,"month").isAfter(h),E=!!(a.billDetailsView.billStage==="draft"&&m&&p!=null&&p>0)&&!_a(p,a.billDetailsView.approvalRules.allApprovalRules,l,a.billDetailsView.vendor?.id,a.billDetailsView.classId),x=Z(e);return{billDetails:a.billDetailsView,isAccountingClassesEnabled:Ca(e),billId:a.billId,createdBy:i,createTime:a.billDetailsView?.createTime,authParams:c,transactionAttachmentEndpoint:`${Ye}/transaction_attachment`,analytics:j,showBackButton:u,isAdmin:a.isBillPayAdmin,isSuperAdmin:a.isSuperAdmin,connectedAccountProvider:x.company?.featuresActivationInfo.connectedAccountProvider??"",customerSearchAutoCompleteData:{autoCompleteText:o,entityAutoCompleteView:s},showMarkAsPaidInfo:E,isZeniUser:d,isNewUser:I,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(oa(i));const d=Sa(s,i,l),p=T(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},chooseNewVendor:i=>{const d=i??a.billDetailsView.addBillAutoFields.tentativeVendorName;d!=null&&e(Oa(d,!1)),e(Na({localData:{vendorName:i??a.billDetailsView.addBillAutoFields.tentativeVendorName}})),e(oa());const p=Sa(s,void 0,l),m=T(r.state?.pathnameStackToGoBack,r.pathname);u(p,{state:{pathnameStackToGoBack:m}})},onInvoiceUpload:i=>{i!=null&&e(Ne(i,a.isVendorRecommendationEnabled))},updateShowAutofill:i=>{e(Oe(i))},onSaveChangesToLocalStore:(i,d,p,m,S)=>{const h=Ui(a.billDetailsView,{...i,paymentDetails:{...i?.paymentDetails,paymentDate:S}},p,d,a.isInternationalPaymentShaVsOurEnabled,m,a.vendor);e(Yt({billDetailLocalData:h,billId:l}))},saveBillDetails:()=>{e(_e("draft",!1,!1,l)),e(ie("common"))},updateBillDetailSaveBillCode:()=>{e(Ma("draft"))},reviewBillDetails:()=>{const i=$i(s,l),d=T(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d,message:"coming_from_edit_page"}})},discardBillDetailsFromLocalStore:({billId:i})=>{e(Se({billId:i}))},clearBillPayReviewLocalState:()=>e(Wt()),onClickDismiss:()=>{const i=ne(s),d=T(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d}})},onClickDiscard:()=>{const i=ne(s),d=T(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=T(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})}},redirectToACHScreen:i=>{e(ge(!1,i));const d=Li(s,i,l),p=T(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToWireScreen:i=>{e(ge(!1,i));const d=Gi(s,i,l),p=T(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToInternationalScreen:i=>{e(ge(!1,i));const d=Wa(s,l,i),p=T(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToBillsScreen:()=>{const i=ne(s),d=T(r.state?.pathnameStackToGoBack,r.pathname);e(Se({})),u(i,{state:{pathnameStackToGoBack:d}})},redirectToBillDetailPage:()=>{a.navigate("../")},deleteBill:()=>{l!=null&&e(Da(l))},onAttachmentClick:(i,d)=>{const p=Te(s,i,d);window.open(`${p}`,"_blank")},onBackClick:()=>{const i=H(a.location.state?.pathnameStackToGoBack),d=i.poppedPathname??ne(s);u(d,{state:{pathnameStackToGoBack:i.newStack}})},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,d)=>{i.trim().length>=2?e(He({searchString:i,entityType:d,searchOrigin:"common"})):i.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}},addVendorContactEmail(i,d){e(Zt(i,d,l))},onWiseVerifyClick:()=>{let i="";i=Yn()?"https://sandbox.transferwise.tech":"https://wise.com";const d=`${i}/login`;window.open(d,"_blank")},onVendorSelected:i=>{e(Ht(!0,i,l))},onInternationalWireVerifyClick:()=>{window.open(`/${s}/bills/international-wire`)},onFetchLinkTokenClick:(i,d)=>{e(Xt("bill_pay_detail",i,d))},onEstablishConnectionClick:i=>{e(zt(i,n,"bill_pay_detail","bill_pay"))},onUpdatePaymentAccountStatus:(i,d,p)=>{e(Nt(i,d,"bill_pay","bill_pay_detail",p))},onEstablishConnectionSuccess:()=>{e(Mt("bill_pay","bill_pay_detail")),e(Ot({billId:l,withdrawFromAccountId:o.newAddedBillPaymentAccountId,withdrawFromList:o.withdrawFromList}))}}}))(Hn);function ga(){const e=J(),a=K(),l=le(),{billId:n,tenantEmailDomain:c}=ae(),{useFeatureGate:r,useDynamicConfig:u}=oe(),{isFeatureEnabled:o,isFeatureGateLoading:s}=r(g.isVendorMagicLinkFeatureEnabled),{isFeatureEnabled:i}=r(g.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:d}=r(g.isBillPayCommentingEnabled),{isFeatureEnabled:p}=r(g.isBillPayLocalCurrencyFeatureEnabled),{isFeatureEnabled:m}=r(g.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:S}=r(g.isRecurringBillsFeatureEnabled),{isFeatureEnabled:h}=r(g.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=r(g.isShaDisabled),{isFeatureEnabled:I}=r(g.isOurDisabled),{isFeatureEnabled:E}=r(g.isBillPayDetectInsufficientFundsEnabled),{configValue:x}=u(We.sameDayAchDisablementConfig),C=Gt(x),_=L.getSignedInUser(),D=k((G=>Z(G))),B=k((G=>Me(G,m,h,n))),O=Ya(D?.companyId,{clearParams:B.fetchState==="Completed"}),{isAiCfoAccessEnabled:V,onAskAiCfoClick:W}=Qe({mobileExploreReferrer:"Bill Details"});Ze({isDataReady:B.fetchState==="Completed"});const N=D.companyId??L.getSignedInUserTenant(c)?.companyId,v=fe(),z=La(v?.loggedInUserRoleMap),M=Ga(v?.loggedInUserRoleMap),$=de(v?.loggedInUserRoleMap),Y=wa(D.userRole);if(f.useEffect((()=>{n!=null&&l(Ba(n))}),[n]),_==null)throw Error("Can't access address page without signing in...");const q=k((G=>Ut(G.accountState,G.accountListState,"billPayAccountList"))),X={pathname:"../",search:a.search};return B.isDeleted===!0||B.billStage=="paid"||B.fetchState=="Not-Started"?t.jsx(ee,{to:X}):B.deleteStatus.fetchState==="In-Progress"||s?t.jsx(se,{fetchState:B.deleteStatus.fetchState}):t.jsxs(t.Fragment,{children:[t.jsx(Ee,{analytics:j,onLoad:G=>(F=>{n!=null&&B.deleteStatus.fetchState!=="Completed"&&F.trackBillPayEditBill(n,B.isRecurring)})(G)}),t.jsx(Vi,{initialOpenThreadRequest:O??void 0,location:a,navigate:e,currentTenant:D,billId:n,companyId:N,billDetailsView:B,isMagicLinkEnabled:o,isVendorRecommendationEnabled:m,isLocalCurrencyEnabled:p,uncategorizedAccounts:q,isInternationalPaymentShaVsOurEnabled:i,vendor:B.vendor,isBillPayCommentingEnabled:d,isShaDisabled:b,isOurDisabled:I,isRecurringBillsFeatureEnabled:S,hasZeniAccountsAdminAccess:z,isZeniAccountsUser:M,isBillPayAdmin:$,isSuperAdmin:Y,isDetectInsufficientFundsEnabled:E,sameDayAchDisablementConfig:C,isAiCfoAccessEnabled:V,onAskAiCfoClick:W})]})}const Sa=(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},$i=(e,a)=>{let l=`/${e}/bill/`;return l=a===void 0?l.concat("new/review"):l.concat(`${a}/edit/review`),l},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/ach`),n},Gi=(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",Ui=(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()):Ua(),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(qt)&&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===Fi.recurringBill.paymentTypeOptions[1],m={isActive:e.recurringConfig?.isActive??!1,currentInstance:e.recurringConfig?.currentInstance,isApprovalRequired:a[R]?.recurringPaymentDetails?.requireApproval?.selectedOption==="all",frequency:Jt(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=_i(e.accountList.accounts,e.classList.classes,e.lineDetailSection,a.lineItems,n,l),h=Object.keys(S).length>0?Zn(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}},_i=(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=Wn(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},Mi=U.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
- `,Oi=Q((function(e,a){const{vendorId:l,billId:n}=a,c=ye(e,l),r=Me(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(an(s))},onSaveHandler:()=>{e(en(a.bankAccountContext,r))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:i}=s;e(Qt({data:i}))},onCancel:()=>{(()=>{const s=H(c.state?.pathnameStackToGoBack),i=s.poppedPathname??ya();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(la())},onAddressClick:s=>{const i=Ke(o,s,l),d=T(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{e(Kt({fetchState:"Not-Started"}));const s=H(a.location.state?.pathnameStackToGoBack),i=s.poppedPathname??ya(0);a.navigate(i,{state:{pathnameStackToGoBack:s.newStack}}),e(la())}}}))(qn);function Ni(){const e=J(),a=K(),l=Ie(),{vendorId:n,billId:c}=ae(),{useFeatureGate:r}=oe(),u=ue(),o=L.getSignedInUser(),s=k((h=>Z(h))),i=H(a.state?.pathnameStackToGoBack),d=i.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail",p=k((h=>ye(h,n))),{isFeatureEnabled:m}=r(g.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:S}=r(g.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(Mi,{windowSize:l,children:[t.jsx(Je,{vendorId:n,billId:c}),t.jsx(Oi,{location:a,navigate:e,billId:c,vendorId:n,currentTenant:s,bankAccountContext:d,isVendorRecommendationEnabled:m,isZeniAccountsFeatureEnabled:S})]})}const ya=(e=2)=>{let a="../";for(let l=0;l<e;l++)a=`${a}../`;return a},zi=U.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
- `,Xi=Q((function(e,a){const{vendorId:l}=a,n=ye(e,l),c=l!=null?n.editVendorState?.vendorDetailLocalData?.vendorType:n.newVendorState?.vendorDetailLocalData?.vendorType,r=nn(e,c||"international_business",a.billId),u=n.editVendorState??n.newVendorState,o=a.billId!=null?e.editBillDetailViewState.editBillStateById[on(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(dn(a.bankAccountContext,r))},onAccountDetailsUpdated:(s,i,d,p)=>{e(rn(s)),p&&e(cn(i,d))},onCurrencyUpdated:(s,i,d)=>{e(sn(s,i,d,!1))},onCancel:()=>{(()=>{const s=H(c.state?.pathnameStackToGoBack),i=s.poppedPathname??fa();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(sa())},onAddressClick:s=>{const i=Ke(o,s,l),d=T(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{e(ln({fetchState:"Not-Started"}));const s=H(a.location.state?.pathnameStackToGoBack),i=s.poppedPathname??fa(0);a.navigate(i,{state:{pathnameStackToGoBack:s.newStack}}),e(sa())}}}))(Jn);function Hi(){const e=J(),a=K(),l=Ie(),{vendorId:n,billId:c}=ae(),r=le(),u=ue(),o=L.getSignedInUser(),s=k((C=>Z(C))),i=H(a.state?.pathnameStackToGoBack),[d,p]=f.useState(!1),m=k((C=>C.vendorViewState.newVendorState.fetchStatus.fetchState)),S=k((C=>n!=null?C.vendorViewState.editVendorStateById[n]?.fetchStatus.fetchState??"Not-Started":"Not-Started")),h=n!==void 0?S:m;f.useEffect((()=>{d===!1&&h==="Not-Started"&&n!=null&&(r(ge(!1,n)),p(!0))}),[d,h,n]);const[b,I]=f.useState(!1);f.useEffect((()=>{b||h==="In-Progress"||(I(!0),r(tn(c,n)))}),[b,h,r]);const E=i.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail",x=k((C=>ye(C,n)));if(o==null)throw Error("Can't access international wire page without signing in...");return E==="billDetail"&&x.editVendorState?.saveStatus.fetchState==="In-Progress"?t.jsx(se,{fetchState:x.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:u.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${u.colors.dropShadowNormal}`}}):t.jsxs(zi,{windowSize:l,children:[t.jsx(Je,{vendorId:n,billId:c}),t.jsx(Xi,{location:a,navigate:e,billId:c,vendorId:n,currentTenant:s,bankAccountContext:E})]})}const fa=(e=2)=>{let a="../";for(let l=0;l<e;l++)a=`${a}../`;return a},Ia=U.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
- `,Zi=Q((function(e,a){const l=L.getSignedInUser(),n=za(e,a.billId),c=pn(e),r=Ae(l),u=n.totalAmount.amount,o=n.billPayInfo?.stage.code!=="scheduled"&&c.allApprovalRules.length>0&&!_a(u,c.allApprovalRules,l,n.vendor?.id,n.classId);return{billDetails:n,billId:a.billId,billpayApprovalView:c,analytics:j,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=T(l.state?.pathnameStackToGoBack,l.pathname);r(o,{state:{pathnameStackToGoBack:s}})},discardBillDetailsFromLocalStore:()=>{e(Se({}))},saveBillDetails:(o,s)=>{o&&e(Ea({billId:n,data:s})),e(_e(o?"paid":"pending_approval",o,!1,n))},discardOutsideZeniPaymentData:()=>{e(Aa({billId:n}))},updateBillDetailSaveBillCode:()=>{e(Ma("pending_approval"))},onClickEdit:()=>{a.navigate("../",{relative:"path"})},onAttachmentClick:(o,s)=>{const i=Te(u,o,s);window.open(`${i}`,"_blank")},retryPayment:()=>{a.billId!=null&&e(xe(a.billId,"retry"))}}}))(Qn);function va(){const e=J(),a=le(),l=K(),{billId:n}=ae(),{useFeatureGate:c}=oe(),{isFeatureEnabled:r}=c(g.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:u}=c(g.isBillPayDetectInsufficientFundsEnabled),o=Ie(),s=L.getSignedInUser(),{isFeatureEnabled:i}=c(g.isBillPayLocalCurrencyFeatureEnabled),{isFeatureEnabled:d}=c(g.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:p}=c(g.isBillPayCommentingEnabled),m=H(l.state?.pathnameStackToGoBack),{poppedPathname:S}=m,{isFeatureEnabled:h}=c(g.isRecurringBillsFeatureEnabled),b=k((x=>Z(x))),I=k((x=>za(x,n))),E=I.fetchState??"Not-Started";if(f.useEffect((()=>(window.onbeforeunload=function(){return e(l,{state:{message:""}}),!0},()=>{window.onbeforeunload=null})),[e]),f.useEffect((()=>{l.state?.message!=="coming_from_edit_page"&&e(`../${n}`)}),[]),f.useEffect((()=>{const x=I.vendor?.name,C=I.vendor?.id,_=I.totalAmount.amount,D=I.recipientTotalAmount.amount,B=I.invoiceNumber;x&&C&&a(un(x,C,_,D,B,n))}),[]),S==null)return t.jsx(ee,{to:`../${n}`});if(s==null)throw Error("Can't access address page without signing in...");return E==="In-Progress"?t.jsx(Ia,{windowSize:o,children:t.jsx(Kn,{})}):t.jsx(Ia,{windowSize:o,children:t.jsx(Zi,{location:l,navigate:e,currentTenant:b,billId:n,isBillPayCommentingEnabled:p,isLocalCurrencyEnabled:i,isVendorRecommendationEnabled:d,isInternationalPaymentShaVsOurEnabled:r,isRecurringBillsFeatureEnabled:h,isDetectInsufficientFundsEnabled:u})})}const Wi=Q((function(e,a){const{vendorId:l}=a,n=e.entityAutoCompleteState.autoCompleteText.common,c=Xe(e,"common"),r=l!=null?"edit":"create",u=Z(e),o=L.getSignedInUser(),s=u.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:s??""};return{vendorViewDetails:a.vendorViewDetails,screenType:r,filesEndPoint:`${Ha.fileMicroServiceBaseUrl}`,authParams:i,analytics:j,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(Cn(i))},saveVendorDetailLocalData:i=>{e(Na({vendorId:u,localData:i}))},saveContactsInVendorDetailLocalData:i=>{e(Bn({vendorId:u,contacts:i}))},resetVendorDetailLocalData:()=>{e(ra(u))},updateSelectedVendorForCreate:i=>{e(wn(i))},navigateToBankDetailPage:(i,d)=>{let p;i==="wire"?p=d==="international"?Wa(s,a.billId,u):di(s,a.billId,u):p=ci(s,a.billId,u);const m=T(r.state?.pathnameStackToGoBack,r.pathname);c(p,{state:{pathnameStackToGoBack:m}})},onRemoveBankAccount:(i,d)=>{e(d===!0?vn(i,"vendor",u):kn(i,"vendor",u))},navigateToMailingAddressPage:i=>{const d=Ke(s,i,l),p=T(r.state?.pathnameStackToGoBack,r.pathname);c(d,{state:{pathnameStackToGoBack:p}})},updateFilesEntity:i=>{e(In({files:i}))},onEditFileName:(i,d)=>{e(fn(i,d.split(".")[0]))},handleZeniLogoClick:()=>{o.toggle()},updateSaveFetchState:()=>{u==null&&e(ra(a.vendorViewDetails.newVendorState?.vendorBasic?.id)),e(yn("Not-Started",u))},onVendorSelected:i=>{i!=null&&e(Sn(i,!0))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,d)=>{i.trim().length>=2?e(He({searchString:i,entityType:d,searchOrigin:"common"})):i.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}},onBackClick:()=>{e(ie("common"));const i=H(a.location.state?.pathnameStackToGoBack),d=i.poppedPathname??ri(n.tenantEmailDomain,a.billId);c(d,{state:{pathnameStackToGoBack:i.newStack}})},onGetOtp:i=>{e(gn(i,"BillPayVendor"))},onResendOtp:i=>{e(hn(i,"BillPayVendor"))},onVerifyOtp:(i,d)=>{e(bn(i,d,"BillPayVendor"))},onVerifyOtpSuccess:(i,d,p)=>{e(mn(i,d,p))},onFetchAndUpdateVendorRecommendations:i=>{e(Oa(i,!1))}}}))(ni),Be=()=>{const e=J(),a=le(),l=ei(),n=K(),{billId:c,vendorId:r}=ae(),u=k((b=>Z(b))),{useFeatureGate:o}=oe(),{isFeatureEnabled:s}=o(g.isBillPayLocalCurrencyFeatureEnabled),[i,d]=f.useState(!1),p=k((b=>b.vendorViewState.newVendorState.fetchStatus.fetchState)),m=k((b=>ye(b,r))),S=k((b=>r!==void 0?b.vendorViewState.editVendorStateById[r]?.fetchStatus??"Not-Started":"Not-Started")),h=r!==void 0?S:p;return f.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(ai,{}):h==="Error"?t.jsx(ti,{onGoHome:()=>e("../",{replace:!0}),onReload:()=>window.location.reload()}):t.jsxs(t.Fragment,{children:[t.jsx(Je,{vendorId:r,billId:c}),t.jsx(Wi,{navigate:e,location:n,themeState:l,currentTenant:u,vendorId:r,billId:c,vendorViewDetails:m,isLocalCurrencyEnabled:s})]})},Yi=Q((function(e,a){const{companyId:l}=a;return{billPaySetupView:An(e,l),analytics:j,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(En(l))},onBackClick:()=>{n("../..",{relative:"path"})},onSetupBillPaySuccess:()=>{n("../bills/setup",{relative:"path"})}}}))(oi),qi=()=>{const e=ii(),a=J(),l=K(),{tenantEmailDomain:n}=ae(),[c,r]=f.useState(!1),u=ue(),o=k((h=>Z(h))),s=o.companyId??L.getSignedInUserTenant(n)?.companyId,i=L.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(ee,{to:"../../../bills"}):p===!0&&m===!0?t.jsx(ee,{to:"../../bills/setup"}):p===!1||d!=null&&ze(o,d.loggedInUserRoleMap)?t.jsxs(t.Fragment,{children:[t.jsx(Ee,{analytics:j,onLoad:h=>(b=>b.trackPageLoaded(Za.Event.billPayPromoPage))(h)}),t.jsx(qa,{isAppContentDrawerOpen:c,handleDrawerToggle:S}),t.jsx(Yi,{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 jo(){const e=k(($=>Z($))),a=fe(),l=de(a?.loggedInUserRoleMap),n=ue(),{useFeatureGate:c}=oe(),{isFeatureEnabled:r}=c(g.isBillPayLocalCurrencyFeatureEnabled),u=r===!0?Hi:Ni,{isFeatureEnabled:o}=c(g.isDebitCardFeatureEnabled),s=Va(o,e),i=$a(e),d=K(),p=e?.userRole!=null&&ka(e?.userRole),m=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&de(a?.loggedInUserRoleMap),S=Ra(a?.loggedInUserRoleMap),h=(e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p)&&Dn(a?.loggedInUserRoleMap),b=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!p,I=b&&La(a?.loggedInUserRoleMap),{isFeatureEnabled:E}=c(g.isChargeCardFeatureEnabled),x=li(e,E,o)&&!p,C=x&&Tn(a?.loggedInUserRoleMap),_=jn(a?.loggedInUserRoleMap),D=Ga(a?.loggedInUserRoleMap),B=Pn(a?.loggedInUserRoleMap),O=b&&D,V=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!p&&B,W=Fn(a?.loggedInUserRoleMap),N=Rn(a?.loggedInUserRoleMap),v=Vn(a?.loggedInUserRoleMap),z=x&&W,{tenantEmailDomain:M}=ae();return t.jsxs(it,{children:[d.pathname.includes("/bills")?t.jsxs(t.Fragment,{children:[t.jsx(y,{path:"setup",element:t.jsx(je,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:C,isUserHasOnlyCardAccess:_,productType:"bill_pay",type:"setup"})}),t.jsx(y,{path:"verification",element:t.jsx(je,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:C,isUserHasOnlyCardAccess:_,productType:"bill_pay",type:"verification"})}),t.jsx(y,{path:"promo",element:t.jsx(qi,{})}),t.jsx(y,{path:"approval-rules/*",element:m?t.jsx(mi,{}):t.jsx(bi,{showZeniAccountRoute:O,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:v,showTreasuryRoute:V,isTenantBankingOnly:s,showChargeCardRoute:z,tenantEmailDomain:M??""})}),t.jsx(y,{path:"international-wire",element:t.jsx(je,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:C,isUserHasOnlyCardAccess:_,productType:"bill_pay",type:"international-wire"})}),e.companyBillPayInfo?.info?.isBillPayEnabled===!0&&t.jsx(y,{path:"*",element:t.jsx(Ti,{})}),(s===!0||i===!0)&&t.jsx(y,{path:"/*",element:t.jsx(Ja,{})}),e.companyBillPayInfo?.info?.isBillPayTOSAccepted===!0&&l&&t.jsx(y,{path:"*",element:t.jsx(ee,{to:"../setup"})}),a!=null&&ze(e,a.loggedInUserRoleMap)&&t.jsx(y,{path:"*",element:t.jsx(ee,{to:"../promo"})})]}):d.pathname.includes("/bill")?t.jsxs(t.Fragment,{children:[t.jsx(y,{path:"new",element:t.jsx(w,{appContent:t.jsx(ga,{})})}),t.jsx(y,{path:":billId",element:t.jsx(w,{appContent:t.jsx(gi,{})})}),t.jsx(y,{path:":billId/edit",element:t.jsx(w,{appContent:t.jsx(ga,{})})}),t.jsx(y,{path:"new/review",element:t.jsx(w,{appContent:t.jsx(va,{})})}),t.jsx(y,{path:":billId/edit/review",element:t.jsx(w,{appContent:t.jsx(va,{})})}),t.jsx(y,{path:"/:billId/:addressType",element:t.jsx(w,{appContent:t.jsx(ua,{isSubPage:!0})})}),t.jsx(y,{path:"/new/:addressType",element:t.jsx(w,{appContent:t.jsx(ua,{isSubPage:!0})})}),t.jsx(y,{path:"new/vendor/create",element:t.jsx(w,{appContent:t.jsx(Be,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit",element:t.jsx(w,{appContent:t.jsx(Be,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/ach",element:t.jsx(w,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/domestic",element:t.jsx(w,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/international",element:t.jsx(w,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:"new/vendor/create/ach",element:t.jsx(w,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:"new/vendor/create/domestic",element:t.jsx(w,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:"new/vendor/create/international",element:t.jsx(w,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/ach",element:t.jsx(w,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/domestic",element:t.jsx(w,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/international",element:t.jsx(w,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create",element:t.jsx(w,{appContent:t.jsx(Be,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit",element:t.jsx(w,{appContent:t.jsx(Be,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/ach",element:t.jsx(w,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/domestic",element:t.jsx(w,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/international",element:t.jsx(w,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/ach",element:t.jsx(w,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/domestic",element:t.jsx(w,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/international",element:t.jsx(w,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:"*",element:t.jsx(Ce,{})})]}):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(Ce,{})})]})}export{jo as default};
@@ -1,11 +0,0 @@
1
- import{j as I}from"./liveblocks-BxYL1OgN.js";import{a as o}from"./sentry-CBGLGt6C.js";import{u as F,h as P,g as z,j as C,N as w}from"./core-BTcTlweO.js";import{T9 as H,fE as q,gk as G,pR as Q,gL as A,gj as V,gh as B,Tz as J,gg as O}from"./zeni-epic-state-BnWuRnd6.js";import{u as K,z as E,L as D,G as M,N as W}from"./index-TGDDWC5W.js";import{n as X}from"./mui-pCWXyHva.js";import{P as b,a as _}from"./AccountMappingScreen-CYKESKzr.js";import{t as Y}from"./getLocaleForTenant-BEhIaWEh.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-Wj2P3Fde.js";import"./recharts-DITYpsYw.js";import"./analytics-BraOqOO1.js";import"./plaid-CQ3219ms.js";import"./dnd-BoQ5C62n.js";import"./stripe-cKAAJElX.js";import"./lottie-NpyKchhe.js";import"./lexical-DXRGtjuN.js";import"./pdf-OKLicNBW.js";import"./utils-SKzA7CXw.js";import"./MobileAppDrawer-C1pxYQQs.js";import"./InboxNotificationsProvider-Bce8xb55.js";import"./useTaskManagerAccess-CxGYFCdI.js";import"./accountMappingHelper-IZT3VRrm.js";import"./empty-B0NiNSvB.js";import"./pdf-lib-De_6kPvr.js";import"./index-Bv_gAW4_.js";import"./url-UnzJzFFd.js";import"./index-BJGQmd5Z.js";import"./decodeURIComponentSafe-BtKRHKiX.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="118b1af3-6445-4133-b1b3-8124b23c3fb3",t._sentryDebugIdIdentifier="sentry-dbid-118b1af3-6445-4133-b1b3-8124b23c3fb3")}catch{}})();const te=X.div`
2
- display: flex;
3
- flex: 1 1 auto;
4
- flex-direction: row;
5
- justify-content: center;
6
- align-items: center;
7
- width: 100%;
8
- height: 100vh;
9
- background-color: ${t=>t.theme.colors.background};
10
- box-shadow: ${t=>`0px 2px ${W.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function we(){const t=F(),i=P(),v=z(),{setLoading:d,clearAllLoading:m}=K(),h=o.useRef(!1),S=o.useRef(!1),N=o.useRef(!1),p=o.useRef(!1),{code:L,realmId:U,state:$}=Z(v.search),f=L!==""&&U!==""&&$!=="";f&&(N.current=!0);const j=sessionStorage.getItem(b),u=j===_.pending,R=j===_.ready,x=C((s=>H(s))),e=C((s=>q(s))),n=C((s=>s.tenantState.fetchState)),r=C((s=>s.tenantState.activeTenantFetchState.fetchState)),a=E.getSignedInUser(),g=E.getActiveTenantForUser()?.tenantId,l=e?.externalConnections?.fetchState,c=e?.externalConnections?.saveConnectionState,y=e.externalConnections?.accounting[0]?.isValid;o.useLayoutEffect((()=>{d(D.CONNECTION_AUTH)}),[d]),o.useEffect((()=>{h.current||a==null||g==null||(h.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(D.TENANT_FETCHING),t(G(a.userId,g))))}),[h,n,d]),o.useEffect((()=>{e.tenantId==null&&!S.current&&a!=null&&(S.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(Q(a.userId)))}),[S,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||c!=="Error"||(d(D.CONNECTION_AUTH),t(A(a.userId,e.tenantId)))}),[c]),o.useEffect((()=>{n!=="Completed"&&r!=="Completed"||a==null||e?.tenantId==null||(t(V(e.tenantId)),E.saveActiveTenantDomainForUser(e.tenantEmailDomain),B(a?.userId,a?.zeniSessionId,e.tenantId),M.updateAppLocaleID(Y(J(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||a==null||e==null||t(A(a.userId,e.tenantId)))}),[n,r,l]),o.useEffect((()=>{x.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&E.saveSignedInUserTenants(x.tenantsCoreDetailsInOrder)}),[x.tenantsCoreDetailsInOrder.length,n]);const T=e==null||n!=="Completed"&&r!=="Completed"||l!=="Completed";if(o.useEffect((()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||l!=="Completed"&&l!=="Error"||m()}),[n,r,l]),o.useEffect((()=>{u&&c==="In-Progress"&&(p.current=!0)}),[u,c]),o.useEffect((()=>{if(!u||T)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return p.current&&c==="Completed"?(sessionStorage.setItem(b,_.ready),m(),void i(s,{replace:!0})):p.current&&c==="Error"?(sessionStorage.removeItem(b),t(O({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),void i(s,{replace:!0})):void(f||N.current||p.current||y!==!0||(sessionStorage.removeItem(b),t(O({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),i(s,{replace:!0})))}),[u,T,c,f,y,e.tenantEmailDomain,m,t,i]),T)return null;if(f||y!==!0)return I.jsx(te,{children:I.jsx(ee,{})});if(u)return null;const k=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return R?I.jsx(w,{to:k,replace:!0}):I.jsx(w,{to:"/",replace:!0})}export{we as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-BxYL1OgN.js";import{z as a}from"./index-TGDDWC5W.js";import{g as n}from"./QBOConnectionScreen-Wj2P3Fde.js";import"./sentry-CBGLGt6C.js";import{g as p,N as s}from"./core-BTcTlweO.js";import"./zeni-epic-state-BnWuRnd6.js";import"./recharts-DITYpsYw.js";import"./mui-pCWXyHva.js";import"./analytics-BraOqOO1.js";import"./plaid-CQ3219ms.js";import"./dnd-BoQ5C62n.js";import"./stripe-cKAAJElX.js";import"./lottie-NpyKchhe.js";import"./lexical-DXRGtjuN.js";import"./pdf-OKLicNBW.js";import"./utils-SKzA7CXw.js";import"./empty-B0NiNSvB.js";import"./pdf-lib-De_6kPvr.js";import"./index-Bv_gAW4_.js";import"./url-UnzJzFFd.js";import"./index-BJGQmd5Z.js";import"./decodeURIComponentSafe-BtKRHKiX.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]="c18cd95e-770d-4ff7-92bf-3374948ea538",t._sentryDebugIdIdentifier="sentry-dbid-c18cd95e-770d-4ff7-92bf-3374948ea538")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),d=a.getSignedInUser()?.userId??"";if(f(o,r,e,d)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:m})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-BxYL1OgN.js";import{h as w,g as C,j as h,l as E,i as V}from"./core-BTcTlweO.js";import{Y6 as k,Yd as M,gF as _,gE as W,gD as K,kO as X,W5 as q,uc as J,fE as B,XF as D,kM as F,Y7 as S,Yg as T,kK as G,l5 as j}from"./zeni-epic-state-BnWuRnd6.js";import{bM as L,a1 as N,M as R,z as O,E as U,a4 as p,y as v,a7 as Y,bN as Q,N as Z,bO as ee,k as te}from"./index-TGDDWC5W.js";import{n as z}from"./mui-pCWXyHva.js";import"./sentry-CBGLGt6C.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="56d80476-df9a-47c4-92ec-6e34127465c6",e._sentryDebugIdIdentifier="sentry-dbid-56d80476-df9a-47c4-92ec-6e34127465c6")}catch{}})();const ne=E(null,(function(e,t){return{onSaveVendor:n=>{e(X(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),n!=null&&e(J(n))},onGetOtp:n=>{e(K(n,"BillPayVendor"))},onResendOtp:n=>{e(W(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(_(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(M(n,a,o))}}}))(L);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((d=>k(d,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=z.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
- `,oe=E((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),d=s.poppedPathname??P();n(d,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(T({data:d}))},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),d=s.poppedPathname??P(0);t.navigate(d,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}}))(Q);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:d}=V(),i=e??s,{useFeatureGate:c}=R(),r=O.getSignedInUser(),b=h((u=>B(u))),g=U(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,i))),{isFeatureEnabled:I}=c(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(v.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Y,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:i,billId:d}),l.jsx(oe,{location:a,navigate:n,billId:d,vendorId:i,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},A=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return A(e,"ach",t,n)}function ve(e,t,n){return A(e,"domestic",t,n)}function ge(e,t,n){return A(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},ce=z.div`
10
- display: flex;
11
- height: 100vh;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${e=>e.theme.colors.grey4};
17
- box-shadow: ${e=>`0px 2px ${Z.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,de=E((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:d}=t,{tenantEmailDomain:i}=d;return{onFetchBankName:c=>{e(j(c))},onSaveHandler:c=>{e(G(t.bankAccountContext,c,"us-domestic",s))},onWireDetailsUpdated:c=>{const{bankAccountSection:r}=c;e(T({data:r}))},onCancel:()=>{(()=>{const c=p(o.state?.pathnameStackToGoBack),r=c.poppedPathname??$();a(r,{state:{pathnameStackToGoBack:c.newStack}})})(),e(S())},onAddressClick:c=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const r=se(i,c,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(r,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const c=p(t.location.state?.pathnameStackToGoBack),r=c.poppedPathname??$(0);t.navigate(r,{state:{pathnameStackToGoBack:c.newStack}})}e(S())}}}))(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:d}=V(),i=e??s,c=O.getSignedInUser(),{useFeatureGate:r}=R(),b=U(),g=h((u=>B(u))),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,i))),{isFeatureEnabled:I}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Y,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${Z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(ce,{windowSize:o,children:[l.jsx(H,{vendorId:i,billId:d}),l.jsx(de,{location:a,navigate:n,billId:d,vendorId:i,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,H as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BxYL1OgN.js";import{a as d}from"./sentry-CBGLGt6C.js";import{h as B,u as G,g as A,i as R,j as l,N as _,l as q,n as F,o as V}from"./core-BTcTlweO.js";import{W9 as N,fE as O,Vr as M,m_ as Y,Rt as I,We as $,W4 as z,l_ as H,Ru as S,Vw as J,Vx as K,W6 as L,W5 as Q}from"./zeni-epic-state-BnWuRnd6.js";import{b8 as U,j as X,a4 as Z,k as tt}from"./index-TGDDWC5W.js";import"./mui-pCWXyHva.js";import{d as k}from"./decodeURIComponentSafe-BtKRHKiX.js";import{w as et}from"./withTransactionSidePanel-CMzfl6nd.js";import{f as at,c as nt}from"./routePaths-3cJbMI-5.js";import"./recharts-DITYpsYw.js";import"./analytics-BraOqOO1.js";import"./plaid-CQ3219ms.js";import"./dnd-BoQ5C62n.js";import"./stripe-cKAAJElX.js";import"./lottie-NpyKchhe.js";import"./lexical-DXRGtjuN.js";import"./pdf-OKLicNBW.js";import"./utils-SKzA7CXw.js";import"./useAskAiCfoHostNavButtonProps-zn3r_NtN.js";import"./TransactionDetailScreen-DkBKkmlJ.js";import"./useInitialThreadRequest-BREcdNRj.js";import"./expenseAutomationHelper-B9yXZ1rw.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="528af9e6-6227-441d-922d-2d77094b605f",a._sentryDebugIdIdentifier="sentry-dbid-528af9e6-6227-441d-922d-2d77094b605f")}catch{}})();const ot=q((function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:H(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(J()),a(K()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(U),it=et((function({entityType:a,...t}){const e=B(),o=G(),c=A(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:j}=R(),r=k(x??""),p=k(j??""),f=rt(r,p),w=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l((n=>N(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=l((n=>O(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&f===!0&&(T(!0),o(Y(i)))}),[m,f,i]);const E=l((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,W=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:W,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(_,{to:b(w.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(F,{children:s.jsx(V,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BxYL1OgN.js";import{a as r}from"./sentry-CBGLGt6C.js";import{aw as d,ax as l,s as p,a4 as m}from"./index-TGDDWC5W.js";import"./mui-pCWXyHva.js";import c from"./NotFoundScreen-CIYbJrC7.js";import{h as u,g as b}from"./core-BTcTlweO.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]="052e3476-042d-44ff-b15b-67fe1524a52f",e._sentryDebugIdIdentifier="sentry-dbid-052e3476-042d-44ff-b15b-67fe1524a52f")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),f=r.useCallback((()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=d(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:f}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};