@mx-cartographer/experiences 8.0.0-alpha.bb2 → 8.0.0-alpha.bb4
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/CHANGELOG.md +128 -1
- package/dist/{Account-Bxw0_4FU.mjs → Account-B4CDD-zq.mjs} +1 -1
- package/dist/AccountDetailsContent-adZTkM52.mjs +683 -0
- package/dist/AccountDetailsHeader-DRjFuyJT.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-Cl4KHoSj.mjs} +14 -12
- package/dist/AccountListItem-wgmlex-_.mjs +90 -0
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-HbVblv86.mjs} +19 -8
- package/dist/{Accounts-BRf_YeTf.mjs → Accounts-CRUehOiy.mjs} +1 -1
- package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
- package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-Jv8h9H9l.mjs} +33 -33
- package/dist/{CashflowStore-D9Dpuz7X.mjs → CashflowStore-CA190BPF.mjs} +18 -25
- package/dist/{Category-CevNQ03n.mjs → Category-Ccoew_sA.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Dl006GKy.mjs} +43 -41
- package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-MUwRWH9e.mjs} +13 -11
- package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-DfVKKkRf.mjs} +4 -4
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-DVp54lUH.mjs} +49 -48
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-Dsc04-4Z.mjs} +3 -3
- package/dist/CurrencyInput-D1cjbdCI.mjs +85 -0
- package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
- package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CDPZw_-m.mjs} +3 -3
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-pL63fmdT.mjs} +3 -3
- package/dist/{Dialog-CWW597AF.mjs → Dialog-CDV0kKxj.mjs} +24 -24
- package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
- package/dist/Drawer-BF40nbsH.mjs +163 -0
- package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-QhQK4_FU.mjs} +4 -4
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/FinstrongStore-BGf36b0z.mjs +451 -0
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-C1-w3Y1E.mjs} +7 -7
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-B6dIcujh.mjs → Help-DBfsTkAi.mjs} +125 -146
- package/dist/{Help-DhcC-C05.mjs → Help-c-zHlDbv.mjs} +8 -8
- package/dist/{IconBacking-B9oC6uL2.mjs → IconBacking-DgT8DCeh.mjs} +11 -11
- package/dist/LineChart-C1PxNf7P.mjs +581 -0
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BNCWQAN_.mjs} +10 -10
- package/dist/Loader-Ckqi9Rx6.mjs +21 -0
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-8EsStyIQ.mjs} +195 -192
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +45 -0
- package/dist/MiniWidgetContainer-CKzf_Ira.mjs +56 -0
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-Bti6u-d9.mjs} +4 -4
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-B74rQVYC.mjs} +276 -273
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
- package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-2Y_3U_mg.mjs} +10 -10
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-DAncu--R.mjs} +17 -17
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-CxcSL1dY.mjs} +106 -105
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-CNFxyGB6.mjs} +80 -73
- package/dist/{ResponsiveButton-DZFp78fJ.mjs → ResponsiveButton-Cn6-R7ue.mjs} +10 -10
- package/dist/SearchBox-B7km148n.mjs +39 -0
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-BASMQSIp.mjs} +3 -3
- package/dist/{SingleSegmentDonut-BgbLgwHi.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +6 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DPQ96k3x.mjs} +19 -19
- package/dist/SpendingLegend-6FqtMcBV.mjs +193 -0
- package/dist/{StatusBar-BK_uYHAB.mjs → StatusBar-CPfSXe80.mjs} +6 -6
- package/dist/{TabContentContainer-j01JYR_7.mjs → TabContentContainer-CnMXkVqr.mjs} +8 -8
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +1336 -0
- package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-DbwAutwC.mjs} +146 -165
- package/dist/TrendsStore-_mRaFUdf.mjs +182 -0
- package/dist/{User-BQUxBeZV.mjs → User-BklmOUSd.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DAkyNRlD.mjs} +706 -729
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CDh9fjpR.mjs} +36 -36
- package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
- package/dist/accounts/index.es.js +228 -199
- package/dist/accounts/stores/AccountStore.d.ts +2 -0
- package/dist/analytics/index.es.js +27 -27
- package/dist/budgets/index.es.js +459 -462
- package/dist/cashflow/index.es.js +419 -428
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/Loader.d.ts +1 -2
- package/dist/common/components/Select.d.ts +4 -2
- package/dist/common/components/SkeletonLoader.d.ts +7 -0
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- package/dist/common/components/charts/LineChart.d.ts +12 -2
- package/dist/common/components/charts/index.d.ts +0 -3
- package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
- package/dist/common/components/charts/linechart/CustomMark.d.ts +5 -1
- package/dist/common/components/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/components/index.d.ts +0 -1
- package/dist/common/hooks/index.d.ts +0 -1
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/index.es.js +413 -674
- package/dist/common/stores/GlobalStore.d.ts +7 -1
- package/dist/common/stores/GlobalUiStore.d.ts +3 -2
- package/dist/common/types/Finstrong.d.ts +54 -0
- package/dist/common/types/Global.d.ts +1 -0
- package/dist/common/types/Widgets.d.ts +1 -0
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
- package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
- package/dist/common/utils/Theme.d.ts +1 -3
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/components/DebtsChart.d.ts +1 -2
- package/dist/debts/index.es.js +673 -665
- package/dist/exportTransactionsToCSV-BgV_wTLT.mjs +48 -0
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
- package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
- package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
- package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
- package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
- package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
- package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
- package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
- package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
- package/dist/finstrong/components/ProgressBar.d.ts +15 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
- package/dist/finstrong/components/StatusChip.d.ts +5 -0
- package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
- package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
- package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
- package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
- package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
- package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
- package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
- package/dist/finstrong/constants/index.d.ts +9 -0
- package/dist/finstrong/index.es.js +3175 -1067
- package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +580 -570
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +6 -6
- package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +537 -536
- package/dist/merchants/index.es.js +9 -9
- package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
- package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
- package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
- package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
- package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
- package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
- package/dist/microinsights/carousel/BeatList.d.ts +10 -0
- package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
- package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
- package/dist/microinsights/constants/App.d.ts +0 -1
- package/dist/microinsights/index.d.ts +3 -3
- package/dist/microinsights/index.es.js +7 -7
- package/dist/microinsights/interfaces.d.ts +0 -6
- package/dist/networth/components/NetWorthChange.d.ts +3 -1
- package/dist/networth/index.es.js +262 -254
- package/dist/notifications/index.es.js +90 -91
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
- package/dist/recurringtransactions/index.es.js +586 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
- package/dist/settings/index.es.js +371 -365
- package/dist/spending/index.es.js +267 -419
- package/dist/spending/utils/SpendingData.d.ts +2 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
- package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
- package/dist/transactions/index.es.js +231 -226
- package/dist/transactions/stores/TransactionStore.d.ts +1 -1
- package/dist/transactions/stores/UiStore.d.ts +0 -2
- package/dist/trends/index.es.js +988 -612
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CcIp09Xc.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-kNzLTWCp.mjs} +3 -3
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
- package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-B5afALev.mjs} +1 -1
- package/package.json +51 -56
- package/dist/AccountDetailsContent-CAM9y39M.mjs +0 -679
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/AccountListItem-JFMZROh7.mjs +0 -90
- package/dist/CurrencyInput-DUsQbkXb.mjs +0 -85
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
- package/dist/LineChart-D4GI7nVh.mjs +0 -541
- package/dist/Loader-DUaFpDGv.mjs +0 -24
- package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
- package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
- package/dist/SearchBox-B2_zLv8-.mjs +0 -42
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/accounts/components/AccountsWidgetContent.d.ts +0 -3
- package/dist/common/components/barchart/Bar.d.ts +0 -25
- package/dist/common/components/barchart/BarChart.d.ts +0 -34
- package/dist/common/components/barchart/BarColumn.d.ts +0 -37
- package/dist/common/components/barchart/Legend.d.ts +0 -8
- package/dist/common/components/barchart/Util.d.ts +0 -42
- package/dist/common/components/barchart/index.d.ts +0 -1
- package/dist/common/hooks/usePrevious.d.ts +0 -2
- package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
- package/dist/finstrong/utils/Finstrong.d.ts +0 -6
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
|
@@ -1,48 +1,46 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import u, {
|
|
3
|
-
import { observer as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { ChevronLeft as
|
|
8
|
-
import { L as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useTheme as
|
|
12
|
-
import { useInView as
|
|
13
|
-
import { P as
|
|
14
|
-
import
|
|
15
|
-
import { b as
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
|
|
25
|
-
import lt from "@mui/material/CardHeader";
|
|
26
|
-
const fe = {
|
|
1
|
+
import { jsx as e, jsxs as g, Fragment as xe } from "react/jsx-runtime";
|
|
2
|
+
import u, { useEffect as te, useState as ee } from "react";
|
|
3
|
+
import { observer as P } from "mobx-react-lite";
|
|
4
|
+
import k from "@mui/material/Stack";
|
|
5
|
+
import De from "@mui/material/Button";
|
|
6
|
+
import Le from "@mui/material/Typography";
|
|
7
|
+
import { BarChart as Ve, Error as ae, Campaign as Ne, ChevronLeft as He, ChevronRight as Ce } from "@mxenabled/mx-icons";
|
|
8
|
+
import { L as ke } from "./Loader-Ckqi9Rx6.mjs";
|
|
9
|
+
import Z from "@mui/material/Box";
|
|
10
|
+
import ce from "@mui/material/IconButton";
|
|
11
|
+
import { useTheme as j } from "@mui/material/styles";
|
|
12
|
+
import { useInView as me } from "react-intersection-observer";
|
|
13
|
+
import { P as Fe, CategoryIcon as Be, MerchantLogo as Ze } from "@mxenabled/mxui";
|
|
14
|
+
import { b as Pe } from "./Category-Ccoew_sA.mjs";
|
|
15
|
+
import { b as be } from "./Localization-2MODESHW.mjs";
|
|
16
|
+
import Ge from "@mui/material/CircularProgress";
|
|
17
|
+
import { makeAutoObservable as ie, runInAction as Re } from "mobx";
|
|
18
|
+
import { G as se, b as Ue, u as ze, a as Ke } from "./useCombineEvents-kNzLTWCp.mjs";
|
|
19
|
+
import { B as de } from "./BeatApi-De2IaqH2.mjs";
|
|
20
|
+
import $e from "@mui/material/Card";
|
|
21
|
+
import Ye from "@mui/material/CardActions";
|
|
22
|
+
import je from "@mui/material/CardContent";
|
|
23
|
+
import Xe from "@mui/material/CardHeader";
|
|
24
|
+
const Ee = {
|
|
27
25
|
featureVersion: "spendVsIncomeTrends"
|
|
28
26
|
};
|
|
29
|
-
class
|
|
30
|
-
copyApi = new
|
|
27
|
+
class Qe {
|
|
28
|
+
copyApi = new se("/", "");
|
|
31
29
|
copyObject = {};
|
|
32
30
|
namespace = "experiences";
|
|
33
31
|
translationKey = "micro_insights";
|
|
34
32
|
constructor() {
|
|
35
|
-
|
|
33
|
+
ie(this);
|
|
36
34
|
}
|
|
37
35
|
// NOTE: Not sure if this is special case, but other stores have this deprecation todo
|
|
38
36
|
// DEPRECATED: Initialize api in constructor and use loadCopy instead
|
|
39
37
|
// TODO: Remove this function
|
|
40
38
|
initialize = async (o, t) => {
|
|
41
|
-
this.copyApi = new
|
|
39
|
+
this.copyApi = new se(o, t), await this.loadCopy();
|
|
42
40
|
};
|
|
43
41
|
loadCopy = async () => {
|
|
44
42
|
const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
|
45
|
-
|
|
43
|
+
Re(() => {
|
|
46
44
|
this.copyObject = o[this.translationKey];
|
|
47
45
|
});
|
|
48
46
|
};
|
|
@@ -56,7 +54,7 @@ class nt {
|
|
|
56
54
|
return this.copyObject.zero_state;
|
|
57
55
|
}
|
|
58
56
|
}
|
|
59
|
-
const
|
|
57
|
+
const oe = {
|
|
60
58
|
BillAmountNotStandard: "BillAmountNotStandard",
|
|
61
59
|
CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
|
|
62
60
|
DuplicatePaymentV2: "DuplicatePaymentV2",
|
|
@@ -73,59 +71,58 @@ const he = {
|
|
|
73
71
|
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
|
74
72
|
MonthlySpendComparison: "MonthlySpendComparison",
|
|
75
73
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
76
|
-
},
|
|
74
|
+
}, y = window?.app?.clientConfig?.microwidget_instance_id || "", he = {
|
|
77
75
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
78
|
-
},
|
|
76
|
+
}, ge = (i) => `on${i}Click`, Ie = (i) => `on${i}View`, ve = (i) => `on${i}ViewFirstTime`, le = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), qe = () => Object.values(oe).reduce(
|
|
79
77
|
(i, o) => ({
|
|
80
78
|
...i,
|
|
81
|
-
[
|
|
82
|
-
action:
|
|
83
|
-
category:
|
|
84
|
-
label:
|
|
85
|
-
value:
|
|
79
|
+
[ge(o)]: {
|
|
80
|
+
action: L.MICRO_BEAT_CLICKED,
|
|
81
|
+
category: D.BEAT_INTERACTION,
|
|
82
|
+
label: le(o),
|
|
83
|
+
value: y
|
|
86
84
|
}
|
|
87
85
|
}),
|
|
88
86
|
{}
|
|
89
|
-
),
|
|
87
|
+
), Je = () => Object.values(oe).reduce(
|
|
90
88
|
(i, o) => ({
|
|
91
89
|
...i,
|
|
92
|
-
[
|
|
93
|
-
action:
|
|
94
|
-
category:
|
|
95
|
-
label:
|
|
96
|
-
value:
|
|
90
|
+
[Ie(o)]: {
|
|
91
|
+
action: L.MICRO_BEAT_DISPLAYED,
|
|
92
|
+
category: D.BEAT_INTERACTION,
|
|
93
|
+
label: le(o),
|
|
94
|
+
value: y
|
|
97
95
|
}
|
|
98
96
|
}),
|
|
99
97
|
{}
|
|
100
|
-
),
|
|
98
|
+
), et = () => Object.values(oe).reduce(
|
|
101
99
|
(i, o) => ({
|
|
102
100
|
...i,
|
|
103
|
-
[
|
|
104
|
-
action:
|
|
105
|
-
category:
|
|
106
|
-
label:
|
|
107
|
-
value:
|
|
101
|
+
[ve(o)]: {
|
|
102
|
+
action: L.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
103
|
+
category: D.BEAT_INTERACTION,
|
|
104
|
+
label: le(o),
|
|
105
|
+
value: y
|
|
108
106
|
}
|
|
109
107
|
}),
|
|
110
108
|
{}
|
|
111
|
-
),
|
|
112
|
-
CARD: "Card",
|
|
109
|
+
), x = {
|
|
113
110
|
CAROUSEL_CONTROL: "Carousel Control",
|
|
114
111
|
MICRO_WIDGET: "Micro Widget",
|
|
115
112
|
VIEW_MORE: "View More"
|
|
116
|
-
},
|
|
113
|
+
}, D = {
|
|
117
114
|
MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
|
|
118
115
|
BEAT_INTERACTION: "Beat Interaction"
|
|
119
|
-
},
|
|
116
|
+
}, S = {
|
|
120
117
|
ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
|
|
121
118
|
ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
|
|
122
119
|
ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
|
|
123
120
|
ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
|
|
124
121
|
ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
|
|
125
122
|
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
|
126
|
-
},
|
|
123
|
+
}, ye = {
|
|
127
124
|
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
|
128
|
-
},
|
|
125
|
+
}, L = {
|
|
129
126
|
CONTROL_BACKWARD: "Control Backward",
|
|
130
127
|
CONTROL_FORWARD: "Control Forward",
|
|
131
128
|
MICRO_BEAT_CLICKED: "Micro Beat Clicked",
|
|
@@ -137,91 +134,91 @@ const he = {
|
|
|
137
134
|
MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
|
|
138
135
|
MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
|
|
139
136
|
MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
|
|
140
|
-
},
|
|
137
|
+
}, ue = {
|
|
141
138
|
[H.MICRO_WIDGET_CAROUSEL]: {
|
|
142
|
-
label:
|
|
139
|
+
label: x.MICRO_WIDGET,
|
|
143
140
|
name: H.MICRO_WIDGET_CAROUSEL,
|
|
144
|
-
path:
|
|
145
|
-
value:
|
|
141
|
+
path: he.INSIGHTS_MICRO_WIDGET,
|
|
142
|
+
value: y
|
|
146
143
|
},
|
|
147
144
|
// zero state
|
|
148
145
|
[H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
|
149
|
-
label:
|
|
146
|
+
label: x.MICRO_WIDGET,
|
|
150
147
|
name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
|
151
|
-
path:
|
|
152
|
-
value:
|
|
148
|
+
path: he.INSIGHTS_MICRO_WIDGET,
|
|
149
|
+
value: y
|
|
153
150
|
},
|
|
154
151
|
// no relevant cards
|
|
155
152
|
[H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
|
156
|
-
label:
|
|
153
|
+
label: x.MICRO_WIDGET,
|
|
157
154
|
name: H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
|
158
155
|
path: "/micro-widget",
|
|
159
|
-
value:
|
|
156
|
+
value: y
|
|
160
157
|
}
|
|
161
|
-
},
|
|
158
|
+
}, pe = {
|
|
162
159
|
// carousel control interaction events - clicks and swipes
|
|
163
|
-
[
|
|
164
|
-
action:
|
|
165
|
-
category:
|
|
166
|
-
label:
|
|
167
|
-
value:
|
|
160
|
+
[S.ON_CAROUSEL_BACK_CLICK]: {
|
|
161
|
+
action: L.CONTROL_BACKWARD,
|
|
162
|
+
category: D.MICRO_WIDGET_INTERACTION,
|
|
163
|
+
label: x.CAROUSEL_CONTROL,
|
|
164
|
+
value: y
|
|
168
165
|
},
|
|
169
|
-
[
|
|
170
|
-
action:
|
|
171
|
-
category:
|
|
172
|
-
label:
|
|
173
|
-
value:
|
|
166
|
+
[S.ON_CAROUSEL_FORWARD_CLICK]: {
|
|
167
|
+
action: L.CONTROL_FORWARD,
|
|
168
|
+
category: D.MICRO_WIDGET_INTERACTION,
|
|
169
|
+
label: x.CAROUSEL_CONTROL,
|
|
170
|
+
value: y
|
|
174
171
|
},
|
|
175
|
-
[
|
|
176
|
-
action:
|
|
177
|
-
category:
|
|
178
|
-
label:
|
|
179
|
-
value:
|
|
172
|
+
[S.ON_CAROUSEL_BACK_SWIPE]: {
|
|
173
|
+
action: L.SWIPE_BACKWARD,
|
|
174
|
+
category: D.MICRO_WIDGET_INTERACTION,
|
|
175
|
+
label: x.CAROUSEL_CONTROL,
|
|
176
|
+
value: y
|
|
180
177
|
},
|
|
181
|
-
[
|
|
182
|
-
action:
|
|
183
|
-
category:
|
|
184
|
-
label:
|
|
185
|
-
value:
|
|
178
|
+
[S.ON_CAROUSEL_FORWARD_SWIPE]: {
|
|
179
|
+
action: L.SWIPE_FORWARD,
|
|
180
|
+
category: D.MICRO_WIDGET_INTERACTION,
|
|
181
|
+
label: x.CAROUSEL_CONTROL,
|
|
182
|
+
value: y
|
|
186
183
|
},
|
|
187
184
|
// read more card events
|
|
188
|
-
[
|
|
189
|
-
action:
|
|
190
|
-
category:
|
|
191
|
-
label:
|
|
192
|
-
value:
|
|
185
|
+
[S.ON_VIEW_MORE_CLICKED]: {
|
|
186
|
+
action: L.MICRO_BEAT_CLICKED,
|
|
187
|
+
category: D.BEAT_INTERACTION,
|
|
188
|
+
label: x.VIEW_MORE,
|
|
189
|
+
value: y
|
|
193
190
|
},
|
|
194
|
-
[
|
|
195
|
-
action:
|
|
196
|
-
category:
|
|
197
|
-
label:
|
|
198
|
-
value:
|
|
191
|
+
[ye.ON_VIEW_MORE_VIEWED]: {
|
|
192
|
+
action: L.MICRO_BEAT_DISPLAYED,
|
|
193
|
+
category: D.BEAT_INTERACTION,
|
|
194
|
+
label: x.VIEW_MORE,
|
|
195
|
+
value: y
|
|
199
196
|
},
|
|
200
|
-
...
|
|
201
|
-
...
|
|
202
|
-
...
|
|
203
|
-
},
|
|
197
|
+
...qe(),
|
|
198
|
+
...Je(),
|
|
199
|
+
...et()
|
|
200
|
+
}, _e = async (i, o) => !o || !pe[i] ? null : o.sendAnalyticEvent(pe[i]).then((t) => t).catch((t) => {
|
|
204
201
|
throw t;
|
|
205
|
-
}),
|
|
202
|
+
}), fe = async (i, o) => !o || !ue[i] ? null : o.sendAnalyticsPageview(ue[i]).then((t) => t).catch((t) => {
|
|
206
203
|
throw t;
|
|
207
204
|
});
|
|
208
|
-
class
|
|
209
|
-
onAnalyticEvent =
|
|
210
|
-
onAnalyticPageView =
|
|
211
|
-
beatApi = new
|
|
205
|
+
class tt {
|
|
206
|
+
onAnalyticEvent = _e;
|
|
207
|
+
onAnalyticPageView = fe;
|
|
208
|
+
beatApi = new de("/", "");
|
|
212
209
|
constructor() {
|
|
213
|
-
|
|
210
|
+
ie(this);
|
|
214
211
|
}
|
|
215
|
-
initialize = async (o, t,
|
|
216
|
-
this.onAnalyticEvent = (n,
|
|
217
|
-
|
|
218
|
-
throw a.status === 401 &&
|
|
212
|
+
initialize = async (o, t, l) => {
|
|
213
|
+
this.onAnalyticEvent = (n, r) => {
|
|
214
|
+
_e(n, r).then((a) => a).catch((a) => {
|
|
215
|
+
throw a.status === 401 && l(), a;
|
|
219
216
|
});
|
|
220
|
-
}, this.onAnalyticPageView = (n,
|
|
221
|
-
|
|
222
|
-
throw a.status === 401 &&
|
|
217
|
+
}, this.onAnalyticPageView = (n, r) => {
|
|
218
|
+
fe(n, r).then((a) => a).catch((a) => {
|
|
219
|
+
throw a.status === 401 && l(), a;
|
|
223
220
|
});
|
|
224
|
-
}, this.beatApi = new
|
|
221
|
+
}, this.beatApi = new de(o, t);
|
|
225
222
|
};
|
|
226
223
|
updateBeat = async (o) => {
|
|
227
224
|
this.beatApi.updateBeat(o);
|
|
@@ -230,7 +227,7 @@ class dt {
|
|
|
230
227
|
this.beatApi.updateOffer(o);
|
|
231
228
|
};
|
|
232
229
|
}
|
|
233
|
-
class
|
|
230
|
+
class it {
|
|
234
231
|
copyStore;
|
|
235
232
|
endpoint = "/";
|
|
236
233
|
insightsMicroWidgetStore;
|
|
@@ -238,196 +235,188 @@ class ht {
|
|
|
238
235
|
token = "";
|
|
239
236
|
isInitialized = !1;
|
|
240
237
|
constructor() {
|
|
241
|
-
this.copyStore = new
|
|
238
|
+
this.copyStore = new Qe(), this.insightsMicroWidgetStore = new tt(), ie(this);
|
|
242
239
|
}
|
|
243
|
-
initialize = async (o, t,
|
|
244
|
-
await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t,
|
|
245
|
-
const n = await
|
|
246
|
-
|
|
240
|
+
initialize = async (o, t, l) => {
|
|
241
|
+
await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, l);
|
|
242
|
+
const n = await Ue(o, t, "1.0.0", "Micro Insights Carousel");
|
|
243
|
+
Re(() => {
|
|
247
244
|
this.session = n, this.isInitialized = !0;
|
|
248
245
|
});
|
|
249
246
|
};
|
|
250
247
|
}
|
|
251
|
-
const
|
|
248
|
+
const U = u.createContext(null), ot = ({
|
|
252
249
|
onEvent: i,
|
|
253
250
|
onPageview: o,
|
|
254
251
|
store: t,
|
|
255
|
-
children:
|
|
256
|
-
}) => /* @__PURE__ */ e(
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
{
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
);
|
|
301
|
-
return /* @__PURE__ */ e(
|
|
302
|
-
U,
|
|
303
|
-
{
|
|
304
|
-
"aria-hidden": !d,
|
|
305
|
-
"aria-label": t,
|
|
306
|
-
"aria-labelledby": "divButton",
|
|
307
|
-
"aria-roledescription": "slide",
|
|
308
|
-
ref: R,
|
|
309
|
-
role: "group",
|
|
310
|
-
sx: {
|
|
311
|
-
height: "100%",
|
|
312
|
-
minWidth: E ? `${E}px` : "100%",
|
|
313
|
-
fontFamily: I.typography.fontFamily
|
|
314
|
-
},
|
|
315
|
-
children: /* @__PURE__ */ e(
|
|
316
|
-
U,
|
|
317
|
-
{
|
|
318
|
-
"aria-hidden": !d,
|
|
319
|
-
"aria-label": t,
|
|
320
|
-
id: "divButton",
|
|
321
|
-
onClick: () => _(),
|
|
322
|
-
onKeyDown: () => O(!1),
|
|
323
|
-
onKeyUp: () => O(!0),
|
|
324
|
-
ref: R,
|
|
325
|
-
role: "button",
|
|
326
|
-
sx: {
|
|
327
|
-
border: x ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
|
|
328
|
-
borderRadius: "8px",
|
|
329
|
-
height: "100%"
|
|
330
|
-
},
|
|
331
|
-
tabIndex: d ? 0 : -1,
|
|
332
|
-
children: /* @__PURE__ */ e(
|
|
333
|
-
it,
|
|
334
|
-
{
|
|
335
|
-
"aria-roledescription": "slide",
|
|
336
|
-
className: "mx-micro-card",
|
|
337
|
-
role: "group",
|
|
338
|
-
sx: {
|
|
339
|
-
backgroundColor: r,
|
|
340
|
-
boxSizing: "border-box",
|
|
341
|
-
cursor: "pointer",
|
|
342
|
-
height: l ? "100%" : 124,
|
|
343
|
-
p: 16,
|
|
344
|
-
...z,
|
|
345
|
-
"& .MuiCardHeader-avatar": {
|
|
346
|
-
color: h.iconColor,
|
|
347
|
-
mr: "8px"
|
|
348
|
-
}
|
|
349
|
-
},
|
|
350
|
-
variant: c,
|
|
351
|
-
children: /* @__PURE__ */ v(
|
|
352
|
-
K,
|
|
353
|
-
{
|
|
354
|
-
sx: {
|
|
355
|
-
alignItems: "space-between",
|
|
356
|
-
height: "100%"
|
|
357
|
-
},
|
|
358
|
-
children: [
|
|
359
|
-
/* @__PURE__ */ e(
|
|
360
|
-
lt,
|
|
361
|
-
{
|
|
362
|
-
avatar: C && a,
|
|
363
|
-
subheader: p && g,
|
|
364
|
-
sx: { color: h.headerColor, p: 0 },
|
|
365
|
-
title: m,
|
|
366
|
-
titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
|
|
367
|
-
}
|
|
368
|
-
),
|
|
369
|
-
/* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !p && g }),
|
|
370
|
-
!!o && /* @__PURE__ */ e(
|
|
371
|
-
ot,
|
|
372
|
-
{
|
|
373
|
-
sx: {
|
|
374
|
-
mt: "auto",
|
|
375
|
-
p: 0
|
|
376
|
-
},
|
|
377
|
-
children: /* @__PURE__ */ e(
|
|
378
|
-
U,
|
|
379
|
-
{
|
|
380
|
-
sx: (D) => ({
|
|
381
|
-
color: h.buttonColor ? h.buttonColor : D.palette.primary.main,
|
|
382
|
-
fontSize: 14,
|
|
383
|
-
fontWeight: "bold",
|
|
384
|
-
px: 28,
|
|
385
|
-
fontFamily: D.typography.fontFamily,
|
|
386
|
-
...F
|
|
387
|
-
}),
|
|
388
|
-
children: o
|
|
389
|
-
}
|
|
390
|
-
)
|
|
391
|
-
}
|
|
392
|
-
)
|
|
393
|
-
]
|
|
394
|
-
}
|
|
395
|
-
)
|
|
396
|
-
}
|
|
397
|
-
)
|
|
398
|
-
}
|
|
399
|
-
)
|
|
400
|
-
}
|
|
401
|
-
);
|
|
402
|
-
}
|
|
403
|
-
), ut = ({ beat: i }) => {
|
|
404
|
-
const [o, t] = te(je.UNCATEGORIZED);
|
|
405
|
-
return oe(() => {
|
|
406
|
-
i.primary_category_guid ? t(i.primary_category_guid) : i.category_guids?.length && t(i.category_guids[0]);
|
|
407
|
-
}, []), /* @__PURE__ */ e($e, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
|
|
408
|
-
}, pt = ({ beat: i }) => {
|
|
409
|
-
const o = Ae(), t = _t(o);
|
|
252
|
+
children: l
|
|
253
|
+
}) => /* @__PURE__ */ e(U.Provider, { value: { onEvent: i, onPageview: o, store: t, children: l }, children: l }), X = u.forwardRef(function({
|
|
254
|
+
actionText: o,
|
|
255
|
+
ariaLabel: t,
|
|
256
|
+
backgroundColor: l,
|
|
257
|
+
description: n,
|
|
258
|
+
heightOverrides: r,
|
|
259
|
+
icon: a,
|
|
260
|
+
isActiveCard: s,
|
|
261
|
+
isZeroState: h,
|
|
262
|
+
onCardClick: f = () => {
|
|
263
|
+
},
|
|
264
|
+
showIcon: p,
|
|
265
|
+
style: d = {},
|
|
266
|
+
title: E,
|
|
267
|
+
variant: c,
|
|
268
|
+
widthOverrides: C
|
|
269
|
+
}, _) {
|
|
270
|
+
const R = j(), [O, I] = u.useState(!1), { cardStyle: m, linkTextStyle: T } = d, v = c ? m : { border: "none", boxShadow: "none", ...m }, M = /* @__PURE__ */ e(
|
|
271
|
+
Fe,
|
|
272
|
+
{
|
|
273
|
+
className: "mx-micro-card-description",
|
|
274
|
+
color: "text.primary",
|
|
275
|
+
sx: {
|
|
276
|
+
display: "-webkit-box",
|
|
277
|
+
fontSize: 13,
|
|
278
|
+
letterSpacing: 0.48,
|
|
279
|
+
lineHeight: "20px",
|
|
280
|
+
overflow: "hidden",
|
|
281
|
+
pl: h ? 0 : 28,
|
|
282
|
+
pr: h ? 0 : 8,
|
|
283
|
+
WebkitBoxOrient: "vertical",
|
|
284
|
+
WebkitLineClamp: 2,
|
|
285
|
+
wordWrap: "break-word"
|
|
286
|
+
},
|
|
287
|
+
children: n && /* @__PURE__ */ e(
|
|
288
|
+
"span",
|
|
289
|
+
{
|
|
290
|
+
dangerouslySetInnerHTML: { __html: n },
|
|
291
|
+
style: { fontFamily: R.typography.fontFamily }
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
}
|
|
295
|
+
);
|
|
410
296
|
return /* @__PURE__ */ e(
|
|
411
|
-
|
|
297
|
+
Z,
|
|
412
298
|
{
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
299
|
+
"aria-hidden": !s,
|
|
300
|
+
"aria-label": t,
|
|
301
|
+
"aria-labelledby": "divButton",
|
|
302
|
+
"aria-roledescription": "slide",
|
|
303
|
+
ref: _,
|
|
304
|
+
role: "group",
|
|
305
|
+
sx: {
|
|
306
|
+
height: "100%",
|
|
307
|
+
minWidth: C ? `${C}px` : "100%",
|
|
308
|
+
fontFamily: R.typography.fontFamily
|
|
309
|
+
},
|
|
310
|
+
children: /* @__PURE__ */ e(
|
|
311
|
+
Z,
|
|
312
|
+
{
|
|
313
|
+
"aria-hidden": !s,
|
|
314
|
+
"aria-label": t,
|
|
315
|
+
id: "divButton",
|
|
316
|
+
onClick: () => f(),
|
|
317
|
+
onKeyDown: () => I(!1),
|
|
318
|
+
onKeyUp: () => I(!0),
|
|
319
|
+
ref: _,
|
|
320
|
+
role: "button",
|
|
321
|
+
sx: {
|
|
322
|
+
border: O ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
|
|
323
|
+
borderRadius: "8px",
|
|
324
|
+
height: "100%"
|
|
325
|
+
},
|
|
326
|
+
tabIndex: s ? 0 : -1,
|
|
327
|
+
children: /* @__PURE__ */ e(
|
|
328
|
+
$e,
|
|
329
|
+
{
|
|
330
|
+
"aria-roledescription": "slide",
|
|
331
|
+
className: "mx-micro-card",
|
|
332
|
+
role: "group",
|
|
333
|
+
sx: {
|
|
334
|
+
backgroundColor: l,
|
|
335
|
+
boxSizing: "border-box",
|
|
336
|
+
cursor: "pointer",
|
|
337
|
+
height: r ? "100%" : 124,
|
|
338
|
+
p: 16,
|
|
339
|
+
...v,
|
|
340
|
+
"& .MuiCardHeader-avatar": {
|
|
341
|
+
mr: "8px"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
variant: c,
|
|
345
|
+
children: /* @__PURE__ */ g(
|
|
346
|
+
k,
|
|
347
|
+
{
|
|
348
|
+
sx: {
|
|
349
|
+
alignItems: "space-between",
|
|
350
|
+
height: "100%"
|
|
351
|
+
},
|
|
352
|
+
children: [
|
|
353
|
+
/* @__PURE__ */ e(
|
|
354
|
+
Xe,
|
|
355
|
+
{
|
|
356
|
+
avatar: p && a,
|
|
357
|
+
subheader: h && M,
|
|
358
|
+
sx: { p: 0 },
|
|
359
|
+
title: E,
|
|
360
|
+
titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
|
|
361
|
+
}
|
|
362
|
+
),
|
|
363
|
+
/* @__PURE__ */ e(je, { sx: { p: 0 }, children: !h && M }),
|
|
364
|
+
!!o && /* @__PURE__ */ e(
|
|
365
|
+
Ye,
|
|
366
|
+
{
|
|
367
|
+
sx: {
|
|
368
|
+
mt: "auto",
|
|
369
|
+
p: 0
|
|
370
|
+
},
|
|
371
|
+
children: /* @__PURE__ */ e(
|
|
372
|
+
Z,
|
|
373
|
+
{
|
|
374
|
+
sx: (W) => ({
|
|
375
|
+
color: W.palette.primary.main,
|
|
376
|
+
fontSize: 14,
|
|
377
|
+
fontWeight: "bold",
|
|
378
|
+
px: 28,
|
|
379
|
+
fontFamily: W.typography.fontFamily,
|
|
380
|
+
...T
|
|
381
|
+
}),
|
|
382
|
+
children: o
|
|
383
|
+
}
|
|
384
|
+
)
|
|
385
|
+
}
|
|
386
|
+
)
|
|
387
|
+
]
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
}
|
|
391
|
+
)
|
|
392
|
+
}
|
|
393
|
+
)
|
|
417
394
|
}
|
|
418
395
|
);
|
|
419
|
-
},
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}
|
|
424
|
-
|
|
396
|
+
}), lt = ({ beat: i }) => {
|
|
397
|
+
const { primary_category_guid: o, category_guids: t } = i, l = o || t?.[0] || Pe.UNCATEGORIZED;
|
|
398
|
+
return /* @__PURE__ */ e(Be, { categoryGuid: l, size: 16, sx: { minWidth: 16 } });
|
|
399
|
+
}, nt = ({ beat: i }) => {
|
|
400
|
+
const { category_guids: o, merchant_guids: t, primary_category_guid: l, primary_merchant_guid: n } = i;
|
|
401
|
+
return /* @__PURE__ */ e(
|
|
402
|
+
Ze,
|
|
403
|
+
{
|
|
404
|
+
categoryGuid: l || o && o[0] || "",
|
|
405
|
+
merchantGuid: n || t[0],
|
|
406
|
+
size: 16,
|
|
407
|
+
sx: {
|
|
408
|
+
display: "flex",
|
|
409
|
+
mt: 2
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
);
|
|
413
|
+
}, rt = ({
|
|
425
414
|
color: i = "currentColor",
|
|
426
415
|
height: o,
|
|
427
416
|
size: t = 16,
|
|
428
|
-
styles:
|
|
417
|
+
styles: l,
|
|
429
418
|
viewBox: n = "0 0 16 16",
|
|
430
|
-
width:
|
|
419
|
+
width: r
|
|
431
420
|
}) => /* @__PURE__ */ e(
|
|
432
421
|
"svg",
|
|
433
422
|
{
|
|
@@ -435,9 +424,9 @@ const $ = u.createContext(null), Et = ({
|
|
|
435
424
|
className: "kyper-icon",
|
|
436
425
|
focusable: !1,
|
|
437
426
|
height: o || t,
|
|
438
|
-
style:
|
|
427
|
+
style: l,
|
|
439
428
|
viewBox: n,
|
|
440
|
-
width:
|
|
429
|
+
width: r || t,
|
|
441
430
|
xmlns: "http://www.w3.org/2000/svg",
|
|
442
431
|
children: /* @__PURE__ */ e(
|
|
443
432
|
"path",
|
|
@@ -447,18 +436,18 @@ const $ = u.createContext(null), Et = ({
|
|
|
447
436
|
}
|
|
448
437
|
)
|
|
449
438
|
}
|
|
450
|
-
),
|
|
439
|
+
), at = (i) => i ? i.data ? i.data.map((o) => {
|
|
451
440
|
const t = {};
|
|
452
|
-
return i.names?.map((
|
|
453
|
-
t[
|
|
441
|
+
return i.names?.map((l, n) => {
|
|
442
|
+
t[l] = o[n];
|
|
454
443
|
}), t;
|
|
455
|
-
}) : [] : [],
|
|
456
|
-
const t =
|
|
457
|
-
return !n.length || !
|
|
458
|
-
},
|
|
459
|
-
const o =
|
|
460
|
-
return /* @__PURE__ */ e(
|
|
461
|
-
},
|
|
444
|
+
}) : [] : [], ct = (i, o) => {
|
|
445
|
+
const t = at(i), l = t.length / 2, n = t.slice(0, l), r = t.slice(l);
|
|
446
|
+
return !n.length || !r.length ? o.palette.primary.main : n[0].amount > r[0].amount ? o.palette.error.main : n[0].amount < r[0].amount ? o.palette.success.main : o.palette.primary.main;
|
|
447
|
+
}, st = ({ beat: i }) => {
|
|
448
|
+
const o = j(), t = ct(i.data_series, o);
|
|
449
|
+
return /* @__PURE__ */ e(Ve, { sx: { color: t } });
|
|
450
|
+
}, Se = () => /* @__PURE__ */ g("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
462
451
|
/* @__PURE__ */ e(
|
|
463
452
|
"path",
|
|
464
453
|
{
|
|
@@ -702,7 +691,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
702
691
|
fillRule: "evenodd"
|
|
703
692
|
}
|
|
704
693
|
),
|
|
705
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ g("g", { filter: "url(#filter0_d_1565_98011)", children: [
|
|
706
695
|
/* @__PURE__ */ e("mask", { height: "22", id: "mask1_1565_98011", maskUnits: "userSpaceOnUse", width: "17", x: "16", y: "12", children: /* @__PURE__ */ e(
|
|
707
696
|
"path",
|
|
708
697
|
{
|
|
@@ -958,10 +947,10 @@ const $ = u.createContext(null), Et = ({
|
|
|
958
947
|
),
|
|
959
948
|
/* @__PURE__ */ e("path", { d: "M17.9668 31.5737H19.4947", stroke: "#E4E8EE", strokeWidth: "0.264005" })
|
|
960
949
|
] }),
|
|
961
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ g("g", { filter: "url(#filter1_d_1565_98011)", children: [
|
|
962
951
|
/* @__PURE__ */ e("circle", { cx: "15.0441", cy: "16.0441", fill: "#CDD3DD", r: "15.0441" }),
|
|
963
952
|
/* @__PURE__ */ e("mask", { height: "30", id: "mask2_1565_98011", maskUnits: "userSpaceOnUse", width: "30", x: "0", y: "1", children: /* @__PURE__ */ e("circle", { cx: "15.0435", cy: "16.0445", fill: "#F8F9FB", r: "14.3951" }) }),
|
|
964
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ g("g", { mask: "url(#mask2_1565_98011)", children: [
|
|
965
954
|
/* @__PURE__ */ e("rect", { fill: "white", height: "31.1359", transform: "translate(0 0.162598)", width: "31.0101" }),
|
|
966
955
|
/* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "4.52002" }),
|
|
967
956
|
/* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "17.1758" }),
|
|
@@ -1151,8 +1140,8 @@ const $ = u.createContext(null), Et = ({
|
|
|
1151
1140
|
fill: "#CDD3DD"
|
|
1152
1141
|
}
|
|
1153
1142
|
),
|
|
1154
|
-
/* @__PURE__ */
|
|
1155
|
-
/* @__PURE__ */
|
|
1143
|
+
/* @__PURE__ */ g("defs", { children: [
|
|
1144
|
+
/* @__PURE__ */ g(
|
|
1156
1145
|
"filter",
|
|
1157
1146
|
{
|
|
1158
1147
|
colorInterpolationFilters: "sRGB",
|
|
@@ -1195,7 +1184,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1195
1184
|
]
|
|
1196
1185
|
}
|
|
1197
1186
|
),
|
|
1198
|
-
/* @__PURE__ */
|
|
1187
|
+
/* @__PURE__ */ g(
|
|
1199
1188
|
"filter",
|
|
1200
1189
|
{
|
|
1201
1190
|
colorInterpolationFilters: "sRGB",
|
|
@@ -1239,145 +1228,133 @@ const $ = u.createContext(null), Et = ({
|
|
|
1239
1228
|
}
|
|
1240
1229
|
)
|
|
1241
1230
|
] })
|
|
1242
|
-
] }),
|
|
1243
|
-
const
|
|
1244
|
-
return
|
|
1245
|
-
|
|
1231
|
+
] }), dt = ({ beat: i }) => {
|
|
1232
|
+
const { icon_type: o, icon_color: t } = i;
|
|
1233
|
+
return o === 0 ? /* @__PURE__ */ e(ae, { filled: !0, sx: { color: (l) => t || l.palette.primary.main } }) : o === 1 ? /* @__PURE__ */ e(lt, { beat: i }) : o === 2 ? /* @__PURE__ */ e(nt, { beat: i }) : o === 3 ? /* @__PURE__ */ e(st, { beat: i }) : o === 5 ? /* @__PURE__ */ e(Ne, {}) : /* @__PURE__ */ e(
|
|
1234
|
+
ae,
|
|
1246
1235
|
{
|
|
1247
|
-
|
|
1248
|
-
name: "info",
|
|
1236
|
+
filled: !0,
|
|
1249
1237
|
sx: {
|
|
1250
|
-
color: l
|
|
1238
|
+
color: (l) => l.palette.primary.main
|
|
1251
1239
|
}
|
|
1252
1240
|
}
|
|
1253
1241
|
);
|
|
1254
|
-
},
|
|
1255
|
-
const i = u.useContext(
|
|
1242
|
+
}, V = () => {
|
|
1243
|
+
const i = u.useContext(U);
|
|
1256
1244
|
if (!i)
|
|
1257
1245
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
1258
1246
|
return i.store.copyStore;
|
|
1259
|
-
},
|
|
1260
|
-
const i = u.useContext(
|
|
1247
|
+
}, Et = () => {
|
|
1248
|
+
const i = u.useContext(U);
|
|
1261
1249
|
if (!i?.store?.insightsMicroWidgetStore)
|
|
1262
1250
|
throw new Error(
|
|
1263
1251
|
"useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
|
|
1264
1252
|
);
|
|
1265
1253
|
return i.store.insightsMicroWidgetStore;
|
|
1266
|
-
},
|
|
1267
|
-
const i = u.useContext(
|
|
1254
|
+
}, z = () => {
|
|
1255
|
+
const i = u.useContext(U);
|
|
1268
1256
|
if (!i)
|
|
1269
1257
|
throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
|
|
1270
1258
|
return { onEvent: i.onEvent };
|
|
1271
|
-
},
|
|
1272
|
-
const i = u.useContext(
|
|
1259
|
+
}, Me = () => {
|
|
1260
|
+
const i = u.useContext(U);
|
|
1273
1261
|
if (!i)
|
|
1274
1262
|
throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
|
|
1275
1263
|
return { onPageview: i.onPageview };
|
|
1276
|
-
},
|
|
1264
|
+
}, ht = {
|
|
1277
1265
|
LARGE: 180,
|
|
1278
1266
|
STANDARD: 154,
|
|
1279
1267
|
XLARGE: 200,
|
|
1280
1268
|
XXLARGE: 248
|
|
1281
|
-
},
|
|
1269
|
+
}, ut = 50, Ae = 1, pt = ({
|
|
1282
1270
|
ariaLabel: i,
|
|
1283
1271
|
backgroundColor: o,
|
|
1284
1272
|
beat: t,
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
widthOverrides: h
|
|
1273
|
+
showCTAColocatedWithText: l = !0,
|
|
1274
|
+
heightOverrides: n,
|
|
1275
|
+
index: r,
|
|
1276
|
+
isActiveCard: a,
|
|
1277
|
+
onCardClick: s,
|
|
1278
|
+
posthog: h,
|
|
1279
|
+
showIcon: f,
|
|
1280
|
+
variant: p,
|
|
1281
|
+
widthOverrides: d
|
|
1295
1282
|
}) => {
|
|
1296
|
-
const { ref:
|
|
1297
|
-
threshold:
|
|
1298
|
-
}), { cardsCopy:
|
|
1299
|
-
|
|
1300
|
-
c && (t.has_been_displayed ?
|
|
1283
|
+
const { ref: E, inView: c } = me({
|
|
1284
|
+
threshold: Ae
|
|
1285
|
+
}), { cardsCopy: C } = V(), { onEvent: _ } = z(), { updateBeat: R, updateOffer: O } = Et();
|
|
1286
|
+
te(() => {
|
|
1287
|
+
c && (t.has_been_displayed ? _(Ie(t.template)) : (t.guid.startsWith("OFR") ? O({
|
|
1301
1288
|
...t,
|
|
1302
1289
|
has_been_displayed: !0
|
|
1303
|
-
}) :
|
|
1290
|
+
}) : R({
|
|
1304
1291
|
...t,
|
|
1305
1292
|
has_been_displayed: !0
|
|
1306
|
-
}),
|
|
1307
|
-
}, [c]),
|
|
1293
|
+
}), _(ve(t.template))));
|
|
1294
|
+
}, [c]), te(() => {
|
|
1308
1295
|
if (c && t)
|
|
1309
1296
|
if (t.template === "MarketingOffer") {
|
|
1310
|
-
const
|
|
1311
|
-
|
|
1297
|
+
const m = t;
|
|
1298
|
+
h?.capture("viewed_messaging_insight", {
|
|
1312
1299
|
template: t.template,
|
|
1313
|
-
campaign_guid:
|
|
1314
|
-
campaign_name:
|
|
1300
|
+
campaign_guid: m.campaign_guid,
|
|
1301
|
+
campaign_name: m.pulse_campaign_name
|
|
1315
1302
|
});
|
|
1316
1303
|
} else
|
|
1317
|
-
|
|
1304
|
+
h?.capture("viewed_insight", {
|
|
1318
1305
|
beat_guid: t.guid,
|
|
1319
1306
|
template: t.template,
|
|
1320
|
-
position:
|
|
1307
|
+
position: r
|
|
1321
1308
|
});
|
|
1322
|
-
}, [t,
|
|
1323
|
-
const
|
|
1324
|
-
if (
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1309
|
+
}, [t, r, c]);
|
|
1310
|
+
const I = () => {
|
|
1311
|
+
if (s && s(t), _(ge(t.template)), t.template === "MarketingOffer") {
|
|
1312
|
+
const m = t;
|
|
1313
|
+
h?.capture("clicked_messaging_insight", {
|
|
1327
1314
|
template: t.template,
|
|
1328
|
-
campaign_guid:
|
|
1329
|
-
campaign_name:
|
|
1315
|
+
campaign_guid: m.campaign_guid,
|
|
1316
|
+
campaign_name: m.pulse_campaign_name
|
|
1330
1317
|
});
|
|
1331
1318
|
} else
|
|
1332
|
-
|
|
1319
|
+
h?.capture("clicked_insight", {
|
|
1333
1320
|
beat_guid: t.guid,
|
|
1334
1321
|
template: t.template,
|
|
1335
|
-
position:
|
|
1322
|
+
position: r
|
|
1336
1323
|
});
|
|
1337
1324
|
};
|
|
1338
1325
|
return /* @__PURE__ */ e(
|
|
1339
|
-
|
|
1326
|
+
X,
|
|
1340
1327
|
{
|
|
1341
|
-
actionText: t.micro_call_to_action ||
|
|
1328
|
+
actionText: t.micro_call_to_action || C.micro_card_cta,
|
|
1342
1329
|
ariaLabel: i,
|
|
1343
1330
|
backgroundColor: o,
|
|
1344
1331
|
description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
type: t?.icon_type
|
|
1354
|
-
}
|
|
1355
|
-
),
|
|
1356
|
-
isActiveCard: d,
|
|
1357
|
-
onCardClick: O,
|
|
1358
|
-
posthog: _,
|
|
1359
|
-
ref: m,
|
|
1360
|
-
showCTAColocatedWithText: n,
|
|
1361
|
-
showIcon: C,
|
|
1332
|
+
heightOverrides: n,
|
|
1333
|
+
icon: /* @__PURE__ */ e(dt, { beat: t }),
|
|
1334
|
+
isActiveCard: a,
|
|
1335
|
+
onCardClick: I,
|
|
1336
|
+
posthog: h,
|
|
1337
|
+
ref: E,
|
|
1338
|
+
showCTAColocatedWithText: l,
|
|
1339
|
+
showIcon: f,
|
|
1362
1340
|
title: t.micro_title && t.micro_title.length > 0 ? t.micro_title : t.title,
|
|
1363
|
-
variant:
|
|
1364
|
-
widthOverrides:
|
|
1341
|
+
variant: p,
|
|
1342
|
+
widthOverrides: d
|
|
1365
1343
|
}
|
|
1366
1344
|
);
|
|
1367
|
-
},
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
visibleCardsCount: p = 1
|
|
1345
|
+
}, _t = ({
|
|
1346
|
+
currentBeatIndex: i,
|
|
1347
|
+
numBeats: o,
|
|
1348
|
+
onNextClick: t,
|
|
1349
|
+
onPreviousClick: l,
|
|
1350
|
+
scrollRightBoundary: n,
|
|
1351
|
+
scrollX: r,
|
|
1352
|
+
shouldApplyDotAnimation: a = !1,
|
|
1353
|
+
visibleCardsCount: s = 1
|
|
1377
1354
|
}) => {
|
|
1378
|
-
const
|
|
1379
|
-
return /* @__PURE__ */
|
|
1380
|
-
|
|
1355
|
+
const h = j(), { carouselCopy: f } = V(), p = Math.floor(r) > n || i - s + 1 === 0, d = r < 0 || o - 1 === i, E = h.palette.grey[500], c = h.palette.primary.main;
|
|
1356
|
+
return /* @__PURE__ */ g(
|
|
1357
|
+
k,
|
|
1381
1358
|
{
|
|
1382
1359
|
direction: "row",
|
|
1383
1360
|
sx: {
|
|
@@ -1392,34 +1369,34 @@ const $ = u.createContext(null), Et = ({
|
|
|
1392
1369
|
},
|
|
1393
1370
|
children: [
|
|
1394
1371
|
/* @__PURE__ */ e(
|
|
1395
|
-
|
|
1372
|
+
ce,
|
|
1396
1373
|
{
|
|
1397
|
-
"aria-disabled":
|
|
1398
|
-
"aria-label":
|
|
1399
|
-
disabled:
|
|
1400
|
-
onClick:
|
|
1374
|
+
"aria-disabled": p,
|
|
1375
|
+
"aria-label": f.previous_insight_cta_aria,
|
|
1376
|
+
disabled: p,
|
|
1377
|
+
onClick: l,
|
|
1401
1378
|
children: /* @__PURE__ */ e(
|
|
1402
|
-
|
|
1379
|
+
He,
|
|
1403
1380
|
{
|
|
1404
|
-
|
|
1405
|
-
color:
|
|
1381
|
+
sx: {
|
|
1382
|
+
color: p ? E : c
|
|
1406
1383
|
}
|
|
1407
1384
|
}
|
|
1408
1385
|
)
|
|
1409
1386
|
}
|
|
1410
1387
|
),
|
|
1411
|
-
Array.from({ length:
|
|
1412
|
-
const
|
|
1388
|
+
Array.from({ length: o }).map((C, _) => {
|
|
1389
|
+
const R = _ === i;
|
|
1413
1390
|
return /* @__PURE__ */ e(
|
|
1414
|
-
|
|
1391
|
+
Z,
|
|
1415
1392
|
{
|
|
1416
1393
|
className: "mx-insights-micro-carousel-dots",
|
|
1417
1394
|
sx: {
|
|
1418
|
-
bgcolor:
|
|
1395
|
+
bgcolor: R ? c : E,
|
|
1419
1396
|
height: 8,
|
|
1420
1397
|
mr: 8,
|
|
1421
1398
|
// existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
|
|
1422
|
-
...
|
|
1399
|
+
...a ? {
|
|
1423
1400
|
borderRadius: "4px",
|
|
1424
1401
|
transformOrigin: "center",
|
|
1425
1402
|
transition: "all 0.5s ease-out",
|
|
@@ -1428,24 +1405,24 @@ const $ = u.createContext(null), Et = ({
|
|
|
1428
1405
|
borderRadius: "50%",
|
|
1429
1406
|
p: 0
|
|
1430
1407
|
},
|
|
1431
|
-
width:
|
|
1408
|
+
width: R && a ? 24 : 8
|
|
1432
1409
|
}
|
|
1433
1410
|
},
|
|
1434
|
-
`carousel-button-${
|
|
1411
|
+
`carousel-button-${_}`
|
|
1435
1412
|
);
|
|
1436
1413
|
}),
|
|
1437
1414
|
/* @__PURE__ */ e(
|
|
1438
|
-
|
|
1415
|
+
ce,
|
|
1439
1416
|
{
|
|
1440
|
-
"aria-disabled":
|
|
1441
|
-
"aria-label":
|
|
1442
|
-
disabled:
|
|
1443
|
-
onClick:
|
|
1417
|
+
"aria-disabled": d,
|
|
1418
|
+
"aria-label": f.next_insight_cta_aria,
|
|
1419
|
+
disabled: d,
|
|
1420
|
+
onClick: t,
|
|
1444
1421
|
children: /* @__PURE__ */ e(
|
|
1445
|
-
|
|
1422
|
+
Ce,
|
|
1446
1423
|
{
|
|
1447
|
-
|
|
1448
|
-
color:
|
|
1424
|
+
sx: {
|
|
1425
|
+
color: d ? E : c
|
|
1449
1426
|
}
|
|
1450
1427
|
}
|
|
1451
1428
|
)
|
|
@@ -1454,115 +1431,154 @@ const $ = u.createContext(null), Et = ({
|
|
|
1454
1431
|
]
|
|
1455
1432
|
}
|
|
1456
1433
|
);
|
|
1457
|
-
},
|
|
1434
|
+
}, ft = ({
|
|
1435
|
+
activeCardIndex: i,
|
|
1436
|
+
beats: o,
|
|
1437
|
+
cardWidth: t,
|
|
1438
|
+
showCTAColocatedWithText: l,
|
|
1439
|
+
heightOverrides: n,
|
|
1440
|
+
onCardClick: r,
|
|
1441
|
+
posthog: a,
|
|
1442
|
+
showIcon: s,
|
|
1443
|
+
variant: h
|
|
1444
|
+
}) => {
|
|
1445
|
+
const { carouselCopy: f } = V(), p = {
|
|
1446
|
+
showCTAColocatedWithText: l,
|
|
1447
|
+
heightOverrides: n,
|
|
1448
|
+
posthog: a,
|
|
1449
|
+
showIcon: s,
|
|
1450
|
+
variant: h
|
|
1451
|
+
};
|
|
1452
|
+
return /* @__PURE__ */ g(xe, { children: [
|
|
1453
|
+
o.map((d, E) => {
|
|
1454
|
+
const c = E + 1, C = o.length + 1, _ = be(
|
|
1455
|
+
f.card_position_in_carousel_aria,
|
|
1456
|
+
c.toString(),
|
|
1457
|
+
C.toString()
|
|
1458
|
+
), R = d.micro_title && d.micro_title.length > 0, O = d.micro_description && d.micro_description.length > 0, I = R ? d.micro_title : d.title, m = O ? d.micro_description : d.description;
|
|
1459
|
+
return /* @__PURE__ */ e(
|
|
1460
|
+
pt,
|
|
1461
|
+
{
|
|
1462
|
+
ariaLabel: `${_}: ${I}, ${m}`,
|
|
1463
|
+
beat: d,
|
|
1464
|
+
index: E,
|
|
1465
|
+
isActiveCard: E === i,
|
|
1466
|
+
onCardClick: r,
|
|
1467
|
+
widthOverrides: t || void 0,
|
|
1468
|
+
...p
|
|
1469
|
+
},
|
|
1470
|
+
`${d.guid} ${E}`
|
|
1471
|
+
);
|
|
1472
|
+
}),
|
|
1473
|
+
/* @__PURE__ */ e(
|
|
1474
|
+
Mt,
|
|
1475
|
+
{
|
|
1476
|
+
isActiveCard: i === o.length,
|
|
1477
|
+
onCardClick: r,
|
|
1478
|
+
widthOverrides: t || void 0,
|
|
1479
|
+
...p
|
|
1480
|
+
}
|
|
1481
|
+
)
|
|
1482
|
+
] });
|
|
1483
|
+
}, Ct = ({
|
|
1458
1484
|
analyticsMetadata: i,
|
|
1459
1485
|
allowSingleCardPeeking: o = !1,
|
|
1460
1486
|
beats: t = [],
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
showCarouselControls: _,
|
|
1468
|
-
showIcon: C,
|
|
1487
|
+
showCTAColocatedWithText: l,
|
|
1488
|
+
heightOverrides: n,
|
|
1489
|
+
onCardClick: r,
|
|
1490
|
+
posthog: a,
|
|
1491
|
+
showCarouselControls: s,
|
|
1492
|
+
showIcon: h,
|
|
1469
1493
|
showWithMargin: f = !0,
|
|
1470
|
-
variant:
|
|
1471
|
-
widthOverrides:
|
|
1472
|
-
visibleCardsCount:
|
|
1494
|
+
variant: p,
|
|
1495
|
+
widthOverrides: d,
|
|
1496
|
+
visibleCardsCount: E = 1
|
|
1473
1497
|
// Default to 1 card visible
|
|
1474
1498
|
}) => {
|
|
1475
|
-
const
|
|
1499
|
+
const c = u.useRef(null), C = u.useRef(null), [_, R] = u.useState(0), [O, I] = u.useState(null), [m, T] = u.useState(null), [v, M] = u.useState(null), { carouselCopy: W } = V(), { onEvent: F } = z();
|
|
1476
1500
|
u.useEffect(() => {
|
|
1477
|
-
if (
|
|
1478
|
-
const
|
|
1479
|
-
let
|
|
1480
|
-
if (
|
|
1481
|
-
const
|
|
1482
|
-
|
|
1501
|
+
if (c.current && !o) {
|
|
1502
|
+
const A = c.current.offsetWidth, b = 8;
|
|
1503
|
+
let B;
|
|
1504
|
+
if (E > 1) {
|
|
1505
|
+
const ne = (A - (E - 1) * b) / E / 3;
|
|
1506
|
+
B = (A - ne - (E - 1) * b) / E;
|
|
1483
1507
|
} else
|
|
1484
|
-
|
|
1485
|
-
|
|
1508
|
+
B = A;
|
|
1509
|
+
M(B);
|
|
1486
1510
|
}
|
|
1487
|
-
}, [
|
|
1488
|
-
const
|
|
1489
|
-
if (typeof
|
|
1490
|
-
const
|
|
1491
|
-
|
|
1492
|
-
const ee = [
|
|
1511
|
+
}, [E, c.current?.offsetWidth]), u.useEffect(() => {
|
|
1512
|
+
const A = C.current?.offsetWidth;
|
|
1513
|
+
if (typeof A == "number" && o) {
|
|
1514
|
+
const b = (G) => {
|
|
1515
|
+
const re = [
|
|
1493
1516
|
{ maxWidth: 375, cardWidth: 268 },
|
|
1494
1517
|
{ maxWidth: 444, cardWidth: 300 },
|
|
1495
1518
|
{ maxWidth: 599, cardWidth: 350 },
|
|
1496
1519
|
{ maxWidth: 749, cardWidth: 450 },
|
|
1497
1520
|
{ maxWidth: 900, cardWidth: 600 }
|
|
1498
|
-
].find((
|
|
1499
|
-
return
|
|
1521
|
+
].find((we) => G <= we.maxWidth);
|
|
1522
|
+
return re ? re.cardWidth : 750;
|
|
1500
1523
|
};
|
|
1501
|
-
|
|
1502
|
-
const
|
|
1503
|
-
const
|
|
1504
|
-
typeof
|
|
1524
|
+
M(b(A));
|
|
1525
|
+
const B = () => {
|
|
1526
|
+
const G = C.current?.offsetWidth;
|
|
1527
|
+
typeof G == "number" && M(b(G));
|
|
1505
1528
|
};
|
|
1506
|
-
return window.addEventListener("resize",
|
|
1507
|
-
window.removeEventListener("resize",
|
|
1529
|
+
return window.addEventListener("resize", B), () => {
|
|
1530
|
+
window.removeEventListener("resize", B);
|
|
1508
1531
|
};
|
|
1509
1532
|
}
|
|
1510
|
-
}, [o,
|
|
1511
|
-
const
|
|
1512
|
-
|
|
1513
|
-
left:
|
|
1533
|
+
}, [o, C]);
|
|
1534
|
+
const K = () => {
|
|
1535
|
+
F(S.ON_CAROUSEL_FORWARD_CLICK, i), c.current && v && c.current.scrollTo({
|
|
1536
|
+
left: _ + v + 8,
|
|
1514
1537
|
top: 0,
|
|
1515
1538
|
behavior: "smooth"
|
|
1516
1539
|
});
|
|
1517
|
-
},
|
|
1518
|
-
|
|
1519
|
-
left: Math.max(0,
|
|
1540
|
+
}, $ = () => {
|
|
1541
|
+
F(S.ON_CAROUSEL_BACK_CLICK, i), c.current && v && c.current.scrollTo({
|
|
1542
|
+
left: Math.max(0, _ - (v + 8)),
|
|
1520
1543
|
top: 0,
|
|
1521
1544
|
behavior: "smooth"
|
|
1522
1545
|
});
|
|
1523
|
-
}, ne = () => {
|
|
1524
|
-
E.current && x(E.current.scrollLeft);
|
|
1525
1546
|
}, Q = () => {
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
},
|
|
1531
|
-
|
|
1532
|
-
},
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
showIcon: C,
|
|
1538
|
-
variant: h
|
|
1539
|
-
}, ae = g ? Math.round(I / (g + 8)) : 0, Fe = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
|
|
1540
|
-
return /* @__PURE__ */ v(
|
|
1541
|
-
K,
|
|
1547
|
+
c.current && R(c.current.scrollLeft);
|
|
1548
|
+
}, q = () => {
|
|
1549
|
+
if (!m || !O) return;
|
|
1550
|
+
m - O > ut ? F(S.ON_CAROUSEL_FORWARD_SWIPE, i) : F(S.ON_CAROUSEL_BACK_SWIPE, i);
|
|
1551
|
+
}, J = (A) => {
|
|
1552
|
+
I(A.targetTouches[0].clientX);
|
|
1553
|
+
}, Y = (A) => {
|
|
1554
|
+
I(null), T(A.targetTouches[0].clientX);
|
|
1555
|
+
}, w = v ? Math.round(_ / (v + 8)) : 0, We = c.current ? c.current.scrollWidth - c.current.offsetWidth : 0;
|
|
1556
|
+
return /* @__PURE__ */ g(
|
|
1557
|
+
k,
|
|
1542
1558
|
{
|
|
1543
|
-
"aria-label":
|
|
1559
|
+
"aria-label": W.carousel_title,
|
|
1544
1560
|
"aria-roledescription": "carousel",
|
|
1545
|
-
ref:
|
|
1561
|
+
ref: C,
|
|
1546
1562
|
role: "group/region",
|
|
1547
1563
|
sx: {
|
|
1548
1564
|
alignItems: "center",
|
|
1549
1565
|
boxSizing: "border-box",
|
|
1550
|
-
height:
|
|
1551
|
-
width:
|
|
1566
|
+
height: n,
|
|
1567
|
+
width: d || "100%"
|
|
1552
1568
|
},
|
|
1553
1569
|
children: [
|
|
1554
|
-
/* @__PURE__ */
|
|
1555
|
-
|
|
1570
|
+
/* @__PURE__ */ e(
|
|
1571
|
+
k,
|
|
1556
1572
|
{
|
|
1557
1573
|
direction: "row",
|
|
1558
|
-
onScroll:
|
|
1559
|
-
onTouchEnd:
|
|
1560
|
-
onTouchMove:
|
|
1561
|
-
onTouchStart:
|
|
1562
|
-
ref:
|
|
1574
|
+
onScroll: Q,
|
|
1575
|
+
onTouchEnd: q,
|
|
1576
|
+
onTouchMove: J,
|
|
1577
|
+
onTouchStart: Y,
|
|
1578
|
+
ref: c,
|
|
1563
1579
|
sx: {
|
|
1564
1580
|
alignItems: "center",
|
|
1565
|
-
height:
|
|
1581
|
+
height: n && "100%",
|
|
1566
1582
|
gap: 8,
|
|
1567
1583
|
listStyleType: "none",
|
|
1568
1584
|
m: 0,
|
|
@@ -1577,68 +1593,49 @@ const $ = u.createContext(null), Et = ({
|
|
|
1577
1593
|
display: "none"
|
|
1578
1594
|
}
|
|
1579
1595
|
},
|
|
1580
|
-
children:
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
onCardClick: a,
|
|
1595
|
-
widthOverrides: g || void 0,
|
|
1596
|
-
...ue
|
|
1597
|
-
},
|
|
1598
|
-
`${s.guid} ${A}`
|
|
1599
|
-
);
|
|
1600
|
-
}),
|
|
1601
|
-
/* @__PURE__ */ e(
|
|
1602
|
-
Lt,
|
|
1603
|
-
{
|
|
1604
|
-
isActiveCard: ae === t.length,
|
|
1605
|
-
onCardClick: a,
|
|
1606
|
-
widthOverrides: g || void 0,
|
|
1607
|
-
...ue
|
|
1608
|
-
}
|
|
1609
|
-
)
|
|
1610
|
-
]
|
|
1596
|
+
children: /* @__PURE__ */ e(
|
|
1597
|
+
ft,
|
|
1598
|
+
{
|
|
1599
|
+
activeCardIndex: w,
|
|
1600
|
+
beats: t,
|
|
1601
|
+
cardWidth: v,
|
|
1602
|
+
heightOverrides: n,
|
|
1603
|
+
onCardClick: r,
|
|
1604
|
+
posthog: a,
|
|
1605
|
+
showCTAColocatedWithText: l,
|
|
1606
|
+
showIcon: h,
|
|
1607
|
+
variant: p
|
|
1608
|
+
}
|
|
1609
|
+
)
|
|
1611
1610
|
}
|
|
1612
1611
|
),
|
|
1613
|
-
|
|
1614
|
-
|
|
1612
|
+
s && /* @__PURE__ */ e(
|
|
1613
|
+
_t,
|
|
1615
1614
|
{
|
|
1616
|
-
|
|
1617
|
-
currentBeatIndex: ae + c - 1,
|
|
1615
|
+
currentBeatIndex: w + E - 1,
|
|
1618
1616
|
numBeats: t.length + 1,
|
|
1619
|
-
onNextClick:
|
|
1620
|
-
onPreviousClick:
|
|
1621
|
-
scrollRightBoundary:
|
|
1622
|
-
scrollX:
|
|
1623
|
-
|
|
1624
|
-
visibleCardsCount:
|
|
1617
|
+
onNextClick: K,
|
|
1618
|
+
onPreviousClick: $,
|
|
1619
|
+
scrollRightBoundary: We,
|
|
1620
|
+
scrollX: _,
|
|
1621
|
+
shouldApplyDotAnimation: o,
|
|
1622
|
+
visibleCardsCount: E
|
|
1625
1623
|
}
|
|
1626
1624
|
)
|
|
1627
1625
|
]
|
|
1628
1626
|
}
|
|
1629
1627
|
);
|
|
1630
|
-
},
|
|
1628
|
+
}, mt = P(Ct), Rt = ({
|
|
1631
1629
|
analyticsMetadata: i,
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
widthOverrides: n
|
|
1630
|
+
onCardClick: o,
|
|
1631
|
+
posthog: t,
|
|
1632
|
+
widthOverrides: l
|
|
1636
1633
|
}) => {
|
|
1637
|
-
const { carouselCopy:
|
|
1638
|
-
|
|
1634
|
+
const { carouselCopy: n } = V(), { onEvent: r } = z(), a = () => {
|
|
1635
|
+
r && (r(S.ON_VIEW_MORE_CLICKED, i), o(), t?.capture("clicked_view_more"));
|
|
1639
1636
|
};
|
|
1640
|
-
return
|
|
1641
|
-
|
|
1637
|
+
return n ? /* @__PURE__ */ g(
|
|
1638
|
+
k,
|
|
1642
1639
|
{
|
|
1643
1640
|
alignItems: "center",
|
|
1644
1641
|
direction: "row",
|
|
@@ -1646,48 +1643,48 @@ const $ = u.createContext(null), Et = ({
|
|
|
1646
1643
|
spacing: 2,
|
|
1647
1644
|
sx: {
|
|
1648
1645
|
padding: 16,
|
|
1649
|
-
width:
|
|
1646
|
+
width: l || void 0
|
|
1650
1647
|
},
|
|
1651
1648
|
children: [
|
|
1652
1649
|
/* @__PURE__ */ e(
|
|
1653
|
-
|
|
1650
|
+
Le,
|
|
1654
1651
|
{
|
|
1655
|
-
sx: {
|
|
1656
|
-
color:
|
|
1652
|
+
sx: (s) => ({
|
|
1653
|
+
color: s.palette.primary.main,
|
|
1657
1654
|
fontSize: 18,
|
|
1658
1655
|
fontWeight: 700,
|
|
1659
1656
|
lineHeight: "24px"
|
|
1660
|
-
},
|
|
1657
|
+
}),
|
|
1661
1658
|
variant: "h3",
|
|
1662
|
-
children:
|
|
1659
|
+
children: n.carousel_title
|
|
1663
1660
|
}
|
|
1664
1661
|
),
|
|
1665
1662
|
/* @__PURE__ */ e(
|
|
1666
|
-
|
|
1663
|
+
De,
|
|
1667
1664
|
{
|
|
1668
|
-
endIcon: /* @__PURE__ */ e(
|
|
1669
|
-
onClick:
|
|
1665
|
+
endIcon: /* @__PURE__ */ e(Ce, { size: 20 }),
|
|
1666
|
+
onClick: a,
|
|
1670
1667
|
size: "small",
|
|
1671
|
-
sx: {
|
|
1672
|
-
color:
|
|
1673
|
-
},
|
|
1668
|
+
sx: (s) => ({
|
|
1669
|
+
color: s.palette.primary.main
|
|
1670
|
+
}),
|
|
1674
1671
|
variant: "text",
|
|
1675
|
-
children:
|
|
1672
|
+
children: n.view_all_insights_in_full_feed_cta_aria
|
|
1676
1673
|
}
|
|
1677
1674
|
)
|
|
1678
1675
|
]
|
|
1679
1676
|
}
|
|
1680
|
-
) : /* @__PURE__ */ e(
|
|
1681
|
-
},
|
|
1677
|
+
) : /* @__PURE__ */ e(ke, {});
|
|
1678
|
+
}, gt = P(Rt), It = ({
|
|
1682
1679
|
heightOverrides: i,
|
|
1683
1680
|
widthOverrides: o,
|
|
1684
1681
|
children: t
|
|
1685
1682
|
}) => {
|
|
1686
|
-
const { carouselCopy:
|
|
1683
|
+
const { carouselCopy: l } = V();
|
|
1687
1684
|
return /* @__PURE__ */ e(
|
|
1688
|
-
|
|
1685
|
+
Z,
|
|
1689
1686
|
{
|
|
1690
|
-
"aria-label":
|
|
1687
|
+
"aria-label": l?.carousel_title,
|
|
1691
1688
|
"aria-roledescription": "carousel",
|
|
1692
1689
|
role: "group",
|
|
1693
1690
|
sx: {
|
|
@@ -1699,104 +1696,72 @@ const $ = u.createContext(null), Et = ({
|
|
|
1699
1696
|
children: t
|
|
1700
1697
|
}
|
|
1701
1698
|
);
|
|
1702
|
-
},
|
|
1699
|
+
}, Oe = ({
|
|
1703
1700
|
ariaLabel: i,
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
heightOverrides: r,
|
|
1707
|
-
onCardClick: n,
|
|
1701
|
+
heightOverrides: o,
|
|
1702
|
+
onCardClick: t,
|
|
1708
1703
|
posthog: l,
|
|
1709
|
-
showIcon:
|
|
1710
|
-
|
|
1711
|
-
variant: p,
|
|
1712
|
-
widthOverrides: _
|
|
1704
|
+
showIcon: n,
|
|
1705
|
+
variant: r
|
|
1713
1706
|
}) => {
|
|
1714
|
-
const { cardsCopy:
|
|
1707
|
+
const { cardsCopy: a } = V(), { onEvent: s } = z(), { onPageview: h } = Me();
|
|
1715
1708
|
u.useEffect(() => {
|
|
1716
1709
|
h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1717
1710
|
}, []);
|
|
1718
|
-
const
|
|
1719
|
-
|
|
1711
|
+
const f = () => {
|
|
1712
|
+
t && t(), s(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
|
|
1720
1713
|
template: "no_relevant_insights"
|
|
1721
1714
|
});
|
|
1722
1715
|
};
|
|
1723
1716
|
return /* @__PURE__ */ e(
|
|
1724
|
-
|
|
1717
|
+
X,
|
|
1725
1718
|
{
|
|
1726
|
-
actionText:
|
|
1719
|
+
actionText: a.micro_card_cta,
|
|
1727
1720
|
ariaLabel: i,
|
|
1728
|
-
description:
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
icon: /* @__PURE__ */ e(De, {}),
|
|
1721
|
+
description: a.no_relevant_insights_card_description,
|
|
1722
|
+
heightOverrides: o,
|
|
1723
|
+
icon: /* @__PURE__ */ e(Se, {}),
|
|
1732
1724
|
isZeroState: !0,
|
|
1733
|
-
onCardClick:
|
|
1725
|
+
onCardClick: f,
|
|
1734
1726
|
posthog: l,
|
|
1735
|
-
showIcon:
|
|
1727
|
+
showIcon: n,
|
|
1736
1728
|
style: {
|
|
1737
|
-
cardStyle: {
|
|
1738
|
-
card: {
|
|
1739
|
-
height: `calc(${Ne[o]}px - 44px)`,
|
|
1740
|
-
m: "0 auto",
|
|
1741
|
-
width: d ? "calc(100% - 32px)" : "100%"
|
|
1742
|
-
},
|
|
1743
|
-
description: {
|
|
1744
|
-
WebkitLineClamp: 4
|
|
1745
|
-
}
|
|
1746
|
-
},
|
|
1747
1729
|
linkTextStyle: {
|
|
1748
1730
|
ml: 48
|
|
1749
1731
|
}
|
|
1750
1732
|
},
|
|
1751
|
-
title:
|
|
1752
|
-
variant:
|
|
1753
|
-
widthOverrides: _
|
|
1733
|
+
title: a.no_relevant_insights_card_title,
|
|
1734
|
+
variant: r
|
|
1754
1735
|
}
|
|
1755
1736
|
);
|
|
1756
|
-
},
|
|
1737
|
+
}, jt = P(Oe), Te = ({
|
|
1757
1738
|
ariaLabel: i,
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
showWithMargin: a,
|
|
1764
|
-
variant: d,
|
|
1765
|
-
widthOverrides: p
|
|
1739
|
+
heightOverrides: o,
|
|
1740
|
+
onCardClick: t,
|
|
1741
|
+
posthog: l,
|
|
1742
|
+
showIcon: n,
|
|
1743
|
+
variant: r
|
|
1766
1744
|
}) => {
|
|
1767
|
-
const { onPageview:
|
|
1745
|
+
const { onPageview: a } = Me(), { zeroStateCopy: s } = V();
|
|
1768
1746
|
return u.useEffect(() => {
|
|
1769
|
-
|
|
1747
|
+
a(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
|
|
1770
1748
|
}, []), /* @__PURE__ */ e(
|
|
1771
|
-
|
|
1749
|
+
X,
|
|
1772
1750
|
{
|
|
1773
1751
|
ariaLabel: i,
|
|
1774
|
-
description:
|
|
1775
|
-
heightOverrides:
|
|
1776
|
-
icon: /* @__PURE__ */ e(
|
|
1752
|
+
description: s.carousel_zero_state_description,
|
|
1753
|
+
heightOverrides: o,
|
|
1754
|
+
icon: /* @__PURE__ */ e(Se, {}),
|
|
1777
1755
|
isZeroState: !0,
|
|
1778
|
-
onCardClick:
|
|
1779
|
-
posthog:
|
|
1780
|
-
showIcon:
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
card: {
|
|
1784
|
-
height: `calc(${Ne[o]}px - 44px)`,
|
|
1785
|
-
m: "0 auto",
|
|
1786
|
-
width: a ? "calc(100% - 32px)" : "100%"
|
|
1787
|
-
},
|
|
1788
|
-
description: {
|
|
1789
|
-
WebkitLineClamp: 4
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
},
|
|
1793
|
-
title: C.carousel_zero_state_title,
|
|
1794
|
-
variant: d,
|
|
1795
|
-
widthOverrides: p
|
|
1756
|
+
onCardClick: t,
|
|
1757
|
+
posthog: l,
|
|
1758
|
+
showIcon: n,
|
|
1759
|
+
title: s.carousel_zero_state_title,
|
|
1760
|
+
variant: r
|
|
1796
1761
|
}
|
|
1797
1762
|
);
|
|
1798
|
-
},
|
|
1799
|
-
|
|
1763
|
+
}, Xt = P(Te), vt = () => /* @__PURE__ */ e(
|
|
1764
|
+
Z,
|
|
1800
1765
|
{
|
|
1801
1766
|
sx: {
|
|
1802
1767
|
alignItems: "center",
|
|
@@ -1805,148 +1770,160 @@ const $ = u.createContext(null), Et = ({
|
|
|
1805
1770
|
justifyContent: "center",
|
|
1806
1771
|
width: "100%"
|
|
1807
1772
|
},
|
|
1808
|
-
children: /* @__PURE__ */ e(
|
|
1773
|
+
children: /* @__PURE__ */ e(Ge, {})
|
|
1809
1774
|
}
|
|
1810
|
-
),
|
|
1775
|
+
), N = new it(), yt = ({
|
|
1811
1776
|
allowSingleCardPeeking: i,
|
|
1812
1777
|
areBeatsLoading: o,
|
|
1813
1778
|
beats: t = [],
|
|
1814
1779
|
// This also determines the length of the carousel controls (beat.length + 1)
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
logOutUser: d,
|
|
1821
|
-
onCardClick: p = () => {
|
|
1780
|
+
showCTAColocatedWithText: l = !0,
|
|
1781
|
+
endpoint: n = "/",
|
|
1782
|
+
heightOverrides: r,
|
|
1783
|
+
logOutUser: a,
|
|
1784
|
+
onCardClick: s = () => {
|
|
1822
1785
|
},
|
|
1823
|
-
onEvent:
|
|
1786
|
+
onEvent: h = () => {
|
|
1824
1787
|
},
|
|
1825
|
-
onPageview:
|
|
1788
|
+
onPageview: f = () => {
|
|
1826
1789
|
},
|
|
1827
|
-
posthog:
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
visibleCardsCount: z = 1,
|
|
1839
|
-
widthOverrides: g
|
|
1790
|
+
posthog: p,
|
|
1791
|
+
showBorder: d = !0,
|
|
1792
|
+
showCarouselControls: E,
|
|
1793
|
+
showHeader: c,
|
|
1794
|
+
showIcon: C,
|
|
1795
|
+
showWithMargin: _ = !0,
|
|
1796
|
+
token: R = "",
|
|
1797
|
+
userHasFullInsightFeedBeats: O,
|
|
1798
|
+
variant: I,
|
|
1799
|
+
visibleCardsCount: m = 1,
|
|
1800
|
+
widthOverrides: T
|
|
1840
1801
|
}) => {
|
|
1841
|
-
const [
|
|
1802
|
+
const [v, M] = ee("STANDARD"), [W, F] = ee(!1), [K, $] = ee(!1), Q = ze([h], N), q = Ke([f], N);
|
|
1842
1803
|
u.useEffect(() => {
|
|
1843
|
-
!
|
|
1844
|
-
}, [
|
|
1845
|
-
const
|
|
1846
|
-
|
|
1804
|
+
!N.isInitialized && !K && (N.initialize(n, R, a).catch(() => $(!1)), $(!0));
|
|
1805
|
+
}, [n, R, a, N.isInitialized, K]), u.useEffect(() => {
|
|
1806
|
+
const w = window.innerHeight;
|
|
1807
|
+
w < 180 ? M("STANDARD") : w >= 180 && w < 200 ? M("LARGE") : w >= 200 && w < 248 ? M("XLARGE") : w >= 248 && M("XXLARGE");
|
|
1847
1808
|
}, [window.innerHeight]), u.useEffect(() => {
|
|
1848
|
-
|
|
1849
|
-
}, [o,
|
|
1850
|
-
const
|
|
1851
|
-
showCTAColocatedWithText:
|
|
1852
|
-
heightOverrides:
|
|
1853
|
-
onCardClick:
|
|
1854
|
-
posthog:
|
|
1855
|
-
showIcon:
|
|
1856
|
-
showWithMargin:
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1809
|
+
F(!o && N.isInitialized);
|
|
1810
|
+
}, [o, N.isInitialized]);
|
|
1811
|
+
const J = {
|
|
1812
|
+
showCTAColocatedWithText: l,
|
|
1813
|
+
heightOverrides: r,
|
|
1814
|
+
onCardClick: s,
|
|
1815
|
+
posthog: p,
|
|
1816
|
+
showIcon: C,
|
|
1817
|
+
showWithMargin: _,
|
|
1818
|
+
widthOverrides: T
|
|
1819
|
+
}, Y = {
|
|
1820
|
+
carouselSize: v,
|
|
1821
|
+
variant: I,
|
|
1822
|
+
showCTAColocatedWithText: l,
|
|
1823
|
+
heightOverrides: r,
|
|
1824
|
+
onCardClick: s,
|
|
1825
|
+
posthog: p,
|
|
1826
|
+
showIcon: C
|
|
1863
1827
|
};
|
|
1864
|
-
return /* @__PURE__ */ e(
|
|
1865
|
-
!
|
|
1866
|
-
|
|
1867
|
-
|
|
1828
|
+
return /* @__PURE__ */ e(ot, { onEvent: Q, onPageview: q, store: N, children: /* @__PURE__ */ g(It, { heightOverrides: r, widthOverrides: T, children: [
|
|
1829
|
+
!W && /* @__PURE__ */ e(vt, {}),
|
|
1830
|
+
W && c && /* @__PURE__ */ e(
|
|
1831
|
+
gt,
|
|
1868
1832
|
{
|
|
1869
|
-
analyticsMetadata:
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
widthOverrides: g
|
|
1833
|
+
analyticsMetadata: Ee,
|
|
1834
|
+
onCardClick: s,
|
|
1835
|
+
posthog: p,
|
|
1836
|
+
widthOverrides: T
|
|
1874
1837
|
}
|
|
1875
1838
|
),
|
|
1876
|
-
|
|
1877
|
-
|
|
1839
|
+
W && !!t.length && /* @__PURE__ */ e(
|
|
1840
|
+
mt,
|
|
1878
1841
|
{
|
|
1879
1842
|
allowSingleCardPeeking: i,
|
|
1880
|
-
analyticsMetadata:
|
|
1843
|
+
analyticsMetadata: Ee,
|
|
1881
1844
|
beats: t,
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
visibleCardsCount: z,
|
|
1887
|
-
...Q
|
|
1845
|
+
showCarouselControls: E,
|
|
1846
|
+
variant: d ? I : void 0,
|
|
1847
|
+
visibleCardsCount: m,
|
|
1848
|
+
...J
|
|
1888
1849
|
}
|
|
1889
1850
|
),
|
|
1890
|
-
|
|
1891
|
-
|
|
1851
|
+
W && !t.length && /* @__PURE__ */ e(
|
|
1852
|
+
k,
|
|
1853
|
+
{
|
|
1854
|
+
sx: {
|
|
1855
|
+
alignItems: "center",
|
|
1856
|
+
height: r,
|
|
1857
|
+
width: T || "100%"
|
|
1858
|
+
},
|
|
1859
|
+
children: /* @__PURE__ */ e(
|
|
1860
|
+
k,
|
|
1861
|
+
{
|
|
1862
|
+
sx: {
|
|
1863
|
+
height: `calc(${ht[v]}px - 44px)`,
|
|
1864
|
+
width: _ ? `calc(${T}px - 32px)` : "100%"
|
|
1865
|
+
},
|
|
1866
|
+
children: O ? /* @__PURE__ */ e(Oe, { ...Y }) : /* @__PURE__ */ e(Te, { ...Y })
|
|
1867
|
+
}
|
|
1868
|
+
)
|
|
1869
|
+
}
|
|
1870
|
+
)
|
|
1892
1871
|
] }) });
|
|
1893
|
-
},
|
|
1872
|
+
}, Qt = P(yt), St = ({
|
|
1894
1873
|
isActiveCard: i,
|
|
1895
1874
|
ariaLabel: o,
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
widthOverrides: p
|
|
1875
|
+
heightOverrides: t,
|
|
1876
|
+
onCardClick: l,
|
|
1877
|
+
posthog: n,
|
|
1878
|
+
showIcon: r,
|
|
1879
|
+
variant: a,
|
|
1880
|
+
widthOverrides: s
|
|
1903
1881
|
}) => {
|
|
1904
|
-
const
|
|
1905
|
-
threshold:
|
|
1906
|
-
}), { cardsCopy:
|
|
1907
|
-
|
|
1908
|
-
|
|
1882
|
+
const h = j(), { ref: f, inView: p } = me({
|
|
1883
|
+
threshold: Ae
|
|
1884
|
+
}), { cardsCopy: d } = V(), { onEvent: E } = z();
|
|
1885
|
+
te(() => {
|
|
1886
|
+
p && (E(ye.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
|
|
1909
1887
|
template: "view_more_card"
|
|
1910
1888
|
}));
|
|
1911
|
-
}, [
|
|
1889
|
+
}, [p]);
|
|
1912
1890
|
const c = () => {
|
|
1913
|
-
|
|
1891
|
+
l && l(), E(S.ON_VIEW_MORE_CLICKED), n?.capture("clicked_insight", {
|
|
1914
1892
|
template: "view_more_card"
|
|
1915
1893
|
});
|
|
1916
1894
|
};
|
|
1917
1895
|
return /* @__PURE__ */ e(
|
|
1918
|
-
|
|
1896
|
+
X,
|
|
1919
1897
|
{
|
|
1920
|
-
actionText:
|
|
1898
|
+
actionText: d.micro_card_cta,
|
|
1921
1899
|
ariaLabel: o,
|
|
1922
|
-
description:
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
icon: /* @__PURE__ */ e(ft, { color: t?.primary_300 ?? _.palette.primary.main }),
|
|
1900
|
+
description: d.view_more_card_description,
|
|
1901
|
+
heightOverrides: t,
|
|
1902
|
+
icon: /* @__PURE__ */ e(rt, { color: h.palette.primary.main }),
|
|
1926
1903
|
isActiveCard: i,
|
|
1927
1904
|
onCardClick: c,
|
|
1928
|
-
posthog:
|
|
1929
|
-
ref:
|
|
1930
|
-
showIcon:
|
|
1931
|
-
title:
|
|
1932
|
-
variant:
|
|
1933
|
-
widthOverrides:
|
|
1905
|
+
posthog: n,
|
|
1906
|
+
ref: f,
|
|
1907
|
+
showIcon: r,
|
|
1908
|
+
title: d.view_more_card_title,
|
|
1909
|
+
variant: a,
|
|
1910
|
+
widthOverrides: s
|
|
1934
1911
|
}
|
|
1935
1912
|
);
|
|
1936
|
-
},
|
|
1913
|
+
}, Mt = P(St);
|
|
1937
1914
|
export {
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1915
|
+
it as A,
|
|
1916
|
+
X as B,
|
|
1917
|
+
gt as C,
|
|
1918
|
+
ot as I,
|
|
1919
|
+
mt as M,
|
|
1920
|
+
jt as N,
|
|
1921
|
+
Ee as T,
|
|
1922
|
+
Mt as V,
|
|
1923
|
+
Xt as Z,
|
|
1924
|
+
pt as a,
|
|
1925
|
+
Qt as b,
|
|
1926
|
+
rt as c,
|
|
1927
|
+
st as d,
|
|
1928
|
+
Se as e
|
|
1952
1929
|
};
|