@mx-cartographer/experiences 7.2.13-alpha.mm3 → 7.2.14-alpha-ram1

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 +8 -0
  2. package/dist/{Account-B-CuHOYf.mjs → Account-01wOyrH1.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-bqByD9ea.mjs → AccountDetailsContent-C_ZRryuO.mjs} +10 -10
  4. package/dist/{AccountDetailsHeader-vcy67tuH.mjs → AccountDetailsHeader-D5h5tdeG.mjs} +8 -8
  5. package/dist/{AccountFields-cUP-9Hm6.mjs → AccountFields-CPkGZ3SD.mjs} +5 -5
  6. package/dist/{AccountListItem-DChcf3SN.mjs → AccountListItem-D4uG9yC-.mjs} +4 -4
  7. package/dist/{AccountStore-D6KiXA1B.mjs → AccountStore-DYwH7yC9.mjs} +40 -29
  8. package/dist/{Accounts-IeEtQjzA.mjs → Accounts-D7QljYas.mjs} +1 -1
  9. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-wjoNuj7B.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-ZO9N26Kx.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-DaFRU5st.mjs → ConnectDrawer-CuUj16NH.mjs} +3 -2
  14. package/dist/{ConnectionsDrawer-DHJ7qdWL.mjs → ConnectionsDrawer-Bz4uwdFE.mjs} +14 -13
  15. package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-xH-hqry9.mjs} +1 -1
  16. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
  17. package/dist/{DebtsStore-z3VARSO6.mjs → DebtsStore-Bu8rRRSL.mjs} +1 -1
  18. package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
  19. package/dist/Donut-oaQFlbit.mjs +86 -0
  20. package/dist/Drawer-BEtCk82g.mjs +163 -0
  21. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  22. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DlGZfm4y.mjs} +3 -3
  23. package/dist/FinstrongStore-CyGPqKlT.mjs +440 -0
  24. package/dist/{GoalStore-TD0BfzWX.mjs → GoalStore-Dcnj5pii.mjs} +3 -3
  25. package/dist/{Help-B6dIcujh.mjs → Help-BnPXM_N2.mjs} +2 -2
  26. package/dist/{LineChart-D4GI7nVh.mjs → LineChart-Ct9DNmhS.mjs} +209 -181
  27. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-uobBrm_a.mjs} +10 -10
  28. package/dist/{ManageIncome-Cw-QhHiy.mjs → ManageIncome-C3bINPG2.mjs} +112 -111
  29. package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
  30. package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
  31. package/dist/{NetWorthStore-B_1oulrt.mjs → NetWorthStore-CpL_kqvx.mjs} +2 -2
  32. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-BKKuULAd.mjs} +5 -5
  33. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-CCmnsd7y.mjs} +3 -3
  34. package/dist/{RecurringSettings-Dhf7DHVC.mjs → RecurringSettings-B_mCFQhb.mjs} +4 -4
  35. package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-CngsRZ3K.mjs} +45 -44
  36. package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4RVULF8.mjs} +1 -1
  37. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-BuJ03S9d.mjs} +16 -16
  38. package/dist/SpendingLegend-CW8mIzqd.mjs +196 -0
  39. package/dist/{TransactionDetails-DW7T0W0z.mjs → TransactionDetails-CaJruWq3.mjs} +11 -8
  40. package/dist/{TransactionStore-DxPLdF3B.mjs → TransactionStore-DvOEbOzL.mjs} +3 -3
  41. package/dist/{TrendsStore-DCYbpXPO.mjs → TrendsStore-BVNxGsE4.mjs} +14 -14
  42. package/dist/{User-BQUxBeZV.mjs → User-wXzDI4M8.mjs} +2 -2
  43. package/dist/{WidgetContainer-C88Ecu2W.mjs → WidgetContainer-6dsjtOVg.mjs} +4 -4
  44. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  45. package/dist/accounts/index.es.js +14 -14
  46. package/dist/accounts/stores/AccountStore.d.ts +2 -0
  47. package/dist/analytics/index.es.js +2 -2
  48. package/dist/budgets/index.es.js +456 -431
  49. package/dist/cashflow/index.es.js +45 -45
  50. package/dist/categories/index.es.js +2 -2
  51. package/dist/common/components/Select.d.ts +4 -2
  52. package/dist/common/components/charts/LineChart.d.ts +8 -2
  53. package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
  54. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  55. package/dist/common/components/drawer/Footer.d.ts +17 -0
  56. package/dist/common/index.es.js +35 -35
  57. package/dist/common/types/Finstrong.d.ts +50 -0
  58. package/dist/common/types/Widgets.d.ts +1 -0
  59. package/dist/common/types/index.d.ts +1 -1
  60. package/dist/common/types/localization/FinstrongCopy.d.ts +58 -1
  61. package/dist/dashboard/index.es.js +2 -2
  62. package/dist/debts/index.es.js +11 -11
  63. package/dist/{exportTransactionsToCSV-7bVS7KXf.mjs → exportTransactionsToCSV-hrNpJ77n.mjs} +2 -2
  64. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  65. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  66. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  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 +4 -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 +17 -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 +3179 -1053
  108. package/dist/finstrong/stores/FinstrongStore.d.ts +12 -1
  109. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  110. package/dist/goals/index.es.js +15 -15
  111. package/dist/help/index.es.js +3 -3
  112. package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
  113. package/dist/investments/index.es.js +6 -6
  114. package/dist/merchants/index.es.js +1 -1
  115. package/dist/networth/index.es.js +35 -35
  116. package/dist/notifications/index.es.js +4 -4
  117. package/dist/recurringtransactions/index.es.js +13 -13
  118. package/dist/settings/index.es.js +8 -8
  119. package/dist/spending/index.es.js +273 -398
  120. package/dist/transactions/index.es.js +174 -201
  121. package/dist/trends/index.es.js +95 -95
  122. package/dist/{useAccountDisplayName-BcRqfar8.mjs → useAccountDisplayName-CMMlIOXF.mjs} +2 -2
  123. package/dist/useAriaLive-B3_pRUio.mjs +35 -0
  124. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  125. package/package.json +1 -1
  126. package/dist/Donut-1UMNcG67.mjs +0 -57
  127. package/dist/Drawer-kEE73B87.mjs +0 -113
  128. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  129. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
@@ -1,192 +1,41 @@
1
- import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
- import p from "react";
3
- import { observer as x } from "mobx-react-lite";
4
- import { startOfMonth as nt } from "date-fns/startOfMonth";
5
- import { endOfMonth as ot } from "date-fns/endOfMonth";
6
- import D from "@mui/material/Box";
7
- import C from "@mui/material/Stack";
8
- import N from "@mui/material/Tab";
9
- import at from "@mui/material/Tabs";
10
- import mt from "@mui/material/styles/useTheme";
11
- import { b as V } from "../CategoryUtil-BR3H5i6n.mjs";
12
- import { b } from "../Category-CevNQ03n.mjs";
13
- import { Text as f, CategoryIcon as ht, CategoryIconVariants as ft } from "@mxenabled/mxui";
14
- import { f as A } from "../NumberFormatting-Buh7u8Oi.mjs";
15
- import yt from "@mui/material/Button";
16
- import { useTheme as it } from "@mui/material";
17
- import { u as w, b as R, m as z, d as rt, a as st, h as Ct, g as _t } from "../hooks-D6XlXHf4.mjs";
18
- import { u as ct } from "../useScreenSize-B6JyS_Lj.mjs";
19
- import { D as bt } from "../Donut-1UMNcG67.mjs";
20
- import { L as F } from "../Loader-DUaFpDGv.mjs";
21
- import { M as St } from "../MiniWidgetContainer-D0gfmbaF.mjs";
22
- import { startOfToday as U } from "date-fns/startOfToday";
23
- import { T as Tt, a as Mt } from "../TransactionDetails-DW7T0W0z.mjs";
24
- import Dt from "@mui/material/Collapse";
1
+ import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
+ import a from "react";
3
+ import { observer as D } from "mobx-react-lite";
4
+ import { startOfMonth as tt } from "date-fns/startOfMonth";
5
+ import { endOfMonth as et } from "date-fns/endOfMonth";
6
+ import T from "@mui/material/Box";
7
+ import S from "@mui/material/Stack";
8
+ import W from "@mui/material/Tab";
9
+ import nt from "@mui/material/Tabs";
10
+ import dt from "@mui/material/styles/useTheme";
11
+ import { g as ot, a as at, S as N, b as U } from "../SpendingLegend-CW8mIzqd.mjs";
12
+ import { Text as y } from "@mxenabled/mxui";
13
+ import { f as E } from "../NumberFormatting-Buh7u8Oi.mjs";
14
+ import { u as w, b as O, m as j, d as it, a as rt, h as gt, g as pt } from "../hooks-C41HAxM5.mjs";
15
+ import { L as z } from "../Loader-DUaFpDGv.mjs";
16
+ import { M as ut } from "../MiniWidgetContainer-CmXpTylX.mjs";
17
+ import { startOfToday as X } from "date-fns/startOfToday";
18
+ import { useTheme as mt } from "@mui/material";
19
+ import { T as ht, a as ft } from "../TransactionDetails-CaJruWq3.mjs";
20
+ import bt from "@mui/material/Collapse";
25
21
  import B from "@mui/material/Divider";
26
- import q from "@mui/material/List";
27
- import J from "@mui/material/ListItem";
28
- import xt from "@mui/material/ListItemButton";
29
- import { D as Q } from "../Drawer-kEE73B87.mjs";
30
- import { A as Z, W as wt } from "../WidgetContainer-C88Ecu2W.mjs";
31
- const j = 5, vt = (n, l, r) => r.reduce((i, c) => {
32
- if (c.total > 0) {
33
- const a = n.find((s) => s.guid === c.category_guid);
34
- if (!a) return i;
35
- const o = a.parent_guid ?? a.guid, e = n.find((s) => s.guid === o);
36
- if (!e) return i;
37
- const d = {
38
- guid: a.guid,
39
- name: a.guid === o ? `General ${a.name}` : a.name,
40
- color: V(e.guid, l),
41
- amount: c.total
42
- }, u = i.find((s) => s.guid === o);
43
- u ? (u.amount += c.total, u.categoryTotals?.push(d)) : i.push({
44
- guid: o,
45
- name: e.name,
46
- color: V(e.guid, l),
47
- categoryTotals: [d],
48
- amount: c.total
49
- });
50
- }
51
- return i;
52
- }, []), lt = (n, l, r, i) => {
53
- const c = vt(n, r, i), a = c.filter(
54
- (s) => s.guid !== b.INCOME && s.guid !== b.INVESTMENTS && s.guid !== b.TRANSFER
55
- ).sort((s, g) => g.amount - s.amount), o = a.reduce(
56
- (s, g) => s + g.amount,
57
- 0
58
- ), e = a.length > j ? j : a.length, d = a.slice(0, e), u = d.map((s) => ({
59
- id: s.guid,
60
- color: V(s.guid, r),
61
- label: s.name,
62
- value: s.amount / o * 100
63
- }));
64
- if (a.length > 5) {
65
- const s = a.slice(j, c.length), g = s.reduce(
66
- (S, _) => S + _.amount,
67
- 0
68
- );
69
- d.push({
70
- guid: "other",
71
- color: r.palette.categories.others || "",
72
- name: l.saving_goal_other,
73
- categoryTotals: s,
74
- amount: g
75
- }), u.push({
76
- id: "other",
77
- color: r.palette.categories.others || "",
78
- label: l.saving_goal_other,
79
- value: g / o * 100
80
- });
81
- }
82
- return {
83
- categoryData: d,
84
- donutData: u,
85
- totalAmount: o
86
- };
87
- }, dt = (n, l, r) => {
88
- const i = n.filter(
89
- (e) => e.guid === b.INCOME || e.parent_guid === b.INCOME
90
- ), c = l.filter((e) => i.some((d) => d.guid === e.category_guid)).sort((e, d) => e.total - d.total).map((e, d) => ({
91
- guid: e.category_guid,
92
- name: n.find((u) => u.guid === e.category_guid)?.name,
93
- color: r[d],
94
- categoryTotals: [],
95
- amount: Math.abs(e.total)
96
- })), a = c.reduce(
97
- (e, d) => e + d.amount,
98
- 0
99
- ), o = c.map((e) => ({
100
- id: e.guid,
101
- color: e.color,
102
- label: e.name,
103
- value: e.amount / a * 100
104
- }));
105
- return {
106
- categoryData: c,
107
- donutData: o,
108
- totalAmount: a
109
- };
110
- }, W = ({ amount: n, label: l }) => /* @__PURE__ */ m(C, { direction: "column", children: [
111
- /* @__PURE__ */ t(f, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: l }),
112
- /* @__PURE__ */ t(f, { variant: "XSmall", children: A(n, "0,0") })
113
- ] }), At = ({
114
- data: n,
115
- isIncome: l = !1,
116
- onSelected: r,
117
- onViewTransactions: i,
118
- selectedId: c,
119
- size: a = 150,
120
- totalLabel: o,
121
- variant: e = "mini"
122
- }) => {
123
- const { spending: d } = w(), u = it(), { isTablet: s } = ct(), g = p.useMemo(
124
- () => c ? n.categoryData.find((v) => v.guid === c) : void 0,
125
- [c]
126
- ), S = p.useMemo(() => n.donutData.length > 0 ? n.donutData : [{ id: "0", color: u.palette.divider, value: 100 }], [n, u]), _ = () => {
127
- i?.(c);
128
- }, y = s ? 32 : 48;
129
- return /* @__PURE__ */ t(bt, { data: S, onClick: r, selectedId: c, size: a, children: /* @__PURE__ */ t(C, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ m(C, { alignItems: "center", justifyContent: "center", minHeight: a, minWidth: a, children: [
130
- g && /* @__PURE__ */ m(
131
- C,
132
- {
133
- alignItems: "center",
134
- gap: e === "mini" ? 0 : 8,
135
- mb: e === "mini" ? 0 : 8,
136
- mt: e === "mini" ? 0 : -16,
137
- sx: e === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
138
- children: [
139
- /* @__PURE__ */ t(
140
- ht,
141
- {
142
- categoryGuid: l ? b.INCOME : g.guid,
143
- size: e === "mini" ? 24 : y,
144
- variant: ft.Transparent
145
- }
146
- ),
147
- /* @__PURE__ */ t(f, { color: "secondary", noWrap: !0, variant: e === "mini" ? "Tiny" : "Body", children: g ? g.name : o })
148
- ]
149
- }
150
- ),
151
- !g && e === "full" && /* @__PURE__ */ t(f, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: o }),
152
- /* @__PURE__ */ t(f, { variant: e === "mini" ? "H2" : "H1", children: g ? A(g.amount, "0,0") : A(n.totalAmount, "0,0") }),
153
- !g && e === "mini" && /* @__PURE__ */ t(f, { color: "secondary", noWrap: !0, variant: "Tiny", children: o }),
154
- e === "full" && /* @__PURE__ */ t(
155
- yt,
156
- {
157
- "aria-label": `View ${g?.name || ""} Transactions`,
158
- disabled: n.categoryData.length === 0,
159
- onClick: _,
160
- sx: { mt: { xl: 4, xs: 0 }, zIndex: 1 },
161
- variant: "text",
162
- children: d.view_transactions
163
- }
164
- )
165
- ] }) }) });
166
- }, O = x(At), tt = ({ data: n, onSelected: l, selectedId: r }) => /* @__PURE__ */ t(C, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: n.categoryData.map((i) => /* @__PURE__ */ m(
167
- C,
168
- {
169
- alignItems: "center",
170
- "aria-label": i.name,
171
- "aria-selected": i.guid === r,
172
- direction: "row",
173
- gap: 8,
174
- onClick: () => l(i.guid),
175
- role: "button",
176
- sx: { cursor: "pointer" },
177
- children: [
178
- /* @__PURE__ */ t(D, { borderRadius: 4, height: 8, sx: { backgroundColor: i.color }, width: 8 }),
179
- /* @__PURE__ */ t(f, { bold: i.guid === r, variant: "XSmall", children: i.name })
180
- ]
181
- },
182
- i.guid
183
- )) }), Et = () => {
184
- const n = mt(), { goals: l, spending: r } = w(), { selectedAccounts: i } = R(), {
22
+ import Y from "@mui/material/List";
23
+ import q from "@mui/material/ListItem";
24
+ import _t from "@mui/material/ListItemButton";
25
+ import { u as yt } from "../useScreenSize-B6JyS_Lj.mjs";
26
+ import { D as J } from "../Drawer-BEtCk82g.mjs";
27
+ import { b as L } from "../Category-CevNQ03n.mjs";
28
+ import { A as Q, W as Ct } from "../WidgetContainer-6dsjtOVg.mjs";
29
+ const R = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column", children: [
30
+ /* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: s }),
31
+ /* @__PURE__ */ t(y, { variant: "XSmall", children: E(n, "0,0") })
32
+ ] }), St = () => {
33
+ const n = dt(), { goals: s, spending: o } = w(), { selectedAccounts: i } = O(), {
185
34
  categories: c,
186
- dateRangeCategoryTotals: a,
187
- dataRangeTotalsLoaded: o,
188
- loadDateRangeCategoryTotals: e
189
- } = z(), d = p.useMemo(
35
+ dateRangeCategoryTotals: r,
36
+ dataRangeTotalsLoaded: e,
37
+ loadDateRangeCategoryTotals: l
38
+ } = j(), u = a.useMemo(
190
39
  () => [
191
40
  n.palette.chartMono.chartMono5,
192
41
  n.palette.chartMono.chartMono4,
@@ -197,145 +46,171 @@ const j = 5, vt = (n, l, r) => r.reduce((i, c) => {
197
46
  ],
198
47
  [n]
199
48
  );
200
- p.useEffect(() => {
201
- e(
49
+ a.useEffect(() => {
50
+ l(
202
51
  i,
203
- nt(/* @__PURE__ */ new Date()),
204
- ot(/* @__PURE__ */ new Date())
52
+ tt(/* @__PURE__ */ new Date()),
53
+ et(/* @__PURE__ */ new Date())
205
54
  ).finally();
206
55
  }, [i]);
207
- const [u, s] = p.useState(""), [g, S] = p.useState(0), _ = p.useMemo(
208
- () => lt(c, l, n, a),
209
- [c, a]
210
- ), y = p.useMemo(
211
- () => dt(c, a, d),
212
- [c, a, d]
213
- ), v = (E, L) => {
214
- S(L), s("");
215
- }, M = (E) => {
216
- s(u === E ? "" : E);
56
+ const [m, p] = a.useState(""), [h, M] = a.useState(0), C = a.useMemo(
57
+ () => ot(c, s, n, r),
58
+ [c, r]
59
+ ), f = a.useMemo(
60
+ () => at(c, r, u),
61
+ [c, r, u]
62
+ ), A = (x, I) => {
63
+ M(I), p("");
64
+ }, _ = (x) => {
65
+ p(m === x ? "" : x);
217
66
  };
218
- return o ? /* @__PURE__ */ m(D, { width: "100%", children: [
219
- /* @__PURE__ */ m(at, { onChange: v, value: g, variant: "fullWidth", children: [
220
- /* @__PURE__ */ t(
221
- N,
222
- {
223
- label: /* @__PURE__ */ t(
67
+ return e ? /* @__PURE__ */ d(T, { width: "100%", children: [
68
+ /* @__PURE__ */ d(
69
+ nt,
70
+ {
71
+ "aria-label": o.mini_title,
72
+ onChange: A,
73
+ value: h,
74
+ variant: "fullWidth",
75
+ children: [
76
+ /* @__PURE__ */ t(
224
77
  W,
225
78
  {
226
- amount: _.totalAmount,
227
- label: r.spend_tab_title
79
+ "aria-controls": "spending-tabpanel",
80
+ id: "spending-tab",
81
+ label: /* @__PURE__ */ t(
82
+ R,
83
+ {
84
+ amount: C.totalAmount,
85
+ label: o.spend_tab_title
86
+ }
87
+ ),
88
+ tabIndex: h === 0 ? 0 : -1
228
89
  }
229
- )
230
- }
231
- ),
232
- /* @__PURE__ */ t(
233
- N,
234
- {
235
- label: /* @__PURE__ */ t(
90
+ ),
91
+ /* @__PURE__ */ t(
236
92
  W,
237
93
  {
238
- amount: y.totalAmount,
239
- label: r.income_tab_title
94
+ "aria-controls": "income-tabpanel",
95
+ id: "income-tab",
96
+ label: /* @__PURE__ */ t(
97
+ R,
98
+ {
99
+ amount: f.totalAmount,
100
+ label: o.income_tab_title
101
+ }
102
+ ),
103
+ tabIndex: h === 1 ? 0 : -1
240
104
  }
241
105
  )
242
- }
243
- )
244
- ] }),
245
- g === 0 && /* @__PURE__ */ t(D, { children: /* @__PURE__ */ m(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
246
- /* @__PURE__ */ t(
247
- O,
248
- {
249
- data: _,
250
- onSelected: M,
251
- selectedId: u,
252
- totalLabel: r.total_spending
253
- }
254
- ),
255
- /* @__PURE__ */ t(
256
- tt,
257
- {
258
- data: _,
259
- onSelected: M,
260
- selectedId: u
261
- }
262
- )
263
- ] }) }),
264
- g === 1 && /* @__PURE__ */ t(D, { children: /* @__PURE__ */ m(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
265
- /* @__PURE__ */ t(
266
- O,
267
- {
268
- data: y,
269
- isIncome: !0,
270
- onSelected: M,
271
- selectedId: u,
272
- totalLabel: r.total_income
273
- }
274
- ),
275
- /* @__PURE__ */ t(tt, { data: y, onSelected: M, selectedId: u })
276
- ] }) })
277
- ] }) : /* @__PURE__ */ t(F, { height: 250 });
278
- }, It = x(Et), Lt = ({ onPrimaryCtaClick: n, sx: l = {} }) => {
279
- const { visibleAccounts: r } = rt(), { spending: i } = w(), { isCopyLoaded: c, isInitialized: a, setSelectedAccounts: o } = R();
280
- return p.useEffect(() => {
281
- o(r);
282
- }, [r]), !c || !a ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
283
- St,
106
+ ]
107
+ }
108
+ ),
109
+ /* @__PURE__ */ t(
110
+ T,
111
+ {
112
+ "aria-labelledby": "spending-tab",
113
+ hidden: h !== 0,
114
+ id: "spending-tabpanel",
115
+ role: "tabpanel",
116
+ children: /* @__PURE__ */ d(S, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
117
+ /* @__PURE__ */ t(
118
+ N,
119
+ {
120
+ data: C,
121
+ onSelected: _,
122
+ selectedId: m,
123
+ totalLabel: o.total_spending
124
+ }
125
+ ),
126
+ /* @__PURE__ */ t(U, { data: C, onSelected: _, selectedId: m })
127
+ ] })
128
+ }
129
+ ),
130
+ /* @__PURE__ */ t(
131
+ T,
132
+ {
133
+ "aria-labelledby": "income-tab",
134
+ hidden: h !== 1,
135
+ id: "income-tabpanel",
136
+ role: "tabpanel",
137
+ children: /* @__PURE__ */ d(S, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
138
+ /* @__PURE__ */ t(
139
+ N,
140
+ {
141
+ data: f,
142
+ isIncome: !0,
143
+ onSelected: _,
144
+ selectedId: m,
145
+ totalLabel: o.total_income
146
+ }
147
+ ),
148
+ /* @__PURE__ */ t(U, { data: f, onSelected: _, selectedId: m })
149
+ ] })
150
+ }
151
+ )
152
+ ] }) : /* @__PURE__ */ t(z, { height: 250 });
153
+ }, Mt = D(St), Tt = ({ onPrimaryCtaClick: n, sx: s = {} }) => {
154
+ const { visibleAccounts: o } = it(), { spending: i } = w(), { isCopyLoaded: c, isInitialized: r, setSelectedAccounts: e } = O();
155
+ return a.useEffect(() => {
156
+ e(o);
157
+ }, [o]), !c || !r ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ t(
158
+ ut,
284
159
  {
285
160
  className: "mx-exp-spending-miniwidget",
286
161
  onPrimaryCtaClick: n,
287
162
  primaryCtaLabel: i.primary_cta,
288
- sx: l,
163
+ sx: s,
289
164
  title: i.mini_title,
290
- children: /* @__PURE__ */ t(It, {})
165
+ children: /* @__PURE__ */ t(Mt, {})
291
166
  }
292
167
  );
293
- }, he = x(Lt), Nt = ({
168
+ }, ie = D(Tt), Dt = ({
294
169
  data: n,
295
- onSelected: l,
296
- selectedId: r = "",
170
+ onSelected: s,
171
+ selectedId: o = "",
297
172
  title: i
298
173
  }) => {
299
- const { spending: c } = w(), a = n.categoryData.find((o) => o.guid === r);
300
- return /* @__PURE__ */ m(C, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
301
- /* @__PURE__ */ t(f, { bold: !0, sx: { py: 12 }, children: `${i} ${c.by_category}` }),
174
+ const { spending: c } = w(), r = n.categoryData.find((e) => e.guid === o);
175
+ return /* @__PURE__ */ d(S, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
176
+ /* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${i} ${c.by_category}` }),
302
177
  /* @__PURE__ */ t(B, { "aria-hidden": "true" }),
303
- /* @__PURE__ */ t(q, { children: n.categoryData.map((o) => /* @__PURE__ */ m(p.Fragment, { children: [
178
+ /* @__PURE__ */ t(Y, { children: n.categoryData.map((e) => /* @__PURE__ */ d(a.Fragment, { children: [
304
179
  /* @__PURE__ */ t(
305
- J,
180
+ q,
306
181
  {
307
182
  disableGutters: !0,
308
183
  disablePadding: !0,
309
184
  sx: {
310
185
  minHeight: 44
311
186
  },
312
- children: /* @__PURE__ */ m(
313
- xt,
187
+ children: /* @__PURE__ */ d(
188
+ _t,
314
189
  {
315
- "aria-expanded": a?.guid === o.guid,
316
- onClick: () => l(o.guid),
190
+ "aria-expanded": r?.guid === e.guid,
191
+ onClick: () => s(e.guid),
317
192
  sx: { minHeight: 44, px: 8, py: 0 },
318
193
  children: [
319
194
  /* @__PURE__ */ t(
320
- D,
195
+ T,
321
196
  {
322
197
  borderRadius: 4,
323
198
  flexShrink: 0,
324
199
  height: 8,
325
- sx: { backgroundColor: o.color, mr: 8 },
200
+ sx: { backgroundColor: e.color, mr: 8 },
326
201
  width: 8
327
202
  }
328
203
  ),
329
- /* @__PURE__ */ m(
330
- C,
204
+ /* @__PURE__ */ d(
205
+ S,
331
206
  {
332
207
  alignItems: "center",
333
208
  direction: "row",
334
209
  justifyContent: "space-between",
335
210
  width: "100%",
336
211
  children: [
337
- /* @__PURE__ */ t(f, { bold: r === o.guid, children: o.name }),
338
- /* @__PURE__ */ t(f, { bold: r === o.guid, variant: "Body", children: A(o.amount, "0,0") })
212
+ /* @__PURE__ */ t(y, { bold: o === e.guid, children: e.name }),
213
+ /* @__PURE__ */ t(y, { bold: o === e.guid, variant: "Body", children: E(e.amount, "0,0") })
339
214
  ]
340
215
  }
341
216
  )
@@ -345,50 +220,50 @@ const j = 5, vt = (n, l, r) => r.reduce((i, c) => {
345
220
  }
346
221
  ),
347
222
  /* @__PURE__ */ t(B, {}),
348
- o.categoryTotals && o.categoryTotals.length > 0 && /* @__PURE__ */ t(Dt, { in: a?.guid === o.guid, unmountOnExit: !0, children: /* @__PURE__ */ m(q, { children: [
349
- a?.categoryTotals?.map((e) => /* @__PURE__ */ t(
350
- J,
223
+ e.categoryTotals && e.categoryTotals.length > 0 && /* @__PURE__ */ t(bt, { in: r?.guid === e.guid, unmountOnExit: !0, children: /* @__PURE__ */ d(Y, { children: [
224
+ r?.categoryTotals?.map((l) => /* @__PURE__ */ t(
225
+ q,
351
226
  {
352
227
  sx: {
353
228
  pl: 24,
354
229
  pr: 8,
355
230
  py: 0
356
231
  },
357
- children: /* @__PURE__ */ m(C, { direction: "row", justifyContent: "space-between", width: "100%", children: [
358
- /* @__PURE__ */ m(f, { children: [
359
- e.name,
232
+ children: /* @__PURE__ */ d(S, { direction: "row", justifyContent: "space-between", width: "100%", children: [
233
+ /* @__PURE__ */ d(y, { children: [
234
+ l.name,
360
235
  " "
361
236
  ] }),
362
- /* @__PURE__ */ t(f, { children: A(e.amount, "0,0") })
237
+ /* @__PURE__ */ t(y, { children: E(l.amount, "0,0") })
363
238
  ] })
364
239
  },
365
- e.guid
240
+ l.guid
366
241
  )),
367
242
  /* @__PURE__ */ t(B, {})
368
243
  ] }) })
369
- ] }, o.guid)) }),
370
- /* @__PURE__ */ t(f, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${c.total}: ${A(n.totalAmount, "0,0")}` })
244
+ ] }, e.guid)) }),
245
+ /* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${c.total}: ${E(n.totalAmount, "0,0")}` })
371
246
  ] });
372
- }, Wt = x(Nt), Ot = ({
247
+ }, wt = D(Dt), xt = ({
373
248
  data: n,
374
- onSelected: l,
375
- onViewTransactions: r,
249
+ onSelected: s,
250
+ onViewTransactions: o,
376
251
  selectedId: i,
377
252
  title: c
378
253
  }) => {
379
- const { isDesktop: a, isMobile: o } = ct(), { isLoadingCategoryTotals: e } = z(), { spending: d } = w();
380
- return /* @__PURE__ */ m(
381
- C,
254
+ const { isDesktop: r, isMobile: e } = yt(), { isLoadingCategoryTotals: l } = j(), { spending: u } = w();
255
+ return /* @__PURE__ */ d(
256
+ S,
382
257
  {
383
- alignItems: o ? "center" : "flex-start",
384
- direction: o ? "column" : "row",
258
+ alignItems: e ? "center" : "flex-start",
259
+ direction: e ? "column" : "row",
385
260
  gap: { xs: 16, md: 64, xl: 100 },
386
261
  justifyContent: "center",
387
262
  pt: 50,
388
263
  px: 8,
389
264
  children: [
390
- e && /* @__PURE__ */ t(
391
- O,
265
+ l && /* @__PURE__ */ t(
266
+ N,
392
267
  {
393
268
  data: {
394
269
  categoryData: [],
@@ -398,173 +273,173 @@ const j = 5, vt = (n, l, r) => r.reduce((i, c) => {
398
273
  onSelected: () => {
399
274
  },
400
275
  selectedId: "",
401
- size: a ? 400 : 300,
276
+ size: r ? 400 : 300,
402
277
  totalLabel: "Loading ...",
403
278
  variant: "full"
404
279
  }
405
280
  ),
406
- !e && /* @__PURE__ */ t(
407
- O,
281
+ !l && /* @__PURE__ */ t(
282
+ N,
408
283
  {
409
284
  data: n,
410
- onSelected: l,
411
- onViewTransactions: r,
285
+ onSelected: s,
286
+ onViewTransactions: o,
412
287
  selectedId: i,
413
- size: a ? 400 : 300,
414
- totalLabel: d.total_amount,
288
+ size: r ? 400 : 300,
289
+ totalLabel: u.total_amount,
415
290
  variant: "full"
416
291
  }
417
292
  ),
418
- /* @__PURE__ */ t(Wt, { data: n, onSelected: l, selectedId: i, title: c })
293
+ /* @__PURE__ */ t(wt, { data: n, onSelected: s, selectedId: i, title: c })
419
294
  ]
420
295
  }
421
296
  );
422
- }, et = x(Ot), Rt = (n) => [
297
+ }, Z = D(xt), vt = (n) => [
423
298
  n.palette.chartMono.chartMono5,
424
299
  n.palette.chartMono.chartMono4,
425
300
  n.palette.chartMono.chartMono3,
426
301
  n.palette.chartMono.chartMono2,
427
302
  n.palette.chartMono.chartMono1,
428
303
  n.palette.chartMono.chartMono6
429
- ], Gt = () => {
430
- const n = it(), { clientConfig: l } = st(), { categories: r, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: c } = z(), { goals: a, spending: o } = w(), { displayedDateRange: e, selectedAccounts: d, selectedAccountGuids: u } = R(), { setFilter: s, sortedTransactions: g } = Ct(), S = l?.master?.deep_link_params?.account_guids, _ = l?.master?.deep_link_params?.view, [y, v] = p.useState(""), [M, E] = p.useState(_ === "income" ? 1 : 0), [L, H] = p.useState(""), [gt, P] = p.useState(!1);
431
- p.useEffect(() => {
304
+ ], Lt = () => {
305
+ const n = mt(), { clientConfig: s } = rt(), { categories: o, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: c } = j(), { goals: r, spending: e } = w(), { displayedDateRange: l, selectedAccounts: u, selectedAccountGuids: m } = O(), { setFilter: p, sortedTransactions: h } = gt(), M = s?.master?.deep_link_params?.account_guids, C = s?.master?.deep_link_params?.view, [f, A] = a.useState(""), [_, x] = a.useState(C === "income" ? 1 : 0), [I, F] = a.useState(""), [st, V] = a.useState(!1);
306
+ a.useEffect(() => {
432
307
  c(
433
- d,
434
- e.start,
435
- e.end
308
+ u,
309
+ l.start,
310
+ l.end
436
311
  ).finally();
437
- }, [d, e]);
438
- const G = p.useMemo(
439
- () => lt(r, a, n, i),
440
- [r, i]
441
- ), X = p.useMemo(
442
- () => dt(r, i, Rt(n)),
443
- [r, i]
444
- ), k = p.useMemo(
445
- () => g.find((h) => h.guid === L),
446
- [L, g]
447
- ), ut = (h, I) => {
448
- E(I), v("");
449
- }, Y = (h) => {
450
- v(y === h || h === "0" ? "" : h);
451
- }, K = (h) => {
452
- const I = {
453
- accounts: S || u,
454
- dateRange: e
312
+ }, [u, l]);
313
+ const $ = a.useMemo(
314
+ () => ot(o, r, n, i),
315
+ [o, i]
316
+ ), P = a.useMemo(
317
+ () => at(o, i, vt(n)),
318
+ [o, i]
319
+ ), k = a.useMemo(
320
+ () => h.find((g) => g.guid === I),
321
+ [I, h]
322
+ ), ct = (g, v) => {
323
+ x(v), A("");
324
+ }, H = (g) => {
325
+ A(f === g || g === "0" ? "" : g);
326
+ }, K = (g) => {
327
+ const v = {
328
+ accounts: M || m,
329
+ dateRange: l
455
330
  };
456
- if (M === 0)
457
- if (h === "other") {
458
- const T = G.categoryData.find(($) => $.guid === "other");
459
- s({
460
- ...I,
461
- custom: ($) => !!T?.categoryTotals?.find((pt) => pt.guid === $.top_level_category_guid)
331
+ if (_ === 0)
332
+ if (g === "other") {
333
+ const b = $.categoryData.find((G) => G.guid === "other");
334
+ p({
335
+ ...v,
336
+ custom: (G) => !!b?.categoryTotals?.find((lt) => lt.guid === G.top_level_category_guid)
462
337
  });
463
338
  } else
464
- s({
465
- ...I,
466
- custom: (T) => h ? T.top_level_category_guid === h : T.top_level_category_guid !== b.INCOME && T.top_level_category_guid !== b.INVESTMENTS && T.top_level_category_guid !== b.TRANSFER,
467
- showSplits: !!h
339
+ p({
340
+ ...v,
341
+ custom: (b) => g ? b.top_level_category_guid === g : b.top_level_category_guid !== L.INCOME && b.top_level_category_guid !== L.INVESTMENTS && b.top_level_category_guid !== L.TRANSFER,
342
+ showSplits: !!g
468
343
  });
469
344
  else
470
- s({
471
- ...I,
472
- custom: (T) => h ? T.category_guid === h : T.category_guid === b.INCOME || T.top_level_category_guid === b.INCOME
345
+ p({
346
+ ...v,
347
+ custom: (b) => g ? b.category_guid === g : b.category_guid === L.INCOME || b.top_level_category_guid === L.INCOME
473
348
  });
474
- P(!0);
349
+ V(!0);
475
350
  };
476
- return /* @__PURE__ */ m(D, { children: [
477
- /* @__PURE__ */ m(at, { onChange: ut, value: M, variant: "fullWidth", children: [
351
+ return /* @__PURE__ */ d(T, { children: [
352
+ /* @__PURE__ */ d(nt, { onChange: ct, value: _, variant: "fullWidth", children: [
478
353
  /* @__PURE__ */ t(
479
- N,
354
+ W,
480
355
  {
481
356
  label: /* @__PURE__ */ t(
482
- W,
357
+ R,
483
358
  {
484
- amount: G.totalAmount,
485
- label: o.spend_tab_title
359
+ amount: $.totalAmount,
360
+ label: e.spend_tab_title
486
361
  }
487
362
  )
488
363
  }
489
364
  ),
490
365
  /* @__PURE__ */ t(
491
- N,
366
+ W,
492
367
  {
493
368
  label: /* @__PURE__ */ t(
494
- W,
369
+ R,
495
370
  {
496
- amount: X.totalAmount,
497
- label: o.income_tab_title
371
+ amount: P.totalAmount,
372
+ label: e.income_tab_title
498
373
  }
499
374
  )
500
375
  }
501
376
  )
502
377
  ] }),
503
- M === 0 && /* @__PURE__ */ t(
504
- et,
378
+ _ === 0 && /* @__PURE__ */ t(
379
+ Z,
505
380
  {
506
- data: G,
507
- onSelected: Y,
381
+ data: $,
382
+ onSelected: H,
508
383
  onViewTransactions: K,
509
- selectedId: y,
510
- title: o.spend_tab_title
384
+ selectedId: f,
385
+ title: e.spend_tab_title
511
386
  }
512
387
  ),
513
- M === 1 && /* @__PURE__ */ t(
514
- et,
388
+ _ === 1 && /* @__PURE__ */ t(
389
+ Z,
515
390
  {
516
- data: X,
517
- onSelected: Y,
391
+ data: P,
392
+ onSelected: H,
518
393
  onViewTransactions: K,
519
- selectedId: y,
520
- title: o.income_tab_title
394
+ selectedId: f,
395
+ title: e.income_tab_title
521
396
  }
522
397
  ),
523
398
  /* @__PURE__ */ t(
524
- Q,
399
+ J,
525
400
  {
526
- ariaLabelClose: o.close_drawer_aria,
527
- isOpen: gt,
528
- onClose: () => P(!1),
529
- title: o.transactions_drawer_title,
530
- children: /* @__PURE__ */ t(Tt, { onClick: H })
401
+ ariaLabelClose: e.close_drawer_aria,
402
+ isOpen: st,
403
+ onClose: () => V(!1),
404
+ title: e.transactions_drawer_title,
405
+ children: /* @__PURE__ */ t(ht, { onClick: F })
531
406
  }
532
407
  ),
533
408
  /* @__PURE__ */ t(
534
- Q,
409
+ J,
535
410
  {
536
- ariaLabelClose: o.close_drawer_aria,
411
+ ariaLabelClose: e.close_drawer_aria,
537
412
  isOpen: !!k,
538
- onClose: () => H(""),
539
- title: o.transaction_details_drawer_title,
540
- children: k && /* @__PURE__ */ t(Mt, { transaction: k })
413
+ onClose: () => F(""),
414
+ title: e.transaction_details_drawer_title,
415
+ children: k && /* @__PURE__ */ t(ft, { transaction: k })
541
416
  }
542
417
  )
543
418
  ] });
544
- }, kt = x(Gt), $t = ({ onBackClick: n, sx: l = {} }) => {
545
- const { visibleAccounts: r } = rt(), { spending: i } = w(), { isCopyLoaded: c, isInitialized: a, setDisplayedDate: o, setSelectedAccounts: e } = R(), { onEvent: d } = _t(), { clientConfig: u } = st(), s = u?.master?.deep_link_params?.date_range, [g, S] = p.useState(!1);
546
- p.useEffect(() => {
547
- e(r);
548
- }, [r]), p.useEffect(() => {
549
- s && Array.isArray(s) && s.length === 2 ? o(s[0], s[1]) : o(nt(U()), ot(U())), S(!0), d(Z.SPENDING_VIEW);
419
+ }, At = D(Lt), It = ({ onBackClick: n, sx: s = {} }) => {
420
+ const { visibleAccounts: o } = it(), { spending: i } = w(), { isCopyLoaded: c, isInitialized: r, setDisplayedDate: e, setSelectedAccounts: l } = O(), { onEvent: u } = pt(), { clientConfig: m } = rt(), p = m?.master?.deep_link_params?.date_range, [h, M] = a.useState(!1);
421
+ a.useEffect(() => {
422
+ l(o);
423
+ }, [o]), a.useEffect(() => {
424
+ p && Array.isArray(p) && p.length === 2 ? e(p[0], p[1]) : e(tt(X()), et(X())), M(!0), u(Q.SPENDING_VIEW);
550
425
  }, []);
551
- const _ = (y) => {
552
- o(y[0], y[1]);
426
+ const C = (f) => {
427
+ e(f[0], f[1]);
553
428
  };
554
- return !c || !a || !g ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
555
- wt,
429
+ return !c || !r || !h ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ t(
430
+ Ct,
556
431
  {
557
- accountOptions: r,
558
- calendarActions: { onRangeChanged: _ },
559
- onAccountsFilterClick: () => d(Z.SPENDING_CLICK_FILTER),
432
+ accountOptions: o,
433
+ calendarActions: { onRangeChanged: C },
434
+ onAccountsFilterClick: () => u(Q.SPENDING_CLICK_FILTER),
560
435
  onBackClick: n,
561
- sx: l,
436
+ sx: s,
562
437
  title: i.title,
563
- children: /* @__PURE__ */ t(D, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(kt, {}) })
438
+ children: /* @__PURE__ */ t(T, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(At, {}) })
564
439
  }
565
440
  );
566
- }, fe = x($t);
441
+ }, re = D(It);
567
442
  export {
568
- he as SpendingMiniWidget,
569
- fe as SpendingWidget
443
+ ie as SpendingMiniWidget,
444
+ re as SpendingWidget
570
445
  };