@mx-cartographer/experiences 8.2.2 → 8.2.4-alpha-ram1-bug-testing

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 (78) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/{AccountDetailsHeader-CfdnKyJK.mjs → AccountDetailsHeader-DIysk_4w.mjs} +1 -1
  3. package/dist/{AccountFields-CAy0x_4i.mjs → AccountFields-mwJ8NXsX.mjs} +18 -18
  4. package/dist/{AccountListItem-BYyeeCf6.mjs → AccountListItem-BDXHs4tV.mjs} +7 -8
  5. package/dist/{CategorySelectorDrawer-Cu1ohxeM.mjs → CategorySelectorDrawer-CmaDLhnf.mjs} +71 -68
  6. package/dist/{ConnectCard-Dix8BoV_.mjs → ConnectCard-CCep7Zqe.mjs} +9 -9
  7. package/dist/{ConnectDrawer-DgfsTpyW.mjs → ConnectDrawer-Cnjr3Ddg.mjs} +2 -2
  8. package/dist/{ConnectionsDrawer-D7IXAza2.mjs → ConnectionsDrawer-CtfPXk0M.mjs} +1 -1
  9. package/dist/{CurrencyDialog-d4dL7vA5.mjs → CurrencyDialog-DumQCTPO.mjs} +18 -16
  10. package/dist/{CurrencyInput-B59ugxPN.mjs → CurrencyInput-adTIRtL3.mjs} +28 -26
  11. package/dist/{Dialog-iLlBR8TG.mjs → Dialog-CwWc0AbH.mjs} +11 -11
  12. package/dist/{Drawer-XPaLYjiO.mjs → Drawer-BXqqBMxg.mjs} +26 -28
  13. package/dist/{EmbeddedCard-BNl3quCs.mjs → EmbeddedCard-DPwJjqMH.mjs} +37 -37
  14. package/dist/{EmptyState-DHAkGsjk.mjs → EmptyState-CJUDc3kD.mjs} +17 -17
  15. package/dist/{ExportCsvAction-hDprC41l.mjs → ExportCsvAction-Bw02ZJEj.mjs} +2 -2
  16. package/dist/{GlobalAccountFilter-DrhtwPqh.mjs → GlobalAccountFilter-7Cg2-9A5.mjs} +25 -25
  17. package/dist/{Help-BSQm9o29.mjs → Help-DJ8PrVHX.mjs} +56 -73
  18. package/dist/{ListItemAction-DGjHxNDJ.mjs → ListItemAction-CwspSmQi.mjs} +22 -22
  19. package/dist/{ManageIncome-DwylSiWs.mjs → ManageIncome-B1JfqslT.mjs} +6 -6
  20. package/dist/{NotificationSettings-CCg-Tml2.mjs → NotificationSettings-6p-h5phZ.mjs} +48 -48
  21. package/dist/{OriginalBalanceAction-CvDx0K6k.mjs → OriginalBalanceAction-CkJPnp2c.mjs} +2 -2
  22. package/dist/{RecurringSettings-CPXLW6AR.mjs → RecurringSettings-cm6MK_aS.mjs} +1 -1
  23. package/dist/{ResponsiveButton-BNsV08Ud.mjs → ResponsiveButton-CC9F_Ezk.mjs} +1 -1
  24. package/dist/SearchBox-Cpgu_gdO.mjs +50 -0
  25. package/dist/Select-BFt-HD-L.mjs +55 -0
  26. package/dist/{SelectionBox-Bx2a5rh4.mjs → SelectionBox-B4xELRgp.mjs} +1 -1
  27. package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +1 -1
  28. package/dist/{SpendingLegend-BmkEr9Nh.mjs → SpendingLegend-5Ct_FZ8o.mjs} +1 -1
  29. package/dist/{ToggleListItem-BLu_fWA2.mjs → ToggleListItem-Dl1lXNwj.mjs} +29 -28
  30. package/dist/{TransactionDetails-CbBSxdOi.mjs → TransactionDetails-C3dlAzYf.mjs} +386 -393
  31. package/dist/{ViewMoreMicroCard-BB3Dusch.mjs → ViewMoreMicroCard-BD_MNc2z.mjs} +545 -533
  32. package/dist/{WidgetContainer-CYcmwsSu.mjs → WidgetContainer-DNuz_s7W.mjs} +5 -5
  33. package/dist/accounts/index.es.js +199 -194
  34. package/dist/analytics/index.es.js +1 -1
  35. package/dist/budgets/index.es.js +183 -184
  36. package/dist/cashflow/index.es.js +70 -80
  37. package/dist/categories/index.es.js +1 -1
  38. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  39. package/dist/common/components/WidgetContainer.d.ts +1 -1
  40. package/dist/common/components/charts/stackedlinechart/CustomAreaTooltip.d.ts +1 -1
  41. package/dist/common/hooks/usePrevious.d.ts +1 -1
  42. package/dist/common/index.es.js +206 -194
  43. package/dist/common/utils/Theme.d.ts +6 -5
  44. package/dist/common/utils/index.d.ts +1 -1
  45. package/dist/dashboard/index.es.js +47 -47
  46. package/dist/debts/index.es.js +140 -140
  47. package/dist/finstrong/index.es.js +40 -32
  48. package/dist/finstrong/util/finstrongUtils.d.ts +1 -1
  49. package/dist/goals/index.es.js +154 -165
  50. package/dist/help/index.es.js +2 -2
  51. package/dist/insights/components/insights/UserFeedback/Types.d.ts +1 -1
  52. package/dist/insights/components/shared/DirectDeposit/DirectDepositSubHeader.d.ts +3 -3
  53. package/dist/insights/hooks/useContainerDimensions.d.ts +1 -1
  54. package/dist/insights/index.es.js +677 -687
  55. package/dist/insights/themes/Typography.d.ts +0 -2
  56. package/dist/investments/index.es.js +205 -207
  57. package/dist/merchants/index.es.js +1 -1
  58. package/dist/microinsights/MicroCardTemplate.d.ts +2 -4
  59. package/dist/microinsights/cards/InsightCard.d.ts +2 -2
  60. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +3 -4
  61. package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +3 -4
  62. package/dist/microinsights/cards/ZeroStateCard.d.ts +3 -4
  63. package/dist/microinsights/carousel/BeatList.d.ts +2 -2
  64. package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +12 -1
  65. package/dist/microinsights/index.es.js +1 -1
  66. package/dist/microinsights/interfaces.d.ts +12 -4
  67. package/dist/networth/index.es.js +85 -87
  68. package/dist/notifications/index.es.js +7 -8
  69. package/dist/recurringtransactions/index.es.js +53 -53
  70. package/dist/settings/index.es.js +111 -111
  71. package/dist/spending/index.es.js +7 -7
  72. package/dist/transactions/components/shared/TransactionList.d.ts +2 -2
  73. package/dist/transactions/index.es.js +138 -140
  74. package/dist/trends/index.es.js +293 -292
  75. package/dist/{useScreenSize-CeFhWTt_.mjs → useScreenSize-mWpmnh5w.mjs} +1 -1
  76. package/package.json +29 -23
  77. package/dist/SearchBox-CwDgvWVJ.mjs +0 -48
  78. package/dist/Select-BZRUpOib.mjs +0 -51
@@ -1,33 +1,31 @@
1
- import { jsx as o, jsxs as N, Fragment as Se } from "react/jsx-runtime";
2
- import h, { useEffect as re, useState as ne } from "react";
1
+ import { jsx as o, jsxs as N, Fragment as Te } from "react/jsx-runtime";
2
+ import I, { useEffect as re, useState as ie } from "react";
3
3
  import { observer as U } from "mobx-react-lite";
4
- import w from "@mui/material/Stack";
5
- import ie from "@mui/material/Button";
6
- import { CategoryIcon as Ge, MerchantLogo as ke, InstitutionLogo as Ue, P as me, Text as ue, H3 as ze } from "@mxenabled/mxui";
7
- import { Icon as Ke, Close as Fe, ChevronLeft as He, ChevronRight as Te } from "@mxenabled/mx-icons";
8
- import { L as $e } from "./Loader-CxeBwuPG.mjs";
9
- import $ from "@mui/material/Box";
10
- import ae from "@mui/material/IconButton";
11
- import { alpha as s, useTheme as j } from "@mui/material/styles";
12
- import { useInView as Re } from "react-intersection-observer";
13
- import se from "@mui/material/styles/useTheme";
14
- import { C as je } from "./Category-DEKZGLYe.mjs";
15
- import { b as Ye } from "./Localization-DnoVyBNK.mjs";
16
- import Xe from "@mui/material/CircularProgress";
17
- import { makeAutoObservable as ce, runInAction as Oe } from "mobx";
18
- import { a as Ze, u as Qe, b as qe } from "./Analytics-CkYXKvco.mjs";
4
+ import k from "@mui/material/Stack";
5
+ import ke from "@mui/material/Button";
6
+ import { CategoryIcon as Ue, MerchantLogo as ze, InstitutionLogo as Ke, P as pe, Text as me, H3 as Fe } from "@mxenabled/mxui";
7
+ import { Icon as He, Close as $e, ChevronLeft as je, ChevronRight as Re } from "@mxenabled/mx-icons";
8
+ import { L as Ye } from "./Loader-CxeBwuPG.mjs";
9
+ import ae from "@mui/material/Box";
10
+ import ue from "@mui/material/IconButton";
11
+ import { useTheme as P, alpha as s } from "@mui/material/styles";
12
+ import { useInView as Oe } from "react-intersection-observer";
13
+ import { C as Xe } from "./Category-DEKZGLYe.mjs";
14
+ import { b as Ze } from "./Localization-DnoVyBNK.mjs";
15
+ import Qe from "@mui/material/CircularProgress";
16
+ import { makeAutoObservable as se, runInAction as We } from "mobx";
17
+ import { a as qe, u as Je, b as et } from "./Analytics-CkYXKvco.mjs";
19
18
  import { G as Ce, B as he } from "./GlobalCopyApi-wcnDUzMV.mjs";
20
- import { u as Je } from "./useWidgetLoadTimer-CJb-RELP.mjs";
21
- import et from "@mui/material/Card";
22
- import tt from "@mui/material/CardActionArea";
23
- import ot from "@mui/material/Avatar";
24
- class nt {
19
+ import { u as tt } from "./useWidgetLoadTimer-CJb-RELP.mjs";
20
+ import { Card as ot, CardActionArea as nt, Box as it, IconButton as rt, Stack as F, Button as ge } from "@mui/material";
21
+ import at from "@mui/material/Avatar";
22
+ class st {
25
23
  copyApi = new Ce("/", "");
26
24
  copyObject = {};
27
25
  namespace = "experiences";
28
26
  translationKey = "micro_insights";
29
27
  constructor() {
30
- ce(this);
28
+ se(this);
31
29
  }
32
30
  // NOTE: Not sure if this is special case, but other stores have this deprecation todo
33
31
  // DEPRECATED: Initialize api in constructor and use loadCopy instead
@@ -37,7 +35,7 @@ class nt {
37
35
  };
38
36
  loadCopy = async () => {
39
37
  const e = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
40
- Oe(() => {
38
+ We(() => {
41
39
  this.copyObject = e[this.translationKey];
42
40
  });
43
41
  };
@@ -51,7 +49,7 @@ class nt {
51
49
  return this.copyObject.zero_state;
52
50
  }
53
51
  }
54
- const le = {
52
+ const ce = {
55
53
  BillAmountNotStandard: "BillAmountNotStandard",
56
54
  CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
57
55
  DuplicatePaymentV2: "DuplicatePaymentV2",
@@ -68,58 +66,58 @@ const le = {
68
66
  WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
69
67
  MonthlySpendComparison: "MonthlySpendComparison",
70
68
  MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
71
- }, R = window?.app?.clientConfig?.microwidget_instance_id || "", ge = {
69
+ }, O = window?.app?.clientConfig?.microwidget_instance_id || "", Ie = {
72
70
  INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
73
- }, We = (t) => `on${t}Click`, we = (t) => `on${t}View`, Ne = (t) => `on${t}ViewFirstTime`, de = (t) => t.replace(/([a-z])([A-Z])/g, "$1 $2"), rt = () => Object.values(le).reduce(
71
+ }, we = (t) => `on${t}Click`, Ne = (t) => `on${t}View`, Me = (t) => `on${t}ViewFirstTime`, le = (t) => t.replace(/([a-z])([A-Z])/g, "$1 $2"), ct = () => Object.values(ce).reduce(
74
72
  (t, e) => ({
75
73
  ...t,
76
- [We(e)]: {
77
- action: D.MICRO_BEAT_CLICKED,
74
+ [we(e)]: {
75
+ action: b.MICRO_BEAT_CLICKED,
78
76
  category: L.BEAT_INTERACTION,
79
- label: de(e),
80
- value: R
77
+ label: le(e),
78
+ value: O
81
79
  }
82
80
  }),
83
81
  {}
84
- ), it = () => Object.values(le).reduce(
82
+ ), lt = () => Object.values(ce).reduce(
85
83
  (t, e) => ({
86
84
  ...t,
87
- [we(e)]: {
88
- action: D.MICRO_BEAT_DISPLAYED,
85
+ [Ne(e)]: {
86
+ action: b.MICRO_BEAT_DISPLAYED,
89
87
  category: L.BEAT_INTERACTION,
90
- label: de(e),
91
- value: R
88
+ label: le(e),
89
+ value: O
92
90
  }
93
91
  }),
94
92
  {}
95
- ), at = () => Object.values(le).reduce(
93
+ ), dt = () => Object.values(ce).reduce(
96
94
  (t, e) => ({
97
95
  ...t,
98
- [Ne(e)]: {
99
- action: D.MICRO_BEAT_DISPLAYED_FIRST_TIME,
96
+ [Me(e)]: {
97
+ action: b.MICRO_BEAT_DISPLAYED_FIRST_TIME,
100
98
  category: L.BEAT_INTERACTION,
101
- label: de(e),
102
- value: R
99
+ label: le(e),
100
+ value: O
103
101
  }
104
102
  }),
105
103
  {}
106
- ), b = {
104
+ ), v = {
107
105
  CAROUSEL_CONTROL: "Carousel Control",
108
106
  MICRO_WIDGET: "Micro Widget",
109
107
  VIEW_MORE: "View More"
110
108
  }, L = {
111
109
  MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
112
110
  BEAT_INTERACTION: "Beat Interaction"
113
- }, O = {
111
+ }, W = {
114
112
  ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
115
113
  ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
116
114
  ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
117
115
  ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
118
116
  ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
119
117
  ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
120
- }, Me = {
118
+ }, ve = {
121
119
  ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
122
- }, D = {
120
+ }, b = {
123
121
  CONTROL_BACKWARD: "Control Backward",
124
122
  CONTROL_FORWARD: "Control Forward",
125
123
  MICRO_BEAT_CLICKED: "Micro Beat Clicked",
@@ -127,93 +125,93 @@ const le = {
127
125
  MICRO_BEAT_DISPLAYED_FIRST_TIME: "Micro Beat Displayed For First Time",
128
126
  SWIPE_BACKWARD: "Swipe Backward",
129
127
  SWIPE_FORWARD: "Swipe Forward"
130
- }, G = {
128
+ }, B = {
131
129
  MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
132
130
  MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
133
131
  MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
134
132
  }, Ee = {
135
- [G.MICRO_WIDGET_CAROUSEL]: {
136
- label: b.MICRO_WIDGET,
137
- name: G.MICRO_WIDGET_CAROUSEL,
138
- path: ge.INSIGHTS_MICRO_WIDGET,
139
- value: R
133
+ [B.MICRO_WIDGET_CAROUSEL]: {
134
+ label: v.MICRO_WIDGET,
135
+ name: B.MICRO_WIDGET_CAROUSEL,
136
+ path: Ie.INSIGHTS_MICRO_WIDGET,
137
+ value: O
140
138
  },
141
139
  // zero state
142
- [G.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
143
- label: b.MICRO_WIDGET,
144
- name: G.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
145
- path: ge.INSIGHTS_MICRO_WIDGET,
146
- value: R
140
+ [B.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
141
+ label: v.MICRO_WIDGET,
142
+ name: B.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
143
+ path: Ie.INSIGHTS_MICRO_WIDGET,
144
+ value: O
147
145
  },
148
146
  // no relevant cards
149
- [G.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
150
- label: b.MICRO_WIDGET,
151
- name: G.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
147
+ [B.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
148
+ label: v.MICRO_WIDGET,
149
+ name: B.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
152
150
  path: "/micro-widget",
153
- value: R
151
+ value: O
154
152
  }
155
- }, Ie = {
153
+ }, fe = {
156
154
  // carousel control interaction events - clicks and swipes
157
- [O.ON_CAROUSEL_BACK_CLICK]: {
158
- action: D.CONTROL_BACKWARD,
155
+ [W.ON_CAROUSEL_BACK_CLICK]: {
156
+ action: b.CONTROL_BACKWARD,
159
157
  category: L.MICRO_WIDGET_INTERACTION,
160
- label: b.CAROUSEL_CONTROL,
161
- value: R
158
+ label: v.CAROUSEL_CONTROL,
159
+ value: O
162
160
  },
163
- [O.ON_CAROUSEL_FORWARD_CLICK]: {
164
- action: D.CONTROL_FORWARD,
161
+ [W.ON_CAROUSEL_FORWARD_CLICK]: {
162
+ action: b.CONTROL_FORWARD,
165
163
  category: L.MICRO_WIDGET_INTERACTION,
166
- label: b.CAROUSEL_CONTROL,
167
- value: R
164
+ label: v.CAROUSEL_CONTROL,
165
+ value: O
168
166
  },
169
- [O.ON_CAROUSEL_BACK_SWIPE]: {
170
- action: D.SWIPE_BACKWARD,
167
+ [W.ON_CAROUSEL_BACK_SWIPE]: {
168
+ action: b.SWIPE_BACKWARD,
171
169
  category: L.MICRO_WIDGET_INTERACTION,
172
- label: b.CAROUSEL_CONTROL,
173
- value: R
170
+ label: v.CAROUSEL_CONTROL,
171
+ value: O
174
172
  },
175
- [O.ON_CAROUSEL_FORWARD_SWIPE]: {
176
- action: D.SWIPE_FORWARD,
173
+ [W.ON_CAROUSEL_FORWARD_SWIPE]: {
174
+ action: b.SWIPE_FORWARD,
177
175
  category: L.MICRO_WIDGET_INTERACTION,
178
- label: b.CAROUSEL_CONTROL,
179
- value: R
176
+ label: v.CAROUSEL_CONTROL,
177
+ value: O
180
178
  },
181
179
  // read more card events
182
- [O.ON_VIEW_MORE_CLICKED]: {
183
- action: D.MICRO_BEAT_CLICKED,
180
+ [W.ON_VIEW_MORE_CLICKED]: {
181
+ action: b.MICRO_BEAT_CLICKED,
184
182
  category: L.BEAT_INTERACTION,
185
- label: b.VIEW_MORE,
186
- value: R
183
+ label: v.VIEW_MORE,
184
+ value: O
187
185
  },
188
- [Me.ON_VIEW_MORE_VIEWED]: {
189
- action: D.MICRO_BEAT_DISPLAYED,
186
+ [ve.ON_VIEW_MORE_VIEWED]: {
187
+ action: b.MICRO_BEAT_DISPLAYED,
190
188
  category: L.BEAT_INTERACTION,
191
- label: b.VIEW_MORE,
192
- value: R
189
+ label: v.VIEW_MORE,
190
+ value: O
193
191
  },
194
- ...rt(),
195
- ...it(),
196
- ...at()
197
- }, fe = async (t, e) => !e || !Ie[t] ? null : e.sendAnalyticEvent(Ie[t]).then((n) => n).catch((n) => {
192
+ ...ct(),
193
+ ...lt(),
194
+ ...dt()
195
+ }, ye = async (t, e) => !e || !fe[t] ? null : e.sendAnalyticEvent(fe[t]).then((n) => n).catch((n) => {
198
196
  throw n;
199
- }), ye = async (t, e) => !e || !Ee[t] ? null : e.sendAnalyticsPageview(Ee[t]).then((n) => n).catch((n) => {
197
+ }), Ae = async (t, e) => !e || !Ee[t] ? null : e.sendAnalyticsPageview(Ee[t]).then((n) => n).catch((n) => {
200
198
  throw n;
201
199
  });
202
- class st {
203
- onAnalyticEvent = fe;
204
- onAnalyticPageView = ye;
200
+ class _t {
201
+ onAnalyticEvent = ye;
202
+ onAnalyticPageView = Ae;
205
203
  beatApi = new he("/", "");
206
204
  constructor() {
207
- ce(this);
205
+ se(this);
208
206
  }
209
- initialize = async (e, n, r) => {
210
- this.onAnalyticEvent = (i, l) => {
211
- fe(i, l).then((a) => a).catch((a) => {
212
- throw a.status === 401 && r(), a;
207
+ initialize = async (e, n, i) => {
208
+ this.onAnalyticEvent = (r, l) => {
209
+ ye(r, l).then((a) => a).catch((a) => {
210
+ throw a.status === 401 && i(), a;
213
211
  });
214
- }, this.onAnalyticPageView = (i, l) => {
215
- ye(i, l).then((a) => a).catch((a) => {
216
- throw a.status === 401 && r(), a;
212
+ }, this.onAnalyticPageView = (r, l) => {
213
+ Ae(r, l).then((a) => a).catch((a) => {
214
+ throw a.status === 401 && i(), a;
217
215
  });
218
216
  }, this.beatApi = new he(e, n);
219
217
  };
@@ -224,7 +222,7 @@ class st {
224
222
  this.beatApi.updateOffer(e);
225
223
  };
226
224
  }
227
- class ct {
225
+ class pt {
228
226
  copyStore;
229
227
  endpoint = "/";
230
228
  insightsMicroWidgetStore;
@@ -232,33 +230,33 @@ class ct {
232
230
  token = "";
233
231
  isInitialized = !1;
234
232
  constructor() {
235
- this.copyStore = new nt(), this.insightsMicroWidgetStore = new st(), ce(this);
233
+ this.copyStore = new st(), this.insightsMicroWidgetStore = new _t(), se(this);
236
234
  }
237
- initialize = async (e, n, r) => {
238
- await this.copyStore.initialize(e, n), await this.insightsMicroWidgetStore.initialize(e, n, r);
239
- const i = await Ze(e, n, "1.0.0", "Micro Insights Carousel");
240
- Oe(() => {
241
- this.session = i, this.isInitialized = !0;
235
+ initialize = async (e, n, i) => {
236
+ await this.copyStore.initialize(e, n), await this.insightsMicroWidgetStore.initialize(e, n, i);
237
+ const r = await qe(e, n, "1.0.0", "Micro Insights Carousel");
238
+ We(() => {
239
+ this.session = r, this.isInitialized = !0;
242
240
  });
243
241
  };
244
242
  }
245
- const Y = h.createContext(null), lt = ({
243
+ const H = I.createContext(null), mt = ({
246
244
  onEvent: t,
247
245
  onPageview: e,
248
246
  store: n,
249
- children: r
250
- }) => /* @__PURE__ */ o(Y.Provider, { value: { onEvent: t, onPageview: e, store: n, children: r }, children: r }), dt = ({ beat: t }) => {
251
- const { primary_category_guid: e, category_guids: n } = t, r = e || n?.[0] || je.UNCATEGORIZED;
252
- return /* @__PURE__ */ o(Ge, { categoryGuid: r, size: 32, sx: { minWidth: 32 } });
247
+ children: i
248
+ }) => /* @__PURE__ */ o(H.Provider, { value: { onEvent: t, onPageview: e, store: n, children: i }, children: i }), ut = ({ beat: t }) => {
249
+ const { primary_category_guid: e, category_guids: n } = t, i = e || n?.[0] || Xe.UNCATEGORIZED;
250
+ return /* @__PURE__ */ o(Ue, { categoryGuid: i, size: 32, sx: { minWidth: 32 } });
253
251
  }, c = ({
254
252
  avatarSx: t,
255
253
  bgColor: e,
256
254
  name: n,
257
- iconColor: r = "primary",
258
- fill: i = !0,
255
+ iconColor: i = "primary",
256
+ fill: r = !0,
259
257
  sx: l
260
258
  }) => /* @__PURE__ */ o(
261
- ot,
259
+ at,
262
260
  {
263
261
  sx: {
264
262
  bgcolor: e,
@@ -267,15 +265,15 @@ const Y = h.createContext(null), lt = ({
267
265
  ...t
268
266
  },
269
267
  variant: "rounded",
270
- children: /* @__PURE__ */ o(Ke, { color: r, fill: i, name: n, size: 20, sx: l })
268
+ children: /* @__PURE__ */ o(He, { color: i, fill: r, name: n, size: 20, sx: l })
271
269
  }
272
- ), _t = ({ beat: t }) => {
273
- const { category_guids: e, merchant_guids: n, primary_category_guid: r, primary_merchant_guid: i } = t;
270
+ ), Ct = ({ beat: t }) => {
271
+ const { category_guids: e, merchant_guids: n, primary_category_guid: i, primary_merchant_guid: r } = t;
274
272
  return /* @__PURE__ */ o(
275
- ke,
273
+ ze,
276
274
  {
277
- categoryGuid: r || e && e[0] || "",
278
- merchantGuid: i || n[0],
275
+ categoryGuid: i || e && e[0] || "",
276
+ merchantGuid: r || n[0],
279
277
  size: 32,
280
278
  sx: {
281
279
  display: "flex",
@@ -284,51 +282,51 @@ const Y = h.createContext(null), lt = ({
284
282
  }
285
283
  }
286
284
  );
287
- }, pt = (t) => t ? t.data ? t.data.map((e) => {
285
+ }, ht = (t) => t ? t.data ? t.data.map((e) => {
288
286
  const n = {};
289
- return t.names?.map((r, i) => {
290
- n[r] = e[i];
287
+ return t.names?.map((i, r) => {
288
+ n[i] = e[r];
291
289
  }), n;
292
- }) : [] : [], q = "primary", be = "success", Le = "error", De = (t) => {
293
- const e = pt(t), n = Math.floor(e.length / 2);
290
+ }) : [] : [], q = "primary", Le = "success", be = "error", De = (t) => {
291
+ const e = ht(t), n = Math.floor(e.length / 2);
294
292
  if (n === 0 || n === e.length) return q;
295
- const r = e[0]?.amount, i = e[n]?.amount;
296
- return r == null || i == null ? q : r > i ? Le : r < i ? be : q;
297
- }, mt = (t, e) => t < e ? be : t > e ? Le : q, ut = ({ beat: t }) => {
298
- const e = se(), n = De(t.data_series), r = e.palette[n].main;
299
- return /* @__PURE__ */ o(c, { bgColor: s(r, 0.15), iconColor: n, name: "bar_chart" });
300
- }, Ct = ({ beat: t }) => {
301
- const e = se(), n = t.payload?.average_spend || 0;
302
- let r = 0;
293
+ const i = e[0]?.amount, r = e[n]?.amount;
294
+ return i == null || r == null ? q : i > r ? be : i < r ? Le : q;
295
+ }, gt = (t, e) => t < e ? Le : t > e ? be : q, It = ({ beat: t }) => {
296
+ const e = P(), n = De(t.data_series), i = e.palette[n].main;
297
+ return /* @__PURE__ */ o(c, { bgColor: s(i, 0.15), iconColor: n, name: "bar_chart" });
298
+ }, Et = ({ beat: t }) => {
299
+ const e = P(), n = t.payload?.average_spend || 0;
300
+ let i = 0;
303
301
  if (t.data_series?.data && t.data_series.data.length > 0) {
304
302
  const a = (t.data_series.names || []).indexOf("amount");
305
- a !== -1 && (r = t.data_series.data[0][a] || 0);
303
+ a !== -1 && (i = t.data_series.data[0][a] || 0);
306
304
  }
307
- const i = mt(r, n);
305
+ const r = gt(i, n);
308
306
  return /* @__PURE__ */ o(
309
307
  c,
310
308
  {
311
- bgColor: s(e.palette[i].main, 0.15),
312
- iconColor: i,
309
+ bgColor: s(e.palette[r].main, 0.15),
310
+ iconColor: r,
313
311
  name: "timeline"
314
312
  }
315
313
  );
316
- }, ht = ({ beat: t }) => {
317
- const e = se(), n = De(t.data_series), r = e.palette[n].main;
314
+ }, ft = ({ beat: t }) => {
315
+ const e = P(), n = De(t.data_series), i = e.palette[n].main;
318
316
  return /* @__PURE__ */ o(
319
317
  c,
320
318
  {
321
- bgColor: s(r, 0.15),
319
+ bgColor: s(i, 0.15),
322
320
  fill: !1,
323
321
  iconColor: n,
324
322
  name: "area_chart"
325
323
  }
326
324
  );
327
- }, gt = ({ beat: t }) => /* @__PURE__ */ o(Ue, { alt: t.institutionName || "", institutionGuid: t.institutionGuid || "" }), Et = {
325
+ }, yt = ({ beat: t }) => /* @__PURE__ */ o(Ke, { alt: t.institutionName || "", institutionGuid: t.institutionGuid || "" }), At = {
328
326
  0: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" }),
329
- 1: (t) => /* @__PURE__ */ o(dt, { beat: t }),
330
- 2: (t) => /* @__PURE__ */ o(_t, { beat: t }),
331
- 3: (t) => /* @__PURE__ */ o(ut, { beat: t }),
327
+ 1: (t) => /* @__PURE__ */ o(ut, { beat: t }),
328
+ 2: (t) => /* @__PURE__ */ o(Ct, { beat: t }),
329
+ 3: (t) => /* @__PURE__ */ o(It, { beat: t }),
332
330
  4: (t, e) => /* @__PURE__ */ o(
333
331
  c,
334
332
  {
@@ -361,7 +359,7 @@ const Y = h.createContext(null), lt = ({
361
359
  sx: { color: "text.primary" }
362
360
  }
363
361
  ),
364
- 12: (t) => /* @__PURE__ */ o(ht, { beat: t }),
362
+ 12: (t) => /* @__PURE__ */ o(ft, { beat: t }),
365
363
  13: () => /* @__PURE__ */ o(
366
364
  c,
367
365
  {
@@ -381,7 +379,13 @@ const Y = h.createContext(null), lt = ({
381
379
  name: "person"
382
380
  }
383
381
  ),
384
- 15: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "payment_arrow_down" }),
382
+ 15: (t, e) => /* @__PURE__ */ o(
383
+ c,
384
+ {
385
+ bgColor: s(e.palette.primary.main, 0.15),
386
+ name: "payment_arrow_down"
387
+ }
388
+ ),
385
389
  16: (t, e) => /* @__PURE__ */ o(
386
390
  c,
387
391
  {
@@ -401,7 +405,13 @@ const Y = h.createContext(null), lt = ({
401
405
  ),
402
406
  19: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "finance_mode" }),
403
407
  20: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "tips_and_updates" }),
404
- 21: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "currency_exchange" }),
408
+ 21: (t, e) => /* @__PURE__ */ o(
409
+ c,
410
+ {
411
+ bgColor: s(e.palette.primary.main, 0.15),
412
+ name: "currency_exchange"
413
+ }
414
+ ),
405
415
  22: (t, e) => /* @__PURE__ */ o(
406
416
  c,
407
417
  {
@@ -430,7 +440,7 @@ const Y = h.createContext(null), lt = ({
430
440
  ),
431
441
  27: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "directions_car" }),
432
442
  28: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "contract" }),
433
- 29: (t) => /* @__PURE__ */ o(Ct, { beat: t }),
443
+ 29: (t) => /* @__PURE__ */ o(Et, { beat: t }),
434
444
  30: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "calendar_month" }),
435
445
  31: (t, e) => /* @__PURE__ */ o(
436
446
  c,
@@ -449,83 +459,82 @@ const Y = h.createContext(null), lt = ({
449
459
  name: "storefront"
450
460
  }
451
461
  ),
452
- 34: (t) => /* @__PURE__ */ o(gt, { beat: t })
453
- }, It = ({ beat: t }) => {
454
- const e = j(), { icon_type: n } = t, r = n != null ? Et[n] : null;
455
- return r ? r(t, e) : /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" });
456
- }, x = () => {
457
- const t = h.useContext(Y);
462
+ 34: (t) => /* @__PURE__ */ o(yt, { beat: t })
463
+ }, St = ({ beat: t }) => {
464
+ const e = P(), { icon_type: n } = t, i = n != null ? At[n] : null;
465
+ return i ? i(t, e) : /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" });
466
+ }, D = () => {
467
+ const t = I.useContext(H);
458
468
  if (!t)
459
469
  throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
460
470
  return t.store.copyStore;
461
- }, ft = () => {
462
- const t = h.useContext(Y);
471
+ }, Tt = () => {
472
+ const t = I.useContext(H);
463
473
  if (!t?.store?.insightsMicroWidgetStore)
464
474
  throw new Error(
465
475
  "useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
466
476
  );
467
477
  return t.store.insightsMicroWidgetStore;
468
- }, X = () => {
469
- const t = h.useContext(Y);
478
+ }, $ = () => {
479
+ const t = I.useContext(H);
470
480
  if (!t)
471
481
  throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
472
482
  return { onEvent: t.onEvent };
473
483
  }, xe = () => {
474
- const t = h.useContext(Y);
484
+ const t = I.useContext(H);
475
485
  if (!t)
476
486
  throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
477
487
  return { onPageview: t.onPageview };
478
- }, yt = {
488
+ }, Rt = {
479
489
  LARGE: 180,
480
490
  STANDARD: 154,
481
491
  XLARGE: 200,
482
492
  XXLARGE: 248
483
- }, At = 50, ve = 1, J = h.forwardRef(
493
+ }, Ot = 50, Be = 1, J = I.forwardRef(
484
494
  function({
485
495
  ariaLabel: e,
486
- cardSx: n,
487
- closeAriaLabel: r,
496
+ closeAriaLabel: n,
488
497
  description: i,
498
+ elevation: r,
489
499
  icon: l,
490
500
  isActiveCard: a,
491
- hasCardEffect: u = !1,
492
- heightOverrides: I,
493
- onClose: g,
494
- onCardClick: d,
495
- onPrimaryAction: _,
496
- onSecondaryAction: p,
497
- primaryActionText: m,
498
- secondaryActionText: f,
499
- title: S,
501
+ heightOverrides: u,
502
+ onClose: C,
503
+ onCardClick: E,
504
+ onPrimaryAction: h,
505
+ onSecondaryAction: d,
506
+ primaryActionText: _,
507
+ secondaryActionText: p,
508
+ title: g,
500
509
  variant: y,
501
- widthOverrides: A,
502
- ...M
503
- }, z) {
504
- const E = !!(_ && m), v = !!(p && f), P = u ? et : $, T = /* @__PURE__ */ N(Se, { children: [
505
- g && /* @__PURE__ */ o(
506
- ae,
510
+ widthOverrides: S,
511
+ ...w
512
+ }, T) {
513
+ const A = !!(h && _), R = /* @__PURE__ */ N(Te, { children: [
514
+ C && /* @__PURE__ */ o(
515
+ rt,
507
516
  {
508
- "aria-label": r,
509
- onClick: (C) => {
510
- C.stopPropagation(), g?.();
517
+ "aria-label": n,
518
+ onClick: (m) => {
519
+ m.stopPropagation(), C?.();
511
520
  },
512
- onMouseDown: (C) => {
513
- C.stopPropagation();
521
+ onMouseDown: (m) => {
522
+ m.stopPropagation();
514
523
  },
515
- onTouchStart: (C) => {
516
- C.stopPropagation();
524
+ onTouchStart: (m) => {
525
+ m.stopPropagation();
517
526
  },
518
527
  sx: { minHeight: 40, minWidth: 40, position: "absolute", right: 4, top: 4 },
519
- children: /* @__PURE__ */ o(Fe, {})
528
+ children: /* @__PURE__ */ o($e, {})
520
529
  }
521
530
  ),
522
- /* @__PURE__ */ N(w, { sx: { gap: 6, height: "100%", justifyContent: "space-between" }, children: [
523
- /* @__PURE__ */ N(w, { sx: { flexDirection: "row", gap: 12 }, children: [
531
+ /* @__PURE__ */ N(F, { sx: { gap: 6, height: "100%", justifyContent: "space-between" }, children: [
532
+ /* @__PURE__ */ N(F, { sx: { flexDirection: "row", gap: 12 }, children: [
524
533
  l && l,
525
- /* @__PURE__ */ N(w, { sx: { gap: 6 }, children: [
526
- /* @__PURE__ */ o(w, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: /* @__PURE__ */ o(me, { bold: !0, sx: { lineHeight: "16px" }, variant: "body1", children: S }) }),
534
+ /* @__PURE__ */ N(F, { sx: { gap: 6 }, children: [
535
+ /* @__PURE__ */ o(F, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: /* @__PURE__ */ o(pe, { bold: !0, sx: { lineHeight: "16px" }, variant: "body1", children: g }) }),
527
536
  /* @__PURE__ */ o(
528
- me,
537
+ pe,
529
538
  {
530
539
  dangerouslySetInnerHTML: { __html: i },
531
540
  sx: {
@@ -533,7 +542,7 @@ const Y = h.createContext(null), lt = ({
533
542
  overflow: "hidden",
534
543
  textOverflow: "ellipsis",
535
544
  WebkitBoxOrient: "vertical",
536
- WebkitLineClamp: E ? 2 : 3,
545
+ WebkitLineClamp: A ? 2 : 3,
537
546
  "& .bold-copy": {
538
547
  fontWeight: "bold",
539
548
  fontFamily: "inherit"
@@ -544,8 +553,8 @@ const Y = h.createContext(null), lt = ({
544
553
  )
545
554
  ] })
546
555
  ] }),
547
- E && /* @__PURE__ */ N(
548
- w,
556
+ A && /* @__PURE__ */ N(
557
+ F,
549
558
  {
550
559
  sx: {
551
560
  alignItems: "center",
@@ -555,40 +564,40 @@ const Y = h.createContext(null), lt = ({
555
564
  pl: l ? 36 : 0
556
565
  },
557
566
  children: [
558
- E && /* @__PURE__ */ o(
559
- ie,
567
+ A && /* @__PURE__ */ o(
568
+ ge,
560
569
  {
561
- onClick: (C) => {
562
- C.stopPropagation(), _?.();
570
+ onClick: (m) => {
571
+ m.stopPropagation(), h?.();
563
572
  },
564
- onMouseDown: (C) => {
565
- C.stopPropagation();
573
+ onMouseDown: (m) => {
574
+ m.stopPropagation();
566
575
  },
567
- onTouchStart: (C) => {
568
- C.stopPropagation();
576
+ onTouchStart: (m) => {
577
+ m.stopPropagation();
569
578
  },
570
579
  size: "small",
571
580
  sx: { px: 8, ml: l ? 0 : -8 },
572
581
  variant: "text",
573
- children: /* @__PURE__ */ o(ue, { bold: !0, variant: "body2", children: m })
582
+ children: /* @__PURE__ */ o(me, { bold: !0, variant: "body2", children: _ })
574
583
  }
575
584
  ),
576
- v && /* @__PURE__ */ o(
577
- ie,
585
+ !!(d && p) && /* @__PURE__ */ o(
586
+ ge,
578
587
  {
579
- onClick: (C) => {
580
- C.stopPropagation(), p?.();
588
+ onClick: (m) => {
589
+ m.stopPropagation(), d?.();
581
590
  },
582
- onMouseDown: (C) => {
583
- C.stopPropagation();
591
+ onMouseDown: (m) => {
592
+ m.stopPropagation();
584
593
  },
585
- onTouchStart: (C) => {
586
- C.stopPropagation();
594
+ onTouchStart: (m) => {
595
+ m.stopPropagation();
587
596
  },
588
597
  size: "small",
589
598
  sx: { px: 8 },
590
599
  variant: "text",
591
- children: /* @__PURE__ */ o(ue, { bold: !0, sx: { color: "text.secondary" }, variant: "body2", children: f })
600
+ children: /* @__PURE__ */ o(me, { bold: !0, sx: { color: "text.secondary" }, variant: "body2", children: p })
592
601
  }
593
602
  )
594
603
  ]
@@ -597,92 +606,94 @@ const Y = h.createContext(null), lt = ({
597
606
  ] })
598
607
  ] });
599
608
  return /* @__PURE__ */ o(
600
- P,
609
+ ot,
601
610
  {
602
611
  "aria-hidden": !a,
603
612
  "aria-label": e,
604
- ref: z,
613
+ elevation: r,
614
+ ref: T,
605
615
  role: "group",
606
616
  sx: {
607
617
  backgroundColor: "background.paper",
608
- height: I ? "100%" : 120,
609
- minWidth: A ? `${A}px` : "100%",
618
+ height: u ? "100%" : 120,
619
+ minWidth: S ? `${S}px` : "100%",
610
620
  position: "relative",
611
621
  my: 1,
612
- ...n
622
+ borderRadius: 2
613
623
  },
614
- tabIndex: d || !a ? -1 : 0,
624
+ tabIndex: E || !a ? -1 : 0,
615
625
  variant: y,
616
- ...M,
617
- children: d ? /* @__PURE__ */ o(
618
- tt,
626
+ ...w,
627
+ children: E ? /* @__PURE__ */ o(
628
+ nt,
619
629
  {
620
630
  component: "div",
621
- onClick: d,
631
+ onClick: E,
622
632
  sx: {
623
633
  pb: 8,
624
634
  pt: 16,
625
635
  px: 16,
626
636
  height: "100%"
627
637
  },
628
- children: T
638
+ children: R
629
639
  }
630
- ) : /* @__PURE__ */ o($, { sx: { pb: 8, pt: 16, px: 16, height: "100%" }, children: T })
640
+ ) : /* @__PURE__ */ o(it, { sx: { pb: 8, pt: 16, px: 16, height: "100%" }, children: R })
631
641
  }
632
642
  );
633
643
  }
634
- ), St = ({
644
+ ), Wt = ({
635
645
  ariaLabel: t,
636
646
  beat: e,
637
- index: n,
647
+ elevation: n,
648
+ index: i,
638
649
  isActiveCard: r,
639
- onCardClick: i,
640
- posthog: l,
641
- widthOverrides: a,
642
- variant: u,
643
- showIcon: I,
644
- heightOverrides: g
650
+ onCardClick: l,
651
+ posthog: a,
652
+ widthOverrides: u,
653
+ variant: C,
654
+ showIcon: E,
655
+ heightOverrides: h
645
656
  }) => {
646
- const { ref: d, inView: _ } = Re({
647
- threshold: ve
648
- }), { cardsCopy: p } = x(), { onEvent: m } = X(), { updateBeat: f, updateOffer: S } = ft();
657
+ const { ref: d, inView: _ } = Oe({
658
+ threshold: Be
659
+ }), { cardsCopy: p } = D(), { onEvent: g } = $(), { updateBeat: y, updateOffer: S } = Tt();
649
660
  re(() => {
650
- _ && (e.has_been_displayed ? m(we(e.template)) : (e.guid.startsWith("OFR") ? S({
661
+ _ && (e.has_been_displayed ? g(Ne(e.template)) : (e.guid.startsWith("OFR") ? S({
651
662
  ...e,
652
663
  has_been_displayed: !0
653
- }) : f({
664
+ }) : y({
654
665
  ...e,
655
666
  has_been_displayed: !0
656
- }), m(Ne(e.template))));
667
+ }), g(Me(e.template))));
657
668
  }, [_]), re(() => {
658
669
  if (_ && e)
659
670
  if (e.template === "MarketingOffer") {
660
- const A = e;
661
- l?.capture("viewed_messaging_insight", {
671
+ const T = e;
672
+ a?.capture("viewed_messaging_insight", {
662
673
  template: e.template,
663
- campaign_guid: A.campaign_guid,
664
- campaign_name: A.pulse_campaign_name
674
+ campaign_guid: T.campaign_guid,
675
+ campaign_name: T.pulse_campaign_name
665
676
  });
666
677
  } else
667
- l?.capture("viewed_insight", {
678
+ a?.capture("viewed_insight", {
668
679
  beat_guid: e.guid,
669
680
  template: e.template,
670
- position: n
681
+ position: i
671
682
  });
672
- }, [e, n, _]);
673
- const y = () => {
674
- if (i && i(e), m(We(e.template)), e.template === "MarketingOffer") {
675
- const A = e;
676
- l?.capture("clicked_messaging_insight", {
683
+ }, [e, i, _]);
684
+ const w = () => {
685
+ if (l && l(e), g(we(e.template)), e.template === "MarketingOffer") {
686
+ const T = e;
687
+ a?.capture("clicked_messaging_insight", {
677
688
  template: e.template,
678
- campaign_guid: A.campaign_guid,
679
- campaign_name: A.pulse_campaign_name
689
+ campaign_guid: T.campaign_guid,
690
+ campaign_name: T.pulse_campaign_name
680
691
  });
681
692
  } else
682
- l?.capture("clicked_insight", {
693
+ a?.capture("clicked_insight", {
683
694
  beat_guid: e.guid,
684
695
  template: e.template,
685
- position: n
696
+ position: i
686
697
  });
687
698
  };
688
699
  return /* @__PURE__ */ o(
@@ -690,36 +701,33 @@ const Y = h.createContext(null), lt = ({
690
701
  {
691
702
  "aria-roledescription": "slide",
692
703
  ariaLabel: t,
693
- cardSx: {
694
- borderRadius: 2
695
- },
696
704
  description: e?.html_micro_description && e?.html_micro_description.length > 0 ? e.html_micro_description : e.html_description || "",
697
- hasCardEffect: !0,
698
- heightOverrides: g,
699
- icon: I && /* @__PURE__ */ o(It, { beat: e }),
705
+ elevation: n,
706
+ heightOverrides: h,
707
+ icon: E && /* @__PURE__ */ o(St, { beat: e }),
700
708
  isActiveCard: r,
701
- onCardClick: y,
702
- onPrimaryAction: y,
709
+ onCardClick: w,
710
+ onPrimaryAction: w,
703
711
  primaryActionText: e.micro_call_to_action || p?.micro_card_cta,
704
712
  ref: d,
705
713
  title: e.micro_title && e.micro_title.length > 0 ? e.micro_title : e.title,
706
- variant: u,
707
- widthOverrides: a
714
+ variant: C,
715
+ widthOverrides: u
708
716
  }
709
717
  );
710
- }, Tt = ({
718
+ }, wt = ({
711
719
  currentBeatIndex: t,
712
720
  numBeats: e,
713
721
  onNextClick: n,
714
- onPreviousClick: r,
715
- scrollRightBoundary: i,
722
+ onPreviousClick: i,
723
+ scrollRightBoundary: r,
716
724
  scrollX: l,
717
725
  shouldApplyDotAnimation: a = !1,
718
726
  visibleCardsCount: u = 1
719
727
  }) => {
720
- const I = j(), { carouselCopy: g } = x(), d = Math.floor(l) > i || t - u + 1 === 0, _ = l < 0 || e - 1 === t, p = I.palette.grey[500], m = I.palette.primary.main;
728
+ const C = P(), { carouselCopy: E } = D(), h = Math.floor(l) > r || t - u + 1 === 0, d = l < 0 || e - 1 === t, _ = C.palette.grey[500], p = C.palette.primary.main;
721
729
  return /* @__PURE__ */ N(
722
- w,
730
+ k,
723
731
  {
724
732
  direction: "row",
725
733
  sx: {
@@ -734,30 +742,30 @@ const Y = h.createContext(null), lt = ({
734
742
  },
735
743
  children: [
736
744
  /* @__PURE__ */ o(
737
- ae,
745
+ ue,
738
746
  {
739
- "aria-disabled": d,
740
- "aria-label": g?.previous_insight_cta_aria,
741
- disabled: d,
742
- onClick: r,
747
+ "aria-disabled": h,
748
+ "aria-label": E?.previous_insight_cta_aria,
749
+ disabled: h,
750
+ onClick: i,
743
751
  children: /* @__PURE__ */ o(
744
- He,
752
+ je,
745
753
  {
746
- style: {
747
- color: d ? p : m
754
+ sx: {
755
+ color: h ? _ : p
748
756
  }
749
757
  }
750
758
  )
751
759
  }
752
760
  ),
753
- Array.from({ length: e }).map((f, S) => {
754
- const y = S === t;
761
+ Array.from({ length: e }).map((g, y) => {
762
+ const S = y === t;
755
763
  return /* @__PURE__ */ o(
756
- $,
764
+ ae,
757
765
  {
758
766
  className: "mx-insights-micro-carousel-dots",
759
767
  sx: {
760
- bgcolor: y ? m : p,
768
+ bgcolor: S ? p : _,
761
769
  height: 8,
762
770
  mr: 8,
763
771
  // existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
@@ -770,24 +778,24 @@ const Y = h.createContext(null), lt = ({
770
778
  borderRadius: "50%",
771
779
  p: 0
772
780
  },
773
- width: y && a ? 24 : 8
781
+ width: S && a ? 24 : 8
774
782
  }
775
783
  },
776
- `carousel-button-${S}`
784
+ `carousel-button-${y}`
777
785
  );
778
786
  }),
779
787
  /* @__PURE__ */ o(
780
- ae,
788
+ ue,
781
789
  {
782
- "aria-disabled": _,
783
- "aria-label": g?.next_insight_cta_aria,
784
- disabled: _,
790
+ "aria-disabled": d,
791
+ "aria-label": E?.next_insight_cta_aria,
792
+ disabled: d,
785
793
  onClick: n,
786
794
  children: /* @__PURE__ */ o(
787
- Te,
795
+ Re,
788
796
  {
789
- style: {
790
- color: _ ? p : m
797
+ sx: {
798
+ color: d ? _ : p
791
799
  }
792
800
  }
793
801
  )
@@ -796,131 +804,134 @@ const Y = h.createContext(null), lt = ({
796
804
  ]
797
805
  }
798
806
  );
799
- }, Rt = ({
807
+ }, Nt = ({
800
808
  activeCardIndex: t,
801
809
  beats: e,
802
810
  cardWidth: n,
811
+ elevation: i,
803
812
  heightOverrides: r,
804
- onCardClick: i,
805
- posthog: l,
806
- showIcon: a,
807
- variant: u
813
+ onCardClick: l,
814
+ posthog: a,
815
+ showIcon: u,
816
+ variant: C
808
817
  }) => {
809
- const { carouselCopy: I } = x(), g = {
818
+ const { carouselCopy: E } = D(), h = {
819
+ elevation: i,
810
820
  heightOverrides: r,
811
- posthog: l,
812
- showIcon: a,
813
- variant: u
821
+ posthog: a,
822
+ showIcon: u,
823
+ variant: C
814
824
  };
815
- return /* @__PURE__ */ N(Se, { children: [
825
+ return /* @__PURE__ */ N(Te, { children: [
816
826
  e.map((d, _) => {
817
- const p = _ + 1, m = e.length + 1, f = Ye(
818
- I?.card_position_in_carousel_aria,
827
+ const p = _ + 1, g = e.length + 1, y = Ze(
828
+ E?.card_position_in_carousel_aria,
819
829
  p.toString(),
820
- m.toString()
821
- ), S = d.micro_title && d.micro_title.length > 0, y = d.micro_description && d.micro_description.length > 0, A = S ? d.micro_title : d.title, M = y ? d.micro_description : d.description;
830
+ g.toString()
831
+ ), S = d.micro_title && d.micro_title.length > 0, w = d.micro_description && d.micro_description.length > 0, T = S ? d.micro_title : d.title, A = w ? d.micro_description : d.description;
822
832
  return /* @__PURE__ */ o(
823
- St,
833
+ Wt,
824
834
  {
825
- ariaLabel: `${f}: ${A}, ${M}`,
835
+ ariaLabel: `${y}: ${T}, ${A}`,
826
836
  beat: d,
827
837
  index: _,
828
838
  isActiveCard: _ === t,
829
- onCardClick: i,
839
+ onCardClick: l,
830
840
  widthOverrides: n || void 0,
831
- ...g
841
+ ...h
832
842
  },
833
843
  `${d.guid} ${_}`
834
844
  );
835
845
  }),
836
846
  /* @__PURE__ */ o(
837
- xt,
847
+ Vt,
838
848
  {
839
849
  isActiveCard: t === e.length,
840
- onCardClick: i,
850
+ onCardClick: l,
841
851
  widthOverrides: n || void 0,
842
- ...g
852
+ ...h
843
853
  }
844
854
  )
845
855
  ] });
846
- }, Ot = ({
856
+ }, Mt = ({
847
857
  analyticsMetadata: t,
848
- allowSingleCardPeeking: e = !1,
858
+ allowSingleCardPeeking: e,
849
859
  beats: n = [],
860
+ elevation: i,
850
861
  heightOverrides: r,
851
- onCardClick: i,
852
- posthog: l,
853
- showCarouselControls: a,
854
- showIcon: u,
855
- showWithMargin: I = !0,
856
- variant: g,
862
+ onCardClick: l,
863
+ posthog: a,
864
+ showCarouselControls: u,
865
+ showIcon: C,
866
+ showWithMargin: E = !0,
867
+ variant: h,
857
868
  widthOverrides: d,
858
869
  visibleCardsCount: _ = 1
859
870
  // Default to 1 card visible
860
871
  }) => {
861
- const p = h.useRef(null), m = h.useRef(null), [f, S] = h.useState(0), [y, A] = h.useState(null), [M, z] = h.useState(null), [E, v] = h.useState(null), { carouselCopy: P } = x(), { onEvent: T } = X();
862
- h.useEffect(() => {
872
+ const p = I.useRef(null), g = I.useRef(null), [y, S] = I.useState(0), [w, T] = I.useState(null), [A, ee] = I.useState(null), [R, m] = I.useState(null), { carouselCopy: j } = D(), { onEvent: M } = $();
873
+ I.useEffect(() => {
863
874
  if (p.current && !e) {
864
- const W = p.current.offsetWidth, F = 8;
865
- let k;
875
+ const f = p.current.offsetWidth, z = 8;
876
+ let G;
866
877
  if (_ > 1) {
867
- const _e = (W - (_ - 1) * F) / _ / 3;
868
- k = (W - _e - (_ - 1) * F) / _;
878
+ const de = (f - (_ - 1) * z) / _ / 3;
879
+ G = (f - de - (_ - 1) * z) / _;
869
880
  } else
870
- k = W;
871
- v(k);
881
+ G = f;
882
+ m(G);
872
883
  }
873
- }, [_, p.current?.offsetWidth]), h.useEffect(() => {
874
- const W = m.current?.offsetWidth;
875
- if (typeof W == "number" && e) {
876
- const F = (H) => {
877
- const pe = [
884
+ }, [_, p.current?.offsetWidth]), I.useEffect(() => {
885
+ const f = g.current?.offsetWidth;
886
+ if (typeof f == "number" && e) {
887
+ const z = (K) => {
888
+ const _e = [
878
889
  { maxWidth: 375, cardWidth: 268 },
879
890
  { maxWidth: 444, cardWidth: 300 },
880
891
  { maxWidth: 599, cardWidth: 350 },
881
892
  { maxWidth: 749, cardWidth: 450 },
882
893
  { maxWidth: 900, cardWidth: 600 }
883
- ].find((Ve) => H <= Ve.maxWidth);
884
- return pe ? pe.cardWidth : 750;
894
+ ].find((Ge) => K <= Ge.maxWidth);
895
+ return _e ? _e.cardWidth : 750;
885
896
  };
886
- v(F(W));
887
- const k = () => {
888
- const H = m.current?.offsetWidth;
889
- typeof H == "number" && v(F(H));
897
+ m(z(f));
898
+ const G = () => {
899
+ const K = g.current?.offsetWidth;
900
+ typeof K == "number" && m(z(K));
890
901
  };
891
- return window.addEventListener("resize", k), () => {
892
- window.removeEventListener("resize", k);
902
+ return window.addEventListener("resize", G), () => {
903
+ window.removeEventListener("resize", G);
893
904
  };
894
905
  }
895
- }, [e, m]);
896
- const C = () => {
897
- T(O.ON_CAROUSEL_FORWARD_CLICK, t), p.current && E && p.current.scrollTo({
898
- left: f + E + 8,
906
+ }, [e, g]);
907
+ const V = () => {
908
+ M(W.ON_CAROUSEL_FORWARD_CLICK, t), p.current && R && p.current.scrollTo({
909
+ left: y + R + 8,
899
910
  top: 0,
900
911
  behavior: "smooth"
901
912
  });
902
- }, Z = () => {
903
- T(O.ON_CAROUSEL_BACK_CLICK, t), p.current && E && p.current.scrollTo({
904
- left: Math.max(0, f - (E + 8)),
913
+ }, te = () => {
914
+ M(W.ON_CAROUSEL_BACK_CLICK, t), p.current && R && p.current.scrollTo({
915
+ left: Math.max(0, y - (R + 8)),
905
916
  top: 0,
906
917
  behavior: "smooth"
907
918
  });
908
- }, Q = () => {
919
+ }, Y = () => {
909
920
  p.current && S(p.current.scrollLeft);
910
- }, ee = () => {
911
- if (!M || !y) return;
912
- M - y > At ? T(O.ON_CAROUSEL_FORWARD_SWIPE, t) : T(O.ON_CAROUSEL_BACK_SWIPE, t);
913
- }, te = (W) => {
914
- A(W.targetTouches[0].clientX);
915
- }, oe = (W) => {
916
- A(null), z(W.targetTouches[0].clientX);
917
- }, K = E ? Math.round(f / (E + 8)) : 0, B = p.current ? p.current.scrollWidth - p.current.offsetWidth : 0;
921
+ }, X = () => {
922
+ if (!A || !w) return;
923
+ A - w > Ot ? M(W.ON_CAROUSEL_FORWARD_SWIPE, t) : M(W.ON_CAROUSEL_BACK_SWIPE, t);
924
+ }, oe = (f) => {
925
+ T(f.targetTouches[0].clientX);
926
+ }, ne = (f) => {
927
+ T(null), ee(f.targetTouches[0].clientX);
928
+ }, Z = R ? Math.round(y / (R + 8)) : 0, Q = p.current ? p.current.scrollWidth - p.current.offsetWidth : 0;
918
929
  return /* @__PURE__ */ N(
919
- w,
930
+ k,
920
931
  {
921
- "aria-label": P?.carousel_title,
932
+ "aria-label": j?.carousel_title,
922
933
  "aria-roledescription": "carousel",
923
- ref: m,
934
+ ref: g,
924
935
  role: "region",
925
936
  sx: {
926
937
  alignItems: "center",
@@ -930,13 +941,13 @@ const Y = h.createContext(null), lt = ({
930
941
  },
931
942
  children: [
932
943
  /* @__PURE__ */ o(
933
- w,
944
+ k,
934
945
  {
935
946
  direction: "row",
936
- onScroll: Q,
937
- onTouchEnd: ee,
938
- onTouchMove: te,
939
- onTouchStart: oe,
947
+ onScroll: Y,
948
+ onTouchEnd: X,
949
+ onTouchMove: oe,
950
+ onTouchStart: ne,
940
951
  ref: p,
941
952
  sx: {
942
953
  alignItems: "center",
@@ -944,7 +955,7 @@ const Y = h.createContext(null), lt = ({
944
955
  gap: 8,
945
956
  listStyleType: "none",
946
957
  m: 0,
947
- maxWidth: I ? "calc(100% - 32px)" : "100%",
958
+ maxWidth: E ? "calc(100% - 32px)" : "100%",
948
959
  overflowX: "auto",
949
960
  overflowY: "hidden",
950
961
  p: 0,
@@ -956,29 +967,30 @@ const Y = h.createContext(null), lt = ({
956
967
  }
957
968
  },
958
969
  children: /* @__PURE__ */ o(
959
- Rt,
970
+ Nt,
960
971
  {
961
- activeCardIndex: K,
972
+ activeCardIndex: Z,
962
973
  beats: n,
963
- cardWidth: E,
974
+ cardWidth: R,
975
+ elevation: i,
964
976
  heightOverrides: r,
965
- onCardClick: i,
966
- posthog: l,
967
- showIcon: u,
968
- variant: g
977
+ onCardClick: l,
978
+ posthog: a,
979
+ showIcon: C,
980
+ variant: h
969
981
  }
970
982
  )
971
983
  }
972
984
  ),
973
- a && /* @__PURE__ */ o(
974
- Tt,
985
+ u && /* @__PURE__ */ o(
986
+ wt,
975
987
  {
976
- currentBeatIndex: K + _ - 1,
988
+ currentBeatIndex: Z + _ - 1,
977
989
  numBeats: n.length + 1,
978
- onNextClick: C,
979
- onPreviousClick: Z,
980
- scrollRightBoundary: B,
981
- scrollX: f,
990
+ onNextClick: V,
991
+ onPreviousClick: te,
992
+ scrollRightBoundary: Q,
993
+ scrollX: y,
982
994
  shouldApplyDotAnimation: e,
983
995
  visibleCardsCount: _
984
996
  }
@@ -986,18 +998,18 @@ const Y = h.createContext(null), lt = ({
986
998
  ]
987
999
  }
988
1000
  );
989
- }, Wt = U(Ot), wt = ({
1001
+ }, vt = U(Mt), Lt = ({
990
1002
  analyticsMetadata: t,
991
1003
  onCardClick: e,
992
1004
  posthog: n,
993
- widthOverrides: r,
994
- headerSx: i
1005
+ widthOverrides: i,
1006
+ headerSx: r
995
1007
  }) => {
996
- const { carouselCopy: l } = x(), { onEvent: a } = X(), u = () => {
997
- a && (a(O.ON_VIEW_MORE_CLICKED, t), e(), n?.capture("clicked_view_more"));
1008
+ const { carouselCopy: l } = D(), { onEvent: a } = $(), u = () => {
1009
+ a && (a(W.ON_VIEW_MORE_CLICKED, t), e(), n?.capture("clicked_view_more"));
998
1010
  };
999
1011
  return l ? /* @__PURE__ */ N(
1000
- w,
1012
+ k,
1001
1013
  {
1002
1014
  alignItems: "center",
1003
1015
  direction: "row",
@@ -1006,15 +1018,15 @@ const Y = h.createContext(null), lt = ({
1006
1018
  sx: {
1007
1019
  p: 16,
1008
1020
  pb: 8,
1009
- width: r || void 0,
1010
- ...i
1021
+ width: i || void 0,
1022
+ ...r
1011
1023
  },
1012
1024
  children: [
1013
- /* @__PURE__ */ o(ze, { children: l.carousel_title }),
1025
+ /* @__PURE__ */ o(Fe, { children: l.carousel_title }),
1014
1026
  /* @__PURE__ */ o(
1015
- ie,
1027
+ ke,
1016
1028
  {
1017
- endIcon: /* @__PURE__ */ o(Te, { size: 20 }),
1029
+ endIcon: /* @__PURE__ */ o(Re, { size: 20 }),
1018
1030
  onClick: u,
1019
1031
  size: "small",
1020
1032
  variant: "text",
@@ -1023,17 +1035,17 @@ const Y = h.createContext(null), lt = ({
1023
1035
  )
1024
1036
  ]
1025
1037
  }
1026
- ) : /* @__PURE__ */ o($e, {});
1027
- }, Nt = U(wt), Mt = ({
1038
+ ) : /* @__PURE__ */ o(Ye, {});
1039
+ }, bt = U(Lt), Dt = ({
1028
1040
  heightOverrides: t,
1029
1041
  widthOverrides: e,
1030
1042
  children: n
1031
1043
  }) => {
1032
- const { carouselCopy: r } = x();
1044
+ const { carouselCopy: i } = D();
1033
1045
  return /* @__PURE__ */ o(
1034
- $,
1046
+ ae,
1035
1047
  {
1036
- "aria-label": r?.carousel_title,
1048
+ "aria-label": i?.carousel_title,
1037
1049
  "aria-roledescription": "carousel",
1038
1050
  role: "group",
1039
1051
  sx: {
@@ -1047,18 +1059,19 @@ const Y = h.createContext(null), lt = ({
1047
1059
  );
1048
1060
  }, Pe = ({
1049
1061
  ariaLabel: t,
1050
- heightOverrides: e,
1051
- onCardClick: n,
1062
+ elevation: e,
1063
+ heightOverrides: n,
1064
+ onCardClick: i,
1052
1065
  posthog: r,
1053
- showIcon: i,
1054
- variant: l
1066
+ showIcon: l,
1067
+ variant: a
1055
1068
  }) => {
1056
- const { cardsCopy: a } = x(), u = j(), { onEvent: I } = X(), { onPageview: g } = xe();
1057
- h.useEffect(() => {
1058
- g(G.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1069
+ const { cardsCopy: u } = D(), C = P(), { onEvent: E } = $(), { onPageview: h } = xe();
1070
+ I.useEffect(() => {
1071
+ h(B.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1059
1072
  }, []);
1060
1073
  const d = () => {
1061
- n && n(), I(O.ON_NO_RELEVANT_INSIGHTS_CLICKED), r?.capture("clicked_insight", {
1074
+ i && i(), E(W.ON_NO_RELEVANT_INSIGHTS_CLICKED), r?.capture("clicked_insight", {
1062
1075
  template: "no_relevant_insights"
1063
1076
  });
1064
1077
  };
@@ -1066,48 +1079,43 @@ const Y = h.createContext(null), lt = ({
1066
1079
  J,
1067
1080
  {
1068
1081
  ariaLabel: t,
1069
- cardSx: {
1070
- borderRadius: 2
1071
- },
1072
- description: a.no_relevant_insights_card_description,
1073
- hasCardEffect: !0,
1074
- heightOverrides: e,
1075
- icon: i && /* @__PURE__ */ o(c, { bgColor: s(u.palette.primary.main, 0.15), name: "lightbulb" }),
1082
+ description: u.no_relevant_insights_card_description,
1083
+ elevation: e,
1084
+ heightOverrides: n,
1085
+ icon: l && /* @__PURE__ */ o(c, { bgColor: s(C.palette.primary.main, 0.15), name: "lightbulb" }),
1076
1086
  onCardClick: d,
1077
1087
  onPrimaryAction: d,
1078
- primaryActionText: a.micro_card_cta,
1079
- title: a.no_relevant_insights_card_title,
1080
- variant: l
1088
+ primaryActionText: u.micro_card_cta,
1089
+ title: u.no_relevant_insights_card_title,
1090
+ variant: a
1081
1091
  }
1082
1092
  );
1083
- }, ro = U(Pe), Be = ({
1093
+ }, ao = U(Pe), Ve = ({
1084
1094
  ariaLabel: t,
1085
- heightOverrides: e,
1086
- onCardClick: n,
1095
+ elevation: e,
1096
+ heightOverrides: n,
1097
+ onCardClick: i,
1087
1098
  showIcon: r,
1088
- variant: i
1099
+ variant: l
1089
1100
  }) => {
1090
- const { onPageview: l } = xe(), { zeroStateCopy: a } = x(), u = j();
1091
- return h.useEffect(() => {
1092
- l(G.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1101
+ const { onPageview: a } = xe(), { zeroStateCopy: u } = D(), C = P();
1102
+ return I.useEffect(() => {
1103
+ a(B.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1093
1104
  }, []), /* @__PURE__ */ o(
1094
1105
  J,
1095
1106
  {
1096
1107
  ariaLabel: t,
1097
- cardSx: {
1098
- borderRadius: 2
1099
- },
1100
- description: a.carousel_zero_state_description,
1101
- hasCardEffect: !0,
1102
- heightOverrides: e,
1103
- icon: r && /* @__PURE__ */ o(c, { bgColor: s(u.palette.primary.main, 0.15), name: "lightbulb" }),
1104
- onCardClick: n,
1105
- title: a.carousel_zero_state_title,
1106
- variant: i
1108
+ description: u.carousel_zero_state_description,
1109
+ elevation: e,
1110
+ heightOverrides: n,
1111
+ icon: r && /* @__PURE__ */ o(c, { bgColor: s(C.palette.primary.main, 0.15), name: "lightbulb" }),
1112
+ onCardClick: i,
1113
+ title: u.carousel_zero_state_title,
1114
+ variant: l
1107
1115
  }
1108
1116
  );
1109
- }, io = U(Be), bt = () => /* @__PURE__ */ o(
1110
- $,
1117
+ }, so = U(Ve), xt = () => /* @__PURE__ */ o(
1118
+ ae,
1111
1119
  {
1112
1120
  sx: {
1113
1121
  alignItems: "center",
@@ -1116,130 +1124,137 @@ const Y = h.createContext(null), lt = ({
1116
1124
  justifyContent: "center",
1117
1125
  width: "100%"
1118
1126
  },
1119
- children: /* @__PURE__ */ o(Xe, {})
1127
+ children: /* @__PURE__ */ o(Qe, {})
1120
1128
  }
1121
- ), Ae = {
1129
+ ), Se = {
1122
1130
  featureVersion: "spendVsIncomeTrends"
1123
- }, V = new ct(), Lt = ({
1131
+ }, x = new pt(), Bt = ({
1124
1132
  allowSingleCardPeeking: t = !0,
1125
1133
  areBeatsLoading: e = !1,
1126
1134
  beats: n = [],
1127
1135
  // This also determines the length of the carousel controls (beat.length + 1)
1136
+ cardStyle: i = "elevation 1",
1128
1137
  endpoint: r = "/",
1129
- heightOverrides: i,
1130
1138
  headerSx: l,
1131
- logOutUser: a = () => {
1139
+ heightOverrides: a,
1140
+ logOutUser: u = () => {
1132
1141
  },
1133
- onCardClick: u = () => {
1142
+ onCardClick: C = () => {
1134
1143
  },
1135
- onEvent: I = () => {
1144
+ onEvent: E = () => {
1136
1145
  },
1137
- onPageview: g = () => {
1146
+ onPageview: h = () => {
1138
1147
  },
1139
1148
  posthog: d,
1140
- showBorder: _ = !0,
1141
- showCarouselControls: p,
1142
- showHeader: m,
1143
- showIcon: f,
1144
- showWithMargin: S = !0,
1145
- token: y = "",
1146
- userHasFullInsightFeedBeats: A,
1147
- variant: M,
1148
- visibleCardsCount: z = 1,
1149
- widthOverrides: E
1149
+ showCarouselControls: _,
1150
+ showHeader: p,
1151
+ showIcon: g,
1152
+ showWithMargin: y = !0,
1153
+ token: S = "",
1154
+ userHasFullInsightFeedBeats: w,
1155
+ visibleCardsCount: T = 1,
1156
+ widthOverrides: A
1150
1157
  }) => {
1151
- const [v, P] = ne("STANDARD"), [T, C] = ne(!1), [Z, Q] = ne(!1), ee = Qe([I], V), te = qe([g], V);
1152
- Je({
1158
+ const R = (() => {
1159
+ if (i === "border") return "outlined";
1160
+ if (i === "elevation 1") return "elevation";
1161
+ if (i !== "flat")
1162
+ return "elevation";
1163
+ })(), m = i === "flat" ? 0 : 1, [j, M] = ie("STANDARD"), [V, te] = ie(!1), [Y, X] = ie(!1), oe = Je([E], x), ne = et([h], x);
1164
+ tt({
1153
1165
  widgetName: "InsightsMicroWidget",
1154
- isLoaded: T
1155
- }), h.useEffect(() => {
1156
- !V.isInitialized && !Z && (V.initialize(r, y, a).catch(() => Q(!1)), Q(!0));
1157
- }, [r, y, a, V.isInitialized, Z]), h.useEffect(() => {
1158
- const B = window.innerHeight;
1159
- B < 180 ? P("STANDARD") : B >= 180 && B < 200 ? P("LARGE") : B >= 200 && B < 248 ? P("XLARGE") : B >= 248 && P("XXLARGE");
1160
- }, [window.innerHeight]), h.useEffect(() => {
1161
- C(!e && V.isInitialized);
1162
- }, [e, V.isInitialized]);
1163
- const oe = {
1164
- heightOverrides: i,
1165
- onCardClick: u,
1166
+ isLoaded: V
1167
+ }), I.useEffect(() => {
1168
+ !x.isInitialized && !Y && (x.initialize(r, S, u).catch(() => X(!1)), X(!0));
1169
+ }, [r, S, u, x.isInitialized, Y]), I.useEffect(() => {
1170
+ const f = window.innerHeight;
1171
+ f < 180 ? M("STANDARD") : f >= 180 && f < 200 ? M("LARGE") : f >= 200 && f < 248 ? M("XLARGE") : f >= 248 && M("XXLARGE");
1172
+ }, [window.innerHeight]), I.useEffect(() => {
1173
+ te(!e && x.isInitialized);
1174
+ }, [e, x.isInitialized]);
1175
+ const Z = {
1176
+ heightOverrides: a,
1177
+ onCardClick: C,
1166
1178
  posthog: d,
1167
- showIcon: f,
1168
- showWithMargin: S,
1169
- widthOverrides: E
1170
- }, K = {
1171
- carouselSize: v,
1172
- variant: M,
1173
- heightOverrides: i,
1174
- onCardClick: u,
1179
+ showIcon: g,
1180
+ showWithMargin: y,
1181
+ widthOverrides: A
1182
+ }, Q = {
1183
+ carouselSize: j,
1184
+ elevation: m,
1185
+ variant: R,
1186
+ heightOverrides: a,
1187
+ onCardClick: C,
1175
1188
  posthog: d,
1176
- showIcon: f
1189
+ showIcon: g
1177
1190
  };
1178
- return /* @__PURE__ */ o(lt, { onEvent: ee, onPageview: te, store: V, children: /* @__PURE__ */ N(Mt, { heightOverrides: i, widthOverrides: E, children: [
1179
- !T && /* @__PURE__ */ o(bt, {}),
1180
- T && m && /* @__PURE__ */ o(
1181
- Nt,
1191
+ return /* @__PURE__ */ o(mt, { onEvent: oe, onPageview: ne, store: x, children: /* @__PURE__ */ N(Dt, { heightOverrides: a, widthOverrides: A, children: [
1192
+ !V && /* @__PURE__ */ o(xt, {}),
1193
+ V && p && /* @__PURE__ */ o(
1194
+ bt,
1182
1195
  {
1183
- analyticsMetadata: Ae,
1196
+ analyticsMetadata: Se,
1184
1197
  headerSx: l,
1185
- onCardClick: u,
1198
+ onCardClick: C,
1186
1199
  posthog: d,
1187
- widthOverrides: E
1200
+ widthOverrides: A
1188
1201
  }
1189
1202
  ),
1190
- T && !!n.length && /* @__PURE__ */ o(
1191
- Wt,
1203
+ V && !!n.length && /* @__PURE__ */ o(
1204
+ vt,
1192
1205
  {
1193
1206
  allowSingleCardPeeking: t,
1194
- analyticsMetadata: Ae,
1207
+ analyticsMetadata: Se,
1195
1208
  beats: n,
1196
- showCarouselControls: p,
1197
- variant: _ ? M : void 0,
1198
- visibleCardsCount: z,
1199
- ...oe
1209
+ elevation: m,
1210
+ showCarouselControls: _,
1211
+ variant: R,
1212
+ visibleCardsCount: T,
1213
+ ...Z
1200
1214
  }
1201
1215
  ),
1202
- T && !n.length && /* @__PURE__ */ o(
1203
- w,
1216
+ V && !n.length && /* @__PURE__ */ o(
1217
+ k,
1204
1218
  {
1205
1219
  sx: {
1206
1220
  alignItems: "center",
1207
- height: i,
1208
- width: E || "100%"
1221
+ height: a,
1222
+ width: A || "100%"
1209
1223
  },
1210
1224
  children: /* @__PURE__ */ o(
1211
- w,
1225
+ k,
1212
1226
  {
1213
1227
  sx: {
1214
- height: `calc(${yt[v]}px - 44px)`,
1215
- width: S ? `calc(${E}px - 32px)` : "100%"
1228
+ height: `calc(${Rt[j]}px - 44px)`,
1229
+ width: y ? `calc(${A}px - 32px)` : "100%"
1216
1230
  },
1217
- children: A ? /* @__PURE__ */ o(Pe, { ...K }) : /* @__PURE__ */ o(Be, { ...K })
1231
+ children: w ? /* @__PURE__ */ o(Pe, { ...Q }) : /* @__PURE__ */ o(Ve, { ...Q })
1218
1232
  }
1219
1233
  )
1220
1234
  }
1221
1235
  )
1222
1236
  ] }) });
1223
- }, ao = U(Lt), Dt = ({
1237
+ }, co = U(Bt), Pt = ({
1224
1238
  ariaLabel: t,
1225
- heightOverrides: e,
1226
- isActiveCard: n,
1239
+ elevation: e,
1240
+ heightOverrides: n,
1241
+ isActiveCard: i,
1227
1242
  onCardClick: r,
1228
- posthog: i,
1229
- widthOverrides: l,
1230
- showIcon: a,
1231
- variant: u
1243
+ posthog: l,
1244
+ widthOverrides: a,
1245
+ showIcon: u,
1246
+ variant: C
1232
1247
  }) => {
1233
- const I = j(), { ref: g, inView: d } = Re({
1234
- threshold: ve
1235
- }), { cardsCopy: _ } = x(), { onEvent: p } = X();
1248
+ const E = P(), { ref: h, inView: d } = Oe({
1249
+ threshold: Be
1250
+ }), { cardsCopy: _ } = D(), { onEvent: p } = $();
1236
1251
  re(() => {
1237
- d && (p(Me.ON_VIEW_MORE_VIEWED), i?.capture("viewed_insight", {
1252
+ d && (p(ve.ON_VIEW_MORE_VIEWED), l?.capture("viewed_insight", {
1238
1253
  template: "view_more_card"
1239
1254
  }));
1240
1255
  }, [d]);
1241
- const m = () => {
1242
- r && r(), p(O.ON_VIEW_MORE_CLICKED), i?.capture("clicked_insight", {
1256
+ const g = () => {
1257
+ r && r(), p(W.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
1243
1258
  template: "view_more_card"
1244
1259
  });
1245
1260
  };
@@ -1248,36 +1263,33 @@ const Y = h.createContext(null), lt = ({
1248
1263
  {
1249
1264
  "aria-roledescription": "slide",
1250
1265
  ariaLabel: t,
1251
- cardSx: {
1252
- borderRadius: 2
1253
- },
1254
1266
  description: _?.view_more_card_description,
1255
- hasCardEffect: !0,
1256
- heightOverrides: e,
1257
- icon: a && /* @__PURE__ */ o(c, { bgColor: s(I.palette.primary.main, 0.15), name: "show_chart" }),
1258
- isActiveCard: n,
1259
- onCardClick: m,
1260
- onPrimaryAction: m,
1267
+ elevation: e,
1268
+ heightOverrides: n,
1269
+ icon: u && /* @__PURE__ */ o(c, { bgColor: s(E.palette.primary.main, 0.15), name: "show_chart" }),
1270
+ isActiveCard: i,
1271
+ onCardClick: g,
1272
+ onPrimaryAction: g,
1261
1273
  primaryActionText: _?.micro_card_cta,
1262
- ref: g,
1274
+ ref: h,
1263
1275
  title: _?.view_more_card_title,
1264
- variant: u,
1265
- widthOverrides: l
1276
+ variant: C,
1277
+ widthOverrides: a
1266
1278
  }
1267
1279
  );
1268
- }, xt = U(Dt);
1280
+ }, Vt = U(Pt);
1269
1281
  export {
1270
- ct as A,
1282
+ pt as A,
1271
1283
  c as B,
1272
- Nt as C,
1273
- St as I,
1274
- Wt as M,
1275
- ro as N,
1276
- Ae as T,
1277
- xt as V,
1278
- io as Z,
1279
- ao as a,
1280
- lt as b,
1284
+ bt as C,
1285
+ Wt as I,
1286
+ vt as M,
1287
+ ao as N,
1288
+ Se as T,
1289
+ Vt as V,
1290
+ so as Z,
1291
+ co as a,
1292
+ mt as b,
1281
1293
  J as c,
1282
- ut as d
1294
+ It as d
1283
1295
  };