@mx-cartographer/experiences 8.2.3 → 8.2.5
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 +8 -0
- package/dist/{AccountDetailsHeader-CfdnKyJK.mjs → AccountDetailsHeader-DIysk_4w.mjs} +1 -1
- package/dist/{AccountFields-CAy0x_4i.mjs → AccountFields-mwJ8NXsX.mjs} +18 -18
- package/dist/{AccountListItem-BYyeeCf6.mjs → AccountListItem-CU-oWLRi.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-D_LoKlJU.mjs → ViewMoreMicroCard-CQBFy9AF.mjs} +399 -402
- package/dist/accounts/index.es.js +4 -4
- package/dist/cashflow/index.es.js +1 -1
- package/dist/debts/index.es.js +1 -1
- package/dist/finstrong/index.es.js +1 -1
- package/dist/microinsights/cards/InsightCard.d.ts +2 -2
- package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +3 -5
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +3 -5
- package/dist/microinsights/cards/ZeroStateCard.d.ts +3 -5
- package/dist/microinsights/carousel/BeatList.d.ts +2 -2
- package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +12 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +11 -5
- package/dist/trends/index.es.js +2 -3
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as o, jsxs as N, Fragment as Re } from "react/jsx-runtime";
|
|
2
|
+
import I, { useEffect as re, useState as ie } from "react";
|
|
3
|
+
import { observer as k } from "mobx-react-lite";
|
|
4
|
+
import G from "@mui/material/Stack";
|
|
5
5
|
import Ue from "@mui/material/Button";
|
|
6
6
|
import { CategoryIcon as ze, MerchantLogo as Ke, InstitutionLogo as Fe, P as me, Text as ue, H3 as He } from "@mxenabled/mxui";
|
|
7
7
|
import { Icon as $e, Close as je, ChevronLeft as Ye, ChevronRight as Oe } from "@mxenabled/mx-icons";
|
|
8
8
|
import { L as Xe } from "./Loader-CxeBwuPG.mjs";
|
|
9
9
|
import ae from "@mui/material/Box";
|
|
10
10
|
import Ce from "@mui/material/IconButton";
|
|
11
|
-
import { alpha as
|
|
11
|
+
import { alpha as s, useTheme as F } from "@mui/material/styles";
|
|
12
12
|
import { useInView as We } from "react-intersection-observer";
|
|
13
13
|
import se from "@mui/material/styles/useTheme";
|
|
14
14
|
import { C as Ze } from "./Category-DEKZGLYe.mjs";
|
|
@@ -18,7 +18,7 @@ import { makeAutoObservable as ce, runInAction as we } from "mobx";
|
|
|
18
18
|
import { a as Je, u as et, b as tt } from "./Analytics-CkYXKvco.mjs";
|
|
19
19
|
import { G as he, B as ge } from "./GlobalCopyApi-wcnDUzMV.mjs";
|
|
20
20
|
import { u as ot } from "./useWidgetLoadTimer-CJb-RELP.mjs";
|
|
21
|
-
import { Card as nt, CardActionArea as it, Box as rt, IconButton as at, Stack as
|
|
21
|
+
import { Card as nt, CardActionArea as it, Box as rt, IconButton as at, Stack as K, Button as Ie } from "@mui/material";
|
|
22
22
|
import st from "@mui/material/Avatar";
|
|
23
23
|
class ct {
|
|
24
24
|
copyApi = new he("/", "");
|
|
@@ -67,16 +67,16 @@ const le = {
|
|
|
67
67
|
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
|
68
68
|
MonthlySpendComparison: "MonthlySpendComparison",
|
|
69
69
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
70
|
-
},
|
|
70
|
+
}, O = window?.app?.clientConfig?.microwidget_instance_id || "", Ee = {
|
|
71
71
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
72
|
-
}, Ne = (t) => `on${t}Click`, Me = (t) => `on${t}View`,
|
|
72
|
+
}, Ne = (t) => `on${t}Click`, Me = (t) => `on${t}View`, ve = (t) => `on${t}ViewFirstTime`, de = (t) => t.replace(/([a-z])([A-Z])/g, "$1 $2"), lt = () => Object.values(le).reduce(
|
|
73
73
|
(t, e) => ({
|
|
74
74
|
...t,
|
|
75
75
|
[Ne(e)]: {
|
|
76
|
-
action:
|
|
77
|
-
category:
|
|
76
|
+
action: b.MICRO_BEAT_CLICKED,
|
|
77
|
+
category: L.BEAT_INTERACTION,
|
|
78
78
|
label: de(e),
|
|
79
|
-
value:
|
|
79
|
+
value: O
|
|
80
80
|
}
|
|
81
81
|
}),
|
|
82
82
|
{}
|
|
@@ -84,41 +84,41 @@ const le = {
|
|
|
84
84
|
(t, e) => ({
|
|
85
85
|
...t,
|
|
86
86
|
[Me(e)]: {
|
|
87
|
-
action:
|
|
88
|
-
category:
|
|
87
|
+
action: b.MICRO_BEAT_DISPLAYED,
|
|
88
|
+
category: L.BEAT_INTERACTION,
|
|
89
89
|
label: de(e),
|
|
90
|
-
value:
|
|
90
|
+
value: O
|
|
91
91
|
}
|
|
92
92
|
}),
|
|
93
93
|
{}
|
|
94
94
|
), _t = () => Object.values(le).reduce(
|
|
95
95
|
(t, e) => ({
|
|
96
96
|
...t,
|
|
97
|
-
[
|
|
98
|
-
action:
|
|
99
|
-
category:
|
|
97
|
+
[ve(e)]: {
|
|
98
|
+
action: b.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
99
|
+
category: L.BEAT_INTERACTION,
|
|
100
100
|
label: de(e),
|
|
101
|
-
value:
|
|
101
|
+
value: O
|
|
102
102
|
}
|
|
103
103
|
}),
|
|
104
104
|
{}
|
|
105
|
-
),
|
|
105
|
+
), v = {
|
|
106
106
|
CAROUSEL_CONTROL: "Carousel Control",
|
|
107
107
|
MICRO_WIDGET: "Micro Widget",
|
|
108
108
|
VIEW_MORE: "View More"
|
|
109
|
-
},
|
|
109
|
+
}, L = {
|
|
110
110
|
MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
|
|
111
111
|
BEAT_INTERACTION: "Beat Interaction"
|
|
112
|
-
},
|
|
112
|
+
}, W = {
|
|
113
113
|
ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
|
|
114
114
|
ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
|
|
115
115
|
ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
|
|
116
116
|
ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
|
|
117
117
|
ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
|
|
118
118
|
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
|
119
|
-
},
|
|
119
|
+
}, Le = {
|
|
120
120
|
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
|
121
|
-
},
|
|
121
|
+
}, b = {
|
|
122
122
|
CONTROL_BACKWARD: "Control Backward",
|
|
123
123
|
CONTROL_FORWARD: "Control Forward",
|
|
124
124
|
MICRO_BEAT_CLICKED: "Micro Beat Clicked",
|
|
@@ -126,69 +126,69 @@ const le = {
|
|
|
126
126
|
MICRO_BEAT_DISPLAYED_FIRST_TIME: "Micro Beat Displayed For First Time",
|
|
127
127
|
SWIPE_BACKWARD: "Swipe Backward",
|
|
128
128
|
SWIPE_FORWARD: "Swipe Forward"
|
|
129
|
-
},
|
|
129
|
+
}, B = {
|
|
130
130
|
MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
|
|
131
131
|
MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
|
|
132
132
|
MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
|
|
133
133
|
}, fe = {
|
|
134
|
-
[
|
|
135
|
-
label:
|
|
136
|
-
name:
|
|
134
|
+
[B.MICRO_WIDGET_CAROUSEL]: {
|
|
135
|
+
label: v.MICRO_WIDGET,
|
|
136
|
+
name: B.MICRO_WIDGET_CAROUSEL,
|
|
137
137
|
path: Ee.INSIGHTS_MICRO_WIDGET,
|
|
138
|
-
value:
|
|
138
|
+
value: O
|
|
139
139
|
},
|
|
140
140
|
// zero state
|
|
141
|
-
[
|
|
142
|
-
label:
|
|
143
|
-
name:
|
|
141
|
+
[B.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
|
142
|
+
label: v.MICRO_WIDGET,
|
|
143
|
+
name: B.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
|
144
144
|
path: Ee.INSIGHTS_MICRO_WIDGET,
|
|
145
|
-
value:
|
|
145
|
+
value: O
|
|
146
146
|
},
|
|
147
147
|
// no relevant cards
|
|
148
|
-
[
|
|
149
|
-
label:
|
|
150
|
-
name:
|
|
148
|
+
[B.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
|
149
|
+
label: v.MICRO_WIDGET,
|
|
150
|
+
name: B.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
|
151
151
|
path: "/micro-widget",
|
|
152
|
-
value:
|
|
152
|
+
value: O
|
|
153
153
|
}
|
|
154
154
|
}, ye = {
|
|
155
155
|
// carousel control interaction events - clicks and swipes
|
|
156
|
-
[
|
|
157
|
-
action:
|
|
158
|
-
category:
|
|
159
|
-
label:
|
|
160
|
-
value:
|
|
156
|
+
[W.ON_CAROUSEL_BACK_CLICK]: {
|
|
157
|
+
action: b.CONTROL_BACKWARD,
|
|
158
|
+
category: L.MICRO_WIDGET_INTERACTION,
|
|
159
|
+
label: v.CAROUSEL_CONTROL,
|
|
160
|
+
value: O
|
|
161
161
|
},
|
|
162
|
-
[
|
|
163
|
-
action:
|
|
164
|
-
category:
|
|
165
|
-
label:
|
|
166
|
-
value:
|
|
162
|
+
[W.ON_CAROUSEL_FORWARD_CLICK]: {
|
|
163
|
+
action: b.CONTROL_FORWARD,
|
|
164
|
+
category: L.MICRO_WIDGET_INTERACTION,
|
|
165
|
+
label: v.CAROUSEL_CONTROL,
|
|
166
|
+
value: O
|
|
167
167
|
},
|
|
168
|
-
[
|
|
169
|
-
action:
|
|
170
|
-
category:
|
|
171
|
-
label:
|
|
172
|
-
value:
|
|
168
|
+
[W.ON_CAROUSEL_BACK_SWIPE]: {
|
|
169
|
+
action: b.SWIPE_BACKWARD,
|
|
170
|
+
category: L.MICRO_WIDGET_INTERACTION,
|
|
171
|
+
label: v.CAROUSEL_CONTROL,
|
|
172
|
+
value: O
|
|
173
173
|
},
|
|
174
|
-
[
|
|
175
|
-
action:
|
|
176
|
-
category:
|
|
177
|
-
label:
|
|
178
|
-
value:
|
|
174
|
+
[W.ON_CAROUSEL_FORWARD_SWIPE]: {
|
|
175
|
+
action: b.SWIPE_FORWARD,
|
|
176
|
+
category: L.MICRO_WIDGET_INTERACTION,
|
|
177
|
+
label: v.CAROUSEL_CONTROL,
|
|
178
|
+
value: O
|
|
179
179
|
},
|
|
180
180
|
// read more card events
|
|
181
|
-
[
|
|
182
|
-
action:
|
|
183
|
-
category:
|
|
184
|
-
label:
|
|
185
|
-
value:
|
|
181
|
+
[W.ON_VIEW_MORE_CLICKED]: {
|
|
182
|
+
action: b.MICRO_BEAT_CLICKED,
|
|
183
|
+
category: L.BEAT_INTERACTION,
|
|
184
|
+
label: v.VIEW_MORE,
|
|
185
|
+
value: O
|
|
186
186
|
},
|
|
187
|
-
[
|
|
188
|
-
action:
|
|
189
|
-
category:
|
|
190
|
-
label:
|
|
191
|
-
value:
|
|
187
|
+
[Le.ON_VIEW_MORE_VIEWED]: {
|
|
188
|
+
action: b.MICRO_BEAT_DISPLAYED,
|
|
189
|
+
category: L.BEAT_INTERACTION,
|
|
190
|
+
label: v.VIEW_MORE,
|
|
191
|
+
value: O
|
|
192
192
|
},
|
|
193
193
|
...lt(),
|
|
194
194
|
...dt(),
|
|
@@ -206,13 +206,13 @@ class pt {
|
|
|
206
206
|
ce(this);
|
|
207
207
|
}
|
|
208
208
|
initialize = async (e, n, i) => {
|
|
209
|
-
this.onAnalyticEvent = (r,
|
|
210
|
-
Ae(r,
|
|
211
|
-
throw
|
|
209
|
+
this.onAnalyticEvent = (r, l) => {
|
|
210
|
+
Ae(r, l).then((a) => a).catch((a) => {
|
|
211
|
+
throw a.status === 401 && i(), a;
|
|
212
212
|
});
|
|
213
|
-
}, this.onAnalyticPageView = (r,
|
|
214
|
-
Se(r,
|
|
215
|
-
throw
|
|
213
|
+
}, this.onAnalyticPageView = (r, l) => {
|
|
214
|
+
Se(r, l).then((a) => a).catch((a) => {
|
|
215
|
+
throw a.status === 401 && i(), a;
|
|
216
216
|
});
|
|
217
217
|
}, this.beatApi = new ge(e, n);
|
|
218
218
|
};
|
|
@@ -241,21 +241,21 @@ class mt {
|
|
|
241
241
|
});
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
|
-
const
|
|
244
|
+
const H = I.createContext(null), ut = ({
|
|
245
245
|
onEvent: t,
|
|
246
246
|
onPageview: e,
|
|
247
247
|
store: n,
|
|
248
248
|
children: i
|
|
249
|
-
}) => /* @__PURE__ */ o(
|
|
249
|
+
}) => /* @__PURE__ */ o(H.Provider, { value: { onEvent: t, onPageview: e, store: n, children: i }, children: i }), Ct = ({ beat: t }) => {
|
|
250
250
|
const { primary_category_guid: e, category_guids: n } = t, i = e || n?.[0] || Ze.UNCATEGORIZED;
|
|
251
251
|
return /* @__PURE__ */ o(ze, { categoryGuid: i, size: 32, sx: { minWidth: 32 } });
|
|
252
|
-
},
|
|
252
|
+
}, c = ({
|
|
253
253
|
avatarSx: t,
|
|
254
254
|
bgColor: e,
|
|
255
255
|
name: n,
|
|
256
256
|
iconColor: i = "primary",
|
|
257
257
|
fill: r = !0,
|
|
258
|
-
sx:
|
|
258
|
+
sx: l
|
|
259
259
|
}) => /* @__PURE__ */ o(
|
|
260
260
|
st,
|
|
261
261
|
{
|
|
@@ -266,7 +266,7 @@ const $ = g.createContext(null), ut = ({
|
|
|
266
266
|
...t
|
|
267
267
|
},
|
|
268
268
|
variant: "rounded",
|
|
269
|
-
children: /* @__PURE__ */ o($e, { color: i, fill: r, name: n, size: 20, sx:
|
|
269
|
+
children: /* @__PURE__ */ o($e, { color: i, fill: r, name: n, size: 20, sx: l })
|
|
270
270
|
}
|
|
271
271
|
), ht = ({ beat: t }) => {
|
|
272
272
|
const { category_guids: e, merchant_guids: n, primary_category_guid: i, primary_merchant_guid: r } = t;
|
|
@@ -288,26 +288,26 @@ const $ = g.createContext(null), ut = ({
|
|
|
288
288
|
return t.names?.map((i, r) => {
|
|
289
289
|
n[i] = e[r];
|
|
290
290
|
}), n;
|
|
291
|
-
}) : [] : [],
|
|
291
|
+
}) : [] : [], q = "primary", be = "success", De = "error", xe = (t) => {
|
|
292
292
|
const e = gt(t), n = Math.floor(e.length / 2);
|
|
293
|
-
if (n === 0 || n === e.length) return
|
|
293
|
+
if (n === 0 || n === e.length) return q;
|
|
294
294
|
const i = e[0]?.amount, r = e[n]?.amount;
|
|
295
|
-
return i == null || r == null ?
|
|
296
|
-
}, It = (t, e) => t < e ?
|
|
295
|
+
return i == null || r == null ? q : i > r ? De : i < r ? be : q;
|
|
296
|
+
}, It = (t, e) => t < e ? be : t > e ? De : q, Et = ({ beat: t }) => {
|
|
297
297
|
const e = se(), n = xe(t.data_series), i = e.palette[n].main;
|
|
298
|
-
return /* @__PURE__ */ o(
|
|
298
|
+
return /* @__PURE__ */ o(c, { bgColor: s(i, 0.15), iconColor: n, name: "bar_chart" });
|
|
299
299
|
}, ft = ({ beat: t }) => {
|
|
300
300
|
const e = se(), n = t.payload?.average_spend || 0;
|
|
301
301
|
let i = 0;
|
|
302
302
|
if (t.data_series?.data && t.data_series.data.length > 0) {
|
|
303
|
-
const
|
|
304
|
-
|
|
303
|
+
const a = (t.data_series.names || []).indexOf("amount");
|
|
304
|
+
a !== -1 && (i = t.data_series.data[0][a] || 0);
|
|
305
305
|
}
|
|
306
306
|
const r = It(i, n);
|
|
307
307
|
return /* @__PURE__ */ o(
|
|
308
|
-
|
|
308
|
+
c,
|
|
309
309
|
{
|
|
310
|
-
bgColor:
|
|
310
|
+
bgColor: s(e.palette[r].main, 0.15),
|
|
311
311
|
iconColor: r,
|
|
312
312
|
name: "timeline"
|
|
313
313
|
}
|
|
@@ -315,46 +315,46 @@ const $ = g.createContext(null), ut = ({
|
|
|
315
315
|
}, yt = ({ beat: t }) => {
|
|
316
316
|
const e = se(), n = xe(t.data_series), i = e.palette[n].main;
|
|
317
317
|
return /* @__PURE__ */ o(
|
|
318
|
-
|
|
318
|
+
c,
|
|
319
319
|
{
|
|
320
|
-
bgColor:
|
|
320
|
+
bgColor: s(i, 0.15),
|
|
321
321
|
fill: !1,
|
|
322
322
|
iconColor: n,
|
|
323
323
|
name: "area_chart"
|
|
324
324
|
}
|
|
325
325
|
);
|
|
326
326
|
}, At = ({ beat: t }) => /* @__PURE__ */ o(Fe, { alt: t.institutionName || "", institutionGuid: t.institutionGuid || "" }), St = {
|
|
327
|
-
0: (t, e) => /* @__PURE__ */ o(
|
|
327
|
+
0: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" }),
|
|
328
328
|
1: (t) => /* @__PURE__ */ o(Ct, { beat: t }),
|
|
329
329
|
2: (t) => /* @__PURE__ */ o(ht, { beat: t }),
|
|
330
330
|
3: (t) => /* @__PURE__ */ o(Et, { beat: t }),
|
|
331
331
|
4: (t, e) => /* @__PURE__ */ o(
|
|
332
|
-
|
|
332
|
+
c,
|
|
333
333
|
{
|
|
334
|
-
bgColor:
|
|
334
|
+
bgColor: s(e.palette.secondary.main, 0.15),
|
|
335
335
|
iconColor: "secondary",
|
|
336
336
|
name: "info"
|
|
337
337
|
}
|
|
338
338
|
),
|
|
339
|
-
5: (t, e) => /* @__PURE__ */ o(
|
|
339
|
+
5: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "campaign" }),
|
|
340
340
|
6: (t, e) => /* @__PURE__ */ o(
|
|
341
|
-
|
|
341
|
+
c,
|
|
342
342
|
{
|
|
343
|
-
bgColor:
|
|
343
|
+
bgColor: s(e.palette.success.main, 0.15),
|
|
344
344
|
iconColor: "success",
|
|
345
345
|
name: "check_circle"
|
|
346
346
|
}
|
|
347
347
|
),
|
|
348
|
-
7: (t, e) => /* @__PURE__ */ o(
|
|
349
|
-
8: (t, e) => /* @__PURE__ */ o(
|
|
350
|
-
9: (t, e) => /* @__PURE__ */ o(
|
|
348
|
+
7: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "today" }),
|
|
349
|
+
8: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "calendar_clock" }),
|
|
350
|
+
9: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "celebration" }),
|
|
351
351
|
// TODO: Waiting for the backend to accommodate the below icon types
|
|
352
|
-
10: (t, e) => /* @__PURE__ */ o(
|
|
352
|
+
10: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "problem" }),
|
|
353
353
|
11: (t, e) => /* @__PURE__ */ o(
|
|
354
|
-
|
|
354
|
+
c,
|
|
355
355
|
{
|
|
356
356
|
avatarSx: { border: `1px solid ${e.palette.secondary.main}` },
|
|
357
|
-
bgColor:
|
|
357
|
+
bgColor: s(e.palette.secondary.main, 0.15),
|
|
358
358
|
fill: !1,
|
|
359
359
|
name: "category",
|
|
360
360
|
sx: { color: "text.primary" }
|
|
@@ -362,115 +362,115 @@ const $ = g.createContext(null), ut = ({
|
|
|
362
362
|
),
|
|
363
363
|
12: (t) => /* @__PURE__ */ o(yt, { beat: t }),
|
|
364
364
|
13: () => /* @__PURE__ */ o(
|
|
365
|
-
|
|
365
|
+
c,
|
|
366
366
|
{
|
|
367
367
|
avatarSx: { border: "1px solid #EB00D0" },
|
|
368
|
-
bgColor:
|
|
368
|
+
bgColor: s("#EB00D0", 0.25),
|
|
369
369
|
fill: !1,
|
|
370
370
|
name: "money_bag",
|
|
371
371
|
sx: { color: "text.primary" }
|
|
372
372
|
}
|
|
373
373
|
),
|
|
374
374
|
14: (t, e) => /* @__PURE__ */ o(
|
|
375
|
-
|
|
375
|
+
c,
|
|
376
376
|
{
|
|
377
|
-
bgColor:
|
|
377
|
+
bgColor: s(e.palette.secondary.main, 0.15),
|
|
378
378
|
fill: !1,
|
|
379
379
|
iconColor: "secondary",
|
|
380
380
|
name: "person"
|
|
381
381
|
}
|
|
382
382
|
),
|
|
383
|
-
15: (t, e) => /* @__PURE__ */ o(
|
|
383
|
+
15: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "payment_arrow_down" }),
|
|
384
384
|
16: (t, e) => /* @__PURE__ */ o(
|
|
385
|
-
|
|
385
|
+
c,
|
|
386
386
|
{
|
|
387
|
-
bgColor:
|
|
387
|
+
bgColor: s(e.palette.success.main, 0.15),
|
|
388
388
|
name: "beenhere",
|
|
389
389
|
sx: { color: "success.main" }
|
|
390
390
|
}
|
|
391
391
|
),
|
|
392
|
-
17: (t, e) => /* @__PURE__ */ o(
|
|
392
|
+
17: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "savings" }),
|
|
393
393
|
18: (t, e) => /* @__PURE__ */ o(
|
|
394
|
-
|
|
394
|
+
c,
|
|
395
395
|
{
|
|
396
|
-
bgColor: t.payload.projected_overdraft_amount < 0 ?
|
|
396
|
+
bgColor: t.payload.projected_overdraft_amount < 0 ? s(e.palette.warning.main, 0.15) : s(e.palette.error.main, 0.15),
|
|
397
397
|
iconColor: t?.payload?.projected_overdraft_amount < 0 ? "warning" : "error",
|
|
398
398
|
name: "error"
|
|
399
399
|
}
|
|
400
400
|
),
|
|
401
|
-
19: (t, e) => /* @__PURE__ */ o(
|
|
402
|
-
20: (t, e) => /* @__PURE__ */ o(
|
|
403
|
-
21: (t, e) => /* @__PURE__ */ o(
|
|
401
|
+
19: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "finance_mode" }),
|
|
402
|
+
20: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "tips_and_updates" }),
|
|
403
|
+
21: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "currency_exchange" }),
|
|
404
404
|
22: (t, e) => /* @__PURE__ */ o(
|
|
405
|
-
|
|
405
|
+
c,
|
|
406
406
|
{
|
|
407
|
-
bgColor:
|
|
407
|
+
bgColor: s(e.palette.warning.main, 0.15),
|
|
408
408
|
name: "flag",
|
|
409
409
|
sx: { color: "warning.main" }
|
|
410
410
|
}
|
|
411
411
|
),
|
|
412
|
-
23: (t, e) => /* @__PURE__ */ o(
|
|
412
|
+
23: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "thumb_up" }),
|
|
413
413
|
24: () => /* @__PURE__ */ o(
|
|
414
|
-
|
|
414
|
+
c,
|
|
415
415
|
{
|
|
416
|
-
bgColor:
|
|
416
|
+
bgColor: s("#EB00D0", 0.15),
|
|
417
417
|
name: "attach_money",
|
|
418
418
|
sx: { color: "#EB00D0" }
|
|
419
419
|
}
|
|
420
420
|
),
|
|
421
|
-
25: (t, e) => /* @__PURE__ */ o(
|
|
421
|
+
25: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "note_stack" }),
|
|
422
422
|
26: (t, e) => /* @__PURE__ */ o(
|
|
423
|
-
|
|
423
|
+
c,
|
|
424
424
|
{
|
|
425
|
-
bgColor:
|
|
425
|
+
bgColor: s(e.palette.primary.main, 0.15),
|
|
426
426
|
fill: !1,
|
|
427
427
|
name: "price_change"
|
|
428
428
|
}
|
|
429
429
|
),
|
|
430
|
-
27: (t, e) => /* @__PURE__ */ o(
|
|
431
|
-
28: (t, e) => /* @__PURE__ */ o(
|
|
430
|
+
27: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "directions_car" }),
|
|
431
|
+
28: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "contract" }),
|
|
432
432
|
29: (t) => /* @__PURE__ */ o(ft, { beat: t }),
|
|
433
|
-
30: (t, e) => /* @__PURE__ */ o(
|
|
433
|
+
30: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "calendar_month" }),
|
|
434
434
|
31: (t, e) => /* @__PURE__ */ o(
|
|
435
|
-
|
|
435
|
+
c,
|
|
436
436
|
{
|
|
437
|
-
bgColor:
|
|
437
|
+
bgColor: s(e.palette.warning.main, 0.15),
|
|
438
438
|
name: "star_rate",
|
|
439
439
|
sx: { color: "warning.400" }
|
|
440
440
|
}
|
|
441
441
|
),
|
|
442
|
-
32: (t, e) => /* @__PURE__ */ o(
|
|
442
|
+
32: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "help" }),
|
|
443
443
|
33: (t, e) => /* @__PURE__ */ o(
|
|
444
|
-
|
|
444
|
+
c,
|
|
445
445
|
{
|
|
446
|
-
bgColor:
|
|
446
|
+
bgColor: s(e.palette.primary.main, 0.15),
|
|
447
447
|
fill: !1,
|
|
448
448
|
name: "storefront"
|
|
449
449
|
}
|
|
450
450
|
),
|
|
451
451
|
34: (t) => /* @__PURE__ */ o(At, { beat: t })
|
|
452
452
|
}, Tt = ({ beat: t }) => {
|
|
453
|
-
const e =
|
|
454
|
-
return i ? i(t, e) : /* @__PURE__ */ o(
|
|
453
|
+
const e = F(), { icon_type: n } = t, i = n != null ? St[n] : null;
|
|
454
|
+
return i ? i(t, e) : /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" });
|
|
455
455
|
}, D = () => {
|
|
456
|
-
const t =
|
|
456
|
+
const t = I.useContext(H);
|
|
457
457
|
if (!t)
|
|
458
458
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
459
459
|
return t.store.copyStore;
|
|
460
460
|
}, Rt = () => {
|
|
461
|
-
const t =
|
|
461
|
+
const t = I.useContext(H);
|
|
462
462
|
if (!t?.store?.insightsMicroWidgetStore)
|
|
463
463
|
throw new Error(
|
|
464
464
|
"useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
|
|
465
465
|
);
|
|
466
466
|
return t.store.insightsMicroWidgetStore;
|
|
467
|
-
},
|
|
468
|
-
const t =
|
|
467
|
+
}, $ = () => {
|
|
468
|
+
const t = I.useContext(H);
|
|
469
469
|
if (!t)
|
|
470
470
|
throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
|
|
471
471
|
return { onEvent: t.onEvent };
|
|
472
472
|
}, Be = () => {
|
|
473
|
-
const t =
|
|
473
|
+
const t = I.useContext(H);
|
|
474
474
|
if (!t)
|
|
475
475
|
throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
|
|
476
476
|
return { onPageview: t.onPageview };
|
|
@@ -479,49 +479,49 @@ const $ = g.createContext(null), ut = ({
|
|
|
479
479
|
STANDARD: 154,
|
|
480
480
|
XLARGE: 200,
|
|
481
481
|
XXLARGE: 248
|
|
482
|
-
}, Wt = 50, Pe = 1,
|
|
482
|
+
}, Wt = 50, Pe = 1, J = I.forwardRef(
|
|
483
483
|
function({
|
|
484
484
|
ariaLabel: e,
|
|
485
485
|
closeAriaLabel: n,
|
|
486
486
|
description: i,
|
|
487
487
|
elevation: r,
|
|
488
|
-
icon:
|
|
489
|
-
isActiveCard:
|
|
490
|
-
heightOverrides:
|
|
488
|
+
icon: l,
|
|
489
|
+
isActiveCard: a,
|
|
490
|
+
heightOverrides: u,
|
|
491
491
|
onClose: C,
|
|
492
|
-
onCardClick:
|
|
492
|
+
onCardClick: E,
|
|
493
493
|
onPrimaryAction: h,
|
|
494
494
|
onSecondaryAction: d,
|
|
495
495
|
primaryActionText: _,
|
|
496
496
|
secondaryActionText: p,
|
|
497
|
-
title:
|
|
497
|
+
title: g,
|
|
498
498
|
variant: y,
|
|
499
|
-
widthOverrides:
|
|
500
|
-
...
|
|
501
|
-
},
|
|
502
|
-
const
|
|
499
|
+
widthOverrides: S,
|
|
500
|
+
...w
|
|
501
|
+
}, T) {
|
|
502
|
+
const A = !!(h && _), R = /* @__PURE__ */ N(Re, { children: [
|
|
503
503
|
C && /* @__PURE__ */ o(
|
|
504
504
|
at,
|
|
505
505
|
{
|
|
506
506
|
"aria-label": n,
|
|
507
|
-
onClick: (
|
|
508
|
-
|
|
507
|
+
onClick: (m) => {
|
|
508
|
+
m.stopPropagation(), C?.();
|
|
509
509
|
},
|
|
510
|
-
onMouseDown: (
|
|
511
|
-
|
|
510
|
+
onMouseDown: (m) => {
|
|
511
|
+
m.stopPropagation();
|
|
512
512
|
},
|
|
513
|
-
onTouchStart: (
|
|
514
|
-
|
|
513
|
+
onTouchStart: (m) => {
|
|
514
|
+
m.stopPropagation();
|
|
515
515
|
},
|
|
516
516
|
sx: { minHeight: 40, minWidth: 40, position: "absolute", right: 4, top: 4 },
|
|
517
517
|
children: /* @__PURE__ */ o(je, {})
|
|
518
518
|
}
|
|
519
519
|
),
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
/* @__PURE__ */
|
|
522
|
-
|
|
523
|
-
/* @__PURE__ */
|
|
524
|
-
/* @__PURE__ */ o(
|
|
520
|
+
/* @__PURE__ */ N(K, { sx: { gap: 6, height: "100%", justifyContent: "space-between" }, children: [
|
|
521
|
+
/* @__PURE__ */ N(K, { sx: { flexDirection: "row", gap: 12 }, children: [
|
|
522
|
+
l && l,
|
|
523
|
+
/* @__PURE__ */ N(K, { sx: { gap: 6 }, children: [
|
|
524
|
+
/* @__PURE__ */ o(K, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: /* @__PURE__ */ o(me, { bold: !0, sx: { lineHeight: "16px" }, variant: "body1", children: g }) }),
|
|
525
525
|
/* @__PURE__ */ o(
|
|
526
526
|
me,
|
|
527
527
|
{
|
|
@@ -531,7 +531,7 @@ const $ = g.createContext(null), ut = ({
|
|
|
531
531
|
overflow: "hidden",
|
|
532
532
|
textOverflow: "ellipsis",
|
|
533
533
|
WebkitBoxOrient: "vertical",
|
|
534
|
-
WebkitLineClamp:
|
|
534
|
+
WebkitLineClamp: A ? 2 : 3,
|
|
535
535
|
"& .bold-copy": {
|
|
536
536
|
fontWeight: "bold",
|
|
537
537
|
fontFamily: "inherit"
|
|
@@ -542,31 +542,31 @@ const $ = g.createContext(null), ut = ({
|
|
|
542
542
|
)
|
|
543
543
|
] })
|
|
544
544
|
] }),
|
|
545
|
-
|
|
546
|
-
|
|
545
|
+
A && /* @__PURE__ */ N(
|
|
546
|
+
K,
|
|
547
547
|
{
|
|
548
548
|
sx: {
|
|
549
549
|
alignItems: "center",
|
|
550
550
|
flexDirection: "row",
|
|
551
551
|
height: 28,
|
|
552
552
|
pb: 4,
|
|
553
|
-
pl:
|
|
553
|
+
pl: l ? 36 : 0
|
|
554
554
|
},
|
|
555
555
|
children: [
|
|
556
|
-
|
|
556
|
+
A && /* @__PURE__ */ o(
|
|
557
557
|
Ie,
|
|
558
558
|
{
|
|
559
|
-
onClick: (
|
|
560
|
-
|
|
559
|
+
onClick: (m) => {
|
|
560
|
+
m.stopPropagation(), h?.();
|
|
561
561
|
},
|
|
562
|
-
onMouseDown: (
|
|
563
|
-
|
|
562
|
+
onMouseDown: (m) => {
|
|
563
|
+
m.stopPropagation();
|
|
564
564
|
},
|
|
565
|
-
onTouchStart: (
|
|
566
|
-
|
|
565
|
+
onTouchStart: (m) => {
|
|
566
|
+
m.stopPropagation();
|
|
567
567
|
},
|
|
568
568
|
size: "small",
|
|
569
|
-
sx: { px: 8, ml:
|
|
569
|
+
sx: { px: 8, ml: l ? 0 : -8 },
|
|
570
570
|
variant: "text",
|
|
571
571
|
children: /* @__PURE__ */ o(ue, { bold: !0, variant: "body2", children: _ })
|
|
572
572
|
}
|
|
@@ -574,14 +574,14 @@ const $ = g.createContext(null), ut = ({
|
|
|
574
574
|
!!(d && p) && /* @__PURE__ */ o(
|
|
575
575
|
Ie,
|
|
576
576
|
{
|
|
577
|
-
onClick: (
|
|
578
|
-
|
|
577
|
+
onClick: (m) => {
|
|
578
|
+
m.stopPropagation(), d?.();
|
|
579
579
|
},
|
|
580
|
-
onMouseDown: (
|
|
581
|
-
|
|
580
|
+
onMouseDown: (m) => {
|
|
581
|
+
m.stopPropagation();
|
|
582
582
|
},
|
|
583
|
-
onTouchStart: (
|
|
584
|
-
|
|
583
|
+
onTouchStart: (m) => {
|
|
584
|
+
m.stopPropagation();
|
|
585
585
|
},
|
|
586
586
|
size: "small",
|
|
587
587
|
sx: { px: 8 },
|
|
@@ -597,36 +597,36 @@ const $ = g.createContext(null), ut = ({
|
|
|
597
597
|
return /* @__PURE__ */ o(
|
|
598
598
|
nt,
|
|
599
599
|
{
|
|
600
|
-
"aria-hidden": !
|
|
600
|
+
"aria-hidden": !a,
|
|
601
601
|
"aria-label": e,
|
|
602
602
|
elevation: r,
|
|
603
|
-
ref:
|
|
603
|
+
ref: T,
|
|
604
604
|
role: "group",
|
|
605
605
|
sx: {
|
|
606
606
|
backgroundColor: "background.paper",
|
|
607
|
-
height:
|
|
608
|
-
minWidth:
|
|
607
|
+
height: u ? "100%" : 120,
|
|
608
|
+
minWidth: S ? `${S}px` : "100%",
|
|
609
609
|
position: "relative",
|
|
610
610
|
my: 1,
|
|
611
611
|
borderRadius: 2
|
|
612
612
|
},
|
|
613
|
-
tabIndex:
|
|
613
|
+
tabIndex: E || !a ? -1 : 0,
|
|
614
614
|
variant: y,
|
|
615
|
-
...
|
|
616
|
-
children:
|
|
615
|
+
...w,
|
|
616
|
+
children: E ? /* @__PURE__ */ o(
|
|
617
617
|
it,
|
|
618
618
|
{
|
|
619
619
|
component: "div",
|
|
620
|
-
onClick:
|
|
620
|
+
onClick: E,
|
|
621
621
|
sx: {
|
|
622
622
|
pb: 8,
|
|
623
623
|
pt: 16,
|
|
624
624
|
px: 16,
|
|
625
625
|
height: "100%"
|
|
626
626
|
},
|
|
627
|
-
children:
|
|
627
|
+
children: R
|
|
628
628
|
}
|
|
629
|
-
) : /* @__PURE__ */ o(rt, { sx: { pb: 8, pt: 16, px: 16, height: "100%" }, children:
|
|
629
|
+
) : /* @__PURE__ */ o(rt, { sx: { pb: 8, pt: 16, px: 16, height: "100%" }, children: R })
|
|
630
630
|
}
|
|
631
631
|
);
|
|
632
632
|
}
|
|
@@ -636,72 +636,72 @@ const $ = g.createContext(null), ut = ({
|
|
|
636
636
|
elevation: n,
|
|
637
637
|
index: i,
|
|
638
638
|
isActiveCard: r,
|
|
639
|
-
onCardClick:
|
|
640
|
-
posthog:
|
|
641
|
-
widthOverrides:
|
|
639
|
+
onCardClick: l,
|
|
640
|
+
posthog: a,
|
|
641
|
+
widthOverrides: u,
|
|
642
642
|
variant: C,
|
|
643
|
-
showIcon:
|
|
643
|
+
showIcon: E,
|
|
644
644
|
heightOverrides: h
|
|
645
645
|
}) => {
|
|
646
646
|
const { ref: d, inView: _ } = We({
|
|
647
647
|
threshold: Pe
|
|
648
|
-
}), { cardsCopy: p } = D(), { onEvent:
|
|
648
|
+
}), { cardsCopy: p } = D(), { onEvent: g } = $(), { updateBeat: y, updateOffer: S } = Rt();
|
|
649
649
|
re(() => {
|
|
650
|
-
_ && (e.has_been_displayed ?
|
|
650
|
+
_ && (e.has_been_displayed ? g(Me(e.template)) : (e.guid.startsWith("OFR") ? S({
|
|
651
651
|
...e,
|
|
652
652
|
has_been_displayed: !0
|
|
653
653
|
}) : y({
|
|
654
654
|
...e,
|
|
655
655
|
has_been_displayed: !0
|
|
656
|
-
}),
|
|
656
|
+
}), g(ve(e.template))));
|
|
657
657
|
}, [_]), re(() => {
|
|
658
658
|
if (_ && e)
|
|
659
659
|
if (e.template === "MarketingOffer") {
|
|
660
|
-
const
|
|
661
|
-
|
|
660
|
+
const T = e;
|
|
661
|
+
a?.capture("viewed_messaging_insight", {
|
|
662
662
|
template: e.template,
|
|
663
|
-
campaign_guid:
|
|
664
|
-
campaign_name:
|
|
663
|
+
campaign_guid: T.campaign_guid,
|
|
664
|
+
campaign_name: T.pulse_campaign_name
|
|
665
665
|
});
|
|
666
666
|
} else
|
|
667
|
-
|
|
667
|
+
a?.capture("viewed_insight", {
|
|
668
668
|
beat_guid: e.guid,
|
|
669
669
|
template: e.template,
|
|
670
670
|
position: i
|
|
671
671
|
});
|
|
672
672
|
}, [e, i, _]);
|
|
673
|
-
const
|
|
674
|
-
if (
|
|
675
|
-
const
|
|
676
|
-
|
|
673
|
+
const w = () => {
|
|
674
|
+
if (l && l(e), g(Ne(e.template)), e.template === "MarketingOffer") {
|
|
675
|
+
const T = e;
|
|
676
|
+
a?.capture("clicked_messaging_insight", {
|
|
677
677
|
template: e.template,
|
|
678
|
-
campaign_guid:
|
|
679
|
-
campaign_name:
|
|
678
|
+
campaign_guid: T.campaign_guid,
|
|
679
|
+
campaign_name: T.pulse_campaign_name
|
|
680
680
|
});
|
|
681
681
|
} else
|
|
682
|
-
|
|
682
|
+
a?.capture("clicked_insight", {
|
|
683
683
|
beat_guid: e.guid,
|
|
684
684
|
template: e.template,
|
|
685
685
|
position: i
|
|
686
686
|
});
|
|
687
687
|
};
|
|
688
688
|
return /* @__PURE__ */ o(
|
|
689
|
-
|
|
689
|
+
J,
|
|
690
690
|
{
|
|
691
691
|
"aria-roledescription": "slide",
|
|
692
692
|
ariaLabel: t,
|
|
693
693
|
description: e?.html_micro_description && e?.html_micro_description.length > 0 ? e.html_micro_description : e.html_description || "",
|
|
694
694
|
elevation: n,
|
|
695
695
|
heightOverrides: h,
|
|
696
|
-
icon:
|
|
696
|
+
icon: E && /* @__PURE__ */ o(Tt, { beat: e }),
|
|
697
697
|
isActiveCard: r,
|
|
698
|
-
onCardClick:
|
|
699
|
-
onPrimaryAction:
|
|
698
|
+
onCardClick: w,
|
|
699
|
+
onPrimaryAction: w,
|
|
700
700
|
primaryActionText: e.micro_call_to_action || p?.micro_card_cta,
|
|
701
701
|
ref: d,
|
|
702
702
|
title: e.micro_title && e.micro_title.length > 0 ? e.micro_title : e.title,
|
|
703
703
|
variant: C,
|
|
704
|
-
widthOverrides:
|
|
704
|
+
widthOverrides: u
|
|
705
705
|
}
|
|
706
706
|
);
|
|
707
707
|
}, Nt = ({
|
|
@@ -710,13 +710,13 @@ const $ = g.createContext(null), ut = ({
|
|
|
710
710
|
onNextClick: n,
|
|
711
711
|
onPreviousClick: i,
|
|
712
712
|
scrollRightBoundary: r,
|
|
713
|
-
scrollX:
|
|
714
|
-
shouldApplyDotAnimation:
|
|
715
|
-
visibleCardsCount:
|
|
713
|
+
scrollX: l,
|
|
714
|
+
shouldApplyDotAnimation: a = !1,
|
|
715
|
+
visibleCardsCount: u = 1
|
|
716
716
|
}) => {
|
|
717
|
-
const C =
|
|
718
|
-
return /* @__PURE__ */
|
|
719
|
-
|
|
717
|
+
const C = F(), { carouselCopy: E } = D(), h = Math.floor(l) > r || t - u + 1 === 0, d = l < 0 || e - 1 === t, _ = C.palette.grey[500], p = C.palette.primary.main;
|
|
718
|
+
return /* @__PURE__ */ N(
|
|
719
|
+
G,
|
|
720
720
|
{
|
|
721
721
|
direction: "row",
|
|
722
722
|
sx: {
|
|
@@ -734,7 +734,7 @@ const $ = g.createContext(null), ut = ({
|
|
|
734
734
|
Ce,
|
|
735
735
|
{
|
|
736
736
|
"aria-disabled": h,
|
|
737
|
-
"aria-label":
|
|
737
|
+
"aria-label": E?.previous_insight_cta_aria,
|
|
738
738
|
disabled: h,
|
|
739
739
|
onClick: i,
|
|
740
740
|
children: /* @__PURE__ */ o(
|
|
@@ -747,18 +747,18 @@ const $ = g.createContext(null), ut = ({
|
|
|
747
747
|
)
|
|
748
748
|
}
|
|
749
749
|
),
|
|
750
|
-
Array.from({ length: e }).map((
|
|
751
|
-
const
|
|
750
|
+
Array.from({ length: e }).map((g, y) => {
|
|
751
|
+
const S = y === t;
|
|
752
752
|
return /* @__PURE__ */ o(
|
|
753
753
|
ae,
|
|
754
754
|
{
|
|
755
755
|
className: "mx-insights-micro-carousel-dots",
|
|
756
756
|
sx: {
|
|
757
|
-
bgcolor:
|
|
757
|
+
bgcolor: S ? p : _,
|
|
758
758
|
height: 8,
|
|
759
759
|
mr: 8,
|
|
760
760
|
// existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
|
|
761
|
-
...
|
|
761
|
+
...a ? {
|
|
762
762
|
borderRadius: "4px",
|
|
763
763
|
transformOrigin: "center",
|
|
764
764
|
transition: "all 0.5s ease-out",
|
|
@@ -767,7 +767,7 @@ const $ = g.createContext(null), ut = ({
|
|
|
767
767
|
borderRadius: "50%",
|
|
768
768
|
p: 0
|
|
769
769
|
},
|
|
770
|
-
width:
|
|
770
|
+
width: S && a ? 24 : 8
|
|
771
771
|
}
|
|
772
772
|
},
|
|
773
773
|
`carousel-button-${y}`
|
|
@@ -777,7 +777,7 @@ const $ = g.createContext(null), ut = ({
|
|
|
777
777
|
Ce,
|
|
778
778
|
{
|
|
779
779
|
"aria-disabled": d,
|
|
780
|
-
"aria-label":
|
|
780
|
+
"aria-label": E?.next_insight_cta_aria,
|
|
781
781
|
disabled: d,
|
|
782
782
|
onClick: n,
|
|
783
783
|
children: /* @__PURE__ */ o(
|
|
@@ -799,33 +799,33 @@ const $ = g.createContext(null), ut = ({
|
|
|
799
799
|
cardWidth: n,
|
|
800
800
|
elevation: i,
|
|
801
801
|
heightOverrides: r,
|
|
802
|
-
onCardClick:
|
|
803
|
-
posthog:
|
|
804
|
-
showIcon:
|
|
802
|
+
onCardClick: l,
|
|
803
|
+
posthog: a,
|
|
804
|
+
showIcon: u,
|
|
805
805
|
variant: C
|
|
806
806
|
}) => {
|
|
807
|
-
const { carouselCopy:
|
|
807
|
+
const { carouselCopy: E } = D(), h = {
|
|
808
808
|
elevation: i,
|
|
809
809
|
heightOverrides: r,
|
|
810
|
-
posthog:
|
|
811
|
-
showIcon:
|
|
810
|
+
posthog: a,
|
|
811
|
+
showIcon: u,
|
|
812
812
|
variant: C
|
|
813
813
|
};
|
|
814
|
-
return /* @__PURE__ */
|
|
814
|
+
return /* @__PURE__ */ N(Re, { children: [
|
|
815
815
|
e.map((d, _) => {
|
|
816
|
-
const p = _ + 1,
|
|
817
|
-
|
|
816
|
+
const p = _ + 1, g = e.length + 1, y = Qe(
|
|
817
|
+
E?.card_position_in_carousel_aria,
|
|
818
818
|
p.toString(),
|
|
819
|
-
|
|
820
|
-
),
|
|
819
|
+
g.toString()
|
|
820
|
+
), S = d.micro_title && d.micro_title.length > 0, w = d.micro_description && d.micro_description.length > 0, T = S ? d.micro_title : d.title, A = w ? d.micro_description : d.description;
|
|
821
821
|
return /* @__PURE__ */ o(
|
|
822
822
|
wt,
|
|
823
823
|
{
|
|
824
|
-
ariaLabel: `${y}: ${
|
|
824
|
+
ariaLabel: `${y}: ${T}, ${A}`,
|
|
825
825
|
beat: d,
|
|
826
826
|
index: _,
|
|
827
827
|
isActiveCard: _ === t,
|
|
828
|
-
onCardClick:
|
|
828
|
+
onCardClick: l,
|
|
829
829
|
widthOverrides: n || void 0,
|
|
830
830
|
...h
|
|
831
831
|
},
|
|
@@ -836,91 +836,91 @@ const $ = g.createContext(null), ut = ({
|
|
|
836
836
|
Gt,
|
|
837
837
|
{
|
|
838
838
|
isActiveCard: t === e.length,
|
|
839
|
-
onCardClick:
|
|
839
|
+
onCardClick: l,
|
|
840
840
|
widthOverrides: n || void 0,
|
|
841
841
|
...h
|
|
842
842
|
}
|
|
843
843
|
)
|
|
844
844
|
] });
|
|
845
|
-
},
|
|
845
|
+
}, vt = ({
|
|
846
846
|
analyticsMetadata: t,
|
|
847
|
-
allowSingleCardPeeking: e
|
|
847
|
+
allowSingleCardPeeking: e,
|
|
848
848
|
beats: n = [],
|
|
849
849
|
elevation: i,
|
|
850
850
|
heightOverrides: r,
|
|
851
|
-
onCardClick:
|
|
852
|
-
posthog:
|
|
853
|
-
showCarouselControls:
|
|
851
|
+
onCardClick: l,
|
|
852
|
+
posthog: a,
|
|
853
|
+
showCarouselControls: u,
|
|
854
854
|
showIcon: C,
|
|
855
|
-
showWithMargin:
|
|
855
|
+
showWithMargin: E = !0,
|
|
856
856
|
variant: h,
|
|
857
857
|
widthOverrides: d,
|
|
858
858
|
visibleCardsCount: _ = 1
|
|
859
859
|
// Default to 1 card visible
|
|
860
860
|
}) => {
|
|
861
|
-
const p =
|
|
862
|
-
|
|
861
|
+
const p = I.useRef(null), g = I.useRef(null), [y, S] = I.useState(0), [w, T] = I.useState(null), [A, ee] = I.useState(null), [R, m] = I.useState(null), { carouselCopy: j } = D(), { onEvent: M } = $();
|
|
862
|
+
I.useEffect(() => {
|
|
863
863
|
if (p.current && !e) {
|
|
864
|
-
const
|
|
865
|
-
let
|
|
864
|
+
const f = p.current.offsetWidth, U = 8;
|
|
865
|
+
let V;
|
|
866
866
|
if (_ > 1) {
|
|
867
|
-
const _e = (
|
|
868
|
-
|
|
867
|
+
const _e = (f - (_ - 1) * U) / _ / 3;
|
|
868
|
+
V = (f - _e - (_ - 1) * U) / _;
|
|
869
869
|
} else
|
|
870
|
-
|
|
871
|
-
|
|
870
|
+
V = f;
|
|
871
|
+
m(V);
|
|
872
872
|
}
|
|
873
|
-
}, [_, p.current?.offsetWidth]),
|
|
874
|
-
const
|
|
875
|
-
if (typeof
|
|
876
|
-
const
|
|
873
|
+
}, [_, p.current?.offsetWidth]), I.useEffect(() => {
|
|
874
|
+
const f = g.current?.offsetWidth;
|
|
875
|
+
if (typeof f == "number" && e) {
|
|
876
|
+
const U = (z) => {
|
|
877
877
|
const pe = [
|
|
878
878
|
{ maxWidth: 375, cardWidth: 268 },
|
|
879
879
|
{ maxWidth: 444, cardWidth: 300 },
|
|
880
880
|
{ maxWidth: 599, cardWidth: 350 },
|
|
881
881
|
{ maxWidth: 749, cardWidth: 450 },
|
|
882
882
|
{ maxWidth: 900, cardWidth: 600 }
|
|
883
|
-
].find((ke) =>
|
|
883
|
+
].find((ke) => z <= ke.maxWidth);
|
|
884
884
|
return pe ? pe.cardWidth : 750;
|
|
885
885
|
};
|
|
886
|
-
|
|
887
|
-
const
|
|
888
|
-
const
|
|
889
|
-
typeof
|
|
886
|
+
m(U(f));
|
|
887
|
+
const V = () => {
|
|
888
|
+
const z = g.current?.offsetWidth;
|
|
889
|
+
typeof z == "number" && m(U(z));
|
|
890
890
|
};
|
|
891
|
-
return window.addEventListener("resize",
|
|
892
|
-
window.removeEventListener("resize",
|
|
891
|
+
return window.addEventListener("resize", V), () => {
|
|
892
|
+
window.removeEventListener("resize", V);
|
|
893
893
|
};
|
|
894
894
|
}
|
|
895
|
-
}, [e,
|
|
896
|
-
const
|
|
897
|
-
|
|
898
|
-
left: y +
|
|
895
|
+
}, [e, g]);
|
|
896
|
+
const P = () => {
|
|
897
|
+
M(W.ON_CAROUSEL_FORWARD_CLICK, t), p.current && R && p.current.scrollTo({
|
|
898
|
+
left: y + R + 8,
|
|
899
899
|
top: 0,
|
|
900
900
|
behavior: "smooth"
|
|
901
901
|
});
|
|
902
|
-
},
|
|
903
|
-
|
|
904
|
-
left: Math.max(0, y - (
|
|
902
|
+
}, te = () => {
|
|
903
|
+
M(W.ON_CAROUSEL_BACK_CLICK, t), p.current && R && p.current.scrollTo({
|
|
904
|
+
left: Math.max(0, y - (R + 8)),
|
|
905
905
|
top: 0,
|
|
906
906
|
behavior: "smooth"
|
|
907
907
|
});
|
|
908
|
-
},
|
|
909
|
-
p.current &&
|
|
910
|
-
},
|
|
911
|
-
if (!
|
|
912
|
-
|
|
913
|
-
},
|
|
914
|
-
|
|
915
|
-
},
|
|
916
|
-
|
|
917
|
-
},
|
|
918
|
-
return /* @__PURE__ */
|
|
919
|
-
|
|
908
|
+
}, Y = () => {
|
|
909
|
+
p.current && S(p.current.scrollLeft);
|
|
910
|
+
}, X = () => {
|
|
911
|
+
if (!A || !w) return;
|
|
912
|
+
A - w > Wt ? M(W.ON_CAROUSEL_FORWARD_SWIPE, t) : M(W.ON_CAROUSEL_BACK_SWIPE, t);
|
|
913
|
+
}, oe = (f) => {
|
|
914
|
+
T(f.targetTouches[0].clientX);
|
|
915
|
+
}, ne = (f) => {
|
|
916
|
+
T(null), ee(f.targetTouches[0].clientX);
|
|
917
|
+
}, Z = R ? Math.round(y / (R + 8)) : 0, Q = p.current ? p.current.scrollWidth - p.current.offsetWidth : 0;
|
|
918
|
+
return /* @__PURE__ */ N(
|
|
919
|
+
G,
|
|
920
920
|
{
|
|
921
|
-
"aria-label":
|
|
921
|
+
"aria-label": j?.carousel_title,
|
|
922
922
|
"aria-roledescription": "carousel",
|
|
923
|
-
ref:
|
|
923
|
+
ref: g,
|
|
924
924
|
role: "region",
|
|
925
925
|
sx: {
|
|
926
926
|
alignItems: "center",
|
|
@@ -930,13 +930,13 @@ const $ = g.createContext(null), ut = ({
|
|
|
930
930
|
},
|
|
931
931
|
children: [
|
|
932
932
|
/* @__PURE__ */ o(
|
|
933
|
-
|
|
933
|
+
G,
|
|
934
934
|
{
|
|
935
935
|
direction: "row",
|
|
936
|
-
onScroll:
|
|
937
|
-
onTouchEnd:
|
|
938
|
-
onTouchMove:
|
|
939
|
-
onTouchStart:
|
|
936
|
+
onScroll: Y,
|
|
937
|
+
onTouchEnd: X,
|
|
938
|
+
onTouchMove: oe,
|
|
939
|
+
onTouchStart: ne,
|
|
940
940
|
ref: p,
|
|
941
941
|
sx: {
|
|
942
942
|
alignItems: "center",
|
|
@@ -944,7 +944,7 @@ const $ = g.createContext(null), ut = ({
|
|
|
944
944
|
gap: 8,
|
|
945
945
|
listStyleType: "none",
|
|
946
946
|
m: 0,
|
|
947
|
-
maxWidth:
|
|
947
|
+
maxWidth: E ? "calc(100% - 32px)" : "100%",
|
|
948
948
|
overflowX: "auto",
|
|
949
949
|
overflowY: "hidden",
|
|
950
950
|
p: 0,
|
|
@@ -958,27 +958,27 @@ const $ = g.createContext(null), ut = ({
|
|
|
958
958
|
children: /* @__PURE__ */ o(
|
|
959
959
|
Mt,
|
|
960
960
|
{
|
|
961
|
-
activeCardIndex:
|
|
961
|
+
activeCardIndex: Z,
|
|
962
962
|
beats: n,
|
|
963
|
-
cardWidth:
|
|
963
|
+
cardWidth: R,
|
|
964
964
|
elevation: i,
|
|
965
965
|
heightOverrides: r,
|
|
966
|
-
onCardClick:
|
|
967
|
-
posthog:
|
|
966
|
+
onCardClick: l,
|
|
967
|
+
posthog: a,
|
|
968
968
|
showIcon: C,
|
|
969
969
|
variant: h
|
|
970
970
|
}
|
|
971
971
|
)
|
|
972
972
|
}
|
|
973
973
|
),
|
|
974
|
-
|
|
974
|
+
u && /* @__PURE__ */ o(
|
|
975
975
|
Nt,
|
|
976
976
|
{
|
|
977
|
-
currentBeatIndex:
|
|
977
|
+
currentBeatIndex: Z + _ - 1,
|
|
978
978
|
numBeats: n.length + 1,
|
|
979
|
-
onNextClick:
|
|
980
|
-
onPreviousClick:
|
|
981
|
-
scrollRightBoundary:
|
|
979
|
+
onNextClick: P,
|
|
980
|
+
onPreviousClick: te,
|
|
981
|
+
scrollRightBoundary: Q,
|
|
982
982
|
scrollX: y,
|
|
983
983
|
shouldApplyDotAnimation: e,
|
|
984
984
|
visibleCardsCount: _
|
|
@@ -987,18 +987,18 @@ const $ = g.createContext(null), ut = ({
|
|
|
987
987
|
]
|
|
988
988
|
}
|
|
989
989
|
);
|
|
990
|
-
},
|
|
990
|
+
}, Lt = k(vt), bt = ({
|
|
991
991
|
analyticsMetadata: t,
|
|
992
992
|
onCardClick: e,
|
|
993
993
|
posthog: n,
|
|
994
994
|
widthOverrides: i,
|
|
995
995
|
headerSx: r
|
|
996
996
|
}) => {
|
|
997
|
-
const { carouselCopy:
|
|
998
|
-
|
|
997
|
+
const { carouselCopy: l } = D(), { onEvent: a } = $(), u = () => {
|
|
998
|
+
a && (a(W.ON_VIEW_MORE_CLICKED, t), e(), n?.capture("clicked_view_more"));
|
|
999
999
|
};
|
|
1000
|
-
return
|
|
1001
|
-
|
|
1000
|
+
return l ? /* @__PURE__ */ N(
|
|
1001
|
+
G,
|
|
1002
1002
|
{
|
|
1003
1003
|
alignItems: "center",
|
|
1004
1004
|
direction: "row",
|
|
@@ -1011,21 +1011,21 @@ const $ = g.createContext(null), ut = ({
|
|
|
1011
1011
|
...r
|
|
1012
1012
|
},
|
|
1013
1013
|
children: [
|
|
1014
|
-
/* @__PURE__ */ o(He, { children:
|
|
1014
|
+
/* @__PURE__ */ o(He, { children: l.carousel_title }),
|
|
1015
1015
|
/* @__PURE__ */ o(
|
|
1016
1016
|
Ue,
|
|
1017
1017
|
{
|
|
1018
1018
|
endIcon: /* @__PURE__ */ o(Oe, { size: 20 }),
|
|
1019
|
-
onClick:
|
|
1019
|
+
onClick: u,
|
|
1020
1020
|
size: "small",
|
|
1021
1021
|
variant: "text",
|
|
1022
|
-
children:
|
|
1022
|
+
children: l.view_all_insights_in_full_feed_cta_aria
|
|
1023
1023
|
}
|
|
1024
1024
|
)
|
|
1025
1025
|
]
|
|
1026
1026
|
}
|
|
1027
1027
|
) : /* @__PURE__ */ o(Xe, {});
|
|
1028
|
-
}, Dt =
|
|
1028
|
+
}, Dt = k(bt), xt = ({
|
|
1029
1029
|
heightOverrides: t,
|
|
1030
1030
|
widthOverrides: e,
|
|
1031
1031
|
children: n
|
|
@@ -1052,58 +1052,58 @@ const $ = g.createContext(null), ut = ({
|
|
|
1052
1052
|
heightOverrides: n,
|
|
1053
1053
|
onCardClick: i,
|
|
1054
1054
|
posthog: r,
|
|
1055
|
-
showIcon:
|
|
1056
|
-
variant:
|
|
1055
|
+
showIcon: l,
|
|
1056
|
+
variant: a
|
|
1057
1057
|
}) => {
|
|
1058
|
-
const { cardsCopy:
|
|
1059
|
-
|
|
1060
|
-
h(
|
|
1058
|
+
const { cardsCopy: u } = D(), C = F(), { onEvent: E } = $(), { onPageview: h } = Be();
|
|
1059
|
+
I.useEffect(() => {
|
|
1060
|
+
h(B.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1061
1061
|
}, []);
|
|
1062
1062
|
const d = () => {
|
|
1063
|
-
i && i(),
|
|
1063
|
+
i && i(), E(W.ON_NO_RELEVANT_INSIGHTS_CLICKED), r?.capture("clicked_insight", {
|
|
1064
1064
|
template: "no_relevant_insights"
|
|
1065
1065
|
});
|
|
1066
1066
|
};
|
|
1067
1067
|
return /* @__PURE__ */ o(
|
|
1068
|
-
|
|
1068
|
+
J,
|
|
1069
1069
|
{
|
|
1070
1070
|
ariaLabel: t,
|
|
1071
|
-
description:
|
|
1071
|
+
description: u.no_relevant_insights_card_description,
|
|
1072
1072
|
elevation: e,
|
|
1073
1073
|
heightOverrides: n,
|
|
1074
|
-
icon:
|
|
1074
|
+
icon: l && /* @__PURE__ */ o(c, { bgColor: s(C.palette.primary.main, 0.15), name: "lightbulb" }),
|
|
1075
1075
|
onCardClick: d,
|
|
1076
1076
|
onPrimaryAction: d,
|
|
1077
|
-
primaryActionText:
|
|
1078
|
-
title:
|
|
1079
|
-
variant:
|
|
1077
|
+
primaryActionText: u.micro_card_cta,
|
|
1078
|
+
title: u.no_relevant_insights_card_title,
|
|
1079
|
+
variant: a
|
|
1080
1080
|
}
|
|
1081
1081
|
);
|
|
1082
|
-
}, co =
|
|
1082
|
+
}, co = k(Ve), Ge = ({
|
|
1083
1083
|
ariaLabel: t,
|
|
1084
1084
|
elevation: e,
|
|
1085
1085
|
heightOverrides: n,
|
|
1086
1086
|
onCardClick: i,
|
|
1087
1087
|
showIcon: r,
|
|
1088
|
-
variant:
|
|
1088
|
+
variant: l
|
|
1089
1089
|
}) => {
|
|
1090
|
-
const { onPageview:
|
|
1091
|
-
return
|
|
1092
|
-
|
|
1090
|
+
const { onPageview: a } = Be(), { zeroStateCopy: u } = D(), C = F();
|
|
1091
|
+
return I.useEffect(() => {
|
|
1092
|
+
a(B.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
|
|
1093
1093
|
}, []), /* @__PURE__ */ o(
|
|
1094
|
-
|
|
1094
|
+
J,
|
|
1095
1095
|
{
|
|
1096
1096
|
ariaLabel: t,
|
|
1097
|
-
description:
|
|
1097
|
+
description: u.carousel_zero_state_description,
|
|
1098
1098
|
elevation: e,
|
|
1099
1099
|
heightOverrides: n,
|
|
1100
|
-
icon: r && /* @__PURE__ */ o(
|
|
1100
|
+
icon: r && /* @__PURE__ */ o(c, { bgColor: s(C.palette.primary.main, 0.15), name: "lightbulb" }),
|
|
1101
1101
|
onCardClick: i,
|
|
1102
|
-
title:
|
|
1103
|
-
variant:
|
|
1102
|
+
title: u.carousel_zero_state_title,
|
|
1103
|
+
variant: l
|
|
1104
1104
|
}
|
|
1105
1105
|
);
|
|
1106
|
-
}, lo =
|
|
1106
|
+
}, lo = k(Ge), Bt = () => /* @__PURE__ */ o(
|
|
1107
1107
|
ae,
|
|
1108
1108
|
{
|
|
1109
1109
|
sx: {
|
|
@@ -1117,171 +1117,168 @@ const $ = g.createContext(null), ut = ({
|
|
|
1117
1117
|
}
|
|
1118
1118
|
), Te = {
|
|
1119
1119
|
featureVersion: "spendVsIncomeTrends"
|
|
1120
|
-
},
|
|
1120
|
+
}, x = new mt(), Pt = ({
|
|
1121
1121
|
allowSingleCardPeeking: t = !0,
|
|
1122
1122
|
areBeatsLoading: e = !1,
|
|
1123
1123
|
beats: n = [],
|
|
1124
1124
|
// This also determines the length of the carousel controls (beat.length + 1)
|
|
1125
1125
|
cardStyle: i = "elevation 1",
|
|
1126
1126
|
endpoint: r = "/",
|
|
1127
|
+
headerSx: l,
|
|
1127
1128
|
heightOverrides: a,
|
|
1128
|
-
|
|
1129
|
-
logOutUser: m = () => {
|
|
1129
|
+
logOutUser: u = () => {
|
|
1130
1130
|
},
|
|
1131
1131
|
onCardClick: C = () => {
|
|
1132
1132
|
},
|
|
1133
|
-
onEvent:
|
|
1133
|
+
onEvent: E = () => {
|
|
1134
1134
|
},
|
|
1135
1135
|
onPageview: h = () => {
|
|
1136
1136
|
},
|
|
1137
1137
|
posthog: d,
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
visibleCardsCount: Y = 1,
|
|
1147
|
-
widthOverrides: f
|
|
1138
|
+
showCarouselControls: _,
|
|
1139
|
+
showHeader: p,
|
|
1140
|
+
showIcon: g,
|
|
1141
|
+
showWithMargin: y = !0,
|
|
1142
|
+
token: S = "",
|
|
1143
|
+
userHasFullInsightFeedBeats: w,
|
|
1144
|
+
visibleCardsCount: T = 1,
|
|
1145
|
+
widthOverrides: A
|
|
1148
1146
|
}) => {
|
|
1149
|
-
const
|
|
1150
|
-
if (i === "border"
|
|
1151
|
-
if (N) return N;
|
|
1147
|
+
const R = (() => {
|
|
1148
|
+
if (i === "border") return "outlined";
|
|
1152
1149
|
if (i === "elevation 1") return "elevation";
|
|
1153
1150
|
if (i !== "flat")
|
|
1154
1151
|
return "elevation";
|
|
1155
|
-
})(),
|
|
1152
|
+
})(), m = i === "flat" ? 0 : 1, [j, M] = ie("STANDARD"), [P, te] = ie(!1), [Y, X] = ie(!1), oe = et([E], x), ne = tt([h], x);
|
|
1156
1153
|
ot({
|
|
1157
1154
|
widgetName: "InsightsMicroWidget",
|
|
1158
|
-
isLoaded:
|
|
1159
|
-
}),
|
|
1160
|
-
!
|
|
1161
|
-
}, [r,
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
}, [window.innerHeight]),
|
|
1165
|
-
|
|
1166
|
-
}, [e,
|
|
1167
|
-
const
|
|
1155
|
+
isLoaded: P
|
|
1156
|
+
}), I.useEffect(() => {
|
|
1157
|
+
!x.isInitialized && !Y && (x.initialize(r, S, u).catch(() => X(!1)), X(!0));
|
|
1158
|
+
}, [r, S, u, x.isInitialized, Y]), I.useEffect(() => {
|
|
1159
|
+
const f = window.innerHeight;
|
|
1160
|
+
f < 180 ? M("STANDARD") : f >= 180 && f < 200 ? M("LARGE") : f >= 200 && f < 248 ? M("XLARGE") : f >= 248 && M("XXLARGE");
|
|
1161
|
+
}, [window.innerHeight]), I.useEffect(() => {
|
|
1162
|
+
te(!e && x.isInitialized);
|
|
1163
|
+
}, [e, x.isInitialized]);
|
|
1164
|
+
const Z = {
|
|
1168
1165
|
heightOverrides: a,
|
|
1169
1166
|
onCardClick: C,
|
|
1170
1167
|
posthog: d,
|
|
1171
|
-
showIcon:
|
|
1172
|
-
showWithMargin:
|
|
1173
|
-
widthOverrides:
|
|
1174
|
-
},
|
|
1175
|
-
carouselSize:
|
|
1176
|
-
elevation:
|
|
1177
|
-
variant:
|
|
1168
|
+
showIcon: g,
|
|
1169
|
+
showWithMargin: y,
|
|
1170
|
+
widthOverrides: A
|
|
1171
|
+
}, Q = {
|
|
1172
|
+
carouselSize: j,
|
|
1173
|
+
elevation: m,
|
|
1174
|
+
variant: R,
|
|
1178
1175
|
heightOverrides: a,
|
|
1179
1176
|
onCardClick: C,
|
|
1180
1177
|
posthog: d,
|
|
1181
|
-
showIcon:
|
|
1178
|
+
showIcon: g
|
|
1182
1179
|
};
|
|
1183
|
-
return /* @__PURE__ */ o(ut, { onEvent:
|
|
1184
|
-
!
|
|
1185
|
-
|
|
1180
|
+
return /* @__PURE__ */ o(ut, { onEvent: oe, onPageview: ne, store: x, children: /* @__PURE__ */ N(xt, { heightOverrides: a, widthOverrides: A, children: [
|
|
1181
|
+
!P && /* @__PURE__ */ o(Bt, {}),
|
|
1182
|
+
P && p && /* @__PURE__ */ o(
|
|
1186
1183
|
Dt,
|
|
1187
1184
|
{
|
|
1188
1185
|
analyticsMetadata: Te,
|
|
1189
|
-
headerSx:
|
|
1186
|
+
headerSx: l,
|
|
1190
1187
|
onCardClick: C,
|
|
1191
1188
|
posthog: d,
|
|
1192
|
-
widthOverrides:
|
|
1189
|
+
widthOverrides: A
|
|
1193
1190
|
}
|
|
1194
1191
|
),
|
|
1195
|
-
|
|
1196
|
-
|
|
1192
|
+
P && !!n.length && /* @__PURE__ */ o(
|
|
1193
|
+
Lt,
|
|
1197
1194
|
{
|
|
1198
1195
|
allowSingleCardPeeking: t,
|
|
1199
1196
|
analyticsMetadata: Te,
|
|
1200
1197
|
beats: n,
|
|
1201
|
-
elevation:
|
|
1202
|
-
showCarouselControls:
|
|
1203
|
-
variant:
|
|
1204
|
-
visibleCardsCount:
|
|
1205
|
-
...
|
|
1198
|
+
elevation: m,
|
|
1199
|
+
showCarouselControls: _,
|
|
1200
|
+
variant: R,
|
|
1201
|
+
visibleCardsCount: T,
|
|
1202
|
+
...Z
|
|
1206
1203
|
}
|
|
1207
1204
|
),
|
|
1208
|
-
|
|
1209
|
-
|
|
1205
|
+
P && !n.length && /* @__PURE__ */ o(
|
|
1206
|
+
G,
|
|
1210
1207
|
{
|
|
1211
1208
|
sx: {
|
|
1212
1209
|
alignItems: "center",
|
|
1213
1210
|
height: a,
|
|
1214
|
-
width:
|
|
1211
|
+
width: A || "100%"
|
|
1215
1212
|
},
|
|
1216
1213
|
children: /* @__PURE__ */ o(
|
|
1217
|
-
|
|
1214
|
+
G,
|
|
1218
1215
|
{
|
|
1219
1216
|
sx: {
|
|
1220
|
-
height: `calc(${Ot[
|
|
1221
|
-
width:
|
|
1217
|
+
height: `calc(${Ot[j]}px - 44px)`,
|
|
1218
|
+
width: y ? `calc(${A}px - 32px)` : "100%"
|
|
1222
1219
|
},
|
|
1223
|
-
children:
|
|
1220
|
+
children: w ? /* @__PURE__ */ o(Ve, { ...Q }) : /* @__PURE__ */ o(Ge, { ...Q })
|
|
1224
1221
|
}
|
|
1225
1222
|
)
|
|
1226
1223
|
}
|
|
1227
1224
|
)
|
|
1228
1225
|
] }) });
|
|
1229
|
-
}, _o =
|
|
1226
|
+
}, _o = k(Pt), Vt = ({
|
|
1230
1227
|
ariaLabel: t,
|
|
1231
1228
|
elevation: e,
|
|
1232
1229
|
heightOverrides: n,
|
|
1233
1230
|
isActiveCard: i,
|
|
1234
1231
|
onCardClick: r,
|
|
1235
|
-
posthog:
|
|
1236
|
-
widthOverrides:
|
|
1237
|
-
showIcon:
|
|
1232
|
+
posthog: l,
|
|
1233
|
+
widthOverrides: a,
|
|
1234
|
+
showIcon: u,
|
|
1238
1235
|
variant: C
|
|
1239
1236
|
}) => {
|
|
1240
|
-
const
|
|
1237
|
+
const E = F(), { ref: h, inView: d } = We({
|
|
1241
1238
|
threshold: Pe
|
|
1242
|
-
}), { cardsCopy: _ } = D(), { onEvent: p } =
|
|
1239
|
+
}), { cardsCopy: _ } = D(), { onEvent: p } = $();
|
|
1243
1240
|
re(() => {
|
|
1244
|
-
d && (p(
|
|
1241
|
+
d && (p(Le.ON_VIEW_MORE_VIEWED), l?.capture("viewed_insight", {
|
|
1245
1242
|
template: "view_more_card"
|
|
1246
1243
|
}));
|
|
1247
1244
|
}, [d]);
|
|
1248
|
-
const
|
|
1249
|
-
r && r(), p(
|
|
1245
|
+
const g = () => {
|
|
1246
|
+
r && r(), p(W.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
|
|
1250
1247
|
template: "view_more_card"
|
|
1251
1248
|
});
|
|
1252
1249
|
};
|
|
1253
1250
|
return /* @__PURE__ */ o(
|
|
1254
|
-
|
|
1251
|
+
J,
|
|
1255
1252
|
{
|
|
1256
1253
|
"aria-roledescription": "slide",
|
|
1257
1254
|
ariaLabel: t,
|
|
1258
1255
|
description: _?.view_more_card_description,
|
|
1259
1256
|
elevation: e,
|
|
1260
1257
|
heightOverrides: n,
|
|
1261
|
-
icon:
|
|
1258
|
+
icon: u && /* @__PURE__ */ o(c, { bgColor: s(E.palette.primary.main, 0.15), name: "show_chart" }),
|
|
1262
1259
|
isActiveCard: i,
|
|
1263
|
-
onCardClick:
|
|
1264
|
-
onPrimaryAction:
|
|
1260
|
+
onCardClick: g,
|
|
1261
|
+
onPrimaryAction: g,
|
|
1265
1262
|
primaryActionText: _?.micro_card_cta,
|
|
1266
1263
|
ref: h,
|
|
1267
1264
|
title: _?.view_more_card_title,
|
|
1268
1265
|
variant: C,
|
|
1269
|
-
widthOverrides:
|
|
1266
|
+
widthOverrides: a
|
|
1270
1267
|
}
|
|
1271
1268
|
);
|
|
1272
|
-
}, Gt =
|
|
1269
|
+
}, Gt = k(Vt);
|
|
1273
1270
|
export {
|
|
1274
1271
|
mt as A,
|
|
1275
|
-
|
|
1272
|
+
c as B,
|
|
1276
1273
|
Dt as C,
|
|
1277
1274
|
wt as I,
|
|
1278
|
-
|
|
1275
|
+
Lt as M,
|
|
1279
1276
|
co as N,
|
|
1280
1277
|
Te as T,
|
|
1281
1278
|
Gt as V,
|
|
1282
1279
|
lo as Z,
|
|
1283
1280
|
_o as a,
|
|
1284
1281
|
ut as b,
|
|
1285
|
-
|
|
1282
|
+
J as c,
|
|
1286
1283
|
Et as d
|
|
1287
1284
|
};
|