@zeniai/web-app-ui 5.0.26-dev → 5.0.27-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 (130) hide show
  1. package/dist/assets/AddressRoutes-0TGuT2xq.js +1 -0
  2. package/dist/assets/AddressScreen-Cuxn6jUb.js +9 -0
  3. package/dist/assets/{AiCfoScreen-CyTokZKd.js → AiCfoScreen-DWkNdv1K.js} +2 -2
  4. package/dist/assets/BillPayApprovalRoutes-CLMXdAbQ.js +1 -0
  5. package/dist/assets/{BillPayRoutes-CSpnmpVl.js → BillPayRoutes-BG-syOfw.js} +6 -6
  6. package/dist/assets/{BusinessVerificationPageScreen-XAQKreuQ.js → BusinessVerificationPageScreen-BB9F88mK.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-C39jkt7F.js → ChargeCardRoutes-DkULQd3q.js} +9 -9
  8. package/dist/assets/CompanyPassportScreen-DsQqH3R_.js +1 -0
  9. package/dist/assets/ConnectionAuthScreen-UNrq0bOs.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-Cv8y1n9u.js +1 -0
  11. package/dist/assets/CustomerOnboardingRoutes-lSSTd4er.js +23 -0
  12. package/dist/assets/{DashboardRoutes-BeeURxU7.js → DashboardRoutes-CITCXfQh.js} +3 -3
  13. package/dist/assets/DefaultTenantHome-DnXJprlQ.js +1 -0
  14. package/dist/assets/{DomesticWireDetailScreen-rVUtw5dn.js → DomesticWireDetailScreen-DswgjtZ7.js} +4 -4
  15. package/dist/assets/{DrawerScreen-D2sVaWmT.js → DrawerScreen-W83sAi_k.js} +1 -1
  16. package/dist/assets/EntityDetailRoutes-DFMGt3cF.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-Dnhz3G0Y.js → ExpenseAutomationRoutes-BwBWvBQz.js} +4 -4
  18. package/dist/assets/FeaturePreviewScreen-D_2XoCHl.js +1 -0
  19. package/dist/assets/MagicLinkRoutes-DMKCfw5O.js +72 -0
  20. package/dist/assets/MagicLinkSignInScreen-BcOqXx3I.js +12 -0
  21. package/dist/assets/{MobileAppDrawer-CPQuEteC.js → MobileAppDrawer-DvyjBd4g.js} +1 -1
  22. package/dist/assets/NotFoundScreen-BHPCFLTM.js +1 -0
  23. package/dist/assets/{NotificationRoutes-By1RzVqo.js → NotificationRoutes-CgSoQGEX.js} +1 -1
  24. package/dist/assets/PandLWithForecastRoutes-D6-VHxb-.js +1 -0
  25. package/dist/assets/PeopleRoutes-Deq8C3bu.js +22 -0
  26. package/dist/assets/PerformanceRoutes-C8KioDe9.js +1 -0
  27. package/dist/assets/{Preview-BAKw3AAf.js → Preview-BNMITNPE.js} +1 -1
  28. package/dist/assets/{QBOConnectionScreen-8whb3Hsr.js → QBOConnectionScreen-B-4fO2ne.js} +1 -1
  29. package/dist/assets/ReferralListScreen-BM1gHESu.js +5 -0
  30. package/dist/assets/ReimbursementApprovalRoutes-Dtwap8JJ.js +1 -0
  31. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CMXdWUhi.js → ReimbursementApprovalRuleDetailScreen-B5Ck2C9Y.js} +1 -1
  32. package/dist/assets/ReimbursementRoutes-cLh7G6_T.js +68 -0
  33. package/dist/assets/{ReportsRoutes-B2iWUWYi.js → ReportsRoutes-BBHBFqy6.js} +1 -1
  34. package/dist/assets/RewardsRoutes-DBKBcVt9.js +1 -0
  35. package/dist/assets/ScreenRoutes-zeq48oCM.js +2 -0
  36. package/dist/assets/{SettingsRoutes-Bjw3TffC.js → SettingsRoutes-Cw1W0wHt.js} +7 -7
  37. package/dist/assets/{SetupPagesScreen-DxIIsva3.js → SetupPagesScreen-C_S8AZRH.js} +5 -5
  38. package/dist/assets/SignInScreen-CwqEUOO8.js +1 -0
  39. package/dist/assets/SignOutScreen-kZlEM8yn.js +9 -0
  40. package/dist/assets/TaskListScreen-CqTOqB17.js +9 -0
  41. package/dist/assets/TaskRoutes-D4-Lbjxl.js +9 -0
  42. package/dist/assets/TransactionDetailRoutes-BXbmHxwN.js +1 -0
  43. package/dist/assets/{TransactionDetailScreen-lxeDv5DJ.js → TransactionDetailScreen-ClRsLpwG.js} +2 -2
  44. package/dist/assets/{TransactionListRoutes-C-9Rmaut.js → TransactionListRoutes-CmhrN_6s.js} +1 -1
  45. package/dist/assets/{TreasuryRoutes-GImokxmZ.js → TreasuryRoutes-Bgzquerm.js} +6 -6
  46. package/dist/assets/{VendorsRoutes-DWeQQswE.js → VendorsRoutes-Df3m6Veu.js} +16 -16
  47. package/dist/assets/WiseConfirmationScreen-BDSaWGqI.js +12 -0
  48. package/dist/assets/ZeniAccountRoutes-bTvT8A0g.js +66 -0
  49. package/dist/assets/ZeniAccountStatementScreen-COih_FbC.js +9 -0
  50. package/dist/assets/{accountMappingHelper-DdMTXagH.js → accountMappingHelper-Br2QJsWh.js} +1 -1
  51. package/dist/assets/{analytics-BsMspvaD.js → analytics-CaofNoIK.js} +1 -1
  52. package/dist/assets/analyticsHelper-26beXk6v.js +1 -0
  53. package/dist/assets/{core-PVb_PTOa.js → core-r3zPXrnR.js} +1 -1
  54. package/dist/assets/{decodeURIComponentSafe-mU8LeJGH.js → decodeURIComponentSafe-DIvx_0bc.js} +1 -1
  55. package/dist/assets/{dnd-DhtyOCgF.js → dnd-dQAnWf63.js} +1 -1
  56. package/dist/assets/{empty-wep5Q-1y.js → empty-DOFWY-gL.js} +1 -1
  57. package/dist/assets/{empty-HlfDqjBl.js → empty-Dguy-xnr.js} +1 -1
  58. package/dist/assets/{emptyVideoElement-DpJB9lfW.js → emptyVideoElement-BqRp7P8T.js} +1 -1
  59. package/dist/assets/epic-kHR8aIZ1.js +2 -0
  60. package/dist/assets/getLocaleForTenant-CQnHebPH.js +1 -0
  61. package/dist/assets/{index-BCcxTJng.js → index-BG4MEhH2.js} +1 -1
  62. package/dist/assets/{index-DnBq3nCg.js → index-BGpP6oaB.js} +1 -1
  63. package/dist/assets/{index-Dn-dGYDp.js → index-BTkf3iCj.js} +1 -1
  64. package/dist/assets/{index-BWo_N8M7.js → index-D-9tzkhM.js} +1 -1
  65. package/dist/assets/{index-P5rhD5Na.js → index-DHwEE904.js} +13666 -13626
  66. package/dist/assets/{index-CsPK-ZcF.js → index-DJbMCLsX.js} +2 -2
  67. package/dist/assets/{index-yb_kldBQ.js → index-DYvO_TO1.js} +1 -1
  68. package/dist/assets/{lexical-CVfRQHxx.js → lexical-DPC-NxTc.js} +1 -1
  69. package/dist/assets/{liveblocks-DiLJJ0-W.js → liveblocks-BUJqCtmZ.js} +1 -1
  70. package/dist/assets/{lottie-DGoffhx5.js → lottie-D8AaXarT.js} +1 -1
  71. package/dist/assets/{mui-Bs_Wx3U8.js → mui-BD9ReF4V.js} +1 -1
  72. package/dist/assets/{pathToGoBack-BrzgfZOY.js → pathToGoBack-D3dTZRn8.js} +1 -1
  73. package/dist/assets/{pdf-Cq31LyOe.js → pdf-iZy3i289.js} +4 -4
  74. package/dist/assets/{pdf-lib-CKEHYQuo.js → pdf-lib-C-qCwtZm.js} +1 -1
  75. package/dist/assets/{plaid-CT0unNLB.js → plaid-CxNli5Mg.js} +1 -1
  76. package/dist/assets/{pusher-BDivubpF.js → pusher-0ovRh4wm.js} +1 -1
  77. package/dist/assets/{react-D12Thgxw.js → react-Bt99sb5m.js} +1 -1
  78. package/dist/assets/{react-AIza423u.js → react-Cd-2CZq4.js} +1 -1
  79. package/dist/assets/{react-B22DUlFC.js → react-DSIBkdUb.js} +1 -1
  80. package/dist/assets/{react-x856Ci_R.js → react-Db_3nqMy.js} +1 -1
  81. package/dist/assets/{react-CQHBdAiW.js → react-DhnULN7m.js} +1 -1
  82. package/dist/assets/{react-D3IfLVtg.js → react-DqIQJ9MY.js} +1 -1
  83. package/dist/assets/{recharts-CreyyBLx.js → recharts-DD1DDktN.js} +1 -1
  84. package/dist/assets/{routePaths-C6cVlXoV.js → routePaths-BGzy8Dqj.js} +1 -1
  85. package/dist/assets/{sentry-CRXtNjzG.js → sentry-BbjYSgze.js} +1 -1
  86. package/dist/assets/{url-DraJKqO-.js → url-BaKOjXZM.js} +1 -1
  87. package/dist/assets/{url-arGh5ZAs.js → url-DYDNdwVU.js} +1 -1
  88. package/dist/assets/useAskAiCfoHostNavButtonProps-CIdYxL8V.js +1 -0
  89. package/dist/assets/{useDeviceId-B5nwTsrh.js → useDeviceId-DZSzfiw7.js} +1 -1
  90. package/dist/assets/useFetchSuggestedQuestionsWhenReady-DaXgh6Pr.js +1 -0
  91. package/dist/assets/{useInitialThreadRequest-DNzJLWO_.js → useInitialThreadRequest-C6Fi1v7Q.js} +1 -1
  92. package/dist/assets/{utils-CfmtJLRd.js → utils-gH_xiFg7.js} +1 -1
  93. package/dist/assets/{withTransactionSidePanel-9be4np7g.js → withTransactionSidePanel-C7832Ype.js} +2 -2
  94. package/dist/assets/{zeni-epic-state-4sJL0-hG.js → zeni-epic-state-Cdw8EpcM.js} +7 -7
  95. package/dist/index.html +1 -1
  96. package/package.json +3 -3
  97. package/dist/assets/AddressRoutes-CV8Sw8CP.js +0 -1
  98. package/dist/assets/AddressScreen-CG-B80_4.js +0 -9
  99. package/dist/assets/BillPayApprovalRoutes-BwSUlLgD.js +0 -1
  100. package/dist/assets/CompanyPassportScreen-BbokQ4hH.js +0 -1
  101. package/dist/assets/ConnectionAuthScreen-eyPxOj3X.js +0 -11
  102. package/dist/assets/CustomerOnboardingAuthScreen-DwO0_vwT.js +0 -1
  103. package/dist/assets/CustomerOnboardingRoutes-C6xc2c4j.js +0 -23
  104. package/dist/assets/DefaultTenantHome-xvMFl-dC.js +0 -1
  105. package/dist/assets/EntityDetailRoutes-CvQH6iMQ.js +0 -1
  106. package/dist/assets/FeaturePreviewScreen-DsVyovAJ.js +0 -1
  107. package/dist/assets/MagicLinkRoutes-DSYzYj69.js +0 -72
  108. package/dist/assets/MagicLinkSignInScreen-CYT_mA9u.js +0 -12
  109. package/dist/assets/NotFoundScreen-D5gX25SL.js +0 -1
  110. package/dist/assets/PandLWithForecastRoutes-zIKfcrxm.js +0 -1
  111. package/dist/assets/PeopleRoutes-H0bbY-ET.js +0 -22
  112. package/dist/assets/PerformanceRoutes-LsTpAH12.js +0 -1
  113. package/dist/assets/ReferralListScreen-CyEKJZYn.js +0 -5
  114. package/dist/assets/ReimbursementApprovalRoutes-Cu9gxM3S.js +0 -1
  115. package/dist/assets/ReimbursementRoutes-XZANwX-H.js +0 -68
  116. package/dist/assets/RewardsRoutes-CcpZZ0yW.js +0 -1
  117. package/dist/assets/ScreenRoutes-DMJirfOH.js +0 -2
  118. package/dist/assets/SignInScreen-x6v4P1q0.js +0 -1
  119. package/dist/assets/SignOutScreen-DYYqM-_R.js +0 -9
  120. package/dist/assets/TaskListScreen-BW-oMerA.js +0 -9
  121. package/dist/assets/TaskRoutes-NyhjOGv3.js +0 -9
  122. package/dist/assets/TransactionDetailRoutes-CPn7atS_.js +0 -1
  123. package/dist/assets/WiseConfirmationScreen-Crwiq_l2.js +0 -12
  124. package/dist/assets/ZeniAccountRoutes-CEoa3jip.js +0 -66
  125. package/dist/assets/ZeniAccountStatementScreen-DI0ZEKQp.js +0 -9
  126. package/dist/assets/analyticsHelper-DqgMIH9d.js +0 -1
  127. package/dist/assets/epic-CMMVrD8V.js +0 -2
  128. package/dist/assets/getLocaleForTenant-yD-xTTtK.js +0 -1
  129. package/dist/assets/useAskAiCfoHostNavButtonProps-BqWqtj0f.js +0 -1
  130. package/dist/assets/useFetchSuggestedQuestionsWhenReady-BJfLdWEG.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-P5rhD5Na.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CRXtNjzG.js"><link rel="modulepreload" crossorigin href="/assets/core-PVb_PTOa.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-4sJL0-hG.js"><link rel="modulepreload" crossorigin href="/assets/mui-Bs_Wx3U8.js"><link rel="modulepreload" crossorigin href="/assets/analytics-BsMspvaD.js"><link rel="modulepreload" crossorigin href="/assets/utils-CfmtJLRd.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-DHwEE904.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-BbjYSgze.js"><link rel="modulepreload" crossorigin href="/assets/core-r3zPXrnR.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-Cdw8EpcM.js"><link rel="modulepreload" crossorigin href="/assets/mui-BD9ReF4V.js"><link rel="modulepreload" crossorigin href="/assets/analytics-CaofNoIK.js"><link rel="modulepreload" crossorigin href="/assets/utils-gH_xiFg7.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.26-dev",
3
+ "version": "5.0.27-dev",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -28,8 +28,8 @@
28
28
  "@sentry/react": "^9.42.1",
29
29
  "@stripe/stripe-js": "^4.4.0",
30
30
  "@zeniai/client-analytics": "2.0.3",
31
- "@zeniai/client-epic-state": "5.0.13",
32
- "@zeniai/web-components": "4.0.30",
31
+ "@zeniai/client-epic-state": "5.0.14",
32
+ "@zeniai/web-components": "4.0.32",
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-DiLJJ0-W.js";import{A as d}from"./AddressScreen-CG-B80_4.js";import i from"./NotFoundScreen-D5gX25SL.js";import"./sentry-CRXtNjzG.js";import{n as s,o as r}from"./core-PVb_PTOa.js";import"./zeni-epic-state-4sJL0-hG.js";import"./recharts-CreyyBLx.js";import"./index-P5rhD5Na.js";import"./mui-Bs_Wx3U8.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.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]="4bd15e18-5b5f-4be1-8d33-8bd696c76da2",t._sentryDebugIdIdentifier="sentry-dbid-4bd15e18-5b5f-4be1-8d33-8bd696c76da2")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
@@ -1,9 +0,0 @@
1
- import{j as r}from"./liveblocks-DiLJJ0-W.js";import{a as b}from"./sentry-CRXtNjzG.js";import{j as P,h as _,u as j,l as E,g as B,k as M}from"./core-PVb_PTOa.js";import{K as $,h as D,z as K,j as L,B as R,y as z,d as I,g as S,m as F,k as h,p as N}from"./index-P5rhD5Na.js";import{IY as C,gI as U,eM as G,IZ as O,b$ as V,I_ as q,k2 as H}from"./zeni-epic-state-4sJL0-hG.js";import{n as Y}from"./mui-Bs_Wx3U8.js";import Z from"./NotFoundScreen-D5gX25SL.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]="06a8f2bd-15f8-4a72-95dd-bf50420c0ab6",e._sentryDebugIdIdentifier="sentry-dbid-06a8f2bd-15f8-4a72-95dd-bf50420c0ab6")}catch{}})();const J=Y.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=G(e),a=t.roleMap!=null&&O(t.roleMap),d=i||c==="user_address"||V(l?.userRole??[])||a?void 0:"readonly";if(o==null){const s=q(c,e);return{addressToEdit:s?.addressToCreate,loadingState:s?.status?.fetchState,googleAPIKey:h.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:t.dontShowSaveConfirmation}}const n=C(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=N(d?.pathnameStackToGoBack);let s=n.poppedPathname??k();const u=d?.queryParams;if(u){const f=new URLSearchParams(u).toString();f&&(s=`${s}?${f}`)}o(s,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:a=>{const d=W(a);e(H({addressType:c,addressToCreate:d})),I?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(t.bankAccountContext)},onCancel:()=>{l(t.bankAccountContext)}}})(F);function re({isSubPage:e,hideAddressSubTitle:t=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=P(),d=_(),n=j(),{addressId:s,addressType:u}=E(),f=$(),w=D(),v=K.getSignedInUser(),[g,x]=b.useState(s==null),p=B(m=>s!=null?C(m,s).fetchState:"Not-Started"),A=L();if(v==null)throw Error("Can't access address page without signing in...");const T=m=>m.trackPageLoaded(s!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return b.useEffect(()=>{g||s==null||(x(!0),d(U(s,!1)))},[g,s,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!g&&p==="Not-Started"||g&&p==="In-Progress"?r.jsx(R,{fetchState:p,style:{backgroundColor:w.colors.grey5}}):s!=null&&p==="Error"?(a(`${k(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(z,{analytics:I,onLoad:T}),r.jsx(J,{windowSize:f,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(Z,{})}const k=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},W=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,W as t};
@@ -1 +0,0 @@
1
- import{j as l}from"./liveblocks-DiLJJ0-W.js";import{a as y}from"./sentry-CRXtNjzG.js";import{j as B,u as U,h as T,g as v,N as $,k as j,l as L,n as O,o as h}from"./core-PVb_PTOa.js";import{eM as N,Mf as R,LX as b,x4 as w,w_ as F,x2 as x,wT as W,LZ as M,wW as q,x6 as z,x5 as C}from"./zeni-epic-state-4sJL0-hG.js";import{h as P,z as k,B as V,a1 as X,bx as Z,aa as _,by as G}from"./index-P5rhD5Na.js";import"./mui-Bs_Wx3U8.js";import{i as H}from"./ReimbursementApprovalRuleDetailScreen-CMXdWUhi.js";import J from"./NotFoundScreen-D5gX25SL.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]="92281e79-a87f-42ed-ac4e-d1702ac2dc82",e._sentryDebugIdIdentifier="sentry-dbid-92281e79-a87f-42ed-ac4e-d1702ac2dc82")}catch{}})();const I="bill-approval-rule-update",K=j(function(e){return{approvalView:R(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:a,location:p}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e(M(!1))},onBackClick:()=>{_(p)?a("../../"):a("../../../bills/setup")},onDeleteRuleClick:t=>{e(W(t))},onEditRuleClick:t=>{t!=null?(e(x(t)),a(`./${t}/edit`)):(e(x()),a("./new"))}}})(X(Z)),Q=()=>{const e=B(),o=U(),a=T(),[p,t]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=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"&&a(w())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(t(!0),a(F(!0)))},[p,n,a]),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),a(x())),e("./new"))},[u,r,a]);const f={events:c.companyId!=null?[`private-${c.companyId}.${I}`]:[],eventCallback:(i,A,m)=>{i.endsWith(I)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx($,{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(K,{currentTenant:c,location:o,navigate:e,...f})},Y=j(function(e,o){const a=b(e),p=a.billPaySetupApproverViewUpdateData?.type??"approval_create",t=p==="approval_create"&&a.allApprovalRules.length!==0;let u=a.allApprovalRules.length===0;return o.approvalRuleId&&(u=a.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:a,hideUpperBoundField:t,isLowerBoundDisabled:u,approvalUpdateActionType:p}},function(e,o){const{navigate:a,approvalUpdateDataView:p,approverViewData:t,approvalRuleId:u}=o,s=p.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:n=>{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 E=!!H(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),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:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}},onResetClick:()=>{e(w()),s==="approval_update"||d?a("../"):t.allApprovalRules.length===0&&t.fetchState==="Completed"?a("../../setup"):a("../")},onBackClick:()=>{e(w()),s==="approval_update"||d?a("../"):t.allApprovalRules.length===0&&t.fetchState==="Completed"?a("../../setup"):a("../")},onSaveRuleClick:()=>{e(z())},onSaveRuleSuccess:()=>{a("../")}}})(G);function D(){const e=B(),o=T(),a=U(),{approvalRuleId:p}=L(),t=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>R(r)),[n,c]=y.useState(!1);if(y.useEffect(()=>{n||(c(!0),o(q(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[d,p]),t==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(Y,{navigate:e,approvalUpdateDataView:s,approvalRuleId:p,approverViewData:d,location:a})}function se(){return l.jsxs(O,{children:[l.jsx(h,{path:"/",element:l.jsx(Q,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(J,{})})]})}export{se as B};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-DiLJJ0-W.js";import{a as g}from"./sentry-CRXtNjzG.js";import{j as w,h as k,u as x,l as T,g as O,k as E}from"./core-PVb_PTOa.js";import{z as C,b0 as F,y as P,d as L,g as V,aa as b,b1 as j,ao as A,ap as B,r as U}from"./index-P5rhD5Na.js";import{eM as D,fB as M,rs as _,fw as R,b$ as z,Ls as G,bm as Y,pA as $,po as q,jW as H,lq as S,Lt as W,bB as Z,cr as N,ly as J,lB as K}from"./zeni-epic-state-4sJL0-hG.js";import"./mui-Bs_Wx3U8.js";import{c as Q}from"./routePaths-C6cVlXoV.js";import{M as X}from"./MobileAppDrawer-CPQuEteC.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="5aee55bd-5813-419d-9f24-397356efa21a",t._sentryDebugIdIdentifier="sentry-dbid-5aee55bd-5813-419d-9f24-397356efa21a")}catch{}})();const ee=E(function(t){const n=R(t),i=C.getSignedInUser(),l=D(t),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(l?.userRole??[])&&n.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(t.companyConfigState),a=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:n.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:n,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}},function(t,n){const{companyId:i,currentTenant:l,navigate:c,location:p}=n,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{t(K())},onAddressClick:e=>{const a=Q(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...a,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:B(I))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?Z(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};t(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{t(W(e))},onCompanyOfficerUpdated:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{t(H({files:e}))},onDeleteFile:e=>{t(q(e))},onEditFileName:(e,a)=>{t($(e,a.split(".")[0]))}}})(j);function de(){const t=w(),n=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),a=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>D(s)),d=r.companyId??C.getSignedInUserTenant(l)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||a!=="Not-Started"||d==null||(p(!0),n(M(d)))},[c,a,d,n]),g.useEffect(()=>{o==="Not-Started"&&n(_())},[o,n]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:L,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,11 +0,0 @@
1
- import{j as C}from"./liveblocks-DiLJJ0-W.js";import{a}from"./sentry-CRXtNjzG.js";import{h as D,u as v,g as u,N as w}from"./core-PVb_PTOa.js";import{Ib as A,eM as O,fi as _,mh as j,fJ as E,fh as U,eN as L,Ij as F}from"./zeni-epic-state-4sJL0-hG.js";import{u as $,z as c,L as g,D as k,o as H}from"./index-P5rhD5Na.js";import{n as z}from"./mui-Bs_Wx3U8.js";import{t as R}from"./getLocaleForTenant-yD-xTTtK.js";import{g as P,Q as G}from"./QBOConnectionScreen-8whb3Hsr.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.js";import"./empty-wep5Q-1y.js";import"./pdf-lib-CKEHYQuo.js";import"./index-DnBq3nCg.js";import"./url-arGh5ZAs.js";import"./index-BCcxTJng.js";import"./decodeURIComponentSafe-mU8LeJGH.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]="c08af164-5c04-4610-8810-33ba1b562bd6",t._sentryDebugIdIdentifier="sentry-dbid-c08af164-5c04-4610-8810-33ba1b562bd6")}catch{}})();const J=z.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:b}=$(),p=a.useRef(!1),f=a.useRef(!1),{code:x,realmId:N,state:T}=P(i.search),y=x!==""&&N!==""&&T!=="",I=u(l=>A(l)),e=u(l=>O(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,h=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(_(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(j(o.userId)))},[f,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||h!=="Error"||(d(g.CONNECTION_AUTH),t(E(o.userId,e.tenantId)))},[h]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(U(e.tenantId)),c.saveActiveTenantDomainForUser(e.tenantEmailDomain),L(o?.userId,o?.zeniSessionId,e.tenantId),k.updateAppLocaleID(R(F(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(E(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"||b()},[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:y||S===!1?C.jsx(J,{children:C.jsx(G,{})}):C.jsx(w,{to:"/",replace:!0})}export{pe as default};
@@ -1 +0,0 @@
1
- import{j as d}from"./liveblocks-DiLJJ0-W.js";import{z as n}from"./index-P5rhD5Na.js";import{g as p}from"./QBOConnectionScreen-8whb3Hsr.js";import"./sentry-CRXtNjzG.js";import{u as a,N as i}from"./core-PVb_PTOa.js";import"./zeni-epic-state-4sJL0-hG.js";import"./recharts-CreyyBLx.js";import"./mui-Bs_Wx3U8.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.js";import"./empty-wep5Q-1y.js";import"./pdf-lib-CKEHYQuo.js";import"./index-DnBq3nCg.js";import"./url-arGh5ZAs.js";import"./index-BCcxTJng.js";import"./decodeURIComponentSafe-mU8LeJGH.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]="b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd",t._sentryDebugIdIdentifier="sentry-dbid-b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd")}catch{}})();const U=()=>{const t=a(),{code:o,realmId:r,state:e}=p(t.search),s=n.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return d.jsx(i,{to:m})}return d.jsx(i,{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-DiLJJ0-W.js";import{t as $e,A as Ce}from"./AddressScreen-CG-B80_4.js";import ze from"./NotFoundScreen-D5gX25SL.js";import{a as g}from"./sentry-CRXtNjzG.js";import{j as oe,u as se,h as ie,l as re,g as D,N as x,k as ce,i as Me,n as Qe,o as M}from"./core-PVb_PTOa.js";import{x as de,j as le,z as B,n as ue,h as qe,l as _,r as V,y as H,d as N,B as je,g as X,ak as Ke,K as Je,al as ke,k as te,am as Ze,an as Ie,o as He,ao as We,ap as xe,aq as Xe}from"./index-P5rhD5Na.js";import{bm as Ye,eM as ee,fa as et,eS as pe,eQ as me,bu as tt,mf as at,f6 as nt,bL as ot,i_ as ae,j1 as ve,IX as st,bQ as it,b$ as ge,rG as he,rr as rt,J7 as Y,rH as _e,GD as ct,k2 as Ue,J8 as Ve,J9 as dt,Ja as lt,Jb as ut,iY as pt,i$ as mt,rt as Be,rF as gt,bB as Ee,cr as ht,rT as Te,pA as ft,po as yt,jW as bt,fz as St,fy as Ct,fx as kt,Jc as It,rl as xt,rU as Et,rX as Tt,r_ as Ot,s4 as Pt,cR as At}from"./zeni-epic-state-4sJL0-hG.js";import{n as fe}from"./mui-Bs_Wx3U8.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-8whb3Hsr.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.js";import"./empty-wep5Q-1y.js";import"./pdf-lib-CKEHYQuo.js";import"./index-DnBq3nCg.js";import"./url-arGh5ZAs.js";import"./index-BCcxTJng.js";import"./decodeURIComponentSafe-mU8LeJGH.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]="ddea4ccb-d87e-4e64-87db-db89193448ce",t._sentryDebugIdIdentifier="sentry-dbid-ddea4ccb-d87e-4e64-87db-db89193448ce")}catch{}})();const wt=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"}})}}})(Ke),jt=()=>{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:T}=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),w=c.company!=null&&et(c.company),G=L&&w,O=D(l=>l.onboardingCustomerViewState.fetchState),S=c.excludedResources,R=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const j=pe(F,c),P=me(c),A=[],K=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(K===!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||j||P||(r(!0),s(at(i.userId,R,c.tenantId,!0,!1,A)))},[d,O,j,P,i,c.tenantId,s]),g.useEffect(()=>{(j||P)&&setTimeout(()=>{b(!0)},5e3)},[j,P]),O!=="Completed")return a.jsx(x,{to:"../"});if(O==="Completed"&&p){const l=V(o.state?.pathnameStackToGoBack,o.pathname);if(j)return a.jsx(x,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}});if(P)return a.jsx(x,{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=>(J=>J.trackPageLoaded(X.Event.onboardingDashboardActivation))(l)}),a.jsx(wt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:E,isArAgingFeatureEnabled:T,shouldFetchZeniAccountsPromoCard:k,shouldFetchRewardsPlanCard:f,isExpenseAutomationEnabledForUser:$,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:G,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(je,{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(Tt(e,n,i))},onUpdatePaymentAccountLoginStatus:(e,n)=>{t(Et(!1,e,n))},onEstablishConnectionSuccess:()=>{t(xt(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:T,nationalityCountryCode:k,dob:f,phone:U,syncToken:C,selectDocument:F,role:$,ownership:c,isSelectedForVerification:L,userVerificationStatus:w,fileIds:G,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:T,nationalityCountryCode:k?.selectedOption!=null?xe(k.selectedOption):void 0,phone:U,birthday:f!=null?Ee(f?.toString()):f,syncToken:C,titleAtCompany:$.selectedOption,ownershipInCompany:c,documentTypeSelectedForVerification:S,isSelectedForVerification:L,userVerificationStatus:w,fileIds:G,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:O}});t(Te({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:T,primaryContactEmail:k,primaryContactName:f,primaryContactUserId:U,primaryContactSyncToken:C,syncToken:F,fileIds:$,typeOfIncorporation:c,stateOfIncorporation:L,incDate:w,companySourceOfFunds:G,companySourceOfFundsDescription:O,companySubIndustry:S,countriesOfOperations:R,purposeOfAccount:j,purposeOfAccountDescription:P,regulatedStatus:A,regulatedStatusDescription:K,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:T,syncToken:F,fileIds:$,incDate:w!=null?Ee(w?.toString()):w,typeOfIncorporation:c?.selectedOption??"",stateOfIncorporation:L?.selectedOption??"",companySourceOfFunds:G?.selectedOption??"",companySourceOfFundsDescription:O,companySubIndustry:S?.selectedOption??"",countriesOfOperations:R?.selectedOptions.map(Z=>Z.length===2?Z:xe(Z))??[],purposeOfAccount:j?.selectedOption??"",purposeOfAccountDescription:P,regulatedStatus:A??"",regulatedStatusDescription:K,transactionVolume:z?.selectedOption??"",transactionVolumeDescription:Q,usNexus:v,usNexusTypes:q?.selectedOptions??[]},J={userId:U,firstName:f.firstName,lastName:f.lastName,email:k,syncToken:C};t(Te({companyDetails:l,primaryContactDetails:J}))},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=Je(),b=de(),[e,n]=g.useState(!1),[i,h]=g.useState(!1),[m,I]=g.useState(!1),{tenantEmailDomain:E}=re(),T=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),w=D(y=>y.cardPaymentViewState),G=ke(w.addCardPaymentSourceStatus.fetchState),O=w.addCardPaymentSourceStatus.fetchState,{code:S,realmId:R,state:j}=Dt(d.search),P=c.externalConnections?.accounting[0],A=P?.connectionType,K=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(()=>{G==="In-Progress"&&O==="Completed"&&r(ae())},[G,O]),g.useEffect(()=>{Ft(S,R,j,z,Q)===!0&&c.externalConnections?.saveConnectionState!=="In-Progress"&&C==="Completed"&&(r(st(c.tenantId,{connection_type:A??"accounting",connection_name:K??"quickbooks_online",authorization_code:S,realm_id:R,connection_id:z,user_id:Q},it(window.location.origin+"/onboarding/auth"))),N.trackOnboardingSaveQBOConnection(R,z),u(d.pathname))},[S,R,j,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 J=ke(l.companyDetailsLocalData?.addressStatus);g.useEffect(()=>{l.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&l.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&J==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),Ge=me(c),ye=c.company?.companyOnboardingInfo.isOnboardingCompleted,be=y=>y.trackPageLoaded(X.Event.onboardingPage),Se=c.productSettings.isOtherProductsEnabled,Re=c.productSettings.isTreasuryEnabled;if(ye===!0){if(!Se)return Re?a.jsx(x,{to:"../../treasury"}):Le?a.jsx(x,{to:"../../checking"}):Ge?a.jsx(x,{to:"../../cards"}):a.jsx(x,{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(x,{to:"../../onboarding/thankyou"})}else if(ye===!1&&T?.loggedInUserRoleMap!=null)return Z===!0?a.jsx(x,{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
- `,we=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),T=D(f=>f.onboardingCustomerViewState.updateStatus.fetchState),k=i.company?.companyOnboardingInfo.isOnboardingCompleted;return k!==!0||h?T==="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(we,{navigate:t,showUpdatePaymentDetailButton:h,location:s,companyId:m,currentTenant:i,themeState:u,isVisitingFirstTime:e})]}):T==="Completed"&&k===!1&&b?.loggedInUserRoleMap!=null?a.jsxs(Fe,{children:[a.jsx(H,{analytics:N,onLoad:f=>{f.trackPageLoaded(X.Event.onboardingInterimPage)}}),a.jsx(we,{navigate:t,showUpdatePaymentDetailButton:h,location:s,companyId:m,currentTenant:i,themeState:u,isVisitingFirstTime:e})]}):a.jsx(je,{fetchState:T}):I?a.jsx(x,{to:"../../checking"}):E?a.jsx(x,{to:"../../cards"}):a.jsx(x,{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(jt,{})}),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 +0,0 @@
1
- import{j as v}from"./liveblocks-DiLJJ0-W.js";import{a as u}from"./sentry-CRXtNjzG.js";import{h as y,g as b,k as w,u as A,N as k}from"./core-PVb_PTOa.js";import{Ib as N,eM as _,fi as U,Ic as L,mh as R,Id as z}from"./zeni-epic-state-4sJL0-hG.js";import{u as O,z as h,L as T,t as S,D as $,b as j}from"./index-P5rhD5Na.js";import"./mui-Bs_Wx3U8.js";import{t as P}from"./getLocaleForTenant-yD-xTTtK.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.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]="3d360737-e2d3-4130-bd72-c1b8c16ca050",t._sentryDebugIdIdentifier="sentry-dbid-3d360737-e2d3-4130-bd72-c1b8c16ca050")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:f}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=f.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,I=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,I=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=j(c,p);return v.jsx(k,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:I}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=O(),f=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>N(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=h.getSignedInUser();return u.useLayoutEffect(()=>{const e=h.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,f.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!f.current||a!=="Completed"&&a!=="Error"||(f.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=h.getActiveTenantForUser()?.tenantId;f.current===!1&&d!=null&&e!=null&&S.shouldFetchActiveTenant(e)&&(f.current=!0,S.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=h.getSignedInUser(),g=h.getActiveTenantForUser()?.tenantId,I=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&I&&S.shouldFetchAllTenants()&&(r.current=!0,S.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{h.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(h.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!h.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||($.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],G={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of q)if(t.toLocaleLowerCase().includes(s))return G[s]}export{oe as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-DiLJJ0-W.js";import{a as d}from"./sentry-CRXtNjzG.js";import{j as A,h as B,u as J,l as N,g as l,N as q,k as F,n as M,o as O}from"./core-PVb_PTOa.js";import{Ko as _,eM as K,JN as R,km as W,Gv as I,Kt as Y,Jg as $,jm as z,Gw as S,JS as V,JT as H,Ji as L,Jh as Q}from"./zeni-epic-state-4sJL0-hG.js";import{aM as U,d as X,p as Z,r as tt}from"./index-P5rhD5Na.js";import"./mui-Bs_Wx3U8.js";import{d as k}from"./decodeURIComponentSafe-mU8LeJGH.js";import{w as et}from"./withTransactionSidePanel-9be4np7g.js";import{e as at,b as nt}from"./routePaths-C6cVlXoV.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.js";import"./useAskAiCfoHostNavButtonProps-BqWqtj0f.js";import"./useFetchSuggestedQuestionsWhenReady-BJfLdWEG.js";import"./TransactionDetailScreen-lxeDv5DJ.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]="34f3294f-9e86-49f7-961c-8ffe16a1ee14",a._sentryDebugIdIdentifier="sentry-dbid-34f3294f-9e86-49f7-961c-8ffe16a1ee14")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:z(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(H()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=J(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:j,entityNameEncoded:w}=N(),r=k(j??""),f=k(w??""),p=rt(r,f),x=[r,f].filter(n=>n!=null),i={name:f,id:r,type:a,zeniId:r,qboId:r},D=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),G=l(n=>K(n).company?.companyInfo.firstMonthOfFY??1),u=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&p===!0&&(T(!0),o(W(i)))},[m,p,i]);const E=l(n=>n.trendState.fetchState),P=u?.selectedPeriod?.timePeriod??D,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,D);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:b,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(q,{to:C(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(M,{children:s.jsx(O,{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-DiLJJ0-W.js";import{a as r}from"./sentry-CRXtNjzG.js";import{X as d,Y as f,_ as l,p}from"./index-P5rhD5Na.js";import"./mui-Bs_Wx3U8.js";import m from"./NotFoundScreen-D5gX25SL.js";import{j as u,u as b}from"./core-PVb_PTOa.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]="acd41f63-5c60-4198-9c6c-71efcb653b21",e._sentryDebugIdIdentifier="sentry-dbid-acd41f63-5c60-4198-9c6c-71efcb653b21")}catch{}})();const j=()=>{const e=u(),t=b(),a=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),c=r.useCallback(()=>{(()=>{const n=p(t.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=d(t.pathname);return o!=null?s.jsx(f,{menuItem:l(o),onDemoClick:a,onGoBack:c}):s.jsx(m,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{j as F};
@@ -1,72 +0,0 @@
1
- import{j as a}from"./liveblocks-DiLJJ0-W.js";import{l as b,k as x,j,u as y,h as Z,q as ee,g as A,N as ae,n as te,o as p}from"./core-PVb_PTOa.js";import{It as S,Iu as k,Iv as N,yP as $,yB as L,Iw as C,Ix as ne,Iy as oe,yF as ie,eN as I,yM as se,yJ as le}from"./zeni-epic-state-4sJL0-hG.js";import{K as g,o as r,s as re,d as v,k as E,m as de,p as ce,q as me,r as F,n as pe,l as ue,w as he,x as xe,h as ge,B as fe,y as we,v as be,S as ye,A as Se,C as ke,E as ve}from"./index-P5rhD5Na.js";import{n as c}from"./mui-Bs_Wx3U8.js";import f from"./NotFoundScreen-D5gX25SL.js";import{a as P}from"./sentry-CRXtNjzG.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.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]="b67a4ec3-66b2-4ece-9d3a-702402fda92f",e._sentryDebugIdIdentifier="sentry-dbid-b67a4ec3-66b2-4ece-9d3a-702402fda92f")}catch{}})();const Ie=c.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
- `,je=x(function(e){const t=S(e),n=k(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:i=>{e(L(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(o),e($(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(N({data:l}))}}})(re);function z(){const e=g(),{vendorId:t,billId:n}=b();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(je,{vendorId:t,billId:n})})})}const $e=c.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
- `,Ce=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:C(e),googleAPIKey:E.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,i=()=>{const l=ce(o.state?.pathnameStackToGoBack),s=l.poppedPathname??De();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Ae(l);e(ne({addressToCreate:s})),i()},onCancel:()=>{i()}}})(de);function Be({isSubPage:e}){const t=j(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx($e,{windowSize:o,children:a.jsx(Ce,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:E.googleMapsAPIKey})})})}const De=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Ae=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}),Pe=c.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
- `,ze=x(function(e){const t=S(e),n=k(e),o=C(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(L(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(N({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(me);function Ne(){const e=j(),t=y(),n=g(),{vendorId:o,billId:i}=b();return o==null||i==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Pe,{windowSize:n,children:a.jsx(ze,{location:t,navigate:e,vendorId:o,billId:i})})})}const Le=c.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
- `,Ee=x(function(e){const t=S(e),n=k(e),o=C(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(ie(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(oe({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(he);function Fe(){const e=j(),t=y(),n=g(),{vendorId:o,billId:i}=b(),{useFeatureGate:l}=pe(),{isFeatureEnabled:s}=l(ue.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(f,{}):a.jsx(Le,{windowSize:n,children:a.jsx(Ee,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Te={containerWidth:new ke(100,58)},Ge=c(ye)`
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
- `,Me=c.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
- `,He=c.div`
54
- display: flex;
55
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
- flex-direction: column;
57
- width: ${e=>`${Te.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
- `,Ke=c.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
- `,Ve=x(function(e,t){return{file:t.file,type:t.type}})(Se);function h({appContent:e}){const t=Z(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=b(),[s]=ee(),d=s.get("token"),T=n.pathname.includes("address"),w=g(),G=xe(),B=ge(),M=()=>{G.toggle()},H=A(u=>S(u)),K=A(u=>k(u)),{authParams:V,fetchState:m,billAttachment:_,billFetchState:D,companyName:W,currencySymbol:U,amount:q}=H,{tenantId:J,userId:O,sessionId:Q}=V,{fetchState:R,internationalBankAccountCreateStatus:X}=K;return P.useEffect(()=>{I(),m==="Not-Started"&&i!=null&&o!=null&&d!=null&&t(se(i,o,d))},[]),P.useEffect(()=>{m==="Completed"&&(I(O,Q,J),l!=null&&t(le(l)))},[m]),m==="Error"?a.jsx(f,{}):R==="Completed"||X.fetchState==="Completed"?(I(),a.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):m==="In-Progress"?a.jsx(fe,{fetchState:m,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${B.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[m==="Completed"&&D==="Completed"&&a.jsx(we,{analytics:v,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",i??"",W,l??"",_e(n.pathname),U,q))(u)}),a.jsxs(Me,{windowSize:w,children:[w!=="small"?a.jsx(Ge,{onClick:M}):null,a.jsx(Ke,{windowSize:w,isAddressPage:T,children:D==="In-Progress"?a.jsx(be,{size:"ExtraLarge",start:!0}):a.jsx(Ve,{file:_,type:"bill"})}),a.jsx(He,{windowSize:w,children:e})]})]})}const _e=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function We(){return a.jsx(ve,{})}function la(){return a.jsxs(te,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(We,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(z,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(z,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Be,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ne,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Fe,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{la as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-DiLJJ0-W.js";import{a as g}from"./sentry-CRXtNjzG.js";import{h as U,u as _,j as w,q as M,g as l,N as T}from"./core-PVb_PTOa.js";import{z as r,h as P,D as V,f as A,d as N,g as q,G as R,v as G,i as W}from"./index-P5rhD5Na.js";import{eM as $,Id as B,Io as H,Ie as J,eN as K,fh as Q,Ik as X,fF as Y,cR as Z,Ip as ee,Iq as te}from"./zeni-epic-state-4sJL0-hG.js";import{n as ne}from"./mui-Bs_Wx3U8.js";import{u as ae}from"./useDeviceId-B5nwTsrh.js";import{f as se}from"./analyticsHelper-DqgMIH9d.js";import{t as ie}from"./getLocaleForTenant-yD-xTTtK.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.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]="13d8150a-72f3-481d-a25a-3a7abe4733a2",t._sentryDebugIdIdentifier="sentry-dbid-13d8150a-72f3-481d-a25a-3a7abe4733a2")}catch{}})();const D=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function De(){const t=U(),s=_(),m=w(),[y]=M(),n=y.get("token"),p=y.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),b=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=>$(e)),k=l(e=>B(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{a?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,f)))},[n,p,t,i,f,a?.zeniSessionId]),g.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&b!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants(J(k.tenantsInOrder),a.zeniSessionId),K(a.userId,a.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),se(a,o,v,void 0,k.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,b,a,o,k,v,s.state,t]);const F=g.useCallback(()=>{m("/signin/auth")},[m]),j=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=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(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:j,onVerifyOtp:O,onCancelVerifyDevice:F});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(G,{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-DiLJJ0-W.js";import{j as r,k as a}from"./core-PVb_PTOa.js";import{Z as i}from"./index-P5rhD5Na.js";import"./mui-Bs_Wx3U8.js";import"./sentry-CRXtNjzG.js";import"./zeni-epic-state-4sJL0-hG.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.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]="0a56df03-2daf-40a0-ab5a-7b9e25a791e0",o._sentryDebugIdIdentifier="sentry-dbid-0a56df03-2daf-40a0-ab5a-7b9e25a791e0")}catch{}})();const n=a(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function h(){const o=r();return e.jsx(n,{navigate:o})}export{h as default};
@@ -1 +0,0 @@
1
- import{j as n}from"./liveblocks-DiLJJ0-W.js";import{j as z,h as K,u as Z,l as H,g as d,k as X,n as ee,o as C}from"./core-PVb_PTOa.js";import{eM as M,qa as U,pK as ae,J4 as $,pF as y,bu as te,bm as se,bQ as oe,pG as re,J5 as ne,IR as S,dA as ie,tx as ce,J6 as le,tU as de,eS as me,eQ as fe}from"./zeni-epic-state-4sJL0-hG.js";import{I as pe,z as ue,J as he,j as Fe,n as w,l as q,y as ge,d as B,aj as Ie,r as be}from"./index-P5rhD5Na.js";import"./mui-Bs_Wx3U8.js";import Ce from"./NotFoundScreen-D5gX25SL.js";import{F as Se}from"./FeaturePreviewScreen-DsVyovAJ.js";import{a as h}from"./sentry-CRXtNjzG.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-BqWqtj0f.js";import{c as Ae}from"./useFetchSuggestedQuestionsWhenReady-BJfLdWEG.js";import{u as Te}from"./useInitialThreadRequest-DNzJLWO_.js";import{t as xe}from"./routePaths-C6cVlXoV.js";import{M as ke}from"./MobileAppDrawer-CPQuEteC.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="8d917d45-f3c2-45c6-9ec9-7d96284c7646",s._sentryDebugIdIdentifier="sentry-dbid-8d917d45-f3c2-45c6-9ec9-7d96284c7646")}catch{}})();const A=(s,a,e,o)=>{if(s!=a){const r=o??"";s!=null&&s.length>0?e(`../${a}${r}`,{replace:!0}):e(`${a}${r}`,{replace:!0})}},je=X(function(s){const a=ne(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{e[r]=o[r]===!1}),{selectedTimeframe:a.selectedTimeframe,isForecastVsActualOn:a.isForecastVsActualOn,compareMode:a.compareMode,forecastList:a.forecastList,selectedForecast:a.selectedForecast,pandLreport:a.pandLReportWithForecast,scrollPosition:a.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:e,type:"name+balances_forecast",analytics:B}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s($(e,o)),a.isPandLReportFetched(e)||s(y(e)),A(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(de(e))},onForecastVsActualsCompareToggle:e=>{s(le(e)),s(S({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(ce(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let r,i;const F=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=ie(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const f=xe(a.tenantEmailDomain,e.accountId,e.accountType,F,r,i),p=be(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(f,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(S({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(S({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(Ie);function v(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=pe(),e=z(),o=K(),r=Z(),{forecastId:i,tenantEmailDomain:F}=H(),[f,p]=h.useState(!1),[g,T]=h.useState(!1),u=ue.getSignedInUser(),x=d(t=>M(t)),G=x.company?.companyInfo.firstMonthOfFY??1,c=d(t=>U(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),j=d(t=>t.reportUIOptionsState.selectedForecast),D=t=>k.pandLByForecastID[t]!=null&&re(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=he();Ae({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:_}=ye({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});h.useEffect(()=>{if(!f&&I)p(!0),l||o(ae());else if(l&&!g){T(!0);const t=((m,R,P)=>R!=null?m.forecasts.findIndex(b=>b.id===R):P!=null?m.forecasts.findIndex(b=>b.id===P):m.forecasts.length>0?0:-1)(c,i,j?.id);t===-1&&i!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=j?.index?(o($(c.forecasts[t].id,t)),A(i,c.forecasts[t].id,e,r.search)):i==null&&t!==-1&&A(void 0,c.forecasts[t].id,e,r.search),t!==-1&&!D(c.forecasts[t].id)&&I&&o(y(c.forecasts[t].id))}},[f,p,o,l,c,g,T,U,y,I]);const E=Fe(),J=E?.loggedInUserRole!=null&&te(E.loggedInUserRole),{useFeatureGate:V}=w(),{isFeatureEnabled:L}=V(q.isReportsCommentingEnabled),W=Te(L?x?.companyId:void 0,{clearParams:l&&g}),[Y,Q]=h.useState(!1),O=t=>{Q(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ge,{analytics:B,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ke,{isAppContentDrawerOpen:Y,handleDrawerToggle:O}),n.jsx(je,{firstMonthOfFY:G,tenantEmailDomain:F,forecastIdFromUrlPath:i,navigate:e,location:r,isPandLReportFetched:D,meetingUrl:oe(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${u?.firstName}&lastname=${u?.lastName}&email=${u?.userEmail}`),hasTransactionAccess:J,isAiCfoAccessEnabled:N,onAskAiCfoClick:_,isReportsCommentingEnabled:L,isZeniUser:se(u),initialOpenThreadRequest:W,onClickMenuIcon:()=>{O(!0)}})]})}function Ke(){const s=d(i=>M(i)),{useFeatureGate:a}=w(),{isFeatureEnabled:e}=a(q.isDebitCardFeatureEnabled),o=me(e,s),r=fe(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Ke as PandLWithForecastRoutes,Ke as default};
@@ -1,22 +0,0 @@
1
- import{j as s}from"./liveblocks-DiLJJ0-W.js";import{I$ as oe,eM as X,jm as M,eS as q,eQ as ie,Gz as Y,ID as re,sF as ke,J0 as N,st as Pe,sO as je,sI as le,sx as de,sM as Te,sJ as Le,J1 as ce,uj as ve,J2 as Fe,fw as Ae,J3 as J,sC as pe,sA as ue,sR as Oe,b$ as Re}from"./zeni-epic-state-4sJL0-hG.js";import{K as me,n as ee,l as E,z as H,a4 as ge,F as he,af as fe,ag as Ve,C as Ce,o as A,W as be,D as ye,ah as Ue,J as $e,I as Be,y as Ze,d as Se,g as ze,r as Je,ai as Ge,j as Ke}from"./index-P5rhD5Na.js";import{D as we,n as W,S as De}from"./mui-Bs_Wx3U8.js";import te from"./NotFoundScreen-D5gX25SL.js";import{a as l}from"./sentry-CRXtNjzG.js";import{h as se,l as Me,g,j as He,u as We,k as _e,n as ne,o as z}from"./core-PVb_PTOa.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-BqWqtj0f.js";import{c as Ne}from"./useFetchSuggestedQuestionsWhenReady-BJfLdWEG.js";import{M as Xe}from"./MobileAppDrawer-CPQuEteC.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.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]="237c7285-43a4-43f5-b4a0-f6827b72ab44",e._sentryDebugIdIdentifier="sentry-dbid-237c7285-43a4-43f5-b4a0-f6827b72ab44")}catch{}})();const qe={overlayWidth:new Ce(100,100,48)},G=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[k,S]=l.useState(!1),{userId:w}=Me(),c=g(t=>oe(t)),m=g(t=>X(t)),D=g(t=>M(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:I}=C(E.isDebitCardFeatureEnabled),P=q(I,m),L=ie(m),v=Y(m),V=re(m),U=!!m.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(N()),y()},F=()=>{O===!0?S(!0):b()},$=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:B}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Z}=C(E.isChargeCardFeatureEnabled),p=ge(m,Z,I),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),T={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:$,mode:h,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:B===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(h==="zeni_only"?Pe(e):je(v))},onCloseClick:F,isLoading:x||c.person==null},r={onOkClick:()=>{S(!1),b()},onCancelClick:()=>{S(!1)}};return l.useEffect(()=>{x===!1&&w!=null&&u(ke(w))},[x,w]),l.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&b()},[c.updatePersonState.fetchState]),s.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[k===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:G.discardTitle}),descriptionComponent:s.jsx(Ee,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...T})]})})},es=W(De)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,xe=W(be.H6Regular)`
6
- margin-top: ${A.sp7};
7
- padding-left: ${A.sp8};
8
- padding-right: ${A.sp8};
9
- color: ${e=>e.theme.colors.primary};
10
- word-break: break-word;
11
- `,Ee=W(be.LargeRegularSp)`
12
- color: ${e=>e.theme.colors.hero};
13
- padding-left: ${A.sp8};
14
- padding-right: ${A.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${A.sp4};
17
- white-space: pre-line;
18
- `,ss={overlayWidth:new Ce(100,100,48)},K=ye.getLocalizedStrings().peoplePage.invitePage,as=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[k,S]=l.useState(!1),w=g(r=>oe(r)),c=g(r=>X(r)),m=g(r=>M(r)),{useFeatureGate:D}=ee(),{isFeatureEnabled:C}=D(E.isDebitCardFeatureEnabled),I=q(C,c),P=ie(c),L=Y(c),v=re(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&m&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),u(N())},b=()=>{O===!0?S(!0):x()},F={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map(r=>r.user),{isFeatureEnabled:B}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Z}=D(E.isChargeCardFeatureEnabled),p=ge(c,Z,C),{isFeatureEnabled:j}=D(E.isTreasuryEnabled),T={classList:o.classes,managersList:n.users,controllersList:$,mode:h,isZeniTenant:L,onPeopleLocalDataUpdated:r=>{u(le({peopleLocalData:r})),R(!0)},onResetClick:x,onSaveClick:()=>{u(h==="zeni_only"?Te(e):Le())},onCloseClick:b,peopleDetails:w,isAccountingClassesEnabled:m,isReimbursementDisabled:V===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:B===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return l.useEffect(()=>{w.invitePersonState.fetchState==="Completed"&&(y(),u(N()))},[w.invitePersonState.fetchState]),s.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:ss.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:b,children:s.jsxs(ts,{onClick:r=>r.stopPropagation(),children:[k===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:K.discardTitle}),descriptionComponent:s.jsx(Ee,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:F}):null,s.jsx(Ue,{...T})]})})},ts=W(De)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,ns=_e(function(e,n){const d=ce(e),o=H.getSignedInUser();return{data:d,loggedinUserId:o?.userId??"",isZeniTenant:n.isZeniTenant===!0,shouldFetchClasses:n.shouldFetchClasses,isZeniAdminUser:o?.userEmailDomain==="zeni.ai"&&n.isZeni===!0,isAccountingClassesEnabled:M(e),analytics:Se}},function(e,n){const{navigate:d,companyId:o,shouldFetchClasses:h}=n;return{personAction:{onPersonDelete:(i,y)=>{e(de(i,y))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(pe()),e(ue(o,h))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(J({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(J({searchText:i}))}}}})(Ge);function Q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:n}){const d=He(),o=se(),h=We(),{areTenantIdsInSync:i}=$e(),y=H.getSignedInUser(),f=g(a=>X(a)),{useFeatureGate:u}=ee(),{isFeatureEnabled:O}=u(E.isDebitCardFeatureEnabled),R=g(a=>M(a)),k=!q(O,f)&&R,S=Y(f),w=f?.tenantId,{tenantEmailDomain:c}=f,[m,D]=l.useState(!1),[C,I]=l.useState(!1),[P,L]=l.useState(!1),[v,V]=l.useState("off"),[U,x]=l.useState(!1),b=a=>{x(a)},{isAiCfoOpen:F,setIsAiCfoOpen:$}=Be(),{isAiCfoAccessEnabled:B,onAskAiCfoClick:Z}=Qe({isAiCfoOpen:F,setIsAiCfoOpen:$,mobileExploreReferrer:"People"}),p=g(a=>ce(a));Ne({isDataReady:p.fetchState==="Completed"});const j=g(a=>ve(a.classState,a.classListState)),T=g(a=>Fe(a.userState,a.userRoleState,a.userListViewState,"manager")),r=g(a=>Ae(a)),t=f?.companyId;l.useEffect(()=>{m&&v===p.uiState.mode||!i||(o(J({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),D(!0),o(pe()))},[m,y,w,o,p.uiState.mode,i]),l.useEffect(()=>{t!=null&&i&&o(ue(t,k))},[t,k,i]),l.useEffect(()=>{I(e!=null&&e===!0),L(n!=null&&n===!0&&n)},[e,n]),l.useEffect(()=>{o(J({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const ae=()=>{I(!1),L(!1),d("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx(Ze,{analytics:Se,onLoad:a=>a.trackPageLoaded(ze.Event.members)}):null,C===!0?s.jsx(as,{closeDrawerHandler:ae,isInvitePeopleDrawerOpen:C,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:ae,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,s.jsx(Xe,{isAppContentDrawerOpen:U,handleDrawerToggle:b}),s.jsx(ns,{navigate:d,signedInUser:y,isZeni:f.isZeni,isZeniTenant:S,peopleUIState:p.uiState,companyId:t,shouldFetchClasses:k,classList:j,managersView:T,peopleView:p,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(a,_)=>{o(J({sortKey:a,sortOrder:_}))},onRowClick:a=>{const _=`/${c}/people/${encodeURIComponent(a)}/edit`,Ie=Je(h.state?.pathnameStackToGoBack,h.pathname);d(_,{state:{pathnameStackToGoBack:Ie}})},onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:B,onAskAiCfoClick:Z})]})}function Es(){const e=Ke();return Re(e?.loggedInUserRole??[])?s.jsxs(ne,{children:[s.jsx(z,{path:"/",element:s.jsx(Q,{})}),s.jsx(z,{path:"new",element:s.jsx(Q,{isInvitePeopleDrawerOpen:!0})}),s.jsx(z,{path:":userId/edit",element:s.jsx(Q,{isEditPeopleDrawerOpen:!0})}),s.jsx(z,{path:"*",element:s.jsx(te,{})})]}):s.jsx(ne,{children:s.jsx(z,{path:"*",element:s.jsx(te,{})})})}export{Es as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-DiLJJ0-W.js";import _ from"./NotFoundScreen-D5gX25SL.js";import{a as r}from"./sentry-CRXtNjzG.js";import{j as M,u as v,g,l as U,h as P,N as z,k as V,n as B,o as h}from"./core-PVb_PTOa.js";import{eM as F,OG as b,bn as G,bm as N,h2 as H,gy as $}from"./zeni-epic-state-4sJL0-hG.js";import{x as q,z as I,I as J,cs as K}from"./index-P5rhD5Na.js";import"./mui-Bs_Wx3U8.js";import{u as L}from"./useAskAiCfoHostNavButtonProps-BqWqtj0f.js";import{c as Q}from"./useFetchSuggestedQuestionsWhenReady-BJfLdWEG.js";import{M as W}from"./MobileAppDrawer-CPQuEteC.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.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]="80b78d52-baad-4310-af47-ed2ca59ce138",e._sentryDebugIdIdentifier="sentry-dbid-80b78d52-baad-4310-af47-ed2ca59ce138")}catch{}})();const X=V(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)}}})(K),Y=()=>{const e=M(),t=v(),c=q(),o=g(a=>F(a)),{aggregatedReportViewState:n}=g(a=>b(a)),{tenantEmailDomain:m}=U(),p=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[C,S]=r.useState(!1),w=G(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=w||k||x,d=r.useCallback((a,i,O)=>{p(H({fromMonth:a,toMonth:i,cacheOverride:O}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const A=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),D=r.useCallback((a,i)=>{d(a,i,!1)},[d]),u=a=>{S(a)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=J(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=L({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(W,{isAppContentDrawerOpen:C,handleDrawerToggle:u}),s.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:A,onTimeRangeSelect:D,handleDrawerToggle:u,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):s.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function Ie(){return s.jsxs(B,{children:[s.jsx(h,{path:"*",element:s.jsx(Y,{})}),s.jsx(h,{path:"*",element:s.jsx(_,{})})]})}export{Ie as default};
@@ -1,5 +0,0 @@
1
- import{j as s}from"./liveblocks-DiLJJ0-W.js";import{a as o}from"./sentry-CRXtNjzG.js";import{g as f,j as M,h as V,u as F,k as N}from"./core-PVb_PTOa.js";import{h as _,K as U,z as R,b2 as $,C as z,J,I as K,y as Y,d as l,g as q,a1 as G,b3 as Q}from"./index-P5rhD5Na.js";import{eW as X,eM as Z,Lu as I,Lv as ee,tn as ae,td as g,eY as re,bL as ne,ti as te,Lw as se}from"./zeni-epic-state-4sJL0-hG.js";import{D as oe,e as ie,n as le,S as ce}from"./mui-Bs_Wx3U8.js";import{u as de}from"./useAskAiCfoHostNavButtonProps-BqWqtj0f.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-BJfLdWEG.js";import{M as ue}from"./MobileAppDrawer-CPQuEteC.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]="ac59d464-12ea-4bca-b128-bb581812cc5d",e._sentryDebugIdIdentifier="sentry-dbid-ac59d464-12ea-4bca-b128-bb581812cc5d")}catch{}})();const pe={overlayWidth:new z(100,100,30)},we=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=_(),n=U();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>X(c));return s.jsx(oe,{anchor:"right",open:e,PaperProps:{style:{width:pe.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(ie,{in:e,direction:"left",children:s.jsx(ge,{onClick:c=>c.stopPropagation(),children:s.jsx($,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ge=le(ce)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,P="refer-and-earn-status-update",ke=N(function(e){const a=I(e),r=e.referralViewState.rewardsPlanFetchState,n=ne([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(se({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(te(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(G(Q));function Pe({isReferralDrawerOpen:e}){const a=M(),r=V(),n=F(),[i,u]=o.useState(!1),[c,x]=o.useState(!1),[D,A]=o.useState(!1),[k,C]=o.useState(!1),p=R.getSignedInUser(),h=f(t=>Z(t)),b=f(t=>I(t)),m=b.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),v=ee([b,w]),{areTenantIdsInSync:d}=J();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(r(ae()),A(!0))},[]),o.useEffect(()=>{!i&&m==="Not-Started"&&d&&(u(!0),r(g(!0)))},[m,r,d]),o.useEffect(()=>{!c&&w.fetchState==="Not-Started"&&d&&(x(!0),r(re(!0)))},[w,r,d]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[E,j]=o.useState(!1),y=t=>{j(t)},{isAiCfoOpen:L,setIsAiCfoOpen:O}=K(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=de({isAiCfoOpen:L,setIsAiCfoOpen:O,mobileExploreReferrer:"Rewards"});fe({isDataReady:v===!0});const W={events:p?.userId!=null?[`private-${p.userId}.${P}`]:[],eventCallback:(t,S,H)=>{H.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[v===!0?s.jsx(Y,{analytics:l,onLoad:t=>(S=>{p!=null&&S.trackPageLoaded(q.Event.rewardsPageViewed)})(t)}):null,s.jsx(ue,{isAppContentDrawerOpen:E,handleDrawerToggle:y}),k===!0?s.jsx(we,{closeDrawerHandler:()=>{C(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(ke,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{y(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B,...W})]})}export{Pe as R};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-DiLJJ0-W.js";import R from"./NotFoundScreen-D5gX25SL.js";import{a as p}from"./sentry-CRXtNjzG.js";import{j as x,u as C,h as A,g as u,N as E,k,n as D,o as m}from"./core-PVb_PTOa.js";import{eM as T,Mo as g,ME as S,Ck as V,Bt as M,Cj as c,Ca as U,MT as _}from"./zeni-epic-state-4sJL0-hG.js";import{h as B,z as $,B as N,a1 as O,bI as W,aa as z}from"./index-P5rhD5Na.js";import"./mui-Bs_Wx3U8.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-CMXdWUhi.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]="658631e9-9709-40b4-9b1e-f4aa2bb69d37",e._sentryDebugIdIdentifier="sentry-dbid-658631e9-9709-40b4-9b1e-f4aa2bb69d37")}catch{}})();const d="reimbursement-approval-rule-update",P=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(d)&&e(_(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(U(n))},onEditRuleClick:n=>{n!=null?(e(c(n)),a(`./${n}/edit`)):(e(c()),a("./new"))}}})(O(W)),q=()=>{const e=x(),r=C(),a=A(),[l,n]=p.useState(!1),[f,y]=p.useState(!1),b=u(s=>s.remiSetupApproverViewState.fetchState),o=u(s=>T(s)),w=B(),i=u(s=>g(s)),h=u(s=>S(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(n(!0),a(M(!0)))},[l,b,a]),$.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(c())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${d}`]:[],eventCallback:(s,F,I)=>{s.endsWith(d)&&I.onApprovalRulesEventReceived(s)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(P,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(m,{path:"/",element:t.jsx(q,{})}),t.jsx(m,{path:"/new",element:t.jsx(v,{})}),t.jsx(m,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(m,{path:"*",element:t.jsx(R,{})})]})}export{Z as R};
@@ -1,68 +0,0 @@
1
- import{j as s}from"./liveblocks-DiLJJ0-W.js";import{j as J,h as le,u as V,l as X,g as w,N as $,k as K,i as ut,n as pt,o as E}from"./core-PVb_PTOa.js";import{eM as W,MU as me,b$ as ce,Bo as xe,jx as bt,BB as ae,BA as se,MV as gt,bm as de,fG as Te,MW as ht,Jg as ft,jm as je,Jh as Se,Ji as St,ig as It,Ma as yt,iw as Rt,Bc as At,s1 as Ct,io as vt,BY as De,MX as Fe,MY as kt,MZ as Bt,M_ as Et,M$ as wt,N0 as xt,BI as Ie,iC as Tt,Mj as jt,BC as Dt,Bm as Ft,N1 as Ut,Bl as Lt,N2 as Nt,Bu as ye,BM as Mt,BL as Pt,BH as $t,N3 as Ue,Gz as _t,bn as Ot,Bx as zt,Ce as Gt,N4 as Ht,N5 as Zt,BU as Vt,BR as Re,LF as Wt,Bj as Jt,N6 as Le,CD as Ae,CL as Kt,N7 as qt,N8 as H,N9 as Yt,Na as Ne,Nb as Qt,Nc as Me,Nd as Pe,C4 as ie,bs as Xt,bD as ue,cy as pe,eS as $e,eQ as _e,Ne as en,gy as tn,LS as nn,Nf as an,Ng as Oe,LW as sn,ME as on,Nh as rn,MT as ln,CI as Ce,CH as mn,Ni as cn,Nj as dn,Nk as un,Nl as pn,Nm as bn,Mp as gn,Cy as hn,CC as fn,bu as Sn,bC as In,ct as yn,cN as Rn,br as An,If as Cn,cJ as vn,cL as kn,cK as Bn,cs as En}from"./zeni-epic-state-4sJL0-hG.js";import{x as ze,K as Ge,n as ee,l as C,z as M,bJ as He,y as te,d as v,aC as ve,o as U,ao as Q,F as wn,D as Ze,bK as xn,r as Z,I as Ve,bL as Tn,j as ne,bM as jn,J as Dn,C as Fn,B as be,g as We,a1 as Un,ba as Ln,O as Nn,h as Je,bN as Mn,a4 as Pn}from"./index-P5rhD5Na.js";import{n as _,S as $n}from"./mui-Bs_Wx3U8.js";import oe from"./NotFoundScreen-D5gX25SL.js";import{S as ke}from"./SetupPagesScreen-DxIIsva3.js";import{F as Ke}from"./FeaturePreviewScreen-DsVyovAJ.js";import{a as g}from"./sentry-CRXtNjzG.js";import{u as qe}from"./useInitialThreadRequest-DNzJLWO_.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-BqWqtj0f.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-BJfLdWEG.js";import{D as _n}from"./DrawerScreen-D2sVaWmT.js";import{M as Xe}from"./MobileAppDrawer-CPQuEteC.js";import{R as On}from"./ReimbursementApprovalRoutes-Cu9gxM3S.js";import{FallBackRoute as zn}from"./ScreenRoutes-DMJirfOH.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.js";import"./analyticsHelper-DqgMIH9d.js";import"./routePaths-C6cVlXoV.js";import"./BusinessVerificationPageScreen-XAQKreuQ.js";import"./ReimbursementApprovalRuleDetailScreen-CMXdWUhi.js";import"./getLocaleForTenant-yD-xTTtK.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]="0ba57475-6824-44e0-baf8-6f8d17787511",e._sentryDebugIdIdentifier="sentry-dbid-0ba57475-6824-44e0-baf8-6f8d17787511")}catch{}})();const et=e=>`/${e}/reimbursements`,Gn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=M.getSignedInUser(),d=de(c),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=me(e,t.reimbursementId),p=ht(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,S=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,S=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:R},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:ce(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:S,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=M.getSignedInUser();return{onReceiptsUpload:(i,l,p)=>{i!=null&&e(se(i,l,p,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Mt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Nt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,p)=>{e(Ut({reimbursementId:p,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,p)=>{e(Ft({reimbursementId:p,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Dt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(jt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ae({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Et({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Bt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(kt());const i=et(o),l=Z(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(De(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Ct("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(At(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(xn);function Be(){const e=J(),t=le(),n=V(),{reimbursementId:r}=X(),c=ze(),d=Ge(),[m,o]=g.useState(r==null),[a,i]=g.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(C.isLimitedCategoryForReimbursement),{isFeatureEnabled:I}=l(C.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(C.isReimbursementCommentingEnabled),x=V().pathname,R=x.includes("edit"),j=x.includes("reimbursement/new"),[b,k]=g.useState(!1),y=M.getSignedInUser(),T=w(u=>W(u)),f=w(u=>me(u,r)),D=qe(T?.companyId,{clearParams:f.fetchState==="Completed"}),P=ce(T?.userRole??[]);g.useEffect(()=>{(j&&!b||R&&f.fetchState!="Completed"&&f.fetchState!="In-Progress")&&(k(!0),t(xe(!1,p,I,r)))});const A=w(u=>bt(u.accountState,u.accountListState,"reimbursementAccountList"));if(y==null)throw Error("Can't access address page without signing in...");const F={pathname:`../${r}`,search:n.search};return f.isDeleted===!0||f.billStage=="paid"||f.billStage=="scheduled"||f.fetchState=="Not-Started"||P&&f.billStatus==="rejected"||P===!1&&f.billStage==="pending_approval"&&f.billStatus!=="rejected"?s.jsx($,{to:F}):f.deleteStatus.fetchState==="In-Progress"||f.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:v,onLoad:u=>(N=>{r!=null&&f.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(u)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:U.sp3,paddingBottom:"15px",paddingLeft:U.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(Jn,{children:[s.jsx(Kn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:U.sp5,paddingRight:U.sp3,paddingBottom:U.sp5,paddingLeft:U.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:D??void 0,isReimbursementCommentingEnabled:S,location:n,navigate:e,currentTenant:T,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i})})]})}const Zn=_.div`
2
- display: flex;
3
- position: relative;
4
- height: 100vh;
5
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
6
- background-color: ${e=>e.theme.colors.grey4};
7
- `,Vn=_.div`
8
- position: fixed;
9
- top: 0;
10
- left: 0;
11
- right: 0;
12
- bottom: 0;
13
- background-color: ${wn.overlayBackgroundBlack};
14
- z-index: 5;
15
- `,Wn=_.div`
16
- position: absolute;
17
- top: 0;
18
- left: 0;
19
- width: 42%;
20
- height: 100%;
21
- z-index: 6;
22
- display: flex;
23
- background-color: transparent;
24
- overflow: hidden;
25
- `,Jn=_.div`
26
- position: fixed;
27
- top: 0;
28
- left: 0;
29
- right: 0;
30
- bottom: 0;
31
- z-index: 11;
32
- display: flex;
33
- flex-direction: column;
34
- overflow-y: auto;
35
- background-color: ${e=>e.theme.colors.grey4};
36
- `,Kn=_.button`
37
- align-self: flex-end;
38
- background: none;
39
- border: none;
40
- cursor: pointer;
41
- padding: ${U.sp2} ${U.sp3};
42
- line-height: 1;
43
- color: ${e=>e.theme.colors.hero};
44
- &:hover {
45
- color: ${e=>e.theme.colors.primary};
46
- }
47
- svg {
48
- width: ${U.sp4};
49
- height: ${U.sp4};
50
- }
51
- `,qn=_.div`
52
- display: flex;
53
- flex-direction: column;
54
- width: 100%;
55
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
56
- `,Yn=K(function(e,t){const n=Ue(e,t.reimbursementId),r=M.getSignedInUser(),c=de(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ht(n.remiActivities,Zt(t.currentTenant),r));const i=ce(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Fe());const a=et(o),i=Z(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Jt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Wt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Re(n,a.type,"")):e(Re(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=Z(c.state?.pathnameStackToGoBack,c.pathname);d("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{v.trackReimbursementDeleteReimbursement(n),e(De(n))},cancelAndDeleteReport:a=>{a===!0?v.trackReimbursementCancelAndDeleteReimbursement(n):v.trackReimbursementCancelReimbursement(n),e(Vt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(Tn);function Qn(){const e=J(),t=le(),n=V(),r=n.hash.substring(1),c=ze(),{reimbursementId:d}=X(),m=M.getSignedInUser(),o=w(B=>W(B)),a=w(B=>Ue(B,d??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=qe(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoOpen:p,setIsAiCfoOpen:I}=Ve(),{isAiCfoAccessEnabled:S,onAskAiCfoClick:x}=Ye({isAiCfoOpen:p,setIsAiCfoOpen:I,mobileExploreReferrer:"Reimbursement Details"});Qe({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:R}=ee(),{isFeatureEnabled:j}=R(C.isLimitedCategoryForReimbursement),[b,k]=g.useState(!1),[y,T]=g.useState(!1),[f,D]=g.useState(!1),{isFeatureEnabled:P}=R(C.isReimbursementCommentingEnabled),{isFeatureEnabled:A}=R(C.isShowDeletedReimbursementsFeatureEnabled),F=w(B=>me(B,d??"")),u=_t(o),N=Ot(o.userRole),G=a.fetchState;if(g.useEffect(()=>{b||d==null?b==1&&G==="Error"&&e("page-not-found",{replace:!0}):(k(!0),t(zt(d,!1,A)))},[b,d,t,G]),g.useEffect(()=>{A&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&u===!1?D(!1):D(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(N||a.allApprovers.find(B=>B.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,N,o.isZeni,u,m]),g.useEffect(()=>{y||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||F.fetchState=="Completed"||F.fetchState=="In-Progress"||(T(!0),t(xe(!1,j,A,d)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Gt(!1,!0,!0,a.lastUpdatedByUserId)))},[y,a,d,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&F.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx($,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&F.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(He,{}):s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:v,onLoad:B=>(q=>{d!=null&&q.trackReimbursementReimbursementDetails(d)})(B)}),s.jsx(Yn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:P,isShowDeletedReimbursementEnabled:A,location:n,navigate:e,isRealTimeApprovalEnabled:f,currentTenant:o,reimbursementId:d??"",themeState:c,isAiCfoAccessEnabled:S,onAskAiCfoClick:x})]})}const Xn=K(function(e,t){return{remisReviewView:Le(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(H())},onCloseReviewItem:n=>{e(qt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Kt());break;case"approve":e(Ae("approved",r??""));break;case"reject":e(Ae("rejected",r??""))}}}})(jn);function ea(){const e=J(),t=w(d=>d.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=w(d=>Le(d)),r=ne(),c=r?.loggedInUserRole?.includes("admin")===!0;return g.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(Xn,{navigate:e,analytics:v,isAdmin:c})}const z=sn(),tt="bulk-operation-update",re="reimbursement-approval-rule-update",{spendManagement:ta,common:Ee}=Ze.getLocalizedStrings(),we=ta.reimbursement.bulkActions,na=_.div`
57
- display: flex;
58
- min-height: 100%;
59
- width: 100%;
60
- flex: 1 1 auto;
61
- flex-direction: column;
62
- align-items: center;
63
- background-color: ${e=>e.theme.colors.grey4};
64
- `,aa=K(function(e,t){const n=Pe(e,z,t.isBulkActionEnabled);let r=n.allSubTabs;const c=M.getSignedInUser(),d=de(c),m=e.tenantState.currentTenantId,o=W(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(S=>S!=="deleted"));const p=n.fetchState,I=on(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(S=>S.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:d,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:p,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:z,spendManagementEndPoint:`${Nn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:I.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(H()),e(Ne(o))},onSubtabChange:o=>{e(H()),e(Me(o))},onTransactionClick:(o,a)=>{const i=oa(m,o,a),l=Z(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=ia(m),a=Z(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=Z(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(bn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(pn(o))},onFiltersChange:o=>{e(un({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&v.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&v.trackSpendManagementDownloadClick("reimbursement"),e(dn({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(ie(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(cn(o))},removeAllTransactionsFromBulkActionList:()=>{e(H())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(mn(o,a??""));break;case"send_for_approval":e(Ce("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Ce("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(re)&&e(ln(!1))},onEventReceived:o=>{o===tt&&e(rn())}}})(Un(Ln));function sa(){const{isAiCfoOpen:e,setIsAiCfoOpen:t}=Ve(),n=J(),r=le(),c=V(),d=c.state,m=Ge(),[o,a]=g.useState(null),i=ut("/:tenantEmailDomain/reimbursements/bulk-review")!=null;g.useEffect(()=>{if(d?.tab!=null&&d?.subTab!=null){const h=Yt(d.tab.toString());h!=null?r(Ne(h)):console.log("Warning:Not a valid remiListTab");const O=Qt(d.subTab.toString());O!=null?r(Me(O)):console.log("Warning:Not a valid remiListSubTab")}return()=>{r(H())}},[]);const{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(C.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=l(C.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(C.isBillPayCommentingEnabled),{isFeatureEnabled:x}=l(C.isReimbursementCommentingEnabled),{isFeatureEnabled:R}=l(C.isReimbursementBulkActionEnabled),j=M.getSignedInUser(),b=w(h=>W(h)),[k,y]=g.useState(!1),[T,f]=g.useState(!1),D=ne(),P=D?.loggedInUserRole?.includes("admin")===!0,A=w(h=>Pe(h,z,R)),{areTenantIdsInSync:F}=Dn(),u=A.fetchState,{isAiCfoAccessEnabled:N,onAskAiCfoClick:G}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:t,mobileExploreReferrer:"Reimbursement List"});if(Qe({isDataReady:u==="Completed"}),g.useEffect(()=>{!T&&F&&(f(!0),r(ie(z,!0,I,!1,!0)))},[T,z,r,F]),j==null)throw Error("Can't access address page without signing in...");const B=!!b?.userRole&&Xt(b),q=ue(D?.loggedInUserRoleMap),nt=pe(D?.loggedInUserRoleMap),at=!!b.userReimbursementInfo?.isReimbursementTOSAccepted,st=!!b.companyReimbursementInfo?.info?.isReimbursementEnabled,it=!!b.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,ot=w(h=>Te(h.companyState,b.companyId)),rt=ot?.company.featuresActivationInfo.connectedAccountProvider,ge=h=>{y(h)},{isFeatureEnabled:lt}=l(C.isDebitCardFeatureEnabled),mt=$e(lt,b),ct=_e(b),{remisProcessed:Y,remisProcessing:he}=w(h=>en(h));g.useEffect(()=>{Y===he&&o!=null&&(r(tn({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:Y>1?we.reports:we.report},{variableName:"_has_",variableValue:Y>1?Ee.texts.have:Ee.texts.has},{variableName:"_action_",variableValue:nn(o)}]})),r(an()),setTimeout(()=>{r(ie(z,!0,I,!1,!0,!0))},3e3),a(null))},[Y,he]);const dt={events:b.companyId!=null?[`private-${b.companyId}.${tt}`,`private-${b.companyId}.${re}`]:[],eventCallback:(h,O,fe)=>{h.endsWith(re)?fe.onReimbursementApprovalRulesEventReceived?.(h):O.entity_type==="reimbursement"&&(a(O.operation_type),fe.onEventReceived(h))}};return c.pathname.endsWith("/reimbursements/")||c.pathname.endsWith("/reimbursements")||c.pathname.endsWith("/reimbursements/bulk-review")?mt===!0||ct===!0?s.jsx(Ke,{}):st&&(!B||q)||nt&&at?s.jsxs(s.Fragment,{children:[u==="Completed"?s.jsx(te,{analytics:v,onLoad:h=>(O=>O.trackPageLoaded(We.Event.reimbursementHome))(h)}):null,s.jsx(Xe,{isAppContentDrawerOpen:k,handleDrawerToggle:ge}),s.jsxs(na,{windowSize:m,children:[s.jsx(_n,{isOpen:i,drawerLeftMargin:new Fn(0,0,300,600),onClose:()=>{n("./"),r(H())},children:s.jsx(ra,{onClick:h=>h.stopPropagation(),children:s.jsx(ea,{})})}),s.jsx(aa,{isShowDeletedBillsEnabled:p,isShowDeletedReimbursementEnabled:I,isBillPayCommentingEnabled:S,isReimbursementCommentingEnabled:x,location:c,navigate:n,currentTenant:b,period:z,isAdmin:P,isEmployee:B,entity:"reimbursement",onClickMenuIcon:()=>{ge(!0)},createdByUserList:A.createdByUserList,createdByUserListFetchState:A.createdByUserListFetchState,isDownloadEnabled:A.isDownloadEnabled,connectedAccountProvider:rt,isBulkActionEnabled:R,bulkSubmissionLimit:A.remiBulkSubmissionLimit,bulkSubmissionFetchState:A.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:N,onAskAiCfoClick:G,...dt})]})]}):it&&q?s.jsx($,{to:"../setup"}):D!=null&&Oe(b,D.loggedInUserRoleMap)?s.jsx($,{to:"../promo"}):s.jsx(be,{fetchState:"In-Progress"}):s.jsx(oe,{})}const ia=e=>`/${e}/reimbursements/setup`,oa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ra=_($n)`
65
- display: flex;
66
- min-height: 100%;
67
- flex-direction: column;
68
- `,la=K(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:gn(e,n),analytics:v,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(fn(n))},onCreateNewRemiButtonClick:()=>{e(hn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Mn),ma=()=>{const e=J(),t=V(),{tenantEmailDomain:n}=X(),r=Je(),[c,d]=g.useState(!1),m=w(k=>W(k)),o=M.getSignedInUserTenant(n)?.companyId??m.companyId,a=M.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),p=ne(),I=ue(p?.loggedInUserRoleMap),S=pe(p?.loggedInUserRoleMap),x=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,R=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,j=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,b=k=>{d(k)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return R&&S&&x?s.jsx($,{to:"../../../reimbursements"}):j&&I?s.jsx($,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!j||m.userReimbursementInfo&&S&&x===!1?s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:v,onLoad:k=>(y=>y.trackPageLoaded(We.Event.reimbursementPromoPage))(k)}),s.jsx(Xe,{isAppContentDrawerOpen:c,handleDrawerToggle:b}),s.jsx(la,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{b(!0)}})]}):s.jsx(be,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function _a(){const e=w(B=>W(B)),t=ne(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Je(),c=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,d=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=ee(),{isFeatureEnabled:o}=m(C.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(C.isDebitCardFeatureEnabled),i=$e(a,e),l=_e(e),p=e?.userRole!=null&&Sn(e?.userRole),I=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&In(t?.loggedInUserRoleMap),S=yn(t?.loggedInUserRoleMap),x=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p,R=ue(t?.loggedInUserRoleMap),j=x&&R,{isFeatureEnabled:b}=m(C.isDepositAccountsFeatureEnabled),k=b&&!p&&Rn(t?.loggedInUserRoleMap),y=Pn(e,o,a)&&!p&&An(t?.loggedInUserRoleMap),T=Cn(t?.loggedInUserRoleMap),f=vn(t?.loggedInUserRoleMap),D=kn(t?.loggedInUserRoleMap),P=Bn(t?.loggedInUserRoleMap),A=En(t?.loggedInUserRoleMap),F=pe(t?.loggedInUserRoleMap),{tenantEmailDomain:u}=X(),N=V(),G=n===!0&&(R||F&&d);return s.jsxs(pt,{children:[N.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"verification",element:s.jsx(ke,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:j,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:y,isUserHasOnlyCardAccess:T,productType:"reimbursement",type:"verification"})}),s.jsx(E,{path:"setup",element:s.jsx(ke,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:j,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:y,isUserHasOnlyCardAccess:T,productType:"reimbursement",type:"setup"})}),s.jsx(E,{path:"promo",element:s.jsx(ma,{})}),s.jsx(E,{path:"approval-rules/*",element:j?s.jsx(On,{}):s.jsx(zn,{isUserHasZeniAccountsAccess:f,isUserHasChargeCardAccess:P,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:F,isUserHasTreasuryAccess:D,isTenantBankingOnly:i,tenantEmailDomain:u??""})}),G&&s.jsx(E,{path:"*",element:s.jsx(sa,{})}),(i===!0||l===!0)&&s.jsx(E,{path:"/*",element:s.jsx(Ke,{})}),t!=null&&Oe(e,t?.loggedInUserRoleMap)&&s.jsx(E,{path:"*",element:s.jsx($,{to:"../promo"})}),c&&R&&s.jsx(E,{path:"*",element:s.jsx($,{to:"../setup"})})]}):N.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"new",element:s.jsx(Be,{})}),s.jsx(E,{path:":reimbursementId",element:s.jsx(Qn,{})}),s.jsx(E,{path:":reimbursementId/edit",element:s.jsx(Be,{})}),s.jsx(E,{path:"*",element:s.jsx(oe,{})})]}):s.jsx(E,{path:"*",element:s.jsx(be,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${U.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(E,{path:"*",element:s.jsx(oe,{})})]})}export{_a as default};