@mx-cartographer/experiences 7.3.2 → 7.4.0

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 (131) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Account-YwUMFz93.mjs → Account-01wOyrH1.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-BgCST7mK.mjs → AccountDetailsContent-gke-5zMF.mjs} +10 -10
  4. package/dist/{AccountDetailsHeader-jAFWoHj7.mjs → AccountDetailsHeader-CRzfuFA2.mjs} +7 -7
  5. package/dist/{AccountFields-DPxMPBF0.mjs → AccountFields-CPkGZ3SD.mjs} +5 -5
  6. package/dist/{AccountListItem-D6rWAreC.mjs → AccountListItem-D4uG9yC-.mjs} +4 -4
  7. package/dist/{AccountStore-B5E98oM1.mjs → AccountStore-C1zMBzHq.mjs} +40 -29
  8. package/dist/{Accounts-UIlYCmHb.mjs → Accounts-D7QljYas.mjs} +1 -1
  9. package/dist/{BudgetUtil-CXvenbdN.mjs → BudgetUtil-wjoNuj7B.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-Buy70Y3V.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +3 -3
  11. package/dist/{CategoryStore-BEdFs69_.mjs → CategoryStore-U7hOZAbP.mjs} +1 -1
  12. package/dist/{CategoryUtil-BR3H5i6n.mjs → CategoryUtil-DUM8NuGO.mjs} +1 -1
  13. package/dist/{ConnectDrawer-CbxHKlRv.mjs → ConnectDrawer-CuUj16NH.mjs} +2 -2
  14. package/dist/{ConnectionsDrawer-C6kanU7I.mjs → ConnectionsDrawer-Bz4uwdFE.mjs} +3 -3
  15. package/dist/{CurrencyInput-lSC7oPDg.mjs → CurrencyInput-xH-hqry9.mjs} +1 -1
  16. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
  17. package/dist/{DebtsStore-DgIcphe_.mjs → DebtsStore-Bu8rRRSL.mjs} +1 -1
  18. package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
  19. package/dist/Drawer-BEtCk82g.mjs +163 -0
  20. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  21. package/dist/{ExportCsvAction-DNSgmdyv.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
  22. package/dist/FinstrongStore-CfD6bbJk.mjs +441 -0
  23. package/dist/{GoalStore-CAlmSu4U.mjs → GoalStore-j6QYHgEa.mjs} +3 -3
  24. package/dist/{Help-hi9I9EYP.mjs → Help-BnPXM_N2.mjs} +2 -2
  25. package/dist/LineChart-DttMO7uS.mjs +581 -0
  26. package/dist/{ListItemAction-BmL5buOf.mjs → ListItemAction-uobBrm_a.mjs} +10 -10
  27. package/dist/{ManageIncome-Cypo9qY4.mjs → ManageIncome-CU5C0AeO.mjs} +97 -95
  28. package/dist/{MicroWidgetContainer-CFdMGJKg.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
  29. package/dist/{MiniWidgetContainer-BdgBvpga.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
  30. package/dist/{NetWorthStore-CxqIxAgN.mjs → NetWorthStore-CpL_kqvx.mjs} +2 -2
  31. package/dist/{NotificationSettings-DxytNHlN.mjs → NotificationSettings-DI5B1spM.mjs} +5 -5
  32. package/dist/{OriginalBalanceAction-V6FEoIDe.mjs → OriginalBalanceAction-CCmnsd7y.mjs} +3 -3
  33. package/dist/{RecurringSettings-iIupYxJW.mjs → RecurringSettings-Cm5Bqcai.mjs} +4 -4
  34. package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-CngsRZ3K.mjs} +45 -44
  35. package/dist/{RecurringTransactionsStore-BiwCzScZ.mjs → RecurringTransactionsStore-Bc1wCiNB.mjs} +1 -1
  36. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-BuJ03S9d.mjs} +16 -16
  37. package/dist/SpendingLegend-B2BYr8B4.mjs +193 -0
  38. package/dist/{TransactionDetails-BUoNbsu-.mjs → TransactionDetails-CtbBBSoU.mjs} +396 -386
  39. package/dist/{TransactionStore-CtGTg0XS.mjs → TransactionStore-Dz-G8Wd0.mjs} +3 -3
  40. package/dist/{TrendsStore-5PvDT_o6.mjs → TrendsStore-BW9FGQeE.mjs} +1 -1
  41. package/dist/{User-Bj34_i8g.mjs → User-wXzDI4M8.mjs} +2 -2
  42. package/dist/{WidgetContainer-BnTgAfQn.mjs → WidgetContainer-6dsjtOVg.mjs} +4 -4
  43. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  44. package/dist/accounts/index.es.js +17 -17
  45. package/dist/accounts/stores/AccountStore.d.ts +2 -0
  46. package/dist/analytics/index.es.js +2 -2
  47. package/dist/budgets/index.es.js +13 -13
  48. package/dist/cashflow/index.es.js +49 -49
  49. package/dist/categories/index.es.js +2 -2
  50. package/dist/common/components/Select.d.ts +4 -2
  51. package/dist/common/components/charts/LineChart.d.ts +12 -2
  52. package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
  53. package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
  54. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  55. package/dist/common/components/drawer/Footer.d.ts +17 -0
  56. package/dist/common/index.es.js +33 -33
  57. package/dist/common/types/Finstrong.d.ts +54 -0
  58. package/dist/common/types/Widgets.d.ts +1 -0
  59. package/dist/common/types/index.d.ts +1 -1
  60. package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
  61. package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
  62. package/dist/dashboard/index.es.js +2 -2
  63. package/dist/debts/index.es.js +11 -11
  64. package/dist/{exportTransactionsToCSV-C4PkIYP6.mjs → exportTransactionsToCSV-Cz2t0lmA.mjs} +2 -2
  65. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  66. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  67. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  68. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  69. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  70. package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
  71. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  72. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  73. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  74. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  75. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  76. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  77. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  78. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  79. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  80. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  81. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  82. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  83. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  84. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  85. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  86. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  87. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  88. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  89. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  90. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  91. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  92. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  93. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  94. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
  95. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  96. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  97. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  98. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  99. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  100. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  101. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  102. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  103. package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
  104. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  105. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  106. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  107. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  108. package/dist/finstrong/constants/index.d.ts +20 -0
  109. package/dist/finstrong/index.es.js +3174 -1069
  110. package/dist/finstrong/stores/FinstrongStore.d.ts +21 -2
  111. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  112. package/dist/goals/index.es.js +15 -15
  113. package/dist/help/index.es.js +3 -3
  114. package/dist/{hooks-Cy8JnjCg.mjs → hooks-C41HAxM5.mjs} +4 -4
  115. package/dist/investments/index.es.js +5 -5
  116. package/dist/merchants/index.es.js +1 -1
  117. package/dist/networth/index.es.js +33 -33
  118. package/dist/notifications/index.es.js +4 -4
  119. package/dist/recurringtransactions/index.es.js +43 -43
  120. package/dist/settings/index.es.js +8 -8
  121. package/dist/spending/index.es.js +261 -436
  122. package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
  123. package/dist/transactions/index.es.js +15 -15
  124. package/dist/trends/index.es.js +16 -16
  125. package/dist/{useAccountDisplayName-D6sQsNNQ.mjs → useAccountDisplayName-CMMlIOXF.mjs} +2 -2
  126. package/dist/{useInsightsEnabled-BxytCjq5.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  127. package/package.json +1 -1
  128. package/dist/Drawer-kEE73B87.mjs +0 -113
  129. package/dist/FinstrongStore-CL7t5lBL.mjs +0 -101
  130. package/dist/LineChart-eK4IQImU.mjs +0 -541
  131. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
@@ -1,21 +1,21 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import i from "@mui/material/Button";
3
- import x from "@mui/material/Stack";
4
- import { Icon as c } from "@mxenabled/mx-icons";
5
- import { Text as p } from "@mxenabled/mxui";
6
- const j = ({
7
- icon: s,
8
- iconColor: l,
9
- header: m,
10
- onClick: n,
2
+ import s from "@mui/material/Button";
3
+ import i from "@mui/material/Stack";
4
+ import { Icon as x } from "@mxenabled/mx-icons";
5
+ import { Text as c } from "@mxenabled/mxui";
6
+ const y = ({
7
+ icon: p,
8
+ iconColor: m,
9
+ header: l,
10
+ onClick: a,
11
11
  primaryButton: e,
12
- primaryButtonStartIcon: a,
12
+ primaryButtonStartIcon: n,
13
13
  secondaryButton: r,
14
14
  subText: d,
15
15
  sx: h,
16
16
  variant: f = "buttons"
17
17
  }) => /* @__PURE__ */ o(
18
- x,
18
+ i,
19
19
  {
20
20
  sx: {
21
21
  alignItems: "center",
@@ -25,19 +25,21 @@ const j = ({
25
25
  ...h
26
26
  },
27
27
  children: [
28
- /* @__PURE__ */ t(c, { name: s, size: 48, sx: { color: l } }),
28
+ /* @__PURE__ */ t(x, { name: p, size: 48, sx: { color: m } }),
29
29
  /* @__PURE__ */ t(
30
- p,
30
+ c,
31
31
  {
32
+ className: "empty-state-header",
32
33
  color: "text.primary",
33
34
  sx: { fontWeight: 600, mt: 16, textAlign: "center", textWrap: "wrap" },
34
35
  variant: "body1",
35
- children: m
36
+ children: l
36
37
  }
37
38
  ),
38
39
  /* @__PURE__ */ t(
39
- p,
40
+ c,
40
41
  {
42
+ className: "empty-state-subtext",
41
43
  color: "text.secondary",
42
44
  sx: { fontWeight: 400, textAlign: "center", textWrap: "wrap", width: "calc(100% - 8px)" },
43
45
  variant: "subtitle2",
@@ -45,7 +47,7 @@ const j = ({
45
47
  }
46
48
  ),
47
49
  f === "buttons" && (e || r) && /* @__PURE__ */ o(
48
- x,
50
+ i,
49
51
  {
50
52
  className: "buttons-footer",
51
53
  sx: {
@@ -54,19 +56,19 @@ const j = ({
54
56
  },
55
57
  children: [
56
58
  e && /* @__PURE__ */ t(
57
- i,
59
+ s,
58
60
  {
59
- onClick: () => n?.("primary"),
60
- startIcon: a ? /* @__PURE__ */ t(c, { name: a }) : void 0,
61
+ onClick: () => a?.("primary"),
62
+ startIcon: n ? /* @__PURE__ */ t(x, { name: n }) : void 0,
61
63
  sx: { textWrap: "nowrap" },
62
64
  variant: "contained",
63
65
  children: e
64
66
  }
65
67
  ),
66
68
  r && /* @__PURE__ */ t(
67
- i,
69
+ s,
68
70
  {
69
- onClick: () => n?.("secondary"),
71
+ onClick: () => a?.("secondary"),
70
72
  sx: { textWrap: "nowrap" },
71
73
  variant: "text",
72
74
  children: r
@@ -79,5 +81,5 @@ const j = ({
79
81
  }
80
82
  );
81
83
  export {
82
- j as E
84
+ y as E
83
85
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { observer as c } from "mobx-react-lite";
3
3
  import { Icon as i } from "@mxenabled/mxui";
4
- import { e as p } from "./exportTransactionsToCSV-C4PkIYP6.mjs";
5
- import { O as m } from "./User-Bj34_i8g.mjs";
4
+ import { e as p } from "./exportTransactionsToCSV-Cz2t0lmA.mjs";
5
+ import { O as m } from "./User-wXzDI4M8.mjs";
6
6
  import { R as x } from "./ResponsiveButton-DZFp78fJ.mjs";
7
- import { g as _, h as C, u as l } from "./hooks-Cy8JnjCg.mjs";
7
+ import { g as _, h as C, u as l } from "./hooks-C41HAxM5.mjs";
8
8
  const v = ({ filter: t }) => {
9
9
  const { onEvent: r } = _(), { tags: e, sortedTransactions: s } = C(), { transactions: n } = l(), a = () => {
10
10
  r(m.ON_TRANSACTION_EXPORT_CSV_CLICK), p(t ? s.filter(t) : s, e);
@@ -0,0 +1,441 @@
1
+ import { makeAutoObservable as D, runInAction as d } from "mobx";
2
+ import { format as R } from "date-fns/format";
3
+ import { fromUnixTime as b } from "date-fns/fromUnixTime";
4
+ import { getUnixTime as C } from "date-fns/getUnixTime";
5
+ import { subMonths as H } from "date-fns/subMonths";
6
+ import { F as x, A as h } from "./Fetch-DecPFeGU.mjs";
7
+ import { jsx as c, jsxs as I } from "react/jsx-runtime";
8
+ import { addDays as v } from "date-fns/addDays";
9
+ import { addMonths as M } from "date-fns/addMonths";
10
+ import { addYears as G } from "date-fns/addYears";
11
+ import { differenceInDays as L } from "date-fns/differenceInDays";
12
+ import { differenceInMonths as w } from "date-fns/differenceInMonths";
13
+ import { differenceInWeeks as A } from "date-fns/differenceInWeeks";
14
+ import { startOfToday as N } from "date-fns/startOfToday";
15
+ import { ChevronRight as P, Check as k } from "@mxenabled/mx-icons";
16
+ import $ from "react";
17
+ import K from "@mui/material/Avatar";
18
+ import B from "@mui/material/Box";
19
+ import Y from "@mui/material/Divider";
20
+ import U from "@mui/material/List";
21
+ import X from "@mui/material/ListItem";
22
+ import V from "@mui/material/ListItemAvatar";
23
+ import W from "@mui/material/ListItemButton";
24
+ import j from "@mui/material/ListItemText";
25
+ import { Text as y } from "@mxenabled/mxui";
26
+ import { f as T, a as _ } from "./Dialog-BPTr3qHE.mjs";
27
+ import { b as z } from "./Localization-2MODESHW.mjs";
28
+ import { f as q } from "./NumberFormatting-Buh7u8Oi.mjs";
29
+ const m = {
30
+ creditScore: {
31
+ poor: 600,
32
+ good: 720
33
+ },
34
+ daysOfCashOnHand: {
35
+ poor: 30,
36
+ good: 90
37
+ },
38
+ debtToIncomeRatio: {
39
+ poor: 40,
40
+ good: 30
41
+ },
42
+ emergencySavings: {
43
+ poor: 750,
44
+ good: 1e3
45
+ },
46
+ spendToIncomeRatio: {
47
+ poor: 110,
48
+ good: 100
49
+ }
50
+ }, S = {
51
+ GOOD: "GOOD",
52
+ FAIR: "FAIR",
53
+ OFF_TRACK: "OFF TRACK",
54
+ MISSING: "MISSING DATA"
55
+ };
56
+ var O = /* @__PURE__ */ ((e) => (e.Connections = "connections", e.CreditScore = "credit_score", e.DateOfBirth = "date_of_birth", e.MonthlyIncome = "monthly_income", e))(O || {});
57
+ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(B, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(
58
+ U,
59
+ {
60
+ sx: {
61
+ "& .MuiListItemSecondaryAction-root": {
62
+ color: "text.primary",
63
+ pr: 24
64
+ }
65
+ },
66
+ children: e.map((r, n) => /* @__PURE__ */ I($.Fragment, { children: [
67
+ /* @__PURE__ */ c(X, { secondaryAction: /* @__PURE__ */ c(P, {}), children: /* @__PURE__ */ I(W, { onClick: () => t(r.key), children: [
68
+ /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
69
+ K,
70
+ {
71
+ sx: {
72
+ bgcolor: "primary.main",
73
+ ...!r.isComplete && {
74
+ bgcolor: "transparent",
75
+ borderColor: "action.active",
76
+ borderStyle: "solid",
77
+ borderWidth: 1,
78
+ color: "action.active"
79
+ }
80
+ },
81
+ children: r.icon
82
+ }
83
+ ) }),
84
+ /* @__PURE__ */ c(
85
+ j,
86
+ {
87
+ primary: /* @__PURE__ */ c(y, { sx: { color: "text.secondary" }, variant: "caption", children: r.primaryText }),
88
+ secondary: /* @__PURE__ */ c(y, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: r.secondaryText })
89
+ }
90
+ )
91
+ ] }) }),
92
+ n < e.length - 1 && /* @__PURE__ */ c(Y, { sx: { color: "divider", ml: 68 } })
93
+ ] }, r.key))
94
+ }
95
+ ) }), Gt = J, Lt = (e) => e * (180 / Math.PI), wt = (e, t) => [
96
+ {
97
+ description: t.vulnerable_description,
98
+ max: 25,
99
+ scoreContent: t.accordion_details_text.vulnerable,
100
+ status: t.vulnerable
101
+ },
102
+ {
103
+ description: t.building_description,
104
+ max: 50,
105
+ scoreContent: t.accordion_details_text.building,
106
+ status: t.building
107
+ },
108
+ {
109
+ description: t.stable_description,
110
+ max: 75,
111
+ scoreContent: t.accordion_details_text.stable,
112
+ status: t.stable
113
+ },
114
+ {
115
+ description: t.strong_description,
116
+ max: 100,
117
+ scoreContent: t.accordion_details_text.strong,
118
+ status: t.strong
119
+ }
120
+ ].find((o) => e > 0 && e <= o.max) || { status: t.insufficient_data, description: "", scoreContent: "" }, g = {
121
+ POOR: "#8C0E0E",
122
+ FAIR: "#E32727",
123
+ GOOD: "#FFB70D",
124
+ VERY_GOOD: "#0EA26C",
125
+ EXCEPTIONAL: "#005C3D"
126
+ }, u = {
127
+ POOR: "#B21C1C",
128
+ FAIR: "#FF3232",
129
+ GOOD: "#FFC02C",
130
+ VERY_GOOD: "#29C76B",
131
+ EXCEPTIONAL: "#008A5A"
132
+ }, Nt = (e, t, r) => e >= 300 && e < 580 ? {
133
+ status: r.poor,
134
+ color: t ? u.POOR : g.POOR
135
+ } : e >= 580 && e < 670 ? {
136
+ status: r.fair,
137
+ color: t ? u.FAIR : g.FAIR
138
+ } : e >= 670 && e < 740 ? {
139
+ status: r.good,
140
+ color: t ? u.GOOD : g.GOOD
141
+ } : e >= 740 && e < 800 ? {
142
+ status: r.very_good,
143
+ color: t ? u.VERY_GOOD : g.VERY_GOOD
144
+ } : e >= 800 && e <= 850 ? {
145
+ status: r.exceptional,
146
+ color: t ? u.EXCEPTIONAL : g.EXCEPTIONAL
147
+ } : { status: r.missing_data }, Pt = (e, t, r, n) => {
148
+ const o = e.reduce((i, l) => i + l.value, 0);
149
+ let a = 0;
150
+ const s = e.map((i) => {
151
+ const l = i.value / o * t, p = r + a, f = p + l;
152
+ return a += l, {
153
+ ...i,
154
+ startAngle: p,
155
+ endAngle: f
156
+ };
157
+ });
158
+ return [s[n].startAngle, s[n].endAngle];
159
+ }, kt = (e, t, r, n, o) => {
160
+ let a = 0, s = 0;
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
+ }, Kt = ({
167
+ dynamicCopy: e,
168
+ fallbackLabel: t,
169
+ icon: r,
170
+ key: n,
171
+ label: o,
172
+ value: a
173
+ }) => {
174
+ const s = !!a, i = s ? Q(n, a) : e && z(e, t) || t;
175
+ return {
176
+ icon: s ? /* @__PURE__ */ c(k, {}) : r,
177
+ isComplete: s,
178
+ key: n,
179
+ primaryText: o,
180
+ secondaryText: i
181
+ };
182
+ }, Q = (e, t) => ({
183
+ [O.DateOfBirth]: (n) => R(new Date(Number(n) * 1e3), "MMM d, yyyy"),
184
+ [O.MonthlyIncome]: (n) => q(Number(n), "0.00")
185
+ })[e]?.(t) ?? String(t), Bt = (e) => e !== null ? Math.round(e * 100) : null, Yt = (e) => {
186
+ const t = new Date((/* @__PURE__ */ new Date()).getFullYear(), e - 1, 1);
187
+ return T(t, _.MONTH_SHORT);
188
+ }, Ut = (e) => {
189
+ const { good: t, poor: r } = m.daysOfCashOnHand;
190
+ return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
191
+ }, Xt = (e) => {
192
+ const { good: t, poor: r } = m.emergencySavings;
193
+ return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
194
+ }, Vt = (e) => {
195
+ const { good: t, poor: r } = m.spendToIncomeRatio;
196
+ return e === null ? "MISSING" : e < t ? "GOOD" : e < r ? "FAIR" : "OFF_TRACK";
197
+ }, Wt = (e) => {
198
+ const { good: t, poor: r } = m.debtToIncomeRatio;
199
+ return e === null ? "MISSING" : e <= t ? "GOOD" : e <= r ? "FAIR" : "OFF_TRACK";
200
+ }, jt = (e) => {
201
+ const { good: t, poor: r } = m.creditScore;
202
+ return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
203
+ }, Z = (e) => e === null ? "MISSING" : e === 0 ? "GOOD" : "OFF_TRACK", zt = (e, t) => {
204
+ const r = Z(e), n = {
205
+ GOOD: t.count_good_description,
206
+ OFF_TRACK: t.count_off_track_description,
207
+ MISSING: t.count_missing_description
208
+ };
209
+ return {
210
+ cardState: r,
211
+ description: n[r],
212
+ title: t.count_card_title
213
+ };
214
+ }, qt = (e) => ({
215
+ [S.GOOD]: { backgroundColor: "success.lighter", color: "success.dark" },
216
+ [S.FAIR]: { backgroundColor: "warning.lighter", color: "warning.dark" },
217
+ [S.OFF_TRACK]: { backgroundColor: "error.lighter", color: "error.dark" },
218
+ [S.MISSING]: { backgroundColor: "divider", color: "text.secondary" }
219
+ })[e], tt = 1, et = 1, rt = {
220
+ 1: M,
221
+ 2: G,
222
+ 3: v
223
+ }, nt = {
224
+ 1: w,
225
+ 2: (e, t) => A(e, t) / 2,
226
+ 3: A,
227
+ 4: L
228
+ }, E = [
229
+ { contributionPeriodIndex: 3, targetAmount: 6, upperLimit: 500 },
230
+ { contributionPeriodIndex: 3, targetAmount: 3, upperLimit: 900 },
231
+ { contributionPeriodIndex: 2, targetAmount: 1, upperLimit: 1e3 }
232
+ ], Jt = ({
233
+ contribution: e,
234
+ goalAmount: t,
235
+ goalPeriod: r,
236
+ targetPeriod: n,
237
+ totalSaved: o
238
+ }) => {
239
+ const a = t - o;
240
+ if (a <= 0) return 0;
241
+ const s = N(), i = rt[n], l = nt[e];
242
+ if (!i || !l) return a;
243
+ const p = i(s, r), f = l(p, s);
244
+ return Math.max(a / (f || 1), 1);
245
+ }, Qt = (e) => !e || e <= 0 ? "0%" : e >= 1e3 ? "100%" : `${Math.round(e / 10)}%`, Zt = (e) => E.find((r) => e < r.upperLimit)?.targetAmount ?? et, te = (e) => E.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: T(new Date(0, n.month - 1, 1), _.MONTH_SHORT),
247
+ y: n[t]
248
+ })), ot = (e) => e.sort((t, r) => t.monthly_health_score_average.month - r.monthly_health_score_average.month).map((t) => ({
249
+ x: T(
250
+ new Date(0, t.monthly_health_score_average.month - 1, 1),
251
+ _.MONTH_SHORT
252
+ ),
253
+ y: Math.round(t.monthly_health_score_average.average_health_score)
254
+ })), at = (e) => e.map(({ transaction: r }) => ({
255
+ ...r
256
+ })).sort((r, n) => n.date - r.date);
257
+ class F {
258
+ fetchInstance;
259
+ constructor(t, r, n) {
260
+ this.fetchInstance = new x(t, r, void 0, n);
261
+ }
262
+ calculateHealthScore = async () => this.fetchInstance.post(`${h.HEALTH_SCORES}/calculate`).then((t) => t.health_score);
263
+ getAverageHealthScores = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_averages`).then((t) => t);
264
+ getDebtSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/debt_spend`).then((t) => t);
265
+ getIncome = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/income`).then((t) => t);
266
+ getMonthlySummaries = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_summaries`).then((t) => t);
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
+ getSpendingFeeTransactions = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/spending_fee`).then((t) => t);
270
+ getStandardSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/standard_spend`).then((t) => t);
271
+ }
272
+ class re {
273
+ api = new F("/", "");
274
+ augmentedChartData = [];
275
+ averageHealthScores = [];
276
+ monthlySummaries = [];
277
+ incomeTransactions = [];
278
+ debtSpendTransactions = [];
279
+ spendingFeeTransactions = [];
280
+ spendTransactions = [];
281
+ globalStore;
282
+ healthScore = {};
283
+ healthScoreChange;
284
+ healthScoreChangeReports = [];
285
+ peerScore = null;
286
+ constructor(t) {
287
+ this.globalStore = t, this.api = new F(t.endpoint, t.sessionToken, t.onError), D(this);
288
+ }
289
+ calculateHealthScore = async () => {
290
+ try {
291
+ const t = await this.api.calculateHealthScore();
292
+ let r = 0;
293
+ await this.loadHealthScoreChangeReports();
294
+ const n = t?.health_score || 0, o = this.healthScoreChangeReports.at(-1)?.older_health_score || 0;
295
+ r = n - o, d(() => {
296
+ this.healthScore = t, this.healthScoreChange = r;
297
+ });
298
+ } catch (t) {
299
+ console.error("Error calculating health score:", t);
300
+ }
301
+ };
302
+ loadAverageHealthScores = async () => {
303
+ try {
304
+ const t = await this.api.getAverageHealthScores();
305
+ d(() => {
306
+ this.averageHealthScores = t;
307
+ });
308
+ } catch (t) {
309
+ console.error("Error loading average health scores:", t);
310
+ }
311
+ };
312
+ loadMonthlySummaries = async () => {
313
+ try {
314
+ const t = await this.api.getMonthlySummaries();
315
+ d(() => {
316
+ this.monthlySummaries = t;
317
+ });
318
+ } catch (t) {
319
+ console.error("Error loading monthly summaries:", t);
320
+ }
321
+ };
322
+ loadDebtSpend = async () => {
323
+ try {
324
+ const t = await this.api.getDebtSpend();
325
+ d(() => {
326
+ this.debtSpendTransactions = t;
327
+ });
328
+ } catch (t) {
329
+ console.error("Error loading debt spend:", t);
330
+ }
331
+ };
332
+ loadIncome = async () => {
333
+ try {
334
+ const t = await this.api.getIncome();
335
+ d(() => {
336
+ this.incomeTransactions = t;
337
+ });
338
+ } catch (t) {
339
+ console.error("Error loading income:", t);
340
+ }
341
+ };
342
+ loadHealthScoreChangeReports = async () => {
343
+ const t = C(H(/* @__PURE__ */ new Date(), 2)), r = C(/* @__PURE__ */ new Date());
344
+ try {
345
+ const n = await this.api.getHealthScoreChangeReports(
346
+ t,
347
+ r
348
+ );
349
+ d(() => {
350
+ this.healthScoreChangeReports = n;
351
+ });
352
+ } catch (n) {
353
+ console.error("Error loading health score change reports:", n);
354
+ }
355
+ };
356
+ loadPeerScore = async () => {
357
+ const t = R(b(this.globalStore.appDataStore.user.birthday), "yyyy");
358
+ try {
359
+ const r = await this.api.getPeerScore(t);
360
+ d(() => {
361
+ this.peerScore = r;
362
+ });
363
+ } catch (r) {
364
+ console.error("Error loading peer score:", r);
365
+ }
366
+ };
367
+ loadAugmentedChartData = async () => {
368
+ try {
369
+ const t = await this.api.getAverageHealthScores();
370
+ d(() => {
371
+ this.augmentedChartData = ot(t);
372
+ });
373
+ } catch (t) {
374
+ console.error(`Error occurred while getting augmented chart data: ${t}`);
375
+ }
376
+ };
377
+ getSpendingFeeTransactions = async () => {
378
+ try {
379
+ const t = await this.api.getSpendingFeeTransactions(), r = at(t);
380
+ d(() => {
381
+ this.spendingFeeTransactions = r;
382
+ });
383
+ } catch (t) {
384
+ console.error(`Error occurred while getting spending fee transactions: ${t}`);
385
+ }
386
+ };
387
+ loadSpendTransactions = async () => {
388
+ try {
389
+ const t = await this.api.getStandardSpend();
390
+ d(() => {
391
+ this.spendTransactions = [...t];
392
+ });
393
+ } catch (t) {
394
+ console.error("Error loading spend transactions:", t);
395
+ }
396
+ };
397
+ get spendAndDebtTransactions() {
398
+ return [...this.spendTransactions, ...this.debtSpendTransactions];
399
+ }
400
+ get allTransactions() {
401
+ return {
402
+ income: this.incomeTransactions,
403
+ debtSpend: this.debtSpendTransactions,
404
+ spendingFee: this.spendingFeeTransactions,
405
+ spend: this.spendTransactions
406
+ };
407
+ }
408
+ handleFinstrongWidgetPrimaryCtaClick = (t) => () => {
409
+ };
410
+ }
411
+ export {
412
+ O as A,
413
+ u as C,
414
+ re as F,
415
+ Gt as P,
416
+ kt as a,
417
+ $t as b,
418
+ wt as c,
419
+ Nt as d,
420
+ g as e,
421
+ ee as f,
422
+ Pt as g,
423
+ qt as h,
424
+ S as i,
425
+ jt as j,
426
+ te as k,
427
+ Zt as l,
428
+ Jt as m,
429
+ Qt as n,
430
+ Xt as o,
431
+ Z as p,
432
+ Ut as q,
433
+ Lt as r,
434
+ Bt as s,
435
+ Yt as t,
436
+ zt as u,
437
+ Vt as v,
438
+ Wt as w,
439
+ Kt as x,
440
+ F as y
441
+ };
@@ -7,8 +7,8 @@ import O from "@mui/material/CardHeader";
7
7
  import S from "@mui/material/Stack";
8
8
  import { AccountBalance as w, ChevronRight as L } from "@mxenabled/mx-icons";
9
9
  import { Text as A } from "@mxenabled/mxui";
10
- import { l as b } from "./ConnectDrawer-CbxHKlRv.mjs";
11
- import { a as y } from "./hooks-Cy8JnjCg.mjs";
10
+ import { l as b } from "./ConnectDrawer-CuUj16NH.mjs";
11
+ import { a as y } from "./hooks-C41HAxM5.mjs";
12
12
  import { makeAutoObservable as D, runInAction as c } from "mobx";
13
13
  import { F as v, A as i } from "./Fetch-DecPFeGU.mjs";
14
14
  import { fromUnixTime as G } from "date-fns/fromUnixTime";
@@ -16,7 +16,7 @@ import { addYears as x } from "date-fns/addYears";
16
16
  import { getUnixTime as K } from "date-fns/getUnixTime";
17
17
  import { b as E } from "./Localization-2MODESHW.mjs";
18
18
  import { a as F } from "./NumberFormatting-Buh7u8Oi.mjs";
19
- import { f as B, D as U } from "./Dialog-CWW597AF.mjs";
19
+ import { f as B, a as U } from "./Dialog-BPTr3qHE.mjs";
20
20
  var a = /* @__PURE__ */ ((e) => (e[e.DEBT_TRACK = 1] = "DEBT_TRACK", e[e.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", e[e.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", e[e.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", e))(a || {}), $ = /* @__PURE__ */ ((e) => (e[e.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", e[e.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", e[e.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", e[e.ACTION = 4] = "ACTION", e))($ || {}), l = /* @__PURE__ */ ((e) => (e[e.AUTOMOBILE = 1] = "AUTOMOBILE", e[e.COLLEGE = 2] = "COLLEGE", e[e.HOUSE = 3] = "HOUSE", e[e.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", e[e.VACATION = 5] = "VACATION", e[e.ELECTRONIC = 6] = "ELECTRONIC", e[e.OTHER = 7] = "OTHER", e[e.RETIREMENT = 8] = "RETIREMENT", e[e.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", e[e.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", e[e.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", e[e.CREDIT_CARD = 12] = "CREDIT_CARD", e[e.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", e[e.LOANS = 14] = "LOANS", e))(l || {});
21
21
  const at = ({ description: e, label: t, title: o }) => {
22
22
  const { config: r } = y(), [n, s] = u.useState(!1);
@@ -13,7 +13,7 @@ import E from "@mui/material/Stack";
13
13
  import { H3 as y, P as H, Icon as X, Text as T, H2 as _t, InstitutionLogo as bt } from "@mxenabled/mxui";
14
14
  import { ExpandMore as ot, ChevronRight as wt } from "@mxenabled/mx-icons";
15
15
  import xt from "@mui/material/Breadcrumbs";
16
- import { u as V, A as tt, d as ft, p as St, b as It, a as Tt } from "./hooks-Cy8JnjCg.mjs";
16
+ import { u as V, A as tt, d as ft, p as St, b as It, a as Tt } from "./hooks-C41HAxM5.mjs";
17
17
  import { useTheme as Z } from "@mui/material/styles";
18
18
  import { b as s } from "./Localization-2MODESHW.mjs";
19
19
  import { E as Et, a as Ct, P as At } from "./Help-DhcC-C05.mjs";
@@ -21,7 +21,7 @@ import { observer as rt } from "mobx-react-lite";
21
21
  import at from "@mui/material/Alert";
22
22
  import ct from "@mui/material/Snackbar";
23
23
  import lt from "@mui/material/TextField";
24
- import { D as U } from "./Drawer-kEE73B87.mjs";
24
+ import { D as U } from "./Drawer-BEtCk82g.mjs";
25
25
  import { L as dt } from "./Loader-DUaFpDGv.mjs";
26
26
  import Ot from "@mui/material/ListItemAvatar";
27
27
  import Nt from "@mui/material/ListItem";