@zeniai/web-app-ui 5.0.18-qa → 5.0.19-qa

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 (124) hide show
  1. package/dist/assets/AddressRoutes-BhCu25lU.js +1 -0
  2. package/dist/assets/AddressScreen-BcESiPXv.js +9 -0
  3. package/dist/assets/AiCfoScreen-D3QnzgQb.js +11 -0
  4. package/dist/assets/{BillPayApprovalRoutes-B1dVKGB7.js → BillPayApprovalRoutes-DLbtPixu.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-BlCM6EqR.js → BillPayRoutes-B_V8HtwS.js} +8 -8
  6. package/dist/assets/{BusinessVerificationPageScreen-B0aOlvDy.js → BusinessVerificationPageScreen-C1vhTC_E.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-C0OR0QnW.js → ChargeCardRoutes-s2TM6L_R.js} +8 -8
  8. package/dist/assets/CompanyPassportScreen-BNll4K7f.js +1 -0
  9. package/dist/assets/ConnectionAuthScreen-DRyWH_Ub.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-BFENT6Ja.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-CPe4UazZ.js → CustomerOnboardingRoutes-BsiXlY6F.js} +6 -6
  12. package/dist/assets/{DashboardRoutes-d3sWDoZr.js → DashboardRoutes-BgW7GVgj.js} +3 -3
  13. package/dist/assets/{DefaultTenantHome-BKqpHNPL.js → DefaultTenantHome-BBEjYDkH.js} +1 -1
  14. package/dist/assets/DomesticWireDetailScreen-BDh7YaRz.js +18 -0
  15. package/dist/assets/DrawerScreen-Dbqz-pF7.js +1 -0
  16. package/dist/assets/{EntityDetailRoutes-Rn_-edBe.js → EntityDetailRoutes-VTa9LNaz.js} +1 -1
  17. package/dist/assets/ExpenseAutomationRoutes-B20xFWDa.js +20 -0
  18. package/dist/assets/FeaturePreviewScreen-ClmSo1U7.js +1 -0
  19. package/dist/assets/MagicLinkRoutes-pzDzeUrG.js +72 -0
  20. package/dist/assets/MagicLinkSignInScreen-CivONTd4.js +12 -0
  21. package/dist/assets/{MobileAppDrawer-VgfdPmIc.js → MobileAppDrawer-BaHE34Vv.js} +1 -1
  22. package/dist/assets/NotFoundScreen-C3kBFHq1.js +1 -0
  23. package/dist/assets/NotificationRoutes-Den2bd_a.js +1 -0
  24. package/dist/assets/{PandLWithForecastRoutes-Bw9LmosD.js → PandLWithForecastRoutes-CbvULQYZ.js} +1 -1
  25. package/dist/assets/PeopleRoutes-DQQ4nNHt.js +22 -0
  26. package/dist/assets/PerformanceRoutes-HPat2pxO.js +1 -0
  27. package/dist/assets/{Preview-CCtVCHIh.js → Preview-CRwVXjMO.js} +1 -1
  28. package/dist/assets/{QBOConnectionScreen-O-1IJ7vW.js → QBOConnectionScreen-CZtyFAVo.js} +1 -1
  29. package/dist/assets/ReferralListScreen-Bop7SIEK.js +5 -0
  30. package/dist/assets/{ReimbursementApprovalRoutes-CMG0ah9n.js → ReimbursementApprovalRoutes-BBEmVV5-.js} +1 -1
  31. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-nWYI_DTZ.js → ReimbursementApprovalRuleDetailScreen-AIE9_S4u.js} +1 -1
  32. package/dist/assets/{ReimbursementRoutes-BXKMoRKS.js → ReimbursementRoutes-CRwlytHX.js} +6 -6
  33. package/dist/assets/{ReportsRoutes-B1A7hhcf.js → ReportsRoutes-Cb7FRQxE.js} +1 -1
  34. package/dist/assets/RewardsRoutes-DeYf52wl.js +1 -0
  35. package/dist/assets/ScreenRoutes-BODB-3Ia.js +2 -0
  36. package/dist/assets/{SettingsRoutes-C0dX88-a.js → SettingsRoutes-Cuuf_SLe.js} +7 -7
  37. package/dist/assets/{SetupPagesScreen-D-1wJv_X.js → SetupPagesScreen-Bx9eIItf.js} +1 -1
  38. package/dist/assets/{SignInScreen-Co-Zsrhj.js → SignInScreen-BXatoAKB.js} +1 -1
  39. package/dist/assets/SignOutScreen-CVElg1r_.js +9 -0
  40. package/dist/assets/TaskListScreen-D9zNnnke.js +9 -0
  41. package/dist/assets/TaskRoutes-BnGbBPHj.js +9 -0
  42. package/dist/assets/TransactionDetailRoutes-CyVczvyG.js +1 -0
  43. package/dist/assets/{TransactionDetailScreen-CbnXMf-w.js → TransactionDetailScreen-D28IGeb1.js} +1 -1
  44. package/dist/assets/{TransactionListRoutes-CZQnxASD.js → TransactionListRoutes-ExZfKQN9.js} +1 -1
  45. package/dist/assets/{TreasuryRoutes-B36ovFlE.js → TreasuryRoutes-p14BUmVq.js} +6 -6
  46. package/dist/assets/{VendorsRoutes-Ch385dto.js → VendorsRoutes-B7R2O59J.js} +13 -13
  47. package/dist/assets/WiseConfirmationScreen-BynfQbnM.js +12 -0
  48. package/dist/assets/{ZeniAccountRoutes-C-A0w1l-.js → ZeniAccountRoutes-CX8VTJtH.js} +10 -10
  49. package/dist/assets/ZeniAccountStatementScreen-Dvjjno6c.js +9 -0
  50. package/dist/assets/{accountMappingHelper-DxgbU7sx.js → accountMappingHelper-DXGp115l.js} +1 -1
  51. package/dist/assets/{analytics-CALyM-hh.js → analytics-BKunqsaf.js} +1 -1
  52. package/dist/assets/{analyticsHelper-yiDXt2Ja.js → analyticsHelper-Bo9aIzGQ.js} +1 -1
  53. package/dist/assets/{core-DGtRv-5L.js → core-C1FHFtWE.js} +1 -1
  54. package/dist/assets/{decodeURIComponentSafe-D45efNq9.js → decodeURIComponentSafe-BjGCfGPp.js} +1 -1
  55. package/dist/assets/{dnd-Bts1hC9q.js → dnd-CKPinqKo.js} +1 -1
  56. package/dist/assets/{empty-B8GlEZnh.js → empty-DCBZxZdT.js} +1 -1
  57. package/dist/assets/{empty-B0MTj6gY.js → empty-QDWy3Sbb.js} +1 -1
  58. package/dist/assets/{emptyVideoElement-DIDd1D81.js → emptyVideoElement-CDVJdqXJ.js} +1 -1
  59. package/dist/assets/{epic-Ddra04XC.js → epic-DW6sm_Xz.js} +2 -2
  60. package/dist/assets/getLocaleForTenant-pBjb9R_D.js +1 -0
  61. package/dist/assets/{index-oJG7aYjB.js → index-BKQLnVw8.js} +1 -1
  62. package/dist/assets/{index-CrJKzVqy.js → index-CHRX9-rv.js} +2 -2
  63. package/dist/assets/{index-NN8WQI8p.js → index-CZc_s42n.js} +11564 -11575
  64. package/dist/assets/{index-CI_EK7HU.js → index-D8T6lc_N.js} +1 -1
  65. package/dist/assets/{index-ktcuBvep.js → index-Dg4Gln7w.js} +1 -1
  66. package/dist/assets/{index-Cq17jLR1.js → index-oonNPnkE.js} +1 -1
  67. package/dist/assets/{index-BzTrf-Pv.js → index-v7N-NvrE.js} +1 -1
  68. package/dist/assets/{lexical-DcQz2ToX.js → lexical-BhAbdael.js} +1 -1
  69. package/dist/assets/{liveblocks-1thjzoaw.js → liveblocks-BZlOk8zk.js} +1 -1
  70. package/dist/assets/{lottie-TdNUPve2.js → lottie-ciaQJ7oN.js} +1 -1
  71. package/dist/assets/{mui-C-9qGevS.js → mui-CZhjlxyT.js} +1 -1
  72. package/dist/assets/{pathToGoBack-BxDzY9Wz.js → pathToGoBack-BQU-ldKZ.js} +1 -1
  73. package/dist/assets/{pdf-DhqCrjXb.js → pdf-9d-sooX0.js} +3 -3
  74. package/dist/assets/{pdf-lib-DmaaVbvY.js → pdf-lib-Bm3ZpH2B.js} +1 -1
  75. package/dist/assets/{plaid-DRyXOtiU.js → plaid-BYUv-poR.js} +1 -1
  76. package/dist/assets/{pusher-BfiexiZ0.js → pusher-DcPGAlRO.js} +1 -1
  77. package/dist/assets/{react-DHT2lmLc.js → react-BNNcFe-e.js} +1 -1
  78. package/dist/assets/{react-B7CiQw1L.js → react-BtwEgXWF.js} +1 -1
  79. package/dist/assets/{react-md9nq4qh.js → react-DERPQWfC.js} +1 -1
  80. package/dist/assets/{react-KFiz_tR6.js → react-Du_nCFym.js} +1 -1
  81. package/dist/assets/{react-D00Xl-Dr.js → react-JYEN_7jf.js} +1 -1
  82. package/dist/assets/{react-B82EMGAf.js → react-rXZAT_kh.js} +1 -1
  83. package/dist/assets/{recharts-a2B9SbBf.js → recharts-BBpjoK43.js} +1 -1
  84. package/dist/assets/{routePaths-8nWXl3lj.js → routePaths-DRiZXKg0.js} +1 -1
  85. package/dist/assets/{sentry-CooVhpit.js → sentry-BfJuQlQx.js} +1 -1
  86. package/dist/assets/{url-BC3SAbOG.js → url-C8S_Lh_c.js} +1 -1
  87. package/dist/assets/{url-D12sxYA1.js → url-CpMpWu4x.js} +1 -1
  88. package/dist/assets/useAskAiCfoHostNavButtonProps-JjOesvRK.js +1 -0
  89. package/dist/assets/{useDeviceId-Bxt0bF-y.js → useDeviceId-CjFCWE4s.js} +1 -1
  90. package/dist/assets/useFetchSuggestedQuestionsWhenReady-CabshbJ5.js +1 -0
  91. package/dist/assets/{useInitialThreadRequest-CY2eSsaO.js → useInitialThreadRequest-C42RI3oJ.js} +1 -1
  92. package/dist/assets/{utils-DYt83G2V.js → utils-B1VtuHQw.js} +1 -1
  93. package/dist/assets/{withTransactionSidePanel-Cjv0VgRu.js → withTransactionSidePanel-cMtqDSJ9.js} +2 -2
  94. package/dist/assets/{zeni-epic-state-DNuuo8ZV.js → zeni-epic-state-BEdHTWyp.js} +3 -3
  95. package/dist/index.html +1 -1
  96. package/package.json +3 -3
  97. package/dist/assets/AddressRoutes-D2FACoGE.js +0 -1
  98. package/dist/assets/AddressScreen-B9u0FHW6.js +0 -9
  99. package/dist/assets/AiCfoScreen-gPU5OBcl.js +0 -11
  100. package/dist/assets/CompanyPassportScreen-BWU7HRXU.js +0 -1
  101. package/dist/assets/ConnectionAuthScreen-CJ9xBQgB.js +0 -11
  102. package/dist/assets/CustomerOnboardingAuthScreen-BdwPH5Y6.js +0 -1
  103. package/dist/assets/DomesticWireDetailScreen-DpFSc8w7.js +0 -18
  104. package/dist/assets/DrawerScreen-6__pZ2Fq.js +0 -1
  105. package/dist/assets/ExpenseAutomationRoutes-1Vdih9y5.js +0 -20
  106. package/dist/assets/FeaturePreviewScreen-cXgFYw9z.js +0 -1
  107. package/dist/assets/MagicLinkRoutes-Bvbr6tYo.js +0 -72
  108. package/dist/assets/MagicLinkSignInScreen-TEu-0dU4.js +0 -12
  109. package/dist/assets/NotFoundScreen-JcC_UZ1m.js +0 -1
  110. package/dist/assets/NotificationRoutes-DeUR-Lca.js +0 -1
  111. package/dist/assets/PeopleRoutes-BnS2kaun.js +0 -22
  112. package/dist/assets/PerformanceRoutes-DxVX57kA.js +0 -1
  113. package/dist/assets/ReferralListScreen-DT8mXtsb.js +0 -5
  114. package/dist/assets/RewardsRoutes-BAZjS3ll.js +0 -1
  115. package/dist/assets/ScreenRoutes-DOVlELiO.js +0 -2
  116. package/dist/assets/SignOutScreen-CUo_ueK6.js +0 -9
  117. package/dist/assets/TaskListScreen-CI6OZlSQ.js +0 -9
  118. package/dist/assets/TaskRoutes-BijAG0Df.js +0 -9
  119. package/dist/assets/TransactionDetailRoutes-C2b32V9o.js +0 -1
  120. package/dist/assets/WiseConfirmationScreen-CcWFOdDC.js +0 -12
  121. package/dist/assets/ZeniAccountStatementScreen-pUj8-CXb.js +0 -9
  122. package/dist/assets/getLocaleForTenant-DHltWIlc.js +0 -1
  123. package/dist/assets/useAskAiCfoHostNavButtonProps-Cmlh3sFJ.js +0 -1
  124. package/dist/assets/useFetchSuggestedQuestionsWhenReady-D27Rjrx4.js +0 -1
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-NN8WQI8p.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CooVhpit.js"><link rel="modulepreload" crossorigin href="/assets/core-DGtRv-5L.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-DNuuo8ZV.js"><link rel="modulepreload" crossorigin href="/assets/mui-C-9qGevS.js"><link rel="modulepreload" crossorigin href="/assets/analytics-CALyM-hh.js"><link rel="modulepreload" crossorigin href="/assets/utils-DYt83G2V.js"><link rel="stylesheet" crossorigin href="/assets/index-D-vub4_t.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-CZc_s42n.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-BfJuQlQx.js"><link rel="modulepreload" crossorigin href="/assets/core-C1FHFtWE.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-BEdHTWyp.js"><link rel="modulepreload" crossorigin href="/assets/mui-CZhjlxyT.js"><link rel="modulepreload" crossorigin href="/assets/analytics-BKunqsaf.js"><link rel="modulepreload" crossorigin href="/assets/utils-B1VtuHQw.js"><link rel="stylesheet" crossorigin href="/assets/index-D-vub4_t.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/web-app-ui",
3
- "version": "5.0.18-qa",
3
+ "version": "5.0.19-qa",
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.2",
31
- "@zeniai/client-epic-state": "5.0.10",
32
- "@zeniai/web-components": "4.0.20",
31
+ "@zeniai/client-epic-state": "5.0.11",
32
+ "@zeniai/web-components": "4.0.21",
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-1thjzoaw.js";import{A as d}from"./AddressScreen-B9u0FHW6.js";import i from"./NotFoundScreen-JcC_UZ1m.js";import"./sentry-CooVhpit.js";import{n as s,o as r}from"./core-DGtRv-5L.js";import"./zeni-epic-state-DNuuo8ZV.js";import"./recharts-a2B9SbBf.js";import"./index-NN8WQI8p.js";import"./mui-C-9qGevS.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="4bd15e18-5b5f-4be1-8d33-8bd696c76da2",t._sentryDebugIdIdentifier="sentry-dbid-4bd15e18-5b5f-4be1-8d33-8bd696c76da2")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
@@ -1,9 +0,0 @@
1
- import{j as r}from"./liveblocks-1thjzoaw.js";import{a as h}from"./sentry-CooVhpit.js";import{j as P,h as _,u as j,l as E,g as B,k as M}from"./core-DGtRv-5L.js";import{K as $,h as D,z as K,C as L,B as R,w as z,d as C,g as m,y as F,k as b,n as N}from"./index-NN8WQI8p.js";import{IY as I,gH as U,eM as G,IZ as H,b$ as O,I_ as V,k1 as q}from"./zeni-epic-state-DNuuo8ZV.js";import{n as Y}from"./mui-C-9qGevS.js";import Z from"./NotFoundScreen-JcC_UZ1m.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]="791252d8-aea1-4abd-a379-9a3dc6659a95",e._sentryDebugIdIdentifier="sentry-dbid-791252d8-aea1-4abd-a379-9a3dc6659a95")}catch{}})();const J=Y.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,Q=M(function(e,t){const{addressId:o,isSubPage:i,addressType:c}=t,l=G(e),s=t.roleMap!=null&&H(t.roleMap),d=i||c==="user_address"||O(l?.userRole??[])||s?void 0:"readonly";if(o==null){const a=V(c,e);return{addressToEdit:a?.addressToCreate,loadingState:a?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:t.dontShowSaveConfirmation}}const n=I(e,o);return{addressToEdit:n.address,loadingState:n.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d}},function(e,t){const{navigate:o,location:i,addressType:c}=t,l=s=>{if(s==="express-pay")o("../express-pay/add-wire");else{const d=i.state,n=N(d?.pathnameStackToGoBack);let a=n.poppedPathname??k();const u=d?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(a=`${a}?${g}`)}o(a,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:s=>{const d=W(s);e(q({addressType:c,addressToCreate:d})),C?.trackSaveAddressClicked(m.Event.saveAddressClicked,{street:s.street.addressString,city:s.city,state:s.state,country:s.country.selectedOption??"",postalCode:s.postalCode,suite:s.suite,secondaryInfo:s.secondaryInfo}),l(t.bankAccountContext)},onCancel:()=>{l(t.bankAccountContext)}}})(F);function re({isSubPage:e,hideAddressSubTitle:t=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const s=P(),d=_(),n=j(),{addressId:a,addressType:u}=E(),g=$(),w=D(),v=K.getSignedInUser(),[p,x]=h.useState(a==null),f=B(S=>a!=null?I(S,a).fetchState:"Not-Started"),A=L();if(v==null)throw Error("Can't access address page without signing in...");const T=S=>S.trackPageLoaded(a!=null?m.Event.editAddress:m.Event.addAddress),y=l??u;return h.useEffect(()=>{p||a==null||(x(!0),d(U(a,!1)))},[p,a,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!p&&f==="Not-Started"||p&&f==="In-Progress"?r.jsx(R,{fetchState:f,style:{backgroundColor:w.colors.grey5}}):a!=null&&f==="Error"?(s(`${k(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(z,{analytics:C,onLoad:T}),r.jsx(J,{windowSize:g,children:r.jsx(Q,{location:n,navigate:s,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:t,addressId:a,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:A?.loggedInUserRoleMap})})]}):r.jsx(Z,{})}const k=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},W=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{re as A,W as t};
@@ -1,11 +0,0 @@
1
- import{j as h}from"./liveblocks-1thjzoaw.js";import{a as r}from"./sentry-CooVhpit.js";import{h as oe,j as ne,u as ie,g as G,l as re,k as le}from"./core-DGtRv-5L.js";import{I as ce,cB as ue,z as de,K as me,cC as pe,cD as fe,cE as he,cF as q,w as Se,d as x,N,cG as ge,cH as Ce,g as be,a1 as ke,cI as we,Q as Ie,r as Ee,n as V,cJ as Pe,cK as Te}from"./index-NN8WQI8p.js";import{fD as ye,f2 as H,eM as _e,hl as ve,Pu as xe,eL as Ue,hv as Qe,hr as Ae,ft as De,fn as Oe,fg as Fe,fk as $,fo as Be,fp as Le,fq as Me,fr as Re,fs as je}from"./zeni-epic-state-DNuuo8ZV.js";import{D as Ge,n as U,P as Ne,S as Ve}from"./mui-C-9qGevS.js";import{p as $e}from"./pathToGoBack-BxDzY9Wz.js";import"./recharts-a2B9SbBf.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new s.Error().stack;i&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[i]="da04cda6-042b-4563-8508-ab6de4635c6e",s._sentryDebugIdIdentifier="sentry-dbid-da04cda6-042b-4563-8508-ab6de4635c6e")}catch{}})();const W="chat-response-generated",qe=le(function(s,i){const a=H(s),m=i.isSubmitting;return{showSampleQuestions:i.sessionFromUrl==="explore"&&a.uiState.currentChatSessionId==null,aiCfoView:a,isSubmitting:m,isNewChatSession:i.sessionFromUrl==="new_chat"||i.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${Ie}/tableDownload`,emailLinkQuestion:i.emailLinkQuestion,autoSubmitEmailLinkQuestion:i.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:i.onEmailLinkQuestionProcessed,isFileUploadEnabled:i.isFileUploadEnabled,isUploadPromoVisible:i.isUploadPromoVisible,onUploadPromoClose:i.onUploadPromoClose}},function(s,i){const{location:a,currentTenant:m,userId:d,navigate:p,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:S,setIsAiCfoOpen:l}=i;return{onEventReceived:(e,o)=>{if(e===W&&typeof o.text=="string"&&typeof o.metadata=="object"){const n=o,c=Le(n.type),t=n.metadata.chat_session_id??null,{currentChatSession:I,currentQuestionAnswer:g,currentQuestionAnswerSummary:E}=q(S,t);c!=="answer"?x.trackAICFOChatResponseGenerated(c,g?.question.questionText??"",n.text,t,Te(E,I),n.metadata.message_id??null):x.trackAICFOChatAnswerGenerated(n.text,g?.question.questionText??"",(n.follow_up_questions?.length??0)>0,!!n.assumptions,!!n.insights,n.visualization!=null,Me(n.visualization?.type??"")??null,t,n.summarized_title,n.metadata.message_id??null),s(Re({chatSessionId:n.metadata.chat_session_id,responseType:c,fetchState:{fetchState:"Completed",error:void 0}})),s(je({chatSessionId:n.metadata.chat_session_id,answerPayload:n,userId:d}))}},onSubmit:(e,o,n,c)=>{e&&Pe(s,e,o,f,S,d,c,n)},updateCurrentInput:e=>{s($(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Be(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{p(-1)},onCloseClick:()=>{const e=V(a.state?.pathnameStackToGoBack),o=e.poppedPathname??$e(1);p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack}}),s($(""))},togglePageView:()=>{const e=V(a.state?.pathnameStackToGoBack),o=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),l(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{p(-1)},onNewChatClick:()=>{f!=null&&s(Fe());const e=Ee(a.state?.pathnameStackToGoBack,a.pathname);p(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,o)=>{s(Oe({questionAnswerId:e,isCollapsed:o}))},onMenuClick:i.onMenuClick}})(ke(we)),dt=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:i}=ce(),a=oe(),m=ne(),d=ie(),[p,f]=r.useState(!1);r.useEffect(()=>{a(ye())},[a]);const{customPageTitle:S}=ue(),l=G(u=>H(u)),e=de.getSignedInUser(),{session_id:o}=re(),n=me(),c=G(u=>_e(u)),t=l.uiState.currentChatSessionId,I=c.tenantEmailDomain,{handleUploadPromoClose:g,isUploadPromoVisible:E}=pe({isFileUploadEnabled:s,tenantEmailDomain:I}),Q=fe({currentTenant:c,currentChatSessionId:t,aiCfoView:l}),C=d.state,b=C?.aiCfoInitialQuestion,A=!!C?.aiCfoShouldSubmit,[z,P]=r.useState(null),[K,T]=r.useState(!1),D=r.useRef(!1);r.useEffect(()=>{D.current||b==null||b===""||(P(b),T(A),D.current=!0)},[b,A]);const J=r.useCallback(()=>{P(null),T(!1)},[]),O=r.useMemo(()=>new URLSearchParams(d.search),[d.search]),F=O.get("ref")??C?.aiCfoRef,y=O.get("emailRefId")??C?.aiCfoEmailRefId,B=r.useRef(!1);r.useEffect(()=>{B.current||F!=="month-end-email"||y==null||t!=null||e==null||(a(ve("controller",e.userId,y,"MONTH_END_EMAIL")),B.current=!0)},[F,y,t,a,e]);const k=l.uiState.lastContextMessage;r.useEffect(()=>{k!=null&&k!==""&&t!=null&&(P(k),T(!0),a(xe()))},[k,t,a]);const Y=c.masterTOSInfo,w=Y?.isMasterTOSAccepted??!1,{visitedSessions:L}=he(t),_=l.fetchState,v=l.uiState.chatSessionsNextPageToken.hasMore||!l.uiState.chatSessionsFirstPageFetched,M=t!=null?l.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",R=t==null||(l.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),j=l.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:Z}=q(j,t),X=Z.length===0;r.useEffect(()=>{w||m("../dashboard",{state:{...d.state,message:"open_ai_cfo_drawer"}})},[w]),r.useEffect(()=>{t!=null&&o!==t&&m(`../ai-cfo/${t}`,{state:{...d.state}})},[t,o]),r.useEffect(()=>{o!=null&&t==null&&o!=="new_chat"&&o!=="explore"&&a(Ue({sessionId:o,agentId:"controller"}))},[]);const ee=r.useMemo(()=>({events:L.map(u=>`private-chat-${u}.${W}`),eventCallback:(u,se,ae)=>ae.onEventReceived(u,se)}),[L]);if(r.useEffect(()=>{_!=="In-Progress"&&v&&a(Qe())},[_,v,a]),r.useEffect(()=>{t!=null&&M!=="In-Progress"&&R&&e!=null&&_==="Completed"&&!v&&a(Ae(t,e.userId))},[M,R,t,e,a]),e==null||o==null)throw Error("Can't access AI Controller page without signing in...");const te=t!=null&&l.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";return h.jsxs(We,{children:[h.jsx(Se,{analytics:x,onLoad:u=>u.trackPageLoaded(be.Event.aiCFOPage)}),N(n)&&Q.drawerElement,h.jsx(qe,{...ee,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:j,openOnboardingPage:()=>f(!0),userId:e.userId,setIsAiCfoOpen:i,navigate:m,sessionFromUrl:o,location:d,isSubmitting:te,isEmptyChatWithSession:X,customPageTitle:S,currentTenant:c,emailLinkQuestion:z??void 0,autoSubmitEmailLinkQuestion:K,onEmailLinkQuestionProcessed:J,onMenuClick:N(n)?Q.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:E,onUploadPromoClose:g}),h.jsx(Ge,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:ze,style:{width:`${ge}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:h.jsx(He,{onClick:u=>u.stopPropagation(),children:h.jsx(Ce,{isTOSAccepted:w,acceptMasterTOSState:l.masterTOSAcceptanceState,customPageTitle:S,onCloseClick:()=>f(!1),onCompleteClick:()=>{w||c.userRoleId==null||a(De(c.userRoleId)),f(!1)}})})})]})},He=U(Ve)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,We=U.div`
6
- height: 100vh;
7
- width: 100%;
8
- `,ze=U(Ne)`
9
- box-shadow: ${({theme:s})=>s.colors.elevation2};
10
- color: ${({theme:s})=>s.colors.grey4};
11
- `;export{dt as default};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-1thjzoaw.js";import{a as g}from"./sentry-CooVhpit.js";import{j as v,h as x,u as k,l as T,g as O,k as E}from"./core-DGtRv-5L.js";import{z as C,aZ as F,w as P,d as V,g as A,aa as b,a_ as L,ao as j,ap as B,r as U}from"./index-NN8WQI8p.js";import{eM as D,fB as M,rs as _,fw as R,b$ as z,Ls as G,bm as Y,pA as Z,po as $,jV as H,lp as S,Lt as q,bB as J,cr as N,lx as K,lA as Q}from"./zeni-epic-state-DNuuo8ZV.js";import"./mui-C-9qGevS.js";import{c as W}from"./routePaths-8nWXl3lj.js";import{M as X}from"./MobileAppDrawer-VgfdPmIc.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="0ba1b096-8fbb-48ad-83ad-3391f5a16ca1",t._sentryDebugIdIdentifier="sentry-dbid-0ba1b096-8fbb-48ad-83ad-3391f5a16ca1")}catch{}})();const ee=E(function(t){const n=R(t),i=C.getSignedInUser(),l=D(t),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(l?.userRole??[])&&n.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(t.companyConfigState),a=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:n.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:n,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:p,filesEndPoint:`${j.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}},function(t,n){const{companyId:i,currentTenant:l,navigate:c,location:p}=n,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{t(Q())},onAddressClick:e=>{const a=W(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,w={companyInfo:{...a,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.subIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:B(I))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};t(S({companyDetails:w}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{t(q(e))},onCompanyOfficerUpdated:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{t(H({files:e}))},onDeleteFile:e=>{t($(e))},onEditFileName:(e,a)=>{t(Z(e,a.split(".")[0]))}}})(L);function de(){const t=v(),n=x(),i=k(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),a=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>D(s)),d=r.companyId??C.getSignedInUserTenant(l)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||a!=="Not-Started"||d==null||(p(!0),n(M(d)))},[c,a,d,n]),g.useEffect(()=>{o==="Not-Started"&&n(_())},[o,n]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(A.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,11 +0,0 @@
1
- import{j as C}from"./liveblocks-1thjzoaw.js";import{a}from"./sentry-CooVhpit.js";import{h as D,u as v,g as u,N as w}from"./core-DGtRv-5L.js";import{Ib as A,eM as O,fi as _,mg as j,fI as E,fh as U,eN as L,Ij as F}from"./zeni-epic-state-DNuuo8ZV.js";import{u as $,z as f,L as g,D as k,o as H}from"./index-NN8WQI8p.js";import{n as z}from"./mui-C-9qGevS.js";import{t as R}from"./getLocaleForTenant-DHltWIlc.js";import{g as P,Q as G}from"./QBOConnectionScreen-O-1IJ7vW.js";import"./recharts-a2B9SbBf.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.js";import"./empty-B8GlEZnh.js";import"./pdf-lib-DmaaVbvY.js";import"./index-ktcuBvep.js";import"./url-D12sxYA1.js";import"./index-BzTrf-Pv.js";import"./decodeURIComponentSafe-D45efNq9.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]="d395ff41-1e4b-4a54-9b90-113605a2be16",t._sentryDebugIdIdentifier="sentry-dbid-d395ff41-1e4b-4a54-9b90-113605a2be16")}catch{}})();const M=z.div`
2
- display: flex;
3
- flex: 1 1 auto;
4
- flex-direction: row;
5
- justify-content: center;
6
- align-items: center;
7
- width: 100%;
8
- height: 100vh;
9
- background-color: ${t=>t.theme.colors.background};
10
- box-shadow: ${t=>`0px 2px ${H.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function pe(){const t=D(),i=v(),{setLoading:d,clearAllLoading:b}=$(),p=a.useRef(!1),c=a.useRef(!1),{code:x,realmId:N,state:T}=P(i.search),y=x!==""&&N!==""&&T!=="",I=u(l=>A(l)),e=u(l=>O(l)),n=u(l=>l.tenantState.fetchState),r=u(l=>l.tenantState.activeTenantFetchState.fetchState),o=f.getSignedInUser(),m=f.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,h=e?.externalConnections?.saveConnectionState,S=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{d(g.CONNECTION_AUTH)},[d]),a.useEffect(()=>{p.current||o==null||m==null||(p.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(g.TENANT_FETCHING),t(_(o.userId,m))))},[p,n,d]),a.useEffect(()=>{e.tenantId==null&&!c.current&&o!=null&&(c.current=!0,!(m==null||m!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(j(o.userId)))},[c,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||h!=="Error"||(d(g.CONNECTION_AUTH),t(E(o.userId,e.tenantId)))},[h]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(U(e.tenantId)),f.saveActiveTenantDomainForUser(e.tenantEmailDomain),L(o?.userId,o?.zeniSessionId,e.tenantId),k.updateAppLocaleID(R(F(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(E(o.userId,e.tenantId)))},[n,r,s]),a.useEffect(()=>{I.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&f.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)},[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect(()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||b()},[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:y||S===!1?C.jsx(M,{children:C.jsx(G,{})}):C.jsx(w,{to:"/",replace:!0})}export{pe as default};
@@ -1 +0,0 @@
1
- import{j as d}from"./liveblocks-1thjzoaw.js";import{z as n}from"./index-NN8WQI8p.js";import{g as p}from"./QBOConnectionScreen-O-1IJ7vW.js";import"./sentry-CooVhpit.js";import{u as a,N as i}from"./core-DGtRv-5L.js";import"./zeni-epic-state-DNuuo8ZV.js";import"./recharts-a2B9SbBf.js";import"./mui-C-9qGevS.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.js";import"./empty-B8GlEZnh.js";import"./pdf-lib-DmaaVbvY.js";import"./index-ktcuBvep.js";import"./url-D12sxYA1.js";import"./index-BzTrf-Pv.js";import"./decodeURIComponentSafe-D45efNq9.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd",t._sentryDebugIdIdentifier="sentry-dbid-b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd")}catch{}})();const U=()=>{const t=a(),{code:o,realmId:r,state:e}=p(t.search),s=n.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return d.jsx(i,{to:m})}return d.jsx(i,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-1thjzoaw.js";import{j as w,u as C,g as m,k as A,l as P}from"./core-DGtRv-5L.js";import{M9 as k,Mg as _,fz as J,fy as K,fx as L,ih as W,Jh as q,pr as Q,eM as V,LH as D,ie as T,Ma as S,Mj as F,ic as G,iB as j}from"./zeni-epic-state-DNuuo8ZV.js";import{bj as X,K as R,l as N,z as U,h as M,n as p,c as v,B as z,bk as Y,o as H,bl as ee,r as te}from"./index-NN8WQI8p.js";import{n as O}from"./mui-C-9qGevS.js";import"./sentry-CooVhpit.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]="7f1a5b7b-d139-4512-81b0-deb20b38bc72",e._sentryDebugIdIdentifier="sentry-dbid-7f1a5b7b-d139-4512-81b0-deb20b38bc72")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(L(n,"BillPayVendor"))},onResendOtp:n=>{e(K(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(J(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(X);function Z({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=m(c=>k(c,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=O.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),c=s.poppedPathname??E();n(c,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:c}=s;e(F({data:c}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),c=s.poppedPathname??E(0);t.navigate(c,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:c}=P(),d=e??s,{useFeatureGate:r}=N(),i=U.getSignedInUser(),b=m(u=>V(u)),g=M(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),h=m(u=>k(u,d)),{isFeatureEnabled:I}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&h.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:h.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(Z,{vendorId:d,billId:c}),l.jsx(oe,{location:a,navigate:n,billId:c,vendorId:d,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},he=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},me=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},B=(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 B(e,"ach",t,n)}function ve(e,t,n){return B(e,"domestic",t,n)}function ge(e,t,n){return B(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=O.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 ${H.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,ce=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:c}=t,{tenantEmailDomain:d}=c;return{onFetchBankName:r=>{e(j(r))},onSaveHandler:r=>{e(G(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:i}=r;e(F({data:i}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),i=r.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(d,r,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),i=r.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:c}=P(),d=e??s,r=U.getSignedInUser(),{useFeatureGate:i}=N(),b=M(),g=m(u=>V(u)),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),h=m(u=>k(u,d)),{isFeatureEnabled:I}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&h.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:h.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${H.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(Z,{vendorId:d,billId:c}),l.jsx(ce,{location:a,navigate:n,billId:c,vendorId:d,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,Z as V,he as a,se as b,ke as c,ve as d,me as g,ge as i,Se as v};
@@ -1 +0,0 @@
1
- import{j as d}from"./liveblocks-1thjzoaw.js";import{K as c,A as l,h as f}from"./index-NN8WQI8p.js";import{D as p}from"./mui-C-9qGevS.js";import"./sentry-CooVhpit.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]="2fa64745-7920-402f-ba89-c26a2e8cc932",e._sentryDebugIdIdentifier="sentry-dbid-2fa64745-7920-402f-ba89-c26a2e8cc932")}catch{}})();const u={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=c(),s=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),i=f();return d.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:a})}export{h as D};
@@ -1,20 +0,0 @@
1
- import{j as u}from"./liveblocks-1thjzoaw.js";import hn from"./NotFoundScreen-JcC_UZ1m.js";import{a as l}from"./sentry-CooVhpit.js";import{n as Te,D as It,S as $e}from"./mui-C-9qGevS.js";import{h as pe,j as ft,u as Ve,g as V,l as at,k as pn,n as gn,o as Fe}from"./core-DGtRv-5L.js";import{eM as Ge,OH as Cn,e$ as he,fd as Sn,q2 as In,OI as Me,mH as kt,mN as Et,OJ as yt,na as fn,OK as vt,mA as kn,pA as En,OL as yn,jx as vn,OM as bn,Fw as An,eX as je,pf as Le,Kp as ot,Kr as Tn,jo as wn,Ks as Pn,jv as xn,cT as Rn,t4 as ze,Jg as Dn,jw as Un,eZ as Fn,mO as bt,nf as Ae,oa as At,oJ as On,e_ as Tt,ne as st,mF as ae,nh as wt,nj as Bn,bB as _n,kU as Vn,kR as Mn,ni as ve,ng as ue,ON as jn,nz as ct,Bc as Pt,OO as xt,s1 as Rt,oF as Ln,jl as zn,OP as $n,Ji as it,Jh as ye,OQ as lt,jM as Gn,OR as qn,OS as Jn,OT as Yn,OU as Kn,mX as Nn,OV as Zn,OW as Hn,OX as Qn,np as Xn,jz as Wn,jq as ea,OY as ta,jy as rt,Kz as na,OZ as aa,O_ as oa,pb as sa,oS as ca,oR as Oe,O$ as ia,P0 as la,l3 as ra,bp as da,k_ as dt,kM as ua,P1 as ma,gx as ut,fK as ha,kX as pa,uZ as ga,P2 as Ca,nQ as Sa,nL as Ia,nP as fa,nA as ka,P3 as Ea,n3 as ya,mU as va,fe as mt,nk as ba,P4 as Aa,P5 as Ta,P6 as wa,P7 as Pa,P8 as xa,P9 as ht,pn as Ra,oA as Da,oj as pt,os as Ua,of as Fa,oG as Oa,ok as Ba,Pa as _a,Pb as Va,nZ as Ma,Pc as ja,nX as La,nY as za,nV as $a,ou as Ga}from"./zeni-epic-state-DNuuo8ZV.js";import{I as Dt,l as Ut,c as me,d as j,r as H,M as Ft,cq as qa,h as Ot,z as we,cr as Ja,ao as be,cs as Ya,B as Bt,ct as Ka,cu as Na,al as Be,v as Za,C as Ha,aI as Qa,cv as Xa,aZ as Wa,A as eo,D as to,cw as no,Q as ao,cx as oo}from"./index-NN8WQI8p.js";import{u as _t}from"./useAskAiCfoHostNavButtonProps-Cmlh3sFJ.js";import{c as Vt}from"./useFetchSuggestedQuestionsWhenReady-D27Rjrx4.js";import{c as gt,C as so}from"./TransactionDetailScreen-CbnXMf-w.js";import{w as co}from"./withTransactionSidePanel-Cjv0VgRu.js";import{h as io,v as lo}from"./routePaths-8nWXl3lj.js";import{g as _e}from"./accountMappingHelper-DxgbU7sx.js";import{D as ro}from"./DrawerScreen-6__pZ2Fq.js";import"./recharts-a2B9SbBf.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.js";import"./decodeURIComponentSafe-D45efNq9.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},c=new t.Error().stack;c&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[c]="a057525c-079b-4993-9e71-2d5c309aa8bf",t._sentryDebugIdIdentifier="sentry-dbid-a057525c-079b-4993-9e71-2d5c309aa8bf")}catch{}})();const uo=()=>{const{isAiCfoOpen:t,setIsAiCfoOpen:c}=Dt(),P=pe(),T=ft(),v=Ve(),r=V(p=>Ge(p)),{useFeatureGate:m}=Ut(),{isFeatureEnabled:x}=m(me.isRealtimeInsightsFeatureEnabled),g=V(p=>p.expenseAutomationViewState.selectedPeriodByTenantId),a=V(p=>Cn(p,r.tenantId)),{isAiCfoAccessEnabled:M,onAskAiCfoClick:b}=_t({isAiCfoOpen:t,setIsAiCfoOpen:c,mobileExploreReferrer:"Month-End Close Overview"}),I=l.useCallback((p,E,U=!1)=>{P(he({tenantId:E,period:{month:p.month,year:p.year},refreshViewInBackground:U}))},[]),$=l.useCallback(p=>{const E=v.state?.referrer;a.monthEndCloseChecks?.auditSummary!=null&&j.trackMonthCloseAuditPage(p.month,p.year,a.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",a.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,E??null),P(Sn(r.tenantId,p))},[r.tenantId,a.monthEndCloseChecks?.auditSummary,a.monthEndCloseChecks?.reportEmailSentDate]),S=g[r.tenantId],k=l.useCallback(()=>{const p=v.state?.referrer;a.monthEndCloseChecks?.auditSummary!=null&&j.trackMonthCloseAuditPage(S.month,S.year,a.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",a.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,p??null),I(S,r.tenantId,!0)},[I,S,r.tenantId,a.monthEndCloseChecks?.auditSummary,a.monthEndCloseChecks?.reportEmailSentDate]),L=H(v.state?.pathnameStackToGoBack,v.pathname),K=l.useCallback(()=>{if(a.monthEndCloseChecks!=null&&S!=null){const p=a.monthEndCloseChecks.monthEndCloseCheckList.find(E=>E.progress<100);if(p!=null)return void T(`./${p.id}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:L,message:"comingFromOverview"}});T(`./month_end_insights/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:L,message:"comingFromOverview"}})}},[a.monthEndCloseChecks,S]),{areTenantIdsInSync:d}=Ft();return Vt({isDataReady:a.fetchState==="Completed"}),l.useEffect(()=>{S!=null&&a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&d&&I(S,r.tenantId)},[I,S,a.fetchState,r.tenantId,d]),l.useEffect(()=>{S!=null&&a.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&a.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&d&&P(In(S))},[S,a.monthClosePerformanceTrendFetchStatus.fetchState,d]),l.useEffect(()=>{const p=setInterval(()=>{a.fetchState!=="In-Progress"&&a.fetchState==="Completed"&&k()},3e5);return()=>clearInterval(p)},[a.fetchState]),l.useEffect(()=>{if(a.fetchState==="Completed"&&a.monthEndCloseChecks?.auditSummary!=null){const p=v.state?.referrer;j.trackMonthCloseAuditPage(a.selectedPeriod.month,a.selectedPeriod.year,a.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",a.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}},[a.fetchState,a.selectedPeriod,a.monthEndCloseChecks?.auditSummary,a.monthEndCloseChecks?.reportEmailSentDate]),u.jsx(mo,{children:u.jsx(qa,{monthEndCloseChecksView:a,isRealtimeInsightsFeatureEnabled:x,onMonthEndCheckClick:p=>{T(`./${p}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:L,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:$,handleReviewButtonClick:K,onBackClick:()=>{T("../../dashboard")},onReload:k,isAiCfoAccessEnabled:M,onAskAiCfoClick:b})})},mo=Te.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- background-color: ${t=>t.theme.colors.grey4};
8
- `,ho="512px",po=({reconciliation:t,selectedDrawerAccountId:c,onFetchLinkTokenClick:P,onEstablishConnectionClick:T})=>{const v=Ot(),r=pe(),m=we.getSignedInUser(),x=V(s=>Ge(s)),g=t.excludedAccountIDs,a={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:x.tenantId??""},{accountReconciliationsByAccountID:M,monthYearPeriod:b,statementUploadChosen:I}=t,$=c!=null?M[c]:void 0,S=$?.accountReconEntity.statementMetaData?.statementUploadId,k=l.useCallback(()=>{c!=null&&r(Me({selectedDrawerAccountId:void 0}))},[r,c]),L=(s,C)=>{r(En(s,C.split(".")[0]))},K=s=>{S!=null&&r(kn({accountId:c??"",selectedPeriod:b,fileId:s,statementUploadId:S}))},d=()=>{r(yt({statementUploadChosen:!1}))},p=s=>{c!=null&&r(fn({accountId:c,selectedPeriod:b,payload:s}))},E=s=>{c!=null&&r(vt({accountId:c,selectedPeriod:b,localData:{accountSource:s}}))},U=l.useCallback(()=>{c!=null&&r(kt({accountId:c}))},[r,c]),e=l.useCallback(()=>{c!=null&&r(Et({accountId:c}))},[r,c]),n=g.includes(c??"")?t.excludedAccountReconciliationByAccountID[c??""]:void 0,o=$!=null?u.jsx(Ja,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:$,monthYearPeriod:b,onDismissClick:k,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:P,onEstablishConnectionClick:T,onEditFileName:L,onDeleteFile:K,onSelectSourceType:E,filesEndPoint:`${be.fileMicroServiceBaseUrl}`,authParams:a,openFilePicker:I,onStatementUploadSuccess:p,onUploadWindowOpenedOnce:d,onExcludeFromReconciliation:U}):n!=null?u.jsx(Ya,{excludedAccountReconciliation:n,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:e}):null;return o==null?null:u.jsx(It,{anchor:"right",open:c!=null,PaperProps:{style:{width:ho,color:v.colors.grey4}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>k(),children:u.jsx(go,{onClick:s=>s.stopPropagation(),children:o})})},go=Te($e)`
9
- display: flex;
10
- min-height: 100%;
11
- flex-direction: column;
12
- `;function Co({companyId:t,closeCustomerRequestDrawer:c,addCustomerRequest:P,resetCustomerRequest:T}){const v=we.getSignedInUser();if(v==null)throw Error("Can't access Customer Request page without signing in...");const r=V(m=>yn(m,t,v));return l.useEffect(()=>{T()},[]),u.jsx(u.Fragment,{children:r.fetchState==="In-Progress"||r.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?u.jsx(Bt,{fetchState:"In-Progress"}):u.jsx(Ka,{onCloseClick:c,addCustomerRequest:P,snippets:r.companyMonthEndReportTemplatesData,bulletPoints:r.zeniRequestsData??[]})})}const So=t=>u.jsx(Na,{...t}),Io="512px",fo=({selectedTransactionId:t,onClose:c})=>{const P=Ot(),T=pe(),v=V(g=>t==null?void 0:vn(g.transactionState,t)),r=v?.qboId,m=V(g=>r==null?void 0:bn(g,r));l.useEffect(()=>{r!=null&&T(An(r))},[T,t,r]);const x=l.useCallback(()=>{c()},[c]);return t==null||m==null?null:u.jsx(It,{anchor:"right",open:t!=null,PaperProps:{style:{width:Io,color:P.colors.grey4}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:x,children:u.jsx(ko,{onClick:g=>g.stopPropagation(),children:u.jsx(So,{transactionActivityLogSelectorView:m,onClose:x})})})},ko=Te($e)`
13
- display: flex;
14
- min-height: 100%;
15
- flex-direction: column;
16
- `,Eo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:yo,comma:Ct,space:vo}},dateFormat:Mt}=to.getLocalizedStrings(),St=Ga,bo=pn(function(t,c){const{uncategorizedAccounts:P,vendorSearchAutoCompleteData:T,monthEndInsightsCustomerRequestData:v,monthEndInsightsPreviewMode:r,companyId:m,isMissingReceiptsBulkUploadEnabled:x,isTransactionActivityEnabled:g}=c,a=we.getSignedInUser(),M=t.tenantState.currentTenantId,b={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:M??""},I=je(t),{selectedTransactionCategorizationTab:$}=I;return{expenseAutomationViewSelector:I,bulkUploadSelector:I.missingReceipts.bulkUpload,vendorSearchAutoCompleteData:T,authParams:b,receiptUploadEndpoint:`${be.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${ao}/transaction_attachments`,bulkUploadEndpoint:x===!0?`${be.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:$,monthEndInsightsCustomerRequestData:v,monthEndInsightsPreviewMode:r,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:a,uncategorizedAccounts:P,companyId:m,isTransactionActivityEnabled:g,isAccountingClassesEnabled:zn(t)}},function(t,c){const{themeState:P,isCOTEnabled:T,isUncategorizedExpenseCategoryEnabled:v,isMissingReceiptsBulkUploadEnabled:r,location:m,vendorSearchAutoCompleteData:x,expenseAutomationViewSelector:g,currentTenant:a,uncategorizedAccounts:M,navigate:b,onClickCustomerRequest:I,handleEditClick:$,setActivityLogTransactionId:S}=c,{selectedPeriod:k,currentSelectedView:L,reconciliation:{selectedAccountId:K}}=g,{accountSettingsView:d}=g.jeSchedules,p=bt(k),E=Ae(p.start),U=Ae(p.end);return{onZeniLogoClick:()=>{P.toggle()},onUploadReceiptAttachment:e=>{j.trackMissingReceiptAttached(k.month,k.year),t(Da(e))},onUploadTransactionReceipt:(e,n,o,s,C,h)=>{t(ht(e,n,{fetchState:"In-Progress"}));const f=()=>t(ht(e,n,{fetchState:"Error"}));oo(`${be.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,h,n,o,s,C).then(A=>{A!=null?t(Ra(e,A)):f()}).catch(f)},onMissingReceiptsRowClick:(e,n)=>{if(c.openTransactionPanel)return void c.openTransactionPanel(e,n);const o=H(m.state?.pathnameStackToGoBack,m.pathname);b(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:o,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(xa(e,n)),a!=null&&t(he({tenantId:a.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,o,s)=>{t(Pa(e,{fetchState:n,error:o})),o!=null&&t(ut({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:s!=null?vo+yo+s+Ct:Ct}]}))},onUpdateJESchedulesUIState:e=>{t(wa(e))},onUpdateMissingReceiptsUIState:e=>{t(Ta(e))},onFetchMissingReceiptsList:()=>{U!=null&&E!=null&&t(wt({start:E,end:U},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t($a(e))},onBulkUploadProgress:e=>{t(za(e))},onBulkUploadSuccess:e=>{t(La({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(ja(e))},onConfirmBulkUploadMatch:(e,n,o,s,C)=>{t(Ma(e,n,o,s,C))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Va())},onSetBulkUploadResultsTab:e=>{t(_a(e))},onSetBulkUploadCompletedSubTab:e=>{t(Ba(e))},onSetBulkUploadSortConfig:(e,n)=>{t(pt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Oa())},onSearchTransactionsForManualMatch:(e,n)=>{t(St(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=g.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(St(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Fa(e,n))},onFetchBulkUploadBatches:e=>{t(At(e))},onFetchMoreBatchDetails:()=>{t(Ua())},onResetBulkUploadSort:()=>{t(pt({sortKey:"date",sortOrder:"descending"}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(Aa())},onSearchTextChanged:e=>{const n=g.currentSelectedView,o=g.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Oe({selectedTab:o,uiState:{searchString:e}})),U!=null&&E!=null&&t(ue(o,{start:E,end:U},!0,!1,e,void 0,!0)))},onRefresh:()=>{c.trackExpenseAutomationTabAnalytics(!0),t(ba(v))},onClose:()=>{L==="reconciliation"&&K!=null&&t(mt({selectedAccountId:void 0})),b("../")},onBack:()=>{L==="reconciliation"&&K!=null&&t(mt({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(va(e))},onSaveReconciliationReview:e=>{t(ya(e))},onUpdateStep:e=>{const{selectedPeriod:n}=g,o=H(m.state?.pathnameStackToGoBack,m.pathname);b(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:o,referrer:g.currentSelectedView}}),t(Tt(e))},handleLogOutClick:()=>{const e=H(m.state?.pathnameStackToGoBack,m.pathname);b("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:o,fixedAssetsAccount:s,accruedExpensesAccount:C}=n,h=_e(d.prepaidExpensesAccountList,o.selectedOptions),f=_e(d.fixedAssetsAccountList,s.selectedOptions),A=_e(d.accruedExpensesAccountList,C.selectedOptions),z={selectedPrepaidExpensesAccountIds:h.map(F=>F.accountId),selectedFixedAssetsAccountIds:f.map(F=>F.accountId),selectedAccruedExpensesAccountIds:A.map(F=>F.accountId)};t(Ea({data:z}))},onSaveJeAccountSettingsClick:()=>{t(ka())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:o,accumulatedDepreciationCategory:s,scheduleClass:C,scheduleExpenseCategory:h,vendor:f}=n,{allAccountList:A,allClassList:z,allDepreciationAccountList:F}=g.jeSchedules,N=x.entityAutoCompleteView.vendor.length>0?x.entityAutoCompleteView.vendor.find(G=>G.id===f?.selectedOption):void 0,oe={id:N?.zeniId??f?.selectedOption??"",name:N?.name??f?.defaultOptions.find(G=>G.value===f?.selectedOption)?.label??"",logo:N?.logo},ge=h?.selectedOption!=null?A.find(G=>G.qboId===h.selectedOption):void 0,Pe=C?.selectedOption!=null?z.find(G=>G.classId===C.selectedOption):void 0,te=s?.selectedOption!=null?F.find(G=>G.qboId===s.selectedOption):void 0;t(fa({scheduledJournalEntryID:e,localData:{jeScheduleID:o,scheduledJournalEntryID:e,updatedCategoryId:ge?.accountId,updatedClassId:Pe?.classId,updatedAccumulatedDepreciationCategoryID:te?.accountId,updatedVendor:{id:oe.id,name:oe.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Ia(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(it({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(ye("common"))},onCancelAutoComplete:()=>{t(ye("common"))}},onPostJESchedule(e,n){t(Sa({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Ca())},handleJeScheduleClick:(e,n,o)=>{t(ga({selectedJEScheduleKey:n}));const s=H(m.state?.pathnameStackToGoBack,m.pathname);b(`../../vendors/schedules/${o}/details/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{a!=null&&t(pa(e,a.companyId,a.tenantId))},onClickCustomerRequest:I,setActivityLogTransactionId:S,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(ha())},onOpenFileAttachmentSnackBar:()=>{t(ut({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(ma(e))},onUpdateFileAttachment:e=>{t(ua({files:e}))},previewMonthEndReport:(e,n,o,s)=>{a!=null&&t(dt(e,a.companyId,n,!0,o,s,a.tenantId))},saveMonthEndReport:(e,n,o,s)=>{a!=null&&t(dt(e,a.companyId,n,!1,o,s,a.tenantId))},onEditMonthEndInsightsClick:$,sendMonthEndReport:e=>{const n=m.state?.referrer,{selectedPeriod:o,auditSummary:s}=g;a!=null&&s?.auditScorePercentage!=null&&(t(ra(a.companyId,e,a.tenantId)),j.trackInsightsEmailPage(o.month,o.year,!1,"draft",s.auditScorePercentage,da().format(Mt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(c.openTransactionPanel)return void c.openTransactionPanel(e,n);const o=H(m.state?.pathnameStackToGoBack,m.pathname);b(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:o,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,o,s,C,h,f,A,z,F,N)=>{t(la(e,n,o,s,M,C,h,f,A,z,F,N))},onCancelAutoComplete:()=>{t(ye("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(lt({scrollPosition:e}))},onUpdateTab:e=>{c.closeSidePanel?.(),U!=null&&E!=null&&(t(ue(e,{start:E,end:U},!1,!1)),t(ia(e)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Oe({selectedTab:e,uiState:n})),U!=null&&E!=null&&t(ue(e,{start:E,end:U},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Oe({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,o,s,C,h,f)=>{U!=null&&E!=null&&t(ue(e,{start:E,end:U},!0,o,n,s,C,h,f))},resetTransactionCategorizationLocalData:(e,n,o,s,C,h,f,A)=>{t(ca(e,n,o,s,A??null,C,h,!1,f))},updateSelectedVendorForTransaction:(e,n,o,s,C)=>{t(rt({selectedTab:e,transactionId:n,lineId:o,selectedTransaction:s,uncategorizedAccounts:M,updatedVendor:C}))},onSaveUpdateTransactionCategorization:(e,n,o)=>{const s=m.state?.referrer;e==="autoCategorized"?j.trackTransactionsAutoCategorisedPage(k.month,k.year,g.transactionView.totalCountByTab.autoCategorized,n.length,!1,s??null):j.trackTransactionsReviewPage(k.month,k.year,g.transactionView.totalCountByTab.review,n.length,!1,s??null),t(sa(e,n,o,v))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(oa({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,o,s,C,h,f)=>{const{transactionId:A,transaction:z,lineIds:F}=n;h!=null&&t(na({transactionId:A,customerUpdates:h})),t(aa({selectedTab:s,transactionId:A.id,lineId:F[0],selectedTransaction:z,uncategorizedAccounts:M,updatedCustomer:h,selectedEntity:C,isUncategorizedExpenseCategoryEnabled:f})),C!=null&&t(ze(C,e,n,o,!0,T,f))},onFetchRecommendationsForEntityCategorization:(e,n,o,s,C,h,f)=>{const{transactionId:A,transaction:z,lineIds:F}=n;h!=null&&(t(Wn({transactionId:A,vendorUpdates:{name:h.name,id:h.id?h.id:void 0}})),t(ea({vendorId:h.id?h.id:void 0,localData:{vendorName:h.name,vendorId:h.id?h.id:void 0}}))),h?.id?(t(rt({selectedTab:s,transactionId:A.id,lineId:F[0],selectedTransaction:z,uncategorizedAccounts:M,updatedVendor:h,selectedEntity:C,isUncategorizedExpenseCategoryEnabled:f})),C!=null&&t(ze(C,e,n,o,!0,T,f))):t(ta({selectedTab:s,transactionId:A.id,lineId:F[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(ve(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(ve(k,!0,!1,null,!1,!1))},markAsReview:(e,n,o,s)=>{j.trackFluxAnalysisReviewed(o.month,o.year,s??!1,e),t(Xn(n,e,o,s??!1))},onUpdateFluxAnalysisUIState:e=>{t(Qn(e))},updateOperatingExpensesIdsForReview:e=>{t(Hn({operatingExpenseIds:e,selectedPeriod:k}))},redirectToVendorDetailPage:e=>{if(c.tenantEmailDomain!=null){const n=lo(e.id,e.qboId,c.tenantEmailDomain),o=H(c.location.state?.pathnameStackToGoBack,c.location.pathname);c.navigate(n,{state:{pathnameStackToGoBack:o,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Zn({sectionId:e,selectedPeriod:k}))},onFetchReimbursementView:(e,n,o)=>{t(ve(e,!0,!1,n,!0,o))},onReviewClicked:e=>{t(ae(k,e))},setOpenDrawerClicked:e=>{t(Me({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Rt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const o=a?.companyId;o!=null&&(t(Pt(e,o,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(xt({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(Me({selectedDrawerAccountId:e})),t(vt({accountId:e,selectedPeriod:k,localData:{accountSource:"bank_statement"}})),t(yt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ae(k,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Nn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Kn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Yn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{c.closeSidePanel?.(),t(Jn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,o)=>{const s=e.vendor?.id;o&&s!=null&&t(Gn(s)),t(qn({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(c.openTransactionPanel)return void c.openTransactionPanel(e,Le("bill"));const n=H(m.state?.pathnameStackToGoBack,m.pathname);b(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{b(-1)},onReconListPageScroll:e=>{t(lt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(it({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(ye("common"))},onReconNodeCollapseToggled:(e,n)=>{t($n({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(kt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Et({accountId:e}))}}},(t,c,P)=>{const{isMissingReceiptsBulkUploadEnabled:T,...v}=P;return function(r,m,x){return{...r,...m,...x,onUploadTransactionReceipt:(g,a,M,b,I)=>{m.onUploadTransactionReceipt(g,a,M,b,I,r.authParams)}}}(t,c,v)})(no),Ao=co(({closeSidePanel:t,openTransactionPanel:c,panelContent:P,sidePanelIsFullView:T,sidePanelIsOpen:v})=>{const{isAiCfoOpen:r,setIsAiCfoOpen:m}=Dt(),x=ft(),g=Ve(),a=pe(),{isAiCfoAccessEnabled:M,onAskAiCfoClick:b}=_t({isAiCfoOpen:r,setIsAiCfoOpen:m,mobileExploreReferrer:"Transaction categorization"}),{areTenantIdsInSync:I}=Ft(),$=(()=>{const i=V(q=>je(q)),y=Ve(),{currentSelectedViewFetchState:D,currentSelectedView:B,selectedPeriod:R}=i,de=Be(B),W=Be(D.fetchState),fe=l.useCallback(q=>{const Z=y.state?.referrer;B==="transaction_categorization"&&(i.selectedTransactionCategorizationTab==="review"?j.trackTransactionsReviewPage(R.month,R.year,i.transactionView.totalCountByTab.review,0,q,Z??null):j.trackTransactionsAutoCategorisedPage(R.month,R.year,i.transactionView.totalCountByTab.autoCategorized,0,q,Z??null)),B==="missing_receipts"&&j.trackMissingReceiptsPage(R.month,R.year,q,i.missingReceipts.transactions.length,Z??null),B==="je_schedules"&&j.trackMonthCloseScheduleListPage(R.month,R.year,q,i.jeSchedules.draftSchedules.length,i.jeSchedules.resolveSchedules.length,Z??null),B==="flux_analysis"&&j.trackFluxAnalysisPage(R.month,R.year,q,Eo(i.fluxAnalysis),Z??null),B==="month_end_insights"&&i.auditSummary?.auditScorePercentage!=null&&j.trackInsightsEmailPage(R.month,R.year,q,"draft",i.auditSummary.auditScorePercentage,null,Z??null)},[R,i]);return l.useEffect(()=>{W===D.fetchState&&B===de||D.fetchState!=="Completed"||fe(!1)},[B,D.fetchState,de]),fe})(),S=Za(),[k,L]=l.useState(!1),K=V(i=>ot(i)),d=V(i=>Ge(i)),[p,E]=l.useState(!1),[U,e]=l.useState(!1),[n,o]=l.useState([]),[s,C]=l.useState(void 0),[h,f]=l.useState(!1),A=l.useRef(!1),{selectedTab:z}=at(),{tenantEmailDomain:F}=at(),[N,oe]=l.useState(g.state?.message==="comingFromTransactionDetail"),ge=g.state?.message==="comingFromOverview",Pe=Ha(),te=we.getSignedInUser(),{useDynamicConfig:G,useFeatureGate:Ce}=Ut(),{configValue:jt}=G(Qa.enableUncategorizedExpenseCategory),Q=jt?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:qe}=Ce(me.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:se}=Ce(me.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Je}=Ce(me.isTransactionActivityEnabled),{isFeatureEnabled:Lt}=Ce(me.isExpenseAutomationCommentingEnabled),zt=l.useCallback(i=>{const y=Le(i.view==="reconciliation"?"bill":"expense");c?.(i.entityId,y)},[c]),$t=V(i=>Dn(i,"common")),_=V(i=>je(i)),{monthEndCloseChecksView:Y,currentSelectedView:O,selectedPeriod:w,selectedTransactionCategorizationTab:Ye,currentSelectedViewBackgroundRefreshFetchState:Gt,currentSelectedViewFetchState:X,jeSchedules:xe,reconciliation:qt}=_,{selectedAccountId:ce}=qt,Ke=Be(xe.accountSettingsView.saveState.fetchState),Jt=V(i=>Un(i.accountState,i.accountListState,"accountList")),ie=z!=null?Fn(z):O,Yt=V(i=>i.entityAutoCompleteState.autoCompleteText.common);if(Vt({isDataReady:X.fetchState==="Completed"}),te==null)throw Error("Can't access expense automation screen without signing in...");const Ne=bt(w),le=Ae(Ne.start),re=Ae(Ne.end);if(le==null||re==null)throw Error(`Invalid start - ${le} and end - ${re} period from given ${w}`);const Kt=l.useCallback(()=>{E(!1)},[]),Nt=l.useCallback(()=>{e(!0)},[]),Zt=l.useCallback(i=>{o(i),e(!1)},[]),Ht=l.useCallback(()=>{o([])},[]),Re=`private-${te.userId}`,Ze="missing-receipts-batch-completed",Se=Xa();l.useEffect(()=>{if(Se==null||O!=="missing_receipts"||se===!1)return;const i=Se.channel(Re)??Se.subscribe(Re),y=D=>{a(Ln({batchId:D.batch_id,progress:D.progress,status:D.status.toLowerCase()}))};return i.bind(Ze,y),()=>{i.unbind(Ze,y)}},[Se,O,Re,a,se]);const Ie=_.missingReceipts.bulkUpload.phase,He=_.missingReceipts.bulkUpload.currentBatchId;l.useEffect(()=>{O==="missing_receipts"&&Ie==="matching"&&He!=null&&a(At({cacheOverride:!0}))},[O,Ie,He,a]);const Qe=te?.userId,Qt=w.month,Xt=w.year,Xe=d?.tenantId;l.useEffect(()=>{O==="missing_receipts"&&se!==!1&&Ie==="idle"&&Qe!=null&&Xe!=null&&a(On())},[O,se,Ie,Qe,Xe,Qt,Xt,a]),l.useEffect(()=>{K.newVendorState?.vendorDetailLocalData?.vendorName!=null?L(!0):L(!1)},[K.newVendorState?.vendorDetailLocalData?.vendorName]),l.useEffect(()=>{ie!=null&&O!==ie&&a(Tt(ie))},[ie]),l.useEffect(()=>{h!==!1||X.fetchState!=="Completed"&&X.fetchState!=="Error"||!I||(f(!0),a(st(!1,!1,Q)))},[h,X,I,Q]),l.useEffect(()=>{!ge&&I&&(a(st(!1,!1,Q)),a(ae(w,ce,!1,!1)))},[w.month,w.year,I,Q]);const We=l.useCallback((i=!1,y=!1)=>{const D={start:le,end:re};switch(O){case"transaction_categorization":a(ue(Ye,D,i,!N,void 0,void 0,y,void 0,Q)),oe(!1);break;case"flux_analysis":a(ve(w,i,y,null));break;case"month_end_insights":if(y===!1){const B=new Date(w.year,w.month,0),R=_n(B.toDateString()).format(Mt.analytics.YYYYDashMMDashDDFormat);a(Vn(!0,d.companyId,d.tenantId,R)),a(Mn(d.companyId,d.tenantId))}break;case"je_schedules":a(Bn(D,y));break;case"missing_receipts":a(wt(D,{amount:75,currencyCode:"USD",currencySymbol:"$"},i,y));break;default:a(ae(w,ce,i,y))}},[O,le,re,d.companyId,d.tenantId,Ye,w,ce,N,oe,Q]);l.useEffect(()=>{O===ie&&X.fetchState==="Not-Started"&&I&&We(!0)},[X,le,re,d.companyId,d.tenantId,I]),l.useEffect(()=>{ge||N||A.current||Gt.fetchState==="In-Progress"||X.fetchState!=="Completed"||(A.current=!0,We(!0,!0))},[]),l.useEffect(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState!=="Completed"&&a(he({tenantId:d.tenantId,period:w,refreshViewInBackground:!1}))},[Y.fetchState,d.tenantId]),l.useEffect(()=>{_.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?E(!0):E(!1)},[_.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),l.useEffect(()=>{_.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&I&&(a(he({tenantId:d.tenantId,period:w,refreshViewInBackground:!0})),a(jn({companyId:d.companyId})),x("../"))},[_.monthEndInsights?.sendMonthEndReportStatus?.fetchState,d.tenantId,w,d.companyId,I]),l.useEffect(()=>{const i=setInterval(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState==="Completed"&&a(he({tenantId:d.tenantId,period:w,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(i)},[Y.fetchState,d.tenantId,w,a]),l.useEffect(()=>{const i=setInterval(()=>{O==="reconciliation"&&ce==null&&_.reconciliation.fetchStatus.fetchState==="Completed"&&_.reconciliation.refreshStatus.fetchState!=="In-Progress"&&a(ae(w,void 0,!0,!0))},3e5);return()=>clearInterval(i)},[O,a,_.reconciliation.fetchStatus.fetchState,_.reconciliation.refreshStatus.fetchState,ae,ce,w]);const Wt=gt();l.useEffect(()=>{const i=(Y.monthEndCloseChecks?.monthEndCloseCheckList.find(y=>y.id==="month_end_insights")?.isDisabled??!1)&&!qe;O!=="month_end_insights"||!i&&Y.monthEndCloseChecks?.reportEmailSentDate==null||x("../")},[O,Y.monthEndCloseChecks]);const en=_.reconciliation.selectedDrawerAccountId;l.useEffect(()=>{Ke==="In-Progress"&&xe.accountSettingsView.saveState.fetchState==="Completed"&&a(ct())},[Ke,xe.accountSettingsView.saveState.fetchState,ct]);const{transactionId:et,onSaveVendor:tn,onSaveSuccess:nn,onCancel:an,vendorViewDetails:on}=(({expenseAutomationViewSelector:i,closeDrawerHandler:y,currentSelectedView:D})=>{const B=pe();let R,de,W;const fe=gt(),q=i.transactionView;let Z=()=>{};const{transactions:sn,selectedTransactionId:ne,selectedTransactionLineId:ke,transactionLocalData:cn}=q;if(D==="transaction_categorization"){const De=cn.find(ee=>ee.transactionId===ne),J=sn.find(ee=>ee.id===ne),tt=ke!=null?De?.transactionReviewLocalData?.lineItemById[ke]:void 0,nt=tt?.account;de=tt?.class?.classId,R=["Uncategorized Income","Uncategorized Expense"].includes(nt?.accountName??"")?void 0:nt?.accountId;const rn=io(ne,J?.typeOfTransaction);J!=null&&rn&&(W={id:ne,type:Le(J.typeOfTransaction)}),Z=()=>{if(ne!=null&&ke!=null&&J!=null){const ee=q.transactionLocalData.find(Ee=>Ee.transactionId===ne)?.transactionReviewLocalData;if(ee!=null&&J.lines!=null&&J.lines.length>0){const Ee=ee.lineItemById[ke];let Ue=ee.selectedEntity;if(Rn(J)||(Ue=Ee.selectedEntityLine),Ue!=null){const dn=Ue,un={transactionId:{id:J.id,type:J.type},transaction:J,lineIds:J.lines.map(mn=>mn.id)??[]};B(ze(dn,Ee.amount.amount,un,!1,!0,fe))}}}}}const ln=V(De=>ot(De,void 0,R,de));return{transactionId:W,onSaveVendor:()=>{B(xn(W,void 0,!1,!0))},onSaveSuccess:Z,onCancel:()=>{W!=null&&B(Tn({transactionId:W})),B(wn()),B(Pn()),y()},vendorViewDetails:ln}})({expenseAutomationViewSelector:_,closeDrawerHandler:()=>{L(!1)},currentSelectedView:O});return Pe?.loggedInUserRoleMap==null?Y.fetchState==="Error"?u.jsx(Wa,{onGoHome:()=>x("../",{replace:!0}),onReload:()=>window.location.reload()}):u.jsx(Bt,{fetchState:"In-Progress"}):u.jsxs(u.Fragment,{children:[u.jsx(ro,{isOpen:U,drawerLeftMargin:new eo(0,0,300,650),onClose:()=>{e(!1)},children:u.jsx(To,{onClick:i=>i.stopPropagation(),children:u.jsx(Co,{companyId:d.companyId,closeCustomerRequestDrawer:()=>e(!1),addCustomerRequest:Zt,resetCustomerRequest:Ht})})}),et!=null&&k&&u.jsx(so,{isOpen:k,transactionId:et,onSaveVendor:tn,onSaveSuccess:nn,onCancel:an,vendorViewDetails:on}),u.jsx(po,{selectedDrawerAccountId:en,reconciliation:_.reconciliation,onFetchLinkTokenClick:(i,y)=>{a(Rt("expense_automation_reconcile",i,y))},onEstablishConnectionClick:(i,y)=>{const D=d?.companyId;D!=null&&(a(Pt(i,D,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",y)),a(xt({accountId:y,connectionInProgress:!0})))}}),Je&&u.jsx(fo,{selectedTransactionId:s,onClose:()=>C(void 0)}),u.jsx(bo,{navigate:x,location:g,themeState:S,vendorSearchAutoCompleteData:{autoCompleteText:Yt,entityAutoCompleteView:$t},expenseAutomationViewSelector:_,isMissingReceiptsBulkUploadEnabled:se,monthEndInsightsPreviewMode:p,monthEndInsightsCustomerRequestData:n,isRealtimeInsightsFeatureEnabled:qe,isUncategorizedExpenseCategoryEnabled:Q,isCOTEnabled:Wt,currentTenant:d,companyId:d.companyId,signedInUser:te,isTransactionActivityEnabled:Je,uncategorizedAccounts:Jt,onClickCustomerRequest:Nt,handleEditClick:Kt,tenantEmailDomain:F,trackExpenseAutomationTabAnalytics:$,setActivityLogTransactionId:C,closeSidePanel:t,openTransactionPanel:c,sidePanelIsOpen:v,sidePanelIsFullView:T,panelContent:P,isAiCfoAccessEnabled:M,onAskAiCfoClick:b,isExpenseAutomationCommentingEnabled:Lt,onExpenseAutomationCommentingThreadClick:zt})]})}),To=Te($e)`
17
- display: flex;
18
- min-height: 100%;
19
- flex-direction: column;
20
- `;function Qo(){return u.jsxs(gn,{children:[u.jsx(Fe,{path:"*",element:u.jsx(uo,{})}),u.jsx(Fe,{path:"/:selectedTab/:selectedPeriod/*",element:u.jsx(Ao,{})}),u.jsx(Fe,{path:"*",element:u.jsx(hn,{})})]})}export{Qo as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-1thjzoaw.js";import{a as r}from"./sentry-CooVhpit.js";import{V as d,W as l,Y as p,n as b}from"./index-NN8WQI8p.js";import"./mui-C-9qGevS.js";import f from"./NotFoundScreen-JcC_UZ1m.js";import{j as m,u}from"./core-DGtRv-5L.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]="b7eca5a9-78a6-433e-a2bd-fbba24ca64cc",a._sentryDebugIdIdentifier="sentry-dbid-b7eca5a9-78a6-433e-a2bd-fbba24ca64cc")}catch{}})();const D=()=>{const a=m(),e=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),c=r.useCallback(()=>{(()=>{const n=b(e.state?.pathnameStackToGoBack),i=n.poppedPathname??k();a(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=d(e.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:c}):s.jsx(f,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{D as F};
@@ -1,72 +0,0 @@
1
- import{j as a}from"./liveblocks-1thjzoaw.js";import{l as f,k as x,j,u as y,h as Z,q as ee,g as A,N as ae,n as te,o as p}from"./core-DGtRv-5L.js";import{It as S,Iu as k,Iv as N,yP as $,yB as L,Iw as C,Ix as ne,Iy as oe,yF as ie,eN as I,yM as se,yJ as le}from"./zeni-epic-state-DNuuo8ZV.js";import{K as g,o as r,p as re,d as v,k as E,y as de,n as ce,q as me,r as F,l as pe,c as ue,s as he,v as xe,h as ge,B as be,w as we,$ as fe,S as ye,x as Se,A as ke,E as ve}from"./index-NN8WQI8p.js";import{n as c}from"./mui-C-9qGevS.js";import b from"./NotFoundScreen-JcC_UZ1m.js";import{a as P}from"./sentry-CooVhpit.js";import"./recharts-a2B9SbBf.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.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]="64c229ee-3b3a-4aee-b1ab-bce6bed37919",e._sentryDebugIdIdentifier="sentry-dbid-64c229ee-3b3a-4aee-b1ab-bce6bed37919")}catch{}})();const Ie=c.div`
2
- display: flex;
3
- height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,je=x(function(e){const t=S(e),n=k(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:i=>{e(L(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(o),e($(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(N({data:l}))}}})(re);function z(){const e=g(),{vendorId:t,billId:n}=f();return t==null||n==null?a.jsx(b,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(je,{vendorId:t,billId:n})})})}const $e=c.div`
11
- display: flex;
12
- height: 100vh;
13
- width: 100%;
14
- flex: 1 1 auto;
15
- flex-direction: column;
16
- align-items: center;
17
- background-color: ${e=>e.theme.colors.grey4};
18
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,Ce=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:C(e),googleAPIKey:E.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,i=()=>{const l=ce(o.state?.pathnameStackToGoBack),s=l.poppedPathname??De();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Ae(l);e(ne({addressToCreate:s})),i()},onCancel:()=>{i()}}})(de);function Be({isSubPage:e}){const t=j(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx($e,{windowSize:o,children:a.jsx(Ce,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:E.googleMapsAPIKey})})})}const De=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Ae=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Pe=c.div`
20
- display: flex;
21
- height: 100%;
22
- width: 100%;
23
- flex: 1 1 auto;
24
- flex-direction: column;
25
- align-items: center;
26
- background-color: ${e=>e.theme.colors.grey4};
27
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,ze=x(function(e){const t=S(e),n=k(e),o=C(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(L(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(N({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(me);function Ne(){const e=j(),t=y(),n=g(),{vendorId:o,billId:i}=f();return o==null||i==null?a.jsx(b,{}):a.jsx(a.Fragment,{children:a.jsx(Pe,{windowSize:n,children:a.jsx(ze,{location:t,navigate:e,vendorId:o,billId:i})})})}const Le=c.div`
29
- display: flex;
30
- height: 100%;
31
- width: 100%;
32
- flex: 1 1 auto;
33
- flex-direction: column;
34
- align-items: center;
35
- background-color: ${e=>e.theme.colors.grey4};
36
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Ee=x(function(e){const t=S(e),n=k(e),o=C(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(ie(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(oe({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(he);function Fe(){const e=j(),t=y(),n=g(),{vendorId:o,billId:i}=f(),{useFeatureGate:l}=pe(),{isFeatureEnabled:s}=l(ue.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(b,{}):a.jsx(Le,{windowSize:n,children:a.jsx(Ee,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Te={containerWidth:new ke(100,58)},Ge=c(ye)`
38
- width: ${r.sp4};
39
- height: ${r.sp4};
40
- margin-bottom: ${r.sp3};
41
- margin-top: ${r.sp3};
42
- margin-left: ${r.sp8};
43
- cursor: pointer;
44
- position: absolute;
45
- color: ${e=>e.theme.colors.brandColorJade};
46
- `,Me=c.div`
47
- display: flex;
48
- height: 100vh;
49
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
- width: 100vw;
51
- overflow-y: scroll;
52
- background-color: ${e=>e.theme.colors.grey4};
53
- `,He=c.div`
54
- display: flex;
55
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
- flex-direction: column;
57
- width: ${e=>`${Te.containerWidth.value(e.windowSize)}%`};
58
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
60
- padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
61
- `,Ke=c.div`
62
- display: flex;
63
- flex-direction: column;
64
- align-items: center;
65
- justify-content: center;
66
- padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
67
- height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
- overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
- width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
- background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
- margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,Ve=x(function(e,t){return{file:t.file,type:t.type}})(Se);function h({appContent:e}){const t=Z(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=f(),[s]=ee(),d=s.get("token"),T=n.pathname.includes("address"),w=g(),G=xe(),B=ge(),M=()=>{G.toggle()},H=A(u=>S(u)),K=A(u=>k(u)),{authParams:V,fetchState:m,billAttachment:_,billFetchState:D,companyName:W,currencySymbol:U,amount:q}=H,{tenantId:J,userId:O,sessionId:Q}=V,{fetchState:R,internationalBankAccountCreateStatus:X}=K;return P.useEffect(()=>{I(),m==="Not-Started"&&i!=null&&o!=null&&d!=null&&t(se(i,o,d))},[]),P.useEffect(()=>{m==="Completed"&&(I(O,Q,J),l!=null&&t(le(l)))},[m]),m==="Error"?a.jsx(b,{}):R==="Completed"||X.fetchState==="Completed"?(I(),a.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):m==="In-Progress"?a.jsx(be,{fetchState:m,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${B.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[m==="Completed"&&D==="Completed"&&a.jsx(we,{analytics:v,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",i??"",W,l??"",_e(n.pathname),U,q))(u)}),a.jsxs(Me,{windowSize:w,children:[w!=="small"?a.jsx(Ge,{onClick:M}):null,a.jsx(Ke,{windowSize:w,isAddressPage:T,children:D==="In-Progress"?a.jsx(fe,{size:"ExtraLarge",start:!0}):a.jsx(Ve,{file:_,type:"bill"})}),a.jsx(He,{windowSize:w,children:e})]})]})}const _e=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function We(){return a.jsx(ve,{})}function la(){return a.jsxs(te,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(We,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(z,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(z,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Be,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ne,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Fe,{})})}),a.jsx(p,{path:"*",element:a.jsx(b,{})})]})}export{la as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-1thjzoaw.js";import{a as f}from"./sentry-CooVhpit.js";import{h as U,u as _,j as w,q as M,g as l,N as T}from"./core-DGtRv-5L.js";import{z as r,h as P,D as V,f as A,d as N,g as q,m as R,$,j as W}from"./index-NN8WQI8p.js";import{eM as B,Id as G,Io as H,Ie as J,eN as K,fh as Q,Ik as X,fE as Y,cR as Z,Ip as ee,Iq as te}from"./zeni-epic-state-DNuuo8ZV.js";import{n as ne}from"./mui-C-9qGevS.js";import{u as se}from"./useDeviceId-Bxt0bF-y.js";import{f as ae}from"./analyticsHelper-yiDXt2Ja.js";import{t as ie}from"./getLocaleForTenant-DHltWIlc.js";import"./recharts-a2B9SbBf.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.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]="af36f5ed-6a70-4506-bab8-72041d5860c8",t._sentryDebugIdIdentifier="sentry-dbid-af36f5ed-6a70-4506-bab8-72041d5860c8")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=U(),a=_(),m=w(),[b]=M(),n=b.get("token"),p=b.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>B(e)),k=l(e=>G(e)),E=r.getSignedInUser(),v=P().mode;f.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,g)))},[n,p,t,i,g,s?.zeniSessionId]),f.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(J(k.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,y,s,o,k,v,a.state,t]);const j=f.useCallback(()=>{m("/signin/auth")},[m]),F=f.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=f.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||g==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx($,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- display: flex;
8
- align-items: center;
9
- justify-content: center;
10
- z-index: 9999;
11
- background-color: ${t=>t.theme.colors.background};
12
- `;export{De as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-1thjzoaw.js";import{j as r,k as i}from"./core-DGtRv-5L.js";import{U as n}from"./index-NN8WQI8p.js";import"./mui-C-9qGevS.js";import"./sentry-CooVhpit.js";import"./zeni-epic-state-DNuuo8ZV.js";import"./recharts-a2B9SbBf.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.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]="9eddbf1e-8177-43b2-add6-c91ac38fa63c",o._sentryDebugIdIdentifier="sentry-dbid-9eddbf1e-8177-43b2-add6-c91ac38fa63c")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
@@ -1 +0,0 @@
1
- import{l as lt,a as dt,m as ft,j as _}from"./liveblocks-1thjzoaw.js";import ut from"./NotFoundScreen-JcC_UZ1m.js";import{a as k}from"./sentry-CooVhpit.js";import{j as ht,u as pt,l as kt,h as gt,g as S,k as St,n as bt,o as K}from"./core-DGtRv-5L.js";import{cn as It,eV as X,eM as H,f9 as Ct,f1 as b,OC as J,f5 as l,eU as A,qm as $,vA as Tt,OD as At,eT as yt,fc as Et,qr as _t,OE as M,bp as F,gx as w,qv as Q,OF as Nt,cy as xt,cs as Bt}from"./zeni-epic-state-DNuuo8ZV.js";import{M as wt,z as vt,l as Dt,c as Rt,I as Ut,cn as Gt,r as N,a1 as Pt,co as Mt,a2 as Ft,n as $t}from"./index-NN8WQI8p.js";import"./mui-C-9qGevS.js";import{u as jt}from"./useAskAiCfoHostNavButtonProps-Cmlh3sFJ.js";import{c as Ot}from"./useFetchSuggestedQuestionsWhenReady-D27Rjrx4.js";import"./recharts-a2B9SbBf.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="a4aa1060-4288-4851-82d7-a37594ca0e15",t._sentryDebugIdIdentifier="sentry-dbid-a4aa1060-4288-4851-82d7-a37594ca0e15")}catch{}})();const Vt=(t,d)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{d(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),qt=St(function(t,d){const n=X(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=d,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&Et(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,d){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:v}=d;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(Q("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t(M([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!xt(g)&&(r="not-found"),c[1].startsWith("bill")&&!Bt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(A(a,o))},onUpdateNotificationTabState:(a,o)=>{t(l(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(J(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t($("task_manager","dashboard",m))}else v?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(Q("task_manager",m,c)):(t(l({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(x(r),t(M([r],F())))})).then(()=>{t(l({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(A({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(l({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(l({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(l({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Vt(s,x).then(()=>{t(M(s,F())),t(l({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(A({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(l({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Pt(Mt)),zt=()=>{const t=ht(),d=pt(),{tenantEmailDomain:n,selectedTab:u}=kt(),{areTenantIdsInSync:g}=wt(),i=It(u??""),s=gt(),h=vt.getSignedInUser(),[x,v]=k.useState(!1),a=S(e=>X(e)),o=S(e=>H(e)),{useFeatureGate:m}=Dt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoOpen:r,setIsAiCfoOpen:I}=Ut(),{isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z}=jt({isAiCfoOpen:r,setIsAiCfoOpen:I,mobileExploreReferrer:"Notifications"});Ot({isDataReady:!0});const tt=Ct(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),O=S(e=>b(e).currentTab),D=S(e=>b(e).currentSubTab),et=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),R=S(e=>b(e).notificationDetailsByTab.comments.fetchState),at=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),ot=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),st=Gt().allUsers,{inboxNotifications:B,isLoading:y,hasFetchedAll:C,isFetchingMore:U,fetchMore:nt}=lt(),{threads:V,isLoading:q,fetchMore:z,isFetchingMore:L,hasFetchedAll:W}=dt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(O!==i&&i!=null&&s(J(i)),i==null){const e=`../${O}`,p=N(d.state?.pathnameStackToGoBack,d.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{et.fetchState==="Not-Started"&&s(l({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(y===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(l({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(A({unreadCount:p},"comments"))}},[y,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s($("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>nt?.(),0);return()=>clearTimeout(e)});const G=y||U===!0||C!==!0||y||U===!0||C!==!0;k.useEffect(()=>{G&&R!=="In-Progress"?s(l({fetchState:"In-Progress",error:void 0},"comments")):G||R!=="In-Progress"||s(l({fetchState:"Completed",error:void 0},"comments"))},[G,R]),k.useEffect(()=>{s(A({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(v(!0),s(Tt()))},[a.fetchState]),k.useEffect(()=>{if(y===!1&&q===!1&&B!=null&&V!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),ct=p.map(f=>{const P=V.find(mt=>mt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(L||W===!0||z==null||z(),null)}).filter(f=>f!=null);s(l({allNotificationsIds:E},"comments")),s(A({totalCount:E.length,unreadCount:T.length},"comments")),s(At(ct))}},[y,U,L,C,W,q,B?.length]);const it={events:o.userRoleId!=null?[`private-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Ft(p)){const T=yt(p.mode);if(T==="dashboard"&&s(A({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];D==="all"?E.push("read","unread"):D!=="mentions"&&E.push(D),s($("task_manager",T,E,!0))}}}},rt=ft();return _.jsx(qt,{tenantEmailDomain:n,loggedInUserRoleMap:tt,signedInUser:h,externalNotificationsUnreadCount:at,location:d,navigate:t,isDebitCardFeatureEnabled:c,users:st,markInboxNotificationAsRead:rt,allUnreadCommentsNotificationIds:ot,isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z,...it})};function me(){return _.jsxs(bt,{children:[_.jsx(K,{path:"/:selectedTab",element:_.jsx(zt,{})}),_.jsx(K,{path:"*",element:_.jsx(ut,{})})]})}export{me as default};
@@ -1,22 +0,0 @@
1
- import{j as s}from"./liveblocks-1thjzoaw.js";import{I$ as oe,eM as X,jl as K,eS as q,eQ as ie,Gz as Y,ID as re,sF as ke,J0 as N,st as Pe,sO as je,sI as le,sx as de,sM as Te,sJ as Le,J1 as ce,uj as ve,J2 as Fe,fw as Ae,J3 as J,sC as pe,sA as ue,sR as Oe,b$ as Re}from"./zeni-epic-state-DNuuo8ZV.js";import{K as me,l as ee,c as E,z as M,a4 as ge,F as he,af as fe,ag as Ve,A as Ce,o as A,J as be,D as ye,ah as Ue,M as $e,I as Be,w as Ze,d as we,g as ze,r as Je,ai as Ge,C as He}from"./index-NN8WQI8p.js";import{D as Se,n as _,S as De}from"./mui-C-9qGevS.js";import te from"./NotFoundScreen-JcC_UZ1m.js";import{a as l}from"./sentry-CooVhpit.js";import{h as se,l as Ke,g,j as Me,u as _e,k as We,n as ne,o as z}from"./core-DGtRv-5L.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-Cmlh3sFJ.js";import{c as Ne}from"./useFetchSuggestedQuestionsWhenReady-D27Rjrx4.js";import{M as Xe}from"./MobileAppDrawer-VgfdPmIc.js";import"./recharts-a2B9SbBf.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.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]="b34dde62-5276-47d8-99c7-ee3b70001f8c",e._sentryDebugIdIdentifier="sentry-dbid-b34dde62-5276-47d8-99c7-ee3b70001f8c")}catch{}})();const qe={overlayWidth:new Ce(100,100,48)},G=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),{userId:S}=Ke(),c=g(t=>oe(t)),m=g(t=>X(t)),D=g(t=>K(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:I}=C(E.isDebitCardFeatureEnabled),P=q(I,m),L=ie(m),v=Y(m),V=re(m),U=!!m.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(M.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(N()),y()},F=()=>{O===!0?w(!0):b()},$=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:B}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Z}=C(E.isChargeCardFeatureEnabled),p=ge(m,Z,I),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),T={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:$,mode:h,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:B===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(h==="zeni_only"?Pe(e):je(v))},onCloseClick:F,isLoading:x||c.person==null},r={onOkClick:()=>{w(!1),b()},onCancelClick:()=>{w(!1)}};return l.useEffect(()=>{x===!1&&S!=null&&u(ke(S))},[x,S]),l.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&b()},[c.updatePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[k===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:G.discardTitle}),descriptionComponent:s.jsx(Ee,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...T})]})})},es=_(De)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,xe=_(be.H6Regular)`
6
- margin-top: ${A.sp7};
7
- padding-left: ${A.sp8};
8
- padding-right: ${A.sp8};
9
- color: ${e=>e.theme.colors.primary};
10
- word-break: break-word;
11
- `,Ee=_(be.LargeRegularSp)`
12
- color: ${e=>e.theme.colors.hero};
13
- padding-left: ${A.sp8};
14
- padding-right: ${A.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${A.sp4};
17
- white-space: pre-line;
18
- `,ss={overlayWidth:new Ce(100,100,48)},H=ye.getLocalizedStrings().peoplePage.invitePage,as=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),S=g(r=>oe(r)),c=g(r=>X(r)),m=g(r=>K(r)),{useFeatureGate:D}=ee(),{isFeatureEnabled:C}=D(E.isDebitCardFeatureEnabled),I=q(C,c),P=ie(c),L=Y(c),v=re(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&m&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(M.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),u(N())},b=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},$=d.companyView?.controllers.map(r=>r.user),{isFeatureEnabled:B}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Z}=D(E.isChargeCardFeatureEnabled),p=ge(c,Z,C),{isFeatureEnabled:j}=D(E.isTreasuryEnabled),T={classList:o.classes,managersList:n.users,controllersList:$,mode:h,isZeniTenant:L,onPeopleLocalDataUpdated:r=>{u(le({peopleLocalData:r})),R(!0)},onResetClick:x,onSaveClick:()=>{u(h==="zeni_only"?Te(e):Le())},onCloseClick:b,peopleDetails:S,isAccountingClassesEnabled:m,isReimbursementDisabled:V===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:B===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return l.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),u(N()))},[S.invitePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:ss.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:b,children:s.jsxs(ts,{onClick:r=>r.stopPropagation(),children:[k===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:H.discardTitle}),descriptionComponent:s.jsx(Ee,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:F}):null,s.jsx(Ue,{...T})]})})},ts=_(De)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,ns=We(function(e,n){const d=ce(e),o=M.getSignedInUser();return{data:d,loggedinUserId:o?.userId??"",isZeniTenant:n.isZeniTenant===!0,shouldFetchClasses:n.shouldFetchClasses,isZeniAdminUser:o?.userEmailDomain==="zeni.ai"&&n.isZeni===!0,isAccountingClassesEnabled:K(e),analytics:we}},function(e,n){const{navigate:d,companyId:o,shouldFetchClasses:h}=n;return{personAction:{onPersonDelete:(i,y)=>{e(de(i,y))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(pe()),e(ue(o,h))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(J({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(J({searchText:i}))}}}})(Ge);function Q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:n}){const d=Me(),o=se(),h=_e(),{areTenantIdsInSync:i}=$e(),y=M.getSignedInUser(),f=g(a=>X(a)),{useFeatureGate:u}=ee(),{isFeatureEnabled:O}=u(E.isDebitCardFeatureEnabled),R=g(a=>K(a)),k=!q(O,f)&&R,w=Y(f),S=f?.tenantId,{tenantEmailDomain:c}=f,[m,D]=l.useState(!1),[C,I]=l.useState(!1),[P,L]=l.useState(!1),[v,V]=l.useState("off"),[U,x]=l.useState(!1),b=a=>{x(a)},{isAiCfoOpen:F,setIsAiCfoOpen:$}=Be(),{isAiCfoAccessEnabled:B,onAskAiCfoClick:Z}=Qe({isAiCfoOpen:F,setIsAiCfoOpen:$,mobileExploreReferrer:"People"}),p=g(a=>ce(a));Ne({isDataReady:p.fetchState==="Completed"});const j=g(a=>ve(a.classState,a.classListState)),T=g(a=>Fe(a.userState,a.userRoleState,a.userListViewState,"manager")),r=g(a=>Ae(a)),t=f?.companyId;l.useEffect(()=>{m&&v===p.uiState.mode||!i||(o(J({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),D(!0),o(pe()))},[m,y,S,o,p.uiState.mode,i]),l.useEffect(()=>{t!=null&&i&&o(ue(t,k))},[t,k,i]),l.useEffect(()=>{I(e!=null&&e===!0),L(n!=null&&n===!0&&n)},[e,n]),l.useEffect(()=>{o(J({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const ae=()=>{I(!1),L(!1),d("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx(Ze,{analytics:we,onLoad:a=>a.trackPageLoaded(ze.Event.members)}):null,C===!0?s.jsx(as,{closeDrawerHandler:ae,isInvitePeopleDrawerOpen:C,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:ae,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,s.jsx(Xe,{isAppContentDrawerOpen:U,handleDrawerToggle:b}),s.jsx(ns,{navigate:d,signedInUser:y,isZeni:f.isZeni,isZeniTenant:w,peopleUIState:p.uiState,companyId:t,shouldFetchClasses:k,classList:j,managersView:T,peopleView:p,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(a,W)=>{o(J({sortKey:a,sortOrder:W}))},onRowClick:a=>{const W=`/${c}/people/${encodeURIComponent(a)}/edit`,Ie=Je(h.state?.pathnameStackToGoBack,h.pathname);d(W,{state:{pathnameStackToGoBack:Ie}})},onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:B,onAskAiCfoClick:Z})]})}function Es(){const e=He();return Re(e?.loggedInUserRole??[])?s.jsxs(ne,{children:[s.jsx(z,{path:"/",element:s.jsx(Q,{})}),s.jsx(z,{path:"new",element:s.jsx(Q,{isInvitePeopleDrawerOpen:!0})}),s.jsx(z,{path:":userId/edit",element:s.jsx(Q,{isEditPeopleDrawerOpen:!0})}),s.jsx(z,{path:"*",element:s.jsx(te,{})})]}):s.jsx(ne,{children:s.jsx(z,{path:"*",element:s.jsx(te,{})})})}export{Es as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-1thjzoaw.js";import _ from"./NotFoundScreen-JcC_UZ1m.js";import{a as r}from"./sentry-CooVhpit.js";import{j as v,u as M,g,l as U,h as P,N as z,k as V,n as B,o as h}from"./core-DGtRv-5L.js";import{eM as F,OG as I,bn as G,bm as N,h1 as H,gx as $}from"./zeni-epic-state-DNuuo8ZV.js";import{v as q,z as b,I as J,cp as K}from"./index-NN8WQI8p.js";import"./mui-C-9qGevS.js";import{u as L}from"./useAskAiCfoHostNavButtonProps-Cmlh3sFJ.js";import{c as Q}from"./useFetchSuggestedQuestionsWhenReady-D27Rjrx4.js";import{M as W}from"./MobileAppDrawer-VgfdPmIc.js";import"./recharts-a2B9SbBf.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.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]="4a9c37ec-2a79-400c-87d9-d763f3d5a5c5",e._sentryDebugIdIdentifier="sentry-dbid-4a9c37ec-2a79-400c-87d9-d763f3d5a5c5")}catch{}})();const X=V(function(e){const t=b.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=I(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(K),Y=()=>{const e=v(),t=M(),c=q(),o=g(a=>F(a)),{aggregatedReportViewState:n}=g(a=>I(a)),{tenantEmailDomain:m}=U(),p=P(),l=b.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[C,S]=r.useState(!1),w=G(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),A=w||k||x,d=r.useCallback((a,i,O)=>{p(H({fromMonth:a,toMonth:i,cacheOverride:O}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),y=r.useCallback((a,i)=>{d(a,i,!1)},[d]),u=a=>{S(a)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=J(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=L({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),A?s.jsxs(s.Fragment,{children:[s.jsx(W,{isAppContentDrawerOpen:C,handleDrawerToggle:u}),s.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:y,handleDrawerToggle:u,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):s.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function be(){return s.jsxs(B,{children:[s.jsx(h,{path:"*",element:s.jsx(Y,{})}),s.jsx(h,{path:"*",element:s.jsx(_,{})})]})}export{be as default};
@@ -1,5 +0,0 @@
1
- import{j as s}from"./liveblocks-1thjzoaw.js";import{a as o}from"./sentry-CooVhpit.js";import{g as f,j as H,h as V,u as W,k as N}from"./core-DGtRv-5L.js";import{h as _,K as $,z as R,a$ as U,A as z,M as K,I as Y,w as q,d as l,g as G,a1 as J,b0 as Q}from"./index-NN8WQI8p.js";import{eW as X,eM as Z,Lu as I,Lv as ee,tn as ae,td as g,eY as re,bL as ne,ti as te,Lw as se}from"./zeni-epic-state-DNuuo8ZV.js";import{D as oe,e as ie,n as le,S as de}from"./mui-C-9qGevS.js";import{u as ce}from"./useAskAiCfoHostNavButtonProps-Cmlh3sFJ.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-D27Rjrx4.js";import{M as ue}from"./MobileAppDrawer-VgfdPmIc.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]="e4e1084c-dc41-41dc-a3a7-55d5eead78cb",e._sentryDebugIdIdentifier="sentry-dbid-e4e1084c-dc41-41dc-a3a7-55d5eead78cb")}catch{}})();const pe={overlayWidth:new z(100,100,30)},we=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=_(),n=$();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>X(d));return s.jsx(oe,{anchor:"right",open:e,PaperProps:{style:{width:pe.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(ie,{in:e,direction:"left",children:s.jsx(ge,{onClick:d=>d.stopPropagation(),children:s.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ge=le(de)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,P="refer-and-earn-status-update",ke=N(function(e){const a=I(e),r=e.referralViewState.rewardsPlanFetchState,n=ne([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(se({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(te(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(J(Q));function Pe({isReferralDrawerOpen:e}){const a=H(),r=V(),n=W(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,A]=o.useState(!1),[k,C]=o.useState(!1),p=R.getSignedInUser(),h=f(t=>Z(t)),m=f(t=>I(t)),v=m.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),y=ee([m,w]),{areTenantIdsInSync:c}=K();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(r(ae()),A(!0))},[]),o.useEffect(()=>{!i&&v==="Not-Started"&&c&&(u(!0),r(g(!0)))},[v,r,c]),o.useEffect(()=>{!d&&w.fetchState==="Not-Started"&&c&&(x(!0),r(re(!0)))},[w,r,c]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[E,j]=o.useState(!1),S=t=>{j(t)},{isAiCfoOpen:L,setIsAiCfoOpen:O}=Y(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=ce({isAiCfoOpen:L,setIsAiCfoOpen:O,mobileExploreReferrer:"Rewards"});fe({isDataReady:y===!0});const M={events:p?.userId!=null?[`private-${p.userId}.${P}`]:[],eventCallback:(t,b,F)=>{F.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(q,{analytics:l,onLoad:t=>(b=>{p!=null&&b.trackPageLoaded(G.Event.rewardsPageViewed)})(t)}):null,s.jsx(ue,{isAppContentDrawerOpen:E,handleDrawerToggle:S}),k===!0?s.jsx(we,{closeDrawerHandler:()=>{C(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(ke,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{S(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B,...M})]})}export{Pe as R};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-1thjzoaw.js";import{l as x,z as j,aI as y,w as E,d as p,g as F,cy as P,c as L}from"./index-NN8WQI8p.js";import"./mui-C-9qGevS.js";import m from"./NotFoundScreen-JcC_UZ1m.js";import{a as d}from"./sentry-CooVhpit.js";import{h as T,g as b,j as V,u as A,k as R,n as U,o as u}from"./core-DGtRv-5L.js";import{eM as z,Pd as C,M3 as Y,Pe as k,tn as M,eY as G,Pf as O,tl as q}from"./zeni-epic-state-DNuuo8ZV.js";import{R as w}from"./ReferralListScreen-DT8mXtsb.js";import"./recharts-a2B9SbBf.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.js";import"./useAskAiCfoHostNavButtonProps-Cmlh3sFJ.js";import"./useFetchSuggestedQuestionsWhenReady-D27Rjrx4.js";import"./MobileAppDrawer-VgfdPmIc.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]="78574713-00cd-4f16-9c5d-74500e41d3b0",e._sentryDebugIdIdentifier="sentry-dbid-78574713-00cd-4f16-9c5d-74500e41d3b0")}catch{}})();const B=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(k()),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(q())},onUpdateInviteFormLocalData:s=>{e(O({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),H=()=>{const e=T(),[t,n]=d.useState(!1),[i,s]=d.useState(!1),r=b(o=>z(o)),c=V(),_=A(),{useDynamicConfig:g}=x(),f=j.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=b(o=>C(o)),v=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:D}=g(y.zeniAccountsConfig),I=Y(D);d.useEffect(()=>{e(k()),r?.rewardsLastViewedTime==null&&i===!1&&(e(M()),s(!0))},[]),d.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[l.fetchState,e]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(B,{navigate:c,location:_,currentTenant:r,companyName:N,userName:v,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:I.maxAnnualPercentageYield})]})};function fe(){const{useFeatureGate:e}=x(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(w,{}):a.jsx(m,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(w,{isReferralDrawerOpen:!0}):a.jsx(m,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(H,{}):a.jsx(m,{})}),a.jsx(u,{path:"*",element:a.jsx(m,{})})]})}export{fe as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-d3sWDoZr.js","assets/sentry-CooVhpit.js","assets/core-DGtRv-5L.js","assets/zeni-epic-state-DNuuo8ZV.js","assets/index-NN8WQI8p.js","assets/mui-C-9qGevS.js","assets/analytics-CALyM-hh.js","assets/utils-DYt83G2V.js","assets/withTransactionSidePanel-Cjv0VgRu.js","assets/useAskAiCfoHostNavButtonProps-Cmlh3sFJ.js","assets/useFetchSuggestedQuestionsWhenReady-D27Rjrx4.js","assets/TransactionDetailScreen-CbnXMf-w.js","assets/decodeURIComponentSafe-D45efNq9.js","assets/routePaths-8nWXl3lj.js","assets/NotFoundScreen-JcC_UZ1m.js","assets/analyticsHelper-yiDXt2Ja.js","assets/CompanyPassportScreen-BWU7HRXU.js","assets/MobileAppDrawer-VgfdPmIc.js","assets/FeaturePreviewScreen-cXgFYw9z.js","assets/ReferralListScreen-DT8mXtsb.js","assets/index-D-vub4_t.css","assets/BillPayRoutes-BlCM6EqR.js","assets/AddressScreen-B9u0FHW6.js","assets/DomesticWireDetailScreen-DpFSc8w7.js","assets/useInitialThreadRequest-CY2eSsaO.js","assets/DrawerScreen-6__pZ2Fq.js","assets/SetupPagesScreen-D-1wJv_X.js","assets/BusinessVerificationPageScreen-B0aOlvDy.js","assets/BillPayApprovalRoutes-B1dVKGB7.js","assets/ReimbursementApprovalRuleDetailScreen-nWYI_DTZ.js","assets/getLocaleForTenant-DHltWIlc.js","assets/ReimbursementRoutes-BXKMoRKS.js","assets/ReimbursementApprovalRoutes-CMG0ah9n.js","assets/TransactionListRoutes-CZQnxASD.js","assets/ZeniAccountStatementScreen-pUj8-CXb.js","assets/SettingsRoutes-C0dX88-a.js","assets/accountMappingHelper-DxgbU7sx.js","assets/QBOConnectionScreen-O-1IJ7vW.js","assets/empty-B8GlEZnh.js","assets/index-ktcuBvep.js","assets/url-D12sxYA1.js","assets/index-BzTrf-Pv.js","assets/ReportsRoutes-B1A7hhcf.js","assets/ChargeCardRoutes-C0OR0QnW.js","assets/PeopleRoutes-BnS2kaun.js","assets/ExpenseAutomationRoutes-1Vdih9y5.js","assets/TreasuryRoutes-B36ovFlE.js","assets/VendorsRoutes-Ch385dto.js","assets/pathToGoBack-BxDzY9Wz.js","assets/ZeniAccountRoutes-C-A0w1l-.js","assets/AddressRoutes-D2FACoGE.js","assets/PandLWithForecastRoutes-Bw9LmosD.js","assets/CustomerOnboardingRoutes-CPe4UazZ.js","assets/TransactionDetailRoutes-C2b32V9o.js","assets/EntityDetailRoutes-Rn_-edBe.js","assets/NotificationRoutes-DeUR-Lca.js","assets/PerformanceRoutes-DxVX57kA.js","assets/RewardsRoutes-BAZjS3ll.js","assets/TaskRoutes-BijAG0Df.js","assets/TaskListScreen-CI6OZlSQ.js","assets/AiCfoScreen-gPU5OBcl.js"])))=>i.map(i=>d[i]);
2
- import{_ as a,bm as os,eM as ls,eS as cs,eQ as ds,eR as ms,fC as us,eO as _s,cM as Ae,ct as As,f8 as Es,cl as ps,bB as Is,bp as gs,fd as xs,v as Ts,Ie as hs,bu as js,If as Us,bD as Hs,fa as Rs,bC as Ds,br as bs,cN as ys,Ig as fs,Ih as Cs,cJ as vs,cL as Os,cK as Ps,cs as Fs,cy as Ls,mg as Ee,eN as pe,Ii as Bs,fh as Ie,fH as ge,fI as xe,fi as ks}from"./zeni-epic-state-DNuuo8ZV.js";import{j as e}from"./liveblocks-1thjzoaw.js";import{a as v}from"./sentry-CooVhpit.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as G,i as Te,N as c,n as Zs,o as t}from"./core-DGtRv-5L.js";import{h as ws,u as Gs,z as R,l as zs,a as $s,G as Ys,c as L,C as Ws,L as B,D as he,t as _,P as qs,d as X,e as l}from"./index-NN8WQI8p.js";import"./mui-C-9qGevS.js";import{f as je}from"./analyticsHelper-yiDXt2Ja.js";import{t as Js}from"./getLocaleForTenant-DHltWIlc.js";import"./recharts-a2B9SbBf.js";import"./analytics-CALyM-hh.js";import"./plaid-DRyXOtiU.js";import"./dnd-Bts1hC9q.js";import"./stripe-DMRn4zHo.js";import"./lottie-TdNUPve2.js";import"./lexical-DcQz2ToX.js";import"./pdf-DhqCrjXb.js";import"./utils-DYt83G2V.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="e8403a30-8608-4352-99d3-ec7a5b6f940a",i._sentryDebugIdIdentifier="sentry-dbid-e8403a30-8608-4352-99d3-ec7a5b6f940a")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-d3sWDoZr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>a(()=>import("./BillPayRoutes-BlCM6EqR.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-BXKMoRKS.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20])),transactions:()=>a(()=>import("./TransactionListRoutes-CZQnxASD.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>a(()=>import("./SettingsRoutes-C0dX88-a.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>a(()=>import("./ReportsRoutes-B1A7hhcf.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-C0OR0QnW.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>a(()=>import("./PeopleRoutes-BnS2kaun.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-1Vdih9y5.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>a(()=>import("./TreasuryRoutes-B36ovFlE.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>a(()=>import("./VendorsRoutes-Ch385dto.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-C-A0w1l-.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>a(()=>import("./ReportsRoutes-B1A7hhcf.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),ea=l(()=>a(()=>import("./AddressRoutes-D2FACoGE.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sa=l(()=>a(()=>import("./PeopleRoutes-BnS2kaun.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),aa=l(()=>a(()=>import("./PandLWithForecastRoutes-Bw9LmosD.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),na=l(()=>a(()=>import("./CustomerOnboardingRoutes-CPe4UazZ.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),ta=l(()=>a(()=>import("./VendorsRoutes-Ch385dto.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),ia=l(()=>a(()=>import("./TransactionDetailRoutes-C2b32V9o.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>a(()=>import("./EntityDetailRoutes-Rn_-edBe.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),ra=l(()=>a(()=>import("./DashboardRoutes-d3sWDoZr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>a(()=>import("./BillPayRoutes-BlCM6EqR.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),oa=l(()=>a(()=>import("./SettingsRoutes-C0dX88-a.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),Re=l(()=>a(()=>import("./ReimbursementRoutes-BXKMoRKS.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20]))),la=l(()=>a(()=>import("./ZeniAccountRoutes-C-A0w1l-.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),ca=l(()=>a(()=>import("./TreasuryRoutes-B36ovFlE.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),da=l(()=>a(()=>import("./TransactionListRoutes-CZQnxASD.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),ma=l(()=>a(()=>import("./ChargeCardRoutes-C0OR0QnW.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),ua=l(()=>a(()=>import("./NotificationRoutes-DeUR-Lca.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),_a=l(()=>a(()=>import("./PerformanceRoutes-DxVX57kA.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),Aa=l(()=>a(()=>import("./ExpenseAutomationRoutes-1Vdih9y5.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),Ea=l(()=>a(()=>import("./RewardsRoutes-BAZjS3ll.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),pa=l(()=>a(()=>import("./TaskRoutes-BijAG0Df.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),Ia=l(()=>a(()=>import("./AiCfoScreen-gPU5OBcl.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>a(()=>import("./NotFoundScreen-JcC_UZ1m.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),ga=l(()=>a(()=>import("./TaskListScreen-CI6OZlSQ.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function Za({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),b=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),z=Ms(),[N,be]=v.useState(!1),r=G(n=>ls(n)),{useFeatureGate:P}=zs(),K=$s(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(n=>n.tenantState.fetchState),E=G(n=>n.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=G(n=>us(n));if(o!=null){const n=R.getSignedInUserTenant(o);h!=null&&n!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ae=_s(),A=Ws(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ne=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(n=>w.tenantId!=null?Es(n,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&b!=null){const n=Q.params.selectedPeriod;if(n!=null){const H=n.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,b]),v.useEffect(()=>{N||(be(!0),f(B.TENANT_FETCHING)),ne.current?ne.current=!1:!Ts(ae,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,H,d,s){if(pe(H?.userId,H?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=R.getSignedInUserTenantWithId(n.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ae,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(Ie(s));const q=R.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(H==="Completed"||H==="Error");n==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,b,h,f,U))},[b,E]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&f(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):E==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(n=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Rs(r.company),We=Pe&&Ye===!0&&!C,qe=re&&Ds(A?.loggedInUserRoleMap),Je=oe&&bs(A?.loggedInUserRoleMap),Ke=me&&ys(A?.loggedInUserRoleMap),Qe=fs(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=We&&I,as=oe&&g,ns=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ne===!0||ze===!0||Qe===!0||Xe===!0;return R.isSignedIn()?b==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xa,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(ra,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ns||F?e.jsx(sa,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(aa,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(na,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(ia,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(da,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(ga,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(pa,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(ea,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(la,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(ca,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(_a,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(Aa,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(ua,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(ta,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(oa,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:as?e.jsx(ma,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(Ea,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(Ia,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const xa=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Ua,{tenantEmailDomain:O}):S?e.jsx(ja,{tenantEmailDomain:O}):U?e.jsx(Ha,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(Ta,{tenantEmailDomain:O}):e.jsx(y,{}),Ta=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,Za as default};