@zeniai/web-app-ui 5.3.98-qa → 5.3.99-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 (156) hide show
  1. package/dist/assets/AccountMappingScreen-Cwa6Sncr.js +9 -0
  2. package/dist/assets/ActualMatchingMatchDetailScreen-JAoGrJi3.js +1 -0
  3. package/dist/assets/AddressRoutes-D0QZxsbK.js +1 -0
  4. package/dist/assets/AddressScreen-hby_CR8D.js +9 -0
  5. package/dist/assets/AiCfoScreen-DNDihu3K.js +22 -0
  6. package/dist/assets/{AppDrawer-B6XGm--J.js → AppDrawer-Cupbn6L3.js} +2 -2
  7. package/dist/assets/BillPayApprovalRoutes-sOvVtkKV.js +1 -0
  8. package/dist/assets/{BillPayRoutes-BXSQK4Z1.js → BillPayRoutes-DAZ2LiAE.js} +18 -18
  9. package/dist/assets/BusinessVerificationPageScreen-CpAzjlh5.js +9 -0
  10. package/dist/assets/{CardsAiCfoScreen-D7eizM_e.js → CardsAiCfoScreen-BP02_M1s.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-CHKFOxrs.js → ChargeCardRoutes-Ba3x5MoU.js} +8 -8
  12. package/dist/assets/{CompanyPassportScreen-Dk-3Eud9.js → CompanyPassportScreen-B7KOuZR_.js} +1 -1
  13. package/dist/assets/ConnectionAuthScreen-CDQ0Sa51.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-CzX3lGuD.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-n-9HOpeM.js → CustomerOnboardingRoutes-B3teunq3.js} +3 -3
  16. package/dist/assets/DashboardRoutes-DnxyUY7k.js +20 -0
  17. package/dist/assets/{DefaultTenantHome-C-xDsqWH.js → DefaultTenantHome-DNm_mIU1.js} +1 -1
  18. package/dist/assets/DomesticWireDetailScreen-Cb0F3Rod.js +18 -0
  19. package/dist/assets/DrawerScreen-B5Qgxoe2.js +1 -0
  20. package/dist/assets/EntityDetailRoutes--Mqqoc0l.js +1 -0
  21. package/dist/assets/ExpenseAutomationRoutes-Ce113KIS.js +38 -0
  22. package/dist/assets/FeaturePreviewScreen-Bu-JxAVw.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-B12KbAGI.js +1 -0
  24. package/dist/assets/{InboxNotificationsProvider-Db8GSYr5.js → InboxNotificationsProvider-Bz8aI0zf.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-BEEsHk_H.js → InvoicingRoutes-IUj-CS51.js} +2 -2
  26. package/dist/assets/{MagicLinkRoutes-Dj9i4Hr2.js → MagicLinkRoutes-6bWvZ6Ex.js} +18 -18
  27. package/dist/assets/MagicLinkSignInScreen-kYQNLgBh.js +12 -0
  28. package/dist/assets/MobileAppDrawer-D4DOSbVQ.js +1 -0
  29. package/dist/assets/NotFoundScreen-D92eiixV.js +1 -0
  30. package/dist/assets/NotificationRoutes-BV6tu0jZ.js +1 -0
  31. package/dist/assets/OAuthConsentScreen-BKzEKwhD.js +1 -0
  32. package/dist/assets/PandLWithForecastRoutes-CcRkLhpt.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-C6K4l799.js → PaymentLinkScreen-DVW3u8lI.js} +5 -5
  34. package/dist/assets/PeopleRoutes-DPu9dF6W.js +22 -0
  35. package/dist/assets/PerformanceRoutes-D8D-QN7a.js +1 -0
  36. package/dist/assets/{Preview-Dmk92_3R.js → Preview-DSYEA-qi.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-w89pHWnf.js → QBOConnectionScreen-BbOyxErb.js} +1 -1
  38. package/dist/assets/ReimbursementApprovalRoutes-CixN0rww.js +1 -0
  39. package/dist/assets/ReimbursementApprovalRuleDetailScreen-XsqK1nGV.js +1 -0
  40. package/dist/assets/ReimbursementRoutes-B2FNn_0P.js +68 -0
  41. package/dist/assets/{ReportsRoutes-B3kIWCeV.js → ReportsRoutes-CJrunnvK.js} +1 -1
  42. package/dist/assets/RewardsRoutes-8HmabMf6.js +1 -0
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-edh3y6eB.js → ScheduleDetailsPrepaidExpensesScreen-DHpH5oJw.js} +5 -5
  44. package/dist/assets/ScreenRoutes-DAK3aVc9.js +2 -0
  45. package/dist/assets/{SettingsRoutes-DP3k31bS.js → SettingsRoutes-6-0ys-s5.js} +6 -6
  46. package/dist/assets/{SetupPagesScreen-CxoDK6yX.js → SetupPagesScreen-BbFcVR26.js} +5 -5
  47. package/dist/assets/SignInScreen-mTQjLuAc.js +1 -0
  48. package/dist/assets/SignOutScreen-C7lCXdn2.js +9 -0
  49. package/dist/assets/{TaskListScreen-CfRSt11Z.js → TaskListScreen-CW5lbYvD.js} +2 -2
  50. package/dist/assets/{TaskRoutes-Bsl06EUw.js → TaskRoutes-ssEkwrEi.js} +2 -2
  51. package/dist/assets/TransactionDetailRoutes-DBqh72Ke.js +1 -0
  52. package/dist/assets/TransactionDetailScreen-B1no9UdL.js +5 -0
  53. package/dist/assets/{TransactionListRoutes-Cf10-jIo.js → TransactionListRoutes-DCMjmg_J.js} +1 -1
  54. package/dist/assets/{TreasuryRoutes-CUsBc54k.js → TreasuryRoutes-BUhJHYkV.js} +5 -5
  55. package/dist/assets/{VendorsRoutes-VjUFmibF.js → VendorsRoutes-C1J2HapW.js} +11 -11
  56. package/dist/assets/WiseConfirmationScreen-DgUBxs8P.js +12 -0
  57. package/dist/assets/{ZeniAccountRoutes-CCtz7FC8.js → ZeniAccountRoutes-C4aExMdo.js} +11 -11
  58. package/dist/assets/ZeniAccountStatementScreen-Vi4F2dbO.js +9 -0
  59. package/dist/assets/{accountMappingHelper-DLreHlS2.js → accountMappingHelper-CvrKmWxH.js} +1 -1
  60. package/dist/assets/{analytics-DOu6Ih_Z.js → analytics-DbFSqIth.js} +1 -1
  61. package/dist/assets/{analyticsHelper-Bjsf9R5q.js → analyticsHelper-drNlDujn.js} +1 -1
  62. package/dist/assets/{core-Dx-yNdOO.js → core-C9Jt3gNb.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-gD0LryXw.js → decodeURIComponentSafe-Cr8jQXNX.js} +1 -1
  64. package/dist/assets/{dnd-DfkYz8Zm.js → dnd-KhFMfpEU.js} +1 -1
  65. package/dist/assets/{empty-D2eoN5PS.js → empty-D0s_5kET.js} +1 -1
  66. package/dist/assets/{empty-D1pJjZqZ.js → empty-DDPaROCO.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-BfILpxFo.js → emptyVideoElement-LvEbv-wS.js} +1 -1
  68. package/dist/assets/epic-Ds-UlHfx.js +2 -0
  69. package/dist/assets/{expenseAutomationHelper--OaaBO01.js → expenseAutomationHelper-D-1MzDTJ.js} +1 -1
  70. package/dist/assets/{getLocaleForTenant-CCedhKv9.js → getLocaleForTenant-7mVUFLO-.js} +1 -1
  71. package/dist/assets/{index-BJmkm_zf.js → index-B3Xhbg9K.js} +1 -1
  72. package/dist/assets/{index-Cp3PWInT.js → index-ByO3g4MC.js} +1 -1
  73. package/dist/assets/{index-C19xNC89.js → index-C0qnV65V.js} +1 -1
  74. package/dist/assets/{index-CFth-nEE.js → index-CFbnVkgh.js} +1 -1
  75. package/dist/assets/{index-D2mWQKs0.js → index-CIoiM__n.js} +1 -1
  76. package/dist/assets/{index-BN_JNPW3.js → index-DmFy--fV.js} +17146 -16586
  77. package/dist/assets/{index-CAZwNpzy.js → index-JIbs7_F9.js} +2 -2
  78. package/dist/assets/{index-CfVtthD8.js → index-Xo8KkzkM.js} +1 -1
  79. package/dist/assets/{lexical-CeKyhyV8.js → lexical-CpBrNOz8.js} +1 -1
  80. package/dist/assets/{liveblocks-BlNqAXG4.js → liveblocks-Bym0XjRt.js} +1 -1
  81. package/dist/assets/{lottie-CICLPim-.js → lottie-CvA92JCl.js} +1 -1
  82. package/dist/assets/{mui-DicWBIpH.js → mui-BsgiBiT9.js} +1 -1
  83. package/dist/assets/{pathToGoBack-BzzMe8-p.js → pathToGoBack-CMP2hETE.js} +1 -1
  84. package/dist/assets/{pdf-BwuxCG-0.js → pdf-O569E9WB.js} +3 -3
  85. package/dist/assets/{pdf-lib-BK2JzciQ.js → pdf-lib-CRTLGVrP.js} +1 -1
  86. package/dist/assets/{plaid-BW55_XuJ.js → plaid-C8X6T_ms.js} +1 -1
  87. package/dist/assets/{pusher-CYljAxCY.js → pusher-CudE88Nt.js} +1 -1
  88. package/dist/assets/{react-C0TfUb2o.js → react-C2Rb5fzR.js} +1 -1
  89. package/dist/assets/{react-BRFjbln3.js → react-D5axG0I8.js} +1 -1
  90. package/dist/assets/{react-CoUnzBTV.js → react-DE5Goxu8.js} +1 -1
  91. package/dist/assets/{react-Dl4MB9dn.js → react-DvRjMeo2.js} +1 -1
  92. package/dist/assets/{react-R2WFHHNj.js → react-LkPios_L.js} +1 -1
  93. package/dist/assets/{react-DZ74qEy0.js → react-eTtPELPj.js} +1 -1
  94. package/dist/assets/{recharts-DkhthbKK.js → recharts-GCccddBO.js} +1 -1
  95. package/dist/assets/routePaths-DQh6iYo4.js +1 -0
  96. package/dist/assets/{sentry-oO1cMYln.js → sentry-CoKtZcTW.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-DUyz4jOZ.js → stripSplatSuffix-B7IfcJr8.js} +1 -1
  98. package/dist/assets/{url-1v6FOp1K.js → url-BXei0vv_.js} +1 -1
  99. package/dist/assets/{url-Hqju5Y0N.js → url-llYM4lhi.js} +1 -1
  100. package/dist/assets/useActualMatchingMatchDetail-CN5JVNal.js +1 -0
  101. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-3GfaqAPj.js +1 -0
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-CgHJ-iCU.js +1 -0
  103. package/dist/assets/{useChargeCardPusherEvents-CCCFXoUc.js → useChargeCardPusherEvents-JxJnisR-.js} +1 -1
  104. package/dist/assets/{useDeviceId-CLaYnGNC.js → useDeviceId-Cf3xan56.js} +1 -1
  105. package/dist/assets/{useEmailConnectResultRefresh-C_lu7Qr7.js → useEmailConnectResultRefresh-Dv9IT8_0.js} +1 -1
  106. package/dist/assets/useEnsureVendorListLoaded-YOFp3iHN.js +1 -0
  107. package/dist/assets/{useInitialThreadRequest-J-yGGXi5.js → useInitialThreadRequest-DA5FMzag.js} +1 -1
  108. package/dist/assets/useTaskManagerAccess-CpacCRSq.js +1 -0
  109. package/dist/assets/{useTaskManagerPusherEvents-C9HPPvD2.js → useTaskManagerPusherEvents-CcIRdnMY.js} +1 -1
  110. package/dist/assets/{utils-vB0Nm3XK.js → utils-CNqTTzSx.js} +1 -1
  111. package/dist/assets/withTransactionSidePanel-BOIdrs8l.js +25 -0
  112. package/dist/assets/{zeni-epic-state-DU8p9Pr6.js → zeni-epic-state-OTisIlmp.js} +7 -7
  113. package/dist/index.html +1 -1
  114. package/package.json +4 -4
  115. package/dist/assets/AccountMappingScreen-CsvIh3pU.js +0 -9
  116. package/dist/assets/ActualMatchingMatchDetailScreen-BeyJfzoq.js +0 -1
  117. package/dist/assets/AddressRoutes-DlDhfbdO.js +0 -1
  118. package/dist/assets/AddressScreen-xlCgJTb4.js +0 -9
  119. package/dist/assets/AiCfoScreen-jcAGVejP.js +0 -22
  120. package/dist/assets/BillPayApprovalRoutes-CWaHbHoJ.js +0 -1
  121. package/dist/assets/BusinessVerificationPageScreen-B2MzrRz9.js +0 -9
  122. package/dist/assets/ConnectionAuthScreen-H57FpfA5.js +0 -11
  123. package/dist/assets/CustomerOnboardingAuthScreen-Bga-XNUf.js +0 -1
  124. package/dist/assets/DashboardRoutes-BdEdFLmK.js +0 -20
  125. package/dist/assets/DomesticWireDetailScreen-DtE2OBa7.js +0 -18
  126. package/dist/assets/DrawerScreen-g7gMvOCC.js +0 -1
  127. package/dist/assets/EntityDetailRoutes-CuFBFS-c.js +0 -1
  128. package/dist/assets/ExpenseAutomationRoutes-XTTRYQTO.js +0 -38
  129. package/dist/assets/FeaturePreviewScreen-ocxt03Zk.js +0 -1
  130. package/dist/assets/HubSpotOAuthCallbackScreen-BtBx3Urb.js +0 -1
  131. package/dist/assets/MagicLinkSignInScreen-C6hfbFq3.js +0 -12
  132. package/dist/assets/MobileAppDrawer-D9_9MdJz.js +0 -1
  133. package/dist/assets/NotFoundScreen-C9HgOUVr.js +0 -1
  134. package/dist/assets/NotificationRoutes-DJGhb-22.js +0 -1
  135. package/dist/assets/OAuthConsentScreen-B3Frt3xZ.js +0 -1
  136. package/dist/assets/PandLWithForecastRoutes-BVhl9s7m.js +0 -1
  137. package/dist/assets/PeopleRoutes-DcnEXgK1.js +0 -22
  138. package/dist/assets/PerformanceRoutes-CPPduOhh.js +0 -1
  139. package/dist/assets/ReimbursementApprovalRoutes-C4rWwmOK.js +0 -1
  140. package/dist/assets/ReimbursementApprovalRuleDetailScreen-C5VRjOUn.js +0 -1
  141. package/dist/assets/ReimbursementRoutes-xmP1sf5g.js +0 -68
  142. package/dist/assets/RewardsRoutes-B0ffV2tU.js +0 -1
  143. package/dist/assets/ScreenRoutes-BXmr-cb0.js +0 -2
  144. package/dist/assets/SignInScreen-iAhBMOUT.js +0 -1
  145. package/dist/assets/SignOutScreen-MC6Mvo1b.js +0 -9
  146. package/dist/assets/TransactionDetailRoutes-D82kBzWU.js +0 -1
  147. package/dist/assets/TransactionDetailScreen-DEfBPk22.js +0 -5
  148. package/dist/assets/WiseConfirmationScreen-BLzh4txk.js +0 -12
  149. package/dist/assets/ZeniAccountStatementScreen-CYxLDv4m.js +0 -9
  150. package/dist/assets/epic-BWvBjvXV.js +0 -2
  151. package/dist/assets/routePaths-P47RCoW6.js +0 -1
  152. package/dist/assets/useActualMatchingMatchDetail-CR2SRNcX.js +0 -1
  153. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-CQ8NCzd2.js +0 -1
  154. package/dist/assets/useAskAiCfoHostNavButtonProps-BOks8lHg.js +0 -1
  155. package/dist/assets/useTaskManagerAccess-Ces4QXd0.js +0 -1
  156. package/dist/assets/withTransactionSidePanel-BGYKHHLT.js +0 -25
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-BN_JNPW3.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-oO1cMYln.js"><link rel="modulepreload" crossorigin href="/assets/core-Dx-yNdOO.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-DU8p9Pr6.js"><link rel="modulepreload" crossorigin href="/assets/mui-DicWBIpH.js"><link rel="modulepreload" crossorigin href="/assets/analytics-DOu6Ih_Z.js"><link rel="modulepreload" crossorigin href="/assets/utils-vB0Nm3XK.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-DmFy--fV.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CoKtZcTW.js"><link rel="modulepreload" crossorigin href="/assets/core-C9Jt3gNb.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-OTisIlmp.js"><link rel="modulepreload" crossorigin href="/assets/mui-BsgiBiT9.js"><link rel="modulepreload" crossorigin href="/assets/analytics-DbFSqIth.js"><link rel="modulepreload" crossorigin href="/assets/utils-CNqTTzSx.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.98-qa",
3
+ "version": "5.3.99-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.7",
32
- "@zeniai/client-epic-state": "5.2.91",
33
- "@zeniai/web-components": "4.4.34",
31
+ "@zeniai/client-analytics": "2.1.8",
32
+ "@zeniai/client-epic-state": "5.2.93",
33
+ "@zeniai/web-components": "4.4.35",
34
34
  "color": "3.1.3",
35
35
  "crypto-js": "4.2.0",
36
36
  "dnd-core": "^16.0.1",
@@ -1,9 +0,0 @@
1
- import{j as B}from"./liveblocks-BlNqAXG4.js";import{a as o}from"./sentry-oO1cMYln.js";import{h as H,g as K,u as W,j as m,s as q,l as X}from"./core-Dx-yNdOO.js";import{ag as Y,q as ee,$,z as te,n as G,ah as ne,h as ae,M as ce}from"./index-BN_JNPW3.js";import{bn as se,fI as oe,gZ as ie,oF as Q,Vi as re,ic as J,gk as ue,ow as le,Vj as de,Vk as pe,uh as ge,m3 as me,ou as Ae,oq as be,oB as Ie,ie as ye,Vl as fe,Vm as Se}from"./zeni-epic-state-DU8p9Pr6.js";import{n as he}from"./mui-DicWBIpH.js";import{M as Ee}from"./MobileAppDrawer-D9_9MdJz.js";import{q as R}from"./QBOConnectionScreen-w89pHWnf.js";import{g as h,a as E,m as ze}from"./accountMappingHelper-DLreHlS2.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]="1507d544-a034-479b-9705-e9775b89818c",a._sentryDebugIdIdentifier="sentry-dbid-1507d544-a034-479b-9705-e9775b89818c")}catch{}})();const u="zeni_pending_projects_enable",l={pending:"pending",ready:"ready"},we=he.div`
2
- display: flex;
3
- height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${a=>a.theme.colors.grey4};
9
- `,ve=X((function(a,e){return{accountMappingView:e.accountMappingView,isFiling1099FeatureEnabled:e.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:e.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:me(a),isAccountingClassesUpdateInProgress:a.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:ge(a),isAccountingProjectsUpdateInProgress:(()=>{const i=sessionStorage.getItem(u),c=i===l.pending||i===l.ready;return a.companyViewState.passportView?.accountingProjectsUpdateStatus?.fetchState==="In-Progress"||c})(),isCapitalizationFeatureEnabled:e.isCapitalizationFeatureEnabled,capitalizableAccounts:e.capitalizableAccounts,accountNamesById:e.accountNamesById,capitalizableAccountOverrides:e.capitalizableAccountOverrides,isCapitalizationThresholdSaving:e.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:e.onSaveCapitalizationAccountThreshold}}),(function(a,e){const{navigate:i,location:c,isFiling1099FeatureEnabled:A}=e;return{onAccountMappingChange:r=>{const{uncategorizedAccountSection:d,billsAccountSection:z,reimbursementsAccountSection:w,vendorsAccountSection:v,filing1099Section:C}=r,{incomeAccount:x,expenseAccount:F}=d,{billPayAccount:s}=z,{reimbursementsAccount:V}=w,{prepaidExpensesAccount:p,fixedAssetsAccount:T,accruedExpensesAccount:M}=v,{bankAccount:O,expenseCategory1099:k}=C,b=h(e.accountMappingView.incomeAccountList,x.selectedOption),j=h(e.accountMappingView.expenseAccountList,F.selectedOption),I=h(e.accountMappingView.billPayAccountList,s.selectedOption),_=h(e.accountMappingView.reimbursementsAccountList,V.selectedOption),P=E(e.accountMappingView.prepaidExpensesAccountList,p.selectedOptions),D=E(e.accountMappingView.fixedAssetsAccountList,T.selectedOptions),y=E(e.accountMappingView.accruedExpensesAccountList,M.selectedOptions),L=E(e.accountMappingView.bankAccounts1099FilingAccountList,O.selectedOptions),f=ze(e.accountMappingView.expenseAccounts1099FilingAccountList,k),t={selectedIncomeAccountId:b?.accountId,selectedExpenseAccountId:j?.accountId,selectedBillPayAccountId:I?.accountId,selectedReimbursementsAccountId:_?.accountId,selectedPrepaidExpensesAccountIds:P.map((n=>n.accountId)),selectedFixedAssetsAccountIds:D.map((n=>n.accountId)),selectedAccruedExpensesAccountIds:y.map((n=>n.accountId)),selectedBankAccounts1099FilingAccountIds:L.map((n=>n.accountId)),selectedExpenseAccounts1099FilingAccountIds:f};a(Se({data:t}))},onBackClick:()=>{G(c)===!1?(i("../../dashboard"),a(fe())):a(J())},onSaveClick:()=>{a(ye()),A&&ae.track(ce.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:r=>{a(Ie(e.currentTenant.companyId,r))},onAccountingProjectsToggle:r=>{const d=sessionStorage.getItem(u);d===l.pending||d===l.ready||a(r?Ae(e.currentTenant.companyId):be(e.currentTenant.companyId))}}}))(ne),_e=()=>{const a=Y(),e=H(),i=K(),c=W(),{useFeatureGate:A,useDynamicConfig:r}=ee(),{isFeatureEnabled:d}=A($.isFiling1099FeatureEnabled),{isFeatureEnabled:z}=A($.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:w,isDynamicConfigLoading:v}=r("transaction_categorization_config"),C=!v&&w?.capitalization_enabled===!0,x=te.getSignedInUser(),F=se(x),s=m((t=>oe(t))),{capitalizableAccounts:V,capitalizableAccountOverrides:p,isCapitalizationThresholdSaving:T,currencySymbol:M}=m((t=>{const n=t.tenantState.currentTenantId,g=n!=null?t.tenantState.tenantsById[n]:void 0,S=ie(t.companyState,s.companyId);return{capitalizableAccounts:g?.capitalizableAccounts??null,capitalizableAccountOverrides:g?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:t.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:S?.company.companyLocaleInfo?.currencySymbol??"$"}}),q),O=o.useCallback(((t,n)=>{c(Q(s.companyId,t,n))}),[c,s.companyId]),k=o.useCallback((t=>{const n={...p??{}},g=Object.entries(t);for(const[U,N]of g)N===null?delete n[U]:n[U]=N;const[S,Z]=g[0]??[];S!=null&&c(Q(s.companyId,S,Z,void 0,Object.keys(n).length>0?n:null))}),[c,s.companyId,p]),b=m((t=>re(t.accountState)),q),j=o.useMemo((()=>{const t={};for(const n of b)n.accountId!=null&&n.accountName!=null&&(t[n.accountId]=n.accountName);return t}),[b]),[I,_]=o.useState(!1),[P,D]=o.useState(!1);o.useEffect((()=>{I===!1&&(c(J()),_(!0))}),[I]);const y=m((t=>t.companyViewState.passportView?.needsQboProjectsReconnect===!0));o.useEffect((()=>{sessionStorage.getItem(u)===l.pending&&(sessionStorage.removeItem(u),c(ue({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})))}),[c]),o.useEffect((()=>{sessionStorage.getItem(u)===l.ready&&s?.companyId!=null&&(sessionStorage.removeItem(u),c(le(s.companyId)))}),[s?.companyId,c]),o.useEffect((()=>{y&&s?.tenantEmailDomain!=null&&(sessionStorage.setItem(u,l.pending),c(de()),R.init("/connection/auth",s.tenantEmailDomain),R.handleClick())}),[y,s?.tenantEmailDomain,c]);const L=m((t=>pe(t))),f=t=>{D(t)};return B.jsxs(we,{children:[B.jsx(Ee,{isAppContentDrawerOpen:P,handleDrawerToggle:f}),B.jsx(ve,{currentTenant:s,navigate:e,meetingUrl:a("account_mapping"),accountMappingView:L,isFiling1099FeatureEnabled:d&&F,isAccruedExpensesFeatureEnabled:z,isCapitalizationFeatureEnabled:C,capitalizableAccounts:V,accountNamesById:j,capitalizableAccountOverrides:p,currencySymbol:M,isCapitalizationThresholdSaving:T,onSaveCapitalizationAccountThreshold:O,onSaveCapitalizationAccountThresholds:k,location:i,isSettings:G(i),onClickMenuIcon:()=>f(!0)})]})};export{u as P,_e as U,l as a};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BlNqAXG4.js";import{a as y}from"./sentry-oO1cMYln.js";import{a2 as A,dN as R}from"./index-BN_JNPW3.js";import"./mui-DicWBIpH.js";import{u as F}from"./useActualMatchingMatchDetail-CR2SRNcX.js";import b from"./NotFoundScreen-C9HgOUVr.js";import{i as P,h as U,g as w}from"./core-Dx-yNdOO.js";import"./zeni-epic-state-DU8p9Pr6.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.js";import"./stripSplatSuffix-DUyz4jOZ.js";import"./decodeURIComponentSafe-gD0LryXw.js";import"./routePaths-P47RCoW6.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]="53b1ac0a-3c44-49f1-a57e-5c08d5625e5f",t._sentryDebugIdIdentifier="sentry-dbid-53b1ac0a-3c44-49f1-a57e-5c08d5625e5f")}catch{}})();function V(){const{matchId:t,tenantEmailDomain:e}=P(),o=U(),n=w(),k=F(t??""),r=y.useCallback((()=>{const v=A(n.state?.pathnameStackToGoBack);o(v.poppedPathname??`/${e??""}/month_end_close_checks/review`,{state:{pathnameStackToGoBack:v.newStack}})}),[n.state,o,e]);if(t==null)return s.jsx(b,{});const{match:i,detailFetchState:a,handleOpenBill:l,handleRefresh:c,handleUndoReversal:h,handleApproveAndReverse:d,handleIgnoreMatchSuggestion:f,lastMatchResults:p,lastUndoResults:g,refreshStatus:m,ignoreStatus:u,matchAndReverseStatus:S,undoReversalStatus:I}=k;return i==null?a.fetchState==="Not-Started"||a.fetchState==="In-Progress"?s.jsx(R,{detailFetchState:a.fetchState,isIgnoreInFlight:u.fetchState==="In-Progress",isApproveInFlight:S.fetchState==="In-Progress",isUndoInFlight:I.fetchState==="In-Progress",refreshStatus:m.fetchState,onNavigateBack:r,onOpenBill:l,onApproveAndReverse:d,onIgnoreMatchSuggestion:f,onRefresh:c,onUndoReversal:h,lastMatchResults:p,lastUndoResults:g}):s.jsx(b,{}):s.jsx(R,{match:i,detailFetchState:a.fetchState,isIgnoreInFlight:u.fetchState==="In-Progress",isApproveInFlight:S.fetchState==="In-Progress",isUndoInFlight:I.fetchState==="In-Progress",refreshStatus:m.fetchState,onNavigateBack:r,onOpenBill:l,onApproveAndReverse:d,onIgnoreMatchSuggestion:f,onRefresh:c,onUndoReversal:h,lastMatchResults:p,lastUndoResults:g})}export{V as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-BlNqAXG4.js";import{A as i}from"./AddressScreen-xlCgJTb4.js";import s from"./NotFoundScreen-C9HgOUVr.js";import"./sentry-oO1cMYln.js";import{n as d,o as r}from"./core-Dx-yNdOO.js";import"./zeni-epic-state-DU8p9Pr6.js";import"./recharts-DkhthbKK.js";import"./index-BN_JNPW3.js";import"./mui-DicWBIpH.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.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,9 +0,0 @@
1
- import{j as n}from"./liveblocks-BlNqAXG4.js";import{a as S}from"./sentry-oO1cMYln.js";import{h as T,u as P,g as j,i as E,j as M,l as $}from"./core-Dx-yNdOO.js";import{_ as B,z as L,V,a5 as D,a6 as K,h as _,M as b,a1 as z,T as h,a2 as F}from"./index-BN_JNPW3.js";import{VZ as C,it as N,fI as R,V_ as U,c9 as G,V$ as O,mL as q}from"./zeni-epic-state-DU8p9Pr6.js";import{u as H,n as Z}from"./mui-DicWBIpH.js";import J from"./NotFoundScreen-C9HgOUVr.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]="71f15965-233b-46f9-848d-8ebbb723dedf",e._sentryDebugIdIdentifier="sentry-dbid-71f15965-233b-46f9-848d-8ebbb723dedf")}catch{}})();const Q=Z.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,W=$((function(e,s){const{addressId:o,isSubPage:i,addressType:c}=s,l=R(e),a=s.roleMap!=null&&U(s.roleMap),d=i||c==="user_address"||G(l?.userRole??[])||a?void 0:"readonly";if(o==null){const t=O(c,e);return{addressToEdit:t?.addressToCreate,loadingState:t?.status?.fetchState,googleAPIKey:h.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:s.dontShowSaveConfirmation}}const r=C(e,o);return{addressToEdit:r.address,loadingState:r.fetchState,googleAPIKey:h.googleMapsAPIKey,isDisabled:d}}),(function(e,s){const{navigate:o,location:i,addressType:c}=s,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const d=i.state,r=F(d?.pathnameStackToGoBack);let t=r.poppedPathname??v();const u=d?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(t=`${t}?${g}`)}o(t,{state:{pathnameStackToGoBack:r.newStack}})}};return{onSubmitHandler:a=>{const d=X(a);e(q({addressType:c,addressToCreate:d})),_?.trackSaveAddressClicked(b.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(s.bankAccountContext)},onCancel:()=>{l(s.bankAccountContext)}}}))(z);function ne({isSubPage:e,hideAddressSubTitle:s=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),d=P(),r=j(),{addressId:t,addressType:u}=E(),g=B(),w=H(),I=L.getSignedInUser(),[f,k]=S.useState(t==null),p=M((m=>t!=null?C(m,t).fetchState:"Not-Started")),x=V();if(I==null)throw Error("Can't access address page without signing in...");const A=m=>m.trackPageLoaded(t!=null?b.Event.editAddress:b.Event.addAddress),y=l??u;return S.useEffect((()=>{f||t==null||(k(!0),d(N(t,!1)))}),[f,t,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address|invoicing_customer_billing_address|invoicing_subscription_shipping_address|invoicing_business_address)$/g)?!f&&p==="Not-Started"||f&&p==="In-Progress"?n.jsx(D,{fetchState:p,style:{backgroundColor:w.colors.grey5}}):t!=null&&p==="Error"?(a(`${v(1)}/new`,{replace:!0}),n.jsx(n.Fragment,{})):n.jsxs(n.Fragment,{children:[n.jsx(K,{analytics:_,onLoad:A}),n.jsx(Q,{windowSize:g,children:n.jsx(W,{location:r,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:s,addressId:t,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:x?.loggedInUserRoleMap})})]}):n.jsx(J,{})}const v=(e=2)=>{let s="../";for(let o=0;o<e;o++)s=`${s}../`;return s},X=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{ne as A,X as t};
@@ -1,22 +0,0 @@
1
- import{j as S}from"./liveblocks-BlNqAXG4.js";import{a}from"./sentry-oO1cMYln.js";import{u as Dt,h as Lt,i as Bt,g as Ft,j as v,l as Mt}from"./core-Dx-yNdOO.js";import{e5 as $t,a as Nt,U as Vt,e6 as Gt,z as Ht,_ as zt,e7 as qt,e8 as Wt,e9 as Yt,bn as Be,ea as We,eb as Zt,bm as Ye,a2 as ge,a6 as ce,h as $,ec as me,ed as Jt,ee as Kt,as as Xt,M as es,w as ts,ef as ss,eg as as,at as ns,eh as os,ei as is,ej as rs,ek as ls,p as us,bi as Fe,el as ds}from"./index-BN_JNPW3.js";import{fH as M,gw as R,UH as cs,a2Z as ms,a2_ as Ss,jQ as hs,a2$ as ps,jN as fs,a30 as Se,jt as Z,jW as J,jz as Ie,jg as he,je as gs,jY as Is,jI as Ze,UQ as Me,gy as N,gN as Cs,UP as ks,UA as $e,fI as bs,j7 as vs,a31 as Es,gb as Ps,jp as ws,jl as ys,fJ as pe,gi as xs,a32 as Rs,a33 as Ts,a34 as js,gx as Os,gr as Ne,k8 as Ve,gt as Ge,gz as As,a35 as He,jZ as _s,ji as Us,jC as Qs,jU as ze,jF as Ds,gA as Ls,gB as Bs,gC as Fs,gD as Ms}from"./zeni-epic-state-DU8p9Pr6.js";import{D as $s,n as V,S as Ns,v as Vs}from"./mui-DicWBIpH.js";import{u as Gs}from"./useAiCfoDashboardSuggestedQuestionsChips-CQ8NCzd2.js";import{p as Hs}from"./pathToGoBack-BzzMe8-p.js";import{j as zs}from"./routePaths-P47RCoW6.js";import{u as qs}from"./useTaskManagerPusherEvents-C9HPPvD2.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.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]="1916b3ee-d1aa-43b8-970a-e95f21a263d6",t._sentryDebugIdIdentifier="sentry-dbid-1916b3ee-d1aa-43b8-970a-e95f21a263d6")}catch{}})();const Ws=["claimed","running","succeeded","failed","timeout"],fe=t=>typeof t=="string"&&t!=="",Je="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 Zs=Mt((function(t,r){const h=M(t),s=r.isSubmitting,d=h.uiState?.currentChatSessionId,l=d!=null?xs(t.aiCfoState,d):[],i=as(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:`${ns}/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:J(t).detail,skillDetailError:J(t).fetchState==="Error",skillDetailLoading:J(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:(n,o)=>{if(n===Je&&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:(n,o,c,j,E)=>{n&&Fe(t,n,o,i,g,d,j,c,void 0,E)},onFetchSkills:()=>{t(Ze())},onOpenSkill:n=>{t(Ie({macroId:n})),t(Ds({macroId:n}))},onSaveSkill:(n,o)=>{t(ze({draft:n,macroId:o}))},onSaveSkillDraft:n=>{const o=n.displayName?.trim()??"",c=n.name?.trim()??"";t(ze({draft:{name:o.length>0?o:c,description:n.description?.trim()??null,instructions:n.instructions,visibility:"private"}}))},onFetchSkillVersionBody:(n,o)=>{t(Qs({macroId:n,version:o}))},onDeleteSkill:n=>{t(Us({macroId:n}))},onSetSkillVisibility:(n,o)=>{t(_s({macroId:n,visibility:o}))},onCloseSkillDetail:()=>{t(He())},onRunSkill:(n,o)=>{t(N()),t(Ne()),Fe(t,o,"user_input",void 0,g,d,void 0,void 0,void 0,n),t(He())},updateCurrentInput:n=>{t(Ge(n))},onStopSubmit:()=>{},onUpdateScrollYOffset:n=>{t(As(n))},onSelectSampleQuestion:()=>{},onBackClick:()=>{l(-1)},onCloseClick:()=>{const n=ge(h.state?.pathnameStackToGoBack),o=n.poppedPathname??Hs(1);l(o,{state:{...h.state,pathnameStackToGoBack:n.newStack}}),t(Ge(""))},togglePageView:()=>{const n=ge(h.state?.pathnameStackToGoBack),o=n.poppedPathname??`/${s.tenantEmailDomain}/dashboard`;l(o,{state:{...We(h.state),pathnameStackToGoBack:n.newStack,message:"open_ai_cfo_drawer"}}),L(!0)},onCopy:()=>{},onThumbsUp:(n,o)=>{i!=null&&o?.messageId!=null&&t(Ve(i,o.messageId,"positive",o.questionText,o.answerText))},onThumbsDown:(n,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 n=us(h.state?.pathnameStackToGoBack,h.pathname);l(`/${s.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:n.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(n,o)=>{t(Os({questionAnswerId:n,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)),ka=({isFileUploadEnabled:t})=>{const r=$t(),{setIsAiCfoOpen:h}=Nt(),s=Dt(),d=Lt(),{session_id:l}=Bt(),i=Ft(),g=new URLSearchParams(i.search).get("routine")??void 0,[p,f]=a.useState(!1),L=v((e=>M(e).uiState.isSkillsBrowserOpen===!0)),B=v((e=>R(e).skillsEnabled)),n=v((e=>M(e).uiState.isRoutinesBrowserOpen===!0)),o=v((e=>cs(e))),c=v((e=>ms(e))),j=v((e=>Ss(e))),[E,O]=a.useState(void 0),[G,A]=a.useState(!1),[Ke,Ce]=a.useState(void 0),Xe=a.useCallback((()=>{Ce(void 0),O(void 0),A(!0)}),[]),et=a.useCallback((e=>{O(e),A(!0)}),[]),tt=a.useCallback((()=>{O(void 0),A(!1)}),[]),st=a.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))),at=a.useCallback((e=>{s(fs({scheduleId:e.scheduleId}))}),[s]);a.useEffect((()=>{s(P!=null?Z({scheduleId:P}):Se())}),[s,P]);const F=ke?.macroId,nt=v((e=>J(e))),be=F!=null&&F!==""&&nt.fetchState==="Not-Started";a.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]=a.useState(!0);a.useEffect((()=>{T!=null&&s(Z({scheduleId:T}))}),[s,T]);const Ee=C.runs.some((e=>e.status==="claimed"||e.status==="running"))===!0;a.useEffect((()=>{if(P==null||Ee!==!0)return;const e=window.setInterval((()=>{s(Z({scheduleId:P})),s(he())}),5e3);return()=>window.clearInterval(e)}),[s,Ee,P]);const rt=a.useCallback((e=>{Ce(e),O(void 0),A(!0)}),[]),lt=a.useCallback((e=>{s(gs({scheduleId:e.scheduleId}))}),[s]),ut=a.useCallback(((e,m)=>{s(Is({enabled:m,scheduleId:e.scheduleId}))}),[s]);a.useEffect((()=>{n&&s(he())}),[s,n]);const Pe=v((e=>R(e).skills)),K=a.useMemo((()=>Pe.map((e=>({macroId:e.macroId,name:e.displayName??e.name})))),[Pe]),dt=a.useCallback((e=>{s(Ie({macroId:e}))}),[s]),X=a.useCallback((()=>{s(Ze()),s(Me())}),[s]),ct=a.useCallback((()=>{s(N())}),[s]),{allUsers:mt,isAiCardCreationEnabled:St,isCardPolicyEnabled:ht,onCardPolicyVendorSearchTextChange:pt}=Gt();a.useEffect((()=>{s(Cs())}),[s]);const I=v((e=>M(e))),y=Ht.getSignedInUser();a.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(),_=Xt(ft),b=v((e=>bs(e))),u=I.uiState.currentChatSessionId,w=b.tenantEmailDomain,D=w!=null&&w!=="",ee=a.useCallback((e=>{D&&d(`/${w}/ai-cfo/routines?routine=${encodeURIComponent(e.scheduleId)}`)}),[D,d,w]),te=a.useCallback((()=>{D&&d(`/${w}/ai-cfo/routines`)}),[D,d,w]),se=a.useCallback(((e,m)=>{const U=e.sessionId??C.sessionId;U!=null&&D&&d(`/${w}/ai-cfo/${U}?routine=${encodeURIComponent(m)}`)}),[D,d,C.sessionId,w]),gt=a.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}),ae=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;a.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,ne]=a.useState(null),[Et,oe]=a.useState(!1),[Pt,ie]=a.useState(void 0),[wt,re]=a.useState(void 0),ye=a.useRef(!1);a.useEffect((()=>{if(!ye.current&&z!=null&&z!==""){const e=i.state;ne(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=a.useCallback((()=>{ne(null),oe(!1),ie(void 0),re(void 0),d(i.pathname,{replace:!0,state:We(i.state)})}),[i.pathname,i.state,d]),xe=a.useMemo((()=>new URLSearchParams(i.search)),[i.search]),Re=xe.get("ref")??H?.aiCfoRef,le=xe.get("emailRefId")??H?.aiCfoEmailRefId,Te=a.useRef(!1);a.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;a.useEffect((()=>{q!=null&&q!==""&&u!=null&&(ne(q),oe(!0),ie(void 0),re(void 0),s(Es()))}),[q,u,s]);const xt=b.masterTOSInfo,x=xt?.isMasterTOSAccepted??!1,{visitedSessions:je}=Zt(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),_e=I.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:Rt}=Ye(_e,u),Tt=Rt.length===0;a.useEffect((()=>{x||_||d("../dashboard",{state:{...i.state,message:"open_ai_cfo_drawer"}})}),[x,_,d,i.state]);const jt=a.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]),Ue=a.useRef(void 0),Qe=a.useRef(void 0);a.useEffect((()=>{const e=l!==Ue.current,m=u!==Qe.current;Ue.current=l,Qe.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=a.useMemo((()=>({events:je.map((e=>`private-encrypted-chat-${e}.${Je}`)),eventCallback:(e,m,U)=>U.onEventReceived(e,m)})),[je]);a.useEffect((()=>{W!=="In-Progress"&&Y&&s(ws())}),[W,Y,s]),a.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=a.useMemo((()=>{return ue==null?[]:[(e=ue,`private-encrypted-routines-${e}.routine-run-updated`)];var e}),[ue]),De=a.useCallback((e=>{const m=e!=null&&(e===P||e===T);(n||m)&&s(he()),m&&s(Z({scheduleId:e}))}),[s,n,T,P]);qs({events:At,onSubscribed:()=>De(P??T),onEvent:(e,m)=>{const U=(de=>{if(de==null||typeof de!="object")return null;const Q=de;return fe(Q.schedule_id)&&fe(Q.run_id)?{scheduleId:Q.schedule_id,runId:Q.run_id,status:Ws.find((Qt=>Qt===Q.status))??null,finishedAt:fe(Q.finished_at)?Q.finished_at:null}:null})(m);U!=null&&De(U.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 _t=u!=null&&I.responseStateByChatSessionId?.[u]?.answer?.fetchState==="In-Progress";if(!x&&_)return S.jsxs(Ks,{children:[S.jsx(ce,{analytics:$,onLoad:Le}),ae.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 Ut=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(Js,{children:[S.jsx(ce,{analytics:$,onLoad:e=>e.trackPageLoaded(es.Event.aiCFOPage)}),_&&ae.drawerElement,S.jsx(Zs,{answerExportEndPoint:r,...Ot,currentChatSessionId:u,allSessionsWithOrderedQuestionAnswers:_e,allUsers:mt,isAiCardCreationEnabled:St,isCardPolicyEnabled:ht,openOnboardingPage:()=>f(!0),userId:y.userId,setIsAiCfoOpen:h,navigate:d,sessionFromUrl:l,location:i,isSubmitting:_t,isEmptyChatWithSession:Tt,currentTenant:b,emailLinkQuestion:vt??void 0,autoSubmitEmailLinkQuestion:Et,onEmailLinkQuestionProcessed:yt,routedInitialQuestionSource:Pt,routedInitialQuestionSuggestionIndex:wt,onCardPolicyVendorSearchTextChange:pt,onMenuClick:_?ae.open:void 0,isFileUploadEnabled:t,isUploadPromoVisible:Ct,onUploadPromoClose:It,exploreSuggestedPromptQuestions:bt,exploreSuggestedPromptQuestionsLoading:kt,isSkillsOpen:L,isRoutinesOpen:n,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:at,onRoutineCloseDetail:te,onRoutineDraft:rt,routineDraftPrompt:Ke,onRoutineOpenDetail:ee,onRoutineEditorCancel:tt,onRoutineLoadSkillInstructions:dt,onRoutineSave:st,onRoutineSetEnabled:ut,isCreateSkillEnabled:B,promoDismissalScope:w}),p&&_?S.jsx($s,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:ea,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&&!_?S.jsx(Jt,{open:p,onClose:()=>f(!1),children:S.jsx(Kt,{children:Ut})}):null]})},qe=V(Ns)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Js=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
- `,ea=V(Vs)`
20
- box-shadow: ${({theme:t})=>t.colors.elevation2};
21
- color: ${({theme:t})=>t.colors.grey4};
22
- `;export{ka as default};
@@ -1 +0,0 @@
1
- import{j as u}from"./liveblocks-BlNqAXG4.js";import{a as d}from"./sentry-oO1cMYln.js";import{h as U,g as j,u as B,j as y,N as W,l as V,i as Z,n as te,o as x}from"./core-Dx-yNdOO.js";import{fI as P,ZA as w,Zh as R,Ic as E,I6 as q,Ia as A,H$ as K,Zj as z,I3 as ae,Ie as oe,I2 as H,Ih as X,Id as C}from"./zeni-epic-state-DU8p9Pr6.js";import{z as O,w as J,bX as pe,n as T,bR as Y,bY as le,a5 as G,bZ as se,b_ as ne}from"./index-BN_JNPW3.js";import{u as M}from"./mui-DicWBIpH.js";import{u as Q,i as re}from"./ReimbursementApprovalRuleDetailScreen-C5VRjOUn.js";import ie from"./NotFoundScreen-C9HgOUVr.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="640ee242-eef6-4dfe-8ea1-18d3a1de6b0b",e._sentryDebugIdIdentifier="sentry-dbid-640ee242-eef6-4dfe-8ea1-18d3a1de6b0b")}catch{}})();const k="bill-approval-rule-update",ce=V((function(e){return{approvalView:w(e),billPaySetupApproverViewUpdateData:R(e).billPaySetupApproverViewUpdateData}}),(function(e,l){const{navigate:t,location:o}=l;return{onApprovalRulesEventReceived:a=>{a.endsWith(k)&&e(z(!1))},onBackClick:()=>{T(o)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(K(a,!1))},onEditRuleClick:a=>{a!=null?(e(A(a)),t(`./${a}/edit`)):(e(A()),t("./new"))}}}))(J(pe)),ue=({isLoading:e})=>{const l=U(),t=j(),o=B(),[a,n]=d.useState(!1),[s,v]=d.useState(!1),p=y((r=>r.billPaySetupApproverViewState.fetchState)),f=y((r=>P(r))),c=y((r=>w(r))),S=y((r=>R(r).billPaySetupApproverViewUpdateData));if(d.useEffect((()=>{S?.updateStatus.fetchState==="Completed"&&o(E())}),[S]),d.useEffect((()=>{a||p!=="Not-Started"||e||(n(!0),o(q(!0,!0,!1)))}),[a,p,e,o]),O.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");d.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(s||(v(!0),o(A())),l("./new"))}),[s,c,o]);const m={events:f.companyId!=null?[`private-encrypted-${f.companyId}.${k}`]:[],eventCallback:(r,h,I)=>{r.endsWith(k)&&I.onApprovalRulesEventReceived(r)}};return f?.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?u.jsx(W,{to:"../../promo"}):u.jsx(ce,{currentTenant:f,location:t,navigate:l,...m})},L="bill-approval-rule-update",de=V((function(e){const l=w(e),t=R(e).billPaySetupApproverViewUpdateData,o={};for(const n of Object.values(e.vendorState.vendorByID))n?.id!=null&&(o[n.id]=n.name);const a={};for(const n of Object.values(e.classState.classesByKey))n?.classId!=null&&(a[n.classId]=n.className);return{approvalView:l,billPaySetupApproverViewUpdateData:t,vendorNamesById:o,departmentNamesById:a}}),(function(e,l){const{navigate:t,location:o}=l;return{onApprovalRulesEventReceived:a=>{a.endsWith(L)&&e(z(!1))},onBackClick:()=>{T(o)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(K(a,!0))},onEditRuleClick:a=>{a!=null?(e(A(a)),t(`./${a}/edit`)):(e(A()),t("./new"))},onReorderRules:a=>{e(oe(a,!0))}}}))(J(le)),ve=()=>{const e=y((o=>P(o))),{isApprovalRulesV3Enabled:l,isLoading:t}=Y(e?.tenantId);return l?u.jsx(fe,{isLoading:t}):u.jsx(ue,{isLoading:t})},fe=({isLoading:e})=>{const l=U(),t=j(),o=B(),[a,n]=d.useState(!1),[s,v]=d.useState(!1),[p,f]=d.useState(!1),c=y((i=>i.billPaySetupApproverViewState.fetchState)),S=y((i=>i.billPaySetupApproverViewState.approverListState.fetchStatus.fetchState)),m=y((i=>P(i)));Q();const r=y((i=>w(i))),h=y((i=>R(i).billPaySetupApproverViewUpdateData));if(d.useEffect((()=>{h?.updateStatus.fetchState==="Completed"&&o(E())}),[h]),d.useEffect((()=>{a||c!=="Not-Started"||e||(n(!0),o(q(!0,!0,!0)))}),[a,c,e,o]),d.useEffect((()=>{s||S!=="Not-Started"||e||(v(!0),o(ae(!1,!0)))}),[s,S,e,o]),O.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");d.useEffect((()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(p||(f(!0),o(A())),l("./new"))}),[p,r,o]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${L}`]:[],eventCallback:(i,b,g)=>{i.endsWith(L)&&g.onApprovalRulesEventReceived(i)}};return m?.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?u.jsx(W,{to:"../../promo"}):u.jsx(de,{currentTenant:m,location:t,navigate:l,isLoading:e,...I})},ye=V((function(e,l){const t=R(e),o=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=o==="approval_create"&&t.allApprovalRules.length!==0;let n=t.allApprovalRules.length===0;return l.approvalRuleId&&(n=t.allApprovalRules.findIndex((s=>s.approvalRuleId===l.approvalRuleId))===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:n,approvalUpdateActionType:o}}),(function(e,l){const{navigate:t,approvalUpdateDataView:o,approverViewData:a,approvalRuleId:n}=l,s=o.billPaySetupApproverViewUpdateData?.type,v=T(l.location);return{onApprovalRuleDataUpdated:p=>{const f=S=>{const m=[];return S.forEach((r=>{const h=r.actors.selectedUsers.map((b=>({type:"user",userId:b.userId,isImplicitActor:!1}))),I=r.actors.selectedNonUsers.map((b=>{const g=!!re(b.value);return{type:g?"attribute":"role",subType:b.value,userId:void 0,idType:void 0,isImplicitActor:!g}})),i=h.concat(I);m.push({action:r.stepType.selectedOption,actors:i,operator:i.length>1?r.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),m},c={amount:{type:"amount",comparator:"range",min:{amount:p.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:p.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(s==="approval_create"){const S={criteria:c,steps:f(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(C(S))}else{const S={approvalRuleId:n,criteria:c,steps:f(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(C(S))}},onResetClick:()=>{e(E()),s==="approval_update"||v?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(E()),s==="approval_update"||v?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(X(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(se);function Se(){const e=U(),l=B(),t=j(),{approvalRuleId:o}=Z(),a=O.getSignedInUser(),n=M(),s=y((c=>R(c))),v=y((c=>w(c))),[p,f]=d.useState(!1);if(d.useEffect((()=>{p||(f(!0),l(H(!0)))})),d.useEffect((()=>{v.fetchState==="Not-Started"&&e(o!=null?"../../":"../")}),[v,o]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?u.jsx(G,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:n.colors.grey5}}):u.jsx(ye,{navigate:e,approvalUpdateDataView:s,approvalRuleId:o,approverViewData:v,location:t})}const me=V((function(e,l){const t=R(e),o=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=[],n={};for(const s of Object.values(e.vendorState.vendorByID))s?.id!=null&&(a.push(s.id),n[s.id]=s.name);return{localData:t,approvalUpdateActionType:o,allVendorIds:a,vendorNamesById:n,editingRuleId:o==="approval_update"?l.approvalRuleId:void 0,allApprovalRulesWithUser:w(e).allApprovalRules}}),(function(e,l){const{navigate:t,approvalUpdateDataView:o,approverViewData:a,approvalRuleId:n}=l,s=o.billPaySetupApproverViewUpdateData?.type,v=T(l.location);return{onApprovalRuleDataUpdated:p=>{const f=i=>{const b=[];return i.forEach((g=>{const N=g.actorKind?.selectedOption,ee=g.selectedRole?.selectedNonUsers??[];let D=[];N==="role"?D=ee.map((_=>({type:"attribute",subType:_.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):N==="specific_person"&&(D=(g.persons?.selectedUsers??[]).map((_=>({type:"user",userId:_.userId,isImplicitActor:!1}))));const $=g.action??"require_approval";b.push({action:$,actors:D,operator:D.length>1?$==="require_approval"?"or":"and":"is"})})),b},c=p.amountCriteria,S=p.vendorCriteria,m=p.departmentCriteria,r={};if(c!=null&&c.comparator.selectedOption!=null){const i=c.comparator.selectedOption;r.amount={type:"amount",comparator:i,min:i==="less_than"?void 0:c.min,max:i==="greater_than"?void 0:c.max}}const h=S?.selection.selectedOptions??[];h.length>0&&(r.vendor={type:"vendor",operator:S?.operator.selectedOption??"is",vendorIds:h});const I=m?.selection.selectedOptions??[];if(I.length>0&&(r.department={type:"department",operator:m?.operator.selectedOption??"is",departmentIds:I}),s==="approval_create"){const i={name:p.name,description:p.description,separationOfDuties:p.separationOfDuties,criteria:r,steps:f(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(C(i))}else{const i={approvalRuleId:n,name:p.name,description:p.description,separationOfDuties:p.separationOfDuties,criteria:r,steps:f(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(C(i))}},onResetClick:()=>{e(E()),s==="approval_update"||v?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(E()),s==="approval_update"||v?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(X(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:p=>{e(A(p)),t(s==="approval_update"?`../../${p}/edit`:`../${p}/edit`)}}}))(ne);function F(){const e=y((t=>P(t))),{isApprovalRulesV3Enabled:l}=Y(e?.tenantId);return l?u.jsx(ge,{}):u.jsx(Se,{})}function ge(){const e=U(),l=B(),t=j(),{approvalRuleId:o}=Z(),a=O.getSignedInUser(),n=M(),s=y((c=>R(c))),v=y((c=>w(c))),[p,f]=d.useState(!1);if(Q(),d.useEffect((()=>{p||(f(!0),l(H(!1)))})),d.useEffect((()=>{v.fetchState==="Not-Started"&&e(o!=null?"../../":"../")}),[v,o]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?u.jsx(G,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:n.colors.grey5}}):u.jsx(me,{navigate:e,approvalUpdateDataView:s,approvalRuleId:o,approverViewData:v,location:t},o??"new")}function xe(){return u.jsxs(te,{children:[u.jsx(x,{path:"/",element:u.jsx(ve,{})}),u.jsx(x,{path:"/new",element:u.jsx(F,{})}),u.jsx(x,{path:"/:approvalRuleId/edit",element:u.jsx(F,{})}),u.jsx(x,{path:"*",element:u.jsx(ie,{})})]})}export{xe as B};
@@ -1,9 +0,0 @@
1
- import{a as C}from"./sentry-oO1cMYln.js";import{u as W,j as h,h as se,g as oe,i as ie,N as ce,l as re}from"./core-Dx-yNdOO.js";import{fI as P,I6 as ue,Ik as de,Lw as le,Om as pe,P0 as fe,PR as me,ZL as ye,B$ as Se,SW as ge,ZM as Ie,ZN as he,ZO as be,ZP as Te,ZQ as De,ZR as Oe,V_ as Ce,YR as ke,Wd as Ve,MI as Ae,MA as we,We as Ne,ME as Fe,mL as _e,gJ as ve,gI as Ee,gH as xe,v2 as Re,uV as Pe,uS as ze,mD as Be,C8 as Me,C6 as z,bF as B,Ck as M,cF as Le}from"./zeni-epic-state-DU8p9Pr6.js";import{bR as Ue,V as Ze,q as je,bg as Ge,z as R,a6 as We,h as L,n as E,M as x,bT as Ke,ac as $e,p as U,aE as Z}from"./index-BN_JNPW3.js";import{n as qe}from"./mui-DicWBIpH.js";import{j as A}from"./liveblocks-BlNqAXG4.js";import{d as j}from"./routePaths-P47RCoW6.js";import{M as He}from"./MobileAppDrawer-D9_9MdJz.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},c=new e.Error().stack;c&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[c]="2f4f12cf-453d-48e9-975d-641cfdfcdbf3",e._sentryDebugIdIdentifier="sentry-dbid-2f4f12cf-453d-48e9-975d-641cfdfcdbf3")}catch{}})();function it(){const e=W(),c=h((u=>P(u))),a=c?.tenantId,{isApprovalRulesV3Enabled:s,isLoading:l}=Ue(a),p=h((u=>u.billPaySetupApproverViewState.fetchState));C.useEffect((()=>{a==null||l||p==="Not-Started"&&e(ue(!0,!0,s))}),[a,l,s,p,e])}function G(e,c,a,s=!1){switch(c){case"zeni_accounts":e(me(a,!0,s));break;case"zeni_treasury":e(fe(a,!0,s));break;case"reimbursement":e(pe(a,!0,s));break;case"charge_cards":e(le(a,!0,s));break;default:e(de(a,!0,s))}}const Je=qe.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
- `,Qe=re((function(e,c){const{businessVerificationDetails:a}=c,s=P(e),l=R.getSignedInUser(),p=s.tenantId,u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:p??""},b=Ce(c.roleMap)&&a.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",t=ke(e.companyConfigState),o=Ve(e.userRoleConfigState);return{businessVerificationDetails:a,verficationDetailsFetchState:a.fetchState,isRefreshingViewInBackground:a.isRefreshingViewInBackground,allNationalityCountries:a.allNationalityCountries,filesEndPoint:`${$e.fileMicroServiceBaseUrl}`,authParams:u,isDisabled:b,allIndustries:t.companyIndustries??[],companyTitles:o.companyTitles}}),(function(e,c){const{companyId:a,productType:s,currentTenant:l,navigate:p,location:u}=c,{tenantEmailDomain:b}=l;return{onCompanyDetailsChanged:t=>{const{companyDescription:o,companyIndustry:f,companyIndustryType:k,companyLegalName:V,companyTaxId:y,companyWebsite:m,companyPhone:S,primaryContactEmail:d,primaryContactName:i,primaryContactUserId:T,primaryContactSyncToken:D,syncToken:r,fileIds:O,incDate:n,typeOfIncorporation:g,stateOfIncorporation:w,sourceOfFunds:N,companySubIndustry:F,countriesOfOperations:I,companySourceOfFunds:K,companySourceOfFundsDescription:$,transactionVolume:q,transactionVolumeDescription:H,purposeOfAccount:J,purposeOfAccountDescription:Q,regulatedStatus:Y,regulatedStatusDescription:X,usNexus:ee,usNexusTypes:te}=t,_=k?.selectedOption,ae={companyId:a,companyDescription:o,companyIndustry:f.selectedOption,companyIndustryType:_==null||_===""?void 0:_,companyLegalName:V,taxIdOrEIN:y,website:m!=""&&m!=null?Le(m):void 0,phone:S,syncToken:r,fileIds:O,incDate:n!=null?B(n?.toString()):n,typeOfIncorporation:g?.selectedOption??"",stateOfIncorporation:w?.selectedOption??"",sourceOfFunds:N?.selectedOption??"",companySubIndustry:F?.selectedOption??"",countriesOfOperations:I?.selectedOptions.map((v=>v.length===2?v:Z(v)))??[],companySourceOfFunds:K?.selectedOption??"",companySourceOfFundsDescription:$,transactionVolume:q?.selectedOption??"",transactionVolumeDescription:H,purposeOfAccount:J?.selectedOption??"",purposeOfAccountDescription:Q,regulatedStatus:Y??"",regulatedStatusDescription:X,usNexus:ee,usNexusTypes:te?.selectedOptions??[]},ne={userId:T,firstName:i.firstName,lastName:i.lastName,email:d,syncToken:D};e(M({companyDetails:ae,primaryContactDetails:ne}))},onCompanyOfficerUpdated:t=>{const o=t.map((f=>{const{officerType:k,userId:V,name:y,email:m,nationalityCountryCode:S,ssn:d,dob:i,phone:T,syncToken:D,selectDocument:r,role:O,ownership:n,isSelectedForVerification:g,userVerificationStatus:w,treasuryUserVerificationStatus:N,fileIds:F}=f;let I;return r.selectDocumentType==="driverLicense"?I="driving_license":r.selectDocumentType==="passport"?I="passport":r.selectDocumentType==="stateId"?I="id_document":r.selectDocumentType==="ssnCard"&&(I="social_security_card"),{officerType:k,userId:V,firstName:y.firstName,lastName:y.lastName,email:m,ssn:d,nationalityCountryCode:S?.selectedOption!=null?Z(S.selectedOption):void 0,phone:T,birthday:i!=null?B(i?.toString()):i,syncToken:D,titleAtCompany:O.selectedOption,ownershipInCompany:n,documentTypeSelectedForVerification:I,isSelectedForVerification:g,userVerificationStatus:w,treasuryUserVerificationStatus:N,fileIds:F,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(M({officers:o}))},onSaveDetailsClick:t=>{e(z(a,t,s))},onSendForVerificationClick:t=>{e(z(a,t,s,!0))},onAddressClick:t=>{const o=j(b,t),f=U(u.state?.pathnameStackToGoBack,u.pathname);p(o,{state:{pathnameStackToGoBack:f}})},onRegisteredAddressClick:t=>{const o=j(b,t),f=U(u.state?.pathnameStackToGoBack,u.pathname);p(o,{state:{pathnameStackToGoBack:f}})},onBackClick:()=>{e(Me({companyId:a})),p("../setup")},updateFilesEntity:t=>{e(Be({files:t}))},onDeleteFile:t=>{e(ze(t))},onDeleteFileList:t=>{e(Pe(t))},onEditFileName:(t,o)=>{e(Re(t,o.split(".")[0]))},onGetOtp:t=>{e(xe(t,"SpendManagementSetup"))},onResendOtp:t=>{e(Ee(t,"SpendManagementSetup"))},onVerifyOtp:(t,o)=>{e(ve(t,o,"SpendManagementSetup"))},saveNewAddressInLocalStore:(t,o)=>{e(_e({addressType:t,addressToCreate:o}))},onIdentityDocumentUploadedForAutofill:t=>{if(a==null)return;const o=Ne(t.documentType);o!=null&&e(Fe({target:"setup",companyId:a,officerType:t.officerType,fileId:t.fileId,documentType:o}))},onCompanyDocumentUploadedForAutofill:t=>{a!=null&&e(we({target:"setup",companyId:a,fileId:t.fileId,documentType:t.documentType}))},onResetKycKybClick:()=>{e(Ae())}}}))(Ke),ct=({productType:e})=>{const c=se(),a=oe(),s=W(),[l,p]=C.useState(!1),[u,b]=C.useState(!1),{tenantEmailDomain:t}=ie(),o=Ze(),{useDynamicConfig:f}=je(),{configValue:k}=f(Ge.zeniAccountsConfig),V=ye(k),y=h((n=>{switch(e){case"zeni_accounts":return n.zeniAccountSetupViewState.fetchState;case"reimbursement":return n.remiSetupViewState.fetchState;case"charge_cards":return n.chargeCardSetupViewState.fetchState;case"zeni_treasury":return n.treasurySetupViewState.fetchState;default:return n.billPaySetupViewState.fetchState}})),m=h((n=>n.companyConfigState.fetchState)),S=h((n=>n.userRoleConfigState.fetchState)),d=h((n=>P(n))),i=d.companyId??R.getSignedInUserTenant(t)?.companyId;C.useEffect((()=>{m==="Not-Started"&&s(Se()),S==="Not-Started"&&s(ge(!0))}),[m,S,s]),C.useEffect((()=>{l||y!=="Not-Started"||i==null||(p(!0),G(s,e,i))}),[l,y,i,s]);const T=h((n=>{switch(e){case"zeni_accounts":return De(n,i);case"zeni_treasury":return Te(n,i);case"charge_cards":return be(n,i);case"reimbursement":return he(n,i);default:return Ie(n,i)}})),D=T.kycKybResetStatus.fetchState;if(C.useEffect((()=>{D==="Completed"&&i!=null&&(G(s,e,i,!0),s(Oe()))}),[D,i,e,s]),R.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let r;switch(e){case"zeni_accounts":r=d.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":r=d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":r=d.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||d.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":r=d.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:r=d.companyBillPayInfo?.info?.isBillPayTOSAccepted}const O=n=>{b(n)};return r===!1?A.jsx(ce,{to:"../promo"}):A.jsxs(Je,{children:[A.jsx(We,{analytics:L,onLoad:n=>(g=>{switch(e){case"zeni_accounts":return g.trackPageLoaded(x.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return g.trackPageLoaded(x.Event.reimbursementBusinessVerification);default:return g.trackPageLoaded(x.Event.billPayBusinessVerification,E(a)?"Settings":void 0)}})(n)}),E(a)?A.jsx(He,{isAppContentDrawerOpen:u,handleDrawerToggle:O}):null,A.jsx(Qe,{businessVerificationDetails:T,navigate:c,location:a,companyId:i,analytics:L,currentTenant:d,productType:e,isSettings:E(a),roleMap:o?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{O(!0)},maxInsuredAmount:V.maxInsuredAmount})]})};export{ct as B,G as d,it as u};
@@ -1,11 +0,0 @@
1
- import{j as I}from"./liveblocks-BlNqAXG4.js";import{a as o}from"./sentry-oO1cMYln.js";import{u as F,h as R,g as H,j as C,N as w}from"./core-Dx-yNdOO.js";import{Uv as q,fI as z,go as G,pW as V,gP as U,gn as Q,gl as W,UV as B,gk as A}from"./zeni-epic-state-DU8p9Pr6.js";import{u as J,z as E,L as D,G as K,E as M}from"./index-BN_JNPW3.js";import{n as X}from"./mui-DicWBIpH.js";import{P as h,a as T}from"./AccountMappingScreen-CsvIh3pU.js";import{t as Y}from"./getLocaleForTenant-CCedhKv9.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-w89pHWnf.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.js";import"./MobileAppDrawer-D9_9MdJz.js";import"./InboxNotificationsProvider-Db8GSYr5.js";import"./useTaskManagerAccess-Ces4QXd0.js";import"./accountMappingHelper-DLreHlS2.js";import"./empty-D2eoN5PS.js";import"./pdf-lib-BK2JzciQ.js";import"./index-BJmkm_zf.js";import"./url-Hqju5Y0N.js";import"./index-D2mWQKs0.js";import"./decodeURIComponentSafe-gD0LryXw.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]="c75f42cd-fe85-4a3b-8f39-d9319a91e339",t._sentryDebugIdIdentifier="sentry-dbid-c75f42cd-fe85-4a3b-8f39-d9319a91e339")}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(),_=H(),{setLoading:c,clearAllLoading:m}=J(),S=o.useRef(!1),x=o.useRef(!1),N=o.useRef(!1),f=o.useRef(!1),{code:O,realmId:$,state:L}=Z(_.search),p=O!==""&&$!==""&&L!=="";p&&(N.current=!0);const j=sessionStorage.getItem(h),u=j===T.pending,P=j===T.ready,b=C((s=>q(s))),e=C((s=>z(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,d=e?.externalConnections?.saveConnectionState,y=e.externalConnections?.accounting[0]?.isValid;o.useLayoutEffect((()=>{c(D.CONNECTION_AUTH)}),[c]),o.useEffect((()=>{S.current||a==null||g==null||(S.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(c(D.TENANT_FETCHING),t(G(a.userId,g))))}),[S,n,c]),o.useEffect((()=>{e.tenantId==null&&!x.current&&a!=null&&(x.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(V(a.userId)))}),[x,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||d!=="Error"||(c(D.CONNECTION_AUTH),t(U(a.userId,e.tenantId)))}),[d]),o.useEffect((()=>{n!=="Completed"&&r!=="Completed"||a==null||e?.tenantId==null||(t(Q(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((()=>{b.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&E.saveSignedInUserTenants(b.tenantsCoreDetailsInOrder)}),[b.tenantsCoreDetailsInOrder.length,n]);const v=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&&d==="In-Progress"&&(f.current=!0)}),[u,d]),o.useEffect((()=>{if(!u||v)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return f.current&&d==="Completed"?(sessionStorage.setItem(h,T.ready),m(),void i(s,{replace:!0})):f.current&&d==="Error"?(sessionStorage.removeItem(h),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),void i(s,{replace:!0})):void(p||N.current||f.current||y!==!0||(sessionStorage.removeItem(h),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),i(s,{replace:!0})))}),[u,v,d,p,y,e.tenantEmailDomain,m,t,i]),v)return null;if(p||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-BlNqAXG4.js";import{z as m}from"./index-BN_JNPW3.js";import{g as n}from"./QBOConnectionScreen-w89pHWnf.js";import"./sentry-oO1cMYln.js";import{g as p,N as a}from"./core-Dx-yNdOO.js";import"./zeni-epic-state-DU8p9Pr6.js";import"./recharts-DkhthbKK.js";import"./mui-DicWBIpH.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.js";import"./empty-D2eoN5PS.js";import"./pdf-lib-BK2JzciQ.js";import"./index-BJmkm_zf.js";import"./url-Hqju5Y0N.js";import"./index-D2mWQKs0.js";import"./decodeURIComponentSafe-gD0LryXw.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,20 +0,0 @@
1
- import{j as d}from"./liveblocks-BlNqAXG4.js";import{i as q,j as S,g as H,u as z,h as W,l as ne,k as ot,n as ha,o as P,N as vn}from"./core-Dx-yNdOO.js";import{fI as Y,Wt as We,bF as st,br as Ee,XR as En,ke as xn,XS as Va,XT as wn,kh as fa,XU as Qe,XV as Tn,km as Dn,XW as Ga,XX as Pn,kq as ga,XY as Ze,XZ as On,X_ as Fn,WN as jn,ls as Rn,X$ as Mn,bn as Je,Y0 as rt,Xr as le,bc as it,lG as ct,lp as lt,Xt as de,Xs as te,fH as dt,gd as Yn,gt as ba,Y1 as Bn,Y2 as Un,Y3 as ut,Y4 as Oe,Er as Ye,Es as Be,ER as xe,EL as ue,Ew as Ue,Y5 as Ln,c0 as Le,Y6 as Vn,Y7 as Gn,Y8 as mt,Y9 as Fe,Ya as Nn,ek as ea,Ax as pt,Yb as $n,Yc as ht,Yd as zn,Ye as Kn,Yf as qn,Yg as _a,Vp as Sa,uh as we,m3 as Te,E$ as ka,AE as Xn,AL as Qn,Yh as Zn,Yi as Hn,Et as Na,Yj as Wn,AA as Ie,Av as ft,Yk as ge,Yl as $a,Ym as Jn,Yn as ya,Vo as Aa,CI as gt,Yo as eo,Yp as bt,Yq as ao,Yr as to,Ys as no,Yt as Ia,CX as oo,D2 as so,Yu as ro,Yv as io,Ev as za,Yw as co,CG as Ct,Yx as be,Yy as Ka,Yz as lo,bq as _t,F4 as St,YA as uo,YB as kt,YC as mo,YD as po,YE as ho,YF as va,EY as fo,E_ as go,YG as bo,YH as Co,Eu as qa,YI as _o,F2 as yt,YJ as Ce,YK as Xa,YL as So,YM as ko,YN as At,lU as It,p$ as vt,lZ as Et,pZ as xt,pY as wt,pX as Tt,C3 as yo,dd as Ao,pU as Io,UM as vo,q9 as Eo,YO as xo,YP as wo,YQ as To,b5 as Ea,q3 as Do,ih as Po,gL as Oo,q2 as Fo,li as jo,q0 as Ro,p_ as Mo,e0 as Yo,d$ as Bo}from"./zeni-epic-state-DU8p9Pr6.js";import{z as B,at as oe,p as O,h as w,G as X,b9 as Uo,aq as Ve,a6 as Ge,ba as Dt,M as N,bb as Lo,bc as Pt,bd as Vo,be as Go,a as Ot,_ as Ft,d as jt,ap as No,bf as $o,am as zo,q as xa,bg as Rt,x as re,bh as Mt,bi as Yt,as as Bt,bj as Ko,ag as Ne,V as $e,bk as qo,H as Xo,bl as Qo,$ as G,o as Zo,g as Ho,a2 as Wo,ao as Jo,bm as es,bn as as,bo as ts,bp as ve}from"./index-BN_JNPW3.js";import{u as ns,n as wa}from"./mui-DicWBIpH.js";import{a as b}from"./sentry-oO1cMYln.js";import{w as Ut}from"./withTransactionSidePanel-BGYKHHLT.js";import{c as Lt,t as De,f as me,b as Ta,a as Da,v as os}from"./routePaths-P47RCoW6.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-BOks8lHg.js";import Me from"./NotFoundScreen-C9HgOUVr.js";import{u as Pa}from"./useInitialThreadRequest-J-yGGXi5.js";import{t as Vt}from"./analyticsHelper-Bjsf9R5q.js";import{C as ss}from"./CompanyPassportScreen-Dk-3Eud9.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-CQ8NCzd2.js";import{F as is}from"./FeaturePreviewScreen-ocxt03Zk.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.js";import"./TransactionDetailScreen-DEfBPk22.js";import"./decodeURIComponentSafe-gD0LryXw.js";import"./expenseAutomationHelper--OaaBO01.js";import"./stripSplatSuffix-DUyz4jOZ.js";import"./MobileAppDrawer-D9_9MdJz.js";import"./InboxNotificationsProvider-Db8GSYr5.js";import"./useTaskManagerAccess-Ces4QXd0.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]="6893dafa-c3bc-42b3-b6a3-32ee9b8a85f9",e._sentryDebugIdIdentifier="sentry-dbid-6893dafa-c3bc-42b3-b6a3-32ee9b8a85f9")}catch{}})();const cs=Ut((function({openTransactionPanel:e,panelContent:t,sidePanelIsOpen:a,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=q(),s=B.getSignedInUser(),i=S((_=>_.tenantState.currentTenantId)),l=S((_=>Y(_))),{tenantEmailDomain:m}=q(),p=H(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),u=b.useMemo((()=>r!=null?st(r):Ee()),[r]),C=z(),g=W(),y=S((_=>En(_,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(xn(o,u))}),[u]),I=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((_,A)=>{C(Va({sortKey:_,sortOrder:A}))}),[]),x=b.useCallback((_=>{C(Va({downloadState:_}))}),[]),R=b.useCallback((_=>{if(e)e(_.transactionId,_.transactionType);else if(m!=null){const A=Lt({id:_.transactionId,type:_.transactionType},m);g(A);const U=O(p.state?.pathnameStackToGoBack,p.pathname);g(A,{state:{pathnameStackToGoBack:U}})}}),[m,e]),T=b.useCallback((()=>{y.vendor!=null&&w.trackApAgingDetail("AP Aging",u.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)}),[y.vendor,u]);return b.useEffect((()=>{E()}),[]),b.useEffect((()=>{y.fetchState==="Completed"&&T()}),[T,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:w,onTransactionClick:R,onReload:E,onBackClick:I,onColumnSortConfigChanged:k,updateDownloadStateHandler:x,panelContent:t,sidePanelIsOpen:a,sidePanelIsFullView:n})})),ls=()=>{const e=z(),t=W(),a=S((k=>wn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:a.fetchState==="Completed"});const r=B.getSignedInUser(),s=S((k=>k.tenantState.currentTenantId)),i=S((k=>Y(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),h=a.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&e(fa(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{t("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,x)=>{e(Qe({sortKey:x,sortOrder:k}))}),[]),g=b.useCallback((k=>{t(`./${k}/${h.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,x)=>{}),[]),I=b.useCallback(((k,x)=>{e(Qe({selectedDate:k,agingDateSelectionType:x})),e(fa(k))}),[]);return d.jsxs(d.Fragment,{children:[a.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Dt,{uiState:a.apAgingUIState,report:a,downloadParams:p,analytics:w,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged:I,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ds=Ut((function({openTransactionPanel:e,panelContent:t,sidePanelIsOpen:a,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=q(),s=B.getSignedInUser(),i=S((T=>Y(T))),{tenantEmailDomain:l}=q(),m=H(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),c=b.useMemo((()=>r!=null?st(r):Ee()),[r]),u=z(),C=W(),g=S((T=>Tn(T,c,o))),y=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),E=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),I=b.useCallback(((T,_)=>{u(Ga({sortKey:T,sortOrder:_}))}),[]),k=b.useCallback((T=>{u(Ga({downloadState:T}))}),[]),x=b.useCallback((T=>{if(e)e(T.transactionId,T.transactionType);else if(l!=null){const _=Lt({id:T.transactionId,type:T.transactionType},l);C(_);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(_,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&w.trackArAgingDetail("AR Aging",c.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{y()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&R()}),[g.fetchState,R]),d.jsx(Lo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:w,onTransactionClick:x,onReload:y,onBackClick:E,onColumnSortConfigChanged:I,updateDownloadStateHandler:k,panelContent:t,sidePanelIsOpen:a,sidePanelIsFullView:n})})),us=()=>{const e=z(),t=W(),a=S((I=>Pn(I))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Ve({isDataReady:a.fetchState==="Completed"});const r=B.getSignedInUser(),s=S((I=>Y(I))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),p=a.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&e(ga(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{t("../",{relative:"path"})}),[]),c=b.useCallback((I=>{e(Ze({searchString:I}))}),[]),u=b.useCallback(((I,k)=>{e(Ze({sortKey:k,sortOrder:I}))}),[]),C=b.useCallback((I=>{t(`./${I}/${p.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((I=>{e(Ze({downloadState:I}))}),[]),y=b.useCallback(((I,k)=>{e(Ze({selectedDate:I,agingDateSelectionType:k})),e(ga(I))}),[]),E=b.useCallback(((I,k)=>{e(On({nodeId:I,isCollapsed:k}))}),[]);return d.jsxs(d.Fragment,{children:[a.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Dt,{uiState:a.arAgingUIState,report:a,downloadParams:m,analytics:w,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:y,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Gt=(e,t)=>({key:t,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Nt(e,t){const a=jn(t.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=De(t.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",a,!1),i=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(s,{state:{pathnameStackToGoBack:i,referrer:t.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Rn(n,o))}}}const ms=ne((function(e){const t=Fn(e).accountsInOrder.map(((a,n)=>Gt(a,n)));return{sectionTitle:X.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:t,fetchState:e.cashBalanceState.fetchState,analytics:w}}),Nt)(Pt),ps=ne((function(e){const t=Mn(e).accountsInOrder.map(((o,r)=>Gt(o,r))),a=B.getSignedInUser(),n=Je(a);return{sectionTitle:X.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:t,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:w}}),Nt)(Pt);function hs(){const e=W(),t=H(),{tenantEmailDomain:a}=q(),n=S((o=>Y(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ms,{tenantEmailDomain:a,location:t,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=W(),t=H(),{tenantEmailDomain:a}=q(),n=S((o=>Y(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ps,{tenantEmailDomain:a,location:t,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=wa.div`
2
- display: flex;
3
- flex: 1 1 auto;
4
- min-height: 100%;
5
- flex-direction: column;
6
- background-color: ${e=>e.theme.colors.grey4};
7
- `,bs=wa.div`
8
- display: flex;
9
- flex: 1 1 auto;
10
- flex-direction: column;
11
- align-items: center;
12
- background-color: ${e=>e.theme.colors.grey4};
13
- `;function Cs({title:e,reportId:t,entityAutoCompleteView:a,autoCompleteText:n,isAiCfoAccessEnabled:o,onAskAiCfoClick:r}){const s=W(),i=z(),l=H(),{tenantEmailDomain:m}=q(),p=ns();return d.jsxs(gs,{children:[d.jsx(Vo,{source:t==="cash_balance"?"CashBalanceDetailScreen":"CardBalanceDetailScreen",title:e,onBackClick:()=>{s("../")},hideSearchBtn:!0,backgroundColor:p.colors.grey4,searchAutoComplete:{autoCompleteData:{entityAutoCompleteView:a,autoCompleteText:n},autoCompleteActions:{onAutoCompleteInputChange:h=>{h.trim().length>=2?i(de({searchString:h,searchOrigin:"navbar"})):h.trim().length===0&&i(te("navbar"))},onAutoCompleteEntity:h=>{n!=null&&w?.trackSearch(N.Event.search,_s(t),h.type,h.name,n);const f=me(h,m),c=O(l.state?.pathnameStackToGoBack,l.pathname);s(f,{state:{pathnameStackToGoBack:c}})}}},rightSideComponent:d.jsx(Go,{isAiCfoAccessEnabled:o,onAskAiCfoClick:r})}),d.jsx(bs,{children:t==="cash_balance"?d.jsx(hs,{}):d.jsx(fs,{})})]})}function Qa(){const e=H(),t=z(),a=S((c=>c.cashBalanceState.fetchState)),n=S((c=>c.cardBalanceState.fetchState)),o=B.getSignedInUser();if(o==null)throw Error("Can't access dashboard detail without signing in...");const r=rt((c=>{const u=it(c,"/").split("/");return u[u.length-1]})(e.pathname));let s="Not-Started",i="";const l=X.getLocalizedStrings();switch(r){case"cash_balance":s=a,i=l.common.texts.cashBalance;break;case"card_balance":s=n,i=l.reportTitleById.card_balance;break;default:console.error(`${r} is not supported!`)}const{isAiCfoAccessEnabled:m,onAskAiCfoClick:p}=se({mobileExploreReferrer:r==="card_balance"?"Card Balance":"Cash Balance"});Ve({isDataReady:s==="Completed"});const h=S((c=>c.entityAutoCompleteState.autoCompleteText.navbar)),f=S((c=>le(c,"navbar")));return b.useEffect((()=>{s==="Not-Started"&&(function(c,u){switch(u){case"card_balance":c(lt());break;case"cash_balance":c(ct());break;default:throw new Error(`balance report type ${u} is not yet supported`)}})(t,r)}),[o,t,s]),d.jsxs(d.Fragment,{children:[s==="Completed"?d.jsx(Ge,{analytics:w,onLoad:c=>((u,C)=>{switch(C){case"card_balance":u.trackPageLoaded(N.Event.cardBalance);break;case"cash_balance":u.trackPageLoaded(N.Event.cashBalance);break;default:console.error(`Analytics: Not tracking Page Loaded for ${C}!`)}})(c,r)}):null,d.jsx(Cs,{title:i,reportId:r,autoCompleteText:h,entityAutoCompleteView:f,isAiCfoAccessEnabled:m,onAskAiCfoClick:p})]})}const _s=e=>{switch(e){case"cash_balance":return"Cash Balance";case"card_balance":return"Card Balance";default:return"Dashboard"}},Ss=[],Za="insights_section";function ze(e){const{mobileExploreReferrer:t}=e,a=z(),n=W(),o=H(),{tenantEmailDomain:r}=q(),{setIsAiCfoOpen:s,setAiCfoSidePanelQuestionToSubmit:i}=Ot(),l=Ft(),m=Bt(l),p=ot(),h=S((F=>F.tenantState.fetchState==="Completed"||F.tenantState.activeTenantFetchState.fetchState==="Completed"?Y(F):void 0)),f=h?.masterTOSInfo?.isMasterTOSAccepted??!1,c=S((F=>dt(F))),u=c.uiState?.currentChatSessionId,C=c.allSessionsWithOrderedQuestionAnswers??Ss,g=B.getSignedInUser()?.userId,y=jt(),E=No()&&y&&r!=null,I=$o(),k=zo(!0),x=S((F=>I!=null?Yn(F,I):void 0)),{useDynamicConfig:R}=xa(),{configValue:T}=R(Rt.aiCfoMessageDynamicConfig),_=b.useMemo((()=>Array.isArray(T.default_message_list)?T.default_message_list:[]),[T.default_message_list]),A=b.useMemo((()=>_.slice(0,2)),[_]),U=I!=null&&x!=null&&x.fetchState!=="Completed"&&x.fetchState!=="Error"&&(k||x.fetchState==="In-Progress"),pe=b.useMemo((()=>{if(I==null||x?.fetchState==="Error")return A;if(U)return[];const F=(x?.suggestedQuestions??[]).map((J=>J.trim())).filter((J=>J.length>0)).slice(0,2);return F.length===0?A:F}),[A,U,I,x?.fetchState,x?.suggestedQuestions]),Pe=b.useCallback(((F,J)=>{if(g==null||F.trim()==="")return;if(!f)return void re({location:o,navigate:n,mergeState:{referrer:t,aiCfoInitialQuestion:F,aiCfoInitialSubmissionSource:Za,aiCfoSuggestionIndex:J}});const qe=Mt(p.getState());if(m){const Xe=O(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:Xe,referrer:t,aiCfoInitialQuestion:F,aiCfoShouldSubmit:!qe}})}else{if(qe)return a(ba(F)),void s(!0);i(F),s(!0),Yt(a,F,Za,u,C,g,J,void 0)}}),[C,u,a,f,m,o,t,n,s,i,p,r,g]),_e=b.useCallback((()=>{if(f)if(m){const F=O(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:F,referrer:t}})}else s(!0);else re({location:o,navigate:n,mergeState:{referrer:t}})}),[f,m,o,t,n,s,r]);return b.useMemo((()=>{if(E)return{isSuggestedQuestionsLoading:U,onAskSomethingElseClick:_e,onSuggestedQuestionClick:Pe,suggestedQuestions:pe}}),[E,U,_e,Pe,pe])}const Ke=Ko,ks=ne((function(e){const t=Bn(e),a=Un(e),n=ut(e),{scrollPosition:o,...r}=n,s=X.getLocalizedStrings().reportTitleById.cash_in_cash_out,i=B.getSignedInUser(),l=e.tenantState.currentTenantId,m=Y(e),p=m?.companyName??"",h={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},f=e.entityAutoCompleteState.autoCompleteText.navbar,c=le(e,"navbar");return{selectedRangeReport:t,reportLabels:{reportTitle:s},highlightedRangeReport:a,uiState:r,scrollPosition:o,downloadParams:{downloadState:t.downloadState,currentTenantCompanyName:p,statementEndPoint:`${oe}/statement`,authParams:h},analytics:w,autoCompleteData:{autoCompleteText:f,entityAutoCompleteView:c}}}),(function(e,t){return{updateDownloadStateHandler:a=>{e(Ln(a))},onTimeframeSelectionChanged:()=>{},onCOABalancesRangeChanged:(a,n)=>{e(Ue(a,n)),e(Oe({resetLeftScroll:!0}))},onThisPeriodChanged:a=>{e(xe("month")),e(ue(t.firstMonthOfFY,a)),e(Oe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(a,n,o)=>{e(Ye(t.firstMonthOfFY,a,o,n)),n.length>0&&e(Be(t.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),t.isCompareModeOn!==a&&setTimeout((()=>e(Oe({resetLeftScroll:!0}))),50)},onElementCollapseStateChanged:(a,n)=>{e(Oe({nodeCollapseState:{nodeId:a,isCollapsed:n}}))},onTableScroll:a=>{e(Oe({scrollPosition:a}))},autoCompleteActions:{onAutoCompleteInputChange:a=>{a.trim().length>=2?e(de({searchString:a,searchOrigin:"navbar"})):a.trim().length===0&&e(te("navbar"))},onAutoCompleteEntity:a=>{const n=me(a,t.tenantEmailDomain),o=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{t.navigate("../")}}}))(Ke),ys=e=>{const{tenantEmailDomain:t,location:a,navigate:n}=e,o=Ne(),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=se({mobileExploreReferrer:"DashboardCashInCashOut"}),i=ze({mobileExploreReferrer:"DashboardCashInCashOut"}),l=S((m=>ut(m))).mode==="compare_mode";return d.jsx(ks,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,location:a,isCompareModeOn:l,navigate:n,insightsSectionAiCfoInfo:i,isAiCfoAccessEnabled:r,onAskAiCfoClick:s,meetingUrl:Le(o("dashboard_report_filters"))})},As=e=>{let t,a;switch(e.balanceTimeFrame){case"month":case"quarter":t=e.balanceTimeFrame,a=ea(e);break;case"year":t="quarter",a={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:t,timePeriod:a}},Is=ne((function(e){const t=Vn(e),a=Gn(e),n=mt(e),{scrollPosition:o,...r}=n,s=X.getLocalizedStrings().reportTitleById.cash_position,i=B.getSignedInUser(),l=e.tenantState.currentTenantId,m=Y(e),p=m?.companyName??"",h={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},f=e.entityAutoCompleteState.autoCompleteText.navbar,c=le(e,"navbar");return{selectedRangeReport:t,reportLabels:{reportTitle:s},highlightedRangeReport:a,uiState:r,scrollPosition:o,downloadParams:{downloadState:t.downloadState,currentTenantCompanyName:p,statementEndPoint:`${oe}/statement`,authParams:h},analytics:w,autoCompleteData:{autoCompleteText:f,entityAutoCompleteView:c}}}),(function(e,t){return{updateDownloadStateHandler:a=>{e(Nn(a))},onTimeframeSelectionChanged:a=>{e(xe(a)),setTimeout((()=>e(Fe({resetLeftScroll:!0}))),50)},onCOABalancesRangeChanged:(a,n)=>{e(Ue(a,n)),e(Fe({resetLeftScroll:!0}))},onThisPeriodChanged:a=>{e(ue(t.firstMonthOfFY,a)),e(Fe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(a,n,o)=>{e(Ye(t.firstMonthOfFY,a,o,n)),n.length>0&&e(Be(t.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),t.isCompareModeOn!==a&&setTimeout((()=>e(Fe({resetLeftScroll:!0}))),50)},onAccountBalanceClick:(a,n)=>{const{timePeriod:o,timeframe:r}=As(n),s=a.accountName===""?a.accountDescription:a.accountName;if(o!=null&&r!=null){const i=De(t.tenantEmailDomain,a.accountId,a.accountType,s,r,o),l=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Cash Position"}})}},autoCompleteActions:{onAutoCompleteInputChange:a=>{a.trim().length>=2?e(de({searchString:a,searchOrigin:"navbar"})):a.trim().length===0&&e(te("navbar"))},onAutoCompleteEntity:a=>{const n=me(a,t.tenantEmailDomain),o=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(n,{state:{pathnameStackToGoBack:o}})}},onTableScroll:a=>{e(Fe({scrollPosition:a}))},onBackClick:()=>{t.navigate("../")}}}))(Ke),vs=e=>{const{tenantEmailDomain:t,location:a,navigate:n}=e,o=Ne(),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=se({mobileExploreReferrer:"DashboardCashPosition"}),i=ze({mobileExploreReferrer:"DashboardCashPosition"}),l=S((m=>mt(m))).mode==="compare_mode";return d.jsx(Is,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,location:a,isCompareModeOn:l,navigate:n,insightsSectionAiCfoInfo:i,isAiCfoAccessEnabled:r,onAskAiCfoClick:s,meetingUrl:Le(o("dashboard_report_filters"))})},$=(e,t,a,n)=>{e===!1?t!=null&&n("../../",{relative:"path"}):t!==a&&(t!=null&&t.length>0?n(`../${a}`,{replace:!0}):n(`./forecast/${a}`,{replace:!0}))},Es=e=>{let t,a;switch(e.balanceTimeFrame){case"month":case"quarter":t=e.balanceTimeFrame,a=ea(e);break;case"year":t="quarter",a={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:t,timePeriod:a}},xs=ne((function(e){const t=pt(e),a=$n(e),n=ht(e),o=zn(e),r=Kn(e),s=qn(e),i=_a(e),{scrollPosition:l,...m}=i,p=a.reportTitle,h=B.getSignedInUser(),f=e.tenantState.currentTenantId,c=Y(e),u=c?.companyName??"",C={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:f??""},g=e.entityAutoCompleteState.autoCompleteText.navbar,y=le(e,"navbar"),E=Sa(c);return{selectedRangeReport:t,selectedClassesViewRangeReport:n,selectedProjectViewRangeReport:r,reportLabels:{reportTitle:p},highlightedRangeReport:a,highlightedClassesViewRangeReport:o,highlightedProjectViewRangeReport:s,uiState:m,scrollPosition:l,downloadParams:{downloadState:t.downloadState,currentTenantCompanyName:u,statementEndPoint:`${oe}/statement`,authParams:C},analytics:w,isZeniUser:Je(h),autoCompleteData:{autoCompleteText:g,entityAutoCompleteView:y},isZeniCOAUsed:E,isAccountingClassesEnabled:Te(e),isAccountingProjectsEnabled:we(e)}}),(function(e,t){return{updateDownloadStateHandler:a=>{e(Jn(a))},onTimeframeSelectionChanged:a=>{e(xe(a)),setTimeout((()=>e(ge({resetLeftScroll:!0}))),50)},onCOABalancesRangeChanged:(a,n)=>{e(Ue(a,n)),e(ge({resetLeftScroll:!0}))},onThisPeriodChanged:a=>{e(ue(t.firstMonthOfFY,a)),e(ge({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(a,n,o)=>{e(Ye(t.firstMonthOfFY,a,o,n)),n.length>0&&(e(Be(t.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),t.forecastIdFromUrlPath!=null&&a==1&&$(!1,t.forecastIdFromUrlPath,"",t.navigate)),t.isCompareModeOn!==a&&setTimeout((()=>e(ge({resetLeftScroll:!0}))),50)},onAccountBalanceClick:(a,n)=>{const{timePeriod:o,timeframe:r}=Es(n);if(o!=null&&r!=null){const s=a.accountName===""?a.accountDescription:a.accountName,i=a.projectsViewParentId?.projectId!=null?Ta(t.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,s,r,o):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null?Da(t.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId?.[0],s,r,o):De(t.tenantEmailDomain,a.accountId,a.accountType,s,r,o),l=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Burn Rate"}})}},onElementCollapseStateChanged:(a,n)=>{t.accountViewMode!=="project"?e(ge({nodeCollapseState:{nodeId:a,isCollapsed:n}})):e($a({nodeCollapseState:{nodeId:a,isCollapsed:n}}))},onTableScroll:a=>{t.accountViewMode!=="project"?e(ge({scrollPosition:a})):e($a({scrollPosition:a}))},autoCompleteActions:{onAutoCompleteInputChange:a=>{a.trim().length>=2?e(de({searchString:a,searchOrigin:"navbar"})):a.trim().length===0&&e(te("navbar"))},onAutoCompleteEntity:a=>{const n=me(a,t.tenantEmailDomain),o=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{t.selectedForecastId!=null?t.navigate("../../../"):t.navigate("../")},onForecastToggle:(a,n)=>{e(Ie(t.firstMonthOfFY,a==="forecast_mode",a==="forecast_mode"?3:1,n)),a==="forecast_mode"?(e(Na({viewMode:"account_group"})),e(ft(!1,n?.id)),n!=null&&$(!0,t.forecastIdFromUrlPath,n?.id??"",t.navigate)):$(!1,t.forecastIdFromUrlPath,n?.id??"",t.navigate),e(ge({resetLeftScroll:!0}))},onUpdateAccountViewMode:a=>{t.analytics?.trackGroupBySwitch(a==="classes"?"Classes":a==="project"?"Projects":"Accounts","Burn Rate"),e(Na({viewMode:a})),e(Wn({viewMode:a}))},onUpdateClassesToFilterOut:a=>{e(Hn({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Zn({projectsToFilterOut:a}))},onOpenAccountViewMode:()=>{t.isAccountingClassesEnabled&&e(Xn()),t.isAccountingProjectsEnabled&&e(Qn())},onResyncReports:()=>{e(ka(t.accountViewMode==="project"?"net_burn_or_income_by_projects":"net_burn_or_income_by_classes"))}}}))(Ke),ws=e=>{const t=z(),{tenantEmailDomain:a,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=Ne(),{isAiCfoAccessEnabled:i,onAskAiCfoClick:l}=se({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),m=ze({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),p=S((_=>_a(_))),h=p.isForecastModeOn,f=p.timeframe,c=p.selectedForecast?.id,u=S((_=>ya(_.forecastState,c??""))),C=S((_=>pt(_))),g=S((_=>Aa(_))),y=S((_=>Te(_))),E=S((_=>we(_))),I=S((_=>ht(_).uiState.accountViewMode)),k=p.mode==="compare_mode",x=C.dataAvailable;b.useEffect((()=>{if(c!=null&&h===!0&&($(h,r,c,o),u!=null)){const _=u?.forecastPeriod,A=x!=null&&_.endDate.isAfter(x?.endDate)===!0?x:_;t(ue(e.firstMonthOfFY,{startDate:A.endDate.startOf(f),endDate:A?.endDate}))}}),[c]);const R=$e(),T=Pa(R?.currentTenant?.companyId,{clearParams:C.fetchState==="Completed"});return d.jsx(xs,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,selectedForecastId:r,forecastIdFromUrlPath:r,location:n,isAccountingClassesEnabled:y,isAccountingProjectsEnabled:E,accountViewMode:I,isCompareModeOn:k,navigate:o,analytics:w,reportsResyncFetchState:g.reportsResyncFetchState,insightsSectionAiCfoInfo:m,isAiCfoAccessEnabled:i,onAskAiCfoClick:l,initialOpenThreadRequest:T,meetingUrl:Le(s("dashboard_report_filters"))})},Ts=e=>{let t,a;switch(e.balanceTimeFrame){case"month":case"quarter":t=e.balanceTimeFrame,a=ea(e);break;case"year":t="quarter",a={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:t,timePeriod:a}},Ds=ne((function(e){const t=gt(e),a=eo(e),n=bt(e),o=ao(e),r=to(e),s=no(e),i=Ia(e),{scrollPosition:l,...m}=i,p=X.getLocalizedStrings().common.texts.operatingExpenses,h=B.getSignedInUser(),f=e.tenantState.currentTenantId,c=Y(e),u=c?.companyName??"",C={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:f??""},g=e.entityAutoCompleteState.autoCompleteText.navbar,y=le(e,"navbar"),E=Sa(c);return{selectedRangeReport:t,selectedClassesViewRangeReport:n,selectedProjectViewRangeReport:r,reportLabels:{reportTitle:p},highlightedRangeReport:a,highlightedClassesViewRangeReport:o,highlightedProjectViewRangeReport:s,uiState:m,scrollPosition:l,downloadParams:{downloadState:t.downloadState,currentTenantCompanyName:u,statementEndPoint:`${oe}/statement`,authParams:C},analytics:w,isZeniUser:Je(h),autoCompleteData:{autoCompleteText:g,entityAutoCompleteView:y},isZeniCOAUsed:E,isAccountingClassesEnabled:Te(e),isAccountingProjectsEnabled:we(e)}}),(function(e,t){return{updateDownloadStateHandler:a=>{e(lo(a))},onTimeframeSelectionChanged:a=>{e(xe(a)),setTimeout((()=>e(be({resetLeftScroll:!0}))),50)},onCOABalancesRangeChanged:(a,n)=>{e(Ue(a,n)),e(be({resetLeftScroll:!0}))},onThisPeriodChanged:a=>{e(ue(t.firstMonthOfFY,a)),e(be({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(a,n,o)=>{e(Ye(t.firstMonthOfFY,a,o,n)),n.length>0&&(e(Be(t.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),t.forecastIdFromUrlPath!=null&&a==1&&$(!1,t.forecastIdFromUrlPath,"",t.navigate)),t.isCompareModeOn!==a&&setTimeout((()=>e(be({resetLeftScroll:!0}))),50)},onAccountBalanceClick:t.hasTransactionAccess!==!0?void 0:(a,n)=>{const{timePeriod:o,timeframe:r}=Ts(n);if(o!=null&&r!=null){const s=a.accountName===""?a.accountDescription:a.accountName,i=a.projectsViewParentId?.projectId!=null?Ta(t.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,s,r,o):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null?Da(t.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId?.[0],s,r,o):De(t.tenantEmailDomain,a.accountId,a.accountType,s,r,o),l=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Operating Expenses"}})}},onElementCollapseStateChanged:(a,n)=>{t.accountViewMode!=="project"?e(be({nodeCollapseState:{nodeId:a,isCollapsed:n}})):e(Ka({nodeCollapseState:{nodeId:a,isCollapsed:n}}))},onTableScroll:a=>{t.accountViewMode!=="project"?e(be({scrollPosition:a})):e(Ka({scrollPosition:a}))},autoCompleteActions:{onAutoCompleteInputChange:a=>{a.trim().length>=2?e(de({searchString:a,searchOrigin:"navbar"})):a.trim().length===0&&e(te("navbar"))},onAutoCompleteEntity:a=>{const n=me(a,t.tenantEmailDomain),o=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{t.selectedForecastId!=null?t.navigate("../../../"):t.navigate("../")},onForecastToggle:(a,n)=>{e(Ie(t.firstMonthOfFY,a==="forecast_mode",a==="forecast_mode"?3:1,n)),a=="forecast_mode"?(e(za({viewMode:"account_group"})),e(Ct(!1,n?.id)),n!=null&&$(!0,t.forecastIdFromUrlPath,n?.id??"",t.navigate)):$(!1,t.forecastIdFromUrlPath,n?.id??"",t.navigate),e(be({resetLeftScroll:!0}))},onUpdateAccountViewMode:a=>{t.analytics?.trackGroupBySwitch(a==="classes"?"Classes":a==="project"?"Projects":"Accounts","Operating Expenses"),e(za({viewMode:a})),e(co({viewMode:a}))},onUpdateClassesToFilterOut:a=>{e(io({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ro({projectsToFilterOut:a}))},onOpenAccountViewMode:()=>{t.isAccountingClassesEnabled&&e(oo()),t.isAccountingProjectsEnabled&&e(so())},onResyncReports:()=>{e(ka(t.accountViewMode==="project"?"operating_expenses_by_projects":"operating_expenses_by_classes"))}}}))(Ke),Ps=e=>{const t=z(),{tenantEmailDomain:a,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=Ne(),{isAiCfoAccessEnabled:i,onAskAiCfoClick:l}=se({mobileExploreReferrer:"DashboardOpEx"}),m=ze({mobileExploreReferrer:"DashboardOpEx"}),p=S((A=>Ia(A))),h=p.isForecastModeOn,f=p.timeframe,c=p.selectedForecast?.id,u=S((A=>ya(A.forecastState,c??""))),C=S((A=>gt(A))),g=S((A=>Aa(A))),y=S((A=>Te(A))),E=S((A=>we(A))),I=S((A=>bt(A).uiState.accountViewMode)),k=p.mode==="compare_mode",x=C.dataAvailable;b.useEffect((()=>{if(c!=null&&h===!0&&($(h,r,c,o),u!=null)){const A=u?.forecastPeriod,U=x!=null&&A.endDate.isAfter(x?.endDate)===!0?x:A;t(ue(e.firstMonthOfFY,{startDate:U.endDate.startOf(f),endDate:U?.endDate}))}}),[c]);const R=$e(),T=R?.loggedInUserRole!=null&&_t(R?.loggedInUserRole)!==!0,_=Pa(R?.currentTenant?.companyId,{clearParams:C.fetchState==="Completed"});return d.jsx(Ds,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,selectedForecastId:r,location:n,isAccountingClassesEnabled:y,isAccountingProjectsEnabled:E,accountViewMode:I,isCompareModeOn:k,navigate:o,forecastIdFromUrlPath:r,analytics:w,hasTransactionAccess:T,reportsResyncFetchState:g.reportsResyncFetchState,insightsSectionAiCfoInfo:m,isAiCfoAccessEnabled:i,onAskAiCfoClick:l,initialOpenThreadRequest:_,meetingUrl:Le(s("dashboard_report_filters"))})},Os=e=>{let t,a;switch(e.balanceTimeFrame){case"month":case"quarter":t=e.balanceTimeFrame,a=ea(e);break;case"year":t="quarter",a={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:t,timePeriod:a}},Fs=ne((function(e){const t=St(e),a=uo(e),n=kt(e),o=mo(e),r=po(e),s=ho(e),i=va(e),{scrollPosition:l,...m}=i,p=X.getLocalizedStrings().common.texts.revenue,h=B.getSignedInUser(),f=e.tenantState.currentTenantId,c=Y(e),u=c?.companyName??"",C={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:f??""},g=e.entityAutoCompleteState.autoCompleteText.navbar,y=le(e,"navbar"),E=Sa(c);return{selectedRangeReport:t,selectedClassesViewRangeReport:n,selectedProjectViewRangeReport:r,reportLabels:{reportTitle:p},highlightedRangeReport:a,highlightedClassesViewRangeReport:o,highlightedProjectViewRangeReport:s,uiState:m,scrollPosition:l,downloadParams:{downloadState:t.downloadState,currentTenantCompanyName:u,statementEndPoint:`${oe}/statement`,authParams:C},analytics:w,isZeniUser:Je(h),autoCompleteData:{autoCompleteText:g,entityAutoCompleteView:y},isZeniCOAUsed:E,isAccountingClassesEnabled:Te(e),isAccountingProjectsEnabled:we(e)}}),(function(e,t){return{updateDownloadStateHandler:a=>{e(So(a))},onTimeframeSelectionChanged:a=>{e(xe(a)),setTimeout((()=>e(Ce({resetLeftScroll:!0}))),50)},onCOABalancesRangeChanged:(a,n)=>{e(Ue(a,n)),e(Ce({resetLeftScroll:!0}))},onThisPeriodChanged:a=>{e(ue(t.firstMonthOfFY,a)),e(Ce({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(a,n,o)=>{e(Ye(t.firstMonthOfFY,a,o,n)),n.length>0&&(e(Be(t.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),t.forecastIdFromUrlPath!=null&&a==1&&$(!1,t.forecastIdFromUrlPath,"",t.navigate)),t.isCompareModeOn!==a&&setTimeout((()=>e(Ce({resetLeftScroll:!0}))),50)},onAccountBalanceClick:(a,n)=>{const{timePeriod:o,timeframe:r}=Os(n);if(o!=null&&r!=null){const s=a.accountName===""?a.accountDescription:a.accountName,i=a.projectsViewParentId?.projectId!=null?Ta(t.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,s,r,o):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null?Da(t.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId?.[0],s,r,o):De(t.tenantEmailDomain,a.accountId,a.accountType,s,r,o),l=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Revenues"}})}},onElementCollapseStateChanged:(a,n)=>{t.accountViewMode!=="project"?e(Ce({nodeCollapseState:{nodeId:a,isCollapsed:n}})):e(Xa({nodeCollapseState:{nodeId:a,isCollapsed:n}}))},onTableScroll:a=>{t.accountViewMode!=="project"?e(Ce({scrollPosition:a})):e(Xa({scrollPosition:a}))},autoCompleteActions:{onAutoCompleteInputChange:a=>{a.trim().length>=2?e(de({searchString:a,searchOrigin:"navbar"})):a.trim().length===0&&e(te("navbar"))},onAutoCompleteEntity:a=>{const n=me(a,t.tenantEmailDomain),o=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{t.selectedForecastId!=null?t.navigate("../../../"):t.navigate("../")},onForecastToggle:(a,n)=>{e(Ie(t.firstMonthOfFY,a==="forecast_mode",a==="forecast_mode"?3:1,n)),a==="forecast_mode"?(e(qa({viewMode:"account_group"})),e(yt(!1,n?.id)),n!=null&&$(!0,t.forecastIdFromUrlPath,n?.id??"",t.navigate)):$(!1,t.forecastIdFromUrlPath,n?.id??"",t.navigate),e(Ce({resetLeftScroll:!0}))},onUpdateAccountViewMode:a=>{t.analytics?.trackGroupBySwitch(a==="classes"?"Classes":a==="project"?"Projects":"Accounts","Revenues"),e(qa({viewMode:a})),e(_o({viewMode:a}))},onUpdateClassesToFilterOut:a=>{e(Co({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(bo({projectsToFilterOut:a}))},onOpenAccountViewMode:()=>{t.isAccountingClassesEnabled&&e(fo()),t.isAccountingProjectsEnabled&&e(go())},onResyncReports:()=>{e(ka(t.accountViewMode==="project"?"revenue_by_projects":"revenue_by_classes"))}}}))(Ke),js=e=>{const t=z(),{tenantEmailDomain:a,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=Ne(),{isAiCfoAccessEnabled:i,onAskAiCfoClick:l}=se({mobileExploreReferrer:"DashboardRevenue"}),m=ze({mobileExploreReferrer:"DashboardRevenue"}),p=S((_=>va(_))),h=p.isForecastModeOn,f=p.timeframe,c=p.selectedForecast?.id,u=S((_=>ya(_.forecastState,c??""))),C=S((_=>St(_))),g=C.dataAvailable,y=p.mode==="compare_mode",E=S((_=>Te(_))),I=S((_=>we(_))),k=S((_=>kt(_).uiState.accountViewMode)),x=S((_=>Aa(_)));b.useEffect((()=>{if(c!=null&&h===!0&&($(h,r,c,o),u!=null)){const _=u?.forecastPeriod,A=g!=null&&_.endDate.isAfter(g?.endDate)===!0?g:_;t(ue(e.firstMonthOfFY,{startDate:A.endDate.startOf(f),endDate:A?.endDate}))}}),[c]);const R=$e(),T=Pa(R?.currentTenant?.companyId,{clearParams:C.fetchState==="Completed"});return d.jsx(Fs,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,selectedForecastId:r,isAccountingClassesEnabled:E,isAccountingProjectsEnabled:I,accountViewMode:k,isCompareModeOn:y,location:n,navigate:o,forecastIdFromUrlPath:r,analytics:w,reportsResyncFetchState:x.reportsResyncFetchState,insightsSectionAiCfoInfo:m,isAiCfoAccessEnabled:i,onAskAiCfoClick:l,initialOpenThreadRequest:T,meetingUrl:Le(s("dashboard_report_filters"))})},Rs=e=>{let t,a;if(e.endDate!=null)switch(e.timePeriod){case"this_month_to_date":case"last_month":case"this_week_to_date":case"last_week":t="month",a={startDate:e.endDate.startOf("month"),endDate:e.endDate};break;case"last_3_months":case"last_6_months":case"last_12_months":case"this_year_to_date":case"last_year":t="quarter",a={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;default:console.error(`this timeperiod ${e.timePeriod} is not supported!`)}return{timeframe:t,timePeriod:a}},Ms=ne((function(e){const t=ko(e),a=e.entityAutoCompleteState.autoCompleteText.navbar,n=le(e,"navbar");return{report:t,analytics:w,autoCompleteData:{autoCompleteText:a,entityAutoCompleteView:n}}}),(function(e,t){return{onTimeframeSelectionChanged:a=>{w.trackTimeframeSwitch(Vt(a),"Top Expenses"),e(At(a))},onAccountBalanceClick:(a,n)=>{const{timePeriod:o,timeframe:r}=Rs(n),s=a.accountName===""?a.accountDescription:a.accountName;if(o!=null&&r!=null){const i=De(t.tenantEmailDomain,a.accountId,a.accountType,s,r,o),l=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Top Expenses"}})}},autoCompleteActions:{onAutoCompleteInputChange:a=>{a.trim().length>=2?e(de({searchString:a,searchOrigin:"navbar"})):a.trim().length===0&&e(te("navbar"))},onAutoCompleteEntity:a=>{const n=me(a,t.tenantEmailDomain),o=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{t.navigate("../")}}}))(qo),Ys=e=>{const{tenantEmailDomain:t,location:a,navigate:n}=e;return d.jsx(Ms,{tenantEmailDomain:t,location:a,navigate:n})},Bs=wa.div`
14
- display: flex;
15
- flex: 1 1 auto;
16
- min-height: 100%;
17
- flex-direction: column;
18
- background-color: ${e=>e.theme.colors.grey5};
19
- align-items: center;
20
- `;function Us({fetchState:e,firstMonthOfFY:t,reportId:a,forecastId:n}){const o=W(),r=H(),{tenantEmailDomain:s}=q();let i;Ve({isDataReady:!0});const l={firstMonthOfFY:t,tenantEmailDomain:s,location:r,navigate:o,forecastIdFromUrlPath:n,fetchState:e};switch(a){case"operating_expenses":i=d.jsx(Ps,{...l});break;case"revenue":i=d.jsx(js,{...l});break;case"net_burn_or_income":i=d.jsx(ws,{...l});break;case"cash_position":i=d.jsx(vs,{...l});break;case"top_expenses":i=d.jsx(Ys,{...l});break;case"cash_in_cash_out":i=d.jsx(ys,{...l});break;default:console.error(`${a} is not supported!`),i=null}return i!=null?d.jsx(Bs,{children:i}):null}function ie(){const e=H(),t=z(),{forecastId:a}=q();let n="Not-Started";const o=S((c=>Ia(c).fetchState)),r=S((c=>va(c).fetchState)),s=S((c=>_a(c).fetchState)),i=S((c=>c.cashPositionState.fetchState)),l=S((c=>c.topExState.fetchState)),m=S((c=>c.cashInCashOutState.fetchState));if(B.getSignedInUser()==null)throw Error("Can't access dashboard detail without signing in...");const p=S((c=>Y(c))),h=p?.company?.companyInfo?.firstMonthOfFY??1,f=rt((c=>{const u=it(c,"/").split("/");return a!=null?u[u.length-3]:u[u.length-1]})(e.pathname));switch(f){case"operating_expenses":n=o;break;case"revenue":n=r;break;case"net_burn_or_income":n=s;break;case"cash_position":n=i;break;case"top_expenses":n=l;break;case"cash_in_cash_out":n=m;break;default:console.error(`${f} is not supported!`)}return b.useEffect((()=>{n==="Not-Started"&&(function(c,u,C,g){switch(u){case"operating_expenses":c(Tt(!0)),g!=null&&(c(Ie(C,!0,3,{id:g,index:0})),c(Ct(!1,g)));break;case"revenue":c(wt(!0)),g!=null&&(c(Ie(C,!0,3,{id:g,index:0})),c(yt(!1,g)));break;case"net_burn_or_income":c(xt(!0)),g!=null&&(c(Ie(C,!0,3,{id:g,index:0})),c(ft(!1,g)));break;case"cash_position":c(Et(!0));break;case"top_expenses":c(vt());break;case"cash_in_cash_out":c(It());break;default:throw new Error(`report type ${u} is not yet supported`)}})(t,f,h,a)}),[a]),d.jsxs(d.Fragment,{children:[n==="Completed"?d.jsx(Ge,{analytics:w,onLoad:c=>((u,C)=>{const g=e.state?.referrer;switch(C){case"operating_expenses":u.trackPageLoaded(N.Event.operatingExpenses,g);break;case"revenue":u.trackPageLoaded(N.Event.revenues,g);break;case"net_burn_or_income":u.trackPageLoaded(N.Event.burnRate,g);break;case"cash_position":u.trackPageLoaded(N.Event.cashPosition,g);break;case"top_expenses":u.trackPageLoaded(N.Event.topExpenses,g);break;case"cash_in_cash_out":u.trackPageLoaded(N.Event.cashInCashOut,g);break;default:console.error(`Analytics: Not tracking Page Loaded for ${C}!`)}})(c,f)}):null,d.jsx(Us,{firstMonthOfFY:h,fetchState:n,reportId:f,forecastId:a})]})}var ia=typeof navigator<"u"&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function ca(e,t,a,n){e.addEventListener?e.addEventListener(t,a,n):e.attachEvent&&e.attachEvent("on".concat(t),(function(){a(window.event)}))}function $t(e,t){for(var a=t.slice(0,t.length-1),n=0;n<a.length;n++)a[n]=e[a[n].toLowerCase()];return a}function zt(e){typeof e!="string"&&(e="");for(var t=(e=e.replace(/\s/g,"")).split(","),a=t.lastIndexOf("");a>=0;)t[a-1]+=",",t.splice(a,1),a=t.lastIndexOf("");return t}for(var Oa={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":ia?173:189,"=":ia?61:187,";":ia?59:186,"'":222,"[":219,"]":221,"\\":220},ce={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Ca={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},M={16:!1,18:!1,17:!1,91:!1},j={},He=1;He<20;He++)Oa["f".concat(He)]=111+He;var D=[],Ha=!1,Kt="all",Wa=[],aa=function(e){return Oa[e.toLowerCase()]||ce[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function Ja(e){Kt=e||"all"}function Re(){return Kt||"all"}var la=function(e){var t=e.key,a=e.scope,n=e.method,o=e.splitKey,r=o===void 0?"+":o;zt(t).forEach((function(s){var i=s.split(r),l=i.length,m=i[l-1],p=m==="*"?"*":aa(m);if(j[p]){a||(a=Re());var h=l>1?$t(ce,i):[];j[p]=j[p].filter((function(f){return!((!n||f.method===n)&&f.scope===a&&(function(c,u){for(var C=c.length>=u.length?c:u,g=c.length>=u.length?u:c,y=!0,E=0;E<C.length;E++)g.indexOf(C[E])===-1&&(y=!1);return y})(f.mods,h))}))}}))};function et(e,t,a,n){var o;if(t.element===n&&(t.scope===a||t.scope==="all")){for(var r in o=t.mods.length>0,M)Object.prototype.hasOwnProperty.call(M,r)&&(!M[r]&&t.mods.indexOf(+r)>-1||M[r]&&t.mods.indexOf(+r)===-1)&&(o=!1);(t.mods.length!==0||M[16]||M[18]||M[17]||M[91])&&!o&&t.shortcut!=="*"||t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function at(e,t){var a=j["*"],n=e.keyCode||e.which||e.charCode;if(V.filter.call(this,e)){if(n!==93&&n!==224||(n=91),D.indexOf(n)===-1&&n!==229&&D.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(u){var C=Ca[u];e[u]&&D.indexOf(C)===-1?D.push(C):!e[u]&&D.indexOf(C)>-1?D.splice(D.indexOf(C),1):u==="metaKey"&&e[u]&&D.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(D=D.slice(D.indexOf(C))))})),n in M){for(var o in M[n]=!0,ce)ce[o]===n&&(V[o]=!0);if(!a)return}for(var r in M)Object.prototype.hasOwnProperty.call(M,r)&&(M[r]=e[Ca[r]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(D.indexOf(17)===-1&&D.push(17),D.indexOf(18)===-1&&D.push(18),M[17]=!0,M[18]=!0);var s=Re();if(a)for(var i=0;i<a.length;i++)a[i].scope===s&&(e.type==="keydown"&&a[i].keydown||e.type==="keyup"&&a[i].keyup)&&et(e,a[i],s,t);if(n in j){for(var l=0;l<j[n].length;l++)if((e.type==="keydown"&&j[n][l].keydown||e.type==="keyup"&&j[n][l].keyup)&&j[n][l].key){for(var m=j[n][l],p=m.splitKey,h=m.key.split(p),f=[],c=0;c<h.length;c++)f.push(aa(h[c]));f.sort().join("")===D.sort().join("")&&et(e,m,s,t)}}}}function V(e,t,a){D=[];var n=zt(e),o=[],r="all",s=document,i=0,l=!1,m=!0,p="+",h=!1;for(a===void 0&&typeof t=="function"&&(a=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(r=t.scope),t.element&&(s=t.element),t.keyup&&(l=t.keyup),t.keydown!==void 0&&(m=t.keydown),t.capture!==void 0&&(h=t.capture),typeof t.splitKey=="string"&&(p=t.splitKey)),typeof t=="string"&&(r=t);i<n.length;i++)o=[],(e=n[i].split(p)).length>1&&(o=$t(ce,e)),(e=(e=e[e.length-1])==="*"?"*":aa(e))in j||(j[e]=[]),j[e].push({keyup:l,keydown:m,scope:r,mods:o,shortcut:n[i],method:a,key:n[i],splitKey:p,element:s});s!==void 0&&!(function(f){return Wa.indexOf(f)>-1})(s)&&window&&(Wa.push(s),ca(s,"keydown",(function(f){at(f,s)}),h),Ha||(Ha=!0,ca(window,"focus",(function(){D=[]}),h)),ca(s,"keyup",(function(f){at(f,s),(function(c){var u=c.keyCode||c.which||c.charCode,C=D.indexOf(u);if(C>=0&&D.splice(C,1),c.key&&c.key.toLowerCase()==="meta"&&D.splice(0,D.length),u!==93&&u!==224||(u=91),u in M)for(var g in M[u]=!1,ce)ce[g]===u&&(V[g]=!1)})(f)}),h))}var da={setScope:Ja,getScope:Re,deleteScope:function(e,t){var a,n;for(var o in e||(e=Re()),j)if(Object.prototype.hasOwnProperty.call(j,o))for(a=j[o],n=0;n<a.length;)a[n].scope===e?a.splice(n,1):n++;Re()===e&&Ja(t||"all")},getPressedKeyCodes:function(){return D.slice(0)},isPressed:function(e){return typeof e=="string"&&(e=aa(e)),D.indexOf(e)!==-1},filter:function(e){var t=e.target||e.srcElement,a=t.tagName,n=!0;return!t.isContentEditable&&(a!=="INPUT"&&a!=="TEXTAREA"&&a!=="SELECT"||t.readOnly)||(n=!1),n},trigger:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(j).forEach((function(a){var n=j[a].find((function(o){return o.scope===t&&o.shortcut===e}));n&&n.method&&n.method()}))},unbind:function(e){if(e===void 0)Object.keys(j).forEach((function(s){return delete j[s]}));else if(Array.isArray(e))e.forEach((function(s){s.key&&la(s)}));else if(typeof e=="object")e.key&&la(e);else if(typeof e=="string"){for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n<t;n++)a[n-1]=arguments[n];var o=a[0],r=a[1];typeof o=="function"&&(r=o,o=""),la({key:e,scope:o,method:r,splitKey:"+"})}},keyMap:Oa,modifier:ce,modifierMap:Ca};for(var ua in da)Object.prototype.hasOwnProperty.call(da,ua)&&(V[ua]=da[ua]);if(typeof window<"u"){var Ls=window.hotkeys;V.noConflict=function(e){return e&&window.hotkeys===V&&(window.hotkeys=Ls),V},window.hotkeys=V}V.filter=function(){return!0};var tt=function(e,t){var a=e.target,n=a&&a.tagName;return!!(n&&t&&t.includes(n))};function Vs(e,t,a,n){a instanceof Array&&(n=a,a=void 0);var o=a||{},r=o.enableOnTags,s=o.filter,i=o.keyup,l=o.keydown,m=o.filterPreventDefault,p=m===void 0||m,h=o.enabled,f=h===void 0||h,c=o.enableOnContentEditable,u=c!==void 0&&c,C=b.useRef(null),g=b.useCallback((function(y,E){var I,k;return s&&!s(y)?!p:!!(tt(y,["INPUT","TEXTAREA","SELECT"])&&!tt(y,r)||(I=y.target)!=null&&I.isContentEditable&&!u)||!!(C.current===null||document.activeElement===C.current||(k=C.current)!=null&&k.contains(document.activeElement))&&(t(y,E),!0)}),n?[C,r,s].concat(n):[C,r,s]);return b.useEffect((function(){if(f)return i&&l!==!0&&(a.keydown=!1),V(e,a||{},g),function(){return V.unbind(e,g)};V.unbind(e,g)}),[g,e,f]),C}V.isPressed;const Gs=[],ma="dashboard_card",ae="ai_cfo_dashboard_card";function nt(e,t){return t?e.some((a=>String(a)===ae))?e.slice():[ae,...e]:e.filter((a=>String(a)!==ae))}const Ns=["net_burn_or_income_story_card","cash_balance","task_card","card_balance","zeni_promo_card","insights_dashboard","information_card","company_details","bill_pay_promo_card","bill_pay_card","reimbursement_card","reimbursement_promo_card","rewards_card"],$s=(e,t,a,n,o)=>({card:{dimension:Ea(a),cardType:n,cardIndex:o,fetchState:t,disableAnimations:!1,spansFullDashboardWidth:!1},data:e.status!=null?{balanceAmount:e.balance?.available,lastUpdatedTime:e.status.lastRefreshSuccessTime,changePercent:e.balance?.change?.percent,changeComparedToDate:e.balance?.change?.since}:void 0}),je=(e,t,a,n,o)=>({card:{dimension:Ea(a),cardType:n,cardIndex:o,fetchState:t,disableAnimations:!1,spansFullDashboardWidth:!1},data:e}),zs=(e,t,a,n)=>je(void 0,e,ve,t,a),Ks=e=>{const t=Ea(ve);return t.height=ve.height+10,{card:{dimension:t,cardType:ae,cardIndex:e,fetchState:"Completed",disableAnimations:!1,spansFullDashboardWidth:!0}}},qs=ne((function(e,t){const a=Zs(t.dashboardReport),n=t.passedCardsOrdered,o=t.dashboardReport.reportsInOrder,{isInterestedInChargeCard:r,cardsCreditLimit:s,cashbackRate:i}=t;let l=n.map(((m,p)=>{if(m==="reimbursement_promo_card"||m==="bill_pay_promo_card")return zs(a,m,p);if(m==="zeni_promo_card")return je({isExpressedInterest:r,creditLimit:s,cashbackRate:i,fetchState:"Completed"},t.cardBalanceFetchState,ve,m,p);if(m==="information_card")return je(void 0,"Completed",ve,m,p);if(m===ae)return Ks(p);{const h=o.find((f=>f?.reportId===m));return h?(function(f,c,u,C){const g=f.reportId;switch(g){case"card_balance":case"cash_balance":return[$s(f,c,u,g,C)];case"expense_automation_card":case"operating_expenses":case"revenue":case"top_expenses":case"cash_position":case"cash_in_cash_out":case"insights_dashboard":case"company_details":case"task_card":case"bill_pay_card":case"reimbursement_card":case"net_burn_or_income":case"accounts_payable_aging":case"accounts_receivable_aging":case"rewards_card":return[je(f,c,u,g,C)];case"net_burn_or_income_story_card":return[je(f,c,u,"net_burn_or_income_story_card",C)];default:return console.error(`card type ${g} not yet supported!`),[]}})(h,h.fetchState,ve,p):[]}})).flat();return t.isSummaryCardsFiltered===!0&&(l=l.filter((m=>Ns.includes(m.card.cardType)==0)).filter((m=>{const p=m.data?.availableNumberOfPeriods;return p!=null?p>0:m.card.cardType!="top_expenses"||m.data==null||(function(h){if(h==null||h.length===0)return!0;let f=!0;for(const c of h)if(c.balance.available.amount!==0){f=!1;break}return f})(m.data.topExpenses.accountsOrdered)===!1}))),{cardDataArray:l,autoCompleteData:{autoCompleteText:e.entityAutoCompleteState.autoCompleteText.navbar,entityAutoCompleteView:le(e,"navbar")},analytics:w,isReimbursementEnabled:t.isReimbursementEnabled,isBillPayEnabled:t.isBillPayEnabled}}),(function(e,t){const a=t.tenantId,n=B.getSignedInUser();return{cardActions:{onCardClick:(o,r,s,i)=>{if(console.warn(`onCardClick at ${o} for the type ${r}`),r==="zeni_promo_card"&&i!=null)w.trackDashboardCardClicked("cards promo",2),w.trackZeniCardsPromoCardClicked(t.isChargeCardFeatureEnabled,i,2,`${n?.firstName??""} ${n?.lastName??""}`,t.isChargeCardFeatureEnabled?t.cardsCreditLimit:void 0),i==="Learn More"?window.open("https://www.zeni.ai/product/business-credit-card","_blank"):t.navigate("../cards/promo",{relative:"path"});else if(t.isForecastOn)switch(r){case"net_burn_or_income":case"operating_expenses":case"revenue":t.navigate(`${r}/forecast/${t.selectedForecastOnDashboard}`,{state:{referrer:s}});break;default:t.navigate(`${r}`,{state:{referrer:s}})}else r==="rewards_card"?(n!=null&&w.trackDashboardCardClicked("rewards promo",o+1),t.navigate("../../rewards/refer",{state:{referrer:s}})):r==="expense_automation_card"?(w.trackMonthEndCloseClicked(t.selectedPeriod.month,t.selectedPeriod.year,"Dashboard"),t.navigate("../../month_end_close_checks/review",{state:{referrer:"Dashboard"}})):t.navigate(`${r}`,{state:{referrer:s}})},onReloadData:(o,r)=>{const s=[];t.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),t.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),t.isRewardsFeatureEnabled===!1&&s.push("rewards_card"),(function(i,l,m,p){if(l!==ae)switch(l){case"card_balance":i(lt());break;case"cash_balance":i(ct());break;case"operating_expenses":i(Tt(!0));break;case"revenue":i(wt(!0));break;case"net_burn_or_income":i(xt(!0));break;case"net_burn_or_income_story_card":i(Mo(!0));break;case"cash_position":i(Et(!0));break;case"top_expenses":i(vt());break;case"cash_in_cash_out":i(It());break;case"insights_dashboard":i(Ro());break;case"bill_pay_card":i(jo());break;case"reimbursement_card":i(Fo());break;case"company_details":i(Oo(m));break;case"task_card":i(Po());break;case"accounts_payable_aging":p.includes("accounts_payable_aging")===!1&&i(fa(Ee()));break;case"accounts_receivable_aging":i(ga(Ee()));break;case"rewards_card":p.includes("rewards_card")===!1&&i(Do(!0));break;default:throw new Error(`report type ${l} is not yet supported`)}})(e,r,t.companyId,s)},onTimeframeChange:(o,r)=>{w.trackTimeframeSwitch(Vt(r),Qs(o),"Dashboard"),(function(s,i,l){switch(i){case"operating_expenses":case"revenue":case"net_burn_or_income":case"cash_position":s(xe(l));break;case"top_expenses":s(At(l));break;default:throw new Error(`report type ${i} doesn't support changeTimeframe`)}})(e,o,r)},onUpdateSelectedInsightIndex:o=>{e(To(o))},onCategoryClick:(o,r,s)=>{o==="bill-pay"?t.navigate("../bills",{state:{tab:r,subTab:s},relative:"path"}):o==="reimbursement"?t.navigate("../reimbursements",{state:{tab:r,subTab:s},relative:"path"}):o==="uncategorized-account-mapping"?t.navigate("../settings/accounting",{relative:"path"}):o==="show-all-tasks"?t.navigate("../tasks",{relative:"path"}):t.navigate(`../../transactions/${o}`)},onCardBtnClick:o=>{if(o==="bill_pay_promo_card"){const r="../bills",s=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(r,{state:{pathnameStackToGoBack:s},relative:"path"})}else if(o==="reimbursement_promo_card"){const r="../reimbursements",s=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(r,{state:{pathnameStackToGoBack:s},relative:"path"})}},onSaveClick:(o,r,s)=>{o==="net_burn_or_income_story_card"&&(w.trackUpdateBurnRateCalculatorSettings(r,s,xo(s)),e(wo(a,r,s)))}},autoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(de({searchString:o,searchOrigin:"navbar"})):o.trim().length===0&&e(te("navbar"))},onCancelAutoComplete:()=>{e(te("navbar"))},onAutoCompleteEntity:o=>{let r="";r=o.type!=="vendor"||o.detailType!=="bank_merchant"&&o.detailType!=="card_merchant"?me(o,t.tenantEmailDomain):os(o.zeniId,o.qboId,t.tenantEmailDomain);const s=O(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(r,{state:{pathnameStackToGoBack:s,referrer:"Search"}})}}}}))(ts);function Xs(){const e=ot(),t=Ft(),a=Bt(t),{isAiCfoOpen:n,setIsAiCfoOpen:o,setAiCfoSidePanelQuestionToSubmit:r}=Ot(),s=W(),i=z(),l=H(),m=B.getSignedInUser(),{useFeatureGate:p,useDynamicConfig:h}=xa(),[f,c]=b.useState(!1),[u,C]=b.useState(!1),g=jt(),{tenantEmailDomain:y}=q(),{isAiCfoAccessEnabled:E,onAskAiCfoClick:I}=se({mobileExploreReferrer:"Dashboard"}),k=S((v=>v.tenantState.fetchState==="Completed"||v.tenantState.activeTenantFetchState.fetchState==="Completed"?Y(v):void 0)),x=k??B.getSignedInUserTenant(y),{isCardsShuttingDown:R,shutdownContent:T}=Xo(x?.tenantId,k?.company?.managementInfo?.receiverEmails),_=b.useMemo((()=>R===!0&&T!=null?d.jsx(Qo,{shutdownContent:T}):null),[R,T]),A=k?.masterTOSInfo?.isMasterTOSAccepted??!1,U=x.tenantId,pe=x.companyId;b.useEffect((()=>{f===!1&&l.state?.message==="activation"&&(i(yo(pe)),c(!0))}),[l.state,f,pe,i]),b.useEffect((()=>{g&&!u&&l.state?.message==="open_ai_cfo_drawer"&&(C(!0),A?(o(!0),s({pathname:l.pathname,search:l.search,hash:l.hash},{replace:!0,state:{...l.state,message:void 0}})):re({location:l,navigate:s,mergeState:{referrer:"Dashboard",message:void 0}}))}),[l,u,g,A,o,s]);const{isFeatureEnabled:Pe}=p(G.isApAgingFeatureEnabled),_e=Zo(),F=Ho(_e),{isFeatureEnabled:J}=p(G.isArAgingFeatureEnabled),{isFeatureEnabled:qe}=p(G.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Xe}=p(G.isReferralFeatureEnabled),{isFeatureEnabled:qt}=p(G.isChargeCardFeatureEnabled),{isFeatureEnabled:Xt}=p(G.isAiCfoFileUploadEnabled),{isFeatureEnabled:Qt}=p(G.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Zt}=p(G.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Ht}=p(G.aiAuditScorePercentage),{configValue:Fa}=h(Rt.zeniCardsConfig),Wt=Fa.charge_card_cashback_rate_per_transaction==null?.0175:Fa.charge_card_cashback_rate_per_transaction;if(l.state?.message==="activation"){const v=Wo(l.state?.pathnameStackToGoBack);s(l.pathname,{state:{...l.state,message:void 0,pathnameStackToGoBack:v.newStack}})}const[ja,Jt]=b.useState(!1),[ta,en]=b.useState(!1);Vs("command+p, Control+p",(v=>{en(!ta),v.preventDefault()}),{enableOnContentEditable:!0,enableOnTags:["INPUT","SELECT","TEXTAREA"]},[ta]);const Ra=k?.externalConnections?.accounting[0]?.isValid;if(m==null)throw Error("Can't access dashboard without signing in...");const he=S((v=>Y(v)?.excludedResources)),an=S((v=>v.expenseAutomationViewState.selectedPeriodByTenantId)),tn=!!k?.companyReimbursementInfo?.info?.isReimbursementEnabled,nn=!!k?.companyBillPayInfo?.info?.isBillPayEnabled,on=$e(),K=[],Ma=he?.resources?.find((v=>v.resource==="/reports/top_expenses"))==null,sn=he?.resources?.find((v=>v.resource==="/reports/task_card"))==null,Ya=k?.userRole!=null&&_t(k?.userRole),rn=he?.resources?.find((v=>v.resource==="/bills"))==null&&!Ya,cn=he?.resources?.find((v=>v.resource==="/reimbursements"))==null,ln=Ao(on?.loggedInUserRoleMap),dn=k?.company?.companyChargeCardInfo?.chargeCardsCreditAccountLimit??0,un=k?.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1;Ma===!1&&K.push("top_expenses"),sn===!1&&K.push("task_card"),rn===!1&&K.push("bill_pay_card","bill_pay_promo_card"),Pe===!1&&K.push("accounts_payable_aging"),J===!1&&K.push("accounts_receivable_aging"),(_e===!1||Ya)&&K.push("expense_automation_card"),cn===!1&&K.push("reimbursement_card","reimbursement_promo_card"),K.push("zeni_accounts_promo_card","treasury_promo_card"),Xe===!1&&K.push("rewards_card");const{areTenantIdsInSync:Ba}=Jo();b.useLayoutEffect((()=>{ja&&F===_e||Ra!==!0||!Ba||he?.fetchState!=="Completed"&&he?.fetchState!=="Error"||(Jt(!0),i(Io(m.userId,pe,U,!0,!1,K)))}),[ja,m,U,i,Ma,Ra,he?.fetchState,Ba]);const mn=S((v=>v.reportUIOptionsState.forecastOnDashboard.isForecastModeOn)),pn=S((v=>v.revenueState.uiState.selectedForecast?.id)),hn=S((v=>v.cardBalanceState.fetchState)),fe=S((v=>vo(v,K))),fn=fe.fetchState,gn=b.useMemo((()=>nt(fe.cardsOrdered,E)),[fe.cardsOrdered,E]),bn=b.useMemo((()=>nt(fe.cardsForDashboardUI,E)),[fe.cardsForDashboardUI,E]);Ve({isDataReady:!0});const{isSuggestedQuestionsLoading:Cn,suggestedPromptQuestions:_n}=rs(),Ua=S((v=>dt(v))),Se=Ua.uiState?.currentChatSessionId,na=Ua.allSessionsWithOrderedQuestionAnswers??Gs,{currentSessionQuestionAnswers:Sn}=es(na,Se),La=Sn.length===0,kn=b.useCallback(((v,Q,ee)=>{const ke=m?.userId;if(ke==null)return;const L=v.trim();if(L.length===0&&Q.length===0)return;if(!A)return void re({location:l,navigate:s,mergeState:{referrer:"Dashboard",...L.length>0?{aiCfoInitialQuestion:L,aiCfoInitialSubmissionSource:ma,...typeof ee=="number"?{aiCfoSuggestionIndex:ee}:{}}:{}}});const Z=Mt(e.getState()),ye=()=>{const Ae=O(l.state?.pathnameStackToGoBack,l.pathname);s(`/${y}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:Ae,referrer:"Dashboard",aiCfoInitialQuestion:L,aiCfoShouldSubmit:!Z&&L.length>0,aiCfoInitialSubmissionSource:ma,...typeof ee=="number"?{aiCfoSuggestionIndex:ee}:{}}})};return a?Q.length>0?void o(!0):void ye():Q.length>0?Z?(i(ba(L)),void o(!0)):(r(L.length>0?L:null),o(!0),void(L.length>0&&Yt(i,L,ma,Se,na,ke,ee,Q.length>0?Q:void 0))):(Z&&i(ba(L)),void ye())}),[na,Se,i,A,a,l,s,r,o,m?.userId,e,y]),yn=b.useCallback((()=>{A?o(!0):re({location:l,navigate:s,mergeState:{referrer:"Dashboard"}})}),[A,l,s,o]),An=b.useCallback((()=>{if(!A)return void re({location:l,navigate:s,mergeState:{referrer:"Dashboard"}});if(y==null)return;const v=O(l.state?.pathnameStackToGoBack,l.pathname);s(`/${y}/ai-cfo/explore`,{state:{pathnameStackToGoBack:v,referrer:"Dashboard"}})}),[A,l,s,y]),In=b.useCallback((()=>{if(A)if(a){if(y==null||k==null)return;const v=Se==null||La?`/${y}/ai-cfo/explore`:`/${y}/ai-cfo/${Se}`,Q=l.state?.pathnameStackToGoBack??[],ee=O(Q,l.pathname);s(v,{state:{...l.state,pathnameStackToGoBack:ee,[as]:!0}})}else re({location:l,navigate:s,mergeState:{referrer:"Dashboard"}});else re({location:l,navigate:s,mergeState:{referrer:"Dashboard"}})}),[A,a,l,s,y,k,Se,La]);return d.jsxs(d.Fragment,{children:[fn==="Completed"?d.jsx(Ge,{analytics:w,onLoad:v=>{v.trackPageLoaded(N.Event.dashboard)}}):null,d.jsx(qs,{cardsShutdownBanner:_,maxColumns:n?2:void 0,isAiCfoAccessEnabled:E,onAskAiCfoClick:I,onAiCfoDashboardOpenPanel:yn,onAiCfoDashboardOpenScopePage:In,isAiCfoFileUploadEnabled:Xt===!0&&a===!1,onAiCfoDashboardPromptSubmit:kn,onAiCfoDashboardExpandToFullPage:An,aiCfoDashboardShouldClearPromptOnSubmit:A,aiCfoDashboardSuggestedPromptQuestions:_n,aiCfoDashboardSuggestedPromptQuestionsLoading:Cn,onDragAndDropCard:(v,Q)=>{if(v===ae||Q===ae)return;const ee=(function(Z,ye,Ae){const oa=Ae.indexOf(Z),sa=Ae.indexOf(ye);if(oa===-1||sa===-1||oa===sa)return Ae;const ra=[...Ae];return ra.splice(oa,1),ra.splice(sa,0,Z),ra})(v,Q,gn),ke=ee.filter((Z=>Z!==ae)),L=fe.cardsOrdered;(ke.length!==L.length||ke.some(((Z,ye)=>Z!==L[ye])))&&i(Eo(ke))},dashboardReport:fe,passedCardsOrdered:bn,tenantId:U,companyId:pe,tenantEmailDomain:y,location:l,navigate:s,isApAgingFeatureEnabled:Pe,isArAgingFeatureEnabled:J,isBillPayEnabled:nn,isReimbursementEnabled:tn,isSummaryCardsFiltered:ta,isForecastOn:mn,selectedForecastOnDashboard:pn,isVisitingFirstTime:f,isZeniAccountEnabled:qe,isRewardsFeatureEnabled:Xe,selectedPeriod:an[U],isChargeCardFeatureEnabled:qt,isUserHasCardsAccess:ln,cardsCreditLimit:dn,cashbackRate:Wt,isInterestedInChargeCard:un,cardBalanceFetchState:hn,christmasAnimationEnabled:Qt,newYearAnimationEnabled:Zt,aiAuditScorePercentageEnabled:Ht})]})}const Qs=e=>{switch(e){case"operating_expenses":return"Operating Expenses";case"revenue":return"Revenues";case"top_expenses":return"Top Expenses";case"net_burn_or_income":return"Burn Rate";case"cash_in_cash_out":return"Cash In, Cash Out";case"cash_position":return"Cash Position"}return"Dashboard"},Zs=e=>e.fetchState!=="Error"?e.fetchState:e.reportsInOrder.map((t=>t.fetchState)).reduce(((t,a)=>t==="In-Progress"||t==="Not-Started"?t:a));function pa(){return d.jsxs(ha,{children:[d.jsx(P,{path:"/",element:d.jsx(ie,{})}),d.jsx(P,{path:"/:forecastId",element:d.jsx(ie,{})}),d.jsx(P,{path:"/:forecastId/*",element:d.jsx(Me,{})})]})}function wr(){const e=$e(),t=e?.excludedResources?.find((m=>m.resource==="/reports/top_expenses"))==null,{useFeatureGate:a}=xa(),{isFeatureEnabled:n}=a(G.isApAgingFeatureEnabled),{isFeatureEnabled:o}=a(G.isArAgingFeatureEnabled),r=S((m=>Y(m))),{isFeatureEnabled:s}=a(G.isDebitCardFeatureEnabled),i=Yo(s,r),l=Bo(r);return i===!0||l===!0?d.jsx(ha,{children:d.jsx(P,{path:"/*",element:d.jsx(is,{})})}):d.jsxs(ha,{children:[d.jsx(P,{path:"/",element:d.jsx(Xs,{})}),d.jsx(P,{path:"cash_balance/*",element:d.jsx(Qa,{})}),d.jsx(P,{path:"card_balance/*",element:d.jsx(Qa,{})}),d.jsx(P,{path:"operating_expenses/*",element:d.jsx(ie,{})}),d.jsx(P,{path:"operating_expenses/forecast/*",element:d.jsx(pa,{})}),d.jsx(P,{path:"revenue/forecast/*",element:d.jsx(pa,{})}),d.jsx(P,{path:"revenue/*",element:d.jsx(ie,{})}),d.jsx(P,{path:"net_burn_or_income/forecast/*",element:d.jsx(pa,{})}),d.jsx(P,{path:"net_burn_or_income/*",element:d.jsx(ie,{})}),n===!0&&d.jsxs(d.Fragment,{children:[d.jsx(P,{path:"accounts_payable_aging/*",element:d.jsx(ls,{})}),d.jsx(P,{path:"accounts_payable_aging/:vendorId/:reportDate/*",element:d.jsx(cs,{})})]}),o&&d.jsxs(d.Fragment,{children:[d.jsx(P,{path:"accounts_receivable_aging/:customerId/:reportDate/*",element:d.jsx(ds,{})}),d.jsx(P,{path:"accounts_receivable_aging/*",element:d.jsx(us,{})})]}),d.jsx(P,{path:"cash_position/*",element:d.jsx(ie,{})}),d.jsx(P,{path:"top_expenses/*",element:t===!0?d.jsx(ie,{}):d.jsx(Me,{})}),d.jsx(P,{path:"cash_in_cash_out/*",element:d.jsx(ie,{})}),d.jsx(P,{path:"company_details",element:d.jsx(ss,{})}),d.jsx(P,{path:"referrals/*",element:d.jsx(vn,{to:"../../rewards/refer",replace:!0})}),d.jsx(P,{path:"*",element:d.jsx(Me,{})})]})}export{wr as default};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-BlNqAXG4.js";import{h as w,g as C,j as h,l as E,i as V}from"./core-Dx-yNdOO.js";import{Zu as k,ZB as q,gJ as J,gI as L,gH as M,kT as W,Xs as X,uV as K,fI as B,Z1 as D,kR as T,Zv as v,ZE as F,kP as G,la as j}from"./zeni-epic-state-DU8p9Pr6.js";import{bL as Q,_ as R,q as N,z as Z,a2 as p,$ as S,a5 as U,bM as Y,E as _,bN as ee,p as te}from"./index-BN_JNPW3.js";import{u as H,n as O}from"./mui-DicWBIpH.js";import"./sentry-oO1cMYln.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]="b0c26210-882d-41d7-935f-3f28e88260c5",e._sentryDebugIdIdentifier="sentry-dbid-b0c26210-882d-41d7-935f-3f28e88260c5")}catch{}})();const ne=E(null,(function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(X("common")),n!=null&&e(K(n))},onGetOtp:n=>{e(M(n,"BillPayVendor"))},onResendOtp:n=>{e(L(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(J(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(q(n,a,o))}}}))(Q);function z({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=O.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,oe=E((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),r=s.poppedPathname??$();n(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(F({data:r}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??$(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}}))(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:r}=V(),i=e??s,{useFeatureGate:c}=N(),d=Z.getSignedInUser(),b=h((u=>B(u))),g=H(),I=p(a.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,i))),{isFeatureEnabled:x}=c(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(S.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(U,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(z,{vendorId:i,billId:r}),l.jsx(oe,{location:a,navigate:n,billId:r,vendorId:i,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},A=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function ve(e,t,n){return A(e,"ach",t,n)}function Se(e,t,n){return A(e,"domestic",t,n)}function ge(e,t,n){return A(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},ce=O.div`
10
- display: flex;
11
- height: 100vh;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${e=>e.theme.colors.grey4};
17
- box-shadow: ${e=>`0px 2px ${_.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,re=E((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:i}=r;return{onFetchBankName:c=>{e(j(c))},onSaveHandler:c=>{e(G(t.bankAccountContext,c,"us-domestic",s))},onWireDetailsUpdated:c=>{const{bankAccountSection:d}=c;e(F({data:d}))},onCancel:()=>{(()=>{const c=p(o.state?.pathnameStackToGoBack),d=c.poppedPathname??P();a(d,{state:{pathnameStackToGoBack:c.newStack}})})(),e(v())},onAddressClick:c=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const d=se(i,c,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(d,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const c=p(t.location.state?.pathnameStackToGoBack),d=c.poppedPathname??P(0);t.navigate(d,{state:{pathnameStackToGoBack:c.newStack}})}e(v())}}}))(ee);function Ie({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:r}=V(),i=e??s,c=Z.getSignedInUser(),{useFeatureGate:d}=N(),b=H(),g=h((u=>B(u))),I=p(a.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,i))),{isFeatureEnabled:x}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(S.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(U,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${_.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(ce,{windowSize:o,children:[l.jsx(z,{vendorId:i,billId:r}),l.jsx(re,{location:a,navigate:n,billId:r,vendorId:i,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,Ie as D,z as V,me as a,se as b,ke as c,Se as d,he as g,ge as i,ve as v};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-BlNqAXG4.js";import{_ as l,a9 as c}from"./index-BN_JNPW3.js";import{u as f,D as p}from"./mui-DicWBIpH.js";import"./sentry-oO1cMYln.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]="7343a8d4-dee6-4ca7-9ab3-2b3236099e14",e._sentryDebugIdIdentifier="sentry-dbid-7343a8d4-dee6-4ca7-9ab3-2b3236099e14")}catch{}})();const b={drawerLeftMargin:new c(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=l(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:a})}export{h as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BlNqAXG4.js";import{a as d}from"./sentry-oO1cMYln.js";import{h as G,u as A,g as X,i as q,j as c,N as O,l as W,n as F,o as N}from"./core-Dx-yNdOO.js";import{Xx as _,fI as M,WO as R,n3 as Y,SO as b,XC as $,Xr as z,m3 as U,SP as S,WT as V,WU as H,Xt as J,Xs as K}from"./zeni-epic-state-DU8p9Pr6.js";import{b6 as L,h as Q,a2 as Z,p as tt}from"./index-BN_JNPW3.js";import"./mui-DicWBIpH.js";import{d as I}from"./decodeURIComponentSafe-gD0LryXw.js";import{w as et}from"./withTransactionSidePanel-BGYKHHLT.js";import{f as nt,c as at}from"./routePaths-P47RCoW6.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.js";import"./useAskAiCfoHostNavButtonProps-BOks8lHg.js";import"./TransactionDetailScreen-DEfBPk22.js";import"./useInitialThreadRequest-J-yGGXi5.js";import"./expenseAutomationHelper--OaaBO01.js";import"./stripSplatSuffix-DUyz4jOZ.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]="09f95c78-8ecf-4842-b5eb-e469ddc08cfd",n._sentryDebugIdIdentifier="sentry-dbid-09f95c78-8ecf-4842-b5eb-e469ddc08cfd")}catch{}})();const ot=W((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:Q,isAccountingClassesEnabled:U(n)}}),(function(n,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${at(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?n(J({searchString:e,searchOrigin:"common"})):e.trim().length===0&&n(K("common"))},onAutoCompleteEntity:e=>{const o=nt(e,t.tenantEmailDomain);n(V()),n(H()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??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(b(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),n(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(L),it=et((function({entityType:n,...t}){const e=G(),o=A(),l=X(),[m,h]=d.useState(!1),[T,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:j}=q(),r=I(x??""),p=I(j??""),f=rt(r,p),v=[r,p].filter((a=>a!=null)),i={name:p,id:r,type:n,zeniId:r,qboId:r},g=c((a=>_(a.customerIncomeState,a.vendorExpenseState,a.trendState,i,"quarter"))),w=c((a=>M(a).company?.companyInfo.firstMonthOfFY??1)),u=c((a=>R(a.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&f===!0&&(h(!0),o(Y(i)))}),[m,f,i]);const P=c((a=>a.trendState.fetchState)),E=u?.selectedPeriod?.timePeriod??g,B=(function(a,y){return a!=null&&y!=null?{startDate:a.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&T===!1&&P==="Completed"&&(D(!0),E!=null&&o(b(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))}),[m,T,P]),f?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{h(!1),D(!1)},...t}):s.jsx(O,{to:k(v.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 wt({entityType:n}){return s.jsx(F,{children:s.jsx(N,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:n})})})}export{wt as EntityDetailRoutes,wt as default};