@mx-cartographer/experiences 7.1.3-alpha.mm1 → 7.1.4-ram1-alpha-finstrong-credit-score-graph-check

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 (129) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{Account-DKy2na__.mjs → Account-CpRTVIHg.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CCOCsdoL.mjs → AccountDetailsContent-6aPMU6Hp.mjs} +10 -10
  4. package/dist/{AccountDetailsHeader-Ca9SPAjA.mjs → AccountDetailsHeader-BkUZYoV8.mjs} +8 -8
  5. package/dist/{AccountFields-DDAr5SEq.mjs → AccountFields-DOLjKu5l.mjs} +5 -5
  6. package/dist/{AccountListItem-CMes1Q7Z.mjs → AccountListItem-CTT5m4qx.mjs} +4 -4
  7. package/dist/{AccountStore-DYOG9MYj.mjs → AccountStore-DTfpr3h0.mjs} +60 -41
  8. package/dist/{Accounts-BNvFndCa.mjs → Accounts-D0BmvNxn.mjs} +1 -1
  9. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-D2Jcp-E-.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-DomNyubP.mjs} +3 -3
  11. package/dist/{CategoryStore-BCcpI3oJ.mjs → CategoryStore-C1IfDPCE.mjs} +1 -1
  12. package/dist/{CategoryUtil-BR3H5i6n.mjs → CategoryUtil-DUM8NuGO.mjs} +1 -1
  13. package/dist/{ConnectDrawer-CHG5Lv_B.mjs → ConnectDrawer--gJHyp-S.mjs} +9 -9
  14. package/dist/{ConnectionsDrawer-BeB6ab8V.mjs → ConnectionsDrawer-DabiwV9L.mjs} +3 -3
  15. package/dist/{CurrencyInput-CsCy7uaS.mjs → CurrencyInput-CC5cwVit.mjs} +1 -1
  16. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
  17. package/dist/{DebtsStore-BblTVTMD.mjs → DebtsStore-9aR2sTJQ.mjs} +1 -1
  18. package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
  19. package/dist/Drawer-BEtCk82g.mjs +163 -0
  20. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-Um-CDa4C.mjs} +3 -3
  21. package/dist/FinstrongStore-CC4SrBjA.mjs +436 -0
  22. package/dist/{GoalStore-CSsU4LR2.mjs → GoalStore-CiBKZvTg.mjs} +3 -3
  23. package/dist/{Help-B6dIcujh.mjs → Help-BZ8pIkkR.mjs} +2 -2
  24. package/dist/LineChart-CE3oLBQ0.mjs +566 -0
  25. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-DGaxy7oz.mjs} +10 -10
  26. package/dist/{ManageIncome-DqG75uQd.mjs → ManageIncome-BaNgfwr5.mjs} +63 -61
  27. package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-C3iV1FBR.mjs} +1 -1
  28. package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-LtXXgZ6H.mjs} +1 -1
  29. package/dist/{NetWorthStore-BbA7H83o.mjs → NetWorthStore-MnpP5KEc.mjs} +2 -2
  30. package/dist/{NotificationSettings-BRm_EJZV.mjs → NotificationSettings-Ckx8tgQj.mjs} +5 -5
  31. package/dist/{OriginalBalanceAction-CAaVbVMO.mjs → OriginalBalanceAction-CGZDUsCc.mjs} +3 -3
  32. package/dist/{RecurringSettings-B9l_Axnd.mjs → RecurringSettings-DE4T4yQy.mjs} +4 -4
  33. package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-CngsRZ3K.mjs} +45 -44
  34. package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4RVULF8.mjs} +1 -1
  35. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-BuJ03S9d.mjs} +16 -16
  36. package/dist/SpendingLegend-D24CEkL3.mjs +170 -0
  37. package/dist/{TransactionDetails-DPvvi4Iu.mjs → TransactionDetails-DRlrltGq.mjs} +11 -8
  38. package/dist/{TransactionStore-CBrJOY0H.mjs → TransactionStore-D8MKYDMb.mjs} +3 -3
  39. package/dist/{TrendsStore-DCYbpXPO.mjs → TrendsStore-DL3Vuh71.mjs} +14 -14
  40. package/dist/{User-BQUxBeZV.mjs → User-BthIKO4w.mjs} +2 -2
  41. package/dist/{WidgetContainer-BMWagbIl.mjs → WidgetContainer-DJA1bxLn.mjs} +12 -12
  42. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  43. package/dist/accounts/index.es.js +14 -14
  44. package/dist/accounts/stores/AccountStore.d.ts +4 -0
  45. package/dist/analytics/index.es.js +2 -2
  46. package/dist/budgets/index.es.js +12 -12
  47. package/dist/cashflow/index.es.js +383 -389
  48. package/dist/categories/index.es.js +2 -2
  49. package/dist/common/components/Select.d.ts +4 -2
  50. package/dist/common/components/charts/LineChart.d.ts +2 -0
  51. package/dist/common/components/charts/linechart/CustomMark.d.ts +2 -0
  52. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  53. package/dist/common/components/drawer/Footer.d.ts +17 -0
  54. package/dist/common/context/GlobalDataProvider.d.ts +0 -1
  55. package/dist/common/context/hooks.d.ts +0 -3
  56. package/dist/common/context/index.d.ts +1 -1
  57. package/dist/common/index.es.js +57 -58
  58. package/dist/common/types/Finstrong.d.ts +50 -0
  59. package/dist/common/types/index.d.ts +1 -1
  60. package/dist/common/types/localization/FinstrongCopy.d.ts +57 -1
  61. package/dist/dashboard/index.es.js +77 -79
  62. package/dist/debts/index.es.js +11 -11
  63. package/dist/{exportTransactionsToCSV-7bVS7KXf.mjs → exportTransactionsToCSV-XqdHNe2V.mjs} +2 -2
  64. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  65. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +2 -1
  66. package/dist/finstrong/components/CreditOverTimeGraph.d.ts +1 -0
  67. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  68. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  69. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  70. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  71. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  72. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  73. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  74. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +1 -1
  75. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  76. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  77. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  78. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  79. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  80. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  81. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  82. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  83. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  84. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  85. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  86. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  87. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  88. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  89. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  90. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  91. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  92. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +11 -0
  93. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  94. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  95. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  96. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  97. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  98. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  99. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  100. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  101. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  102. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  103. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  104. package/dist/finstrong/components/shared/TransactionList.d.ts +15 -0
  105. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  106. package/dist/finstrong/constants/index.d.ts +8 -0
  107. package/dist/finstrong/index.es.js +2899 -1017
  108. package/dist/finstrong/stores/FinstrongStore.d.ts +9 -1
  109. package/dist/finstrong/util/finstrongUtils.d.ts +65 -1
  110. package/dist/goals/index.es.js +54 -54
  111. package/dist/help/index.es.js +3 -3
  112. package/dist/hooks-CBST3rkm.mjs +74 -0
  113. package/dist/investments/index.es.js +4 -4
  114. package/dist/merchants/index.es.js +1 -1
  115. package/dist/networth/index.es.js +34 -34
  116. package/dist/notifications/index.es.js +4 -4
  117. package/dist/recurringtransactions/index.es.js +24 -24
  118. package/dist/settings/index.es.js +8 -8
  119. package/dist/spending/index.es.js +222 -373
  120. package/dist/transactions/index.es.js +15 -15
  121. package/dist/trends/index.es.js +451 -451
  122. package/dist/{useAccountDisplayName-BEorBm5u.mjs → useAccountDisplayName-DH1CuQ9R.mjs} +2 -2
  123. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-jdvS1ppf.mjs} +1 -1
  124. package/package.json +1 -1
  125. package/dist/Drawer-kEE73B87.mjs +0 -113
  126. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  127. package/dist/LineChart-D4GI7nVh.mjs +0 -541
  128. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
  129. package/dist/hooks-D6XlXHf4.mjs +0 -77
@@ -1,75 +1,75 @@
1
1
  import { jsx as e, jsxs as C, Fragment as Qe } from "react/jsx-runtime";
2
2
  import i from "react";
3
- import { observer as x } from "mobx-react-lite";
4
- import { Icon as ae, Text as Z, CategoryIcon as fe, P as U, H3 as xe, ChevronRightIcon as Je } from "@mxenabled/mxui";
5
- import O from "@mui/material/Box";
6
- import b from "@mui/material/Stack";
3
+ import { observer as v } from "mobx-react-lite";
4
+ import { Icon as ae, Text as Q, CategoryIcon as fe, P as X, H3 as xe, ChevronRightIcon as qe } from "@mxenabled/mxui";
5
+ import W from "@mui/material/Box";
6
+ import _ from "@mui/material/Stack";
7
7
  import me from "@mui/material/Button";
8
8
  import { addSeconds as ve } from "date-fns/addSeconds";
9
9
  import { differenceInCalendarMonths as pe } from "date-fns/differenceInCalendarMonths";
10
- import { a as et, g as tt, S as nt, L as Me } from "../TrendsStore-DCYbpXPO.mjs";
11
- import { T as Co } from "../TrendsStore-DCYbpXPO.mjs";
12
- import { i as ot, c as st, d as rt, e as at, f as it, h as ct, b as Ae, g as Re, j as De } from "../SpendingData-D5vsfYKo.mjs";
13
- import lt from "@mui/material/ToggleButton";
14
- import dt from "@mui/material/ToggleButtonGroup";
15
- import { u as A, m as P, g as H, b as J, h as ie, d as ce, w as ee, f as Te, q as ht, n as ut, a as gt } from "../hooks-D6XlXHf4.mjs";
10
+ import { a as Je, g as et, S as tt, L as Me } from "../TrendsStore-DL3Vuh71.mjs";
11
+ import { T as mo } from "../TrendsStore-DL3Vuh71.mjs";
12
+ import { i as nt, c as ot, d as st, e as rt, f as at, h as it, b as Ae, g as Re, j as De } from "../SpendingData-BuJ03S9d.mjs";
13
+ import ct from "@mui/material/ToggleButton";
14
+ import lt from "@mui/material/ToggleButtonGroup";
15
+ import { u as R, m as P, g as N, b as ee, h as ie, d as ce, v as te, f as Te, p as dt, a as ht } from "../hooks-CBST3rkm.mjs";
16
16
  import { u as $ } from "../useScreenSize-B6JyS_Lj.mjs";
17
- import { f as q, D as z } from "../Dialog-CWW597AF.mjs";
18
- import { DataGridPro as mt } from "@mui/x-data-grid-pro";
19
- import { C as pt } from "../CurrencyText-kyC1aseI.mjs";
20
- import { b as Ct } from "../Localization-2MODESHW.mjs";
17
+ import { f as q, a as z } from "../Dialog-BPTr3qHE.mjs";
18
+ import { DataGridPro as ut } from "@mui/x-data-grid-pro";
19
+ import { C as gt } from "../CurrencyText-kyC1aseI.mjs";
20
+ import { b as mt } from "../Localization-2MODESHW.mjs";
21
21
  import { H as Ie } from "../HeaderCell-DjuifqHJ.mjs";
22
- import { T as M, b as ft } from "../ViewMoreMicroCard-DTtQNV3D.mjs";
23
- import { A as _, W as ke } from "../WidgetContainer-BMWagbIl.mjs";
24
- import { c as Tt } from "../Category-CevNQ03n.mjs";
25
- import { a as Ne, T as He } from "../TransactionDetails-DPvvi4Iu.mjs";
26
- import { D as Ce } from "../Drawer-kEE73B87.mjs";
27
- import { L as Q } from "../Loader-DUaFpDGv.mjs";
22
+ import { T as A, b as pt } from "../ViewMoreMicroCard-DTtQNV3D.mjs";
23
+ import { A as y, W as ke } from "../WidgetContainer-DJA1bxLn.mjs";
24
+ import { c as Ct } from "../Category-CevNQ03n.mjs";
25
+ import { a as Ne, T as He } from "../TransactionDetails-DRlrltGq.mjs";
26
+ import { D as Ce } from "../Drawer-BEtCk82g.mjs";
27
+ import { L as J } from "../Loader-DUaFpDGv.mjs";
28
28
  import { useTheme as We } from "@mui/material/styles";
29
- import { L as ye } from "../LineChart-D4GI7nVh.mjs";
30
- import { M as yt } from "../MiniWidgetContainer-D0gfmbaF.mjs";
31
- import { subMonths as _t } from "date-fns";
32
- import { TrendingUp as bt, TrendingDown as St, MultilineChart as wt, ExpandLess as Dt, ExpandMore as It } from "@mxenabled/mx-icons";
33
- import { a as Et, f as X } from "../NumberFormatting-Buh7u8Oi.mjs";
34
- import { M as Lt } from "../MicroWidgetContainer-DpeqN9n3.mjs";
35
- import xt from "@mui/material/Collapse";
36
- import vt from "@mui/material/List";
37
- import Mt from "@mui/material/ListItem";
38
- import At from "@mui/material/ListItemButton";
39
- import Rt from "@mui/material/ListItemIcon";
40
- import kt from "@mui/material/ListItemText";
29
+ import { L as ye } from "../LineChart-CE3oLBQ0.mjs";
30
+ import { M as ft } from "../MiniWidgetContainer-LtXXgZ6H.mjs";
31
+ import { subMonths as Tt } from "date-fns";
32
+ import { TrendingUp as yt, TrendingDown as _t, MultilineChart as bt, ExpandLess as St, ExpandMore as wt } from "@mxenabled/mx-icons";
33
+ import { a as Dt, f as Z } from "../NumberFormatting-Buh7u8Oi.mjs";
34
+ import { M as It } from "../MicroWidgetContainer-C3iV1FBR.mjs";
35
+ import Et from "@mui/material/Collapse";
36
+ import Lt from "@mui/material/List";
37
+ import xt from "@mui/material/ListItem";
38
+ import vt from "@mui/material/ListItemButton";
39
+ import Mt from "@mui/material/ListItemIcon";
40
+ import At from "@mui/material/ListItemText";
41
41
  import Oe from "@mui/material/styles/useTheme";
42
- import Nt from "@mui/material/Divider";
43
- import { useTheme as Ht, Stack as Wt } from "@mui/material";
44
- import Ot from "@mui/material/Paper";
45
- import { b as Vt } from "../CategoryUtil-BR3H5i6n.mjs";
46
- import { E as Gt } from "../ExportCsvAction-sX8Rg4Ov.mjs";
47
- import { u as Bt } from "../useInsightsEnabled-DBpwEq10.mjs";
48
- import { E as zt } from "../EmptyState-DA_lfRBv.mjs";
49
- import { k as Pt } from "../ConnectDrawer-CHG5Lv_B.mjs";
42
+ import Rt from "@mui/material/Divider";
43
+ import { useTheme as kt, Stack as Nt } from "@mui/material";
44
+ import Ht from "@mui/material/Paper";
45
+ import { b as Wt } from "../CategoryUtil-DUM8NuGO.mjs";
46
+ import { E as Ot } from "../ExportCsvAction-Um-CDa4C.mjs";
47
+ import { u as Vt } from "../useInsightsEnabled-jdvS1ppf.mjs";
48
+ import { E as Gt } from "../EmptyState-DA_lfRBv.mjs";
49
+ import { l as Bt } from "../ConnectDrawer--gJHyp-S.mjs";
50
50
  const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
51
- dt,
51
+ lt,
52
52
  {
53
53
  exclusive: !0,
54
54
  onChange: o,
55
55
  orientation: "horizontal",
56
56
  value: t,
57
- children: ["Chart", "Table"].map((n) => /* @__PURE__ */ e(lt, { color: "primary", sx: { width: 56 }, value: n, children: n === "Chart" ? /* @__PURE__ */ e(ae, { name: "table_chart_view" }) : /* @__PURE__ */ e(ae, { name: "format_list_bulleted" }) }, n))
57
+ children: ["Chart", "Table"].map((n) => /* @__PURE__ */ e(ct, { color: "primary", sx: { width: 56 }, value: n, children: n === "Chart" ? /* @__PURE__ */ e(ae, { name: "table_chart_view" }) : /* @__PURE__ */ e(ae, { name: "format_list_bulleted" }) }, n))
58
58
  }
59
59
  ), Ge = ({ selectedDateRange: t, selectedCategoryGuid: o }) => {
60
- const { trends: n } = A(), { isMobile: s, isDesktop: r } = $(), { getCategoryName: l } = P(), d = i.useMemo(() => {
61
- const h = q(
60
+ const { trends: n } = R(), { isMobile: s, isDesktop: r } = $(), { getCategoryName: h } = P(), u = i.useMemo(() => {
61
+ const d = q(
62
62
  t.start,
63
63
  s ? z.MONTH_SHORT_YEAR : z.MONTH_YEAR
64
- ), c = q(
64
+ ), l = q(
65
65
  t.end,
66
66
  s ? z.MONTH_SHORT_YEAR : z.MONTH_YEAR
67
67
  );
68
- return `${h} - ${c}`;
68
+ return `${d} - ${l}`;
69
69
  }, [t, s]);
70
- return /* @__PURE__ */ C(O, { sx: { mr: 10, minWidth: "60%" }, children: [
70
+ return /* @__PURE__ */ C(W, { sx: { mr: 10, minWidth: "60%" }, children: [
71
71
  /* @__PURE__ */ e(
72
- Z,
72
+ Q,
73
73
  {
74
74
  display: "block",
75
75
  fontWeight: 700,
@@ -79,34 +79,34 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
79
79
  textOverflow: "unset"
80
80
  },
81
81
  variant: r ? "H3" : "Body",
82
- children: l(o) || n.sub_title
82
+ children: h(o) || n.sub_title
83
83
  }
84
84
  ),
85
- /* @__PURE__ */ e(Z, { variant: r ? "Body" : "Small", children: d })
85
+ /* @__PURE__ */ e(Q, { variant: r ? "Body" : "Small", children: u })
86
86
  ] });
87
- }, Ft = (t) => {
87
+ }, zt = (t) => {
88
88
  const o = t.row[t.field];
89
- return /* @__PURE__ */ e(b, { alignItems: "flex-end", tabIndex: t.tabIndex, children: /* @__PURE__ */ e(pt, { amount: o, variant: "Small" }) });
90
- }, Kt = ({ categoryGuid: t, topLevelCategoryGuid: o }) => {
91
- const { getCategoryName: n } = P(), { categories: s } = A(), r = s.default_categories[t]?.replace(/&/g, "&") ?? n(t);
92
- return /* @__PURE__ */ C(b, { alignItems: "center", direction: "row", justifyContent: "center", children: [
89
+ return /* @__PURE__ */ e(_, { alignItems: "flex-end", tabIndex: t.tabIndex, children: /* @__PURE__ */ e(gt, { amount: o, variant: "Small" }) });
90
+ }, Pt = ({ categoryGuid: t, topLevelCategoryGuid: o }) => {
91
+ const { getCategoryName: n } = P(), { categories: s } = R(), r = s.default_categories[t]?.replace(/&/g, "&") ?? n(t);
92
+ return /* @__PURE__ */ C(_, { alignItems: "center", direction: "row", justifyContent: "center", children: [
93
93
  /* @__PURE__ */ e(
94
- O,
94
+ W,
95
95
  {
96
- "aria-label": Ct(s.category_icon_label_aria, r),
96
+ "aria-label": mt(s.category_icon_label_aria, r),
97
97
  role: "img",
98
98
  children: /* @__PURE__ */ e(fe, { categoryGuid: o })
99
99
  }
100
100
  ),
101
- /* @__PURE__ */ e(Z, { sx: { ml: 12, pb: 6 }, variant: "Small", children: r })
101
+ /* @__PURE__ */ e(Q, { sx: { ml: 12, pb: 6 }, variant: "Small", children: r })
102
102
  ] });
103
- }, $t = (t) => /* @__PURE__ */ e(b, { alignItems: "center", direction: "row", height: "100%", width: "100%", children: /* @__PURE__ */ e(
104
- Kt,
103
+ }, Ft = (t) => /* @__PURE__ */ e(_, { alignItems: "center", direction: "row", height: "100%", width: "100%", children: /* @__PURE__ */ e(
104
+ Pt,
105
105
  {
106
106
  categoryGuid: t.row.category,
107
107
  topLevelCategoryGuid: t.row.top_level_category_guid
108
108
  }
109
- ) }), jt = (t, o) => {
109
+ ) }), Kt = (t, o) => {
110
110
  const n = [], s = new Date(t);
111
111
  for (; s <= o; ) {
112
112
  const r = q(s, z.MONTH);
@@ -119,180 +119,180 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
119
119
  selectedCategory: n,
120
120
  onClickRow: s,
121
121
  height: r = "100dvh",
122
- sx: l = {}
122
+ sx: h = {}
123
123
  }) => {
124
- const { onEvent: d } = H(), h = q(/* @__PURE__ */ new Date(), z.MONTH_SHORT), [c, u] = i.useState([
125
- { field: h, sort: "desc" }
126
- ]), f = i.useMemo(() => jt(o.start, o.end), [o]), g = [
124
+ const { onEvent: u } = N(), d = q(/* @__PURE__ */ new Date(), z.MONTH_SHORT), [l, m] = i.useState([
125
+ { field: d, sort: "desc" }
126
+ ]), f = i.useMemo(() => Kt(o.start, o.end), [o]), c = [
127
127
  {
128
128
  field: "category",
129
129
  flex: 1,
130
130
  headerName: "Category",
131
131
  minWidth: 175,
132
132
  renderHeader: Ie,
133
- renderCell: $t,
133
+ renderCell: Ft,
134
134
  sortable: !0,
135
135
  type: "string"
136
136
  },
137
137
  ...f.map(
138
- (m) => ({
139
- field: m,
138
+ (a) => ({
139
+ field: a,
140
140
  flex: 1,
141
- headerName: m,
141
+ headerName: a,
142
142
  minWidth: 100,
143
143
  renderHeader: Ie,
144
- renderCell: Ft,
144
+ renderCell: zt,
145
145
  align: "right",
146
146
  headerAlign: "right",
147
147
  sortable: !0,
148
148
  hideSortIcons: !1,
149
149
  type: "number",
150
- sortComparator: et
150
+ sortComparator: Je
151
151
  })
152
152
  )
153
- ], T = i.useMemo(() => {
154
- const m = t.filter(
155
- (p) => !ot(p) && !st(p)
156
- ), y = (n ? m.filter(
153
+ ], b = i.useMemo(() => {
154
+ const a = t.filter(
155
+ (p) => !nt(p) && !ot(p)
156
+ ), T = (n ? a.filter(
157
157
  (p) => p.category_guid === n || p.top_level_category_guid === n
158
- ) : m).reduce(
159
- (p, E) => {
160
- const { category_guid: w, top_level_category_guid: D, month: R, total: v, year: k } = E, N = n ? w : D;
161
- p[N] || (p[N] = {
162
- id: N,
163
- category: N,
158
+ ) : a).reduce(
159
+ (p, D) => {
160
+ const { category_guid: w, top_level_category_guid: I, month: k, total: E, year: O } = D, M = n ? w : I;
161
+ p[M] || (p[M] = {
162
+ id: M,
163
+ category: M,
164
164
  category_guid: w,
165
- top_level_category_guid: D
165
+ top_level_category_guid: I
166
166
  });
167
- const I = q(new Date(k, R - 1), z.MONTH_SHORT);
168
- return p[N][I] || (p[N][I] = 0), p[N][I] = p[N][I] + Math.abs(v), p;
167
+ const L = q(new Date(O, k - 1), z.MONTH_SHORT);
168
+ return p[M][L] || (p[M][L] = 0), p[M][L] = p[M][L] + Math.abs(E), p;
169
169
  },
170
170
  {}
171
171
  );
172
- return Object.values(y);
172
+ return Object.values(T);
173
173
  }, [t, n]);
174
- return /* @__PURE__ */ e(O, { sx: { height: r, width: "100%", overflowX: "auto", boxShadow: "none", ...l }, children: /* @__PURE__ */ e(
175
- mt,
174
+ return /* @__PURE__ */ e(W, { sx: { height: r, width: "100%", overflowX: "auto", boxShadow: "none", ...h }, children: /* @__PURE__ */ e(
175
+ ut,
176
176
  {
177
- columns: g,
177
+ columns: c,
178
178
  disableColumnFilter: !0,
179
179
  disableColumnMenu: !0,
180
180
  hideFooter: !0,
181
- initialState: { sorting: { sortModel: c } },
182
- onRowClick: (m) => {
183
- s?.(m.row.category), d(_.TRENDS_CLICK_LIST_ITEM, {
184
- ...M,
185
- listItem: Tt[m.row.category]
181
+ initialState: { sorting: { sortModel: l } },
182
+ onRowClick: (a) => {
183
+ s?.(a.row.category), u(y.TRENDS_CLICK_LIST_ITEM, {
184
+ ...A,
185
+ listItem: Ct[a.row.category]
186
186
  });
187
187
  },
188
- onSortModelChange: (m) => {
189
- u(m), d(_.TRENDS_CLICK_TABLE_SORT, M);
188
+ onSortModelChange: (a) => {
189
+ m(a), u(y.TRENDS_CLICK_TABLE_SORT, A);
190
190
  },
191
- rows: T,
191
+ rows: b,
192
192
  slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
193
- sortModel: c,
193
+ sortModel: l,
194
194
  sortingOrder: ["asc", "desc"]
195
195
  }
196
196
  ) });
197
- }, Yt = {
197
+ }, $t = {
198
198
  title: "Transaction List"
199
- }, Ut = ({
199
+ }, jt = ({
200
200
  categoryGuid: t,
201
201
  dateRange: o,
202
202
  isOpen: n,
203
203
  onClose: s
204
204
  }) => {
205
- const { onEvent: r } = H(), { selectedAccountGuids: l } = J(), { common: d } = A(), { setFilter: h, sortedTransactions: c } = ie(), [u, f] = i.useState(""), g = i.useMemo(
206
- () => c.find((m) => m.guid === u),
207
- [u, c]
205
+ const { onEvent: r } = N(), { selectedAccountGuids: h } = ee(), { common: u } = R(), { setFilter: d, sortedTransactions: l } = ie(), [m, f] = i.useState(""), c = i.useMemo(
206
+ () => l.find((a) => a.guid === m),
207
+ [m, l]
208
208
  );
209
209
  i.useEffect(() => {
210
- h({
211
- accounts: l,
210
+ d({
211
+ accounts: h,
212
212
  dateRange: o,
213
- custom: (m) => t === "" || t === m.category_guid || t === m.top_level_category_guid,
213
+ custom: (a) => t === "" || t === a.category_guid || t === a.top_level_category_guid,
214
214
  showSplits: !!t
215
215
  });
216
- }, [l, t, o]), i.useEffect(() => r(_.TRENDS_VIEW_TRANSACTIONS), []);
217
- const T = () => {
216
+ }, [h, t, o]), i.useEffect(() => r(y.TRENDS_VIEW_TRANSACTIONS), []);
217
+ const b = () => {
218
218
  f(""), s();
219
219
  };
220
220
  return /* @__PURE__ */ C(
221
221
  Ce,
222
222
  {
223
- ariaLabelClose: d.close_aria,
223
+ ariaLabelClose: u.close_aria,
224
224
  isOpen: n,
225
- onClose: T,
226
- title: Yt.title,
225
+ onClose: b,
226
+ title: $t.title,
227
227
  children: [
228
- g && /* @__PURE__ */ e(Ne, { transaction: g }),
229
- !g && /* @__PURE__ */ e(He, { onClick: f })
228
+ c && /* @__PURE__ */ e(Ne, { transaction: c }),
229
+ !c && /* @__PURE__ */ e(He, { onClick: f })
230
230
  ]
231
231
  }
232
232
  );
233
- }, Xt = x(Ut), Zt = ({ onBackClick: t, sx: o }) => {
234
- const { onEvent: n } = H(), { isDesktop: s, isTablet: r, isMobile: l } = $(), { visibleAccounts: d } = ce(), { loadMonthlyCategoryTotals: h, monthlyCategoryTotals: c, getCategoryName: u } = P(), { sortedTransactions: f } = ie(), { selectedDateRange: g, setSelectedDateRange: T } = ee(), { isCopyLoaded: m, isInitialized: a, selectedAccounts: y, setSelectedAccounts: p } = J(), { trends: E } = A(), [w, D] = i.useState(!1), [R, v] = i.useState(!1), [k, N] = i.useState("Chart"), [I, te] = i.useState(""), [ne, B] = i.useState(window.innerHeight), le = ne - (l ? 315 : 345);
233
+ }, Yt = v(jt), Ut = ({ onBackClick: t, sx: o }) => {
234
+ const { onEvent: n } = N(), { isDesktop: s, isTablet: r, isMobile: h } = $(), { visibleAccounts: u } = ce(), { loadMonthlyCategoryTotals: d, monthlyCategoryTotals: l, getCategoryName: m } = P(), { sortedTransactions: f } = ie(), { selectedDateRange: c, setSelectedDateRange: b } = te(), { isCopyLoaded: a, isInitialized: g, selectedAccounts: T, setSelectedAccounts: p } = ee(), { trends: D } = R(), [w, I] = i.useState(!1), [k, E] = i.useState(!1), [O, M] = i.useState("Chart"), [L, F] = i.useState(""), [G, le] = i.useState(window.innerHeight), j = G - (h ? 315 : 345);
235
235
  i.useEffect(() => {
236
- const S = () => B(window.innerHeight);
236
+ const S = () => le(window.innerHeight);
237
237
  return window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
238
238
  }, []), i.useEffect(() => {
239
- p(d);
240
- }, [d]), i.useEffect(() => {
241
- a && h(
242
- y,
243
- g.start,
244
- g.end
239
+ p(u);
240
+ }, [u]), i.useEffect(() => {
241
+ g && d(
242
+ T,
243
+ c.start,
244
+ c.end
245
245
  ).finally(() => {
246
- D(!0);
246
+ I(!0);
247
247
  });
248
- }, [a, y, g]);
249
- const F = i.useMemo(() => {
248
+ }, [g, T, c]);
249
+ const ne = i.useMemo(() => {
250
250
  if (!w) return { stackedDatasets: [], unstackedDatasets: [] };
251
- const S = tt(
252
- c,
253
- g.start,
254
- g.end
255
- ), W = I.length ? S.filter(
256
- (V) => V.top_level_category_guid === I || V.category_guid === I
257
- ) : rt(S);
251
+ const S = et(
252
+ l,
253
+ c.start,
254
+ c.end
255
+ ), H = L.length ? S.filter(
256
+ (B) => B.top_level_category_guid === L || B.category_guid === L
257
+ ) : st(S);
258
258
  return {
259
- stackedDatasets: W.filter(at),
260
- unstackedDatasets: W.filter(it)
259
+ stackedDatasets: H.filter(rt),
260
+ unstackedDatasets: H.filter(at)
261
261
  };
262
- }, [c, I, g]), de = (S, W) => {
263
- N(W ?? k), n(_.TRENDS_CLICK_TOGGLE_VIEW);
264
- }, K = (S) => {
265
- const W = ve(S?.[0], 1), V = S?.[1], ge = pe(V, W);
266
- T({ start: W, end: V }), n(_.TRENDS_CLICK_TIME_WINDOW, {
262
+ }, [l, L, c]), K = (S, H) => {
263
+ M(H ?? O), n(y.TRENDS_CLICK_TOGGLE_VIEW);
264
+ }, de = (S) => {
265
+ const H = ve(S?.[0], 1), B = S?.[1], ge = pe(B, H);
266
+ b({ start: H, end: B }), n(y.TRENDS_CLICK_TIME_WINDOW, {
267
267
  time_period: ge + "M"
268
268
  });
269
- }, he = () => {
270
- n(_.TRENDS_CLICK_FILTER);
271
- }, j = (S) => {
272
- te(S);
269
+ }, Y = () => {
270
+ n(y.TRENDS_CLICK_FILTER);
273
271
  }, oe = (S) => {
274
- te(S), n(_.TRENDS_CLICK_LEGEND, { category: u(S) });
275
- }, ue = (S) => {
276
- n(_.TRENDS_HOVER_LEGEND, { category: u(S) });
272
+ F(S);
273
+ }, he = (S) => {
274
+ F(S), n(y.TRENDS_CLICK_LEGEND, { category: m(S) });
277
275
  }, se = (S) => {
278
- n(_.TRENDS_HOVER_AREA, { category: S });
276
+ n(y.TRENDS_HOVER_LEGEND, { category: m(S) });
279
277
  }, re = (S) => {
280
- n(_.TRENDS_HOVER_POINT, { category: S });
278
+ n(y.TRENDS_HOVER_AREA, { category: S });
279
+ }, ue = (S) => {
280
+ n(y.TRENDS_HOVER_POINT, { category: S });
281
281
  };
282
- return !m || !a || !w ? /* @__PURE__ */ e(Q, {}) : /* @__PURE__ */ C(
282
+ return !a || !g || !w ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ C(
283
283
  ke,
284
284
  {
285
- accountOptions: d,
286
- calendarActions: { onRangeChanged: K },
287
- dateRange: g,
285
+ accountOptions: u,
286
+ calendarActions: { onRangeChanged: de },
287
+ dateRange: c,
288
288
  dateRangeVariant: "timeframebuttons",
289
- onAccountsFilterClick: he,
289
+ onAccountsFilterClick: Y,
290
290
  onBackClick: t,
291
291
  sx: o,
292
- title: E.title,
292
+ title: D.title,
293
293
  children: [
294
294
  /* @__PURE__ */ C(
295
- b,
295
+ _,
296
296
  {
297
297
  sx: {
298
298
  // eslint-disable-next-line no-nested-ternary
@@ -300,50 +300,50 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
300
300
  },
301
301
  children: [
302
302
  /* @__PURE__ */ C(
303
- b,
303
+ _,
304
304
  {
305
305
  flexDirection: "row",
306
306
  justifyContent: "space-between",
307
- sx: { pb: l ? 12 : 24, pt: l ? 24 : 48 },
307
+ sx: { pb: h ? 12 : 24, pt: h ? 24 : 48 },
308
308
  children: [
309
309
  /* @__PURE__ */ e(
310
310
  Ge,
311
311
  {
312
- selectedCategoryGuid: I,
313
- selectedDateRange: g
312
+ selectedCategoryGuid: L,
313
+ selectedDateRange: c
314
314
  }
315
315
  ),
316
- /* @__PURE__ */ e(Ve, { onTabChange: de, selectedTab: k })
316
+ /* @__PURE__ */ e(Ve, { onTabChange: K, selectedTab: O })
317
317
  ]
318
318
  }
319
319
  ),
320
- /* @__PURE__ */ C(b, { alignItems: "center", flexDirection: "row", width: "100%", children: [
321
- /* @__PURE__ */ e(O, { flexGrow: 1, children: I && /* @__PURE__ */ C(me, { onClick: () => te(""), sx: { p: 0, pr: 5 }, children: [
320
+ /* @__PURE__ */ C(_, { alignItems: "center", flexDirection: "row", width: "100%", children: [
321
+ /* @__PURE__ */ e(W, { flexGrow: 1, children: L && /* @__PURE__ */ C(me, { onClick: () => F(""), sx: { p: 0, pr: 5 }, children: [
322
322
  /* @__PURE__ */ e(ae, { name: "arrow_back" }),
323
- E.all_categories
323
+ D.all_categories
324
324
  ] }) }),
325
- /* @__PURE__ */ e(me, { onClick: () => v(!0), sx: { px: 5 }, children: `${E.view_transactions} (${f.length})` })
325
+ /* @__PURE__ */ e(me, { onClick: () => E(!0), sx: { px: 5 }, children: `${D.view_transactions} (${f.length})` })
326
326
  ] }),
327
- /* @__PURE__ */ C(O, { children: [
328
- k === "Chart" && /* @__PURE__ */ e(
329
- nt,
327
+ /* @__PURE__ */ C(W, { children: [
328
+ O === "Chart" && /* @__PURE__ */ e(
329
+ tt,
330
330
  {
331
- availableHeight: le,
332
- onClickLegend: oe,
333
- onHoverArea: se,
334
- onHoverLegend: ue,
335
- onHoverPoint: re,
336
- stackedDatasets: F.stackedDatasets,
337
- unstackedDatasets: F.unstackedDatasets
331
+ availableHeight: j,
332
+ onClickLegend: he,
333
+ onHoverArea: re,
334
+ onHoverLegend: se,
335
+ onHoverPoint: ue,
336
+ stackedDatasets: ne.stackedDatasets,
337
+ unstackedDatasets: ne.unstackedDatasets
338
338
  }
339
339
  ),
340
- k === "Table" && /* @__PURE__ */ e(
340
+ O === "Table" && /* @__PURE__ */ e(
341
341
  Be,
342
342
  {
343
- monthlyCategoryTotals: c,
344
- onClickRow: j,
345
- selectedCategory: I,
346
- selectedDateRange: g
343
+ monthlyCategoryTotals: l,
344
+ onClickRow: oe,
345
+ selectedCategory: L,
346
+ selectedDateRange: c
347
347
  }
348
348
  )
349
349
  ] })
@@ -351,19 +351,19 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
351
351
  }
352
352
  ),
353
353
  /* @__PURE__ */ e(
354
- Xt,
354
+ Yt,
355
355
  {
356
- categoryGuid: I,
357
- dateRange: g,
358
- isOpen: R,
359
- onClose: () => v(!1)
356
+ categoryGuid: L,
357
+ dateRange: c,
358
+ isOpen: k,
359
+ onClose: () => E(!1)
360
360
  }
361
361
  )
362
362
  ]
363
363
  }
364
364
  );
365
- }, lo = x(Zt), qt = () => {
366
- const t = We(), { monthlyCategoryTotals: o } = P(), { trends: n } = A(), s = ct(o);
365
+ }, io = v(Ut), Xt = () => {
366
+ const t = We(), { monthlyCategoryTotals: o } = P(), { trends: n } = R(), s = it(o);
367
367
  return /* @__PURE__ */ e(
368
368
  ye,
369
369
  {
@@ -380,37 +380,37 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
380
380
  valueFormatterString: "0,0"
381
381
  }
382
382
  );
383
- }, Qt = x(qt), Jt = ({ onPrimaryCtaClick: t, sx: o }) => {
384
- const { visibleAccounts: n } = ce(), { loadMonthlyCategoryTotals: s, monthlyTotalsLoaded: r } = P(), { isInitialized: l } = Te(), { trends: d } = A(), { isCopyLoaded: h, selectedAccounts: c, setSelectedAccounts: u } = J();
383
+ }, Zt = v(Xt), Qt = ({ onPrimaryCtaClick: t, sx: o }) => {
384
+ const { visibleAccounts: n } = ce(), { loadMonthlyCategoryTotals: s, monthlyTotalsLoaded: r } = P(), { isInitialized: h } = Te(), { trends: u } = R(), { isCopyLoaded: d, selectedAccounts: l, setSelectedAccounts: m } = ee();
385
385
  return i.useEffect(() => {
386
- u(n);
386
+ m(n);
387
387
  }, [n]), i.useEffect(() => {
388
- l && s(c).finally();
389
- }, [l, c]), !h || !l ? /* @__PURE__ */ e(Q, {}) : /* @__PURE__ */ e(
390
- yt,
388
+ h && s(l).finally();
389
+ }, [h, l]), !d || !h ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ e(
390
+ ft,
391
391
  {
392
392
  onPrimaryCtaClick: t,
393
- primaryCtaLabel: d.primary_cta,
394
- subTitle: d.sub_title,
393
+ primaryCtaLabel: u.primary_cta,
394
+ subTitle: u.sub_title,
395
395
  sx: o,
396
- title: d.mini_title,
397
- children: r ? /* @__PURE__ */ e(Qt, {}) : /* @__PURE__ */ e(Q, {})
396
+ title: u.mini_title,
397
+ children: r ? /* @__PURE__ */ e(Zt, {}) : /* @__PURE__ */ e(J, {})
398
398
  }
399
399
  );
400
- }, ho = x(Jt), en = 70, Ee = ({
400
+ }, co = v(Qt), qt = 70, Ee = ({
401
401
  title: t,
402
402
  totalAmount: o,
403
403
  transactionType: n,
404
404
  percentage: s,
405
405
  secondaryLabel: r,
406
- shouldDisplayPercentage: l
406
+ shouldDisplayPercentage: h
407
407
  }) => {
408
- const { availableWidth: d } = ht(), h = i.useRef(null), c = i.useRef(null), u = Et(Number(Math.abs(s)), {
408
+ const { availableWidth: u } = dt(), d = i.useRef(null), l = i.useRef(null), m = Dt(Number(Math.abs(s)), {
409
409
  style: "percent",
410
410
  minimumIntegerDigits: 1
411
- }), f = d === 288 && X(o, "0,0.00").length > 10 ? X(o, "0,0") : X(o, "0,0.00"), g = n === "spending" ? s > 0 : s >= 0, T = n === "spending" ? "error.main" : "success.main", m = n === "spending" ? "success.main" : "text.secondary", a = h?.current, y = c?.current, p = a && y ? a.scrollWidth > y.clientWidth - en : !1;
411
+ }), f = u === 288 && Z(o, "0,0.00").length > 10 ? Z(o, "0,0") : Z(o, "0,0.00"), c = n === "spending" ? s > 0 : s >= 0, b = n === "spending" ? "error.main" : "success.main", a = n === "spending" ? "success.main" : "text.secondary", g = d?.current, T = l?.current, p = g && T ? g.scrollWidth > T.clientWidth - qt : !1;
412
412
  return /* @__PURE__ */ C(
413
- b,
413
+ _,
414
414
  {
415
415
  sx: {
416
416
  border: 1,
@@ -423,7 +423,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
423
423
  },
424
424
  children: [
425
425
  /* @__PURE__ */ C(
426
- b,
426
+ _,
427
427
  {
428
428
  sx: {
429
429
  alignItems: "center",
@@ -431,18 +431,18 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
431
431
  justifyContent: "space-between"
432
432
  },
433
433
  children: [
434
- /* @__PURE__ */ e(U, { color: "text.secondary", variant: "caption", children: t }),
435
- l && /* @__PURE__ */ C(b, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
436
- g ? /* @__PURE__ */ e(bt, { size: 20, sx: { color: T } }) : /* @__PURE__ */ e(St, { size: 20, sx: { color: m } }),
434
+ /* @__PURE__ */ e(X, { color: "text.secondary", variant: "caption", children: t }),
435
+ h && /* @__PURE__ */ C(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
436
+ c ? /* @__PURE__ */ e(yt, { size: 20, sx: { color: b } }) : /* @__PURE__ */ e(_t, { size: 20, sx: { color: a } }),
437
437
  /* @__PURE__ */ e(
438
- U,
438
+ X,
439
439
  {
440
440
  sx: {
441
- color: g ? T : m,
441
+ color: c ? b : a,
442
442
  fontWeight: 600
443
443
  },
444
444
  variant: "body2",
445
- children: u
445
+ children: m
446
446
  }
447
447
  )
448
448
  ] })
@@ -450,9 +450,9 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
450
450
  }
451
451
  ),
452
452
  /* @__PURE__ */ C(
453
- b,
453
+ _,
454
454
  {
455
- ref: c,
455
+ ref: l,
456
456
  sx: {
457
457
  alignItems: "center",
458
458
  flexDirection: "row",
@@ -460,17 +460,17 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
460
460
  },
461
461
  children: [
462
462
  /* @__PURE__ */ e(
463
- O,
463
+ W,
464
464
  {
465
- ref: h,
465
+ ref: d,
466
466
  sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
467
467
  children: /* @__PURE__ */ e(xe, { children: f })
468
468
  }
469
469
  ),
470
- l && d >= 450 && !p && /* @__PURE__ */ e(
471
- U,
470
+ h && u >= 450 && !p && /* @__PURE__ */ e(
471
+ X,
472
472
  {
473
- color: g ? T : m,
473
+ color: c ? b : a,
474
474
  variant: "caption",
475
475
  children: r
476
476
  }
@@ -481,50 +481,50 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
481
481
  ]
482
482
  }
483
483
  );
484
- }, tn = x(() => {
485
- const { trends: t } = A();
486
- return /* @__PURE__ */ C(b, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
487
- /* @__PURE__ */ e(wt, { size: 32 }),
488
- /* @__PURE__ */ C(b, { children: [
489
- /* @__PURE__ */ e(U, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
490
- /* @__PURE__ */ e(U, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
484
+ }, Jt = v(() => {
485
+ const { trends: t } = R();
486
+ return /* @__PURE__ */ C(_, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
487
+ /* @__PURE__ */ e(bt, { size: 32 }),
488
+ /* @__PURE__ */ C(_, { children: [
489
+ /* @__PURE__ */ e(X, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
490
+ /* @__PURE__ */ e(X, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
491
491
  ] })
492
492
  ] });
493
- }), uo = x(({ onCtaClick: t }) => {
494
- const { visibleAccounts: o } = ce(), { onEvent: n } = H(), { monthlyCategoryTotals: s, loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: l } = P(), d = {
495
- start: _t(/* @__PURE__ */ new Date(), 1),
493
+ }), lo = v(({ onCtaClick: t }) => {
494
+ const { visibleAccounts: o } = ce(), { onEvent: n } = N(), { monthlyCategoryTotals: s, loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: h } = P(), u = {
495
+ start: Tt(/* @__PURE__ */ new Date(), 1),
496
496
  end: /* @__PURE__ */ new Date()
497
- }, { trends: h } = A(), { selectedAccounts: c, setSelectedAccounts: u, isInitialized: f } = J();
497
+ }, { trends: d } = R(), { selectedAccounts: l, setSelectedAccounts: m, isInitialized: f } = ee();
498
498
  i.useEffect(() => {
499
- u(o);
499
+ m(o);
500
500
  }, [o]), i.useEffect(() => {
501
- f && r(c, d.start).then(() => {
502
- n(_.TRENDS_LOAD_WIDGET, {
501
+ f && r(l, u.start).then(() => {
502
+ n(y.TRENDS_LOAD_WIDGET, {
503
503
  state: o?.length ? "default" : "zeroState"
504
504
  });
505
505
  });
506
- }, [f, c]);
507
- const { spendingData: g, incomeData: T } = i.useMemo(
506
+ }, [f, l]);
507
+ const { spendingData: c, incomeData: b } = i.useMemo(
508
508
  () => ({
509
- spendingData: Ae(s, d),
510
- incomeData: Re(s, d)
509
+ spendingData: Ae(s, u),
510
+ incomeData: Re(s, u)
511
511
  }),
512
- [s, d]
513
- ), [m, a] = g, [y, p] = T, E = De(a.y, m.y), w = De(p.y, y.y), D = f && !o?.length, R = () => {
512
+ [s, u]
513
+ ), [a, g] = c, [T, p] = b, D = De(g.y, a.y), w = De(p.y, T.y), I = f && !o?.length, k = () => {
514
514
  n(
515
- D ? _.TRENDS_CLICK_GET_STARTED : _.TRENDS_CLICK_VIEW_MORE
515
+ I ? y.TRENDS_CLICK_GET_STARTED : y.TRENDS_CLICK_VIEW_MORE
516
516
  ), t();
517
517
  };
518
- return !l || !f ? /* @__PURE__ */ e(Q, {}) : /* @__PURE__ */ e(
519
- Lt,
518
+ return !h || !f ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ e(
519
+ It,
520
520
  {
521
521
  className: "mx-trends-microwidget",
522
- ctaLabel: h.micro_primary_cta_label,
523
- onCTAClick: R,
524
- subHeader: D ? void 0 : h.micro_subheader,
525
- title: h.title,
526
- children: D ? /* @__PURE__ */ e(tn, {}) : /* @__PURE__ */ C(
527
- b,
522
+ ctaLabel: d.micro_primary_cta_label,
523
+ onCTAClick: k,
524
+ subHeader: I ? void 0 : d.micro_subheader,
525
+ title: d.title,
526
+ children: I ? /* @__PURE__ */ e(Jt, {}) : /* @__PURE__ */ C(
527
+ _,
528
528
  {
529
529
  sx: {
530
530
  alignItems: "stretch",
@@ -535,11 +535,11 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
535
535
  /* @__PURE__ */ e(
536
536
  Ee,
537
537
  {
538
- percentage: E,
539
- secondaryLabel: h.micro_secondary_label,
540
- shouldDisplayPercentage: a.y !== 0 && m.y !== 0,
541
- title: h.spending_label,
542
- totalAmount: a.y,
538
+ percentage: D,
539
+ secondaryLabel: d.micro_secondary_label,
540
+ shouldDisplayPercentage: g.y !== 0 && a.y !== 0,
541
+ title: d.spending_label,
542
+ totalAmount: g.y,
543
543
  transactionType: "spending"
544
544
  }
545
545
  ),
@@ -547,9 +547,9 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
547
547
  Ee,
548
548
  {
549
549
  percentage: w,
550
- secondaryLabel: h.micro_secondary_label,
551
- shouldDisplayPercentage: p.y !== 0 && y.y !== 0,
552
- title: h.income_label,
550
+ secondaryLabel: d.micro_secondary_label,
551
+ shouldDisplayPercentage: p.y !== 0 && T.y !== 0,
552
+ title: d.income_label,
553
553
  totalAmount: p.y,
554
554
  transactionType: "income"
555
555
  }
@@ -559,17 +559,17 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
559
559
  )
560
560
  }
561
561
  );
562
- }), nn = x(
562
+ }), en = v(
563
563
  ({ isExpanded: t, onClick: o }) => {
564
564
  const n = Oe();
565
- return /* @__PURE__ */ e(Mt, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(At, { onClick: o, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
566
- b,
565
+ return /* @__PURE__ */ e(xt, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(vt, { onClick: o, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
566
+ _,
567
567
  {
568
568
  sx: { color: n.palette.primary.main, flexDirection: "row", alignItems: "center" },
569
569
  children: [
570
- /* @__PURE__ */ e(kt, { children: /* @__PURE__ */ e(Z, { bold: !0, variant: "body2", children: t ? "View less" : "View more" }) }),
571
- /* @__PURE__ */ e(Rt, { sx: { color: n.palette.primary.main }, children: t ? /* @__PURE__ */ e(Dt, {}) : /* @__PURE__ */ e(
572
- It,
570
+ /* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(Q, { bold: !0, variant: "body2", children: t ? "View less" : "View more" }) }),
571
+ /* @__PURE__ */ e(Mt, { sx: { color: n.palette.primary.main }, children: t ? /* @__PURE__ */ e(St, {}) : /* @__PURE__ */ e(
572
+ wt,
573
573
  {
574
574
  sx: {
575
575
  transition: "transform 0.3s ease-in-out",
@@ -581,19 +581,19 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
581
581
  }
582
582
  ) }) });
583
583
  }
584
- ), Le = x(
584
+ ), Le = v(
585
585
  ({
586
586
  totalAmount: t,
587
587
  guid: o,
588
588
  name: n,
589
589
  transactions: s,
590
590
  onClick: r,
591
- isLastItem: l = !1,
592
- showDivider: d = !0
591
+ isLastItem: h = !1,
592
+ showDivider: u = !0
593
593
  }) => {
594
- const { trends: h } = A(), { onEvent: c } = H(), u = `${s.length} ${s.length === 1 ? h.transaction : h.transactions}`, f = () => {
595
- r?.(), c(_.TRENDS_CLICK_LIST_ITEM, {
596
- ...M,
594
+ const { trends: d } = R(), { onEvent: l } = N(), m = `${s.length} ${s.length === 1 ? d.transaction : d.transactions}`, f = () => {
595
+ r?.(), l(y.TRENDS_CLICK_LIST_ITEM, {
596
+ ...A,
597
597
  listItem: n
598
598
  });
599
599
  };
@@ -603,93 +603,93 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
603
603
  {
604
604
  leftIcon: o ? /* @__PURE__ */ e(fe, { categoryGuid: o }) : void 0,
605
605
  onClick: f,
606
- rightContent: X(Math.abs(t), "0,0.00"),
607
- rightIcon: r ? /* @__PURE__ */ e(Je, {}) : void 0,
608
- subtitle: u,
606
+ rightContent: Z(Math.abs(t), "0,0.00"),
607
+ rightIcon: r ? /* @__PURE__ */ e(qe, {}) : void 0,
608
+ subtitle: m,
609
609
  title: n
610
610
  }
611
611
  ),
612
- d && /* @__PURE__ */ e(Nt, { sx: { ml: l ? 24 : 68 } })
612
+ u && /* @__PURE__ */ e(Rt, { sx: { ml: h ? 24 : 68 } })
613
613
  ] }, o);
614
614
  }
615
- ), on = x(
615
+ ), tn = v(
616
616
  ({ availableHeight: t = 0, onCategoryClick: o }) => {
617
- const { collapsedCategories: n, visibleCategories: s, setVisibleListLength: r } = ee(), { isLargeDesktop: l, isDesktop: d } = $(), { trends: h } = A(), { onEvent: c } = H(), [u, f] = i.useState(!1), g = d || l;
617
+ const { collapsedCategories: n, visibleCategories: s, setVisibleListLength: r } = te(), { isLargeDesktop: h, isDesktop: u } = $(), { trends: d } = R(), { onEvent: l } = N(), [m, f] = i.useState(!1), c = u || h;
618
618
  i.useEffect(() => {
619
- const a = Math.floor(t / 64) - 1, y = s.length + n.length;
620
- a !== s.length && (r(g ? Math.max(a, 5) : 5), f(a >= y));
619
+ const g = Math.floor(t / 64) - 1, T = s.length + n.length;
620
+ g !== s.length && (r(c ? Math.max(g, 5) : 5), f(g >= T));
621
621
  }, [t]);
622
- const T = () => {
623
- f(!u), c(_.TRENDS_CLICK_VIEW_MORE, {
624
- ...M
622
+ const b = () => {
623
+ f(!m), l(y.TRENDS_CLICK_VIEW_MORE, {
624
+ ...A
625
625
  });
626
- }, m = s.length + (u ? n.length : 0);
627
- return /* @__PURE__ */ e(b, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ C(vt, { children: [
628
- /* @__PURE__ */ e(b, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(xe, { children: h.categories }) }),
629
- s.map((a, y) => /* @__PURE__ */ e(
626
+ }, a = s.length + (m ? n.length : 0);
627
+ return /* @__PURE__ */ e(_, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ C(Lt, { children: [
628
+ /* @__PURE__ */ e(_, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(xe, { children: d.categories }) }),
629
+ s.map((g, T) => /* @__PURE__ */ e(
630
630
  Le,
631
631
  {
632
- ...a,
633
- isLastItem: y === m - 1,
634
- onClick: a.transactions.length > 0 ? () => o(a) : void 0,
632
+ ...g,
633
+ isLastItem: T === a - 1,
634
+ onClick: g.transactions.length > 0 ? () => o(g) : void 0,
635
635
  showDivider: !0
636
636
  },
637
- a.guid
637
+ g.guid
638
638
  )),
639
639
  /* @__PURE__ */ e(
640
- xt,
640
+ Et,
641
641
  {
642
- in: u,
642
+ in: m,
643
643
  sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
644
- children: n.map((a, y) => {
645
- const p = s.length + y;
644
+ children: n.map((g, T) => {
645
+ const p = s.length + T;
646
646
  return /* @__PURE__ */ e(
647
647
  Le,
648
648
  {
649
- ...a,
650
- isLastItem: p === m - 1,
651
- onClick: a.transactions.length > 0 ? () => o(a) : void 0,
649
+ ...g,
650
+ isLastItem: p === a - 1,
651
+ onClick: g.transactions.length > 0 ? () => o(g) : void 0,
652
652
  showDivider: !0
653
653
  },
654
- a.guid
654
+ g.guid
655
655
  );
656
656
  })
657
657
  }
658
658
  ),
659
- n.length > 0 && /* @__PURE__ */ e(nn, { isExpanded: u, onClick: T })
659
+ n.length > 0 && /* @__PURE__ */ e(en, { isExpanded: m, onClick: b })
660
660
  ] }) });
661
661
  }
662
- ), sn = ({ beats: t, onInsightCardClick: o }) => {
663
- const n = Ht(), { onEvent: s } = H(), { isMobile: r, isDesktop: l, isLargeDesktop: d } = $(), { beatStore: h, endpoint: c, sessionToken: u } = Te(), f = n.palette.mode === "dark", g = l || d, T = g || r ? 1 : 2, m = () => null, a = (R) => {
664
- o?.(R), s(_.TRENDS_CLICK_INSIGHT, M);
665
- }, y = g ? 200 : 170, p = g ? 170 : 124, E = g ? 56 : 0, w = t.length > 0 ? y + E : p, D = g && t.length > 0 ? y : void 0;
666
- return /* @__PURE__ */ e(Wt, { sx: { height: w }, children: /* @__PURE__ */ e(
667
- ft,
662
+ ), nn = ({ beats: t, onInsightCardClick: o }) => {
663
+ const n = kt(), { onEvent: s } = N(), { isMobile: r, isDesktop: h, isLargeDesktop: u } = $(), { beatStore: d, endpoint: l, sessionToken: m } = Te(), f = n.palette.mode === "dark", c = h || u, b = c || r ? 1 : 2, a = () => null, g = (k) => {
664
+ o?.(k), s(y.TRENDS_CLICK_INSIGHT, A);
665
+ }, T = c ? 200 : 170, p = c ? 170 : 124, D = c ? 56 : 0, w = t.length > 0 ? T + D : p, I = c && t.length > 0 ? T : void 0;
666
+ return /* @__PURE__ */ e(Nt, { sx: { height: w }, children: /* @__PURE__ */ e(
667
+ pt,
668
668
  {
669
- areBeatsLoading: h.isLoading,
669
+ areBeatsLoading: d.isLoading,
670
670
  beats: t,
671
- endpoint: c,
672
- heightOverrides: D,
673
- logOutUser: m,
674
- onCardClick: a,
671
+ endpoint: l,
672
+ heightOverrides: I,
673
+ logOutUser: a,
674
+ onCardClick: g,
675
675
  showBorder: !0,
676
676
  showCTAColocatedWithText: !1,
677
677
  showCarouselControls: !0,
678
- showHeader: g,
678
+ showHeader: c,
679
679
  showIcon: !0,
680
680
  showWithMargin: !1,
681
- token: u,
681
+ token: m,
682
682
  useDarkMode: f,
683
683
  userHasFullInsightFeedBeats: !1,
684
684
  variant: "outlined",
685
- visibleCardsCount: T
685
+ visibleCardsCount: b
686
686
  }
687
687
  ) });
688
- }, rn = x(sn), an = x(({ chartLabel: t, chartColor: o }) => {
689
- const { onEvent: n } = H(), {
688
+ }, on = v(nn), sn = v(({ chartLabel: t, chartColor: o }) => {
689
+ const { onEvent: n } = N(), {
690
690
  categoryDetailsChartData: { monthlyAmounts: s, tooltipLabels: r }
691
- } = ee();
692
- return /* @__PURE__ */ e(b, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
691
+ } = te();
692
+ return /* @__PURE__ */ e(_, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
693
693
  ye,
694
694
  {
695
695
  baseline: "min",
@@ -703,7 +703,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
703
703
  stroke: o
704
704
  }),
705
705
  onItemClick: () => {
706
- n(_.TRENDS_CLICK_CHART, M);
706
+ n(y.TRENDS_CLICK_CHART, A);
707
707
  },
708
708
  showArea: !0,
709
709
  showAverage: !0,
@@ -718,49 +718,49 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
718
718
  valueFormatterString: "0,0"
719
719
  }
720
720
  ) });
721
- }), cn = x(({ onClose: t }) => {
722
- const o = Oe(), { onEvent: n } = H(), { common: s, trends: r } = A(), { selectedCategoryData: l, selectedDateRangeMonthRange: d } = ee(), { sortedTransactions: h } = ie(), [c, u] = i.useState(null);
723
- if (!l)
721
+ }), rn = v(({ onClose: t }) => {
722
+ const o = Oe(), { onEvent: n } = N(), { common: s, trends: r } = R(), { selectedCategoryData: h, selectedDateRangeMonthRange: u } = te(), { sortedTransactions: d } = ie(), [l, m] = i.useState(null);
723
+ if (!h)
724
724
  return null;
725
- const { guid: f, name: g, is_income: T, totalAmount: m } = l, a = T ? r.category_income : r.category_spending, y = Vt(f, o), p = T ? r.income_label : r.spending_label, E = ` ${l.transactions.length === 1 ? r.transaction : r.transactions} (${l.transactions.length})`, w = i.useMemo(
726
- () => h.find((v) => v.guid === c),
727
- [c, h]
728
- ), D = (v) => v.category_guid === f || v.top_level_category_guid === f, R = () => {
729
- t?.(), n(_.TRENDS_CLICK_BACK, M);
725
+ const { guid: f, name: c, is_income: b, totalAmount: a } = h, g = b ? r.category_income : r.category_spending, T = Wt(f, o), p = b ? r.income_label : r.spending_label, D = ` ${h.transactions.length === 1 ? r.transaction : r.transactions} (${h.transactions.length})`, w = i.useMemo(
726
+ () => d.find((E) => E.guid === l),
727
+ [l, d]
728
+ ), I = (E) => E.category_guid === f || E.top_level_category_guid === f, k = () => {
729
+ t?.(), n(y.TRENDS_CLICK_BACK, A);
730
730
  };
731
731
  return /* @__PURE__ */ C(
732
732
  Ce,
733
733
  {
734
734
  ariaLabelClose: r.close_category_details,
735
735
  isOpen: !0,
736
- onClose: R,
736
+ onClose: k,
737
737
  shouldShowHeaderShadow: !0,
738
- title: a,
738
+ title: g,
739
739
  children: [
740
- /* @__PURE__ */ C(b, { sx: { alignItems: "center", height: "100%" }, children: [
741
- /* @__PURE__ */ C(Ot, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
740
+ /* @__PURE__ */ C(_, { sx: { alignItems: "center", height: "100%" }, children: [
741
+ /* @__PURE__ */ C(Ht, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
742
742
  /* @__PURE__ */ e(
743
743
  Me,
744
744
  {
745
745
  leftIcon: /* @__PURE__ */ e(fe, { categoryGuid: f }),
746
- rightContent: X(Math.abs(m), "0,0.00"),
747
- subtitle: d,
748
- title: g
746
+ rightContent: Z(Math.abs(a), "0,0.00"),
747
+ subtitle: u,
748
+ title: c
749
749
  }
750
750
  ),
751
- /* @__PURE__ */ e(an, { chartColor: y, chartLabel: p }),
752
- /* @__PURE__ */ C(b, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
753
- /* @__PURE__ */ e(Z, { bold: !0, variant: "body1", children: E }),
754
- /* @__PURE__ */ e(Gt, { filter: D })
751
+ /* @__PURE__ */ e(sn, { chartColor: T, chartLabel: p }),
752
+ /* @__PURE__ */ C(_, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
753
+ /* @__PURE__ */ e(Q, { bold: !0, variant: "body1", children: D }),
754
+ /* @__PURE__ */ e(Ot, { filter: I })
755
755
  ] })
756
756
  ] }),
757
757
  /* @__PURE__ */ e(
758
758
  He,
759
759
  {
760
760
  bgcolor: "transparent",
761
- filter: D,
761
+ filter: I,
762
762
  height: "calc(100vh - 475px)",
763
- onClick: u
763
+ onClick: m
764
764
  }
765
765
  )
766
766
  ] }),
@@ -769,7 +769,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
769
769
  {
770
770
  ariaLabelClose: s.close_aria,
771
771
  isOpen: !!w,
772
- onClose: () => u(""),
772
+ onClose: () => m(""),
773
773
  title: r.transaction,
774
774
  children: w && /* @__PURE__ */ e(Ne, { transaction: w })
775
775
  }
@@ -777,41 +777,41 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
777
777
  ]
778
778
  }
779
779
  );
780
- }), ln = (t, o) => {
780
+ }), an = (t, o) => {
781
781
  const n = Re(t, o), s = Ae(t, o);
782
782
  return [n, s].filter((r) => r.length > 0);
783
- }, dn = (t, o) => {
784
- const [n, s] = t, r = n, l = s ?? n, d = [];
783
+ }, cn = (t, o) => {
784
+ const [n, s] = t, r = n, h = s ?? n, u = [];
785
785
  if (r) {
786
- const h = r.reduce((c, u) => c + u.y, 0);
787
- d.push({ label: o.income_label, amount: h });
786
+ const d = r.reduce((l, m) => l + m.y, 0);
787
+ u.push({ label: o.income_label, amount: d });
788
788
  }
789
- if (l) {
790
- const h = l.reduce((c, u) => c + u.y, 0);
791
- d.push({ label: o.spending_label, amount: h });
789
+ if (h) {
790
+ const d = h.reduce((l, m) => l + m.y, 0);
791
+ u.push({ label: o.spending_label, amount: d });
792
792
  }
793
- return d;
794
- }, hn = ({
793
+ return u;
794
+ }, ln = ({
795
795
  availableHeight: t = 0,
796
796
  minHeight: o = 500,
797
797
  selectedDateRange: n,
798
798
  totals: s
799
799
  }) => {
800
- const r = We(), { onEvent: l } = H(), { trends: d } = A(), { isSmallMobile: h, isMobile: c, isSmallTablet: u, isTablet: f } = $(), g = [r.palette.chart?.chart1, r.palette.chart?.chart2], T = ln(s, n), m = dn(T, d), [a, y] = i.useState(0), p = 458, E = 195, w = 56, D = c || h ? E : u || f ? p : a;
800
+ const r = We(), { onEvent: h } = N(), { trends: u } = R(), { isSmallMobile: d, isMobile: l, isSmallTablet: m, isTablet: f } = $(), c = [r.palette.chart?.chart1, r.palette.chart?.chart2], b = an(s, n), a = cn(b, u), [g, T] = i.useState(0), p = 458, D = 195, w = 56, I = l || d ? D : m || f ? p : g;
801
801
  return i.useEffect(() => {
802
- const v = Math.max(t - w, o);
803
- y(v);
802
+ const E = Math.max(t - w, o);
803
+ T(E);
804
804
  }, [t]), /* @__PURE__ */ e(
805
805
  ye,
806
806
  {
807
807
  baseline: "min",
808
- colors: g,
808
+ colors: c,
809
809
  curveType: "bump",
810
- datasets: T,
811
- height: D,
812
- labels: m,
810
+ datasets: b,
811
+ height: I,
812
+ labels: a,
813
813
  onItemClick: () => {
814
- l(_.TRENDS_CLICK_CHART, M);
814
+ h(y.TRENDS_CLICK_CHART, A);
815
815
  },
816
816
  showArea: !0,
817
817
  showAxisHighlight: !0,
@@ -824,7 +824,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
824
824
  valueFormatterString: "0.0a"
825
825
  }
826
826
  );
827
- }, un = x(hn), gn = [
827
+ }, dn = v(ln), hn = [
828
828
  "BillAmountNotStandard",
829
829
  "CategorySpendingV2",
830
830
  "CostOfLivingToIncome",
@@ -858,192 +858,192 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
858
858
  "WeeklyNewMerchantsV2",
859
859
  "WeeklyNoSpendDays",
860
860
  "WeeklySmallPurchasesSummary"
861
- ], mn = ({ onBackClick: t, onInsightCardClick: o, sx: n }) => {
862
- const { onEvent: s } = H(), { onLoad: r } = ut(), { config: l } = gt(), { isLargeDesktop: d, isDesktop: h, isMobile: c } = $(), { visibleAccounts: u } = ce(), { loadDateRangeCategoryTotals: f, loadMonthlyCategoryTotals: g, monthlyCategoryTotals: T } = P(), { setFilter: m } = ie(), { selectedDateRange: a, setSelectedCategoryData: y, setSelectedDateRange: p } = ee(), {
863
- isCopyLoaded: E,
864
- isInitialized: w,
865
- selectedAccounts: D,
866
- selectedAccountGuids: R,
867
- setSelectedAccounts: v
868
- } = J(), { trends: k, connect: N } = A(), { beatStore: I } = Te(), ne = Bt() && l.show_insights_widget_in_master, B = h || d, [_e, le] = i.useState(!1), [F, de] = i.useState(!1), [K, he] = i.useState("Chart"), [j, oe] = i.useState(""), [ue, se] = i.useState(!1), [re, S] = i.useState(window.innerHeight), W = B ? 56 : 0, V = re - 208, ge = re - (ne ? 550 + W : 266), [ze, be] = i.useState(!1), Pe = l.show_connections_widget_in_master ? "buttons" : "no-buttons", Se = i.useMemo(
869
- () => u && u.length === 0 || T.length === 0,
870
- [u, T]
861
+ ], un = ({ onBackClick: t, onInsightCardClick: o, sx: n }) => {
862
+ const { onEvent: s } = N(), { config: r } = ht(), { isLargeDesktop: h, isDesktop: u, isMobile: d } = $(), { visibleAccounts: l } = ce(), { loadDateRangeCategoryTotals: m, loadMonthlyCategoryTotals: f, monthlyCategoryTotals: c } = P(), { setFilter: b } = ie(), { selectedDateRange: a, setSelectedCategoryData: g, setSelectedDateRange: T } = te(), {
863
+ isCopyLoaded: p,
864
+ isInitialized: D,
865
+ selectedAccounts: w,
866
+ selectedAccountGuids: I,
867
+ setSelectedAccounts: k
868
+ } = ee(), { trends: E, connect: O } = R(), { beatStore: M } = Te(), F = Vt() && r.show_insights_widget_in_master, G = u || h, [le, _e] = i.useState(!1), [j, ne] = i.useState(!1), [K, de] = i.useState("Chart"), [Y, oe] = i.useState(""), [he, se] = i.useState(!1), [re, ue] = i.useState(window.innerHeight), S = G ? 56 : 0, H = re - 208, B = re - (F ? 550 + S : 266), [ge, be] = i.useState(!1), ze = r.show_connections_widget_in_master ? "buttons" : "no-buttons", Se = i.useMemo(
869
+ () => l && l.length === 0 || c.length === 0,
870
+ [l, c]
871
871
  );
872
872
  i.useEffect(() => {
873
- w && I.loadBeats().finally(() => de(!0));
874
- }, [w]);
875
- const we = i.useMemo(() => F ? I.getFilteredBeats({ templates: gn }) : [], [F]);
873
+ D && M.loadBeats().finally(() => ne(!0));
874
+ }, [D]);
875
+ const we = i.useMemo(() => j ? M.getFilteredBeats({ templates: hn }) : [], [j]);
876
876
  i.useEffect(() => {
877
- const L = () => S(window.innerHeight);
878
- return window.addEventListener("resize", L), () => window.removeEventListener("resize", L);
877
+ const x = () => ue(window.innerHeight);
878
+ return window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
879
879
  }, []), i.useEffect(() => {
880
- v(u);
881
- }, [u]), i.useEffect(() => {
882
- w && f(D, a.start, a.end).then(() => {
883
- g(
884
- D,
880
+ k(l);
881
+ }, [l]), i.useEffect(() => {
882
+ D && m(w, a.start, a.end).then(() => {
883
+ f(
884
+ w,
885
885
  a.start,
886
886
  a.end
887
887
  );
888
888
  }).finally(() => {
889
- le(!0), s(_.TRENDS_LOAD_WIDGET, {
890
- ...M,
889
+ _e(!0), s(y.TRENDS_LOAD_WIDGET, {
890
+ ...A,
891
891
  time_period: `${pe(a.end, a.start)}M`
892
- }), r?.("TrendsWidget");
892
+ });
893
893
  });
894
- }, [w, D, a]), i.useEffect(() => {
895
- if (T.length !== 0) {
896
- const L = {
897
- accounts: R,
894
+ }, [D, w, a]), i.useEffect(() => {
895
+ if (c.length !== 0) {
896
+ const x = {
897
+ accounts: I,
898
898
  dateRange: { start: a.start, end: a.end }
899
899
  };
900
- m({
901
- ...L,
902
- custom: (G) => !!T.find(
903
- (Y) => Y.top_level_category_guid === G.top_level_category_guid || Y.category_guid === G.category_guid
900
+ b({
901
+ ...x,
902
+ custom: (V) => !!c.find(
903
+ (U) => U.top_level_category_guid === V.top_level_category_guid || U.category_guid === V.category_guid
904
904
  )
905
905
  });
906
906
  }
907
- }, [T]);
908
- const Fe = (L) => {
909
- y(L), se(!0);
907
+ }, [c]);
908
+ const Pe = (x) => {
909
+ g(x), se(!0);
910
+ }, Fe = () => {
911
+ g(null), se(!1);
910
912
  }, Ke = () => {
911
- y(null), se(!1);
912
- }, $e = () => {
913
- be(!0), s(_.TRENDS_CLICK_CONNECT_ACCOUNTS);
914
- }, je = (L, G) => {
915
- he(G ?? K), s(_.TRENDS_CLICK_TOGGLE_VIEW, {
916
- ...M,
917
- toggleView: G
913
+ be(!0), s(y.TRENDS_CLICK_CONNECT_ACCOUNTS);
914
+ }, $e = (x, V) => {
915
+ de(V ?? K), s(y.TRENDS_CLICK_TOGGLE_VIEW, {
916
+ ...A,
917
+ toggleView: V
918
918
  });
919
- }, Ye = (L) => {
920
- const G = ve(L?.[0], 1), Y = L?.[1], qe = pe(Y, G);
921
- p({ start: G, end: Y }), s(_.TRENDS_CLICK_TIME_WINDOW, {
922
- ...M,
923
- time_period: qe + "M"
919
+ }, je = (x) => {
920
+ const V = ve(x?.[0], 1), U = x?.[1], Ze = pe(U, V);
921
+ T({ start: V, end: U }), s(y.TRENDS_CLICK_TIME_WINDOW, {
922
+ ...A,
923
+ time_period: Ze + "M"
924
924
  });
925
- }, Ue = (L) => {
926
- s(_.TRENDS_CLICK_FILTER, {
927
- ...M,
928
- filterValue: L
925
+ }, Ye = (x) => {
926
+ s(y.TRENDS_CLICK_FILTER, {
927
+ ...A,
928
+ filterValue: x
929
929
  });
930
- }, Xe = (L) => {
931
- oe(L);
932
- }, Ze = () => {
933
- oe(""), s(_.TRENDS_CLICK_ALL_CATEGORIES, M);
930
+ }, Ue = (x) => {
931
+ oe(x);
932
+ }, Xe = () => {
933
+ oe(""), s(y.TRENDS_CLICK_ALL_CATEGORIES, A);
934
934
  };
935
- return !E || !_e ? /* @__PURE__ */ e(Q, {}) : /* @__PURE__ */ C(
935
+ return !p || !le ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ C(
936
936
  ke,
937
937
  {
938
- accountOptions: u,
939
- calendarActions: { onRangeChanged: Ye },
938
+ accountOptions: l,
939
+ calendarActions: { onRangeChanged: je },
940
940
  dateRange: a,
941
- dateRangeVariant: c ? "timeframetabs" : "timeframebuttons",
942
- onAccountsFilterClick: Ue,
941
+ dateRangeVariant: d ? "timeframetabs" : "timeframebuttons",
942
+ onAccountsFilterClick: Ye,
943
943
  onBackClick: t,
944
944
  sx: n,
945
- title: k.title,
945
+ title: E.title,
946
946
  children: [
947
947
  Se && /* @__PURE__ */ e(
948
- zt,
948
+ Gt,
949
949
  {
950
- header: k.zero_state_content_header,
950
+ header: E.zero_state_content_header,
951
951
  icon: "",
952
- onClick: $e,
953
- primaryButton: k.empty_state_primary,
954
- subText: k.empty_state_sub_text,
955
- sx: { height: V },
956
- variant: Pe
952
+ onClick: Ke,
953
+ primaryButton: E.empty_state_primary,
954
+ subText: E.empty_state_sub_text,
955
+ sx: { height: H },
956
+ variant: ze
957
957
  }
958
958
  ),
959
959
  !Se && /* @__PURE__ */ C(
960
- b,
960
+ _,
961
961
  {
962
962
  sx: {
963
- px: c ? 0 : 48
963
+ px: d ? 0 : 48
964
964
  },
965
965
  children: [
966
966
  /* @__PURE__ */ C(
967
- b,
967
+ _,
968
968
  {
969
969
  flexDirection: "row",
970
970
  justifyContent: "space-between",
971
- sx: { pb: c ? 12 : 24, pt: c ? 24 : 48 },
971
+ sx: { pb: d ? 12 : 24, pt: d ? 24 : 48 },
972
972
  children: [
973
973
  /* @__PURE__ */ e(
974
974
  Ge,
975
975
  {
976
- selectedCategoryGuid: j,
976
+ selectedCategoryGuid: Y,
977
977
  selectedDateRange: a
978
978
  }
979
979
  ),
980
- /* @__PURE__ */ e(Ve, { onTabChange: je, selectedTab: K })
980
+ /* @__PURE__ */ e(Ve, { onTabChange: $e, selectedTab: K })
981
981
  ]
982
982
  }
983
983
  ),
984
- /* @__PURE__ */ e(b, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ e(O, { flexGrow: 1, children: j && /* @__PURE__ */ C(me, { onClick: Ze, sx: { p: 0, pr: 5 }, children: [
984
+ /* @__PURE__ */ e(_, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ e(W, { flexGrow: 1, children: Y && /* @__PURE__ */ C(me, { onClick: Xe, sx: { p: 0, pr: 5 }, children: [
985
985
  /* @__PURE__ */ e(ae, { name: "arrow_back" }),
986
- k.all_categories
986
+ E.all_categories
987
987
  ] }) }) }),
988
- /* @__PURE__ */ C(b, { flexDirection: B ? "row" : "column", gap: B ? 48 : 16, children: [
988
+ /* @__PURE__ */ C(_, { flexDirection: G ? "row" : "column", gap: G ? 48 : 16, children: [
989
989
  K === "Chart" && /* @__PURE__ */ C(Qe, { children: [
990
- /* @__PURE__ */ e(O, { sx: { width: B ? "68%" : "100%" }, children: /* @__PURE__ */ e(
991
- un,
990
+ /* @__PURE__ */ e(W, { sx: { width: G ? "68%" : "100%" }, children: /* @__PURE__ */ e(
991
+ dn,
992
992
  {
993
- availableHeight: V,
993
+ availableHeight: H,
994
994
  minHeight: 450,
995
995
  selectedDateRange: a,
996
- totals: T
996
+ totals: c
997
997
  }
998
998
  ) }),
999
- /* @__PURE__ */ C(b, { gap: 16, sx: { width: B ? "32%" : "100%" }, children: [
1000
- ne && F && we.length > 0 && /* @__PURE__ */ e(
1001
- rn,
999
+ /* @__PURE__ */ C(_, { gap: 16, sx: { width: G ? "32%" : "100%" }, children: [
1000
+ F && j && we.length > 0 && /* @__PURE__ */ e(
1001
+ on,
1002
1002
  {
1003
1003
  beats: we,
1004
1004
  onInsightCardClick: o
1005
1005
  }
1006
1006
  ),
1007
1007
  /* @__PURE__ */ e(
1008
- on,
1008
+ tn,
1009
1009
  {
1010
- availableHeight: ge,
1011
- onCategoryClick: Fe
1010
+ availableHeight: B,
1011
+ onCategoryClick: Pe
1012
1012
  }
1013
1013
  )
1014
1014
  ] })
1015
1015
  ] }),
1016
- K === "Table" && /* @__PURE__ */ e(O, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
1016
+ K === "Table" && /* @__PURE__ */ e(W, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
1017
1017
  Be,
1018
1018
  {
1019
1019
  height: "unset",
1020
- monthlyCategoryTotals: T,
1021
- onClickRow: Xe,
1022
- selectedCategory: j,
1020
+ monthlyCategoryTotals: c,
1021
+ onClickRow: Ue,
1022
+ selectedCategory: Y,
1023
1023
  selectedDateRange: a
1024
1024
  }
1025
1025
  ) })
1026
1026
  ] }),
1027
- ue && /* @__PURE__ */ e(cn, { onClose: Ke })
1027
+ he && /* @__PURE__ */ e(rn, { onClose: Fe })
1028
1028
  ]
1029
1029
  }
1030
1030
  ),
1031
1031
  /* @__PURE__ */ e(
1032
- Pt,
1032
+ Bt,
1033
1033
  {
1034
1034
  onClose: () => be(!1),
1035
- showConnectWidget: ze,
1036
- title: N.mini_title
1035
+ showConnectWidget: ge,
1036
+ title: O.mini_title
1037
1037
  }
1038
1038
  )
1039
1039
  ]
1040
1040
  }
1041
1041
  );
1042
- }, go = x(mn);
1042
+ }, ho = v(un);
1043
1043
  export {
1044
- lo as TrendsFullWidget,
1045
- uo as TrendsMicroWidget,
1046
- ho as TrendsMiniWidget,
1047
- Co as TrendsStore,
1048
- go as TrendsWidget
1044
+ io as TrendsFullWidget,
1045
+ lo as TrendsMicroWidget,
1046
+ co as TrendsMiniWidget,
1047
+ mo as TrendsStore,
1048
+ ho as TrendsWidget
1049
1049
  };