@zeniai/web-app-ui 5.3.80-dev → 5.3.81-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist/assets/{AccountMappingScreen-Bcei3-vV.js → AccountMappingScreen-BqrHv3lf.js} +2 -2
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-D9Jig4qx.js → ActualMatchingMatchDetailScreen-h8TCOzmP.js} +1 -1
  3. package/dist/assets/AddressRoutes-CevDzchV.js +1 -0
  4. package/dist/assets/{AddressScreen-CCnb-EUz.js → AddressScreen-Goy7OAa3.js} +2 -2
  5. package/dist/assets/AiCfoScreen-CRBP1pbJ.js +22 -0
  6. package/dist/assets/{AppDrawer-M88RR4X_.js → AppDrawer-O4ZEFSY7.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-CeafcVa6.js → BillPayApprovalRoutes-CEnfa_wS.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-D-3QQssu.js → BillPayRoutes-lyhC_q-2.js} +6 -6
  9. package/dist/assets/{BusinessVerificationPageScreen-Br68pzy6.js → BusinessVerificationPageScreen-CRJRFoBF.js} +2 -2
  10. package/dist/assets/{CardsAiCfoScreen-CzorEe4Q.js → CardsAiCfoScreen-DrIgNEMk.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-DOOSlXXz.js → ChargeCardRoutes-BOqQM_C6.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-Di61-k2R.js → CompanyPassportScreen-CxZJl1bJ.js} +1 -1
  13. package/dist/assets/ConnectionAuthScreen-CxIPuBQD.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-r36YH7JA.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-DQDzW12K.js → CustomerOnboardingRoutes-Q5ECv8HT.js} +3 -3
  16. package/dist/assets/{DashboardRoutes-DBRc0Or8.js → DashboardRoutes-BKSV9vko.js} +3 -3
  17. package/dist/assets/{DefaultTenantHome-VKIwrndh.js → DefaultTenantHome-BBKs-l6f.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-BFnUPd1g.js → DomesticWireDetailScreen-C8qRoekM.js} +4 -4
  19. package/dist/assets/DrawerScreen-CN9HYciY.js +1 -0
  20. package/dist/assets/EntityDetailRoutes-DvnbYoBF.js +1 -0
  21. package/dist/assets/{ExpenseAutomationRoutes-T3c98xyK.js → ExpenseAutomationRoutes-DGlzQW9f.js} +4 -4
  22. package/dist/assets/FeaturePreviewScreen-C6K1_63v.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-COzUIs57.js +1 -0
  24. package/dist/assets/{InboxNotificationsProvider-CI2xYI-T.js → InboxNotificationsProvider-EoJhdrtc.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-DIPhHnCf.js → InvoicingRoutes-DxRpDPHw.js} +1 -1
  26. package/dist/assets/{MagicLinkRoutes-4lwShu29.js → MagicLinkRoutes-DatBzzr0.js} +8 -8
  27. package/dist/assets/MagicLinkSignInScreen-BJzYh3J4.js +12 -0
  28. package/dist/assets/{MobileAppDrawer-Nsld3D4E.js → MobileAppDrawer-CgJ60E2m.js} +1 -1
  29. package/dist/assets/NotFoundScreen-DK36JFcR.js +1 -0
  30. package/dist/assets/{NotificationRoutes-DNTr2LLS.js → NotificationRoutes-DRUjl08J.js} +1 -1
  31. package/dist/assets/{OAuthConsentScreen-Cqxd7nsm.js → OAuthConsentScreen-DBjBNnQJ.js} +1 -1
  32. package/dist/assets/{PandLWithForecastRoutes-g3TcyguA.js → PandLWithForecastRoutes-U9sR4r18.js} +1 -1
  33. package/dist/assets/{PaymentLinkScreen-CZrSwc2c.js → PaymentLinkScreen-DwyYqfzu.js} +8 -8
  34. package/dist/assets/{PeopleRoutes-BGCnWaQs.js → PeopleRoutes-CN01cV2T.js} +3 -3
  35. package/dist/assets/PerformanceRoutes-sPgEs3ei.js +1 -0
  36. package/dist/assets/{Preview-Bg-n3tmo.js → Preview-Dfm6FKNt.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-BSApL2S-.js → QBOConnectionScreen-DFycm_ki.js} +1 -1
  38. package/dist/assets/ReimbursementApprovalRoutes-BUzBZ8wT.js +1 -0
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BeqXNmNW.js → ReimbursementApprovalRuleDetailScreen-C_dMNpou.js} +1 -1
  40. package/dist/assets/{ReimbursementRoutes-B3er_00s.js → ReimbursementRoutes-CverQIks.js} +4 -4
  41. package/dist/assets/{ReportsRoutes-Dex0_5-8.js → ReportsRoutes-BCJIsVHt.js} +1 -1
  42. package/dist/assets/{RewardsRoutes-CpDvl104.js → RewardsRoutes-DL4U3zKu.js} +1 -1
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-Cx7FsGq-.js → ScheduleDetailsPrepaidExpensesScreen-BKYsisUv.js} +4 -4
  44. package/dist/assets/ScreenRoutes-ChqMx09J.js +2 -0
  45. package/dist/assets/{SettingsRoutes-CZdo2Uf4.js → SettingsRoutes-C6bz6i-5.js} +6 -6
  46. package/dist/assets/{SetupPagesScreen-CCCYHV0e.js → SetupPagesScreen-B2ZhtNLX.js} +5 -5
  47. package/dist/assets/{SignInScreen-BKeEtlWV.js → SignInScreen-BhdMuyKL.js} +1 -1
  48. package/dist/assets/SignOutScreen-DhNypZcK.js +9 -0
  49. package/dist/assets/TaskListScreen-uIZd6Y1d.js +9 -0
  50. package/dist/assets/TaskRoutes-CmCsn1P4.js +9 -0
  51. package/dist/assets/TransactionDetailRoutes-Vh6CRIwx.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-Dvz5L_Kb.js → TransactionDetailScreen-JD8O14oY.js} +2 -2
  53. package/dist/assets/TransactionListRoutes-Cn4w6j8O.js +1 -0
  54. package/dist/assets/TreasuryRoutes-C3gzhi0V.js +37 -0
  55. package/dist/assets/{VendorsRoutes-BRCj4Vsy.js → VendorsRoutes-BwM6t0j-.js} +10 -10
  56. package/dist/assets/WiseConfirmationScreen-BrP-8WW4.js +12 -0
  57. package/dist/assets/{ZeniAccountRoutes-BfbO824j.js → ZeniAccountRoutes-CGLFu0Ov.js} +11 -11
  58. package/dist/assets/ZeniAccountStatementScreen-TsXZSj_4.js +9 -0
  59. package/dist/assets/{accountMappingHelper-BfwxvEfG.js → accountMappingHelper-DKrp-2iY.js} +1 -1
  60. package/dist/assets/{analytics-ByQsPrAn.js → analytics-k_LuQgHs.js} +1 -1
  61. package/dist/assets/{analyticsHelper-BK0R0EXk.js → analyticsHelper-CnJWG9bB.js} +1 -1
  62. package/dist/assets/{core-CwBMiqNL.js → core-Beu9kTtR.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-D1z7pLx5.js → decodeURIComponentSafe-0ml5lsEu.js} +1 -1
  64. package/dist/assets/{dnd-D9AEhQao.js → dnd-BD4CdaiB.js} +1 -1
  65. package/dist/assets/{empty-Dht4a5WU.js → empty-C_-q3sdl.js} +1 -1
  66. package/dist/assets/{empty-CUulWgZp.js → empty-N5VvFHKn.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-DFIV2Nhl.js → emptyVideoElement--WG9qJqH.js} +1 -1
  68. package/dist/assets/epic-Cdaahdr-.js +2 -0
  69. package/dist/assets/expenseAutomationHelper-dXFQtPOw.js +1 -0
  70. package/dist/assets/getLocaleForTenant-YwW4TLUd.js +1 -0
  71. package/dist/assets/{index-CtdOjFbT.js → index-B5QcNvR2.js} +1 -1
  72. package/dist/assets/{index-DkGrTQCv.js → index-BfNeAGgC.js} +13803 -13803
  73. package/dist/assets/{index-OLztW-Jv.js → index-CMLe_P16.js} +1 -1
  74. package/dist/assets/{index-jT32htdj.js → index-DPHHyNze.js} +2 -2
  75. package/dist/assets/{index-BGEbrO3g.js → index-DUM1Dz7Q.js} +1 -1
  76. package/dist/assets/{index-JRSQqReb.js → index-DfjWlew7.js} +1 -1
  77. package/dist/assets/{index-BeQGSCiG.js → index-Dxjgx_aK.js} +1 -1
  78. package/dist/assets/{index-Dfijaknh.js → index-pVZIHhft.js} +1 -1
  79. package/dist/assets/{lexical-BFV9piO5.js → lexical-ae4wZrjx.js} +1 -1
  80. package/dist/assets/{liveblocks-BRYN0f-U.js → liveblocks-DwoS2LTS.js} +1 -1
  81. package/dist/assets/{lottie-DqqifQEk.js → lottie-BGwNmPax.js} +1 -1
  82. package/dist/assets/{mui-Dfx-_nSM.js → mui-DEiF_Hb4.js} +1 -1
  83. package/dist/assets/{pathToGoBack-DNpXyO9i.js → pathToGoBack-DlfSGzqF.js} +1 -1
  84. package/dist/assets/{pdf-BoflkQZc.js → pdf-CuKXyKjy.js} +4 -4
  85. package/dist/assets/{pdf-lib-BHEe7wIM.js → pdf-lib-jUWLVDc9.js} +1 -1
  86. package/dist/assets/{plaid-BHtEWHw5.js → plaid-UFuUhVwC.js} +1 -1
  87. package/dist/assets/{pusher-DrrefAXI.js → pusher-Dk2WejFj.js} +1 -1
  88. package/dist/assets/{react-nGghtLFo.js → react-BM64rH6B.js} +1 -1
  89. package/dist/assets/{react-BUXVAYwq.js → react-C-VUuuL3.js} +1 -1
  90. package/dist/assets/{react-Bkh7n0Cr.js → react-DLObBre3.js} +1 -1
  91. package/dist/assets/{react-CyVLVS2S.js → react-DOpmw48o.js} +1 -1
  92. package/dist/assets/{react-CA-2n3Ni.js → react-DRcOWQ_U.js} +1 -1
  93. package/dist/assets/{react-Da1MrlqF.js → react-DUTB_3h5.js} +1 -1
  94. package/dist/assets/{recharts-B9JU7twj.js → recharts-MD3a-5g4.js} +1 -1
  95. package/dist/assets/{routePaths-BqbAkalx.js → routePaths-uZogBPDo.js} +1 -1
  96. package/dist/assets/{sentry-CtdwYwhn.js → sentry-BF2EAQwc.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-Cx4eVHX0.js → stripSplatSuffix-6CTGoq-D.js} +1 -1
  98. package/dist/assets/{url-BLzkJaXj.js → url-CcLycjqh.js} +1 -1
  99. package/dist/assets/{url-iltqJf6F.js → url-DTzy9das.js} +1 -1
  100. package/dist/assets/useActualMatchingMatchDetail-4m9qzYbe.js +1 -0
  101. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DoWDjx7a.js → useAiCfoDashboardSuggestedQuestionsChips-4BNh0D5K.js} +1 -1
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-B4mYX3VH.js +1 -0
  103. package/dist/assets/{useChargeCardPusherEvents-DWToPVaW.js → useChargeCardPusherEvents-DIeSIWcP.js} +1 -1
  104. package/dist/assets/{useDeviceId-Biv4dPop.js → useDeviceId-gZ0JJcev.js} +1 -1
  105. package/dist/assets/useEmailConnectResultRefresh-DjE-2Sye.js +1 -0
  106. package/dist/assets/{useInitialThreadRequest-36YDj4P5.js → useInitialThreadRequest-BhgsGG5D.js} +1 -1
  107. package/dist/assets/{useTaskManagerAccess-Cl_haJW7.js → useTaskManagerAccess-IxEInAYM.js} +1 -1
  108. package/dist/assets/{useTaskManagerPusherEvents-D4l5mFQo.js → useTaskManagerPusherEvents-DIUFIhyQ.js} +1 -1
  109. package/dist/assets/{utils-gkknwj7z.js → utils-CaDQp8mU.js} +1 -1
  110. package/dist/assets/{withTransactionSidePanel-yH5Pz4v0.js → withTransactionSidePanel-DH0DiNtU.js} +1 -1
  111. package/dist/assets/{zeni-epic-state-i8LQZ4dn.js → zeni-epic-state-1d5RmIXy.js} +4 -4
  112. package/dist/index.html +1 -1
  113. package/package.json +4 -4
  114. package/dist/assets/AddressRoutes-BSUkTIJx.js +0 -1
  115. package/dist/assets/AiCfoScreen-2FOnohjJ.js +0 -22
  116. package/dist/assets/ConnectionAuthScreen-ClAYzVMa.js +0 -11
  117. package/dist/assets/CustomerOnboardingAuthScreen-DSgWSp_O.js +0 -1
  118. package/dist/assets/DrawerScreen-BZuDNHCZ.js +0 -1
  119. package/dist/assets/EntityDetailRoutes-CvRtZg4S.js +0 -1
  120. package/dist/assets/FeaturePreviewScreen-BSbJQr46.js +0 -1
  121. package/dist/assets/HubSpotOAuthCallbackScreen-C19CfUu9.js +0 -1
  122. package/dist/assets/MagicLinkSignInScreen-CJCOH1ka.js +0 -12
  123. package/dist/assets/NotFoundScreen-GxItN6Rj.js +0 -1
  124. package/dist/assets/PerformanceRoutes-D8PsmeZu.js +0 -1
  125. package/dist/assets/ReimbursementApprovalRoutes-Ca-qlUQ4.js +0 -1
  126. package/dist/assets/ScreenRoutes-BMJdLOvD.js +0 -2
  127. package/dist/assets/SignOutScreen-BMd84bmu.js +0 -9
  128. package/dist/assets/TaskListScreen-R11F2Y4F.js +0 -9
  129. package/dist/assets/TaskRoutes-D3xMtlGq.js +0 -9
  130. package/dist/assets/TransactionDetailRoutes-DU3uU0Z2.js +0 -1
  131. package/dist/assets/TransactionListRoutes-D3tfHZRe.js +0 -1
  132. package/dist/assets/TreasuryRoutes-BQUMvjLl.js +0 -37
  133. package/dist/assets/WiseConfirmationScreen-BO3g29Y3.js +0 -12
  134. package/dist/assets/ZeniAccountStatementScreen-BzCGIt9g.js +0 -9
  135. package/dist/assets/epic-Q5joXsBe.js +0 -2
  136. package/dist/assets/expenseAutomationHelper-B7ApIVZ5.js +0 -1
  137. package/dist/assets/getLocaleForTenant-D-bWRuyq.js +0 -1
  138. package/dist/assets/useActualMatchingMatchDetail-LBgCFe2H.js +0 -1
  139. package/dist/assets/useAskAiCfoHostNavButtonProps-DKLqhK10.js +0 -1
  140. package/dist/assets/useEmailConnectResultRefresh-4Hy7m9c8.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-DkGrTQCv.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CtdwYwhn.js"><link rel="modulepreload" crossorigin href="/assets/core-CwBMiqNL.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-i8LQZ4dn.js"><link rel="modulepreload" crossorigin href="/assets/mui-Dfx-_nSM.js"><link rel="modulepreload" crossorigin href="/assets/analytics-ByQsPrAn.js"><link rel="modulepreload" crossorigin href="/assets/utils-gkknwj7z.js"><link rel="stylesheet" crossorigin href="/assets/index-BQ3cXEYt.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-BfNeAGgC.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-BF2EAQwc.js"><link rel="modulepreload" crossorigin href="/assets/core-Beu9kTtR.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-1d5RmIXy.js"><link rel="modulepreload" crossorigin href="/assets/mui-DEiF_Hb4.js"><link rel="modulepreload" crossorigin href="/assets/analytics-k_LuQgHs.js"><link rel="modulepreload" crossorigin href="/assets/utils-CaDQp8mU.js"><link rel="stylesheet" crossorigin href="/assets/index-BQ3cXEYt.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/web-app-ui",
3
- "version": "5.3.80-dev",
3
+ "version": "5.3.81-dev",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -28,9 +28,9 @@
28
28
  "@sentry/core": "^9.42.1",
29
29
  "@sentry/react": "^9.42.1",
30
30
  "@stripe/stripe-js": "^4.4.0",
31
- "@zeniai/client-analytics": "2.1.1",
32
- "@zeniai/client-epic-state": "5.2.77",
33
- "@zeniai/web-components": "4.4.18",
31
+ "@zeniai/client-analytics": "2.1.2",
32
+ "@zeniai/client-epic-state": "5.2.78",
33
+ "@zeniai/web-components": "4.4.19",
34
34
  "color": "3.1.3",
35
35
  "crypto-js": "4.2.0",
36
36
  "dnd-core": "^16.0.1",
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-BRYN0f-U.js";import{A as i}from"./AddressScreen-CCnb-EUz.js";import s from"./NotFoundScreen-GxItN6Rj.js";import"./sentry-CtdwYwhn.js";import{n as d,o as r}from"./core-CwBMiqNL.js";import"./zeni-epic-state-i8LQZ4dn.js";import"./recharts-B9JU7twj.js";import"./index-DkGrTQCv.js";import"./mui-Dfx-_nSM.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.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]="81cbb5c1-1b56-4d87-a240-ae6c03b91825",t._sentryDebugIdIdentifier="sentry-dbid-81cbb5c1-1b56-4d87-a240-ae6c03b91825")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
@@ -1,22 +0,0 @@
1
- import{j as S}from"./liveblocks-BRYN0f-U.js";import{a as n}from"./sentry-CtdwYwhn.js";import{u as _t,h as Lt,i as Bt,g as Ft,j as v,l as Mt}from"./core-CwBMiqNL.js";import{e4 as $t,a as Nt,g as Vt,e5 as Gt,z as Ht,$ as zt,e6 as qt,e7 as Wt,e8 as Yt,bn as Be,e9 as We,ea as Jt,bm as Ye,a2 as ge,a6 as ce,j as $,eb as me,ec as Zt,ed as Kt,as as Xt,Q as es,w as ts,ee as ss,ef as ns,at as as,eg as os,eh as is,ei as rs,ej as ls,p as us,bi as Fe,ek as ds}from"./index-DkGrTQCv.js";import{fH as M,gw as R,Ul as cs,a2z as ms,a2A as Ss,jQ as hs,a2B as ps,jN as fs,a2C as Se,jt as J,jW as Z,jz as Ie,jg as he,je as gs,jY as Is,jI as Je,Uu as Me,gy as N,gN as Cs,Ut as ks,Ue as $e,fI as bs,j7 as vs,a2D as Es,gb as Ps,jp as ws,jl as ys,fJ as pe,gi as xs,a2E as Rs,a2F as Ts,a2G as js,gx as Os,gr as Ne,k8 as Ve,gt as Ge,gz as As,a2H as He,jZ as Ds,ji as Qs,jC as Us,jU as ze,jF as _s,gA as Ls,gB as Bs,gC as Fs,gD as Ms}from"./zeni-epic-state-i8LQZ4dn.js";import{D as $s,n as V,S as Ns,v as Vs}from"./mui-Dfx-_nSM.js";import{u as Gs}from"./useAiCfoDashboardSuggestedQuestionsChips-DoWDjx7a.js";import{p as Hs}from"./pathToGoBack-DNpXyO9i.js";import{j as zs}from"./routePaths-BqbAkalx.js";import{u as qs}from"./useTaskManagerPusherEvents-D4l5mFQo.js";import"./recharts-B9JU7twj.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="4b64901e-939d-4ddf-9336-218181331b91",t._sentryDebugIdIdentifier="sentry-dbid-4b64901e-939d-4ddf-9336-218181331b91")}catch{}})();const Ws=["claimed","running","succeeded","failed","timeout"],fe=t=>typeof t=="string"&&t!=="",Ze="chat-response-generated";function Ys(t,r){if(r.kind!=="save")return;if(r.fetchState==="In-Progress")return{status:"saving"};if(r.fetchState==="Error")return{status:"failed"};if(r.fetchState!=="Completed")return;const h=R(t).skills.find((s=>s.macroId===r.savedMacroId));return h==null?void 0:{status:"saved",command:h.name}}const Js=Mt((function(t,r){const h=M(t),s=r.isSubmitting,d=h.uiState?.currentChatSessionId,l=d!=null?xs(t.aiCfoState,d):[],i=ns(t,{allUsers:r.allUsers,onCardPolicyVendorSearchTextChange:r.onCardPolicyVendorSearchTextChange}),g=Rs(t),p=Ts(t),f=js(t);return{showSampleQuestions:r.sessionFromUrl==="explore"&&h.uiState.currentChatSessionId==null,aiCfoView:h,isSubmitting:s,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${as}/tableDownload`,exportDownloadEndPoint:rs(),emailLinkQuestion:r.emailLinkQuestion,autoSubmitEmailLinkQuestion:r.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:r.onEmailLinkQuestionProcessed,routedInitialQuestionSource:r.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:r.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:r.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:r.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:r.isFileUploadEnabled,isUploadPromoVisible:r.isUploadPromoVisible,onUploadPromoClose:r.onUploadPromoClose,skills:R(t).skills,skillSaveState:Ys(t,f),skillsEnabled:R(t).skillsEnabled,skillsList:R(t).skills,skillsListError:R(t).fetchState==="Error",skillsListLoading:R(t).fetchState==="In-Progress",skillsCanPublish:R(t).canPublish,skillSaving:f.fetchState==="In-Progress",skillSaveError:f.fetchState==="Error",skillVersionHistory:g.macroId!=null?{macroId:g.macroId,versions:g.versions,error:g.fetchState==="Error",loading:g.fetchState==="In-Progress"}:void 0,skillRestoreBody:p.macroId!=null&&p.version!=null?{macroId:p.macroId,version:p.version,instructions:p.instructions,error:p.fetchState==="Error",loading:p.fetchState==="In-Progress"}:void 0,skillDetail:Z(t).detail,skillDetailError:Z(t).fetchState==="Error",skillDetailLoading:Z(t).fetchState==="In-Progress",syntheticAnswers:l,resolveSyntheticAnswerCardTile:is(t),resolveSyntheticAnswerPolicyTile:os(t),...i}}),(function(t,r){const{location:h,currentTenant:s,userId:d,navigate:l,currentChatSessionId:i,allSessionsWithOrderedQuestionAnswers:g,isAiCardCreationEnabled:p,isCardPolicyEnabled:f,setIsAiCfoOpen:L}=r,B=s.tenantEmailDomain;return{onEventReceived:(a,o)=>{if(a===Ze&&typeof o.text=="string"&&typeof o.metadata=="object"){const c=o,j=Ls(c.type),E=c.metadata.chat_session_id??null,{currentChatSession:O,currentQuestionAnswer:G,currentQuestionAnswerSummary:A}=Ye(g,E);j!=="answer"?$.trackAICFOChatResponseGenerated(j,G?.question.questionText??"",c.text,E,ds(A,O),c.metadata.message_id??null):$.trackAICFOChatAnswerGenerated(c.text,G?.question.questionText??"",(c.follow_up_questions?.length??0)>0,!!c.assumptions,!!c.insights,c.visualization!=null,Bs(c.visualization?.type??"")??null,E,c.summarized_title,c.metadata.message_id??null),t(Fs({chatSessionId:c.metadata.chat_session_id,responseType:j,fetchState:{fetchState:"Completed",error:void 0}})),t(Ms({chatSessionId:c.metadata.chat_session_id,answerPayload:c,userId:d}))}},onSubmit:(a,o,c,j,E)=>{a&&Fe(t,a,o,i,g,d,j,c,void 0,E)},onFetchSkills:()=>{t(Je())},onOpenSkill:a=>{t(Ie({macroId:a})),t(_s({macroId:a}))},onSaveSkill:(a,o)=>{t(ze({draft:a,macroId:o}))},onSaveSkillDraft:a=>{const o=a.displayName?.trim()??"",c=a.name?.trim()??"";t(ze({draft:{name:o.length>0?o:c,description:a.description?.trim()??null,instructions:a.instructions,visibility:"private"}}))},onFetchSkillVersionBody:(a,o)=>{t(Us({macroId:a,version:o}))},onDeleteSkill:a=>{t(Qs({macroId:a}))},onSetSkillVisibility:(a,o)=>{t(Ds({macroId:a,visibility:o}))},onCloseSkillDetail:()=>{t(He())},onRunSkill:(a,o)=>{t(N()),t(Ne()),Fe(t,o,"user_input",void 0,g,d,void 0,void 0,void 0,a),t(He())},updateCurrentInput:a=>{t(Ge(a))},onStopSubmit:()=>{},onUpdateScrollYOffset:a=>{t(As(a))},onSelectSampleQuestion:()=>{},onBackClick:()=>{l(-1)},onCloseClick:()=>{const a=ge(h.state?.pathnameStackToGoBack),o=a.poppedPathname??Hs(1);l(o,{state:{...h.state,pathnameStackToGoBack:a.newStack}}),t(Ge(""))},togglePageView:()=>{const a=ge(h.state?.pathnameStackToGoBack),o=a.poppedPathname??`/${s.tenantEmailDomain}/dashboard`;l(o,{state:{...We(h.state),pathnameStackToGoBack:a.newStack,message:"open_ai_cfo_drawer"}}),L(!0)},onCopy:()=>{},onThumbsUp:(a,o)=>{i!=null&&o?.messageId!=null&&t(Ve(i,o.messageId,"positive",o.questionText,o.answerText))},onThumbsDown:(a,o)=>{i!=null&&o?.messageId!=null&&t(Ve(i,o.messageId,"negative",o.questionText,o.answerText))},onTogglePageView:()=>{l(-1)},onNewChatClick:()=>{t(N()),i!=null&&t(Ne());const a=us(h.state?.pathnameStackToGoBack,h.pathname);l(`/${s.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:a.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(a,o)=>{t(Os({questionAnswerId:a,isCollapsed:o}))},onMenuClick:r.onMenuClick,...ls(t,{isAiCardCreationEnabled:p,isCardPolicyEnabled:f,currentChatSessionId:i,onAfterCardsCreationSubmit:()=>{L(!0),l(`/${B}/cards`,{state:{...h.state}})},onAfterCardPolicySubmit:()=>{L(!0),l(`/${B}/cards/policy`,{state:{...h.state}})}})}}))(ts(ss)),bn=({isFileUploadEnabled:t})=>{const r=$t(),{setIsAiCfoOpen:h}=Nt(),s=_t(),d=Lt(),{session_id:l}=Bt(),i=Ft(),g=new URLSearchParams(i.search).get("routine")??void 0,[p,f]=n.useState(!1),L=v((e=>M(e).uiState.isSkillsBrowserOpen===!0)),B=v((e=>R(e).skillsEnabled)),a=v((e=>M(e).uiState.isRoutinesBrowserOpen===!0)),o=v((e=>cs(e))),c=v((e=>ms(e))),j=v((e=>Ss(e))),[E,O]=n.useState(void 0),[G,A]=n.useState(!1),[Ke,Ce]=n.useState(void 0),Xe=n.useCallback((()=>{Ce(void 0),O(void 0),A(!0)}),[]),et=n.useCallback((e=>{O(e),A(!0)}),[]),tt=n.useCallback((()=>{O(void 0),A(!1)}),[]),st=n.useCallback((e=>{s(hs({draft:e,...E!=null&&{scheduleId:E.scheduleId}})),O(void 0),A(!1)}),[s,E]),P=g,ke=o.routines.find((e=>e.scheduleId===P)),C=v((e=>ps(e))),nt=n.useCallback((e=>{s(fs({scheduleId:e.scheduleId}))}),[s]);n.useEffect((()=>{s(P!=null?J({scheduleId:P}):Se())}),[s,P]);const F=ke?.macroId,at=v((e=>Z(e))),be=F!=null&&F!==""&&at.fetchState==="Not-Started";n.useEffect((()=>{be&&F!=null&&s(Ie({macroId:F}))}),[s,be,F]);const ot=v((e=>M(e).uiState.currentChatSessionId))??l,k=o.routines.find((e=>e.scheduleId===g))??o.routines.find((e=>e.scheduleId===Vt(ot))),T=k?.scheduleId??null,[ve,it]=n.useState(!0);n.useEffect((()=>{T!=null&&s(J({scheduleId:T}))}),[s,T]);const Ee=C.runs.some((e=>e.status==="claimed"||e.status==="running"))===!0;n.useEffect((()=>{if(P==null||Ee!==!0)return;const e=window.setInterval((()=>{s(J({scheduleId:P})),s(he())}),5e3);return()=>window.clearInterval(e)}),[s,Ee,P]);const rt=n.useCallback((e=>{Ce(e),O(void 0),A(!0)}),[]),lt=n.useCallback((e=>{s(gs({scheduleId:e.scheduleId}))}),[s]),ut=n.useCallback(((e,m)=>{s(Is({enabled:m,scheduleId:e.scheduleId}))}),[s]);n.useEffect((()=>{a&&s(he())}),[s,a]);const Pe=v((e=>R(e).skills)),K=n.useMemo((()=>Pe.map((e=>({macroId:e.macroId,name:e.displayName??e.name})))),[Pe]),dt=n.useCallback((e=>{s(Ie({macroId:e}))}),[s]),X=n.useCallback((()=>{s(Je()),s(Me())}),[s]),ct=n.useCallback((()=>{s(N())}),[s]),{allUsers:mt,isAiCardCreationEnabled:St,isCardPolicyEnabled:ht,onCardPolicyVendorSearchTextChange:pt}=Gt();n.useEffect((()=>{s(Cs())}),[s]);const I=v((e=>M(e))),y=Ht.getSignedInUser();n.useEffect((()=>l==="routines"?(s(N()),void s(ks())):l==="skills"?(s(Se()),s($e()),void s(Me())):(T==null&&s(Se()),s($e()),void s(N()))),[s,T,g,l]);const ft=zt(),D=Xt(ft),b=v((e=>bs(e))),u=I.uiState.currentChatSessionId,w=b.tenantEmailDomain,_=w!=null&&w!=="",ee=n.useCallback((e=>{_&&d(`/${w}/ai-cfo/routines?routine=${encodeURIComponent(e.scheduleId)}`)}),[_,d,w]),te=n.useCallback((()=>{_&&d(`/${w}/ai-cfo/routines`)}),[_,d,w]),se=n.useCallback(((e,m)=>{const Q=e.sessionId??C.sessionId;Q!=null&&_&&d(`/${w}/ai-cfo/${Q}?routine=${encodeURIComponent(m)}`)}),[_,d,C.sessionId,w]),gt=n.useMemo((()=>k==null?void 0:{error:C.fetchState==="Error",kind:"routineRuns",loading:C.fetchState==="In-Progress"||C.fetchState==="Not-Started",routineName:k.name,schedule:qt(k),skillName:k.isAdHoc===!0?void 0:K.find((e=>e.macroId===k.macroId))?.name,onOpenSkill:k.isAdHoc===!0?void 0:X,runs:C.runs,tzName:k.tzName,unreadCount:k.unreadRuns,open:ve,onToggle:()=>it((e=>!e)),onOpenRun:e=>se(e,k.scheduleId),onOpenRoutine:()=>ee(k),onOpenRoutines:te}),[X,te,ee,se,ve,k,C.fetchState,C.runs,K]),{handleUploadPromoClose:It,isUploadPromoVisible:Ct}=Wt({isFileUploadEnabled:t,tenantEmailDomain:w}),ne=Yt({currentTenant:b,currentChatSessionId:u,aiCfoView:I,skillsEnabled:B,onCloseSkills:ct,onOpenSkills:X}),{isSuggestedQuestionsLoading:kt,suggestedPromptQuestions:bt}=Gs(),H=i.state,z=H?.aiCfoInitialQuestion,we=!!H?.aiCfoShouldSubmit;n.useEffect((()=>{const e=i.state;if(e?.[Be]!==!0)return;f(!0);const m={...e};delete m[Be],d(i,{replace:!0,state:m})}),[i.pathname,i.search,i.state,d]);const[vt,ae]=n.useState(null),[Et,oe]=n.useState(!1),[Pt,ie]=n.useState(void 0),[wt,re]=n.useState(void 0),ye=n.useRef(!1);n.useEffect((()=>{if(!ye.current&&z!=null&&z!==""){const e=i.state;ae(z),oe(we),ie(e?.aiCfoInitialSubmissionSource!=null?e.aiCfoInitialSubmissionSource:void 0);const m=e?.aiCfoSuggestionIndex;re(typeof m=="number"?m:void 0),ye.current=!0}}),[z,we,i.state]);const yt=n.useCallback((()=>{ae(null),oe(!1),ie(void 0),re(void 0),d(i.pathname,{replace:!0,state:We(i.state)})}),[i.pathname,i.state,d]),xe=n.useMemo((()=>new URLSearchParams(i.search)),[i.search]),Re=xe.get("ref")??H?.aiCfoRef,le=xe.get("emailRefId")??H?.aiCfoEmailRefId,Te=n.useRef(!1);n.useEffect((()=>{Te.current||Re!=="month-end-email"||le==null||u!=null||y==null||(s(vs("controller",y.userId,le,"MONTH_END_EMAIL")),Te.current=!0)}),[Re,le,u,s,y]);const q=I.uiState.lastContextMessage;n.useEffect((()=>{q!=null&&q!==""&&u!=null&&(ae(q),oe(!0),ie(void 0),re(void 0),s(Es()))}),[q,u,s]);const xt=b.masterTOSInfo,x=xt?.isMasterTOSAccepted??!1,{visitedSessions:je}=Jt(u),W=I.fetchState,Y=I.uiState.chatSessionsNextPageToken.hasMore||!I.uiState.chatSessionsFirstPageFetched,Oe=u!=null?I.fetchChatSessionHistoryByChatSessionId?.[u]?.fetchState??"Not-Started":"Not-Started",Ae=u==null||(I.uiState.chatHistoryNextPageToken[u]?.hasMore??!0),De=I.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:Rt}=Ye(De,u),Tt=Rt.length===0;n.useEffect((()=>{x||D||d("../dashboard",{state:{...i.state,message:"open_ai_cfo_drawer"}})}),[x,D,d,i.state]);const jt=n.useCallback((()=>{const e=ge(i.state?.pathnameStackToGoBack),m=b.tenantEmailDomain;d(e.poppedPathname??(m!=null?`/${m}/dashboard`:".."),{state:{...i.state,pathnameStackToGoBack:e.newStack}})}),[b.tenantEmailDomain,i.state,d]),Qe=n.useRef(void 0),Ue=n.useRef(void 0);n.useEffect((()=>{const e=l!==Qe.current,m=u!==Ue.current;Qe.current=l,Ue.current=u,l!==u&&(!e||l==null||zs(l)?m&&u!=null&&d(`../ai-cfo/${u}`,{state:{...i.state}}):s(Ps({sessionId:l,agentId:"controller"})))}),[u,l]);const Ot=n.useMemo((()=>({events:je.map((e=>`private-encrypted-chat-${e}.${Ze}`)),eventCallback:(e,m,Q)=>Q.onEventReceived(e,m)})),[je]);n.useEffect((()=>{W!=="In-Progress"&&Y&&s(ws())}),[W,Y,s]),n.useEffect((()=>{u!=null&&Oe!=="In-Progress"&&Ae&&y!=null&&(l===u||W==="Completed"&&!Y)&&s(ys(u,y.userId))}),[Oe,W,Ae,Y,u,y,l,s]);const ue=y?.userId,At=n.useMemo((()=>{return ue==null?[]:[(e=ue,`private-encrypted-routines-${e}.routine-run-updated`)];var e}),[ue]),_e=n.useCallback((e=>{const m=e!=null&&(e===P||e===T);(a||m)&&s(he()),m&&s(J({scheduleId:e}))}),[s,a,T,P]);qs({events:At,onSubscribed:()=>_e(P??T),onEvent:(e,m)=>{const Q=(de=>{if(de==null||typeof de!="object")return null;const U=de;return fe(U.schedule_id)&&fe(U.run_id)?{scheduleId:U.schedule_id,runId:U.run_id,status:Ws.find((Ut=>Ut===U.status))??null,finishedAt:fe(U.finished_at)?U.finished_at:null}:null})(m);Q!=null&&_e(Q.scheduleId)}});const Le=e=>e.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(y==null||l==null)throw Error("Can't access AI Controller page without signing in...");const Dt=u!=null&&I.responseStateByChatSessionId?.[u]?.answer?.fetchState==="In-Progress";if(!x&&D)return S.jsxs(Ks,{children:[S.jsx(ce,{analytics:$,onLoad:Le}),ne.drawerElement,S.jsx(Xs,{children:S.jsx(qe,{children:S.jsx(me,{isTOSAccepted:!1,acceptMasterTOSState:I.masterTOSAcceptanceState,onCloseClick:jt,onCompleteClick:()=>{b.userRoleId!=null&&s(pe(b.userRoleId))}})})})]});const Qt=S.jsxs(S.Fragment,{children:[p&&!x?S.jsx(ce,{analytics:$,onLoad:Le}):null,S.jsx(me,{isTOSAccepted:x,acceptMasterTOSState:I.masterTOSAcceptanceState,showHeader:!1,togglePageView:x?()=>f(!1):void 0,onCloseClick:()=>f(!1),onCompleteClick:()=>{x||b.userRoleId==null||s(pe(b.userRoleId)),f(!1)}})]});return S.jsxs(S.Fragment,{children:[S.jsxs(Zs,{children:[S.jsx(ce,{analytics:$,onLoad:e=>e.trackPageLoaded(es.Event.aiCFOPage)}),D&&ne.drawerElement,S.jsx(Js,{answerExportEndPoint:r,...Ot,currentChatSessionId:u,allSessionsWithOrderedQuestionAnswers:De,allUsers:mt,isAiCardCreationEnabled:St,isCardPolicyEnabled:ht,openOnboardingPage:()=>f(!0),userId:y.userId,setIsAiCfoOpen:h,navigate:d,sessionFromUrl:l,location:i,isSubmitting:Dt,isEmptyChatWithSession:Tt,currentTenant:b,emailLinkQuestion:vt??void 0,autoSubmitEmailLinkQuestion:Et,onEmailLinkQuestionProcessed:yt,routedInitialQuestionSource:Pt,routedInitialQuestionSuggestionIndex:wt,onCardPolicyVendorSearchTextChange:pt,onMenuClick:D?ne.open:void 0,isFileUploadEnabled:t,isUploadPromoVisible:Ct,onUploadPromoClose:It,exploreSuggestedPromptQuestions:bt,exploreSuggestedPromptQuestionsLoading:kt,isSkillsOpen:L,isRoutinesOpen:a,routineCanCreate:j,routineEditing:E,routineEditorOpen:G,routineListError:o.fetchState==="Error",routineListLoading:o.fetchState==="In-Progress",routineMaxRoutines:o.maxRoutines,routineSaveError:c.fetchState==="Error",routineSaving:c.fetchState==="In-Progress",routineSchedulableSkills:K,routines:o.routines,onRoutineCreate:Xe,onRoutineDelete:lt,routineHistoryError:C.fetchState==="Error",routineHistoryLoading:C.fetchState==="In-Progress",chatSidePanel:gt,routineDetail:ke,routineRunningScheduleId:c.runningScheduleId,routineRuns:C.runs,onRoutineEdit:et,onRoutineOpenRun:(e,m)=>se(m,e.scheduleId),onRoutineRun:nt,onRoutineCloseDetail:te,onRoutineDraft:rt,routineDraftPrompt:Ke,onRoutineOpenDetail:ee,onRoutineEditorCancel:tt,onRoutineLoadSkillInstructions:dt,onRoutineSave:st,onRoutineSetEnabled:ut,isCreateSkillEnabled:B,promoDismissalScope:w}),p&&D?S.jsx($s,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:en,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:S.jsx(qe,{onClick:e=>e.stopPropagation(),children:S.jsx(me,{isTOSAccepted:x,acceptMasterTOSState:I.masterTOSAcceptanceState,onCloseClick:()=>f(!1),onCompleteClick:()=>{x||b.userRoleId==null||s(pe(b.userRoleId)),f(!1)}})})}):null]}),p&&!D?S.jsx(Zt,{open:p,onClose:()=>f(!1),children:S.jsx(Kt,{children:Qt})}):null]})},qe=V(Ns)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Zs=V.div`
6
- height: 100vh;
7
- width: 100%;
8
- `,Ks=V.div`
9
- height: 100vh;
10
- width: 100%;
11
- display: flex;
12
- flex-direction: column;
13
- min-height: 0;
14
- `,Xs=V.div`
15
- flex: 1;
16
- min-height: 0;
17
- display: flex;
18
- flex-direction: column;
19
- `,en=V(Vs)`
20
- box-shadow: ${({theme:t})=>t.colors.elevation2};
21
- color: ${({theme:t})=>t.colors.grey4};
22
- `;export{bn as default};
@@ -1,11 +0,0 @@
1
- import{j as I}from"./liveblocks-BRYN0f-U.js";import{a as o}from"./sentry-CtdwYwhn.js";import{u as F,h as R,g as z,j as C,N as w}from"./core-CwBMiqNL.js";import{U9 as H,fI as q,go as G,pW as Q,gP as U,gn as V,gl as W,Uz as B,gk as A}from"./zeni-epic-state-i8LQZ4dn.js";import{u as J,z as E,L as T,G as K,I as M}from"./index-DkGrTQCv.js";import{n as X}from"./mui-Dfx-_nSM.js";import{P as b,a as _}from"./AccountMappingScreen-Bcei3-vV.js";import{t as Y}from"./getLocaleForTenant-D-bWRuyq.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-BSApL2S-.js";import"./recharts-B9JU7twj.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.js";import"./MobileAppDrawer-Nsld3D4E.js";import"./InboxNotificationsProvider-CI2xYI-T.js";import"./useTaskManagerAccess-Cl_haJW7.js";import"./accountMappingHelper-BfwxvEfG.js";import"./empty-Dht4a5WU.js";import"./pdf-lib-BHEe7wIM.js";import"./index-BeQGSCiG.js";import"./url-BLzkJaXj.js";import"./index-OLztW-Jv.js";import"./decodeURIComponentSafe-D1z7pLx5.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]="f412cb40-07b0-420a-aece-0074b045ed90",t._sentryDebugIdIdentifier="sentry-dbid-f412cb40-07b0-420a-aece-0074b045ed90")}catch{}})();const te=X.div`
2
- display: flex;
3
- flex: 1 1 auto;
4
- flex-direction: row;
5
- justify-content: center;
6
- align-items: center;
7
- width: 100%;
8
- height: 100vh;
9
- background-color: ${t=>t.theme.colors.background};
10
- box-shadow: ${t=>`0px 2px ${M.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function we(){const t=F(),i=R(),v=z(),{setLoading:d,clearAllLoading:m}=J(),h=o.useRef(!1),S=o.useRef(!1),N=o.useRef(!1),p=o.useRef(!1),{code:O,realmId:$,state:L}=Z(v.search),f=O!==""&&$!==""&&L!=="";f&&(N.current=!0);const j=sessionStorage.getItem(b),u=j===_.pending,P=j===_.ready,x=C((s=>H(s))),e=C((s=>q(s))),n=C((s=>s.tenantState.fetchState)),r=C((s=>s.tenantState.activeTenantFetchState.fetchState)),a=E.getSignedInUser(),g=E.getActiveTenantForUser()?.tenantId,l=e?.externalConnections?.fetchState,c=e?.externalConnections?.saveConnectionState,y=e.externalConnections?.accounting[0]?.isValid;o.useLayoutEffect((()=>{d(T.CONNECTION_AUTH)}),[d]),o.useEffect((()=>{h.current||a==null||g==null||(h.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(T.TENANT_FETCHING),t(G(a.userId,g))))}),[h,n,d]),o.useEffect((()=>{e.tenantId==null&&!S.current&&a!=null&&(S.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(Q(a.userId)))}),[S,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||c!=="Error"||(d(T.CONNECTION_AUTH),t(U(a.userId,e.tenantId)))}),[c]),o.useEffect((()=>{n!=="Completed"&&r!=="Completed"||a==null||e?.tenantId==null||(t(V(e.tenantId)),E.saveActiveTenantDomainForUser(e.tenantEmailDomain),W(a?.userId,a?.zeniSessionId,e.tenantId),K.updateAppLocaleID(Y(B(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||a==null||e==null||t(U(a.userId,e.tenantId)))}),[n,r,l]),o.useEffect((()=>{x.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&E.saveSignedInUserTenants(x.tenantsCoreDetailsInOrder)}),[x.tenantsCoreDetailsInOrder.length,n]);const D=e==null||n!=="Completed"&&r!=="Completed"||l!=="Completed";if(o.useEffect((()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||l!=="Completed"&&l!=="Error"||m()}),[n,r,l]),o.useEffect((()=>{u&&c==="In-Progress"&&(p.current=!0)}),[u,c]),o.useEffect((()=>{if(!u||D)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return p.current&&c==="Completed"?(sessionStorage.setItem(b,_.ready),m(),void i(s,{replace:!0})):p.current&&c==="Error"?(sessionStorage.removeItem(b),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),void i(s,{replace:!0})):void(f||N.current||p.current||y!==!0||(sessionStorage.removeItem(b),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),i(s,{replace:!0})))}),[u,D,c,f,y,e.tenantEmailDomain,m,t,i]),D)return null;if(f||y!==!0)return I.jsx(te,{children:I.jsx(ee,{})});if(u)return null;const k=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return P?I.jsx(w,{to:k,replace:!0}):I.jsx(w,{to:"/",replace:!0})}export{we as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-BRYN0f-U.js";import{z as m}from"./index-DkGrTQCv.js";import{g as n}from"./QBOConnectionScreen-BSApL2S-.js";import"./sentry-CtdwYwhn.js";import{g as p,N as a}from"./core-CwBMiqNL.js";import"./zeni-epic-state-i8LQZ4dn.js";import"./recharts-B9JU7twj.js";import"./mui-Dfx-_nSM.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.js";import"./empty-Dht4a5WU.js";import"./pdf-lib-BHEe7wIM.js";import"./index-BeQGSCiG.js";import"./url-BLzkJaXj.js";import"./index-OLztW-Jv.js";import"./decodeURIComponentSafe-D1z7pLx5.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]="a1205b81-d106-415b-bd92-85aeae53ace3",t._sentryDebugIdIdentifier="sentry-dbid-a1205b81-d106-415b-bd92-85aeae53ace3")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-BRYN0f-U.js";import{$ as f,a9 as l}from"./index-DkGrTQCv.js";import{u as c,D as p}from"./mui-Dfx-_nSM.js";import"./sentry-CtdwYwhn.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]="0a5deef5-89fb-4f1a-a578-78487c6fdc33",e._sentryDebugIdIdentifier="sentry-dbid-0a5deef5-89fb-4f1a-a578-78487c6fdc33")}catch{}})();const u={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=f(),s=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),d=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:a})}export{h as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BRYN0f-U.js";import{a as d}from"./sentry-CtdwYwhn.js";import{h as A,u as G,g as q,i as W,j as l,N as X,l as F,n as N,o as O}from"./core-CwBMiqNL.js";import{Xb as _,fI as M,Ws as R,n3 as Y,St as I,Xg as $,X5 as z,m3 as V,Su as S,Wx as H,Wy as J,X7 as K,X6 as L}from"./zeni-epic-state-i8LQZ4dn.js";import{b6 as Q,j as U,a2 as Z,p as tt}from"./index-DkGrTQCv.js";import"./mui-Dfx-_nSM.js";import{d as b}from"./decodeURIComponentSafe-D1z7pLx5.js";import{w as et}from"./withTransactionSidePanel-yH5Pz4v0.js";import{f as nt,c as at}from"./routePaths-BqbAkalx.js";import"./recharts-B9JU7twj.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.js";import"./useAskAiCfoHostNavButtonProps-DKLqhK10.js";import"./TransactionDetailScreen-Dvz5L_Kb.js";import"./useInitialThreadRequest-36YDj4P5.js";import"./expenseAutomationHelper-B7ApIVZ5.js";import"./stripSplatSuffix-Cx4eVHX0.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="08b3ed8d-7199-42dd-8c61-e37634832f0b",n._sentryDebugIdIdentifier="sentry-dbid-08b3ed8d-7199-42dd-8c61-e37634832f0b")}catch{}})();const ot=F((function(n,t){const e=t.entity,o=$(n,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(n,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:V(n)}}),(function(n,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${at(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?n(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&n(L("common"))},onAutoCompleteEntity:e=>{const o=nt(e,t.tenantEmailDomain);n(H()),n(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??k();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&n(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};n(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),n(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:n,...t}){const e=A(),o=G(),c=q(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:j}=W(),r=b(x??""),p=b(j??""),u=rt(r,p),w=[r,p].filter((a=>a!=null)),i={name:p,id:r,type:n,zeniId:r,qboId:r},D=l((a=>_(a.customerIncomeState,a.vendorExpenseState,a.trendState,i,"quarter"))),v=l((a=>M(a).company?.companyInfo.firstMonthOfFY??1)),f=l((a=>R(a.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(Y(i)))}),[m,u,i]);const E=l((a=>a.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??D,B=(function(a,y){return a!=null&&y!=null?{startDate:a.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,D);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(X,{to:k(w.length)})})),rt=(n,t)=>t!=null&&t.length>0&&n!=null&&n.length>0,k=(n=2)=>{let t="../";for(let e=0;e<n;e++)t=`${t}../`;return t};function vt({entityType:n}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:n})})})}export{vt as EntityDetailRoutes,vt as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BRYN0f-U.js";import{a as r}from"./sentry-CtdwYwhn.js";import{au as i,av as b,r as f,a2 as l}from"./index-DkGrTQCv.js";import"./mui-Dfx-_nSM.js";import p from"./NotFoundScreen-GxItN6Rj.js";import{h as m,g as u}from"./core-CwBMiqNL.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]="3e0b62bd-24c2-4dc7-beeb-ffec556cb516",e._sentryDebugIdIdentifier="sentry-dbid-3e0b62bd-24c2-4dc7-beeb-ffec556cb516")}catch{}})();const _=()=>{const e=m(),t=u(),a=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),c=r.useCallback((()=>{(()=>{const n=l(t.state?.pathnameStackToGoBack),d=n.poppedPathname??k();e(d,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(t.pathname);return o!=null?s.jsx(b,{menuItem:f(o),onDemoClick:a,onGoBack:c}):s.jsx(p,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{_ as F};
@@ -1 +0,0 @@
1
- import{a as i}from"./sentry-CtdwYwhn.js";import{u as l,h as m,g as p}from"./core-CwBMiqNL.js";import{i0 as f,UP as g,UQ as _}from"./zeni-epic-state-i8LQZ4dn.js";import{u as b,L as h,z as y}from"./index-DkGrTQCv.js";import"./liveblocks-BRYN0f-U.js";import"./recharts-B9JU7twj.js";import"./mui-Dfx-_nSM.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.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]="bde297e3-31cb-4550-a2da-7e763001e8d9",e._sentryDebugIdIdentifier="sentry-dbid-bde297e3-31cb-4550-a2da-7e763001e8d9")}catch{}})();function R(){const e=l(),n=m(),r=p(),{setLoading:o,clearAllLoading:c}=b(),s=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(f(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};
@@ -1,12 +0,0 @@
1
- import{j as f}from"./liveblocks-BRYN0f-U.js";import{a as u}from"./sentry-CtdwYwhn.js";import{u as O,g as _,h as w,t as A,j as l,N as U}from"./core-CwBMiqNL.js";import{z as r,G as M,O as P,j as V,Q as N,_ as G,X as Q,S as R}from"./index-DkGrTQCv.js";import{fI as W,Ub as X,UE as Y,Uv as $,gl as q,gn as B,UA as H,gY as J,dk as K,UF as Z,UG as ee}from"./zeni-epic-state-i8LQZ4dn.js";import{u as te,n as ne}from"./mui-Dfx-_nSM.js";import{u as se}from"./useDeviceId-Biv4dPop.js";import{f as ie}from"./analyticsHelper-BK0R0EXk.js";import{t as ae}from"./getLocaleForTenant-D-bWRuyq.js";import"./recharts-B9JU7twj.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.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]="8477d376-bb6f-4979-99f9-1d1dffd70f90",t._sentryDebugIdIdentifier="sentry-dbid-8477d376-bb6f-4979-99f9-1d1dffd70f90")}catch{}})();const C=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function Ce(){const t=O(),i=_(),m=w(),[k]=A(),n=k.get("token"),p=k.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:T,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:z}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),h=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>W(e))),b=l((e=>X(e))),D=r.getSignedInUser(),v=te().mode;u.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&C(n,p)&&a!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(Y(n,a,g)))}),[n,p,t,a,g,s?.zeniSessionId]),u.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants($(b.tenantsInOrder),s.zeniSessionId),q(s.userId,s.zeniSessionId,o.tenantId),t(B(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(H("Completed")),M.updateAppLocaleID(ae(o)),ie(s,o,v,void 0,b.tenantsInOrder),J().then((()=>{const e=R();e!=null&&P(e)})),setTimeout((()=>{V.trackLogin(N.Event.loginSuccess,"email",K(o.productSettings))}),2e3))}),[I,S,y,s,o,b,v,i.state,t]);const E=u.useCallback((()=>{m("/signin/auth")}),[m]),j=u.useCallback((()=>{a!=null&&d!=null&&c!=null&&t(Z(a,c,d))}),[a,d,t,c]),F=u.useCallback((e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(ee(e,a,c,d))}),[a,n,t,c,d]);if(h==="Completed"&&d!=null)return f.jsx(G,{phoneNumber:T,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:E});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||D!=null){const e=i.state?.origin??"/";return f.jsx(U,{to:e,state:{...i.state,origin:""}})}if(!C(n,p)||g==null||h==="Error"){const e=i.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return f.jsx(U,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return f.jsx(oe,{"data-testid":"smooth-loader",children:f.jsx(Q,{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{Ce as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-BRYN0f-U.js";import{h as r,l as i}from"./core-CwBMiqNL.js";import{ak as n}from"./index-DkGrTQCv.js";import"./mui-Dfx-_nSM.js";import"./sentry-CtdwYwhn.js";import"./zeni-epic-state-i8LQZ4dn.js";import"./recharts-B9JU7twj.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.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]="e1fe4b0b-a509-4443-892f-577d1dfd5036",o._sentryDebugIdIdentifier="sentry-dbid-e1fe4b0b-a509-4443-892f-577d1dfd5036")}catch{}})();const a=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BRYN0f-U.js";import E from"./NotFoundScreen-GxItN6Rj.js";import{a as r}from"./sentry-CtdwYwhn.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as q,n as z,o as b}from"./core-CwBMiqNL.js";import{fI as O,a1i as h,bo as B,bn as N,iP as V,gk as F}from"./zeni-epic-state-i8LQZ4dn.js";import{q as L,z as I,aq as $,dL as G}from"./index-DkGrTQCv.js";import"./mui-Dfx-_nSM.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-DKLqhK10.js";import{M as J}from"./MobileAppDrawer-Nsld3D4E.js";import"./recharts-B9JU7twj.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.js";import"./InboxNotificationsProvider-CI2xYI-T.js";import"./useTaskManagerAccess-Cl_haJW7.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]="718b8878-57bc-463d-90d8-27b0e01f9392",e._sentryDebugIdIdentifier="sentry-dbid-718b8878-57bc-463d-90d8-27b0e01f9392")}catch{}})();const K=q((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(G),Q=()=>{const e=_(),t=v(),c=L(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:f}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(F({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function be(){return s.jsxs(z,{children:[s.jsx(b,{path:"*",element:s.jsx(Q,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
@@ -1 +0,0 @@
1
- import{j as o}from"./liveblocks-BRYN0f-U.js";import Z from"./NotFoundScreen-GxItN6Rj.js";import{a as p}from"./sentry-CtdwYwhn.js";import{h as C,g as N,u as V,j as u,N as D,l as k,n as z,o as g}from"./core-CwBMiqNL.js";import{fI as E,Zn as h,ZF as R,NZ as U,NV as L,NY as f,NO as $,_2 as B,NS as F,N$ as K}from"./zeni-epic-state-i8LQZ4dn.js";import{z as T,w as O,c8 as Y,o as _,bR as q,c9 as G}from"./index-DkGrTQCv.js";import"./mui-Dfx-_nSM.js";import{u as H,R as x}from"./ReimbursementApprovalRuleDetailScreen-BeqXNmNW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="f35a7d3c-6ede-4fbf-83b8-57a0a2bb2449",e._sentryDebugIdIdentifier="sentry-dbid-f35a7d3c-6ede-4fbf-83b8-57a0a2bb2449")}catch{}})();const j="reimbursement-approval-rule-update",J=k((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:R(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(O(Y)),M=({isLoading:e})=>{const s=C(),n=N(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),S=u((r=>r.remiSetupApproverViewState.fetchState)),c=u((r=>E(r))),d=u((r=>h(r))),b=u((r=>R(r).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(w(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(r,y,I)=>{r.endsWith(j)&&I.onApprovalRulesEventReceived(r)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(D,{to:"../../promo"}):o.jsx(J,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",P=k((function(e){const s=h(e),n=R(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(B(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(K(t,!0))}}}))(O(G)),Q=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=q(e?.tenantId);return s?o.jsx(X,{isLoading:n}):o.jsx(M,{isLoading:n})},X=({isLoading:e})=>{const s=C(),n=N(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),r=u((i=>h(i)));H();const y=u((i=>R(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(w(!0),a(F(!1,!0)))}),[v,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,r,a]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,W)=>{i.endsWith(A)&&W.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(D,{to:"../../promo"}):o.jsx(P,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function le(){return o.jsxs(z,{children:[o.jsx(g,{path:"/",element:o.jsx(Q,{})}),o.jsx(g,{path:"/new",element:o.jsx(x,{})}),o.jsx(g,{path:"/:approvalRuleId/edit",element:o.jsx(x,{})}),o.jsx(g,{path:"*",element:o.jsx(Z,{})})]})}export{le as R};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-GxItN6Rj.js","assets/sentry-CtdwYwhn.js","assets/core-CwBMiqNL.js","assets/zeni-epic-state-i8LQZ4dn.js","assets/index-DkGrTQCv.js","assets/mui-Dfx-_nSM.js","assets/analytics-ByQsPrAn.js","assets/utils-gkknwj7z.js","assets/index-BQ3cXEYt.css","assets/DashboardRoutes-DBRc0Or8.js","assets/withTransactionSidePanel-yH5Pz4v0.js","assets/useAskAiCfoHostNavButtonProps-DKLqhK10.js","assets/TransactionDetailScreen-Dvz5L_Kb.js","assets/decodeURIComponentSafe-D1z7pLx5.js","assets/useInitialThreadRequest-36YDj4P5.js","assets/routePaths-BqbAkalx.js","assets/expenseAutomationHelper-B7ApIVZ5.js","assets/stripSplatSuffix-Cx4eVHX0.js","assets/analyticsHelper-BK0R0EXk.js","assets/CompanyPassportScreen-Di61-k2R.js","assets/MobileAppDrawer-Nsld3D4E.js","assets/InboxNotificationsProvider-CI2xYI-T.js","assets/useTaskManagerAccess-Cl_haJW7.js","assets/useAiCfoDashboardSuggestedQuestionsChips-DoWDjx7a.js","assets/FeaturePreviewScreen-BSbJQr46.js","assets/BillPayRoutes-D-3QQssu.js","assets/AddressScreen-CCnb-EUz.js","assets/DomesticWireDetailScreen-BFnUPd1g.js","assets/BusinessVerificationPageScreen-Br68pzy6.js","assets/DrawerScreen-BZuDNHCZ.js","assets/SetupPagesScreen-CCCYHV0e.js","assets/BillPayApprovalRoutes-CeafcVa6.js","assets/ReimbursementApprovalRuleDetailScreen-BeqXNmNW.js","assets/getLocaleForTenant-D-bWRuyq.js","assets/ReimbursementRoutes-B3er_00s.js","assets/ReimbursementApprovalRoutes-Ca-qlUQ4.js","assets/TransactionListRoutes-D3tfHZRe.js","assets/ZeniAccountStatementScreen-BzCGIt9g.js","assets/SettingsRoutes-CZdo2Uf4.js","assets/AccountMappingScreen-Bcei3-vV.js","assets/QBOConnectionScreen-BSApL2S-.js","assets/empty-Dht4a5WU.js","assets/index-BeQGSCiG.js","assets/url-BLzkJaXj.js","assets/index-OLztW-Jv.js","assets/accountMappingHelper-BfwxvEfG.js","assets/useEmailConnectResultRefresh-4Hy7m9c8.js","assets/ReportsRoutes-Dex0_5-8.js","assets/ChargeCardRoutes-DOOSlXXz.js","assets/useChargeCardPusherEvents-DWToPVaW.js","assets/PeopleRoutes-BGCnWaQs.js","assets/ExpenseAutomationRoutes-T3c98xyK.js","assets/useActualMatchingMatchDetail-LBgCFe2H.js","assets/ScheduleDetailsPrepaidExpensesScreen-Cx7FsGq-.js","assets/pathToGoBack-DNpXyO9i.js","assets/TreasuryRoutes-BQUMvjLl.js","assets/VendorsRoutes-BRCj4Vsy.js","assets/ZeniAccountRoutes-BfbO824j.js","assets/AddressRoutes-BSUkTIJx.js","assets/PandLWithForecastRoutes-g3TcyguA.js","assets/CustomerOnboardingRoutes-DQDzW12K.js","assets/TransactionDetailRoutes-DU3uU0Z2.js","assets/EntityDetailRoutes-CvRtZg4S.js","assets/InvoicingRoutes-DIPhHnCf.js","assets/NotificationRoutes-DNTr2LLS.js","assets/PerformanceRoutes-D8PsmeZu.js","assets/ActualMatchingMatchDetailScreen-D9Jig4qx.js","assets/RewardsRoutes-CpDvl104.js","assets/TaskRoutes-D3xMtlGq.js","assets/TaskListScreen-R11F2Y4F.js","assets/useTaskManagerPusherEvents-D4l5mFQo.js","assets/AiCfoScreen-2FOnohjJ.js","assets/CardsAiCfoScreen-CzorEe4Q.js"])))=>i.map(i=>d[i]);
2
- import{_ as s,bn as Es,fI as hs,e0 as ps,d$ as xs,Bd as gs,dj as Rs,c9 as js,gM as Is,gc as Ts,dg as pe,cH as As,gq as fs,cz as Ds,bF as ys,br as bs,Us as vs,v as Cs,Uv as Os,bq as Us,Uw as Ps,bL as ws,bK as Fs,bu as Ls,cv as Vs,Ux as Hs,Uy as ks,db as Bs,de as Ss,dd as Ns,cG as Ms,cN as Zs,pW as xe,gl as ge,h0 as $s,gn as Re,gO as je,gP as Ie,go as zs}from"./zeni-epic-state-i8LQZ4dn.js";import{j as e}from"./liveblocks-BRYN0f-U.js";import{a as P}from"./sentry-CtdwYwhn.js";import{N as u,u as Gs,h as qs,i as Ws,g as Ys,j as $,q as Te,n as Ks,o as n}from"./core-CwBMiqNL.js";import{K as l,u as Js,z as b,W as Qs,d as Xs,C as et,A as S,f as st,M as tt,V as nt,L as F,G as Ae,t as _,P as at,N as ot,j as ne}from"./index-DkGrTQCv.js";import{u as rt}from"./mui-Dfx-_nSM.js";import{f as fe}from"./analyticsHelper-BK0R0EXk.js";import{t as it}from"./getLocaleForTenant-D-bWRuyq.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="c0083a8f-f79d-4409-8ef9-8797ea9f7826",o._sentryDebugIdIdentifier="sentry-dbid-c0083a8f-f79d-4409-8ef9-8797ea9f7826")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-GxItN6Rj.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),be=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),v=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:C})=>{if(V===!0){if(o)return e.jsx(ye,{tenantEmailDomain:C});if(i)return e.jsx(De,{tenantEmailDomain:C});if(O)return e.jsx(be,{tenantEmailDomain:C})}return o?e.jsx(ye,{tenantEmailDomain:C}):i?e.jsx(De,{tenantEmailDomain:C}):O?e.jsx(be,{tenantEmailDomain:C}):D?e.jsx(dt,{tenantEmailDomain:C}):N?e.jsx(ut,{tenantEmailDomain:C}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-DBRc0Or8.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-D-3QQssu.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-B3er_00s.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-D3tfHZRe.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-CZdo2Uf4.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-Dex0_5-8.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-DOOSlXXz.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-BGCnWaQs.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-T3c98xyK.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-BQUMvjLl.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-BRCj4Vsy.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-BfbO824j.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-Dex0_5-8.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),Et=l((()=>s((()=>import("./AddressRoutes-BSUkTIJx.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),ht=l((()=>s((()=>import("./PeopleRoutes-BGCnWaQs.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-g3TcyguA.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-DQDzW12K.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),gt=l((()=>s((()=>import("./VendorsRoutes-BRCj4Vsy.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),Rt=l((()=>s((()=>import("./TransactionDetailRoutes-DU3uU0Z2.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-CvRtZg4S.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),jt=l((()=>s((()=>import("./DashboardRoutes-DBRc0Or8.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),Ce=l((()=>s((()=>import("./BillPayRoutes-D-3QQssu.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),It=l((()=>s((()=>import("./SettingsRoutes-CZdo2Uf4.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-DIPhHnCf.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-B3er_00s.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-BfbO824j.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),ft=l((()=>s((()=>import("./TreasuryRoutes-BQUMvjLl.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),Dt=l((()=>s((()=>import("./TransactionListRoutes-D3tfHZRe.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),yt=l((()=>s((()=>import("./ChargeCardRoutes-DOOSlXXz.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),bt=l((()=>s((()=>import("./NotificationRoutes-DNTr2LLS.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),vt=l((()=>s((()=>import("./PerformanceRoutes-D8PsmeZu.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ct=l((()=>s((()=>import("./ExpenseAutomationRoutes-T3c98xyK.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Ot=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-D9Jig4qx.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),Ut=l((()=>s((()=>import("./RewardsRoutes-CpDvl104.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Pt=l((()=>s((()=>import("./TaskRoutes-D3xMtlGq.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-2FOnohjJ.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Ue=l((()=>s((()=>import("./CardsAiCfoScreen-CzorEe4Q.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),f=l((()=>s((()=>import("./NotFoundScreen-GxItN6Rj.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-R11F2Y4F.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:C,showChargeCardRoute:H})=>{if(O===!0){if(D)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return C===!0&&H?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),$t=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=Gs(),N=qs(),{tenantEmailDomain:i}=Ws(),V=rt().mode,{setLoading:O,clearAllLoading:C,clearLoading:H}=Js(),y=b.getSignedInUserTenant(i)?.tenantId,I=b.getSignedInUser(),K=Es(I),z=Ys(),[L,we]=P.useState(!1),r=$((a=>hs(a))),{useFeatureGate:k}=Qs(),M=Xs(),J=et(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=k(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=k(S.isDebitCardFeatureEnabled),T=$((a=>a.tenantState.fetchState)),p=$((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?ps(oe,r):void 0,Q=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?gs(r)&&!Rs(r):void 0,He=st(r,Ve,oe),{isCardsHidden:ke}=tt(r?.tenantId),Be=!He||!!ke,{isFeatureEnabled:Se}=k(S.isSettingsFeatureEnabled),{isFeatureEnabled:X}=k(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=k(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||ot==="DEV",Ze=r?.userRole!=null&&js(r.userRole),G=$((a=>Is(a)));if(i!=null){const a=b.getSignedInUserTenant(i);I!=null&&a!=null&&fe(I,r,V)}const Z={tenantId:y,userId:I?.userId,sessionId:I?.zeniSessionId},ie=Ts(),h=nt(),$e=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),ze=As(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,Ge=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Ge?.params.selectedPeriod,qe=$((a=>Z.tenantId!=null?fs(a,Z.tenantId):void 0));P.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&y!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=bs();t.isAfter(d,"month")===!1?D(vs(y,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,y]),P.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,I,D,b]),P.useLayoutEffect((()=>{!Cs(ie,Z)&&b.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=b.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,D,qe))}),[y]),P.useEffect((()=>{b.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t,d,q,B){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const W=t!=null&&d?.zeniSessionId!=null,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(W&&cs){B(Re(t));const Y=b.getSignedInUserTenantWithId(t);Y?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(Ie(d.userId,t)))}else W&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(je(d.userId,t))),W&&_s&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(Ie(d.userId,t)));if(W){ne.identify(d.userId,{tenant_id:t});const Y=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),q(F.TENANT_FETCHING),B(zs(d.userId,t,d.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(d.userId,d.zeniSessionId)))}})(T,p,r,y,I,O,D))}),[y,p]),P.useEffect((()=>{b.isSignedIn()&&T==="Completed"&&G.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),b.saveSignedInUserTenants(Os(G.tenantsBaseInOrder)),I!=null&&fe(I,r,V,void 0,G.tenantsBaseInOrder))}),[G,T,r,I]),P.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(C(),_.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,y,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],q=ct[d];q!=null?q().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const U=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:We}=k(S.isReferralFeatureEnabled),{isFeatureEnabled:Ye}=k(S.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Je=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,de=!Be&&!U,Qe=Ps(h?.loggedInUserRoleMap),Xe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,me=ce&&ws(h?.loggedInUserRoleMap),_e=Fe&&!U,ss=Le&&!U,ts=ue&&Fs(h?.loggedInUserRoleMap),ns=de&&Ls(h?.loggedInUserRoleMap),as=_e&&Vs(h?.loggedInUserRoleMap),os=Hs(h?.loggedInUserRoleMap),rs=ks(h?.loggedInUserRoleMap),is=Bs(h?.loggedInUserRoleMap),ls=Ss(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),x=Ms(h?.loggedInUserRoleMap),g=Zs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&is,j=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||ze===!0||Qe===!0||os===!0||rs===!0;return b.isSignedIn()?y==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(I!=null&&T!=="In-Progress"&&D(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||K&&!ee)&&es&&Xe!==!0&&E===!1&&Q===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||K?!L||te!==!1||ee||K?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(at,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(jt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(ht,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&U===!1||Ke||Je?e.jsx(Rt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&U===!1?e.jsx(Dt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&U===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&U===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Pt,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(Et,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(At,{}):e.jsx(f,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(ft,{}):e.jsx(f,{})}),e.jsx(n,{path:"performance",element:J===!0?e.jsx(vt,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:J===!0&&U===!1?e.jsx(Ct,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:J===!0&&U===!1&&Ye===!0?e.jsx(Ot,{}):e.jsx(f,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(bt,{})}),e.jsx(n,{path:"vendors/*",element:$e?e.jsx(gt,{}):e.jsx(f,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(It,{hasAdminLevelAccess:me}):e.jsx(f,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(yt,{}):e.jsx(f,{})}),e.jsx(n,{path:"rewards/*",element:We?e.jsx(Ut,{}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(wt,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"*",element:e.jsx(f,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,$t as S};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-BRYN0f-U.js";import{a as i}from"./sentry-CtdwYwhn.js";import{u as l,g as c,N as u}from"./core-CwBMiqNL.js";import{z as n,j as a,Q as m,a5 as p}from"./index-DkGrTQCv.js";import{g$ as g,UR as y}from"./zeni-epic-state-i8LQZ4dn.js";import{n as b}from"./mui-Dfx-_nSM.js";import"./recharts-B9JU7twj.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="6688b3d0-ffa6-4182-bf64-7f0872ca5df1",t._sentryDebugIdIdentifier="sentry-dbid-6688b3d0-ffa6-4182-bf64-7f0872ca5df1")}catch{}})();function A(){const t=l(),e=c(),r=i.useRef(!1),f=n.isSignedIn(),o=e.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{t(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(d){console.error("Error during sign out:",d)}finally{window.location.replace("/signin/auth")}}}),[o,t]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.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: ${t=>t.theme.colors.grey4};
9
- `;export{A as default};
@@ -1,9 +0,0 @@
1
- import{j as A}from"./liveblocks-BRYN0f-U.js";import{a as l}from"./sentry-CtdwYwhn.js";import{u as H,k as J,j as h,h as St,g as mt,i as _t,l as Dt}from"./core-CwBMiqNL.js";import{z,W as bt,A as I,aq as Et,a6 as yt,j as ht,Q as Ct,e3 as Gt,p as F,a2 as At}from"./index-DkGrTQCv.js";import{Qr as It,Rb as Rt,fI as vt,a2p as nt,gQ as Z,a2q as rt,a2l as Bt,QL as X,a2r as Lt,QT as Y,Qt as Kt,Q5 as wt,Rn as tt,a2s as et,gk as Ut,Re as Pt,Rj as Ft,R6 as jt,R4 as at,Rk as xt,R1 as $t,a2t as Ot,a2u as Nt,a2v as Qt,a2w as qt,a2x as R,dy as zt,dx as Zt,a2y as Vt,Qq as Mt}from"./zeni-epic-state-i8LQZ4dn.js";import{n as Wt}from"./mui-Dfx-_nSM.js";import{u as Ht}from"./useAskAiCfoHostNavButtonProps-DKLqhK10.js";import{M as Jt}from"./MobileAppDrawer-Nsld3D4E.js";import{u as Xt}from"./useTaskManagerPusherEvents-D4l5mFQo.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]="ad2116b9-ab89-4636-8f7f-4182b9126644",e._sentryDebugIdIdentifier="sentry-dbid-ad2116b9-ab89-4636-8f7f-4182b9126644")}catch{}})();const p={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},Yt=(e,t)=>e==null||e===""?[]:t.map((n=>`private-encrypted-${e}.${n}`)),te=(e,t)=>e==null||e===""?[]:t.map((n=>`private-encrypted-${e}.${n}`)),j=e=>Array.isArray(e)&&e.every((t=>typeof t=="string")),ee=e=>{if(e==null||typeof e!="object")return null;const t=e,n=typeof t.task_id=="string"?t.task_id:typeof t.id=="string"?t.id:null;if(n==null||typeof t.tenant_id!="string"||typeof t.event_type!="string")return null;const u={task_id:n,tenant_id:t.tenant_id,event_type:t.event_type};return typeof t.is_private=="boolean"&&(u.is_private=t.is_private),j(t.assignees)&&(u.assignees=t.assignees),j(t.direct_assignees)&&(u.direct_assignees=t.direct_assignees),typeof t.created_by=="string"&&(u.created_by=t.created_by),j(t.task_group_ids)&&(u.task_group_ids=t.task_group_ids),typeof t.name=="string"&&(u.name=t.name),typeof t.parent_task_id=="string"&&(u.parent_task_id=t.parent_task_id),u},ae=e=>{if(e==null||typeof e!="object")return null;const t=e;return j(t.task_ids)?{task_ids:t.task_ids}:null},ge=e=>{if(e==null||typeof e!="object")return null;const t=e;return typeof t.task_id!="string"?null:{task_id:t.task_id}},se=Wt.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,ne=Dt((function(e,t){const n=nt(e,t.isTaskTemplatesEnabled),{taskGroupId:u}=t,d=u!=null&&u!==""?{...n,taskGroupsWithTasksList:n.taskGroupsWithTasksList.map((a=>({...a,tasks:a.tasks.filter((s=>s.taskGroupIds.includes(u)))}))).filter((a=>a.tasks.length>0))}:n,m=Bt(e),k=z.isZeniUser(),v=e.taskDetailState?.subTaskCreateStatus?.fetchState;return{taskListView:d,tagListView:m,localData:d.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:k,subTaskCreateStatus:v}}),(function(e,t){const{navigate:n,currentTenant:u,location:d,isTaskTemplatesEnabled:m}=t,{tenantEmailDomain:k}=u,{groupByKey:v}=t.uiState;return{onTaskManagementRowClick:a=>{const s=st(k,a),_=F(d.state?.pathnameStackToGoBack,d.pathname);n(s,{state:{pathnameStackToGoBack:_}})},onReloadTasks:()=>{e(Z(!0,m))},onTabChange:a=>{e(qt(a))},onParentTaskClick:a=>{const s=st(k,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(at(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=q(k,t.localData.defaultTaskGroupId),s=F(d.state?.pathnameStackToGoBack,d.pathname);n(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(et({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(Qt({filters:a}))},onSearchTextChanged:a=>{e(Nt({searchText:a}))},onReloadCards:()=>{e(Z(!0,m))},onBackClick:()=>{if(d.state?.message==="triggerBackClick"){const a=At(d.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";n(s,{state:{pathnameStackToGoBack:a.newStack}})}else n("../")},updateLocalData:a=>{e(Ot({localData:a}))},resetLocalData:()=>{e(rt({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e($t(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(at(t.localData.selectedTaskIds,a,xt(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(jt(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=oe(v,a);e(X({taskDetailLocalData:s}));const _=q(k,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),x=F(d.state?.pathnameStackToGoBack,d.pathname);n(_,{state:{pathnameStackToGoBack:x,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(Ft(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(Pt(a,s))},onTimeSpentUpdate:(a,s)=>{e(tt({task:a,updates:s}))},onShowToast:a=>{e(Ut(a))},onGroupByFilterChange:a=>{e(et({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(tt({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(wt(a,s))},onSubtaskCreation:(a,s)=>{e(Kt({...s,parentTaskId:a}))},handleGroupTemplateClick:a=>{e(Y(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(Y(a,[s]))},handleNewTaskInitialization:a=>{if(e(X({taskDetailLocalData:{...Lt,name:a}})),t.localData.defaultTaskGroupId!=null){const s=q(k,t.localData.defaultTaskGroupId),_=F(d.state?.pathnameStackToGoBack,d.pathname);n(s,{state:{pathnameStackToGoBack:_,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{n(`/${k}/tasks/group/${a}`)},onQuickResponsesClick:()=>{n(`/${k}/tasks/quick-responses`)}}}))(Gt);function re(){const e=St(),t=H(),n=mt(),u=z.getSignedInUser(),d=z.isZeniUser(),m=J(),k=h((c=>vt(c))),{taskGroupId:v}=_t(),{useFeatureGate:a}=bt(),{isFeatureEnabled:s}=a(I.isTaskTemplatesEnabled),{isFeatureEnabled:_}=a(I.isTaskCannedResponsesEnabled),{isFeatureEnabled:x}=a(I.isTaskCategorizationEnabled),{isFeatureEnabled:ot}=a(I.isTaskBulkResolutionEnabled),{isFeatureEnabled:it}=a(I.isTaskGroupAssigneesEnabled),{isFeatureEnabled:lt}=a(I.isTaskRecurringParentEnabled),[ut,ct]=l.useState(!1),$=h((c=>nt(c,s))),O=h((c=>c.taskGroupState)),B=$.fetchState,{isAiCfoAccessEnabled:dt,onAskAiCfoClick:kt}=Ht({mobileExploreReferrer:"Task Checklist"});Et({isDataReady:B==="Completed"});const{markBoardFetchInFlight:V,requestTaskRefetch:N}=(function(c){const f=H(),r=J(),g=l.useRef(!1),D=l.useRef(!1),T=l.useRef(!1),C=l.useRef(),i=l.useRef(),S=l.useRef(!1),L=l.useRef(),K=l.useCallback((()=>{L.current=r.getState().taskListState.byTab.live,S.current=!0}),[r]),w=l.useCallback((()=>{K(),f(It())}),[f,K]),b=l.useCallback((()=>{C.current=r.getState().taskGroupState.taskGroupById,T.current=!0,f(Rt())}),[f,r]),E=l.useCallback((()=>{g.current=!1,i.current!=null&&(clearTimeout(i.current),i.current=void 0),w(),T.current||r.getState().taskGroupViewState.fetchState==="In-Progress"?D.current=!0:b()}),[w,b,r]),Q=l.useCallback((()=>{S.current?(g.current=!0,i.current==null&&(i.current=setTimeout((()=>{i.current=void 0,g.current&&r.getState().taskListState.fetchState!=="In-Progress"&&(S.current=!1,E())}),6e3))):E()}),[E,r]);l.useEffect((()=>{i.current!=null&&(clearTimeout(i.current),i.current=void 0),g.current=!1,D.current=!1,T.current=!1}),[c]);const y=h((o=>o.taskListState.fetchState)),G=h((o=>o.taskGroupViewState.fetchState)),U=h((o=>o.taskListState.byTab.live)),P=h((o=>o.taskGroupState.taskGroupById));return l.useEffect((()=>{y!=="In-Progress"&&(!S.current||U!==L.current||y==="Error")&&(S.current=!1,g.current&&(y!=="Completed"?y==="Error"&&(g.current=!1,i.current!=null&&(clearTimeout(i.current),i.current=void 0)):E()))}),[y,U,E]),l.useEffect((()=>{G!=="In-Progress"&&(!T.current||P!==C.current||G==="Error")&&(T.current=!1,D.current&&(D.current=!1,G!=="Error"&&b()))}),[G,P,b]),l.useEffect((()=>()=>{i.current!=null&&(clearTimeout(i.current),i.current=void 0)}),[]),{markBoardFetchInFlight:K,requestTaskRefetch:Q}})(k?.tenantId);l.useEffect((()=>{m.getState().taskListState.hasValidState()||V(),t(Z(!1,s))}),[k?.tenantId,t,s,V,m]);const pt=l.useMemo((()=>{const c=[p.TASK_CREATED,p.TASK_UPDATED,p.TASKS_BULK_UPDATED,p.TASKS_BULK_DELETED],f=[p.TASK_CREATED,p.TASK_UPDATED,p.TASK_SNOOZE_RESURFACED,p.TASKS_BULK_UPDATED];return[...Yt(k?.companyId,c),...te(u?.userId,f)]}),[k?.companyId,u?.userId]);if(Xt({events:pt,onEvent:(c,f)=>{switch(c){case p.TASK_CREATED:case p.TASK_UPDATED:{const r=ee(f);if(r!=null){const g=m.getState(),D=r.task_id,T=D!=null?g.taskState.taskByID?.[D]:void 0,C=T!=null;if(!d)if(r.is_private===!0){if(!C)return}else{const i=u?.userId,S=new Set([...r.assignees??[],...r.direct_assignees??[]]);if(r.created_by!=null&&r.created_by!==""&&S.add(r.created_by),!(i!=null&&S.has(i))&&!C)return}if(c===p.TASK_UPDATED&&C&&T!=null&&Array.isArray(r.task_group_ids)){const i=new Set(Object.values(g.taskGroupState.taskGroupById??{}).filter((o=>o!=null&&!o.isDeleted)).map((o=>o.id))),S=(T.taskGroupIds??[]).filter((o=>i.has(o))),L=(r.task_group_ids??[]).filter((o=>i.has(o))),K=S.length===L.length&&S.every((o=>L.includes(o))),w=T.taskGroupIds??[],b=r.task_group_ids??[],E=w.length!==b.length||!w.every((o=>b.includes(o))),Q=(o,Tt)=>{const M=o??[],W=Tt??[];if(M.length!==W.length)return!1;const ft=new Set(W);return M.every((gt=>ft.has(gt)))},y=r.name==null||r.name===T.name,G=r.is_private==null||r.is_private===T.isPrivate,U=r.assignees==null||Q(r.assignees,T.assignees),P=r.direct_assignees==null;if(K&&E&&y&&G&&U&&P)return}}return void N()}case p.TASKS_BULK_DELETED:{const r=ae(f);return r==null?void 0:void r.task_ids.forEach((g=>t(Mt(g))))}case p.TASKS_BULK_UPDATED:case p.TASK_SNOOZE_RESURFACED:return void N()}},onSubscribed:()=>{N()}}),l.useEffect((()=>{B==="Completed"&&t(rt({taskGroupById:O.taskGroupById}))}),[B,O.taskGroupById]),u==null)throw Error("Can't access task list page without signing in...");return A.jsxs(A.Fragment,{children:[B==="Completed"?A.jsx(yt,{analytics:ht,onLoad:c=>(f=>f.trackPageLoaded(Ct.Event.taskListPage))(c)}):null,A.jsxs(se,{children:[A.jsx(Jt,{isAppContentDrawerOpen:ut,handleDrawerToggle:c=>{ct(c)}}),A.jsx(ne,{location:n,navigate:e,currentTenant:k,taskGroupId:v,taskGroupState:O,localData:$.localData,uiState:$.uiState,isTaskTemplatesEnabled:s,taskListFetchState:B,isTaskCategorizationEnabled:x,isTaskCannedResponsesEnabled:_,isTaskBulkResolutionEnabled:ot,isTaskGroupAssigneesEnabled:it,isTaskRecurringParentEnabled:lt,isAiCfoAccessEnabled:dt,onAskAiCfoClick:kt})]})]})}const st=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,q=(e,t)=>`/${e}/tasks/new/${t}`,oe=(e,t)=>{if(e==="assignee"){const n=t.split(",");return{...R.taskDetailLocalData,assignee:n}}if(e==="priority"){const n=zt(t);return{...R.taskDetailLocalData,priority:n}}if(e==="status"){const n=Zt(t);return{...R.taskDetailLocalData,status:n}}if(e==="tag"){const n=t.split(",");return{...R.taskDetailLocalData,tagIds:n}}if(e==="dueDate"){const n=Vt(t);return{...R.taskDetailLocalData,dueDate:n}}return{...R.taskDetailLocalData}},Se=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"}));export{p as T,te as a,Yt as b,ae as c,ee as d,re as e,Se as f,ge as t};
@@ -1,9 +0,0 @@
1
- import{j as r}from"./liveblocks-BRYN0f-U.js";import ue from"./NotFoundScreen-GxItN6Rj.js";import{a as k}from"./sentry-CtdwYwhn.js";import{h as Y,u as ee,j as E,g as de,i as ke,N as pe,l as me,n as Se,o as b}from"./core-CwBMiqNL.js";import{Qi as ae,Ql as fe,Qf as Te,a2k as ge,fI as te,a2l as se,QH as g,Qz as T,Qc as he,Rb as be,R4 as Ee,a2m as ne,gk as oe,a2n as q,Q8 as Ie,Q5 as De,v2 as Ce,uS as Ge,mD as Re,Qx as _e,a2o as Ue,Rn as ye,Qt as xe,QS as Be,QP as ve,Qo as we,QM as Ae,QL as je}from"./zeni-epic-state-i8LQZ4dn.js";import{z as _,e1 as Pe,q as Le,W as Fe,A as G,a2 as ie,p as R,a6 as Qe,j as M,Q as Ke,e2 as $e,U as Z,ac as Ne}from"./index-DkGrTQCv.js";import{n as ze}from"./mui-Dfx-_nSM.js";import{u as Oe}from"./useInitialThreadRequest-36YDj4P5.js";import{M as Ve}from"./MobileAppDrawer-Nsld3D4E.js";import{b as qe,a as Me,T as f,t as Ze,c as W,d as H,e as We}from"./TaskListScreen-R11F2Y4F.js";import{u as He}from"./useTaskManagerPusherEvents-D4l5mFQo.js";import"./recharts-B9JU7twj.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.js";import"./InboxNotificationsProvider-CI2xYI-T.js";import"./useTaskManagerAccess-Cl_haJW7.js";import"./useAskAiCfoHostNavButtonProps-DKLqhK10.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]="fb6fd3e6-21ac-4639-9df4-cf57652f5849",e._sentryDebugIdIdentifier="sentry-dbid-fb6fd3e6-21ac-4639-9df4-cf57652f5849")}catch{}})();function Je(){const e=Y(),a=ee(),n=_.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:u}=E((o=>o.cannedResponsesState)),d=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(fe({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Pe,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:u==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:d,onSave:m})}const F=e=>e?.taskState?.taskByID,P=(e,a)=>{const n=F(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},Xe=ge([P,(e,a)=>{const n=P(e,a),c=F(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=P(e,a),c=F(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let J,X=[];const Ye=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),u=te(e),d=Xe(e,a.taskId),m=s.taskGroupId??c,t=m!=null?q(e.taskGroupState,m):void 0,o=_.getSignedInUser(),I=u.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},B=se(e),{tenantEmailDomain:v}=u,U=s.recurringSourceTaskId,w=U!=null?`${Z.appUrl}/${v}/tasks/${encodeURIComponent(U)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:_.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==J&&(J=h,X=Object.values(h)),X),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Ne.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${Z.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:w,tagListView:B,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>q(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:u,taskGroupId:d}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(je({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(Ae(n,t??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(we(a.taskId))},onSnoozeTask:(t,o)=>{e(ve(t,o))},onUnsnoozeTask:t=>{e(Be(t))},onCreateSubtask:(t,o)=>{e(xe({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(ye({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:R(u.state?.pathnameStackToGoBack,u.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:R(u.state?.pathnameStackToGoBack,u.pathname)}})},onDismissClick:()=>{if(u.state?.message==="triggerBackClick"){const t=ie(u.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=x(m),o=R(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(Ue({taskId:n}))},onDeleteTaskClick:()=>{e(_e(n))},updateFilesEntity:t=>{e(Re({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))($e);function L(){const e=Y(),a=ee(),n=de(),c=Le(),{taskId:s,taskGroupId:u}=ke(),d=E((i=>te(i))),m=Oe(d?.companyId),{useFeatureGate:t}=Fe(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:B}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:v}=t(G.isTaskGroupAssigneesEnabled),[U,w]=k.useState(!1),[h,S]=k.useState(!1),[Q,re]=k.useState(!1),[K,A]=k.useState(!1),C=k.useRef(!1),y=E((i=>i.taskListState.updateTasksFetchState.fetchState)),$=E((i=>se(i))),N=E((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const z=_.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...qe(d?.companyId,i),...Me(z,l)]}),[d?.companyId,z]);He({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{H(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=H(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=W(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=W(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),d?.tenantEmailDomain!=null&&e(x(d.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{Ze(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||$.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,$.fetchState]),k.useEffect((()=>{Q||N==="Completed"||(re(!0),a(be()))}),[Q,a,N]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(Ee([s],null,{isArchived:!1})),A(!0))}),[a,s]);k.useEffect((()=>{if(K)if(y!=="In-Progress"){if(C.current){if(y==="Error")return A(!1),void(C.current=!1);if(y==="Completed"){A(!1),C.current=!1;const{tenantEmailDomain:i}=d;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=x(i);e(l,{state:{pathnameStackToGoBack:R(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[K,y,d,n,e]);const O=E((i=>ne(i,s))),j=O.fetchState,V=_.getSignedInUser();if(V==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&O.error?.code===400){const{tenantEmailDomain:i}=d,l=x(i),p=R(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[j==="Completed"?r.jsx(Qe,{analytics:M,onLoad:i=>(l=>l.trackPageLoaded(Ke.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(Ve,{isAppContentDrawerOpen:U,handleDrawerToggle:i=>{w(i)}}),r.jsx(Ye,{analytics:M,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:V,navigate:e,taskGroupId:u,taskId:s,taskDetailFetchState:j,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:B,isTaskGroupAssigneesEnabled:v})]})]})}const ea=ze.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,x=e=>`/${e}/tasks`;function Ca(){return r.jsxs(Se,{children:[r.jsx(b,{path:"/new",element:r.jsx(L,{})}),r.jsx(b,{path:"/new/:taskGroupId",element:r.jsx(L,{})}),r.jsx(b,{path:"/group/:taskGroupId",element:r.jsx(We,{})}),r.jsx(b,{path:"/quick-responses",element:r.jsx(Je,{})}),r.jsx(b,{path:"/:taskId",element:r.jsx(L,{})}),r.jsx(b,{path:"*",element:r.jsx(ue,{})})]})}export{Ca as default};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-BRYN0f-U.js";import i from"./NotFoundScreen-GxItN6Rj.js";import{T as r}from"./TransactionDetailScreen-Dvz5L_Kb.js";import"./sentry-CtdwYwhn.js";import{n as a,o as e}from"./core-CwBMiqNL.js";import"./zeni-epic-state-i8LQZ4dn.js";import"./recharts-B9JU7twj.js";import"./index-DkGrTQCv.js";import"./mui-Dfx-_nSM.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.js";import"./useAskAiCfoHostNavButtonProps-DKLqhK10.js";import"./decodeURIComponentSafe-D1z7pLx5.js";import"./useInitialThreadRequest-36YDj4P5.js";import"./routePaths-BqbAkalx.js";import"./expenseAutomationHelper-B7ApIVZ5.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="bfd19369-9f5a-4875-9ff9-f0a50fe2624d",o._sentryDebugIdIdentifier="sentry-dbid-bfd19369-9f5a-4875-9ff9-f0a50fe2624d")}catch{}})();function z(){return t.jsxs(a,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{z as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BRYN0f-U.js";import{h as Z,g as q,u as K,i as Q,j as g,N as U,l as X,n as Ce,o as C}from"./core-CwBMiqNL.js";import{fI as N,uh as H,lj as p,eI as ee,Sk as Ae,br as me,$Z as Me,m3 as te,Wu as ae,$_ as pe,$$ as Be,bF as k,Sg as Se,a00 as Le,a01 as fe,a02 as Fe,Sj as he,a03 as Oe,a04 as Te,a05 as ze,a06 as ge,a07 as Ge,a08 as we,a09 as De,Tw as $e}from"./zeni-epic-state-i8LQZ4dn.js";import{W as ne,A as ce,j as L,G as Ie,db as oe,p as R,a2 as se,ao as Re,C as _e}from"./index-DkGrTQCv.js";import"./mui-Dfx-_nSM.js";import{a as y}from"./sentry-CtdwYwhn.js";import{w as ie}from"./withTransactionSidePanel-yH5Pz4v0.js";import{p as re,c as de}from"./routePaths-BqbAkalx.js";import{B as Ve}from"./utils-gkknwj7z.js";import{d as E}from"./decodeURIComponentSafe-D1z7pLx5.js";import{Z as Je}from"./ZeniAccountStatementScreen-BzCGIt9g.js";import"./recharts-B9JU7twj.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./useAskAiCfoHostNavButtonProps-DKLqhK10.js";import"./TransactionDetailScreen-Dvz5L_Kb.js";import"./useInitialThreadRequest-36YDj4P5.js";import"./expenseAutomationHelper-B7ApIVZ5.js";import"./stripSplatSuffix-Cx4eVHX0.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]="9f840eab-b24a-4f4c-ad3b-67b0951d6673",a._sentryDebugIdIdentifier="sentry-dbid-9f840eab-b24a-4f4c-ad3b-67b0951d6673")}catch{}})();const qe=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Ve(a),ke=()=>{const{common:a,uncategorizedTransactionList:e}=Ie.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},Ue=X((function(a,e){const t=Me(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=J(e.selectedAccount.tranListType),d=Ze(t,n,c,o,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(pe({uiState:{dateRange:d},type:J(e.selectedAccount.tranListType)})),a(Ae(o,p(d),!1,o==="missingReceipts"?ke():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=Z(),t=q(),n=K(),c=t.pathname.split("/").find((l=>qe.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=Q(),{accountType:Y,title:b,subTitle:A}=Ne(o),f="month",T=g((l=>N(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ne(),{isFeatureEnabled:h}=S(ce.isProjectsTransactionsEnabled),I=g((l=>H(l)))&&h,{dataAvailable:x,initialTimeframeTick:F}=We(o,v,T.bookCloseDate),[P,O]=y.useState(!1),[j,z]=y.useState(void 0),u=y.useMemo((()=>{const l=p(F);return{tranListType:o,accountType:ee(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const l=J(u.tranListType);n(Ae(l,u.period,!0,l==="missingReceipts"?ke():void 0))}}),[P,u,n]);let M=u;return u!=null&&j!=null&&(M={...u,period:j}),c==null||M==null?s.jsx(U,{to:"../"}):s.jsx(Ue,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>z(l),...a})})),Ne=a=>{let e="",t="";const n=Ie.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},We=(a,e,t)=>{const n=me();let c=me().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ze=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ke=X((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ye();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(Se(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Qe=ie((function({referrerType:a,...e}){const t=Z(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=Q(),S=E(d??""),h=E(Y??""),I=E(b??""),x=E(v??""),F=g((r=>Be(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[j,z]=y.useState(void 0),u=g((r=>N(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),w=g((r=>H(r)))&&m;let i;const G=Xe(S,h,I,A,f,T,x);if(G){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=He(F?.dateRange,r);i={accountId:h,accountType:ee(S),classId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(Se(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&j!=null&&(B={...i,period:j});const _=[d,Y,b,A,f,T,v].filter((r=>r!=null));return G&&B!=null?s.jsx(Ke,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>z(r),...e}):s.jsx(U,{to:Ye(_.length)})})),Ye=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,He=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),et=X((function(a,e){const t=Oe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),tt=ie((function({referrerType:a,...e}){const t=Z(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=Q(),S=E(d??""),h=E(Y??""),I=E(b??""),x=E(v??""),F=g((r=>Fe(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[j,z]=y.useState(void 0),u=g((r=>N(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),w=g((r=>H(r)))&&m;let i;const G=at(S,h,I,A,f,T,x);if(G){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=nt(F?.dateRange,r);i={accountId:h,accountType:ee(S),projectId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&j!=null&&(B={...i,period:j});const _=[d,Y,b,A,f,T,v].filter((r=>r!=null));return G&&B!=null?s.jsx(et,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>z(r),...e}):s.jsx(U,{to:be(_.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},at=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,nt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ct=X((function(a,e){const t=Ge(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=it(e.tenantEmailDomain),n=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),ye=ie((function({referrerType:a,...e}){const t=Z(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=Q(),S=E(d??""),h=E(Y??""),I=E(T??""),x=!(v!=null&&v==="exclude_subaccounts"),F=g((D=>ze(D.transactionListState,h,S))),[P,O]=y.useState(!1),[j,z]=y.useState(void 0),u=g((D=>N(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const w=ot(S,h,b,A,f,I);if(w){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=st(F?.dateRange,D);m={accountId:h,accountType:ee(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&j!=null&&(i={...m,period:j});const{useFeatureGate:G}=ne(),B=y.useCallback(((D,le)=>{if(o==null)return;const ue=D.url.split(`/${o}/`)[1];if(ue==null)return;const[je,Ee]=ue.split("?"),W=new URLSearchParams(Ee??"");W.set("view","full"),W.set("thread_id",le),W.set("entity_type",D.entityType);const xe=R(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${W.toString()}`,{state:{pathnameStackToGoBack:xe}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:_}=G(ce.isProjectsTransactionsEnabled),r=g((D=>H(D)))&&_,{areTenantIdsInSync:$}=Re();y.useEffect((()=>{!P&&m!=null&&$&&(O(!0),L.trackTransactionList(m.accountId,void 0,a,m.title),c(ge(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,$]);const Pe=[d,Y,b,A,f,T].filter((D=>D!=null));return w&&i!=null?s.jsx(ct,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,onCommentThreadClick:B,showProjectField:r,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>z(D),...e}):s.jsx(U,{to:ve(Pe.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},ot=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,st=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),it=a=>`/${a}/transactions/${$e}/statements`;function Mt(){const a=q().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>N(n))).tenantId],t=_e();return s.jsxs(Ce,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Je,{})}),s.jsx(C,{path:"/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(U,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Qe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(tt,{referrerType:a})})]})}export{Mt as default};
@@ -1,37 +0,0 @@
1
- import{j as e}from"./liveblocks-BRYN0f-U.js";import{h as L,g as U,u as F,i as M,j as y,N as D,l as V,n as xe,o as k}from"./core-CwBMiqNL.js";import{cw as N,fI as E,Zy as P,OL as ae,Os as G,Ot as ne,ZA as we,OO as Ie,Zw as Te,Zx as se,ZM as Ce,MP as ke,Cp as je,ZC as Ae,OV as ve,Zz as oe,de as q,GW as re,d$ as be,e0 as Ee,$W as De,$X as Le,Ou as Ue,$Y as Fe,Ov as Pe,OE as Be,bq as Oe,bK as Re,cH as Me,bL as Ve,cv as Ne,bu as $e,Uw as _e,cu as ze}from"./zeni-epic-state-i8LQZ4dn.js";import{V as $,h as Ze,z as b,a6 as _,j as A,d4 as Ge,d5 as qe,d6 as Z,$ as H,ao as He,aq as We,W as ie,A as R,a9 as Ke,a5 as Xe,d7 as Je,ac as W,p as Ye,d8 as Qe,a2 as K,d9 as et,ag as tt,X as Y,da as at,f as nt}from"./index-DkGrTQCv.js";import{u as st,D as ot,n as O,S as rt}from"./mui-Dfx-_nSM.js";import it from"./NotFoundScreen-GxItN6Rj.js";import{S as Q}from"./SetupPagesScreen-CCCYHV0e.js";import{a as p}from"./sentry-CtdwYwhn.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-DKLqhK10.js";import{u as lt}from"./useInitialThreadRequest-36YDj4P5.js";import{M as ce}from"./MobileAppDrawer-Nsld3D4E.js";import{F as ut}from"./FeaturePreviewScreen-BSbJQr46.js";import{a as ee}from"./analyticsHelper-BK0R0EXk.js";import"./recharts-B9JU7twj.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.js";import"./BusinessVerificationPageScreen-Br68pzy6.js";import"./routePaths-BqbAkalx.js";import"./InboxNotificationsProvider-CI2xYI-T.js";import"./useTaskManagerAccess-Cl_haJW7.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]="f76f1f29-f660-4257-ab78-5ad11ecdeda9",t._sentryDebugIdIdentifier="sentry-dbid-f76f1f29-f660-4257-ab78-5ad11ecdeda9")}catch{}})();const dt=V((function(t,a){const{companyId:n}=a;return{treasurySetupView:P(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:r,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const o=i.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(o.riskScore,ee(o)),t(Ie(!0))},onUpdateFundAllocation:o=>{r.trackTreasuryAllocationAction("update",ee(o)),t(we(o))}}}))(Ge);function pt(){const t=L(),a=U(),n=F(),{tenantEmailDomain:r}=M(),i=$(),o=y((T=>T.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=Ze(o),s=N(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,w]=p.useState(!1),[l,u]=p.useState(!1),x=y((T=>E(T))),f=b.getSignedInUserTenant(r)?.companyId??x.companyId,C=b.getSignedInUser(),h=y((T=>P(T,f))),g=y((T=>T.treasurySetupViewState.fetchState)),j=y((T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),I=y((T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||I!=="Not-Started"||f==null||(u(!0),n(G()))}),[l,I,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(w(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&o==="Completed"&&t("../")}),[m,o,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const B=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!B&&e.jsx(_,{analytics:A,onLoad:()=>{}}),e.jsx(dt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:B,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const mt=V((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:Ce(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:P(t,n)}}),(function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:i}=a,o=r.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{Z(a.analytics,"cancel",o,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Z(a.analytics,"confirm",o,m,"Transfer"),t(ve())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(ke(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(qe),ft=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:r}=M(),i=F(),[o,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[w,l]=p.useState(!1),u=y((I=>I.treasurySetupViewState.fetchState)),x=y((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((I=>E(I))),h=b.getSignedInUserTenant(r)?.companyId??C.companyId,g=y((I=>Te(I))),j=y((I=>P(I,h)));if(b.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(G()))}),[c,x,h,i]),p.useEffect((()=>{w||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[w,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:A,onLoad:()=>{}}),e.jsx(mt,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:o,maxInsuredAmount:5e5,onReviewClick:()=>{Z(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},yt=O.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${t=>t.theme.colors.grey4};
9
- `,gt={overlayWidth:new Ke(100,100,48)},St=V((function(t,a){const n=oe(t),{companyId:r}=a;return{treasuryDetail:n,treasurySetupView:P(t,r),downloadEndPoint:`${W.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}}),(function(t,a){const{navigate:n,currentTenant:r,location:i,handleDrawerToggle:o,analytics:m}=a,{tenantEmailDomain:s}=r;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(re(!0))},handleTreasuryOptionSelection:d=>{let c="page-not-found";d==="editPortfolio"?c=ht(s):d==="statements"?c=xt(s):d==="taxLetter"?c=wt(s):d==="settings"&&(c=It(s));const S=Ye(i.state?.pathnameStackToGoBack,i.pathname);n(c,{state:{pathnameStackToGoBack:S}})},onColumnSortConfigChanged:(d,c)=>{t(De({uiState:{sortKey:d,sortOrder:c}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{o(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}}))(Je);function z({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=U(),r=L(),i=F(),o=H(),m=st(),s=y((v=>E(v))),{tenantEmailDomain:d}=M(),c=s.companyId??b.getSignedInUserTenant(d)?.companyId,[S,w]=p.useState(!1),l=y((v=>oe(v))),u=l.fetchState,x=l.accountSummary?.totalBalance?.amount,f=y((v=>v.treasurySetupViewState.treasuryFundsDetails?.fetchStatus)),C=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=$(),g=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,j=N(h?.loggedInUserRoleMap),I=q(h?.loggedInUserRoleMap),{areTenantIdsInSync:B}=He();p.useEffect((()=>{u==="Not-Started"&&!S&&B&&(w(!0),i(re(!0)))}),[S,i,u,B]),p.useEffect((()=>{l.transactionsFetchState.fetchState==="Completed"&&l.transactions.length===0&&!n.pathname.includes("transfer")&&j&&r("./transfer")}),[l.transactionsFetchState.fetchState,l.transactions.length,n.pathname,j,r]);const T=()=>{r("..")},[le,ue]=p.useState(!1),X=v=>{ue(v)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=ct({mobileExploreReferrer:"Treasury"});We({isDataReady:u==="Completed"});const{useFeatureGate:J}=ie(),{isFeatureEnabled:me}=J(R.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=J(R.isAutoTransferRuleEnabled),ye=lt(c,{clearParams:u==="Completed"&&f?.fetchState==="Completed"}),ge=be(s),Se=Ee(me,s);if(ge===!0&&Se!==!0)return e.jsx(ut,{});if(C){const v=f?.fetchState!=="Completed"||l.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[l.accountSummaryFetchState.fetchState==="Completed"&&f?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(_,{analytics:A,onLoad:()=>{}}):null,e.jsx(ot,{onClose:T,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:gt.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Tt,{onClick:he=>he.stopPropagation(),children:[t===!0?e.jsx(ft,{isFirstTransfer:l.transactions.length===0||x===0,isTransactionsLoaded:l.transactionsFetchState.fetchState!=="In-Progress"&&l.transactionsFetchState.fetchState!=="Not-Started"}):null,a===!0?e.jsx(pt,{}):null]})}),e.jsxs(yt,{windowSize:o,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:X}),e.jsx(St,{treasuryDetailsView:l,isAutoTransferRuleEnabled:fe,navigate:r,currentTenant:s,location:n,companyId:c,analytics:A,handleDrawerToggle:X,initialOpenThreadRequest:ye,isLoading:v,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return g&&j?e.jsx(D,{to:"../setup"}):s.companyTreasuryInfo?.info&&!g&&I?e.jsx(D,{to:"../promo",state:n.state}):e.jsx(Xe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const ht=t=>`/${t}/treasury/edit-portfolio`,xt=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,It=t=>`/${t}/treasury/setup`,Tt=O(rt)`
10
- display: flex;
11
- min-height: 100%;
12
- flex-direction: column;
13
- `,Ct=O.div`
14
- display: flex;
15
- height: 100vh;
16
- width: 100%;
17
- flex: 1 1 auto;
18
- flex-direction: column;
19
- align-items: center;
20
- background-color: ${t=>t.theme.colors.grey4};
21
- `;function kt(){const t=L(),a=F(),n=H(),r=U(),i=`${W.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[o,m]=p.useState(!1),s=y((u=>Le(u)));p.useEffect((()=>{o||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))}),[o,s.fetchState,a]);const d=b.getSignedInUser(),c=y((u=>E(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},w=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access statements page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(Ct,{windowSize:n,children:e.jsx(Qe,{currentTenantCompanyName:w,statementListView:s,isLoading:l,onBackClick:()=>{const u=K(r.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const jt=O.div`
22
- display: flex;
23
- height: 100vh;
24
- width: 100%;
25
- flex: 1 1 auto;
26
- flex-direction: column;
27
- align-items: center;
28
- background-color: ${t=>t.theme.colors.grey4};
29
- `;function At(){const t=L(),a=H(),n=U(),r=F(),i=`${W.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[o,m]=p.useState(!1),s=y((u=>Fe(u)));p.useEffect((()=>{o||s.fetchState!=="Not-Started"||(m(!0),r(Pe(!1)))}),[o,s.fetchState,r]);const d=b.getSignedInUser(),c=y((u=>E(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},w=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access tax letter page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(jt,{windowSize:a,children:e.jsx(et,{currentTenantCompanyName:w,taxLetterListView:s,isLoading:l,onBackClick:()=>{const u=K(n.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const vt=V((function(t,a){const{companyId:n}=a,r=P(t,n);return{treasurySetupView:r,isSetupComplete:r.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),(function(t,a){const{navigate:n,companyId:r}=a;return{onSetupButtonClick:()=>{t(Be(r))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:i=>{n(i?"..":"../setup",{relative:"path"})}}}))(at),bt=()=>{const t=tt(),a=L(),n=U(),r=F(),{tenantEmailDomain:i}=M(),[o,m]=p.useState(!1),s=y((g=>E(g))),[d,c]=p.useState(!1),S=y((g=>g.treasurySetupViewState.treasuryFundsDetails?.fetchStatus));p.useEffect((()=>{d||S?.fetchState!=="Not-Started"||w==null||(c(!0),r(G()))}),[S,r]);const w=b.getSignedInUserTenant(i)?.companyId??s.companyId,l=b.getSignedInUser(),u=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=g=>{m(g)};if(l==null)throw Error("Can't access treasury promo page without signing in...");const f=$(),C=N(f?.loggedInUserRoleMap),h=q(f?.loggedInUserRoleMap);if(u&&C)return e.jsx(D,{to:"../../treasury/setup"});if(s.company?.companyTreasuryInfo&&(!u&&C||h)){if(n.state?.message==="activation"){const g=K(n.state?.pathnameStackToGoBack);a(n.pathname,{state:{...n.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return S?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:A,onLoad:g=>(j=>j.trackTreasuryPromoView("Treasury Promo Page"))(g)}),e.jsx(ce,{isAppContentDrawerOpen:o,handleDrawerToggle:x}),e.jsx(vt,{analytics:A,navigate:a,companyId:w,meetingUrl:t("treasury_promo"),onClickMenuIcon:()=>{x(!0)}})]})}return e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})})},te=O.div`
30
- display: flex;
31
- width: 100%;
32
- height: 100%;
33
- flex-direction: row;
34
- justify-content: center;
35
- align-items: center;
36
- background-color: ${t=>t.theme.colors.grey5};
37
- `;function ta(){const t=U(),a=y((g=>E(g))),{useFeatureGate:n}=ie(),r=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",i=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,o=$(),m=q(o?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),d=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Re(o?.loggedInUserRoleMap),c=Me(o?.loggedInUserRoleMap),S=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ve(o?.loggedInUserRoleMap),w=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!s&&Ne(o?.loggedInUserRoleMap),l=r&&!s&&N(o?.loggedInUserRoleMap),{isFeatureEnabled:u}=n(R.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=n(R.isDebitCardFeatureEnabled),f=nt(a,u,x)&&!s&&$e(o?.loggedInUserRoleMap),C=_e(o?.loggedInUserRoleMap),h=ze(o?.loggedInUserRoleMap);return e.jsxs(xe,{children:[h?null:e.jsx(k,{path:"setup",element:e.jsx(Q,{isBillPayAdminLevelAccess:d,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:w,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:c,productType:"zeni_treasury",type:"setup"})}),h?null:e.jsx(k,{path:"verification",element:e.jsx(Q,{isBillPayAdminLevelAccess:d,isUserHasOnlyBillPayAccess:c,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:w,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(bt,{})}),e.jsx(k,{path:"statements",element:e.jsx(kt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),r?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(z,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),l?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(z,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(z,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(it,{})})]}):i&&l?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-BRYN0f-U.js";import{a as f}from"./sentry-CtdwYwhn.js";import{t as u,u as h,j as b,N as y}from"./core-CwBMiqNL.js";import{UO as I,gl as w,JP as j}from"./zeni-epic-state-i8LQZ4dn.js";import{z as l,a5 as x,ad as S,ae as D}from"./index-DkGrTQCv.js";import{n as g}from"./mui-Dfx-_nSM.js";import"./recharts-B9JU7twj.js";import"./analytics-ByQsPrAn.js";import"./plaid-BHtEWHw5.js";import"./dnd-D9AEhQao.js";import"./stripe-cKAAJElX.js";import"./lottie-DqqifQEk.js";import"./lexical-BFV9piO5.js";import"./pdf-BoflkQZc.js";import"./utils-gkknwj7z.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]="def1ac46-5b2a-4095-afb8-07d874dab2b2",e._sentryDebugIdIdentifier="sentry-dbid-def1ac46-5b2a-4095-afb8-07d874dab2b2")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[a,c]=f.useState(!1),n=h(),i=b((m=>I(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{a||(c(!0),n(j(t,p,s)))}),[a,n]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=g.div`
2
- display: flex;
3
- width: 100%;
4
- height: 100vh;
5
- flex-direction: row;
6
- justify-content: center;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey5};
9
- `,_=g(D.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{A as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-BRYN0f-U.js";import{a as f}from"./sentry-CtdwYwhn.js";import{h as $,u as x,g as T,i as v,j as p}from"./core-CwBMiqNL.js";import{Tw as s,Tv as j,$U as B,fI as C,$V as z}from"./zeni-epic-state-i8LQZ4dn.js";import{$ as D,ac as g,z as E,a5 as L,d3 as P,a2 as U}from"./index-DkGrTQCv.js";import{u as N,n as _}from"./mui-Dfx-_nSM.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]="c36d89a8-1307-4631-a248-18c38493e6a7",e._sentryDebugIdIdentifier="sentry-dbid-c36d89a8-1307-4631-a248-18c38493e6a7")}catch{}})();const G=_.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `;function H(){const e=$(),n=x(),d=D(),l=T();let{accountId:a}=v(),u=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,u=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,y]=f.useState(!1),h=N();f.useEffect((()=>{m||(y(!0),n(j(a??"",!1)))}),[m,n]);const o=p((t=>B(t,a??""))),I=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=E.getSignedInUser(),r=p((t=>C(t))),w={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},b=z(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(P,{currentTenantCompanyName:k,statementListView:o,accountLast4:b,onBackClick:I,authParams:w,downloadEndPoint:u})})}export{H as Z};