@mx-cartographer/experiences 7.4.7-alpha.mega1 → 7.4.8-alpha.mm0

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 (61) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/dist/{Account-01wOyrH1.mjs → Account-BrOTlmeK.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-COMjOzwr.mjs → AccountDetailsContent-B7FqH05C.mjs} +8 -8
  4. package/dist/{AccountDetailsHeader-Cbi5G6fJ.mjs → AccountDetailsHeader-C8MxsxhN.mjs} +4 -4
  5. package/dist/{AccountFields-Cd_nOWmf.mjs → AccountFields-BQZ-o6Kj.mjs} +2 -2
  6. package/dist/{AccountListItem-DxY4cCF1.mjs → AccountListItem-aIE9WWTO.mjs} +4 -4
  7. package/dist/{AccountStore-C1zMBzHq.mjs → AccountStore-DqO84Aer.mjs} +2 -2
  8. package/dist/{Accounts-D7QljYas.mjs → Accounts-DC_A4UCa.mjs} +1 -1
  9. package/dist/{BudgetUtil-Df2nII9u.mjs → BudgetUtil-BmZXkL0C.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-DqJK_rrL.mjs → CategorySelectorDrawer-SUgfE5GN.mjs} +1 -1
  11. package/dist/{ConnectDrawer-CuUj16NH.mjs → ConnectDrawer-KL8t1qSC.mjs} +1 -1
  12. package/dist/{ConnectionsDrawer-Bz4uwdFE.mjs → ConnectionsDrawer-DaK5uIL5.mjs} +2 -2
  13. package/dist/{CurrencyInput-BFKcs-_K.mjs → CurrencyInput-itK0R3wV.mjs} +1 -1
  14. package/dist/{DebtsStore-Bu8rRRSL.mjs → DebtsStore-DVPZbv2C.mjs} +1 -1
  15. package/dist/{ExportCsvAction-DzTrtPzk.mjs → ExportCsvAction-Cglo8Mca.mjs} +3 -3
  16. package/dist/{GoalStore-CrNhjvNc.mjs → GoalStore-o4rrjGSJ.mjs} +2 -2
  17. package/dist/{Help-BnPXM_N2.mjs → Help-BjLMsuMS.mjs} +1 -1
  18. package/dist/{LineChart-bc1D9xBE.mjs → LineChart-BQRxZF3p.mjs} +1 -1
  19. package/dist/{ListItemAction-uobBrm_a.mjs → ListItemAction-BxTkF6Tz.mjs} +1 -1
  20. package/dist/{ManageIncome-A69EUO5u.mjs → ManageIncome-rcnDYsBJ.mjs} +75 -75
  21. package/dist/{MicroWidgetContainer-DEiRnYVa.mjs → MicroWidgetContainer-B2hO9rOG.mjs} +1 -1
  22. package/dist/{MiniWidgetContainer-CmXpTylX.mjs → MiniWidgetContainer-98-hKFqm.mjs} +1 -1
  23. package/dist/{NetWorthStore-CpL_kqvx.mjs → NetWorthStore-DG2X69jG.mjs} +2 -2
  24. package/dist/{NotificationSettings-CNmJWVeI.mjs → NotificationSettings-C7FYNM7I.mjs} +250 -248
  25. package/dist/{OriginalBalanceAction-DK8_LkPz.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +3 -3
  26. package/dist/{RecurringSettings-B0uObPlD.mjs → RecurringSettings-C81H1l38.mjs} +3 -3
  27. package/dist/{SpendingLegend-Bf-wbJvb.mjs → SpendingLegend-DqZxN_BZ.mjs} +2 -2
  28. package/dist/{TransactionDetails-COH0OKNG.mjs → TransactionDetails-BA_E5nQ-.mjs} +5 -5
  29. package/dist/{TransactionStore-Dz-G8Wd0.mjs → TransactionStore-PRlwE-TF.mjs} +2 -2
  30. package/dist/{User-wXzDI4M8.mjs → User-Cnlegl1N.mjs} +1 -1
  31. package/dist/{ViewMoreMicroCard-C0832BMe.mjs → ViewMoreMicroCard-DfPXJzbv.mjs} +105 -101
  32. package/dist/{WidgetContainer-6dsjtOVg.mjs → WidgetContainer-CaPjoWeE.mjs} +2 -2
  33. package/dist/accounts/index.es.js +148 -140
  34. package/dist/analytics/index.es.js +2 -2
  35. package/dist/budgets/index.es.js +483 -478
  36. package/dist/cashflow/index.es.js +367 -362
  37. package/dist/categories/index.es.js +1 -1
  38. package/dist/common/hooks/index.d.ts +1 -0
  39. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  40. package/dist/common/index.es.js +35 -33
  41. package/dist/dashboard/index.es.js +90 -88
  42. package/dist/debts/index.es.js +346 -342
  43. package/dist/{exportTransactionsToCSV-Cz2t0lmA.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +1 -1
  44. package/dist/finstrong/index.es.js +352 -350
  45. package/dist/goals/index.es.js +518 -511
  46. package/dist/help/index.es.js +13 -9
  47. package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
  48. package/dist/investments/index.es.js +395 -393
  49. package/dist/merchants/index.es.js +1 -1
  50. package/dist/microinsights/index.es.js +1 -1
  51. package/dist/networth/index.es.js +245 -240
  52. package/dist/notifications/index.es.js +2 -2
  53. package/dist/recurringtransactions/index.es.js +293 -285
  54. package/dist/settings/index.es.js +252 -249
  55. package/dist/spending/index.es.js +136 -124
  56. package/dist/transactions/index.es.js +77 -73
  57. package/dist/trends/index.es.js +601 -588
  58. package/dist/{useAccountDisplayName-CMMlIOXF.mjs → useAccountDisplayName-Cjx8YmKK.mjs} +2 -2
  59. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  60. package/dist/useWidgetLoadTimer-C1NBkyLd.mjs +23 -0
  61. package/package.json +1 -1
@@ -3,44 +3,45 @@ import A, { useState as O } from "react";
3
3
  import { observer as P } from "mobx-react-lite";
4
4
  import _ from "@mui/material/Stack";
5
5
  import Ee from "@mui/material/Tab";
6
- import Ge from "@mui/material/Tabs";
7
- import { C as ge } from "../ConnectionsDrawer-Bz4uwdFE.mjs";
6
+ import Ne from "@mui/material/Tabs";
7
+ import { C as ge } from "../ConnectionsDrawer-DaK5uIL5.mjs";
8
8
  import pe from "@mui/material/useMediaQuery";
9
- import Me from "@mui/material/Box";
10
- import Ne from "@mui/material/Collapse";
9
+ import Ge from "@mui/material/Box";
10
+ import Me from "@mui/material/Collapse";
11
11
  import K from "@mui/material/Divider";
12
12
  import ee from "@mui/material/List";
13
13
  import te from "@mui/material/ListItem";
14
14
  import He from "@mui/material/ListItemButton";
15
15
  import xe from "@mui/material/ToggleButton";
16
16
  import ye from "@mui/material/ToggleButtonGroup";
17
- import { Text as i, H1 as fe, P as ve, InstitutionLogo as ne } from "@mxenabled/mxui";
17
+ import { Text as r, H1 as fe, P as ve, InstitutionLogo as ne } from "@mxenabled/mxui";
18
18
  import Ue from "@mui/material/Button";
19
- import { u as M, g as be, t as H, b as Q, d as se, n as je } from "../hooks-C41HAxM5.mjs";
20
- import { A as z, W as ze } from "../WidgetContainer-6dsjtOVg.mjs";
21
- import { a as Oe, f as oe } from "../NumberFormatting-DjTD0t3W.mjs";
19
+ import { u as G, g as be, s as H, b as Q, d as se } from "../hooks-ZMp65DFz.mjs";
20
+ import { A as z, W as je } from "../WidgetContainer-CaPjoWeE.mjs";
21
+ import { a as ze, f as oe } from "../NumberFormatting-DjTD0t3W.mjs";
22
22
  import { u as U } from "../useScreenSize-B6JyS_Lj.mjs";
23
23
  import le from "@mui/material/styles/useTheme";
24
24
  import { Icon as k } from "@mxenabled/mx-icons";
25
- import { D as Ve } from "../Donut-Dmy3JTWd.mjs";
26
- import { useTheme as Re } from "@mui/material/styles";
27
- import { f as Pe, A as V } from "../InvestmentUtil-jOyOgzIB.mjs";
28
- import Xe from "@mui/material/ListItemText";
25
+ import { D as Oe } from "../Donut-Dmy3JTWd.mjs";
26
+ import { useTheme as Ve } from "@mui/material/styles";
27
+ import { f as Re, A as V } from "../InvestmentUtil-jOyOgzIB.mjs";
28
+ import Pe from "@mui/material/ListItemText";
29
29
  import ce from "@mui/material/IconButton";
30
- import $e from "@mui/material/Tooltip";
30
+ import Xe from "@mui/material/Tooltip";
31
31
  import _e from "@mui/material/Accordion";
32
32
  import we from "@mui/material/AccordionDetails";
33
33
  import Ce from "@mui/material/AccordionSummary";
34
34
  import ie from "@mui/material/Paper";
35
- import x from "@mui/system/Stack";
35
+ import p from "@mui/system/Stack";
36
36
  import Se from "@mui/material/TextField";
37
- import { D as qe } from "../Drawer-BEtCk82g.mjs";
38
- import { DataGridPro as Ke } from "@mui/x-data-grid-pro";
39
- import { Stack as Ye } from "@mui/material";
37
+ import { D as $e } from "../Drawer-BEtCk82g.mjs";
38
+ import { DataGridPro as qe } from "@mui/x-data-grid-pro";
39
+ import { Stack as Ke } from "@mui/material";
40
40
  import { L as De } from "../Loader-DUaFpDGv.mjs";
41
+ import { u as Ye } from "../useWidgetLoadTimer-C1NBkyLd.mjs";
41
42
  import { E as Qe } from "../EmptyState-DoxNUae-.mjs";
42
43
  const de = ({ sx: t = {} }) => {
43
- const { investments: g } = M(), { onEvent: c } = be(), { setShowConnectionsWidget: u } = H();
44
+ const { investments: h } = G(), { onEvent: c } = be(), { setShowConnectionsWidget: u } = H();
44
45
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", gap: 24, height: 164, p: 24, width: "100%", ...t }, children: [
45
46
  /* @__PURE__ */ o(
46
47
  _,
@@ -53,9 +54,9 @@ const de = ({ sx: t = {} }) => {
53
54
  textAlign: "center"
54
55
  },
55
56
  children: [
56
- /* @__PURE__ */ e(i, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "Body", children: g.overview.investment_accounts_footer }),
57
+ /* @__PURE__ */ e(r, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "Body", children: h.overview.investment_accounts_footer }),
57
58
  /* @__PURE__ */ e(
58
- i,
59
+ r,
59
60
  {
60
61
  sx: {
61
62
  color: "text.secondary",
@@ -63,7 +64,7 @@ const de = ({ sx: t = {} }) => {
63
64
  fontWeight: 400
64
65
  },
65
66
  variant: "ParagraphSmall",
66
- children: g.overview.connect_more_accounts_description
67
+ children: h.overview.connect_more_accounts_description
67
68
  }
68
69
  )
69
70
  ]
@@ -77,7 +78,7 @@ const de = ({ sx: t = {} }) => {
77
78
  },
78
79
  sx: { fontWeight: 600 },
79
80
  variant: "outlined",
80
- children: g.overview.connect_accounts
81
+ children: h.overview.connect_accounts
81
82
  }
82
83
  )
83
84
  ] });
@@ -119,48 +120,48 @@ const de = ({ sx: t = {} }) => {
119
120
  {
120
121
  name: "allocations_unknown"
121
122
  }
122
- ], et = (t, g, c) => {
123
- const u = g, v = c;
124
- return t >= Math.min(u, v) && t < Math.max(u, v);
125
- }, tt = (t, g, c) => {
123
+ ], et = (t, h, c) => {
124
+ const u = h, x = c;
125
+ return t >= Math.min(u, x) && t < Math.max(u, x);
126
+ }, tt = (t, h, c) => {
126
127
  const u = [
127
- ...new Set(t.map((m) => m.name.toLowerCase()))
128
+ ...new Set(t.map((d) => d.name.toLowerCase()))
128
129
  ];
129
- let v;
130
- return u.map((m) => {
131
- const s = t.reduce((y, d) => {
132
- const b = d.name;
133
- return b.toLowerCase() === m ? (v = b, Y(d) * d[g] / 100 + y) : y;
130
+ let x;
131
+ return u.map((d) => {
132
+ const l = t.reduce((m, y) => {
133
+ const b = y.name;
134
+ return b.toLowerCase() === d ? (x = b, Y(y) * y[h] / 100 + m) : m;
134
135
  }, 0);
135
136
  return {
136
- displayName: v,
137
- name: v,
138
- value: s,
139
- percentage: s / c
137
+ displayName: x,
138
+ name: x,
139
+ value: l,
140
+ percentage: l / c
140
141
  };
141
142
  });
142
- }, Y = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, nt = (t, g, c) => {
143
- const u = Object.values(g.allocations_list), v = [];
144
- let f = 0;
145
- const m = t.map(({ guid: n }) => n), s = c.filter(({ account_guid: n }) => m.includes(n)).map((n) => ({
143
+ }, Y = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, nt = (t, h, c) => {
144
+ const u = Object.values(h.allocations_list), x = [];
145
+ let v = 0;
146
+ const d = t.map(({ guid: n }) => n), l = c.filter(({ account_guid: n }) => d.includes(n)).map((n) => ({
146
147
  ...n,
147
148
  name: n.symbol || n.description,
148
149
  gainLoss: n.cost_basis || n.cost_basis === 0 ? Y(n) - n.cost_basis : 0
149
- })), { cashBalance: y, totalAccountBalance: d } = t.reduce(
150
- (n, p) => ({
151
- cashBalance: n.cashBalance + (p.cash_balance || 0),
152
- totalAccountBalance: n.totalAccountBalance + (p.balance || 0)
150
+ })), { cashBalance: m, totalAccountBalance: y } = t.reduce(
151
+ (n, g) => ({
152
+ cashBalance: n.cashBalance + (g.cash_balance || 0),
153
+ totalAccountBalance: n.totalAccountBalance + (g.balance || 0)
153
154
  }),
154
155
  { cashBalance: 0, totalAccountBalance: 0 }
155
- ), { marketValue: b, totalGainLoss: l } = s.reduce(
156
- (n, p) => ({
157
- marketValue: n.marketValue + Y(p),
158
- totalGainLoss: n.totalGainLoss + p.gainLoss
156
+ ), { marketValue: b, totalGainLoss: s } = l.reduce(
157
+ (n, g) => ({
158
+ marketValue: n.marketValue + Y(g),
159
+ totalGainLoss: n.totalGainLoss + g.gainLoss
159
160
  }),
160
161
  { marketValue: 0, totalGainLoss: 0 }
161
- ), h = b + y;
162
- Ze.forEach((n, p) => {
163
- const C = s.filter(
162
+ ), f = b + m;
163
+ Ze.forEach((n, g) => {
164
+ const C = l.filter(
164
165
  (I) => !!I[n.name]
165
166
  );
166
167
  let S = C.reduce(
@@ -172,69 +173,69 @@ const de = ({ sx: t = {} }) => {
172
173
  n.name,
173
174
  S
174
175
  );
175
- if (n.name === "allocations_cash" && y > 0) {
176
- S += y;
176
+ if (n.name === "allocations_cash" && m > 0) {
177
+ S += m;
177
178
  const I = {
178
- displayName: g.cash_balance_display_name,
179
+ displayName: h.cash_balance_display_name,
179
180
  name: "allocations_name",
180
- value: y,
181
- percentage: y / h
181
+ value: m,
182
+ percentage: m / f
182
183
  };
183
184
  B.push(I);
184
185
  }
185
- S > 0 && (v.push({
186
+ S > 0 && (x.push({
186
187
  name: n.name,
187
- displayName: u[p],
188
- guid: `${n.name}-${p}`,
188
+ displayName: u[g],
189
+ guid: `${n.name}-${g}`,
189
190
  holdings: B,
190
- percentage: S / h,
191
+ percentage: S / f,
191
192
  value: S,
192
193
  color: Je[n.name]
193
- }), f += S);
194
+ }), v += S);
194
195
  });
195
- const r = v.map(
196
- ({ displayName: n, guid: p, color: C, value: S }) => ({
197
- id: p,
196
+ const i = x.map(
197
+ ({ displayName: n, guid: g, color: C, value: S }) => ({
198
+ id: g,
198
199
  color: C,
199
200
  label: n,
200
- value: S / f * 100
201
+ value: S / v * 100
201
202
  })
202
203
  );
203
204
  return {
204
- investmentsData: v,
205
- donutData: r,
206
- totalAmount: f,
207
- totalGainLoss: l,
208
- totalMarketValue: h,
209
- totalGainLossPercentage: l / d
205
+ investmentsData: x,
206
+ donutData: i,
207
+ totalAmount: v,
208
+ totalGainLoss: s,
209
+ totalMarketValue: f,
210
+ totalGainLossPercentage: s / y
210
211
  };
211
- }, re = (t) => t < 1e-3 ? "< 0.1%" : Oe(t), R = (t) => t === 0 ? oe(t, "0,0.00") : et(t, -0.01, 0.01) ? "< $0.01" : oe(t, "0,0.00"), ot = ({
212
+ }, re = (t) => t < 1e-3 ? "< 0.1%" : ze(t), R = (t) => t === 0 ? oe(t, "0,0.00") : et(t, -0.01, 0.01) ? "< $0.01" : oe(t, "0,0.00"), ot = ({
212
213
  data: t,
213
- onSelected: g,
214
+ onSelected: h,
214
215
  selectedId: c,
215
216
  selectedTabs: u,
216
- setSelectedTabs: v
217
+ setSelectedTabs: x
217
218
  }) => {
218
- const f = (l, h) => {
219
- h !== null && v(h);
220
- }, { isMobile: m } = U(), {
221
- investments: { allocation: s }
222
- } = M(), y = [
223
- { label: s.tabs_label_dollar, value: 0 },
224
- { label: s.tabs_label_percent, value: 1 }
225
- ], d = !t?.investmentsData.length, { isSmallMobile: b } = U();
226
- return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width: m ? 250 : 412 }, children: [
219
+ const v = (s, f) => {
220
+ f !== null && x(f);
221
+ }, { isMobile: d } = U(), {
222
+ investments: { allocation: l }
223
+ } = G(), m = [
224
+ { label: l.tabs_label_dollar, value: 0 },
225
+ { label: l.tabs_label_percent, value: 1 }
226
+ ], y = !t?.investmentsData.length, { isSmallMobile: b } = U();
227
+ return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width: d ? 250 : 412 }, children: [
227
228
  /* @__PURE__ */ e(
228
229
  ye,
229
230
  {
230
231
  exclusive: !0,
231
232
  fullWidth: !0,
232
- onChange: f,
233
- value: d ? -1 : u,
234
- children: y.map(({ label: l, value: h }) => /* @__PURE__ */ e(xe, { color: "primary", value: h, children: /* @__PURE__ */ e(i, { bold: !0, textTransform: "capitalize", variant: "Body", children: l }) }, l))
233
+ onChange: v,
234
+ value: y ? -1 : u,
235
+ children: m.map(({ label: s, value: f }) => /* @__PURE__ */ e(xe, { color: "primary", value: f, children: /* @__PURE__ */ e(r, { bold: !0, textTransform: "capitalize", variant: "Body", children: s }) }, s))
235
236
  }
236
237
  ),
237
- /* @__PURE__ */ e(ee, { sx: { px: 12 }, children: t.investmentsData.map((l) => /* @__PURE__ */ o(A.Fragment, { children: [
238
+ /* @__PURE__ */ e(ee, { sx: { px: 12 }, children: t.investmentsData.map((s) => /* @__PURE__ */ o(A.Fragment, { children: [
238
239
  /* @__PURE__ */ e(
239
240
  te,
240
241
  {
@@ -246,17 +247,17 @@ const de = ({ sx: t = {} }) => {
246
247
  children: /* @__PURE__ */ o(
247
248
  He,
248
249
  {
249
- "aria-expanded": c === l.guid,
250
- onClick: () => g(l.guid),
250
+ "aria-expanded": c === s.guid,
251
+ onClick: () => h(s.guid),
251
252
  sx: { minHeight: 44, px: 12, py: 0 },
252
253
  children: [
253
254
  /* @__PURE__ */ e(
254
- Me,
255
+ Ge,
255
256
  {
256
257
  borderRadius: 4,
257
258
  flexShrink: 0,
258
259
  height: 8,
259
- sx: { backgroundColor: l.color, mr: 8 },
260
+ sx: { backgroundColor: s.color, mr: 8 },
260
261
  width: 8
261
262
  }
262
263
  ),
@@ -268,8 +269,8 @@ const de = ({ sx: t = {} }) => {
268
269
  justifyContent: "space-between",
269
270
  width: "100%",
270
271
  children: [
271
- /* @__PURE__ */ e(i, { bold: c === l.guid, children: l.displayName }),
272
- /* @__PURE__ */ e(i, { bold: c === l.guid, variant: "Body", children: u === 0 ? R(l.value) : re(l.percentage) })
272
+ /* @__PURE__ */ e(r, { bold: c === s.guid, children: s.displayName }),
273
+ /* @__PURE__ */ e(r, { bold: c === s.guid, variant: "Body", children: u === 0 ? R(s.value) : re(s.percentage) })
273
274
  ]
274
275
  }
275
276
  )
@@ -279,8 +280,8 @@ const de = ({ sx: t = {} }) => {
279
280
  }
280
281
  ),
281
282
  /* @__PURE__ */ e(K, {}),
282
- l.holdings && l.holdings.length > 0 && /* @__PURE__ */ e(Ne, { in: c === l.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(ee, { children: [
283
- l?.holdings?.map((h) => /* @__PURE__ */ e(
283
+ s.holdings && s.holdings.length > 0 && /* @__PURE__ */ e(Me, { in: c === s.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(ee, { children: [
284
+ s?.holdings?.map((f) => /* @__PURE__ */ e(
284
285
  te,
285
286
  {
286
287
  sx: {
@@ -289,20 +290,20 @@ const de = ({ sx: t = {} }) => {
289
290
  py: 0
290
291
  },
291
292
  children: /* @__PURE__ */ o(_, { direction: "row", justifyContent: "space-between", width: "100%", children: [
292
- /* @__PURE__ */ o(i, { children: [
293
- h.displayName,
293
+ /* @__PURE__ */ o(r, { children: [
294
+ f.displayName,
294
295
  " "
295
296
  ] }),
296
- /* @__PURE__ */ e(i, { children: u === 0 ? R(h.value) : re(h.percentage) })
297
+ /* @__PURE__ */ e(r, { children: u === 0 ? R(f.value) : re(f.percentage) })
297
298
  ] })
298
299
  },
299
- h.displayName
300
+ f.displayName
300
301
  )),
301
302
  /* @__PURE__ */ e(K, {})
302
303
  ] }) })
303
- ] }, l.guid)) }),
304
- d ? /* @__PURE__ */ o(ae, { children: [
305
- /* @__PURE__ */ e(i, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: s.empty_data }),
304
+ ] }, s.guid)) }),
305
+ y ? /* @__PURE__ */ o(ae, { children: [
306
+ /* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: l.empty_data }),
306
307
  /* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
307
308
  /* @__PURE__ */ e(
308
309
  de,
@@ -312,40 +313,40 @@ const de = ({ sx: t = {} }) => {
312
313
  }
313
314
  }
314
315
  )
315
- ] }) : u === 0 && /* @__PURE__ */ e(i, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${s.total_label_text} ${R(t.totalAmount)}` })
316
+ ] }) : u === 0 && /* @__PURE__ */ e(r, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${l.total_label_text} ${R(t.totalAmount)}` })
316
317
  ] });
317
318
  }, it = ({
318
319
  data: t,
319
- hoveredId: g,
320
+ hoveredId: h,
320
321
  isPercentage: c,
321
322
  onMouseEnter: u,
322
- onMouseLeave: v,
323
- onSelected: f,
324
- selectedId: m,
325
- size: s = 150,
326
- totalLabel: y
323
+ onMouseLeave: x,
324
+ onSelected: v,
325
+ selectedId: d,
326
+ size: l = 150,
327
+ totalLabel: m
327
328
  }) => {
328
- const d = le(), b = d.palette.mode === "dark", l = A.useMemo(
329
- () => m ? t.investmentsData.find(({ guid: B }) => B === m) : void 0,
330
- [m]
329
+ const y = le(), b = y.palette.mode === "dark", s = A.useMemo(
330
+ () => d ? t.investmentsData.find(({ guid: B }) => B === d) : void 0,
331
+ [d]
331
332
  ), {
332
- investments: { allocation: h }
333
- } = M(), r = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: d.palette.border.light, value: 100 }], [t, d]), n = b ? "#0AC295" : "#09A57F", p = b ? "grey.300" : "grey.700", C = () => l ? h.pie_chart_centered_click_for_details : c ? re(t.totalGainLossPercentage) : R(t.totalGainLoss), S = t.totalGainLoss >= 0 ? n : p;
333
+ investments: { allocation: f }
334
+ } = G(), i = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: y.palette.border.light, value: 100 }], [t, y]), n = b ? "#0AC295" : "#09A57F", g = b ? "grey.300" : "grey.700", C = () => s ? f.pie_chart_centered_click_for_details : c ? re(t.totalGainLossPercentage) : R(t.totalGainLoss), S = t.totalGainLoss >= 0 ? n : g;
334
335
  return /* @__PURE__ */ e(
335
- Ve,
336
+ Oe,
336
337
  {
337
- data: r,
338
- hoveredId: g,
339
- onClick: f,
338
+ data: i,
339
+ hoveredId: h,
340
+ onClick: v,
340
341
  onMouseEnter: u,
341
- onMouseLeave: v,
342
- selectedId: m,
343
- size: s,
344
- children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight: s, minWidth: s, children: /* @__PURE__ */ o(_, { alignItems: "center", sx: { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } }, children: [
345
- /* @__PURE__ */ e(i, { color: "text.secondary", noWrap: !0, children: l?.displayName ?? y }),
346
- /* @__PURE__ */ e(fe, { color: "text.primary", children: R(l?.value ?? t.totalMarketValue) }),
342
+ onMouseLeave: x,
343
+ selectedId: d,
344
+ size: l,
345
+ children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight: l, minWidth: l, children: /* @__PURE__ */ o(_, { alignItems: "center", sx: { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } }, children: [
346
+ /* @__PURE__ */ e(r, { color: "text.secondary", noWrap: !0, children: s?.displayName ?? m }),
347
+ /* @__PURE__ */ e(fe, { color: "text.primary", children: R(s?.value ?? t.totalMarketValue) }),
347
348
  /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
348
- !l && /* @__PURE__ */ e(
349
+ !s && /* @__PURE__ */ e(
349
350
  k,
350
351
  {
351
352
  name: t.totalGainLoss >= 0 ? "trending_up" : "trending_down",
@@ -354,7 +355,7 @@ const de = ({ sx: t = {} }) => {
354
355
  }
355
356
  ),
356
357
  /* @__PURE__ */ e(
357
- i,
358
+ r,
358
359
  {
359
360
  sx: {
360
361
  color: S,
@@ -369,20 +370,20 @@ const de = ({ sx: t = {} }) => {
369
370
  }
370
371
  );
371
372
  }, rt = () => {
372
- const [t, g] = A.useState(0), [c, u] = A.useState(""), [v, f] = A.useState(""), m = (n) => {
373
- c !== n ? u(n) : (u(""), f(""));
374
- }, { selectedAccountGuids: s } = Q(), { visibleHoldings: y } = H(), { visibleInvestmentAccounts: d } = se(), {
373
+ const [t, h] = A.useState(0), [c, u] = A.useState(""), [x, v] = A.useState(""), d = (n) => {
374
+ c !== n ? u(n) : (u(""), v(""));
375
+ }, { selectedAccountGuids: l } = Q(), { visibleHoldings: m } = H(), { visibleInvestmentAccounts: y } = se(), {
375
376
  investments: { allocation: b }
376
- } = M(), l = nt(
377
- d.filter(({ guid: n }) => s.includes(n)),
377
+ } = G(), s = nt(
378
+ y.filter(({ guid: n }) => l.includes(n)),
378
379
  b,
379
- y
380
- ), { isMobile: h } = U(), r = pe("(max-width:768px)");
380
+ m
381
+ ), { isMobile: f } = U(), i = pe("(max-width:768px)");
381
382
  return /* @__PURE__ */ o(
382
383
  _,
383
384
  {
384
- alignItems: r ? "center" : "flex-start",
385
- direction: r ? "column" : "row",
385
+ alignItems: i ? "center" : "flex-start",
386
+ direction: i ? "column" : "row",
386
387
  gap: { xs: 16, md: 64, xl: 100 },
387
388
  sx: {
388
389
  justifyContent: "center",
@@ -393,29 +394,29 @@ const de = ({ sx: t = {} }) => {
393
394
  /* @__PURE__ */ e(
394
395
  it,
395
396
  {
396
- data: l,
397
- hoveredId: v,
397
+ data: s,
398
+ hoveredId: x,
398
399
  isPercentage: t === 1,
399
400
  onMouseEnter: (n) => {
400
- c === n ? f("") : c || f(n);
401
+ c === n ? v("") : c || v(n);
401
402
  },
402
403
  onMouseLeave: () => {
403
- f("");
404
+ v("");
404
405
  },
405
- onSelected: m,
406
+ onSelected: d,
406
407
  selectedId: c,
407
- size: h ? 280 : 400,
408
+ size: f ? 280 : 400,
408
409
  totalLabel: b.pie_chart_centered_text
409
410
  }
410
411
  ),
411
412
  /* @__PURE__ */ e(
412
413
  ot,
413
414
  {
414
- data: l,
415
- onSelected: m,
415
+ data: s,
416
+ onSelected: d,
416
417
  selectedId: c,
417
418
  selectedTabs: t,
418
- setSelectedTabs: g
419
+ setSelectedTabs: h
419
420
  }
420
421
  )
421
422
  ]
@@ -423,15 +424,15 @@ const de = ({ sx: t = {} }) => {
423
424
  );
424
425
  }, at = P(rt), st = ({
425
426
  analysisDetails: t,
426
- analysisType: g,
427
+ analysisType: h,
427
428
  copy: c,
428
429
  setAnalysisType: u
429
430
  }) => {
430
- const { isSmallMobile: v } = U(), f = A.useMemo(() => Object.keys(t).filter((s) => t[s] >= 1).map((s) => ({
431
- key: s,
432
- value: oe(t[s], "0,0"),
433
- formattedKey: Pe(s)
434
- })), [t]), m = [
431
+ const { isSmallMobile: x } = U(), v = A.useMemo(() => Object.keys(t).filter((l) => t[l] >= 1).map((l) => ({
432
+ key: l,
433
+ value: oe(t[l], "0,0"),
434
+ formattedKey: Re(l)
435
+ })), [t]), d = [
435
436
  { label: c.equities, value: V.Stocks },
436
437
  { label: c.bonds, value: V.Bonds }
437
438
  ];
@@ -441,7 +442,7 @@ const de = ({ sx: t = {} }) => {
441
442
  {
442
443
  color: "primary",
443
444
  exclusive: !0,
444
- onChange: (s, y) => y && u(y),
445
+ onChange: (l, m) => m && u(m),
445
446
  sx: {
446
447
  width: "100%",
447
448
  "& .MuiToggleButton-root": {
@@ -450,11 +451,11 @@ const de = ({ sx: t = {} }) => {
450
451
  textTransform: "capitalize"
451
452
  }
452
453
  },
453
- value: f.length ? g : -1,
454
- children: m.map(({ label: s, value: y }) => /* @__PURE__ */ e(xe, { sx: { width: "100%" }, value: y, children: s }, y))
454
+ value: v.length ? h : -1,
455
+ children: d.map(({ label: l, value: m }) => /* @__PURE__ */ e(xe, { sx: { width: "100%" }, value: m, children: l }, m))
455
456
  }
456
457
  ),
457
- f.length ? /* @__PURE__ */ e(
458
+ v.length ? /* @__PURE__ */ e(
458
459
  ee,
459
460
  {
460
461
  sx: {
@@ -462,55 +463,55 @@ const de = ({ sx: t = {} }) => {
462
463
  "& .MuiListItem-divider": { borderColor: "border.light" },
463
464
  "& .MuiListItem-root": { minHeight: 44, px: 12 }
464
465
  },
465
- children: f.map(({ value: s, formattedKey: y }) => /* @__PURE__ */ e(te, { divider: !0, secondaryAction: /* @__PURE__ */ e(i, { children: s }), children: /* @__PURE__ */ e(
466
- Xe,
466
+ children: v.map(({ value: l, formattedKey: m }) => /* @__PURE__ */ e(te, { divider: !0, secondaryAction: /* @__PURE__ */ e(r, { children: l }), children: /* @__PURE__ */ e(
467
+ Pe,
467
468
  {
468
- primary: y,
469
+ primary: m,
469
470
  primaryTypographyProps: { fontStyle: "normal" }
470
471
  }
471
- ) }, y))
472
+ ) }, m))
472
473
  }
473
474
  ) : /* @__PURE__ */ o(ae, { children: [
474
- /* @__PURE__ */ e(i, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: c.empty_data }),
475
+ /* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: c.empty_data }),
475
476
  /* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
476
477
  /* @__PURE__ */ e(
477
478
  de,
478
479
  {
479
480
  sx: {
480
- ".inner-container": { width: v ? "100%" : 364 }
481
+ ".inner-container": { width: x ? "100%" : 364 }
481
482
  }
482
483
  }
483
484
  )
484
485
  ] })
485
486
  ] });
486
- }, lt = ({ body: t, title: g }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
487
- /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: g }),
487
+ }, lt = ({ body: t, title: h }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
488
+ /* @__PURE__ */ e(r, { bold: !0, variant: "Body", children: h }),
488
489
  /* @__PURE__ */ e(ve, { variant: "ParagraphSmall", children: t })
489
490
  ] }), ct = ({
490
491
  placement: t = "bottom",
491
- tooltip_info_body: g,
492
+ tooltip_info_body: h,
492
493
  tooltip_info_title: c
493
494
  }) => /* @__PURE__ */ e(
494
- $e,
495
+ Xe,
495
496
  {
496
497
  enterTouchDelay: 500,
497
498
  placement: t,
498
- title: /* @__PURE__ */ e(lt, { body: g, title: c }),
499
+ title: /* @__PURE__ */ e(lt, { body: h, title: c }),
499
500
  children: /* @__PURE__ */ e(ce, { "aria-label": c, sx: { minHeight: 0, minWidth: 0, p: 0 }, children: /* @__PURE__ */ e(k, { name: "info", sx: { color: "info.main" } }) })
500
501
  }
501
502
  ), dt = () => {
502
503
  const {
503
504
  investments: { analysis: t }
504
- } = M(), { analysisChartData: g, analysisDetails: c, analysisType: u, setAnalysisType: v } = H(), f = pe("(min-width:320px) and (max-width:375px)"), { isMobile: m } = U(), y = Re().palette.mode === "dark", { cellDimension: d, columns: b, rows: l, textVariant: h } = A.useMemo(() => {
505
- const r = u === V.Stocks, n = Object.values(r ? t.stock_column_labels : t.bond_column_labels), p = Object.values(r ? t.stock_row_labels : t.bond_row_labels);
506
- return { cellDimension: m ? 72 : 100, columns: n, rows: p, textVariant: m ? "XSmall" : "Body" };
507
- }, [t, m, u]);
505
+ } = G(), { analysisChartData: h, analysisDetails: c, analysisType: u, setAnalysisType: x } = H(), v = pe("(min-width:320px) and (max-width:375px)"), { isMobile: d } = U(), m = Ve().palette.mode === "dark", { cellDimension: y, columns: b, rows: s, textVariant: f } = A.useMemo(() => {
506
+ const i = u === V.Stocks, n = Object.values(i ? t.stock_column_labels : t.bond_column_labels), g = Object.values(i ? t.stock_row_labels : t.bond_row_labels);
507
+ return { cellDimension: d ? 72 : 100, columns: n, rows: g, textVariant: d ? "XSmall" : "Body" };
508
+ }, [t, d, u]);
508
509
  return /* @__PURE__ */ o(
509
510
  _,
510
511
  {
511
512
  sx: {
512
513
  flexDirection: { md: "row" },
513
- gap: m ? 48 : 64,
514
+ gap: d ? 48 : 64,
514
515
  justifyContent: "center",
515
516
  pt: 48,
516
517
  px: 16
@@ -531,34 +532,34 @@ const de = ({ sx: t = {} }) => {
531
532
  {
532
533
  sx: {
533
534
  alignItems: "center",
534
- bottom: m ? 10 : 24,
535
- gap: m ? 0 : 24,
535
+ bottom: d ? 10 : 24,
536
+ gap: d ? 0 : 24,
536
537
  position: "relative",
537
538
  transform: "rotate(-180deg)",
538
539
  writingMode: "vertical-rl"
539
540
  },
540
541
  children: [
541
- /* @__PURE__ */ e(ve, { bold: !0, color: "secondary.main", variant: h, children: u === V.Stocks ? t.market_capitalization : t.credit_quality }),
542
+ /* @__PURE__ */ e(ve, { bold: !0, color: "secondary.main", variant: f, children: u === V.Stocks ? t.market_capitalization : t.credit_quality }),
542
543
  /* @__PURE__ */ e(
543
544
  _,
544
545
  {
545
546
  sx: {
546
547
  flexDirection: "row",
547
- height: m ? 224 : 308,
548
+ height: d ? 224 : 308,
548
549
  justifyContent: "space-around"
549
550
  },
550
- children: b.map((r) => /* @__PURE__ */ e(
551
- i,
551
+ children: b.map((i) => /* @__PURE__ */ e(
552
+ r,
552
553
  {
553
554
  sx: {
554
555
  color: "secondary.main",
555
556
  pl: 12,
556
- pr: m ? 4 : 0
557
+ pr: d ? 4 : 0
557
558
  },
558
- variant: h,
559
- children: r
559
+ variant: f,
560
+ children: i
560
561
  },
561
- r
562
+ i
562
563
  ))
563
564
  }
564
565
  )
@@ -570,13 +571,13 @@ const de = ({ sx: t = {} }) => {
570
571
  _,
571
572
  {
572
573
  sx: {
573
- alignSelf: f ? "start" : "center",
574
+ alignSelf: v ? "start" : "center",
574
575
  flexDirection: "row",
575
576
  gap: 8,
576
577
  pb: 12
577
578
  },
578
579
  children: [
579
- /* @__PURE__ */ e(i, { bold: !0, children: t.invest_analysis }),
580
+ /* @__PURE__ */ e(r, { bold: !0, children: t.invest_analysis }),
580
581
  /* @__PURE__ */ e(
581
582
  ct,
582
583
  {
@@ -587,33 +588,33 @@ const de = ({ sx: t = {} }) => {
587
588
  ]
588
589
  }
589
590
  ),
590
- g.map((r, n, p) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: r.map((C, S) => {
591
- const B = n === 0, I = n === p.length - 1, W = S === 0, G = S === r.length - 1, F = Number(C.replace("%", "")) >= 25;
591
+ h.map((i, n, g) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: i.map((C, S) => {
592
+ const B = n === 0, I = n === g.length - 1, W = S === 0, N = S === i.length - 1, F = Number(C.replace("%", "")) >= 25;
592
593
  let T = "grey.200", j = "grey.900";
593
- return y ? (T = F ? "grey.200" : "grey.700", j = F ? "grey.900" : "common.white") : (T = F ? "grey.700" : "grey.200", j = F ? "common.white" : "grey.900"), /* @__PURE__ */ e(
594
+ return m ? (T = F ? "grey.200" : "grey.700", j = F ? "grey.900" : "common.white") : (T = F ? "grey.700" : "grey.200", j = F ? "common.white" : "grey.900"), /* @__PURE__ */ e(
594
595
  _,
595
596
  {
596
597
  sx: {
597
598
  ...{
598
599
  borderBottomLeftRadius: I && W ? 4 : 0,
599
- borderBottomRightRadius: I && G ? 4 : 0,
600
+ borderBottomRightRadius: I && N ? 4 : 0,
600
601
  borderTopLeftRadius: B && W ? 4 : 0,
601
- borderTopRightRadius: B && G ? 4 : 0
602
+ borderTopRightRadius: B && N ? 4 : 0
602
603
  },
603
604
  alignItems: "center",
604
605
  bgcolor: T,
605
- height: d,
606
+ height: y,
606
607
  justifyContent: "center",
607
- width: d
608
+ width: y
608
609
  },
609
610
  children: /* @__PURE__ */ e(
610
- i,
611
+ r,
611
612
  {
612
613
  sx: {
613
614
  color: j,
614
- fontWeight: m ? 600 : 700
615
+ fontWeight: d ? 600 : 700
615
616
  },
616
- variant: m ? "Body" : "H3",
617
+ variant: d ? "Body" : "H3",
617
618
  children: C
618
619
  }
619
620
  )
@@ -621,13 +622,13 @@ const de = ({ sx: t = {} }) => {
621
622
  S
622
623
  );
623
624
  }) }, n)),
624
- /* @__PURE__ */ e(_, { sx: { alignSelf: "center", flexDirection: "row", pt: 12 }, children: l.map((r) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", width: d }, children: /* @__PURE__ */ e(i, { color: "secondary.main", variant: h, children: r }) }, r)) }),
625
+ /* @__PURE__ */ e(_, { sx: { alignSelf: "center", flexDirection: "row", pt: 12 }, children: s.map((i) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", width: y }, children: /* @__PURE__ */ e(r, { color: "secondary.main", variant: f, children: i }) }, i)) }),
625
626
  /* @__PURE__ */ e(
626
- i,
627
+ r,
627
628
  {
628
629
  bold: !0,
629
- sx: { color: "secondary.main", pt: m ? 4 : 24, textAlign: "center" },
630
- variant: h,
630
+ sx: { color: "secondary.main", pt: d ? 4 : 24, textAlign: "center" },
631
+ variant: f,
631
632
  children: u === V.Stocks ? t.valuation : t.duration
632
633
  }
633
634
  )
@@ -645,7 +646,7 @@ const de = ({ sx: t = {} }) => {
645
646
  equities: t.equities,
646
647
  bonds: t.bonds
647
648
  },
648
- setAnalysisType: v
649
+ setAnalysisType: x
649
650
  }
650
651
  )
651
652
  ]
@@ -653,30 +654,30 @@ const de = ({ sx: t = {} }) => {
653
654
  );
654
655
  }, mt = P(dt), ut = ({
655
656
  accountHoldingsData: t,
656
- currentEditedCostBasis: g,
657
+ currentEditedCostBasis: h,
657
658
  editingHoldingId: c,
658
659
  handleCostBasisBlur: u,
659
- handleCostBasisClick: v,
660
- handleCostBasisChange: f,
661
- handleCostBasisKeyDown: m,
662
- isOpen: s,
663
- onClose: y
660
+ handleCostBasisClick: x,
661
+ handleCostBasisChange: v,
662
+ handleCostBasisKeyDown: d,
663
+ isOpen: l,
664
+ onClose: m
664
665
  }) => {
665
- const { investments: d } = M(), [b, l] = A.useState({}), h = (r) => (n, p) => {
666
- l((C) => ({
666
+ const { investments: y } = G(), [b, s] = A.useState({}), f = (i) => (n, g) => {
667
+ s((C) => ({
667
668
  ...C,
668
- [r]: p
669
+ [i]: g
669
670
  }));
670
671
  };
671
672
  return /* @__PURE__ */ o(
672
- qe,
673
+ $e,
673
674
  {
674
- ariaLabelClose: d.overview.close_investment_drawer,
675
- isOpen: s,
676
- onClose: y,
677
- title: d.overview.investment_details,
675
+ ariaLabelClose: y.overview.close_investment_drawer,
676
+ isOpen: l,
677
+ onClose: m,
678
+ title: y.overview.investment_details,
678
679
  children: [
679
- /* @__PURE__ */ o(x, { sx: { gap: 8, p: 24 }, children: [
680
+ /* @__PURE__ */ o(p, { sx: { gap: 8, p: 24 }, children: [
680
681
  /* @__PURE__ */ e(
681
682
  ne,
682
683
  {
@@ -685,11 +686,11 @@ const de = ({ sx: t = {} }) => {
685
686
  size: 64
686
687
  }
687
688
  ),
688
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Small", children: t.accounts.memberName }),
689
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "H2", children: t.accounts.user_name || t.accounts.name }),
690
- /* @__PURE__ */ o(x, { sx: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [
691
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: d.overview.current_balance }),
692
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: t.accounts.balance?.toLocaleString("en-US", {
689
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Small", children: t.accounts.memberName }),
690
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "H2", children: t.accounts.user_name || t.accounts.name }),
691
+ /* @__PURE__ */ o(p, { sx: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [
692
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: y.overview.current_balance }),
693
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: t.accounts.balance?.toLocaleString("en-US", {
693
694
  currency: "USD",
694
695
  maximumFractionDigits: 2,
695
696
  minimumFractionDigits: 2,
@@ -698,7 +699,7 @@ const de = ({ sx: t = {} }) => {
698
699
  ] })
699
700
  ] }),
700
701
  /* @__PURE__ */ o(
701
- x,
702
+ p,
702
703
  {
703
704
  sx: {
704
705
  bgcolor: "background.default",
@@ -708,19 +709,19 @@ const de = ({ sx: t = {} }) => {
708
709
  py: 10
709
710
  },
710
711
  children: [
711
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: d.overview.holding }),
712
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: d.overview.market_value })
712
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: y.overview.holding }),
713
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: y.overview.market_value })
713
714
  ]
714
715
  }
715
716
  ),
716
- t.holdings?.map((r, n) => {
717
- const p = c === r.id;
717
+ t.holdings?.map((i, n) => {
718
+ const g = c === i.id;
718
719
  return /* @__PURE__ */ o(
719
720
  _e,
720
721
  {
721
722
  disableGutters: !0,
722
- expanded: b[r.id] === !0,
723
- onChange: r ? h(r?.id) : () => {
723
+ expanded: b[i.id] === !0,
724
+ onChange: i ? f(i?.id) : () => {
724
725
  },
725
726
  sx: {
726
727
  ":before": n === 0 ? { opacity: 0 } : {},
@@ -734,15 +735,15 @@ const de = ({ sx: t = {} }) => {
734
735
  id: "panel1a-header",
735
736
  sx: [
736
737
  { height: 64 },
737
- b[r.id] && n > 0 && {
738
+ b[i.id] && n > 0 && {
738
739
  borderTop: 1,
739
740
  borderColor: "border.main"
740
741
  }
741
742
  ],
742
- children: /* @__PURE__ */ o(x, { sx: { flexDirection: "row", width: "100%" }, children: [
743
+ children: /* @__PURE__ */ o(p, { sx: { flexDirection: "row", width: "100%" }, children: [
743
744
  /* @__PURE__ */ e("div", { style: { width: 24 } }),
744
745
  /* @__PURE__ */ o(
745
- x,
746
+ p,
746
747
  {
747
748
  sx: [
748
749
  {
@@ -753,28 +754,28 @@ const de = ({ sx: t = {} }) => {
753
754
  py: 14,
754
755
  width: "100%"
755
756
  },
756
- b[r.id] && {
757
+ b[i.id] && {
757
758
  borderBottom: 1,
758
759
  borderColor: "border.main"
759
760
  }
760
761
  ],
761
762
  children: [
762
763
  /* @__PURE__ */ e(
763
- x,
764
+ p,
764
765
  {
765
766
  sx: {
766
767
  alignItems: "center",
767
768
  flexDirection: "row",
768
769
  gap: 12
769
770
  },
770
- children: /* @__PURE__ */ o(x, { sx: { overflow: "hidden", width: 98 }, children: [
771
- /* @__PURE__ */ e(i, { sx: { fontWeight: 600 }, variant: "Body", children: r.holding }),
772
- /* @__PURE__ */ e(i, { variant: "XSmall", children: r.description })
771
+ children: /* @__PURE__ */ o(p, { sx: { overflow: "hidden", width: 98 }, children: [
772
+ /* @__PURE__ */ e(r, { sx: { fontWeight: 600 }, variant: "Body", children: i.holding }),
773
+ /* @__PURE__ */ e(r, { variant: "XSmall", children: i.description })
773
774
  ] })
774
775
  }
775
776
  ),
776
777
  /* @__PURE__ */ o(
777
- x,
778
+ p,
778
779
  {
779
780
  sx: {
780
781
  alignItems: "center",
@@ -784,47 +785,47 @@ const de = ({ sx: t = {} }) => {
784
785
  justifyContent: "flex-end"
785
786
  },
786
787
  children: [
787
- /* @__PURE__ */ o(x, { children: [
788
- /* @__PURE__ */ e(i, { sx: { fontWeight: 600, textAlign: "right" }, variant: "Body", children: r.marketValue?.toLocaleString("en-US", {
788
+ /* @__PURE__ */ o(p, { children: [
789
+ /* @__PURE__ */ e(r, { sx: { fontWeight: 600, textAlign: "right" }, variant: "Body", children: i.marketValue?.toLocaleString("en-US", {
789
790
  currency: "USD",
790
791
  maximumFractionDigits: 2,
791
792
  minimumFractionDigits: 2,
792
793
  style: "currency"
793
794
  }) }),
794
- /* @__PURE__ */ o(x, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
795
- r.totalGainLoss !== 0 && /* @__PURE__ */ e(
795
+ /* @__PURE__ */ o(p, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
796
+ i.totalGainLoss !== 0 && /* @__PURE__ */ e(
796
797
  k,
797
798
  {
798
- name: r.totalGainLoss >= 0 ? "trending_up" : "trending_down",
799
+ name: i.totalGainLoss >= 0 ? "trending_up" : "trending_down",
799
800
  size: 12,
800
801
  sx: {
801
802
  verticalAlign: "middle",
802
803
  mr: 1,
803
- color: r.totalGainLoss >= 0 ? "success.main" : "grey.700"
804
+ color: i.totalGainLoss >= 0 ? "success.main" : "grey.700"
804
805
  }
805
806
  }
806
807
  ),
807
808
  /* @__PURE__ */ e(
808
- i,
809
+ r,
809
810
  {
810
811
  sx: {
811
- color: r.totalGainLoss <= 0 ? "grey.700" : "success.main",
812
- fontWeight: r.totalGainLoss <= 0 ? 400 : 700
812
+ color: i.totalGainLoss <= 0 ? "grey.700" : "success.main",
813
+ fontWeight: i.totalGainLoss <= 0 ? 400 : 700
813
814
  },
814
815
  variant: "XSmall",
815
- children: r.costBasis ? `${(r.totalGainLoss / r.costBasis * 100).toFixed(2)}%` : "0.00%"
816
+ children: i.costBasis ? `${(i.totalGainLoss / i.costBasis * 100).toFixed(2)}%` : "0.00%"
816
817
  }
817
818
  ),
818
- /* @__PURE__ */ e(i, { sx: { color: "grey.700" }, variant: "XSmall", children: "|" }),
819
+ /* @__PURE__ */ e(r, { sx: { color: "grey.700" }, variant: "XSmall", children: "|" }),
819
820
  /* @__PURE__ */ e(
820
- i,
821
+ r,
821
822
  {
822
823
  sx: {
823
- color: r.totalGainLoss <= 0 ? "grey.700" : "success.main",
824
- fontWeight: r.totalGainLoss <= 0 ? 400 : 700
824
+ color: i.totalGainLoss <= 0 ? "grey.700" : "success.main",
825
+ fontWeight: i.totalGainLoss <= 0 ? 400 : 700
825
826
  },
826
827
  variant: "XSmall",
827
- children: Math.abs(r.totalGainLoss).toLocaleString("en-US", {
828
+ children: Math.abs(i.totalGainLoss).toLocaleString("en-US", {
828
829
  currency: "USD",
829
830
  maximumFractionDigits: 2,
830
831
  minimumFractionDigits: 2,
@@ -837,7 +838,7 @@ const de = ({ sx: t = {} }) => {
837
838
  /* @__PURE__ */ e(
838
839
  k,
839
840
  {
840
- name: b[r.id] ? "expand_less" : "expand_more",
841
+ name: b[i.id] ? "expand_less" : "expand_more",
841
842
  size: 20
842
843
  }
843
844
  )
@@ -851,7 +852,7 @@ const de = ({ sx: t = {} }) => {
851
852
  }
852
853
  ),
853
854
  /* @__PURE__ */ e(we, { children: /* @__PURE__ */ o(
854
- x,
855
+ p,
855
856
  {
856
857
  sx: {
857
858
  alignItems: "center",
@@ -860,10 +861,10 @@ const de = ({ sx: t = {} }) => {
860
861
  pl: 24
861
862
  },
862
863
  children: [
863
- /* @__PURE__ */ e(x, { sx: { width: 32 } }),
864
- /* @__PURE__ */ o(x, { sx: { flex: 1 }, children: [
864
+ /* @__PURE__ */ e(p, { sx: { width: 32 } }),
865
+ /* @__PURE__ */ o(p, { sx: { flex: 1 }, children: [
865
866
  /* @__PURE__ */ o(
866
- x,
867
+ p,
867
868
  {
868
869
  sx: {
869
870
  alignItems: "center",
@@ -875,13 +876,13 @@ const de = ({ sx: t = {} }) => {
875
876
  pr: 24
876
877
  },
877
878
  children: [
878
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Body", children: d.overview.quantity }),
879
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Small", children: r.qty })
879
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: y.overview.quantity }),
880
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Small", children: i.qty })
880
881
  ]
881
882
  }
882
883
  ),
883
884
  /* @__PURE__ */ o(
884
- x,
885
+ p,
885
886
  {
886
887
  sx: {
887
888
  alignItems: "center",
@@ -891,9 +892,9 @@ const de = ({ sx: t = {} }) => {
891
892
  pr: 24
892
893
  },
893
894
  children: [
894
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Body", children: d.overview.cost_basis_header }),
895
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: y.overview.cost_basis_header }),
895
896
  /* @__PURE__ */ o(
896
- x,
897
+ p,
897
898
  {
898
899
  direction: "row",
899
900
  sx: {
@@ -901,13 +902,13 @@ const de = ({ sx: t = {} }) => {
901
902
  gap: 4
902
903
  },
903
904
  children: [
904
- p ? /* @__PURE__ */ e(
905
+ g ? /* @__PURE__ */ e(
905
906
  Se,
906
907
  {
907
908
  autoFocus: !0,
908
- onBlur: () => u(r.id),
909
- onChange: f,
910
- onKeyDown: (C) => m(C, r.id),
909
+ onBlur: () => u(i.id),
910
+ onChange: v,
911
+ onKeyDown: (C) => d(C, i.id),
911
912
  size: "small",
912
913
  sx: {
913
914
  fontSize: 14,
@@ -922,9 +923,9 @@ const de = ({ sx: t = {} }) => {
922
923
  border: "none"
923
924
  }
924
925
  },
925
- value: g
926
+ value: h
926
927
  }
927
- ) : /* @__PURE__ */ e(i, { sx: { fontSize: 14, width: 58 }, variant: "Small", children: r.costBasis?.toLocaleString("en-US", {
928
+ ) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 58 }, variant: "Small", children: i.costBasis?.toLocaleString("en-US", {
928
929
  currency: "USD",
929
930
  maximumFractionDigits: 2,
930
931
  minimumFractionDigits: 2,
@@ -933,7 +934,7 @@ const de = ({ sx: t = {} }) => {
933
934
  /* @__PURE__ */ e(
934
935
  ce,
935
936
  {
936
- onClick: () => v(r.id, r.costBasis),
937
+ onClick: () => x(i.id, i.costBasis),
937
938
  sx: { minWidth: 16, minHeight: 16 },
938
939
  children: /* @__PURE__ */ e(k, { name: "stylus", size: 16, sx: { color: "grey.700" } })
939
940
  }
@@ -950,28 +951,28 @@ const de = ({ sx: t = {} }) => {
950
951
  ) })
951
952
  ]
952
953
  },
953
- r.id
954
+ i.id
954
955
  );
955
956
  })
956
957
  ]
957
958
  }
958
959
  );
959
- }, ht = P(ut), q = (t) => /* @__PURE__ */ o(Ye, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
960
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "Small", children: t.colDef.headerName }),
960
+ }, ht = P(ut), q = (t) => /* @__PURE__ */ o(Ke, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
961
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "Small", children: t.colDef.headerName }),
961
962
  /* @__PURE__ */ e(k, { name: "expand_all", size: 12 })
962
963
  ] }), gt = ({
963
964
  data: t,
964
- editingHoldingId: g,
965
+ editingHoldingId: h,
965
966
  currentEditedCostBasis: c,
966
967
  handleCostBasisClick: u,
967
- handleCostBasisChange: v,
968
- handleCostBasisKeyDown: f,
969
- handleCostBasisBlur: m
968
+ handleCostBasisChange: x,
969
+ handleCostBasisKeyDown: v,
970
+ handleCostBasisBlur: d
970
971
  }) => {
971
- const { investments: s } = M(), d = le().palette.mode === "dark", b = "success.main", l = d ? "grey.300" : "grey.700", h = (n, p = "lesserThan") => p === "greaterThan" ? n >= 0 ? b : l : n <= 0 ? l : b, r = [
972
+ const { investments: l } = G(), y = le().palette.mode === "dark", b = "success.main", s = y ? "grey.300" : "grey.700", f = (n, g = "lesserThan") => g === "greaterThan" ? n >= 0 ? b : s : n <= 0 ? s : b, i = [
972
973
  {
973
974
  field: "qty",
974
- headerName: s.overview.qty_header,
975
+ headerName: l.overview.qty_header,
975
976
  sortable: !1,
976
977
  width: 48,
977
978
  align: "center",
@@ -979,29 +980,29 @@ const de = ({ sx: t = {} }) => {
979
980
  },
980
981
  {
981
982
  field: "holding",
982
- headerName: s.overview.holding_header,
983
+ headerName: l.overview.holding_header,
983
984
  flex: 1,
984
985
  renderHeader: q,
985
986
  renderCell: (n) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", gap: 16, flexDirection: "row" }, children: /* @__PURE__ */ o(_, { children: [
986
- /* @__PURE__ */ e(i, { sx: { fontWeight: 700 }, children: n.row.holding }),
987
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary", fontWeight: 400 }, variant: "tiny", children: n.row.description })
987
+ /* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, children: n.row.holding }),
988
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontWeight: 400 }, variant: "tiny", children: n.row.description })
988
989
  ] }) })
989
990
  },
990
991
  {
991
992
  field: "costBasis",
992
- headerName: s.overview.cost_basis_header,
993
+ headerName: l.overview.cost_basis_header,
993
994
  width: 132,
994
995
  renderHeader: q,
995
996
  renderCell: (n) => {
996
- const p = g === n.row.id;
997
+ const g = h === n.row.id;
997
998
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
998
- p ? /* @__PURE__ */ e(
999
+ g ? /* @__PURE__ */ e(
999
1000
  Se,
1000
1001
  {
1001
1002
  autoFocus: !0,
1002
- onBlur: () => m(n.row.id),
1003
- onChange: v,
1004
- onKeyDown: (C) => f(C, n.row.id),
1003
+ onBlur: () => d(n.row.id),
1004
+ onChange: x,
1005
+ onKeyDown: (C) => v(C, n.row.id),
1005
1006
  size: "small",
1006
1007
  sx: {
1007
1008
  fontSize: 14,
@@ -1018,7 +1019,7 @@ const de = ({ sx: t = {} }) => {
1018
1019
  },
1019
1020
  value: c
1020
1021
  }
1021
- ) : /* @__PURE__ */ e(i, { sx: { fontSize: 14, width: 57 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1022
+ ) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 57 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1022
1023
  currency: "USD",
1023
1024
  maximumFractionDigits: 2,
1024
1025
  minimumFractionDigits: 2,
@@ -1039,11 +1040,11 @@ const de = ({ sx: t = {} }) => {
1039
1040
  },
1040
1041
  {
1041
1042
  field: "totalGainLoss",
1042
- headerName: s.overview.total_gain_loss_header,
1043
+ headerName: l.overview.total_gain_loss_header,
1043
1044
  width: 196,
1044
1045
  renderHeader: q,
1045
1046
  renderCell: (n) => {
1046
- const p = n.row.costBasis, C = p ? n.row.totalGainLoss / p * 100 : 0;
1047
+ const g = n.row.costBasis, C = g ? n.row.totalGainLoss / g * 100 : 0;
1047
1048
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
1048
1049
  n.value !== 0 && /* @__PURE__ */ e(
1049
1050
  k,
@@ -1051,29 +1052,29 @@ const de = ({ sx: t = {} }) => {
1051
1052
  name: n.value > 0 ? "trending_up" : "trending_down",
1052
1053
  size: 16,
1053
1054
  sx: {
1054
- color: h(n.value),
1055
+ color: f(n.value),
1055
1056
  mr: 1,
1056
1057
  verticalAlign: "middle"
1057
1058
  }
1058
1059
  }
1059
1060
  ),
1060
1061
  /* @__PURE__ */ e(
1061
- i,
1062
+ r,
1062
1063
  {
1063
1064
  sx: {
1064
- color: h(n.value),
1065
+ color: f(n.value),
1065
1066
  fontWeight: n.value > 0 ? 700 : 400
1066
1067
  },
1067
1068
  variant: "Small",
1068
- children: p ? `${C.toFixed(2)}%` : "0.00%"
1069
+ children: g ? `${C.toFixed(2)}%` : "0.00%"
1069
1070
  }
1070
1071
  ),
1071
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1072
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1072
1073
  /* @__PURE__ */ e(
1073
- i,
1074
+ r,
1074
1075
  {
1075
1076
  sx: {
1076
- color: h(n.value),
1077
+ color: f(n.value),
1077
1078
  fontWeight: n.value > 0 ? 700 : 400
1078
1079
  },
1079
1080
  variant: "Small",
@@ -1093,10 +1094,10 @@ const de = ({ sx: t = {} }) => {
1093
1094
  },
1094
1095
  {
1095
1096
  field: "marketValue",
1096
- headerName: s.overview.market_value_header,
1097
+ headerName: l.overview.market_value_header,
1097
1098
  width: 132,
1098
1099
  renderHeader: q,
1099
- renderCell: (n) => /* @__PURE__ */ e(i, { sx: { fontWeight: 700 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1100
+ renderCell: (n) => /* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1100
1101
  currency: "USD",
1101
1102
  maximumFractionDigits: 2,
1102
1103
  minimumFractionDigits: 2,
@@ -1114,9 +1115,9 @@ const de = ({ sx: t = {} }) => {
1114
1115
  width: "100%"
1115
1116
  },
1116
1117
  children: /* @__PURE__ */ e(
1117
- Ke,
1118
+ qe,
1118
1119
  {
1119
- columns: r,
1120
+ columns: i,
1120
1121
  disableColumnFilter: !0,
1121
1122
  disableColumnMenu: !0,
1122
1123
  disableRowSelectionOnClick: !0,
@@ -1128,10 +1129,10 @@ const de = ({ sx: t = {} }) => {
1128
1129
  }
1129
1130
  );
1130
1131
  }, pt = () => {
1131
- const { isMobile: t } = U(), [g, c] = O({}), [u, v] = O(!1), { selectedAccountGuids: f } = Q(), { visibleHoldings: m, updateHoldings: s } = H(), [y, d] = A.useState(!1), [b, l] = O({
1132
+ const { isMobile: t } = U(), [h, c] = O({}), [u, x] = O(!1), { selectedAccountGuids: v } = Q(), { visibleHoldings: d, updateHoldings: l } = H(), [m, y] = A.useState(!1), [b, s] = O({
1132
1133
  accounts: [],
1133
1134
  holdings: []
1134
- }), { accounts: h, investments: r } = M(), { isCopyLoaded: n } = Q(), [p, C] = O(null), [S, B] = O(""), W = le().palette.mode === "dark", G = W ? "#0AC295" : "#09A57F", F = W ? "grey.300" : "grey.700", T = (a, w = "lesserThan") => w === "greaterThan" ? a >= 0 ? G : F : a <= 0 ? F : G, j = (a, w) => {
1135
+ }), { accounts: f, investments: i } = G(), { isCopyLoaded: n } = Q(), [g, C] = O(null), [S, B] = O(""), W = le().palette.mode === "dark", N = W ? "#0AC295" : "#09A57F", F = W ? "grey.300" : "grey.700", T = (a, w = "lesserThan") => w === "greaterThan" ? a >= 0 ? N : F : a <= 0 ? F : N, j = (a, w) => {
1135
1136
  C(a), B(w.toFixed(2));
1136
1137
  }, J = (a) => {
1137
1138
  const w = a.target.value;
@@ -1139,44 +1140,44 @@ const de = ({ sx: t = {} }) => {
1139
1140
  }, me = (a, w) => {
1140
1141
  a.key === "Enter" ? Z(w) : a.key === "Escape" && C(null);
1141
1142
  }, Z = (a) => {
1142
- const w = m.find(({ guid: E }) => E === a);
1143
+ const w = d.find(({ guid: E }) => E === a);
1143
1144
  if (!w) return;
1144
- const N = Number(S);
1145
- if (s({ ...w, cost_basis: N }), t) {
1145
+ const M = Number(S);
1146
+ if (l({ ...w, cost_basis: M }), t) {
1146
1147
  const E = b.holdings.map(
1147
- (D) => D.id === a ? { ...D, costBasis: N } : D
1148
+ (D) => D.id === a ? { ...D, costBasis: M } : D
1148
1149
  );
1149
- l((D) => ({
1150
+ s((D) => ({
1150
1151
  ...D,
1151
1152
  holdings: E
1152
1153
  }));
1153
1154
  }
1154
1155
  C(null);
1155
- }, Le = (a) => (w, N) => {
1156
+ }, Le = (a) => (w, M) => {
1156
1157
  c((E) => ({
1157
1158
  ...E,
1158
- [a]: N
1159
+ [a]: M
1159
1160
  }));
1160
1161
  }, { visibleHoldings: ue } = H(), { visibleInvestmentAccounts: Ie } = se(), X = Ie.filter(
1161
- ({ guid: a }) => f.includes(a)
1162
+ ({ guid: a }) => v.includes(a)
1162
1163
  ), Ae = X.reduce((a, w) => a + (w.balance || 0), 0), Be = X.map(({ guid: a }) => a), $ = ue.filter(
1163
1164
  ({ account_guid: a }) => Be.includes(a)
1164
1165
  ).reduce((a, w) => {
1165
- const N = w.market_value ? w.market_value - (w.cost_basis || 0) : 0;
1166
- return a + N;
1166
+ const M = w.market_value ? w.market_value - (w.cost_basis || 0) : 0;
1167
+ return a + M;
1167
1168
  }, 0), Te = () => {
1168
- v(!1);
1169
+ x(!1);
1169
1170
  };
1170
- return n ? /* @__PURE__ */ o(x, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
1171
- !!X.length && /* @__PURE__ */ o(x, { sx: { alignItems: "center" }, children: [
1172
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, children: r.overview.total_portfolio }),
1171
+ return n ? /* @__PURE__ */ o(p, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
1172
+ !!X.length && /* @__PURE__ */ o(p, { sx: { alignItems: "center" }, children: [
1173
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, children: i.overview.total_portfolio }),
1173
1174
  /* @__PURE__ */ e(fe, { children: Ae.toLocaleString("en-US", {
1174
1175
  currency: "USD",
1175
1176
  maximumFractionDigits: 2,
1176
1177
  minimumFractionDigits: 2,
1177
1178
  style: "currency"
1178
1179
  }) }),
1179
- /* @__PURE__ */ o(x, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
1180
+ /* @__PURE__ */ o(p, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
1180
1181
  /* @__PURE__ */ e(
1181
1182
  k,
1182
1183
  {
@@ -1186,7 +1187,7 @@ const de = ({ sx: t = {} }) => {
1186
1187
  }
1187
1188
  ),
1188
1189
  /* @__PURE__ */ e(
1189
- i,
1190
+ r,
1190
1191
  {
1191
1192
  sx: { color: T($, "greaterThan"), fontWeight: 700 },
1192
1193
  variant: "Small",
@@ -1209,7 +1210,7 @@ const de = ({ sx: t = {} }) => {
1209
1210
  totalGainLoss: L.market_value ? L.market_value - (L.cost_basis || 0) : 0,
1210
1211
  marketValue: L.market_value || 0,
1211
1212
  description: L.description || ""
1212
- })), N = w.length > 0, E = a.balance, D = w.reduce(
1213
+ })), M = w.length > 0, E = a.balance, D = w.reduce(
1213
1214
  (L, Fe) => Fe.totalGainLoss + L,
1214
1215
  0
1215
1216
  ), he = E ? D / E * 100 : 0;
@@ -1218,7 +1219,7 @@ const de = ({ sx: t = {} }) => {
1218
1219
  ie,
1219
1220
  {
1220
1221
  onClick: w.length ? () => {
1221
- v(!0), l({
1222
+ x(!0), s({
1222
1223
  holdings: w,
1223
1224
  accounts: a
1224
1225
  });
@@ -1228,7 +1229,7 @@ const de = ({ sx: t = {} }) => {
1228
1229
  overflow: "hidden"
1229
1230
  },
1230
1231
  children: /* @__PURE__ */ o(
1231
- x,
1232
+ p,
1232
1233
  {
1233
1234
  sx: {
1234
1235
  border: 1,
@@ -1241,7 +1242,7 @@ const de = ({ sx: t = {} }) => {
1241
1242
  },
1242
1243
  children: [
1243
1244
  /* @__PURE__ */ o(
1244
- x,
1245
+ p,
1245
1246
  {
1246
1247
  sx: {
1247
1248
  alignItems: "center",
@@ -1261,15 +1262,15 @@ const de = ({ sx: t = {} }) => {
1261
1262
  size: 32
1262
1263
  }
1263
1264
  ),
1264
- /* @__PURE__ */ o(x, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
1265
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1266
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1265
+ /* @__PURE__ */ o(p, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
1266
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1267
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1267
1268
  ] })
1268
1269
  ]
1269
1270
  }
1270
1271
  ),
1271
1272
  /* @__PURE__ */ o(
1272
- x,
1273
+ p,
1273
1274
  {
1274
1275
  sx: {
1275
1276
  alignItems: "center",
@@ -1280,7 +1281,7 @@ const de = ({ sx: t = {} }) => {
1280
1281
  },
1281
1282
  children: [
1282
1283
  /* @__PURE__ */ o(
1283
- x,
1284
+ p,
1284
1285
  {
1285
1286
  sx: {
1286
1287
  alignItems: "center",
@@ -1294,9 +1295,9 @@ const de = ({ sx: t = {} }) => {
1294
1295
  pt: 14
1295
1296
  },
1296
1297
  children: [
1297
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary", fontSize: 11 }, variant: "Small", children: r.overview.total_gain_Loss }),
1298
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontSize: 11 }, variant: "Small", children: i.overview.total_gain_Loss }),
1298
1299
  /* @__PURE__ */ o(
1299
- x,
1300
+ p,
1300
1301
  {
1301
1302
  sx: {
1302
1303
  alignItems: "center",
@@ -1314,7 +1315,7 @@ const de = ({ sx: t = {} }) => {
1314
1315
  }
1315
1316
  ),
1316
1317
  /* @__PURE__ */ o(
1317
- i,
1318
+ r,
1318
1319
  {
1319
1320
  sx: {
1320
1321
  color: T(D),
@@ -1327,9 +1328,9 @@ const de = ({ sx: t = {} }) => {
1327
1328
  ]
1328
1329
  }
1329
1330
  ),
1330
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1331
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1331
1332
  /* @__PURE__ */ e(
1332
- i,
1333
+ r,
1333
1334
  {
1334
1335
  sx: {
1335
1336
  color: T(D),
@@ -1351,7 +1352,7 @@ const de = ({ sx: t = {} }) => {
1351
1352
  }
1352
1353
  ),
1353
1354
  /* @__PURE__ */ o(
1354
- x,
1355
+ p,
1355
1356
  {
1356
1357
  sx: {
1357
1358
  alignItems: "center",
@@ -1363,8 +1364,8 @@ const de = ({ sx: t = {} }) => {
1363
1364
  pt: 14
1364
1365
  },
1365
1366
  children: [
1366
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: r.overview.total_value }),
1367
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
1367
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_value }),
1368
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
1368
1369
  currency: "USD",
1369
1370
  maximumFractionDigits: 2,
1370
1371
  minimumFractionDigits: 2,
@@ -1386,8 +1387,8 @@ const de = ({ sx: t = {} }) => {
1386
1387
  return /* @__PURE__ */ o(
1387
1388
  _e,
1388
1389
  {
1389
- expanded: g[a.guid] === !0,
1390
- onChange: N ? Le(a.guid) : () => {
1390
+ expanded: h[a.guid] === !0,
1391
+ onChange: M ? Le(a.guid) : () => {
1391
1392
  },
1392
1393
  sx: {
1393
1394
  border: 1,
@@ -1402,7 +1403,7 @@ const de = ({ sx: t = {} }) => {
1402
1403
  "aria-controls": "panel1a-content",
1403
1404
  id: "panel1a-header",
1404
1405
  sx: [
1405
- g[a.guid] && {
1406
+ h[a.guid] && {
1406
1407
  borderBottom: 1,
1407
1408
  borderColor: "border.main",
1408
1409
  maxHeight: 88
@@ -1410,7 +1411,7 @@ const de = ({ sx: t = {} }) => {
1410
1411
  ],
1411
1412
  children: [
1412
1413
  /* @__PURE__ */ o(
1413
- x,
1414
+ p,
1414
1415
  {
1415
1416
  sx: {
1416
1417
  alignItems: "center",
@@ -1429,18 +1430,18 @@ const de = ({ sx: t = {} }) => {
1429
1430
  size: 32
1430
1431
  }
1431
1432
  ),
1432
- /* @__PURE__ */ o(x, { sx: { alignItems: "flex-start" }, children: [
1433
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1434
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1433
+ /* @__PURE__ */ o(p, { sx: { alignItems: "flex-start" }, children: [
1434
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1435
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1435
1436
  ] })
1436
1437
  ]
1437
1438
  }
1438
1439
  ),
1439
- /* @__PURE__ */ o(x, { sx: { flexDirection: "row" }, children: [
1440
- /* @__PURE__ */ o(x, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
1441
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: r.overview.total_gain_Loss }),
1440
+ /* @__PURE__ */ o(p, { sx: { flexDirection: "row" }, children: [
1441
+ /* @__PURE__ */ o(p, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
1442
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_gain_Loss }),
1442
1443
  /* @__PURE__ */ o(
1443
- x,
1444
+ p,
1444
1445
  {
1445
1446
  sx: {
1446
1447
  alignItems: "center",
@@ -1458,7 +1459,7 @@ const de = ({ sx: t = {} }) => {
1458
1459
  }
1459
1460
  ),
1460
1461
  /* @__PURE__ */ o(
1461
- i,
1462
+ r,
1462
1463
  {
1463
1464
  sx: {
1464
1465
  color: T(D),
@@ -1471,9 +1472,9 @@ const de = ({ sx: t = {} }) => {
1471
1472
  ]
1472
1473
  }
1473
1474
  ),
1474
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1475
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1475
1476
  /* @__PURE__ */ e(
1476
- i,
1477
+ r,
1477
1478
  {
1478
1479
  sx: {
1479
1480
  color: T(D),
@@ -1492,9 +1493,9 @@ const de = ({ sx: t = {} }) => {
1492
1493
  }
1493
1494
  )
1494
1495
  ] }),
1495
- /* @__PURE__ */ e(x, { sx: { alignItems: "flex-end", gap: 12, pb: 14, pl: 16, pr: 16, pt: 14 }, children: /* @__PURE__ */ o(x, { sx: { alignItems: "flex-end" }, children: [
1496
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: r.overview.total_value }),
1497
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
1496
+ /* @__PURE__ */ e(p, { sx: { alignItems: "flex-end", gap: 12, pb: 14, pl: 16, pr: 16, pt: 14 }, children: /* @__PURE__ */ o(p, { sx: { alignItems: "flex-end" }, children: [
1497
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_value }),
1498
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
1498
1499
  currency: "USD",
1499
1500
  maximumFractionDigits: 2,
1500
1501
  minimumFractionDigits: 2,
@@ -1510,7 +1511,7 @@ const de = ({ sx: t = {} }) => {
1510
1511
  {
1511
1512
  currentEditedCostBasis: S,
1512
1513
  data: w,
1513
- editingHoldingId: p,
1514
+ editingHoldingId: g,
1514
1515
  handleCostBasisBlur: Z,
1515
1516
  handleCostBasisChange: J,
1516
1517
  handleCostBasisClick: j,
@@ -1528,7 +1529,7 @@ const de = ({ sx: t = {} }) => {
1528
1529
  {
1529
1530
  accountHoldingsData: b,
1530
1531
  currentEditedCostBasis: S,
1531
- editingHoldingId: p,
1532
+ editingHoldingId: g,
1532
1533
  handleCostBasisBlur: Z,
1533
1534
  handleCostBasisChange: J,
1534
1535
  handleCostBasisClick: j,
@@ -1540,71 +1541,72 @@ const de = ({ sx: t = {} }) => {
1540
1541
  /* @__PURE__ */ e(
1541
1542
  ge,
1542
1543
  {
1543
- onClose: () => d(!1),
1544
- showConnectionsWidget: y,
1545
- title: h.manage_connections
1544
+ onClose: () => y(!1),
1545
+ showConnectionsWidget: m,
1546
+ title: f.manage_connections
1546
1547
  }
1547
1548
  )
1548
1549
  ] }) : /* @__PURE__ */ e(De, {});
1549
- }, xt = P(pt), yt = ({ title: t }) => /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: t }), sn = P(({ onBackClick: t, sx: g }) => {
1550
- const { onEvent: c } = be(), { onLoad: u } = je(), { isMobile: v } = U(), { visibleInvestmentAccounts: f } = se(), {
1551
- visibleHoldings: m,
1552
- setShowConnectionsWidget: s,
1553
- showConnectionsWidget: y
1554
- } = H(), { investments: d, accounts: b } = M(), { isCopyLoaded: l, isInitialized: h, setSelectedAccounts: r } = Q(), [n, p] = A.useState(0), { loadHoldings: C } = H();
1555
- A.useEffect(() => {
1556
- r(f);
1557
- }, [f]), A.useEffect(() => {
1558
- h && C().finally(() => {
1559
- u?.("InvestmentsWidget");
1560
- });
1561
- }, [h]);
1550
+ }, xt = P(pt), yt = ({ title: t }) => /* @__PURE__ */ e(r, { bold: !0, variant: "Body", children: t }), ln = P(({ onBackClick: t, sx: h }) => {
1551
+ const { onEvent: c } = be(), { isMobile: u } = U(), { visibleInvestmentAccounts: x } = se(), {
1552
+ visibleHoldings: v,
1553
+ setShowConnectionsWidget: d,
1554
+ showConnectionsWidget: l
1555
+ } = H(), { investments: m, accounts: y } = G(), { isCopyLoaded: b, isInitialized: s, setSelectedAccounts: f } = Q(), [i, n] = A.useState(0), { loadHoldings: g, holdingsLoaded: C } = H();
1556
+ Ye({
1557
+ widgetName: "InvestmentsWidget",
1558
+ isLoaded: C
1559
+ }), A.useEffect(() => {
1560
+ f(x);
1561
+ }, [x]), A.useEffect(() => {
1562
+ s && g().finally();
1563
+ }, [s]);
1562
1564
  const S = () => {
1563
1565
  c(z.INVESTMENT_WIDGET_ACCOUNT_FILTER_CLICK);
1564
1566
  };
1565
- if (!l || !h) return /* @__PURE__ */ e(De, {});
1567
+ if (!b || !s) return /* @__PURE__ */ e(De, {});
1566
1568
  const B = [
1567
1569
  z.INVESTMENT_WIDGET_DETAILS_CLICK,
1568
1570
  z.INVESTMENT_WIDGET_ALLOCATION_CLICK,
1569
1571
  z.INVESTMENT_WIDGET_ANALYSIS_CLICK
1570
- ], I = f.length === 0 && m.length === 0, W = [
1571
- d.tab_overview_title,
1572
- d.tab_allocation_title,
1573
- d.tab_analysis_title
1572
+ ], I = x.length === 0 && v.length === 0, W = [
1573
+ m.tab_overview_title,
1574
+ m.tab_allocation_title,
1575
+ m.tab_analysis_title
1574
1576
  ];
1575
1577
  return /* @__PURE__ */ o(
1576
- ze,
1578
+ je,
1577
1579
  {
1578
- accountOptions: f,
1580
+ accountOptions: x,
1579
1581
  onAccountsFilterClick: S,
1580
1582
  onBackClick: t,
1581
- sx: g,
1582
- title: d.title,
1583
+ sx: h,
1584
+ title: m.title,
1583
1585
  children: [
1584
- /* @__PURE__ */ o(_, { mx: v ? 0 : 48, my: 24, children: [
1586
+ /* @__PURE__ */ o(_, { mx: u ? 0 : 48, my: 24, children: [
1585
1587
  /* @__PURE__ */ e(
1586
- Ge,
1588
+ Ne,
1587
1589
  {
1588
- onChange: (G, F) => {
1589
- p(F), c(B[F]);
1590
+ onChange: (N, F) => {
1591
+ n(F), c(B[F]);
1590
1592
  },
1591
1593
  sx: { bgcolor: "background.paper" },
1592
1594
  textColor: "primary",
1593
- value: I ? -1 : n,
1595
+ value: I ? -1 : i,
1594
1596
  variant: "fullWidth",
1595
- children: W.map((G) => /* @__PURE__ */ e(Ee, { disabled: I, label: /* @__PURE__ */ e(yt, { title: G }) }, G))
1597
+ children: W.map((N) => /* @__PURE__ */ e(Ee, { disabled: I, label: /* @__PURE__ */ e(yt, { title: N }) }, N))
1596
1598
  }
1597
1599
  ),
1598
1600
  I ? /* @__PURE__ */ e(
1599
1601
  Qe,
1600
1602
  {
1601
- header: d.empty_state_header,
1603
+ header: m.empty_state_header,
1602
1604
  icon: "bid_landscape",
1603
1605
  onClick: () => {
1604
- s(!0), c(z.ACCOUNTS_CLICK_CONNECT);
1606
+ d(!0), c(z.ACCOUNTS_CLICK_CONNECT);
1605
1607
  },
1606
- primaryButton: d.overview.connect_accounts,
1607
- subText: d.empty_state_description,
1608
+ primaryButton: m.overview.connect_accounts,
1609
+ subText: m.empty_state_description,
1608
1610
  sx: {
1609
1611
  width: { sm: 432 },
1610
1612
  ".buttons-footer": {
@@ -1618,17 +1620,17 @@ const de = ({ sx: t = {} }) => {
1618
1620
  }
1619
1621
  }
1620
1622
  ) : /* @__PURE__ */ o(ae, { children: [
1621
- n === 0 && /* @__PURE__ */ e(xt, {}),
1622
- n === 1 && /* @__PURE__ */ e(at, {}),
1623
- n === 2 && /* @__PURE__ */ e(mt, {})
1623
+ i === 0 && /* @__PURE__ */ e(xt, {}),
1624
+ i === 1 && /* @__PURE__ */ e(at, {}),
1625
+ i === 2 && /* @__PURE__ */ e(mt, {})
1624
1626
  ] })
1625
1627
  ] }),
1626
1628
  /* @__PURE__ */ e(
1627
1629
  ge,
1628
1630
  {
1629
- onClose: () => s(!1),
1630
- showConnectionsWidget: y,
1631
- title: b.manage_connections
1631
+ onClose: () => d(!1),
1632
+ showConnectionsWidget: l,
1633
+ title: y.manage_connections
1632
1634
  }
1633
1635
  )
1634
1636
  ]
@@ -1636,5 +1638,5 @@ const de = ({ sx: t = {} }) => {
1636
1638
  );
1637
1639
  });
1638
1640
  export {
1639
- sn as InvestmentsWidget
1641
+ ln as InvestmentsWidget
1640
1642
  };