@mx-cartographer/experiences 7.11.18 → 7.11.20

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [7.11.20] - 03-12-2026
2
+
3
+ - **FIXED** - `Finstrong` Chart Date Bug Fixed
4
+
5
+ ## [7.11.19] - 03-11-2026
6
+
7
+ - **ADDED** - A11y adjustments to chart markers, legends, tooltips
8
+
1
9
  ## [7.11.18] - 03-10-2026
2
10
 
3
11
  - **FIXED** - Filter ADA bug.
@@ -2,15 +2,15 @@ import { makeAutoObservable as E, runInAction as d } from "mobx";
2
2
  import { format as R } from "date-fns/format";
3
3
  import { fromUnixTime as b } from "date-fns/fromUnixTime";
4
4
  import { getUnixTime as T } from "date-fns/getUnixTime";
5
- import { subMonths as H } from "date-fns/subMonths";
6
- import { F as x, A as h } from "./Fetch-B6tMJC1r.mjs";
5
+ import { subMonths as v } from "date-fns/subMonths";
6
+ import { F as H, A as h } from "./Fetch-B6tMJC1r.mjs";
7
7
  import { jsx as c, jsxs as C } from "react/jsx-runtime";
8
- import { addDays as v } from "date-fns/addDays";
8
+ import { addDays as x } from "date-fns/addDays";
9
9
  import { addMonths as M } from "date-fns/addMonths";
10
10
  import { addYears as G } from "date-fns/addYears";
11
11
  import { differenceInDays as L } from "date-fns/differenceInDays";
12
12
  import { differenceInMonths as w } from "date-fns/differenceInMonths";
13
- import { differenceInWeeks as A } from "date-fns/differenceInWeeks";
13
+ import { differenceInWeeks as y } from "date-fns/differenceInWeeks";
14
14
  import { startOfToday as N } from "date-fns/startOfToday";
15
15
  import { ChevronRight as P, Check as k } from "@mxenabled/mx-icons";
16
16
  import $ from "react";
@@ -22,8 +22,8 @@ import U from "@mui/material/ListItem";
22
22
  import X from "@mui/material/ListItemAvatar";
23
23
  import V from "@mui/material/ListItemButton";
24
24
  import W from "@mui/material/ListItemText";
25
- import { Text as y } from "@mxenabled/mxui";
26
- import { f as O, D as _ } from "./DateFormats-BMpMrZpW.mjs";
25
+ import { Text as A } from "@mxenabled/mxui";
26
+ import { f as I, D as O } from "./DateFormats-BMpMrZpW.mjs";
27
27
  import { b as j } from "./Localization-CPkpIwIx.mjs";
28
28
  import { f as q } from "./NumberFormatting-QCaNwbjv.mjs";
29
29
  const m = {
@@ -53,7 +53,7 @@ const m = {
53
53
  OFF_TRACK: "OFF TRACK",
54
54
  MISSING: "MISSING DATA"
55
55
  };
56
- var I = /* @__PURE__ */ ((e) => (e.Connections = "connections", e.CreditScore = "credit_score", e.DateOfBirth = "date_of_birth", e.MonthlyIncome = "monthly_income", e))(I || {});
56
+ var _ = /* @__PURE__ */ ((e) => (e.Connections = "connections", e.CreditScore = "credit_score", e.DateOfBirth = "date_of_birth", e.MonthlyIncome = "monthly_income", e))(_ || {});
57
57
  const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(
58
58
  Y,
59
59
  {
@@ -63,14 +63,14 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
63
63
  pr: 24
64
64
  }
65
65
  },
66
- children: e.map((n, r) => /* @__PURE__ */ C($.Fragment, { children: [
67
- /* @__PURE__ */ c(U, { secondaryAction: /* @__PURE__ */ c(P, {}), children: /* @__PURE__ */ C(V, { onClick: () => t(n.key), children: [
66
+ children: e.map((r, n) => /* @__PURE__ */ C($.Fragment, { children: [
67
+ /* @__PURE__ */ c(U, { secondaryAction: /* @__PURE__ */ c(P, {}), children: /* @__PURE__ */ C(V, { onClick: () => t(r.key), children: [
68
68
  /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
69
69
  z,
70
70
  {
71
71
  sx: {
72
72
  bgcolor: "primary.main",
73
- ...!n.isComplete && {
73
+ ...!r.isComplete && {
74
74
  bgcolor: "transparent",
75
75
  borderColor: "action.active",
76
76
  borderStyle: "solid",
@@ -78,19 +78,19 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
78
78
  color: "action.active"
79
79
  }
80
80
  },
81
- children: n.icon
81
+ children: r.icon
82
82
  }
83
83
  ) }),
84
84
  /* @__PURE__ */ c(
85
85
  W,
86
86
  {
87
- primary: /* @__PURE__ */ c(y, { sx: { color: "text.secondary" }, variant: "caption", children: n.primaryText }),
88
- secondary: /* @__PURE__ */ c(y, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: n.secondaryText })
87
+ primary: /* @__PURE__ */ c(A, { sx: { color: "text.secondary" }, variant: "caption", children: r.primaryText }),
88
+ secondary: /* @__PURE__ */ c(A, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: r.secondaryText })
89
89
  }
90
90
  )
91
91
  ] }) }),
92
- /* @__PURE__ */ c(B, { sx: { color: "divider", ml: r === e.length - 1 ? 0 : 68 } })
93
- ] }, n.key))
92
+ /* @__PURE__ */ c(B, { sx: { color: "divider", ml: n === e.length - 1 ? 0 : 68 } })
93
+ ] }, r.key))
94
94
  }
95
95
  ) }), Gt = J, Lt = (e) => e * (180 / Math.PI), wt = (e, t) => [
96
96
  {
@@ -129,86 +129,86 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
129
129
  GOOD: "#FFC02C",
130
130
  VERY_GOOD: "#29C76B",
131
131
  EXCEPTIONAL: "#008A5A"
132
- }, Nt = (e, t, n) => e >= 300 && e < 580 ? {
133
- status: n.poor,
132
+ }, Nt = (e, t, r) => e >= 300 && e < 580 ? {
133
+ status: r.poor,
134
134
  color: t ? u.POOR : g.POOR
135
135
  } : e >= 580 && e < 670 ? {
136
- status: n.fair,
136
+ status: r.fair,
137
137
  color: t ? u.FAIR : g.FAIR
138
138
  } : e >= 670 && e < 740 ? {
139
- status: n.good,
139
+ status: r.good,
140
140
  color: t ? u.GOOD : g.GOOD
141
141
  } : e >= 740 && e < 800 ? {
142
- status: n.very_good,
142
+ status: r.very_good,
143
143
  color: t ? u.VERY_GOOD : g.VERY_GOOD
144
144
  } : e >= 800 && e <= 850 ? {
145
- status: n.exceptional,
145
+ status: r.exceptional,
146
146
  color: t ? u.EXCEPTIONAL : g.EXCEPTIONAL
147
- } : { status: n.missing_data }, Pt = (e, t, n, r) => {
147
+ } : { status: r.missing_data }, Pt = (e, t, r, n) => {
148
148
  const o = e.reduce((i, l) => i + l.value, 0);
149
149
  let a = 0;
150
150
  const s = e.map((i) => {
151
- const l = i.value / o * t, p = n + a, f = p + l;
151
+ const l = i.value / o * t, p = r + a, f = p + l;
152
152
  return a += l, {
153
153
  ...i,
154
154
  startAngle: p,
155
155
  endAngle: f
156
156
  };
157
157
  });
158
- return [s[r].startAngle, s[r].endAngle];
159
- }, kt = (e, t, n, r, o) => {
158
+ return [s[n].startAngle, s[n].endAngle];
159
+ }, kt = (e, t, r, n, o) => {
160
160
  let a = 0, s = 0;
161
- const i = Math.floor(r), l = r - i;
162
- return i > n ? (a = e, s = t) : i === n && l > 0 && (a = e, s = o), [a, s];
163
- }, $t = (e, t, n = 0) => {
164
- const r = e * Math.sin(t - n), o = -e * Math.cos(t - n);
165
- return [r, o];
161
+ const i = Math.floor(n), l = n - i;
162
+ return i > r ? (a = e, s = t) : i === r && l > 0 && (a = e, s = o), [a, s];
163
+ }, $t = (e, t, r = 0) => {
164
+ const n = e * Math.sin(t - r), o = -e * Math.cos(t - r);
165
+ return [n, o];
166
166
  }, zt = ({
167
167
  dynamicCopy: e,
168
168
  fallbackLabel: t,
169
- icon: n,
170
- key: r,
169
+ icon: r,
170
+ key: n,
171
171
  label: o,
172
172
  value: a
173
173
  }) => {
174
- const s = !!a, i = s ? Q(r, a) : e && j(e, t) || t;
174
+ const s = !!a, i = s ? Q(n, a) : e && j(e, t) || t;
175
175
  return {
176
- icon: s ? /* @__PURE__ */ c(k, {}) : n,
176
+ icon: s ? /* @__PURE__ */ c(k, {}) : r,
177
177
  isComplete: s,
178
- key: r,
178
+ key: n,
179
179
  primaryText: o,
180
180
  secondaryText: i
181
181
  };
182
182
  }, Q = (e, t) => ({
183
- [I.DateOfBirth]: (r) => R(new Date(Number(r) * 1e3), "MMM d, yyyy"),
184
- [I.MonthlyIncome]: (r) => q(Number(r), "0.00")
183
+ [_.DateOfBirth]: (n) => R(new Date(Number(n) * 1e3), "MMM d, yyyy"),
184
+ [_.MonthlyIncome]: (n) => q(Number(n), "0.00")
185
185
  })[e]?.(t) ?? String(t), Kt = (e) => e !== null ? Math.round(e * 100) : null, Bt = (e) => {
186
186
  const t = new Date((/* @__PURE__ */ new Date()).getFullYear(), e - 1, 1);
187
- return O(t, _.MONTH_SHORT);
187
+ return I(t, O.MONTH_SHORT);
188
188
  }, Yt = (e) => {
189
- const { good: t, poor: n } = m.daysOfCashOnHand;
190
- return e === null ? "MISSING" : e >= t ? "GOOD" : e >= n ? "FAIR" : "OFF_TRACK";
189
+ const { good: t, poor: r } = m.daysOfCashOnHand;
190
+ return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
191
191
  }, Ut = (e) => {
192
- const { good: t, poor: n } = m.emergencySavings;
193
- return e === null ? "MISSING" : e >= t ? "GOOD" : e >= n ? "FAIR" : "OFF_TRACK";
192
+ const { good: t, poor: r } = m.emergencySavings;
193
+ return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
194
194
  }, Xt = (e) => {
195
- const { good: t, poor: n } = m.spendToIncomeRatio;
196
- return e === null ? "MISSING" : e < t ? "GOOD" : e < n ? "FAIR" : "OFF_TRACK";
195
+ const { good: t, poor: r } = m.spendToIncomeRatio;
196
+ return e === null ? "MISSING" : e < t ? "GOOD" : e < r ? "FAIR" : "OFF_TRACK";
197
197
  }, Vt = (e) => {
198
- const { good: t, poor: n } = m.debtToIncomeRatio;
199
- return e === null ? "MISSING" : e <= t ? "GOOD" : e <= n ? "FAIR" : "OFF_TRACK";
198
+ const { good: t, poor: r } = m.debtToIncomeRatio;
199
+ return e === null ? "MISSING" : e <= t ? "GOOD" : e <= r ? "FAIR" : "OFF_TRACK";
200
200
  }, Wt = (e) => {
201
- const { good: t, poor: n } = m.creditScore;
202
- return e === null ? "MISSING" : e >= t ? "GOOD" : e >= n ? "FAIR" : "OFF_TRACK";
201
+ const { good: t, poor: r } = m.creditScore;
202
+ return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
203
203
  }, Z = (e) => e === null ? "MISSING" : e === 0 ? "GOOD" : "OFF_TRACK", jt = (e, t) => {
204
- const n = Z(e), r = {
204
+ const r = Z(e), n = {
205
205
  GOOD: t.count_good_description,
206
206
  OFF_TRACK: t.count_off_track_description,
207
207
  MISSING: t.count_missing_description
208
208
  };
209
209
  return {
210
- cardState: n,
211
- description: r[n],
210
+ cardState: r,
211
+ description: n[r],
212
212
  title: t.count_card_title
213
213
  };
214
214
  }, qt = (e) => ({
@@ -216,14 +216,14 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
216
216
  [S.FAIR]: { backgroundColor: "warning.lighter", color: "warning.dark" },
217
217
  [S.OFF_TRACK]: { backgroundColor: "error.lighter", color: "error.dark" },
218
218
  [S.MISSING]: { backgroundColor: "divider", color: "text.secondary" }
219
- })[e], tt = 1, et = 1, nt = {
219
+ })[e], tt = 1, et = 1, rt = {
220
220
  1: M,
221
221
  2: G,
222
- 3: v
223
- }, rt = {
222
+ 3: x
223
+ }, nt = {
224
224
  1: w,
225
- 2: (e, t) => A(e, t) / 2,
226
- 3: A,
225
+ 2: (e, t) => y(e, t) / 2,
226
+ 3: y,
227
227
  4: L
228
228
  }, D = [
229
229
  { contributionPeriodIndex: 3, targetAmount: 6, upperLimit: 500 },
@@ -232,44 +232,44 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
232
232
  ], Jt = ({
233
233
  contribution: e,
234
234
  goalAmount: t,
235
- goalPeriod: n,
236
- targetPeriod: r,
235
+ goalPeriod: r,
236
+ targetPeriod: n,
237
237
  totalSaved: o
238
238
  }) => {
239
239
  const a = t - o;
240
240
  if (a <= 0) return 0;
241
- const s = N(), i = nt[r], l = rt[e];
241
+ const s = N(), i = rt[n], l = nt[e];
242
242
  if (!i || !l) return a;
243
- const p = i(s, n), f = l(p, s);
243
+ const p = i(s, r), f = l(p, s);
244
244
  return Math.max(a / (f || 1), 1);
245
- }, Qt = (e) => !e || e <= 0 ? "0%" : e >= 1e3 ? "100%" : `${Math.round(e / 10)}%`, Zt = (e) => D.find((n) => e < n.upperLimit)?.targetAmount ?? et, te = (e) => D.find((r) => e < r.upperLimit)?.contributionPeriodIndex ?? tt, ee = (e, t) => [...e].sort((r, o) => r.year === o.year ? r.month - o.month : r.year - o.year).map((r) => ({
246
- x: O(new Date(0, r.month - 1, 1), _.MONTH_SHORT),
247
- y: r[t]
248
- })), ot = (e) => e.sort((t, n) => t.monthly_health_score_average.month - n.monthly_health_score_average.month).map((t) => ({
249
- x: O(
245
+ }, Qt = (e) => !e || e <= 0 ? "0%" : e >= 1e3 ? "100%" : `${Math.round(e / 10)}%`, Zt = (e) => D.find((r) => e < r.upperLimit)?.targetAmount ?? et, te = (e) => D.find((n) => e < n.upperLimit)?.contributionPeriodIndex ?? tt, ee = (e, t) => [...e].sort((n, o) => n.year === o.year ? n.month - o.month : n.year - o.year).map((n) => ({
246
+ x: I(new Date(0, n.month - 1, 1), O.MONTH_SHORT),
247
+ y: n[t]
248
+ })), ot = (e) => e.sort((t, r) => t.monthly_health_score_average.year !== r.monthly_health_score_average.year ? t.monthly_health_score_average.year - r.monthly_health_score_average.year : t.monthly_health_score_average.month - r.monthly_health_score_average.month).map((t) => ({
249
+ x: I(
250
250
  new Date(0, t.monthly_health_score_average.month - 1, 1),
251
- _.MONTH_SHORT
251
+ O.MONTH_SHORT
252
252
  ),
253
253
  y: Math.round(t.monthly_health_score_average.average_health_score)
254
- })), at = (e) => e.map(({ transaction: n }) => ({
255
- ...n
256
- })).sort((n, r) => r.date - n.date);
254
+ })), at = (e) => e.map(({ transaction: r }) => ({
255
+ ...r
256
+ })).sort((r, n) => n.date - r.date);
257
257
  class F {
258
258
  fetchInstance;
259
- constructor(t, n, r) {
260
- this.fetchInstance = new x(t, n, void 0, r);
259
+ constructor(t, r, n) {
260
+ this.fetchInstance = new H(t, r, void 0, n);
261
261
  }
262
262
  calculateHealthScore = async () => this.fetchInstance.post(`${h.HEALTH_SCORES}/calculate`).then((t) => t.health_score);
263
263
  getAverageHealthScores = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_averages`).then((t) => t);
264
264
  getDebtSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/debt_spend`).then((t) => t);
265
265
  getIncome = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/income`).then((t) => t);
266
266
  getMonthlySummaries = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_summaries`).then((t) => t);
267
- getHealthScoreChangeReports = async (t, n) => this.fetchInstance.get(`${h.HEALTH_SCORES}/change_report/from/${t}/to/${n}`).then((r) => r);
268
- getPeerScore = async (t) => this.fetchInstance.get(`${h.HEALTH_SCORES}/average/${t}`).then((n) => n);
267
+ getHealthScoreChangeReports = async (t, r) => this.fetchInstance.get(`${h.HEALTH_SCORES}/change_report/from/${t}/to/${r}`).then((n) => n);
268
+ getPeerScore = async (t) => this.fetchInstance.get(`${h.HEALTH_SCORES}/average/${t}`).then((r) => r);
269
269
  getSpendingFeeTransactions = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/spending_fee`).then((t) => t);
270
270
  getStandardSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/standard_spend`).then((t) => t);
271
271
  }
272
- class ne {
272
+ class re {
273
273
  api = new F("/", "");
274
274
  augmentedChartData = [];
275
275
  averageHealthScores = [];
@@ -296,15 +296,15 @@ class ne {
296
296
  };
297
297
  calculateHealthScore = async (t = !0) => {
298
298
  try {
299
- const n = await this.api.calculateHealthScore();
300
- let r = 0;
299
+ const r = await this.api.calculateHealthScore();
300
+ let n = 0;
301
301
  t && await this.loadHealthScoreChangeReports();
302
- const o = n?.health_score || 0, a = this.healthScoreChangeReports.at(-1)?.older_health_score || 0;
303
- r = o - a, d(() => {
304
- this.healthScore = n, this.healthScoreChange = r;
302
+ const o = r?.health_score || 0, a = this.healthScoreChangeReports.at(-1)?.older_health_score || 0;
303
+ n = o - a, d(() => {
304
+ this.healthScore = r, this.healthScoreChange = n;
305
305
  });
306
- } catch (n) {
307
- console.error("Error calculating health score:", n);
306
+ } catch (r) {
307
+ console.error("Error calculating health score:", r);
308
308
  }
309
309
  };
310
310
  loadAverageHealthScores = async () => {
@@ -349,28 +349,28 @@ class ne {
349
349
  }
350
350
  };
351
351
  loadHealthScoreChangeReports = async () => {
352
- const t = T(H(/* @__PURE__ */ new Date(), 2)), n = T(/* @__PURE__ */ new Date());
352
+ const t = T(v(/* @__PURE__ */ new Date(), 2)), r = T(/* @__PURE__ */ new Date());
353
353
  try {
354
- const r = await this.api.getHealthScoreChangeReports(
354
+ const n = await this.api.getHealthScoreChangeReports(
355
355
  t,
356
- n
356
+ r
357
357
  );
358
358
  d(() => {
359
- this.healthScoreChangeReports = r;
359
+ this.healthScoreChangeReports = n;
360
360
  });
361
- } catch (r) {
362
- console.error("Error loading health score change reports:", r);
361
+ } catch (n) {
362
+ console.error("Error loading health score change reports:", n);
363
363
  }
364
364
  };
365
365
  loadPeerScore = async () => {
366
366
  const t = R(b(this.globalStore.appDataStore.user.birthday), "yyyy");
367
367
  try {
368
- const n = await this.api.getPeerScore(t);
368
+ const r = await this.api.getPeerScore(t);
369
369
  d(() => {
370
- this.peerScore = n;
370
+ this.peerScore = r;
371
371
  });
372
- } catch (n) {
373
- console.error("Error loading peer score:", n);
372
+ } catch (r) {
373
+ console.error("Error loading peer score:", r);
374
374
  }
375
375
  };
376
376
  loadAugmentedChartData = async () => {
@@ -385,9 +385,9 @@ class ne {
385
385
  };
386
386
  getSpendingFeeTransactions = async () => {
387
387
  try {
388
- const t = await this.api.getSpendingFeeTransactions(), n = at(t);
388
+ const t = await this.api.getSpendingFeeTransactions(), r = at(t);
389
389
  d(() => {
390
- this.spendingFeeTransactions = n;
390
+ this.spendingFeeTransactions = r;
391
391
  });
392
392
  } catch (t) {
393
393
  console.error(`Error occurred while getting spending fee transactions: ${t}`);
@@ -419,9 +419,9 @@ class ne {
419
419
  };
420
420
  }
421
421
  export {
422
- I as A,
422
+ _ as A,
423
423
  u as C,
424
- ne as F,
424
+ re as F,
425
425
  Gt as P,
426
426
  kt as a,
427
427
  $t as b,
@@ -1,77 +1,115 @@
1
- import { jsxs as a, jsx as e, Fragment as $ } from "react/jsx-runtime";
2
- import Y from "@mui/material/Box";
3
- import { useTheme as W } from "@mui/material/styles";
4
- import { BarPlot as ft } from "@mui/x-charts/BarChart";
5
- import { ChartContainer as xt } from "@mui/x-charts/ChartContainer";
6
- import { ChartsAxisHighlight as yt } from "@mui/x-charts/ChartsAxisHighlight";
7
- import { ChartsReferenceLine as gt } from "@mui/x-charts/ChartsReferenceLine";
8
- import { useAxesTooltip as pt, ChartsTooltipContainer as bt } from "@mui/x-charts/ChartsTooltip";
9
- import { ChartsXAxis as kt } from "@mui/x-charts/ChartsXAxis";
10
- import { ChartsYAxis as Mt } from "@mui/x-charts/ChartsYAxis";
11
- import { AreaPlot as Ct, LinePlot as wt, MarkPlot as Lt } from "@mui/x-charts/LineChart";
12
- import { f as p, c as X } from "./NumberFormatting-QCaNwbjv.mjs";
13
- import { observer as St } from "mobx-react-lite";
14
- import P from "@mui/material/Stack";
15
- import { Text as l } from "@mxenabled/mxui";
16
- import { u as vt } from "./hooks-zu7yblbi.mjs";
17
- import Dt from "@mui/material/useMediaQuery";
18
- import { Stack as M, Box as F } from "@mui/material";
19
- const Tt = ({
1
+ import { jsxs as i, jsx as e, Fragment as E } from "react/jsx-runtime";
2
+ import _ from "@mui/material/Box";
3
+ import { useTheme as j } from "@mui/material/styles";
4
+ import { BarPlot as gt } from "@mui/x-charts/BarChart";
5
+ import { ChartContainer as yt } from "@mui/x-charts/ChartContainer";
6
+ import { ChartsAxisHighlight as pt } from "@mui/x-charts/ChartsAxisHighlight";
7
+ import { ChartsReferenceLine as Lt } from "@mui/x-charts/ChartsReferenceLine";
8
+ import { useAxesTooltip as kt, ChartsTooltipContainer as bt } from "@mui/x-charts/ChartsTooltip";
9
+ import { ChartsXAxis as Mt } from "@mui/x-charts/ChartsXAxis";
10
+ import { ChartsYAxis as wt } from "@mui/x-charts/ChartsYAxis";
11
+ import { AreaPlot as St, LinePlot as Ct, MarkPlot as vt } from "@mui/x-charts/LineChart";
12
+ import { f as p, c as O } from "./NumberFormatting-QCaNwbjv.mjs";
13
+ import { observer as At } from "mobx-react-lite";
14
+ import W from "@mui/material/Stack";
15
+ import { Text as s } from "@mxenabled/mxui";
16
+ import { u as Dt } from "./hooks-zu7yblbi.mjs";
17
+ import Tt from "@mui/material/useMediaQuery";
18
+ import { Stack as b, Box as Rt } from "@mui/material";
19
+ const z = {
20
+ circle: "M4.514,0A4.514,4.514,0,1,1,-4.514,0A4.514,4.514,0,1,1,4.514,0",
21
+ square: "M-4,-4L4,-4L4,4L-4,4Z",
22
+ wye: "M0.6,0.6L0.6,4.5L-0.6,4.5L-0.6,0.6L-4,2.6L-3.4,1.5L-0.6,-0.1L-3.4,-1.5L-4,-2.6L-0.6,-0.6L-0.6,-4.5L0.6,-4.5L0.6,-0.6L4,-2.6L3.4,-1.5L0.6,-0.1L3.4,1.5L4,2.6L0.6,0.6Z",
23
+ star: "M0,-5L1.1,-1.5L4.8,-1.5L1.8,0.9L2.9,4.5L0,2.2L-2.9,4.5L-1.8,0.9L-4.8,-1.5L-1.1,-1.5Z",
24
+ cross: "M-1.5,-5L1.5,-5L1.5,-1.5L5,-1.5L5,1.5L1.5,1.5L1.5,5L-1.5,5L-1.5,1.5L-5,1.5L-5,-1.5L-1.5,-1.5Z",
25
+ triangle: "M0,-5L4.33,3.5L-4.33,3.5Z",
26
+ diamond: "M0,-5.5L3.9,0L0,5.5L-3.9,0Z"
27
+ }, X = [
28
+ "circle",
29
+ "square",
30
+ "wye",
31
+ "star",
32
+ "cross",
33
+ "triangle",
34
+ "diamond"
35
+ ];
36
+ function N(t) {
37
+ return X[t % X.length];
38
+ }
39
+ const Bt = ({
20
40
  label: t,
21
41
  customLegendVariant: r
22
42
  }) => {
23
- const s = r || "Small";
24
- return typeof t == "string" ? /* @__PURE__ */ e(l, { variant: s, children: t }) : typeof t == "object" && t.amount !== void 0 && t.label ? /* @__PURE__ */ a($, { children: [
25
- /* @__PURE__ */ e(l, { variant: s, children: t.label }),
26
- /* @__PURE__ */ e(l, { bold: !0, sx: { marginLeft: 8 }, variant: s, children: p(t.amount, "0,0") })
43
+ const l = r || "Small";
44
+ return typeof t == "string" ? /* @__PURE__ */ e(s, { variant: l, children: t }) : typeof t == "object" && t.amount !== void 0 && t.label ? /* @__PURE__ */ i(E, { children: [
45
+ /* @__PURE__ */ e(s, { variant: l, children: t.label }),
46
+ /* @__PURE__ */ e(s, { bold: !0, sx: { marginLeft: 8 }, variant: l, children: p(t.amount, "0,0") })
27
47
  ] }) : null;
28
- }, At = ({
48
+ }, Pt = ({
29
49
  average: t,
30
50
  customLegendVariant: r,
31
- customLegendBoxSx: s,
51
+ customLegendBoxSx: l,
32
52
  labels: o = [],
33
- series: b,
53
+ series: L,
34
54
  style: x,
35
55
  title: h,
36
- valueFormatterString: u
56
+ valueFormatterString: f
37
57
  }) => {
38
- const { common: m } = vt(), c = r || "Small";
39
- return /* @__PURE__ */ a(P, { style: { flexDirection: "row", gap: 24, ...x }, children: [
40
- b.map((i, f) => {
41
- const d = o[f];
42
- return d ? /* @__PURE__ */ a(
43
- P,
58
+ const { common: m } = Dt(), c = r || "Small";
59
+ return /* @__PURE__ */ i(W, { style: { flexDirection: "row", gap: 24, ...x }, children: [
60
+ L.map((a, u) => {
61
+ const d = o[u];
62
+ return d ? /* @__PURE__ */ i(
63
+ W,
44
64
  {
45
65
  style: { alignItems: "center", flexDirection: "row", flexWrap: "wrap" },
46
66
  children: [
47
- /* @__PURE__ */ e(
48
- Y,
67
+ l !== void 0 ? /* @__PURE__ */ e(
68
+ _,
49
69
  {
50
70
  sx: {
51
71
  width: 10,
52
72
  height: 10,
53
- backgroundColor: i.color,
73
+ backgroundColor: a.color,
54
74
  marginRight: 8,
55
- ...s
75
+ ...l
56
76
  }
57
77
  }
78
+ ) : /* @__PURE__ */ e(
79
+ "svg",
80
+ {
81
+ "aria-hidden": "true",
82
+ height: 14,
83
+ style: { marginRight: 8, flexShrink: 0 },
84
+ viewBox: "-6 -6 12 12",
85
+ width: 14,
86
+ children: /* @__PURE__ */ e(
87
+ "path",
88
+ {
89
+ d: z[N(u)],
90
+ fill: a.color,
91
+ stroke: a.color,
92
+ strokeWidth: 1
93
+ }
94
+ )
95
+ }
58
96
  ),
59
- /* @__PURE__ */ e(Tt, { customLegendVariant: r, label: d })
97
+ /* @__PURE__ */ e(Bt, { customLegendVariant: r, label: d })
60
98
  ]
61
99
  },
62
- f
100
+ u
63
101
  ) : null;
64
102
  }),
65
- t !== void 0 && /* @__PURE__ */ a(P, { sx: { alignItems: "center", flexDirection: "row" }, children: [
66
- /* @__PURE__ */ e(l, { bold: !0, sx: { marginRight: 8 }, variant: c, children: "– –" }),
67
- /* @__PURE__ */ a(l, { variant: c, children: [
103
+ t !== void 0 && /* @__PURE__ */ i(W, { sx: { alignItems: "center", flexDirection: "row" }, children: [
104
+ /* @__PURE__ */ e(s, { bold: !0, sx: { marginRight: 8 }, variant: c, children: "– –" }),
105
+ /* @__PURE__ */ i(s, { variant: c, children: [
68
106
  h || m.average,
69
107
  "  "
70
108
  ] }),
71
- /* @__PURE__ */ e(l, { bold: !0, variant: c, children: u ? p(t, u) : t })
109
+ /* @__PURE__ */ e(s, { bold: !0, variant: c, children: f ? p(t, f) : t })
72
110
  ] })
73
111
  ] });
74
- }, Bt = St(At), It = (t) => /* @__PURE__ */ a($, { children: [
112
+ }, Et = At(Pt), It = (t) => /* @__PURE__ */ i(E, { children: [
75
113
  /* @__PURE__ */ e("clipPath", { id: t.id, children: /* @__PURE__ */ e("rect", { height: t.height, width: t.width, x: "0", y: "0" }) }),
76
114
  /* @__PURE__ */ e("g", { children: /* @__PURE__ */ e(
77
115
  "path",
@@ -88,19 +126,19 @@ const Tt = ({
88
126
  }
89
127
  }
90
128
  ) })
91
- ] }), Rt = (t) => {
92
- const r = W(), s = t.showLabel, o = t.style, b = o?.markLabelStyles, x = Number(t.x), h = Number(t.y), u = t.handlers?.onMarkClick, m = t.handlers?.onMouseEnter, c = t.handlers?.onMouseLeave, i = Dt(r.breakpoints.up("sm")), f = t.valueFormatterString ? p(t.yData[t.dataIndex], t.valueFormatterString) : String(t.yData[t.dataIndex]), d = i ? r.typography.Small?.fontSize : r.typography.XSmall?.fontSize, D = 30, T = 24, A = x - D / 2, B = h - 30;
93
- return /* @__PURE__ */ a($, { children: [
94
- s && /* @__PURE__ */ a($, { children: [
129
+ ] }), $t = (t) => {
130
+ const r = j(), l = t.showLabel, o = t.style, L = o?.markLabelStyles, x = Number(t.x), h = Number(t.y), f = t.handlers?.onMarkClick, m = t.handlers?.onMouseEnter, c = t.handlers?.onMouseLeave, a = Tt(r.breakpoints.up("sm")), u = t.valueFormatterString ? p(t.yData[t.dataIndex], t.valueFormatterString) : String(t.yData[t.dataIndex]), d = a ? r.typography.Small?.fontSize : r.typography.XSmall?.fontSize, A = 30, D = 24, T = x - A / 2, R = h - 30;
131
+ return /* @__PURE__ */ i(E, { children: [
132
+ l && /* @__PURE__ */ i(E, { children: [
95
133
  t.labelBackgroundColor && /* @__PURE__ */ e(
96
134
  "rect",
97
135
  {
98
136
  fill: t.labelBackgroundColor,
99
- height: T,
137
+ height: D,
100
138
  rx: "3",
101
- width: D,
102
- x: A,
103
- y: B
139
+ width: A,
140
+ x: T,
141
+ y: R
104
142
  }
105
143
  ),
106
144
  /* @__PURE__ */ e(
@@ -111,23 +149,23 @@ const Tt = ({
111
149
  fill: t.labelFontColor ? t.labelFontColor : r.palette.text.primary,
112
150
  style: {
113
151
  fontSize: t.labelFontSize ? t.labelFontSize : d,
114
- ...b
152
+ ...L
115
153
  },
116
154
  textAnchor: "middle",
117
155
  x,
118
- y: h - 28 + T / 2,
119
- children: f
156
+ y: h - 28 + D / 2,
157
+ children: u
120
158
  }
121
159
  )
122
160
  ] }),
123
161
  t.showMark && /* @__PURE__ */ e(
124
162
  "path",
125
163
  {
126
- cursor: u ? "pointer" : "unset",
127
- d: "M4.514,0A4.514,4.514,0,1,1,-4.514,0A4.514,4.514,0,1,1,4.514,0",
164
+ cursor: f ? "pointer" : "unset",
165
+ d: z[t.shape ?? "circle"],
128
166
  height: "20px",
129
- onClick: (j) => {
130
- u?.(j, t.dataIndex);
167
+ onClick: (I) => {
168
+ f?.(I, t.dataIndex);
131
169
  },
132
170
  onMouseEnter: () => {
133
171
  m?.(t.dataIndex);
@@ -148,19 +186,19 @@ const Tt = ({
148
186
  )
149
187
  ] });
150
188
  };
151
- function $t({
189
+ function Ht({
152
190
  customLabels: t,
153
191
  labels: r = [],
154
- series: s,
192
+ series: l,
155
193
  valueFormatterString: o = "0,0"
156
194
  }) {
157
- const b = pt(), x = W(), h = b?.[0];
195
+ const L = kt(), x = j(), h = L?.[0];
158
196
  if (!h) return null;
159
- const { axisValue: u, dataIndex: m = 0 } = h;
197
+ const { axisValue: f, dataIndex: m = 0 } = h;
160
198
  if (t) {
161
- const c = t[m]?.[0]?.header || String(u);
162
- return /* @__PURE__ */ a(
163
- M,
199
+ const c = t[m]?.[0]?.header || String(f);
200
+ return /* @__PURE__ */ i(
201
+ b,
164
202
  {
165
203
  sx: {
166
204
  backgroundColor: x.palette.background.paper,
@@ -174,8 +212,8 @@ function $t({
174
212
  py: 12
175
213
  },
176
214
  children: [
177
- /* @__PURE__ */ a(
178
- M,
215
+ /* @__PURE__ */ i(
216
+ b,
179
217
  {
180
218
  sx: {
181
219
  flexDirection: "row",
@@ -186,15 +224,15 @@ function $t({
186
224
  marginTop: 4
187
225
  },
188
226
  children: [
189
- /* @__PURE__ */ e(l, { variant: "H3", children: c }),
190
- /* @__PURE__ */ e(l, { bold: !0, variant: "H3", children: p(s[0]?.data[m], o) })
227
+ /* @__PURE__ */ e(s, { variant: "H3", children: c }),
228
+ /* @__PURE__ */ e(s, { bold: !0, variant: "H3", children: p(l[0]?.data[m], o) })
191
229
  ]
192
230
  }
193
231
  ),
194
- t[m]?.some((i) => (typeof i == "string" ? 0 : i.amount) !== 0) ? t[m]?.map((i) => {
195
- const f = typeof i == "string" ? i : i.label, d = typeof i == "string" ? 0 : i.amount;
196
- return d === 0 ? null : /* @__PURE__ */ a(
197
- M,
232
+ t[m]?.some((a) => (typeof a == "string" ? 0 : a.amount) !== 0) ? t[m]?.map((a) => {
233
+ const u = typeof a == "string" ? a : a.label, d = typeof a == "string" ? 0 : a.amount;
234
+ return d === 0 ? null : /* @__PURE__ */ i(
235
+ b,
198
236
  {
199
237
  sx: {
200
238
  flexDirection: "row",
@@ -205,8 +243,8 @@ function $t({
205
243
  marginTop: 4
206
244
  },
207
245
  children: [
208
- /* @__PURE__ */ a(
209
- M,
246
+ /* @__PURE__ */ i(
247
+ b,
210
248
  {
211
249
  sx: {
212
250
  flexDirection: "row",
@@ -217,32 +255,32 @@ function $t({
217
255
  },
218
256
  children: [
219
257
  /* @__PURE__ */ e(
220
- F,
258
+ Rt,
221
259
  {
222
260
  sx: {
223
261
  width: "12px",
224
262
  height: "12px",
225
- backgroundColor: s[0]?.color,
263
+ backgroundColor: l[0]?.color,
226
264
  borderRadius: "4px"
227
265
  }
228
266
  }
229
267
  ),
230
- /* @__PURE__ */ e(l, { variant: "Body", children: f })
268
+ /* @__PURE__ */ e(s, { variant: "Body", children: u })
231
269
  ]
232
270
  }
233
271
  ),
234
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: p(Math.abs(d), o) })
272
+ /* @__PURE__ */ e(s, { bold: !0, variant: "Body", children: p(Math.abs(d), o) })
235
273
  ]
236
274
  },
237
- f
275
+ u
238
276
  );
239
- }) : /* @__PURE__ */ e(l, { variant: "Body", children: "No data" })
277
+ }) : /* @__PURE__ */ e(s, { variant: "Body", children: "No data" })
240
278
  ]
241
279
  }
242
280
  );
243
281
  }
244
- return /* @__PURE__ */ a(
245
- M,
282
+ return /* @__PURE__ */ i(
283
+ b,
246
284
  {
247
285
  sx: {
248
286
  backgroundColor: x.palette.background.paper,
@@ -256,9 +294,9 @@ function $t({
256
294
  py: 12
257
295
  },
258
296
  children: [
259
- /* @__PURE__ */ e(l, { variant: "H3", children: String(u) }),
260
- s.map((c, i) => /* @__PURE__ */ a(
261
- M,
297
+ /* @__PURE__ */ e(s, { variant: "H3", children: String(f) }),
298
+ l.map((c, a) => /* @__PURE__ */ i(
299
+ b,
262
300
  {
263
301
  sx: {
264
302
  flexDirection: "row",
@@ -269,21 +307,11 @@ function $t({
269
307
  marginTop: 4
270
308
  },
271
309
  children: [
272
- /* @__PURE__ */ a(M, { sx: { flexDirection: "row", alignItems: "center", gap: 8 }, children: [
273
- /* @__PURE__ */ e(
274
- F,
275
- {
276
- sx: {
277
- width: "12px",
278
- height: "12px",
279
- backgroundColor: c.color,
280
- borderRadius: "4px"
281
- }
282
- }
283
- ),
284
- /* @__PURE__ */ e(l, { variant: "Body", children: typeof r[i] == "string" ? r[i] : r[i]?.label })
310
+ /* @__PURE__ */ i(b, { sx: { flexDirection: "row", alignItems: "center", gap: 8 }, children: [
311
+ /* @__PURE__ */ e("svg", { "aria-hidden": "true", height: 12, viewBox: "-6 -6 12 12", width: 12, children: /* @__PURE__ */ e("path", { d: z[N(a)], fill: c.color }) }),
312
+ /* @__PURE__ */ e(s, { variant: "Body", children: typeof r[a] == "string" ? r[a] : r[a]?.label })
285
313
  ] }),
286
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: p(c.data[m], o) })
314
+ /* @__PURE__ */ e(s, { bold: !0, variant: "Body", children: p(c.data[m], o) })
287
315
  ]
288
316
  },
289
317
  c.id
@@ -292,82 +320,83 @@ function $t({
292
320
  }
293
321
  );
294
322
  }
295
- const _t = ({
323
+ const ne = ({
296
324
  areaColor: t,
297
325
  axisColor: r,
298
- baseline: s = "max",
326
+ baseline: l = "max",
299
327
  chartFor: o,
300
- chartXaxisSx: b,
328
+ chartXaxisSx: L,
301
329
  chartYaxisSx: x,
302
330
  colors: h,
303
- curveType: u = "linear",
331
+ curveType: f = "linear",
304
332
  customLegendVariant: m,
305
333
  customLegendSx: c,
306
- customLegendBoxSx: i,
307
- customTooltipLabels: f,
334
+ customLegendBoxSx: a,
335
+ customTooltipLabels: u,
308
336
  datasets: d,
309
- height: D,
310
- isGraphClippingXAxis: T = !1,
311
- labels: A,
312
- labelBackgroundColor: B,
313
- labelFontColor: j,
314
- labelFontSize: q,
315
- margin: Q,
316
- markHandlers: U,
317
- markStyles: V,
318
- minRange: J,
319
- maxRange: K,
320
- onItemClick: z,
321
- peerAverage: E,
322
- showArea: H = !1,
323
- showAverage: G = !1,
324
- showAxisHighlight: Z = !1,
325
- showBars: N = !1,
326
- showLegend: _ = !1,
327
- showMark: tt = !0,
328
- showMarkLabel: et = !1,
329
- showTooltip: nt = !1,
330
- showXAxis: rt = !1,
331
- showXAxisTicks: at = !1,
332
- showYAxis: it = !1,
333
- showYAxisTicks: ot = !1,
334
- title: lt,
335
- useCustomMark: st = !1,
337
+ height: A,
338
+ isGraphClippingXAxis: D = !1,
339
+ labels: T,
340
+ labelBackgroundColor: R,
341
+ labelFontColor: I,
342
+ labelFontSize: U,
343
+ margin: Y,
344
+ markHandlers: K,
345
+ markStyles: Q,
346
+ minRange: V,
347
+ maxRange: J,
348
+ onItemClick: $,
349
+ peerAverage: Z,
350
+ showArea: G = !1,
351
+ showAverage: q = !1,
352
+ showAxisHighlight: tt = !1,
353
+ showBars: H = !1,
354
+ showLegend: et = !1,
355
+ showMark: nt = !0,
356
+ showMarkLabel: rt = !1,
357
+ showTooltip: at = !1,
358
+ showXAxis: it = !1,
359
+ showXAxisTicks: ot = !1,
360
+ showYAxis: lt = !1,
361
+ showYAxisTicks: st = !1,
362
+ title: ct,
363
+ useCustomMark: dt = !1,
336
364
  valueFormatterString: k,
337
- width: ct,
338
- xAxisScaleType: dt
365
+ width: ht,
366
+ xAxisScaleType: mt
339
367
  }) => {
340
- const y = W(), ht = d.flat().map((n) => n.x), C = d.flat().map((n) => n.y), O = E || Math.round(C.reduce((n, v) => v + n, 0) / C.length), w = Math.floor(Math.min(...C) / 100) * 100, L = Math.ceil(Math.max(...C) / 100) * 100, I = d.map((n, v) => ({
341
- type: N ? "bar" : "line",
342
- curve: u,
343
- color: N ? y.palette.chart?.chart6 : h[v] ?? y.palette.primary.main,
344
- data: n.map((g) => g.y),
345
- area: H,
346
- baseline: s,
368
+ const g = j(), ut = d.flat().map((n) => n.x), w = d.flat().map((n) => n.y), F = Z || Math.round(w.reduce((n, M) => M + n, 0) / w.length), S = Math.floor(Math.min(...w) / 100) * 100, C = Math.ceil(Math.max(...w) / 100) * 100, B = d.map((n, M) => ({
369
+ type: H ? "bar" : "line",
370
+ curve: f,
371
+ color: H ? g.palette.chart?.chart6 : h[M] ?? g.palette.primary.main,
372
+ data: n.map((y) => y.y),
373
+ area: G,
374
+ baseline: l,
347
375
  showMark: !0,
348
- valueFormatter: (g) => k ? p(g || 0, k) : String(g)
349
- })), mt = {
376
+ shape: N(M),
377
+ valueFormatter: (y) => k ? p(y || 0, k) : String(y)
378
+ })), ft = {
350
379
  ...{
351
380
  top: 60,
352
381
  right: 35,
353
382
  bottom: 25,
354
383
  left: -10
355
384
  },
356
- ...Q
385
+ ...Y
357
386
  };
358
- let S = J ?? w, R = K ?? L;
387
+ let v = V ?? S, P = J ?? C;
359
388
  if (o === "networthChart") {
360
- const n = L - w, v = n < L * 0.05 ? 0.25 : 0.2, g = Math.max(n * v, L * 0.015);
361
- S = w - g < 0 ? w : w - g, R = L + g;
389
+ const n = C - S, M = n < C * 0.05 ? 0.25 : 0.2, y = Math.max(n * M, C * 0.015);
390
+ v = S - y < 0 ? S : S - y, P = C + y;
362
391
  }
363
- const ut = () => {
392
+ const xt = () => {
364
393
  if (o === "creditOverTime")
365
- return X(S, 850, 5);
394
+ return O(v, 850, 5);
366
395
  if (o === "networthChart")
367
- return X(S, R, 5);
396
+ return O(v, P, 5);
368
397
  };
369
- return /* @__PURE__ */ a(
370
- Y,
398
+ return /* @__PURE__ */ i(
399
+ _,
371
400
  {
372
401
  sx: {
373
402
  position: "relative",
@@ -385,12 +414,12 @@ const _t = ({
385
414
  }
386
415
  },
387
416
  children: [
388
- /* @__PURE__ */ a(
389
- xt,
417
+ /* @__PURE__ */ i(
418
+ yt,
390
419
  {
391
- height: D,
392
- margin: mt,
393
- series: I,
420
+ height: A,
421
+ margin: ft,
422
+ series: B,
394
423
  sx: {
395
424
  "& .MuiBarLabel-root": {
396
425
  fontSize: 10,
@@ -400,26 +429,26 @@ const _t = ({
400
429
  opacity: 0.15
401
430
  },
402
431
  "& .MuiChartsAxis-tickLabel > tspan": {
403
- fontFamily: y.typography.Small.fontFamily
432
+ fontFamily: g.typography.Small.fontFamily
404
433
  },
405
434
  "& .MuiLineChart-markLabel": {
406
- fontFamily: y.typography.Small.fontFamily
435
+ fontFamily: g.typography.Small.fontFamily
407
436
  }
408
437
  },
409
- width: ct,
410
- xAxis: [{ data: ht, scaleType: dt || (N ? "band" : "point") }],
438
+ width: ht,
439
+ xAxis: [{ data: ut, scaleType: mt || (H ? "band" : "point") }],
411
440
  yAxis: [
412
441
  {
413
- tickInterval: ut(),
414
- min: T ? -22 : S,
415
- max: R || 100,
416
- colorMap: H && I.length < 2 ? {
442
+ tickInterval: xt(),
443
+ min: D ? -22 : v,
444
+ max: P || 100,
445
+ colorMap: G && B.length < 2 ? {
417
446
  type: "continuous",
418
- min: S,
419
- max: R,
447
+ min: v,
448
+ max: P,
420
449
  color: [
421
- y.palette.background.paper,
422
- h[0] ?? y.palette.primary.main
450
+ g.palette.background.paper,
451
+ h[0] ?? g.palette.primary.main
423
452
  ]
424
453
  } : void 0,
425
454
  valueFormatter: (n) => k ? p(n, k) : String(n),
@@ -427,25 +456,25 @@ const _t = ({
427
456
  }
428
457
  ],
429
458
  children: [
430
- G && /* @__PURE__ */ e(
431
- gt,
459
+ q && /* @__PURE__ */ e(
460
+ Lt,
432
461
  {
433
462
  lineStyle: {
434
- stroke: B ? y.palette.neutral.main : y.palette.neutral.dark,
463
+ stroke: R ? g.palette.neutral.main : g.palette.neutral.dark,
435
464
  strokeDasharray: "10, 8",
436
465
  strokeWidth: 2
437
466
  },
438
- y: O
467
+ y: F
439
468
  }
440
469
  ),
441
470
  /* @__PURE__ */ e(
442
- Ct,
471
+ St,
443
472
  {
444
- onItemClick: z,
473
+ onItemClick: $,
445
474
  ...t && {
446
475
  slots: {
447
- area: (n) => /* @__PURE__ */ a("g", { children: [
448
- /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ a("linearGradient", { id: "customGradient", x1: "0", x2: "0", y1: "0", y2: "1", children: [
476
+ area: (n) => /* @__PURE__ */ i("g", { children: [
477
+ /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ i("linearGradient", { id: "customGradient", x1: "0", x2: "0", y1: "0", y2: "1", children: [
449
478
  /* @__PURE__ */ e("stop", { offset: "0%", stopColor: t }),
450
479
  /* @__PURE__ */ e("stop", { offset: "100%", stopColor: t, stopOpacity: 0.02 })
451
480
  ] }) }),
@@ -456,37 +485,37 @@ const _t = ({
456
485
  }
457
486
  ),
458
487
  /* @__PURE__ */ e(
459
- wt,
488
+ Ct,
460
489
  {
461
- onItemClick: z,
490
+ onItemClick: $,
462
491
  slots: {
463
492
  line: (n) => /* @__PURE__ */ e(
464
493
  It,
465
494
  {
466
495
  ...n,
467
- lineColor: t ?? n.ownerState.color ?? y.palette.primary.main
496
+ lineColor: t ?? n.ownerState.color ?? g.palette.primary.main
468
497
  }
469
498
  )
470
499
  }
471
500
  }
472
501
  ),
473
502
  /* @__PURE__ */ e(
474
- Lt,
503
+ vt,
475
504
  {
476
- onItemClick: z,
477
- slots: st ? {
505
+ onItemClick: $,
506
+ slots: dt ? {
478
507
  mark: (n) => /* @__PURE__ */ e(
479
- Rt,
508
+ $t,
480
509
  {
481
- handlers: U,
482
- labelBackgroundColor: B,
483
- labelFontColor: j,
484
- labelFontSize: q,
485
- showLabel: et,
486
- showMark: tt || n.dataIndex === d[0].length - 1,
487
- style: V?.(n.dataIndex) ?? {},
510
+ handlers: K,
511
+ labelBackgroundColor: R,
512
+ labelFontColor: I,
513
+ labelFontSize: U,
514
+ showLabel: rt,
515
+ showMark: nt || n.dataIndex === d[0].length - 1,
516
+ style: Q?.(n.dataIndex) ?? {},
488
517
  valueFormatterString: k,
489
- yData: C,
518
+ yData: w,
490
519
  ...n
491
520
  }
492
521
  )
@@ -494,17 +523,17 @@ const _t = ({
494
523
  }
495
524
  ),
496
525
  /* @__PURE__ */ e(
497
- ft,
526
+ gt,
498
527
  {
499
528
  barLabel: (n) => Number(n.value) > 0 ? `$${n.value}` : null,
500
529
  borderRadius: 10
501
530
  }
502
531
  ),
503
532
  /* @__PURE__ */ e(
504
- kt,
533
+ Mt,
505
534
  {
506
- disableLine: !rt,
507
- disableTicks: !at,
535
+ disableLine: !it,
536
+ disableTicks: !ot,
508
537
  slotProps: r ? {
509
538
  axisLine: {
510
539
  style: {
@@ -517,14 +546,14 @@ const _t = ({
517
546
  }
518
547
  }
519
548
  } : {},
520
- sx: { ...b }
549
+ sx: { ...L }
521
550
  }
522
551
  ),
523
552
  /* @__PURE__ */ e(
524
- Mt,
553
+ wt,
525
554
  {
526
- disableLine: !it,
527
- disableTicks: !ot,
555
+ disableLine: !lt,
556
+ disableTicks: !st,
528
557
  slotProps: r ? {
529
558
  axisLine: {
530
559
  style: {
@@ -540,34 +569,34 @@ const _t = ({
540
569
  sx: { ...x }
541
570
  }
542
571
  ),
543
- Z && /* @__PURE__ */ e(yt, { x: "line" }),
544
- nt && /* @__PURE__ */ e(bt, { trigger: "axis", children: /* @__PURE__ */ e(
545
- $t,
572
+ tt && /* @__PURE__ */ e(pt, { x: "line" }),
573
+ at && /* @__PURE__ */ e(bt, { trigger: "axis", children: /* @__PURE__ */ e(
574
+ Ht,
546
575
  {
547
- customLabels: f,
548
- labels: A,
549
- series: I,
576
+ customLabels: u,
577
+ labels: T,
578
+ series: B,
550
579
  valueFormatterString: k
551
580
  }
552
581
  ) })
553
582
  ]
554
583
  }
555
584
  ),
556
- _ && /* @__PURE__ */ e(
557
- Bt,
585
+ et && /* @__PURE__ */ e(
586
+ Et,
558
587
  {
559
- average: G ? O : void 0,
560
- customLegendBoxSx: i,
588
+ average: q ? F : void 0,
589
+ customLegendBoxSx: a,
561
590
  customLegendVariant: m,
562
- labels: A,
563
- series: I,
591
+ labels: T,
592
+ series: B,
564
593
  style: {
565
594
  position: "absolute",
566
595
  top: 16,
567
596
  left: 16,
568
597
  ...c
569
598
  },
570
- title: lt,
599
+ title: ct,
571
600
  valueFormatterString: k
572
601
  }
573
602
  )
@@ -576,5 +605,5 @@ const _t = ({
576
605
  );
577
606
  };
578
607
  export {
579
- _t as L
608
+ ne as L
580
609
  };
@@ -11,7 +11,7 @@ import B from "@mui/material/ListSubheader";
11
11
  import W from "@mui/system/Stack";
12
12
  import { useTheme as M1, alpha as y1 } from "@mui/material/styles";
13
13
  import { u as R, A as x1 } from "../AccountDetailsHeader-DCTCLB3K.mjs";
14
- import { L as w1 } from "../LineChart-DvCvL2Ed.mjs";
14
+ import { L as w1 } from "../LineChart-DVn1AamK.mjs";
15
15
  import { g as b1, a as S1, b as R1 } from "../SpendingData-Bz1bCWAs.mjs";
16
16
  import { m as T1, u as y, d as k, g as I, h as m1, b as G, a as E1 } from "../hooks-zu7yblbi.mjs";
17
17
  import { A as N, g as L, N as p1 } from "../Account-BiB1F8lL.mjs";
@@ -0,0 +1,3 @@
1
+ export type MarkerShape = 'circle' | 'square' | 'wye' | 'star' | 'cross' | 'triangle' | 'diamond';
2
+ export declare const MARKER_SHAPE_PATHS: Record<MarkerShape, string>;
3
+ export declare function getMarkerShape(seriesIndex: number): MarkerShape;
@@ -67,7 +67,7 @@ import { startOfToday as D } from "date-fns/startOfToday";
67
67
  import { f as rt, a as ot, b as A } from "../BudgetUtil-QbRXtLKn.mjs";
68
68
  import { g as _o, e as fo, c as mo, d as yo, i as So } from "../BudgetUtil-QbRXtLKn.mjs";
69
69
  import { D as at } from "../DebtsStore-BZqNLaqd.mjs";
70
- import { F as it } from "../FinstrongStore-DO0IrhF4.mjs";
70
+ import { F as it } from "../FinstrongStore-BQxXxxYD.mjs";
71
71
  import { A as nt, m as ct, a as ut, b as dt } from "../InvestmentUtil-BItV7uEs.mjs";
72
72
  import { M as lt } from "../MerchantStore-BzGi4JAZ.mjs";
73
73
  import { N as ht } from "../NetWorthStore-DP78lgZ0.mjs";
@@ -1,5 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  export interface FinancialData {
3
+ year: number;
3
4
  month: number;
4
5
  standard_spend: number;
5
6
  income: number;
@@ -5,8 +5,8 @@ import { useTheme as z, alpha as ce } from "@mui/material/styles";
5
5
  import { PieChart as tn } from "@mui/x-charts/PieChart";
6
6
  import { P as D, H3 as X, Text as I, InstitutionLogo as pt, H2 as Fe, MerchantLogo as nn, Icon as on } from "@mxenabled/mxui";
7
7
  import { TrendingUp as rn, ArrowRightAlt as an, TrendingDown as sn, AccountBalance as _t, ChevronRight as Z, CheckCircle as cn, Cancel as ln, CreditCard as ut, Savings as dn, ContentCopy as pn, MultilineChart as _n, Add as ht, Cardiology as un, Payments as hn, CalendarMonth as mn, ExpandMore as gn } from "@mxenabled/mx-icons";
8
- import { g as yn, a as bn, r as et, b as fn, c as Ne, d as mt, C as ke, e as Me, f as xn, h as Sn, i as Cn, j as gt, k as tt, l as vn, m as nt, n as wn, o as yt, p as kn, q as bt, s as Oe, t as ft, u as Mn, v as xt, w as Dn, A as oe, x as In, P as Tn } from "../FinstrongStore-DO0IrhF4.mjs";
9
- import { y as Ci, F as vi } from "../FinstrongStore-DO0IrhF4.mjs";
8
+ import { g as yn, a as bn, r as et, b as fn, c as Ne, d as mt, C as ke, e as Me, f as xn, h as Sn, i as Cn, j as gt, k as tt, l as vn, m as nt, n as wn, o as yt, p as kn, q as bt, s as Oe, t as ft, u as Mn, v as xt, w as Dn, A as oe, x as In, P as Tn } from "../FinstrongStore-BQxXxxYD.mjs";
9
+ import { y as Ci, F as vi } from "../FinstrongStore-BQxXxxYD.mjs";
10
10
  import * as ot from "d3";
11
11
  import { observer as k } from "mobx-react-lite";
12
12
  import { u as v, b as J, a as je, o as ee, y as L, p as An, d as Se, m as Ke, f as On, j as Ve, h as Rn, i as Ln } from "../hooks-zu7yblbi.mjs";
@@ -14,7 +14,7 @@ import { L as U } from "../Loader-D3rjKx72.mjs";
14
14
  import h, { useState as Fn, useRef as Bn, useCallback as rt, useEffect as at } from "react";
15
15
  import P from "@mui/material/Button";
16
16
  import Y from "@mui/material/Card";
17
- import { L as Xe } from "../LineChart-DvCvL2Ed.mjs";
17
+ import { L as Xe } from "../LineChart-DVn1AamK.mjs";
18
18
  import { C as St } from "../ConnectionsDrawer-c7HaKeRj.mjs";
19
19
  import { C as ae } from "../ConnectDrawer-CVt-8rPJ.mjs";
20
20
  import le from "@mui/material/Tab";
@@ -1709,7 +1709,7 @@ const zo = ({ total: t }) => {
1709
1709
  totalMain: d
1710
1710
  }) => {
1711
1711
  const p = z(), u = qn(p.breakpoints.down("xs")), m = h.useMemo(
1712
- () => o.sort((g, y) => g.month - y.month).map((g) => {
1712
+ () => o.sort((g, y) => g.year !== y.year ? g.year - y.year : g.month - y.month).map((g) => {
1713
1713
  const y = Mn(g.month), A = {
1714
1714
  spending_vs_income: {
1715
1715
  main: g.standard_spend,
@@ -3,7 +3,7 @@ import { fromUnixTime as oe } from "date-fns/fromUnixTime";
3
3
  import { observer as S } from "mobx-react-lite";
4
4
  import ie from "@mui/material/Stack/Stack";
5
5
  import { useTheme as j } from "@mui/material/styles";
6
- import { L as ae } from "../LineChart-DvCvL2Ed.mjs";
6
+ import { L as ae } from "../LineChart-DVn1AamK.mjs";
7
7
  import { p as se, q as R, u as N, g as z, d as ce, b as Y } from "../hooks-zu7yblbi.mjs";
8
8
  import { u as q } from "../useScreenSize-B6JyS_Lj.mjs";
9
9
  import { f as le, D as me } from "../DateFormats-BMpMrZpW.mjs";
@@ -41,7 +41,7 @@ import { D as We } from "../Drawer-DV4NTsFg.mjs";
41
41
  import { u as Ie } from "../useWidgetLoadTimer-Bmgv_UeH.mjs";
42
42
  import { L as Le } from "../Loader-D3rjKx72.mjs";
43
43
  import { W as dt } from "../WidgetContainer-DSs6lJbr.mjs";
44
- import { L as Be } from "../LineChart-DvCvL2Ed.mjs";
44
+ import { L as Be } from "../LineChart-DVn1AamK.mjs";
45
45
  import { M as Xt } from "../MiniWidgetContainer-DhEx4qKi.mjs";
46
46
  import { subMonths as Zt } from "date-fns";
47
47
  import { TrendingUp as Qt, TrendingDown as qt, MultilineChart as Jt, ExpandLess as eo, ExpandMore as to, ArrowBack as oo } from "@mxenabled/mx-icons";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.11.18",
3
+ "version": "7.11.20",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",