@mx-cartographer/experiences 7.0.32 → 7.0.34-alpha.sms1

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 (100) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{Account-CK-DrCEa.mjs → Account-DeMa6XJz.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-BGXM8acm.mjs → AccountDetailsContent-BwTOak3W.mjs} +8 -8
  4. package/dist/{AccountDetailsHeader-Dwk01nsY.mjs → AccountDetailsHeader-BCW4d-j4.mjs} +5 -5
  5. package/dist/{AccountFields-5i77eFJ6.mjs → AccountFields-B-igjxt-.mjs} +2 -2
  6. package/dist/{AccountListItem-BiST9IgK.mjs → AccountListItem-DAF9c7_x.mjs} +3 -3
  7. package/dist/{AccountStore-DiGbJBUT.mjs → AccountStore-Bzy6rKGo.mjs} +26 -26
  8. package/dist/{Accounts-BBkQjUmS.mjs → Accounts-DNMSlq9A.mjs} +1 -1
  9. package/dist/{BeatApi-DLu87ijw.mjs → BeatApi-DhJpgCLz.mjs} +3 -3
  10. package/dist/{BeatStore-By4aGoRM.mjs → BeatStore-IBnXd4YK.mjs} +17 -17
  11. package/dist/{BudgetUtil-D5jO0box.mjs → BudgetUtil-Iw9hUxhI.mjs} +1 -1
  12. package/dist/{CategorySelectorDrawer-joMax4Fb.mjs → CategorySelectorDrawer-CMorcKFW.mjs} +1 -1
  13. package/dist/{CategoryStore-BOyzQjQp.mjs → CategoryStore-BCcpI3oJ.mjs} +4 -4
  14. package/dist/{ConnectDrawer-D86nRDxQ.mjs → ConnectDrawer-jeSmGg38.mjs} +1 -1
  15. package/dist/{ConnectionsDrawer-BkNr5Up0.mjs → ConnectionsDrawer-hdOVHICr.mjs} +2 -2
  16. package/dist/{CurrencyInput-BkflFU_-.mjs → CurrencyInput-C0wTgNV6.mjs} +1 -1
  17. package/dist/{DebtsStore-qrqY9Abz.mjs → DebtsStore-C2OfwE0t.mjs} +1 -1
  18. package/dist/{ExportCsvAction-DRfdZis1.mjs → ExportCsvAction-BlKpQTTL.mjs} +3 -3
  19. package/dist/{Fetch-CkFKy79O.mjs → Fetch-87LIQbEA.mjs} +11 -10
  20. package/dist/{FinstrongStore-mkALvztw.mjs → FinstrongStore-F2c607dj.mjs} +4 -4
  21. package/dist/{GoalStore-BQRcowCN.mjs → GoalStore-D2A2Lqd5.mjs} +6 -6
  22. package/dist/{Help-B3dFeYi2.mjs → Help-DwKXfnqC.mjs} +1 -1
  23. package/dist/{LineChart-Dyps2sOy.mjs → LineChart-DNC5UEt4.mjs} +1 -1
  24. package/dist/{ListItemAction-BgKx_n6d.mjs → ListItemAction-Dt9A2GQk.mjs} +1 -1
  25. package/dist/{ManageIncome-Byw3lVtR.mjs → ManageIncome-C0CbczlY.mjs} +4 -4
  26. package/dist/MerchantStore-DrFvsUyy.mjs +37 -0
  27. package/dist/{MicroWidgetContainer-DPDsZIiS.mjs → MicroWidgetContainer-DVRe-MJs.mjs} +1 -1
  28. package/dist/{MiniWidgetContainer-BzW7V_04.mjs → MiniWidgetContainer-C_N1u9ad.mjs} +1 -1
  29. package/dist/{NetWorthStore-DWG9Mkuu.mjs → NetWorthStore-CD4WWdXC.mjs} +2 -2
  30. package/dist/{NotificationSettings-B9wNyWEL.mjs → NotificationSettings-CtbJFbrv.mjs} +3 -3
  31. package/dist/{NotificationStore-DHtSGySy.mjs → NotificationStore-C6PH6MKm.mjs} +8 -4
  32. package/dist/{OriginalBalanceAction-B--pIAF0.mjs → OriginalBalanceAction-CqQ5j4OW.mjs} +3 -3
  33. package/dist/{RecurringSettings-ClbdFNWX.mjs → RecurringSettings-DR9KuVEN.mjs} +3 -3
  34. package/dist/{RecurringTransactionsStore-D62XJtdL.mjs → RecurringTransactionsStore-DeLXfuC4.mjs} +20 -16
  35. package/dist/{SettingsStore-B0kRTFjD.mjs → SettingsStore-Dc34Tzx8.mjs} +33 -29
  36. package/dist/{TransactionApi-DbbcjI2L.mjs → TransactionApi-B3Tksf7L.mjs} +29 -29
  37. package/dist/{TransactionDetails-C4PW8SRL.mjs → TransactionDetails-BafSm7_T.mjs} +5 -5
  38. package/dist/{TransactionStore-CZOvxcSw.mjs → TransactionStore-C4LPHwzx.mjs} +29 -25
  39. package/dist/{TrendsStore-pvzHAX6B.mjs → TrendsStore-BM-JjAs5.mjs} +1 -1
  40. package/dist/{User-D-O9EHMb.mjs → User-BYkzrOdM.mjs} +1 -1
  41. package/dist/{ViewMoreMicroCard-DFAY0tA8.mjs → ViewMoreMicroCard-CXxtKHUM.mjs} +247 -244
  42. package/dist/{WidgetContainer-CBpf3h1Y.mjs → WidgetContainer-CPBhSP3k.mjs} +2 -2
  43. package/dist/accounts/api/AccountApi.d.ts +2 -2
  44. package/dist/accounts/index.es.js +13 -13
  45. package/dist/analytics/index.es.js +2 -2
  46. package/dist/budgets/api/BudgetsApi.d.ts +2 -2
  47. package/dist/budgets/index.es.js +10 -10
  48. package/dist/cashflow/api/CashflowApi.d.ts +3 -2
  49. package/dist/cashflow/index.es.js +10 -10
  50. package/dist/categories/index.es.js +2 -2
  51. package/dist/common/api/AnalyticsApi.d.ts +2 -2
  52. package/dist/common/api/AppDataApi.d.ts +2 -2
  53. package/dist/common/api/BeatApi.d.ts +2 -2
  54. package/dist/common/api/CategoryApi.d.ts +2 -3
  55. package/dist/common/api/GlobalCopyApi.d.ts +2 -1
  56. package/dist/common/api/LocalizedCopyApi.d.ts +2 -1
  57. package/dist/common/api/NotificationApi.d.ts +2 -2
  58. package/dist/common/api/ScheduledPaymentsApi.d.ts +3 -2
  59. package/dist/common/api/UserApi.d.ts +2 -2
  60. package/dist/common/context/GlobalDataProvider.d.ts +3 -2
  61. package/dist/common/context/hooks.d.ts +4 -1
  62. package/dist/common/context/index.d.ts +1 -1
  63. package/dist/common/index.es.js +252 -246
  64. package/dist/common/stores/GlobalStore.d.ts +3 -2
  65. package/dist/common/types/Handlers.d.ts +2 -0
  66. package/dist/common/types/index.d.ts +1 -0
  67. package/dist/common/utils/Fetch.d.ts +3 -1
  68. package/dist/dashboard/index.es.js +2 -2
  69. package/dist/debts/index.es.js +9 -9
  70. package/dist/{exportTransactionsToCSV-zyHeWfQo.mjs → exportTransactionsToCSV-21c0EV3t.mjs} +1 -1
  71. package/dist/finstrong/api/FinstrongApi.d.ts +2 -1
  72. package/dist/finstrong/index.es.js +7 -7
  73. package/dist/goals/api/GoalApi.d.ts +3 -2
  74. package/dist/goals/index.es.js +11 -11
  75. package/dist/help/api/HelpApi.d.ts +2 -2
  76. package/dist/help/index.es.js +3 -3
  77. package/dist/hooks-BhSK6dal.mjs +74 -0
  78. package/dist/insights/index.es.js +1 -1
  79. package/dist/investments/api/HoldingApi.d.ts +3 -2
  80. package/dist/investments/index.es.js +3 -3
  81. package/dist/merchants/api/MerchantApi.d.ts +2 -1
  82. package/dist/merchants/index.es.js +2 -2
  83. package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +2 -1
  84. package/dist/microinsights/context/hooks.d.ts +1 -1
  85. package/dist/microinsights/index.es.js +1 -1
  86. package/dist/networth/index.es.js +7 -7
  87. package/dist/notifications/index.es.js +5 -5
  88. package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -2
  89. package/dist/recurringtransactions/index.es.js +10 -10
  90. package/dist/settings/api/SettingsApi.d.ts +3 -2
  91. package/dist/settings/index.es.js +7 -7
  92. package/dist/spending/index.es.js +4 -4
  93. package/dist/transactions/api/TransactionApi.d.ts +3 -2
  94. package/dist/transactions/index.es.js +14 -14
  95. package/dist/trends/index.es.js +11 -11
  96. package/dist/{useCombineEvents-DaDBSR_1.mjs → useCombineEvents-BUDIR1ba.mjs} +29 -29
  97. package/dist/{useInsightsEnabled-fGr6xrSj.mjs → useInsightsEnabled-DqM4sFO1.mjs} +1 -1
  98. package/package.json +1 -1
  99. package/dist/MerchantStore-DVH-QOf0.mjs +0 -37
  100. package/dist/hooks-DlI63qSB.mjs +0 -71
@@ -1,47 +1,50 @@
1
1
  import { jsx as e, jsxs as I } from "react/jsx-runtime";
2
- import u, { useState as ae, useEffect as ee } from "react";
2
+ import u, { useState as te, useEffect as oe } from "react";
3
3
  import { observer as P } from "mobx-react-lite";
4
4
  import be from "@mui/material/CssBaseline";
5
- import { useTheme as Se, ThemeProvider as Ue } from "@mui/material/styles";
5
+ import { useTheme as Me, ThemeProvider as Ue } from "@mui/material/styles";
6
6
  import ze from "@mui/material/Link";
7
7
  import K from "@mui/material/Stack";
8
- import ue from "@mui/material/Typography";
9
- import { ChevronLeft as Ke, ChevronRight as Me } from "@mxenabled/mx-icons";
8
+ import pe from "@mui/material/Typography";
9
+ import { ChevronLeft as Ke, ChevronRight as Ae } from "@mxenabled/mx-icons";
10
10
  import { L as $e } from "./Loader-DUaFpDGv.mjs";
11
11
  import U from "@mui/material/Box";
12
- import pe from "@mui/material/IconButton";
13
- import { useInView as Ae } from "react-intersection-observer";
14
- import { P as Ye, CategoryIcon as je, useTokens as Oe, MerchantLogo as Xe, Icon as J } from "@mxenabled/mxui";
15
- import ce from "@mui/material/styles/useTheme";
12
+ import _e from "@mui/material/IconButton";
13
+ import { useInView as Oe } from "react-intersection-observer";
14
+ import { P as je, CategoryIcon as Ye, useTokens as Te, MerchantLogo as Xe, Icon as ie } from "@mxenabled/mxui";
15
+ import de from "@mui/material/styles/useTheme";
16
16
  import { b as Qe } from "./Category-CevNQ03n.mjs";
17
17
  import { css as qe } from "@mxenabled/cssinjs";
18
18
  import { b as Je } from "./Localization-2MODESHW.mjs";
19
19
  import et from "@mui/material/CircularProgress";
20
- import { makeAutoObservable as se, runInAction as Te } from "mobx";
21
- import { G as _e, a as tt, u as it, b as ot } from "./useCombineEvents-DaDBSR_1.mjs";
22
- import { B as Ce } from "./BeatApi-DLu87ijw.mjs";
20
+ import { makeAutoObservable as he, runInAction as We } from "mobx";
21
+ import { G as Ce, a as tt, u as it, b as ot } from "./useCombineEvents-BUDIR1ba.mjs";
22
+ import { B as fe } from "./BeatApi-DhJpgCLz.mjs";
23
23
  import rt from "@mui/material/Card";
24
24
  import lt from "@mui/material/CardActions";
25
25
  import nt from "@mui/material/CardContent";
26
26
  import at from "@mui/material/CardHeader";
27
- const fe = {
27
+ const me = {
28
28
  featureVersion: "spendVsIncomeTrends"
29
29
  };
30
30
  class ct {
31
- copyApi = new _e("/", "");
31
+ copyApi = new Ce("/", "");
32
32
  copyObject = {};
33
33
  namespace = "experiences";
34
34
  translationKey = "micro_insights";
35
35
  constructor() {
36
- se(this);
36
+ he(this);
37
37
  }
38
+ // NOTE: Not sure if this is special case, but other stores have this deprecation todo
39
+ // DEPRECATED: Initialize api in constructor and use loadCopy instead
40
+ // TODO: Remove this function
38
41
  initialize = async (o, t) => {
39
- this.copyApi = new _e(o, t), await this.loadCopy();
42
+ this.copyApi = new Ce(o, t), await this.loadCopy();
40
43
  };
41
44
  loadCopy = async () => {
42
45
  const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
43
- Te(() => {
44
- this.copyObject = o[this.translationKey];
46
+ We(() => {
47
+ this.copyObject = o[this.translationKey], console.log("this.copyObject", this.copyObject);
45
48
  });
46
49
  };
47
50
  get cardsCopy() {
@@ -54,7 +57,7 @@ class ct {
54
57
  return this.copyObject.zero_state;
55
58
  }
56
59
  }
57
- const de = {
60
+ const Ee = {
58
61
  BillAmountNotStandard: "BillAmountNotStandard",
59
62
  CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
60
63
  DuplicatePaymentV2: "DuplicatePaymentV2",
@@ -71,47 +74,47 @@ const de = {
71
74
  WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
72
75
  MonthlySpendComparison: "MonthlySpendComparison",
73
76
  MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
74
- }, S = window?.app?.clientConfig?.microwidget_instance_id || "", me = {
77
+ }, S = window?.app?.clientConfig?.microwidget_instance_id || "", ge = {
75
78
  INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
76
- }, We = (i) => `on${i}Click`, we = (i) => `on${i}View`, xe = (i) => `on${i}ViewFirstTime`, he = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), st = () => Object.values(de).reduce(
79
+ }, we = (i) => `on${i}Click`, xe = (i) => `on${i}View`, De = (i) => `on${i}ViewFirstTime`, ue = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), st = () => Object.values(Ee).reduce(
77
80
  (i, o) => ({
78
81
  ...i,
79
- [We(o)]: {
80
- action: x.MICRO_BEAT_CLICKED,
81
- category: w.BEAT_INTERACTION,
82
- label: he(o),
82
+ [we(o)]: {
83
+ action: D.MICRO_BEAT_CLICKED,
84
+ category: x.BEAT_INTERACTION,
85
+ label: ue(o),
83
86
  value: S
84
87
  }
85
88
  }),
86
89
  {}
87
- ), dt = () => Object.values(de).reduce(
90
+ ), dt = () => Object.values(Ee).reduce(
88
91
  (i, o) => ({
89
92
  ...i,
90
- [we(o)]: {
91
- action: x.MICRO_BEAT_DISPLAYED,
92
- category: w.BEAT_INTERACTION,
93
- label: he(o),
93
+ [xe(o)]: {
94
+ action: D.MICRO_BEAT_DISPLAYED,
95
+ category: x.BEAT_INTERACTION,
96
+ label: ue(o),
94
97
  value: S
95
98
  }
96
99
  }),
97
100
  {}
98
- ), ht = () => Object.values(de).reduce(
101
+ ), ht = () => Object.values(Ee).reduce(
99
102
  (i, o) => ({
100
103
  ...i,
101
- [xe(o)]: {
102
- action: x.MICRO_BEAT_DISPLAYED_FIRST_TIME,
103
- category: w.BEAT_INTERACTION,
104
- label: he(o),
104
+ [De(o)]: {
105
+ action: D.MICRO_BEAT_DISPLAYED_FIRST_TIME,
106
+ category: x.BEAT_INTERACTION,
107
+ label: ue(o),
105
108
  value: S
106
109
  }
107
110
  }),
108
111
  {}
109
- ), W = {
112
+ ), w = {
110
113
  CARD: "Card",
111
114
  CAROUSEL_CONTROL: "Carousel Control",
112
115
  MICRO_WIDGET: "Micro Widget",
113
116
  VIEW_MORE: "View More"
114
- }, w = {
117
+ }, x = {
115
118
  MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
116
119
  BEAT_INTERACTION: "Beat Interaction"
117
120
  }, M = {
@@ -121,9 +124,9 @@ const de = {
121
124
  ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
122
125
  ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
123
126
  ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
124
- }, De = {
127
+ }, Le = {
125
128
  ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
126
- }, x = {
129
+ }, D = {
127
130
  CONTROL_BACKWARD: "Control Backward",
128
131
  CONTROL_FORWARD: "Control Forward",
129
132
  MICRO_BEAT_CLICKED: "Micro Beat Clicked",
@@ -131,95 +134,95 @@ const de = {
131
134
  MICRO_BEAT_DISPLAYED_FIRST_TIME: "Micro Beat Displayed For First Time",
132
135
  SWIPE_BACKWARD: "Swipe Backward",
133
136
  SWIPE_FORWARD: "Swipe Forward"
134
- }, H = {
137
+ }, k = {
135
138
  MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
136
139
  MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
137
140
  MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
138
141
  }, Re = {
139
- [H.MICRO_WIDGET_CAROUSEL]: {
140
- label: W.MICRO_WIDGET,
141
- name: H.MICRO_WIDGET_CAROUSEL,
142
- path: me.INSIGHTS_MICRO_WIDGET,
142
+ [k.MICRO_WIDGET_CAROUSEL]: {
143
+ label: w.MICRO_WIDGET,
144
+ name: k.MICRO_WIDGET_CAROUSEL,
145
+ path: ge.INSIGHTS_MICRO_WIDGET,
143
146
  value: S
144
147
  },
145
148
  // zero state
146
- [H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
147
- label: W.MICRO_WIDGET,
148
- name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
149
- path: me.INSIGHTS_MICRO_WIDGET,
149
+ [k.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
150
+ label: w.MICRO_WIDGET,
151
+ name: k.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
152
+ path: ge.INSIGHTS_MICRO_WIDGET,
150
153
  value: S
151
154
  },
152
155
  // no relevant cards
153
- [H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
154
- label: W.MICRO_WIDGET,
155
- name: H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
156
+ [k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
157
+ label: w.MICRO_WIDGET,
158
+ name: k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
156
159
  path: "/micro-widget",
157
160
  value: S
158
161
  }
159
- }, ge = {
162
+ }, Ie = {
160
163
  // carousel control interaction events - clicks and swipes
161
164
  [M.ON_CAROUSEL_BACK_CLICK]: {
162
- action: x.CONTROL_BACKWARD,
163
- category: w.MICRO_WIDGET_INTERACTION,
164
- label: W.CAROUSEL_CONTROL,
165
+ action: D.CONTROL_BACKWARD,
166
+ category: x.MICRO_WIDGET_INTERACTION,
167
+ label: w.CAROUSEL_CONTROL,
165
168
  value: S
166
169
  },
167
170
  [M.ON_CAROUSEL_FORWARD_CLICK]: {
168
- action: x.CONTROL_FORWARD,
169
- category: w.MICRO_WIDGET_INTERACTION,
170
- label: W.CAROUSEL_CONTROL,
171
+ action: D.CONTROL_FORWARD,
172
+ category: x.MICRO_WIDGET_INTERACTION,
173
+ label: w.CAROUSEL_CONTROL,
171
174
  value: S
172
175
  },
173
176
  [M.ON_CAROUSEL_BACK_SWIPE]: {
174
- action: x.SWIPE_BACKWARD,
175
- category: w.MICRO_WIDGET_INTERACTION,
176
- label: W.CAROUSEL_CONTROL,
177
+ action: D.SWIPE_BACKWARD,
178
+ category: x.MICRO_WIDGET_INTERACTION,
179
+ label: w.CAROUSEL_CONTROL,
177
180
  value: S
178
181
  },
179
182
  [M.ON_CAROUSEL_FORWARD_SWIPE]: {
180
- action: x.SWIPE_FORWARD,
181
- category: w.MICRO_WIDGET_INTERACTION,
182
- label: W.CAROUSEL_CONTROL,
183
+ action: D.SWIPE_FORWARD,
184
+ category: x.MICRO_WIDGET_INTERACTION,
185
+ label: w.CAROUSEL_CONTROL,
183
186
  value: S
184
187
  },
185
188
  // read more card events
186
189
  [M.ON_VIEW_MORE_CLICKED]: {
187
- action: x.MICRO_BEAT_CLICKED,
188
- category: w.BEAT_INTERACTION,
189
- label: W.VIEW_MORE,
190
+ action: D.MICRO_BEAT_CLICKED,
191
+ category: x.BEAT_INTERACTION,
192
+ label: w.VIEW_MORE,
190
193
  value: S
191
194
  },
192
- [De.ON_VIEW_MORE_VIEWED]: {
193
- action: x.MICRO_BEAT_DISPLAYED,
194
- category: w.BEAT_INTERACTION,
195
- label: W.VIEW_MORE,
195
+ [Le.ON_VIEW_MORE_VIEWED]: {
196
+ action: D.MICRO_BEAT_DISPLAYED,
197
+ category: x.BEAT_INTERACTION,
198
+ label: w.VIEW_MORE,
196
199
  value: S
197
200
  },
198
201
  ...st(),
199
202
  ...dt(),
200
203
  ...ht()
201
- }, Ie = async (i, o) => !o || !ge[i] ? null : o.sendAnalyticEvent(ge[i]).then((t) => t).catch((t) => {
204
+ }, ye = async (i, o) => !o || !Ie[i] ? null : o.sendAnalyticEvent(Ie[i]).then((t) => t).catch((t) => {
202
205
  throw t;
203
- }), ye = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticsPageview(Re[i]).then((t) => t).catch((t) => {
206
+ }), ve = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticsPageview(Re[i]).then((t) => t).catch((t) => {
204
207
  throw t;
205
208
  });
206
209
  class Et {
207
- onAnalyticEvent = Ie;
208
- onAnalyticPageView = ye;
209
- beatApi = new Ce("/", "");
210
+ onAnalyticEvent = ye;
211
+ onAnalyticPageView = ve;
212
+ beatApi = new fe("/", "");
210
213
  constructor() {
211
- se(this);
214
+ he(this);
212
215
  }
213
216
  initialize = async (o, t, r) => {
214
217
  this.onAnalyticEvent = (l, n) => {
215
- Ie(l, n).then((a) => a).catch((a) => {
218
+ ye(l, n).then((a) => a).catch((a) => {
216
219
  throw a.status === 401 && r(), a;
217
220
  });
218
221
  }, this.onAnalyticPageView = (l, n) => {
219
- ye(l, n).then((a) => a).catch((a) => {
222
+ ve(l, n).then((a) => a).catch((a) => {
220
223
  throw a.status === 401 && r(), a;
221
224
  });
222
- }, this.beatApi = new Ce(o, t);
225
+ }, this.beatApi = new fe(o, t);
223
226
  };
224
227
  updateBeat = async (o) => {
225
228
  this.beatApi.updateBeat(o);
@@ -236,12 +239,12 @@ class ut {
236
239
  token = "";
237
240
  isInitialized = !1;
238
241
  constructor() {
239
- this.copyStore = new ct(), this.insightsMicroWidgetStore = new Et(), se(this);
242
+ this.copyStore = new ct(), this.insightsMicroWidgetStore = new Et(), he(this);
240
243
  }
241
244
  initialize = async (o, t, r) => {
242
245
  await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, r);
243
246
  const l = await tt(o, t, "1.0.0", "Micro Insights Carousel");
244
- Te(() => {
247
+ We(() => {
245
248
  this.session = l, this.isInitialized = !0;
246
249
  });
247
250
  };
@@ -251,7 +254,7 @@ const $ = u.createContext(null), pt = ({
251
254
  onPageview: o,
252
255
  store: t,
253
256
  children: r
254
- }) => /* @__PURE__ */ e($.Provider, { value: { onEvent: i, onPageview: o, store: t, children: r }, children: r }), te = u.forwardRef(
257
+ }) => /* @__PURE__ */ e($.Provider, { value: { onEvent: i, onPageview: o, store: t, children: r }, children: r }), re = u.forwardRef(
255
258
  function({
256
259
  actionText: o,
257
260
  ariaLabel: t,
@@ -269,9 +272,9 @@ const $ = u.createContext(null), pt = ({
269
272
  title: m,
270
273
  variant: c,
271
274
  widthOverrides: E
272
- }, R) {
273
- const y = ce(), [D, O] = u.useState(!1), { cardStyle: v, linkTextStyle: F } = f, z = c ? v : { border: "none", boxShadow: "none", ...v }, g = /* @__PURE__ */ e(
274
- Ye,
275
+ }, g) {
276
+ const y = de(), [L, O] = u.useState(!1), { cardStyle: v, linkTextStyle: B } = f, z = c ? v : { border: "none", boxShadow: "none", ...v }, R = /* @__PURE__ */ e(
277
+ je,
275
278
  {
276
279
  className: "mx-micro-card-description",
277
280
  color: h.textColor ? "undefined" : "text.primary",
@@ -303,7 +306,7 @@ const $ = u.createContext(null), pt = ({
303
306
  "aria-label": t,
304
307
  "aria-labelledby": "divButton",
305
308
  "aria-roledescription": "slide",
306
- ref: R,
309
+ ref: g,
307
310
  role: "group",
308
311
  sx: {
309
312
  height: "100%",
@@ -319,10 +322,10 @@ const $ = u.createContext(null), pt = ({
319
322
  onClick: () => _(),
320
323
  onKeyDown: () => O(!1),
321
324
  onKeyUp: () => O(!0),
322
- ref: R,
325
+ ref: g,
323
326
  role: "button",
324
327
  sx: {
325
- border: D ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
328
+ border: L ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
326
329
  borderRadius: "8px",
327
330
  height: "100%"
328
331
  },
@@ -357,13 +360,13 @@ const $ = u.createContext(null), pt = ({
357
360
  at,
358
361
  {
359
362
  avatar: C && a,
360
- subheader: p && g,
363
+ subheader: p && R,
361
364
  sx: { color: h.headerColor, p: 0 },
362
365
  title: m,
363
366
  titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
364
367
  }
365
368
  ),
366
- /* @__PURE__ */ e(nt, { sx: { p: 0 }, children: !p && g }),
369
+ /* @__PURE__ */ e(nt, { sx: { p: 0 }, children: !p && R }),
367
370
  !!o && /* @__PURE__ */ e(
368
371
  lt,
369
372
  {
@@ -374,13 +377,13 @@ const $ = u.createContext(null), pt = ({
374
377
  children: /* @__PURE__ */ e(
375
378
  U,
376
379
  {
377
- sx: (L) => ({
378
- color: h.buttonColor ? h.buttonColor : L.palette.primary.main,
380
+ sx: (N) => ({
381
+ color: h.buttonColor ? h.buttonColor : N.palette.primary.main,
379
382
  fontSize: 14,
380
383
  fontWeight: "bold",
381
384
  px: 28,
382
- fontFamily: L.typography.fontFamily,
383
- ...F
385
+ fontFamily: N.typography.fontFamily,
386
+ ...B
384
387
  }),
385
388
  children: o
386
389
  }
@@ -398,12 +401,12 @@ const $ = u.createContext(null), pt = ({
398
401
  );
399
402
  }
400
403
  ), _t = ({ beat: i }) => {
401
- const [o, t] = ae(Qe.UNCATEGORIZED);
402
- return ee(() => {
404
+ const [o, t] = te(Qe.UNCATEGORIZED);
405
+ return oe(() => {
403
406
  i.primary_category_guid ? t(i.primary_category_guid) : i.category_guids?.length && t(i.category_guids[0]);
404
- }, []), /* @__PURE__ */ e(je, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
407
+ }, []), /* @__PURE__ */ e(Ye, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
405
408
  }, Ct = ({ beat: i }) => {
406
- const o = Oe(), t = ft(o);
409
+ const o = Te(), t = ft(o);
407
410
  return /* @__PURE__ */ e(
408
411
  Xe,
409
412
  {
@@ -418,7 +421,7 @@ const $ = u.createContext(null), pt = ({
418
421
  "& .kyper-categoryicon": {
419
422
  display: "flex"
420
423
  }
421
- }), mt = P(Ct), Rt = ({
424
+ }), mt = P(Ct), gt = ({
422
425
  color: i = "currentColor",
423
426
  height: o,
424
427
  size: t = 16,
@@ -444,18 +447,18 @@ const $ = u.createContext(null), pt = ({
444
447
  }
445
448
  )
446
449
  }
447
- ), gt = (i) => i ? i.data ? i.data.map((o) => {
450
+ ), Rt = (i) => i ? i.data ? i.data.map((o) => {
448
451
  const t = {};
449
452
  return i.names?.map((r, l) => {
450
453
  t[r] = o[l];
451
454
  }), t;
452
455
  }) : [] : [], It = (i, o) => {
453
- const t = gt(i), r = t.length / 2, l = t.slice(0, r), n = t.slice(r);
456
+ const t = Rt(i), r = t.length / 2, l = t.slice(0, r), n = t.slice(r);
454
457
  return !l.length || !n.length ? o.Color.Primary300 : l[0].amount > n[0].amount ? o.Color.Error300 : l[0].amount < n[0].amount ? o.Color.Success300 : o.Color.Primary300;
455
458
  }, yt = ({ beat: i }) => {
456
- const o = Oe(), t = It(i.data_series, o);
457
- return /* @__PURE__ */ e(J, { name: "bar_chart", sx: { color: t } });
458
- }, Le = () => /* @__PURE__ */ I("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
459
+ const o = Te(), t = It(i.data_series, o);
460
+ return /* @__PURE__ */ e(ie, { name: "bar_chart", sx: { color: t } });
461
+ }, Ne = () => /* @__PURE__ */ I("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
459
462
  /* @__PURE__ */ e(
460
463
  "path",
461
464
  {
@@ -1236,10 +1239,10 @@ const $ = u.createContext(null), pt = ({
1236
1239
  }
1237
1240
  )
1238
1241
  ] })
1239
- ] }), ve = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
1240
- const l = ce(), n = o?.primary_300 ? o.primary_300 : l.palette.primary.main;
1241
- return r === 0 ? /* @__PURE__ */ e(J, { fill: !0, name: "error", sx: { color: t || n } }) : r === 1 && i ? /* @__PURE__ */ e(_t, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(mt, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(yt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(J, { name: "campaign" }) : /* @__PURE__ */ e(
1242
- J,
1242
+ ] }), Se = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
1243
+ const l = de(), n = o?.primary_300 ? o.primary_300 : l.palette.primary.main;
1244
+ return r === 0 ? /* @__PURE__ */ e(ie, { fill: !0, name: "error", sx: { color: t || n } }) : r === 1 && i ? /* @__PURE__ */ e(_t, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(mt, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(yt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(ie, { name: "campaign" }) : /* @__PURE__ */ e(
1245
+ ie,
1243
1246
  {
1244
1247
  fill: !0,
1245
1248
  name: "info",
@@ -1248,7 +1251,7 @@ const $ = u.createContext(null), pt = ({
1248
1251
  }
1249
1252
  }
1250
1253
  );
1251
- }, k = () => {
1254
+ }, F = () => {
1252
1255
  const i = u.useContext($);
1253
1256
  if (!i)
1254
1257
  throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
@@ -1260,22 +1263,22 @@ const $ = u.createContext(null), pt = ({
1260
1263
  "useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
1261
1264
  );
1262
1265
  return i.store.insightsMicroWidgetStore;
1263
- }, Y = () => {
1266
+ }, j = () => {
1264
1267
  const i = u.useContext($);
1265
1268
  if (!i)
1266
1269
  throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
1267
1270
  return { onEvent: i.onEvent };
1268
- }, Ne = () => {
1271
+ }, Ve = () => {
1269
1272
  const i = u.useContext($);
1270
1273
  if (!i)
1271
1274
  throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
1272
1275
  return { onPageview: i.onPageview };
1273
- }, Ve = {
1276
+ }, He = {
1274
1277
  LARGE: 180,
1275
1278
  STANDARD: 154,
1276
1279
  XLARGE: 200,
1277
1280
  XXLARGE: 248
1278
- }, St = 50, He = 1, Mt = ({
1281
+ }, St = 50, ke = 1, Mt = ({
1279
1282
  ariaLabel: i,
1280
1283
  backgroundColor: o,
1281
1284
  beat: t,
@@ -1290,18 +1293,18 @@ const $ = u.createContext(null), pt = ({
1290
1293
  variant: f,
1291
1294
  widthOverrides: h
1292
1295
  }) => {
1293
- const { ref: m, inView: c } = Ae({
1294
- threshold: He
1295
- }), { cardsCopy: E } = k(), { onEvent: R } = Y(), { updateBeat: y, updateOffer: D } = vt();
1296
- ee(() => {
1297
- c && (t.has_been_displayed ? R(we(t.template)) : (t.guid.startsWith("OFR") ? D({
1296
+ const { ref: m, inView: c } = Oe({
1297
+ threshold: ke
1298
+ }), { cardsCopy: E } = F(), { onEvent: g } = j(), { updateBeat: y, updateOffer: L } = vt();
1299
+ oe(() => {
1300
+ c && (t.has_been_displayed ? g(xe(t.template)) : (t.guid.startsWith("OFR") ? L({
1298
1301
  ...t,
1299
1302
  has_been_displayed: !0
1300
1303
  }) : y({
1301
1304
  ...t,
1302
1305
  has_been_displayed: !0
1303
- }), R(xe(t.template))));
1304
- }, [c]), ee(() => {
1306
+ }), g(De(t.template))));
1307
+ }, [c]), oe(() => {
1305
1308
  if (c && t)
1306
1309
  if (t.template === "MarketingOffer") {
1307
1310
  const v = t;
@@ -1318,7 +1321,7 @@ const $ = u.createContext(null), pt = ({
1318
1321
  });
1319
1322
  }, [t, a, c]);
1320
1323
  const O = () => {
1321
- if (p && p(t), R(We(t.template)), t.template === "MarketingOffer") {
1324
+ if (p && p(t), g(we(t.template)), t.template === "MarketingOffer") {
1322
1325
  const v = t;
1323
1326
  _?.capture("clicked_messaging_insight", {
1324
1327
  template: t.template,
@@ -1333,7 +1336,7 @@ const $ = u.createContext(null), pt = ({
1333
1336
  });
1334
1337
  };
1335
1338
  return /* @__PURE__ */ e(
1336
- te,
1339
+ re,
1337
1340
  {
1338
1341
  actionText: t.micro_call_to_action || E.micro_card_cta,
1339
1342
  ariaLabel: i,
@@ -1341,8 +1344,8 @@ const $ = u.createContext(null), pt = ({
1341
1344
  description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
1342
1345
  fontColors: { buttonColor: r?.primary_300 },
1343
1346
  heightOverrides: n,
1344
- icon: ve && /* @__PURE__ */ e(
1345
- ve,
1347
+ icon: Se && /* @__PURE__ */ e(
1348
+ Se,
1346
1349
  {
1347
1350
  beat: t,
1348
1351
  clientColorScheme: r,
@@ -1372,7 +1375,7 @@ const $ = u.createContext(null), pt = ({
1372
1375
  shouldApplyNewAnimation: d = !1,
1373
1376
  visibleCardsCount: p = 1
1374
1377
  }) => {
1375
- const _ = Se(), { carouselCopy: C } = k(), f = Math.floor(a) > n || o - p + 1 === 0, h = a < 0 || t - 1 === o, m = _.palette.grey[500], c = i?.primary_300 ?? _.palette.primary.main;
1378
+ const _ = Me(), { carouselCopy: C } = F(), f = Math.floor(a) > n || o - p + 1 === 0, h = a < 0 || t - 1 === o, m = _.palette.grey[500], c = i?.primary_300 ?? _.palette.primary.main;
1376
1379
  return /* @__PURE__ */ I(
1377
1380
  K,
1378
1381
  {
@@ -1389,7 +1392,7 @@ const $ = u.createContext(null), pt = ({
1389
1392
  },
1390
1393
  children: [
1391
1394
  /* @__PURE__ */ e(
1392
- pe,
1395
+ _e,
1393
1396
  {
1394
1397
  "aria-disabled": f,
1395
1398
  "aria-label": C.previous_insight_cta_aria,
@@ -1405,8 +1408,8 @@ const $ = u.createContext(null), pt = ({
1405
1408
  )
1406
1409
  }
1407
1410
  ),
1408
- Array.from({ length: t }).map((E, R) => {
1409
- const y = R === o;
1411
+ Array.from({ length: t }).map((E, g) => {
1412
+ const y = g === o;
1410
1413
  return /* @__PURE__ */ e(
1411
1414
  U,
1412
1415
  {
@@ -1428,18 +1431,18 @@ const $ = u.createContext(null), pt = ({
1428
1431
  width: y && d ? 24 : 8
1429
1432
  }
1430
1433
  },
1431
- `carousel-button-${R}`
1434
+ `carousel-button-${g}`
1432
1435
  );
1433
1436
  }),
1434
1437
  /* @__PURE__ */ e(
1435
- pe,
1438
+ _e,
1436
1439
  {
1437
1440
  "aria-disabled": h,
1438
1441
  "aria-label": C.next_insight_cta_aria,
1439
1442
  disabled: h,
1440
1443
  onClick: r,
1441
1444
  children: /* @__PURE__ */ e(
1442
- Me,
1445
+ Ae,
1443
1446
  {
1444
1447
  style: {
1445
1448
  color: h ? m : c
@@ -1469,77 +1472,77 @@ const $ = u.createContext(null), pt = ({
1469
1472
  visibleCardsCount: c = 1
1470
1473
  // Default to 1 card visible
1471
1474
  }) => {
1472
- const E = u.useRef(null), R = u.useRef(null), [y, D] = u.useState(0), [O, v] = u.useState(null), [F, z] = u.useState(null), [g, L] = u.useState(null), [ie, G] = u.useState(p), { carouselCopy: B } = k(), { onEvent: b } = Y();
1475
+ const E = u.useRef(null), g = u.useRef(null), [y, L] = u.useState(0), [O, v] = u.useState(null), [B, z] = u.useState(null), [R, N] = u.useState(null), [le, G] = u.useState(p), { carouselCopy: V } = F(), { onEvent: b } = j();
1473
1476
  u.useEffect(() => {
1474
1477
  if (E.current && !o) {
1475
1478
  const s = E.current.offsetWidth, A = 8;
1476
- let V;
1479
+ let H;
1477
1480
  if (c > 1) {
1478
- const Q = (s - (c - 1) * A) / c / 3;
1479
- V = (s - Q - (c - 1) * A) / c;
1481
+ const J = (s - (c - 1) * A) / c / 3;
1482
+ H = (s - J - (c - 1) * A) / c;
1480
1483
  } else
1481
- V = s;
1482
- L(V);
1484
+ H = s;
1485
+ N(H);
1483
1486
  }
1484
1487
  }, [c, E.current?.offsetWidth]), u.useEffect(() => {
1485
- const s = R.current?.offsetWidth;
1488
+ const s = g.current?.offsetWidth;
1486
1489
  if (typeof s == "number" && o) {
1487
1490
  const A = (Z) => {
1488
1491
  G(!0);
1489
- const q = [
1492
+ const ee = [
1490
1493
  { maxWidth: 375, cardWidth: 268 },
1491
1494
  { maxWidth: 444, cardWidth: 300 },
1492
1495
  { maxWidth: 599, cardWidth: 350 },
1493
1496
  { maxWidth: 749, cardWidth: 450 },
1494
1497
  { maxWidth: 900, cardWidth: 600 }
1495
- ].find((ne) => Z <= ne.maxWidth);
1496
- return q ? q.cardWidth : 750;
1498
+ ].find((se) => Z <= se.maxWidth);
1499
+ return ee ? ee.cardWidth : 750;
1497
1500
  };
1498
- L(A(s));
1499
- const V = () => {
1500
- const Z = R.current?.offsetWidth;
1501
- typeof Z == "number" && L(A(Z));
1501
+ N(A(s));
1502
+ const H = () => {
1503
+ const Z = g.current?.offsetWidth;
1504
+ typeof Z == "number" && N(A(Z));
1502
1505
  };
1503
- return window.addEventListener("resize", V), () => {
1504
- window.removeEventListener("resize", V);
1506
+ return window.addEventListener("resize", H), () => {
1507
+ window.removeEventListener("resize", H);
1505
1508
  };
1506
1509
  }
1507
- }, [o, R]);
1508
- const oe = () => {
1509
- b(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && g && E.current.scrollTo({
1510
- left: y + g + 8,
1510
+ }, [o, g]);
1511
+ const Y = () => {
1512
+ b(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && R && E.current.scrollTo({
1513
+ left: y + R + 8,
1511
1514
  top: 0,
1512
1515
  behavior: "smooth"
1513
1516
  });
1514
- }, re = () => {
1515
- b(M.ON_CAROUSEL_BACK_CLICK, i), E.current && g && E.current.scrollTo({
1516
- left: Math.max(0, y - (g + 8)),
1517
+ }, X = () => {
1518
+ b(M.ON_CAROUSEL_BACK_CLICK, i), E.current && R && E.current.scrollTo({
1519
+ left: Math.max(0, y - (R + 8)),
1517
1520
  top: 0,
1518
1521
  behavior: "smooth"
1519
1522
  });
1520
- }, j = () => {
1521
- E.current && D(E.current.scrollLeft);
1522
- }, X = () => {
1523
- if (!F || !O) return;
1524
- F - O > St ? b(M.ON_CAROUSEL_FORWARD_SWIPE, i) : b(M.ON_CAROUSEL_BACK_SWIPE, i);
1525
- }, N = (s) => {
1523
+ }, ne = () => {
1524
+ E.current && L(E.current.scrollLeft);
1525
+ }, ae = () => {
1526
+ if (!B || !O) return;
1527
+ B - O > St ? b(M.ON_CAROUSEL_FORWARD_SWIPE, i) : b(M.ON_CAROUSEL_BACK_SWIPE, i);
1528
+ }, Q = (s) => {
1526
1529
  v(s.targetTouches[0].clientX);
1527
- }, Be = (s) => {
1530
+ }, q = (s) => {
1528
1531
  v(null), z(s.targetTouches[0].clientX);
1529
- }, Ee = {
1532
+ }, T = {
1530
1533
  clientColorScheme: r,
1531
1534
  showCTAColocatedWithText: l,
1532
1535
  heightOverrides: n,
1533
1536
  posthog: d,
1534
1537
  showIcon: C,
1535
1538
  variant: h
1536
- }, le = g ? Math.round(y / (g + 8)) : 0, Ze = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
1539
+ }, ce = R ? Math.round(y / (R + 8)) : 0, Ze = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
1537
1540
  return /* @__PURE__ */ I(
1538
1541
  K,
1539
1542
  {
1540
- "aria-label": B.carousel_title,
1543
+ "aria-label": V.carousel_title,
1541
1544
  "aria-roledescription": "carousel",
1542
- ref: R,
1545
+ ref: g,
1543
1546
  role: "group/region",
1544
1547
  sx: {
1545
1548
  alignItems: "center",
@@ -1552,10 +1555,10 @@ const $ = u.createContext(null), pt = ({
1552
1555
  K,
1553
1556
  {
1554
1557
  direction: "row",
1555
- onScroll: j,
1556
- onTouchEnd: X,
1557
- onTouchMove: N,
1558
- onTouchStart: Be,
1558
+ onScroll: ne,
1559
+ onTouchEnd: ae,
1560
+ onTouchMove: Q,
1561
+ onTouchStart: q,
1559
1562
  ref: E,
1560
1563
  sx: {
1561
1564
  alignItems: "center",
@@ -1576,21 +1579,21 @@ const $ = u.createContext(null), pt = ({
1576
1579
  },
1577
1580
  children: [
1578
1581
  t.map((s, A) => {
1579
- const V = A + 1, Z = t.length + 1, Q = Je(
1580
- B.card_position_in_carousel_aria,
1581
- V.toString(),
1582
+ const H = A + 1, Z = t.length + 1, J = Je(
1583
+ V.card_position_in_carousel_aria,
1584
+ H.toString(),
1582
1585
  Z.toString()
1583
- ), q = s.micro_title && s.micro_title.length > 0, ne = s.micro_description && s.micro_description.length > 0, Pe = q ? s.micro_title : s.title, Ge = ne ? s.micro_description : s.description;
1586
+ ), ee = s.micro_title && s.micro_title.length > 0, se = s.micro_description && s.micro_description.length > 0, Pe = ee ? s.micro_title : s.title, Ge = se ? s.micro_description : s.description;
1584
1587
  return /* @__PURE__ */ e(
1585
1588
  Mt,
1586
1589
  {
1587
- ariaLabel: `${Q}: ${Pe}, ${Ge}`,
1590
+ ariaLabel: `${J}: ${Pe}, ${Ge}`,
1588
1591
  beat: s,
1589
1592
  index: A,
1590
- isActiveCard: A === le,
1593
+ isActiveCard: A === ce,
1591
1594
  onCardClick: a,
1592
- widthOverrides: g || void 0,
1593
- ...Ee
1595
+ widthOverrides: R || void 0,
1596
+ ...T
1594
1597
  },
1595
1598
  `${s.guid} ${A}`
1596
1599
  );
@@ -1598,10 +1601,10 @@ const $ = u.createContext(null), pt = ({
1598
1601
  /* @__PURE__ */ e(
1599
1602
  Vt,
1600
1603
  {
1601
- isActiveCard: le === t.length,
1604
+ isActiveCard: ce === t.length,
1602
1605
  onCardClick: a,
1603
- widthOverrides: g || void 0,
1604
- ...Ee
1606
+ widthOverrides: R || void 0,
1607
+ ...T
1605
1608
  }
1606
1609
  )
1607
1610
  ]
@@ -1611,13 +1614,13 @@ const $ = u.createContext(null), pt = ({
1611
1614
  At,
1612
1615
  {
1613
1616
  clientColorScheme: r,
1614
- currentBeatIndex: le + c - 1,
1617
+ currentBeatIndex: ce + c - 1,
1615
1618
  numBeats: t.length + 1,
1616
- onNextClick: oe,
1617
- onPreviousClick: re,
1619
+ onNextClick: Y,
1620
+ onPreviousClick: X,
1618
1621
  scrollRightBoundary: Ze,
1619
1622
  scrollX: y,
1620
- shouldApplyNewAnimation: ie,
1623
+ shouldApplyNewAnimation: le,
1621
1624
  visibleCardsCount: c
1622
1625
  }
1623
1626
  )
@@ -1631,7 +1634,7 @@ const $ = u.createContext(null), pt = ({
1631
1634
  posthog: r,
1632
1635
  widthOverrides: l
1633
1636
  }) => {
1634
- const { carouselCopy: n } = k(), { onEvent: a } = Y(), d = () => {
1637
+ const { carouselCopy: n } = F(), { onEvent: a } = j(), d = () => {
1635
1638
  a && (a(M.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
1636
1639
  };
1637
1640
  return n ? /* @__PURE__ */ I(
@@ -1647,7 +1650,7 @@ const $ = u.createContext(null), pt = ({
1647
1650
  },
1648
1651
  children: [
1649
1652
  /* @__PURE__ */ e(
1650
- ue,
1653
+ pe,
1651
1654
  {
1652
1655
  sx: {
1653
1656
  fontSize: 18,
@@ -1675,7 +1678,7 @@ const $ = u.createContext(null), pt = ({
1675
1678
  underline: "none",
1676
1679
  children: [
1677
1680
  /* @__PURE__ */ e(
1678
- ue,
1681
+ pe,
1679
1682
  {
1680
1683
  sx: {
1681
1684
  color: o?.primary_300,
@@ -1687,7 +1690,7 @@ const $ = u.createContext(null), pt = ({
1687
1690
  children: n.view_all_insights_in_full_feed_cta_aria
1688
1691
  }
1689
1692
  ),
1690
- /* @__PURE__ */ e(Me, { sx: { color: o?.primary_300, ml: "8px" } })
1693
+ /* @__PURE__ */ e(Ae, { sx: { color: o?.primary_300, ml: "8px" } })
1691
1694
  ]
1692
1695
  }
1693
1696
  )
@@ -1699,7 +1702,7 @@ const $ = u.createContext(null), pt = ({
1699
1702
  widthOverrides: o,
1700
1703
  children: t
1701
1704
  }) => {
1702
- const { carouselCopy: r } = k();
1705
+ const { carouselCopy: r } = F();
1703
1706
  return /* @__PURE__ */ e(
1704
1707
  U,
1705
1708
  {
@@ -1715,7 +1718,7 @@ const $ = u.createContext(null), pt = ({
1715
1718
  children: t
1716
1719
  }
1717
1720
  );
1718
- }, ke = ({
1721
+ }, Fe = ({
1719
1722
  ariaLabel: i,
1720
1723
  carouselSize: o,
1721
1724
  clientColorScheme: t,
@@ -1727,9 +1730,9 @@ const $ = u.createContext(null), pt = ({
1727
1730
  variant: p,
1728
1731
  widthOverrides: _
1729
1732
  }) => {
1730
- const { cardsCopy: C } = k(), { onEvent: f } = Y(), { onPageview: h } = Ne();
1733
+ const { cardsCopy: C } = F(), { onEvent: f } = j(), { onPageview: h } = Ve();
1731
1734
  u.useEffect(() => {
1732
- h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1735
+ h(k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1733
1736
  }, []);
1734
1737
  const m = () => {
1735
1738
  l && l(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), n?.capture("clicked_insight", {
@@ -1737,14 +1740,14 @@ const $ = u.createContext(null), pt = ({
1737
1740
  });
1738
1741
  };
1739
1742
  return /* @__PURE__ */ e(
1740
- te,
1743
+ re,
1741
1744
  {
1742
1745
  actionText: C.micro_card_cta,
1743
1746
  ariaLabel: i,
1744
1747
  description: C.no_relevant_insights_card_description,
1745
1748
  fontColors: { buttonColor: t?.primary_300 },
1746
1749
  heightOverrides: r,
1747
- icon: /* @__PURE__ */ e(Le, {}),
1750
+ icon: /* @__PURE__ */ e(Ne, {}),
1748
1751
  isZeroState: !0,
1749
1752
  onCardClick: m,
1750
1753
  posthog: n,
@@ -1752,7 +1755,7 @@ const $ = u.createContext(null), pt = ({
1752
1755
  style: {
1753
1756
  cardStyle: {
1754
1757
  card: {
1755
- height: `calc(${Ve[o]}px - 44px)`,
1758
+ height: `calc(${He[o]}px - 44px)`,
1756
1759
  m: "0 auto",
1757
1760
  width: d ? "calc(100% - 32px)" : "100%"
1758
1761
  },
@@ -1769,7 +1772,7 @@ const $ = u.createContext(null), pt = ({
1769
1772
  widthOverrides: _
1770
1773
  }
1771
1774
  );
1772
- }, ci = P(ke), Fe = ({
1775
+ }, ci = P(Fe), Be = ({
1773
1776
  ariaLabel: i,
1774
1777
  carouselSize: o,
1775
1778
  heightOverrides: t,
@@ -1780,16 +1783,16 @@ const $ = u.createContext(null), pt = ({
1780
1783
  variant: d,
1781
1784
  widthOverrides: p
1782
1785
  }) => {
1783
- const { onPageview: _ } = Ne(), { zeroStateCopy: C } = k();
1786
+ const { onPageview: _ } = Ve(), { zeroStateCopy: C } = F();
1784
1787
  return u.useEffect(() => {
1785
- _(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1788
+ _(k.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1786
1789
  }, []), /* @__PURE__ */ e(
1787
- te,
1790
+ re,
1788
1791
  {
1789
1792
  ariaLabel: i,
1790
1793
  description: C.carousel_zero_state_description,
1791
1794
  heightOverrides: t,
1792
- icon: /* @__PURE__ */ e(Le, {}),
1795
+ icon: /* @__PURE__ */ e(Ne, {}),
1793
1796
  isZeroState: !0,
1794
1797
  onCardClick: r,
1795
1798
  posthog: l,
@@ -1797,7 +1800,7 @@ const $ = u.createContext(null), pt = ({
1797
1800
  style: {
1798
1801
  cardStyle: {
1799
1802
  card: {
1800
- height: `calc(${Ve[o]}px - 44px)`,
1803
+ height: `calc(${He[o]}px - 44px)`,
1801
1804
  m: "0 auto",
1802
1805
  width: a ? "calc(100% - 32px)" : "100%"
1803
1806
  },
@@ -1811,7 +1814,7 @@ const $ = u.createContext(null), pt = ({
1811
1814
  widthOverrides: p
1812
1815
  }
1813
1816
  );
1814
- }, si = P(Fe), Dt = () => /* @__PURE__ */ e(
1817
+ }, si = P(Be), Dt = () => /* @__PURE__ */ e(
1815
1818
  U,
1816
1819
  {
1817
1820
  sx: {
@@ -1823,7 +1826,7 @@ const $ = u.createContext(null), pt = ({
1823
1826
  },
1824
1827
  children: /* @__PURE__ */ e(et, {})
1825
1828
  }
1826
- ), T = new ut(), Lt = ({
1829
+ ), W = new ut(), Lt = ({
1827
1830
  allowSingleCardPeeking: i,
1828
1831
  areBeatsLoading: o,
1829
1832
  beats: t = [],
@@ -1845,70 +1848,70 @@ const $ = u.createContext(null), pt = ({
1845
1848
  showBorder: m = !0,
1846
1849
  showCarouselControls: c,
1847
1850
  showHeader: E,
1848
- showIcon: R,
1851
+ showIcon: g,
1849
1852
  showWithMargin: y = !0,
1850
- token: D = "",
1853
+ token: L = "",
1851
1854
  useDarkMode: O,
1852
1855
  userHasFullInsightFeedBeats: v,
1853
- variant: F,
1856
+ variant: B,
1854
1857
  visibleCardsCount: z = 1,
1855
- widthOverrides: g
1858
+ widthOverrides: R
1856
1859
  }) => {
1857
- const L = Se(), [ie, G] = ae("STANDARD"), [B, b] = ae(!1), oe = it([_], T), re = ot([C], T);
1860
+ const N = Me(), [le, G] = te("STANDARD"), [V, b] = te(!1), [Y, X] = te(!1), ne = it([_], W), ae = ot([C], W);
1858
1861
  u.useEffect(() => {
1859
- T.isInitialized || T.initialize(n, D, d);
1860
- }, [n, D, d, T.isInitialized]), u.useEffect(() => {
1861
- const N = window.innerHeight;
1862
- N < 180 ? G("STANDARD") : N >= 180 && N < 200 ? G("LARGE") : N >= 200 && N < 248 ? G("XLARGE") : N >= 248 && G("XXLARGE");
1862
+ !W.isInitialized && !Y && (W.initialize(n, L, d).catch(() => X(!1)), X(!0));
1863
+ }, [n, L, d, W.isInitialized, Y]), u.useEffect(() => {
1864
+ const T = window.innerHeight;
1865
+ T < 180 ? G("STANDARD") : T >= 180 && T < 200 ? G("LARGE") : T >= 200 && T < 248 ? G("XLARGE") : T >= 248 && G("XXLARGE");
1863
1866
  }, [window.innerHeight]), u.useEffect(() => {
1864
- b(!o && T.isInitialized);
1865
- }, [o, T.isInitialized]);
1866
- const j = {
1867
+ b(!o && W.isInitialized);
1868
+ }, [o, W.isInitialized]);
1869
+ const Q = {
1867
1870
  showCTAColocatedWithText: l,
1868
1871
  heightOverrides: a,
1869
1872
  onCardClick: p,
1870
1873
  posthog: f,
1871
- showIcon: R,
1874
+ showIcon: g,
1872
1875
  showWithMargin: y,
1873
1876
  useDarkMode: O,
1874
- widthOverrides: g
1875
- }, X = {
1876
- carouselSize: ie,
1877
- variant: F,
1878
- ...j
1877
+ widthOverrides: R
1878
+ }, q = {
1879
+ carouselSize: le,
1880
+ variant: B,
1881
+ ...Q
1879
1882
  };
1880
1883
  return (
1881
1884
  // The Theme provider must wrap the component so that the styles don't break when imported into other applications.
1882
- /* @__PURE__ */ I(Ue, { theme: L, children: [
1885
+ /* @__PURE__ */ I(Ue, { theme: N, children: [
1883
1886
  /* @__PURE__ */ e(be, {}),
1884
- /* @__PURE__ */ e(pt, { onEvent: oe, onPageview: re, store: T, children: /* @__PURE__ */ I(xt, { heightOverrides: a, widthOverrides: g, children: [
1885
- (o || !T.isInitialized) && /* @__PURE__ */ e(Dt, {}),
1886
- B && E && /* @__PURE__ */ e(
1887
+ /* @__PURE__ */ e(pt, { onEvent: ne, onPageview: ae, store: W, children: /* @__PURE__ */ I(xt, { heightOverrides: a, widthOverrides: R, children: [
1888
+ (!V || !W.isInitialized) && /* @__PURE__ */ e(Dt, {}),
1889
+ V && E && /* @__PURE__ */ e(
1887
1890
  wt,
1888
1891
  {
1889
- analyticsMetadata: fe,
1892
+ analyticsMetadata: me,
1890
1893
  clientColorScheme: r,
1891
1894
  onCardClick: p,
1892
1895
  posthog: f,
1893
- widthOverrides: g
1896
+ widthOverrides: R
1894
1897
  }
1895
1898
  ),
1896
- B && !!t.length && /* @__PURE__ */ e(
1899
+ V && !!t.length && /* @__PURE__ */ e(
1897
1900
  Tt,
1898
1901
  {
1899
1902
  allowSingleCardPeeking: i,
1900
- analyticsMetadata: fe,
1903
+ analyticsMetadata: me,
1901
1904
  beats: t,
1902
1905
  clientColorScheme: r,
1903
1906
  shouldApplyNewAnimation: h,
1904
1907
  showCarouselControls: c,
1905
- variant: m ? F : void 0,
1908
+ variant: m ? B : void 0,
1906
1909
  visibleCardsCount: z,
1907
- ...j
1910
+ ...Q
1908
1911
  }
1909
1912
  ),
1910
- B && !t.length && v && /* @__PURE__ */ e(ke, { clientColorScheme: r, ...X }),
1911
- B && !t.length && !v && /* @__PURE__ */ e(Fe, { ...X })
1913
+ V && !t.length && v && /* @__PURE__ */ e(Fe, { clientColorScheme: r, ...q }),
1914
+ V && !t.length && !v && /* @__PURE__ */ e(Be, { ...q })
1912
1915
  ] }) })
1913
1916
  ] })
1914
1917
  );
@@ -1923,11 +1926,11 @@ const $ = u.createContext(null), pt = ({
1923
1926
  variant: d,
1924
1927
  widthOverrides: p
1925
1928
  }) => {
1926
- const _ = ce(), { ref: C, inView: f } = Ae({
1927
- threshold: He
1928
- }), { cardsCopy: h } = k(), { onEvent: m } = Y();
1929
- ee(() => {
1930
- f && (m(De.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
1929
+ const _ = de(), { ref: C, inView: f } = Oe({
1930
+ threshold: ke
1931
+ }), { cardsCopy: h } = F(), { onEvent: m } = j();
1932
+ oe(() => {
1933
+ f && (m(Le.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
1931
1934
  template: "view_more_card"
1932
1935
  }));
1933
1936
  }, [f]);
@@ -1937,14 +1940,14 @@ const $ = u.createContext(null), pt = ({
1937
1940
  });
1938
1941
  };
1939
1942
  return /* @__PURE__ */ e(
1940
- te,
1943
+ re,
1941
1944
  {
1942
1945
  actionText: h.micro_card_cta,
1943
1946
  ariaLabel: o,
1944
1947
  description: h.view_more_card_description,
1945
1948
  fontColors: { buttonColor: t?.primary_300 },
1946
1949
  heightOverrides: r,
1947
- icon: /* @__PURE__ */ e(Rt, { color: t?.primary_300 ?? _.palette.primary.main }),
1950
+ icon: /* @__PURE__ */ e(gt, { color: t?.primary_300 ?? _.palette.primary.main }),
1948
1951
  isActiveCard: i,
1949
1952
  onCardClick: c,
1950
1953
  posthog: n,
@@ -1963,12 +1966,12 @@ export {
1963
1966
  pt as I,
1964
1967
  Tt as M,
1965
1968
  ci as N,
1966
- fe as T,
1969
+ me as T,
1967
1970
  Vt as V,
1968
1971
  si as Z,
1969
- te as a,
1972
+ re as a,
1970
1973
  di as b,
1971
- Rt as c,
1974
+ gt as c,
1972
1975
  yt as d,
1973
- Le as e
1976
+ Ne as e
1974
1977
  };