@mx-cartographer/experiences 7.0.20-alpha.sms1 → 7.0.21-alpha-spending-mini-widget-ram1
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 +7 -2
- package/dist/{AccountDetailsContent-BzD6CDIm.mjs → AccountDetailsContent-UxSEMBo_.mjs} +1 -1
- package/dist/{ManageIncome-DcKHpJ9V.mjs → ManageIncome-DbsiKUoO.mjs} +1 -1
- package/dist/{NotificationSettings-Dhf_u5o-.mjs → NotificationSettings-BJFyyZYE.mjs} +2 -2
- package/dist/{RecurringSettings-C9r4s1Cz.mjs → RecurringSettings-Dj29piAQ.mjs} +1 -1
- package/dist/{TransactionDetails-bja6hKJk.mjs → TransactionDetails-C-z3HGTT.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-BFZShKxm.mjs → ViewMoreMicroCard-BPEzFZRG.mjs} +226 -234
- package/dist/accounts/index.es.js +2 -2
- package/dist/budgets/index.es.js +2 -2
- package/dist/cashflow/index.es.js +3 -3
- package/dist/common/index.es.js +359 -362
- package/dist/common/utils/Theme.d.ts +22 -22
- package/dist/finstrong/index.es.js +1 -1
- package/dist/goals/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/notifications/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +4 -4
- package/dist/settings/index.es.js +2 -2
- package/dist/spending/index.es.js +123 -123
- package/dist/transactions/index.es.js +2 -2
- package/dist/trends/index.es.js +6 -3
- package/package.json +1 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import u, { useState as ae, useEffect as ee } from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as Z } from "mobx-react-lite";
|
|
4
4
|
import be from "@mui/material/CssBaseline";
|
|
5
|
-
import { useTheme as
|
|
5
|
+
import { useTheme as ve, ThemeProvider as Ue } from "@mui/material/styles";
|
|
6
6
|
import ze from "@mui/material/Link";
|
|
7
7
|
import K from "@mui/material/Stack";
|
|
8
|
-
import
|
|
9
|
-
import { ChevronLeft as Ke, ChevronRight as
|
|
8
|
+
import Ee from "@mui/material/Typography";
|
|
9
|
+
import { ChevronLeft as Ke, ChevronRight as Se } from "@mxenabled/mx-icons";
|
|
10
10
|
import { L as $e } from "./Loader-DUaFpDGv.mjs";
|
|
11
11
|
import U from "@mui/material/Box";
|
|
12
|
-
import
|
|
13
|
-
import { useInView as
|
|
14
|
-
import { P as Ye, CategoryIcon as je, useTokens as
|
|
15
|
-
import
|
|
12
|
+
import ue from "@mui/material/IconButton";
|
|
13
|
+
import { useInView as Me } from "react-intersection-observer";
|
|
14
|
+
import { P as Ye, CategoryIcon as je, useTokens as Ae, MerchantLogo as Xe, Icon as J } from "@mxenabled/mxui";
|
|
15
|
+
import Oe from "@mui/material/styles/useTheme";
|
|
16
16
|
import { b as Qe } from "./Category-CevNQ03n.mjs";
|
|
17
17
|
import { css as qe } from "@mxenabled/cssinjs";
|
|
18
18
|
import { b as Je } from "./Localization-2MODESHW.mjs";
|
|
19
19
|
import et from "@mui/material/CircularProgress";
|
|
20
|
-
import { makeAutoObservable as
|
|
21
|
-
import { G as
|
|
22
|
-
import { B as
|
|
20
|
+
import { makeAutoObservable as ce, runInAction as Te } from "mobx";
|
|
21
|
+
import { G as pe, a as tt, u as it, b as ot } from "./useCombineEvents-DaDBSR_1.mjs";
|
|
22
|
+
import { B as _e } from "./BeatApi-DLu87ijw.mjs";
|
|
23
23
|
import rt from "@mui/material/Card";
|
|
24
24
|
import lt from "@mui/material/CardActions";
|
|
25
25
|
import nt from "@mui/material/CardContent";
|
|
26
26
|
import at from "@mui/material/CardHeader";
|
|
27
|
-
const
|
|
27
|
+
const Ce = {
|
|
28
28
|
featureVersion: "spendVsIncomeTrends"
|
|
29
29
|
};
|
|
30
30
|
class ct {
|
|
31
|
-
copyApi = new
|
|
31
|
+
copyApi = new pe("/", "");
|
|
32
32
|
copyObject = {};
|
|
33
33
|
namespace = "experiences";
|
|
34
34
|
translationKey = "micro_insights";
|
|
35
35
|
constructor() {
|
|
36
|
-
|
|
36
|
+
ce(this);
|
|
37
37
|
}
|
|
38
38
|
initialize = async (o, t) => {
|
|
39
|
-
this.copyApi = new
|
|
39
|
+
this.copyApi = new pe(o, t), await this.loadCopy();
|
|
40
40
|
};
|
|
41
41
|
loadCopy = async () => {
|
|
42
42
|
const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
|
@@ -71,26 +71,26 @@ const de = {
|
|
|
71
71
|
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
|
72
72
|
MonthlySpendComparison: "MonthlySpendComparison",
|
|
73
73
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
74
|
-
}, S = window?.app?.clientConfig?.microwidget_instance_id || "",
|
|
74
|
+
}, S = window?.app?.clientConfig?.microwidget_instance_id || "", fe = {
|
|
75
75
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
76
|
-
}, We = (i) => `on${i}Click`, we = (i) => `on${i}View`, xe = (i) => `on${i}ViewFirstTime`,
|
|
76
|
+
}, We = (i) => `on${i}Click`, we = (i) => `on${i}View`, xe = (i) => `on${i}ViewFirstTime`, se = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), dt = () => Object.values(de).reduce(
|
|
77
77
|
(i, o) => ({
|
|
78
78
|
...i,
|
|
79
79
|
[We(o)]: {
|
|
80
|
-
action:
|
|
81
|
-
category:
|
|
82
|
-
label:
|
|
80
|
+
action: D.MICRO_BEAT_CLICKED,
|
|
81
|
+
category: x.BEAT_INTERACTION,
|
|
82
|
+
label: se(o),
|
|
83
83
|
value: S
|
|
84
84
|
}
|
|
85
85
|
}),
|
|
86
86
|
{}
|
|
87
|
-
),
|
|
87
|
+
), st = () => Object.values(de).reduce(
|
|
88
88
|
(i, o) => ({
|
|
89
89
|
...i,
|
|
90
90
|
[we(o)]: {
|
|
91
|
-
action:
|
|
92
|
-
category:
|
|
93
|
-
label:
|
|
91
|
+
action: D.MICRO_BEAT_DISPLAYED,
|
|
92
|
+
category: x.BEAT_INTERACTION,
|
|
93
|
+
label: se(o),
|
|
94
94
|
value: S
|
|
95
95
|
}
|
|
96
96
|
}),
|
|
@@ -99,19 +99,19 @@ const de = {
|
|
|
99
99
|
(i, o) => ({
|
|
100
100
|
...i,
|
|
101
101
|
[xe(o)]: {
|
|
102
|
-
action:
|
|
103
|
-
category:
|
|
104
|
-
label:
|
|
102
|
+
action: D.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
103
|
+
category: x.BEAT_INTERACTION,
|
|
104
|
+
label: se(o),
|
|
105
105
|
value: S
|
|
106
106
|
}
|
|
107
107
|
}),
|
|
108
108
|
{}
|
|
109
|
-
),
|
|
109
|
+
), w = {
|
|
110
110
|
CARD: "Card",
|
|
111
111
|
CAROUSEL_CONTROL: "Carousel Control",
|
|
112
112
|
MICRO_WIDGET: "Micro Widget",
|
|
113
113
|
VIEW_MORE: "View More"
|
|
114
|
-
},
|
|
114
|
+
}, x = {
|
|
115
115
|
MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
|
|
116
116
|
BEAT_INTERACTION: "Beat Interaction"
|
|
117
117
|
}, M = {
|
|
@@ -123,7 +123,7 @@ const de = {
|
|
|
123
123
|
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
|
124
124
|
}, De = {
|
|
125
125
|
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
|
126
|
-
},
|
|
126
|
+
}, D = {
|
|
127
127
|
CONTROL_BACKWARD: "Control Backward",
|
|
128
128
|
CONTROL_FORWARD: "Control Forward",
|
|
129
129
|
MICRO_BEAT_CLICKED: "Micro Beat Clicked",
|
|
@@ -131,95 +131,95 @@ const de = {
|
|
|
131
131
|
MICRO_BEAT_DISPLAYED_FIRST_TIME: "Micro Beat Displayed For First Time",
|
|
132
132
|
SWIPE_BACKWARD: "Swipe Backward",
|
|
133
133
|
SWIPE_FORWARD: "Swipe Forward"
|
|
134
|
-
},
|
|
134
|
+
}, V = {
|
|
135
135
|
MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
|
|
136
136
|
MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
|
|
137
137
|
MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
|
|
138
|
-
},
|
|
139
|
-
[
|
|
140
|
-
label:
|
|
141
|
-
name:
|
|
142
|
-
path:
|
|
138
|
+
}, me = {
|
|
139
|
+
[V.MICRO_WIDGET_CAROUSEL]: {
|
|
140
|
+
label: w.MICRO_WIDGET,
|
|
141
|
+
name: V.MICRO_WIDGET_CAROUSEL,
|
|
142
|
+
path: fe.INSIGHTS_MICRO_WIDGET,
|
|
143
143
|
value: S
|
|
144
144
|
},
|
|
145
145
|
// zero state
|
|
146
|
-
[
|
|
147
|
-
label:
|
|
148
|
-
name:
|
|
149
|
-
path:
|
|
146
|
+
[V.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
|
147
|
+
label: w.MICRO_WIDGET,
|
|
148
|
+
name: V.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
|
149
|
+
path: fe.INSIGHTS_MICRO_WIDGET,
|
|
150
150
|
value: S
|
|
151
151
|
},
|
|
152
152
|
// no relevant cards
|
|
153
|
-
[
|
|
154
|
-
label:
|
|
155
|
-
name:
|
|
153
|
+
[V.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
|
154
|
+
label: w.MICRO_WIDGET,
|
|
155
|
+
name: V.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
|
156
156
|
path: "/micro-widget",
|
|
157
157
|
value: S
|
|
158
158
|
}
|
|
159
|
-
},
|
|
159
|
+
}, Re = {
|
|
160
160
|
// carousel control interaction events - clicks and swipes
|
|
161
161
|
[M.ON_CAROUSEL_BACK_CLICK]: {
|
|
162
|
-
action:
|
|
163
|
-
category:
|
|
164
|
-
label:
|
|
162
|
+
action: D.CONTROL_BACKWARD,
|
|
163
|
+
category: x.MICRO_WIDGET_INTERACTION,
|
|
164
|
+
label: w.CAROUSEL_CONTROL,
|
|
165
165
|
value: S
|
|
166
166
|
},
|
|
167
167
|
[M.ON_CAROUSEL_FORWARD_CLICK]: {
|
|
168
|
-
action:
|
|
169
|
-
category:
|
|
170
|
-
label:
|
|
168
|
+
action: D.CONTROL_FORWARD,
|
|
169
|
+
category: x.MICRO_WIDGET_INTERACTION,
|
|
170
|
+
label: w.CAROUSEL_CONTROL,
|
|
171
171
|
value: S
|
|
172
172
|
},
|
|
173
173
|
[M.ON_CAROUSEL_BACK_SWIPE]: {
|
|
174
|
-
action:
|
|
175
|
-
category:
|
|
176
|
-
label:
|
|
174
|
+
action: D.SWIPE_BACKWARD,
|
|
175
|
+
category: x.MICRO_WIDGET_INTERACTION,
|
|
176
|
+
label: w.CAROUSEL_CONTROL,
|
|
177
177
|
value: S
|
|
178
178
|
},
|
|
179
179
|
[M.ON_CAROUSEL_FORWARD_SWIPE]: {
|
|
180
|
-
action:
|
|
181
|
-
category:
|
|
182
|
-
label:
|
|
180
|
+
action: D.SWIPE_FORWARD,
|
|
181
|
+
category: x.MICRO_WIDGET_INTERACTION,
|
|
182
|
+
label: w.CAROUSEL_CONTROL,
|
|
183
183
|
value: S
|
|
184
184
|
},
|
|
185
185
|
// read more card events
|
|
186
186
|
[M.ON_VIEW_MORE_CLICKED]: {
|
|
187
|
-
action:
|
|
188
|
-
category:
|
|
189
|
-
label:
|
|
187
|
+
action: D.MICRO_BEAT_CLICKED,
|
|
188
|
+
category: x.BEAT_INTERACTION,
|
|
189
|
+
label: w.VIEW_MORE,
|
|
190
190
|
value: S
|
|
191
191
|
},
|
|
192
192
|
[De.ON_VIEW_MORE_VIEWED]: {
|
|
193
|
-
action:
|
|
194
|
-
category:
|
|
195
|
-
label:
|
|
193
|
+
action: D.MICRO_BEAT_DISPLAYED,
|
|
194
|
+
category: x.BEAT_INTERACTION,
|
|
195
|
+
label: w.VIEW_MORE,
|
|
196
196
|
value: S
|
|
197
197
|
},
|
|
198
|
-
...st(),
|
|
199
198
|
...dt(),
|
|
199
|
+
...st(),
|
|
200
200
|
...ht()
|
|
201
|
-
},
|
|
201
|
+
}, ge = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticEvent(Re[i]).then((t) => t).catch((t) => {
|
|
202
202
|
throw t;
|
|
203
|
-
}),
|
|
203
|
+
}), Ie = async (i, o) => !o || !me[i] ? null : o.sendAnalyticsPageview(me[i]).then((t) => t).catch((t) => {
|
|
204
204
|
throw t;
|
|
205
205
|
});
|
|
206
206
|
class Et {
|
|
207
|
-
onAnalyticEvent =
|
|
208
|
-
onAnalyticPageView =
|
|
209
|
-
beatApi = new
|
|
207
|
+
onAnalyticEvent = ge;
|
|
208
|
+
onAnalyticPageView = Ie;
|
|
209
|
+
beatApi = new _e("/", "");
|
|
210
210
|
constructor() {
|
|
211
|
-
|
|
211
|
+
ce(this);
|
|
212
212
|
}
|
|
213
213
|
initialize = async (o, t, r) => {
|
|
214
214
|
this.onAnalyticEvent = (l, n) => {
|
|
215
|
-
|
|
215
|
+
ge(l, n).then((a) => a).catch((a) => {
|
|
216
216
|
throw a.status === 401 && r(), a;
|
|
217
217
|
});
|
|
218
218
|
}, this.onAnalyticPageView = (l, n) => {
|
|
219
|
-
|
|
219
|
+
Ie(l, n).then((a) => a).catch((a) => {
|
|
220
220
|
throw a.status === 401 && r(), a;
|
|
221
221
|
});
|
|
222
|
-
}, this.beatApi = new
|
|
222
|
+
}, this.beatApi = new _e(o, t);
|
|
223
223
|
};
|
|
224
224
|
updateBeat = async (o) => {
|
|
225
225
|
this.beatApi.updateBeat(o);
|
|
@@ -236,7 +236,7 @@ class ut {
|
|
|
236
236
|
token = "";
|
|
237
237
|
isInitialized = !1;
|
|
238
238
|
constructor() {
|
|
239
|
-
this.copyStore = new ct(), this.insightsMicroWidgetStore = new Et(),
|
|
239
|
+
this.copyStore = new ct(), this.insightsMicroWidgetStore = new Et(), ce(this);
|
|
240
240
|
}
|
|
241
241
|
initialize = async (o, t, r) => {
|
|
242
242
|
await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, r);
|
|
@@ -259,7 +259,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
259
259
|
description: l,
|
|
260
260
|
heightOverrides: n,
|
|
261
261
|
icon: a,
|
|
262
|
-
isActiveCard:
|
|
262
|
+
isActiveCard: s,
|
|
263
263
|
isZeroState: p,
|
|
264
264
|
onCardClick: _ = () => {
|
|
265
265
|
},
|
|
@@ -270,7 +270,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
270
270
|
variant: c,
|
|
271
271
|
widthOverrides: E
|
|
272
272
|
}, R) {
|
|
273
|
-
const y
|
|
273
|
+
const [y, O] = u.useState(!1), { cardStyle: T, linkTextStyle: v } = f, k = c ? T : { border: "none", boxShadow: "none", ...T }, P = /* @__PURE__ */ e(
|
|
274
274
|
Ye,
|
|
275
275
|
{
|
|
276
276
|
className: "mx-micro-card-description",
|
|
@@ -287,19 +287,13 @@ const $ = u.createContext(null), pt = ({
|
|
|
287
287
|
WebkitLineClamp: 2,
|
|
288
288
|
wordWrap: "break-word"
|
|
289
289
|
},
|
|
290
|
-
children: l && /* @__PURE__ */ e(
|
|
291
|
-
"span",
|
|
292
|
-
{
|
|
293
|
-
dangerouslySetInnerHTML: { __html: l },
|
|
294
|
-
style: { fontFamily: y.typography.fontFamily }
|
|
295
|
-
}
|
|
296
|
-
)
|
|
290
|
+
children: l && /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: l } })
|
|
297
291
|
}
|
|
298
292
|
);
|
|
299
293
|
return /* @__PURE__ */ e(
|
|
300
294
|
U,
|
|
301
295
|
{
|
|
302
|
-
"aria-hidden": !
|
|
296
|
+
"aria-hidden": !s,
|
|
303
297
|
"aria-label": t,
|
|
304
298
|
"aria-labelledby": "divButton",
|
|
305
299
|
"aria-roledescription": "slide",
|
|
@@ -307,13 +301,12 @@ const $ = u.createContext(null), pt = ({
|
|
|
307
301
|
role: "group",
|
|
308
302
|
sx: {
|
|
309
303
|
height: "100%",
|
|
310
|
-
minWidth: E ? `${E}px` : "100%"
|
|
311
|
-
fontFamily: y.typography.fontFamily
|
|
304
|
+
minWidth: E ? `${E}px` : "100%"
|
|
312
305
|
},
|
|
313
306
|
children: /* @__PURE__ */ e(
|
|
314
307
|
U,
|
|
315
308
|
{
|
|
316
|
-
"aria-hidden": !
|
|
309
|
+
"aria-hidden": !s,
|
|
317
310
|
"aria-label": t,
|
|
318
311
|
id: "divButton",
|
|
319
312
|
onClick: () => _(),
|
|
@@ -322,11 +315,11 @@ const $ = u.createContext(null), pt = ({
|
|
|
322
315
|
ref: R,
|
|
323
316
|
role: "button",
|
|
324
317
|
sx: {
|
|
325
|
-
border:
|
|
318
|
+
border: y ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
|
|
326
319
|
borderRadius: "8px",
|
|
327
320
|
height: "100%"
|
|
328
321
|
},
|
|
329
|
-
tabIndex:
|
|
322
|
+
tabIndex: s ? 0 : -1,
|
|
330
323
|
children: /* @__PURE__ */ e(
|
|
331
324
|
rt,
|
|
332
325
|
{
|
|
@@ -338,14 +331,14 @@ const $ = u.createContext(null), pt = ({
|
|
|
338
331
|
cursor: "pointer",
|
|
339
332
|
height: n ? "100%" : 124,
|
|
340
333
|
p: 16,
|
|
341
|
-
...
|
|
334
|
+
...k,
|
|
342
335
|
"& .MuiCardHeader-avatar": {
|
|
343
336
|
color: h.iconColor,
|
|
344
337
|
mr: "8px"
|
|
345
338
|
}
|
|
346
339
|
},
|
|
347
340
|
variant: c,
|
|
348
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ g(
|
|
349
342
|
K,
|
|
350
343
|
{
|
|
351
344
|
sx: {
|
|
@@ -357,13 +350,13 @@ const $ = u.createContext(null), pt = ({
|
|
|
357
350
|
at,
|
|
358
351
|
{
|
|
359
352
|
avatar: C && a,
|
|
360
|
-
subheader: p &&
|
|
353
|
+
subheader: p && P,
|
|
361
354
|
sx: { color: h.headerColor, p: 0 },
|
|
362
355
|
title: m,
|
|
363
356
|
titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
|
|
364
357
|
}
|
|
365
358
|
),
|
|
366
|
-
/* @__PURE__ */ e(nt, { sx: { p: 0 }, children: !p &&
|
|
359
|
+
/* @__PURE__ */ e(nt, { sx: { p: 0 }, children: !p && P }),
|
|
367
360
|
!!o && /* @__PURE__ */ e(
|
|
368
361
|
lt,
|
|
369
362
|
{
|
|
@@ -374,13 +367,13 @@ const $ = u.createContext(null), pt = ({
|
|
|
374
367
|
children: /* @__PURE__ */ e(
|
|
375
368
|
U,
|
|
376
369
|
{
|
|
377
|
-
sx: (
|
|
378
|
-
color: h.buttonColor ? h.buttonColor :
|
|
370
|
+
sx: (I) => ({
|
|
371
|
+
color: h.buttonColor ? h.buttonColor : I.palette.primary.main,
|
|
372
|
+
// TODO: Per Cameron the theme package in @mxenabled/mxui will be getting a big update and this will be theme.palette.primary_main
|
|
379
373
|
fontSize: 14,
|
|
380
374
|
fontWeight: "bold",
|
|
381
375
|
px: 28,
|
|
382
|
-
|
|
383
|
-
...F
|
|
376
|
+
...v
|
|
384
377
|
}),
|
|
385
378
|
children: o
|
|
386
379
|
}
|
|
@@ -403,7 +396,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
403
396
|
i.primary_category_guid ? t(i.primary_category_guid) : i.category_guids?.length && t(i.category_guids[0]);
|
|
404
397
|
}, []), /* @__PURE__ */ e(je, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
|
|
405
398
|
}, Ct = ({ beat: i }) => {
|
|
406
|
-
const o =
|
|
399
|
+
const o = Ae(), t = ft(o);
|
|
407
400
|
return /* @__PURE__ */ e(
|
|
408
401
|
Xe,
|
|
409
402
|
{
|
|
@@ -418,7 +411,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
418
411
|
"& .kyper-categoryicon": {
|
|
419
412
|
display: "flex"
|
|
420
413
|
}
|
|
421
|
-
}), mt =
|
|
414
|
+
}), mt = Z(Ct), Rt = ({
|
|
422
415
|
color: i = "currentColor",
|
|
423
416
|
height: o,
|
|
424
417
|
size: t = 16,
|
|
@@ -453,9 +446,9 @@ const $ = u.createContext(null), pt = ({
|
|
|
453
446
|
const t = gt(i), r = t.length / 2, l = t.slice(0, r), n = t.slice(r);
|
|
454
447
|
return !l.length || !n.length ? o.Color.Primary300 : l[0].amount > n[0].amount ? o.Color.Error300 : l[0].amount < n[0].amount ? o.Color.Success300 : o.Color.Primary300;
|
|
455
448
|
}, yt = ({ beat: i }) => {
|
|
456
|
-
const o =
|
|
449
|
+
const o = Ae(), t = It(i.data_series, o);
|
|
457
450
|
return /* @__PURE__ */ e(J, { name: "bar_chart", sx: { color: t } });
|
|
458
|
-
}, Le = () => /* @__PURE__ */
|
|
451
|
+
}, Le = () => /* @__PURE__ */ g("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
459
452
|
/* @__PURE__ */ e(
|
|
460
453
|
"path",
|
|
461
454
|
{
|
|
@@ -699,7 +692,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
699
692
|
fillRule: "evenodd"
|
|
700
693
|
}
|
|
701
694
|
),
|
|
702
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ g("g", { filter: "url(#filter0_d_1565_98011)", children: [
|
|
703
696
|
/* @__PURE__ */ e("mask", { height: "22", id: "mask1_1565_98011", maskUnits: "userSpaceOnUse", width: "17", x: "16", y: "12", children: /* @__PURE__ */ e(
|
|
704
697
|
"path",
|
|
705
698
|
{
|
|
@@ -955,10 +948,10 @@ const $ = u.createContext(null), pt = ({
|
|
|
955
948
|
),
|
|
956
949
|
/* @__PURE__ */ e("path", { d: "M17.9668 31.5737H19.4947", stroke: "#E4E8EE", strokeWidth: "0.264005" })
|
|
957
950
|
] }),
|
|
958
|
-
/* @__PURE__ */
|
|
951
|
+
/* @__PURE__ */ g("g", { filter: "url(#filter1_d_1565_98011)", children: [
|
|
959
952
|
/* @__PURE__ */ e("circle", { cx: "15.0441", cy: "16.0441", fill: "#CDD3DD", r: "15.0441" }),
|
|
960
953
|
/* @__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" }) }),
|
|
961
|
-
/* @__PURE__ */
|
|
954
|
+
/* @__PURE__ */ g("g", { mask: "url(#mask2_1565_98011)", children: [
|
|
962
955
|
/* @__PURE__ */ e("rect", { fill: "white", height: "31.1359", transform: "translate(0 0.162598)", width: "31.0101" }),
|
|
963
956
|
/* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "4.52002" }),
|
|
964
957
|
/* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "17.1758" }),
|
|
@@ -1148,8 +1141,8 @@ const $ = u.createContext(null), pt = ({
|
|
|
1148
1141
|
fill: "#CDD3DD"
|
|
1149
1142
|
}
|
|
1150
1143
|
),
|
|
1151
|
-
/* @__PURE__ */
|
|
1152
|
-
/* @__PURE__ */
|
|
1144
|
+
/* @__PURE__ */ g("defs", { children: [
|
|
1145
|
+
/* @__PURE__ */ g(
|
|
1153
1146
|
"filter",
|
|
1154
1147
|
{
|
|
1155
1148
|
colorInterpolationFilters: "sRGB",
|
|
@@ -1192,7 +1185,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1192
1185
|
]
|
|
1193
1186
|
}
|
|
1194
1187
|
),
|
|
1195
|
-
/* @__PURE__ */
|
|
1188
|
+
/* @__PURE__ */ g(
|
|
1196
1189
|
"filter",
|
|
1197
1190
|
{
|
|
1198
1191
|
colorInterpolationFilters: "sRGB",
|
|
@@ -1236,8 +1229,8 @@ const $ = u.createContext(null), pt = ({
|
|
|
1236
1229
|
}
|
|
1237
1230
|
)
|
|
1238
1231
|
] })
|
|
1239
|
-
] }),
|
|
1240
|
-
const l =
|
|
1232
|
+
] }), ye = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
|
|
1233
|
+
const l = Oe(), n = o?.primary_300 ? o.primary_300 : l.palette.primary.main;
|
|
1241
1234
|
return r === 0 ? /* @__PURE__ */ e(J, { fill: !0, name: "error", sx: { color: t || n } }) : r === 1 && i ? /* @__PURE__ */ e(_t, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(mt, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(yt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(J, { name: "campaign" }) : /* @__PURE__ */ e(
|
|
1242
1235
|
J,
|
|
1243
1236
|
{
|
|
@@ -1248,7 +1241,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1248
1241
|
}
|
|
1249
1242
|
}
|
|
1250
1243
|
);
|
|
1251
|
-
},
|
|
1244
|
+
}, H = () => {
|
|
1252
1245
|
const i = u.useContext($);
|
|
1253
1246
|
if (!i)
|
|
1254
1247
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
@@ -1283,18 +1276,18 @@ const $ = u.createContext(null), pt = ({
|
|
|
1283
1276
|
showCTAColocatedWithText: l = !0,
|
|
1284
1277
|
heightOverrides: n,
|
|
1285
1278
|
index: a,
|
|
1286
|
-
isActiveCard:
|
|
1279
|
+
isActiveCard: s,
|
|
1287
1280
|
onCardClick: p,
|
|
1288
1281
|
posthog: _,
|
|
1289
1282
|
showIcon: C,
|
|
1290
1283
|
variant: f,
|
|
1291
1284
|
widthOverrides: h
|
|
1292
1285
|
}) => {
|
|
1293
|
-
const { ref: m, inView: c } =
|
|
1286
|
+
const { ref: m, inView: c } = Me({
|
|
1294
1287
|
threshold: He
|
|
1295
|
-
}), { cardsCopy: E } =
|
|
1288
|
+
}), { cardsCopy: E } = H(), { onEvent: R } = Y(), { updateBeat: y, updateOffer: O } = vt();
|
|
1296
1289
|
ee(() => {
|
|
1297
|
-
c && (t.has_been_displayed ? R(we(t.template)) : (t.guid.startsWith("OFR") ?
|
|
1290
|
+
c && (t.has_been_displayed ? R(we(t.template)) : (t.guid.startsWith("OFR") ? O({
|
|
1298
1291
|
...t,
|
|
1299
1292
|
has_been_displayed: !0
|
|
1300
1293
|
}) : y({
|
|
@@ -1317,7 +1310,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1317
1310
|
position: a
|
|
1318
1311
|
});
|
|
1319
1312
|
}, [t, a, c]);
|
|
1320
|
-
const
|
|
1313
|
+
const T = () => {
|
|
1321
1314
|
if (p && p(t), R(We(t.template)), t.template === "MarketingOffer") {
|
|
1322
1315
|
const v = t;
|
|
1323
1316
|
_?.capture("clicked_messaging_insight", {
|
|
@@ -1341,8 +1334,8 @@ const $ = u.createContext(null), pt = ({
|
|
|
1341
1334
|
description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
|
|
1342
1335
|
fontColors: { buttonColor: r?.primary_300 },
|
|
1343
1336
|
heightOverrides: n,
|
|
1344
|
-
icon:
|
|
1345
|
-
|
|
1337
|
+
icon: ye && /* @__PURE__ */ e(
|
|
1338
|
+
ye,
|
|
1346
1339
|
{
|
|
1347
1340
|
beat: t,
|
|
1348
1341
|
clientColorScheme: r,
|
|
@@ -1350,8 +1343,8 @@ const $ = u.createContext(null), pt = ({
|
|
|
1350
1343
|
type: t?.icon_type
|
|
1351
1344
|
}
|
|
1352
1345
|
),
|
|
1353
|
-
isActiveCard:
|
|
1354
|
-
onCardClick:
|
|
1346
|
+
isActiveCard: s,
|
|
1347
|
+
onCardClick: T,
|
|
1355
1348
|
posthog: _,
|
|
1356
1349
|
ref: m,
|
|
1357
1350
|
showCTAColocatedWithText: l,
|
|
@@ -1369,11 +1362,11 @@ const $ = u.createContext(null), pt = ({
|
|
|
1369
1362
|
onPreviousClick: l,
|
|
1370
1363
|
scrollRightBoundary: n,
|
|
1371
1364
|
scrollX: a,
|
|
1372
|
-
shouldApplyNewAnimation:
|
|
1365
|
+
shouldApplyNewAnimation: s = !1,
|
|
1373
1366
|
visibleCardsCount: p = 1
|
|
1374
1367
|
}) => {
|
|
1375
|
-
const _ =
|
|
1376
|
-
return /* @__PURE__ */
|
|
1368
|
+
const _ = ve(), { carouselCopy: C } = H(), f = Math.floor(a) > n || o - p + 1 === 0, h = a < 0 || t - 1 === o, m = _.palette.grey[500], c = i?.primary_300 ?? _.palette.primary.main;
|
|
1369
|
+
return /* @__PURE__ */ g(
|
|
1377
1370
|
K,
|
|
1378
1371
|
{
|
|
1379
1372
|
direction: "row",
|
|
@@ -1389,7 +1382,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1389
1382
|
},
|
|
1390
1383
|
children: [
|
|
1391
1384
|
/* @__PURE__ */ e(
|
|
1392
|
-
|
|
1385
|
+
ue,
|
|
1393
1386
|
{
|
|
1394
1387
|
"aria-disabled": f,
|
|
1395
1388
|
"aria-label": C.previous_insight_cta_aria,
|
|
@@ -1416,7 +1409,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1416
1409
|
height: 8,
|
|
1417
1410
|
mr: 8,
|
|
1418
1411
|
// existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
|
|
1419
|
-
...
|
|
1412
|
+
...s ? {
|
|
1420
1413
|
borderRadius: "4px",
|
|
1421
1414
|
transformOrigin: "center",
|
|
1422
1415
|
transition: "all 0.5s ease-out",
|
|
@@ -1425,21 +1418,21 @@ const $ = u.createContext(null), pt = ({
|
|
|
1425
1418
|
borderRadius: "50%",
|
|
1426
1419
|
p: 0
|
|
1427
1420
|
},
|
|
1428
|
-
width: y &&
|
|
1421
|
+
width: y && s ? 24 : 8
|
|
1429
1422
|
}
|
|
1430
1423
|
},
|
|
1431
1424
|
`carousel-button-${R}`
|
|
1432
1425
|
);
|
|
1433
1426
|
}),
|
|
1434
1427
|
/* @__PURE__ */ e(
|
|
1435
|
-
|
|
1428
|
+
ue,
|
|
1436
1429
|
{
|
|
1437
1430
|
"aria-disabled": h,
|
|
1438
1431
|
"aria-label": C.next_insight_cta_aria,
|
|
1439
1432
|
disabled: h,
|
|
1440
1433
|
onClick: r,
|
|
1441
1434
|
children: /* @__PURE__ */ e(
|
|
1442
|
-
|
|
1435
|
+
Se,
|
|
1443
1436
|
{
|
|
1444
1437
|
style: {
|
|
1445
1438
|
color: h ? m : c
|
|
@@ -1459,7 +1452,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1459
1452
|
showCTAColocatedWithText: l,
|
|
1460
1453
|
heightOverrides: n,
|
|
1461
1454
|
onCardClick: a,
|
|
1462
|
-
posthog:
|
|
1455
|
+
posthog: s,
|
|
1463
1456
|
shouldApplyNewAnimation: p = !1,
|
|
1464
1457
|
showCarouselControls: _,
|
|
1465
1458
|
showIcon: C,
|
|
@@ -1469,22 +1462,22 @@ const $ = u.createContext(null), pt = ({
|
|
|
1469
1462
|
visibleCardsCount: c = 1
|
|
1470
1463
|
// Default to 1 card visible
|
|
1471
1464
|
}) => {
|
|
1472
|
-
const E = u.useRef(null), R = u.useRef(null), [y,
|
|
1465
|
+
const E = u.useRef(null), R = u.useRef(null), [y, O] = u.useState(0), [T, v] = u.useState(null), [k, P] = u.useState(null), [I, z] = u.useState(null), [ie, G] = u.useState(p), { carouselCopy: F } = H(), { onEvent: b } = Y();
|
|
1473
1466
|
u.useEffect(() => {
|
|
1474
1467
|
if (E.current && !o) {
|
|
1475
|
-
const
|
|
1476
|
-
let
|
|
1468
|
+
const d = E.current.offsetWidth, A = 8;
|
|
1469
|
+
let N;
|
|
1477
1470
|
if (c > 1) {
|
|
1478
|
-
const Q = (
|
|
1479
|
-
|
|
1471
|
+
const Q = (d - (c - 1) * A) / c / 3;
|
|
1472
|
+
N = (d - Q - (c - 1) * A) / c;
|
|
1480
1473
|
} else
|
|
1481
|
-
|
|
1482
|
-
|
|
1474
|
+
N = d;
|
|
1475
|
+
z(N);
|
|
1483
1476
|
}
|
|
1484
1477
|
}, [c, E.current?.offsetWidth]), u.useEffect(() => {
|
|
1485
|
-
const
|
|
1486
|
-
if (typeof
|
|
1487
|
-
const A = (
|
|
1478
|
+
const d = R.current?.offsetWidth;
|
|
1479
|
+
if (typeof d == "number" && o) {
|
|
1480
|
+
const A = (B) => {
|
|
1488
1481
|
G(!0);
|
|
1489
1482
|
const q = [
|
|
1490
1483
|
{ maxWidth: 375, cardWidth: 268 },
|
|
@@ -1492,52 +1485,52 @@ const $ = u.createContext(null), pt = ({
|
|
|
1492
1485
|
{ maxWidth: 599, cardWidth: 350 },
|
|
1493
1486
|
{ maxWidth: 749, cardWidth: 450 },
|
|
1494
1487
|
{ maxWidth: 900, cardWidth: 600 }
|
|
1495
|
-
].find((ne) =>
|
|
1488
|
+
].find((ne) => B <= ne.maxWidth);
|
|
1496
1489
|
return q ? q.cardWidth : 750;
|
|
1497
1490
|
};
|
|
1498
|
-
|
|
1499
|
-
const
|
|
1500
|
-
const
|
|
1501
|
-
typeof
|
|
1491
|
+
z(A(d));
|
|
1492
|
+
const N = () => {
|
|
1493
|
+
const B = R.current?.offsetWidth;
|
|
1494
|
+
typeof B == "number" && z(A(B));
|
|
1502
1495
|
};
|
|
1503
|
-
return window.addEventListener("resize",
|
|
1504
|
-
window.removeEventListener("resize",
|
|
1496
|
+
return window.addEventListener("resize", N), () => {
|
|
1497
|
+
window.removeEventListener("resize", N);
|
|
1505
1498
|
};
|
|
1506
1499
|
}
|
|
1507
1500
|
}, [o, R]);
|
|
1508
1501
|
const oe = () => {
|
|
1509
|
-
b(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current &&
|
|
1510
|
-
left: y +
|
|
1502
|
+
b(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && I && E.current.scrollTo({
|
|
1503
|
+
left: y + I + 8,
|
|
1511
1504
|
top: 0,
|
|
1512
1505
|
behavior: "smooth"
|
|
1513
1506
|
});
|
|
1514
1507
|
}, re = () => {
|
|
1515
|
-
b(M.ON_CAROUSEL_BACK_CLICK, i), E.current &&
|
|
1516
|
-
left: Math.max(0, y - (
|
|
1508
|
+
b(M.ON_CAROUSEL_BACK_CLICK, i), E.current && I && E.current.scrollTo({
|
|
1509
|
+
left: Math.max(0, y - (I + 8)),
|
|
1517
1510
|
top: 0,
|
|
1518
1511
|
behavior: "smooth"
|
|
1519
1512
|
});
|
|
1520
1513
|
}, j = () => {
|
|
1521
|
-
E.current &&
|
|
1514
|
+
E.current && O(E.current.scrollLeft);
|
|
1522
1515
|
}, X = () => {
|
|
1523
|
-
if (!
|
|
1524
|
-
|
|
1525
|
-
},
|
|
1526
|
-
v(
|
|
1527
|
-
}, Be = (
|
|
1528
|
-
v(null),
|
|
1529
|
-
},
|
|
1516
|
+
if (!k || !T) return;
|
|
1517
|
+
k - T > St ? b(M.ON_CAROUSEL_FORWARD_SWIPE, i) : b(M.ON_CAROUSEL_BACK_SWIPE, i);
|
|
1518
|
+
}, L = (d) => {
|
|
1519
|
+
v(d.targetTouches[0].clientX);
|
|
1520
|
+
}, Be = (d) => {
|
|
1521
|
+
v(null), P(d.targetTouches[0].clientX);
|
|
1522
|
+
}, he = {
|
|
1530
1523
|
clientColorScheme: r,
|
|
1531
1524
|
showCTAColocatedWithText: l,
|
|
1532
1525
|
heightOverrides: n,
|
|
1533
|
-
posthog:
|
|
1526
|
+
posthog: s,
|
|
1534
1527
|
showIcon: C,
|
|
1535
1528
|
variant: h
|
|
1536
|
-
}, le =
|
|
1537
|
-
return /* @__PURE__ */
|
|
1529
|
+
}, le = I ? Math.round(y / (I + 8)) : 0, Ze = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
|
|
1530
|
+
return /* @__PURE__ */ g(
|
|
1538
1531
|
K,
|
|
1539
1532
|
{
|
|
1540
|
-
"aria-label":
|
|
1533
|
+
"aria-label": F.carousel_title,
|
|
1541
1534
|
"aria-roledescription": "carousel",
|
|
1542
1535
|
ref: R,
|
|
1543
1536
|
role: "group/region",
|
|
@@ -1548,13 +1541,13 @@ const $ = u.createContext(null), pt = ({
|
|
|
1548
1541
|
width: m || "100%"
|
|
1549
1542
|
},
|
|
1550
1543
|
children: [
|
|
1551
|
-
/* @__PURE__ */
|
|
1544
|
+
/* @__PURE__ */ g(
|
|
1552
1545
|
K,
|
|
1553
1546
|
{
|
|
1554
1547
|
direction: "row",
|
|
1555
1548
|
onScroll: j,
|
|
1556
1549
|
onTouchEnd: X,
|
|
1557
|
-
onTouchMove:
|
|
1550
|
+
onTouchMove: L,
|
|
1558
1551
|
onTouchStart: Be,
|
|
1559
1552
|
ref: E,
|
|
1560
1553
|
sx: {
|
|
@@ -1575,24 +1568,24 @@ const $ = u.createContext(null), pt = ({
|
|
|
1575
1568
|
}
|
|
1576
1569
|
},
|
|
1577
1570
|
children: [
|
|
1578
|
-
t.map((
|
|
1579
|
-
const
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
), q =
|
|
1571
|
+
t.map((d, A) => {
|
|
1572
|
+
const N = A + 1, B = t.length + 1, Q = Je(
|
|
1573
|
+
F.card_position_in_carousel_aria,
|
|
1574
|
+
N.toString(),
|
|
1575
|
+
B.toString()
|
|
1576
|
+
), q = d.micro_title && d.micro_title.length > 0, ne = d.micro_description && d.micro_description.length > 0, Pe = q ? d.micro_title : d.title, Ge = ne ? d.micro_description : d.description;
|
|
1584
1577
|
return /* @__PURE__ */ e(
|
|
1585
1578
|
Mt,
|
|
1586
1579
|
{
|
|
1587
1580
|
ariaLabel: `${Q}: ${Pe}, ${Ge}`,
|
|
1588
|
-
beat:
|
|
1581
|
+
beat: d,
|
|
1589
1582
|
index: A,
|
|
1590
1583
|
isActiveCard: A === le,
|
|
1591
1584
|
onCardClick: a,
|
|
1592
|
-
widthOverrides:
|
|
1593
|
-
...
|
|
1585
|
+
widthOverrides: I || void 0,
|
|
1586
|
+
...he
|
|
1594
1587
|
},
|
|
1595
|
-
`${
|
|
1588
|
+
`${d.guid} ${A}`
|
|
1596
1589
|
);
|
|
1597
1590
|
}),
|
|
1598
1591
|
/* @__PURE__ */ e(
|
|
@@ -1600,8 +1593,8 @@ const $ = u.createContext(null), pt = ({
|
|
|
1600
1593
|
{
|
|
1601
1594
|
isActiveCard: le === t.length,
|
|
1602
1595
|
onCardClick: a,
|
|
1603
|
-
widthOverrides:
|
|
1604
|
-
...
|
|
1596
|
+
widthOverrides: I || void 0,
|
|
1597
|
+
...he
|
|
1605
1598
|
}
|
|
1606
1599
|
)
|
|
1607
1600
|
]
|
|
@@ -1624,17 +1617,17 @@ const $ = u.createContext(null), pt = ({
|
|
|
1624
1617
|
]
|
|
1625
1618
|
}
|
|
1626
1619
|
);
|
|
1627
|
-
}, Tt =
|
|
1620
|
+
}, Tt = Z(Ot), Wt = ({
|
|
1628
1621
|
analyticsMetadata: i,
|
|
1629
1622
|
clientColorScheme: o,
|
|
1630
1623
|
onCardClick: t,
|
|
1631
1624
|
posthog: r,
|
|
1632
1625
|
widthOverrides: l
|
|
1633
1626
|
}) => {
|
|
1634
|
-
const { carouselCopy: n } =
|
|
1627
|
+
const { carouselCopy: n } = H(), { onEvent: a } = Y(), s = () => {
|
|
1635
1628
|
a && (a(M.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
|
|
1636
1629
|
};
|
|
1637
|
-
return n ? /* @__PURE__ */
|
|
1630
|
+
return n ? /* @__PURE__ */ g(
|
|
1638
1631
|
K,
|
|
1639
1632
|
{
|
|
1640
1633
|
alignItems: "center",
|
|
@@ -1647,7 +1640,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1647
1640
|
},
|
|
1648
1641
|
children: [
|
|
1649
1642
|
/* @__PURE__ */ e(
|
|
1650
|
-
|
|
1643
|
+
Ee,
|
|
1651
1644
|
{
|
|
1652
1645
|
sx: {
|
|
1653
1646
|
fontSize: 18,
|
|
@@ -1658,10 +1651,10 @@ const $ = u.createContext(null), pt = ({
|
|
|
1658
1651
|
children: n.carousel_title
|
|
1659
1652
|
}
|
|
1660
1653
|
),
|
|
1661
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ g(
|
|
1662
1655
|
ze,
|
|
1663
1656
|
{
|
|
1664
|
-
onClick:
|
|
1657
|
+
onClick: s,
|
|
1665
1658
|
sx: {
|
|
1666
1659
|
display: "flex",
|
|
1667
1660
|
alignItems: "center",
|
|
@@ -1675,7 +1668,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1675
1668
|
underline: "none",
|
|
1676
1669
|
children: [
|
|
1677
1670
|
/* @__PURE__ */ e(
|
|
1678
|
-
|
|
1671
|
+
Ee,
|
|
1679
1672
|
{
|
|
1680
1673
|
sx: {
|
|
1681
1674
|
color: o?.primary_300,
|
|
@@ -1687,19 +1680,19 @@ const $ = u.createContext(null), pt = ({
|
|
|
1687
1680
|
children: n.view_all_insights_in_full_feed_cta_aria
|
|
1688
1681
|
}
|
|
1689
1682
|
),
|
|
1690
|
-
/* @__PURE__ */ e(
|
|
1683
|
+
/* @__PURE__ */ e(Se, { sx: { color: o?.primary_300, ml: "8px" } })
|
|
1691
1684
|
]
|
|
1692
1685
|
}
|
|
1693
1686
|
)
|
|
1694
1687
|
]
|
|
1695
1688
|
}
|
|
1696
1689
|
) : /* @__PURE__ */ e($e, {});
|
|
1697
|
-
}, wt =
|
|
1690
|
+
}, wt = Z(Wt), xt = ({
|
|
1698
1691
|
heightOverrides: i,
|
|
1699
1692
|
widthOverrides: o,
|
|
1700
1693
|
children: t
|
|
1701
1694
|
}) => {
|
|
1702
|
-
const { carouselCopy: r } =
|
|
1695
|
+
const { carouselCopy: r } = H();
|
|
1703
1696
|
return /* @__PURE__ */ e(
|
|
1704
1697
|
U,
|
|
1705
1698
|
{
|
|
@@ -1710,7 +1703,6 @@ const $ = u.createContext(null), pt = ({
|
|
|
1710
1703
|
boxSizing: "border-box",
|
|
1711
1704
|
height: i ? void 0 : "100%",
|
|
1712
1705
|
m: "0 auto",
|
|
1713
|
-
touchAction: "pan-y",
|
|
1714
1706
|
width: o ? void 0 : "100%"
|
|
1715
1707
|
},
|
|
1716
1708
|
children: t
|
|
@@ -1724,13 +1716,13 @@ const $ = u.createContext(null), pt = ({
|
|
|
1724
1716
|
onCardClick: l,
|
|
1725
1717
|
posthog: n,
|
|
1726
1718
|
showIcon: a,
|
|
1727
|
-
showWithMargin:
|
|
1719
|
+
showWithMargin: s,
|
|
1728
1720
|
variant: p,
|
|
1729
1721
|
widthOverrides: _
|
|
1730
1722
|
}) => {
|
|
1731
|
-
const { cardsCopy: C } =
|
|
1723
|
+
const { cardsCopy: C } = H(), { onEvent: f } = Y(), { onPageview: h } = Ne();
|
|
1732
1724
|
u.useEffect(() => {
|
|
1733
|
-
h(
|
|
1725
|
+
h(V.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1734
1726
|
}, []);
|
|
1735
1727
|
const m = () => {
|
|
1736
1728
|
l && l(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), n?.capture("clicked_insight", {
|
|
@@ -1755,7 +1747,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1755
1747
|
card: {
|
|
1756
1748
|
height: `calc(${Ve[o]}px - 44px)`,
|
|
1757
1749
|
m: "0 auto",
|
|
1758
|
-
width:
|
|
1750
|
+
width: s ? "calc(100% - 32px)" : "100%"
|
|
1759
1751
|
},
|
|
1760
1752
|
description: {
|
|
1761
1753
|
WebkitLineClamp: 4
|
|
@@ -1770,7 +1762,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1770
1762
|
widthOverrides: _
|
|
1771
1763
|
}
|
|
1772
1764
|
);
|
|
1773
|
-
}, ci =
|
|
1765
|
+
}, ci = Z(ke), Fe = ({
|
|
1774
1766
|
ariaLabel: i,
|
|
1775
1767
|
carouselSize: o,
|
|
1776
1768
|
heightOverrides: t,
|
|
@@ -1778,12 +1770,12 @@ const $ = u.createContext(null), pt = ({
|
|
|
1778
1770
|
posthog: l,
|
|
1779
1771
|
showIcon: n,
|
|
1780
1772
|
showWithMargin: a,
|
|
1781
|
-
variant:
|
|
1773
|
+
variant: s,
|
|
1782
1774
|
widthOverrides: p
|
|
1783
1775
|
}) => {
|
|
1784
|
-
const { onPageview: _ } = Ne(), { zeroStateCopy: C } =
|
|
1776
|
+
const { onPageview: _ } = Ne(), { zeroStateCopy: C } = H();
|
|
1785
1777
|
return u.useEffect(() => {
|
|
1786
|
-
_(
|
|
1778
|
+
_(V.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
|
|
1787
1779
|
}, []), /* @__PURE__ */ e(
|
|
1788
1780
|
te,
|
|
1789
1781
|
{
|
|
@@ -1808,11 +1800,11 @@ const $ = u.createContext(null), pt = ({
|
|
|
1808
1800
|
}
|
|
1809
1801
|
},
|
|
1810
1802
|
title: C.carousel_zero_state_title,
|
|
1811
|
-
variant:
|
|
1803
|
+
variant: s,
|
|
1812
1804
|
widthOverrides: p
|
|
1813
1805
|
}
|
|
1814
1806
|
);
|
|
1815
|
-
},
|
|
1807
|
+
}, di = Z(Fe), Dt = () => /* @__PURE__ */ e(
|
|
1816
1808
|
U,
|
|
1817
1809
|
{
|
|
1818
1810
|
sx: {
|
|
@@ -1824,7 +1816,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1824
1816
|
},
|
|
1825
1817
|
children: /* @__PURE__ */ e(et, {})
|
|
1826
1818
|
}
|
|
1827
|
-
),
|
|
1819
|
+
), W = new ut(), Lt = ({
|
|
1828
1820
|
allowSingleCardPeeking: i,
|
|
1829
1821
|
areBeatsLoading: o,
|
|
1830
1822
|
beats: t = [],
|
|
@@ -1834,7 +1826,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1834
1826
|
showCTAColocatedWithText: l = !0,
|
|
1835
1827
|
endpoint: n = "/",
|
|
1836
1828
|
heightOverrides: a,
|
|
1837
|
-
logOutUser:
|
|
1829
|
+
logOutUser: s,
|
|
1838
1830
|
onCardClick: p = () => {
|
|
1839
1831
|
},
|
|
1840
1832
|
onEvent: _ = () => {
|
|
@@ -1848,22 +1840,22 @@ const $ = u.createContext(null), pt = ({
|
|
|
1848
1840
|
showHeader: E,
|
|
1849
1841
|
showIcon: R,
|
|
1850
1842
|
showWithMargin: y = !0,
|
|
1851
|
-
token:
|
|
1852
|
-
useDarkMode:
|
|
1843
|
+
token: O = "",
|
|
1844
|
+
useDarkMode: T,
|
|
1853
1845
|
userHasFullInsightFeedBeats: v,
|
|
1854
|
-
variant:
|
|
1855
|
-
visibleCardsCount:
|
|
1856
|
-
widthOverrides:
|
|
1846
|
+
variant: k,
|
|
1847
|
+
visibleCardsCount: P = 1,
|
|
1848
|
+
widthOverrides: I
|
|
1857
1849
|
}) => {
|
|
1858
|
-
const
|
|
1850
|
+
const z = ve(), [ie, G] = ae("STANDARD"), [F, b] = ae(!1), oe = it([_], W), re = ot([C], W);
|
|
1859
1851
|
u.useEffect(() => {
|
|
1860
|
-
|
|
1861
|
-
}, [n,
|
|
1862
|
-
const
|
|
1863
|
-
|
|
1852
|
+
W.isInitialized || W.initialize(n, O, s);
|
|
1853
|
+
}, [n, O, s, W.isInitialized]), u.useEffect(() => {
|
|
1854
|
+
const L = window.innerHeight;
|
|
1855
|
+
L < 180 ? G("STANDARD") : L >= 180 && L < 200 ? G("LARGE") : L >= 200 && L < 248 ? G("XLARGE") : L >= 248 && G("XXLARGE");
|
|
1864
1856
|
}, [window.innerHeight]), u.useEffect(() => {
|
|
1865
|
-
b(!o &&
|
|
1866
|
-
}, [o,
|
|
1857
|
+
b(!o && W.isInitialized);
|
|
1858
|
+
}, [o, W.isInitialized]);
|
|
1867
1859
|
const j = {
|
|
1868
1860
|
showCTAColocatedWithText: l,
|
|
1869
1861
|
heightOverrides: a,
|
|
@@ -1871,49 +1863,49 @@ const $ = u.createContext(null), pt = ({
|
|
|
1871
1863
|
posthog: f,
|
|
1872
1864
|
showIcon: R,
|
|
1873
1865
|
showWithMargin: y,
|
|
1874
|
-
useDarkMode:
|
|
1875
|
-
widthOverrides:
|
|
1866
|
+
useDarkMode: T,
|
|
1867
|
+
widthOverrides: I
|
|
1876
1868
|
}, X = {
|
|
1877
1869
|
carouselSize: ie,
|
|
1878
|
-
variant:
|
|
1870
|
+
variant: k,
|
|
1879
1871
|
...j
|
|
1880
1872
|
};
|
|
1881
1873
|
return (
|
|
1882
1874
|
// The Theme provider must wrap the component so that the styles don't break when imported into other applications.
|
|
1883
|
-
/* @__PURE__ */
|
|
1875
|
+
/* @__PURE__ */ g(Ue, { theme: z, children: [
|
|
1884
1876
|
/* @__PURE__ */ e(be, {}),
|
|
1885
|
-
/* @__PURE__ */ e(pt, { onEvent: oe, onPageview: re, store:
|
|
1886
|
-
(o || !
|
|
1887
|
-
|
|
1877
|
+
/* @__PURE__ */ e(pt, { onEvent: oe, onPageview: re, store: W, children: /* @__PURE__ */ g(xt, { heightOverrides: a, widthOverrides: I, children: [
|
|
1878
|
+
(o || !W.isInitialized) && /* @__PURE__ */ e(Dt, {}),
|
|
1879
|
+
F && E && /* @__PURE__ */ e(
|
|
1888
1880
|
wt,
|
|
1889
1881
|
{
|
|
1890
|
-
analyticsMetadata:
|
|
1882
|
+
analyticsMetadata: Ce,
|
|
1891
1883
|
clientColorScheme: r,
|
|
1892
1884
|
onCardClick: p,
|
|
1893
1885
|
posthog: f,
|
|
1894
|
-
widthOverrides:
|
|
1886
|
+
widthOverrides: I
|
|
1895
1887
|
}
|
|
1896
1888
|
),
|
|
1897
|
-
|
|
1889
|
+
F && !!t.length && /* @__PURE__ */ e(
|
|
1898
1890
|
Tt,
|
|
1899
1891
|
{
|
|
1900
1892
|
allowSingleCardPeeking: i,
|
|
1901
|
-
analyticsMetadata:
|
|
1893
|
+
analyticsMetadata: Ce,
|
|
1902
1894
|
beats: t,
|
|
1903
1895
|
clientColorScheme: r,
|
|
1904
1896
|
shouldApplyNewAnimation: h,
|
|
1905
1897
|
showCarouselControls: c,
|
|
1906
|
-
variant: m ?
|
|
1907
|
-
visibleCardsCount:
|
|
1898
|
+
variant: m ? k : void 0,
|
|
1899
|
+
visibleCardsCount: P,
|
|
1908
1900
|
...j
|
|
1909
1901
|
}
|
|
1910
1902
|
),
|
|
1911
|
-
|
|
1912
|
-
|
|
1903
|
+
F && !t.length && v && /* @__PURE__ */ e(ke, { clientColorScheme: r, ...X }),
|
|
1904
|
+
F && !t.length && !v && /* @__PURE__ */ e(Fe, { ...X })
|
|
1913
1905
|
] }) })
|
|
1914
1906
|
] })
|
|
1915
1907
|
);
|
|
1916
|
-
},
|
|
1908
|
+
}, si = Z(Lt), Nt = ({
|
|
1917
1909
|
isActiveCard: i,
|
|
1918
1910
|
ariaLabel: o,
|
|
1919
1911
|
clientColorScheme: t,
|
|
@@ -1921,12 +1913,12 @@ const $ = u.createContext(null), pt = ({
|
|
|
1921
1913
|
onCardClick: l,
|
|
1922
1914
|
posthog: n,
|
|
1923
1915
|
showIcon: a,
|
|
1924
|
-
variant:
|
|
1916
|
+
variant: s,
|
|
1925
1917
|
widthOverrides: p
|
|
1926
1918
|
}) => {
|
|
1927
|
-
const _ =
|
|
1919
|
+
const _ = Oe(), { ref: C, inView: f } = Me({
|
|
1928
1920
|
threshold: He
|
|
1929
|
-
}), { cardsCopy: h } =
|
|
1921
|
+
}), { cardsCopy: h } = H(), { onEvent: m } = Y();
|
|
1930
1922
|
ee(() => {
|
|
1931
1923
|
f && (m(De.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
|
|
1932
1924
|
template: "view_more_card"
|
|
@@ -1952,11 +1944,11 @@ const $ = u.createContext(null), pt = ({
|
|
|
1952
1944
|
ref: C,
|
|
1953
1945
|
showIcon: a,
|
|
1954
1946
|
title: h.view_more_card_title,
|
|
1955
|
-
variant:
|
|
1947
|
+
variant: s,
|
|
1956
1948
|
widthOverrides: p
|
|
1957
1949
|
}
|
|
1958
1950
|
);
|
|
1959
|
-
}, Vt =
|
|
1951
|
+
}, Vt = Z(Nt);
|
|
1960
1952
|
export {
|
|
1961
1953
|
ut as A,
|
|
1962
1954
|
Mt as B,
|
|
@@ -1964,11 +1956,11 @@ export {
|
|
|
1964
1956
|
pt as I,
|
|
1965
1957
|
Tt as M,
|
|
1966
1958
|
ci as N,
|
|
1967
|
-
|
|
1959
|
+
Ce as T,
|
|
1968
1960
|
Vt as V,
|
|
1969
|
-
|
|
1961
|
+
di as Z,
|
|
1970
1962
|
te as a,
|
|
1971
|
-
|
|
1963
|
+
si as b,
|
|
1972
1964
|
Rt as c,
|
|
1973
1965
|
yt as d,
|
|
1974
1966
|
Le as e
|