@mx-cartographer/experiences 8.0.0-alpha.bb2 → 8.0.0-alpha.bb4

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 (222) hide show
  1. package/CHANGELOG.md +128 -1
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-B4CDD-zq.mjs} +1 -1
  3. package/dist/AccountDetailsContent-adZTkM52.mjs +683 -0
  4. package/dist/AccountDetailsHeader-DRjFuyJT.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-Cl4KHoSj.mjs} +14 -12
  6. package/dist/AccountListItem-wgmlex-_.mjs +90 -0
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-HbVblv86.mjs} +19 -8
  8. package/dist/{Accounts-BRf_YeTf.mjs → Accounts-CRUehOiy.mjs} +1 -1
  9. package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
  10. package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
  11. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-Jv8h9H9l.mjs} +33 -33
  12. package/dist/{CashflowStore-D9Dpuz7X.mjs → CashflowStore-CA190BPF.mjs} +18 -25
  13. package/dist/{Category-CevNQ03n.mjs → Category-Ccoew_sA.mjs} +2 -2
  14. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Dl006GKy.mjs} +43 -41
  15. package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-MUwRWH9e.mjs} +13 -11
  16. package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-DfVKKkRf.mjs} +4 -4
  17. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-DVp54lUH.mjs} +49 -48
  18. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-Dsc04-4Z.mjs} +3 -3
  19. package/dist/CurrencyInput-D1cjbdCI.mjs +85 -0
  20. package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
  21. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CDPZw_-m.mjs} +3 -3
  22. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-pL63fmdT.mjs} +3 -3
  23. package/dist/{Dialog-CWW597AF.mjs → Dialog-CDV0kKxj.mjs} +24 -24
  24. package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
  25. package/dist/Drawer-BF40nbsH.mjs +163 -0
  26. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  27. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-QhQK4_FU.mjs} +4 -4
  28. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  29. package/dist/FinstrongStore-BGf36b0z.mjs +451 -0
  30. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-C1-w3Y1E.mjs} +7 -7
  31. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  32. package/dist/{Help-B6dIcujh.mjs → Help-DBfsTkAi.mjs} +125 -146
  33. package/dist/{Help-DhcC-C05.mjs → Help-c-zHlDbv.mjs} +8 -8
  34. package/dist/{IconBacking-B9oC6uL2.mjs → IconBacking-DgT8DCeh.mjs} +11 -11
  35. package/dist/LineChart-C1PxNf7P.mjs +581 -0
  36. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BNCWQAN_.mjs} +10 -10
  37. package/dist/Loader-Ckqi9Rx6.mjs +21 -0
  38. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-8EsStyIQ.mjs} +195 -192
  39. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  40. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +45 -0
  41. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +56 -0
  42. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-Bti6u-d9.mjs} +4 -4
  43. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-B74rQVYC.mjs} +276 -273
  44. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
  45. package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
  46. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-2Y_3U_mg.mjs} +10 -10
  47. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-DAncu--R.mjs} +17 -17
  48. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-CxcSL1dY.mjs} +106 -105
  49. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-CNFxyGB6.mjs} +80 -73
  50. package/dist/{ResponsiveButton-DZFp78fJ.mjs → ResponsiveButton-Cn6-R7ue.mjs} +10 -10
  51. package/dist/SearchBox-B7km148n.mjs +39 -0
  52. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-BASMQSIp.mjs} +3 -3
  53. package/dist/{SingleSegmentDonut-BgbLgwHi.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +6 -6
  54. package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
  55. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DPQ96k3x.mjs} +19 -19
  56. package/dist/SpendingLegend-6FqtMcBV.mjs +193 -0
  57. package/dist/{StatusBar-BK_uYHAB.mjs → StatusBar-CPfSXe80.mjs} +6 -6
  58. package/dist/{TabContentContainer-j01JYR_7.mjs → TabContentContainer-CnMXkVqr.mjs} +8 -8
  59. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  60. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  61. package/dist/TransactionDetails-Bn0qY5Hw.mjs +1336 -0
  62. package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-DbwAutwC.mjs} +146 -165
  63. package/dist/TrendsStore-_mRaFUdf.mjs +182 -0
  64. package/dist/{User-BQUxBeZV.mjs → User-BklmOUSd.mjs} +107 -107
  65. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DAkyNRlD.mjs} +706 -729
  66. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CDh9fjpR.mjs} +36 -36
  67. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  68. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  69. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  70. package/dist/accounts/index.es.js +228 -199
  71. package/dist/accounts/stores/AccountStore.d.ts +2 -0
  72. package/dist/analytics/index.es.js +27 -27
  73. package/dist/budgets/index.es.js +459 -462
  74. package/dist/cashflow/index.es.js +419 -428
  75. package/dist/categories/index.es.js +2 -2
  76. package/dist/categories/stores/CategoryStore.d.ts +1 -1
  77. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  78. package/dist/common/components/Loader.d.ts +1 -2
  79. package/dist/common/components/Select.d.ts +4 -2
  80. package/dist/common/components/SkeletonLoader.d.ts +7 -0
  81. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  82. package/dist/common/components/charts/LineChart.d.ts +12 -2
  83. package/dist/common/components/charts/index.d.ts +0 -3
  84. package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
  85. package/dist/common/components/charts/linechart/CustomMark.d.ts +5 -1
  86. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  87. package/dist/common/components/drawer/Footer.d.ts +17 -0
  88. package/dist/common/components/index.d.ts +0 -1
  89. package/dist/common/hooks/index.d.ts +0 -1
  90. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  91. package/dist/common/index.es.js +413 -674
  92. package/dist/common/stores/GlobalStore.d.ts +7 -1
  93. package/dist/common/stores/GlobalUiStore.d.ts +3 -2
  94. package/dist/common/types/Finstrong.d.ts +54 -0
  95. package/dist/common/types/Global.d.ts +1 -0
  96. package/dist/common/types/Widgets.d.ts +1 -0
  97. package/dist/common/types/index.d.ts +1 -1
  98. package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
  99. package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
  100. package/dist/common/utils/Theme.d.ts +1 -3
  101. package/dist/dashboard/index.es.js +21 -21
  102. package/dist/debts/components/DebtsChart.d.ts +1 -2
  103. package/dist/debts/index.es.js +673 -665
  104. package/dist/exportTransactionsToCSV-BgV_wTLT.mjs +48 -0
  105. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  106. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  107. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  108. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  109. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  110. package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
  111. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  112. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  113. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  114. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  115. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  116. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  117. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  118. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  119. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  120. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  121. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  122. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  123. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  124. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  125. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  126. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  127. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  128. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  129. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  130. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  131. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  132. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  133. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  134. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
  135. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  136. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  137. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  138. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  139. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  140. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  141. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  142. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  143. package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
  144. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  145. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  146. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  147. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  148. package/dist/finstrong/constants/index.d.ts +9 -0
  149. package/dist/finstrong/index.es.js +3175 -1067
  150. package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
  151. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  152. package/dist/goals/index.es.js +580 -570
  153. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  154. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  155. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  156. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  157. package/dist/help/index.es.js +6 -6
  158. package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
  159. package/dist/insights/index.es.js +1 -1
  160. package/dist/investments/index.es.js +537 -536
  161. package/dist/merchants/index.es.js +9 -9
  162. package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
  163. package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
  164. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
  165. package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
  166. package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
  167. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
  168. package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
  169. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  170. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
  171. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
  172. package/dist/microinsights/constants/App.d.ts +0 -1
  173. package/dist/microinsights/index.d.ts +3 -3
  174. package/dist/microinsights/index.es.js +7 -7
  175. package/dist/microinsights/interfaces.d.ts +0 -6
  176. package/dist/networth/components/NetWorthChange.d.ts +3 -1
  177. package/dist/networth/index.es.js +262 -254
  178. package/dist/notifications/index.es.js +90 -91
  179. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
  180. package/dist/recurringtransactions/index.es.js +586 -562
  181. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
  182. package/dist/settings/index.es.js +371 -365
  183. package/dist/spending/index.es.js +267 -419
  184. package/dist/spending/utils/SpendingData.d.ts +2 -1
  185. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  186. package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
  187. package/dist/transactions/index.es.js +231 -226
  188. package/dist/transactions/stores/TransactionStore.d.ts +1 -1
  189. package/dist/transactions/stores/UiStore.d.ts +0 -2
  190. package/dist/trends/index.es.js +988 -612
  191. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CcIp09Xc.mjs} +2 -2
  192. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-kNzLTWCp.mjs} +3 -3
  193. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  194. package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-B5afALev.mjs} +1 -1
  195. package/package.json +51 -56
  196. package/dist/AccountDetailsContent-CAM9y39M.mjs +0 -679
  197. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  198. package/dist/AccountListItem-JFMZROh7.mjs +0 -90
  199. package/dist/CurrencyInput-DUsQbkXb.mjs +0 -85
  200. package/dist/Drawer-kEE73B87.mjs +0 -113
  201. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  202. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
  203. package/dist/LineChart-D4GI7nVh.mjs +0 -541
  204. package/dist/Loader-DUaFpDGv.mjs +0 -24
  205. package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
  206. package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
  207. package/dist/SearchBox-B2_zLv8-.mjs +0 -42
  208. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  209. package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
  210. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  211. package/dist/accounts/components/AccountsWidgetContent.d.ts +0 -3
  212. package/dist/common/components/barchart/Bar.d.ts +0 -25
  213. package/dist/common/components/barchart/BarChart.d.ts +0 -34
  214. package/dist/common/components/barchart/BarColumn.d.ts +0 -37
  215. package/dist/common/components/barchart/Legend.d.ts +0 -8
  216. package/dist/common/components/barchart/Util.d.ts +0 -42
  217. package/dist/common/components/barchart/index.d.ts +0 -1
  218. package/dist/common/hooks/usePrevious.d.ts +0 -2
  219. package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  220. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
  221. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
  222. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -1,48 +1,46 @@
1
- import { jsx as e, jsxs as v } from "react/jsx-runtime";
2
- import u, { useState as te, useEffect as oe } from "react";
3
- import { observer as G } from "mobx-react-lite";
4
- import Pe from "@mui/material/Button";
5
- import K from "@mui/material/Stack";
6
- import Ge from "@mui/material/Typography";
7
- import { ChevronLeft as be, ChevronRight as Se } from "@mxenabled/mx-icons";
8
- import { L as Ue } from "./Loader-DUaFpDGv.mjs";
9
- import U from "@mui/material/Box";
10
- import pe from "@mui/material/IconButton";
11
- import { useTheme as ze } from "@mui/material/styles";
12
- import { useInView as Me } from "react-intersection-observer";
13
- import { P as Ke, CategoryIcon as $e, useTokens as Ae, MerchantLogo as Ye, Icon as ie } from "@mxenabled/mxui";
14
- import se from "@mui/material/styles/useTheme";
15
- import { b as je } from "./Category-CevNQ03n.mjs";
16
- import { css as Xe } from "@mxenabled/cssinjs";
17
- import { b as Qe } from "./Localization-2MODESHW.mjs";
18
- import qe from "@mui/material/CircularProgress";
19
- import { makeAutoObservable as de, runInAction as Oe } from "mobx";
20
- import { G as _e, a as Je, u as et, b as tt } from "./useCombineEvents-BUDIR1ba.mjs";
21
- import { B as Ce } from "./BeatApi-DhJpgCLz.mjs";
22
- import it from "@mui/material/Card";
23
- import ot from "@mui/material/CardActions";
24
- import rt from "@mui/material/CardContent";
25
- import lt from "@mui/material/CardHeader";
26
- const fe = {
1
+ import { jsx as e, jsxs as g, Fragment as xe } from "react/jsx-runtime";
2
+ import u, { useEffect as te, useState as ee } from "react";
3
+ import { observer as P } from "mobx-react-lite";
4
+ import k from "@mui/material/Stack";
5
+ import De from "@mui/material/Button";
6
+ import Le from "@mui/material/Typography";
7
+ import { BarChart as Ve, Error as ae, Campaign as Ne, ChevronLeft as He, ChevronRight as Ce } from "@mxenabled/mx-icons";
8
+ import { L as ke } from "./Loader-Ckqi9Rx6.mjs";
9
+ import Z from "@mui/material/Box";
10
+ import ce from "@mui/material/IconButton";
11
+ import { useTheme as j } from "@mui/material/styles";
12
+ import { useInView as me } from "react-intersection-observer";
13
+ import { P as Fe, CategoryIcon as Be, MerchantLogo as Ze } from "@mxenabled/mxui";
14
+ import { b as Pe } from "./Category-Ccoew_sA.mjs";
15
+ import { b as be } from "./Localization-2MODESHW.mjs";
16
+ import Ge from "@mui/material/CircularProgress";
17
+ import { makeAutoObservable as ie, runInAction as Re } from "mobx";
18
+ import { G as se, b as Ue, u as ze, a as Ke } from "./useCombineEvents-kNzLTWCp.mjs";
19
+ import { B as de } from "./BeatApi-De2IaqH2.mjs";
20
+ import $e from "@mui/material/Card";
21
+ import Ye from "@mui/material/CardActions";
22
+ import je from "@mui/material/CardContent";
23
+ import Xe from "@mui/material/CardHeader";
24
+ const Ee = {
27
25
  featureVersion: "spendVsIncomeTrends"
28
26
  };
29
- class nt {
30
- copyApi = new _e("/", "");
27
+ class Qe {
28
+ copyApi = new se("/", "");
31
29
  copyObject = {};
32
30
  namespace = "experiences";
33
31
  translationKey = "micro_insights";
34
32
  constructor() {
35
- de(this);
33
+ ie(this);
36
34
  }
37
35
  // NOTE: Not sure if this is special case, but other stores have this deprecation todo
38
36
  // DEPRECATED: Initialize api in constructor and use loadCopy instead
39
37
  // TODO: Remove this function
40
38
  initialize = async (o, t) => {
41
- this.copyApi = new _e(o, t), await this.loadCopy();
39
+ this.copyApi = new se(o, t), await this.loadCopy();
42
40
  };
43
41
  loadCopy = async () => {
44
42
  const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
45
- Oe(() => {
43
+ Re(() => {
46
44
  this.copyObject = o[this.translationKey];
47
45
  });
48
46
  };
@@ -56,7 +54,7 @@ class nt {
56
54
  return this.copyObject.zero_state;
57
55
  }
58
56
  }
59
- const he = {
57
+ const oe = {
60
58
  BillAmountNotStandard: "BillAmountNotStandard",
61
59
  CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
62
60
  DuplicatePaymentV2: "DuplicatePaymentV2",
@@ -73,59 +71,58 @@ const he = {
73
71
  WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
74
72
  MonthlySpendComparison: "MonthlySpendComparison",
75
73
  MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
76
- }, S = window?.app?.clientConfig?.microwidget_instance_id || "", me = {
74
+ }, y = window?.app?.clientConfig?.microwidget_instance_id || "", he = {
77
75
  INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
78
- }, Te = (i) => `on${i}Click`, We = (i) => `on${i}View`, we = (i) => `on${i}ViewFirstTime`, Ee = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), at = () => Object.values(he).reduce(
76
+ }, ge = (i) => `on${i}Click`, Ie = (i) => `on${i}View`, ve = (i) => `on${i}ViewFirstTime`, le = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), qe = () => Object.values(oe).reduce(
79
77
  (i, o) => ({
80
78
  ...i,
81
- [Te(o)]: {
82
- action: w.MICRO_BEAT_CLICKED,
83
- category: W.BEAT_INTERACTION,
84
- label: Ee(o),
85
- value: S
79
+ [ge(o)]: {
80
+ action: L.MICRO_BEAT_CLICKED,
81
+ category: D.BEAT_INTERACTION,
82
+ label: le(o),
83
+ value: y
86
84
  }
87
85
  }),
88
86
  {}
89
- ), ct = () => Object.values(he).reduce(
87
+ ), Je = () => Object.values(oe).reduce(
90
88
  (i, o) => ({
91
89
  ...i,
92
- [We(o)]: {
93
- action: w.MICRO_BEAT_DISPLAYED,
94
- category: W.BEAT_INTERACTION,
95
- label: Ee(o),
96
- value: S
90
+ [Ie(o)]: {
91
+ action: L.MICRO_BEAT_DISPLAYED,
92
+ category: D.BEAT_INTERACTION,
93
+ label: le(o),
94
+ value: y
97
95
  }
98
96
  }),
99
97
  {}
100
- ), st = () => Object.values(he).reduce(
98
+ ), et = () => Object.values(oe).reduce(
101
99
  (i, o) => ({
102
100
  ...i,
103
- [we(o)]: {
104
- action: w.MICRO_BEAT_DISPLAYED_FIRST_TIME,
105
- category: W.BEAT_INTERACTION,
106
- label: Ee(o),
107
- value: S
101
+ [ve(o)]: {
102
+ action: L.MICRO_BEAT_DISPLAYED_FIRST_TIME,
103
+ category: D.BEAT_INTERACTION,
104
+ label: le(o),
105
+ value: y
108
106
  }
109
107
  }),
110
108
  {}
111
- ), T = {
112
- CARD: "Card",
109
+ ), x = {
113
110
  CAROUSEL_CONTROL: "Carousel Control",
114
111
  MICRO_WIDGET: "Micro Widget",
115
112
  VIEW_MORE: "View More"
116
- }, W = {
113
+ }, D = {
117
114
  MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
118
115
  BEAT_INTERACTION: "Beat Interaction"
119
- }, M = {
116
+ }, S = {
120
117
  ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
121
118
  ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
122
119
  ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
123
120
  ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
124
121
  ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
125
122
  ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
126
- }, xe = {
123
+ }, ye = {
127
124
  ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
128
- }, w = {
125
+ }, L = {
129
126
  CONTROL_BACKWARD: "Control Backward",
130
127
  CONTROL_FORWARD: "Control Forward",
131
128
  MICRO_BEAT_CLICKED: "Micro Beat Clicked",
@@ -137,91 +134,91 @@ const he = {
137
134
  MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
138
135
  MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
139
136
  MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
140
- }, Re = {
137
+ }, ue = {
141
138
  [H.MICRO_WIDGET_CAROUSEL]: {
142
- label: T.MICRO_WIDGET,
139
+ label: x.MICRO_WIDGET,
143
140
  name: H.MICRO_WIDGET_CAROUSEL,
144
- path: me.INSIGHTS_MICRO_WIDGET,
145
- value: S
141
+ path: he.INSIGHTS_MICRO_WIDGET,
142
+ value: y
146
143
  },
147
144
  // zero state
148
145
  [H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
149
- label: T.MICRO_WIDGET,
146
+ label: x.MICRO_WIDGET,
150
147
  name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
151
- path: me.INSIGHTS_MICRO_WIDGET,
152
- value: S
148
+ path: he.INSIGHTS_MICRO_WIDGET,
149
+ value: y
153
150
  },
154
151
  // no relevant cards
155
152
  [H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
156
- label: T.MICRO_WIDGET,
153
+ label: x.MICRO_WIDGET,
157
154
  name: H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
158
155
  path: "/micro-widget",
159
- value: S
156
+ value: y
160
157
  }
161
- }, ge = {
158
+ }, pe = {
162
159
  // carousel control interaction events - clicks and swipes
163
- [M.ON_CAROUSEL_BACK_CLICK]: {
164
- action: w.CONTROL_BACKWARD,
165
- category: W.MICRO_WIDGET_INTERACTION,
166
- label: T.CAROUSEL_CONTROL,
167
- value: S
160
+ [S.ON_CAROUSEL_BACK_CLICK]: {
161
+ action: L.CONTROL_BACKWARD,
162
+ category: D.MICRO_WIDGET_INTERACTION,
163
+ label: x.CAROUSEL_CONTROL,
164
+ value: y
168
165
  },
169
- [M.ON_CAROUSEL_FORWARD_CLICK]: {
170
- action: w.CONTROL_FORWARD,
171
- category: W.MICRO_WIDGET_INTERACTION,
172
- label: T.CAROUSEL_CONTROL,
173
- value: S
166
+ [S.ON_CAROUSEL_FORWARD_CLICK]: {
167
+ action: L.CONTROL_FORWARD,
168
+ category: D.MICRO_WIDGET_INTERACTION,
169
+ label: x.CAROUSEL_CONTROL,
170
+ value: y
174
171
  },
175
- [M.ON_CAROUSEL_BACK_SWIPE]: {
176
- action: w.SWIPE_BACKWARD,
177
- category: W.MICRO_WIDGET_INTERACTION,
178
- label: T.CAROUSEL_CONTROL,
179
- value: S
172
+ [S.ON_CAROUSEL_BACK_SWIPE]: {
173
+ action: L.SWIPE_BACKWARD,
174
+ category: D.MICRO_WIDGET_INTERACTION,
175
+ label: x.CAROUSEL_CONTROL,
176
+ value: y
180
177
  },
181
- [M.ON_CAROUSEL_FORWARD_SWIPE]: {
182
- action: w.SWIPE_FORWARD,
183
- category: W.MICRO_WIDGET_INTERACTION,
184
- label: T.CAROUSEL_CONTROL,
185
- value: S
178
+ [S.ON_CAROUSEL_FORWARD_SWIPE]: {
179
+ action: L.SWIPE_FORWARD,
180
+ category: D.MICRO_WIDGET_INTERACTION,
181
+ label: x.CAROUSEL_CONTROL,
182
+ value: y
186
183
  },
187
184
  // read more card events
188
- [M.ON_VIEW_MORE_CLICKED]: {
189
- action: w.MICRO_BEAT_CLICKED,
190
- category: W.BEAT_INTERACTION,
191
- label: T.VIEW_MORE,
192
- value: S
185
+ [S.ON_VIEW_MORE_CLICKED]: {
186
+ action: L.MICRO_BEAT_CLICKED,
187
+ category: D.BEAT_INTERACTION,
188
+ label: x.VIEW_MORE,
189
+ value: y
193
190
  },
194
- [xe.ON_VIEW_MORE_VIEWED]: {
195
- action: w.MICRO_BEAT_DISPLAYED,
196
- category: W.BEAT_INTERACTION,
197
- label: T.VIEW_MORE,
198
- value: S
191
+ [ye.ON_VIEW_MORE_VIEWED]: {
192
+ action: L.MICRO_BEAT_DISPLAYED,
193
+ category: D.BEAT_INTERACTION,
194
+ label: x.VIEW_MORE,
195
+ value: y
199
196
  },
200
- ...at(),
201
- ...ct(),
202
- ...st()
203
- }, Ie = async (i, o) => !o || !ge[i] ? null : o.sendAnalyticEvent(ge[i]).then((t) => t).catch((t) => {
197
+ ...qe(),
198
+ ...Je(),
199
+ ...et()
200
+ }, _e = async (i, o) => !o || !pe[i] ? null : o.sendAnalyticEvent(pe[i]).then((t) => t).catch((t) => {
204
201
  throw t;
205
- }), ye = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticsPageview(Re[i]).then((t) => t).catch((t) => {
202
+ }), fe = async (i, o) => !o || !ue[i] ? null : o.sendAnalyticsPageview(ue[i]).then((t) => t).catch((t) => {
206
203
  throw t;
207
204
  });
208
- class dt {
209
- onAnalyticEvent = Ie;
210
- onAnalyticPageView = ye;
211
- beatApi = new Ce("/", "");
205
+ class tt {
206
+ onAnalyticEvent = _e;
207
+ onAnalyticPageView = fe;
208
+ beatApi = new de("/", "");
212
209
  constructor() {
213
- de(this);
210
+ ie(this);
214
211
  }
215
- initialize = async (o, t, r) => {
216
- this.onAnalyticEvent = (n, l) => {
217
- Ie(n, l).then((a) => a).catch((a) => {
218
- throw a.status === 401 && r(), a;
212
+ initialize = async (o, t, l) => {
213
+ this.onAnalyticEvent = (n, r) => {
214
+ _e(n, r).then((a) => a).catch((a) => {
215
+ throw a.status === 401 && l(), a;
219
216
  });
220
- }, this.onAnalyticPageView = (n, l) => {
221
- ye(n, l).then((a) => a).catch((a) => {
222
- throw a.status === 401 && r(), a;
217
+ }, this.onAnalyticPageView = (n, r) => {
218
+ fe(n, r).then((a) => a).catch((a) => {
219
+ throw a.status === 401 && l(), a;
223
220
  });
224
- }, this.beatApi = new Ce(o, t);
221
+ }, this.beatApi = new de(o, t);
225
222
  };
226
223
  updateBeat = async (o) => {
227
224
  this.beatApi.updateBeat(o);
@@ -230,7 +227,7 @@ class dt {
230
227
  this.beatApi.updateOffer(o);
231
228
  };
232
229
  }
233
- class ht {
230
+ class it {
234
231
  copyStore;
235
232
  endpoint = "/";
236
233
  insightsMicroWidgetStore;
@@ -238,196 +235,188 @@ class ht {
238
235
  token = "";
239
236
  isInitialized = !1;
240
237
  constructor() {
241
- this.copyStore = new nt(), this.insightsMicroWidgetStore = new dt(), de(this);
238
+ this.copyStore = new Qe(), this.insightsMicroWidgetStore = new tt(), ie(this);
242
239
  }
243
- initialize = async (o, t, r) => {
244
- await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, r);
245
- const n = await Je(o, t, "1.0.0", "Micro Insights Carousel");
246
- Oe(() => {
240
+ initialize = async (o, t, l) => {
241
+ await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, l);
242
+ const n = await Ue(o, t, "1.0.0", "Micro Insights Carousel");
243
+ Re(() => {
247
244
  this.session = n, this.isInitialized = !0;
248
245
  });
249
246
  };
250
247
  }
251
- const $ = u.createContext(null), Et = ({
248
+ const U = u.createContext(null), ot = ({
252
249
  onEvent: i,
253
250
  onPageview: o,
254
251
  store: t,
255
- children: r
256
- }) => /* @__PURE__ */ e($.Provider, { value: { onEvent: i, onPageview: o, store: t, children: r }, children: r }), re = u.forwardRef(
257
- function({
258
- actionText: o,
259
- ariaLabel: t,
260
- backgroundColor: r,
261
- description: n,
262
- heightOverrides: l,
263
- icon: a,
264
- isActiveCard: d,
265
- isZeroState: p,
266
- onCardClick: _ = () => {
267
- },
268
- showIcon: C,
269
- style: f = {},
270
- fontColors: h = {},
271
- title: m,
272
- variant: c,
273
- widthOverrides: E
274
- }, R) {
275
- const I = se(), [x, O] = u.useState(!1), { cardStyle: y, linkTextStyle: F } = f, z = c ? y : { border: "none", boxShadow: "none", ...y }, g = /* @__PURE__ */ e(
276
- Ke,
277
- {
278
- className: "mx-micro-card-description",
279
- color: h.textColor ? "undefined" : "text.primary",
280
- sx: {
281
- display: "-webkit-box",
282
- fontSize: 13,
283
- letterSpacing: 0.48,
284
- lineHeight: "20px",
285
- overflow: "hidden",
286
- pl: p ? 0 : 28,
287
- pr: p ? 0 : 8,
288
- WebkitBoxOrient: "vertical",
289
- WebkitLineClamp: 2,
290
- wordWrap: "break-word"
291
- },
292
- children: n && /* @__PURE__ */ e(
293
- "span",
294
- {
295
- dangerouslySetInnerHTML: { __html: n },
296
- style: { fontFamily: I.typography.fontFamily }
297
- }
298
- )
299
- }
300
- );
301
- return /* @__PURE__ */ e(
302
- U,
303
- {
304
- "aria-hidden": !d,
305
- "aria-label": t,
306
- "aria-labelledby": "divButton",
307
- "aria-roledescription": "slide",
308
- ref: R,
309
- role: "group",
310
- sx: {
311
- height: "100%",
312
- minWidth: E ? `${E}px` : "100%",
313
- fontFamily: I.typography.fontFamily
314
- },
315
- children: /* @__PURE__ */ e(
316
- U,
317
- {
318
- "aria-hidden": !d,
319
- "aria-label": t,
320
- id: "divButton",
321
- onClick: () => _(),
322
- onKeyDown: () => O(!1),
323
- onKeyUp: () => O(!0),
324
- ref: R,
325
- role: "button",
326
- sx: {
327
- border: x ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
328
- borderRadius: "8px",
329
- height: "100%"
330
- },
331
- tabIndex: d ? 0 : -1,
332
- children: /* @__PURE__ */ e(
333
- it,
334
- {
335
- "aria-roledescription": "slide",
336
- className: "mx-micro-card",
337
- role: "group",
338
- sx: {
339
- backgroundColor: r,
340
- boxSizing: "border-box",
341
- cursor: "pointer",
342
- height: l ? "100%" : 124,
343
- p: 16,
344
- ...z,
345
- "& .MuiCardHeader-avatar": {
346
- color: h.iconColor,
347
- mr: "8px"
348
- }
349
- },
350
- variant: c,
351
- children: /* @__PURE__ */ v(
352
- K,
353
- {
354
- sx: {
355
- alignItems: "space-between",
356
- height: "100%"
357
- },
358
- children: [
359
- /* @__PURE__ */ e(
360
- lt,
361
- {
362
- avatar: C && a,
363
- subheader: p && g,
364
- sx: { color: h.headerColor, p: 0 },
365
- title: m,
366
- titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
367
- }
368
- ),
369
- /* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !p && g }),
370
- !!o && /* @__PURE__ */ e(
371
- ot,
372
- {
373
- sx: {
374
- mt: "auto",
375
- p: 0
376
- },
377
- children: /* @__PURE__ */ e(
378
- U,
379
- {
380
- sx: (D) => ({
381
- color: h.buttonColor ? h.buttonColor : D.palette.primary.main,
382
- fontSize: 14,
383
- fontWeight: "bold",
384
- px: 28,
385
- fontFamily: D.typography.fontFamily,
386
- ...F
387
- }),
388
- children: o
389
- }
390
- )
391
- }
392
- )
393
- ]
394
- }
395
- )
396
- }
397
- )
398
- }
399
- )
400
- }
401
- );
402
- }
403
- ), ut = ({ beat: i }) => {
404
- const [o, t] = te(je.UNCATEGORIZED);
405
- return oe(() => {
406
- i.primary_category_guid ? t(i.primary_category_guid) : i.category_guids?.length && t(i.category_guids[0]);
407
- }, []), /* @__PURE__ */ e($e, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
408
- }, pt = ({ beat: i }) => {
409
- const o = Ae(), t = _t(o);
252
+ children: l
253
+ }) => /* @__PURE__ */ e(U.Provider, { value: { onEvent: i, onPageview: o, store: t, children: l }, children: l }), X = u.forwardRef(function({
254
+ actionText: o,
255
+ ariaLabel: t,
256
+ backgroundColor: l,
257
+ description: n,
258
+ heightOverrides: r,
259
+ icon: a,
260
+ isActiveCard: s,
261
+ isZeroState: h,
262
+ onCardClick: f = () => {
263
+ },
264
+ showIcon: p,
265
+ style: d = {},
266
+ title: E,
267
+ variant: c,
268
+ widthOverrides: C
269
+ }, _) {
270
+ const R = j(), [O, I] = u.useState(!1), { cardStyle: m, linkTextStyle: T } = d, v = c ? m : { border: "none", boxShadow: "none", ...m }, M = /* @__PURE__ */ e(
271
+ Fe,
272
+ {
273
+ className: "mx-micro-card-description",
274
+ color: "text.primary",
275
+ sx: {
276
+ display: "-webkit-box",
277
+ fontSize: 13,
278
+ letterSpacing: 0.48,
279
+ lineHeight: "20px",
280
+ overflow: "hidden",
281
+ pl: h ? 0 : 28,
282
+ pr: h ? 0 : 8,
283
+ WebkitBoxOrient: "vertical",
284
+ WebkitLineClamp: 2,
285
+ wordWrap: "break-word"
286
+ },
287
+ children: n && /* @__PURE__ */ e(
288
+ "span",
289
+ {
290
+ dangerouslySetInnerHTML: { __html: n },
291
+ style: { fontFamily: R.typography.fontFamily }
292
+ }
293
+ )
294
+ }
295
+ );
410
296
  return /* @__PURE__ */ e(
411
- Ye,
297
+ Z,
412
298
  {
413
- categoryGuid: i.primary_category_guid || i.category_guids && i.category_guids[0] || "",
414
- className: t,
415
- merchantGuid: i.primary_merchant_guid || i.merchant_guids[0],
416
- size: 16
299
+ "aria-hidden": !s,
300
+ "aria-label": t,
301
+ "aria-labelledby": "divButton",
302
+ "aria-roledescription": "slide",
303
+ ref: _,
304
+ role: "group",
305
+ sx: {
306
+ height: "100%",
307
+ minWidth: C ? `${C}px` : "100%",
308
+ fontFamily: R.typography.fontFamily
309
+ },
310
+ children: /* @__PURE__ */ e(
311
+ Z,
312
+ {
313
+ "aria-hidden": !s,
314
+ "aria-label": t,
315
+ id: "divButton",
316
+ onClick: () => f(),
317
+ onKeyDown: () => I(!1),
318
+ onKeyUp: () => I(!0),
319
+ ref: _,
320
+ role: "button",
321
+ sx: {
322
+ border: O ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
323
+ borderRadius: "8px",
324
+ height: "100%"
325
+ },
326
+ tabIndex: s ? 0 : -1,
327
+ children: /* @__PURE__ */ e(
328
+ $e,
329
+ {
330
+ "aria-roledescription": "slide",
331
+ className: "mx-micro-card",
332
+ role: "group",
333
+ sx: {
334
+ backgroundColor: l,
335
+ boxSizing: "border-box",
336
+ cursor: "pointer",
337
+ height: r ? "100%" : 124,
338
+ p: 16,
339
+ ...v,
340
+ "& .MuiCardHeader-avatar": {
341
+ mr: "8px"
342
+ }
343
+ },
344
+ variant: c,
345
+ children: /* @__PURE__ */ g(
346
+ k,
347
+ {
348
+ sx: {
349
+ alignItems: "space-between",
350
+ height: "100%"
351
+ },
352
+ children: [
353
+ /* @__PURE__ */ e(
354
+ Xe,
355
+ {
356
+ avatar: p && a,
357
+ subheader: h && M,
358
+ sx: { p: 0 },
359
+ title: E,
360
+ titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
361
+ }
362
+ ),
363
+ /* @__PURE__ */ e(je, { sx: { p: 0 }, children: !h && M }),
364
+ !!o && /* @__PURE__ */ e(
365
+ Ye,
366
+ {
367
+ sx: {
368
+ mt: "auto",
369
+ p: 0
370
+ },
371
+ children: /* @__PURE__ */ e(
372
+ Z,
373
+ {
374
+ sx: (W) => ({
375
+ color: W.palette.primary.main,
376
+ fontSize: 14,
377
+ fontWeight: "bold",
378
+ px: 28,
379
+ fontFamily: W.typography.fontFamily,
380
+ ...T
381
+ }),
382
+ children: o
383
+ }
384
+ )
385
+ }
386
+ )
387
+ ]
388
+ }
389
+ )
390
+ }
391
+ )
392
+ }
393
+ )
417
394
  }
418
395
  );
419
- }, _t = (i) => Xe({
420
- marginTop: i.Spacing.XTiny,
421
- "& .kyper-categoryicon": {
422
- display: "flex"
423
- }
424
- }), Ct = G(pt), ft = ({
396
+ }), lt = ({ beat: i }) => {
397
+ const { primary_category_guid: o, category_guids: t } = i, l = o || t?.[0] || Pe.UNCATEGORIZED;
398
+ return /* @__PURE__ */ e(Be, { categoryGuid: l, size: 16, sx: { minWidth: 16 } });
399
+ }, nt = ({ beat: i }) => {
400
+ const { category_guids: o, merchant_guids: t, primary_category_guid: l, primary_merchant_guid: n } = i;
401
+ return /* @__PURE__ */ e(
402
+ Ze,
403
+ {
404
+ categoryGuid: l || o && o[0] || "",
405
+ merchantGuid: n || t[0],
406
+ size: 16,
407
+ sx: {
408
+ display: "flex",
409
+ mt: 2
410
+ }
411
+ }
412
+ );
413
+ }, rt = ({
425
414
  color: i = "currentColor",
426
415
  height: o,
427
416
  size: t = 16,
428
- styles: r,
417
+ styles: l,
429
418
  viewBox: n = "0 0 16 16",
430
- width: l
419
+ width: r
431
420
  }) => /* @__PURE__ */ e(
432
421
  "svg",
433
422
  {
@@ -435,9 +424,9 @@ const $ = u.createContext(null), Et = ({
435
424
  className: "kyper-icon",
436
425
  focusable: !1,
437
426
  height: o || t,
438
- style: r,
427
+ style: l,
439
428
  viewBox: n,
440
- width: l || t,
429
+ width: r || t,
441
430
  xmlns: "http://www.w3.org/2000/svg",
442
431
  children: /* @__PURE__ */ e(
443
432
  "path",
@@ -447,18 +436,18 @@ const $ = u.createContext(null), Et = ({
447
436
  }
448
437
  )
449
438
  }
450
- ), mt = (i) => i ? i.data ? i.data.map((o) => {
439
+ ), at = (i) => i ? i.data ? i.data.map((o) => {
451
440
  const t = {};
452
- return i.names?.map((r, n) => {
453
- t[r] = o[n];
441
+ return i.names?.map((l, n) => {
442
+ t[l] = o[n];
454
443
  }), t;
455
- }) : [] : [], Rt = (i, o) => {
456
- const t = mt(i), r = t.length / 2, n = t.slice(0, r), l = t.slice(r);
457
- return !n.length || !l.length ? o.Color.Primary300 : n[0].amount > l[0].amount ? o.Color.Error300 : n[0].amount < l[0].amount ? o.Color.Success300 : o.Color.Primary300;
458
- }, gt = ({ beat: i }) => {
459
- const o = Ae(), t = Rt(i.data_series, o);
460
- return /* @__PURE__ */ e(ie, { name: "bar_chart", sx: { color: t } });
461
- }, De = () => /* @__PURE__ */ v("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
444
+ }) : [] : [], ct = (i, o) => {
445
+ const t = at(i), l = t.length / 2, n = t.slice(0, l), r = t.slice(l);
446
+ return !n.length || !r.length ? o.palette.primary.main : n[0].amount > r[0].amount ? o.palette.error.main : n[0].amount < r[0].amount ? o.palette.success.main : o.palette.primary.main;
447
+ }, st = ({ beat: i }) => {
448
+ const o = j(), t = ct(i.data_series, o);
449
+ return /* @__PURE__ */ e(Ve, { sx: { color: t } });
450
+ }, Se = () => /* @__PURE__ */ g("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
462
451
  /* @__PURE__ */ e(
463
452
  "path",
464
453
  {
@@ -702,7 +691,7 @@ const $ = u.createContext(null), Et = ({
702
691
  fillRule: "evenodd"
703
692
  }
704
693
  ),
705
- /* @__PURE__ */ v("g", { filter: "url(#filter0_d_1565_98011)", children: [
694
+ /* @__PURE__ */ g("g", { filter: "url(#filter0_d_1565_98011)", children: [
706
695
  /* @__PURE__ */ e("mask", { height: "22", id: "mask1_1565_98011", maskUnits: "userSpaceOnUse", width: "17", x: "16", y: "12", children: /* @__PURE__ */ e(
707
696
  "path",
708
697
  {
@@ -958,10 +947,10 @@ const $ = u.createContext(null), Et = ({
958
947
  ),
959
948
  /* @__PURE__ */ e("path", { d: "M17.9668 31.5737H19.4947", stroke: "#E4E8EE", strokeWidth: "0.264005" })
960
949
  ] }),
961
- /* @__PURE__ */ v("g", { filter: "url(#filter1_d_1565_98011)", children: [
950
+ /* @__PURE__ */ g("g", { filter: "url(#filter1_d_1565_98011)", children: [
962
951
  /* @__PURE__ */ e("circle", { cx: "15.0441", cy: "16.0441", fill: "#CDD3DD", r: "15.0441" }),
963
952
  /* @__PURE__ */ e("mask", { height: "30", id: "mask2_1565_98011", maskUnits: "userSpaceOnUse", width: "30", x: "0", y: "1", children: /* @__PURE__ */ e("circle", { cx: "15.0435", cy: "16.0445", fill: "#F8F9FB", r: "14.3951" }) }),
964
- /* @__PURE__ */ v("g", { mask: "url(#mask2_1565_98011)", children: [
953
+ /* @__PURE__ */ g("g", { mask: "url(#mask2_1565_98011)", children: [
965
954
  /* @__PURE__ */ e("rect", { fill: "white", height: "31.1359", transform: "translate(0 0.162598)", width: "31.0101" }),
966
955
  /* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "4.52002" }),
967
956
  /* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "17.1758" }),
@@ -1151,8 +1140,8 @@ const $ = u.createContext(null), Et = ({
1151
1140
  fill: "#CDD3DD"
1152
1141
  }
1153
1142
  ),
1154
- /* @__PURE__ */ v("defs", { children: [
1155
- /* @__PURE__ */ v(
1143
+ /* @__PURE__ */ g("defs", { children: [
1144
+ /* @__PURE__ */ g(
1156
1145
  "filter",
1157
1146
  {
1158
1147
  colorInterpolationFilters: "sRGB",
@@ -1195,7 +1184,7 @@ const $ = u.createContext(null), Et = ({
1195
1184
  ]
1196
1185
  }
1197
1186
  ),
1198
- /* @__PURE__ */ v(
1187
+ /* @__PURE__ */ g(
1199
1188
  "filter",
1200
1189
  {
1201
1190
  colorInterpolationFilters: "sRGB",
@@ -1239,145 +1228,133 @@ const $ = u.createContext(null), Et = ({
1239
1228
  }
1240
1229
  )
1241
1230
  ] })
1242
- ] }), ve = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
1243
- const n = se(), l = o?.primary_300 ? o.primary_300 : n.palette.primary.main;
1244
- return r === 0 ? /* @__PURE__ */ e(ie, { fill: !0, name: "error", sx: { color: t || l } }) : r === 1 && i ? /* @__PURE__ */ e(ut, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(Ct, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(gt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(ie, { name: "campaign" }) : /* @__PURE__ */ e(
1245
- ie,
1231
+ ] }), dt = ({ beat: i }) => {
1232
+ const { icon_type: o, icon_color: t } = i;
1233
+ return o === 0 ? /* @__PURE__ */ e(ae, { filled: !0, sx: { color: (l) => t || l.palette.primary.main } }) : o === 1 ? /* @__PURE__ */ e(lt, { beat: i }) : o === 2 ? /* @__PURE__ */ e(nt, { beat: i }) : o === 3 ? /* @__PURE__ */ e(st, { beat: i }) : o === 5 ? /* @__PURE__ */ e(Ne, {}) : /* @__PURE__ */ e(
1234
+ ae,
1246
1235
  {
1247
- fill: !0,
1248
- name: "info",
1236
+ filled: !0,
1249
1237
  sx: {
1250
- color: l
1238
+ color: (l) => l.palette.primary.main
1251
1239
  }
1252
1240
  }
1253
1241
  );
1254
- }, k = () => {
1255
- const i = u.useContext($);
1242
+ }, V = () => {
1243
+ const i = u.useContext(U);
1256
1244
  if (!i)
1257
1245
  throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
1258
1246
  return i.store.copyStore;
1259
- }, It = () => {
1260
- const i = u.useContext($);
1247
+ }, Et = () => {
1248
+ const i = u.useContext(U);
1261
1249
  if (!i?.store?.insightsMicroWidgetStore)
1262
1250
  throw new Error(
1263
1251
  "useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
1264
1252
  );
1265
1253
  return i.store.insightsMicroWidgetStore;
1266
- }, Y = () => {
1267
- const i = u.useContext($);
1254
+ }, z = () => {
1255
+ const i = u.useContext(U);
1268
1256
  if (!i)
1269
1257
  throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
1270
1258
  return { onEvent: i.onEvent };
1271
- }, Le = () => {
1272
- const i = u.useContext($);
1259
+ }, Me = () => {
1260
+ const i = u.useContext(U);
1273
1261
  if (!i)
1274
1262
  throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
1275
1263
  return { onPageview: i.onPageview };
1276
- }, Ne = {
1264
+ }, ht = {
1277
1265
  LARGE: 180,
1278
1266
  STANDARD: 154,
1279
1267
  XLARGE: 200,
1280
1268
  XXLARGE: 248
1281
- }, yt = 50, Ve = 1, vt = ({
1269
+ }, ut = 50, Ae = 1, pt = ({
1282
1270
  ariaLabel: i,
1283
1271
  backgroundColor: o,
1284
1272
  beat: t,
1285
- clientColorScheme: r,
1286
- showCTAColocatedWithText: n = !0,
1287
- heightOverrides: l,
1288
- index: a,
1289
- isActiveCard: d,
1290
- onCardClick: p,
1291
- posthog: _,
1292
- showIcon: C,
1293
- variant: f,
1294
- widthOverrides: h
1273
+ showCTAColocatedWithText: l = !0,
1274
+ heightOverrides: n,
1275
+ index: r,
1276
+ isActiveCard: a,
1277
+ onCardClick: s,
1278
+ posthog: h,
1279
+ showIcon: f,
1280
+ variant: p,
1281
+ widthOverrides: d
1295
1282
  }) => {
1296
- const { ref: m, inView: c } = Me({
1297
- threshold: Ve
1298
- }), { cardsCopy: E } = k(), { onEvent: R } = Y(), { updateBeat: I, updateOffer: x } = It();
1299
- oe(() => {
1300
- c && (t.has_been_displayed ? R(We(t.template)) : (t.guid.startsWith("OFR") ? x({
1283
+ const { ref: E, inView: c } = me({
1284
+ threshold: Ae
1285
+ }), { cardsCopy: C } = V(), { onEvent: _ } = z(), { updateBeat: R, updateOffer: O } = Et();
1286
+ te(() => {
1287
+ c && (t.has_been_displayed ? _(Ie(t.template)) : (t.guid.startsWith("OFR") ? O({
1301
1288
  ...t,
1302
1289
  has_been_displayed: !0
1303
- }) : I({
1290
+ }) : R({
1304
1291
  ...t,
1305
1292
  has_been_displayed: !0
1306
- }), R(we(t.template))));
1307
- }, [c]), oe(() => {
1293
+ }), _(ve(t.template))));
1294
+ }, [c]), te(() => {
1308
1295
  if (c && t)
1309
1296
  if (t.template === "MarketingOffer") {
1310
- const y = t;
1311
- _?.capture("viewed_messaging_insight", {
1297
+ const m = t;
1298
+ h?.capture("viewed_messaging_insight", {
1312
1299
  template: t.template,
1313
- campaign_guid: y.campaign_guid,
1314
- campaign_name: y.pulse_campaign_name
1300
+ campaign_guid: m.campaign_guid,
1301
+ campaign_name: m.pulse_campaign_name
1315
1302
  });
1316
1303
  } else
1317
- _?.capture("viewed_insight", {
1304
+ h?.capture("viewed_insight", {
1318
1305
  beat_guid: t.guid,
1319
1306
  template: t.template,
1320
- position: a
1307
+ position: r
1321
1308
  });
1322
- }, [t, a, c]);
1323
- const O = () => {
1324
- if (p && p(t), R(Te(t.template)), t.template === "MarketingOffer") {
1325
- const y = t;
1326
- _?.capture("clicked_messaging_insight", {
1309
+ }, [t, r, c]);
1310
+ const I = () => {
1311
+ if (s && s(t), _(ge(t.template)), t.template === "MarketingOffer") {
1312
+ const m = t;
1313
+ h?.capture("clicked_messaging_insight", {
1327
1314
  template: t.template,
1328
- campaign_guid: y.campaign_guid,
1329
- campaign_name: y.pulse_campaign_name
1315
+ campaign_guid: m.campaign_guid,
1316
+ campaign_name: m.pulse_campaign_name
1330
1317
  });
1331
1318
  } else
1332
- _?.capture("clicked_insight", {
1319
+ h?.capture("clicked_insight", {
1333
1320
  beat_guid: t.guid,
1334
1321
  template: t.template,
1335
- position: a
1322
+ position: r
1336
1323
  });
1337
1324
  };
1338
1325
  return /* @__PURE__ */ e(
1339
- re,
1326
+ X,
1340
1327
  {
1341
- actionText: t.micro_call_to_action || E.micro_card_cta,
1328
+ actionText: t.micro_call_to_action || C.micro_card_cta,
1342
1329
  ariaLabel: i,
1343
1330
  backgroundColor: o,
1344
1331
  description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
1345
- fontColors: { buttonColor: r?.primary_300 },
1346
- heightOverrides: l,
1347
- icon: ve && /* @__PURE__ */ e(
1348
- ve,
1349
- {
1350
- beat: t,
1351
- clientColorScheme: r,
1352
- color: t?.icon_color,
1353
- type: t?.icon_type
1354
- }
1355
- ),
1356
- isActiveCard: d,
1357
- onCardClick: O,
1358
- posthog: _,
1359
- ref: m,
1360
- showCTAColocatedWithText: n,
1361
- showIcon: C,
1332
+ heightOverrides: n,
1333
+ icon: /* @__PURE__ */ e(dt, { beat: t }),
1334
+ isActiveCard: a,
1335
+ onCardClick: I,
1336
+ posthog: h,
1337
+ ref: E,
1338
+ showCTAColocatedWithText: l,
1339
+ showIcon: f,
1362
1340
  title: t.micro_title && t.micro_title.length > 0 ? t.micro_title : t.title,
1363
- variant: f,
1364
- widthOverrides: h
1341
+ variant: p,
1342
+ widthOverrides: d
1365
1343
  }
1366
1344
  );
1367
- }, St = ({
1368
- clientColorScheme: i,
1369
- currentBeatIndex: o,
1370
- numBeats: t,
1371
- onNextClick: r,
1372
- onPreviousClick: n,
1373
- scrollRightBoundary: l,
1374
- scrollX: a,
1375
- shouldApplyNewAnimation: d = !1,
1376
- visibleCardsCount: p = 1
1345
+ }, _t = ({
1346
+ currentBeatIndex: i,
1347
+ numBeats: o,
1348
+ onNextClick: t,
1349
+ onPreviousClick: l,
1350
+ scrollRightBoundary: n,
1351
+ scrollX: r,
1352
+ shouldApplyDotAnimation: a = !1,
1353
+ visibleCardsCount: s = 1
1377
1354
  }) => {
1378
- const _ = ze(), { carouselCopy: C } = k(), f = Math.floor(a) > l || o - p + 1 === 0, h = a < 0 || t - 1 === o, m = _.palette.grey[500], c = i?.primary_300 ?? _.palette.primary.main;
1379
- return /* @__PURE__ */ v(
1380
- K,
1355
+ const h = j(), { carouselCopy: f } = V(), p = Math.floor(r) > n || i - s + 1 === 0, d = r < 0 || o - 1 === i, E = h.palette.grey[500], c = h.palette.primary.main;
1356
+ return /* @__PURE__ */ g(
1357
+ k,
1381
1358
  {
1382
1359
  direction: "row",
1383
1360
  sx: {
@@ -1392,34 +1369,34 @@ const $ = u.createContext(null), Et = ({
1392
1369
  },
1393
1370
  children: [
1394
1371
  /* @__PURE__ */ e(
1395
- pe,
1372
+ ce,
1396
1373
  {
1397
- "aria-disabled": f,
1398
- "aria-label": C.previous_insight_cta_aria,
1399
- disabled: f,
1400
- onClick: n,
1374
+ "aria-disabled": p,
1375
+ "aria-label": f.previous_insight_cta_aria,
1376
+ disabled: p,
1377
+ onClick: l,
1401
1378
  children: /* @__PURE__ */ e(
1402
- be,
1379
+ He,
1403
1380
  {
1404
- style: {
1405
- color: f ? m : c
1381
+ sx: {
1382
+ color: p ? E : c
1406
1383
  }
1407
1384
  }
1408
1385
  )
1409
1386
  }
1410
1387
  ),
1411
- Array.from({ length: t }).map((E, R) => {
1412
- const I = R === o;
1388
+ Array.from({ length: o }).map((C, _) => {
1389
+ const R = _ === i;
1413
1390
  return /* @__PURE__ */ e(
1414
- U,
1391
+ Z,
1415
1392
  {
1416
1393
  className: "mx-insights-micro-carousel-dots",
1417
1394
  sx: {
1418
- bgcolor: I ? c : m,
1395
+ bgcolor: R ? c : E,
1419
1396
  height: 8,
1420
1397
  mr: 8,
1421
1398
  // existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
1422
- ...d ? {
1399
+ ...a ? {
1423
1400
  borderRadius: "4px",
1424
1401
  transformOrigin: "center",
1425
1402
  transition: "all 0.5s ease-out",
@@ -1428,24 +1405,24 @@ const $ = u.createContext(null), Et = ({
1428
1405
  borderRadius: "50%",
1429
1406
  p: 0
1430
1407
  },
1431
- width: I && d ? 24 : 8
1408
+ width: R && a ? 24 : 8
1432
1409
  }
1433
1410
  },
1434
- `carousel-button-${R}`
1411
+ `carousel-button-${_}`
1435
1412
  );
1436
1413
  }),
1437
1414
  /* @__PURE__ */ e(
1438
- pe,
1415
+ ce,
1439
1416
  {
1440
- "aria-disabled": h,
1441
- "aria-label": C.next_insight_cta_aria,
1442
- disabled: h,
1443
- onClick: r,
1417
+ "aria-disabled": d,
1418
+ "aria-label": f.next_insight_cta_aria,
1419
+ disabled: d,
1420
+ onClick: t,
1444
1421
  children: /* @__PURE__ */ e(
1445
- Se,
1422
+ Ce,
1446
1423
  {
1447
- style: {
1448
- color: h ? m : c
1424
+ sx: {
1425
+ color: d ? E : c
1449
1426
  }
1450
1427
  }
1451
1428
  )
@@ -1454,115 +1431,154 @@ const $ = u.createContext(null), Et = ({
1454
1431
  ]
1455
1432
  }
1456
1433
  );
1457
- }, Mt = ({
1434
+ }, ft = ({
1435
+ activeCardIndex: i,
1436
+ beats: o,
1437
+ cardWidth: t,
1438
+ showCTAColocatedWithText: l,
1439
+ heightOverrides: n,
1440
+ onCardClick: r,
1441
+ posthog: a,
1442
+ showIcon: s,
1443
+ variant: h
1444
+ }) => {
1445
+ const { carouselCopy: f } = V(), p = {
1446
+ showCTAColocatedWithText: l,
1447
+ heightOverrides: n,
1448
+ posthog: a,
1449
+ showIcon: s,
1450
+ variant: h
1451
+ };
1452
+ return /* @__PURE__ */ g(xe, { children: [
1453
+ o.map((d, E) => {
1454
+ const c = E + 1, C = o.length + 1, _ = be(
1455
+ f.card_position_in_carousel_aria,
1456
+ c.toString(),
1457
+ C.toString()
1458
+ ), R = d.micro_title && d.micro_title.length > 0, O = d.micro_description && d.micro_description.length > 0, I = R ? d.micro_title : d.title, m = O ? d.micro_description : d.description;
1459
+ return /* @__PURE__ */ e(
1460
+ pt,
1461
+ {
1462
+ ariaLabel: `${_}: ${I}, ${m}`,
1463
+ beat: d,
1464
+ index: E,
1465
+ isActiveCard: E === i,
1466
+ onCardClick: r,
1467
+ widthOverrides: t || void 0,
1468
+ ...p
1469
+ },
1470
+ `${d.guid} ${E}`
1471
+ );
1472
+ }),
1473
+ /* @__PURE__ */ e(
1474
+ Mt,
1475
+ {
1476
+ isActiveCard: i === o.length,
1477
+ onCardClick: r,
1478
+ widthOverrides: t || void 0,
1479
+ ...p
1480
+ }
1481
+ )
1482
+ ] });
1483
+ }, Ct = ({
1458
1484
  analyticsMetadata: i,
1459
1485
  allowSingleCardPeeking: o = !1,
1460
1486
  beats: t = [],
1461
- clientColorScheme: r,
1462
- showCTAColocatedWithText: n,
1463
- heightOverrides: l,
1464
- onCardClick: a,
1465
- posthog: d,
1466
- shouldApplyNewAnimation: p = !1,
1467
- showCarouselControls: _,
1468
- showIcon: C,
1487
+ showCTAColocatedWithText: l,
1488
+ heightOverrides: n,
1489
+ onCardClick: r,
1490
+ posthog: a,
1491
+ showCarouselControls: s,
1492
+ showIcon: h,
1469
1493
  showWithMargin: f = !0,
1470
- variant: h,
1471
- widthOverrides: m,
1472
- visibleCardsCount: c = 1
1494
+ variant: p,
1495
+ widthOverrides: d,
1496
+ visibleCardsCount: E = 1
1473
1497
  // Default to 1 card visible
1474
1498
  }) => {
1475
- const E = u.useRef(null), R = u.useRef(null), [I, x] = u.useState(0), [O, y] = u.useState(null), [F, z] = u.useState(null), [g, D] = u.useState(null), [b, B] = u.useState(p), { carouselCopy: j } = k(), { onEvent: Z } = Y();
1499
+ const c = u.useRef(null), C = u.useRef(null), [_, R] = u.useState(0), [O, I] = u.useState(null), [m, T] = u.useState(null), [v, M] = u.useState(null), { carouselCopy: W } = V(), { onEvent: F } = z();
1476
1500
  u.useEffect(() => {
1477
- if (E.current && !o) {
1478
- const s = E.current.offsetWidth, A = 8;
1479
- let N;
1480
- if (c > 1) {
1481
- const J = (s - (c - 1) * A) / c / 3;
1482
- N = (s - J - (c - 1) * A) / c;
1501
+ if (c.current && !o) {
1502
+ const A = c.current.offsetWidth, b = 8;
1503
+ let B;
1504
+ if (E > 1) {
1505
+ const ne = (A - (E - 1) * b) / E / 3;
1506
+ B = (A - ne - (E - 1) * b) / E;
1483
1507
  } else
1484
- N = s;
1485
- D(N);
1508
+ B = A;
1509
+ M(B);
1486
1510
  }
1487
- }, [c, E.current?.offsetWidth]), u.useEffect(() => {
1488
- const s = R.current?.offsetWidth;
1489
- if (typeof s == "number" && o) {
1490
- const A = (P) => {
1491
- B(!0);
1492
- const ee = [
1511
+ }, [E, c.current?.offsetWidth]), u.useEffect(() => {
1512
+ const A = C.current?.offsetWidth;
1513
+ if (typeof A == "number" && o) {
1514
+ const b = (G) => {
1515
+ const re = [
1493
1516
  { maxWidth: 375, cardWidth: 268 },
1494
1517
  { maxWidth: 444, cardWidth: 300 },
1495
1518
  { maxWidth: 599, cardWidth: 350 },
1496
1519
  { maxWidth: 749, cardWidth: 450 },
1497
1520
  { maxWidth: 900, cardWidth: 600 }
1498
- ].find((ce) => P <= ce.maxWidth);
1499
- return ee ? ee.cardWidth : 750;
1521
+ ].find((we) => G <= we.maxWidth);
1522
+ return re ? re.cardWidth : 750;
1500
1523
  };
1501
- D(A(s));
1502
- const N = () => {
1503
- const P = R.current?.offsetWidth;
1504
- typeof P == "number" && D(A(P));
1524
+ M(b(A));
1525
+ const B = () => {
1526
+ const G = C.current?.offsetWidth;
1527
+ typeof G == "number" && M(b(G));
1505
1528
  };
1506
- return window.addEventListener("resize", N), () => {
1507
- window.removeEventListener("resize", N);
1529
+ return window.addEventListener("resize", B), () => {
1530
+ window.removeEventListener("resize", B);
1508
1531
  };
1509
1532
  }
1510
- }, [o, R]);
1511
- const X = () => {
1512
- Z(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && g && E.current.scrollTo({
1513
- left: I + g + 8,
1533
+ }, [o, C]);
1534
+ const K = () => {
1535
+ F(S.ON_CAROUSEL_FORWARD_CLICK, i), c.current && v && c.current.scrollTo({
1536
+ left: _ + v + 8,
1514
1537
  top: 0,
1515
1538
  behavior: "smooth"
1516
1539
  });
1517
- }, le = () => {
1518
- Z(M.ON_CAROUSEL_BACK_CLICK, i), E.current && g && E.current.scrollTo({
1519
- left: Math.max(0, I - (g + 8)),
1540
+ }, $ = () => {
1541
+ F(S.ON_CAROUSEL_BACK_CLICK, i), c.current && v && c.current.scrollTo({
1542
+ left: Math.max(0, _ - (v + 8)),
1520
1543
  top: 0,
1521
1544
  behavior: "smooth"
1522
1545
  });
1523
- }, ne = () => {
1524
- E.current && x(E.current.scrollLeft);
1525
1546
  }, Q = () => {
1526
- if (!F || !O) return;
1527
- F - O > yt ? Z(M.ON_CAROUSEL_FORWARD_SWIPE, i) : Z(M.ON_CAROUSEL_BACK_SWIPE, i);
1528
- }, q = (s) => {
1529
- y(s.targetTouches[0].clientX);
1530
- }, L = (s) => {
1531
- y(null), z(s.targetTouches[0].clientX);
1532
- }, ue = {
1533
- clientColorScheme: r,
1534
- showCTAColocatedWithText: n,
1535
- heightOverrides: l,
1536
- posthog: d,
1537
- showIcon: C,
1538
- variant: h
1539
- }, ae = g ? Math.round(I / (g + 8)) : 0, Fe = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
1540
- return /* @__PURE__ */ v(
1541
- K,
1547
+ c.current && R(c.current.scrollLeft);
1548
+ }, q = () => {
1549
+ if (!m || !O) return;
1550
+ m - O > ut ? F(S.ON_CAROUSEL_FORWARD_SWIPE, i) : F(S.ON_CAROUSEL_BACK_SWIPE, i);
1551
+ }, J = (A) => {
1552
+ I(A.targetTouches[0].clientX);
1553
+ }, Y = (A) => {
1554
+ I(null), T(A.targetTouches[0].clientX);
1555
+ }, w = v ? Math.round(_ / (v + 8)) : 0, We = c.current ? c.current.scrollWidth - c.current.offsetWidth : 0;
1556
+ return /* @__PURE__ */ g(
1557
+ k,
1542
1558
  {
1543
- "aria-label": j.carousel_title,
1559
+ "aria-label": W.carousel_title,
1544
1560
  "aria-roledescription": "carousel",
1545
- ref: R,
1561
+ ref: C,
1546
1562
  role: "group/region",
1547
1563
  sx: {
1548
1564
  alignItems: "center",
1549
1565
  boxSizing: "border-box",
1550
- height: l,
1551
- width: m || "100%"
1566
+ height: n,
1567
+ width: d || "100%"
1552
1568
  },
1553
1569
  children: [
1554
- /* @__PURE__ */ v(
1555
- K,
1570
+ /* @__PURE__ */ e(
1571
+ k,
1556
1572
  {
1557
1573
  direction: "row",
1558
- onScroll: ne,
1559
- onTouchEnd: Q,
1560
- onTouchMove: q,
1561
- onTouchStart: L,
1562
- ref: E,
1574
+ onScroll: Q,
1575
+ onTouchEnd: q,
1576
+ onTouchMove: J,
1577
+ onTouchStart: Y,
1578
+ ref: c,
1563
1579
  sx: {
1564
1580
  alignItems: "center",
1565
- height: l && "100%",
1581
+ height: n && "100%",
1566
1582
  gap: 8,
1567
1583
  listStyleType: "none",
1568
1584
  m: 0,
@@ -1577,68 +1593,49 @@ const $ = u.createContext(null), Et = ({
1577
1593
  display: "none"
1578
1594
  }
1579
1595
  },
1580
- children: [
1581
- t.map((s, A) => {
1582
- const N = A + 1, P = t.length + 1, J = Qe(
1583
- j.card_position_in_carousel_aria,
1584
- N.toString(),
1585
- P.toString()
1586
- ), ee = s.micro_title && s.micro_title.length > 0, ce = s.micro_description && s.micro_description.length > 0, Be = ee ? s.micro_title : s.title, Ze = ce ? s.micro_description : s.description;
1587
- return /* @__PURE__ */ e(
1588
- vt,
1589
- {
1590
- ariaLabel: `${J}: ${Be}, ${Ze}`,
1591
- beat: s,
1592
- index: A,
1593
- isActiveCard: A === ae,
1594
- onCardClick: a,
1595
- widthOverrides: g || void 0,
1596
- ...ue
1597
- },
1598
- `${s.guid} ${A}`
1599
- );
1600
- }),
1601
- /* @__PURE__ */ e(
1602
- Lt,
1603
- {
1604
- isActiveCard: ae === t.length,
1605
- onCardClick: a,
1606
- widthOverrides: g || void 0,
1607
- ...ue
1608
- }
1609
- )
1610
- ]
1596
+ children: /* @__PURE__ */ e(
1597
+ ft,
1598
+ {
1599
+ activeCardIndex: w,
1600
+ beats: t,
1601
+ cardWidth: v,
1602
+ heightOverrides: n,
1603
+ onCardClick: r,
1604
+ posthog: a,
1605
+ showCTAColocatedWithText: l,
1606
+ showIcon: h,
1607
+ variant: p
1608
+ }
1609
+ )
1611
1610
  }
1612
1611
  ),
1613
- _ && /* @__PURE__ */ e(
1614
- St,
1612
+ s && /* @__PURE__ */ e(
1613
+ _t,
1615
1614
  {
1616
- clientColorScheme: r,
1617
- currentBeatIndex: ae + c - 1,
1615
+ currentBeatIndex: w + E - 1,
1618
1616
  numBeats: t.length + 1,
1619
- onNextClick: X,
1620
- onPreviousClick: le,
1621
- scrollRightBoundary: Fe,
1622
- scrollX: I,
1623
- shouldApplyNewAnimation: b,
1624
- visibleCardsCount: c
1617
+ onNextClick: K,
1618
+ onPreviousClick: $,
1619
+ scrollRightBoundary: We,
1620
+ scrollX: _,
1621
+ shouldApplyDotAnimation: o,
1622
+ visibleCardsCount: E
1625
1623
  }
1626
1624
  )
1627
1625
  ]
1628
1626
  }
1629
1627
  );
1630
- }, At = G(Mt), Ot = ({
1628
+ }, mt = P(Ct), Rt = ({
1631
1629
  analyticsMetadata: i,
1632
- clientColorScheme: o,
1633
- onCardClick: t,
1634
- posthog: r,
1635
- widthOverrides: n
1630
+ onCardClick: o,
1631
+ posthog: t,
1632
+ widthOverrides: l
1636
1633
  }) => {
1637
- const { carouselCopy: l } = k(), { onEvent: a } = Y(), d = () => {
1638
- a && (a(M.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
1634
+ const { carouselCopy: n } = V(), { onEvent: r } = z(), a = () => {
1635
+ r && (r(S.ON_VIEW_MORE_CLICKED, i), o(), t?.capture("clicked_view_more"));
1639
1636
  };
1640
- return l ? /* @__PURE__ */ v(
1641
- K,
1637
+ return n ? /* @__PURE__ */ g(
1638
+ k,
1642
1639
  {
1643
1640
  alignItems: "center",
1644
1641
  direction: "row",
@@ -1646,48 +1643,48 @@ const $ = u.createContext(null), Et = ({
1646
1643
  spacing: 2,
1647
1644
  sx: {
1648
1645
  padding: 16,
1649
- width: n || void 0
1646
+ width: l || void 0
1650
1647
  },
1651
1648
  children: [
1652
1649
  /* @__PURE__ */ e(
1653
- Ge,
1650
+ Le,
1654
1651
  {
1655
- sx: {
1656
- color: o?.primary_300,
1652
+ sx: (s) => ({
1653
+ color: s.palette.primary.main,
1657
1654
  fontSize: 18,
1658
1655
  fontWeight: 700,
1659
1656
  lineHeight: "24px"
1660
- },
1657
+ }),
1661
1658
  variant: "h3",
1662
- children: l.carousel_title
1659
+ children: n.carousel_title
1663
1660
  }
1664
1661
  ),
1665
1662
  /* @__PURE__ */ e(
1666
- Pe,
1663
+ De,
1667
1664
  {
1668
- endIcon: /* @__PURE__ */ e(Se, { size: 20 }),
1669
- onClick: d,
1665
+ endIcon: /* @__PURE__ */ e(Ce, { size: 20 }),
1666
+ onClick: a,
1670
1667
  size: "small",
1671
- sx: {
1672
- color: o?.primary_300
1673
- },
1668
+ sx: (s) => ({
1669
+ color: s.palette.primary.main
1670
+ }),
1674
1671
  variant: "text",
1675
- children: l.view_all_insights_in_full_feed_cta_aria
1672
+ children: n.view_all_insights_in_full_feed_cta_aria
1676
1673
  }
1677
1674
  )
1678
1675
  ]
1679
1676
  }
1680
- ) : /* @__PURE__ */ e(Ue, {});
1681
- }, Tt = G(Ot), Wt = ({
1677
+ ) : /* @__PURE__ */ e(ke, {});
1678
+ }, gt = P(Rt), It = ({
1682
1679
  heightOverrides: i,
1683
1680
  widthOverrides: o,
1684
1681
  children: t
1685
1682
  }) => {
1686
- const { carouselCopy: r } = k();
1683
+ const { carouselCopy: l } = V();
1687
1684
  return /* @__PURE__ */ e(
1688
- U,
1685
+ Z,
1689
1686
  {
1690
- "aria-label": r?.carousel_title,
1687
+ "aria-label": l?.carousel_title,
1691
1688
  "aria-roledescription": "carousel",
1692
1689
  role: "group",
1693
1690
  sx: {
@@ -1699,104 +1696,72 @@ const $ = u.createContext(null), Et = ({
1699
1696
  children: t
1700
1697
  }
1701
1698
  );
1702
- }, He = ({
1699
+ }, Oe = ({
1703
1700
  ariaLabel: i,
1704
- carouselSize: o,
1705
- clientColorScheme: t,
1706
- heightOverrides: r,
1707
- onCardClick: n,
1701
+ heightOverrides: o,
1702
+ onCardClick: t,
1708
1703
  posthog: l,
1709
- showIcon: a,
1710
- showWithMargin: d,
1711
- variant: p,
1712
- widthOverrides: _
1704
+ showIcon: n,
1705
+ variant: r
1713
1706
  }) => {
1714
- const { cardsCopy: C } = k(), { onEvent: f } = Y(), { onPageview: h } = Le();
1707
+ const { cardsCopy: a } = V(), { onEvent: s } = z(), { onPageview: h } = Me();
1715
1708
  u.useEffect(() => {
1716
1709
  h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1717
1710
  }, []);
1718
- const m = () => {
1719
- n && n(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
1711
+ const f = () => {
1712
+ t && t(), s(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
1720
1713
  template: "no_relevant_insights"
1721
1714
  });
1722
1715
  };
1723
1716
  return /* @__PURE__ */ e(
1724
- re,
1717
+ X,
1725
1718
  {
1726
- actionText: C.micro_card_cta,
1719
+ actionText: a.micro_card_cta,
1727
1720
  ariaLabel: i,
1728
- description: C.no_relevant_insights_card_description,
1729
- fontColors: { buttonColor: t?.primary_300 },
1730
- heightOverrides: r,
1731
- icon: /* @__PURE__ */ e(De, {}),
1721
+ description: a.no_relevant_insights_card_description,
1722
+ heightOverrides: o,
1723
+ icon: /* @__PURE__ */ e(Se, {}),
1732
1724
  isZeroState: !0,
1733
- onCardClick: m,
1725
+ onCardClick: f,
1734
1726
  posthog: l,
1735
- showIcon: a,
1727
+ showIcon: n,
1736
1728
  style: {
1737
- cardStyle: {
1738
- card: {
1739
- height: `calc(${Ne[o]}px - 44px)`,
1740
- m: "0 auto",
1741
- width: d ? "calc(100% - 32px)" : "100%"
1742
- },
1743
- description: {
1744
- WebkitLineClamp: 4
1745
- }
1746
- },
1747
1729
  linkTextStyle: {
1748
1730
  ml: 48
1749
1731
  }
1750
1732
  },
1751
- title: C.no_relevant_insights_card_title,
1752
- variant: p,
1753
- widthOverrides: _
1733
+ title: a.no_relevant_insights_card_title,
1734
+ variant: r
1754
1735
  }
1755
1736
  );
1756
- }, li = G(He), ke = ({
1737
+ }, jt = P(Oe), Te = ({
1757
1738
  ariaLabel: i,
1758
- carouselSize: o,
1759
- heightOverrides: t,
1760
- onCardClick: r,
1761
- posthog: n,
1762
- showIcon: l,
1763
- showWithMargin: a,
1764
- variant: d,
1765
- widthOverrides: p
1739
+ heightOverrides: o,
1740
+ onCardClick: t,
1741
+ posthog: l,
1742
+ showIcon: n,
1743
+ variant: r
1766
1744
  }) => {
1767
- const { onPageview: _ } = Le(), { zeroStateCopy: C } = k();
1745
+ const { onPageview: a } = Me(), { zeroStateCopy: s } = V();
1768
1746
  return u.useEffect(() => {
1769
- _(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1747
+ a(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1770
1748
  }, []), /* @__PURE__ */ e(
1771
- re,
1749
+ X,
1772
1750
  {
1773
1751
  ariaLabel: i,
1774
- description: C.carousel_zero_state_description,
1775
- heightOverrides: t,
1776
- icon: /* @__PURE__ */ e(De, {}),
1752
+ description: s.carousel_zero_state_description,
1753
+ heightOverrides: o,
1754
+ icon: /* @__PURE__ */ e(Se, {}),
1777
1755
  isZeroState: !0,
1778
- onCardClick: r,
1779
- posthog: n,
1780
- showIcon: l,
1781
- style: {
1782
- cardStyle: {
1783
- card: {
1784
- height: `calc(${Ne[o]}px - 44px)`,
1785
- m: "0 auto",
1786
- width: a ? "calc(100% - 32px)" : "100%"
1787
- },
1788
- description: {
1789
- WebkitLineClamp: 4
1790
- }
1791
- }
1792
- },
1793
- title: C.carousel_zero_state_title,
1794
- variant: d,
1795
- widthOverrides: p
1756
+ onCardClick: t,
1757
+ posthog: l,
1758
+ showIcon: n,
1759
+ title: s.carousel_zero_state_title,
1760
+ variant: r
1796
1761
  }
1797
1762
  );
1798
- }, ni = G(ke), wt = () => /* @__PURE__ */ e(
1799
- U,
1763
+ }, Xt = P(Te), vt = () => /* @__PURE__ */ e(
1764
+ Z,
1800
1765
  {
1801
1766
  sx: {
1802
1767
  alignItems: "center",
@@ -1805,148 +1770,160 @@ const $ = u.createContext(null), Et = ({
1805
1770
  justifyContent: "center",
1806
1771
  width: "100%"
1807
1772
  },
1808
- children: /* @__PURE__ */ e(qe, {})
1773
+ children: /* @__PURE__ */ e(Ge, {})
1809
1774
  }
1810
- ), V = new ht(), xt = ({
1775
+ ), N = new it(), yt = ({
1811
1776
  allowSingleCardPeeking: i,
1812
1777
  areBeatsLoading: o,
1813
1778
  beats: t = [],
1814
1779
  // This also determines the length of the carousel controls (beat.length + 1)
1815
- clientColorScheme: r,
1816
- // Allows certain icons, view all and read more button to reflect the clients color scheme. Currently only supports primary_300
1817
- showCTAColocatedWithText: n = !0,
1818
- endpoint: l = "/",
1819
- heightOverrides: a,
1820
- logOutUser: d,
1821
- onCardClick: p = () => {
1780
+ showCTAColocatedWithText: l = !0,
1781
+ endpoint: n = "/",
1782
+ heightOverrides: r,
1783
+ logOutUser: a,
1784
+ onCardClick: s = () => {
1822
1785
  },
1823
- onEvent: _ = () => {
1786
+ onEvent: h = () => {
1824
1787
  },
1825
- onPageview: C = () => {
1788
+ onPageview: f = () => {
1826
1789
  },
1827
- posthog: f,
1828
- shouldApplyNewAnimation: h = !1,
1829
- showBorder: m = !0,
1830
- showCarouselControls: c,
1831
- showHeader: E,
1832
- showIcon: R,
1833
- showWithMargin: I = !0,
1834
- token: x = "",
1835
- useDarkMode: O,
1836
- userHasFullInsightFeedBeats: y,
1837
- variant: F,
1838
- visibleCardsCount: z = 1,
1839
- widthOverrides: g
1790
+ posthog: p,
1791
+ showBorder: d = !0,
1792
+ showCarouselControls: E,
1793
+ showHeader: c,
1794
+ showIcon: C,
1795
+ showWithMargin: _ = !0,
1796
+ token: R = "",
1797
+ userHasFullInsightFeedBeats: O,
1798
+ variant: I,
1799
+ visibleCardsCount: m = 1,
1800
+ widthOverrides: T
1840
1801
  }) => {
1841
- const [D, b] = te("STANDARD"), [B, j] = te(!1), [Z, X] = te(!1), le = et([_], V), ne = tt([C], V);
1802
+ const [v, M] = ee("STANDARD"), [W, F] = ee(!1), [K, $] = ee(!1), Q = ze([h], N), q = Ke([f], N);
1842
1803
  u.useEffect(() => {
1843
- !V.isInitialized && !Z && (V.initialize(l, x, d).catch(() => X(!1)), X(!0));
1844
- }, [l, x, d, V.isInitialized, Z]), u.useEffect(() => {
1845
- const L = window.innerHeight;
1846
- L < 180 ? b("STANDARD") : L >= 180 && L < 200 ? b("LARGE") : L >= 200 && L < 248 ? b("XLARGE") : L >= 248 && b("XXLARGE");
1804
+ !N.isInitialized && !K && (N.initialize(n, R, a).catch(() => $(!1)), $(!0));
1805
+ }, [n, R, a, N.isInitialized, K]), u.useEffect(() => {
1806
+ const w = window.innerHeight;
1807
+ w < 180 ? M("STANDARD") : w >= 180 && w < 200 ? M("LARGE") : w >= 200 && w < 248 ? M("XLARGE") : w >= 248 && M("XXLARGE");
1847
1808
  }, [window.innerHeight]), u.useEffect(() => {
1848
- j(!o && V.isInitialized);
1849
- }, [o, V.isInitialized]);
1850
- const Q = {
1851
- showCTAColocatedWithText: n,
1852
- heightOverrides: a,
1853
- onCardClick: p,
1854
- posthog: f,
1855
- showIcon: R,
1856
- showWithMargin: I,
1857
- useDarkMode: O,
1858
- widthOverrides: g
1859
- }, q = {
1860
- carouselSize: D,
1861
- variant: F,
1862
- ...Q
1809
+ F(!o && N.isInitialized);
1810
+ }, [o, N.isInitialized]);
1811
+ const J = {
1812
+ showCTAColocatedWithText: l,
1813
+ heightOverrides: r,
1814
+ onCardClick: s,
1815
+ posthog: p,
1816
+ showIcon: C,
1817
+ showWithMargin: _,
1818
+ widthOverrides: T
1819
+ }, Y = {
1820
+ carouselSize: v,
1821
+ variant: I,
1822
+ showCTAColocatedWithText: l,
1823
+ heightOverrides: r,
1824
+ onCardClick: s,
1825
+ posthog: p,
1826
+ showIcon: C
1863
1827
  };
1864
- return /* @__PURE__ */ e(Et, { onEvent: le, onPageview: ne, store: V, children: /* @__PURE__ */ v(Wt, { heightOverrides: a, widthOverrides: g, children: [
1865
- !B && /* @__PURE__ */ e(wt, {}),
1866
- B && E && /* @__PURE__ */ e(
1867
- Tt,
1828
+ return /* @__PURE__ */ e(ot, { onEvent: Q, onPageview: q, store: N, children: /* @__PURE__ */ g(It, { heightOverrides: r, widthOverrides: T, children: [
1829
+ !W && /* @__PURE__ */ e(vt, {}),
1830
+ W && c && /* @__PURE__ */ e(
1831
+ gt,
1868
1832
  {
1869
- analyticsMetadata: fe,
1870
- clientColorScheme: r,
1871
- onCardClick: p,
1872
- posthog: f,
1873
- widthOverrides: g
1833
+ analyticsMetadata: Ee,
1834
+ onCardClick: s,
1835
+ posthog: p,
1836
+ widthOverrides: T
1874
1837
  }
1875
1838
  ),
1876
- B && !!t.length && /* @__PURE__ */ e(
1877
- At,
1839
+ W && !!t.length && /* @__PURE__ */ e(
1840
+ mt,
1878
1841
  {
1879
1842
  allowSingleCardPeeking: i,
1880
- analyticsMetadata: fe,
1843
+ analyticsMetadata: Ee,
1881
1844
  beats: t,
1882
- clientColorScheme: r,
1883
- shouldApplyNewAnimation: h,
1884
- showCarouselControls: c,
1885
- variant: m ? F : void 0,
1886
- visibleCardsCount: z,
1887
- ...Q
1845
+ showCarouselControls: E,
1846
+ variant: d ? I : void 0,
1847
+ visibleCardsCount: m,
1848
+ ...J
1888
1849
  }
1889
1850
  ),
1890
- B && !t.length && y && /* @__PURE__ */ e(He, { clientColorScheme: r, ...q }),
1891
- B && !t.length && !y && /* @__PURE__ */ e(ke, { ...q })
1851
+ W && !t.length && /* @__PURE__ */ e(
1852
+ k,
1853
+ {
1854
+ sx: {
1855
+ alignItems: "center",
1856
+ height: r,
1857
+ width: T || "100%"
1858
+ },
1859
+ children: /* @__PURE__ */ e(
1860
+ k,
1861
+ {
1862
+ sx: {
1863
+ height: `calc(${ht[v]}px - 44px)`,
1864
+ width: _ ? `calc(${T}px - 32px)` : "100%"
1865
+ },
1866
+ children: O ? /* @__PURE__ */ e(Oe, { ...Y }) : /* @__PURE__ */ e(Te, { ...Y })
1867
+ }
1868
+ )
1869
+ }
1870
+ )
1892
1871
  ] }) });
1893
- }, ai = G(xt), Dt = ({
1872
+ }, Qt = P(yt), St = ({
1894
1873
  isActiveCard: i,
1895
1874
  ariaLabel: o,
1896
- clientColorScheme: t,
1897
- heightOverrides: r,
1898
- onCardClick: n,
1899
- posthog: l,
1900
- showIcon: a,
1901
- variant: d,
1902
- widthOverrides: p
1875
+ heightOverrides: t,
1876
+ onCardClick: l,
1877
+ posthog: n,
1878
+ showIcon: r,
1879
+ variant: a,
1880
+ widthOverrides: s
1903
1881
  }) => {
1904
- const _ = se(), { ref: C, inView: f } = Me({
1905
- threshold: Ve
1906
- }), { cardsCopy: h } = k(), { onEvent: m } = Y();
1907
- oe(() => {
1908
- f && (m(xe.ON_VIEW_MORE_VIEWED), l?.capture("viewed_insight", {
1882
+ const h = j(), { ref: f, inView: p } = me({
1883
+ threshold: Ae
1884
+ }), { cardsCopy: d } = V(), { onEvent: E } = z();
1885
+ te(() => {
1886
+ p && (E(ye.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
1909
1887
  template: "view_more_card"
1910
1888
  }));
1911
- }, [f]);
1889
+ }, [p]);
1912
1890
  const c = () => {
1913
- n && n(), m(M.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
1891
+ l && l(), E(S.ON_VIEW_MORE_CLICKED), n?.capture("clicked_insight", {
1914
1892
  template: "view_more_card"
1915
1893
  });
1916
1894
  };
1917
1895
  return /* @__PURE__ */ e(
1918
- re,
1896
+ X,
1919
1897
  {
1920
- actionText: h.micro_card_cta,
1898
+ actionText: d.micro_card_cta,
1921
1899
  ariaLabel: o,
1922
- description: h.view_more_card_description,
1923
- fontColors: { buttonColor: t?.primary_300 },
1924
- heightOverrides: r,
1925
- icon: /* @__PURE__ */ e(ft, { color: t?.primary_300 ?? _.palette.primary.main }),
1900
+ description: d.view_more_card_description,
1901
+ heightOverrides: t,
1902
+ icon: /* @__PURE__ */ e(rt, { color: h.palette.primary.main }),
1926
1903
  isActiveCard: i,
1927
1904
  onCardClick: c,
1928
- posthog: l,
1929
- ref: C,
1930
- showIcon: a,
1931
- title: h.view_more_card_title,
1932
- variant: d,
1933
- widthOverrides: p
1905
+ posthog: n,
1906
+ ref: f,
1907
+ showIcon: r,
1908
+ title: d.view_more_card_title,
1909
+ variant: a,
1910
+ widthOverrides: s
1934
1911
  }
1935
1912
  );
1936
- }, Lt = G(Dt);
1913
+ }, Mt = P(St);
1937
1914
  export {
1938
- ht as A,
1939
- vt as B,
1940
- Tt as C,
1941
- Et as I,
1942
- At as M,
1943
- li as N,
1944
- fe as T,
1945
- Lt as V,
1946
- ni as Z,
1947
- re as a,
1948
- ai as b,
1949
- ft as c,
1950
- gt as d,
1951
- De as e
1915
+ it as A,
1916
+ X as B,
1917
+ gt as C,
1918
+ ot as I,
1919
+ mt as M,
1920
+ jt as N,
1921
+ Ee as T,
1922
+ Mt as V,
1923
+ Xt as Z,
1924
+ pt as a,
1925
+ Qt as b,
1926
+ rt as c,
1927
+ st as d,
1928
+ Se as e
1952
1929
  };