@zeniai/web-app-ui 5.0.76-qa → 5.0.77-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 (138) hide show
  1. package/dist/assets/AddressRoutes-Clm_yxMo.js +1 -0
  2. package/dist/assets/AddressScreen-ByYpZmgQ.js +9 -0
  3. package/dist/assets/AiCfoScreen-DbYSFoNw.js +22 -0
  4. package/dist/assets/BillPayApprovalRoutes-CX2-tB9Z.js +1 -0
  5. package/dist/assets/{BillPayRoutes-CIhgsxs6.js → BillPayRoutes-CFin72Sd.js} +12 -12
  6. package/dist/assets/BusinessVerificationPageScreen-C-d6e6xJ.js +9 -0
  7. package/dist/assets/{ChargeCardRoutes-BCDwsoI8.js → ChargeCardRoutes-BqilxZnu.js} +8 -8
  8. package/dist/assets/{CompanyPassportScreen-Cjnsn_RK.js → CompanyPassportScreen-Btm8q2XT.js} +1 -1
  9. package/dist/assets/ConnectionAuthScreen-B3NEPge1.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-BP98cwHW.js +1 -0
  11. package/dist/assets/CustomerOnboardingRoutes-Cx10OoO6.js +23 -0
  12. package/dist/assets/{DashboardRoutes-DxyPzfo5.js → DashboardRoutes-Dr7E3H8N.js} +4 -4
  13. package/dist/assets/{DefaultTenantHome-BxxoLoEm.js → DefaultTenantHome-BmA8DcRx.js} +1 -1
  14. package/dist/assets/DomesticWireDetailScreen-CzSUYZwn.js +18 -0
  15. package/dist/assets/DrawerScreen-AH0ysY6V.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-DVGIBaLz.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-Bhl_mKXt.js → ExpenseAutomationRoutes-BhbZS8a1.js} +4 -4
  18. package/dist/assets/FeaturePreviewScreen-DPxCLrsp.js +1 -0
  19. package/dist/assets/HubSpotOAuthCallbackScreen-BvqLZI0N.js +1 -0
  20. package/dist/assets/MagicLinkRoutes-jZeMo5Ui.js +72 -0
  21. package/dist/assets/MagicLinkSignInScreen-PJSTdmbN.js +12 -0
  22. package/dist/assets/{MobileAppDrawer-D_MxSFu1.js → MobileAppDrawer-CNxBiA0K.js} +1 -1
  23. package/dist/assets/NotFoundScreen-CsEhUGfR.js +1 -0
  24. package/dist/assets/NotificationRoutes-9IJgVYJ1.js +1 -0
  25. package/dist/assets/OAuthConsentScreen-1ZY7Ls_k.js +1 -0
  26. package/dist/assets/PandLWithForecastRoutes-8SC0GJZW.js +1 -0
  27. package/dist/assets/PeopleRoutes-DQ3Y767r.js +22 -0
  28. package/dist/assets/PerformanceRoutes-BZb18QS3.js +1 -0
  29. package/dist/assets/{Preview-Csj6iaMz.js → Preview-B7yw63qf.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-D3kZw9eT.js → QBOConnectionScreen-BRrDd8wr.js} +1 -1
  31. package/dist/assets/ReferralListScreen-DWAGGjua.js +5 -0
  32. package/dist/assets/ReimbursementApprovalRoutes-DSgEFO1H.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DXvOZU5T.js → ReimbursementApprovalRuleDetailScreen-CtZbBICM.js} +1 -1
  34. package/dist/assets/ReimbursementRoutes-Iavqnxfs.js +68 -0
  35. package/dist/assets/ReportsRoutes-CjoIF9EB.js +1 -0
  36. package/dist/assets/RewardsRoutes-CTiffYxG.js +1 -0
  37. package/dist/assets/ScreenRoutes-zUtLUY3P.js +2 -0
  38. package/dist/assets/{SettingsRoutes-ayR8jsmB.js → SettingsRoutes-Dr2cLQZf.js} +7 -7
  39. package/dist/assets/{SetupPagesScreen-DVIzlP-5.js → SetupPagesScreen-BMUAJOjI.js} +5 -5
  40. package/dist/assets/SignInScreen-BO8V1s1B.js +1 -0
  41. package/dist/assets/SignOutScreen-B1QfOGXO.js +9 -0
  42. package/dist/assets/{TaskListScreen-CBK1vDKd.js → TaskListScreen-DdoFZv0I.js} +2 -2
  43. package/dist/assets/TaskRoutes-DR1BBqXQ.js +9 -0
  44. package/dist/assets/TransactionDetailRoutes-DLkTkOiV.js +1 -0
  45. package/dist/assets/TransactionDetailScreen--PMkud8g.js +5 -0
  46. package/dist/assets/{TransactionListRoutes-BX5vLxoe.js → TransactionListRoutes-quiJ_wNs.js} +1 -1
  47. package/dist/assets/TreasuryRoutes-BVcC0j-i.js +37 -0
  48. package/dist/assets/{VendorsRoutes-tcDOX-e4.js → VendorsRoutes-DJYa05bm.js} +21 -21
  49. package/dist/assets/WiseConfirmationScreen-CTaGbwbB.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-ByArgJuB.js → ZeniAccountRoutes-CpYvVE1u.js} +12 -12
  51. package/dist/assets/ZeniAccountStatementScreen-C8feQjoH.js +9 -0
  52. package/dist/assets/{accountMappingHelper-BSumbKrF.js → accountMappingHelper-D6x0RpVY.js} +1 -1
  53. package/dist/assets/{analytics-q_QSThl7.js → analytics-CgRNtlDm.js} +1 -1
  54. package/dist/assets/{analyticsHelper-DhFEnfI7.js → analyticsHelper-DhD4YoYg.js} +1 -1
  55. package/dist/assets/{core-D9lzXsHE.js → core-uYqCzel8.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-B4xUD3SX.js → decodeURIComponentSafe-DCnYf30M.js} +1 -1
  57. package/dist/assets/{dnd-DNtF3Icn.js → dnd-BSWou54V.js} +1 -1
  58. package/dist/assets/{empty-Bg3h__-J.js → empty-BFCAZWzA.js} +1 -1
  59. package/dist/assets/{empty-BnWCAzBO.js → empty-CKinwWZY.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-CrLTHEbW.js → emptyVideoElement-E29-Nor3.js} +1 -1
  61. package/dist/assets/epic-dPIWYPli.js +2 -0
  62. package/dist/assets/getLocaleForTenant-CFQN8jbL.js +1 -0
  63. package/dist/assets/{index-tKID2aTm.js → index-8d_FSGLw.js} +1 -1
  64. package/dist/assets/{index-DmyhDNRf.js → index-BsLHs9Ab.js} +1 -1
  65. package/dist/assets/{index-D4WqoFTE.js → index-CeZ7L-BQ.js} +12975 -12947
  66. package/dist/assets/{index-CDrFhkvu.js → index-CxWCBC6O.js} +1 -1
  67. package/dist/assets/{index-IEcabr56.js → index-DWPRup5s.js} +1 -1
  68. package/dist/assets/{index-CuyoN034.js → index-DeBaxB_L.js} +1 -1
  69. package/dist/assets/{index-BYO1BJ4-.js → index-Dl7Wgss6.js} +1 -1
  70. package/dist/assets/{index-DQS8hiD6.js → index-F3uqdkEv.js} +2 -2
  71. package/dist/assets/{lexical-5_A_mLPM.js → lexical-DbCoEckm.js} +1 -1
  72. package/dist/assets/{liveblocks-DRCozBQX.js → liveblocks-CfCKAQeM.js} +1 -1
  73. package/dist/assets/{lottie-CFIADA6U.js → lottie-Dc_IH0fS.js} +1 -1
  74. package/dist/assets/{mui-uwgkpTLc.js → mui-CTbUXhla.js} +1 -1
  75. package/dist/assets/{pathToGoBack-Ll3naOiu.js → pathToGoBack-Y7yporNq.js} +1 -1
  76. package/dist/assets/{pdf-C9DJlS7s.js → pdf-O9N1jd2N.js} +4 -4
  77. package/dist/assets/{pdf-lib-DykPSmmb.js → pdf-lib-CNgiyR2K.js} +1 -1
  78. package/dist/assets/{plaid-CRq9dUdG.js → plaid-Bio3MiLm.js} +1 -1
  79. package/dist/assets/{pusher-DRQztvpS.js → pusher--jGYOMJ8.js} +1 -1
  80. package/dist/assets/{react-BG_C1Eck.js → react-BYbqG6ZW.js} +1 -1
  81. package/dist/assets/{react-Bc7GdtKE.js → react-BaqpebX1.js} +1 -1
  82. package/dist/assets/{react-DVWjQrcH.js → react-D9RjhqSo.js} +1 -1
  83. package/dist/assets/{react-LnMTZloB.js → react-DqfAPb7w.js} +1 -1
  84. package/dist/assets/{react-B67TqooD.js → react-KPWjcD7D.js} +1 -1
  85. package/dist/assets/{react-Cv1q1f7X.js → react-kWXzqyUF.js} +1 -1
  86. package/dist/assets/{recharts-C3UFukkg.js → recharts-BUFoogHS.js} +1 -1
  87. package/dist/assets/{routePaths-C2HBowO1.js → routePaths-vUmlDccC.js} +1 -1
  88. package/dist/assets/{sentry-B4qAfutp.js → sentry-131ydzJg.js} +1 -1
  89. package/dist/assets/{url-D-rSVugE.js → url-BRm_J7V6.js} +1 -1
  90. package/dist/assets/{url-DrNm2a4i.js → url-DlWfObPw.js} +1 -1
  91. package/dist/assets/useAskAiCfoHostNavButtonProps-D4_eEE1f.js +1 -0
  92. package/dist/assets/{useDeviceId-CF-PoIcu.js → useDeviceId-CBU-vDdN.js} +1 -1
  93. package/dist/assets/useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js +1 -0
  94. package/dist/assets/{useInitialThreadRequest-Cw2FMHcf.js → useInitialThreadRequest-cRvS9PIT.js} +1 -1
  95. package/dist/assets/{utils-DfCznjX8.js → utils-BkkIzijx.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-DhelGbXD.js → withTransactionSidePanel-BS7S2wn5.js} +3 -3
  97. package/dist/assets/{zeni-epic-state-CthkBqEW.js → zeni-epic-state-BmAPZlsC.js} +6 -6
  98. package/dist/index.html +1 -1
  99. package/package.json +4 -4
  100. package/dist/assets/AddressRoutes-KIt8uyHg.js +0 -1
  101. package/dist/assets/AddressScreen-C8epvHKg.js +0 -9
  102. package/dist/assets/AiCfoScreen-C8PnLvFm.js +0 -22
  103. package/dist/assets/BillPayApprovalRoutes-C2pW_0HD.js +0 -1
  104. package/dist/assets/BusinessVerificationPageScreen-BHqq2xxV.js +0 -9
  105. package/dist/assets/ConnectionAuthScreen-CXfcmrz5.js +0 -11
  106. package/dist/assets/CustomerOnboardingAuthScreen-DLQ4stgM.js +0 -1
  107. package/dist/assets/CustomerOnboardingRoutes-BZFueUon.js +0 -23
  108. package/dist/assets/DomesticWireDetailScreen-BVJ2uZZ_.js +0 -18
  109. package/dist/assets/DrawerScreen-BYBgvD5u.js +0 -1
  110. package/dist/assets/EntityDetailRoutes-CVEIAJzD.js +0 -1
  111. package/dist/assets/FeaturePreviewScreen-BCRZsfyQ.js +0 -1
  112. package/dist/assets/HubSpotOAuthCallbackScreen-ByWE3hmY.js +0 -1
  113. package/dist/assets/MagicLinkRoutes-CjEeLFrg.js +0 -72
  114. package/dist/assets/MagicLinkSignInScreen-BNv6DMmx.js +0 -12
  115. package/dist/assets/NotFoundScreen-BUTU_-cN.js +0 -1
  116. package/dist/assets/NotificationRoutes-BU7RiYj-.js +0 -1
  117. package/dist/assets/OAuthConsentScreen-CjqH556D.js +0 -1
  118. package/dist/assets/PandLWithForecastRoutes-BRWqh_fp.js +0 -1
  119. package/dist/assets/PeopleRoutes-BHwShJOh.js +0 -22
  120. package/dist/assets/PerformanceRoutes-BSJraYOg.js +0 -1
  121. package/dist/assets/ReferralListScreen-DZ5cxHIr.js +0 -5
  122. package/dist/assets/ReimbursementApprovalRoutes-CK7PuiBG.js +0 -1
  123. package/dist/assets/ReimbursementRoutes-CHbt2wdC.js +0 -68
  124. package/dist/assets/ReportsRoutes-CXA3us4c.js +0 -1
  125. package/dist/assets/RewardsRoutes-gAW1VRAE.js +0 -1
  126. package/dist/assets/ScreenRoutes-U1ZbFVRi.js +0 -2
  127. package/dist/assets/SignInScreen-I3X_P9xn.js +0 -1
  128. package/dist/assets/SignOutScreen-BdUuSEch.js +0 -9
  129. package/dist/assets/TaskRoutes-D817k7tQ.js +0 -9
  130. package/dist/assets/TransactionDetailRoutes-C3_-fHOI.js +0 -1
  131. package/dist/assets/TransactionDetailScreen-C7MA74ac.js +0 -5
  132. package/dist/assets/TreasuryRoutes-B7ppkZjl.js +0 -37
  133. package/dist/assets/WiseConfirmationScreen-Uew1AA-_.js +0 -12
  134. package/dist/assets/ZeniAccountStatementScreen-Upv5ClY5.js +0 -9
  135. package/dist/assets/epic-C-cItypz.js +0 -2
  136. package/dist/assets/getLocaleForTenant-BCu2Wbt5.js +0 -1
  137. package/dist/assets/useAskAiCfoHostNavButtonProps-mLaTPohd.js +0 -1
  138. package/dist/assets/useFetchSuggestedQuestionsWhenReady-Y2W_vLVT.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-D4WqoFTE.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-B4qAfutp.js"><link rel="modulepreload" crossorigin href="/assets/core-D9lzXsHE.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-CthkBqEW.js"><link rel="modulepreload" crossorigin href="/assets/mui-uwgkpTLc.js"><link rel="modulepreload" crossorigin href="/assets/analytics-q_QSThl7.js"><link rel="modulepreload" crossorigin href="/assets/utils-DfCznjX8.js"><link rel="stylesheet" crossorigin href="/assets/index-Bc34frN_.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-CeZ7L-BQ.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-131ydzJg.js"><link rel="modulepreload" crossorigin href="/assets/core-uYqCzel8.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-BmAPZlsC.js"><link rel="modulepreload" crossorigin href="/assets/mui-CTbUXhla.js"><link rel="modulepreload" crossorigin href="/assets/analytics-CgRNtlDm.js"><link rel="modulepreload" crossorigin href="/assets/utils-BkkIzijx.js"><link rel="stylesheet" crossorigin href="/assets/index-Bc34frN_.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.0.76-qa",
3
+ "version": "5.0.77-dev",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -27,9 +27,9 @@
27
27
  "@sentry/core": "^9.42.1",
28
28
  "@sentry/react": "^9.42.1",
29
29
  "@stripe/stripe-js": "^4.4.0",
30
- "@zeniai/client-analytics": "2.0.9",
31
- "@zeniai/client-epic-state": "5.0.42",
32
- "@zeniai/web-components": "4.0.82",
30
+ "@zeniai/client-analytics": "2.0.10",
31
+ "@zeniai/client-epic-state": "5.0.43",
32
+ "@zeniai/web-components": "4.0.83",
33
33
  "color": "3.1.3",
34
34
  "cross-fetch": "^4.0.0",
35
35
  "crypto-js": "4.2.0",
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-DRCozBQX.js";import{A as i}from"./AddressScreen-C8epvHKg.js";import s from"./NotFoundScreen-BUTU_-cN.js";import"./sentry-B4qAfutp.js";import{n as d,o as r}from"./core-D9lzXsHE.js";import"./zeni-epic-state-CthkBqEW.js";import"./recharts-C3UFukkg.js";import"./index-D4WqoFTE.js";import"./mui-uwgkpTLc.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.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]="624154e3-3694-4a3c-b645-a66b8e12404c",t._sentryDebugIdIdentifier="sentry-dbid-624154e3-3694-4a3c-b645-a66b8e12404c")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
@@ -1,9 +0,0 @@
1
- import{j as r}from"./liveblocks-DRCozBQX.js";import{a as S}from"./sentry-B4qAfutp.js";import{j as T,h as _,u as E,l as j,g as B,k as M}from"./core-D9lzXsHE.js";import{Z as $,m as D,z as L,k as K,B as F,s as G,c as C,e as m,i as J,f as h,p as z}from"./index-D4WqoFTE.js";import{JE as k,gW as O,eO as R,JF as U,c1 as N,JG as V,kg as q}from"./zeni-epic-state-CthkBqEW.js";import{n as H}from"./mui-uwgkpTLc.js";import W from"./NotFoundScreen-BUTU_-cN.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]="aa0ab6ad-6b24-43be-b4e4-0b79ccba5d03",e._sentryDebugIdIdentifier="sentry-dbid-aa0ab6ad-6b24-43be-b4e4-0b79ccba5d03")}catch{}})();const Z=H.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
- `,Q=M(function(e,t){const{addressId:o,isSubPage:i,addressType:c}=t,l=R(e),a=t.roleMap!=null&&U(t.roleMap),d=i||c==="user_address"||N(l?.userRole??[])||a?void 0:"readonly";if(o==null){const s=V(c,e);return{addressToEdit:s?.addressToCreate,loadingState:s?.status?.fetchState,googleAPIKey:h.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:t.dontShowSaveConfirmation}}const n=k(e,o);return{addressToEdit:n.address,loadingState:n.fetchState,googleAPIKey:h.googleMapsAPIKey,isDisabled:d}},function(e,t){const{navigate:o,location:i,addressType:c}=t,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const d=i.state,n=z(d?.pathnameStackToGoBack);let s=n.poppedPathname??w();const u=d?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(s=`${s}?${g}`)}o(s,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:a=>{const d=X(a);e(q({addressType:c,addressToCreate:d})),C?.trackSaveAddressClicked(m.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(t.bankAccountContext)},onCancel:()=>{l(t.bankAccountContext)}}})(J);function re({isSubPage:e,hideAddressSubTitle:t=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),d=_(),n=E(),{addressId:s,addressType:u}=j(),g=$(),I=D(),v=L.getSignedInUser(),[p,x]=S.useState(s==null),f=B(b=>s!=null?k(b,s).fetchState:"Not-Started"),A=K();if(v==null)throw Error("Can't access address page without signing in...");const P=b=>b.trackPageLoaded(s!=null?m.Event.editAddress:m.Event.addAddress),y=l??u;return S.useEffect(()=>{p||s==null||(x(!0),d(O(s,!1)))},[p,s,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!p&&f==="Not-Started"||p&&f==="In-Progress"?r.jsx(F,{fetchState:f,style:{backgroundColor:I.colors.grey5}}):s!=null&&f==="Error"?(a(`${w(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(G,{analytics:C,onLoad:P}),r.jsx(Z,{windowSize:g,children:r.jsx(Q,{location:n,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:t,addressId:s,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:A?.loggedInUserRoleMap})})]}):r.jsx(W,{})}const w=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},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,22 +0,0 @@
1
- import{j as h}from"./liveblocks-DRCozBQX.js";import{a as l}from"./sentry-B4qAfutp.js";import{h as ue,j as me,u as pe,g as V,l as he,k as fe}from"./core-D9lzXsHE.js";import{Q as Se,cJ as ge,z as Ce,Z as ke,cK as be,cL as we,cM as $,cN as Ie,cO as Y,p as U,s as q,c as T,cP as z,cQ as Ee,V as Pe,e as Te,a3 as ye,cR as xe,W as _e,j as ve,aY as Oe,cS as Ae}from"./index-D4WqoFTE.js";import{fE as Qe,f3 as J,eO as Ue,hA as De,Qc as je,eN as Fe,hK as Be,hG as Le,fu as W,fo as Re,fh as Me,fl as H,fp as Ge,fq as Ne,fr as Ve,fs as $e,ft as qe}from"./zeni-epic-state-CthkBqEW.js";import{D as ze,n as b,S as We,P as He}from"./mui-uwgkpTLc.js";import{p as Ke}from"./pathToGoBack-Ll3naOiu.js";import"./recharts-C3UFukkg.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="501ddadf-1de8-43ce-bc6a-37e616002144",s._sentryDebugIdIdentifier="sentry-dbid-501ddadf-1de8-43ce-bc6a-37e616002144")}catch{}})();const Z="chat-response-generated",Ye=fe(function(s,r){const t=J(s),m=r.isSubmitting;return{showSampleQuestions:r.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:m,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${_e}/tableDownload`,emailLinkQuestion:r.emailLinkQuestion,autoSubmitEmailLinkQuestion:r.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:r.onEmailLinkQuestionProcessed,isFileUploadEnabled:r.isFileUploadEnabled,isUploadPromoVisible:r.isUploadPromoVisible,onUploadPromoClose:r.onUploadPromoClose}},function(s,r){const{location:t,currentTenant:m,userId:c,navigate:S,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:C,setIsAiCfoOpen:d}=r;return{onEventReceived:(e,o)=>{if(e===Z&&typeof o.text=="string"&&typeof o.metadata=="object"){const n=o,p=Ne(n.type),u=n.metadata.chat_session_id??null,{currentChatSession:a,currentQuestionAnswer:w,currentQuestionAnswerSummary:y}=Y(C,u);p!=="answer"?T.trackAICFOChatResponseGenerated(p,w?.question.questionText??"",n.text,u,Ae(y,a),n.metadata.message_id??null):T.trackAICFOChatAnswerGenerated(n.text,w?.question.questionText??"",(n.follow_up_questions?.length??0)>0,!!n.assumptions,!!n.insights,n.visualization!=null,Ve(n.visualization?.type??"")??null,u,n.summarized_title,n.metadata.message_id??null),s($e({chatSessionId:n.metadata.chat_session_id,responseType:p,fetchState:{fetchState:"Completed",error:void 0}})),s(qe({chatSessionId:n.metadata.chat_session_id,answerPayload:n,userId:c}))}},onSubmit:(e,o,n,p)=>{e&&Oe(s,e,o,f,C,c,p,n)},updateCurrentInput:e=>{s(H(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Ge(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{S(-1)},onCloseClick:()=>{const e=U(t.state?.pathnameStackToGoBack),o=e.poppedPathname??Ke(1);S(o,{state:{...t.state,pathnameStackToGoBack:e.newStack}}),s(H(""))},togglePageView:()=>{const e=U(t.state?.pathnameStackToGoBack),o=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;S(o,{state:{...t.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),d(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{S(-1)},onNewChatClick:()=>{f!=null&&s(Me());const e=ve(t.state?.pathnameStackToGoBack,t.pathname);S(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,o)=>{s(Re({questionAnswerId:e,isCollapsed:o}))},onMenuClick:r.onMenuClick}})(ye(xe)),gt=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:r}=Se(),t=ue(),m=me(),c=pe(),[S,f]=l.useState(!1);l.useEffect(()=>{t(Qe())},[t]);const{customPageTitle:C}=ge(),d=V(i=>J(i)),e=Ce.getSignedInUser(),{session_id:o}=he(),n=ke(),p=Pe(n),u=V(i=>Ue(i)),a=d.uiState.currentChatSessionId,w=u.tenantEmailDomain,{handleUploadPromoClose:y,isUploadPromoVisible:X}=be({isFileUploadEnabled:s,tenantEmailDomain:w}),x=we({currentTenant:u,currentChatSessionId:a,aiCfoView:d}),I=c.state,E=I?.aiCfoInitialQuestion,D=!!I?.aiCfoShouldSubmit;l.useEffect(()=>{const i=c.state;if(i?.[$]!==!0)return;f(!0);const g={...i};delete g[$],m(c,{replace:!0,state:g})},[c.pathname,c.search,c.state,m]);const[ee,_]=l.useState(null),[te,v]=l.useState(!1),j=l.useRef(!1);l.useEffect(()=>{j.current||E==null||E===""||(_(E),v(D),j.current=!0)},[E,D]);const ae=l.useCallback(()=>{_(null),v(!1)},[]),F=l.useMemo(()=>new URLSearchParams(c.search),[c.search]),B=F.get("ref")??I?.aiCfoRef,O=F.get("emailRefId")??I?.aiCfoEmailRefId,L=l.useRef(!1);l.useEffect(()=>{L.current||B!=="month-end-email"||O==null||a!=null||e==null||(t(De("controller",e.userId,O,"MONTH_END_EMAIL")),L.current=!0)},[B,O,a,t,e]);const P=d.uiState.lastContextMessage;l.useEffect(()=>{P!=null&&P!==""&&a!=null&&(_(P),v(!0),t(je()))},[P,a,t]);const se=u.masterTOSInfo,k=se?.isMasterTOSAccepted??!1,{visitedSessions:R}=Ie(a),A=d.fetchState,Q=d.uiState.chatSessionsNextPageToken.hasMore||!d.uiState.chatSessionsFirstPageFetched,M=a!=null?d.fetchChatSessionHistoryByChatSessionId?.[a]?.fetchState??"Not-Started":"Not-Started",G=a==null||(d.uiState.chatHistoryNextPageToken[a]?.hasMore??!0),N=d.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:oe}=Y(N,a),ne=oe.length===0;l.useEffect(()=>{k||p||m("../dashboard",{state:{...c.state,message:"open_ai_cfo_drawer"}})},[k,p,m,c.state]);const ie=l.useCallback(()=>{const i=U(c.state?.pathnameStackToGoBack),g=u.tenantEmailDomain;m(i.poppedPathname??(g!=null?`/${g}/dashboard`:".."),{state:{...c.state,pathnameStackToGoBack:i.newStack}})},[u.tenantEmailDomain,c.state,m]);l.useEffect(()=>{a!=null&&o!==a&&m(`../ai-cfo/${a}`,{state:{...c.state}})},[a,o]),l.useEffect(()=>{o!=null&&a==null&&o!=="new_chat"&&o!=="explore"&&t(Fe({sessionId:o,agentId:"controller"}))},[]);const le=l.useMemo(()=>({events:R.map(i=>`private-encrypted-chat-${i}.${Z}`),eventCallback:(i,g,de)=>de.onEventReceived(i,g)}),[R]);l.useEffect(()=>{A!=="In-Progress"&&Q&&t(Be())},[A,Q,t]),l.useEffect(()=>{a!=null&&M!=="In-Progress"&&G&&e!=null&&A==="Completed"&&!Q&&t(Le(a,e.userId))},[M,G,a,e,t]);const re=i=>i.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(e==null||o==null)throw Error("Can't access AI Controller page without signing in...");const ce=a!=null&&d.responseStateByChatSessionId?.[a]?.answer?.fetchState==="In-Progress";return!k&&p?h.jsxs(Ze,{children:[h.jsx(q,{analytics:T,onLoad:re}),x.drawerElement,h.jsx(Xe,{children:h.jsx(K,{children:h.jsx(z,{isTOSAccepted:!1,acceptMasterTOSState:d.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:ie,onCompleteClick:()=>{u.userRoleId!=null&&t(W(u.userRoleId))}})})})]}):h.jsxs(Je,{children:[h.jsx(q,{analytics:T,onLoad:i=>i.trackPageLoaded(Te.Event.aiCFOPage)}),p&&x.drawerElement,h.jsx(Ye,{...le,currentChatSessionId:a,allSessionsWithOrderedQuestionAnswers:N,openOnboardingPage:()=>f(!0),userId:e.userId,setIsAiCfoOpen:r,navigate:m,sessionFromUrl:o,location:c,isSubmitting:ce,isEmptyChatWithSession:ne,customPageTitle:C,currentTenant:u,emailLinkQuestion:ee??void 0,autoSubmitEmailLinkQuestion:te,onEmailLinkQuestionProcessed:ae,onMenuClick:p?x.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:X,onUploadPromoClose:y}),h.jsx(ze,{anchor:"right",open:S,transitionDuration:250,PaperProps:{component:et,style:{width:p?"100%":`${Ee}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:h.jsx(K,{onClick:i=>i.stopPropagation(),children:h.jsx(z,{isTOSAccepted:k,acceptMasterTOSState:d.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:()=>f(!1),onCompleteClick:()=>{k||u.userRoleId==null||t(W(u.userRoleId)),f(!1)}})})})]})},K=b(We)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Je=b.div`
6
- height: 100vh;
7
- width: 100%;
8
- `,Ze=b.div`
9
- height: 100vh;
10
- width: 100%;
11
- display: flex;
12
- flex-direction: column;
13
- min-height: 0;
14
- `,Xe=b.div`
15
- flex: 1;
16
- min-height: 0;
17
- display: flex;
18
- flex-direction: column;
19
- `,et=b(He)`
20
- box-shadow: ${({theme:s})=>s.colors.elevation2};
21
- color: ${({theme:s})=>s.colors.grey4};
22
- `;export{gt as default};
@@ -1 +0,0 @@
1
- import{j as l}from"./liveblocks-DRCozBQX.js";import{a as y}from"./sentry-B4qAfutp.js";import{j as B,u as U,h as j,g as v,N as O,k as T,l as $,n as F,o as h}from"./core-D9lzXsHE.js";import{eO as N,MX as R,MD as b,xp as x,xj as L,xn as I,xc as M,MF as q,xf as z,xr as W,xq as E}from"./zeni-epic-state-CthkBqEW.js";import{m as P,z as k,B as V,a3 as X,by as G,ac as _,bz as H}from"./index-D4WqoFTE.js";import"./mui-uwgkpTLc.js";import{i as J}from"./ReimbursementApprovalRuleDetailScreen-DXvOZU5T.js";import K from"./NotFoundScreen-BUTU_-cN.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="496507a6-e6f9-4345-aa2b-74fcd44e3c5b",e._sentryDebugIdIdentifier="sentry-dbid-496507a6-e6f9-4345-aa2b-74fcd44e3c5b")}catch{}})();const w="bill-approval-rule-update",Q=T(function(e){return{approvalView:R(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:n}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(w)&&e(q(!1))},onBackClick:()=>{_(n)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(M(a))},onEditRuleClick:a=>{a!=null?(e(I(a)),t(`./${a}/edit`)):(e(I()),t("./new"))}}})(X(G)),Y=()=>{const e=B(),o=U(),t=j(),[n,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),p=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>N(i)),r=v(i=>R(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(x())},[g]),y.useEffect(()=>{n||p!=="Not-Started"||(a(!0),t(L(!0)))},[n,p,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");y.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(I())),e("./new"))},[u,r,t]);const f={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${w}`]:[],eventCallback:(i,A,m)=>{i.endsWith(w)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx(O,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(V,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(Q,{currentTenant:c,location:o,navigate:e,...f})},Z=T(function(e,o){const t=b(e),n=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=n==="approval_create"&&t.allApprovalRules.length!==0;let u=t.allApprovalRules.length===0;return o.approvalRuleId&&(u=t.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:u,approvalUpdateActionType:n}},function(e,o){const{navigate:t,approvalUpdateDataView:n,approverViewData:a,approvalRuleId:u}=o,s=n.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:p=>{const c=r=>{const g=[];return r.forEach(f=>{const i=f.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),A=f.actors.selectedNonUsers.map(S=>{const D=!!J(S.value);return{type:D?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!D}}),m=i.concat(A);g.push({action:f.stepType.selectedOption,actors:m,operator:m.length>1?f.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g};if(s==="approval_create"){const r={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:p.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:p.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(E(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:p.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:p.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(E(r))}},onResetClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(W())},onSaveRuleSuccess:()=>{t("../")}}})(H);function C(){const e=B(),o=j(),t=U(),{approvalRuleId:n}=$(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>R(r)),[p,c]=y.useState(!1);if(y.useEffect(()=>{p||(c(!0),o(z(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(n!=null?"../../":"../")},[d,n]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(V,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Z,{navigate:e,approvalUpdateDataView:s,approvalRuleId:n,approverViewData:d,location:t})}function se(){return l.jsxs(F,{children:[l.jsx(h,{path:"/",element:l.jsx(Y,{})}),l.jsx(h,{path:"/new",element:l.jsx(C,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(C,{})}),l.jsx(h,{path:"*",element:l.jsx(K,{})})]})}export{se as B};
@@ -1,9 +0,0 @@
1
- import{j as T}from"./liveblocks-DRCozBQX.js";import{a as V}from"./sentry-B4qAfutp.js";import{j as ae,u as ne,h as se,l as ie,g as C,N as oe,k as re}from"./core-D9lzXsHE.js";import{k as ce,y as ue,aK as de,z as E,s as pe,c as B,ac as x,e as z,bu as le,aq as me,j as R,ar as M}from"./index-D4WqoFTE.js";import{ML as fe,eO as G,rN as ye,Ha as Se,xu as ge,Ab as Ie,CK as he,Dn as be,Eg as Oe,N6 as De,N7 as ke,N8 as Te,N9 as Ce,Na as Ve,JF as Ne,M8 as we,JR as Ae,kg as Fe,fA as _e,fz as ve,fy as xe,pO as ze,pF as Ee,pC as Be,k8 as Re,rW as Me,rU as P,bD as L,s6 as U,cu as Pe}from"./zeni-epic-state-CthkBqEW.js";import{n as Le}from"./mui-uwgkpTLc.js";import{c as j}from"./routePaths-C2HBowO1.js";import{M as Ue}from"./MobileAppDrawer-D_MxSFu1.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="1747fe39-2a8f-453f-a804-0a492321ffe5",e._sentryDebugIdIdentifier="sentry-dbid-1747fe39-2a8f-453f-a804-0a492321ffe5")}catch{}})();const je=Le.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,Ge=re(function(e,d){const{businessVerificationDetails:i}=d,r=G(e),y=E.getSignedInUser(),S=r.tenantId,l={userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:S??""},b=Ne(d.roleMap)&&i.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",t=we(e.companyConfigState),s=Ae(e.userRoleConfigState);return{businessVerificationDetails:i,verficationDetailsFetchState:i.fetchState,isRefreshingViewInBackground:i.isRefreshingViewInBackground,allNationalityCountries:i.allNationalityCountries,filesEndPoint:`${me.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:b,allIndustries:t.companyIndustries??[],companyTitles:s.companyTitles}},function(e,d){const{companyId:i,productType:r,currentTenant:y,navigate:S,location:l}=d,{tenantEmailDomain:b}=y;return{onCompanyDetailsChanged:t=>{const{companyDescription:s,companyIndustry:p,companyIndustryType:D,companyLegalName:k,companyTaxId:g,companyWebsite:m,companyPhone:I,primaryContactEmail:c,primaryContactName:n,primaryContactUserId:u,primaryContactSyncToken:O,syncToken:f,fileIds:a,incDate:o,typeOfIncorporation:N,stateOfIncorporation:w,sourceOfFunds:A,companySubIndustry:F,countriesOfOperations:h,companySourceOfFunds:q,companySourceOfFundsDescription:J,transactionVolume:K,transactionVolumeDescription:W,purposeOfAccount:Z,purposeOfAccountDescription:$,regulatedStatus:H,regulatedStatusDescription:Q,usNexus:X,usNexusTypes:Y}=t,_=D?.selectedOption,ee={companyId:i,companyDescription:s,companyIndustry:p.selectedOption,companyIndustryType:_==null||_===""?void 0:_,companyLegalName:k,taxIdOrEIN:g,website:m!=""&&m!=null?Pe(m):void 0,phone:I,syncToken:f,fileIds:a,incDate:o!=null?L(o?.toString()):o,typeOfIncorporation:N?.selectedOption??"",stateOfIncorporation:w?.selectedOption??"",sourceOfFunds:A?.selectedOption??"",companySubIndustry:F?.selectedOption??"",countriesOfOperations:h?.selectedOptions.map(v=>v.length===2?v:M(v))??[],companySourceOfFunds:q?.selectedOption??"",companySourceOfFundsDescription:J,transactionVolume:K?.selectedOption??"",transactionVolumeDescription:W,purposeOfAccount:Z?.selectedOption??"",purposeOfAccountDescription:$,regulatedStatus:H??"",regulatedStatusDescription:Q,usNexus:X,usNexusTypes:Y?.selectedOptions??[]},te={userId:u,firstName:n.firstName,lastName:n.lastName,email:c,syncToken:O};e(U({companyDetails:ee,primaryContactDetails:te}))},onCompanyOfficerUpdated:t=>{const s=t.map(p=>{const{officerType:D,userId:k,name:g,email:m,nationalityCountryCode:I,ssn:c,dob:n,phone:u,syncToken:O,selectDocument:f,role:a,ownership:o,isSelectedForVerification:N,userVerificationStatus:w,treasuryUserVerificationStatus:A,fileIds:F}=p;let h;return f.selectDocumentType==="driverLicense"?h="driving_license":f.selectDocumentType==="passport"?h="passport":f.selectDocumentType==="stateId"?h="id_document":f.selectDocumentType==="ssnCard"&&(h="social_security_card"),{officerType:D,userId:k,firstName:g.firstName,lastName:g.lastName,email:m,ssn:c,nationalityCountryCode:I?.selectedOption!=null?M(I.selectedOption):void 0,phone:u,birthday:n!=null?L(n?.toString()):n,syncToken:O,titleAtCompany:a.selectedOption,ownershipInCompany:o,documentTypeSelectedForVerification:h,isSelectedForVerification:N,userVerificationStatus:w,treasuryUserVerificationStatus:A,fileIds:F,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(U({officers:s}))},onSaveDetailsClick:t=>{e(P(i,t,r))},onSendForVerificationClick:t=>{e(P(i,t,r,!0))},onAddressClick:t=>{const s=j(b,t),p=R(l.state?.pathnameStackToGoBack,l.pathname);S(s,{state:{pathnameStackToGoBack:p}})},onRegisteredAddressClick:t=>{const s=j(b,t),p=R(l.state?.pathnameStackToGoBack,l.pathname);S(s,{state:{pathnameStackToGoBack:p}})},onBackClick:()=>{e(Me({companyId:i})),S("../setup")},updateFilesEntity:t=>{e(Re({files:t}))},onDeleteFile:t=>{e(Be(t))},onDeleteFileList:t=>{e(Ee(t))},onEditFileName:(t,s)=>{e(ze(t,s.split(".")[0]))},onGetOtp:t=>{e(xe(t,"SpendManagementSetup"))},onResendOtp:t=>{e(ve(t,"SpendManagementSetup"))},onVerifyOtp:(t,s)=>{e(_e(t,s,"SpendManagementSetup"))},saveNewAddressInLocalStore:(t,s)=>{e(Fe({addressType:t,addressToCreate:s}))}}})(le),Xe=({productType:e})=>{const d=ae(),i=ne(),r=se(),[y,S]=V.useState(!1),[l,b]=V.useState(!1),{tenantEmailDomain:t}=ie(),s=ce(),{useDynamicConfig:p}=ue(),{configValue:D}=p(de.zeniAccountsConfig),k=fe(D),g=C(a=>{switch(e){case"zeni_accounts":return a.zeniAccountSetupViewState.fetchState;case"reimbursement":return a.remiSetupViewState.fetchState;case"charge_cards":return a.chargeCardSetupViewState.fetchState;case"zeni_treasury":return a.treasurySetupViewState.fetchState;default:return a.billPaySetupViewState.fetchState}}),m=C(a=>a.companyConfigState.fetchState),I=C(a=>a.userRoleConfigState.fetchState),c=C(a=>G(a)),n=c.companyId??E.getSignedInUserTenant(t)?.companyId;if(V.useEffect(()=>{m==="Not-Started"&&r(ye()),I==="Not-Started"&&r(Se(!0))},[m,I,r]),V.useEffect(()=>{if(!y&&g==="Not-Started"&&n!=null)switch(S(!0),e){case"zeni_accounts":r(Oe(n,!0));break;case"zeni_treasury":r(be(n,!0));break;case"reimbursement":r(he(n,!0));break;case"charge_cards":r(Ie(n,!0));break;default:r(ge(n,!0))}},[y,g,n,r]),E.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let u;switch(e){case"zeni_accounts":u=c.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":u=c.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":u=c.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||c.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":u=c.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:u=c.companyBillPayInfo?.info?.isBillPayTOSAccepted}const O=a=>{b(a)},f=C(a=>{let o;switch(e){case"zeni_accounts":o=Ve(a,n);break;case"zeni_treasury":o=Ce(a,n);break;case"charge_cards":o=Te(a,n);break;case"reimbursement":o=ke(a,n);break;default:o=De(a,n)}return o});return u===!1?T.jsx(oe,{to:"../promo"}):T.jsxs(je,{children:[T.jsx(pe,{analytics:B,onLoad:a=>(o=>{switch(e){case"zeni_accounts":return o.trackPageLoaded(z.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return o.trackPageLoaded(z.Event.reimbursementBusinessVerification);default:return o.trackPageLoaded(z.Event.billPayBusinessVerification,x(i)?"Settings":void 0)}})(a)}),x(i)?T.jsx(Ue,{isAppContentDrawerOpen:l,handleDrawerToggle:O}):null,T.jsx(Ge,{businessVerificationDetails:f,navigate:d,location:i,companyId:n,analytics:B,currentTenant:c,productType:e,isSettings:x(i),roleMap:s?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{O(!0)},maxInsuredAmount:k.maxInsuredAmount})]})};export{Xe as B};
@@ -1,11 +0,0 @@
1
- import{j as C}from"./liveblocks-DRCozBQX.js";import{a}from"./sentry-B4qAfutp.js";import{h as D,u as v,g as u,N as w}from"./core-D9lzXsHE.js";import{IO as O,eO as A,fj as j,mv as L,fL as h,fi as U,eP as _,IV as F}from"./zeni-epic-state-CthkBqEW.js";import{u as $,z as c,L as g,D as k,o as H}from"./index-D4WqoFTE.js";import{n as P}from"./mui-uwgkpTLc.js";import{t as z}from"./getLocaleForTenant-BCu2Wbt5.js";import{g as R,Q as V}from"./QBOConnectionScreen-D3kZw9eT.js";import"./recharts-C3UFukkg.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.js";import"./empty-BnWCAzBO.js";import"./pdf-lib-DykPSmmb.js";import"./index-CuyoN034.js";import"./url-D-rSVugE.js";import"./index-CDrFhkvu.js";import"./decodeURIComponentSafe-B4xUD3SX.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]="a30747ce-8ad1-4595-93a5-8c52b283213e",t._sentryDebugIdIdentifier="sentry-dbid-a30747ce-8ad1-4595-93a5-8c52b283213e")}catch{}})();const G=P.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 ${H.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function pe(){const t=D(),i=v(),{setLoading:d,clearAllLoading:x}=$(),p=a.useRef(!1),f=a.useRef(!1),{code:b,realmId:T,state:y}=R(i.search),N=b!==""&&T!==""&&y!=="",I=u(l=>O(l)),e=u(l=>A(l)),n=u(l=>l.tenantState.fetchState),r=u(l=>l.tenantState.activeTenantFetchState.fetchState),o=c.getSignedInUser(),m=c.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,E=e?.externalConnections?.saveConnectionState,S=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{d(g.CONNECTION_AUTH)},[d]),a.useEffect(()=>{p.current||o==null||m==null||(p.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(g.TENANT_FETCHING),t(j(o.userId,m))))},[p,n,d]),a.useEffect(()=>{e.tenantId==null&&!f.current&&o!=null&&(f.current=!0,!(m==null||m!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(L(o.userId)))},[f,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||E!=="Error"||(d(g.CONNECTION_AUTH),t(h(o.userId,e.tenantId)))},[E]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(U(e.tenantId)),c.saveActiveTenantDomainForUser(e.tenantEmailDomain),_(o?.userId,o?.zeniSessionId,e.tenantId),k.updateAppLocaleID(z(F(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(h(o.userId,e.tenantId)))},[n,r,s]),a.useEffect(()=>{I.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&c.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)},[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect(()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||x()},[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:N||S===!1?C.jsx(G,{children:C.jsx(V,{})}):C.jsx(w,{to:"/",replace:!0})}export{pe as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-DRCozBQX.js";import{z as a}from"./index-D4WqoFTE.js";import{g as n}from"./QBOConnectionScreen-D3kZw9eT.js";import"./sentry-B4qAfutp.js";import{u as p,N as s}from"./core-D9lzXsHE.js";import"./zeni-epic-state-CthkBqEW.js";import"./recharts-C3UFukkg.js";import"./mui-uwgkpTLc.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.js";import"./empty-BnWCAzBO.js";import"./pdf-lib-DykPSmmb.js";import"./index-CuyoN034.js";import"./url-D-rSVugE.js";import"./index-CDrFhkvu.js";import"./decodeURIComponentSafe-B4xUD3SX.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]="8d904e89-6b8e-4c86-980c-585a84d9d789",t._sentryDebugIdIdentifier="sentry-dbid-8d904e89-6b8e-4c86-980c-585a84d9d789")}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,23 +0,0 @@
1
- import{j as a}from"./liveblocks-DRCozBQX.js";import{t as $e,A as Ce}from"./AddressScreen-C8epvHKg.js";import ze from"./NotFoundScreen-BUTU_-cN.js";import{a as g}from"./sentry-B4qAfutp.js";import{j as oe,u as se,h as ie,l as re,g as D,N as T,k as ce,i as Me,n as Qe,o as M}from"./core-D9lzXsHE.js";import{n as de,k as le,z as B,y as ue,m as qe,S as _,j as V,s as H,c as N,B as we,e as X,am as Je,Z as Ke,an as ke,f as te,ao as Ze,ap as Ie,o as He,aq as We,ar as Te,as as Xe}from"./index-D4WqoFTE.js";import{bn as Ye,eO as ee,fb as et,eU as pe,eS as me,bv as tt,mt as at,f7 as nt,bN as ot,jc as ae,jf as ve,Ji as st,bS as it,c1 as ge,r$ as he,rM as rt,JP as Y,s0 as _e,Ha as ct,kg as Ue,JQ as Ve,JR as dt,JS as lt,JT as ut,ja as pt,jd as mt,rO as Be,r_ as gt,bD as Ee,cu as ht,sc as xe,pO as ft,pC as yt,k8 as bt,fA as St,fz as Ct,fy as kt,JU as It,rG as Tt,sd as Et,sg as xt,sj as Ot,sp as Pt,cT as At}from"./zeni-epic-state-CthkBqEW.js";import{n as fe}from"./mui-uwgkpTLc.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-D3kZw9eT.js";import"./recharts-C3UFukkg.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.js";import"./empty-BnWCAzBO.js";import"./pdf-lib-DykPSmmb.js";import"./index-CuyoN034.js";import"./url-D-rSVugE.js";import"./index-CDrFhkvu.js";import"./decodeURIComponentSafe-B4xUD3SX.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]="b8039bed-f420-4b9e-a681-0ca49dbe93bb",t._sentryDebugIdIdentifier="sentry-dbid-b8039bed-f420-4b9e-a681-0ca49dbe93bb")}catch{}})();const jt=ce(function(t,o){const s=[];o.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),o.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),o.shouldFetchZeniAccountsPromoCard===!1&&s.push("zeni_accounts_promo_card"),o.shouldFetchRewardsPlanCard===!1&&s.push("rewards_card"),o.isExpenseAutomationEnabledForUser===!1&&s.push("expense_automation_card");const u=nt(t,s,o.signedInUser,o.isExpenseAutomationFeatureEnabledV2,o.isExpenseAutomationEnabledForUser,o.isTreasuryEnabled);return{dashboardFetchState:ot(u.reportsInOrder.map(d=>({fetchState:d.fetchState,error:d.error}))).fetchState}},function(t,o){const{themeState:s,navigate:u,location:d}=o;return{onZeniLogoClick:()=>{s.toggle()},onDashboardFetchDone:()=>{const r=V(d.state?.pathnameStackToGoBack,d.pathname);u("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Je),wt=()=>{const t=oe(),o=se(),s=ie(),u=de(),[d,r]=g.useState(!1),[p,b]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=B.getSignedInUser(),h=Ye(i),{useFeatureGate:m}=ue(),I=qe(),{isFeatureEnabled:E}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:x}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:k}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),$=C||U&&h,c=D(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),j=c.company!=null&&et(c.company),R=L&&j,O=D(l=>l.onboardingCustomerViewState.fetchState),S=c.excludedResources,G=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const w=pe(F,c),P=me(c),A=[],J=S?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,z=S?.resources?.find(l=>l.resource==="/reports/task_card")==null,Q=c?.userRole!=null&&tt(c?.userRole),v=S?.resources?.find(l=>l.resource==="/bills")==null&&!Q,q=S?.resources?.find(l=>l.resource==="/reimbursements")==null;if(J===!1&&A.push("top_expenses"),z===!1&&A.push("task_card"),v===!1&&A.push("bill_pay_card","bill_pay_promo_card"),q===!1&&A.push("reimbursement_card","reimbursement_promo_card"),k===!1&&A.push("zeni_accounts_promo_card"),f===!1&&A.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||w||P||(r(!0),s(at(i.userId,G,c.tenantId,!0,!1,A)))},[d,O,w,P,i,c.tenantId,s]),g.useEffect(()=>{(w||P)&&setTimeout(()=>{b(!0)},5e3)},[w,P]),O!=="Completed")return a.jsx(T,{to:"../"});if(O==="Completed"&&p){const l=V(o.state?.pathnameStackToGoBack,o.pathname);if(w)return a.jsx(T,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}});if(P)return a.jsx(T,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(H,{analytics:N,onLoad:l=>(K=>K.trackPageLoaded(X.Event.onboardingDashboardActivation))(l)}),a.jsx(jt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:E,isArAgingFeatureEnabled:x,shouldFetchZeniAccountsPromoCard:k,shouldFetchRewardsPlanCard:f,isExpenseAutomationEnabledForUser:$,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:R,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(we,{fetchState:"In-Progress",style:{backgroundColor:I.colors.grey5}})},Oe=fe.div`
2
- display: flex;
3
- height: 100vh;
4
- background-color: ${t=>t.theme.colors.grey4};
5
- `,Pe=fe.div`
6
- display: flex;
7
- flex-direction: column;
8
- align-items: center;
9
- min-width: calc(100% - ${Ie}px);
10
- padding-left: ${Ie}px;
11
- flex: 1;
12
-
13
- ${t=>t.theme.breakpoints.down("md")} {
14
- width: 100%;
15
- padding-left: ${He.sp0};
16
- }
17
-
18
- ${t=>t.windowSize!=="small"?"overflow: auto;":""}
19
- `,Ae=ce(function(t,o){const{companyId:s,isAdmin:u,currentTenant:d,isOnAddressPage:r}=o,p=B.getSignedInUser(),b=d.tenantId,e={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:b??""},n=ee(t),i=he(t,s),h=Ve(t),m=ge(d?.userRole??[])&&i.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",I=dt(t.userRoleConfigState);return{onboardingCustomerView:i,analytics:N,isRefreshingViewInBackground:!1,isDisabled:m,companyTitles:I.companyTitles,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:We.fileMicroServiceBaseUrl,authParams:e},signedInUser:B.getSignedInUser(),currentTenant:d,isAdmin:u,isOnAddressPage:r,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",cardPaymentView:h,isCardPaymentPopupOpen:!1,stripeKey:te.stripeKey}},function(t,o){const{companyId:s,currentTenant:u,themeState:d,navigate:r,location:p}=o,{tenantEmailDomain:b}=u;return{onFetchLinkTokenClick:(e,n)=>{t(Pt(e,n))},onEstablishConnectionClick:(e,n)=>{t(Ot(e,n))},onUpdatePaymentAccountStatus:(e,n,i)=>{t(xt(e,n,i))},onUpdatePaymentAccountLoginStatus:(e,n)=>{t(Et(!1,e,n))},onEstablishConnectionSuccess:()=>{t(Tt(s,!0,!1))},handleOnConnectClick:()=>{N.trackOnboardingConnectQBO(),ne.handleClick()},updateQBOPopupState:e=>{t(Y({isQBOPopupOpen:e}))},onCompanyOfficerUpdated:e=>{const n=e.map(i=>{const{officerType:h,userId:m,name:I,email:E,ssn:x,nationalityCountryCode:k,dob:f,phone:U,syncToken:C,selectDocument:F,role:$,ownership:c,isSelectedForVerification:L,userVerificationStatus:j,fileIds:R,isPhoneVerified:O}=i;let S;return F.selectDocumentType==="driverLicense"?S="driving_license":F.selectDocumentType==="passport"?S="passport":F.selectDocumentType==="stateId"?S="id_document":F.selectDocumentType==="ssnCard"&&(S="social_security_card"),{officerType:h,userId:m,firstName:I.firstName,lastName:I.lastName,email:E,ssn:x,nationalityCountryCode:k?.selectedOption!=null?Te(k.selectedOption):void 0,phone:U,birthday:f!=null?Ee(f?.toString()):f,syncToken:C,titleAtCompany:$.selectedOption,ownershipInCompany:c,documentTypeSelectedForVerification:S,isSelectedForVerification:L,userVerificationStatus:j,fileIds:R,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:O}});t(xe({officers:n}))},onGetOtp:(e,n)=>{t(kt(e,"CustomerOnboarding")),n!=null&&t(It({officerType:n,phone:e}))},onResendOtp:e=>{t(Ct(e,"CustomerOnboarding"))},onVerifyOtp:(e,n)=>{t(St(e,n,"CustomerOnboarding"))},updateFilesEntity:e=>{t(bt({files:e}))},onDeleteFile:e=>{t(yt(e))},onEditFileName:(e,n)=>{t(ft(e,n.split(".")[0]))},onCompanyDetailsChanged:e=>{const{companyDescription:n,companyIndustry:i,companyIndustryType:h,companyLegalName:m,companyTaxId:I,companyWebsite:E,companyPhone:x,primaryContactEmail:k,primaryContactName:f,primaryContactUserId:U,primaryContactSyncToken:C,syncToken:F,fileIds:$,typeOfIncorporation:c,stateOfIncorporation:L,incDate:j,companySourceOfFunds:R,companySourceOfFundsDescription:O,companySubIndustry:S,countriesOfOperations:G,purposeOfAccount:w,purposeOfAccountDescription:P,regulatedStatus:A,regulatedStatusDescription:J,transactionVolume:z,transactionVolumeDescription:Q,usNexus:v,usNexusTypes:q}=e,l={companyId:s,companyDescription:n,companyIndustry:i.selectedOption,companyIndustryType:h?.selectedOption??"",companyLegalName:m,taxIdOrEIN:I,website:E!=""&&E!=null?ht(E):void 0,phone:x,syncToken:F,fileIds:$,incDate:j!=null?Ee(j?.toString()):j,typeOfIncorporation:c?.selectedOption??"",stateOfIncorporation:L?.selectedOption??"",companySourceOfFunds:R?.selectedOption??"",companySourceOfFundsDescription:O,companySubIndustry:S?.selectedOption??"",countriesOfOperations:G?.selectedOptions.map(Z=>Z.length===2?Z:Te(Z))??[],purposeOfAccount:w?.selectedOption??"",purposeOfAccountDescription:P,regulatedStatus:A??"",regulatedStatusDescription:J,transactionVolume:z?.selectedOption??"",transactionVolumeDescription:Q,usNexus:v,usNexusTypes:q?.selectedOptions??[]},K={userId:U,firstName:f.firstName,lastName:f.lastName,email:k,syncToken:C};t(xe({companyDetails:l,primaryContactDetails:K}))},onAddressClick:(e,n)=>{const i=De(b,e,n),h=V(p.state?.pathnameStackToGoBack,p.pathname);r(i,{state:{pathnameStackToGoBack:h}})},onRegisteredAddressClick:(e,n)=>{const i=De(b,e,n),h=V(p.state?.pathnameStackToGoBack,p.pathname);r(i,{state:{pathnameStackToGoBack:h}})},onUpdateCustomerView:(e,n,i)=>{t(gt(s,!1,n,i,e))},onAddressEditHandler:e=>{if(e!=null){const n=$e(e);t(Ue({addressType:"subscription_billing_address",addressToCreate:n}))}},onSkipSetupClick:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);t(Be(s,!1,!1)),r("./activation",{state:{pathnameStackToGoBack:e}})},onUpdateStep:e=>{t(_e({step:e}))},onZeniLogoClick:()=>{d.toggle()},handleLogOutClick:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleCreateCardSetupIntent:e=>{t(ve(e))},handleConfirmCardSetupIntent:e=>{t(mt(e))},updateCardPaymentModalState:e=>{t(Y({isCardPaymentPopupOpen:e}))},handleAddCardPaymentSource:(e,n,i)=>{t(pt(e,n,i))},handleFetchPaymentSources:()=>{t(ae())},resetCardPaymentViewState:()=>{t(ut())},handleResetCardPaymentErrorStatuses:()=>{t(lt())},redirectToProductSuitePage:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);r(`/${b}/onboarding/thankyou`,{state:{pathnameStackToGoBack:e,message:"OnboardingThankyou"},replace:!0})}}})(Ze),W=({taxCFOCustomer:t=!1,isOnAddressPage:o=!1,appContent:s})=>{const u=oe(),d=se(),r=ie(),p=Ke(),b=de(),[e,n]=g.useState(!1),[i,h]=g.useState(!1),[m,I]=g.useState(!1),{tenantEmailDomain:E}=re(),x=le(),{useFeatureGate:k}=ue(),{isFeatureEnabled:f}=k(_.isDebitCardFeatureEnabled),U=Me("/:tenantEmailDomain/onboarding")!==null&&d.search?.includes("code"),C=D(y=>y.onboardingCustomerViewState.fetchState),F=D(y=>y.onboardingCustomerViewState.currentStep),$=D(y=>y.onboardingCustomerViewState.uiState),c=D(y=>ee(y)),L=D(y=>y.userRoleConfigState.fetchState),j=D(y=>y.cardPaymentViewState),R=ke(j.addCardPaymentSourceStatus.fetchState),O=j.addCardPaymentSourceStatus.fetchState,{code:S,realmId:G,state:w}=Dt(d.search),P=c.externalConnections?.accounting[0],A=P?.connectionType,J=P?.connectionName,z=P?.connectionId??"",Q=B.getSignedInUser()?.userId??"";g.useEffect(()=>{i||(h(!0),r(ae()))},[i,r]),g.useEffect(()=>{m||(ve(["card"]),I(!0))},[m]),g.useEffect(()=>{R==="In-Progress"&&O==="Completed"&&r(ae())},[R,O]),g.useEffect(()=>{Ft(S,G,w,z,Q)===!0&&c.externalConnections?.saveConnectionState!=="In-Progress"&&C==="Completed"&&(r(st(c.tenantId,{connection_type:A??"accounting",connection_name:J??"quickbooks_online",authorization_code:S,realm_id:G,connection_id:z,user_id:Q},it(window.location.origin+"/onboarding/auth"))),N.trackOnboardingSaveQBOConnection(G,z),u(d.pathname))},[S,G,w,d.pathname,C]),g.useEffect(()=>{ne.isInitiated===!1&&C==="Completed"&&ne.init("/onboarding/auth",c.tenantEmailDomain)},[C]);const v=c.companyId??B.getSignedInUserTenant(E)?.companyId,q=ge(c?.userRole??[]),l=D(y=>he(y,v));g.useEffect(()=>{e||C!=="Not-Started"||v==null||(n(!0),r(rt(v,!0,!U)))},[e,C,v]),g.useEffect(()=>{c.externalConnections?.saveConnectionState!=="Completed"&&c.externalConnections?.saveConnectionState!=="Error"||!$.isQBOPopupOpen||F!=="qbo_connection"||r(Y({isQBOPopupOpen:!1}))},[c.externalConnections?.saveConnectionState]),g.useEffect(()=>{C==="Completed"&&U&&(r(_e({step:"qbo_connection"})),r(Y({isQBOPopupOpen:!0})))},[U,C]),g.useEffect(()=>{L==="Not-Started"&&r(ct(!0))},[L,r]);const K=ke(l.companyDetailsLocalData?.addressStatus);g.useEffect(()=>{l.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&l.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&K==null&&r(Ue({addressType:"company_registered_address",addressToCreate:l.companyDetailsLocalData?.addressStatus?.addressToCreate}))},[l.companyDetailsLocalData?.addressStatus?.addressToCreate,l.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const Z=l.isInterimEmailSent;if(B.getSignedInUser()==null)throw Error("Can't access onboarding flow without signing in...");const Le=pe(f,c),Re=me(c),ye=c.company?.companyOnboardingInfo.isOnboardingCompleted,be=y=>y.trackPageLoaded(X.Event.onboardingPage),Se=c.productSettings.isOtherProductsEnabled,Ge=c.productSettings.isTreasuryEnabled;if(ye===!0){if(!Se)return Ge?a.jsx(T,{to:"../../treasury"}):Le?a.jsx(T,{to:"../../checking"}):Re?a.jsx(T,{to:"../../cards"}):a.jsx(T,{to:"../../dashboard"});const y=l.updateStatus.fetchState==="In-Progress";if(Se&&!y)return t?a.jsxs(Oe,{children:[a.jsx(H,{analytics:N,onLoad:Ne=>be(Ne)}),a.jsx(Ae,{navigate:u,location:d,companyId:v,currentTenant:c,isAdmin:q,isOnAddressPage:o,themeState:b,googleAPIKey:te.googleMapsAPIKey}),s!=null?a.jsx(Pe,{windowSize:p,children:s}):null]}):a.jsx(T,{to:"../../onboarding/thankyou"})}else if(ye===!1&&x?.loggedInUserRoleMap!=null)return Z===!0?a.jsx(T,{to:"../../onboarding/thankyou"}):a.jsxs(Oe,{children:[a.jsx(H,{analytics:N,onLoad:y=>be(y)}),a.jsx(Ae,{navigate:u,location:d,companyId:v,currentTenant:c,isAdmin:q,isOnAddressPage:o,themeState:b,googleAPIKey:te.googleMapsAPIKey}),s!=null?a.jsx(Pe,{windowSize:p,children:s}):null]});return null};function De(t,o,s){let u=`/${t}/onboarding/address`;return u=s!=null?u.concat(`/edit/${o}/${encodeURIComponent(s)}`):u.concat(`/new/${o}`),u}const Fe=fe.div`
20
- display: flex;
21
- height: 100vh;
22
- background-color: ${t=>t.theme.colors.grey4};
23
- `,je=ce(function(t,o){const{companyId:s,currentTenant:u}=o,d=he(t,s),r=Ve(t);return{hasVerifiedBankAccount:(d.paymentAccount?.providerVerificationStatus?.code?.includes("verified")??!1)||(r.bankAccountsList[0]?.providerVerificationStatus?.code?.includes("verified")??!1),isDisabled:ge(u?.userRole??[])&&d.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:B.getSignedInUser(),currentTenant:u,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(t,o){const{currentTenant:s,themeState:u,navigate:d,location:r}=o,{tenantEmailDomain:p}=s;return{onZeniLogoClick:()=>{u.toggle()},handleLogOutClick:()=>{const b=V(r.state?.pathnameStackToGoBack,r.pathname);d("/signout",{replace:!0,state:{pathnameStackToGoBack:b,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleUpdatePaymentAddressDetailClick:()=>{const b=V(r.state?.pathnameStackToGoBack,r.pathname);d(`/${p}/onboarding/billing/edit`,{state:{pathnameStackToGoBack:b,message:"UpdatePaymentAddressDetail"}})}}})(Xe),vt=()=>{const t=oe(),o=ie(),s=se(),u=de(),{useFeatureGate:d}=ue(),{isFeatureEnabled:r}=d(_.isDebitCardFeatureEnabled),{tenantEmailDomain:p}=re(),b=le(),[e,n]=g.useState(!1);g.useEffect(()=>{e===!1&&s.state?.message==="OnboardingThankyou"&&n(!0)},[s.state]);const i=D(f=>ee(f)),h=i.productSettings.isOtherProductsEnabled;g.useEffect(()=>{o(Be(m,!1,!h))},[]);const m=i.companyId??B.getSignedInUserTenant(p)?.companyId;if(b.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const I=pe(r,i),E=me(i),x=D(f=>f.onboardingCustomerViewState.updateStatus.fetchState),k=i.company?.companyOnboardingInfo.isOnboardingCompleted;return k!==!0||h?x==="Completed"&&k===!0&&h&&b?.loggedInUserRoleMap!=null?a.jsxs(Fe,{children:[a.jsx(H,{analytics:N,onLoad:f=>{f.trackPageLoaded(X.Event.onboardingLandingPage,"Onboarding",At(i.productSettings))}}),a.jsx(je,{navigate:t,showUpdatePaymentDetailButton:h,location:s,companyId:m,currentTenant:i,themeState:u,isVisitingFirstTime:e})]}):x==="Completed"&&k===!1&&b?.loggedInUserRoleMap!=null?a.jsxs(Fe,{children:[a.jsx(H,{analytics:N,onLoad:f=>{f.trackPageLoaded(X.Event.onboardingInterimPage)}}),a.jsx(je,{navigate:t,showUpdatePaymentDetailButton:h,location:s,companyId:m,currentTenant:i,themeState:u,isVisitingFirstTime:e})]}):a.jsx(we,{fetchState:x}):I?a.jsx(T,{to:"../../checking"}):E?a.jsx(T,{to:"../../cards"}):a.jsx(T,{to:"../../dashboard"})};function oa(){return a.jsxs(Qe,{children:[a.jsx(M,{path:"/",element:a.jsx(W,{})}),a.jsx(M,{path:"/billing/edit",element:a.jsx(W,{taxCFOCustomer:!0})}),a.jsx(M,{path:"/thankyou",element:a.jsx(vt,{})}),a.jsx(M,{path:"/activation",element:a.jsx(wt,{})}),a.jsx(M,{path:"/address/edit/:addressType/:addressId",element:a.jsx(W,{isOnAddressPage:!0,appContent:a.jsx(Ce,{})})}),a.jsx(M,{path:"/address/new/:addressType",element:a.jsx(W,{isOnAddressPage:!0,appContent:a.jsx(Ce,{})})}),a.jsx(M,{path:"*",element:a.jsx(ze,{})})]})}export{oa as default};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-DRCozBQX.js";import{j as w,u as C,g as h,k as A,l as B}from"./core-D9lzXsHE.js";import{MR as k,MY as _,fA as J,fz as Q,fy as W,ix as Y,JZ as q,pF as K,eO as V,Mn as D,iv as F,MS as S,M$ as T,it as G,iQ as j}from"./zeni-epic-state-CthkBqEW.js";import{bn as L,Z as R,y as N,z as U,m as Z,p,S as v,B as M,bo as X,o as O,bp as ee,j as te}from"./index-D4WqoFTE.js";import{n as z}from"./mui-uwgkpTLc.js";import"./sentry-B4qAfutp.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]="0781d8c8-4318-4fa1-b554-bfe8596adffa",e._sentryDebugIdIdentifier="sentry-dbid-0781d8c8-4318-4fa1-b554-bfe8596adffa")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),n!=null&&e(K(n))},onGetOtp:n=>{e(W(n,"BillPayVendor"))},onResendOtp:n=>{e(Q(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(J(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(L);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(i=>k(i,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=A(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),i=s.poppedPathname??E();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:i}=s;e(T({data:i}))},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),i=s.poppedPathname??E(0);t.navigate(i,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(X);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:i}=B(),c=e??s,{useFeatureGate:r}=N(),d=U.getSignedInUser(),b=h(u=>V(u)),g=Z(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(M,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:i}),l.jsx(oe,{location:a,navigate:n,billId:i,vendorId:c,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(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},$=(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 $(e,"ach",t,n)}function ve(e,t,n){return $(e,"domestic",t,n)}function ge(e,t,n){return $(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},re=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 ${O.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,ie=A(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:i}=t,{tenantEmailDomain:c}=i;return{onFetchBankName:r=>{e(j(r))},onSaveHandler:r=>{e(G(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:d}=r;e(T({data:d}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),d=r.poppedPathname??P();a(d,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const d=se(c,r,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(d,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),d=r.poppedPathname??P(0);t.navigate(d,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:i}=B(),c=e??s,r=U.getSignedInUser(),{useFeatureGate:d}=N(),b=Z(),g=h(u=>V(u)),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=d(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(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(M,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${O.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:i}),l.jsx(ie,{location:a,navigate:n,billId:i,vendorId:c,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(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 i}from"./liveblocks-DRCozBQX.js";import{Z as l,C as c,m as f}from"./index-D4WqoFTE.js";import{D as p}from"./mui-uwgkpTLc.js";import"./sentry-B4qAfutp.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="f8ace2f2-59d3-4d7c-88a8-3d7139be3b09",e._sentryDebugIdIdentifier="sentry-dbid-f8ace2f2-59d3-4d7c-88a8-3d7139be3b09")}catch{}})();const b={drawerLeftMargin:new c(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=l(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{m as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-DRCozBQX.js";import{a as d}from"./sentry-B4qAfutp.js";import{j as B,h as G,u as q,l as O,g as l,N as F,k as _,n as N,o as z}from"./core-D9lzXsHE.js";import{L4 as H,eO as J,Kt as K,kA as Y,H2 as k,L9 as L,JY as M,jA as R,H3 as S,Ky as W,Kz as $,J_ as V,JZ as Z}from"./zeni-epic-state-CthkBqEW.js";import{aO as Q,c as U,p as X,j as tt}from"./index-D4WqoFTE.js";import"./mui-uwgkpTLc.js";import{d as b}from"./decodeURIComponentSafe-B4xUD3SX.js";import{w as et}from"./withTransactionSidePanel-DhelGbXD.js";import{e as at,b as nt}from"./routePaths-C2HBowO1.js";import"./recharts-C3UFukkg.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.js";import"./useAskAiCfoHostNavButtonProps-mLaTPohd.js";import"./useFetchSuggestedQuestionsWhenReady-Y2W_vLVT.js";import"./TransactionDetailScreen-C7MA74ac.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]="9ed777a8-ba8e-4435-b0c9-32284e6e9ab9",a._sentryDebugIdIdentifier="sentry-dbid-9ed777a8-ba8e-4435-b0c9-32284e6e9ab9")}catch{}})();const ot=_(function(a,t){const e=t.entity,o=L(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:M(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:R(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(V({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Z("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(W()),a($()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=X(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();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(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=B(),o=G(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:w}=O(),r=b(j??""),p=b(w??""),u=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>H(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=l(n=>J(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>K(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(Y(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,A=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:I(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(N,{children:s.jsx(z,{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-DRCozBQX.js";import{a as r}from"./sentry-B4qAfutp.js";import{X as l,Y as p,a0 as b,p as d}from"./index-D4WqoFTE.js";import"./mui-uwgkpTLc.js";import m from"./NotFoundScreen-BUTU_-cN.js";import{j as c,u}from"./core-D9lzXsHE.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]="3e0f241e-ef5a-4985-bb0b-24a3b9aea331",e._sentryDebugIdIdentifier="sentry-dbid-3e0f241e-ef5a-4985-bb0b-24a3b9aea331")}catch{}})();const D=()=>{const e=c(),a=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=d(a.state?.pathnameStackToGoBack),f=n.poppedPathname??k();e(f,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:b(o),onDemoClick:t,onGoBack:i}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{D as F};
@@ -1 +0,0 @@
1
- import{a as r}from"./sentry-B4qAfutp.js";import{h as l,j as f,u as m}from"./core-D9lzXsHE.js";import{gt as p,Ja as g,Jb as b}from"./zeni-epic-state-CthkBqEW.js";import{u as _,L as h,z as y}from"./index-D4WqoFTE.js";import"./liveblocks-DRCozBQX.js";import"./recharts-C3UFukkg.js";import"./mui-uwgkpTLc.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="768ad7e3-0477-4b5f-8592-ca18cc93b2ab",e._sentryDebugIdIdentifier="sentry-dbid-768ad7e3-0477-4b5f-8592-ca18cc93b2ab")}catch{}})();function C(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:d}=_(),a=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{C as default};
@@ -1,72 +0,0 @@
1
- import{j as a}from"./liveblocks-DRCozBQX.js";import{l as S,k as f,j as C,u as y,h as ee,q as ae,g as E,N as te,n as ne,o as p}from"./core-D9lzXsHE.js";import{J3 as k,J4 as j,J5 as T,z8 as B,yW as G,J6 as D,J7 as oe,J8 as se,y_ as ie,eP as $,z5 as le,z2 as re}from"./zeni-epic-state-CthkBqEW.js";import{Z as g,o as r,O as de,c as v,f as J,i as ce,p as me,h as pe,j as _,y as ue,S as he,F as fe,n as ge,m as xe,q as we,B as be,s as Se,T as ye,w as ke,A as je,C as ve,N as $e}from"./index-D4WqoFTE.js";import{n as m}from"./mui-uwgkpTLc.js";import x from"./NotFoundScreen-BUTU_-cN.js";import{a as I}from"./sentry-B4qAfutp.js";import"./recharts-C3UFukkg.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.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]="80c421df-fab2-45ca-8b5b-f6cac0fd53f9",e._sentryDebugIdIdentifier="sentry-dbid-80c421df-fab2-45ca-8b5b-f6cac0fd53f9")}catch{}})();const Ie=m.div`
2
- display: flex;
3
- height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=f(function(e){const t=k(e),n=j(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(de);function F(){const e=g(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(x,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Be=m.div`
11
- display: flex;
12
- height: 100vh;
13
- width: 100%;
14
- flex: 1 1 auto;
15
- flex-direction: column;
16
- align-items: center;
17
- background-color: ${e=>e.theme.colors.grey4};
18
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,De=f(function(e,t){const{isSubPage:n}=t;return{addressToEdit:D(e),googleAPIKey:J.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??ze();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=Pe(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function Ae({isSubPage:e}){const t=C(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx(Be,{windowSize:o,children:a.jsx(De,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:J.googleMapsAPIKey})})})}const ze=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Pe=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}),Ne=m.div`
20
- display: flex;
21
- height: 100%;
22
- width: 100%;
23
- flex: 1 1 auto;
24
- flex-direction: column;
25
- align-items: center;
26
- background-color: ${e=>e.theme.colors.grey4};
27
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Le=f(function(e){const t=k(e),n=j(e),o=D(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(T({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=_(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?a.jsx(x,{}):a.jsx(a.Fragment,{children:a.jsx(Ne,{windowSize:n,children:a.jsx(Le,{location:t,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
29
- display: flex;
30
- height: 100%;
31
- width: 100%;
32
- flex: 1 1 auto;
33
- flex-direction: column;
34
- align-items: center;
35
- background-color: ${e=>e.theme.colors.grey4};
36
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Te=f(function(e){const t=k(e),n=j(e),o=D(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"international",s,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=_(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(fe);function Ge(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(x,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Te,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Je={containerWidth:new ve(100,58)},_e=m(ke)`
38
- width: ${r.sp4};
39
- height: ${r.sp4};
40
- margin-bottom: ${r.sp3};
41
- margin-top: ${r.sp3};
42
- margin-left: ${r.sp8};
43
- cursor: pointer;
44
- position: absolute;
45
- color: ${e=>e.theme.colors.brandColorJade};
46
- `,He=m.div`
47
- display: flex;
48
- height: 100vh;
49
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
- width: 100vw;
51
- overflow-y: scroll;
52
- background-color: ${e=>e.theme.colors.grey4};
53
- `,Me=m.div`
54
- display: flex;
55
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
- flex-direction: column;
57
- width: ${e=>`${Je.containerWidth.value(e.windowSize)}%`};
58
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
60
- padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
61
- `,Ve=m.div`
62
- display: flex;
63
- flex-direction: column;
64
- align-items: center;
65
- justify-content: center;
66
- padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
67
- height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
- overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
- width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
- background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
- margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,We=f(function(e,t){return{file:t.file,type:t.type}})(je);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=ae(),d=i.get("token"),H=n.pathname.includes("address"),w=g(),M=ge(),A=xe(),b=we(),V=()=>{M.toggle()},W=E(u=>k(u)),K=E(u=>j(u)),{authParams:U,fetchState:c,billAttachment:q,billFetchState:z,companyName:O,currencySymbol:Q,amount:R}=W,{tenantId:P,userId:N,sessionId:L}=U,{fetchState:Z,internationalBankAccountCreateStatus:X}=K;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&t(le(s,o,d))},[b,c,s,o,d,t]),I.useEffect(()=>{b&&c==="Completed"&&($(N,L,P),l!=null&&t(re(l)))},[c,b,N,L,P,l,t]),c==="Error"?a.jsx(x,{}):Z==="Completed"||X.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&z==="Completed"&&a.jsx(Se,{analytics:v,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",O,l??"",Ke(n.pathname),Q,R))(u)}),a.jsxs(He,{windowSize:w,children:[w!=="small"?a.jsx(_e,{onClick:V}):null,a.jsx(Ve,{windowSize:w,isAddressPage:H,children:z==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(We,{file:q,type:"bill"})}),a.jsx(Me,{windowSize:w,children:e})]})]})}const Ke=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Ue(){return a.jsx($e,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Ue,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Ae,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Ge,{})})}),a.jsx(p,{path:"*",element:a.jsx(x,{})})]})}export{da as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-DRCozBQX.js";import{a as g}from"./sentry-B4qAfutp.js";import{h as O,u as _,j as w,q as P,g as l,N as T}from"./core-D9lzXsHE.js";import{z as r,m as M,D as V,d as A,c as N,e as R,v as W,T as $,g as q}from"./index-D4WqoFTE.js";import{eO as H,IQ as J,I_ as Q,IR as B,eP as G,fi as K,IW as X,fH as Y,cT as Z,I$ as ee,J0 as te}from"./zeni-epic-state-CthkBqEW.js";import{n as ne}from"./mui-uwgkpTLc.js";import{u as ae}from"./useDeviceId-CF-PoIcu.js";import{f as se}from"./analyticsHelper-DhFEnfI7.js";import{t as ie}from"./getLocaleForTenant-BCu2Wbt5.js";import"./recharts-C3UFukkg.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="f82c82fa-02d9-46a6-b1cb-d27e6a6eb4ca",t._sentryDebugIdIdentifier="sentry-dbid-f82c82fa-02d9-46a6-b1cb-d27e6a6eb4ca")}catch{}})();const D=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function De(){const t=O(),s=_(),m=w(),[k]=P(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),a=l(e=>e.tenantState.loggedInUser),o=l(e=>H(e)),b=l(e=>J(e)),E=r.getSignedInUser(),v=M().mode;g.useEffect(()=>{a?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(Q(n,i,f)))},[n,p,t,i,f,a?.zeniSessionId]),g.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&y!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants(B(b.tenantsInOrder),a.zeniSessionId),G(a.userId,a.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),se(a,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=q();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(R.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,y,a,o,b,v,s.state,t]);const U=g.useCallback(()=>{m("/signin/auth")},[m]),j=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(W,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:U});if(S==="In-Progress"&&I==="Completed"&&a?.zeniSessionId!=null&&o!=null||E!=null){const e=s.state?.origin??"/";return u.jsx(T,{to:e,state:{...s.state,origin:""}})}if(!D(n,p)||f==null||h==="Error"){const e=s.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx($,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- display: flex;
8
- align-items: center;
9
- justify-content: center;
10
- z-index: 9999;
11
- background-color: ${t=>t.theme.colors.background};
12
- `;export{De as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-DRCozBQX.js";import{j as r,k as i}from"./core-D9lzXsHE.js";import{K as n}from"./index-D4WqoFTE.js";import"./mui-uwgkpTLc.js";import"./sentry-B4qAfutp.js";import"./zeni-epic-state-CthkBqEW.js";import"./recharts-C3UFukkg.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="8be0e406-e338-494a-8e0a-372030582bac",o._sentryDebugIdIdentifier="sentry-dbid-8be0e406-e338-494a-8e0a-372030582bac")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
@@ -1 +0,0 @@
1
- import{l as ct,a as mt,m as dt,j as _}from"./liveblocks-DRCozBQX.js";import lt from"./NotFoundScreen-BUTU_-cN.js";import{a as k}from"./sentry-B4qAfutp.js";import{j as ft,u as ut,l as ht,h as pt,g as S,k as kt,n as gt,o as X}from"./core-D9lzXsHE.js";import{cq as St,eX as Q,eO as H,fa as bt,f2 as b,Pj as K,f6 as d,eW as y,qA as $,vV as It,Pk as Ct,eV as Tt,fd as yt,qF as At,Pl as F,bq as M,gM as w,qJ as O,Pm as Et,cB as _t,cv as Nt}from"./zeni-epic-state-CthkBqEW.js";import{R as Bt,z as xt,y as wt,S as Pt,ct as Rt,j as N,a3 as vt,cu as Dt,a4 as Ut,p as Gt}from"./index-D4WqoFTE.js";import"./mui-uwgkpTLc.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-mLaTPohd.js";import{c as Mt}from"./useFetchSuggestedQuestionsWhenReady-Y2W_vLVT.js";import"./recharts-C3UFukkg.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="83fe8d37-993d-4219-988a-6dac5377a1a9",t._sentryDebugIdIdentifier="sentry-dbid-83fe8d37-993d-4219-988a-6dac5377a1a9")}catch{}})();const $t=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=Q(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:P}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(O("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t(F([a],M())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!_t(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(K(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Et(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t($("task_manager","dashboard",m))}else P?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(O("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t(F([r],M())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(At("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),$t(s,B).then(()=>{t(F(s,M())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Gt(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(vt(Dt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Bt(),i=St(u??""),s=pt(),h=xt.getSignedInUser(),[B,P]=k.useState(!1),a=S(e=>Q(e)),o=S(e=>H(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Pt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Mt({isDataReady:!0});const Y=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),v=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Rt().allUsers,{inboxNotifications:x,isLoading:A,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:q,isLoading:W,fetchMore:z,isFetchingMore:J,hasFetchedAll:L}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(K(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(A===!1&&C===!0&&o?.companyId!=null&&x!=null){const e=`dashboard_${o.companyId}`,p=x.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[A,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s($("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const U=A||D===!0||C!==!0||A||D===!0||C!==!0;k.useEffect(()=>{U&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[U,v]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(P(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(A===!1&&W===!1&&x!=null&&q!=null){const e=`dashboard_${o.companyId}`,p=x.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),it=p.map(f=>{const G=q.find(rt=>rt.id===f.threadId);return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(J||L===!0||z==null||z(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(y({totalCount:E.length,unreadCount:T.length},"comments")),s(Ct(it))}},[A,D,J,C,L,W,x?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Ut(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];R==="all"?E.push("read","unread"):R!=="mentions"&&E.push(R),s($("task_manager",T,E,!0))}}}},nt=dt();return _.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Y,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ie(){return _.jsxs(gt,{children:[_.jsx(X,{path:"/:selectedTab",element:_.jsx(Vt,{})}),_.jsx(X,{path:"*",element:_.jsx(lt,{})})]})}export{ie as default};
@@ -1 +0,0 @@
1
- import{j as f}from"./liveblocks-DRCozBQX.js";import{a as r}from"./sentry-B4qAfutp.js";import{h as A,u as C,g as o,N as J}from"./core-D9lzXsHE.js";import{Jd as P,eO as j,f1 as x,Je as z,Jf as D,Jg as M,Jh as R,mv as k,I9 as L}from"./zeni-epic-state-CthkBqEW.js";import{z as h,_ as I}from"./index-D4WqoFTE.js";import"./mui-uwgkpTLc.js";import"./recharts-C3UFukkg.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="8a1b9db3-7dc9-47e5-8731-014891e22a78",n._sentryDebugIdIdentifier="sentry-dbid-8a1b9db3-7dc9-47e5-8731-014891e22a78")}catch{}})();function ee(){const n=A(),s=C(),{params:t,error:i}=r.useMemo(()=>P(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o(e=>j(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),y=o(z),b=o(D),u=o(M),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[p,a,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const U=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),c=v??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(L(a.userId,a.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(J,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -1 +0,0 @@
1
- import{j as n}from"./liveblocks-DRCozBQX.js";import{j as W,h as z,u as Z,l as H,g as d,k as K,n as Q,o as I}from"./core-D9lzXsHE.js";import{eO as P,qo as R,pY as X,JM as v,pT as C,bv as ee,bn as ae,bS as te,pU as se,JN as oe,Jy as S,dC as re,tS as ne,JO as ce,ud as ie,eU as le,eS as de}from"./zeni-epic-state-CthkBqEW.js";import{z as me,R as fe,k as pe,y as M,S as w,s as ue,c as $,al as he,j as ge}from"./index-D4WqoFTE.js";import"./mui-uwgkpTLc.js";import Fe from"./NotFoundScreen-BUTU_-cN.js";import{F as be}from"./FeaturePreviewScreen-BCRZsfyQ.js";import{a as g}from"./sentry-B4qAfutp.js";import{u as Ie}from"./useAskAiCfoHostNavButtonProps-mLaTPohd.js";import{c as Se}from"./useFetchSuggestedQuestionsWhenReady-Y2W_vLVT.js";import{u as Ce}from"./useInitialThreadRequest-Cw2FMHcf.js";import{t as ye}from"./routePaths-C2HBowO1.js";import{M as Te}from"./MobileAppDrawer-D_MxSFu1.js";import"./recharts-C3UFukkg.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="0afcccfd-5ece-4bb8-915f-63611d6e81df",s._sentryDebugIdIdentifier="sentry-dbid-0afcccfd-5ece-4bb8-915f-63611d6e81df")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=K(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(C(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=re(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=ye(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(he);function U(){const s=W(),e=z(),a=Z(),{forecastId:o,tenantEmailDomain:r}=H(),[c,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),T=d(t=>P(t)),N=T.company?.companyInfo.firstMonthOfFY??1,i=d(t=>R(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();Se({isDataReady:l});const{isAiCfoAccessEnabled:q,onAskAiCfoClick:B}=Ie({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!c&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,O)=>L!=null?f.forecasts.findIndex(b=>b.id===L):O!=null?f.forecasts.findIndex(b=>b.id===O):f.forecasts.length>0?0:-1)(i,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(i.forecasts[t].id,t)),y(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&y(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&F&&e(C(i.forecasts[t].id))}},[c,p,e,l,i,m,u,R,C,F]);const D=pe(),Y=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:_}=M(),{isFeatureEnabled:j}=_(w.isReportsCommentingEnabled),G=Ce(j?T?.companyId:void 0,{clearParams:l&&m}),[J,V]=g.useState(!1),E=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ue,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Te,{isAppContentDrawerOpen:J,handleDrawerToggle:E}),n.jsx(ke,{firstMonthOfFY:N,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:Y,isAiCfoAccessEnabled:q,onAskAiCfoClick:B,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function We(){const s=d(c=>P(c)),{useFeatureGate:e}=M(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(Q,{children:[n.jsx(I,{path:"/",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(Fe,{})})]})}export{We as PandLWithForecastRoutes,We as default};
@@ -1,22 +0,0 @@
1
- import{j as s}from"./liveblocks-DRCozBQX.js";import{JH as te,eO as Y,jA as H,eU as q,eS as ne,H6 as N,Jl as oe,s_ as Ee,JI as X,sO as ke,t7 as Ie,t1 as ie,sS as re,t5 as Pe,t2 as je,JJ as le,uE as Le,JK as Te,fx as ve,JL as J,sX as de,sV as ce,ta as Fe,c1 as Ae}from"./zeni-epic-state-CthkBqEW.js";import{Z as pe,y as Q,S as E,z,a6 as ue,E as me,ah as ge,ai as Oe,C as he,o as O,G as fe,D as Ce,aj as Re,R as Ve,s as Ue,c as be,e as Ze,j as Be,ak as $e,k as Je}from"./index-D4WqoFTE.js";import{D as ye,n as W,S as Se}from"./mui-uwgkpTLc.js";import ae from"./NotFoundScreen-BUTU_-cN.js";import{a as r}from"./sentry-B4qAfutp.js";import{h as ee,l as _e,g as m,j as Ge,u as He,k as ze,n as se,o as $}from"./core-D9lzXsHE.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-mLaTPohd.js";import{c as Ke}from"./useFetchSuggestedQuestionsWhenReady-Y2W_vLVT.js";import{M as Me}from"./MobileAppDrawer-D_MxSFu1.js";import"./recharts-C3UFukkg.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.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]="5e877f15-a028-40b3-9b6e-b092aa853d81",a._sentryDebugIdIdentifier="sentry-dbid-5e877f15-a028-40b3-9b6e-b092aa853d81")}catch{}})();const Xe={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[R,V]=r.useState(!1),[I,S]=r.useState(!1),{userId:w}=_e(),d=m(e=>te(e)),u=m(e=>Y(e)),D=m(e=>H(e)),{useFeatureGate:f}=Q(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=q(k,u),T=ne(u),v=N(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(X()),y()},F=()=>{R===!0?S(!0):C()},B=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),L=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return r.useEffect(()=>{x===!1&&w!=null&&p(Ee(w))},[x,w]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Xe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Oe,{...b})]})})},qe=W(Se)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,we=W(fe.H6Regular)`
6
- margin-top: ${O.sp7};
7
- padding-left: ${O.sp8};
8
- padding-right: ${O.sp8};
9
- color: ${a=>a.theme.colors.primary};
10
- word-break: break-word;
11
- `,De=W(fe.LargeRegularSp)`
12
- color: ${a=>a.theme.colors.hero};
13
- padding-left: ${O.sp8};
14
- padding-right: ${O.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${O.sp4};
17
- white-space: pre-line;
18
- `,Ne={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[R,V]=r.useState(!1),[I,S]=r.useState(!1),w=m(i=>te(i)),d=m(i=>Y(i)),u=m(i=>H(i)),{useFeatureGate:D}=Q(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=q(f,d),P=ne(d),T=N(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(X())},C=()=>{R===!0?S(!0):x()},F={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},B=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),L=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:T,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:Z};return r.useEffect(()=>{w.invitePersonState.fetchState==="Completed"&&(y(),p(X()))},[w.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:F}):null,s.jsx(Re,{...b})]})})},ea=W(Se)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,aa=ze(function(a,t){const l=le(a),n=z.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(J({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(J({searchText:o}))}}}})($e);function M({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=z.getSignedInUser(),h=m(e=>Y(e)),{useFeatureGate:p}=Q(),{isFeatureEnabled:R}=p(E.isDebitCardFeatureEnabled),V=m(e=>H(e)),I=!q(R,h)&&V,S=N(h),w=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,T]=r.useState(!1),[v,U]=r.useState("off"),[Z,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:B}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ke({isDataReady:c.fetchState==="Completed"});const j=m(e=>Le(e.classState,e.classListState)),L=m(e=>Te(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(J({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,w,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),T(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(J({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),T(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Ue,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Qe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Me,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:L,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,K)=>{n(J({sortKey:e,sortOrder:K}))},onRowClick:e=>{const K=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Be(g.state?.pathnameStackToGoBack,g.pathname);l(K,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:B})]})}function wa(){const a=Je();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(M,{})}),s.jsx($,{path:"new",element:s.jsx(M,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(M,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-DRCozBQX.js";import E from"./NotFoundScreen-BUTU_-cN.js";import{a as r}from"./sentry-B4qAfutp.js";import{j as _,u as v,g as p,l as M,h as P,N as U,k as O,n as z,o as h}from"./core-D9lzXsHE.js";import{eO as B,Pn as b,bo as F,bn as N,hg as V,gM as $}from"./zeni-epic-state-CthkBqEW.js";import{n as q,z as I,cv as G}from"./index-D4WqoFTE.js";import"./mui-uwgkpTLc.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-mLaTPohd.js";import{c as J}from"./useFetchSuggestedQuestionsWhenReady-Y2W_vLVT.js";import{M as K}from"./MobileAppDrawer-D_MxSFu1.js";import"./recharts-C3UFukkg.js";import"./analytics-q_QSThl7.js";import"./plaid-CRq9dUdG.js";import"./dnd-DNtF3Icn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CFIADA6U.js";import"./lexical-5_A_mLPM.js";import"./pdf-C9DJlS7s.js";import"./utils-DfCznjX8.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]="4202f09c-e24c-4d93-9994-e5e5b0390633",e._sentryDebugIdIdentifier="sentry-dbid-4202f09c-e24c-4d93-9994-e5e5b0390633")}catch{}})();const L=O(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),Q=()=>{const e=_(),t=v(),c=q(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),f=P(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,C]=r.useState(!1),S=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=S||k||x,l=r.useCallback((a,i,T)=>{f(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),m.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{C(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return J({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function pe(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{pe as default};
@@ -1,5 +0,0 @@
1
- import{j as s}from"./liveblocks-DRCozBQX.js";import{a as o}from"./sentry-B4qAfutp.js";import{g as f,j as L,h as M,u as V,k as _}from"./core-D9lzXsHE.js";import{m as F,Z as N,z as R,b3 as W,C as U,R as $,s as z,c as l,e as Y,a3 as Q,b4 as Z}from"./index-D4WqoFTE.js";import{eY as q,eO as G,Ma as I,Mb as J,tI as K,ty as g,e_ as X,bN as ee,tD as re,Mc as ae}from"./zeni-epic-state-CthkBqEW.js";import{D as ne,e as te,n as se,S as oe}from"./mui-uwgkpTLc.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-mLaTPohd.js";import{c as le}from"./useFetchSuggestedQuestionsWhenReady-Y2W_vLVT.js";import{M as de}from"./MobileAppDrawer-D_MxSFu1.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="e1974b74-b683-47cf-8d74-832b976618de",e._sentryDebugIdIdentifier="sentry-dbid-e1974b74-b683-47cf-8d74-832b976618de")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=F(),n=N();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>q(d));return s.jsx(ne,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(te,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=se(oe)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,P="refer-and-earn-status-update",pe=_(function(e){const r=I(e),a=e.referralViewState.rewardsPlanFetchState,n=ee([r,a]);return{inviteList:r.invitations,uiState:r.uiState,pendingBonus:r.pendingBonus,earnedBonus:r.earnedBonus,pendingReferrals:r.pendingReferrals,fetchState:n.fetchState,rewardsPlan:r.rewardsPlan}},function(e,r){const{navigate:a}=r;return{onColumnSortConfigChanged:(n,i)=>{e(ae({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),a("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),a("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(Q(Z));function Se({isReferralDrawerOpen:e}){const r=L(),a=M(),n=V(),[i,u]=o.useState(!1),[d,D]=o.useState(!1),[x,E]=o.useState(!1),[k,C]=o.useState(!1),p=R.getSignedInUser(),m=f(t=>G(t)),b=f(t=>I(t)),h=b.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),y=J([b,w]),{areTenantIdsInSync:c}=$();o.useEffect(()=>{m?.rewardsLastViewedTime==null&&x===!1&&(a(K()),E(!0))},[]),o.useEffect(()=>{!i&&h==="Not-Started"&&c&&(u(!0),a(g(!0)))},[h,a,c]),o.useEffect(()=>{!d&&w.fetchState==="Not-Started"&&c&&(D(!0),a(X(!0)))},[w,a,c]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:O,onAskAiCfoClick:T}=ie({mobileExploreReferrer:"Rewards"});le({isDataReady:y===!0});const B={events:p?.userId!=null?[`private-encrypted-${p.userId}.${P}`]:[],eventCallback:(t,S,H)=>{H.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(z,{analytics:l,onLoad:t=>(S=>{p!=null&&S.trackPageLoaded(Y.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{C(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(pe,{location:n,navigate:r,currentTenant:m,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:O,onAskAiCfoClick:T,...B})]})}export{Se as R};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-DRCozBQX.js";import x from"./NotFoundScreen-BUTU_-cN.js";import{a as p}from"./sentry-B4qAfutp.js";import{j as C,u as I,h as A,g as c,N as E,k,n as D,o as d}from"./core-D9lzXsHE.js";import{eO as N,N4 as b,Nk as S,CF as T,BO as V,CE as u,Cv as O,NA as U}from"./zeni-epic-state-CthkBqEW.js";import{m as _,z as B,B as $,a3 as W,bJ as z,ac as F}from"./index-D4WqoFTE.js";import"./mui-uwgkpTLc.js";import{R as g}from"./ReimbursementApprovalRuleDetailScreen-DXvOZU5T.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="01cee2ea-de3f-47a5-ad56-dcd474496007",e._sentryDebugIdIdentifier="sentry-dbid-01cee2ea-de3f-47a5-ad56-dcd474496007")}catch{}})();const m="reimbursement-approval-rule-update",J=k(function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(m)&&e(U(!1))},onBackClick:()=>{F(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(O(s))},onEditRuleClick:s=>{s!=null?(e(u(s)),a(`./${s}/edit`)):(e(u()),a("./new"))}}})(W(z)),P=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),v=c(n=>n.remiSetupApproverViewState.fetchState),o=c(n=>N(n)),w=_(),i=c(n=>b(n)),h=c(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(T())},[h]),p.useEffect(()=>{l||v!=="Not-Started"||(s(!0),a(V(!0)))},[l,v,a]),B.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(u())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${m}`]:[],eventCallback:(n,q,R)=>{n.endsWith(m)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx($,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(J,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(d,{path:"/",element:t.jsx(P,{})}),t.jsx(d,{path:"/new",element:t.jsx(g,{})}),t.jsx(d,{path:"/:approvalRuleId/edit",element:t.jsx(g,{})}),t.jsx(d,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};