@zeniai/web-app-ui 5.3.55-dev → 5.3.56-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.
- package/dist/assets/{AccountMappingScreen-DdQz2lM1.js → AccountMappingScreen-BJKuQUQK.js} +2 -2
- package/dist/assets/{ActualMatchingMatchDetailScreen-CGBN-Q-7.js → ActualMatchingMatchDetailScreen-CkH9aaHO.js} +1 -1
- package/dist/assets/AddressRoutes-CHBmN4QX.js +1 -0
- package/dist/assets/AddressScreen-DVcm6rtP.js +9 -0
- package/dist/assets/AiCfoScreen-DLhxVK3m.js +22 -0
- package/dist/assets/{AppDrawer-CKP6jrbF.js → AppDrawer-DFw9ygHT.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BpoA_nrV.js → BillPayApprovalRoutes-CrSvpjTF.js} +1 -1
- package/dist/assets/{BillPayRoutes-B9NE4VxB.js → BillPayRoutes-D25IkCRG.js} +7 -7
- package/dist/assets/BusinessVerificationPageScreen-C3i585S_.js +9 -0
- package/dist/assets/{CardsAiCfoScreen-oYxLbDwZ.js → CardsAiCfoScreen-CGVXrGo3.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-ljOxkkUf.js → ChargeCardRoutes-Be1yd7vs.js} +10 -10
- package/dist/assets/{CompanyPassportScreen-CamQRzbi.js → CompanyPassportScreen-BbxvKQ4h.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-DW_RpnUG.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-B9oqAEpw.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-UN9_koR-.js → CustomerOnboardingRoutes-DZPhXsuR.js} +2 -2
- package/dist/assets/{DashboardRoutes-B00G02__.js → DashboardRoutes-BNQ_G2Ja.js} +3 -3
- package/dist/assets/{DefaultTenantHome-BvquDIuf.js → DefaultTenantHome-CQb3BNY_.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-B1WqjoYC.js +18 -0
- package/dist/assets/{DrawerScreen-2p7xfq2O.js → DrawerScreen-BjVCvYOx.js} +1 -1
- package/dist/assets/EntityDetailRoutes-DPPxLcP3.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-Beqj_B98.js +38 -0
- package/dist/assets/FeaturePreviewScreen-DrZBk8z9.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-uMS-Wn41.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-CvLL3Xda.js → InboxNotificationsProvider-0KkUrcUF.js} +1 -1
- package/dist/assets/{InvoicingRoutes-BXUW-5w1.js → InvoicingRoutes-B7hVOPnd.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-BxAzMNve.js → MagicLinkRoutes-0XNlBf8h.js} +6 -6
- package/dist/assets/MagicLinkSignInScreen-CmEuq8yZ.js +12 -0
- package/dist/assets/{MobileAppDrawer-fNaMEqpG.js → MobileAppDrawer-C4BbqfYY.js} +1 -1
- package/dist/assets/NotFoundScreen-BudPMncf.js +1 -0
- package/dist/assets/NotificationRoutes-ui3la9Pl.js +1 -0
- package/dist/assets/OAuthConsentScreen-BxSGmmYb.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-CQxitPGl.js +1 -0
- package/dist/assets/{PaymentLinkScreen-0thjtbfK.js → PaymentLinkScreen-DZFH9-Dr.js} +3 -3
- package/dist/assets/PeopleRoutes-CTbqr9KR.js +22 -0
- package/dist/assets/PerformanceRoutes-DqqsTiLL.js +1 -0
- package/dist/assets/{Preview-CudBKEb3.js → Preview-CUqbKJrc.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-a_jxuJVg.js → QBOConnectionScreen-83wGiY1-.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-DHL_6iez.js → ReimbursementApprovalRoutes-CefdRKJA.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-j72H8n28.js → ReimbursementApprovalRuleDetailScreen-DVIQ0iGz.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Cyrl2qi_.js → ReimbursementRoutes-CYSobdK2.js} +4 -4
- package/dist/assets/{ReportsRoutes-DSY4nYh6.js → ReportsRoutes-C0_U8cPe.js} +1 -1
- package/dist/assets/RewardsRoutes-Cuv6zmgH.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-C4z4GiyE.js → ScheduleDetailsPrepaidExpensesScreen-BQ_Jeykv.js} +5 -5
- package/dist/assets/ScreenRoutes-CWs8sPE7.js +2 -0
- package/dist/assets/{SettingsRoutes-DfnQIw3N.js → SettingsRoutes-tupY8NX6.js} +6 -6
- package/dist/assets/{SetupPagesScreen-Zigm3cB1.js → SetupPagesScreen-IP9GnMvD.js} +5 -5
- package/dist/assets/SignInScreen-C_QB0DLT.js +1 -0
- package/dist/assets/SignOutScreen-Dlg2jHAz.js +9 -0
- package/dist/assets/{TaskListScreen-WGfeq9_a.js → TaskListScreen-BLrDzaze.js} +2 -2
- package/dist/assets/TaskRoutes-D1AnOebo.js +9 -0
- package/dist/assets/TransactionDetailRoutes-aJqQLpSX.js +1 -0
- package/dist/assets/{TransactionDetailScreen-BDWEHK1J.js → TransactionDetailScreen-DVTW16A1.js} +2 -2
- package/dist/assets/{TransactionListRoutes-COxnLE0l.js → TransactionListRoutes-7PO54jHW.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DmSouKJP.js → TreasuryRoutes-BLoMlu93.js} +5 -5
- package/dist/assets/{VendorsRoutes-OsvLnOdY.js → VendorsRoutes-u3UbdNbB.js} +12 -12
- package/dist/assets/WiseConfirmationScreen-BwqpmX8S.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-O9BxDbbv.js → ZeniAccountRoutes-CDbRnTrg.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-lhzrOeGm.js +9 -0
- package/dist/assets/{accountMappingHelper-DTr2dybD.js → accountMappingHelper-DAAt9xyM.js} +1 -1
- package/dist/assets/{analytics-BLHCH9ZW.js → analytics-B3pE_Rhv.js} +1 -1
- package/dist/assets/{analyticsHelper-DhzoozKy.js → analyticsHelper-DvdruwkE.js} +1 -1
- package/dist/assets/{core-_lmxLuL7.js → core-BtMsWhj9.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CNj7wDd5.js → decodeURIComponentSafe-roe2OgG2.js} +1 -1
- package/dist/assets/{dnd-4_dRT_p_.js → dnd-NbF88ub7.js} +1 -1
- package/dist/assets/{empty-Bz6Du369.js → empty-CaVGMRjr.js} +1 -1
- package/dist/assets/{empty-B3p_skJy.js → empty-Cx0IX9BK.js} +1 -1
- package/dist/assets/{emptyVideoElement-DVls5c-N.js → emptyVideoElement-BixupcUv.js} +1 -1
- package/dist/assets/epic-CvUAcLT0.js +2 -0
- package/dist/assets/expenseAutomationHelper-oTNGiYVa.js +1 -0
- package/dist/assets/{getLocaleForTenant-DiPOVD9Y.js → getLocaleForTenant-omtGYMrM.js} +1 -1
- package/dist/assets/{index-BqEaHxIT.js → index-BdE3bEFg.js} +11876 -11875
- package/dist/assets/{index-Cg11XXLq.js → index-CgkBXLPm.js} +1 -1
- package/dist/assets/{index-DMJTTbIe.js → index-CscHaeoB.js} +1 -1
- package/dist/assets/{index-sGFH656b.js → index-D4z6ymU4.js} +1 -1
- package/dist/assets/{index-DYybIBq-.js → index-DH8aYJll.js} +1 -1
- package/dist/assets/{index-DLV1sgpa.js → index-De8Bm1rc.js} +1 -1
- package/dist/assets/{index-BXkbHEmr.js → index-Dh_E8szn.js} +2 -2
- package/dist/assets/{index-hIpaHuHG.js → index-Dpw9AdmE.js} +1 -1
- package/dist/assets/{lexical-BibO8P7-.js → lexical-OFbGuPVJ.js} +1 -1
- package/dist/assets/{liveblocks-C_txwMxP.js → liveblocks-CVtnm86a.js} +1 -1
- package/dist/assets/{lottie-CyJj6i4R.js → lottie-DX_KUXtr.js} +1 -1
- package/dist/assets/{mui-DbFwPEO7.js → mui-DdZ2UeI1.js} +1 -1
- package/dist/assets/{pathToGoBack-W4B39XGQ.js → pathToGoBack-DUa0cp7d.js} +1 -1
- package/dist/assets/{pdf-BfgO0ZZE.js → pdf-Ck6JVYdq.js} +3 -3
- package/dist/assets/{pdf-lib-B5AjOY9Z.js → pdf-lib-BXXBaukU.js} +1 -1
- package/dist/assets/{plaid-DHbQ1Fnc.js → plaid-nsaMWH8B.js} +1 -1
- package/dist/assets/{pusher--5P9Uwc_.js → pusher-D5GzcojU.js} +1 -1
- package/dist/assets/{react-DrxoeICl.js → react-0n9ZpUxt.js} +1 -1
- package/dist/assets/{react-BmknZowZ.js → react-BgVq8Vpa.js} +1 -1
- package/dist/assets/{react-CUz7FHyX.js → react-C-0cdt-e.js} +1 -1
- package/dist/assets/{react-h8fTHwLe.js → react-CWdFYh5J.js} +1 -1
- package/dist/assets/{react-IBoMtt1b.js → react-DXmkD3ns.js} +1 -1
- package/dist/assets/{react-BKa7fZpZ.js → react-DhgbPzuh.js} +1 -1
- package/dist/assets/{recharts-B43pV0TY.js → recharts-DhwkC6iY.js} +1 -1
- package/dist/assets/{routePaths-C1I3AVBw.js → routePaths-znAFGC3M.js} +1 -1
- package/dist/assets/{sentry-D_60LtUS.js → sentry-BzkfMVrG.js} +1 -1
- package/dist/assets/{stripSplatSuffix-BWXYYZxG.js → stripSplatSuffix-BORWr7jN.js} +1 -1
- package/dist/assets/{url-BryZycM8.js → url-B1VibTls.js} +1 -1
- package/dist/assets/{url-CvufulZn.js → url-DLwy6QED.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-BOc11rCC.js → useActualMatchingMatchDetail-BATx-hw7.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DfcdcxeV.js → useAiCfoDashboardSuggestedQuestionsChips-RBwji9iv.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-Biynu986.js → useAskAiCfoHostNavButtonProps-yiVAQfVL.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-N9Kbq9gN.js → useChargeCardPusherEvents-D6w93u1p.js} +1 -1
- package/dist/assets/{useDeviceId-Dks2onQn.js → useDeviceId-Cvm1S2SE.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-BtvKv8-C.js → useEmailConnectResultRefresh-BuXXdg7d.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CyHRajCC.js → useInitialThreadRequest-CRJTlzEQ.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-Cs4MVKyS.js → useTaskManagerAccess-CtzHb9vx.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-BPWIyNie.js → useTaskManagerPusherEvents-BsdLgh09.js} +1 -1
- package/dist/assets/{utils-CPbtTTqo.js → utils-BrzWPNCR.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Dxu14DPo.js → withTransactionSidePanel-BrwXnQ2x.js} +4 -4
- package/dist/assets/{zeni-epic-state-CtlpRqoe.js → zeni-epic-state-xhG_euwn.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-CynmpoQu.js +0 -1
- package/dist/assets/AddressScreen-DqZYCoSs.js +0 -9
- package/dist/assets/AiCfoScreen-CtsJ7cDT.js +0 -22
- package/dist/assets/BusinessVerificationPageScreen-BldrMJdh.js +0 -9
- package/dist/assets/ConnectionAuthScreen-BoP4m4L6.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-CDb5FCfJ.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-BBhvylGY.js +0 -18
- package/dist/assets/EntityDetailRoutes-CLBqzGEu.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-CsO9a4nX.js +0 -38
- package/dist/assets/FeaturePreviewScreen-8gjXA436.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-CdBNaEnB.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-CBQx4xWX.js +0 -12
- package/dist/assets/NotFoundScreen-BeP62Nz9.js +0 -1
- package/dist/assets/NotificationRoutes-GCk-IahK.js +0 -1
- package/dist/assets/OAuthConsentScreen-DECI8j0I.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Ca12AKcd.js +0 -1
- package/dist/assets/PeopleRoutes-DYtmtMXx.js +0 -22
- package/dist/assets/PerformanceRoutes-DP4OW2qD.js +0 -1
- package/dist/assets/RewardsRoutes-DvJjiZGU.js +0 -1
- package/dist/assets/ScreenRoutes-C7oLHktw.js +0 -2
- package/dist/assets/SignInScreen-BRoXT-HL.js +0 -1
- package/dist/assets/SignOutScreen-DkRfW28z.js +0 -9
- package/dist/assets/TaskRoutes-C5PxGl6p.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BBdrsyNq.js +0 -1
- package/dist/assets/WiseConfirmationScreen-taiB3VxF.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-DzQsPHni.js +0 -9
- package/dist/assets/epic-Dg8E5zC1.js +0 -2
- package/dist/assets/expenseAutomationHelper-C8o4PBoS.js +0 -1
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-
|
|
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-BdE3bEFg.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-BzkfMVrG.js"><link rel="modulepreload" crossorigin href="/assets/core-BtMsWhj9.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-xhG_euwn.js"><link rel="modulepreload" crossorigin href="/assets/mui-DdZ2UeI1.js"><link rel="modulepreload" crossorigin href="/assets/analytics-B3pE_Rhv.js"><link rel="modulepreload" crossorigin href="/assets/utils-BrzWPNCR.js"><link rel="stylesheet" crossorigin href="/assets/index-BhC2LNQw.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.
|
|
3
|
+
"version": "5.3.56-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@sentry/react": "^9.42.1",
|
|
30
30
|
"@stripe/stripe-js": "^4.4.0",
|
|
31
31
|
"@zeniai/client-analytics": "2.0.92",
|
|
32
|
-
"@zeniai/client-epic-state": "5.2.
|
|
33
|
-
"@zeniai/web-components": "4.3.
|
|
32
|
+
"@zeniai/client-epic-state": "5.2.57",
|
|
33
|
+
"@zeniai/web-components": "4.3.91",
|
|
34
34
|
"color": "3.1.3",
|
|
35
35
|
"crypto-js": "4.2.0",
|
|
36
36
|
"dnd-core": "^16.0.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-C_txwMxP.js";import{A as i}from"./AddressScreen-DqZYCoSs.js";import s from"./NotFoundScreen-BeP62Nz9.js";import"./sentry-D_60LtUS.js";import{n as d,o as r}from"./core-_lmxLuL7.js";import"./zeni-epic-state-CtlpRqoe.js";import"./recharts-B43pV0TY.js";import"./index-BqEaHxIT.js";import"./mui-DbFwPEO7.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.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 r}from"./liveblocks-C_txwMxP.js";import{a as h}from"./sentry-D_60LtUS.js";import{h as T,u as P,g as j,i as E,j as B,l as M}from"./core-_lmxLuL7.js";import{a2 as $,E as D,z as L,Q as V,a8 as K,a9 as F,j as _,W as S,a4 as z,_ as b,a5 as N}from"./index-BqEaHxIT.js";import{Vj as C,ip as R,fF as U,Vk as G,c8 as H,Vl as O,mH as q}from"./zeni-epic-state-CtlpRqoe.js";import{n as Q}from"./mui-DbFwPEO7.js";import W from"./NotFoundScreen-BeP62Nz9.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]="b0a7f8f9-78fe-43b1-877a-11cf94116759",e._sentryDebugIdIdentifier="sentry-dbid-b0a7f8f9-78fe-43b1-877a-11cf94116759")}catch{}})();const J=Q.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
|
-
`,X=M((function(e,s){const{addressId:o,isSubPage:i,addressType:c}=s,l=U(e),a=s.roleMap!=null&&G(s.roleMap),n=i||c==="user_address"||H(l?.userRole??[])||a?void 0:"readonly";if(o==null){const t=O(c,e);return{addressToEdit:t?.addressToCreate,loadingState:t?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:n,isSubPage:i,dontShowSaveConfirmationPopup:s.dontShowSaveConfirmation}}const d=C(e,o);return{addressToEdit:d.address,loadingState:d.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:n}}),(function(e,s){const{navigate:o,location:i,addressType:c}=s,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const n=i.state,d=N(n?.pathnameStackToGoBack);let t=d.poppedPathname??k();const u=n?.queryParams;if(u){const f=new URLSearchParams(u).toString();f&&(t=`${t}?${f}`)}o(t,{state:{pathnameStackToGoBack:d.newStack}})}};return{onSubmitHandler:a=>{const n=Y(a);e(q({addressType:c,addressToCreate:n})),_?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(s.bankAccountContext)},onCancel:()=>{l(s.bankAccountContext)}}}))(z);function re({isSubPage:e,hideAddressSubTitle:s=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),n=P(),d=j(),{addressId:t,addressType:u}=E(),f=$(),v=D(),I=L.getSignedInUser(),[g,w]=h.useState(t==null),p=B((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?S.Event.editAddress:S.Event.addAddress),y=l??u;return h.useEffect((()=>{g||t==null||(w(!0),n(R(t,!1)))}),[g,t,n]),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)?!g&&p==="Not-Started"||g&&p==="In-Progress"?r.jsx(K,{fetchState:p,style:{backgroundColor:v.colors.grey5}}):t!=null&&p==="Error"?(a(`${k(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(F,{analytics:_,onLoad:A}),r.jsx(J,{windowSize:f,children:r.jsx(X,{location:d,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:s,addressId:t,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:x?.loggedInUserRoleMap})})]}):r.jsx(W,{})}const k=(e=2)=>{let s="../";for(let o=0;o<e;o++)s=`${s}../`;return s},Y=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{re as A,Y as t};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-C_txwMxP.js";import{a}from"./sentry-D_60LtUS.js";import{u as Dt,h as Ut,i as Lt,g as Bt,j as b,l as Ft}from"./core-_lmxLuL7.js";import{a as Mt,T as Vt,e7 as $t,z as Nt,a2 as qt,e8 as Gt,e9 as Ht,ea as zt,bq as Be,eb as We,ec as Wt,bp as Je,a5 as ge,a9 as ce,j as M,ed as me,ee as Jt,ef as Kt,av as Yt,W as Xt,w as Zt,eg as es,eh as ts,aw as ss,ei as as,ej as ns,ek as os,el as is,p as rs,bl as Fe,em as ls}from"./index-BqEaHxIT.js";import{fE as F,gt as R,U1 as us,a29 as ds,a2a as cs,jM as ms,a2b as Ss,jJ as hs,a2c as Se,jD as W,jT as J,jl as Ie,jB as he,jz as ps,jQ as fs,ju as Ke,Ua as Me,gv as V,gK as gs,U9 as Is,TW as Ve,fF as Cs,j3 as ks,a2d as bs,g8 as vs,jh as Es,jd as Ps,fG as pe,gf as ys,a2e as ws,a2f as xs,a2g as Rs,gu as Ts,go as $e,k4 as Ne,gq as qe,gw as js,a2h as Ge,jV as Os,ja as As,jo as Qs,jR as He,jr as _s,gx as Ds,gy as Us,gz as Ls,gA as Bs}from"./zeni-epic-state-CtlpRqoe.js";import{D as Fs,n as $,S as Ms,P as Vs}from"./mui-DbFwPEO7.js";import{u as $s}from"./useAiCfoDashboardSuggestedQuestionsChips-DfcdcxeV.js";import{p as Ns}from"./pathToGoBack-W4B39XGQ.js";import{j as qs}from"./routePaths-C1I3AVBw.js";import{u as Gs}from"./useTaskManagerPusherEvents-BPWIyNie.js";import"./recharts-B43pV0TY.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="cc5c7cb7-4dfb-4f0a-8840-414eb8f49259",s._sentryDebugIdIdentifier="sentry-dbid-cc5c7cb7-4dfb-4f0a-8840-414eb8f49259")}catch{}})();const Hs=["claimed","running","succeeded","failed","timeout"],fe=s=>typeof s=="string"&&s!=="",Ye="chat-response-generated";function zs(s,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 t=R(s).skills.find((l=>l.macroId===r.savedMacroId));return t==null?void 0:{status:"saved",command:t.name}}const Ws=Ft((function(s,r){const t=F(s),l=r.isSubmitting,c=t.uiState?.currentChatSessionId,i=c!=null?ys(s.aiCfoState,c):[],f=ts(s,{allUsers:r.allUsers,onCardPolicyVendorSearchTextChange:r.onCardPolicyVendorSearchTextChange}),p=ws(s),S=xs(s),A=Rs(s);return{showSampleQuestions:r.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:l,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${ss}/tableDownload`,exportDownloadEndPoint:os(),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(s).skills,skillSaveState:zs(s,A),skillsEnabled:R(s).skillsEnabled,skillsList:R(s).skills,skillsListError:R(s).fetchState==="Error",skillsListLoading:R(s).fetchState==="In-Progress",skillsCanPublish:R(s).canPublish,skillSaving:A.fetchState==="In-Progress",skillSaveError:A.fetchState==="Error",skillVersionHistory:p.macroId!=null?{macroId:p.macroId,versions:p.versions,error:p.fetchState==="Error",loading:p.fetchState==="In-Progress"}:void 0,skillRestoreBody:S.macroId!=null&&S.version!=null?{macroId:S.macroId,version:S.version,instructions:S.instructions,error:S.fetchState==="Error",loading:S.fetchState==="In-Progress"}:void 0,skillDetail:J(s).detail,skillDetailError:J(s).fetchState==="Error",skillDetailLoading:J(s).fetchState==="In-Progress",syntheticAnswers:i,resolveSyntheticAnswerCardTile:ns(s),resolveSyntheticAnswerPolicyTile:as(s),...f}}),(function(s,r){const{location:t,currentTenant:l,userId:c,navigate:i,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:p,isAiCardCreationEnabled:S,isCardPolicyEnabled:A,setIsAiCfoOpen:U}=r,T=l.tenantEmailDomain;return{onEventReceived:(n,o)=>{if(n===Ye&&typeof o.text=="string"&&typeof o.metadata=="object"){const m=o,E=Ds(m.type),v=m.metadata.chat_session_id??null,{currentChatSession:K,currentQuestionAnswer:j,currentQuestionAnswerSummary:Y}=Je(p,v);E!=="answer"?M.trackAICFOChatResponseGenerated(E,j?.question.questionText??"",m.text,v,ls(Y,K),m.metadata.message_id??null):M.trackAICFOChatAnswerGenerated(m.text,j?.question.questionText??"",(m.follow_up_questions?.length??0)>0,!!m.assumptions,!!m.insights,m.visualization!=null,Us(m.visualization?.type??"")??null,v,m.summarized_title,m.metadata.message_id??null),s(Ls({chatSessionId:m.metadata.chat_session_id,responseType:E,fetchState:{fetchState:"Completed",error:void 0}})),s(Bs({chatSessionId:m.metadata.chat_session_id,answerPayload:m,userId:c}))}},onSubmit:(n,o,m,E,v)=>{n&&Fe(s,n,o,f,p,c,E,m,void 0,v)},onFetchSkills:()=>{s(Ke())},onOpenSkill:n=>{s(Ie({macroId:n})),s(_s({macroId:n}))},onSaveSkill:(n,o)=>{s(He({draft:n,macroId:o}))},onSaveSkillDraft:n=>{const o=n.displayName?.trim()??"",m=n.name?.trim()??"";s(He({draft:{name:o.length>0?o:m,description:n.description?.trim()??null,instructions:n.instructions,visibility:"private"}}))},onFetchSkillVersionBody:(n,o)=>{s(Qs({macroId:n,version:o}))},onDeleteSkill:n=>{s(As({macroId:n}))},onSetSkillVisibility:(n,o)=>{s(Os({macroId:n,visibility:o}))},onCloseSkillDetail:()=>{s(Ge())},onRunSkill:(n,o)=>{s(V()),s($e()),Fe(s,o,"user_input",void 0,p,c,void 0,void 0,void 0,n),s(Ge())},updateCurrentInput:n=>{s(qe(n))},onStopSubmit:()=>{},onUpdateScrollYOffset:n=>{s(js(n))},onSelectSampleQuestion:()=>{},onBackClick:()=>{i(-1)},onCloseClick:()=>{const n=ge(t.state?.pathnameStackToGoBack),o=n.poppedPathname??Ns(1);i(o,{state:{...t.state,pathnameStackToGoBack:n.newStack}}),s(qe(""))},togglePageView:()=>{const n=ge(t.state?.pathnameStackToGoBack),o=n.poppedPathname??`/${l.tenantEmailDomain}/dashboard`;i(o,{state:{...We(t.state),pathnameStackToGoBack:n.newStack,message:"open_ai_cfo_drawer"}}),U(!0)},onCopy:()=>{},onThumbsUp:(n,o)=>{f!=null&&o?.messageId!=null&&s(Ne(f,o.messageId,"positive",o.questionText,o.answerText))},onThumbsDown:(n,o)=>{f!=null&&o?.messageId!=null&&s(Ne(f,o.messageId,"negative",o.questionText,o.answerText))},onTogglePageView:()=>{i(-1)},onNewChatClick:()=>{s(V()),f!=null&&s($e());const n=rs(t.state?.pathnameStackToGoBack,t.pathname);i(`/${l.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:n.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(n,o)=>{s(Ts({questionAnswerId:n,isCollapsed:o}))},onMenuClick:r.onMenuClick,...is(s,{isAiCardCreationEnabled:S,isCardPolicyEnabled:A,currentChatSessionId:f,onAfterCardsCreationSubmit:()=>{U(!0),i(`/${T}/cards`,{state:{...t.state}})},onAfterCardPolicySubmit:()=>{U(!0),i(`/${T}/cards/policy`,{state:{...t.state}})}})}}))(Zt(es)),Ia=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:r}=Mt(),t=Dt(),l=Ut(),{session_id:c}=Lt(),i=Bt(),f=new URLSearchParams(i.search).get("routine")??void 0,[p,S]=a.useState(!1),A=b((e=>F(e).uiState.isSkillsBrowserOpen===!0)),U=b((e=>R(e).skillsEnabled)),T=b((e=>F(e).uiState.isRoutinesBrowserOpen===!0)),n=b((e=>us(e))),o=b((e=>ds(e))),m=b((e=>cs(e))),[E,v]=a.useState(void 0),[K,j]=a.useState(!1),[Y,Ce]=a.useState(void 0),Xe=a.useCallback((()=>{Ce(void 0),v(void 0),j(!0)}),[]),Ze=a.useCallback((e=>{v(e),j(!0)}),[]),et=a.useCallback((()=>{v(void 0),j(!1)}),[]),tt=a.useCallback((e=>{t(ms({draft:e,...E!=null&&{scheduleId:E.scheduleId}})),v(void 0),j(!1)}),[t,E]),P=f,ke=n.routines.find((e=>e.scheduleId===P)),I=b((e=>Ss(e))),st=a.useCallback((e=>{t(hs({scheduleId:e.scheduleId}))}),[t]);a.useEffect((()=>{t(P!=null?W({scheduleId:P}):Se())}),[t,P]);const B=ke?.macroId,at=b((e=>J(e))),be=B!=null&&B!==""&&at.fetchState==="Not-Started";a.useEffect((()=>{be&&B!=null&&t(Ie({macroId:B}))}),[t,be,B]);const nt=b((e=>F(e).uiState.currentChatSessionId))??c,C=n.routines.find((e=>e.scheduleId===f))??n.routines.find((e=>e.scheduleId===Vt(nt))),O=C?.scheduleId??null,[ve,ot]=a.useState(!0);a.useEffect((()=>{O!=null&&t(W({scheduleId:O}))}),[t,O]);const Ee=I.runs.some((e=>e.status==="claimed"||e.status==="running"))===!0;a.useEffect((()=>{if(P==null||Ee!==!0)return;const e=window.setInterval((()=>{t(W({scheduleId:P})),t(he())}),5e3);return()=>window.clearInterval(e)}),[t,Ee,P]);const it=a.useCallback((e=>{Ce(e),v(void 0),j(!0)}),[]),rt=a.useCallback((e=>{t(ps({scheduleId:e.scheduleId}))}),[t]),lt=a.useCallback(((e,d)=>{t(fs({enabled:d,scheduleId:e.scheduleId}))}),[t]);a.useEffect((()=>{T&&t(he())}),[t,T]);const Pe=b((e=>R(e).skills)),X=a.useMemo((()=>Pe.map((e=>({macroId:e.macroId,name:e.displayName??e.name})))),[Pe]),ut=a.useCallback((e=>{t(Ie({macroId:e}))}),[t]),Z=a.useCallback((()=>{t(Ke()),t(Me())}),[t]),dt=a.useCallback((()=>{t(V())}),[t]),{allUsers:ct,isAiCardCreationEnabled:mt,isCardPolicyEnabled:St,onCardPolicyVendorSearchTextChange:ht}=$t();a.useEffect((()=>{t(gs())}),[t]);const g=b((e=>F(e))),w=Nt.getSignedInUser();a.useEffect((()=>c==="routines"?(t(V()),void t(Is())):c==="skills"?(t(Se()),t(Ve()),void t(Me())):(O==null&&t(Se()),t(Ve()),void t(V()))),[t,O,f,c]);const pt=qt(),Q=Yt(pt),k=b((e=>Cs(e))),u=g.uiState.currentChatSessionId,y=k.tenantEmailDomain,L=y!=null&&y!=="",ee=a.useCallback((e=>{L&&l(`/${y}/ai-cfo/routines?routine=${encodeURIComponent(e.scheduleId)}`)}),[L,l,y]),te=a.useCallback((()=>{L&&l(`/${y}/ai-cfo/routines`)}),[L,l,y]),se=a.useCallback(((e,d)=>{const _=e.sessionId??I.sessionId;_!=null&&L&&l(`/${y}/ai-cfo/${_}?routine=${encodeURIComponent(d)}`)}),[L,l,I.sessionId,y]),ft=a.useMemo((()=>C==null?void 0:{error:I.fetchState==="Error",kind:"routineRuns",loading:I.fetchState==="In-Progress"||I.fetchState==="Not-Started",routineName:C.name,schedule:Gt(C),skillName:C.isAdHoc===!0?void 0:X.find((e=>e.macroId===C.macroId))?.name,onOpenSkill:C.isAdHoc===!0?void 0:Z,runs:I.runs,tzName:C.tzName,unreadCount:C.unreadRuns,open:ve,onToggle:()=>ot((e=>!e)),onOpenRun:e=>se(e,C.scheduleId),onOpenRoutine:()=>ee(C),onOpenRoutines:te}),[Z,te,ee,se,ve,C,I.fetchState,I.runs,X]),{handleUploadPromoClose:gt,isUploadPromoVisible:It}=Ht({isFileUploadEnabled:s,tenantEmailDomain:y}),ae=zt({currentTenant:k,currentChatSessionId:u,aiCfoView:g,skillsEnabled:U,onCloseSkills:dt,onOpenSkills:Z}),{isSuggestedQuestionsLoading:Ct,suggestedPromptQuestions:kt}=$s(),N=i.state,q=N?.aiCfoInitialQuestion,ye=!!N?.aiCfoShouldSubmit;a.useEffect((()=>{const e=i.state;if(e?.[Be]!==!0)return;S(!0);const d={...e};delete d[Be],l(i,{replace:!0,state:d})}),[i.pathname,i.search,i.state,l]);const[bt,ne]=a.useState(null),[vt,oe]=a.useState(!1),[Et,ie]=a.useState(void 0),[Pt,re]=a.useState(void 0),we=a.useRef(!1);a.useEffect((()=>{if(!we.current&&q!=null&&q!==""){const e=i.state;ne(q),oe(ye),ie(e?.aiCfoInitialSubmissionSource!=null?e.aiCfoInitialSubmissionSource:void 0);const d=e?.aiCfoSuggestionIndex;re(typeof d=="number"?d:void 0),we.current=!0}}),[q,ye,i.state]);const yt=a.useCallback((()=>{ne(null),oe(!1),ie(void 0),re(void 0),l(i.pathname,{replace:!0,state:We(i.state)})}),[i.pathname,i.state,l]),xe=a.useMemo((()=>new URLSearchParams(i.search)),[i.search]),Re=xe.get("ref")??N?.aiCfoRef,le=xe.get("emailRefId")??N?.aiCfoEmailRefId,Te=a.useRef(!1);a.useEffect((()=>{Te.current||Re!=="month-end-email"||le==null||u!=null||w==null||(t(ks("controller",w.userId,le,"MONTH_END_EMAIL")),Te.current=!0)}),[Re,le,u,t,w]);const G=g.uiState.lastContextMessage;a.useEffect((()=>{G!=null&&G!==""&&u!=null&&(ne(G),oe(!0),ie(void 0),re(void 0),t(bs()))}),[G,u,t]);const wt=k.masterTOSInfo,x=wt?.isMasterTOSAccepted??!1,{visitedSessions:je}=Wt(u),H=g.fetchState,z=g.uiState.chatSessionsNextPageToken.hasMore||!g.uiState.chatSessionsFirstPageFetched,Oe=u!=null?g.fetchChatSessionHistoryByChatSessionId?.[u]?.fetchState??"Not-Started":"Not-Started",Ae=u==null||(g.uiState.chatHistoryNextPageToken[u]?.hasMore??!0),Qe=g.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:xt}=Je(Qe,u),Rt=xt.length===0;a.useEffect((()=>{x||Q||l("../dashboard",{state:{...i.state,message:"open_ai_cfo_drawer"}})}),[x,Q,l,i.state]);const Tt=a.useCallback((()=>{const e=ge(i.state?.pathnameStackToGoBack),d=k.tenantEmailDomain;l(e.poppedPathname??(d!=null?`/${d}/dashboard`:".."),{state:{...i.state,pathnameStackToGoBack:e.newStack}})}),[k.tenantEmailDomain,i.state,l]),_e=a.useRef(void 0),De=a.useRef(void 0);a.useEffect((()=>{const e=c!==_e.current,d=u!==De.current;_e.current=c,De.current=u,c!==u&&(!e||c==null||qs(c)?d&&u!=null&&l(`../ai-cfo/${u}`,{state:{...i.state}}):t(vs({sessionId:c,agentId:"controller"})))}),[u,c]);const jt=a.useMemo((()=>({events:je.map((e=>`private-encrypted-chat-${e}.${Ye}`)),eventCallback:(e,d,_)=>_.onEventReceived(e,d)})),[je]);a.useEffect((()=>{H!=="In-Progress"&&z&&t(Es())}),[H,z,t]),a.useEffect((()=>{u!=null&&Oe!=="In-Progress"&&Ae&&w!=null&&(c===u||H==="Completed"&&!z)&&t(Ps(u,w.userId))}),[Oe,H,Ae,z,u,w,c,t]);const ue=w?.userId,Ot=a.useMemo((()=>{return ue==null?[]:[(e=ue,`private-encrypted-routines-${e}.routine-run-updated`)];var e}),[ue]),Ue=a.useCallback((e=>{const d=e!=null&&(e===P||e===O);(T||d)&&t(he()),d&&t(W({scheduleId:e}))}),[t,T,O,P]);Gs({events:Ot,onSubscribed:()=>Ue(P??O),onEvent:(e,d)=>{const _=(de=>{if(de==null||typeof de!="object")return null;const D=de;return fe(D.schedule_id)&&fe(D.run_id)?{scheduleId:D.schedule_id,runId:D.run_id,status:Hs.find((_t=>_t===D.status))??null,finishedAt:fe(D.finished_at)?D.finished_at:null}:null})(d);_!=null&&Ue(_.scheduleId)}});const Le=e=>e.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(w==null||c==null)throw Error("Can't access AI Controller page without signing in...");const At=u!=null&&g.responseStateByChatSessionId?.[u]?.answer?.fetchState==="In-Progress";if(!x&&Q)return h.jsxs(Ks,{children:[h.jsx(ce,{analytics:M,onLoad:Le}),ae.drawerElement,h.jsx(Ys,{children:h.jsx(ze,{children:h.jsx(me,{isTOSAccepted:!1,acceptMasterTOSState:g.masterTOSAcceptanceState,onCloseClick:Tt,onCompleteClick:()=>{k.userRoleId!=null&&t(pe(k.userRoleId))}})})})]});const Qt=h.jsxs(h.Fragment,{children:[p&&!x?h.jsx(ce,{analytics:M,onLoad:Le}):null,h.jsx(me,{isTOSAccepted:x,acceptMasterTOSState:g.masterTOSAcceptanceState,showHeader:!1,togglePageView:x?()=>S(!1):void 0,onCloseClick:()=>S(!1),onCompleteClick:()=>{x||k.userRoleId==null||t(pe(k.userRoleId)),S(!1)}})]});return h.jsxs(h.Fragment,{children:[h.jsxs(Js,{children:[h.jsx(ce,{analytics:M,onLoad:e=>e.trackPageLoaded(Xt.Event.aiCFOPage)}),Q&&ae.drawerElement,h.jsx(Ws,{...jt,currentChatSessionId:u,allSessionsWithOrderedQuestionAnswers:Qe,allUsers:ct,isAiCardCreationEnabled:mt,isCardPolicyEnabled:St,openOnboardingPage:()=>S(!0),userId:w.userId,setIsAiCfoOpen:r,navigate:l,sessionFromUrl:c,location:i,isSubmitting:At,isEmptyChatWithSession:Rt,currentTenant:k,emailLinkQuestion:bt??void 0,autoSubmitEmailLinkQuestion:vt,onEmailLinkQuestionProcessed:yt,routedInitialQuestionSource:Et,routedInitialQuestionSuggestionIndex:Pt,onCardPolicyVendorSearchTextChange:ht,onMenuClick:Q?ae.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:It,onUploadPromoClose:gt,exploreSuggestedPromptQuestions:kt,exploreSuggestedPromptQuestionsLoading:Ct,isSkillsOpen:A,isRoutinesOpen:T,routineCanCreate:m,routineEditing:E,routineEditorOpen:K,routineListError:n.fetchState==="Error",routineListLoading:n.fetchState==="In-Progress",routineMaxRoutines:n.maxRoutines,routineSaveError:o.fetchState==="Error",routineSaving:o.fetchState==="In-Progress",routineSchedulableSkills:X,routines:n.routines,onRoutineCreate:Xe,onRoutineDelete:rt,routineHistoryError:I.fetchState==="Error",routineHistoryLoading:I.fetchState==="In-Progress",chatSidePanel:ft,routineDetail:ke,routineRunningScheduleId:o.runningScheduleId,routineRuns:I.runs,onRoutineEdit:Ze,onRoutineOpenRun:(e,d)=>se(d,e.scheduleId),onRoutineRun:st,onRoutineCloseDetail:te,onRoutineDraft:it,routineDraftPrompt:Y,onRoutineOpenDetail:ee,onRoutineEditorCancel:et,onRoutineLoadSkillInstructions:ut,onRoutineSave:tt,onRoutineSetEnabled:lt,isCreateSkillEnabled:U,promoDismissalScope:y}),p&&Q?h.jsx(Fs,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:Xs,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>S(!1),children:h.jsx(ze,{onClick:e=>e.stopPropagation(),children:h.jsx(me,{isTOSAccepted:x,acceptMasterTOSState:g.masterTOSAcceptanceState,onCloseClick:()=>S(!1),onCompleteClick:()=>{x||k.userRoleId==null||t(pe(k.userRoleId)),S(!1)}})})}):null]}),p&&!Q?h.jsx(Jt,{open:p,onClose:()=>S(!1),children:h.jsx(Kt,{children:Qt})}):null]})},ze=$(Ms)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,Js=$.div`
|
|
6
|
-
height: 100vh;
|
|
7
|
-
width: 100%;
|
|
8
|
-
`,Ks=$.div`
|
|
9
|
-
height: 100vh;
|
|
10
|
-
width: 100%;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
min-height: 0;
|
|
14
|
-
`,Ys=$.div`
|
|
15
|
-
flex: 1;
|
|
16
|
-
min-height: 0;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
`,Xs=$(Vs)`
|
|
20
|
-
box-shadow: ${({theme:s})=>s.colors.elevation2};
|
|
21
|
-
color: ${({theme:s})=>s.colors.grey4};
|
|
22
|
-
`;export{Ia as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as V}from"./sentry-D_60LtUS.js";import{u as G,j as T,h as ne,g as se,i as oe,N as ie,l as re}from"./core-_lmxLuL7.js";import{fF as z,Hz as ce,Z4 as ue,BA as de,Sg as pe,HN as le,KZ as me,NM as fe,Oq as ye,Pf as Se,Z5 as ge,Z6 as Ie,Z7 as he,Z8 as Te,Z9 as be,Vk as De,Ya as Oe,Vz as Ce,M1 as ke,VA as Ve,M5 as Ae,mH as we,gG as Ne,gF as Fe,gE as ve,uT as _e,uK as Be,uH as Ee,mz as xe,BJ as ze,BH as P,bE as M,BV as R,cE as Pe}from"./zeni-epic-state-CtlpRqoe.js";import{bU as Me,Q as Re,c as Ue,bj as je,z as x,a9 as Le,j as U,n as B,W as E,bW as Ze,af as Ge,p as j,aH as L}from"./index-BqEaHxIT.js";import{n as He}from"./mui-DbFwPEO7.js";import{j as k}from"./liveblocks-C_txwMxP.js";import{d as Z}from"./routePaths-C1I3AVBw.js";import{M as qe}from"./MobileAppDrawer-fNaMEqpG.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="fc06d3cd-e6ec-4715-aae4-4334dde0879e",t._sentryDebugIdIdentifier="sentry-dbid-fc06d3cd-e6ec-4715-aae4-4334dde0879e")}catch{}})();function nt(){const t=G(),u=T((r=>z(r))),n=u?.tenantId,{isApprovalRulesV3Enabled:i,isLoading:d}=Me(n),p=T((r=>r.billPaySetupApproverViewState.fetchState));V.useEffect((()=>{n==null||d||p==="Not-Started"&&t(ce(!0,!0,i))}),[n,d,i,p,t])}const We=He.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,Ke=re((function(t,u){const{businessVerificationDetails:n}=u,i=z(t),d=x.getSignedInUser(),p=i.tenantId,r={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:p??""},b=De(u.roleMap)&&n.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Oe(t.companyConfigState),s=Ce(t.userRoleConfigState);return{businessVerificationDetails:n,verficationDetailsFetchState:n.fetchState,isRefreshingViewInBackground:n.isRefreshingViewInBackground,allNationalityCountries:n.allNationalityCountries,filesEndPoint:`${Ge.fileMicroServiceBaseUrl}`,authParams:r,isDisabled:b,allIndustries:e.companyIndustries??[],companyTitles:s.companyTitles}}),(function(t,u){const{companyId:n,productType:i,currentTenant:d,navigate:p,location:r}=u,{tenantEmailDomain:b}=d;return{onCompanyDetailsChanged:e=>{const{companyDescription:s,companyIndustry:m,companyIndustryType:O,companyLegalName:C,companyTaxId:g,companyWebsite:y,companyPhone:I,primaryContactEmail:c,primaryContactName:o,primaryContactUserId:l,primaryContactSyncToken:D,syncToken:S,fileIds:a,incDate:f,typeOfIncorporation:A,stateOfIncorporation:w,sourceOfFunds:N,companySubIndustry:F,countriesOfOperations:h,companySourceOfFunds:H,companySourceOfFundsDescription:q,transactionVolume:W,transactionVolumeDescription:K,purposeOfAccount:$,purposeOfAccountDescription:J,regulatedStatus:Q,regulatedStatusDescription:Y,usNexus:X,usNexusTypes:ee}=e,v=O?.selectedOption,te={companyId:n,companyDescription:s,companyIndustry:m.selectedOption,companyIndustryType:v==null||v===""?void 0:v,companyLegalName:C,taxIdOrEIN:g,website:y!=""&&y!=null?Pe(y):void 0,phone:I,syncToken:S,fileIds:a,incDate:f!=null?M(f?.toString()):f,typeOfIncorporation:A?.selectedOption??"",stateOfIncorporation:w?.selectedOption??"",sourceOfFunds:N?.selectedOption??"",companySubIndustry:F?.selectedOption??"",countriesOfOperations:h?.selectedOptions.map((_=>_.length===2?_:L(_)))??[],companySourceOfFunds:H?.selectedOption??"",companySourceOfFundsDescription:q,transactionVolume:W?.selectedOption??"",transactionVolumeDescription:K,purposeOfAccount:$?.selectedOption??"",purposeOfAccountDescription:J,regulatedStatus:Q??"",regulatedStatusDescription:Y,usNexus:X,usNexusTypes:ee?.selectedOptions??[]},ae={userId:l,firstName:o.firstName,lastName:o.lastName,email:c,syncToken:D};t(R({companyDetails:te,primaryContactDetails:ae}))},onCompanyOfficerUpdated:e=>{const s=e.map((m=>{const{officerType:O,userId:C,name:g,email:y,nationalityCountryCode:I,ssn:c,dob:o,phone:l,syncToken:D,selectDocument:S,role:a,ownership:f,isSelectedForVerification:A,userVerificationStatus:w,treasuryUserVerificationStatus:N,fileIds:F}=m;let h;return S.selectDocumentType==="driverLicense"?h="driving_license":S.selectDocumentType==="passport"?h="passport":S.selectDocumentType==="stateId"?h="id_document":S.selectDocumentType==="ssnCard"&&(h="social_security_card"),{officerType:O,userId:C,firstName:g.firstName,lastName:g.lastName,email:y,ssn:c,nationalityCountryCode:I?.selectedOption!=null?L(I.selectedOption):void 0,phone:l,birthday:o!=null?M(o?.toString()):o,syncToken:D,titleAtCompany:a.selectedOption,ownershipInCompany:f,documentTypeSelectedForVerification:h,isSelectedForVerification:A,userVerificationStatus:w,treasuryUserVerificationStatus:N,fileIds:F,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));t(R({officers:s}))},onSaveDetailsClick:e=>{t(P(n,e,i))},onSendForVerificationClick:e=>{t(P(n,e,i,!0))},onAddressClick:e=>{const s=Z(b,e),m=j(r.state?.pathnameStackToGoBack,r.pathname);p(s,{state:{pathnameStackToGoBack:m}})},onRegisteredAddressClick:e=>{const s=Z(b,e),m=j(r.state?.pathnameStackToGoBack,r.pathname);p(s,{state:{pathnameStackToGoBack:m}})},onBackClick:()=>{t(ze({companyId:n})),p("../setup")},updateFilesEntity:e=>{t(xe({files:e}))},onDeleteFile:e=>{t(Ee(e))},onDeleteFileList:e=>{t(Be(e))},onEditFileName:(e,s)=>{t(_e(e,s.split(".")[0]))},onGetOtp:e=>{t(ve(e,"SpendManagementSetup"))},onResendOtp:e=>{t(Fe(e,"SpendManagementSetup"))},onVerifyOtp:(e,s)=>{t(Ne(e,s,"SpendManagementSetup"))},saveNewAddressInLocalStore:(e,s)=>{t(we({addressType:e,addressToCreate:s}))},onIdentityDocumentUploadedForAutofill:e=>{if(n==null)return;const s=Ve(e.documentType);s!=null&&t(Ae({target:"setup",companyId:n,officerType:e.officerType,fileId:e.fileId,documentType:s}))},onCompanyDocumentUploadedForAutofill:e=>{n!=null&&t(ke({target:"setup",companyId:n,fileId:e.fileId,documentType:e.documentType}))}}}))(Ze),st=({productType:t})=>{const u=ne(),n=se(),i=G(),[d,p]=V.useState(!1),[r,b]=V.useState(!1),{tenantEmailDomain:e}=oe(),s=Re(),{useDynamicConfig:m}=Ue(),{configValue:O}=m(je.zeniAccountsConfig),C=ue(O),g=T((a=>{switch(t){case"zeni_accounts":return a.zeniAccountSetupViewState.fetchState;case"reimbursement":return a.remiSetupViewState.fetchState;case"charge_cards":return a.chargeCardSetupViewState.fetchState;case"zeni_treasury":return a.treasurySetupViewState.fetchState;default:return a.billPaySetupViewState.fetchState}})),y=T((a=>a.companyConfigState.fetchState)),I=T((a=>a.userRoleConfigState.fetchState)),c=T((a=>z(a))),o=c.companyId??x.getSignedInUserTenant(e)?.companyId;if(V.useEffect((()=>{y==="Not-Started"&&i(de()),I==="Not-Started"&&i(pe(!0))}),[y,I,i]),V.useEffect((()=>{if(!d&&g==="Not-Started"&&o!=null)switch(p(!0),t){case"zeni_accounts":i(Se(o,!0));break;case"zeni_treasury":i(ye(o,!0));break;case"reimbursement":i(fe(o,!0));break;case"charge_cards":i(me(o,!0));break;default:i(le(o,!0))}}),[d,g,o,i]),x.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let l;switch(t){case"zeni_accounts":l=c.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":l=c.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":l=c.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||c.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":l=c.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:l=c.companyBillPayInfo?.info?.isBillPayTOSAccepted}const D=a=>{b(a)},S=T((a=>{switch(t){case"zeni_accounts":return be(a,o);case"zeni_treasury":return Te(a,o);case"charge_cards":return he(a,o);case"reimbursement":return Ie(a,o);default:return ge(a,o)}}));return l===!1?k.jsx(ie,{to:"../promo"}):k.jsxs(We,{children:[k.jsx(Le,{analytics:U,onLoad:a=>(f=>{switch(t){case"zeni_accounts":return f.trackPageLoaded(E.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return f.trackPageLoaded(E.Event.reimbursementBusinessVerification);default:return f.trackPageLoaded(E.Event.billPayBusinessVerification,B(n)?"Settings":void 0)}})(a)}),B(n)?k.jsx(qe,{isAppContentDrawerOpen:r,handleDrawerToggle:D}):null,k.jsx(Ke,{businessVerificationDetails:S,navigate:u,location:n,companyId:o,analytics:U,currentTenant:c,productType:t,isSettings:B(n),roleMap:s?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{D(!0)},maxInsuredAmount:C.maxInsuredAmount})]})};export{st as B,nt as u};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as I}from"./liveblocks-C_txwMxP.js";import{a as o}from"./sentry-D_60LtUS.js";import{u as k,h as P,g as H,j as C,N as w}from"./core-_lmxLuL7.js";import{TR as q,fF as z,gl as G,pS as M,gM as A,gk as Q,gi as V,Uf as B,gh as O}from"./zeni-epic-state-CtlpRqoe.js";import{u as J,z as E,L as D,G as K,F as W}from"./index-BqEaHxIT.js";import{n as X}from"./mui-DbFwPEO7.js";import{P as h,a as _}from"./AccountMappingScreen-DdQz2lM1.js";import{t as Y}from"./getLocaleForTenant-DiPOVD9Y.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-a_jxuJVg.js";import"./recharts-B43pV0TY.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";import"./MobileAppDrawer-fNaMEqpG.js";import"./InboxNotificationsProvider-CvLL3Xda.js";import"./useTaskManagerAccess-Cs4MVKyS.js";import"./accountMappingHelper-DTr2dybD.js";import"./empty-B3p_skJy.js";import"./pdf-lib-B5AjOY9Z.js";import"./index-sGFH656b.js";import"./url-BryZycM8.js";import"./index-Cg11XXLq.js";import"./decodeURIComponentSafe-CNj7wDd5.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]="5418916c-0ecc-48fb-a232-61ba383c7826",t._sentryDebugIdIdentifier="sentry-dbid-5418916c-0ecc-48fb-a232-61ba383c7826")}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 ${W.sp1} ${t.theme.colors.dropShadowNormal}`};
|
|
11
|
-
`;function we(){const t=k(),i=P(),v=H(),{setLoading:d,clearAllLoading:m}=J(),S=o.useRef(!1),b=o.useRef(!1),N=o.useRef(!1),p=o.useRef(!1),{code:U,realmId:F,state:$}=Z(v.search),f=U!==""&&F!==""&&$!=="";f&&(N.current=!0);const j=sessionStorage.getItem(h),u=j===_.pending,L=j===_.ready,x=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,c=e?.externalConnections?.saveConnectionState,y=e.externalConnections?.accounting[0]?.isValid;o.useLayoutEffect((()=>{d(D.CONNECTION_AUTH)}),[d]),o.useEffect((()=>{S.current||a==null||g==null||(S.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(D.TENANT_FETCHING),t(G(a.userId,g))))}),[S,n,d]),o.useEffect((()=>{e.tenantId==null&&!b.current&&a!=null&&(b.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(M(a.userId)))}),[b,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||c!=="Error"||(d(D.CONNECTION_AUTH),t(A(a.userId,e.tenantId)))}),[c]),o.useEffect((()=>{n!=="Completed"&&r!=="Completed"||a==null||e?.tenantId==null||(t(Q(e.tenantId)),E.saveActiveTenantDomainForUser(e.tenantEmailDomain),V(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(A(a.userId,e.tenantId)))}),[n,r,l]),o.useEffect((()=>{x.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&E.saveSignedInUserTenants(x.tenantsCoreDetailsInOrder)}),[x.tenantsCoreDetailsInOrder.length,n]);const T=e==null||n!=="Completed"&&r!=="Completed"||l!=="Completed";if(o.useEffect((()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||l!=="Completed"&&l!=="Error"||m()}),[n,r,l]),o.useEffect((()=>{u&&c==="In-Progress"&&(p.current=!0)}),[u,c]),o.useEffect((()=>{if(!u||T)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return p.current&&c==="Completed"?(sessionStorage.setItem(h,_.ready),m(),void i(s,{replace:!0})):p.current&&c==="Error"?(sessionStorage.removeItem(h),t(O({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),void i(s,{replace:!0})):void(f||N.current||p.current||y!==!0||(sessionStorage.removeItem(h),t(O({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),i(s,{replace:!0})))}),[u,T,c,f,y,e.tenantEmailDomain,m,t,i]),T)return null;if(f||y!==!0)return I.jsx(te,{children:I.jsx(ee,{})});if(u)return null;const R=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return L?I.jsx(w,{to:R,replace:!0}):I.jsx(w,{to:"/",replace:!0})}export{we as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-C_txwMxP.js";import{z as m}from"./index-BqEaHxIT.js";import{g as n}from"./QBOConnectionScreen-a_jxuJVg.js";import"./sentry-D_60LtUS.js";import{g as p,N as a}from"./core-_lmxLuL7.js";import"./zeni-epic-state-CtlpRqoe.js";import"./recharts-B43pV0TY.js";import"./mui-DbFwPEO7.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";import"./empty-B3p_skJy.js";import"./pdf-lib-B5AjOY9Z.js";import"./index-sGFH656b.js";import"./url-BryZycM8.js";import"./index-Cg11XXLq.js";import"./decodeURIComponentSafe-CNj7wDd5.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,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-C_txwMxP.js";import{h as w,g as C,j as h,l as E,i as V}from"./core-_lmxLuL7.js";import{YP as k,YW as W,gG as _,gF as Q,gE as K,kP as L,WO as q,uK as J,fF as B,Ym as D,kN as F,YQ as v,YZ as T,kL as G,l6 as j}from"./zeni-epic-state-CtlpRqoe.js";import{bO as M,a2 as N,c as R,z as O,E as U,a5 as p,v as S,a8 as Y,bP as X,F as Z,bQ as ee,p as te}from"./index-BqEaHxIT.js";import{n as z}from"./mui-DbFwPEO7.js";import"./sentry-D_60LtUS.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]="29820d5b-0fed-4a0a-8e01-564bdd25d5ab",e._sentryDebugIdIdentifier="sentry-dbid-29820d5b-0fed-4a0a-8e01-564bdd25d5ab")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(L(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(J(a))},onGetOtp:a=>{e(K(a,"BillPayVendor"))},onResendOtp:a=>{e(Q(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(_(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(W(a,n,o))}}}))(M);function H({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=z.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,oe=E((function(e,t){const{vendorId:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{navigate:a,location:n,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(n.state?.pathnameStackToGoBack),r=s.poppedPathname??P();a(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(T({data:r}))},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??P(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}}))(X);function me({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=N(),{vendorId:s,billId:r}=V(),c=e??s,{useFeatureGate:d}=R(),i=O.getSignedInUser(),b=h((u=>B(u))),g=U(),x=p(n.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),f=h((u=>k(u,c))),{isFeatureEnabled:I}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(S.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&f.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Y,{fetchState:f.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ne,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:r}),l.jsx(oe,{location:n,navigate:a,billId:r,vendorId:c,currentTenant:b,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t},fe=(e,t,a)=>{let n=`/${e}/bill/${encodeURIComponent(t)}`;return a=="draft"&&(n+="/edit"),n},he=e=>`/${e}/bills`,ke=(e,t)=>{let a=`/${e}/bill`;return a=t!=null?a.concat(`/${t}/edit`):a.concat("/new"),a},A=(e,t,a,n)=>{let o=`/${e}/bill`;return o+=a!=null?`/${a}/edit/vendor`:"/new/vendor",o+=n!=null?`/${n}/edit/${t}`:`/create/${t}`,o};function ve(e,t,a){return A(e,"ach",t,a)}function Se(e,t,a){return A(e,"domestic",t,a)}function ge(e,t,a){return A(e,"international",t,a)}const se=(e,t,a)=>{let n=`/${e}/bill/`;return n=a!=null?n.concat(`${encodeURIComponent(a)}/${t}/`):n.concat(`new/${t}/`),n},de=z.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
box-shadow: ${e=>`0px 2px ${Z.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,re=E((function(e,t){const{vendorId:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:a,navigate:n,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:c}=r;return{onFetchBankName:d=>{e(j(d))},onSaveHandler:d=>{e(G(t.bankAccountContext,d,"us-domestic",s))},onWireDetailsUpdated:d=>{const{bankAccountSection:i}=d;e(T({data:i}))},onCancel:()=>{(()=>{const d=p(o.state?.pathnameStackToGoBack),i=d.poppedPathname??$();n(i,{state:{pathnameStackToGoBack:d.newStack}})})(),e(v())},onAddressClick:d=>{if(t.bankAccountContext==="express-pay")n("./add-address");else{const i=se(c,d,a),b=te(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const d=p(t.location.state?.pathnameStackToGoBack),i=d.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:d.newStack}})}e(v())}}}))(ee);function xe({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=N(),{vendorId:s,billId:r}=V(),c=e??s,d=O.getSignedInUser(),{useFeatureGate:i}=R(),b=U(),g=h((u=>B(u))),x=p(n.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),f=h((u=>k(u,c))),{isFeatureEnabled:I}=i(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(S.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&f.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Y,{fetchState:f.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${Z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(de,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:r}),l.jsx(re,{location:n,navigate:a,billId:r,vendorId:c,currentTenant:g,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{me as A,xe as D,H as V,fe 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 s}from"./liveblocks-C_txwMxP.js";import{a as d}from"./sentry-D_60LtUS.js";import{h as B,u as A,g as G,i as F,j as l,N,l as q,n as O,o as $}from"./core-_lmxLuL7.js";import{WS as _,fF as M,W8 as R,m$ as Y,S9 as I,WX as z,WN as V,l$ as X,Sa as E,Wd as H,We as J,WP as K,WO as L}from"./zeni-epic-state-CtlpRqoe.js";import{b9 as Q,j as U,a5 as Z,p as tt}from"./index-BqEaHxIT.js";import"./mui-DbFwPEO7.js";import{d as k}from"./decodeURIComponentSafe-CNj7wDd5.js";import{w as et}from"./withTransactionSidePanel-Dxu14DPo.js";import{f as at,c as nt}from"./routePaths-C1I3AVBw.js";import"./recharts-B43pV0TY.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";import"./useAskAiCfoHostNavButtonProps-Biynu986.js";import"./TransactionDetailScreen-BDWEHK1J.js";import"./useInitialThreadRequest-CyHRajCC.js";import"./expenseAutomationHelper-C8o4PBoS.js";import"./stripSplatSuffix-BWXYYZxG.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="09fa5dde-0272-4607-86c6-f90ebfcd0ffa",a._sentryDebugIdIdentifier="sentry-dbid-09fa5dde-0272-4607-86c6-f90ebfcd0ffa")}catch{}})();const ot=q((function(a,t){const e=t.entity,o=z(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:V(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:X(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(E(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(E(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=B(),o=A(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:W,entityNameEncoded:x}=F(),r=k(W??""),f=k(x??""),p=rt(r,f),j=[r,f].filter((n=>n!=null)),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=l((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=l((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&p===!0&&(T(!0),o(Y(i)))}),[m,p,i]);const P=l((n=>n.trendState.fetchState)),S=u?.selectedPeriod?.timePeriod??g,w=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&P==="Completed"&&(D(!0),S!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:S})))}),[m,h,P]),p?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(N,{to:b(j.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function vt({entityType:a}){return s.jsx(O,{children:s.jsx($,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{vt as EntityDetailRoutes,vt as default};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import{j as T}from"./liveblocks-C_txwMxP.js";import{u as he,h as nt,g as Te,j as _,i as Ue,t as Hn,l as Yn,n as Kn,o as Ye,N as Qn}from"./core-_lmxLuL7.js";import{fF as ke,a0Z as Zn,q0 as _e,U8 as Xn,z$ as es,a0_ as ts,a0$ as as,a10 as ns,a11 as gt,a12 as Qe,gh as Tt,a13 as ca,eW as ss,g0 as os,a14 as ia,a15 as Ze,qT as cs,uN as is,gS as ls,gQ as rs,a16 as ds,r4 as us,rd as ms,qb as ps,qp as wa,gP as re,gR as hs,a17 as Ss,qL as Ra,re as gs,qm as Cs,qh as fs,uT as Is,gO as Me,a18 as tt,C9 as Da,Mu as Fa,a19 as _a,Fs as Ma,a1a as ks,eZ as Ts,e$ as bs,sP as bt,WT as la,WV as Ps,m2 as ys,WW as vs,m9 as Es,dl as As,Ds as Pt,a1b as xs,a1c as ws,fm as yt,sD as ra,WN as Rs,a1d as Ds,a1e as Fs,mb as _s,a1f as Ms,Ra as Os,ma as Us,l$ as Bs,qE as Oa,rj as at,tp as Ua,tL as Vs,T_ as Ba,ri as da,rl as Va,rn as js,bE as zs,ny as Ls,nv as $s,rm as Xe,rk as pe,a1g as Gs,rE as ua,a1h as Ns,a1i as qs,sH as Js,sI as Ws,WJ as Hs,VP as Ys,a0r as Ks,a1j as Qs,WP as ma,WO as Ke,a1k as pa,mq as Zs,a1l as Xs,a1m as eo,a1n as to,a1o as ao,qz as no,a1p as so,a1q as oo,a1r as co,ru as io,md as lo,m4 as ro,a1s as uo,mc as ha,X4 as mo,a1t as po,a1u as ho,uo as So,t$ as go,t_ as Ct,a1v as Co,a1w as fo,a1x as Io,a1y as ko,nJ as To,br as bo,nE as Sa,nq as Po,a1z as yo,g$ as vo,nB as Eo,sR as Ao,sT as xo,sA as wo,VS as Ro,VT as Do,EW as Fo,EV as _o,Fa as Mo,a1A as ga,sG as Oo,a1B as Uo,rU as Bo,r_ as Vo,s9 as jo,rX as zo,a1C as Lo,s8 as $o,sM as Go,a1D as No,sZ as qo,su as Jo,t2 as Wo,sz as Ho,rF as Yo,a1E as Ko,qX as Qo,qv as Zo,qC as Ca,rp as Xo,a1F as ec,a1G as tc,a1H as ac,a1I as nc,a1J as sc,a1K as oc,t6 as cc,a1L as ic,a1M as lc,a1N as fa,uz as rc,tS as dc,tH as Ia,tF as uc,a1O as mc,tu as pc,t9 as hc,tI as Sc,a1P as gc,a1Q as Cc,tf as fc,a1R as Ic,ta as kc,te as Tc,tc as bc,tO as Pc}from"./zeni-epic-state-CtlpRqoe.js";import ja from"./NotFoundScreen-BeP62Nz9.js";import{a as s,R as za}from"./sentry-D_60LtUS.js";import{n as be,S as yc}from"./mui-DbFwPEO7.js";import{c as Be,v as Y,j as Z,p as te,ar as La,at as $a,dP as vc,dQ as Ec,O as Ga,z as st,dR as Ac,dS as xc,dT as wc,af as Oe,dU as Rc,dV as ka,bb as Ta,dW as Dc,a8 as Na,dX as Fc,h as et,a as _c,dY as Mc,dZ as Oc,V as Uc,Q as Bc,d_ as Vc,d$ as jc,e0 as zc,b5 as Lc,bt as $c,ac as Gc,b6 as Nc,b7 as qc,G as Jc,w as Wc,e1 as Hc,aw as ba,e2 as Yc}from"./index-BqEaHxIT.js";import{u as qa}from"./useAskAiCfoHostNavButtonProps-Biynu986.js";import{g as Pa,b as Kc,c as Qc,h as Zc,a as Xc,i as ei,r as ti,C as ai}from"./TransactionDetailScreen-BDWEHK1J.js";import{u as ni}from"./useActualMatchingMatchDetail-BOc11rCC.js";import{d as si}from"./decodeURIComponentSafe-CNj7wDd5.js";import{m as Ja,a as Wa}from"./expenseAutomationHelper-C8o4PBoS.js";import{u as Ha,a as Ya,w as oi}from"./withTransactionSidePanel-Dxu14DPo.js";import{b as ci,S as ii,a as li,J as ri}from"./ScheduleDetailsPrepaidExpensesScreen-C4z4GiyE.js";import{s as ya,i as Ka,h as di,v as ui,c as mi}from"./routePaths-C1I3AVBw.js";import{a as ft}from"./accountMappingHelper-DTr2dybD.js";import{D as pi}from"./DrawerScreen-2p7xfq2O.js";import"./recharts-B43pV0TY.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";import"./useInitialThreadRequest-CyHRajCC.js";import"./stripSplatSuffix-BWXYYZxG.js";import"./pathToGoBack-W4B39XGQ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="21c92e34-0f85-4702-9058-a078f4990fc6",t._sentryDebugIdIdentifier="sentry-dbid-21c92e34-0f85-4702-9058-a078f4990fc6")}catch{}})();const hi=()=>{const t=he(),n=nt(),f=Te(),I=_((C=>ke(C))),{useFeatureGate:k}=Be(),{isFeatureEnabled:o}=k(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=k(Y.aiAuditScorePercentage),E=_((C=>C.expenseAutomationViewState.selectedPeriodByTenantId)),l=_((C=>Zn(C,I.tenantId))),{isAiCfoAccessEnabled:S,onAskAiCfoClick:R}=qa({mobileExploreReferrer:"Month-End Close Overview"}),x=s.useCallback(((C,h,z=!1)=>{t(_e({tenantId:h,period:{month:C.month,year:C.year},refreshViewInBackground:z}))}),[]),m=s.useCallback((C=>{const h=f.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Z.trackMonthCloseAuditPage(C.month,C.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,h??null),t(Xn(I.tenantId,C))}),[I.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),g=E[I.tenantId],u=s.useCallback((()=>{const C=f.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Z.trackMonthCloseAuditPage(g.month,g.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,C??null),x(g,I.tenantId,!0)}),[x,g,I.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),F=te(f.state?.pathnameStackToGoBack,f.pathname),A=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&g!=null){const C=l.monthEndCloseChecks.monthEndCloseCheckList.find((h=>h.progress<100));if(C!=null)return void n(`./${C.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}});n(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,g]),{areTenantIdsInSync:p}=La();return $a({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{g!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&p&&x(g,I.tenantId)}),[x,g,l.fetchState,I.tenantId,p]),s.useEffect((()=>{g!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&p&&t(es(g))}),[g,l.monthClosePerformanceTrendFetchStatus.fetchState,p]),s.useEffect((()=>{const C=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&u()}),3e5);return()=>clearInterval(C)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const C=f.state?.referrer;Z.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,C??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),T.jsx(Si,{children:T.jsx(vc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:o,onMonthEndCheckClick:C=>{n(`./${C}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:m,handleReviewButtonClick:A,onBackClick:()=>{n("../../dashboard")},onReload:u,isAiCfoAccessEnabled:S,onAskAiCfoClick:R,aiAuditScorePercentageEnabled:r})})},Si=be.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
8
|
-
`;function gi({isFullView:t,matchId:n,onClose:f}){const{match:I,detailFetchState:k,handleOpenBill:o,handleContinueMatch:r,handleRefresh:E,handleUndoReversal:l,lastMatchResults:S,lastUndoResults:R,refreshStatus:x,undoReversalStatus:m}=ni(n);return T.jsx(Ec,{match:I,detailFetchState:k.fetchState,isRenderedInPanel:!t,isUndoInFlight:m.fetchState==="In-Progress",refreshStatus:x.fetchState,onNavigateBack:f,onOpenBill:o,onContinueMatch:r,onRefresh:E,onUndoReversal:l,lastMatchResults:S,lastUndoResults:R})}const Ci=/^match\/([^/?]+)$/,fi=Ya({displayNamePrefix:"withActualMatchingSidePanel",usePanelSetup:function(t){const{useFeatureGate:n}=Be(),{isFeatureEnabled:f}=n(Y.isTransactionDetailSplitViewEnabled),{isFeatureEnabled:I}=n(Y.isAccrualEnabled),k=Ga(),o=(function(E=!0){const l=nt(),S=Te(),R=Ue(),x=Ja(R),m=Ha({childPathPattern:Ci,enabled:E,listPath:x}),g=m.matchGroups[0]!=null&&m.matchGroups[0]!==""?si(m.matchGroups[0]):void 0,u=R.tenantEmailDomain??S.pathname.split("/").find(Boolean)??"",F=s.useRef({isOpen:m.isOpen,matchId:g});F.current={isOpen:m.isOpen,matchId:g};const A=s.useCallback((h=>{!m.isMobile&&E?F.current.isOpen&&F.current.matchId===h?m.closePanel():m.navigateToChild(`match/${encodeURIComponent(h)}`,{replace:F.current.isOpen}):l(`/${u}/expense-automation/actual-matching/${encodeURIComponent(h)}`)}),[l,m.isMobile,m.navigateToChild,m.closePanel,E,u]),p=s.useCallback((()=>{if(g==null)return;const h=te(S.state?.pathnameStackToGoBack,`${S.pathname}${S.search}`);l(`/${u}/expense-automation/actual-matching/${encodeURIComponent(g)}`,{state:{pathnameStackToGoBack:h}})}),[S.pathname,S.search,S.state,g,l,u]),C=m.isOpen&&g!=null;return{closePanel:m.closePanel,isOpen:C,maximize:p,matchId:E&&C?g:void 0,openPanel:A}})(t&&I===!0&&k===!0&&f===!0),r=s.useMemo((()=>{if(o.isOpen&&o.matchId!=null)return T.jsx(gi,{isFullView:!1,matchId:o.matchId,onClose:o.closePanel},o.matchId)}),[o.closePanel,o.isOpen,o.matchId]);return{injectedProps:s.useMemo((()=>({closeMatchSidePanel:o.closePanel,isMatchPanelOpen:o.isOpen,matchPanelContent:r,matchPanelMatchId:o.matchId,openMatchPanel:o.openPanel})),[r,o.closePanel,o.isOpen,o.matchId,o.openPanel]),selectedItemId:o.matchId,sidePanel:{closePanel:o.closePanel,maximize:o.maximize}}}}),Ii=za.memo((({reconciliation:t,selectedDrawerAccountId:n,onClose:f,onFetchLinkTokenClick:I,onEstablishConnectionClick:k})=>{const o=he(),{useFeatureGate:r}=Be(),{isFeatureEnabled:E}=r(Y.isReconV3Enabled),{isFeatureEnabled:l}=r(Y.isReconciliationCombinedStatementEnabled),S=st.getSignedInUser(),R=_((y=>ke(y))),x=s.useMemo((()=>({userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:R?.tenantId??""})),[S?.userId,S?.zeniSessionId,R?.tenantId]),{accountReconciliationsByAccountID:m,excludedAccountIDs:g,monthYearPeriod:u,statementUploadChosen:F}=t,A=m[n],p=s.useMemo((()=>ts(m,n)),[m,n]),C=s.useMemo((()=>as(m)),[m]),h=s.useMemo((()=>ns(m,n)),[m,n]),z=s.useRef(!1),G=s.useCallback((y=>{z.current=y,ka(n,y)}),[n]),q=s.useCallback((y=>{o(gt({accountId:n,selectedPeriod:u,dismissedToBackground:!0,backgroundCompletedSteps:y.completedSteps,startedAtMs:y.startedAtMs,totalDurationSeconds:y.totalDurationSeconds})),y.accountMappings!=null&&o(Qe({accountId:n,selectedPeriod:u,localData:{combinedStatementAccountMappings:y.accountMappings}})),A!=null&&requestAnimationFrame((()=>{z.current||o(Tt({messageSection:"statement_parsing_in_progress",messageText:"success",type:"info",showStatusIcon:!0,variables:[{variableName:"_account_name_",variableValue:Ac(A)}]}))}))}),[o,u,A,n]),b=s.useCallback((()=>{o(gt({accountId:n,selectedPeriod:u,dismissedToBackground:!1}))}),[o,n,u]),J=s.useCallback((y=>{o(ca({accountId:n,selectedPeriod:u,backgroundCompletedSteps:y}))}),[o,u,n]),N=s.useCallback((()=>{o(ca({accountId:n,selectedPeriod:u,backgroundCompletedSteps:0})),o(gt({accountId:n,selectedPeriod:u,dismissedToBackground:!1}))}),[o,u,n]);s.useEffect((()=>()=>{ka(null,!1)}),[]);const e=A?.parsedStatementData?.statementUpload?.statementMeta?.statementUploadId??A?.accountReconEntity.statementMetaData?.statementUploadId,a=A?.statementDateConflict?.previousReconciliationInfo?.reconciledByUserId,i=_((y=>a!=null&&a!==""?ss(os(y.userState,a)):"")),d=s.useCallback((()=>{o(ia({accountId:n,selectedPeriod:u}))}),[o,n,u]),v=s.useCallback((()=>{o(ia({accountId:n,selectedPeriod:u})),o(Ze({statementUploadChosen:!0}))}),[o,n,u]),P=(y,L)=>{o(Is(y,L.split(".")[0]))},D=(y,L)=>{if(L===!0){const Q=A?.combinedStatementGroupId??A?.parsedStatementData?.statementUpload?.statementMeta?.combinedStatementGroupId??A?.parsedStatementData?.statementUpload?.combinedStatementDetails?.combinedStatementGroupId;if(Q!=null&&Q!=="")return void o(Cs({accountId:n,selectedPeriod:u,combinedStatementGroupId:Q,fileId:y}))}e!=null&&o(fs({accountId:n,selectedPeriod:u,fileId:y,statementUploadId:e}))},M=()=>{o(Ze({statementUploadChosen:!1}))},W=y=>{o(gs({accountId:n,selectedPeriod:u,payload:y,statementAccountScope:l===!0?A?.localData?.statementAccountScope??"single_account":"single_account"}))},H=s.useCallback(((y,L,Q)=>{o(cs({accountId:y,selectedPeriod:L,statementUploadId:Q}))}),[o]),se=s.useCallback(((y,L,Q,X,ge)=>{ge!=null&&ge!==""&&o(is(ge)),o(X==null||X===""?rs({accountId:y,selectedPeriod:L,statementUploadId:Q}):ls({accountId:y,selectedPeriod:L,statementUploadId:Q,combinedStatementGroupId:X}))}),[o]),ce=s.useCallback(((y,L)=>{L!==""&&o(ds({accountId:n,selectedPeriod:u,statementUpdateLocalData:y,statementUploadId:L}))}),[o,n,u]),Pe=s.useCallback((()=>{e!=null&&o(A?.localData?.statementAccountScope!=="multi_account"?ms({accountId:n,selectedPeriod:u,statementUploadId:e}):us({accountId:n,selectedPeriod:u,statementUploadId:e}))}),[o,A?.localData?.statementAccountScope,n,u,e]),ye=s.useCallback((y=>{e!=null&&o(ps({accountId:n,selectedPeriod:u,statementUploadId:e,accountMappings:y}))}),[o,u,n,e]),ve=s.useCallback((()=>{o(Ze({statementUploadChosen:!0}))}),[o]),K=y=>{o(Qe({accountId:n,selectedPeriod:u,localData:{accountSource:y}}))},B=y=>{o(Qe({accountId:n,selectedPeriod:u,localData:{statementAccountScope:y}}))},Ve=s.useCallback((()=>{o(wa({accountId:n}))}),[o,n]),Ee=s.useCallback((y=>{o(re(u,y,!0)),f()}),[o,u,f]),ot=s.useCallback((()=>{o(hs({accountId:n,selectedPeriod:u,statementProcessingFailed:!1})),o(Ss({accountId:n,selectedPeriod:u}))}),[o,n,u]),Se=s.useCallback((()=>{o(Ra({accountId:n}))}),[o,n]),je=g.includes(n)?t.excludedAccountReconciliationByAccountID[n]:void 0;if(je!=null)return T.jsx(va,{children:T.jsx(Ea,{$isV3:E===!0,children:T.jsx(xc,{excludedAccountReconciliation:je,includeAccountFetch:t.includeAccountFetchState,isReconV3Enabled:E,onDismissClick:f,onIncludeIntoReconciliation:Se})})});if(A!=null){const y=E===!0?T.jsx(wc,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:A,monthYearPeriod:u,onDismissClick:f,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:I,onEstablishConnectionClick:k,onEditFileName:P,onDeleteFile:D,onSelectSourceType:K,onSelectStatementAccountScope:B,isReconciliationCombinedStatementEnabled:l===!0,ledgerAccounts:p,statementOverrideWarningAccountIds:h,unavailableLedgerAccountIds:C,onConfirmStatementMapping:ye,filesEndPoint:Oe.fileMicroServiceBaseUrl,authParams:x,openFilePicker:F,onStatementUploadSuccess:W,onUploadWindowOpenedOnce:M,onExcludeFromReconciliation:Ve,onRetryParsing:H,onFetchStatementParseInfo:se,onReviewClicked:Ee,statementProcessingFailed:A.statementProcessingFailed,statementProcessingDismissedToBackground:A.statementProcessingDismissedToBackground,onDismissStatementProcessingFailed:ot,onContinueInBackground:q,onClearStatementProcessingDismissedToBackground:b,onResetStatementProcessingProgress:N,onStatementProcessingProgressChange:J,onStatementFlowVisibilityChange:G,onReuploadStatement:ve,onStatementFormDataChange:ce,onStatementConfirmSave:Pe,reconciledByName:i,onDismissDateConflict:d,onReuploadAfterDateConflict:v,isReconV3Enabled:E}):T.jsx(Rc,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:A,monthYearPeriod:u,onDismissClick:f,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:I,onEstablishConnectionClick:k,onEditFileName:P,onDeleteFile:D,onSelectSourceType:K,filesEndPoint:Oe.fileMicroServiceBaseUrl,authParams:x,openFilePicker:F,onStatementUploadSuccess:W,onUploadWindowOpenedOnce:M,onExcludeFromReconciliation:Ve});return T.jsx(va,{children:T.jsx(Ea,{$isV3:E===!0,children:y})})}return null})),va=be.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
height: 100%;
|
|
12
|
-
`,Ea=be.div`
|
|
13
|
-
flex: 1;
|
|
14
|
-
min-height: 0;
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
min-width: 0;
|
|
19
|
-
overflow-x: hidden;
|
|
20
|
-
overflow-y: ${t=>t.$isV3===!0?"hidden":"auto"};
|
|
21
|
-
`;function ki({panelType:t,scheduleId:n,onClose:f,onCloseAfterDecision:I}){return T.jsx(bi,{children:T.jsx(Pi,{children:Ti(t,n,f,I)})})}function Ti(t,n,f,I){switch(t){case"one_time_accrual":return T.jsx(ri,{isRenderedInPanel:!0,accrualIdOverride:n,onPanelNavigateBack:f});case"accrued_expenses":return T.jsx(li,{isRenderedInPanel:!0,scheduleDetailIdOverride:n,onPanelNavigateBack:f,onPanelCloseAfterDecision:I});case"fixed_assets":return T.jsx(ii,{isRenderedInPanel:!0,scheduleDetailIdOverride:n,onPanelNavigateBack:f,onPanelCloseAfterDecision:I});case"prepaid_expenses":return T.jsx(ci,{isRenderedInPanel:!0,scheduleDetailIdOverride:n,scheduleTypeOverride:"prepaid_expenses",onPanelNavigateBack:f,onPanelCloseAfterDecision:I})}}const bi=be.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-direction: column;
|
|
24
|
-
height: 100%;
|
|
25
|
-
`,Pi=be.div`
|
|
26
|
-
flex: 1;
|
|
27
|
-
min-height: 0;
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
min-width: 0;
|
|
32
|
-
overflow-x: hidden;
|
|
33
|
-
overflow-y: auto;
|
|
34
|
-
`,yi=/^schedule\/(prepaid_expenses|fixed_assets|accrued_expenses|one_time_accrual)\/([^/?]+)$/,vi=Ya({displayNamePrefix:"withScheduleSidePanel",usePanelSetup:function(t){const n=(function(m=!0){const g=nt(),u=Te(),F=he(),A=Ue(),p=Ha({childPathPattern:yi,enabled:m}),C=p.matchGroups[0],h=Ka(C)?C:void 0,z=p.matchGroups[1]!=null&&p.matchGroups[1]!==""?p.matchGroups[1]:void 0,G=p.isOpen&&h!=null&&z!=null,q=A.tenantEmailDomain??u.pathname.split("/").find(Boolean)??"",b=s.useRef({isOpen:G,scheduleId:z});b.current={isOpen:G,scheduleId:z};const J=s.useCallback(((e,a,i)=>{i!=null&&(a==="prepaid_expenses"||a==="fixed_assets")&&F(Ma({selectedJEScheduleKey:i})),!p.isMobile&&m?b.current.isOpen&&b.current.scheduleId===e?p.closePanel():p.navigateToChild(`schedule/${a}/${e}`,{replace:b.current.isOpen}):g(ya(a,e,q),{state:{message:"expenseAutomation",origin:"je_schedules"}})}),[F,g,p.isMobile,p.navigateToChild,p.closePanel,m,q]),N=s.useCallback((()=>{if(h==null||z==null)return;const e=te(u.state?.pathnameStackToGoBack,u.pathname);g(ya(h,z,q),{state:{pathnameStackToGoBack:e,message:"expenseAutomation",origin:"je_schedules"}})}),[g,h,z,q,u.pathname,u.state]);return{closePanel:p.closePanel,isOpen:G,maximize:N,openPanel:J,panelType:G?h:void 0,scheduleId:G?z:void 0}})(t),f=s.useRef(null),[I,k]=s.useState(null),o=s.useMemo((()=>({registerPanelDirtyGuard:m=>{f.current=m}})),[]),r=s.useCallback((m=>{f.current?.isDirty()===!0?k((()=>m)):m()}),[]),E=s.useCallback((()=>{r(n.closePanel)}),[r,n.closePanel]),l=s.useCallback((()=>{r(n.maximize)}),[r,n.maximize]),S=s.useCallback(((m,g,u)=>{r((()=>n.openPanel(m,g,u)))}),[r,n.openPanel]),R=s.useMemo((()=>{if(I!=null)return{onCancel:()=>k(null),onDiscard:()=>{f.current=null,k(null),I()}}}),[I]),x=s.useMemo((()=>{if(n.isOpen&&n.panelType!=null&&n.scheduleId!=null)return T.jsx(Dc.Provider,{value:o,children:T.jsx(ki,{panelType:n.panelType,scheduleId:n.scheduleId,onClose:E,onCloseAfterDecision:()=>{f.current=null,n.closePanel()}},`${n.panelType}:${n.scheduleId}`)})}),[n.isOpen,n.panelType,n.scheduleId,n.closePanel,E,o]);return{injectedProps:s.useMemo((()=>({closeSchedulePanel:E,isSchedulePanelOpen:n.isOpen,openSchedulePanel:S,schedulePanelContent:x,schedulePendingDiscardConfirmation:R})),[E,S,x,R,n.isOpen]),selectedItemId:n.scheduleId,sidePanel:{closePanel:E,maximize:l}}}});function Ei({companyId:t,closeCustomerRequestDrawer:n,addCustomerRequest:f,resetCustomerRequest:I}){const k=st.getSignedInUser();if(k==null)throw Error("Can't access Customer Request page without signing in...");const o=_((r=>ks(r,t,k)));return s.useEffect((()=>{I()}),[]),T.jsx(T.Fragment,{children:o.fetchState==="In-Progress"||o.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?T.jsx(Na,{fetchState:"In-Progress"}):T.jsx(Fc,{onCloseClick:n,addCustomerRequest:f,snippets:o.companyMonthEndReportTemplatesData,bulletPoints:o.zeniRequestsData??[]})})}const Ai={schedules:"Review Schedules",actual_matching:"Actual Matching",existing_schedules:"Existing Schedules"},xi=()=>{const t=_((R=>Me(R))),n=Te(),{currentSelectedViewFetchState:f,currentSelectedView:I,selectedPeriod:k}=t,o=et(I),r=et(f.fetchState),E=t.jeSchedules.uiState.selectedPageTab??"schedules",l=et(E),S=s.useCallback((R=>{const x=n.state?.referrer;I==="transaction_categorization"&&(t.selectedTransactionCategorizationTab==="review"?Z.trackTransactionsReviewPage(k.month,k.year,t.transactionView.totalCountByTab.review,0,R,x??null):Z.trackTransactionsAutoCategorisedPage(k.month,k.year,t.transactionView.totalCountByTab.autoCategorized,0,R,x??null)),I==="missing_receipts"&&Z.trackMissingReceiptsPage(k.month,k.year,R,t.missingReceipts.transactions.length,x??null),I==="je_schedules"&&Z.trackMonthCloseScheduleListPage(k.month,k.year,R,t.jeSchedules.pendingReviewSchedules.length,t.jeSchedules.resolveSchedules.length,(m=>{const g={accruedCount:0,fixedAssetsCount:0,oneTimeAccrualCount:0,prepaidCount:0};return m.forEach((u=>{if(Ts(u))g.oneTimeAccrualCount+=1;else switch(bs(u)){case"prepaid_expenses":g.prepaidCount+=1;break;case"fixed_assets":g.fixedAssetsCount+=1;break;case"accrued_expenses":g.accruedCount+=1}})),g})(t.jeSchedules.pendingReviewSchedules),Ai[E],x??null),I==="flux_analysis"&&Z.trackFluxAnalysisPage(k.month,k.year,R,wi(t.fluxAnalysis),x??null),I==="month_end_insights"&&t.auditSummary?.auditScorePercentage!=null&&Z.trackInsightsEmailPage(k.month,k.year,R,"draft",t.auditSummary.auditScorePercentage,null,x??null)}),[k,t,E]);return s.useEffect((()=>{(r!==f.fetchState||I!==o||I==="je_schedules"&&l!=null&&E!==l)&&f.fetchState==="Completed"&&S(!1)}),[I,f.fetchState,o,E,l]),S},wi=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Ri,comma:Aa,space:Di}},dateFormat:Qa}=Jc.getLocalizedStrings(),xa=Pc,Fi=Yn((function(t,n){const{uncategorizedAccounts:f,vendorSearchAutoCompleteData:I,monthEndInsightsCustomerRequestData:k,monthEndInsightsPreviewMode:o,companyId:r,isMissingReceiptsBulkUploadEnabled:E,isTransactionActivityEnabled:l,newScheduleActiveType:S}=n,R=st.getSignedInUser(),x=t.tenantState.currentTenantId,m={userId:R?.userId??"",sessionId:R?.zeniSessionId??"",tenantId:x??""},g=Me(t),{selectedTransactionCategorizationTab:u}=g,{searchTransactionsResults:F,searchTransactionsFetchState:A}=Ns(t),p=S==="prepaid_expenses"?"prepaid_expenses":"fixed_assets",{accountListNestedAccountHierarchy:C,classListNestedAccountHierarchy:h,allDepreciationAccountListNestedAccountHierarchy:z,newScheduleLocalData:G,saveStatus:q}=qs(t,p);return{expenseAutomationViewSelector:g,accountListNestedAccountHierarchy:C,allDepreciationAccountListNestedAccountHierarchy:z,baseTransactionSearchFetchState:A,baseTransactionSearchResults:F,classListNestedAccountHierarchy:h,newScheduleLocalData:G,initialSelectedBaseTransaction:G.selectedBaseTransactionId!=null?Js(t.transactionState,Ws(G.selectedBaseTransactionId)):void 0,newAccrualAccountsView:Hs(t),newScheduleSaveStatus:q,bulkUploadSelector:E===!0?g.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:I,authParams:m,receiptUploadEndpoint:`${Oe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${ba}/transaction_attachments`,bulkUploadEndpoint:E===!0?`${Oe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:u,selectedTransactionGroup:g.transactionView.selectedTransactionGroup,monthEndInsightsCustomerRequestData:k,monthEndInsightsPreviewMode:o,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:R,uncategorizedAccounts:f,companyId:r,isTransactionActivityEnabled:l,receiptsEmail:Ks(t.tenantState,x),downloadParams:{authParams:m,jeScheduleEndPoint:`${ba}/jeScheduleReports`,timezone:Ys(),companyName:ke(t).companyName}}}),(function(t,n){const{themeState:f,isAccountingClassesEnabled:I,isCOTEnabled:k,isMissingReceiptsBulkUploadEnabled:o,location:r,vendorSearchAutoCompleteData:E,expenseAutomationViewSelector:l,currentTenant:S,newScheduleActiveType:R,uncategorizedAccounts:x,navigate:m,onClickCustomerRequest:g,handleEditClick:u,closeSchedulePanel:F,isSchedulePanelOpen:A,openSchedulePanel:p,setActivityLogTransactionId:C}=n,{selectedPeriod:h,currentSelectedView:z,reconciliation:{selectedAccountId:G}}=l,{accountSettingsView:q}=l.jeSchedules,b=Oa(h),J=at(b.start),N=at(b.end);return{onZeniLogoClick:()=>{f.toggle()},onUploadReceiptAttachment:e=>{Z.trackMissingReceiptAttached(h.month,h.year),t(dc(e))},onUploadTransactionReceipt:(e,a,i,d,v,P)=>{t(fa(e,a,{fetchState:"In-Progress"}));const D=()=>t(fa(e,a,{fetchState:"Error"}));Yc(`${Oe.accountMicroServiceBaseUrl}/1.0/transactions/${a}/attachments`,P,a,i,d,v).then((M=>{M!=null?t(rc(e,M)):D()})).catch(D)},onMissingReceiptsRowClick:(e,a)=>{if(n.openTransactionPanel)return void n.openTransactionPanel(e,a);const i=te(r.state?.pathnameStackToGoBack,r.pathname);m(`../../transaction/${a}/${e}`,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,a)=>{t(lc(e,a)),S!=null&&t(_e({tenantId:S.tenantId,period:a,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,a,i,d)=>{t(ic(e,{fetchState:a,error:i})),i!=null&&t(Tt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:d!=null?Di+Ri+d+Aa:Aa}]}))},onUpdateJESchedulesUIState:e=>{const a=l.jeSchedules.uiState,i=e.selectedPageTab!=null&&e.selectedPageTab!==a.selectedPageTab,d=e.selectedJETypeFilter!==void 0&&e.selectedJETypeFilter!==a.selectedJETypeFilter;i&&n.closeMatchSidePanel?.(),A===!0&&(i||d)&&F?.(),e.createdGroupCollapsed!=null?t(nc()):e.pendingGroupCollapsed!=null?t(sc()):e.selectedJETypeFilter!==void 0?t(oc(e.selectedJETypeFilter)):t(cc(e))},onUpdateMissingReceiptsUIState:e=>{t(ac(e))},onFetchMissingReceiptsList:()=>{N!=null&&J!=null&&t(Va({start:J,end:N},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...o===!0?{onBulkUploadFiles:e=>{t(bc(e))},onBulkUploadProgress:e=>{t(Tc(e))},onBulkUploadSuccess:e=>{t(kc({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Ic(e))},onConfirmBulkUploadMatch:(e,a,i,d,v)=>{t(fc(e,a,i,d,v))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Cc())},onSetBulkUploadResultsTab:e=>{t(gc(e))},onSetBulkUploadCompletedSubTab:e=>{t(Sc(e))},onSetBulkUploadSortConfig:(e,a)=>{t(Ia({sortKey:e,sortOrder:a}))},onClearBulkUpload:()=>{t(hc())},onSearchTransactionsForManualMatch:(e,a)=>{t(xa(e,a??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=l.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(xa(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,a)=>{t(pc(e,a))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(mc())},onFetchBulkUploadBatches:e=>{t(Ua(e))},onFetchMoreBatchDetails:()=>{t(uc())},onResetBulkUploadSort:()=>{t(Ia({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(tc())},onSearchTextChanged:e=>{const a=l.currentSelectedView,i=l.selectedTransactionCategorizationTab;a==="transaction_categorization"&&(t(Ct({selectedTab:i,uiState:{searchString:e}})),N!=null&&J!=null&&t(pe(i,{start:J,end:N},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const a=l.selectedTransactionCategorizationTab;t(ec({filters:e,selectedTab:a}))},onRefresh:()=>{n.trackExpenseAutomationTabAnalytics(!0),t(Xo())},onClose:()=>{z==="reconciliation"&&G!=null&&t(Ca({selectedAccountId:void 0})),m("../")},onBack:()=>{z==="reconciliation"&&G!=null&&t(Ca({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Zo(e))},onSaveReconciliationReview:e=>{t(Qo(e))},onUpdateStep:e=>{const{selectedPeriod:a}=l,i=te(r.state?.pathnameStackToGoBack,r.pathname);m(`../${e}/${a.month}-${a.year}`,{state:{pathnameStackToGoBack:i,referrer:l.currentSelectedView}}),t(Ba(e))},handleLogOutClick:()=>{const e=te(r.state?.pathnameStackToGoBack,r.pathname);m("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:a}=e,{prepaidExpensesAccount:i,fixedAssetsAccount:d,accruedExpensesAccount:v}=a,P=ft(q.prepaidExpensesAccountList,i.selectedOptions),D=ft(q.fixedAssetsAccountList,d.selectedOptions),M=ft(q.accruedExpensesAccountList,v.selectedOptions),W={selectedPrepaidExpensesAccountIds:P.map((H=>H.accountId)),selectedFixedAssetsAccountIds:D.map((H=>H.accountId)),selectedAccruedExpensesAccountIds:M.map((H=>H.accountId))};t(Ko({data:W}))},onSaveJeAccountSettingsClick:()=>{t(Yo())},onJESchedulesFormDataChange(e,a){const{jeScheduleID:i,accumulatedDepreciationCategory:d,scheduleClass:v,scheduleExpenseCategory:P,vendor:D}=a,{allAccountList:M,allClassList:W,allDepreciationAccountList:H}=l.jeSchedules,se=E.entityAutoCompleteView.vendor.length>0?E.entityAutoCompleteView.vendor.find((K=>K.id===D?.selectedOption)):void 0,ce={id:se?.zeniId??D?.selectedOption??"",name:se?.name??D?.defaultOptions.find((K=>K.value===D?.selectedOption))?.label??"",logo:se?.logo},Pe=P?.selectedOption!=null?M.find((K=>K.qboId===P.selectedOption)):void 0,ye=v?.selectedOption!=null?W.find((K=>K.classId===v.selectedOption)):void 0,ve=d?.selectedOption!=null?H.find((K=>K.qboId===d.selectedOption)):void 0;t(Ho({scheduledJournalEntryID:e,localData:{jeScheduleID:i,scheduledJournalEntryID:e,updatedCategoryId:Pe?.accountId,updatedClassId:ye?.classId,updatedAccumulatedDepreciationCategoryID:ve?.accountId,updatedVendor:{id:ce.id,name:ce.name}}}))},onRevertJeSchedule(e,a,i,d,v){t(Wo(e,a,i,d,v))},ignoreRecommendedJeSchedule(e,a,i,d){t(Jo(e,a,i,d))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,a)=>{e.trim().length>=2?t(ma({searchString:e,entityType:a,searchOrigin:"common"})):e.trim().length===0&&t(Ke("common"))},onCancelAutoComplete:()=>{t(Ke("common"))}},onPostJESchedule(e,a){t(qo({scheduledJournalEntryID:e,jeScheduleTransactionKey:a}))},clearJeScheduleLocalData(){t(No())},onViewTransaction(e){if(n.tenantEmailDomain==null)return;const a=mi(e,n.tenantEmailDomain),i=te(n.location.state?.pathnameStackToGoBack,`${n.location.pathname}${n.location.search}`);n.navigate(a,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"je_schedules"}})},onSearchBaseTransaction(e){t(Go({query:e,scheduleType:R==="prepaid_expenses"?"prepaid_expenses":"fixed_assets"}))},onNewScheduleFormChange(e,a){const i=yt(e)==="prepaid_expenses"?"prepaid_expenses":"fixed_assets";t(ga({scheduleType:i,localData:a}))},onOpenMatchNewModal(e){t($o(e))},onCloseMatchNewModal(){t(Lo())},onClearMatchNewModal(){t(zo())},onSearchMatchTransactions(e,a){t(jo(e,a))},onSearchMatchAccruals(e,a){t(Vo(e,a))},onMatchAndReverse(e){t(Bo(e.transactionId,e.transactionIntegrationId,e.transactionType,e.lineIds,e.transactionSyncToken,e.accrualIds))},onUpdateActualMatchingUIState(e){t(Uo(e))},onSaveSchedule(e,a){const i=e==="prepaid_expenses"?"prepaid_expenses":"fixed_assets",{allAccountList:d,allDepreciationAccountList:v}=l.jeSchedules,P=a.selectedAccount!=null?d.find((M=>M.qboId===a.selectedAccount)):void 0,D=a.selectedAccumulatedDepreciationCategory!=null?v.find((M=>M.qboId===a.selectedAccumulatedDepreciationCategory)):void 0;t(ga({scheduleType:i,localData:{...a,selectedAccount:P?.accountId,selectedAccumulatedDepreciationCategory:D?.accountId}})),t(Oo({scheduleType:i}))},onCreateAccruedSchedule(e){const a="accrued_expenses";t(Ro()),t(Do()),t(Fo({scheduleType:a,localData:e,selectedJeScheduleDetailId:void 0})),t(_o({scheduleType:a})),t(Mo(a,void 0))},onCreateOneTimeAccrual(e){t(wo(e))},handleJeScheduleClick:(e,a,i)=>{if((function(v,P){return P!=="accrued_expenses"})(0,i)&&t(Ma({selectedJEScheduleKey:a})),p!=null&&Ka(i))return void p(e,i,a);const d=te(r.state?.pathnameStackToGoBack,r.pathname);m(`../../vendors/schedules/${i}/details/${e}`,{state:{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"je_schedules"}})},onOneTimeAccrualFeedback:(e,a,i,d)=>{t(a!=="revert"?xo(e,i,d):Ao(e,i,d))},onOneTimeAccrualClick:e=>{if(p!=null)return void p(e,"one_time_accrual");const a=te(r.state?.pathnameStackToGoBack,r.pathname);m(`../../vendors/schedules/one_time_accrual/details/${e}`,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",origin:"je_schedules"}})},onOpenMatch:e=>{n.openMatchPanel?.(e)},improveMonthEndInsightsUsingZeniGPTClick:e=>{S!=null&&t(Eo(e,S.companyId,S.tenantId))},onClickCustomerRequest:g,setActivityLogTransactionId:C,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(vo())},onOpenFileAttachmentSnackBar:()=>{t(Tt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(yo(e))},onUpdateFileAttachment:e=>{t(Po({files:e}))},previewMonthEndReport:(e,a,i,d,v)=>{S!=null&&t(Sa(e,S.companyId,a,!0,i,d,{agentInsightEdits:v,tenantId:S.tenantId}))},saveMonthEndReport:(e,a,i,d,v)=>{S!=null&&t(Sa(e,S.companyId,a,!1,i,d,{agentInsightEdits:v,tenantId:S.tenantId}))},onEditMonthEndInsightsClick:u,sendMonthEndReport:e=>{const a=r.state?.referrer,{selectedPeriod:i,auditSummary:d}=l;S!=null&&d?.auditScorePercentage!=null&&(t(To(S.companyId,e,S.tenantId)),Z.trackInsightsEmailPage(i.month,i.year,!1,"draft",d.auditScorePercentage,bo().format(Qa.analytics.MMMDDCommaYYYYformat),a??null))},onTransactionCategorizationRowClick:(e,a)=>{const i=l.transactionView.uiState.searchString??"",d=l.transactionView.transactions,v=d.findIndex((M=>M.id===e)),P=i.length>0?{resultPosition:v>=0?v+1:void 0,resultsCount:d.length,searchTerm:i}:void 0;if(n.openTransactionPanel)return void n.openTransactionPanel(e,a,P);const D=te(r.state?.pathnameStackToGoBack,r.pathname);m(`../../transaction/${a}/${e}`,{state:{pathnameStackToGoBack:D,message:"expenseAutomation",origin:"transaction_categorization",searchContext:P}})},setLocalDataForCategoryAndClass:(e,a,i,d,v,P,D,M,W,H,se,ce)=>{t(ko(e,a,i,d,x,v,P,D,M,W,H,se,ce))},onCancelAutoComplete:()=>{t(Ke("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(pa({scrollPosition:e}))},onUpdateTab:e=>{n.closeSidePanel?.(),N!=null&&J!=null&&(t(pe(e,{start:J,end:N},!1,!1)),t(Io(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{n.closeSidePanel?.(),N!=null&&J!=null&&(t(fo(e)),t(pe("autoCategorized",{start:J,end:N},!1,!1)))},onTransactionGroupChange:e=>{n.closeSidePanel?.(),N!=null&&J!=null&&(t(Co(e)),t(pe(n.expenseAutomationViewSelector.selectedTransactionCategorizationTab,{start:J,end:N},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,a)=>{t(Ct({selectedTab:e,uiState:a})),N!=null&&J!=null&&t(pe(e,{start:J,end:N},!1,!1,a.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,a)=>{t(Ct({selectedTab:e,uiState:a}))},onFetchTransactionCategorizationList:(e,a,i,d,v,P)=>{N!=null&&J!=null&&t(pe(e,{start:J,end:N},!0,i,a,d,v,P))},resetTransactionCategorizationLocalData:(e,a,i,d,v,P,D)=>{t(go(e,a,i,d,D??null,v,P,!1)),ti(t,a.map(String))},updateSelectedVendorForTransaction:(e,a,i,d,v)=>{t(ha({selectedTab:e,transactionId:a,lineId:i,selectedTransaction:d,uncategorizedAccounts:x,updatedVendor:v,isAccountingClassesEnabled:I}))},onSaveUpdateTransactionCategorization:(e,a,i)=>{const d=r.state?.referrer;e==="autoCategorized"?Z.trackTransactionsAutoCategorisedPage(h.month,h.year,l.transactionView.totalCountByTab.autoCategorized,a.length,!1,d??null):Z.trackTransactionsReviewPage(h.month,h.year,l.transactionView.totalCountByTab.review,a.length,!1,d??null),t(So(e,a,i)),ei(a.map(String))},onUpdateSelectedCheckboxTransactionIds:(e,a)=>{t(ho({selectedTab:e,transactionIds:a}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,a,i,d,v,P)=>{const{transactionId:D,transaction:M,lineIds:W}=a;P!=null&&t(mo({transactionId:D,customerUpdates:P})),t(po({selectedTab:d,transactionId:D.id,lineId:W[0],selectedTransaction:M,uncategorizedAccounts:x,updatedCustomer:P,selectedEntity:v,isAccountingClassesEnabled:I})),v!=null&&t(Pt({entity:v,amount:e,transactionDetails:a,flowType:"categorization",selectedTab:d,isFetchCOT:k}))},onFetchRecommendationsForEntityCategorization:(e,a,i,d,v,P)=>{const{transactionId:D,transaction:M,lineIds:W}=a;P!=null&&(t(lo({transactionId:D,vendorUpdates:{name:P.name,id:P.id?P.id:void 0}})),t(ro({vendorId:P.id?P.id:void 0,localData:{vendorName:P.name,vendorId:P.id?P.id:void 0}}))),P?.id?(t(ha({selectedTab:d,transactionId:D.id,lineId:W[0],selectedTransaction:M,uncategorizedAccounts:x,updatedVendor:P,selectedEntity:v,isAccountingClassesEnabled:I})),v!=null&&t(Pt({entity:v,amount:e,transactionDetails:a,flowType:"categorization",selectedTab:d,isFetchCOT:k}))):t(uo({selectedTab:d,transactionId:D.id,lineId:W[0]}))},fetchFluxViewOnScroll:(e,a)=>{t(Xe(e,!0,!1,a,!1,!0))},onFetchFluxViewList:()=>{t(Xe(h,!0,!1,null,!1,!1))},markAsReview:(e,a,i,d)=>{Z.trackFluxAnalysisReviewed(i.month,i.year,d??!1,e),t(io(a,e,i,d??!1))},onUpdateFluxAnalysisUIState:e=>{t(co(e))},updateOperatingExpensesIdsForReview:e=>{t(oo({operatingExpenseIds:e,selectedPeriod:h}))},redirectToVendorDetailPage:e=>{if(n.tenantEmailDomain!=null){const a=ui(e.id,e.qboId,n.tenantEmailDomain),i=te(n.location.state?.pathnameStackToGoBack,n.location.pathname);n.navigate(a,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(so({sectionId:e,selectedPeriod:h}))},onFetchReimbursementView:(e,a,i)=>{t(Xe(e,!0,!1,a,!0,i))},onReviewClicked:e=>{t(re(h,e))},setOpenDrawerClicked:e=>{t(tt({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,a)=>{t(Da("expense_automation_reconcile",e,a))},onEstablishConnectionClick:(e,a)=>{const i=S?.companyId;i!=null&&(t(Fa(e,i,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",a)),t(_a({accountId:a,connectionInProgress:!0})))},onAddStatementClick:e=>{t(tt({selectedDrawerAccountId:e})),t(Qe({accountId:e,selectedPeriod:h,localData:{accountSource:"bank_statement"}})),t(Ze({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(re(h,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(no({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,a)=>{t(ao({sortKey:e,sortOrder:a}))},onReconReviewTabColumnSortConfigChanged:(e,a)=>{t(to({sortKey:e,sortOrder:a}))},onReconTabUpdate:e=>{n.closeSidePanel?.(),t(eo({selectedTab:e}))},updateReconReviewTabLocalData:(e,a,i)=>{const d=e.vendor?.id;i&&d!=null&&t(Zs(d)),t(Xs({data:e,transactionId:a}))},onReconMatchedTransactionClick:e=>{if(n.openTransactionPanel)return void n.openTransactionPanel(e,bt("bill"));const a=te(r.state?.pathnameStackToGoBack,r.pathname);m(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{m(-1)},onReconListPageScroll:e=>{t(pa({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ma({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Ke("common"))},onReconNodeCollapseToggled:(e,a)=>{t(Qs({nodeId:e,collapsed:a}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(wa({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Ra({accountId:e}))}}}),((t,n,f)=>{const{isMissingReceiptsBulkUploadEnabled:I,...k}=f;return(function(o,r,E){return{...o,...r,...E,onUploadTransactionReceipt:(l,S,R,x,m)=>{r.onUploadTransactionReceipt(l,S,R,x,m,o.authParams)}}})(t,n,k)}))(Wc(Hc)),It="newScheduleMode",kt="newScheduleType",_i=vi(oi((function(t){const n=t.displayName??t.name??"Component",f=za.memo(t),I=k=>{const o=he(),r=(function(){const p=he(),C=_((h=>Me(h).reconciliation.selectedDrawerAccountId));return{isOpen:C!=null,selectedAccountId:C,openPanel:s.useCallback((h=>{p(tt({selectedDrawerAccountId:h}))}),[p]),closePanel:s.useCallback((()=>{p(tt({selectedDrawerAccountId:void 0}))}),[p])}})(),E=_((p=>Me(p).reconciliation)),l=_((p=>ke(p))),S=s.useCallback(((p,C)=>{o(Da("expense_automation_reconcile",p,C))}),[o]),R=s.useCallback(((p,C)=>{const h=l?.companyId;h!=null&&(o(Fa(p,h,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",C)),o(_a({accountId:C,connectionInProgress:!0})))}),[o,l?.companyId]),x=s.useMemo((()=>{if(r.isOpen&&r.selectedAccountId!=null)return T.jsx(Ii,{reconciliation:E,selectedDrawerAccountId:r.selectedAccountId,onClose:r.closePanel,onFetchLinkTokenClick:S,onEstablishConnectionClick:R})}),[r.isOpen,r.selectedAccountId,r.closePanel,E,S,R]),m=s.useMemo((()=>({reconPanelContent:x,reconSidePanelIsOpen:r.isOpen,closeReconSidePanel:r.closePanel})),[x,r.isOpen,r.closePanel]),{useFeatureGate:g}=Be(),{isFeatureEnabled:u}=g(Y.isReconV3Enabled),F=s.useContext(Ta),A=s.useMemo((()=>r.isOpen?u===!0?{selectedItemId:r.selectedAccountId}:{closePanel:r.closePanel,selectedItemId:r.selectedAccountId}:F),[r.isOpen,r.closePanel,r.selectedAccountId,F,u]);return T.jsx(Ta.Provider,{value:A,children:T.jsx(f,{...k,...m})})};return I.displayName=`withReconSidePanel(${n})`,I})(fi((({closeMatchSidePanel:t,closeReconSidePanel:n,closeSidePanel:f,matchPanelContent:I,isMatchPanelOpen:k,openMatchPanel:o,openTransactionPanel:r,panelContent:E,reconPanelContent:l,reconSidePanelIsOpen:S,isSchedulePanelOpen:R,closeSchedulePanel:x,openSchedulePanel:m,schedulePanelContent:g,schedulePendingDiscardConfirmation:u,sidePanelIsFullView:F,sidePanelIsOpen:A})=>{const{isAiCfoOpen:p,setIsAiCfoOpen:C}=_c(),h=Mc(),{isOpen:z}=Oc(),G=nt(),q=Te(),b=he(),{isAiCfoAccessEnabled:J,onAskAiCfoClick:N}=qa({mobileExploreReferrer:"Transaction categorization"}),e=s.useCallback((()=>{k===!0&&t?.(),A===!0&&F!==!0&&f?.()}),[t,f,k,F,A]),a=_(xs);s.useEffect((()=>{a===!0&&(e(),b(ws()))}),[a,e,b]);const{areTenantIdsInSync:i}=La(),d=xi(),v=Uc(),[P,D]=s.useState(!1),[M,W]=Hn(),H=s.useCallback((c=>{W((w=>{const $=new URLSearchParams(w);return c==null?($.delete(It),$.delete(kt),$):($.set(It,c.scheduleDetailsMode),$.set(kt,c.scheduleType),$)}),{replace:!0})}),[W]),[se,ce]=s.useState(void 0),Pe=s.useCallback(((c,w,$)=>{const j=yt(c);ce(j),H({scheduleDetailsMode:w,scheduleType:c}),b(ra({scheduleType:j==="prepaid_expenses"?"prepaid_expenses":"fixed_assets",shouldResetEnteredData:$}))}),[b,H]),ye=s.useMemo((()=>{const c=M.get(It),w=M.get(kt);return c!=null&&w!=null?{scheduleDetailsMode:c,scheduleType:w}:void 0}),[M]),ve=s.useCallback((c=>{H(c),c!=null&&b(ra({scheduleType:yt(c.scheduleType)==="prepaid_expenses"?"prepaid_expenses":"fixed_assets",shouldResetEnteredData:!0}))}),[b,H]),K=_((c=>la(c))),B=_((c=>ke(c))),[Ve,Ee]=s.useState(!1),[ot,Se]=s.useState(!1),[je,y]=s.useState([]),[L,Q]=s.useState(null),X=s.useCallback((()=>{Q(null)}),[]),ge=L?.contentType==="activity"?L.detail.transactionId:void 0,ct=s.useCallback((c=>{c!=null?(p&&C(!1),h(),e(),Q({contentType:"activity",detail:{transactionId:c}})):Q((w=>w?.contentType==="activity"?null:w))}),[e,p,h,C]),Za=s.useCallback((c=>{p&&C(!1),h(),e(),Q({contentType:"transfer",detail:c})}),[e,p,h,C]),Xa=s.useCallback((()=>{h(),X(),e(),N()}),[e,X,N,h]),vt=s.useRef(p);s.useEffect((()=>{p===!0&&vt.current===!1&&(h(),X(),e()),vt.current=p}),[e,X,p,h]);const Et=s.useRef(z);s.useEffect((()=>{z===!0&&Et.current===!1&&(p&&C(!1),X(),k===!0&&t?.(),A===!0&&F!==!0&&f?.()),Et.current=z}),[X,t,f,z,p,k,C,F,A]);const ze=A===!0&&F!==!0||k===!0,At=s.useRef(ze);s.useEffect((()=>{ze&&!At.current&&(p&&C(!1),h(),X()),At.current=ze}),[X,p,ze,h,C]);const[xt,en]=s.useState(!1),wt=s.useRef(!1),{selectedTab:tn}=Ue(),{tenantEmailDomain:it}=Ue(),[lt,Rt]=s.useState(q.state?.message==="comingFromTransactionDetail"),Dt=q.state?.message==="comingFromOverview",an=Bc(),rt=st.getSignedInUser(),{useFeatureGate:oe}=Be(),{isFeatureEnabled:Ft}=oe(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:Ae}=oe(Y.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:dt}=oe(Y.isTransactionActivityEnabled),{isFeatureEnabled:_t}=oe(Y.isAccrualEnabled),nn=Ga(),de=_t===!0&&nn===!0,{isFeatureEnabled:Mt}=oe(Y.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:sn}=oe(Y.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:on}=oe(Y.isProjectsTransactionsEnabled),{isFeatureEnabled:cn}=oe(Y.isReconV3Enabled),ln=s.useCallback((c=>{const w=bt(c.transactionType??(c.view==="reconciliation"?"bill":"expense")),$=te(q.state?.pathnameStackToGoBack,q.pathname),j=new URLSearchParams({view:"full"});c.threadId!=null&&j.set("thread_id",c.threadId),c.entityType!=null&&j.set("entity_type",c.entityType),G(`/${it}/transaction/${encodeURIComponent(w)}/${c.transactionId??c.entityId}?${j.toString()}`,{state:{pathnameStackToGoBack:$,message:"expenseAutomation"}})}),[G,it,q.state,q.pathname]),rn=_((c=>Rs(c,"common"))),V=_((c=>Me(c))),{categoryOptions:dn,paymentAccountNames:un}=_((c=>Ds(c.accountState))),mn=_((c=>Fs(c.classState))),{monthEndCloseChecksView:ee,currentSelectedView:O,selectedPeriod:U,selectedTransactionCategorizationTab:ut,currentSelectedViewBackgroundRefreshFetchState:pn,currentSelectedViewFetchState:ie,jeSchedules:mt,reconciliation:Ot}=V;Kc(O==="transaction_categorization");const hn=V.transactionView.saveStatus.fetchState,Le=V.transactionView.transactions,Ut=s.useRef(Le);Ut.current=Le;const Bt=_((c=>c.expenseAutomationTransactionsViewState?.transactionCategorizationView)),Vt=_((c=>c.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab)),jt=s.useRef(Bt);jt.current=Bt;const zt=s.useRef(Vt);zt.current=Vt;const $e=_((c=>{const w=c.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab;return w!=null?c.expenseAutomationTransactionsViewState?.transactionCategorizationView?.[w]?.filters:void 0})),Lt=s.useRef("");s.useEffect((()=>{if(O!=="transaction_categorization")return;const c=V.transactionView.uiState.searchString??"";if(ie.fetchState!=="Completed"||c.length===0||c===Lt.current)return;Lt.current=c;const w=$e!=null?Vc($e):0,$=$e?.categories.filter((j=>j.values.length>0&&String(j.values[0]??"").trim()!=="")).map((j=>`${j.field}:${j.values.join(",")}`))??[];Z.trackAiCloseTransactionSearch({filtersApplied:$,hasResults:Le.length>0,isFiltered:w>0,resultsCount:Le.length,searchTerm:c,searchType:"free_text"})}),[O,ie.fetchState,V.transactionView.uiState.searchString,V.transactionView.transactions,$e]);const le=Qc(hn,(()=>{const c=[],w=zt.current,$=jt.current,j=$!=null&&w!=null?$[w]:void 0;if(j?.transactionReviewLocalDataById!=null)for(const fe of Object.values(j.transactionReviewLocalDataById)){const ae=fe?.transactionReviewLocalData?.lineItemById;if(ae!=null)for(const pt of Object.values(ae)){const Fe=pt?.account;Fe?.accountId!=null&&c.push(Fe.accountId)}}const Ce=Ut.current;for(const fe of Ce)for(const ae of fe.lines??[])"account"in ae&&ae.account?.accountId!=null&&c.push(ae.account.accountId);return c}));s.useEffect((()=>{O==="transaction_categorization"&&A!==!0||ct(void 0)}),[O,ct,A]),s.useEffect((()=>{S===!0&&n?.()}),[O,Ot.selectedAccountId]);const Sn=V.transactionView.selectedTransactionCategorizationCompletedSubTab,gn=V.transactionView.selectedTransactionGroup,Ge=`${ut}|${Sn}|${gn}`,Ne=s.useRef(null),$t=s.useRef(null);s.useEffect((()=>{Ne.current!==null?Ne.current!==Ge&&(Ne.current=Ge,O==="transaction_categorization"&&X()):Ne.current=Ge}),[X,O,Ge]);const Cn=_((c=>ge==null?void 0:_s(c.transactionState,ge))),ue=Cn?.qboId,Gt=_((c=>ue==null?void 0:Ms(c,ue)));s.useEffect((()=>{ue!=null&&b(Os(ue))}),[b,ue]);const{createTransferEntryStatus:Nt,creditCardTransferAccountsList:qt,transferAccounts:Jt}=V.transactionView,Wt=s.useCallback((c=>Zc(b,c)),[b]),Ht=s.useMemo((()=>O!=="transaction_categorization"||L==null?null:L.contentType==="activity"?dt===!0?T.jsx(jc,{activityLogView:Gt,qboId:ue,onClose:()=>Q(null),selectedTransactionId:L.detail.transactionId,isQuickViewCardStyle:!0},String(L.detail.transactionId)):null:L.contentType==="transfer"?T.jsx(zc,{createTransferEntryStatus:Nt,creditCardTransferAccountsList:qt,transaction:L.detail,transferAccounts:Jt,onClose:()=>Q(null),onCreateTransfer:Wt,isQuickViewCardStyle:!0},String(L.detail.transactionId)):null),[O,L,dt,Gt,ue,Nt,qt,Jt,Wt]),fn=Ht!=null,{selectedAccountId:xe}=Ot,Yt=et(mt.accountSettingsView.saveState.fetchState),In=_((c=>Us(c.accountState,c.accountListState,"accountList"))),kn=_((c=>Bs(c))),we=Wa(tn)??O,Tn=_((c=>c.entityAutoCompleteState.autoCompleteText.common));if($a({isDataReady:ie.fetchState==="Completed"}),rt==null)throw Error("Can't access expense automation screen without signing in...");const Kt=Oa(U),Re=at(Kt.start),De=at(Kt.end);if(Re==null||De==null)throw Error(`Invalid start - ${Re} and end - ${De} period from given ${U}`);const bn=s.useCallback((()=>{Ee(!1)}),[]),Pn=s.useCallback((()=>{Se(!0)}),[]),yn=s.useCallback((c=>{y(c),Se(!1)}),[]),vn=s.useCallback((()=>{y([])}),[]),qe=V.missingReceipts.bulkUpload.phase,Qt=V.missingReceipts.bulkUpload.currentBatchId;s.useEffect((()=>{Ae===!0&&O==="missing_receipts"&&qe==="matching"&&Qt!=null&&b(Ua({cacheOverride:!0}))}),[Ae,O,qe,Qt,b]);const Zt=rt?.userId,En=U.month,An=U.year,Xt=B?.tenantId;s.useEffect((()=>{O==="missing_receipts"&&Ae!==!1&&qe==="idle"&&Zt!=null&&Xt!=null&&b(Vs())}),[O,Ae,qe,Zt,Xt,En,An,b]),s.useEffect((()=>{K.newVendorState?.vendorDetailLocalData?.vendorName!=null?D(!0):D(!1)}),[K.newVendorState?.vendorDetailLocalData?.vendorName]),s.useEffect((()=>{we!=null&&O!==we&&b(Ba(we))}),[we]),s.useEffect((()=>{xt===!1&&ie.fetchState==="Completed"&&i&&(en(!0),b(da(!1,!1,de)))}),[xt,ie,i,de]),s.useEffect((()=>{const c={month:U.month,year:U.year},w=$t.current;$t.current=c,w===null||w.month===c.month&&w.year===c.year||!Dt&&i&&(b(da(!1,!1,de)),b(re(U,xe,!1,!1)))}),[U.month,U.year,i,de]);const Je=s.useCallback(((c=!1,w=!1)=>{const $={start:Re,end:De};switch(O){case"transaction_categorization":b(pe(ut,$,c,!lt,void 0,void 0,w)),Rt(!1);break;case"flux_analysis":b(Xe(U,c,w,null));break;case"month_end_insights":if(w===!1){const j=new Date(U.year,U.month,0),Ce=zs(j.toDateString()).format(Qa.analytics.YYYYDashMMDashDDFormat);b(Ls(!0,B.companyId,B.tenantId,Ce)),b($s(B.companyId,B.tenantId))}break;case"je_schedules":b(js($,w,de));break;case"missing_receipts":b(Va($,{amount:75,currencyCode:"USD",currencySymbol:"$"},c,w));break;default:b(re(U,xe,c,w))}}),[O,Re,De,B.companyId,B.tenantId,ut,U,xe,lt,Rt,de]),xn=s.useCallback((()=>{Je(!0,!0)}),[Je]);s.useEffect((()=>{O===we&&ie.fetchState==="Not-Started"&&i&&Je(!0)}),[ie,Re,De,B.companyId,B.tenantId,i]),s.useEffect((()=>{Dt||lt||wt.current||pn.fetchState==="In-Progress"||ie.fetchState!=="Completed"||(wt.current=!0,Je(!0,!0))}),[]),s.useEffect((()=>{ee.fetchState!=="In-Progress"&&ee.fetchState!=="Completed"&&ee.fetchState!=="Error"&&B?.tenantId!=null&&b(_e({tenantId:B.tenantId,period:U,refreshViewInBackground:!1}))}),[ee.fetchState,B?.tenantId]),s.useEffect((()=>{ee.fetchState!=="Completed"||!i||(ee.monthEndCloseChecks?.monthEndCloseCheckList.some((c=>c.id==="reconciliation"))??!1)&&V.reconciliation.fetchStatus.fetchState==="Not-Started"&&b(re(U,void 0,!1,!1))}),[ee.fetchState,i,U.month,U.year,V.reconciliation.fetchStatus.fetchState,b]),s.useEffect((()=>{V.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?Ee(!0):Ee(!1)}),[V.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),s.useEffect((()=>{V.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&i&&(b(_e({tenantId:B.tenantId,period:U,refreshViewInBackground:!0})),b(Gs({companyId:B.companyId})),G("../"))}),[V.monthEndInsights?.sendMonthEndReportStatus?.fetchState,B.tenantId,U,B.companyId,i]),s.useEffect((()=>{const c=setInterval((()=>{ee.fetchState!=="In-Progress"&&ee.fetchState==="Completed"&&b(_e({tenantId:B.tenantId,period:U,refreshViewInBackground:!0}))}),3e5);return()=>clearInterval(c)}),[ee.fetchState,B.tenantId,U,b]),s.useEffect((()=>{const c=setInterval((()=>{O==="reconciliation"&&xe==null&&V.reconciliation.fetchStatus.fetchState==="Completed"&&V.reconciliation.refreshStatus.fetchState!=="In-Progress"&&b(re(U,void 0,!0,!0))}),3e5);return()=>clearInterval(c)}),[O,b,V.reconciliation.fetchStatus.fetchState,V.reconciliation.refreshStatus.fetchState,re,xe,U]);const wn=Pa(),{isFeatureEnabled:Rn}=oe(Y.isRecommendationFeedbackEnabled),ea=Lc(),{onRecommendationSelection:ta,popup:Dn}=Xc({isEnabled:Rn}),Fn=s.useMemo((()=>({...ea,onRecommendationSelection:ta})),[ea,ta]);s.useEffect((()=>{const c=(ee.monthEndCloseChecks?.monthEndCloseCheckList.find((w=>w.id==="month_end_insights"))?.isDisabled??!1)&&!Ft;O!=="month_end_insights"||!c&&ee.monthEndCloseChecks?.reportEmailSentDate==null||G("../")}),[O,ee.monthEndCloseChecks]);const _n=S===!0?l:E,Mn=S===!0||A===!0,On=S===!0?n:f,Un=S!==!0&&F;s.useEffect((()=>{Yt==="In-Progress"&&mt.accountSettingsView.saveState.fetchState==="Completed"&&b(ua())}),[Yt,mt.accountSettingsView.saveState.fetchState,ua]);const{transactionId:aa,onSaveVendor:Bn,onSaveSuccess:Vn,onCancel:jn,vendorViewDetails:zn}=(({expenseAutomationViewSelector:c,closeDrawerHandler:w,currentSelectedView:$})=>{const j=he();let Ce,fe,ae;const pt=Pa(),Fe=c.transactionView;let na=()=>{};const{transactions:Ln,selectedTransactionId:Ie,selectedTransactionLineId:We,transactionLocalData:$n}=Fe;if($==="transaction_categorization"){const ht=$n.find((me=>me.transactionId===Ie)),ne=Ln.find((me=>me.id===Ie)),sa=We!=null?ht?.transactionReviewLocalData?.lineItemById[We]:void 0,oa=sa?.account;fe=sa?.class?.classId,Ce=["Uncategorized Income","Uncategorized Expense"].includes(oa?.accountName??"")?void 0:oa?.accountId;const Nn=di(Ie,ne?.typeOfTransaction);ne!=null&&Nn&&(ae={id:Ie,type:bt(ne.typeOfTransaction)}),na=()=>{if(Ie!=null&&We!=null&&ne!=null){const me=Fe.transactionLocalData.find((He=>He.transactionId===Ie))?.transactionReviewLocalData;if(me!=null&&ne.lines!=null&&ne.lines.length>0){const He=me.lineItemById[We];let St=me.selectedEntity;if(As(ne)||(St=He.selectedEntityLine),St!=null){const qn=St,Jn={transactionId:{id:ne.id,type:ne.type},transaction:ne,lineIds:ne.lines.map((Wn=>Wn.id))??[]};j(Pt({entity:qn,amount:He.amount.amount,transactionDetails:Jn,flowType:"categorization",selectedTab:c.selectedTransactionCategorizationTab,isFetchCOT:pt}))}}}}}const Gn=_((ht=>la(ht,void 0,Ce,fe)));return{transactionId:ae,onSaveVendor:()=>{j(Es(ae,void 0,!1,!0))},onSaveSuccess:na,onCancel:()=>{ae!=null&&j(Ps({transactionId:ae})),j(ys()),j(vs()),w()},vendorViewDetails:Gn}})({expenseAutomationViewSelector:V,closeDrawerHandler:()=>{D(!1)},currentSelectedView:O});return an?.loggedInUserRoleMap==null?ee.fetchState==="Error"?T.jsx($c,{onGoHome:()=>G("../",{replace:!0}),onReload:()=>window.location.reload()}):T.jsx(Na,{fetchState:"In-Progress"}):T.jsxs(T.Fragment,{children:[T.jsx(pi,{isOpen:ot,drawerLeftMargin:new Gc(0,0,300,650),onClose:()=>{Se(!1)},children:T.jsx(Mi,{onClick:c=>c.stopPropagation(),children:T.jsx(Ei,{companyId:B.companyId,closeCustomerRequestDrawer:()=>Se(!1),addCustomerRequest:yn,resetCustomerRequest:vn})})}),aa!=null&&P&&T.jsx(ai,{isOpen:P,transactionId:aa,onSaveVendor:Bn,onSaveSuccess:Vn,onCancel:jn,vendorViewDetails:zn}),T.jsx(Nc,{toolkit:Fn,children:T.jsx(Fi,{events:[],eventCallback:(c,w,$)=>{},navigate:G,location:q,themeState:v,categoryOptions:dn,classesForFilters:mn,accountsForFilters:un,vendorSearchAutoCompleteData:{autoCompleteText:Tn,entityAutoCompleteView:rn},expenseAutomationViewSelector:V,isMissingReceiptsBulkUploadEnabled:Ae,monthEndInsightsPreviewMode:Ve,monthEndInsightsCustomerRequestData:je,isRealtimeInsightsFeatureEnabled:Ft,isCreateTransferEntryFromExpenseEnabled:Mt,isAccountingClassesEnabled:kn,isProjectsTransactionsEnabled:on,isCOTEnabled:wn,currentTenant:B,companyId:B.companyId,signedInUser:rt,isTransactionActivityEnabled:dt,isRightPanelOpen:fn,rightSidePanel:Ht,onOpenTransferRightPanel:Mt===!0?Za:void 0,uncategorizedAccounts:In,newScheduleActiveType:se,isAccrualEnabled:_t,isActualMatchingEnabled:de,newScheduleSelection:ye,onNewScheduleSelectionChange:ve,onScheduleTypeChange:Pe,onNewScheduleSaved:xn,onClickCustomerRequest:Pn,handleEditClick:bn,tenantEmailDomain:it,trackExpenseAutomationTabAnalytics:d,setActivityLogTransactionId:ct,closeMatchSidePanel:t,closeSidePanel:On,openTransactionPanel:r,closeSchedulePanel:x,openSchedulePanel:m,openMatchPanel:o,sidePanelIsOpen:Mn,sidePanelIsFullView:Un,panelContent:_n,isAiCfoAccessEnabled:J,onAskAiCfoClick:Xa,isExpenseAutomationCommentingEnabled:sn,isReconV3Enabled:cn,onExpenseAutomationCommentingThreadClick:ln,sidePanelListPercent:S===!0?66:void 0,isMatchPanelOpen:k,isSchedulePanelOpen:R,matchPanelContent:I,schedulePanelContent:g,schedulePendingDiscardConfirmation:u})}),Dn,le.showPopup&&le.popupType!=null&&T.jsx(qc,{popupType:le.popupType,currencySymbol:le.currencySymbol,accountId:le.popupAccountId??"",accountName:le.popupAccountName??"",onSubmit:le.handleSubmit,onDismiss:le.handleDismiss})]})}))))),Mi=be(yc)`
|
|
35
|
-
display: flex;
|
|
36
|
-
min-height: 100%;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
`;function Oi(){const t=Te(),{selectedTab:n,tenantEmailDomain:f}=Ue(),I=_((r=>ke(r))),k=_((r=>r.expenseAutomationViewState.selectedPeriodByTenantId[I.tenantId]));if(Wa(n)==null)return T.jsx(ja,{});const o=Ja({tenantEmailDomain:f,selectedTab:n,selectedPeriod:k!=null?`${k.month}-${k.year}`:void 0});return o==null?null:T.jsx(Qn,{to:o,replace:!0,state:t.state})}function ul(){return T.jsxs(Kn,{children:[T.jsx(Ye,{index:!0,element:T.jsx(hi,{})}),T.jsx(Ye,{path:"/:selectedTab/:selectedPeriod/*",element:T.jsx(_i,{})}),T.jsx(Ye,{path:"/:selectedTab",element:T.jsx(Oi,{})}),T.jsx(Ye,{path:"*",element:T.jsx(ja,{})})]})}export{ul as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-C_txwMxP.js";import{a as r}from"./sentry-D_60LtUS.js";import{ax as l,ay as p,o as d,a5 as f}from"./index-BqEaHxIT.js";import"./mui-DbFwPEO7.js";import m from"./NotFoundScreen-BeP62Nz9.js";import{h as u,g as b}from"./core-_lmxLuL7.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]="60a0e4fc-cea0-4b94-9a7a-0ae511272ea9",a._sentryDebugIdIdentifier="sentry-dbid-60a0e4fc-cea0-4b94-9a7a-0ae511272ea9")}catch{}})();const _=()=>{const a=u(),e=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),i=r.useCallback((()=>{(()=>{const n=f(e.state?.pathnameStackToGoBack),c=n.poppedPathname??k();a(c,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=l(e.pathname);return o!=null?s.jsx(p,{menuItem:d(o),onDemoClick:t,onGoBack:i}):s.jsx(m,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{_ as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-D_60LtUS.js";import{u as l,h as m,g as p}from"./core-_lmxLuL7.js";import{hY as f,Uv as g,Uw as _}from"./zeni-epic-state-CtlpRqoe.js";import{u as h,L as b,z as y}from"./index-BqEaHxIT.js";import"./liveblocks-C_txwMxP.js";import"./recharts-B43pV0TY.js";import"./mui-DbFwPEO7.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="12671680-e636-4380-9aa0-0e93405c9332",e._sentryDebugIdIdentifier="sentry-dbid-12671680-e636-4380-9aa0-0e93405c9332")}catch{}})();function j(){const e=l(),n=m(),o=p(),{setLoading:i,clearAllLoading:d}=h(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(b.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),u=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&u!=null){const t=JSON.parse(u);e(f(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{j as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-C_txwMxP.js";import{a as u}from"./sentry-D_60LtUS.js";import{u as O,g as _,h as w,t as M,j as l,N as L}from"./core-_lmxLuL7.js";import{z as r,E as P,G as V,U as A,j as N,W,$,a0 as G,Y as R}from"./index-BqEaHxIT.js";import{fF as Y,TT as q,Uk as B,Ub as H,gi as J,gk as K,Ug as Q,gU as X,dj as Z,Ul as ee,Um as te}from"./zeni-epic-state-CtlpRqoe.js";import{n as ne}from"./mui-DbFwPEO7.js";import{u as se}from"./useDeviceId-Dks2onQn.js";import{f as ae}from"./analyticsHelper-DhzoozKy.js";import{t as ie}from"./getLocaleForTenant-DiPOVD9Y.js";import"./recharts-B43pV0TY.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="db0d7376-f108-4e32-9b00-2ff1ae7ee50e",t._sentryDebugIdIdentifier="sentry-dbid-db0d7376-f108-4e32-9b00-2ff1ae7ee50e")}catch{}})();const T=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Te(){const t=O(),a=_(),m=w(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),h=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>Y(e))),b=l((e=>q(e))),D=r.getSignedInUser(),v=P().mode;u.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&T(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,f)))}),[n,p,t,i,f,s?.zeniSessionId]),u.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(b.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),X().then((()=>{const e=R();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin(W.Event.loginSuccess,"email",Z(o.productSettings))}),2e3))}),[I,S,y,s,o,b,v,a.state,t]);const E=u.useCallback((()=>{m("/signin/auth")}),[m]),j=u.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))}),[i,d,t,c]),F=u.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))}),[i,n,t,c,d]);if(h==="Completed"&&d!=null)return g.jsx($,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:E});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||D!=null){const e=a.state?.origin??"/";return g.jsx(L,{to:e,state:{...a.state,origin:""}})}if(!T(n,p)||f==null||h==="Error"){const e=a.state?.origin??"/",U=n!=null&&r.getLastUsedMagicLinkToken()===n;return g.jsx(L,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:U,magicLinkExpired:!U&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return g.jsx(oe,{"data-testid":"smooth-loader",children:g.jsx(G,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{Te as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-C_txwMxP.js";import{h as r,l as n}from"./core-_lmxLuL7.js";import{an as i}from"./index-BqEaHxIT.js";import"./mui-DbFwPEO7.js";import"./sentry-D_60LtUS.js";import"./zeni-epic-state-CtlpRqoe.js";import"./recharts-B43pV0TY.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="3be885cb-07f5-4896-9ae7-ddcb5a1e09f4",o._sentryDebugIdIdentifier="sentry-dbid-3be885cb-07f5-4896-9ae7-ddcb5a1e09f4")}catch{}})();const a=n(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as mt,b as lt,o as ft,j as N}from"./liveblocks-C_txwMxP.js";import ut from"./NotFoundScreen-BeP62Nz9.js";import{a as k}from"./sentry-D_60LtUS.js";import{h as ht,g as pt,i as kt,u as gt,j as b,l as bt,n as St,o as Q}from"./core-_lmxLuL7.js";import{cA as It,TX as H,fF as J,h1 as Tt,T$ as S,a0U as O,U5 as m,TV as y,An as j,G2 as Ct,a0V as At,TU as yt,U7 as Et,As as _t,a0W as F,br as $,gh as x,Aw as Y,a0X as Nt,cM as wt,cF as Bt}from"./zeni-epic-state-CtlpRqoe.js";import{ar as xt,d as Ut,c as vt,v as Dt,at as Rt,dL as Gt,p as w,dM as Pt,w as Mt,dN as Ft,i as $t,a5 as jt}from"./index-BqEaHxIT.js";import"./mui-DbFwPEO7.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-Biynu986.js";import{u as Wt}from"./useTaskManagerAccess-Cs4MVKyS.js";import"./recharts-B43pV0TY.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="81e16150-c708-4db4-923d-592a3bb2c4f2",t._sentryDebugIdIdentifier="sentry-dbid-81e16150-c708-4db4-923d-592a3bb2c4f2")}catch{}})();const Lt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),Xt=bt((function(t,l){const n=H(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=S(t),f=J(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&Et(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,T=w(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,T=w(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}d==="unread"&&t(Y("task_manager","read",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(a),t(F([a],$())));let i=`/${h}/${r[1]}`;const T=w(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!wt(g)&&(i="not-found"),r[1].startsWith("bill")&&!Bt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,s)=>{t(y(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(O(a,s));const d=`../${a}`,r=w(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(j("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="tasks"?t(Y("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t(F([i],$())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Lt(o,I).then((()=>{t(F(o,$())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=jt(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=w(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Mt(Ft)),qt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=Ut(),[I,v]=k.useState(!1),a=b((e=>H(e))),s=b((e=>J(e))),{useFeatureGate:d}=vt(),{isFeatureEnabled:r}=d(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const Z=Tt(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=b((e=>S(e).notificationDetailsByTab.tasks.fetchState)),W=b((e=>S(e).currentTab)),D=b((e=>S(e).currentSubTab)),tt=b((e=>S(e).notificationDetailsByTab.comments.fetchCountState)),R=b((e=>S(e).notificationDetailsByTab.comments.fetchState)),et=b((e=>S(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=b((e=>S(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Gt().allUsers,{inboxNotifications:B,isLoading:E,hasFetchedAll:C,isFetchingMore:G,fetchMore:ot}=mt(),{threads:L,isLoading:X,fetchMore:q,isFetchingMore:z,hasFetchedAll:K}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(W!==c&&c!=null&&o(O(c)),c==null){const e=`../${W}`,p=w(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&C===!0&&s?.companyId!=null&&B!=null){const e=`dashboard_${s.companyId}`,p=B.filter((A=>A.roomId===e&&A.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(y({unreadCount:p},"comments"))}}),[E,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(j("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const P=E||G===!0||C!==!0||E||G===!0||C!==!0;k.useEffect((()=>{P&&R!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||R!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,R]),k.useEffect((()=>{o(y({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&I===!1&&(v(!0),o(Ct()))}),[a.fetchState]),k.useEffect((()=>{if(E===!1&&X===!1&&B!=null&&L!=null){const e=`dashboard_${s.companyId}`,p=B.filter((u=>u.roomId===e)).filter((u=>Pt(u.kind))),A=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const M=L.find((dt=>{return dt.id===((U=u).kind==="thread"?U.threadId:"subjectId"in U?U.subjectId:void 0);var U}));return M!=null?{inboxNotification:{...u,threadId:M.id},thread:M}:(z||K===!0||q==null||q(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(y({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[E,G,z,C,K,X,B?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if($t(p)){const A=yt(p.mode);if(A==="dashboard"&&o(y({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),o(j("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=Wt(f);return N.jsx(Xt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function me(){return N.jsxs(St,{children:[N.jsx(Q,{path:"/:selectedTab",element:N.jsx(qt,{})}),N.jsx(Q,{path:"*",element:N.jsx(ut,{})})]})}export{me as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-C_txwMxP.js";import{a as r}from"./sentry-D_60LtUS.js";import{u as A,g as C,j as o,N as j}from"./core-_lmxLuL7.js";import{Uy as z,fF as P,gm as x,Uz as D,UA as M,UB as R,UC as L,pS as k,Td as N}from"./zeni-epic-state-CtlpRqoe.js";import{z as h,ai as I}from"./index-BqEaHxIT.js";import"./mui-DbFwPEO7.js";import"./recharts-B43pV0TY.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="89906b52-cba0-40bd-8756-6c2624df9855",n._sentryDebugIdIdentifier="sentry-dbid-89906b52-cba0-40bd-8756-6c2624df9855")}catch{}})();function ee(){const n=A(),s=C(),{params:t,error:i}=r.useMemo((()=>z(s.search)),[s.search]),w=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o((e=>P(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),b=o(D),y=o(M),c=o(R),[S,U]=r.useState(null),[v,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(L())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const _=r.useMemo((()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[m?.tenantId,l]),u=S??_;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:U,approveError:v??y,isApproving:b==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(N(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(j,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-C_txwMxP.js";import{h as Q,u as H,g as J,i as K,j as d,l as X,n as ee,o as C}from"./core-_lmxLuL7.js";import{fF as M,A8 as U,v1 as ae,Vq as w,uY as T,bq as te,b$ as se,uZ as oe,Vr as re,V8 as S,ei as ne,DW as ce,Vs as ie,Ei as le,d_ as de,dZ as me}from"./zeni-epic-state-CtlpRqoe.js";import{aj as fe,z as pe,ar as ue,at as he,Q as Fe,c as _,v as q,a9 as ge,j as V,aE as be,p as Ie}from"./index-BqEaHxIT.js";import"./mui-DbFwPEO7.js";import Ce from"./NotFoundScreen-BeP62Nz9.js";import{F as Se}from"./FeaturePreviewScreen-8gjXA436.js";import{a as F}from"./sentry-D_60LtUS.js";import{u as Te}from"./useAskAiCfoHostNavButtonProps-Biynu986.js";import{u as ye}from"./useInitialThreadRequest-CyHRajCC.js";import{t as Ae}from"./routePaths-C1I3AVBw.js";import{M as De}from"./MobileAppDrawer-fNaMEqpG.js";import"./recharts-B43pV0TY.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";import"./InboxNotificationsProvider-CvLL3Xda.js";import"./useTaskManagerAccess-Cs4MVKyS.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="8225e162-1542-4af2-b673-556d12fd8c63",s._sentryDebugIdIdentifier="sentry-dbid-8225e162-1542-4af2-b673-556d12fd8c63")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},je=X((function(s){const e=re(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:V}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(le(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ce(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=ne(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Ae(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=Ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(be);function v(){const s=fe(),e=Q(),a=H(),o=J(),{forecastId:r,tenantEmailDomain:c}=K(),[p,u]=F.useState(!1),[m,A]=F.useState(!1),g=pe.getSignedInUser(),D=d((t=>M(t))),$=D.company?.companyInfo.firstMonthOfFY??1,i=d((t=>U(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),j=d((t=>t.profitAndLossState)),x=d((t=>t.reportUIOptionsState.selectedForecast)),E=t=>j.pandLByForecastID[t]!=null&&oe(t,j).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=ue();he({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:N}=Te({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&b)u(!0),l||a(ae());else if(l&&!m){A(!0);const t=((f,R,O)=>R!=null?f.forecasts.findIndex((I=>I.id===R)):O!=null?f.forecasts.findIndex((I=>I.id===O)):f.forecasts.length>0?0:-1)(i,r,x?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=x?.index?(a(w(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!E(i.forecasts[t].id)&&b&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,U,T,b]);const k=Fe(),Y=k?.loggedInUserRole!=null&&te(k.loggedInUserRole),{useFeatureGate:G}=_(),{isFeatureEnabled:L}=G(q.isReportsCommentingEnabled),W=ye(L?D?.companyId:void 0,{clearParams:l&&m}),[Z,z]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const P=t=>{z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ge,{analytics:V,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(De,{isAppContentDrawerOpen:Z,handleDrawerToggle:P}),n.jsx(je,{firstMonthOfFY:$,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:E,meetingUrl:se(h.toString()),hasTransactionAccess:Y,isAiCfoAccessEnabled:B,onAskAiCfoClick:N,isReportsCommentingEnabled:L,initialOpenThreadRequest:W,onClickMenuIcon:()=>{P(!0)}})]})}function He(){const s=d((c=>M(c))),{useFeatureGate:e}=_(),{isFeatureEnabled:a}=e(q.isDebitCardFeatureEnabled),o=de(a,s),r=me(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{He as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-C_txwMxP.js";import{Vm as re,fF as J,l$ as G,d_ as N,dZ as le,Sd as Y,UL as de,CT as Ee,Vn as X,CI as je,D1 as Le,CX as ce,CM as pe,C$ as ve,CY as Te,Vo as ue,sl as Ve,g6 as Ae,gD as Fe,Vp as _,CQ as me,CP as ge,D4 as Re,c8 as Oe}from"./zeni-epic-state-CtlpRqoe.js";import{a2 as fe,c as q,v as H,z as W,g as Ce,N as he,ag as ye,aA as be,aB as Ze,ac as Se,F as R,ah as we,G as K,aC as Be,ar as Ue,at as $e,a9 as ze,j as De,W as _e,p as He,aD as Ge,Q as We}from"./index-BqEaHxIT.js";import{D as xe,n as M,S as Ie}from"./mui-DbFwPEO7.js";import ae from"./NotFoundScreen-BeP62Nz9.js";import{a as d}from"./sentry-D_60LtUS.js";import{u as ee,i as Ke,j as g,h as Me,g as Qe,l as Xe,n as se,o as z}from"./core-_lmxLuL7.js";import{u as Je}from"./useAskAiCfoHostNavButtonProps-Biynu986.js";import{M as Ne}from"./MobileAppDrawer-fNaMEqpG.js";import"./recharts-B43pV0TY.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";import"./InboxNotificationsProvider-CvLL3Xda.js";import"./useTaskManagerAccess-Cs4MVKyS.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]="27298e10-3567-49d1-93ad-fa5789f9d3a2",e._sentryDebugIdIdentifier="sentry-dbid-27298e10-3567-49d1-93ad-fa5789f9d3a2")}catch{}})();const Ye={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,qe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[O,Z]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=Ke(),r=g((l=>re(l))),p=g((l=>J(l))),P=g((l=>G(l))),{useFeatureGate:x}=q(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),E=N(I,p),v=le(p),T=Y(p),B=de(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,D=!E&&P&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{m(X()),b()},V=()=>{O===!0?S(!0):h()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=Ce(p,j,I),{isCardsHidden:A}=he(p?.tenantId),y=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:P,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:v,onResetClick:h,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(T))},onCloseClick:V,isLoading:D||r.person==null},o={onOkClick:()=>{S(!1),h()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{D===!1&&w!=null&&m(Ee(w))}),[D,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&h()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Ye.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:V,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Pe,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ze,{...s})]})})},ea=M(Ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,ke=M(we.H6Regular)`
|
|
6
|
-
margin-top: ${R.sp7};
|
|
7
|
-
padding-left: ${R.sp8};
|
|
8
|
-
padding-right: ${R.sp8};
|
|
9
|
-
color: ${e=>e.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,Pe=M(we.LargeRegularSp)`
|
|
12
|
-
color: ${e=>e.theme.colors.hero};
|
|
13
|
-
padding-left: ${R.sp8};
|
|
14
|
-
padding-right: ${R.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${R.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,aa={overlayWidth:new Se(100,100,48)},oe=K.getLocalizedStrings().peoplePage.invitePage,ie=K.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[O,Z]=d.useState(!1),[k,S]=d.useState(!1),w=g((o=>re(o))),r=g((o=>J(o))),p=g((o=>G(o))),{useFeatureGate:P}=q(),{isFeatureEnabled:x}=P(H.isDebitCardFeatureEnabled),I=N(x,r),E=le(r),v=Y(r),T=de(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const D=()=>{b(),m(X())},h=()=>{O===!0?S(!0):D()},V={onOkClick:()=>{S(!1),D()},onCancelClick:()=>{S(!1)}},$=c.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=P(H.isChargeCardFeatureEnabled),L=Ce(r,j,x),{isCardsHidden:A}=he(r?.tenantId),y=!L||A,F=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,onPeopleLocalDataUpdated:o=>{m(ce({peopleLocalData:o})),Z(!0)},onResetClick:D,onSaveClick:()=>{m(f==="zeni_only"?ve(e):Te())},onCloseClick:h,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:E,isLoading:U};return d.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(X()))}),[w.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:h,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Pe,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:V}):null,a.jsx(Be,{...s})]})})},ta=M(Ie)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,na=Xe((function(e,t){const c=ue(e),n=W.getSignedInUser();return{data:c,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:De}}),(function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Re(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{c("../../")},onModeChange:i=>{e(_({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(_({searchText:i}))}}}}))(Ge);function Q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const c=Me(),n=ee(),f=Qe(),{areTenantIdsInSync:i}=Ue(),b=W.getSignedInUser(),C=g((s=>J(s))),{useFeatureGate:m}=q(),{isFeatureEnabled:O}=m(H.isDebitCardFeatureEnabled),Z=g((s=>G(s))),k=!N(O,C)&&Z,S=Y(C),w=C?.tenantId,{tenantEmailDomain:r}=C,[p,P]=d.useState(!1),[x,I]=d.useState(!1),[E,v]=d.useState(!1),[T,B]=d.useState("off"),[U,D]=d.useState(!1),h=s=>{D(s)},{isAiCfoAccessEnabled:V,onAskAiCfoClick:$}=Je({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ve(s.classState,s.classListState))),L=g((s=>Ae(s.userState,s.userRoleState,s.userListViewState,"manager"))),A=g((s=>Fe(s))),y=C?.companyId;d.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(_({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),P(!0),n(me()))}),[p,b,w,n,u.uiState.mode,i]),d.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),d.useEffect((()=>{I(e!=null&&e===!0),v(t!=null&&t===!0&&t)}),[e,t]),d.useEffect((()=>{n(_({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const F=()=>{I(!1),v(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:De,onLoad:s=>s.trackPageLoaded(_e.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:F,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,E===!0?a.jsx(qe,{closeDrawerHandler:F,isEditPeopleDrawerOpen:E,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:U,handleDrawerToggle:h}),a.jsx(na,{navigate:c,signedInUser:b,isZeni:C.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(_({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=He(f.state?.pathnameStackToGoBack,f.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{h(!0)},isAiCfoAccessEnabled:V,onAskAiCfoClick:$})]})}function ka(){const e=We();return Oe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(Q,{})}),a.jsx(z,{path:"new",element:a.jsx(Q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(Q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-C_txwMxP.js";import E from"./NotFoundScreen-BeP62Nz9.js";import{a as r}from"./sentry-D_60LtUS.js";import{h as _,g as v,j as p,i as M,u as U,N as O,l as P,n as V,o as h}from"./core-_lmxLuL7.js";import{fF as z,a0Y as b,bo as F,bn as N,iL as B,gh as L}from"./zeni-epic-state-CtlpRqoe.js";import{V as Y,z as I,at as $,dO as q}from"./index-BqEaHxIT.js";import"./mui-DbFwPEO7.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-Biynu986.js";import{M as H}from"./MobileAppDrawer-fNaMEqpG.js";import"./recharts-B43pV0TY.js";import"./analytics-BLHCH9ZW.js";import"./plaid-DHbQ1Fnc.js";import"./dnd-4_dRT_p_.js";import"./stripe-cKAAJElX.js";import"./lottie-CyJj6i4R.js";import"./lexical-BibO8P7-.js";import"./pdf-BfgO0ZZE.js";import"./utils-CPbtTTqo.js";import"./InboxNotificationsProvider-CvLL3Xda.js";import"./useTaskManagerAccess-Cs4MVKyS.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]="02d9ac70-fb07-46fe-9928-9212fee328f1",e._sentryDebugIdIdentifier="sentry-dbid-02d9ac70-fb07-46fe-9928-9212fee328f1")}catch{}})();const J=P((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(q),K=()=>{const e=_(),t=v(),c=Y(),o=p((a=>z(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:m}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(B({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u(L({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${m}/dashboard`,replace:!0})};function he(){return s.jsxs(V,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
|