@mx-cartographer/experiences 7.4.1 → 7.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{AccountDetailsContent-gke-5zMF.mjs → AccountDetailsContent-COMjOzwr.mjs} +5 -5
  3. package/dist/{AccountDetailsHeader-CRzfuFA2.mjs → AccountDetailsHeader-Cbi5G6fJ.mjs} +2 -2
  4. package/dist/{AccountFields-CPkGZ3SD.mjs → AccountFields-Cd_nOWmf.mjs} +1 -1
  5. package/dist/{AccountListItem-D4uG9yC-.mjs → AccountListItem-DxY4cCF1.mjs} +2 -2
  6. package/dist/{BudgetUtil-wjoNuj7B.mjs → BudgetUtil-Df2nII9u.mjs} +1 -1
  7. package/dist/{CurrencyInput-xH-hqry9.mjs → CurrencyInput-BFKcs-_K.mjs} +1 -1
  8. package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
  9. package/dist/{FinstrongStore-CfD6bbJk.mjs → FinstrongStore-BnBCtVTl.mjs} +1 -1
  10. package/dist/{GoalStore-j6QYHgEa.mjs → GoalStore-CrNhjvNc.mjs} +1 -1
  11. package/dist/{LineChart-DttMO7uS.mjs → LineChart-bc1D9xBE.mjs} +81 -81
  12. package/dist/{ManageIncome-CU5C0AeO.mjs → ManageIncome-A69EUO5u.mjs} +3 -3
  13. package/dist/{NotificationSettings-DI5B1spM.mjs → NotificationSettings-CNmJWVeI.mjs} +2 -2
  14. package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
  15. package/dist/{OriginalBalanceAction-CCmnsd7y.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +2 -2
  16. package/dist/{RecurringSettings-Cm5Bqcai.mjs → RecurringSettings-B0uObPlD.mjs} +2 -2
  17. package/dist/{RecurringTransactions-CngsRZ3K.mjs → RecurringTransactions-BqijW_8S.mjs} +1 -1
  18. package/dist/{RecurringTransactionsStore-Bc1wCiNB.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +1 -1
  19. package/dist/{SpendingLegend-B2BYr8B4.mjs → SpendingLegend-BbrZWbFX.mjs} +2 -2
  20. package/dist/{TransactionDetails-CtbBBSoU.mjs → TransactionDetails-COH0OKNG.mjs} +2 -2
  21. package/dist/{ViewMoreMicroCard-dHzKolxh.mjs → ViewMoreMicroCard-C0832BMe.mjs} +420 -413
  22. package/dist/accounts/index.es.js +8 -8
  23. package/dist/budgets/index.es.js +5 -5
  24. package/dist/cashflow/index.es.js +7 -7
  25. package/dist/common/index.es.js +11 -11
  26. package/dist/debts/index.es.js +4 -4
  27. package/dist/finstrong/index.es.js +417 -413
  28. package/dist/goals/index.es.js +7 -7
  29. package/dist/investments/index.es.js +1 -1
  30. package/dist/microinsights/index.es.js +1 -1
  31. package/dist/microinsights/interfaces.d.ts +0 -1
  32. package/dist/networth/index.es.js +3 -3
  33. package/dist/notifications/index.es.js +1 -1
  34. package/dist/recurringtransactions/index.es.js +8 -8
  35. package/dist/settings/index.es.js +2 -2
  36. package/dist/spending/index.es.js +3 -3
  37. package/dist/transactions/index.es.js +4 -4
  38. package/dist/trends/index.es.js +319 -320
  39. package/package.json +1 -1
@@ -1,23 +1,23 @@
1
- import { jsx as e, jsxs as I, Fragment as De } from "react/jsx-runtime";
2
- import p, { useEffect as te, useState as ee } from "react";
3
- import { observer as Z } from "mobx-react-lite";
4
- import B from "@mui/material/Stack";
1
+ import { jsx as e, jsxs as g, Fragment as De } from "react/jsx-runtime";
2
+ import u, { useEffect as ee, useState as J } from "react";
3
+ import { observer as P } from "mobx-react-lite";
4
+ import k from "@mui/material/Stack";
5
5
  import xe from "@mui/material/Button";
6
6
  import Le from "@mui/material/Typography";
7
- import { BarChart as Ve, Error as se, Campaign as Ne, ChevronLeft as He, ChevronRight as me } from "@mxenabled/mx-icons";
7
+ import { BarChart as Ve, Error as ae, Campaign as Ne, ChevronLeft as He, ChevronRight as fe } from "@mxenabled/mx-icons";
8
8
  import { L as ke } from "./Loader-DUaFpDGv.mjs";
9
- import F from "@mui/material/Box";
10
- import ce from "@mui/material/IconButton";
9
+ import Z from "@mui/material/Box";
10
+ import se from "@mui/material/IconButton";
11
11
  import { useTheme as Fe } from "@mui/material/styles";
12
- import { useInView as Re } from "react-intersection-observer";
12
+ import { useInView as me } from "react-intersection-observer";
13
13
  import { P as Be, CategoryIcon as Ze, MerchantLogo as Pe } from "@mxenabled/mxui";
14
14
  import { b as be } from "./Category-CevNQ03n.mjs";
15
- import ie from "@mui/material/styles/useTheme";
15
+ import te from "@mui/material/styles/useTheme";
16
16
  import { b as Ge } from "./Localization-2MODESHW.mjs";
17
17
  import Ue from "@mui/material/CircularProgress";
18
- import { makeAutoObservable as oe, runInAction as ge } from "mobx";
19
- import { G as de, a as ze, u as Ke, b as $e } from "./useCombineEvents-CRwX-qWE.mjs";
20
- import { B as he } from "./BeatApi-De2IaqH2.mjs";
18
+ import { makeAutoObservable as ie, runInAction as Re } from "mobx";
19
+ import { G as ce, a as ze, u as Ke, b as $e } from "./useCombineEvents-CRwX-qWE.mjs";
20
+ import { B as de } from "./BeatApi-De2IaqH2.mjs";
21
21
  import Ye from "@mui/material/Card";
22
22
  import je from "@mui/material/CardActions";
23
23
  import Xe from "@mui/material/CardContent";
@@ -26,22 +26,22 @@ const Ee = {
26
26
  featureVersion: "spendVsIncomeTrends"
27
27
  };
28
28
  class qe {
29
- copyApi = new de("/", "");
29
+ copyApi = new ce("/", "");
30
30
  copyObject = {};
31
31
  namespace = "experiences";
32
32
  translationKey = "micro_insights";
33
33
  constructor() {
34
- oe(this);
34
+ ie(this);
35
35
  }
36
36
  // NOTE: Not sure if this is special case, but other stores have this deprecation todo
37
37
  // DEPRECATED: Initialize api in constructor and use loadCopy instead
38
38
  // TODO: Remove this function
39
39
  initialize = async (o, t) => {
40
- this.copyApi = new de(o, t), await this.loadCopy();
40
+ this.copyApi = new ce(o, t), await this.loadCopy();
41
41
  };
42
42
  loadCopy = async () => {
43
43
  const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
44
- ge(() => {
44
+ Re(() => {
45
45
  this.copyObject = o[this.translationKey];
46
46
  });
47
47
  };
@@ -55,7 +55,7 @@ class qe {
55
55
  return this.copyObject.zero_state;
56
56
  }
57
57
  }
58
- const le = {
58
+ const oe = {
59
59
  BillAmountNotStandard: "BillAmountNotStandard",
60
60
  CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
61
61
  DuplicatePaymentV2: "DuplicatePaymentV2",
@@ -72,59 +72,59 @@ const le = {
72
72
  WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
73
73
  MonthlySpendComparison: "MonthlySpendComparison",
74
74
  MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
75
- }, v = window?.app?.clientConfig?.microwidget_instance_id || "", ue = {
75
+ }, v = window?.app?.clientConfig?.microwidget_instance_id || "", he = {
76
76
  INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
77
- }, Ie = (i) => `on${i}Click`, ve = (i) => `on${i}View`, ye = (i) => `on${i}ViewFirstTime`, re = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), Je = () => Object.values(le).reduce(
77
+ }, ge = (i) => `on${i}Click`, Ie = (i) => `on${i}View`, ye = (i) => `on${i}ViewFirstTime`, le = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), Je = () => Object.values(oe).reduce(
78
78
  (i, o) => ({
79
79
  ...i,
80
- [Ie(o)]: {
81
- action: x.MICRO_BEAT_CLICKED,
82
- category: D.BEAT_INTERACTION,
83
- label: re(o),
80
+ [ge(o)]: {
81
+ action: L.MICRO_BEAT_CLICKED,
82
+ category: x.BEAT_INTERACTION,
83
+ label: le(o),
84
84
  value: v
85
85
  }
86
86
  }),
87
87
  {}
88
- ), et = () => Object.values(le).reduce(
88
+ ), et = () => Object.values(oe).reduce(
89
89
  (i, o) => ({
90
90
  ...i,
91
- [ve(o)]: {
92
- action: x.MICRO_BEAT_DISPLAYED,
93
- category: D.BEAT_INTERACTION,
94
- label: re(o),
91
+ [Ie(o)]: {
92
+ action: L.MICRO_BEAT_DISPLAYED,
93
+ category: x.BEAT_INTERACTION,
94
+ label: le(o),
95
95
  value: v
96
96
  }
97
97
  }),
98
98
  {}
99
- ), tt = () => Object.values(le).reduce(
99
+ ), tt = () => Object.values(oe).reduce(
100
100
  (i, o) => ({
101
101
  ...i,
102
102
  [ye(o)]: {
103
- action: x.MICRO_BEAT_DISPLAYED_FIRST_TIME,
104
- category: D.BEAT_INTERACTION,
105
- label: re(o),
103
+ action: L.MICRO_BEAT_DISPLAYED_FIRST_TIME,
104
+ category: x.BEAT_INTERACTION,
105
+ label: le(o),
106
106
  value: v
107
107
  }
108
108
  }),
109
109
  {}
110
- ), w = {
110
+ ), D = {
111
111
  CARD: "Card",
112
112
  CAROUSEL_CONTROL: "Carousel Control",
113
113
  MICRO_WIDGET: "Micro Widget",
114
114
  VIEW_MORE: "View More"
115
- }, D = {
115
+ }, x = {
116
116
  MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
117
117
  BEAT_INTERACTION: "Beat Interaction"
118
- }, y = {
118
+ }, S = {
119
119
  ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
120
120
  ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
121
121
  ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
122
122
  ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
123
123
  ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
124
124
  ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
125
- }, Se = {
125
+ }, ve = {
126
126
  ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
127
- }, x = {
127
+ }, L = {
128
128
  CONTROL_BACKWARD: "Control Backward",
129
129
  CONTROL_FORWARD: "Control Forward",
130
130
  MICRO_BEAT_CLICKED: "Micro Beat Clicked",
@@ -136,91 +136,91 @@ const le = {
136
136
  MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
137
137
  MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
138
138
  MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
139
- }, pe = {
139
+ }, ue = {
140
140
  [H.MICRO_WIDGET_CAROUSEL]: {
141
- label: w.MICRO_WIDGET,
141
+ label: D.MICRO_WIDGET,
142
142
  name: H.MICRO_WIDGET_CAROUSEL,
143
- path: ue.INSIGHTS_MICRO_WIDGET,
143
+ path: he.INSIGHTS_MICRO_WIDGET,
144
144
  value: v
145
145
  },
146
146
  // zero state
147
147
  [H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
148
- label: w.MICRO_WIDGET,
148
+ label: D.MICRO_WIDGET,
149
149
  name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
150
- path: ue.INSIGHTS_MICRO_WIDGET,
150
+ path: he.INSIGHTS_MICRO_WIDGET,
151
151
  value: v
152
152
  },
153
153
  // no relevant cards
154
154
  [H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
155
- label: w.MICRO_WIDGET,
155
+ label: D.MICRO_WIDGET,
156
156
  name: H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
157
157
  path: "/micro-widget",
158
158
  value: v
159
159
  }
160
- }, _e = {
160
+ }, pe = {
161
161
  // carousel control interaction events - clicks and swipes
162
- [y.ON_CAROUSEL_BACK_CLICK]: {
163
- action: x.CONTROL_BACKWARD,
164
- category: D.MICRO_WIDGET_INTERACTION,
165
- label: w.CAROUSEL_CONTROL,
162
+ [S.ON_CAROUSEL_BACK_CLICK]: {
163
+ action: L.CONTROL_BACKWARD,
164
+ category: x.MICRO_WIDGET_INTERACTION,
165
+ label: D.CAROUSEL_CONTROL,
166
166
  value: v
167
167
  },
168
- [y.ON_CAROUSEL_FORWARD_CLICK]: {
169
- action: x.CONTROL_FORWARD,
170
- category: D.MICRO_WIDGET_INTERACTION,
171
- label: w.CAROUSEL_CONTROL,
168
+ [S.ON_CAROUSEL_FORWARD_CLICK]: {
169
+ action: L.CONTROL_FORWARD,
170
+ category: x.MICRO_WIDGET_INTERACTION,
171
+ label: D.CAROUSEL_CONTROL,
172
172
  value: v
173
173
  },
174
- [y.ON_CAROUSEL_BACK_SWIPE]: {
175
- action: x.SWIPE_BACKWARD,
176
- category: D.MICRO_WIDGET_INTERACTION,
177
- label: w.CAROUSEL_CONTROL,
174
+ [S.ON_CAROUSEL_BACK_SWIPE]: {
175
+ action: L.SWIPE_BACKWARD,
176
+ category: x.MICRO_WIDGET_INTERACTION,
177
+ label: D.CAROUSEL_CONTROL,
178
178
  value: v
179
179
  },
180
- [y.ON_CAROUSEL_FORWARD_SWIPE]: {
181
- action: x.SWIPE_FORWARD,
182
- category: D.MICRO_WIDGET_INTERACTION,
183
- label: w.CAROUSEL_CONTROL,
180
+ [S.ON_CAROUSEL_FORWARD_SWIPE]: {
181
+ action: L.SWIPE_FORWARD,
182
+ category: x.MICRO_WIDGET_INTERACTION,
183
+ label: D.CAROUSEL_CONTROL,
184
184
  value: v
185
185
  },
186
186
  // read more card events
187
- [y.ON_VIEW_MORE_CLICKED]: {
188
- action: x.MICRO_BEAT_CLICKED,
189
- category: D.BEAT_INTERACTION,
190
- label: w.VIEW_MORE,
187
+ [S.ON_VIEW_MORE_CLICKED]: {
188
+ action: L.MICRO_BEAT_CLICKED,
189
+ category: x.BEAT_INTERACTION,
190
+ label: D.VIEW_MORE,
191
191
  value: v
192
192
  },
193
- [Se.ON_VIEW_MORE_VIEWED]: {
194
- action: x.MICRO_BEAT_DISPLAYED,
195
- category: D.BEAT_INTERACTION,
196
- label: w.VIEW_MORE,
193
+ [ve.ON_VIEW_MORE_VIEWED]: {
194
+ action: L.MICRO_BEAT_DISPLAYED,
195
+ category: x.BEAT_INTERACTION,
196
+ label: D.VIEW_MORE,
197
197
  value: v
198
198
  },
199
199
  ...Je(),
200
200
  ...et(),
201
201
  ...tt()
202
- }, Ce = async (i, o) => !o || !_e[i] ? null : o.sendAnalyticEvent(_e[i]).then((t) => t).catch((t) => {
202
+ }, _e = async (i, o) => !o || !pe[i] ? null : o.sendAnalyticEvent(pe[i]).then((t) => t).catch((t) => {
203
203
  throw t;
204
- }), fe = async (i, o) => !o || !pe[i] ? null : o.sendAnalyticsPageview(pe[i]).then((t) => t).catch((t) => {
204
+ }), Ce = async (i, o) => !o || !ue[i] ? null : o.sendAnalyticsPageview(ue[i]).then((t) => t).catch((t) => {
205
205
  throw t;
206
206
  });
207
207
  class it {
208
- onAnalyticEvent = Ce;
209
- onAnalyticPageView = fe;
210
- beatApi = new he("/", "");
208
+ onAnalyticEvent = _e;
209
+ onAnalyticPageView = Ce;
210
+ beatApi = new de("/", "");
211
211
  constructor() {
212
- oe(this);
212
+ ie(this);
213
213
  }
214
214
  initialize = async (o, t, l) => {
215
- this.onAnalyticEvent = (r, n) => {
216
- Ce(r, n).then((a) => a).catch((a) => {
215
+ this.onAnalyticEvent = (n, r) => {
216
+ _e(n, r).then((a) => a).catch((a) => {
217
217
  throw a.status === 401 && l(), a;
218
218
  });
219
- }, this.onAnalyticPageView = (r, n) => {
220
- fe(r, n).then((a) => a).catch((a) => {
219
+ }, this.onAnalyticPageView = (n, r) => {
220
+ Ce(n, r).then((a) => a).catch((a) => {
221
221
  throw a.status === 401 && l(), a;
222
222
  });
223
- }, this.beatApi = new he(o, t);
223
+ }, this.beatApi = new de(o, t);
224
224
  };
225
225
  updateBeat = async (o) => {
226
226
  this.beatApi.updateBeat(o);
@@ -237,39 +237,39 @@ class ot {
237
237
  token = "";
238
238
  isInitialized = !1;
239
239
  constructor() {
240
- this.copyStore = new qe(), this.insightsMicroWidgetStore = new it(), oe(this);
240
+ this.copyStore = new qe(), this.insightsMicroWidgetStore = new it(), ie(this);
241
241
  }
242
242
  initialize = async (o, t, l) => {
243
243
  await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, l);
244
- const r = await ze(o, t, "1.0.0", "Micro Insights Carousel");
245
- ge(() => {
246
- this.session = r, this.isInitialized = !0;
244
+ const n = await ze(o, t, "1.0.0", "Micro Insights Carousel");
245
+ Re(() => {
246
+ this.session = n, this.isInitialized = !0;
247
247
  });
248
248
  };
249
249
  }
250
- const z = p.createContext(null), lt = ({
250
+ const U = u.createContext(null), lt = ({
251
251
  onEvent: i,
252
252
  onPageview: o,
253
253
  store: t,
254
254
  children: l
255
- }) => /* @__PURE__ */ e(z.Provider, { value: { onEvent: i, onPageview: o, store: t, children: l }, children: l }), X = p.forwardRef(function({
255
+ }) => /* @__PURE__ */ e(U.Provider, { value: { onEvent: i, onPageview: o, store: t, children: l }, children: l }), j = u.forwardRef(function({
256
256
  actionText: o,
257
257
  ariaLabel: t,
258
258
  backgroundColor: l,
259
- description: r,
260
- heightOverrides: n,
259
+ description: n,
260
+ heightOverrides: r,
261
261
  icon: a,
262
- isActiveCard: E,
263
- isZeroState: d,
262
+ isActiveCard: c,
263
+ isZeroState: h,
264
264
  onCardClick: C = () => {
265
265
  },
266
- showIcon: u,
267
- style: c = {},
268
- title: h,
266
+ showIcon: p,
267
+ style: d = {},
268
+ title: E,
269
269
  variant: s,
270
- widthOverrides: m
270
+ widthOverrides: f
271
271
  }, _) {
272
- const R = ie(), [A, S] = p.useState(!1), { cardStyle: f, linkTextStyle: P } = c, g = s ? f : { border: "none", boxShadow: "none", ...f }, O = /* @__PURE__ */ e(
272
+ const R = te(), [O, I] = u.useState(!1), { cardStyle: m, linkTextStyle: T } = d, y = s ? m : { border: "none", boxShadow: "none", ...m }, M = /* @__PURE__ */ e(
273
273
  Be,
274
274
  {
275
275
  className: "mx-micro-card-description",
@@ -280,25 +280,25 @@ const z = p.createContext(null), lt = ({
280
280
  letterSpacing: 0.48,
281
281
  lineHeight: "20px",
282
282
  overflow: "hidden",
283
- pl: d ? 0 : 28,
284
- pr: d ? 0 : 8,
283
+ pl: h ? 0 : 28,
284
+ pr: h ? 0 : 8,
285
285
  WebkitBoxOrient: "vertical",
286
286
  WebkitLineClamp: 2,
287
287
  wordWrap: "break-word"
288
288
  },
289
- children: r && /* @__PURE__ */ e(
289
+ children: n && /* @__PURE__ */ e(
290
290
  "span",
291
291
  {
292
- dangerouslySetInnerHTML: { __html: r },
292
+ dangerouslySetInnerHTML: { __html: n },
293
293
  style: { fontFamily: R.typography.fontFamily }
294
294
  }
295
295
  )
296
296
  }
297
297
  );
298
298
  return /* @__PURE__ */ e(
299
- F,
299
+ Z,
300
300
  {
301
- "aria-hidden": !E,
301
+ "aria-hidden": !c,
302
302
  "aria-label": t,
303
303
  "aria-labelledby": "divButton",
304
304
  "aria-roledescription": "slide",
@@ -306,26 +306,26 @@ const z = p.createContext(null), lt = ({
306
306
  role: "group",
307
307
  sx: {
308
308
  height: "100%",
309
- minWidth: m ? `${m}px` : "100%",
309
+ minWidth: f ? `${f}px` : "100%",
310
310
  fontFamily: R.typography.fontFamily
311
311
  },
312
312
  children: /* @__PURE__ */ e(
313
- F,
313
+ Z,
314
314
  {
315
- "aria-hidden": !E,
315
+ "aria-hidden": !c,
316
316
  "aria-label": t,
317
317
  id: "divButton",
318
318
  onClick: () => C(),
319
- onKeyDown: () => S(!1),
320
- onKeyUp: () => S(!0),
319
+ onKeyDown: () => I(!1),
320
+ onKeyUp: () => I(!0),
321
321
  ref: _,
322
322
  role: "button",
323
323
  sx: {
324
- border: A ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
324
+ border: O ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
325
325
  borderRadius: "8px",
326
326
  height: "100%"
327
327
  },
328
- tabIndex: E ? 0 : -1,
328
+ tabIndex: c ? 0 : -1,
329
329
  children: /* @__PURE__ */ e(
330
330
  Ye,
331
331
  {
@@ -336,16 +336,16 @@ const z = p.createContext(null), lt = ({
336
336
  backgroundColor: l,
337
337
  boxSizing: "border-box",
338
338
  cursor: "pointer",
339
- height: n ? "100%" : 124,
339
+ height: r ? "100%" : 124,
340
340
  p: 16,
341
- ...g,
341
+ ...y,
342
342
  "& .MuiCardHeader-avatar": {
343
343
  mr: "8px"
344
344
  }
345
345
  },
346
346
  variant: s,
347
- children: /* @__PURE__ */ I(
348
- B,
347
+ children: /* @__PURE__ */ g(
348
+ k,
349
349
  {
350
350
  sx: {
351
351
  alignItems: "space-between",
@@ -355,14 +355,14 @@ const z = p.createContext(null), lt = ({
355
355
  /* @__PURE__ */ e(
356
356
  Qe,
357
357
  {
358
- avatar: u && a,
359
- subheader: d && O,
358
+ avatar: p && a,
359
+ subheader: h && M,
360
360
  sx: { p: 0 },
361
- title: h,
361
+ title: E,
362
362
  titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
363
363
  }
364
364
  ),
365
- /* @__PURE__ */ e(Xe, { sx: { p: 0 }, children: !d && O }),
365
+ /* @__PURE__ */ e(Xe, { sx: { p: 0 }, children: !h && M }),
366
366
  !!o && /* @__PURE__ */ e(
367
367
  je,
368
368
  {
@@ -371,15 +371,15 @@ const z = p.createContext(null), lt = ({
371
371
  p: 0
372
372
  },
373
373
  children: /* @__PURE__ */ e(
374
- F,
374
+ Z,
375
375
  {
376
- sx: (T) => ({
377
- color: T.palette.primary.main,
376
+ sx: (W) => ({
377
+ color: W.palette.primary.main,
378
378
  fontSize: 14,
379
379
  fontWeight: "bold",
380
380
  px: 28,
381
- fontFamily: T.typography.fontFamily,
382
- ...P
381
+ fontFamily: W.typography.fontFamily,
382
+ ...T
383
383
  }),
384
384
  children: o
385
385
  }
@@ -395,16 +395,16 @@ const z = p.createContext(null), lt = ({
395
395
  )
396
396
  }
397
397
  );
398
- }), rt = ({ beat: i }) => {
398
+ }), nt = ({ beat: i }) => {
399
399
  const { primary_category_guid: o, category_guids: t } = i, l = o || t?.[0] || be.UNCATEGORIZED;
400
400
  return /* @__PURE__ */ e(Ze, { categoryGuid: l, size: 16, sx: { minWidth: 16 } });
401
- }, nt = ({ beat: i }) => {
402
- const { category_guids: o, merchant_guids: t, primary_category_guid: l, primary_merchant_guid: r } = i;
401
+ }, rt = ({ beat: i }) => {
402
+ const { category_guids: o, merchant_guids: t, primary_category_guid: l, primary_merchant_guid: n } = i;
403
403
  return /* @__PURE__ */ e(
404
404
  Pe,
405
405
  {
406
406
  categoryGuid: l || o && o[0] || "",
407
- merchantGuid: r || t[0],
407
+ merchantGuid: n || t[0],
408
408
  size: 16,
409
409
  sx: {
410
410
  display: "flex",
@@ -417,8 +417,8 @@ const z = p.createContext(null), lt = ({
417
417
  height: o,
418
418
  size: t = 16,
419
419
  styles: l,
420
- viewBox: r = "0 0 16 16",
421
- width: n
420
+ viewBox: n = "0 0 16 16",
421
+ width: r
422
422
  }) => /* @__PURE__ */ e(
423
423
  "svg",
424
424
  {
@@ -427,8 +427,8 @@ const z = p.createContext(null), lt = ({
427
427
  focusable: !1,
428
428
  height: o || t,
429
429
  style: l,
430
- viewBox: r,
431
- width: n || t,
430
+ viewBox: n,
431
+ width: r || t,
432
432
  xmlns: "http://www.w3.org/2000/svg",
433
433
  children: /* @__PURE__ */ e(
434
434
  "path",
@@ -440,16 +440,16 @@ const z = p.createContext(null), lt = ({
440
440
  }
441
441
  ), st = (i) => i ? i.data ? i.data.map((o) => {
442
442
  const t = {};
443
- return i.names?.map((l, r) => {
444
- t[l] = o[r];
443
+ return i.names?.map((l, n) => {
444
+ t[l] = o[n];
445
445
  }), t;
446
446
  }) : [] : [], ct = (i, o) => {
447
- const t = st(i), l = t.length / 2, r = t.slice(0, l), n = t.slice(l);
448
- return !r.length || !n.length ? o.palette.primary.main : r[0].amount > n[0].amount ? o.palette.error.main : r[0].amount < n[0].amount ? o.palette.success.main : o.palette.primary.main;
447
+ const t = st(i), l = t.length / 2, n = t.slice(0, l), r = t.slice(l);
448
+ return !n.length || !r.length ? o.palette.primary.main : n[0].amount > r[0].amount ? o.palette.error.main : n[0].amount < r[0].amount ? o.palette.success.main : o.palette.primary.main;
449
449
  }, dt = ({ beat: i }) => {
450
- const o = ie(), t = ct(i.data_series, o);
450
+ const o = te(), t = ct(i.data_series, o);
451
451
  return /* @__PURE__ */ e(Ve, { sx: { color: t } });
452
- }, Me = () => /* @__PURE__ */ I("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
452
+ }, Se = () => /* @__PURE__ */ g("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
453
453
  /* @__PURE__ */ e(
454
454
  "path",
455
455
  {
@@ -693,7 +693,7 @@ const z = p.createContext(null), lt = ({
693
693
  fillRule: "evenodd"
694
694
  }
695
695
  ),
696
- /* @__PURE__ */ I("g", { filter: "url(#filter0_d_1565_98011)", children: [
696
+ /* @__PURE__ */ g("g", { filter: "url(#filter0_d_1565_98011)", children: [
697
697
  /* @__PURE__ */ e("mask", { height: "22", id: "mask1_1565_98011", maskUnits: "userSpaceOnUse", width: "17", x: "16", y: "12", children: /* @__PURE__ */ e(
698
698
  "path",
699
699
  {
@@ -949,10 +949,10 @@ const z = p.createContext(null), lt = ({
949
949
  ),
950
950
  /* @__PURE__ */ e("path", { d: "M17.9668 31.5737H19.4947", stroke: "#E4E8EE", strokeWidth: "0.264005" })
951
951
  ] }),
952
- /* @__PURE__ */ I("g", { filter: "url(#filter1_d_1565_98011)", children: [
952
+ /* @__PURE__ */ g("g", { filter: "url(#filter1_d_1565_98011)", children: [
953
953
  /* @__PURE__ */ e("circle", { cx: "15.0441", cy: "16.0441", fill: "#CDD3DD", r: "15.0441" }),
954
954
  /* @__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" }) }),
955
- /* @__PURE__ */ I("g", { mask: "url(#mask2_1565_98011)", children: [
955
+ /* @__PURE__ */ g("g", { mask: "url(#mask2_1565_98011)", children: [
956
956
  /* @__PURE__ */ e("rect", { fill: "white", height: "31.1359", transform: "translate(0 0.162598)", width: "31.0101" }),
957
957
  /* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "4.52002" }),
958
958
  /* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "17.1758" }),
@@ -1142,8 +1142,8 @@ const z = p.createContext(null), lt = ({
1142
1142
  fill: "#CDD3DD"
1143
1143
  }
1144
1144
  ),
1145
- /* @__PURE__ */ I("defs", { children: [
1146
- /* @__PURE__ */ I(
1145
+ /* @__PURE__ */ g("defs", { children: [
1146
+ /* @__PURE__ */ g(
1147
1147
  "filter",
1148
1148
  {
1149
1149
  colorInterpolationFilters: "sRGB",
@@ -1186,7 +1186,7 @@ const z = p.createContext(null), lt = ({
1186
1186
  ]
1187
1187
  }
1188
1188
  ),
1189
- /* @__PURE__ */ I(
1189
+ /* @__PURE__ */ g(
1190
1190
  "filter",
1191
1191
  {
1192
1192
  colorInterpolationFilters: "sRGB",
@@ -1230,10 +1230,10 @@ const z = p.createContext(null), lt = ({
1230
1230
  }
1231
1231
  )
1232
1232
  ] })
1233
- ] }), ht = ({ beat: i }) => {
1233
+ ] }), Et = ({ beat: i }) => {
1234
1234
  const { icon_type: o, icon_color: t } = i;
1235
- return o === 0 ? /* @__PURE__ */ e(se, { filled: !0, sx: { color: (l) => t || l.palette.primary.main } }) : o === 1 ? /* @__PURE__ */ e(rt, { beat: i }) : o === 2 ? /* @__PURE__ */ e(nt, { beat: i }) : o === 3 ? /* @__PURE__ */ e(dt, { beat: i }) : o === 5 ? /* @__PURE__ */ e(Ne, {}) : /* @__PURE__ */ e(
1236
- se,
1235
+ return o === 0 ? /* @__PURE__ */ e(ae, { filled: !0, sx: { color: (l) => t || l.palette.primary.main } }) : o === 1 ? /* @__PURE__ */ e(nt, { beat: i }) : o === 2 ? /* @__PURE__ */ e(rt, { beat: i }) : o === 3 ? /* @__PURE__ */ e(dt, { beat: i }) : o === 5 ? /* @__PURE__ */ e(Ne, {}) : /* @__PURE__ */ e(
1236
+ ae,
1237
1237
  {
1238
1238
  filled: !0,
1239
1239
  sx: {
@@ -1241,25 +1241,25 @@ const z = p.createContext(null), lt = ({
1241
1241
  }
1242
1242
  }
1243
1243
  );
1244
- }, L = () => {
1245
- const i = p.useContext(z);
1244
+ }, V = () => {
1245
+ const i = u.useContext(U);
1246
1246
  if (!i)
1247
1247
  throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
1248
1248
  return i.store.copyStore;
1249
- }, Et = () => {
1250
- const i = p.useContext(z);
1249
+ }, ht = () => {
1250
+ const i = u.useContext(U);
1251
1251
  if (!i?.store?.insightsMicroWidgetStore)
1252
1252
  throw new Error(
1253
1253
  "useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
1254
1254
  );
1255
1255
  return i.store.insightsMicroWidgetStore;
1256
- }, K = () => {
1257
- const i = p.useContext(z);
1256
+ }, z = () => {
1257
+ const i = u.useContext(U);
1258
1258
  if (!i)
1259
1259
  throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
1260
1260
  return { onEvent: i.onEvent };
1261
- }, Ae = () => {
1262
- const i = p.useContext(z);
1261
+ }, Me = () => {
1262
+ const i = u.useContext(U);
1263
1263
  if (!i)
1264
1264
  throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
1265
1265
  return { onPageview: i.onPageview };
@@ -1268,80 +1268,80 @@ const z = p.createContext(null), lt = ({
1268
1268
  STANDARD: 154,
1269
1269
  XLARGE: 200,
1270
1270
  XXLARGE: 248
1271
- }, pt = 50, Oe = 1, _t = ({
1271
+ }, pt = 50, Ae = 1, _t = ({
1272
1272
  ariaLabel: i,
1273
1273
  backgroundColor: o,
1274
1274
  beat: t,
1275
1275
  showCTAColocatedWithText: l = !0,
1276
- heightOverrides: r,
1277
- index: n,
1276
+ heightOverrides: n,
1277
+ index: r,
1278
1278
  isActiveCard: a,
1279
- onCardClick: E,
1280
- posthog: d,
1279
+ onCardClick: c,
1280
+ posthog: h,
1281
1281
  showIcon: C,
1282
- variant: u,
1283
- widthOverrides: c
1282
+ variant: p,
1283
+ widthOverrides: d
1284
1284
  }) => {
1285
- const { ref: h, inView: s } = Re({
1286
- threshold: Oe
1287
- }), { cardsCopy: m } = L(), { onEvent: _ } = K(), { updateBeat: R, updateOffer: A } = Et();
1288
- te(() => {
1289
- s && (t.has_been_displayed ? _(ve(t.template)) : (t.guid.startsWith("OFR") ? A({
1285
+ const { ref: E, inView: s } = me({
1286
+ threshold: Ae
1287
+ }), { cardsCopy: f } = V(), { onEvent: _ } = z(), { updateBeat: R, updateOffer: O } = ht();
1288
+ ee(() => {
1289
+ s && (t.has_been_displayed ? _(Ie(t.template)) : (t.guid.startsWith("OFR") ? O({
1290
1290
  ...t,
1291
1291
  has_been_displayed: !0
1292
1292
  }) : R({
1293
1293
  ...t,
1294
1294
  has_been_displayed: !0
1295
1295
  }), _(ye(t.template))));
1296
- }, [s]), te(() => {
1296
+ }, [s]), ee(() => {
1297
1297
  if (s && t)
1298
1298
  if (t.template === "MarketingOffer") {
1299
- const f = t;
1300
- d?.capture("viewed_messaging_insight", {
1299
+ const m = t;
1300
+ h?.capture("viewed_messaging_insight", {
1301
1301
  template: t.template,
1302
- campaign_guid: f.campaign_guid,
1303
- campaign_name: f.pulse_campaign_name
1302
+ campaign_guid: m.campaign_guid,
1303
+ campaign_name: m.pulse_campaign_name
1304
1304
  });
1305
1305
  } else
1306
- d?.capture("viewed_insight", {
1306
+ h?.capture("viewed_insight", {
1307
1307
  beat_guid: t.guid,
1308
1308
  template: t.template,
1309
- position: n
1309
+ position: r
1310
1310
  });
1311
- }, [t, n, s]);
1312
- const S = () => {
1313
- if (E && E(t), _(Ie(t.template)), t.template === "MarketingOffer") {
1314
- const f = t;
1315
- d?.capture("clicked_messaging_insight", {
1311
+ }, [t, r, s]);
1312
+ const I = () => {
1313
+ if (c && c(t), _(ge(t.template)), t.template === "MarketingOffer") {
1314
+ const m = t;
1315
+ h?.capture("clicked_messaging_insight", {
1316
1316
  template: t.template,
1317
- campaign_guid: f.campaign_guid,
1318
- campaign_name: f.pulse_campaign_name
1317
+ campaign_guid: m.campaign_guid,
1318
+ campaign_name: m.pulse_campaign_name
1319
1319
  });
1320
1320
  } else
1321
- d?.capture("clicked_insight", {
1321
+ h?.capture("clicked_insight", {
1322
1322
  beat_guid: t.guid,
1323
1323
  template: t.template,
1324
- position: n
1324
+ position: r
1325
1325
  });
1326
1326
  };
1327
1327
  return /* @__PURE__ */ e(
1328
- X,
1328
+ j,
1329
1329
  {
1330
- actionText: t.micro_call_to_action || m.micro_card_cta,
1330
+ actionText: t.micro_call_to_action || f.micro_card_cta,
1331
1331
  ariaLabel: i,
1332
1332
  backgroundColor: o,
1333
1333
  description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
1334
- heightOverrides: r,
1335
- icon: /* @__PURE__ */ e(ht, { beat: t }),
1334
+ heightOverrides: n,
1335
+ icon: /* @__PURE__ */ e(Et, { beat: t }),
1336
1336
  isActiveCard: a,
1337
- onCardClick: S,
1338
- posthog: d,
1339
- ref: h,
1337
+ onCardClick: I,
1338
+ posthog: h,
1339
+ ref: E,
1340
1340
  showCTAColocatedWithText: l,
1341
1341
  showIcon: C,
1342
1342
  title: t.micro_title && t.micro_title.length > 0 ? t.micro_title : t.title,
1343
- variant: u,
1344
- widthOverrides: c
1343
+ variant: p,
1344
+ widthOverrides: d
1345
1345
  }
1346
1346
  );
1347
1347
  }, Ct = ({
@@ -1349,14 +1349,14 @@ const z = p.createContext(null), lt = ({
1349
1349
  numBeats: o,
1350
1350
  onNextClick: t,
1351
1351
  onPreviousClick: l,
1352
- scrollRightBoundary: r,
1353
- scrollX: n,
1352
+ scrollRightBoundary: n,
1353
+ scrollX: r,
1354
1354
  shouldApplyDotAnimation: a = !1,
1355
- visibleCardsCount: E = 1
1355
+ visibleCardsCount: c = 1
1356
1356
  }) => {
1357
- const d = Fe(), { carouselCopy: C } = L(), u = Math.floor(n) > r || i - E + 1 === 0, c = n < 0 || o - 1 === i, h = d.palette.grey[500], s = d.palette.primary.main;
1358
- return /* @__PURE__ */ I(
1359
- B,
1357
+ const h = Fe(), { carouselCopy: C } = V(), p = Math.floor(r) > n || i - c + 1 === 0, d = r < 0 || o - 1 === i, E = h.palette.grey[500], s = h.palette.primary.main;
1358
+ return /* @__PURE__ */ g(
1359
+ k,
1360
1360
  {
1361
1361
  direction: "row",
1362
1362
  sx: {
@@ -1371,30 +1371,30 @@ const z = p.createContext(null), lt = ({
1371
1371
  },
1372
1372
  children: [
1373
1373
  /* @__PURE__ */ e(
1374
- ce,
1374
+ se,
1375
1375
  {
1376
- "aria-disabled": u,
1376
+ "aria-disabled": p,
1377
1377
  "aria-label": C.previous_insight_cta_aria,
1378
- disabled: u,
1378
+ disabled: p,
1379
1379
  onClick: l,
1380
1380
  children: /* @__PURE__ */ e(
1381
1381
  He,
1382
1382
  {
1383
1383
  style: {
1384
- color: u ? h : s
1384
+ color: p ? E : s
1385
1385
  }
1386
1386
  }
1387
1387
  )
1388
1388
  }
1389
1389
  ),
1390
- Array.from({ length: o }).map((m, _) => {
1390
+ Array.from({ length: o }).map((f, _) => {
1391
1391
  const R = _ === i;
1392
1392
  return /* @__PURE__ */ e(
1393
- F,
1393
+ Z,
1394
1394
  {
1395
1395
  className: "mx-insights-micro-carousel-dots",
1396
1396
  sx: {
1397
- bgcolor: R ? s : h,
1397
+ bgcolor: R ? s : E,
1398
1398
  height: 8,
1399
1399
  mr: 8,
1400
1400
  // existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
@@ -1414,17 +1414,17 @@ const z = p.createContext(null), lt = ({
1414
1414
  );
1415
1415
  }),
1416
1416
  /* @__PURE__ */ e(
1417
- ce,
1417
+ se,
1418
1418
  {
1419
- "aria-disabled": c,
1419
+ "aria-disabled": d,
1420
1420
  "aria-label": C.next_insight_cta_aria,
1421
- disabled: c,
1421
+ disabled: d,
1422
1422
  onClick: t,
1423
1423
  children: /* @__PURE__ */ e(
1424
- me,
1424
+ fe,
1425
1425
  {
1426
1426
  style: {
1427
- color: c ? h : s
1427
+ color: d ? E : s
1428
1428
  }
1429
1429
  }
1430
1430
  )
@@ -1438,47 +1438,47 @@ const z = p.createContext(null), lt = ({
1438
1438
  beats: o,
1439
1439
  cardWidth: t,
1440
1440
  showCTAColocatedWithText: l,
1441
- heightOverrides: r,
1442
- onCardClick: n,
1441
+ heightOverrides: n,
1442
+ onCardClick: r,
1443
1443
  posthog: a,
1444
- showIcon: E,
1445
- variant: d
1444
+ showIcon: c,
1445
+ variant: h
1446
1446
  }) => {
1447
- const { carouselCopy: C } = L(), u = {
1447
+ const { carouselCopy: C } = V(), p = {
1448
1448
  showCTAColocatedWithText: l,
1449
- heightOverrides: r,
1449
+ heightOverrides: n,
1450
1450
  posthog: a,
1451
- showIcon: E,
1452
- variant: d
1451
+ showIcon: c,
1452
+ variant: h
1453
1453
  };
1454
- return /* @__PURE__ */ I(De, { children: [
1455
- o.map((c, h) => {
1456
- const s = h + 1, m = o.length + 1, _ = Ge(
1454
+ return /* @__PURE__ */ g(De, { children: [
1455
+ o.map((d, E) => {
1456
+ const s = E + 1, f = o.length + 1, _ = Ge(
1457
1457
  C.card_position_in_carousel_aria,
1458
1458
  s.toString(),
1459
- m.toString()
1460
- ), R = c.micro_title && c.micro_title.length > 0, A = c.micro_description && c.micro_description.length > 0, S = R ? c.micro_title : c.title, f = A ? c.micro_description : c.description;
1459
+ f.toString()
1460
+ ), R = d.micro_title && d.micro_title.length > 0, O = d.micro_description && d.micro_description.length > 0, I = R ? d.micro_title : d.title, m = O ? d.micro_description : d.description;
1461
1461
  return /* @__PURE__ */ e(
1462
1462
  _t,
1463
1463
  {
1464
- ariaLabel: `${_}: ${S}, ${f}`,
1465
- beat: c,
1466
- index: h,
1467
- isActiveCard: h === i,
1468
- onCardClick: n,
1464
+ ariaLabel: `${_}: ${I}, ${m}`,
1465
+ beat: d,
1466
+ index: E,
1467
+ isActiveCard: E === i,
1468
+ onCardClick: r,
1469
1469
  widthOverrides: t || void 0,
1470
- ...u
1470
+ ...p
1471
1471
  },
1472
- `${c.guid} ${h}`
1472
+ `${d.guid} ${E}`
1473
1473
  );
1474
1474
  }),
1475
1475
  /* @__PURE__ */ e(
1476
1476
  At,
1477
1477
  {
1478
1478
  isActiveCard: i === o.length,
1479
- onCardClick: n,
1479
+ onCardClick: r,
1480
1480
  widthOverrides: t || void 0,
1481
- ...u
1481
+ ...p
1482
1482
  }
1483
1483
  )
1484
1484
  ] });
@@ -1487,100 +1487,100 @@ const z = p.createContext(null), lt = ({
1487
1487
  allowSingleCardPeeking: o = !1,
1488
1488
  beats: t = [],
1489
1489
  showCTAColocatedWithText: l,
1490
- heightOverrides: r,
1491
- onCardClick: n,
1490
+ heightOverrides: n,
1491
+ onCardClick: r,
1492
1492
  posthog: a,
1493
- showCarouselControls: E,
1494
- showIcon: d,
1493
+ showCarouselControls: c,
1494
+ showIcon: h,
1495
1495
  showWithMargin: C = !0,
1496
- variant: u,
1497
- widthOverrides: c,
1498
- visibleCardsCount: h = 1
1496
+ variant: p,
1497
+ widthOverrides: d,
1498
+ visibleCardsCount: E = 1
1499
1499
  // Default to 1 card visible
1500
1500
  }) => {
1501
- const s = p.useRef(null), m = p.useRef(null), [_, R] = p.useState(0), [A, S] = p.useState(null), [f, P] = p.useState(null), [g, O] = p.useState(null), { carouselCopy: T } = L(), { onEvent: W } = K();
1502
- p.useEffect(() => {
1501
+ const s = u.useRef(null), f = u.useRef(null), [_, R] = u.useState(0), [O, I] = u.useState(null), [m, T] = u.useState(null), [y, M] = u.useState(null), { carouselCopy: W } = V(), { onEvent: F } = z();
1502
+ u.useEffect(() => {
1503
1503
  if (s.current && !o) {
1504
- const M = s.current.offsetWidth, G = 8;
1505
- let k;
1506
- if (h > 1) {
1507
- const ne = (M - (h - 1) * G) / h / 3;
1508
- k = (M - ne - (h - 1) * G) / h;
1504
+ const A = s.current.offsetWidth, b = 8;
1505
+ let B;
1506
+ if (E > 1) {
1507
+ const ne = (A - (E - 1) * b) / E / 3;
1508
+ B = (A - ne - (E - 1) * b) / E;
1509
1509
  } else
1510
- k = M;
1511
- O(k);
1510
+ B = A;
1511
+ M(B);
1512
1512
  }
1513
- }, [h, s.current?.offsetWidth]), p.useEffect(() => {
1514
- const M = m.current?.offsetWidth;
1515
- if (typeof M == "number" && o) {
1516
- const G = (U) => {
1517
- const ae = [
1513
+ }, [E, s.current?.offsetWidth]), u.useEffect(() => {
1514
+ const A = f.current?.offsetWidth;
1515
+ if (typeof A == "number" && o) {
1516
+ const b = (G) => {
1517
+ const re = [
1518
1518
  { maxWidth: 375, cardWidth: 268 },
1519
1519
  { maxWidth: 444, cardWidth: 300 },
1520
1520
  { maxWidth: 599, cardWidth: 350 },
1521
1521
  { maxWidth: 749, cardWidth: 450 },
1522
1522
  { maxWidth: 900, cardWidth: 600 }
1523
- ].find((we) => U <= we.maxWidth);
1524
- return ae ? ae.cardWidth : 750;
1523
+ ].find((we) => G <= we.maxWidth);
1524
+ return re ? re.cardWidth : 750;
1525
1525
  };
1526
- O(G(M));
1527
- const k = () => {
1528
- const U = m.current?.offsetWidth;
1529
- typeof U == "number" && O(G(U));
1526
+ M(b(A));
1527
+ const B = () => {
1528
+ const G = f.current?.offsetWidth;
1529
+ typeof G == "number" && M(b(G));
1530
1530
  };
1531
- return window.addEventListener("resize", k), () => {
1532
- window.removeEventListener("resize", k);
1531
+ return window.addEventListener("resize", B), () => {
1532
+ window.removeEventListener("resize", B);
1533
1533
  };
1534
1534
  }
1535
- }, [o, m]);
1536
- const Q = () => {
1537
- W(y.ON_CAROUSEL_FORWARD_CLICK, i), s.current && g && s.current.scrollTo({
1538
- left: _ + g + 8,
1535
+ }, [o, f]);
1536
+ const K = () => {
1537
+ F(S.ON_CAROUSEL_FORWARD_CLICK, i), s.current && y && s.current.scrollTo({
1538
+ left: _ + y + 8,
1539
1539
  top: 0,
1540
1540
  behavior: "smooth"
1541
1541
  });
1542
1542
  }, $ = () => {
1543
- W(y.ON_CAROUSEL_BACK_CLICK, i), s.current && g && s.current.scrollTo({
1544
- left: Math.max(0, _ - (g + 8)),
1543
+ F(S.ON_CAROUSEL_BACK_CLICK, i), s.current && y && s.current.scrollTo({
1544
+ left: Math.max(0, _ - (y + 8)),
1545
1545
  top: 0,
1546
1546
  behavior: "smooth"
1547
1547
  });
1548
- }, Y = () => {
1548
+ }, X = () => {
1549
1549
  s.current && R(s.current.scrollLeft);
1550
- }, q = () => {
1551
- if (!f || !A) return;
1552
- f - A > pt ? W(y.ON_CAROUSEL_FORWARD_SWIPE, i) : W(y.ON_CAROUSEL_BACK_SWIPE, i);
1553
- }, J = (M) => {
1554
- S(M.targetTouches[0].clientX);
1555
- }, j = (M) => {
1556
- S(null), P(M.targetTouches[0].clientX);
1557
- }, b = g ? Math.round(_ / (g + 8)) : 0, V = s.current ? s.current.scrollWidth - s.current.offsetWidth : 0;
1558
- return /* @__PURE__ */ I(
1559
- B,
1550
+ }, Q = () => {
1551
+ if (!m || !O) return;
1552
+ m - O > pt ? F(S.ON_CAROUSEL_FORWARD_SWIPE, i) : F(S.ON_CAROUSEL_BACK_SWIPE, i);
1553
+ }, q = (A) => {
1554
+ I(A.targetTouches[0].clientX);
1555
+ }, Y = (A) => {
1556
+ I(null), T(A.targetTouches[0].clientX);
1557
+ }, w = y ? Math.round(_ / (y + 8)) : 0, We = s.current ? s.current.scrollWidth - s.current.offsetWidth : 0;
1558
+ return /* @__PURE__ */ g(
1559
+ k,
1560
1560
  {
1561
- "aria-label": T.carousel_title,
1561
+ "aria-label": W.carousel_title,
1562
1562
  "aria-roledescription": "carousel",
1563
- ref: m,
1563
+ ref: f,
1564
1564
  role: "group/region",
1565
1565
  sx: {
1566
1566
  alignItems: "center",
1567
1567
  boxSizing: "border-box",
1568
- height: r,
1569
- width: c || "100%"
1568
+ height: n,
1569
+ width: d || "100%"
1570
1570
  },
1571
1571
  children: [
1572
1572
  /* @__PURE__ */ e(
1573
- B,
1573
+ k,
1574
1574
  {
1575
1575
  direction: "row",
1576
- onScroll: Y,
1577
- onTouchEnd: q,
1578
- onTouchMove: J,
1579
- onTouchStart: j,
1576
+ onScroll: X,
1577
+ onTouchEnd: Q,
1578
+ onTouchMove: q,
1579
+ onTouchStart: Y,
1580
1580
  ref: s,
1581
1581
  sx: {
1582
1582
  alignItems: "center",
1583
- height: r && "100%",
1583
+ height: n && "100%",
1584
1584
  gap: 8,
1585
1585
  listStyleType: "none",
1586
1586
  m: 0,
@@ -1598,46 +1598,46 @@ const z = p.createContext(null), lt = ({
1598
1598
  children: /* @__PURE__ */ e(
1599
1599
  ft,
1600
1600
  {
1601
- activeCardIndex: b,
1601
+ activeCardIndex: w,
1602
1602
  beats: t,
1603
- cardWidth: g,
1604
- heightOverrides: r,
1605
- onCardClick: n,
1603
+ cardWidth: y,
1604
+ heightOverrides: n,
1605
+ onCardClick: r,
1606
1606
  posthog: a,
1607
1607
  showCTAColocatedWithText: l,
1608
- showIcon: d,
1609
- variant: u
1608
+ showIcon: h,
1609
+ variant: p
1610
1610
  }
1611
1611
  )
1612
1612
  }
1613
1613
  ),
1614
- E && /* @__PURE__ */ e(
1614
+ c && /* @__PURE__ */ e(
1615
1615
  Ct,
1616
1616
  {
1617
- currentBeatIndex: b + h - 1,
1617
+ currentBeatIndex: w + E - 1,
1618
1618
  numBeats: t.length + 1,
1619
- onNextClick: Q,
1619
+ onNextClick: K,
1620
1620
  onPreviousClick: $,
1621
- scrollRightBoundary: V,
1621
+ scrollRightBoundary: We,
1622
1622
  scrollX: _,
1623
1623
  shouldApplyDotAnimation: o,
1624
- visibleCardsCount: h
1624
+ visibleCardsCount: E
1625
1625
  }
1626
1626
  )
1627
1627
  ]
1628
1628
  }
1629
1629
  );
1630
- }, Rt = Z(mt), gt = ({
1630
+ }, Rt = P(mt), gt = ({
1631
1631
  analyticsMetadata: i,
1632
1632
  onCardClick: o,
1633
1633
  posthog: t,
1634
1634
  widthOverrides: l
1635
1635
  }) => {
1636
- const { carouselCopy: r } = L(), { onEvent: n } = K(), a = () => {
1637
- n && (n(y.ON_VIEW_MORE_CLICKED, i), o(), t?.capture("clicked_view_more"));
1636
+ const { carouselCopy: n } = V(), { onEvent: r } = z(), a = () => {
1637
+ r && (r(S.ON_VIEW_MORE_CLICKED, i), o(), t?.capture("clicked_view_more"));
1638
1638
  };
1639
- return r ? /* @__PURE__ */ I(
1640
- B,
1639
+ return n ? /* @__PURE__ */ g(
1640
+ k,
1641
1641
  {
1642
1642
  alignItems: "center",
1643
1643
  direction: "row",
@@ -1651,39 +1651,40 @@ const z = p.createContext(null), lt = ({
1651
1651
  /* @__PURE__ */ e(
1652
1652
  Le,
1653
1653
  {
1654
- sx: {
1654
+ sx: (c) => ({
1655
+ color: c.palette.primary.main,
1655
1656
  fontSize: 18,
1656
1657
  fontWeight: 700,
1657
1658
  lineHeight: "24px"
1658
- },
1659
+ }),
1659
1660
  variant: "h3",
1660
- children: r.carousel_title
1661
+ children: n.carousel_title
1661
1662
  }
1662
1663
  ),
1663
1664
  /* @__PURE__ */ e(
1664
1665
  xe,
1665
1666
  {
1666
- endIcon: /* @__PURE__ */ e(me, { size: 20 }),
1667
+ endIcon: /* @__PURE__ */ e(fe, { size: 20 }),
1667
1668
  onClick: a,
1668
1669
  size: "small",
1669
- sx: (E) => ({
1670
- color: E.palette.primary.main
1670
+ sx: (c) => ({
1671
+ color: c.palette.primary.main
1671
1672
  }),
1672
1673
  variant: "text",
1673
- children: r.view_all_insights_in_full_feed_cta_aria
1674
+ children: n.view_all_insights_in_full_feed_cta_aria
1674
1675
  }
1675
1676
  )
1676
1677
  ]
1677
1678
  }
1678
1679
  ) : /* @__PURE__ */ e(ke, {});
1679
- }, It = Z(gt), vt = ({
1680
+ }, It = P(gt), yt = ({
1680
1681
  heightOverrides: i,
1681
1682
  widthOverrides: o,
1682
1683
  children: t
1683
1684
  }) => {
1684
- const { carouselCopy: l } = L();
1685
+ const { carouselCopy: l } = V();
1685
1686
  return /* @__PURE__ */ e(
1686
- F,
1687
+ Z,
1687
1688
  {
1688
1689
  "aria-label": l?.carousel_title,
1689
1690
  "aria-roledescription": "carousel",
@@ -1697,76 +1698,72 @@ const z = p.createContext(null), lt = ({
1697
1698
  children: t
1698
1699
  }
1699
1700
  );
1700
- }, Te = ({
1701
+ }, Oe = ({
1701
1702
  ariaLabel: i,
1702
1703
  heightOverrides: o,
1703
1704
  onCardClick: t,
1704
1705
  posthog: l,
1705
- showIcon: r,
1706
- variant: n,
1707
- widthOverrides: a
1706
+ showIcon: n,
1707
+ variant: r
1708
1708
  }) => {
1709
- const { cardsCopy: E } = L(), { onEvent: d } = K(), { onPageview: C } = Ae();
1710
- p.useEffect(() => {
1711
- C(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1709
+ const { cardsCopy: a } = V(), { onEvent: c } = z(), { onPageview: h } = Me();
1710
+ u.useEffect(() => {
1711
+ h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1712
1712
  }, []);
1713
- const u = () => {
1714
- t && t(), d(y.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
1713
+ const C = () => {
1714
+ t && t(), c(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
1715
1715
  template: "no_relevant_insights"
1716
1716
  });
1717
1717
  };
1718
1718
  return /* @__PURE__ */ e(
1719
- X,
1719
+ j,
1720
1720
  {
1721
- actionText: E.micro_card_cta,
1721
+ actionText: a.micro_card_cta,
1722
1722
  ariaLabel: i,
1723
- description: E.no_relevant_insights_card_description,
1723
+ description: a.no_relevant_insights_card_description,
1724
1724
  heightOverrides: o,
1725
- icon: /* @__PURE__ */ e(Me, {}),
1725
+ icon: /* @__PURE__ */ e(Se, {}),
1726
1726
  isZeroState: !0,
1727
- onCardClick: u,
1727
+ onCardClick: C,
1728
1728
  posthog: l,
1729
- showIcon: r,
1729
+ showIcon: n,
1730
1730
  style: {
1731
1731
  linkTextStyle: {
1732
1732
  ml: 48
1733
1733
  }
1734
1734
  },
1735
- title: E.no_relevant_insights_card_title,
1736
- variant: n,
1737
- widthOverrides: a
1735
+ title: a.no_relevant_insights_card_title,
1736
+ variant: r
1738
1737
  }
1739
1738
  );
1740
- }, Qt = Z(Te), We = ({
1739
+ }, Qt = P(Oe), Te = ({
1741
1740
  ariaLabel: i,
1742
1741
  heightOverrides: o,
1743
1742
  onCardClick: t,
1744
1743
  posthog: l,
1745
- showIcon: r,
1746
- variant: n,
1747
- widthOverrides: a
1744
+ showIcon: n,
1745
+ variant: r
1748
1746
  }) => {
1749
- const { onPageview: E } = Ae(), { zeroStateCopy: d } = L();
1750
- return p.useEffect(() => {
1751
- E(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1747
+ const { onPageview: a } = Me(), { zeroStateCopy: c } = V();
1748
+ return u.useEffect(() => {
1749
+ a(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1752
1750
  }, []), /* @__PURE__ */ e(
1753
- X,
1751
+ j,
1754
1752
  {
1755
1753
  ariaLabel: i,
1756
- description: d.carousel_zero_state_description,
1754
+ description: c.carousel_zero_state_description,
1757
1755
  heightOverrides: o,
1758
- icon: /* @__PURE__ */ e(Me, {}),
1756
+ icon: /* @__PURE__ */ e(Se, {}),
1759
1757
  isZeroState: !0,
1760
1758
  onCardClick: t,
1761
1759
  posthog: l,
1762
- showIcon: r,
1763
- title: d.carousel_zero_state_title,
1764
- variant: n,
1765
- widthOverrides: a
1760
+ showIcon: n,
1761
+ title: c.carousel_zero_state_title,
1762
+ variant: r
1766
1763
  }
1767
1764
  );
1768
- }, qt = Z(We), yt = () => /* @__PURE__ */ e(
1769
- F,
1765
+ }, qt = P(Te), vt = () => /* @__PURE__ */ e(
1766
+ Z,
1770
1767
  {
1771
1768
  sx: {
1772
1769
  alignItems: "center",
@@ -1783,60 +1780,62 @@ const z = p.createContext(null), lt = ({
1783
1780
  beats: t = [],
1784
1781
  // This also determines the length of the carousel controls (beat.length + 1)
1785
1782
  showCTAColocatedWithText: l = !0,
1786
- endpoint: r = "/",
1787
- heightOverrides: n,
1783
+ endpoint: n = "/",
1784
+ heightOverrides: r,
1788
1785
  logOutUser: a,
1789
- onCardClick: E = () => {
1786
+ onCardClick: c = () => {
1790
1787
  },
1791
- onEvent: d = () => {
1788
+ onEvent: h = () => {
1792
1789
  },
1793
1790
  onPageview: C = () => {
1794
1791
  },
1795
- posthog: u,
1796
- showBorder: c = !0,
1797
- showCarouselControls: h,
1792
+ posthog: p,
1793
+ showBorder: d = !0,
1794
+ showCarouselControls: E,
1798
1795
  showHeader: s,
1799
- showIcon: m,
1796
+ showIcon: f,
1800
1797
  showWithMargin: _ = !0,
1801
1798
  token: R = "",
1802
- useDarkMode: A,
1803
- userHasFullInsightFeedBeats: S,
1804
- variant: f,
1805
- visibleCardsCount: P = 1,
1806
- widthOverrides: g
1799
+ userHasFullInsightFeedBeats: O,
1800
+ variant: I,
1801
+ visibleCardsCount: m = 1,
1802
+ widthOverrides: T
1807
1803
  }) => {
1808
- const [O, T] = ee("STANDARD"), [W, Q] = ee(!1), [$, Y] = ee(!1), q = Ke([d], N), J = $e([C], N);
1809
- p.useEffect(() => {
1810
- !N.isInitialized && !$ && (N.initialize(r, R, a).catch(() => Y(!1)), Y(!0));
1811
- }, [r, R, a, N.isInitialized, $]), p.useEffect(() => {
1812
- const V = window.innerHeight;
1813
- V < 180 ? T("STANDARD") : V >= 180 && V < 200 ? T("LARGE") : V >= 200 && V < 248 ? T("XLARGE") : V >= 248 && T("XXLARGE");
1814
- }, [window.innerHeight]), p.useEffect(() => {
1815
- Q(!o && N.isInitialized);
1804
+ const [y, M] = J("STANDARD"), [W, F] = J(!1), [K, $] = J(!1), X = Ke([h], N), Q = $e([C], N);
1805
+ u.useEffect(() => {
1806
+ !N.isInitialized && !K && (N.initialize(n, R, a).catch(() => $(!1)), $(!0));
1807
+ }, [n, R, a, N.isInitialized, K]), u.useEffect(() => {
1808
+ const w = window.innerHeight;
1809
+ w < 180 ? M("STANDARD") : w >= 180 && w < 200 ? M("LARGE") : w >= 200 && w < 248 ? M("XLARGE") : w >= 248 && M("XXLARGE");
1810
+ }, [window.innerHeight]), u.useEffect(() => {
1811
+ F(!o && N.isInitialized);
1816
1812
  }, [o, N.isInitialized]);
1817
- const j = {
1813
+ const q = {
1818
1814
  showCTAColocatedWithText: l,
1819
- heightOverrides: n,
1820
- onCardClick: E,
1821
- posthog: u,
1822
- showIcon: m,
1815
+ heightOverrides: r,
1816
+ onCardClick: c,
1817
+ posthog: p,
1818
+ showIcon: f,
1823
1819
  showWithMargin: _,
1824
- useDarkMode: A,
1825
- widthOverrides: g
1826
- }, b = {
1827
- carouselSize: O,
1828
- variant: f,
1829
- ...j
1820
+ widthOverrides: T
1821
+ }, Y = {
1822
+ carouselSize: y,
1823
+ variant: I,
1824
+ showCTAColocatedWithText: l,
1825
+ heightOverrides: r,
1826
+ onCardClick: c,
1827
+ posthog: p,
1828
+ showIcon: f
1830
1829
  };
1831
- return /* @__PURE__ */ e(lt, { onEvent: q, onPageview: J, store: N, children: /* @__PURE__ */ I(vt, { heightOverrides: n, widthOverrides: g, children: [
1832
- !W && /* @__PURE__ */ e(yt, {}),
1830
+ return /* @__PURE__ */ e(lt, { onEvent: X, onPageview: Q, store: N, children: /* @__PURE__ */ g(yt, { heightOverrides: r, widthOverrides: T, children: [
1831
+ !W && /* @__PURE__ */ e(vt, {}),
1833
1832
  W && s && /* @__PURE__ */ e(
1834
1833
  It,
1835
1834
  {
1836
1835
  analyticsMetadata: Ee,
1837
- onCardClick: E,
1838
- posthog: u,
1839
- widthOverrides: g
1836
+ onCardClick: c,
1837
+ posthog: p,
1838
+ widthOverrides: T
1840
1839
  }
1841
1840
  ),
1842
1841
  W && !!t.length && /* @__PURE__ */ e(
@@ -1845,70 +1844,78 @@ const z = p.createContext(null), lt = ({
1845
1844
  allowSingleCardPeeking: i,
1846
1845
  analyticsMetadata: Ee,
1847
1846
  beats: t,
1848
- showCarouselControls: h,
1849
- variant: c ? f : void 0,
1850
- visibleCardsCount: P,
1851
- ...j
1847
+ showCarouselControls: E,
1848
+ variant: d ? I : void 0,
1849
+ visibleCardsCount: m,
1850
+ ...q
1852
1851
  }
1853
1852
  ),
1854
1853
  W && !t.length && /* @__PURE__ */ e(
1855
- B,
1854
+ k,
1856
1855
  {
1857
1856
  sx: {
1858
- height: `calc(${ut[O]}px - 44px)`,
1859
- m: "0 auto",
1860
- maxWidth: _ ? "calc(100% - 32px)" : "100%",
1861
- width: "100%"
1857
+ alignItems: "center",
1858
+ height: r,
1859
+ width: T || "100%"
1862
1860
  },
1863
- children: S ? /* @__PURE__ */ e(Te, { ...b }) : /* @__PURE__ */ e(We, { ...b })
1861
+ children: /* @__PURE__ */ e(
1862
+ k,
1863
+ {
1864
+ sx: {
1865
+ height: `calc(${ut[y]}px - 44px)`,
1866
+ width: _ ? `calc(${T}px - 32px)` : "100%"
1867
+ },
1868
+ children: O ? /* @__PURE__ */ e(Oe, { ...Y }) : /* @__PURE__ */ e(Te, { ...Y })
1869
+ }
1870
+ )
1864
1871
  }
1865
1872
  )
1866
1873
  ] }) });
1867
- }, Jt = Z(St), Mt = ({
1874
+ }, Jt = P(St), Mt = ({
1868
1875
  isActiveCard: i,
1869
1876
  ariaLabel: o,
1870
1877
  heightOverrides: t,
1871
1878
  onCardClick: l,
1872
- posthog: r,
1873
- showIcon: n,
1879
+ posthog: n,
1880
+ showIcon: r,
1874
1881
  variant: a,
1875
- widthOverrides: E
1882
+ widthOverrides: c
1876
1883
  }) => {
1877
- const d = ie(), { ref: C, inView: u } = Re({
1878
- threshold: Oe
1879
- }), { cardsCopy: c } = L(), { onEvent: h } = K();
1880
- te(() => {
1881
- u && (h(Se.ON_VIEW_MORE_VIEWED), r?.capture("viewed_insight", {
1884
+ const h = te(), { ref: C, inView: p } = me({
1885
+ threshold: Ae
1886
+ }), { cardsCopy: d } = V(), { onEvent: E } = z();
1887
+ ee(() => {
1888
+ p && (E(ve.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
1882
1889
  template: "view_more_card"
1883
1890
  }));
1884
- }, [u]);
1891
+ }, [p]);
1885
1892
  const s = () => {
1886
- l && l(), h(y.ON_VIEW_MORE_CLICKED), r?.capture("clicked_insight", {
1893
+ l && l(), E(S.ON_VIEW_MORE_CLICKED), n?.capture("clicked_insight", {
1887
1894
  template: "view_more_card"
1888
1895
  });
1889
1896
  };
1890
1897
  return /* @__PURE__ */ e(
1891
- X,
1898
+ j,
1892
1899
  {
1893
- actionText: c.micro_card_cta,
1900
+ actionText: d.micro_card_cta,
1894
1901
  ariaLabel: o,
1895
- description: c.view_more_card_description,
1902
+ description: d.view_more_card_description,
1896
1903
  heightOverrides: t,
1897
- icon: /* @__PURE__ */ e(at, { color: d.palette.primary.main }),
1904
+ icon: /* @__PURE__ */ e(at, { color: h.palette.primary.main }),
1898
1905
  isActiveCard: i,
1899
1906
  onCardClick: s,
1900
- posthog: r,
1907
+ posthog: n,
1901
1908
  ref: C,
1902
- showIcon: n,
1903
- title: c.view_more_card_title,
1909
+ showIcon: r,
1910
+ title: d.view_more_card_title,
1904
1911
  variant: a,
1905
- widthOverrides: E
1912
+ widthOverrides: c
1906
1913
  }
1907
1914
  );
1908
- }, At = Z(Mt);
1915
+ }, At = P(Mt);
1909
1916
  export {
1910
1917
  ot as A,
1911
- X as B,
1918
+ j as B,
1912
1919
  It as C,
1913
1920
  lt as I,
1914
1921
  Rt as M,
@@ -1920,5 +1927,5 @@ export {
1920
1927
  Jt as b,
1921
1928
  at as c,
1922
1929
  dt as d,
1923
- Me as e
1930
+ Se as e
1924
1931
  };