@zeniai/web-app-ui 5.1.51-qa → 5.1.52-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 (122) hide show
  1. package/dist/assets/AddressRoutes-Cg2gXbOf.js +1 -0
  2. package/dist/assets/{AddressScreen-DHENiPsE.js → AddressScreen-BBCv44qS.js} +2 -2
  3. package/dist/assets/{AiCfoScreen-BDeqJ8PX.js → AiCfoScreen-Da9zCyWe.js} +5 -5
  4. package/dist/assets/{BillPayApprovalRoutes-re8xxMBE.js → BillPayApprovalRoutes-TnPLWObs.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-BKu8tYXF.js → BillPayRoutes-gRXPgRX3.js} +8 -8
  6. package/dist/assets/{BusinessVerificationPageScreen-7ydI8UR9.js → BusinessVerificationPageScreen-DWx2BUK6.js} +2 -2
  7. package/dist/assets/{CardsAiCfoScreen-QyowC-mN.js → CardsAiCfoScreen-BCU45aIH.js} +1 -1
  8. package/dist/assets/{ChargeCardRoutes-BbZEL-b5.js → ChargeCardRoutes-SrcIcjEg.js} +10 -10
  9. package/dist/assets/{CompanyPassportScreen-AZhDXSZE.js → CompanyPassportScreen-C2ZjBTtu.js} +1 -1
  10. package/dist/assets/{ConnectionAuthScreen-DDij7-L5.js → ConnectionAuthScreen-DQGgk8VQ.js} +1 -1
  11. package/dist/assets/CustomerOnboardingAuthScreen-DndbS7zx.js +1 -0
  12. package/dist/assets/{CustomerOnboardingRoutes-COHKYeEq.js → CustomerOnboardingRoutes-BiJk8RGO.js} +4 -4
  13. package/dist/assets/{DashboardRoutes-B1cE2wJc.js → DashboardRoutes-C2R9sFOt.js} +1 -1
  14. package/dist/assets/{DefaultTenantHome-DivCz85L.js → DefaultTenantHome-Cs1fEcl7.js} +1 -1
  15. package/dist/assets/DomesticWireDetailScreen-D2sqfin3.js +18 -0
  16. package/dist/assets/DrawerScreen-BXWf7y4o.js +1 -0
  17. package/dist/assets/EntityDetailRoutes--LkTS4Lg.js +1 -0
  18. package/dist/assets/{ExpenseAutomationRoutes-pmgLYKV-.js → ExpenseAutomationRoutes-DN1VLKxs.js} +3 -3
  19. package/dist/assets/FeaturePreviewScreen-C_7xKfC9.js +1 -0
  20. package/dist/assets/{HubSpotOAuthCallbackScreen-BrjX8V0E.js → HubSpotOAuthCallbackScreen-BtgwDGFv.js} +1 -1
  21. package/dist/assets/{MagicLinkRoutes-Dn4g326h.js → MagicLinkRoutes-w9Xo_7JQ.js} +9 -9
  22. package/dist/assets/MagicLinkSignInScreen-_FORqdKk.js +12 -0
  23. package/dist/assets/{MobileAppDrawer-CjoW3Rax.js → MobileAppDrawer-B2Mj3GDG.js} +1 -1
  24. package/dist/assets/NotFoundScreen-DpHt-tQH.js +1 -0
  25. package/dist/assets/{NotificationRoutes-DE-Z8DSv.js → NotificationRoutes-Bd-2Em1h.js} +1 -1
  26. package/dist/assets/OAuthConsentScreen-DunOek_C.js +1 -0
  27. package/dist/assets/{PandLWithForecastRoutes-C3Yczwgv.js → PandLWithForecastRoutes-BnZrz52M.js} +1 -1
  28. package/dist/assets/{PeopleRoutes-ZidIbEdd.js → PeopleRoutes-tR11OG4C.js} +3 -3
  29. package/dist/assets/PerformanceRoutes-tqcqZlMe.js +1 -0
  30. package/dist/assets/{Preview-OiplHjn8.js → Preview-BBgrn4cd.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-B8QVReQm.js → QBOConnectionScreen-CWE_gavn.js} +1 -1
  32. package/dist/assets/{ReferralListScreen-Cnd7u4T9.js → ReferralListScreen-B51q6tuc.js} +2 -2
  33. package/dist/assets/ReimbursementApprovalRoutes-CX0ljo0U.js +1 -0
  34. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BgYFphfr.js → ReimbursementApprovalRuleDetailScreen-BY8AWRBv.js} +1 -1
  35. package/dist/assets/{ReimbursementRoutes-BeD0lwna.js → ReimbursementRoutes-BNT5fCZV.js} +5 -5
  36. package/dist/assets/{ReportsRoutes-CPI-jy1F.js → ReportsRoutes-BkcfE81W.js} +1 -1
  37. package/dist/assets/RewardsRoutes-Bp0jvJUz.js +1 -0
  38. package/dist/assets/{ScreenRoutes-B24ySlpK.js → ScreenRoutes-DzWi1qtt.js} +2 -2
  39. package/dist/assets/SettingsRoutes-C45RXj_4.js +57 -0
  40. package/dist/assets/{SetupPagesScreen-DtddTp_T.js → SetupPagesScreen-CnApuu2-.js} +5 -5
  41. package/dist/assets/SignInScreen-D4fYBdSr.js +1 -0
  42. package/dist/assets/{SignOutScreen-Djs9TXWR.js → SignOutScreen-scofbvIC.js} +1 -1
  43. package/dist/assets/{TaskListScreen-DMgU1v4z.js → TaskListScreen-5M_H_3yt.js} +2 -2
  44. package/dist/assets/{TaskRoutes-Cmtr7KFm.js → TaskRoutes-Bc8V0KLM.js} +2 -2
  45. package/dist/assets/{TransactionDetailRoutes-CjrDVjtT.js → TransactionDetailRoutes-lhjQfiA2.js} +1 -1
  46. package/dist/assets/TransactionDetailScreen-advW0sri.js +5 -0
  47. package/dist/assets/{TransactionListRoutes-uZihQK3F.js → TransactionListRoutes-BTVDW0ac.js} +1 -1
  48. package/dist/assets/{TreasuryRoutes-ZtY_hGM6.js → TreasuryRoutes-BlM-Juxy.js} +6 -6
  49. package/dist/assets/{VendorsRoutes-DcUkIEvd.js → VendorsRoutes-Db2Ed2Fz.js} +1 -1
  50. package/dist/assets/WiseConfirmationScreen-8khqAoaZ.js +12 -0
  51. package/dist/assets/{ZeniAccountRoutes-Cbm2k-08.js → ZeniAccountRoutes-68W3Grg4.js} +11 -11
  52. package/dist/assets/ZeniAccountStatementScreen-CCwshkYl.js +9 -0
  53. package/dist/assets/{accountMappingHelper-DDqSB3xQ.js → accountMappingHelper-DoYWzqd9.js} +1 -1
  54. package/dist/assets/{analytics-DoyQ8ezf.js → analytics-DVTbnjlr.js} +1 -1
  55. package/dist/assets/{analyticsHelper-CvGdvadP.js → analyticsHelper-7imjYGd-.js} +1 -1
  56. package/dist/assets/{core-CQnSJ9vO.js → core-k_c8SCBE.js} +1 -1
  57. package/dist/assets/{decodeURIComponentSafe-BprI0TcI.js → decodeURIComponentSafe-ClSfwHJC.js} +1 -1
  58. package/dist/assets/{dnd-DoHm848q.js → dnd-CKEs-Nbe.js} +1 -1
  59. package/dist/assets/{empty-BZMPWXIo.js → empty-CaaFsHZq.js} +1 -1
  60. package/dist/assets/{empty-DjW_4H8B.js → empty-rBU__xZH.js} +1 -1
  61. package/dist/assets/{emptyVideoElement-CD9clJu_.js → emptyVideoElement-BiPjnR5F.js} +1 -1
  62. package/dist/assets/{epic-2G17lmbK.js → epic-BY3t4hzo.js} +2 -2
  63. package/dist/assets/getLocaleForTenant-BWdefIGu.js +1 -0
  64. package/dist/assets/{index-BtlQ6O6E.js → index-B0M_M2si.js} +1 -1
  65. package/dist/assets/{index-CF7DasjB.js → index-C9JBC9EP.js} +1 -1
  66. package/dist/assets/{index-Ci7GqulV.js → index-CAPOi0Fj.js} +1 -1
  67. package/dist/assets/{index-C6MtcitK.js → index-CBl-jehm.js} +1 -1
  68. package/dist/assets/{index-W83PhAZh.js → index-Cm2LZphQ.js} +12999 -13025
  69. package/dist/assets/{index-B6GtF9yZ.js → index-CrxfuqRy.js} +2 -2
  70. package/dist/assets/{index-DgHQU_66.js → index-D7n4W-6R.js} +1 -1
  71. package/dist/assets/{index-KsPtT3xm.js → index-_Ds-L3qG.js} +1 -1
  72. package/dist/assets/{lexical-WXHH1XHj.js → lexical-k-PQZXkn.js} +1 -1
  73. package/dist/assets/{liveblocks-DvKPzrwo.js → liveblocks-D3ESVZyk.js} +1 -1
  74. package/dist/assets/{lottie-DNsrs-P3.js → lottie-BYni7Ovk.js} +1 -1
  75. package/dist/assets/{mui-sKCdI-e6.js → mui-UJrLjp1k.js} +1 -1
  76. package/dist/assets/{pathToGoBack-DDBtlyQ4.js → pathToGoBack-D0Z5Ycmy.js} +1 -1
  77. package/dist/assets/{pdf-iXI4qQyj.js → pdf-CaeTpLUv.js} +4 -4
  78. package/dist/assets/{pdf-lib-C9eLuUx2.js → pdf-lib-Cgly_u4z.js} +1 -1
  79. package/dist/assets/{plaid-BOu_8LCE.js → plaid-B1j5PXHV.js} +1 -1
  80. package/dist/assets/{pusher-BxMucY8d.js → pusher-IzmLENf0.js} +1 -1
  81. package/dist/assets/{react-BfWAIeRe.js → react-BPazXlgj.js} +1 -1
  82. package/dist/assets/{react-Bfv7BUzV.js → react-BhDdWL-M.js} +1 -1
  83. package/dist/assets/{react-CHbhfie6.js → react-Cbn9UGi3.js} +1 -1
  84. package/dist/assets/{react-DW2tK8z_.js → react-D9CNJCXY.js} +1 -1
  85. package/dist/assets/{react-BY08R1tD.js → react-RV2byy3l.js} +1 -1
  86. package/dist/assets/{react-DVBLaOmV.js → react-iNsCZPRe.js} +1 -1
  87. package/dist/assets/{recharts-Cv5d-Vxs.js → recharts-Q-kkTNuO.js} +1 -1
  88. package/dist/assets/{routePaths-stnXzrYV.js → routePaths-d7Ok-gzv.js} +1 -1
  89. package/dist/assets/{sentry-Be8twC83.js → sentry-B_92GPgU.js} +1 -1
  90. package/dist/assets/{url-CuDHWvgT.js → url-CGw_V4gG.js} +1 -1
  91. package/dist/assets/{url-AlENSCVt.js → url-DLQKrj-e.js} +1 -1
  92. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CKfyn0VP.js → useAiCfoDashboardSuggestedQuestionsChips-D_8fZhjX.js} +1 -1
  93. package/dist/assets/useAskAiCfoHostNavButtonProps-j-YNVdB5.js +1 -0
  94. package/dist/assets/useCashManagementBanner-Dq8PXuUm.js +1 -0
  95. package/dist/assets/{useDeviceId-KC-rY1dP.js → useDeviceId-BE1s-3Wf.js} +1 -1
  96. package/dist/assets/{useInitialThreadRequest-BDAn-AM4.js → useInitialThreadRequest-DoCqWgSy.js} +1 -1
  97. package/dist/assets/{utils-BcJ2NV01.js → utils-Mjhh9T8E.js} +1 -1
  98. package/dist/assets/withTransactionSidePanel-AeDcEPW-.js +21 -0
  99. package/dist/assets/{zeni-epic-state-DKeO4Z0C.js → zeni-epic-state-C3zBO1No.js} +4 -4
  100. package/dist/index.html +1 -1
  101. package/package.json +3 -3
  102. package/dist/assets/AddressRoutes-gPXkxz7s.js +0 -1
  103. package/dist/assets/CustomerOnboardingAuthScreen-DO3NyaR6.js +0 -1
  104. package/dist/assets/DomesticWireDetailScreen-Bx2DINVR.js +0 -18
  105. package/dist/assets/DrawerScreen-BtLrlXnn.js +0 -1
  106. package/dist/assets/EntityDetailRoutes-CTo7No6n.js +0 -1
  107. package/dist/assets/FeaturePreviewScreen-9NvuDbvP.js +0 -1
  108. package/dist/assets/MagicLinkSignInScreen-CTkVv0M2.js +0 -12
  109. package/dist/assets/NotFoundScreen-FcrdBNP0.js +0 -1
  110. package/dist/assets/OAuthConsentScreen-Swpq9wju.js +0 -1
  111. package/dist/assets/PerformanceRoutes-VzYGFOXy.js +0 -1
  112. package/dist/assets/ReimbursementApprovalRoutes-DOhkjING.js +0 -1
  113. package/dist/assets/RewardsRoutes-Vdol6ACr.js +0 -1
  114. package/dist/assets/SettingsRoutes-D7qVKl5_.js +0 -57
  115. package/dist/assets/SignInScreen-u3NwSgsj.js +0 -1
  116. package/dist/assets/TransactionDetailScreen-ABqf1zzA.js +0 -5
  117. package/dist/assets/WiseConfirmationScreen-DYcjQlfc.js +0 -12
  118. package/dist/assets/ZeniAccountStatementScreen-Ciuw5n7i.js +0 -9
  119. package/dist/assets/getLocaleForTenant-CAvD8CfA.js +0 -1
  120. package/dist/assets/useAskAiCfoHostNavButtonProps-DAlpTVgV.js +0 -1
  121. package/dist/assets/useCashManagementBanner-D8slgHwh.js +0 -1
  122. package/dist/assets/withTransactionSidePanel-B9fglQqM.js +0 -21
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-W83PhAZh.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-Be8twC83.js"><link rel="modulepreload" crossorigin href="/assets/core-CQnSJ9vO.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-DKeO4Z0C.js"><link rel="modulepreload" crossorigin href="/assets/mui-sKCdI-e6.js"><link rel="modulepreload" crossorigin href="/assets/analytics-DoyQ8ezf.js"><link rel="modulepreload" crossorigin href="/assets/utils-BcJ2NV01.js"><link rel="stylesheet" crossorigin href="/assets/index-BUmr5maU.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-Cm2LZphQ.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-B_92GPgU.js"><link rel="modulepreload" crossorigin href="/assets/core-k_c8SCBE.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-C3zBO1No.js"><link rel="modulepreload" crossorigin href="/assets/mui-UJrLjp1k.js"><link rel="modulepreload" crossorigin href="/assets/analytics-DVTbnjlr.js"><link rel="modulepreload" crossorigin href="/assets/utils-Mjhh9T8E.js"><link rel="stylesheet" crossorigin href="/assets/index-BUmr5maU.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.1.51-qa",
3
+ "version": "5.1.52-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.21",
31
- "@zeniai/client-epic-state": "5.0.99",
32
- "@zeniai/web-components": "4.1.70",
31
+ "@zeniai/client-epic-state": "5.1.0",
32
+ "@zeniai/web-components": "4.1.72",
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-DvKPzrwo.js";import{A as d}from"./AddressScreen-DHENiPsE.js";import i from"./NotFoundScreen-FcrdBNP0.js";import"./sentry-Be8twC83.js";import{o as s,p as r}from"./core-CQnSJ9vO.js";import"./zeni-epic-state-DKeO4Z0C.js";import"./recharts-Cv5d-Vxs.js";import"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="cd0ff2b4-1e27-4329-addf-f475e5a9db34",t._sentryDebugIdIdentifier="sentry-dbid-cd0ff2b4-1e27-4329-addf-f475e5a9db34")}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 +0,0 @@
1
- import{j as i}from"./liveblocks-DvKPzrwo.js";import{z as n}from"./index-W83PhAZh.js";import{g as d}from"./QBOConnectionScreen-B8QVReQm.js";import"./sentry-Be8twC83.js";import{g as p,N as s}from"./core-CQnSJ9vO.js";import"./zeni-epic-state-DKeO4Z0C.js";import"./recharts-Cv5d-Vxs.js";import"./mui-sKCdI-e6.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.js";import"./empty-DjW_4H8B.js";import"./pdf-lib-C9eLuUx2.js";import"./index-BtlQ6O6E.js";import"./url-CuDHWvgT.js";import"./index-DgHQU_66.js";import"./decodeURIComponentSafe-BprI0TcI.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]="817363c8-7f1d-4590-b58b-cef70b99ca15",t._sentryDebugIdIdentifier="sentry-dbid-817363c8-7f1d-4590-b58b-cef70b99ca15")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=d(t.search),m=n.getSignedInUser()?.userId??"";if(f(o,r,e,m)===!0){const a=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:a})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-DvKPzrwo.js";import{h as w,g as C,j as h,n as P,i as B}from"./core-CQnSJ9vO.js";import{Pw as k,PD as W,gg as q,gf as K,ge as M,jp as J,MF as L,rp as Q,eW as D,P2 as V,jn as F,Px as S,PG as T,jl as j,jI as G}from"./zeni-epic-state-DKeO4Z0C.js";import{bw as X,K as R,H as N,z as U,m as H,q as p,x as v,B as O,bx as Y,o as Z,by as ee,r as te}from"./index-W83PhAZh.js";import{n as z}from"./mui-sKCdI-e6.js";import"./sentry-Be8twC83.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]="1390f7df-5dd4-40fd-abfa-f75350dcf33a",e._sentryDebugIdIdentifier="sentry-dbid-1390f7df-5dd4-40fd-abfa-f75350dcf33a")}catch{}})();const ne=P(null,function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(M(n,"BillPayVendor"))},onResendOtp:n=>{e(K(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(W(n,a,o))}}})(X);function _({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=z.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,oe=P(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{e(j(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),r=s.poppedPathname??A();n(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(T({data:r}))},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??A(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:r}=B(),c=e??s,{useFeatureGate:d}=N(),i=U.getSignedInUser(),b=h(u=>D(u)),g=H(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=d(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(O,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(_,{vendorId:c,billId:r}),l.jsx(oe,{location:a,navigate:n,billId:r,vendorId:c,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const A=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},E=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return E(e,"ach",t,n)}function ve(e,t,n){return E(e,"domestic",t,n)}function ge(e,t,n){return E(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},de=z.div`
10
- display: flex;
11
- height: 100vh;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${e=>e.theme.colors.grey4};
17
- box-shadow: ${e=>`0px 2px ${Z.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,re=P(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:c}=r;return{onFetchBankName:d=>{e(G(d))},onSaveHandler:d=>{e(j(t.bankAccountContext,d,"us-domestic",s))},onWireDetailsUpdated:d=>{const{bankAccountSection:i}=d;e(T({data:i}))},onCancel:()=>{(()=>{const d=p(o.state?.pathnameStackToGoBack),i=d.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:d.newStack}})})(),e(S())},onAddressClick:d=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(c,d,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const d=p(t.location.state?.pathnameStackToGoBack),i=d.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:d.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:r}=B(),c=e??s,d=U.getSignedInUser(),{useFeatureGate:i}=N(),b=H(),g=h(u=>D(u)),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(O,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${Z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(de,{windowSize:o,children:[l.jsx(_,{vendorId:c,billId:r}),l.jsx(re,{location:a,navigate:n,billId:r,vendorId:c,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,_ as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
@@ -1 +0,0 @@
1
- import{j as d}from"./liveblocks-DvKPzrwo.js";import{K as f,A as l,m as c}from"./index-W83PhAZh.js";import{D as b}from"./mui-sKCdI-e6.js";import"./sentry-Be8twC83.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]="ef5ccb0f-9763-4b28-922a-eb2f69741127",e._sentryDebugIdIdentifier="sentry-dbid-ef5ccb0f-9763-4b28-922a-eb2f69741127")}catch{}})();const p={drawerLeftMargin:new l(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=f(),a=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),i=c();return d.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${a})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{m as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-DvKPzrwo.js";import{a as d}from"./sentry-Be8twC83.js";import{h as A,u as B,g as G,i as q,j as l,N as M,n as F,o as O,p as R}from"./core-CQnSJ9vO.js";import{NM as _,eW as W,N9 as J,ls as Y,JO as k,NR as $,ME as z,ks as V,JP as S,Ne as H,Nf as K,MG as L,MF as Q}from"./zeni-epic-state-DKeO4Z0C.js";import{aS as U,c as X,q as Z,r as tt}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import{d as b}from"./decodeURIComponentSafe-BprI0TcI.js";import{w as et}from"./withTransactionSidePanel-B9fglQqM.js";import{f as at,c as nt}from"./routePaths-stnXzrYV.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.js";import"./useAskAiCfoHostNavButtonProps-DAlpTVgV.js";import"./TransactionDetailScreen-ABqf1zzA.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]="a7e2a1be-f4fc-4eb1-8eb3-f72383835743",a._sentryDebugIdIdentifier="sentry-dbid-a7e2a1be-f4fc-4eb1-8eb3-f72383835743")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:V(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(H()),a(K()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:j}=q(),r=b(x??""),f=b(j??""),p=rt(r,f),v=[r,f].filter(n=>n!=null),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),w=l(n=>W(n).company?.companyInfo.firstMonthOfFY??1),u=l(n=>J(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&p===!0&&(T(!0),o(Y(i)))},[m,p,i]);const E=l(n=>n.trendState.fetchState),P=u?.selectedPeriod?.timePeriod??g,N=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:N,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(M,{to:I(v.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(O,{children:s.jsx(R,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-DvKPzrwo.js";import{a as r}from"./sentry-Be8twC83.js";import{a3 as i,a4 as l,a5 as p,q as f}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import m from"./NotFoundScreen-FcrdBNP0.js";import{h as u,g as b}from"./core-CQnSJ9vO.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]="76cf16b7-b9dc-4e1e-8437-479ed67c5ac2",e._sentryDebugIdIdentifier="sentry-dbid-76cf16b7-b9dc-4e1e-8437-479ed67c5ac2")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),c=r.useCallback(()=>{(()=>{const n=f(a.state?.pathnameStackToGoBack),d=n.poppedPathname??k();e(d,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=i(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:c}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-DvKPzrwo.js";import{a as g}from"./sentry-Be8twC83.js";import{u as U,g as _,h as w,t as M,j as l,N as D}from"./core-CQnSJ9vO.js";import{z as r,m as P,D as V,d as A,c as N,e as W,i as J,M as K,g as R}from"./index-W83PhAZh.js";import{eW as Y,Ly as $,LI as q,Lz as B,fa as G,fD as H,LE as Q,gn as X,cY as Z,LJ as ee,LK as te}from"./zeni-epic-state-DKeO4Z0C.js";import{n as ne}from"./mui-sKCdI-e6.js";import{u as se}from"./useDeviceId-KC-rY1dP.js";import{f as ae}from"./analyticsHelper-CvGdvadP.js";import{t as ie}from"./getLocaleForTenant-CAvD8CfA.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="dbba8f06-8405-4759-b566-5545336ee38d",t._sentryDebugIdIdentifier="sentry-dbid-dbba8f06-8405-4759-b566-5545336ee38d")}catch{}})();const z=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function ze(){const t=U(),a=_(),f=w(),[y]=M(),n=y.get("token"),p=y.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:T,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),k=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>Y(e)),b=l(e=>$(e)),E=r.getSignedInUser(),L=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&z(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(q(n,i,m)))},[n,p,t,i,m,s?.zeniSessionId]),g.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(B(b.tenantsInOrder),s.zeniSessionId),G(s.userId,s.zeniSessionId,o.tenantId),t(H(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,L,void 0,b.tenantsInOrder),X().then(()=>{const e=R();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[I,S,k,s,o,b,L,a.state,t]);const j=g.useCallback(()=>{f("/signin/auth")},[f]),F=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(J,{phoneNumber:T,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(D,{to:e,state:{...a.state,origin:""}})}if(!z(n,p)||m==null||h==="Error"){const e=a.state?.origin??"/",v=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(D,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:v,magicLinkExpired:!v&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(K,{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{ze as default};
@@ -1 +0,0 @@
1
- import{j as r}from"./liveblocks-DvKPzrwo.js";import{h as n,n as i}from"./core-CQnSJ9vO.js";import{O as e}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import"./sentry-Be8twC83.js";import"./zeni-epic-state-DKeO4Z0C.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="d7666c0b-2a75-4baf-97d7-b828025403bf",o._sentryDebugIdIdentifier="sentry-dbid-d7666c0b-2a75-4baf-97d7-b828025403bf")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(e);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-DvKPzrwo.js";import{a as r}from"./sentry-Be8twC83.js";import{u as T,g as A,j as o,N as j}from"./core-CQnSJ9vO.js";import{LX as C,eW as P,fn as x,LY as z,LZ as D,L_ as M,L$ as R,o5 as k,KU as N}from"./zeni-epic-state-DKeO4Z0C.js";import{z as h,G as I}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="e7d9ea57-fb47-4ac1-a948-27ede6a044d5",n._sentryDebugIdIdentifier="sentry-dbid-e7d9ea57-fb47-4ac1-a948-27ede6a044d5")}catch{}})();function ee(){const n=T(),a=A(),{params:t,error:i}=r.useMemo(()=>C(a.search),[a.search]),w=r.useMemo(()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application",[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),f=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),y=o(z),v=o(D),u=o(M),[S,b]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[n,a.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))},[p,s,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const U=r.useMemo(()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(L=>L.tenantId===e)?e:l.length===1?l[0].tenantId:null},[f?.tenantId,l]),c=S??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:b,approveError:E??v,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(N(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-DvKPzrwo.js";import E from"./NotFoundScreen-FcrdBNP0.js";import{a as r}from"./sentry-Be8twC83.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as W,o as z,p as b}from"./core-CQnSJ9vO.js";import{eW as B,Sy as h,bo as F,bn as N,i9 as O,f9 as V}from"./zeni-epic-state-DKeO4Z0C.js";import{W as $,z as I,_ as q,cW as G}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-DAlpTVgV.js";import{M as J}from"./MobileAppDrawer-CjoW3Rax.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="e2912d87-1d5c-4b18-a4a7-27dd55e75fbb",e._sentryDebugIdIdentifier="sentry-dbid-e2912d87-1d5c-4b18-a4a7-27dd55e75fbb")}catch{}})();const K=W(function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),L=()=>{const e=_(),t=v(),d=$(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>h(a)),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,y=N(l),x=C||k||y,c=r.useCallback((a,i,T)=>{u(O({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u(V({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0},[n?.fetchState,c]),j=r.useCallback((a,i)=>{c(a,i,!1)},[c]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function ge(){return s.jsxs(z,{children:[s.jsx(b,{path:"*",element:s.jsx(L,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-DvKPzrwo.js";import _ from"./NotFoundScreen-FcrdBNP0.js";import{a as c}from"./sentry-Be8twC83.js";import{h as E,g as x,u as C,j as u,N as k,n as D,o as z,p as v}from"./core-CQnSJ9vO.js";import{eW as j,PL as S,P$ as h,Fi as V,Eo as U,Fh as d,F5 as B,Qg as N,F8 as K}from"./zeni-epic-state-DKeO4Z0C.js";import{m as T,z as $,B as O,a7 as W,bW as L,af as F,bz as Q,bX as X}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import{R as A}from"./ReimbursementApprovalRuleDetailScreen-BgYFphfr.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]="6ca20f84-6583-42ec-9dd4-9ea1d2a1e550",e._sentryDebugIdIdentifier="sentry-dbid-6ca20f84-6583-42ec-9dd4-9ea1d2a1e550")}catch{}})();const w="reimbursement-approval-rule-update",q=D(function(e){return{approvalView:S(e),remiSetupApproverViewUpdateData:h(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:t,location:i}=r;return{onApprovalRulesEventReceived:a=>{a.endsWith(w)&&e(N(!1))},onBackClick:()=>{F(i)?t("../../"):t("../../../reimbursements/setup")},onDeleteRuleClick:a=>{e(B(a,!1))},onEditRuleClick:a=>{a!=null?(e(d(a)),t(`./${a}/edit`)):(e(d()),t("./new"))}}})(W(L)),G=()=>{const e=E(),r=x(),t=C(),[i,a]=c.useState(!1),[o,b]=c.useState(!1),m=u(n=>n.remiSetupApproverViewState.fetchState),p=u(n=>j(n)),g=T(),l=u(n=>S(n)),f=u(n=>h(n).remiSetupApproverViewUpdateData);if(c.useEffect(()=>{f?.updateStatus.fetchState==="Completed"&&t(V())},[f]),c.useEffect(()=>{i||m!=="Not-Started"||(a(!0),t(U(!0,!1,!1,!1)))},[i,m,t]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");c.useEffect(()=>{l.allApprovalRules.length===0&&l.fetchState==="Completed"&&(o||(b(!0),t(d())),e("./new"))},[o,l,t]);const R={events:p.companyId!=null?[`private-encrypted-${p.companyId}.${w}`]:[],eventCallback:(n,P,y)=>{n.endsWith(w)&&y.onApprovalRulesEventReceived(n)}};return p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?s.jsx(k,{to:"../../promo"}):p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||l.fetchState!=="Completed"&&l.fetchState!=="Error"?s.jsx(O,{fetchState:"In-Progress",style:{backgroundColor:g.colors.grey5}}):s.jsx(q,{currentTenant:p,location:r,navigate:e,...R})},I="reimbursement-approval-rule-update",H=D(function(e){const r=S(e),t=h(e).remiSetupApproverViewUpdateData,i={};for(const o of Object.values(e.contactState.contactById))o?.id!=null&&(i[o.id]=o.fullName);const a={};for(const o of Object.values(e.classState.classesByKey))o?.classId!=null&&(a[o.classId]=o.className);return{approvalView:r,remiSetupApproverViewUpdateData:t,vendorNamesById:i,departmentNamesById:a}},function(e,r){const{navigate:t,location:i}=r;return{onApprovalRulesEventReceived:a=>{a.endsWith(I)&&e(N(!1))},onBackClick:()=>{F(i)?t("../../"):t("../../../reimbursements/setup")},onDeleteRuleClick:a=>{e(B(a,!0))},onEditRuleClick:a=>{a!=null?(e(d(a)),t(`./${a}/edit`)):(e(d()),t("./new"))},onReorderRules:a=>{e(K(a,!0))}}})(W(X)),J=()=>{const e=u(t=>j(t)),{isApprovalRulesV3Enabled:r}=Q(e?.tenantId);return r?s.jsx(M,{}):s.jsx(G,{})},M=()=>{const e=E(),r=x(),t=C(),[i,a]=c.useState(!1),[o,b]=c.useState(!1),m=u(n=>n.remiSetupApproverViewState.fetchState),p=u(n=>j(n)),g=T(),l=u(n=>S(n)),f=u(n=>h(n).remiSetupApproverViewUpdateData);if(c.useEffect(()=>{f?.updateStatus.fetchState==="Completed"&&t(V())},[f]),c.useEffect(()=>{i||m!=="Not-Started"||(a(!0),t(U(!0,!1,!1,!0)))},[i,m,t]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");c.useEffect(()=>{l.allApprovalRules.length===0&&l.fetchState==="Completed"&&(o||(b(!0),t(d())),e("./new"))},[o,l,t]);const R={events:p.companyId!=null?[`private-encrypted-${p.companyId}.${I}`]:[],eventCallback:(n,P,y)=>{n.endsWith(I)&&y.onApprovalRulesEventReceived(n)}};return p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?s.jsx(k,{to:"../../promo"}):p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||l.fetchState!=="Completed"&&l.fetchState!=="Error"?s.jsx(O,{fetchState:"In-Progress",style:{backgroundColor:g.colors.grey5}}):s.jsx(H,{currentTenant:p,location:r,navigate:e,...R})};function oe(){return s.jsxs(z,{children:[s.jsx(v,{path:"/",element:s.jsx(J,{})}),s.jsx(v,{path:"/new",element:s.jsx(A,{})}),s.jsx(v,{path:"/:approvalRuleId/edit",element:s.jsx(A,{})}),s.jsx(v,{path:"*",element:s.jsx(_,{})})]})}export{oe as R};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-DvKPzrwo.js";import{H as w,z as j,aN as y,w as I,c as p,e as F,d5 as P,x as T}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import m from"./NotFoundScreen-FcrdBNP0.js";import{a as d}from"./sentry-Be8twC83.js";import{u as L,j as b,h as V,g as A,n as R,o as U,p as u}from"./core-CQnSJ9vO.js";import{eW as z,Ta as C,Pq as Y,Tb as v,vt as q,fk as G,Tc as H,vr as O}from"./zeni-epic-state-DKeO4Z0C.js";import{R as x}from"./ReferralListScreen-Cnd7u4T9.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.js";import"./useAskAiCfoHostNavButtonProps-DAlpTVgV.js";import"./MobileAppDrawer-CjoW3Rax.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]="e3d2dd7e-46d1-4edf-b5b4-6ad095456329",e._sentryDebugIdIdentifier="sentry-dbid-e3d2dd7e-46d1-4edf-b5b4-6ad095456329")}catch{}})();const W=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=j.getSignedInUser();return{onDismissClick:()=>{e(v()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(O())},onUpdateInviteFormLocalData:s=>{e(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),B=()=>{const e=L(),[t,n]=d.useState(!1),[i,s]=d.useState(!1),r=b(o=>z(o)),c=V(),_=A(),{useDynamicConfig:g}=w(),f=j.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=b(o=>C(o)),k=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:D}=g(y.zeniAccountsConfig),N=Y(D);d.useEffect(()=>{e(v()),r?.rewardsLastViewedTime==null&&i===!1&&(e(q()),s(!0))},[]),d.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[l.fetchState,e]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(I,{analytics:p,onLoad:o=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(W,{navigate:c,location:_,currentTenant:r,companyName:S,userName:k,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:N.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=w(),{isFeatureEnabled:t}=e(T.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(x,{}):a.jsx(m,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(m,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(m,{})}),a.jsx(u,{path:"*",element:a.jsx(m,{})})]})}export{ue as default};
@@ -1,57 +0,0 @@
1
- import{j as o}from"./liveblocks-DvKPzrwo.js";import{a as p}from"./sentry-Be8twC83.js";import{h as V,g as Q,u as D,j as h,s as se,n as $,i as G,o as W,p as E}from"./core-CQnSJ9vO.js";import{bn as Ee,eW as T,go as Ae,mW as ve,Q1 as we,hA as ue,ND as ke,qN as Pe,ks as pe,mS as je,hC as Te,NF as Me,NE as De,Q2 as Ue,z3 as _e,Eo as Re,PC as Fe,PL as Be,c7 as ee,cM as ze,cN as Ve,LL as Le,Q3 as Oe,LM as Ne,xw as Qe,Q4 as $e,GP as Ge,E4 as Ke,DX as ge,DU as He,xA as me,D_ as he,E1 as fe,E7 as ne,t_ as te,xz as Ze,k4 as X,k7 as be,Q5 as qe,l8 as Je,xP as We,My as Xe,Mz as Ye,k2 as en,Q6 as nn,k5 as tn,rf as an,Q7 as on,Q8 as sn,rj as cn,hl as ln,LU as J,he as rn,hh as dn,LV as un,xM as pn,Q9 as gn,Qa as mn,El as hn,fc as Se,fe as ye,Qb as fn,gc as bn,M2 as Sn,xL as ie,gh as ce,gg as yn,xK as Cn,gf as In,ge as xn,Qc as En,fh as Ce,Qd as An,Qe as vn,xS as wn,xJ as le,Qf as kn,fy as Pn,xG as jn,b_ as Tn,c6 as Mn,c5 as Dn,b$ as Un,c3 as _n,c2 as Rn,c1 as Fn,c4 as Bn,c0 as zn}from"./zeni-epic-state-DKeO4Z0C.js";import{H as ae,x as R,z as w,af as Ie,bO as Vn,c as q,e as Ln,bz as On,j as K,B as oe,bP as Nn,bQ as Qn,aq as $n,h as xe,bR as Gn,bS as Kn,bT as Hn,a9 as Zn,Y as qn,bU as Jn,r as Wn,bV as Xn}from"./index-W83PhAZh.js";import{n as F}from"./mui-sKCdI-e6.js";import{M as U}from"./MobileAppDrawer-CjoW3Rax.js";import{a as H,g as Z,m as Yn}from"./accountMappingHelper-DDqSB3xQ.js";import{t as et,A as nt}from"./AddressScreen-DHENiPsE.js";import N from"./NotFoundScreen-FcrdBNP0.js";import{g as tt}from"./analyticsHelper-CvGdvadP.js";import{B as at}from"./BusinessVerificationPageScreen-7ydI8UR9.js";import{C as ot}from"./CompanyPassportScreen-AZhDXSZE.js";import{q as re}from"./QBOConnectionScreen-B8QVReQm.js";import{B as st}from"./BillPayApprovalRoutes-re8xxMBE.js";import{R as it}from"./ReimbursementApprovalRoutes-DOhkjING.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.js";import"./routePaths-stnXzrYV.js";import"./empty-DjW_4H8B.js";import"./pdf-lib-C9eLuUx2.js";import"./index-BtlQ6O6E.js";import"./url-CuDHWvgT.js";import"./index-DgHQU_66.js";import"./decodeURIComponentSafe-BprI0TcI.js";import"./ReimbursementApprovalRuleDetailScreen-BgYFphfr.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]="7fbd23e5-c1b8-437b-b42e-5a69a0005702",e._sentryDebugIdIdentifier="sentry-dbid-7fbd23e5-c1b8-437b-b42e-5a69a0005702")}catch{}})();const ct=F.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
- `,lt=$(function(e,t){return{accountMappingView:t.accountMappingView,isFiling1099FeatureEnabled:t.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:t.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:pe(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Pe(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:t.isCapitalizationFeatureEnabled,capitalizableAccounts:t.capitalizableAccounts,accountNamesById:t.accountNamesById,capitalizationThreshold:t.capitalizationThreshold,capitalizationThresholdMaxCeiling:t.capitalizationThresholdMaxCeiling,isCapitalizationThresholdSaving:t.isCapitalizationThresholdSaving,onSaveCapitalizationThresholds:t.onSaveCapitalizationThresholds}},function(e,t){const{navigate:s,location:r,isFiling1099FeatureEnabled:i}=t;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:a,billsAccountSection:c,reimbursementsAccountSection:u,vendorsAccountSection:d,filing1099Section:m}=n,{incomeAccount:f,expenseAccount:g}=a,{billPayAccount:l}=c,{reimbursementsAccount:C}=u,{prepaidExpensesAccount:I,fixedAssetsAccount:k,accruedExpensesAccount:A}=d,{bankAccount:S,expenseCategory1099:x}=m,v=H(t.accountMappingView.incomeAccountList,f.selectedOption),B=H(t.accountMappingView.expenseAccountList,g.selectedOption),L=H(t.accountMappingView.billPayAccountList,l.selectedOption),O=H(t.accountMappingView.reimbursementsAccountList,C.selectedOption),z=Z(t.accountMappingView.prepaidExpensesAccountList,I.selectedOptions),b=Z(t.accountMappingView.fixedAssetsAccountList,k.selectedOptions),M=Z(t.accountMappingView.accruedExpensesAccountList,A.selectedOptions),y=Z(t.accountMappingView.bankAccounts1099FilingAccountList,S.selectedOptions),P=Yn(t.accountMappingView.expenseAccounts1099FilingAccountList,x),_={selectedIncomeAccountId:v?.accountId,selectedExpenseAccountId:B?.accountId,selectedBillPayAccountId:L?.accountId,selectedReimbursementsAccountId:O?.accountId,selectedPrepaidExpensesAccountIds:z.map(j=>j.accountId),selectedFixedAssetsAccountIds:b.map(j=>j.accountId),selectedAccruedExpensesAccountIds:M.map(j=>j.accountId),selectedBankAccounts1099FilingAccountIds:y.map(j=>j.accountId),selectedExpenseAccounts1099FilingAccountIds:P};e(De({data:_}))},onBackClick:()=>{Ie(r)===!1?(s("../../dashboard"),e(Me())):e(ue())},onSaveClick:()=>{e(Te()),i&&q.track(Ln.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(je(t.currentTenant.companyId,n))}}})(Vn),rt=()=>{const e=V(),t=Q(),s=D(),{useFeatureGate:r,useDynamicConfig:i}=ae(),{isFeatureEnabled:n}=r(R.isFiling1099FeatureEnabled),{isFeatureEnabled:a}=r(R.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:c,isDynamicConfigLoading:u}=i("transaction_categorization_config"),d=!u&&c?.capitalization_enabled===!0,m=w.getSignedInUser(),f=Ee(m),g=h(y=>T(y)),{capitalizableAccounts:l,capitalizationThreshold:C,capitalizationThresholdMaxCeiling:I,isCapitalizationThresholdSaving:k,currencySymbol:A}=h(y=>{const P=y.tenantState.currentTenantId,_=P!=null?y.tenantState.tenantsById[P]:void 0,j=Ae(y.companyState,g.companyId);return{capitalizableAccounts:_?.capitalizableAccounts??null,capitalizationThreshold:_?.capitalizationThreshold??null,capitalizationThresholdMaxCeiling:_?.capitalizationThresholdMaxCeiling??null,isCapitalizationThresholdSaving:y.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:j?.company.companyLocaleInfo?.currencySymbol??"$"}},se),S=p.useCallback((y,P)=>{s(ve(g.companyId,y,P))},[s,g.companyId]),x=h(y=>we(y.accountState),se),v=p.useMemo(()=>{const y={};for(const P of x)P.accountId!=null&&P.accountName!=null&&(y[P.accountId]=P.accountName);return y},[x]),[B,L]=p.useState(!1),[O,z]=p.useState(!1);p.useEffect(()=>{B===!1&&(s(ue()),L(!0))},[B]);const b=h(y=>ke(y)),M=y=>{z(y)};return o.jsxs(ct,{children:[o.jsx(U,{isAppContentDrawerOpen:O,handleDrawerToggle:M}),o.jsx(lt,{currentTenant:g,navigate:e,accountMappingView:b,isFiling1099FeatureEnabled:n&&f,isAccruedExpensesFeatureEnabled:a,isCapitalizationFeatureEnabled:d,capitalizableAccounts:l,accountNamesById:v,capitalizationThreshold:C,capitalizationThresholdMaxCeiling:I,currencySymbol:A,isCapitalizationThresholdSaving:k,onSaveCapitalizationThresholds:S,location:t,isSettings:Ie(t),onClickMenuIcon:()=>M(!0)})]})},dt=F.div`
10
- display: flex;
11
- height: 100%;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${e=>e.theme.colors.grey4};
17
- `,ut=$(function(e,t){const s=T(e),r=Fe(e),i=Be(e),n=t.roleMap.bill_pay_admin;return{isDisabled:(ee(s?.userRole??[])||n)&&"readonly",billpayApprovalView:r,remiApproverView:i,analytics:q}},function(e,t){const{navigate:s,currentTenant:r}=t;return{onSetupApprovalRulesBillPaySectionClick:()=>{s("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{s("reimbursements/approval-rules")},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Nn),pt=()=>{const e=V(),t=Q(),s=D(),{tenantEmailDomain:r}=G(),[i,n]=p.useState(!1),[a,c]=p.useState(!1),[u,d]=p.useState(!1),m=h(x=>T(x)),f=h(x=>x.billPaySetupApproverViewState.fetchState),g=h(x=>x.remiSetupApproverViewState.fetchState),l=h(x=>Ue(x)),{isApprovalRulesV3Enabled:C,isLoading:I}=On(m?.tenantId),k=m.companyId??w.getSignedInUserTenant(r)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const A=K();p.useEffect(()=>{u||f!=="Not-Started"||I||(d(!0),s(_e(!0,!0,C)))},[u,f,I,C,s]),p.useEffect(()=>{a||g!=="Not-Started"||I||(c(!0),s(Re(!0,!1,!1,C)))},[a,g,I,C,s]);const S=x=>{n(x)};return A?.loggedInUserRoleMap!=null?o.jsxs(dt,{children:[o.jsx(U,{isAppContentDrawerOpen:i,handleDrawerToggle:S}),o.jsx(ut,{navigate:e,location:t,companyId:k,currentTenant:m,roleMap:A.loggedInUserRoleMap,onClickMenuIcon:()=>{S(!0)}})]}):o.jsx(oe,{fetchState:l.fetchState})},gt=F.div`
18
- display: flex;
19
- height: 100%;
20
- width: 100%;
21
- flex: 1 1 auto;
22
- flex-direction: column;
23
- align-items: center;
24
- background-color: ${e=>e.theme.colors.grey4};
25
- `,mt=$(function(e,t){const{companyId:s,isZeniAccountEnabled:r,isChargeCardEnabled:i,isBillPayEnabled:n,isRemiEnabled:a,isTreasuryEnabled:c}=t,u=T(e);return{bankSetupView:$e(e,s,n,a,r,i,c),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:q}},function(e,t){const{navigate:s,currentTenant:r,companyId:i}=t;return{onFetchLinkTokenClick:(n,a,c)=>{e(te(a,n,c))},onEstablishConnectionClick:(n,a,c)=>{e(ne(n,i,a,c))},onUpdatePaymentAccountStatus:(n,a,c,u,d)=>{e(fe(n,a,d,u,c))},onUpdatePaymentAccountLoginStatus:(n,a,c,u)=>{e(he(!1,n,u,c,a))},onEstablishConnectionSuccess:(n,a)=>{e(me(a,n))},onUpdateAccountClick:(n,a,c,u,d)=>{e(d==="paymentAccount"?ge(n,a,c,u):He(u,n,a))},onUpdatePrimaryFundingAccount:(n,a,c)=>{e(Ke(i,a,n,c))},onRemoveConnection:n=>{e(Ge(n))},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Qn),ht=()=>{const e=V(),t=Q(),s=D(),{tenantEmailDomain:r}=G(),i=K(),[n,a]=p.useState(!1),[c,u]=p.useState(!1),d=h(S=>T(S)),m=h(S=>S.settingsViewState.bankConnection.fetchState),f=ze(d,i?.loggedInUserRoleMap),g=Ve(d,i?.loggedInUserRoleMap),l=Le(d,i?.loggedInUserRoleMap),C=Oe(d,i?.loggedInUserRoleMap),I=Ne(d,i?.loggedInUserRoleMap),k=d.companyId??w.getSignedInUserTenant(r)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");p.useEffect(()=>{c||m==="Completed"||(u(!0),s(Qe(!1)))},[c,s,m]);const A=S=>{a(S)};return f||l||g||I?o.jsxs(gt,{children:[o.jsx(U,{isAppContentDrawerOpen:n,handleDrawerToggle:A}),o.jsx(mt,{navigate:e,location:t,companyId:k,currentTenant:d,roleMap:i.loggedInUserRoleMap,isBillPayEnabled:f,isRemiEnabled:g,isZeniAccountEnabled:l,isChargeCardEnabled:I,isTreasuryEnabled:C,onClickMenuIcon:()=>{A(!0)}})]}):o.jsx(N,{})},ft=F.div`
26
- display: flex;
27
- height: 100%;
28
- width: 100%;
29
- flex: 1 1 auto;
30
- flex-direction: column;
31
- align-items: center;
32
- background-color: ${e=>e.theme.colors.grey4};
33
- `,bt=$(function(e,t){const{companyId:s}=t,r=T(e),i=t.roleMap.bill_pay_admin,n=qe(e,s),{uiState:a}=n,c=(ee(r?.userRole??[])||i)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:a,stripeKey:xe.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:c,analytics:q}},function(e,t){const{navigate:s,currentTenant:r,companyId:i}=t;return{onFetchLinkTokenClick:(n,a)=>{e(te("billing_setup",n,a))},onEstablishConnectionClick:n=>{e(ne(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(me("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,a,c)=>{e(fe(n,a,"billing","billing_setup",c))},onUpdatePaymentAccountLoginStatus:(n,a)=>{e(he(!1,n,"billing","billing_setup",a))},onUpdateAccountClick:(n,a)=>{e(ge(n,a,"billing","billing_setup"))},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(be(n))},handleConfirmCardSetupIntent:n=>{e(tn(n))},updateCardPaymentModalState:n=>{e(nn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,a,c)=>{e(en(n,a,c))},handleFetchPaymentSources:()=>{e(X())},resetCardPaymentViewState:()=>{e(Ye())},handleResetCardPaymentErrorStatuses:()=>{e(Xe())},onBillingAddressSave:n=>{e(We(n))},onAddressEditHandler:n=>{if(n!=null){const a=et(n);e(Je({addressType:"subscription_billing_address",addressToCreate:a}))}}}})(Gn),St=()=>{const e=V(),t=Q(),s=D(),{tenantEmailDomain:r}=G(),[i,n]=p.useState(!1),[a,c]=p.useState(!1),[u,d]=p.useState(!1),m=h(S=>T(S)),f=h(S=>S.cardPaymentViewState),g=h(S=>S.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),l=$n(f.addCardPaymentSourceStatus.fetchState),C=f.addCardPaymentSourceStatus.fetchState,I=m.companyId??w.getSignedInUserTenant(r)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const k=K();p.useEffect(()=>{I!=null&&s(Ze(I,!1))},[I,s]),p.useEffect(()=>{a||(c(!0),s(X()))},[a,s]),p.useEffect(()=>{u||(be(["card"]),d(!0))},[u]),p.useEffect(()=>{l==="In-Progress"&&C==="Completed"&&s(X())},[l,C]);const A=S=>{n(S)};return k?.loggedInUserRoleMap!=null?o.jsxs(ft,{children:[o.jsx(U,{isAppContentDrawerOpen:i,handleDrawerToggle:A}),o.jsx(bt,{navigate:e,location:t,companyId:I,currentTenant:m,roleMap:k.loggedInUserRoleMap,onClickMenuIcon:()=>{A(!0)},googleAPIKey:xe.googleMapsAPIKey})]}):o.jsx(oe,{fetchState:g})},Y="external_integrations",yt=$(function(e){const t=sn(e,Y);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(t.map(s=>s.additionalInfo).filter(s=>s!=null))}},function(e,t){const{navigate:s,integrationsView:r,signedInUserEmail:i,tenantEmailDomain:n,tenantId:a}=t;return{onBackClick:()=>{s("../")},onNavigateToDashboard:()=>{s("../dashboard")},onReconnectQBO:()=>{re.init("/connection/auth",n),re.handleClick()},onRefreshClick:()=>{r.integrations.refreshQBO.fetchState!=="In-Progress"&&e(pn())},onSaveChargeBeeCredentials:(c,u)=>{const d=r.externalConnections?.revenue?.find(m=>m.connectionName==="chargebee")?.connectionId;d!=null&&e(dn(a,d,J("revenue"),un("chargebee"),{api_key:c,site:u}))},onConnectHubSpot:(c,u)=>{const d=r.externalConnections?.revenue?.find(m=>m.connectionName==="hubspot")?.connectionId;if(d!=null){const m=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:c,client_secret:u,connection_id:d,redirect_uri:m,tenant_id:a}));const f="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(c)}&scope=${encodeURIComponent(f)}&redirect_uri=${encodeURIComponent(m)}`}},onDisconnect:(c,u)=>{e(rn(a,c,J(u)))},onSaveConnectorCredentials:c=>{e(ln(a,J("payments"),c))},onNotifyMe:c=>{e(cn(Y,c,i))}}})(Kn),Ct=()=>{const e=V(),t=D(),{tenantEmailDomain:s}=G(),[r,i]=p.useState(!1),n=h(l=>l.tenantState.fetchState),a=h(l=>T(l)),c=a.companyId??w.getSignedInUserTenant(s)?.companyId,u=w.getSignedInUser(),d=K(),m=ee(a.userRole??[]);if(u==null)throw Error("Can't access Integrations page without signing in...");p.useEffect(()=>{t(an(Y))},[t]);const f=l=>{i(l)},g=h(l=>on(l,c));return d?.loggedInUserRoleMap!=null?o.jsxs(It,{children:[o.jsx(U,{isAppContentDrawerOpen:r,handleDrawerToggle:f}),o.jsx(yt,{navigate:e,onClickMenuIcon:()=>{f(!0)},isAdmin:m,integrationsView:g,signedInUserEmail:u.userEmail??"",tenantEmailDomain:a.tenantEmailDomain??s??"",tenantId:a.tenantId,saveChargeBeeState:g.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:g.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:g.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:g.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:g.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(g.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map(([l,C])=>[l,C?.message])),deleteConnectionState:g.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:g.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress"})]}):o.jsx(oe,{fetchState:n})},It=F.div`
34
- display: flex;
35
- height: 100%;
36
- width: 100%;
37
- flex: 1 1 auto;
38
- flex-direction: column;
39
- align-items: center;
40
- background-color: ${e=>e.theme.colors.grey4};
41
- `,xt=F.div`
42
- display: flex;
43
- height: 100%;
44
- width: 100%;
45
- flex: 1 1 auto;
46
- flex-direction: column;
47
- align-items: center;
48
- background-color: ${e=>e.theme.colors.grey4};
49
- `,Et=()=>{const e=D(),{tenantEmailDomain:t}=G(),[s,r]=p.useState(!1),i=h(l=>T(l)).companyId??w.getSignedInUserTenant(t)?.companyId,n=w.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const a=h(l=>gn(l,n.userId)),c=h(l=>mn(l,i,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:u}=c,d=l=>{r(l)},m=p.useCallback(l=>{e(te("user_reimbursement_account",l))},[]),f=p.useCallback(l=>{e(ne(l,i,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);p.useEffect(()=>{a.fetchState!=="Completed"&&a.fetchState!=="In-Progress"&&e(hn(n.userId))},[n.userId,a.fetchState]);const g=a.fetchState==="Not-Started"||a.fetchState==="In-Progress";return o.jsxs(xt,{children:[o.jsx(U,{isAppContentDrawerOpen:s,handleDrawerToggle:d}),o.jsx(Hn,{plaidConnectionDetails:u,isLoading:g,myBankConnectionsView:a,onFetchLinkTokenClick:m,onEstablishConnectionClick:f,onClickMenuIcon:()=>{d(!0)}})]})},At=F.div`
50
- display: flex;
51
- height: 100%;
52
- width: 100%;
53
- flex: 1 1 auto;
54
- flex-direction: column;
55
- align-items: center;
56
- background-color: ${e=>e.theme.colors.grey4};
57
- `,de=({appContent:e})=>{const t=D(),s=V(),r=Q(),[i,n]=p.useState(!1),a=h(b=>T(b)),{tenantEmailDomain:c}=a,u=a.companyId??w.getSignedInUserTenant(c)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=ae(),{isFeatureEnabled:m}=d(R.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=d(R.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=d(R.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(R.isTreasuryEnabled),C=h(b=>pe(b)),I=Se(a),k=ye(g,a),A=!k&&C,S=Zn(a,f,g),{areTenantIdsInSync:x}=qn();p.useEffect(()=>{x&&t(fn(u,A))},[u,t,A,x]);const v=h(b=>bn(b,A)),B=v.fetchState==="Not-Started"||v.fetchState==="In-Progress"||u==null,L=Sn(a),O=!!a.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,z=b=>{n(b)};return o.jsxs(At,{children:[o.jsx(U,{isAppContentDrawerOpen:i,handleDrawerToggle:z}),e!=null?o.jsx(o.Fragment,{children:e}):o.jsx(Jn,{myProfileView:v,isAccountingClassesEnabled:C,isReimbursementDisabled:O===!1,isZeniAccountsDisabled:m===!1,isChargeCardDisabled:S===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:L===!1,onClickMenuIcon:()=>{z(!0)},isLoading:B,isBankingOnlyTenant:k,isCardsOnlyTenant:I,onAddressClick:b=>{const M=function(P,_){let j=`/${P}/settings/my_profile`;return j=j.concat(`/new/${_}`),j}(c,b),y=Wn(r.state?.pathnameStackToGoBack,r.pathname);s(M,{state:{pathnameStackToGoBack:y}})},onGetOtp:b=>{const M={...v.myProfileLocalData,phone:b};t(ie({localData:M})),t(xn(b,"MyProfile"))},onResendOtp:b=>{t(In(b,"MyProfile"))},onCancelClick:()=>{t(Cn())},onSaveClick:()=>{t(ce("MyProfile",v.myProfileLocalData.phone,v.myProfileLocalData.otpChallenge,v.myProfileLocalData.dateOfBirth,v.addressData?.addressToCreate))},onVerifyOtp:(b,M)=>{t(yn(b,M,"MyProfile"))},onVerifyOtpSuccess:b=>{b!=null&&w.saveZeniOtpToken(b),t(ce("MyProfile",v.myProfileLocalData.phone,v.myProfileLocalData.otpChallenge,v.myProfileLocalData.dateOfBirth,v.addressData?.addressToCreate))},updateMyProfileLocalData:b=>{t(ie({localData:b}))}})]})};function vt(){const e=D(),t=h(l=>T(l)).companyId,s=h(l=>En(l)),r=h(l=>Ce(l)),i=w.getSignedInUser(),[n,a]=p.useState(!1),c=p.useCallback(l=>{a(l)},[]),u=p.useCallback(l=>{e(An(l))},[]),d=p.useCallback(()=>{i?.userEmail!=null&&e(vn({loggedInUserEmail:i.userEmail}))},[i?.userEmail]),m=p.useCallback(()=>{e(wn())},[]);if(i==null)throw Error("Can't access Notification Settings page without signing in...");const f=p.useCallback(()=>{const l=r.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(le(l,t))},[t,r.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=p.useCallback(()=>{e(kn())},[]);return p.useEffect(()=>{if(r.fetchState==="Completed"&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"){const l=r.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(le(l,t))}},[s.fetchState,t,r.notificationSettings.monthEndInsightsNotificationSettings.enabled,r.fetchState]),o.jsxs(o.Fragment,{children:[o.jsx(U,{isAppContentDrawerOpen:n,handleDrawerToggle:c}),o.jsx(Xn,{notificationSettingsView:s,onFormDataChange:u,onCancel:d,onSave:m,onClickMenuIcon:()=>{c(!0)},signedInUser:i,onRefresh:f,resetUpdateStatus:g})]})}function ia(e){const[t,s]=p.useState(!1),r=h(l=>Ce(l)),i=h(l=>T(l)),n=K(),a=w.getSignedInUser(),c=D(),{useFeatureGate:u}=ae(),{isFeatureEnabled:d}=u(R.isDebitCardFeatureEnabled),m=a?.userEmail==null||r.fetchState!=="Completed"||Pn(r.notificationSettings,a.userEmail,d,i);p.useEffect(()=>{r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"&&t===!1&&(s(!0),c(jn()))},[r.fetchState,t]);const f=ye(d,i),g=Se(i);return r.fetchState!=="In-Progress"&&r.fetchState!=="Not-Started"||m!==!0?Tn(i)?o.jsxs(W,{children:[Mn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"accounting/*",element:o.jsx(rt,{})}),Dn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"approval_rules/*",element:o.jsx(wt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Un(i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"my_bank_connections",element:o.jsx(Et,{})}),_n(i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"bank_connections",element:o.jsx(ht,{})}),Rn(i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"business_verification",element:o.jsx(at,{productType:f?"zeni_accounts":g?"charge_cards":tt(i,n?.loggedInUserRoleMap)})}),Fn(n?.loggedInUserRole??[],i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"company_details",element:o.jsx(ot,{})}),Bn(n?.loggedInUserRole??[],i)&&o.jsx(E,{path:"billing",element:o.jsx(St,{})}),zn(n?.loggedInUserRole??[],d,i)&&o.jsx(E,{path:"integrations",element:o.jsx(Ct,{})}),o.jsx(E,{path:"my_profile/new/:addressType",element:o.jsx(de,{appContent:o.jsx(nt,{isSubPage:!1})})}),o.jsx(E,{path:"my_profile",element:o.jsx(de,{})}),m&&o.jsx(E,{path:"notifications",element:o.jsx(vt,{})}),o.jsx(E,{path:"*",element:o.jsx(N,{})})]}):o.jsx(W,{children:o.jsx(E,{path:"*",element:o.jsx(N,{})})}):null}function wt(e){return o.jsxs(W,{children:[o.jsx(E,{path:"/",element:o.jsx(pt,{})}),o.jsx(E,{path:"bills/approval-rules/*",element:o.jsx(st,{})}),o.jsx(E,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?o.jsx(it,{}):o.jsx(N,{})}),o.jsx(E,{path:"*",element:o.jsx(N,{})})]})}export{ia as default};
@@ -1 +0,0 @@
1
- import{j as f}from"./liveblocks-DvKPzrwo.js";import{a as u,b as D,q as T}from"./sentry-Be8twC83.js";import{u as A,h as z,j as c,g as M,N as O,n as j}from"./core-CQnSJ9vO.js";import{u as F,z as s,m as P,c as w,D as B,d as _,e as N,f as V,g as W,Q as Y,h as v}from"./index-W83PhAZh.js";import{eW as $,Ly as q,Lz as G,fa as H,fD as J,LE as Q,gn as K,cY as R,LF as C,LG as X,LH as Z,bY as y}from"./zeni-epic-state-DKeO4Z0C.js";import"./mui-sKCdI-e6.js";import{u as ee}from"./useDeviceId-KC-rY1dP.js";import{f as te}from"./analyticsHelper-CvGdvadP.js";import{t as ne}from"./getLocaleForTenant-CAvD8CfA.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="11c366f0-35d2-4dff-8872-4a67f5fa3acd",t._sentryDebugIdIdentifier="sentry-dbid-11c366f0-35d2-4dff-8872-4a67f5fa3acd")}catch{}})();const ie=j(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{T({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(X(n,a)))},clearSignInError:()=>{t(C())}}})(Y),ae=D.memo(ie);function ve({setTenantEmailDomain:t}){const i=A(),d=z(),{clearAllLoading:g}=F(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:L,accountLocked:U,accountUnlockTime:h}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),k=c(e=>e.tenantState.activeTenantFetchState.fetchState),S=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>$(e)),I=c(e=>q(e)),m=M(),E=P().mode,b=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{L.fetchState==="Completed"&&l!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[L.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(G(I.tenantsInOrder),o.zeniSessionId),H(o.userId,o.zeniSessionId,r.tenantId),i(J(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(Q("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,E,void 0,I.tenantsInOrder),K().then(()=>{const e=W();e!=null&&_(e)}),setTimeout(()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",R(r.productSettings))},2e3))},[S,p,k,o,r,I,E,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!b,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&h!=null?f.jsx(V,{onClose:()=>i(C()),unlockDate:h}):null]})}export{ve as default};
@@ -1,5 +0,0 @@
1
- import{j as w}from"./liveblocks-DvKPzrwo.js";import{a as r}from"./sentry-Be8twC83.js";import{u as G,k as Ye,j as h,s as Qe,g as he,h as ge,i as Se,N as Ze,n as Xe}from"./core-CQnSJ9vO.js";import{nJ as me,eW as Y,go as Ke,mW as ea,mE as aa,bn as ta,cU as ye,bt as Te,r6 as j,ML as $,NM as be,NN as ae,N9 as Ee,kD as ve,NO as Ie,Ne as te,Nf as ne,ls as Ce,JO as oe,MF as z,kx as De,kv as ke,kH as na,nw as oa,NP as sa,NQ as ia,va as J,kC as Ae,J7 as xe,cZ as ra,c_ as ca,NR as la,ME as da,NS as ua,v6 as ma,NT as pa,NU as fa,NV as ha,NW as ga,NX as Sa,kG as ya,NY as Ta,NZ as ba,MG as Ea,N_ as va,N$ as Ia,O0 as Ca,J1 as Da,IT as ka,Jg as Aa,kI as xa,JP as pe,nB as wa}from"./zeni-epic-state-DKeO4Z0C.js";import{H as W,x as F,z as we,aN as Fe,m as Fa,K as Pa,aO as Ua,A as _a,q as K,j as Na,aP as Va,r as ee,_ as Ba,aQ as Oa,c as Pe,aR as La,at as Ra,a2 as X}from"./index-W83PhAZh.js";import{n as za,S as Ga,D as Ma}from"./mui-sKCdI-e6.js";import{u as ja}from"./useAskAiCfoHostNavButtonProps-DAlpTVgV.js";import{d as Ue}from"./decodeURIComponentSafe-BprI0TcI.js";import{h as _e,c as Ne,g as $a,e as Wa}from"./routePaths-stnXzrYV.js";import{u as qa}from"./utils-BcJ2NV01.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="820aacc5-be7b-461a-aa92-97e364ee785d",a._sentryDebugIdIdentifier="sentry-dbid-820aacc5-be7b-461a-aa92-97e364ee785d")}catch{}})();function Ha(a=!0){const e=G(),s=Ye(),{useFeatureGate:t}=W(),{isFeatureEnabled:n}=t(F.isCreateTransferEntryFromExpenseEnabled);r.useEffect(()=>{if(!a||n!==!0)return;const o=i=>{const l=s.getState().createTransferEntryState.transferAccountsByType[i].fetchState;return l!=="In-Progress"&&l!=="Completed"};o("transferEntryEligible")&&e(me({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(me({kind:"creditCardOnlyEligible"}))},[a,n,e,s])}function Ja(a,e){const s=function(){const l=G(),[m,f]=r.useState(!1),[E,p]=r.useState(null),{useDynamicConfig:g}=W(),{configValue:P,isDynamicConfigLoading:T}=g("transaction_categorization_config"),u=!T&&P?.capitalization_enabled===!0,D=h(I=>Y(I)),v=D.companyId,A=h(I=>Ke(I.companyState,D.companyId)?.company.companyLocaleInfo?.currencySymbol??"$"),{capitalizableAccounts:b,globalThreshold:k,maxCeiling:U,onboardingShownForPrepaid:_,onboardingShownForFixedAsset:B}=h(I=>{const S=I.tenantState.currentTenantId,c=S!=null?I.tenantState.tenantsById[S]:void 0;return{capitalizableAccounts:c?.capitalizableAccounts??null,globalThreshold:c?.capitalizationThreshold??null,maxCeiling:c?.capitalizationThresholdMaxCeiling??null,onboardingShownForPrepaid:c?.capitalizationOnboardingShownForPrepaid===!0,onboardingShownForFixedAsset:c?.capitalizationOnboardingShownForFixedAsset===!0}},Qe),M=r.useCallback(I=>{if(!u||b==null||k!=null&&k>0)return;const S=b.accounts??[],c=new Set(I);let V=!1,C=!1;for(const x of S)c.has(x.accountId)&&(x.classificationType==="prepaid"?V=!0:x.classificationType==="fixed_asset"&&(C=!0));V&&!_?(p("prepaid"),f(!0)):C&&!B&&(p("fixed_asset"),f(!0))},[u,b,k,_,B]),O=r.useCallback(I=>{E!=null&&(l(ea(v,I,U,E)),f(!1),p(null))},[l,v,E,U]),N=r.useCallback(()=>{E!=null&&(l(aa(v,E)),f(!1),p(null))},[l,v,E]);return{showPopup:m&&u,popupType:E,currencySymbol:A,checkAndShowPopup:M,handleSubmit:O,handleDismiss:N}}(),t=r.useRef(void 0),n=r.useRef([]),o=r.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const i=r.useRef(e);return i.current=e,r.useEffect(()=>{a==="In-Progress"&&(n.current=i.current()),a==="Completed"&&t.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),t.current=a},[a]),s}const se=()=>{const a=we.getSignedInUser(),{useFeatureGate:e}=W(),{isFeatureEnabled:s}=e(F.isChainOfThoughtEnabled);return r.useMemo(()=>ta(a)&&s,[a,s])};function Ve(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function ft(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=W(),o=h(y=>Y(y)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ye(o.userRole),m=o.userRole!=null&&Te(o.userRole),{isFeatureEnabled:f}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:E}=t(F.isExpenseAutomationEnabled),{configValue:p}=n(Fe.enableUncategorizedExpenseCategory),g=p?.uncategorized_expense_category_enabled===!0,P=se(),T=r.useMemo(()=>({id:a,type:j(e)}),[a,e]),u=h(y=>$(y,T)),D=u?.transactionDetailUpdateStatus?.fetchState,v=u?.transactionDetailLocalData?.lineItemById,A=h(y=>{const H=$(y,T)?.transactionDetailLocalData.vendorUpdates?.id;return H==null?"Not-Started":y.transactionVendorViewState.editVendorStateById[H]?.saveStatus.fetchState??"Not-Started"}),b=r.useMemo(()=>u?.fetchState==="Completed"?Ve(u?.transaction):void 0,[u?.fetchState,u?.transaction]),k=h(y=>{if(b!=null)return be(y.customerIncomeState,y.vendorExpenseState,y.trendState,b,"month")}),U=h(y=>ae(y)),_=h(y=>{if(b!=null)return Ee(y.trendWithTransactionsState,b,"TransactionDetail")}),B=o.company?.companyInfo.firstMonthOfFY??1,M=h(y=>ve(y.accountState,y.accountListState,"accountList")),[O,N]=r.useState(!1),[I,S]=r.useState(!1),[c,V]=r.useState(!1);r.useEffect(()=>{N(!1),S(!1),V(!1)},[a,e]);const C=r.useCallback(()=>{N(!1),S(!1)},[]),[x,L]=r.useState(!1),q=_?.selectedPeriod?.timePeriod;return r.useEffect(()=>{c||u==null||u.transaction==null||(s(Ie({id:u.transaction.id,type:u.transaction.type})),V(!0)),b!=null&&(!i||l&&m===!1)&&(O?I||k==null||(S(!0),s(oe(b,"TransactionDetail",{timeframe:"month",timePeriod:q??k}))):(s(te()),s(ne()),N(!0),s(Ce(b))))},[s,c,u?.fetchState,u?.transaction,b,i,l,m,O,I,k,q]),r.useEffect(()=>{U.newVendorState?.vendorDetailLocalData?.vendorName!=null?L(!0):L(!1)},[U.newVendorState?.vendorDetailLocalData?.vendorName]),r.useEffect(()=>()=>{s(z("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:m,isVendorBulkUpdateOnTransactionEnabled:f,isExpenseAutomationEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isChainOfThoughtEnabled:P,selectedTransaction:T,transactionDetail:u,rawDetailSaveStatus:D,rawDetailLineItemById:v,vendorSaveStatus:A,tranEntity:b,defaultTrendTransactionTimePeriod:k,vendorViewDetails:U,uiState:_,firstMonthOfFY:B,uncategorizedAccounts:M,resetTrendIsFetchedStates:C,isCreateVendorDrawerOpen:x,setIsCreateVendorDrawerOpen:L}}const Ya={overlayWidth:new _a(100,100,58)},Qa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Fa(),i=Pa(),l=G(),m=h(p=>ae(p)),f=()=>{t()},E={vendorDetailView:n??m,onSaveSuccess:()=>{l(ke()),l(na("Not-Started")),s()},onSaveVendor:e,onCancelClick:f,saveVendorDetailLocalData:p=>{l(De({vendorId:void 0,localData:p}))}};return w.jsx(Ma,{anchor:"right",open:a,PaperProps:{style:{width:Ya.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:f,children:w.jsx(Za,{onClick:p=>p.stopPropagation(),children:w.jsx(Ua,{...E})})})},Za=za(Ga)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `;function Xa(a,e){a(oa({transactionId:e.transactionId,creditAccountIntegrationId:e.creditAccountIntegrationId,debitAccountIntegrationId:e.debitAccountIntegrationId,memo:e.memo,transactionType:j(e.transactionType),sourceTransactionType:j(e.sourceTransactionType)}))}function Ka({currentTransactionId:a,enabled:e=!0,buildPath:s,beforeNavigate:t,navigate:n,navigateState:o}){const i=h(m=>m.createTransferEntryState.lastTransferEntryReplacement),l=r.useRef(null);r.useEffect(()=>{if(!e||i==null||a==null||l.current===i)return;const{previousTransactionId:m,newTransactionId:f}=i;a.id===m.id&&a.type===m.type&&(l.current=i,t?.(),n(s(f),{replace:!0,state:o}))},[e,i,a,s,t,n,o])}const et=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=he(),n=ge(),o=G(),i=se(),{transactionTypeEncoded:l,transactionId:m}=Se(),f=e??m,E=s??Ue(l??"");let p;_e(f,E)&&(p={id:f,type:j(E)});const g=p!=null?h(T=>$(T,p)):void 0,P=()=>{const T=K(t.state?.pathnameStackToGoBack),u=T.poppedPathname??((D=2)=>{let v="../";for(let A=0;A<D;A++)v=`${v}../`;return v})(1);n(u,{state:{pathnameStackToGoBack:T.newStack}})};return{transactionId:p,onSaveVendor:()=>{o(Ae(p,void 0))},onSaveSuccess:()=>{if(g!=null&&g?.transaction&&g?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&g?.transactionDetailLocalData.vendorUpdates?.id!=null){const T=g?.transactionDetailLocalData.vendorUpdates,u={id:g?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:g?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:T?.name,qboId:g?.transactionDetailLocalData.vendorUpdates?.qboId??""},D={transactionId:{id:g?.transaction?.id,type:g?.transaction?.type},transaction:g?.transaction,lineIds:g?.transaction?.lines?.map(v=>v.id)??[]};o(J({entity:u,amount:g?.transaction?.amount.amount,transactionDetails:D,flowType:"detail",isFetchCOT:i}))}P()},onCancel:()=>{p!=null&&o(sa({transactionId:p})),o(ke()),o(ia()),a(!0),P()}}},at=Xe(function(a,e){const s=$(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=we.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=la(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,m=da(a,"common"),f=Y(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${X}/transaction_attachment`,transactionAttachmentsEndpointToFetch:f.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${X}/transaction_attachments_accounting_provider`:`${X}/transaction_attachments`,attachmentUploadEndpoint:`${Ra.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:Pe,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:m},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(z("common")),e.onBackClick!=null)return void e.onBackClick();const t=K(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Be(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(wa({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(te()),a(ne());const n=ee(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(Ne(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(pe(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(oe(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(pe(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?Ae(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):xa({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(z("common"))},onUploadAttachmentAttachment:t=>{a(Aa(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(ka(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(Da({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(Ca(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,m)=>{a(Ia(t,n,o,i,l,m))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(va({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=K(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=qa(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${$a(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Wa(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(xe(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(Ea({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(z("common"))},onCancelAutoComplete:()=>{a(z("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(J({entity:t,amount:n,transactionDetails:o,flowType:"detail",isFetchCOT:s}))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ba(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(Ta(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(ya({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(J({entity:o,amount:i,transactionDetails:l,flowType:"detail",isFetchCOT:s})),a(De({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const m=e.transaction,f=ee(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(m.type??"")}/${m.id}/vendor/create`,{state:{pathnameStackToGoBack:f}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(Sa({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(J({entity:o,amount:i,transactionDetails:l,flowType:"detail",isFetchCOT:s}))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(ga({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ha(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(fa(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(pa({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(ma(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(ua(t,n,o))},onCreateTransferEntry:e.isCreateTransferEntryFromExpenseEnabled===!0?t=>Xa(a,t):void 0}})(La);function ht(){const a=ge(),e=G(),s=he(),{useFeatureGate:t,useDynamicConfig:n}=W(),o=Na(),i=h(d=>Y(d)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),m=i.userRole!=null&&ye(i.userRole),f=i.userRole!=null&&Te(i.userRole),{isFeatureEnabled:E}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:p}=t(F.isExpenseAutomationEnabled),{configValue:g}=n(Fe.enableUncategorizedExpenseCategory),P=g?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:T,transactionTypeEncoded:u,transactionId:D}=Se(),[v,A]=r.useState(!1),b=Ue(u??""),k=_e(D,b),U=h(d=>d.transactionVendorViewState),_=se(),{isFeatureEnabled:B}=t(F.isTransactionCommentingEnabled),{isFeatureEnabled:M}=t(F.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:O}=t(F.isProjectsTransactionsEnabled),N=o?.currentTenant?.companyId,I=o?.currentTenant?.companyName,S=r.useMemo(()=>{if(k)return{id:D,type:j(b)}},[k,D,b]),c=S!=null?h(d=>$(d,S)):void 0,V=c?.transactionDetailLocalData.vendorUpdates?.id!=null?U.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",C=c?.fetchState==="Completed"?Ve(c?.transaction):void 0,x=h(d=>C!=null?be(d.customerIncomeState,d.vendorExpenseState,d.trendState,C,"month"):void 0),L=h(d=>ae(d)),q=h(d=>C!=null?Ee(d.trendWithTransactionsState,C,"TransactionDetail"):void 0),y=i.company?.companyInfo.firstMonthOfFY??1,H=h(d=>ve(d.accountState,d.accountListState,"accountList")),[Oe,ie]=r.useState(!1),[Le,re]=r.useState(!1),[Re,ce]=r.useState(!1),ze=r.useCallback(d=>Ne(d,T??"")+s.search,[T,s.search]),Ge=r.useCallback(()=>{ce(!1)},[]);Ka({currentTransactionId:S,enabled:T!=null&&T!=="",buildPath:ze,beforeNavigate:Ge,navigate:a,navigateState:s.state});const le=()=>{ie(!1),re(!1)},de=Va();Ha();const Q=r.useRef(c?.transaction);Q.current=c?.transaction;const Me=c?.transactionDetailUpdateStatus?.fetchState,R=Ja(Me,()=>{const d=[];if(Q.current!=null)for(const Z of Q.current.lines??[])"account"in Z&&Z.account?.accountId!=null&&d.push(Z.account.accountId);return d});r.useEffect(()=>{S!=null&&c!=null&&c.fetchState==="Not-Started"&&(e(xe(S,!1)),le())},[e,S,c?.fetchState]),r.useEffect(()=>{if(S!=null&&c?.fetchState==="Error"){const d=ee(s.state?.pathnameStackToGoBack,s.pathname);a("page-not-found",{replace:!0,state:de?{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"transaction_categorization"}:{pathnameStackToGoBack:d,message:"pageNotFound",origin:"transaction_detail"}})}},[S,c?.fetchState,a,s.state,s.pathname,de]),r.useEffect(()=>{Re||c==null||c.transaction==null||(e(Ie({id:c.transaction.id,type:c.transaction.type})),ce(!0)),C==null&&c?.fetchState==="Completed"&&fe(c?.transaction),C!=null&&(!l||m&&f===!1)&&(Oe?Le||x==null||(re(!0),e(oe(C,"TransactionDetail",{timeframe:"month",timePeriod:q?.selectedPeriod?.timePeriod??x}))):(e(te()),e(ne()),fe(c?.transaction),ie(!0),e(Ce(C))))},[c?.fetchState,c?.transaction,x,l]),r.useEffect(()=>{L.newVendorState?.vendorDetailLocalData?.vendorName!=null?A(!0):A(!1)},[L.newVendorState?.vendorDetailLocalData?.vendorName]),r.useEffect(()=>()=>{e(z("common"))},[]);const je=[u,D].filter(d=>d!=null),{transactionId:ue,onSaveVendor:$e,onSaveSuccess:We,onCancel:qe}=et({closeDrawerHandler:d=>{A(!1),a(d?"../":"../..")}}),{isAiCfoAccessEnabled:He,onAskAiCfoClick:Je}=ja({mobileExploreReferrer:"Transaction Details"});return Ba({isDataReady:c?.fetchState==="Completed"}),k?w.jsxs(w.Fragment,{children:[ue!=null&&v&&w.jsx(Qa,{isOpen:v,transactionId:ue,onSaveVendor:$e,onSaveSuccess:We,onCancel:qe}),w.jsx(at,{hideDeleteAttachment:!0,firstMonthOfFY:y,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:T,location:s,navigate:a,selectedTransaction:S,entity:C,isCOTEnabled:_,defaultTrendTransactionTimePeriod:x,resetTrendIsFetchedStates:le,transaction:c?.transaction,uncategorizedAccounts:H,vendorSaveStatus:V,isVendorBulkUpdateOnTransactionEnabled:E,isCreateTransferEntryFromExpenseEnabled:M,isExpenseAutomationEnabled:p,isUncategorizedExpenseCategoryEnabled:P,isAiCfoAccessEnabled:He,onAskAiCfoClick:Je,isTransactionCommentingEnabled:B,isProjectsTransactionsEnabled:O,companyId:N,companyName:I}),R.showPopup&&R.popupType!=null&&w.jsx(Oa,{popupType:R.popupType,currencySymbol:R.currencySymbol,onSubmit:R.handleSubmit,onDismiss:R.handleDismiss})]}):w.jsx(Ze,{to:Be(je.length)})}const Be=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},fe=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=tt(a),t=nt(a);Pe.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},tt=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},nt=a=>ra(a)===!0?a.customer?.name??"":ca(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{Qa as C,ht as T,Ha as a,Ja as b,et as c,at as d,Ka as e,se as f,Xa as g,ft as u};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-DvKPzrwo.js";import{a as f}from"./sentry-Be8twC83.js";import{t as u,u as b,j as h,N as y}from"./core-CQnSJ9vO.js";import{LT as I,fa as w,B3 as j}from"./zeni-epic-state-DKeO4Z0C.js";import{z as l,B as x,C as S,F as D}from"./index-W83PhAZh.js";import{n as p}from"./mui-sKCdI-e6.js";import"./recharts-Cv5d-Vxs.js";import"./analytics-DoyQ8ezf.js";import"./plaid-BOu_8LCE.js";import"./dnd-DoHm848q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DNsrs-P3.js";import"./lexical-WXHH1XHj.js";import"./pdf-iXI4qQyj.js";import"./utils-BcJ2NV01.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]="72e305bd-61b8-47f8-be27-beb3fafc8672",e._sentryDebugIdIdentifier="sentry-dbid-72e305bd-61b8-47f8-be27-beb3fafc8672")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",c=e.get("profileId")??"",[n,g]=f.useState(!1),a=b(),i=h(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(g(!0),a(j(t,c,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(T,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=p.div`
2
- display: flex;
3
- width: 100%;
4
- height: 100vh;
5
- flex-direction: row;
6
- justify-content: center;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey5};
9
- `,T=p(D.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{A as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-DvKPzrwo.js";import{a as f}from"./sentry-Be8twC83.js";import{h as x,u as B,g as $,i as j,j as p}from"./core-CQnSJ9vO.js";import{KR as s,KQ as v,R7 as C,eW as T,R8 as z}from"./zeni-epic-state-DKeO4Z0C.js";import{K as D,at as g,m as E,z as L,B as P,cd as N,q as R}from"./index-W83PhAZh.js";import{n as _}from"./mui-sKCdI-e6.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]="6b345e8a-5c9e-4eb5-812d-9ed63cd92b34",e._sentryDebugIdIdentifier="sentry-dbid-6b345e8a-5c9e-4eb5-812d-9ed63cd92b34")}catch{}})();const K=_.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
- `;function V(){const e=x(),n=B(),d=D(),l=$();let{accountId:a}=j(),m=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,m=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,b]=f.useState(!1),h=E();f.useEffect(()=>{u||(b(!0),n(v(a??"",!1)))},[u,n]);const o=p(t=>C(t,a??"")),y=()=>{const t=R(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=L.getSignedInUser(),r=p(t=>T(t)),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=z(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(K,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:y,authParams:I,downloadEndPoint:m})})}export{V as Z};
@@ -1 +0,0 @@
1
- import{k as n}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import"./sentry-Be8twC83.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]="f17be0a9-8452-4732-8143-c042676b47a8",e._sentryDebugIdIdentifier="sentry-dbid-f17be0a9-8452-4732-8143-c042676b47a8")}catch{}})();function l(e){if(e.companyLocaleInfo!=null&&e.companyLocaleInfo.languageCode.length>0&&e.companyLocaleInfo.companyIncCountryCode.length>0){const o=`${e.companyLocaleInfo.languageCode.toLowerCase()}-${e.companyLocaleInfo.companyIncCountryCode.toUpperCase()}`;return console.warn(`localeID ${o}`),n(o)??"en"}return"en"}export{l as t};
@@ -1 +0,0 @@
1
- import{a as b}from"./sentry-Be8twC83.js";import{h as u,g,i as h,j as S}from"./core-CQnSJ9vO.js";import{eW as y}from"./zeni-epic-state-DKeO4Z0C.js";import{X as k,K as C,a as A,Z as T,$ as I,r as w,a1 as D}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.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]="cfcc8e80-7f3d-465c-8ecd-65f2294ab481",e._sentryDebugIdIdentifier="sentry-dbid-cfcc8e80-7f3d-465c-8ecd-65f2294ab481")}catch{}})();function j(e){const{mobileExploreReferrer:t}=e,{isAiCfoOpen:r,setIsAiCfoOpen:i}=k(),s=u(),o=g(),{tenantEmailDomain:n}=h(),d=C(),f=D(d),l=A(),p=T(),m=S(a=>a.tenantState.fetchState==="Completed"||a.tenantState.activeTenantFetchState.fetchState==="Completed"?y(a):void 0),c=m?.masterTOSInfo?.isMasterTOSAccepted??!1;return{isAiCfoAccessEnabled:p&&l&&!r,onAskAiCfoClick:b.useCallback(()=>{if(n!=null)if(c)if(f){const a=w(o.state?.pathnameStackToGoBack,o.pathname);s(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:a,referrer:t}})}else i(!0);else I({location:o,navigate:s,mergeState:{referrer:t}})},[c,f,o,t,s,i,n])}}export{j as u};
@@ -1 +0,0 @@
1
- import{a as d}from"./sentry-Be8twC83.js";import{u,h as m,i as c,j as f}from"./core-CQnSJ9vO.js";import{H as l,x as p}from"./index-W83PhAZh.js";import"./mui-sKCdI-e6.js";import{QU as g,QM as h,Bb as y}from"./zeni-epic-state-DKeO4Z0C.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]="3b5abed9-b06c-40d1-8191-bfec8a0afdb9",e._sentryDebugIdIdentifier="sentry-dbid-3b5abed9-b06c-40d1-8191-bfec8a0afdb9")}catch{}})();function C(){const e=u(),a=m(),{tenantEmailDomain:r}=c(),{useFeatureGate:b}=l(),{isFeatureEnabled:t}=b(p.isCashManagementFeatureEnabled),o=f(s=>g(s)),i=f(s=>h(s)),n=o.banner.fetchState;if(d.useEffect(()=>{t===!0&&n!=="Completed"&&n!=="In-Progress"&&e(y(!1))},[e,t,n]),t===!0)return{banner:o.banner,bufferAmount:i.formData.bufferAmount,onSetUpAutoSweepClick:()=>{a(`/${r}/checking/cash_management/auto_sweep`,{state:{fromCashManagement:!0}})}}}export{C as u};
@@ -1,21 +0,0 @@
1
- import{j as r}from"./liveblocks-DvKPzrwo.js";import{b as ne,a as t}from"./sentry-Be8twC83.js";import{j as se,H as L,x as D,_ as ie,aT as oe,aQ as re,K as le,aU as ce}from"./index-W83PhAZh.js";import{n as H}from"./mui-sKCdI-e6.js";import{u as de}from"./useAskAiCfoHostNavButtonProps-DAlpTVgV.js";import{u as ue,a as me,b as pe,c as he,C as fe,d as be,e as Pe}from"./TransactionDetailScreen-ABqf1zzA.js";import{h as N,g as B,i as _,u as Te,j as ye}from"./core-CQnSJ9vO.js";import{r6 as Ie,ML as xe,J7 as Ee}from"./zeni-epic-state-DKeO4Z0C.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="24c09222-5390-434a-a42c-a4cccc12f36a",n._sentryDebugIdIdentifier="sentry-dbid-24c09222-5390-434a-a42c-a4cccc12f36a")}catch{}})();const X=H.div`
2
- display: flex;
3
- flex-direction: column;
4
- height: 100%;
5
- `,Z=H.div`
6
- flex: 1;
7
- min-height: 0;
8
- display: flex;
9
- flex-direction: column;
10
- box-sizing: border-box;
11
- min-width: 0;
12
- overflow-x: hidden;
13
- overflow-y: auto;
14
- `,ve=H.div`
15
- display: flex;
16
- flex: 1;
17
- flex-direction: column;
18
- min-height: 0;
19
- min-width: 0;
20
- box-sizing: border-box;
21
- `,ge=ne.memo(({isFullView:n,transactionId:e,transactionType:l,isTransactionCommentingEnabled:m,onBackToList:h,onClose:a})=>{const f=N(),s=B(),{tenantEmailDomain:c}=_(),b=se(),{useFeatureGate:O}=L(),{isFeatureEnabled:I}=O(D.isCreateTransferEntryFromExpenseEnabled),x=a!=null&&n!==!0,$=b?.currentTenant?.companyId,V=b?.currentTenant?.companyName,{isFeatureEnabled:d}=O(D.isProjectsTransactionsEnabled),{selectedTransaction:p,transactionDetail:v,tranEntity:P,isChainOfThoughtEnabled:M,defaultTrendTransactionTimePeriod:o,resetTrendIsFetchedStates:F,uncategorizedAccounts:j,vendorSaveStatus:g,isVendorBulkUpdateOnTransactionEnabled:C,isExpenseAutomationEnabled:T,isUncategorizedExpenseCategoryEnabled:A,firstMonthOfFY:z,isCreateVendorDrawerOpen:k,rawDetailSaveStatus:R,rawDetailLineItemById:S}=ue(e,l);me(n===!0);const i=t.useRef(S);i.current=S;const y=pe(R,()=>{const Q=[],q=i.current;if(q!=null)for(const te of Object.values(q)){const W=te.account;W?.accountId!=null&&Q.push(W.accountId)}return Q}),{transactionId:E,onSaveVendor:U,onSaveSuccess:u,onCancel:w}=he({closeDrawerHandler:()=>{},overrideTransactionId:e,overrideTransactionType:l}),{isAiCfoAccessEnabled:Y,onAskAiCfoClick:ae}=de({mobileExploreReferrer:"Transaction Details"}),J=n===!0&&Y;if(ie({isDataReady:n===!0&&v?.fetchState==="Completed"}),v==null)return r.jsx(X,{children:r.jsx(Z,{children:r.jsx(oe,{})})});const K=r.jsxs(r.Fragment,{children:[E!=null&&k?r.jsx(fe,{isOpen:k,transactionId:E,onSaveVendor:U,onSaveSuccess:u,onCancel:w}):null,r.jsx(ve,{children:r.jsx(be,{hideDeleteAttachment:!0,firstMonthOfFY:z,isDisabled:v?.transaction?.type==="transfer"&&b?.connectionName==="netsuite"?"readonly":void 0,isNavBarVisible:!x,tenantEmailDomain:c??"",location:s,navigate:f,selectedTransaction:p,entity:P,isCOTEnabled:M,isCreateTransferEntryFromExpenseEnabled:I,defaultTrendTransactionTimePeriod:o,resetTrendIsFetchedStates:F,transaction:v?.transaction,uncategorizedAccounts:j,vendorSaveStatus:g,isVendorBulkUpdateOnTransactionEnabled:C,isExpenseAutomationEnabled:T,isUncategorizedExpenseCategoryEnabled:A,isAiCfoAccessEnabled:J,onAskAiCfoClick:J?ae:void 0,isTransactionCommentingEnabled:m,isProjectsTransactionsEnabled:d,companyId:$,companyName:V,onBackClick:h})}),y.showPopup&&y.popupType!=null&&r.jsx(re,{popupType:y.popupType,currencySymbol:y.currencySymbol,onSubmit:y.handleSubmit,onDismiss:y.handleDismiss})]});return x?r.jsx(X,{children:r.jsx(Z,{children:K})}):K}),Ce=[];function ee(n){try{return decodeURIComponent(n)}catch{return n}}const Se=/^transaction\/([^/]+)\/([^/?]+)$/;function we(n=!0){const e=N(),l=B(),m=Te(),h=_(),a=function(d){const{childPathPattern:p,enabled:v=!0}=d,P=N(),M=_(),o=B(),F=le(),j=F==="small"||F==="medium-compact",g=M["*"]??"",C=g.match(p),T=v&&!j&&C!=null,A=t.useMemo(()=>new URLSearchParams(o.search).get("view"),[o.search]),z=T&&A==="full",k=C?.slice(1).join("\0"),R=t.useMemo(()=>C==null?Ce:C.slice(1),[k]),S=t.useMemo(()=>{if(!g)return o.pathname;const u=o.pathname.lastIndexOf("/"+g);return u>=0?o.pathname.slice(0,u):o.pathname},[o.pathname,g]),i=t.useRef({isOpen:T,locationState:o.state,basePath:S,pathname:o.pathname,search:o.search});i.current.isOpen=T,i.current.locationState=o.state,i.current.basePath=S,i.current.pathname=o.pathname,i.current.search=o.search;const y=t.useCallback((u,w)=>{P(`${i.current.basePath}/${u}`,{replace:w?.replace??!1,state:i.current.locationState})},[P]),E=t.useCallback(()=>{i.current.isOpen&&P(i.current.basePath,{replace:!0,state:i.current.locationState})},[P]),U=t.useCallback(()=>{const u=new URLSearchParams(i.current.search);u.set("view","full"),P(`${i.current.pathname}?${u.toString()}`,{replace:!0,state:i.current.locationState})},[P]);return t.useEffect(()=>{if(!T)return;const u=w=>{if(w.key==="Escape"){if(w.target?.closest('[role="dialog"], [role="alertdialog"]'))return;E()}};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[T,E]),{backToList:E,basePath:S,closePanel:E,isFullView:z,isMobile:j,isOpen:T,matchGroups:R,maximize:U,navigateToChild:y}}({childPathPattern:Se,enabled:n}),f=a.matchGroups[0]!=null&&a.matchGroups[0]!==""?Ie(ee(a.matchGroups[0])):void 0,s=a.matchGroups[1]!=null&&a.matchGroups[1]!==""?ee(a.matchGroups[1]):void 0,c=t.useMemo(()=>{if(n&&s!=null&&f!=null)return{id:s,type:f}},[n,s,f]),b=ye(d=>{if(c!=null)return xe(d,c)}),O=t.useMemo(()=>a.isOpen&&c!=null?b==null?"In-Progress":b.fetchState:"Not-Started",[a.isOpen,c,b]),I=h.tenantEmailDomain??l.pathname.split("/").find(Boolean)??"";t.useEffect(()=>{a.isOpen&&c!=null&&m(Ee(c,!1))},[m,a.isOpen,c]);const x=t.useRef({isOpen:a.isOpen,transactionId:s});x.current={isOpen:a.isOpen,transactionId:s};const $=t.useCallback(d=>{const p=encodeURIComponent(d.type);return a.isMobile||!n?`/${I}/transaction/${p}/${d.id}${l.search}`:`${a.basePath}/transaction/${p}/${d.id}${l.search}`},[a.isMobile,a.basePath,n,I,l.search]);Pe({currentTransactionId:c,enabled:I!=="",buildPath:$,navigate:e,navigateState:l.state});const V=t.useCallback((d,p)=>{!a.isMobile&&n?x.current.isOpen&&x.current.transactionId===d?a.closePanel():a.navigateToChild(`transaction/${encodeURIComponent(p)}/${d}`,{replace:x.current.isOpen}):e(`/${I}/transaction/${encodeURIComponent(p)}/${d}`)},[e,a.isMobile,a.navigateToChild,a.closePanel,n,I]);return{backToList:a.closePanel,closePanel:a.closePanel,fetchState:O,isFullView:a.isFullView,isOpen:a.isOpen,maximize:a.maximize,openPanel:V,selectedTransactionId:n?c:void 0,transactionDetail:n?b:void 0,transactionId:n?s:void 0,transactionType:n?f:void 0}}const Ae=(G={displayNamePrefix:"withTransactionSidePanel",usePanelSetup:function(n){const e=we(n),{useFeatureGate:l}=L(),{isFeatureEnabled:m}=l(D.isTransactionCommentingEnabled),h=t.useMemo(()=>{if(e.isOpen&&e.transactionId!=null&&e.transactionType!=null)return r.jsx(ge,{isFullView:e.isFullView,isTransactionCommentingEnabled:m,transactionId:e.transactionId,transactionType:e.transactionType,onBackToList:e.closePanel,onClose:e.closePanel})},[e.isOpen,e.isFullView,e.transactionId,e.transactionType,e.closePanel,m]);return{injectedProps:t.useMemo(()=>n?{closeSidePanel:e.closePanel,openTransactionPanel:e.openPanel,panelContent:h,sidePanelIsFullView:e.isFullView,sidePanelIsOpen:e.isOpen}:{},[n,e.closePanel,e.openPanel,h,e.isFullView,e.isOpen]),selectedItemId:e.transactionId,sidePanel:e}}},function(n){const e=n.displayName??n.name??"Component",l=ne.memo(n),m=h=>{const{useFeatureGate:a}=L(),{isFeatureEnabled:f}=a(D.isTransactionDetailSplitViewEnabled),s=G.usePanelSetup(f),c=t.useMemo(()=>({closePanel:s.sidePanel.closePanel,maximize:s.sidePanel.maximize,selectedItemId:s.selectedItemId}),[s.sidePanel.closePanel,s.sidePanel.maximize,s.selectedItemId]);return r.jsx(ce.Provider,{value:c,children:r.jsx(l,{...h,...s.injectedProps})})};return m.displayName=`${G.displayNamePrefix}(${e})`,m});var G;export{Ae as w};