@mx-cartographer/experiences 8.0.0-alpha.bb3 → 8.0.0-alpha.mega1

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 (203) hide show
  1. package/CHANGELOG.md +178 -1
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-CvR2-dSR.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-CitErkuS.mjs} +89 -82
  4. package/dist/AccountDetailsHeader-BkG3MNYo.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-zCMqet85.mjs} +6 -6
  6. package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-DHrz8Mml.mjs} +9 -9
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-LgfBcYMe.mjs} +112 -75
  8. package/dist/Accounts-Bzy1_REQ.mjs +9 -0
  9. package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
  10. package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
  11. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-BmZXkL0C.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +23 -21
  13. package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
  14. package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
  15. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-BkvlItWx.mjs} +11 -11
  16. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
  17. package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-itK0R3wV.mjs} +2 -2
  18. package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
  19. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
  20. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-Bq-aPy-5.mjs} +1 -1
  21. package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
  22. package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
  23. package/dist/Drawer-By9V-B5L.mjs +178 -0
  24. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  25. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-Cglo8Mca.mjs} +3 -3
  26. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  27. package/dist/FinstrongStore-BIrX0Xg2.mjs +451 -0
  28. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-1P19goZ7.mjs} +112 -152
  29. package/dist/{Help-B6dIcujh.mjs → Help-Ea3BlXQp.mjs} +2 -2
  30. package/dist/LineChart-KpPw1phO.mjs +580 -0
  31. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BxTkF6Tz.mjs} +10 -10
  32. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-CaoQl609.mjs} +91 -88
  33. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  34. package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
  35. package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
  36. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-rC0q7P7t.mjs} +2 -2
  37. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-uzM8tCoH.mjs} +236 -231
  38. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
  39. package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
  40. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +4 -4
  41. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-B4ybrS0B.mjs} +4 -4
  42. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-BqijW_8S.mjs} +49 -48
  43. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +26 -29
  44. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
  45. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DQ1b9uqq.mjs} +11 -13
  46. package/dist/SpendingLegend-CDO060GT.mjs +193 -0
  47. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  48. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  49. package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
  50. package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
  51. package/dist/TrendsStore-yO7qYv97.mjs +186 -0
  52. package/dist/{User-BQUxBeZV.mjs → User-Cnlegl1N.mjs} +2 -2
  53. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +711 -728
  54. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CoFDmQRE.mjs} +4 -4
  55. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  56. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  57. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  58. package/dist/accounts/index.es.js +245 -235
  59. package/dist/accounts/stores/AccountStore.d.ts +24 -25
  60. package/dist/accounts/utils/Accounts.d.ts +1 -2
  61. package/dist/analytics/index.es.js +2 -2
  62. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  63. package/dist/budgets/index.es.js +611 -580
  64. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  65. package/dist/cashflow/index.es.js +187 -180
  66. package/dist/categories/index.es.js +2 -2
  67. package/dist/categories/stores/CategoryStore.d.ts +2 -5
  68. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  69. package/dist/common/components/Select.d.ts +4 -2
  70. package/dist/common/components/charts/LineChart.d.ts +12 -2
  71. package/dist/common/components/charts/index.d.ts +0 -3
  72. package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
  73. package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
  74. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  75. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  76. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  77. package/dist/common/components/drawer/Footer.d.ts +17 -0
  78. package/dist/common/hooks/index.d.ts +1 -0
  79. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  80. package/dist/common/index.es.js +397 -387
  81. package/dist/common/stores/AppDataStore.d.ts +1 -3
  82. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  83. package/dist/common/stores/GlobalStore.d.ts +10 -4
  84. package/dist/common/stores/GlobalUiStore.d.ts +2 -3
  85. package/dist/common/stores/UserStore.d.ts +2 -3
  86. package/dist/common/types/Account.d.ts +6 -9
  87. package/dist/common/types/Finstrong.d.ts +54 -0
  88. package/dist/common/types/Global.d.ts +1 -0
  89. package/dist/common/types/Widgets.d.ts +1 -0
  90. package/dist/common/types/index.d.ts +1 -1
  91. package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
  92. package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
  93. package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
  94. package/dist/dashboard/index.es.js +90 -88
  95. package/dist/debts/index.es.js +458 -448
  96. package/dist/exportTransactionsToCSV-DuAaI5XA.mjs +48 -0
  97. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  98. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  99. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  100. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  101. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  102. package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
  103. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  104. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  105. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  106. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  107. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  108. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  109. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  110. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  111. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  112. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  113. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  114. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  115. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  116. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  117. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  118. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  119. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  120. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  121. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  122. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  123. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  124. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  125. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  126. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
  127. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  128. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  129. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  130. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  131. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  132. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  133. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  134. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +24 -0
  135. package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
  136. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  137. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  138. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  139. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  140. package/dist/finstrong/constants/index.d.ts +9 -0
  141. package/dist/finstrong/index.es.js +3190 -1073
  142. package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
  143. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  144. package/dist/goals/index.es.js +302 -291
  145. package/dist/goals/stores/GoalStore.d.ts +4 -17
  146. package/dist/help/index.es.js +13 -9
  147. package/dist/{hooks-D6XlXHf4.mjs → hooks-ZMp65DFz.mjs} +12 -12
  148. package/dist/insights/index.es.js +1 -1
  149. package/dist/investments/index.es.js +108 -104
  150. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  151. package/dist/merchants/index.es.js +2 -2
  152. package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
  153. package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
  154. package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
  155. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
  156. package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
  157. package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
  158. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
  159. package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
  160. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  161. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
  162. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
  163. package/dist/microinsights/constants/App.d.ts +0 -1
  164. package/dist/microinsights/index.d.ts +4 -3
  165. package/dist/microinsights/index.es.js +101 -14
  166. package/dist/microinsights/interfaces.d.ts +0 -6
  167. package/dist/networth/index.es.js +197 -190
  168. package/dist/notifications/index.es.js +25 -25
  169. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  170. package/dist/recurringtransactions/index.es.js +395 -351
  171. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
  172. package/dist/settings/index.es.js +307 -298
  173. package/dist/spending/index.es.js +299 -438
  174. package/dist/spending/utils/SpendingData.d.ts +2 -1
  175. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  176. package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
  177. package/dist/transactions/index.es.js +115 -112
  178. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  179. package/dist/trends/components/TrendsTable.d.ts +0 -2
  180. package/dist/trends/index.es.js +1025 -604
  181. package/dist/trends/utils/TrendsData.d.ts +1 -0
  182. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
  183. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
  184. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  185. package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
  186. package/package.json +4 -4
  187. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  188. package/dist/Accounts-BRf_YeTf.mjs +0 -27
  189. package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
  190. package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
  191. package/dist/Drawer-kEE73B87.mjs +0 -113
  192. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  193. package/dist/LineChart-D4GI7nVh.mjs +0 -541
  194. package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
  195. package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
  196. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  197. package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
  198. package/dist/TransactionStore-ai3uII_r.mjs +0 -690
  199. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  200. package/dist/common/components/SkeletonLoader.d.ts +0 -7
  201. package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  202. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
  203. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -1,114 +1,115 @@
1
- import { g as ue, T as d, G as me, a as We, M as J, C as ye, b as Pe } from "../GoalStore-D-aB35SY.mjs";
2
- import { c as Yn, d as Zn } from "../GoalStore-D-aB35SY.mjs";
1
+ import { g as ue, T as u, G as me, a as Pe, M as J, C as Ae, b as Ve } from "../GoalStore-1P19goZ7.mjs";
2
+ import { c as qn, d as Jn } from "../GoalStore-1P19goZ7.mjs";
3
3
  import { jsxs as r, jsx as e, Fragment as U } from "react/jsx-runtime";
4
4
  import y from "react";
5
5
  import { observer as D } from "mobx-react-lite";
6
- import Ve from "@mui/material/Alert";
7
- import je from "@mui/material/Snackbar";
6
+ import je from "@mui/material/Alert";
7
+ import Fe from "@mui/material/Snackbar";
8
8
  import f from "@mui/material/Stack";
9
9
  import le from "@mui/material/Tab";
10
- import Fe from "@mui/material/Tabs";
11
- import { Text as A, H2 as _e, P as W, H3 as ze, Icon as He, InstitutionLogo as ne } from "@mxenabled/mxui";
10
+ import ze from "@mui/material/Tabs";
11
+ import { Text as A, H2 as _e, P as W, H3 as He, Icon as $e, InstitutionLogo as ne } from "@mxenabled/mxui";
12
12
  import pe from "@mui/material/Button";
13
- import Ae from "@mui/material/Card";
14
- import Te from "@mui/material/CardActionArea";
15
- import Ce from "@mui/material/CardContent";
16
- import ge from "@mui/material/Unstable_Grid2";
13
+ import Te from "@mui/material/Card";
14
+ import Ce from "@mui/material/CardActionArea";
15
+ import Se from "@mui/material/CardContent";
16
+ import be from "@mui/material/Unstable_Grid2";
17
17
  import oe from "@mui/material/Avatar";
18
- import $e from "@mui/material/CardHeader";
19
- import { Payments as Se, NoteStack as Re, Person as Ee, ChevronRight as M, DragHandle as Xe, CheckCircle as Ue, Icon as be, ExpandLess as Ye, ExpandMore as Ze, AddBox as xe, Trophy as qe } from "@mxenabled/mx-icons";
20
- import { u as C, l as I, a as ve, d as V, p as Ie, g as Ge, b as Ne } from "../hooks-D6XlXHf4.mjs";
21
- import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
22
- import { f as x } from "../NumberFormatting-Buh7u8Oi.mjs";
23
- import { S as Je } from "../StatusBar-BK_uYHAB.mjs";
18
+ import Xe from "@mui/material/CardHeader";
19
+ import { Payments as Re, NoteStack as Ee, Person as xe, ChevronRight as M, DragHandle as Ue, CheckCircle as Ye, Icon as fe, ExpandLess as Ze, ExpandMore as qe, AddBox as ve, Trophy as Je } from "@mxenabled/mx-icons";
20
+ import { u as C, l as I, b as he, a as Ie, d as V, o as Ge, g as Ne } from "../hooks-ZMp65DFz.mjs";
21
+ import { u as ge } from "../useScreenSize-B6JyS_Lj.mjs";
22
+ import { f as x } from "../NumberFormatting-DjTD0t3W.mjs";
23
+ import { S as Qe } from "../StatusBar-BK_uYHAB.mjs";
24
24
  import E from "@mui/material/Divider";
25
- import L from "@mui/material/List";
26
- import { L as ee } from "../ListItemAction-DHa3KJPs.mjs";
27
- import { C as ke } from "../CurrencyInput-DUsQbkXb.mjs";
25
+ import B from "@mui/material/List";
26
+ import { L as ee } from "../ListItemAction-BxTkF6Tz.mjs";
27
+ import { C as ke } from "../CurrencyInput-itK0R3wV.mjs";
28
28
  import { fromUnixTime as Q } from "date-fns/fromUnixTime";
29
29
  import N from "@mui/material/ListItem";
30
30
  import k from "@mui/material/ListItemButton";
31
31
  import w from "@mui/material/ListItemText";
32
- import { DataGridPro as Qe } from "@mui/x-data-grid-pro";
33
- import { D as j } from "../Drawer-kEE73B87.mjs";
34
- import { b as B } from "../Localization-2MODESHW.mjs";
35
- import { f as ae, D as re, a as et } from "../Dialog-CWW597AF.mjs";
32
+ import { DataGridPro as et } from "@mui/x-data-grid-pro";
33
+ import { D as j } from "../Drawer-By9V-B5L.mjs";
34
+ import { b as L } from "../Localization-2MODESHW.mjs";
35
+ import { f as ae, a as re, D as tt } from "../Dialog-BPTr3qHE.mjs";
36
36
  import P from "@mui/material/ListItemAvatar";
37
- import { g as we, A as fe } from "../ConnectDrawer-BQNs-hjk.mjs";
38
- import tt from "@mui/material/Collapse";
39
- import nt from "@mui/material/ListItemIcon";
40
- import ot from "@mui/material/Checkbox";
41
- import { u as at, A as rt } from "../AccountDetailsHeader-JtSX6Uf9.mjs";
42
- import { A as it } from "../AccountDetailsContent-CAM9y39M.mjs";
43
- import { u as st } from "../useAccountDisplayName-BUAApBIb.mjs";
37
+ import { g as we, A as ye } from "../ConnectDrawer-BkvlItWx.mjs";
38
+ import nt from "@mui/material/Collapse";
39
+ import ot from "@mui/material/ListItemIcon";
40
+ import at from "@mui/material/Checkbox";
41
+ import { u as rt, A as it } from "../AccountDetailsHeader-BkG3MNYo.mjs";
42
+ import { A as st } from "../AccountDetailsContent-CitErkuS.mjs";
43
+ import { u as lt } from "../useAccountDisplayName-B7iXTNM8.mjs";
44
44
  import De from "@mui/material/TextField";
45
- import { M as lt, I as ct, O as dt } from "../OriginalBalanceAction-CWuVvRq9.mjs";
46
- import { getUnixTime as mt } from "date-fns/getUnixTime";
47
- import { isValid as ut } from "date-fns/isValid";
48
- import { AdapterDateFns as _t } from "@mui/x-date-pickers/AdapterDateFnsV3";
49
- import { DatePicker as pt } from "@mui/x-date-pickers";
50
- import { LocalizationProvider as ht } from "@mui/x-date-pickers/LocalizationProvider";
51
- import { A as Y, W as gt } from "../WidgetContainer-BHWANqT4.mjs";
52
- import { L as Ke } from "../Loader-DUaFpDGv.mjs";
53
- import { E as bt } from "../EmptyState-DA_lfRBv.mjs";
54
- import ft from "@mui/material/Stack/Stack";
55
- import yt from "@mui/material/Box";
56
- import At from "@mui/material/styles/useTheme";
57
- import { S as Tt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
58
- import { M as Ct } from "../MicroWidgetContainer-DpeqN9n3.mjs";
45
+ import { M as ct, I as dt, O as mt } from "../OriginalBalanceAction-C6jdS4ws.mjs";
46
+ import { getUnixTime as ut } from "date-fns/getUnixTime";
47
+ import { isValid as _t } from "date-fns/isValid";
48
+ import { AdapterDateFns as pt } from "@mui/x-date-pickers/AdapterDateFnsV3";
49
+ import { DatePicker as ht } from "@mui/x-date-pickers";
50
+ import { LocalizationProvider as gt } from "@mui/x-date-pickers/LocalizationProvider";
51
+ import { u as Ke } from "../useWidgetLoadTimer-hIOioiKx.mjs";
52
+ import { A as Y, W as bt } from "../WidgetContainer-CoFDmQRE.mjs";
53
+ import { L as Me } from "../Loader-DUaFpDGv.mjs";
54
+ import { E as ft } from "../EmptyState-DoxNUae-.mjs";
55
+ import yt from "@mui/material/Stack/Stack";
56
+ import At from "@mui/material/Box";
57
+ import Tt from "@mui/material/styles/useTheme";
58
+ import { S as Ct } from "../SingleSegmentDonut-BgbLgwHi.mjs";
59
+ import { M as St } from "../MicroWidgetContainer-r6mtxRer.mjs";
59
60
  function ce({ title: t, subtitle: n }) {
60
61
  return /* @__PURE__ */ r(f, { children: [
61
62
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t }),
62
63
  /* @__PURE__ */ e(A, { sx: { fontWeight: 400 }, variant: "Body", children: n })
63
64
  ] });
64
65
  }
65
- const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
66
+ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
66
67
  /(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
67
68
  "$1$2$3"
68
- ) : x(t, "0,0.00"), Me = D(
69
+ ) : x(t, "0,0.00"), Le = D(
69
70
  ({ goal: t, isInDrawer: n = !1, onClick: i }) => {
70
- const { goals: s } = C(), { isMobile: p, isTablet: a } = he(), _ = p || a, {
71
+ const { goals: s } = C(), { isMobile: p, isTablet: a } = ge(), _ = p || a, {
71
72
  backgroundColor: g,
72
73
  color: l,
73
74
  percentage: h,
74
- percentageText: o,
75
- projectedText: m
76
- } = ue(s, t), c = t.track_type === d.DEBT_TRACK ? t.initial_amount : t.amount, u = [
75
+ percentageText: d,
76
+ projectedText: o
77
+ } = ue(s, t), c = t.track_type === u.DEBT_TRACK ? t.initial_amount : t.amount, m = [
77
78
  {
78
79
  color: g,
79
80
  percentage: `${h}`
80
81
  }
81
82
  ];
82
- let b = /* @__PURE__ */ e(Se, {});
83
- return t.track_type === d.DEBT_TRACK ? b = /* @__PURE__ */ e(Re, {}) : t.track_type === d.RETIREMENT_TRACK && (b = /* @__PURE__ */ e(Ee, {})), /* @__PURE__ */ e(Ae, { elevation: 2, children: /* @__PURE__ */ r(Te, { disabled: !i, onClick: i, children: [
83
+ let b = /* @__PURE__ */ e(Re, {});
84
+ return t.track_type === u.DEBT_TRACK ? b = /* @__PURE__ */ e(Ee, {}) : t.track_type === u.RETIREMENT_TRACK && (b = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ r(Ce, { disabled: !i, onClick: i, children: [
84
85
  /* @__PURE__ */ e(
85
- $e,
86
+ Xe,
86
87
  {
87
88
  avatar: /* @__PURE__ */ e(oe, { sx: { bgcolor: g, color: l, height: 48, width: 48 }, variant: "rounded", children: b }),
88
- subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${St(
89
+ subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${Rt(
89
90
  c,
90
91
  _
91
92
  )}` }),
92
93
  title: /* @__PURE__ */ e(_e, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
93
94
  }
94
95
  ),
95
- /* @__PURE__ */ e(Ce, { sx: { pt: 0 }, children: /* @__PURE__ */ r(f, { gap: 6, children: [
96
- /* @__PURE__ */ e(Je, { data: u, height: 24 }),
96
+ /* @__PURE__ */ e(Se, { sx: { pt: 0 }, children: /* @__PURE__ */ r(f, { gap: 6, children: [
97
+ /* @__PURE__ */ e(Qe, { data: m, height: 24 }),
97
98
  /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
98
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: o }),
99
- t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: m })
99
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: d }),
100
+ t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: o })
100
101
  ] })
101
102
  ] }) })
102
103
  ] }) });
103
104
  }
104
- ), Rt = D(({ trackType: t }) => {
105
+ ), Et = D(({ trackType: t }) => {
105
106
  const { goals: n } = C(), { setAlert: i, monthlyCashFlowProfile: s, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
106
107
  let h = 0;
107
- return t === d.SAVINGS_TRACK ? h = s?.amount_allocated_for_savings_goals || 0 : t === d.DEBT_TRACK ? h = s?.amount_allocated_for_debt_goals || 0 : t === d.RETIREMENT_TRACK && (h = s?.amount_allocated_for_retirement_goals || 0), h;
108
+ return t === u.SAVINGS_TRACK ? h = s?.amount_allocated_for_savings_goals || 0 : t === u.DEBT_TRACK ? h = s?.amount_allocated_for_debt_goals || 0 : t === u.RETIREMENT_TRACK && (h = s?.amount_allocated_for_retirement_goals || 0), h;
108
109
  }, [s]), [_, g] = y.useState(a), l = async () => {
109
110
  if (s) {
110
111
  const h = { ...s };
111
- t === d.SAVINGS_TRACK ? h.amount_allocated_for_savings_goals = _ : t === d.DEBT_TRACK ? h.amount_allocated_for_debt_goals = _ : t === d.RETIREMENT_TRACK && (h.amount_allocated_for_retirement_goals = _), await p(h), i(n.alert_contribution_updated);
112
+ t === u.SAVINGS_TRACK ? h.amount_allocated_for_savings_goals = _ : t === u.DEBT_TRACK ? h.amount_allocated_for_debt_goals = _ : t === u.RETIREMENT_TRACK && (h.amount_allocated_for_retirement_goals = _), await p(h), i(n.alert_contribution_updated);
112
113
  }
113
114
  };
114
115
  return /* @__PURE__ */ e(f, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
@@ -134,20 +135,20 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
134
135
  )
135
136
  }
136
137
  ) });
137
- }), Et = ({ goals: t }) => {
138
- const { goals: n, common: i } = C(), { reorderGoals: s, setAlert: p } = I(), [a, _] = y.useState(!1), [g, l] = y.useState(t.map((u) => ({ ...u })));
138
+ }), xt = ({ goals: t }) => {
139
+ const { goals: n, common: i } = C(), { reorderGoals: s, setAlert: p } = I(), [a, _] = y.useState(!1), [g, l] = y.useState(t.map((m) => ({ ...m })));
139
140
  y.useEffect(() => {
140
- a && l(t.map((u) => ({ ...u })));
141
+ a && l(t.map((m) => ({ ...m })));
141
142
  }, [a]);
142
143
  const h = [
143
144
  {
144
145
  field: "name",
145
146
  flex: 1,
146
- renderCell: (u) => {
147
- const b = u.row;
147
+ renderCell: (m) => {
148
+ const b = m.row;
148
149
  return /* @__PURE__ */ r(f, { children: [
149
150
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: b.name }),
150
- /* @__PURE__ */ e(A, { variant: "XSmall", children: B(
151
+ /* @__PURE__ */ e(A, { variant: "XSmall", children: L(
151
152
  n.goal_projection,
152
153
  ae(
153
154
  Q(b.projected_to_complete_at || 0),
@@ -162,20 +163,20 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
162
163
  align: "right",
163
164
  field: "amount",
164
165
  minWidth: 140,
165
- renderCell: (u) => {
166
- const b = u.row;
166
+ renderCell: (m) => {
167
+ const b = m.row;
167
168
  return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "Body", children: x(b.amount, "0,0.00") });
168
169
  },
169
170
  sortable: !1
170
171
  }
171
- ], o = g.map((u) => ({
172
- id: u.guid,
172
+ ], d = g.map((m) => ({
173
+ id: m.guid,
173
174
  isHovering: !1,
174
- __reorder__: u.name,
175
- ...u
176
- })), m = ({ oldIndex: u, targetIndex: b }) => {
175
+ __reorder__: m.name,
176
+ ...m
177
+ })), o = ({ oldIndex: m, targetIndex: b }) => {
177
178
  const T = [...g];
178
- T.splice(b, 0, T.splice(u, 1)[0]);
179
+ T.splice(b, 0, T.splice(m, 1)[0]);
179
180
  for (let S = 0; S < T.length; S += 1)
180
181
  T[S].position = S + 1;
181
182
  l(T);
@@ -207,18 +208,18 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
207
208
  children: /* @__PURE__ */ r(f, { children: [
208
209
  /* @__PURE__ */ e(W, { sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
209
210
  /* @__PURE__ */ e(
210
- Qe,
211
+ et,
211
212
  {
212
213
  columnHeaderHeight: 0,
213
214
  columns: h,
214
215
  disableColumnFilter: !0,
215
216
  disableColumnMenu: !0,
216
217
  hideFooter: !0,
217
- onRowOrderChange: m,
218
+ onRowOrderChange: o,
218
219
  rowReordering: !0,
219
- rows: o,
220
+ rows: d,
220
221
  slots: {
221
- rowReorderIcon: () => /* @__PURE__ */ e(Xe, { sx: { ml: 12 } })
222
+ rowReorderIcon: () => /* @__PURE__ */ e(Ue, { sx: { ml: 12 } })
222
223
  //TODO: Add to mx-icons
223
224
  },
224
225
  sx: {
@@ -232,10 +233,10 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
232
233
  }
233
234
  )
234
235
  ] });
235
- }, xt = ({ goal: t, index: n }) => {
236
- const { goals: i } = C(), { percentage: s } = ue(i, t), p = t.goal_type === me.KEEP_BALANCE_BELOW || t.has_been_spent ? i.goal_completed : B(i.goal_percentage_reached, `${s * 100}`);
236
+ }, vt = ({ goal: t, index: n }) => {
237
+ const { goals: i } = C(), { percentage: s } = ue(i, t), p = t.goal_type === me.KEEP_BALANCE_BELOW || t.has_been_spent ? i.goal_completed : L(i.goal_percentage_reached, `${s * 100}`);
237
238
  return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { children: [
238
- t.track_type !== d.RETIREMENT_TRACK && /* @__PURE__ */ e(
239
+ t.track_type !== u.RETIREMENT_TRACK && /* @__PURE__ */ e(
239
240
  P,
240
241
  {
241
242
  sx: {
@@ -250,7 +251,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
250
251
  /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
251
252
  /* @__PURE__ */ r(f, { children: [
252
253
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
253
- /* @__PURE__ */ e(A, { variant: "XSmall", children: t.is_complete ? p : B(
254
+ /* @__PURE__ */ e(A, { variant: "XSmall", children: t.is_complete ? p : L(
254
255
  i.goal_projection,
255
256
  ae(
256
257
  Q(t.projected_to_complete_at || 0),
@@ -261,14 +262,14 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
261
262
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(t.amount, "0,0.00") })
262
263
  ] }) })
263
264
  ] }) });
264
- }, vt = ({ goal: t }) => {
265
+ }, It = ({ goal: t }) => {
265
266
  const { goals: n } = C();
266
267
  return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { children: [
267
- /* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ue, { color: "success", filled: !0, size: 20 }) }),
268
+ /* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ye, { color: "success", filled: !0, size: 20 }) }),
268
269
  /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
269
270
  /* @__PURE__ */ r(f, { children: [
270
271
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
271
- /* @__PURE__ */ e(A, { variant: "XSmall", children: B(
272
+ /* @__PURE__ */ e(A, { variant: "XSmall", children: L(
272
273
  n.completed_label,
273
274
  ae(
274
275
  Q(t.completed_at || 0),
@@ -279,14 +280,14 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
279
280
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(t.amount, "0,0.00") })
280
281
  ] }) })
281
282
  ] }) }, t.guid);
282
- }, It = ({ trackType: t }) => {
283
- const { goals: n, common: i } = C(), { orderedGoals: s } = I(), p = s.filter((u) => u.track_type === t), a = p.filter(
284
- (u) => u.track_type === d.SAVINGS_TRACK && !u.has_been_spent || u.track_type !== d.SAVINGS_TRACK && !u.is_complete
283
+ }, Gt = ({ trackType: t }) => {
284
+ const { goals: n, common: i } = C(), { orderedGoals: s } = I(), p = s.filter((m) => m.track_type === t), a = p.filter(
285
+ (m) => m.track_type === u.SAVINGS_TRACK && !m.has_been_spent || m.track_type !== u.SAVINGS_TRACK && !m.is_complete
285
286
  ), _ = p.filter(
286
- (u) => u.track_type === d.SAVINGS_TRACK && u.has_been_spent || u.track_type !== d.SAVINGS_TRACK && u.is_complete
287
+ (m) => m.track_type === u.SAVINGS_TRACK && m.has_been_spent || m.track_type !== u.SAVINGS_TRACK && m.is_complete
287
288
  ), [g, l] = y.useState(!1);
288
- let h = n.manage_saving_goals, o = n.manage_saving_drawer_title, m = n.manage_saving_title, c = n.manage_saving_description;
289
- return t === d.DEBT_TRACK ? (h = n.manage_debt_goals, o = n.manage_debt_drawer_title, m = n.manage_debt_title, c = n.manage_debt_description) : t === d.RETIREMENT_TRACK && (h = n.manage_retirement_goals, o = n.manage_retirement_drawer_title, m = n.manage_retirement_title, c = n.manage_retirement_description), /* @__PURE__ */ r(f, { children: [
289
+ let h = n.manage_saving_goals, d = n.manage_saving_drawer_title, o = n.manage_saving_title, c = n.manage_saving_description;
290
+ return t === u.DEBT_TRACK ? (h = n.manage_debt_goals, d = n.manage_debt_drawer_title, o = n.manage_debt_title, c = n.manage_debt_description) : t === u.RETIREMENT_TRACK && (h = n.manage_retirement_goals, d = n.manage_retirement_drawer_title, o = n.manage_retirement_title, c = n.manage_retirement_description), /* @__PURE__ */ r(f, { children: [
290
291
  /* @__PURE__ */ e(pe, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => l(!0), children: h }),
291
292
  /* @__PURE__ */ e(
292
293
  j,
@@ -294,40 +295,40 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
294
295
  ariaLabelClose: i.close_aria,
295
296
  isOpen: g,
296
297
  onClose: () => l(!1),
297
- title: o,
298
+ title: d,
298
299
  children: /* @__PURE__ */ r(f, { children: [
299
300
  /* @__PURE__ */ r(f, { m: 24, children: [
300
- /* @__PURE__ */ e(ze, { children: m }),
301
+ /* @__PURE__ */ e(He, { children: o }),
301
302
  /* @__PURE__ */ e(W, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: c })
302
303
  ] }),
303
- /* @__PURE__ */ e(Rt, { trackType: t }),
304
+ /* @__PURE__ */ e(Et, { trackType: t }),
304
305
  /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
305
- /* @__PURE__ */ r(L, { sx: { bgcolor: "background.paper" }, children: [
306
- a.map((u, b) => {
306
+ /* @__PURE__ */ r(B, { sx: { bgcolor: "background.paper" }, children: [
307
+ a.map((m, b) => {
307
308
  const T = b >= a.length - 1;
308
309
  return /* @__PURE__ */ r(f, { children: [
309
- /* @__PURE__ */ e(xt, { goal: u, index: b }),
310
+ /* @__PURE__ */ e(vt, { goal: m, index: b }),
310
311
  /* @__PURE__ */ e(
311
312
  E,
312
313
  {
313
- variant: T && t === d.RETIREMENT_TRACK ? "fullWidth" : "inset"
314
+ variant: T && t === u.RETIREMENT_TRACK ? "fullWidth" : "inset"
314
315
  }
315
316
  )
316
- ] }, `ongoing-${u.guid}`);
317
+ ] }, `ongoing-${m.guid}`);
317
318
  }),
318
- t !== d.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { children: [
319
- /* @__PURE__ */ e(Et, { goals: a }),
319
+ t !== u.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { children: [
320
+ /* @__PURE__ */ e(xt, { goals: a }),
320
321
  /* @__PURE__ */ e(E, {})
321
322
  ] })
322
323
  ] }),
323
- t !== d.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ r(f, { children: [
324
+ t !== u.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ r(f, { children: [
324
325
  /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
325
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: _.map((u, b) => {
326
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: _.map((m, b) => {
326
327
  const T = b > a.length - 1;
327
328
  return /* @__PURE__ */ r(f, { children: [
328
- /* @__PURE__ */ e(vt, { goal: u }),
329
+ /* @__PURE__ */ e(It, { goal: m }),
329
330
  /* @__PURE__ */ e(E, { variant: T ? "fullWidth" : "inset" })
330
- ] }, `complete-${u.guid}`);
331
+ ] }, `complete-${m.guid}`);
331
332
  }) })
332
333
  ] })
333
334
  ] })
@@ -335,19 +336,21 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
335
336
  )
336
337
  ] });
337
338
  }, de = D(({ trackType: t, onAddGoals: n }) => {
338
- const { isMobile: i } = he(), { goals: s } = C(), { orderedGoals: p, setSelectedGoal: a } = I(), _ = p.filter((o) => o.track_type === t), g = _.filter(
339
- (o) => o.track_type === d.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== d.SAVINGS_TRACK && !o.is_complete
340
- ), l = _.filter(
341
- (o) => o.track_type === d.SAVINGS_TRACK && o.has_been_spent || o.track_type !== d.SAVINGS_TRACK && o.is_complete
342
- ), h = t === d.DEBT_TRACK ? s.zero_state_complete_debt : s.zero_state_complete_savings;
339
+ const { isMobile: i } = ge(), { goals: s } = C(), { selectedAccountGuids: p } = he(), { orderedGoals: a, setSelectedGoal: _ } = I(), g = a.filter(
340
+ (o) => o.track_type === t && p.includes(o.account_guid)
341
+ ), l = g.filter(
342
+ (o) => o.track_type === u.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && !o.is_complete
343
+ ), h = g.filter(
344
+ (o) => o.track_type === u.SAVINGS_TRACK && o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && o.is_complete
345
+ ), d = t === u.DEBT_TRACK ? s.zero_state_complete_debt : s.zero_state_complete_savings;
343
346
  return /* @__PURE__ */ r(f, { mt: 16, mx: i ? 24 : 0, children: [
344
347
  /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
345
348
  /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: s.ongoing_title }),
346
- /* @__PURE__ */ e(It, { trackType: t })
349
+ /* @__PURE__ */ e(Gt, { trackType: t })
347
350
  ] }),
348
- g.length > 0 ? /* @__PURE__ */ e(ge, { container: !0, spacing: 24, children: g.map((o, m, c) => (
351
+ l.length > 0 ? /* @__PURE__ */ e(be, { container: !0, spacing: 24, children: l.map((o, c, m) => (
349
352
  // Goal should be full width in mobile or if it's the first goal (unless there are 2)
350
- /* @__PURE__ */ e(ge, { xs: i || m === 0 && c.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Me, { goal: o, onClick: () => a(o) }, o.guid) }, m)
353
+ /* @__PURE__ */ e(be, { xs: i || c === 0 && m.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => _(o) }, o.guid) }, c)
351
354
  )) }) : /* @__PURE__ */ r(
352
355
  f,
353
356
  {
@@ -369,16 +372,16 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
369
372
  width: { sm: 381 }
370
373
  }),
371
374
  variant: "Small",
372
- children: We(t, s)
375
+ children: Pe(t, s)
373
376
  }
374
377
  ),
375
378
  /* @__PURE__ */ e(pe, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: s.add_goals_button })
376
379
  ]
377
380
  }
378
381
  ),
379
- t !== d.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { gap: 16, mt: 48, children: [
382
+ t !== u.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { gap: 16, mt: 48, children: [
380
383
  /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: s.complete_title }),
381
- l.length === 0 && /* @__PURE__ */ e(f, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
384
+ h.length === 0 && /* @__PURE__ */ e(f, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
382
385
  W,
383
386
  {
384
387
  sx: (o) => ({
@@ -389,40 +392,40 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
389
392
  }
390
393
  }),
391
394
  variant: "Small",
392
- children: h
395
+ children: d
393
396
  }
394
397
  ) }),
395
- l.map((o) => /* @__PURE__ */ e(Ae, { elevation: 2, children: /* @__PURE__ */ e(Te, { onClick: () => a(o), children: /* @__PURE__ */ e(Ce, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
398
+ h.map((o) => /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ e(Ce, { onClick: () => _(o), children: /* @__PURE__ */ e(Se, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
396
399
  /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", gap: 6, children: [
397
- /* @__PURE__ */ e(He, { color: "success", fill: !0, name: "check_circle", size: 20 }),
400
+ /* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
398
401
  /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Body", children: o.name })
399
402
  ] }),
400
403
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(o.amount, "0,0.00") })
401
404
  ] }) }) }) }, o.guid))
402
405
  ] })
403
406
  ] });
404
- }), Gt = ({ goalType: t, onClick: n }) => {
405
- const { goals: i } = C(), { bgcolor: s, icon: p, label: a, description: _, subTypes: g, type: l } = t, [h, o] = y.useState(!1), m = g.length > 0;
406
- return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ r(L, { sx: { bgcolor: "background.paper" }, children: [
407
+ }), Nt = ({ goalType: t, onClick: n }) => {
408
+ const { goals: i } = C(), { bgcolor: s, icon: p, label: a, description: _, subTypes: g, type: l } = t, [h, d] = y.useState(!1), o = g.length > 0;
409
+ return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ r(B, { sx: { bgcolor: "background.paper" }, children: [
407
410
  /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(
408
411
  k,
409
412
  {
410
- onClick: m ? () => o(!h) : () => n(
411
- l === d.RETIREMENT_TRACK ? i.retirement : "",
412
- l === d.RETIREMENT_TRACK ? J.RETIREMENT : J.OTHER,
413
+ onClick: o ? () => d(!h) : () => n(
414
+ l === u.RETIREMENT_TRACK ? i.retirement : "",
415
+ l === u.RETIREMENT_TRACK ? J.RETIREMENT : J.OTHER,
413
416
  l
414
417
  ),
415
418
  children: [
416
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: s }, variant: "rounded", children: /* @__PURE__ */ e(be, { name: p, sx: { color: "grey.900" } }) }) }),
419
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: s }, variant: "rounded", children: /* @__PURE__ */ e(fe, { name: p, sx: { color: "grey.900" } }) }) }),
417
420
  /* @__PURE__ */ e(w, { primary: a, secondary: _, sx: { mr: 24 } }),
418
- !m && /* @__PURE__ */ e(M, {}),
419
- m && (h ? /* @__PURE__ */ e(Ye, {}) : /* @__PURE__ */ e(Ze, {}))
421
+ !o && /* @__PURE__ */ e(M, {}),
422
+ o && (h ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
420
423
  ]
421
424
  }
422
425
  ) }),
423
426
  /* @__PURE__ */ e(E, { variant: "inset" }),
424
- m && /* @__PURE__ */ e(tt, { in: h, children: /* @__PURE__ */ e(L, { sx: { bgcolor: "background.default" }, children: g.map((c, u) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ r(k, { onClick: () => n(c.label, c.metaType, l), children: [
425
- /* @__PURE__ */ e(nt, { sx: { mr: 8 }, children: /* @__PURE__ */ e(be, { name: c.icon }) }),
427
+ o && /* @__PURE__ */ e(nt, { in: h, children: /* @__PURE__ */ e(B, { sx: { bgcolor: "background.default" }, children: g.map((c, m) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ r(k, { onClick: () => n(c.label, c.metaType, l), children: [
428
+ /* @__PURE__ */ e(ot, { sx: { mr: 8 }, children: /* @__PURE__ */ e(fe, { name: c.icon }) }),
426
429
  /* @__PURE__ */ e(
427
430
  w,
428
431
  {
@@ -431,7 +434,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
431
434
  }
432
435
  ),
433
436
  /* @__PURE__ */ e(M, {})
434
- ] }) }, u)) }) })
437
+ ] }) }, m)) }) })
435
438
  ] }) });
436
439
  }, Be = ({
437
440
  accounts: t,
@@ -440,9 +443,9 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
440
443
  onSave: s,
441
444
  title: p
442
445
  }) => {
443
- const { goals: a, common: _ } = C(), { config: g } = ve(), [l, h] = y.useState([]), o = (m) => {
444
- const c = l.findIndex((b) => b.guid === m.guid), u = [...l];
445
- c >= 0 ? u.splice(c, 1) : u.push(m), h(u);
446
+ const { goals: a, common: _ } = C(), { config: g } = Ie(), [l, h] = y.useState([]), d = (o) => {
447
+ const c = l.findIndex((b) => b.guid === o.guid), m = [...l];
448
+ c >= 0 ? m.splice(c, 1) : m.push(o), h(m);
446
449
  };
447
450
  return /* @__PURE__ */ r(
448
451
  j,
@@ -454,33 +457,33 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
454
457
  title: p,
455
458
  children: [
456
459
  /* @__PURE__ */ e(W, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
457
- /* @__PURE__ */ r(L, { sx: { bgcolor: "background.white" }, children: [
460
+ /* @__PURE__ */ r(B, { sx: { bgcolor: "background.white" }, children: [
458
461
  /* @__PURE__ */ e(E, { variant: "fullWidth" }),
459
- t.map((m, c) => /* @__PURE__ */ r(y.Fragment, { children: [
460
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => o(m), children: [
462
+ t.map((o, c) => /* @__PURE__ */ r(y.Fragment, { children: [
463
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => d(o), children: [
461
464
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
462
465
  ne,
463
466
  {
464
- alt: m?.name || "",
465
- institutionGuid: m?.institution_guid || ""
467
+ alt: o?.name || "",
468
+ institutionGuid: o?.institution_guid || ""
466
469
  }
467
470
  ) }),
468
471
  /* @__PURE__ */ e(
469
472
  w,
470
473
  {
471
- primary: we(m, {
474
+ primary: we(o, {
472
475
  allowNickname: g?.show_account_nicknames_in_master
473
476
  }),
474
- secondary: x(m.balance || 0, "0,0.00")
477
+ secondary: x(o.balance || 0, "0,0.00")
475
478
  }
476
479
  ),
477
- /* @__PURE__ */ e(ot, { checked: l.some((u) => u.guid === m.guid) })
480
+ /* @__PURE__ */ e(at, { checked: l.some((m) => m.guid === o.guid) })
478
481
  ] }) }),
479
482
  /* @__PURE__ */ e(E, { variant: c < t.length - 1 ? "inset" : "fullWidth" })
480
- ] }, m.guid))
483
+ ] }, o.guid))
481
484
  ] }),
482
485
  /* @__PURE__ */ e(
483
- ye,
486
+ Ae,
484
487
  {
485
488
  description: a.connect_description,
486
489
  label: a.connect_button,
@@ -490,21 +493,21 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
490
493
  ]
491
494
  }
492
495
  );
493
- }, Nt = ({ onClose: t }) => {
494
- const { goals: n } = C(), { addGoal: i, debtGoals: s, setAlert: p, setSelectedGoal: a } = I(), { config: _ } = ve(), { visibleDebtAccounts: g } = V(), [l, h] = y.useState(!1), o = Pe(n), m = (u, b, T) => {
495
- T === d.DEBT_TRACK ? h(!0) : a({
496
+ }, kt = ({ onClose: t }) => {
497
+ const { goals: n } = C(), { addGoal: i, debtGoals: s, setAlert: p, setSelectedGoal: a } = I(), { config: _ } = Ie(), { visibleDebtAccounts: g } = V(), [l, h] = y.useState(!1), d = Ve(n), o = (m, b, T) => {
498
+ T === u.DEBT_TRACK ? h(!0) : a({
496
499
  amount: 0,
497
500
  current_amount: 0,
498
501
  goal_type: me.SAVE_AMOUNT,
499
502
  initial_amount: 0,
500
503
  meta_type: b,
501
- name: u,
504
+ name: m,
502
505
  track_type: T
503
506
  });
504
- }, c = async (u) => {
505
- for (const b of u) {
507
+ }, c = async (m) => {
508
+ for (const b of m) {
506
509
  let T = J.CREDIT_CARD;
507
- b.account_type === fe.LOAN ? T = J.LOANS : b.account_type === fe.LINE_OF_CREDIT && (T = J.LINE_OF_CREDIT), await i({
510
+ b.account_type === ye.LOAN ? T = J.LOANS : b.account_type === ye.LINE_OF_CREDIT && (T = J.LINE_OF_CREDIT), await i({
508
511
  account_guid: b.guid,
509
512
  amount: 0,
510
513
  current_amount: 0,
@@ -516,17 +519,17 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
516
519
  name: we(b, {
517
520
  allowNickname: _?.show_account_nicknames_in_master
518
521
  }),
519
- track_type: d.DEBT_TRACK
522
+ track_type: u.DEBT_TRACK
520
523
  }), p(n.alert_goal_added);
521
524
  }
522
- h(!1), t?.(d.DEBT_TRACK);
525
+ h(!1), t?.(u.DEBT_TRACK);
523
526
  };
524
527
  return /* @__PURE__ */ r(f, { children: [
525
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: o.map((u, b) => /* @__PURE__ */ e(Gt, { goalType: u, onClick: m }, b)) }),
528
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: d.map((m, b) => /* @__PURE__ */ e(Nt, { goalType: m, onClick: o }, b)) }),
526
529
  /* @__PURE__ */ e(
527
530
  Be,
528
531
  {
529
- accounts: g.filter((u) => !s.find((b) => b.account_guid === u.guid)),
532
+ accounts: g.filter((m) => !s.find((b) => b.account_guid === m.guid)),
530
533
  isOpen: l,
531
534
  onClose: () => h(!1),
532
535
  onSave: c,
@@ -534,8 +537,8 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
534
537
  }
535
538
  )
536
539
  ] });
537
- }, Le = ({ account: t }) => {
538
- const { accounts: n } = C(), i = st(t), { setSelectedAccount: s } = at(), [p, a] = y.useState(!1);
540
+ }, Oe = ({ account: t }) => {
541
+ const { accounts: n } = C(), i = lt(t), { setSelectedAccount: s } = rt(), [p, a] = y.useState(!1);
539
542
  return /* @__PURE__ */ r(N, { sx: { bgcolor: "background.paper" }, children: [
540
543
  /* @__PURE__ */ r(k, { onClick: () => {
541
544
  s(t), a(!0);
@@ -557,15 +560,15 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
557
560
  /* @__PURE__ */ e(M, {})
558
561
  ] }),
559
562
  /* @__PURE__ */ e(j, { isOpen: p, onClose: () => a(!1), title: n.account_details, children: /* @__PURE__ */ r(f, { children: [
560
- /* @__PURE__ */ e(rt, {}),
561
- /* @__PURE__ */ e(it, {})
563
+ /* @__PURE__ */ e(it, {}),
564
+ /* @__PURE__ */ e(st, {})
562
565
  ] }) })
563
566
  ] });
564
- }, kt = D(({ goal: t }) => {
565
- const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.amount), g = !t.guid, l = a < 0 || a > 9999999999e-2, h = t.track_type === d.SAVINGS_TRACK && t.has_been_spent || t.track_type !== d.SAVINGS_TRACK && t.is_complete, o = async () => {
567
+ }, wt = D(({ goal: t }) => {
568
+ const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.amount), g = !t.guid, l = a < 0 || a > 9999999999e-2, h = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, d = async () => {
566
569
  const c = { ...t, amount: a };
567
570
  t.amount = a, g ? s(c) : (await p(c), i(n.alert_goal_updated_amount));
568
- }, m = () => {
571
+ }, o = () => {
569
572
  setTimeout(() => {
570
573
  _(t.amount);
571
574
  }, 250);
@@ -576,8 +579,8 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
576
579
  isDisabled: h,
577
580
  isSaveDisabled: l,
578
581
  label: n.details_amount_to_save,
579
- onCancel: m,
580
- onSave: o,
582
+ onCancel: o,
583
+ onSave: d,
581
584
  primaryText: n.details_amount_to_save,
582
585
  secondaryText: x(t.amount, "0,0"),
583
586
  zeroStateText: g && t.amount === 0 ? n.add_amount : void 0,
@@ -595,33 +598,33 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
595
598
  )
596
599
  }
597
600
  );
598
- }), wt = ({ goal: t }) => {
599
- const { visibleCheckingAccounts: n, visibleSavingsAccounts: i } = V(), { accounts: s, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: g } = I(), l = !t.guid, [h, o] = y.useState(!1), m = async ({ balance: c, guid: u }) => {
600
- const b = { ...t, account_guid: u, current_amount: c || 0 };
601
- l ? _(b) : (await g(b), a(p.alert_account_changed)), o(!1);
601
+ }), Dt = ({ goal: t }) => {
602
+ const { visibleCheckingAccounts: n, visibleSavingsAccounts: i } = V(), { accounts: s, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: g } = I(), l = !t.guid, [h, d] = y.useState(!1), o = async ({ balance: c, guid: m }) => {
603
+ const b = { ...t, account_guid: m, current_amount: c || 0 };
604
+ l ? _(b) : (await g(b), a(p.alert_account_changed)), d(!1);
602
605
  };
603
606
  return /* @__PURE__ */ r(f, { children: [
604
- l && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => o(!0), children: [
607
+ l && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => d(!0), children: [
605
608
  /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
606
- /* @__PURE__ */ e(xe, { filled: !0 }),
609
+ /* @__PURE__ */ e(ve, { filled: !0 }),
607
610
  p.details_add_account
608
611
  ] }) }),
609
612
  /* @__PURE__ */ e(M, { color: "primary" })
610
613
  ] }) }) : /* @__PURE__ */ r(f, { sx: { gap: 8, my: 24, mx: 24 }, children: [
611
- /* @__PURE__ */ e(pe, { onClick: () => o(!0), variant: "text", children: p.details_change_account }),
614
+ /* @__PURE__ */ e(pe, { onClick: () => d(!0), variant: "text", children: p.details_change_account }),
612
615
  /* @__PURE__ */ e(
613
616
  A,
614
617
  {
615
618
  color: "text.secondary",
616
619
  sx: { textAlign: "center", whiteSpace: "wrap" },
617
620
  variant: "Paragraph",
618
- children: B(p.details_change_account_description, t.name)
621
+ children: L(p.details_change_account_description, t.name)
619
622
  }
620
623
  )
621
624
  ] }),
622
- /* @__PURE__ */ e(j, { isOpen: h, onClose: () => o(!1), title: p.details_change_account, children: /* @__PURE__ */ r(f, { children: [
625
+ /* @__PURE__ */ e(j, { isOpen: h, onClose: () => d(!1), title: p.details_change_account, children: /* @__PURE__ */ r(f, { children: [
623
626
  n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: s.account_types[1] }),
624
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => m(c), children: [
627
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: n.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => o(c), children: [
625
628
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
626
629
  ne,
627
630
  {
@@ -639,7 +642,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
639
642
  /* @__PURE__ */ e(M, {})
640
643
  ] }) }, c.guid)) }),
641
644
  i.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: s.account_types[2] }),
642
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: i.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => m(c), children: [
645
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: i.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => o(c), children: [
643
646
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
644
647
  ne,
645
648
  {
@@ -657,7 +660,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
657
660
  /* @__PURE__ */ e(M, {})
658
661
  ] }) }, c.guid)) }),
659
662
  /* @__PURE__ */ e(
660
- ye,
663
+ Ae,
661
664
  {
662
665
  description: p.connect_description,
663
666
  label: p.connect_button,
@@ -666,11 +669,11 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
666
669
  )
667
670
  ] }) })
668
671
  ] });
669
- }, Dt = D(({ goal: t }) => {
670
- const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.name), g = !t.guid, l = t.track_type === d.SAVINGS_TRACK && t.has_been_spent || t.track_type !== d.SAVINGS_TRACK && t.is_complete, h = async () => {
671
- const m = { ...t, name: a };
672
- t.name = a, g ? s(m) : (await p(m), i(n.alert_goal_updated_name));
673
- }, o = () => {
672
+ }, Kt = D(({ goal: t }) => {
673
+ const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.name), g = !t.guid, l = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, h = async () => {
674
+ const o = { ...t, name: a };
675
+ t.name = a, g ? s(o) : (await p(o), i(n.alert_goal_updated_name));
676
+ }, d = () => {
674
677
  setTimeout(() => {
675
678
  _(t.name);
676
679
  }, 250);
@@ -681,7 +684,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
681
684
  isDisabled: l,
682
685
  isSaveDisabled: !a,
683
686
  label: n.details_goal_name,
684
- onCancel: o,
687
+ onCancel: d,
685
688
  onSave: h,
686
689
  primaryText: n.details_goal_name,
687
690
  secondaryText: t.name,
@@ -691,28 +694,28 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
691
694
  error: !a,
692
695
  fullWidth: !0,
693
696
  label: n.details_goal_name,
694
- onChange: (m) => _(m.target.value),
697
+ onChange: (o) => _(o.target.value),
695
698
  value: a
696
699
  }
697
700
  )
698
701
  }
699
702
  );
700
- }), Kt = ({ goal: t }) => {
703
+ }), Mt = ({ goal: t }) => {
701
704
  const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.retirement_age || 65), g = !t.guid, l = async () => {
702
705
  if (!isNaN(a)) {
703
- const m = { ...t, retirement_age: a };
704
- t.retirement_age = a, g ? s(m) : (await p(m), i(n.alert_goal_updated_retirement_age));
706
+ const o = { ...t, retirement_age: a };
707
+ t.retirement_age = a, g ? s(o) : (await p(o), i(n.alert_goal_updated_retirement_age));
705
708
  }
706
709
  }, h = () => {
707
710
  setTimeout(() => {
708
711
  _(t.retirement_age || 65);
709
712
  }, 250);
710
- }, o = !a || isNaN(a) || a < 20 || a >= 100;
713
+ }, d = !a || isNaN(a) || a < 20 || a >= 100;
711
714
  return /* @__PURE__ */ e(
712
715
  ee,
713
716
  {
714
717
  isDisabled: t.is_complete,
715
- isSaveDisabled: o,
718
+ isSaveDisabled: d,
716
719
  label: n.details_retirement_age,
717
720
  onCancel: h,
718
721
  onSave: l,
@@ -722,18 +725,18 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
722
725
  children: /* @__PURE__ */ e(
723
726
  De,
724
727
  {
725
- error: o,
728
+ error: d,
726
729
  fullWidth: !0,
727
730
  label: n.details_retirement_age,
728
- onChange: (m) => _(Number(m.target.value)),
731
+ onChange: (o) => _(Number(o.target.value)),
729
732
  value: isNaN(a) ? "" : a
730
733
  }
731
734
  )
732
735
  }
733
736
  );
734
- }, Mt = D(({ goal: t }) => {
735
- const { goals: n } = C(), { user: i, updateUser: s } = Ie(), { setAlert: p } = I(), [a, _] = y.useState(Q(i.birthday ?? 0)), [g, l] = y.useState(null), h = t.is_complete, o = async () => {
736
- a && ut(a) && (await s({ ...i, birthday: mt(a) }), p(n.alert_goal_updated_birthday));
737
+ }, Lt = D(({ goal: t }) => {
738
+ const { goals: n } = C(), { user: i, updateUser: s } = Ge(), { setAlert: p } = I(), [a, _] = y.useState(Q(i.birthday ?? 0)), [g, l] = y.useState(null), h = t.is_complete, d = async () => {
739
+ a && _t(a) && (await s({ ...i, birthday: ut(a) }), p(n.alert_goal_updated_birthday));
737
740
  };
738
741
  return /* @__PURE__ */ e(
739
742
  ee,
@@ -741,16 +744,16 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
741
744
  isDisabled: h,
742
745
  isSaveDisabled: !!g,
743
746
  label: n.details_birthday,
744
- onSave: o,
747
+ onSave: d,
745
748
  primaryText: n.details_birthday,
746
749
  secondaryText: `${ae(Q(i.birthday ?? 0), re.MONTH_DAY_YEAR)}`,
747
750
  zeroStateText: !t.guid && !i.birthday ? n.add_birthday : void 0,
748
- children: /* @__PURE__ */ e(ht, { dateAdapter: _t, children: /* @__PURE__ */ e(
749
- pt,
751
+ children: /* @__PURE__ */ e(gt, { dateAdapter: pt, children: /* @__PURE__ */ e(
752
+ ht,
750
753
  {
751
754
  label: n.details_birthday,
752
755
  onChange: _,
753
- onError: (m) => l(m),
756
+ onError: (o) => l(o),
754
757
  sx: { width: "100%" },
755
758
  value: a
756
759
  }
@@ -766,7 +769,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
766
769
  setAlert: g,
767
770
  setNewRetirementGoalAccounts: l,
768
771
  setSelectedGoal: h
769
- } = I(), [o, m] = y.useState(!1), c = !t.guid, u = i.filter(
772
+ } = I(), [d, o] = y.useState(!1), c = !t.guid, m = i.filter(
770
773
  (S) => c ? p.find((R) => R.account_guid === S.guid) : a.find((R) => R.account_guid === S.guid)
771
774
  ), b = i.filter(
772
775
  (S) => !a.find((R) => R.account_guid === S.guid)
@@ -783,16 +786,16 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
783
786
  h({
784
787
  ..._,
785
788
  current_amount: S.reduce((v, F) => v + (F.balance || 0), 0)
786
- }), m(!1);
789
+ }), o(!1);
787
790
  };
788
791
  return /* @__PURE__ */ r(f, { children: [
789
- u.map((S) => /* @__PURE__ */ r(f, { children: [
790
- /* @__PURE__ */ e(Le, { account: S }),
792
+ m.map((S) => /* @__PURE__ */ r(f, { children: [
793
+ /* @__PURE__ */ e(Oe, { account: S }),
791
794
  /* @__PURE__ */ e(E, {})
792
795
  ] }, S.guid)),
793
- /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => m(!0), children: [
796
+ /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => o(!0), children: [
794
797
  /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
795
- /* @__PURE__ */ e(xe, { filled: !0 }),
798
+ /* @__PURE__ */ e(ve, { filled: !0 }),
796
799
  n.details_add_account
797
800
  ] }) }),
798
801
  /* @__PURE__ */ e(M, { color: "primary" })
@@ -801,59 +804,59 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
801
804
  Be,
802
805
  {
803
806
  accounts: b,
804
- isOpen: o,
805
- onClose: () => m(!1),
807
+ isOpen: d,
808
+ onClose: () => o(!1),
806
809
  onSave: T,
807
810
  title: n.add_select_accounts
808
811
  }
809
812
  )
810
813
  ] });
811
- }, Lt = D(({ goal: t }) => {
814
+ }, Ot = D(({ goal: t }) => {
812
815
  const { goals: n } = C(), { visibleAccounts: i } = V(), s = y.useMemo(
813
816
  () => i.find((_) => _.guid === t.account_guid),
814
817
  [i, t]
815
818
  ), p = t.track_type;
816
819
  let a = n.details_save_title;
817
- return t.track_type === d.DEBT_TRACK ? a = n.details_debt_title : t.track_type === d.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ r(f, { children: [
820
+ return t.track_type === u.DEBT_TRACK ? a = n.details_debt_title : t.track_type === u.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ r(f, { children: [
818
821
  /* @__PURE__ */ r(f, { mx: 24, children: [
819
822
  /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: a }),
820
- /* @__PURE__ */ e(Me, { goal: t, isInDrawer: !0 }),
823
+ /* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
821
824
  /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: n.details_title })
822
825
  ] }),
823
- /* @__PURE__ */ r(L, { sx: { bgcolor: "background.paper" }, children: [
824
- /* @__PURE__ */ e(Dt, { goal: t }),
826
+ /* @__PURE__ */ r(B, { sx: { bgcolor: "background.paper" }, children: [
827
+ /* @__PURE__ */ e(Kt, { goal: t }),
825
828
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
826
- (p === d.SAVINGS_TRACK || p === d.RETIREMENT_TRACK) && /* @__PURE__ */ r(U, { children: [
827
- /* @__PURE__ */ e(kt, { goal: t }),
828
- /* @__PURE__ */ e(E, { sx: { ml: p === d.RETIREMENT_TRACK ? 24 : 0 } })
829
+ (p === u.SAVINGS_TRACK || p === u.RETIREMENT_TRACK) && /* @__PURE__ */ r(U, { children: [
830
+ /* @__PURE__ */ e(wt, { goal: t }),
831
+ /* @__PURE__ */ e(E, { sx: { ml: p === u.RETIREMENT_TRACK ? 24 : 0 } })
829
832
  ] }),
830
- t.track_type === d.DEBT_TRACK && /* @__PURE__ */ r(U, { children: [
831
- /* @__PURE__ */ e(lt, { goal: t }),
832
- /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
833
+ t.track_type === u.DEBT_TRACK && /* @__PURE__ */ r(U, { children: [
833
834
  /* @__PURE__ */ e(ct, { goal: t }),
834
835
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
835
836
  /* @__PURE__ */ e(dt, { goal: t }),
837
+ /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
838
+ /* @__PURE__ */ e(mt, { goal: t }),
836
839
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
837
840
  ] }),
838
- t.track_type === d.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
839
- /* @__PURE__ */ e(Kt, { goal: t }),
840
- /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
841
+ t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
841
842
  /* @__PURE__ */ e(Mt, { goal: t }),
843
+ /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
844
+ /* @__PURE__ */ e(Lt, { goal: t }),
842
845
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
843
846
  ] })
844
847
  ] }),
845
- /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === d.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
846
- t.track_type !== d.RETIREMENT_TRACK && s && /* @__PURE__ */ r(U, { children: [
847
- /* @__PURE__ */ e(Le, { account: s }),
848
+ /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === u.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
849
+ t.track_type !== u.RETIREMENT_TRACK && s && /* @__PURE__ */ r(U, { children: [
850
+ /* @__PURE__ */ e(Oe, { account: s }),
848
851
  /* @__PURE__ */ e(E, {})
849
852
  ] }),
850
- t.track_type === d.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
853
+ t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
851
854
  /* @__PURE__ */ e(Bt, { goal: t }),
852
855
  /* @__PURE__ */ e(E, {})
853
856
  ] }),
854
- t.track_type === d.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(wt, { goal: t })
857
+ t.track_type === u.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Dt, { goal: t })
855
858
  ] });
856
- }), Ot = D(({ onClose: t }) => {
859
+ }), Wt = D(({ onClose: t }) => {
857
860
  const { visibleRetirementAccounts: n } = V(), { goals: i, common: s } = C(), {
858
861
  addGoal: p,
859
862
  addRetirementGoal: a,
@@ -861,34 +864,34 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
861
864
  deleteRetirementGoal: g,
862
865
  newRetirementGoalAccounts: l,
863
866
  retirementGoalAccounts: h,
864
- selectedGoal: o,
865
- setAlert: m,
867
+ selectedGoal: d,
868
+ setAlert: o,
866
869
  setSelectedGoal: c,
867
- updateGoal: u
868
- } = I(), { user: b } = Ie(), [T, S] = y.useState(!1), R = !o?.guid, v = o?.track_type === d.SAVINGS_TRACK && o.is_complete && !o.has_been_spent, F = y.useMemo(() => {
870
+ updateGoal: m
871
+ } = I(), { user: b } = Ge(), [T, S] = y.useState(!1), R = !d?.guid, v = d?.track_type === u.SAVINGS_TRACK && d.is_complete && !d.has_been_spent, F = y.useMemo(() => {
869
872
  const G = R ? l : h;
870
873
  return n.filter(($) => G.some((K) => K.account_guid === $.guid));
871
874
  }, [R, n, l, h]), Z = y.useMemo(() => {
872
- if (!o) return !1;
875
+ if (!d) return !1;
873
876
  if (!R && !v) return !0;
874
- const { account_guid: G, track_type: $, name: K, amount: q, retirement_age: O } = o;
875
- return $ === d.SAVINGS_TRACK ? G ? !!K && !!q : !1 : $ === d.RETIREMENT_TRACK ? F.length ? !!K && !!q && !!O && !!b.birthday : !1 : !0;
876
- }, [o, F, b.birthday]);
877
+ const { account_guid: G, track_type: $, name: K, amount: q, retirement_age: O } = d;
878
+ return $ === u.SAVINGS_TRACK ? G ? !!K && !!q : !1 : $ === u.RETIREMENT_TRACK ? F.length ? !!K && !!q && !!O && !!b.birthday : !1 : !0;
879
+ }, [d, F, b.birthday]);
877
880
  let z = s.delete_button, H = () => S(!0);
878
881
  R ? (H = () => te(), z = s.save_button) : v && (H = () => se(), z = i.mark_as_complete_button);
879
882
  const te = async () => {
880
- if (o) {
881
- const G = o.track_type;
882
- G !== d.RETIREMENT_TRACK ? await p(o) : G === d.RETIREMENT_TRACK && await a({ ...o, target_amount: o.amount }), m(i.alert_goal_added), c(void 0), G && t?.(G);
883
+ if (d) {
884
+ const G = d.track_type;
885
+ G !== u.RETIREMENT_TRACK ? await p(d) : G === u.RETIREMENT_TRACK && await a({ ...d, target_amount: d.amount }), o(i.alert_goal_added), c(void 0), G && t?.(G);
883
886
  }
884
887
  }, ie = async () => {
885
- o && (o.track_type !== d.RETIREMENT_TRACK ? await _(o.guid) : o.track_type === d.RETIREMENT_TRACK && await g(o), m(i.alert_goal_deleted), c(void 0));
888
+ d && (d.track_type !== u.RETIREMENT_TRACK ? await _(d.guid) : d.track_type === u.RETIREMENT_TRACK && await g(d), o(i.alert_goal_deleted), c(void 0));
886
889
  }, se = async () => {
887
890
  const G = {
888
- ...o,
891
+ ...d,
889
892
  has_been_spent: !0
890
893
  };
891
- await u(G), m(i.alert_goal_completed), c(void 0);
894
+ await m(G), o(i.alert_goal_completed), c(void 0);
892
895
  };
893
896
  return /* @__PURE__ */ r(f, { children: [
894
897
  /* @__PURE__ */ e(
@@ -896,7 +899,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
896
899
  {
897
900
  ariaLabelClose: s.close_aria,
898
901
  hasSecondaryAction: R,
899
- isOpen: !!o,
902
+ isOpen: !!d,
900
903
  isPrimaryDisabled: !Z,
901
904
  onClose: () => c(void 0),
902
905
  onPrimaryAction: H,
@@ -904,11 +907,11 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
904
907
  primaryText: z,
905
908
  secondaryColor: "primary",
906
909
  title: i.goal_details,
907
- children: o && /* @__PURE__ */ e(Lt, { goal: o })
910
+ children: d && /* @__PURE__ */ e(Ot, { goal: d })
908
911
  }
909
912
  ),
910
913
  /* @__PURE__ */ e(
911
- et,
914
+ tt,
912
915
  {
913
916
  copy: { close_aria: s.close_aria, title: i.delete_goal },
914
917
  isOpen: T,
@@ -917,38 +920,43 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
917
920
  onPrimaryAction: ie,
918
921
  primaryColor: "error",
919
922
  primaryText: s.delete_button,
920
- children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: B(i.delete_description, o?.name || "") })
923
+ children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: L(i.delete_description, d?.name || "") })
921
924
  }
922
925
  )
923
926
  ] });
924
- }), Hn = D(({ onBackClick: t, sx: n }) => {
925
- const { onEvent: i } = Ge(), { isMobile: s } = he(), { visibleAccounts: p } = V(), { isCopyLoaded: a, isInitialized: _, setSelectedAccounts: g } = Ne(), { goals: l, common: h } = C(), { alert: o, goals: m, goalsLoaded: c, loadGoals: u, monthlyCashFlowProfile: b, setAlert: T, retirmentGoals: S } = I(), [R, v] = y.useState(0), [F, Z] = y.useState(!1), z = b?.amount_allocated_for_savings_goals || 0, H = b?.amount_allocated_for_debt_goals || 0, te = b?.amount_allocated_for_retirement_goals || 0, ie = a ? B(
927
+ }), Xn = D(({ onBackClick: t, sx: n }) => {
928
+ const { onEvent: i } = Ne(), { isMobile: s } = ge(), { visibleAccounts: p } = V(), { isCopyLoaded: a, isInitialized: _, setSelectedAccounts: g } = he(), { goals: l, common: h } = C(), { alert: d, goals: o, goalsLoaded: c, loadGoals: m, monthlyCashFlowProfile: b, setAlert: T, retirmentGoals: S } = I(), [R, v] = y.useState(0), [F, Z] = y.useState(!1), z = b?.amount_allocated_for_savings_goals || 0, H = b?.amount_allocated_for_debt_goals || 0, te = b?.amount_allocated_for_retirement_goals || 0;
929
+ Ke({
930
+ widgetName: "GoalsWidget",
931
+ isLoaded: c
932
+ });
933
+ const ie = a ? L(
926
934
  s ? l.tab_subtitle_mobile : l.tab_subtitle,
927
935
  x(z, "0,0")
928
- ) : "", se = a ? B(
936
+ ) : "", se = a ? L(
929
937
  s ? l.tab_subtitle_mobile : l.tab_subtitle,
930
938
  x(H, "0,0")
931
- ) : "", G = a ? B(
939
+ ) : "", G = a ? L(
932
940
  s ? l.tab_subtitle_mobile : l.tab_subtitle,
933
941
  x(te, "0,0")
934
942
  ) : "";
935
943
  y.useEffect(() => {
936
944
  g(p), i(Y.GOALS_VIEW);
937
- }, []), y.useEffect(() => {
938
- _ && u().finally();
945
+ }, [p]), y.useEffect(() => {
946
+ _ && m().finally();
939
947
  }, [_, z, H, te]);
940
948
  const $ = () => {
941
949
  i(Y.GOALS_CLICK_FILTER);
942
950
  }, K = () => {
943
951
  Z(!0), i(Y.GOALS_CLICK_ADD);
944
952
  }, q = (X) => {
945
- Z(!1), X === d.SAVINGS_TRACK ? v(0) : X === d.DEBT_TRACK ? v(1) : X === d.RETIREMENT_TRACK && v(2);
953
+ Z(!1), X === u.SAVINGS_TRACK ? v(0) : X === u.DEBT_TRACK ? v(1) : X === u.RETIREMENT_TRACK && v(2);
946
954
  }, O = y.useMemo(
947
- () => c && (m.length === 0 || m.every(({ track_type: X }) => !X) && S.length === 0),
948
- [m, c, S]
955
+ () => c && (o.length === 0 || o.every(({ track_type: X }) => !X) && S.length === 0),
956
+ [o, c, S]
949
957
  );
950
- return !c || !a || !_ ? /* @__PURE__ */ e(Ke, {}) : /* @__PURE__ */ r(
951
- gt,
958
+ return !c || !a || !_ ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ r(
959
+ bt,
952
960
  {
953
961
  accountOptions: p,
954
962
  actions: [
@@ -965,9 +973,9 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
965
973
  children: [
966
974
  /* @__PURE__ */ r(f, { mx: s ? 0 : 48, my: 24, children: [
967
975
  /* @__PURE__ */ r(
968
- Fe,
976
+ ze,
969
977
  {
970
- onChange: (X, Oe) => v(Oe),
978
+ onChange: (X, We) => v(We),
971
979
  sx: { bgcolor: "background.paper" },
972
980
  textColor: "primary",
973
981
  value: O ? !1 : R,
@@ -998,7 +1006,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
998
1006
  }
999
1007
  ),
1000
1008
  O ? /* @__PURE__ */ e(
1001
- bt,
1009
+ ft,
1002
1010
  {
1003
1011
  header: l.create_goals_header,
1004
1012
  icon: "trophy",
@@ -1013,12 +1021,12 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1013
1021
  }
1014
1022
  }
1015
1023
  ) : /* @__PURE__ */ r(U, { children: [
1016
- R === 0 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: d.SAVINGS_TRACK }),
1017
- R === 1 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: d.DEBT_TRACK }),
1018
- R === 2 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: d.RETIREMENT_TRACK })
1024
+ R === 0 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: u.SAVINGS_TRACK }),
1025
+ R === 1 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: u.DEBT_TRACK }),
1026
+ R === 2 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: u.RETIREMENT_TRACK })
1019
1027
  ] })
1020
1028
  ] }),
1021
- /* @__PURE__ */ e(Ot, { onClose: q }),
1029
+ /* @__PURE__ */ e(Wt, { onClose: q }),
1022
1030
  /* @__PURE__ */ e(
1023
1031
  j,
1024
1032
  {
@@ -1026,29 +1034,29 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1026
1034
  isOpen: F,
1027
1035
  onClose: () => Z(!1),
1028
1036
  title: l.add_goal_title,
1029
- children: /* @__PURE__ */ e(Nt, { onClose: q })
1037
+ children: /* @__PURE__ */ e(kt, { onClose: q })
1030
1038
  }
1031
1039
  ),
1032
- /* @__PURE__ */ e(je, { onClose: () => T(""), open: !!o, children: /* @__PURE__ */ e(Ve, { onClose: () => T(""), severity: "success", variant: "filled", children: o }) })
1040
+ /* @__PURE__ */ e(Fe, { onClose: () => T(""), open: !!d, children: /* @__PURE__ */ e(je, { onClose: () => T(""), severity: "success", variant: "filled", children: d }) })
1033
1041
  ]
1034
1042
  }
1035
1043
  );
1036
- }), Wt = D(({ goal: t }) => {
1037
- const { goals: n } = C(), i = At(), {
1044
+ }), Pt = D(({ goal: t }) => {
1045
+ const { goals: n } = C(), i = Tt(), {
1038
1046
  backgroundColor: s,
1039
1047
  color: p,
1040
1048
  percentage: a,
1041
1049
  projectedText: _
1042
1050
  } = ue(n, t), g = Math.round(a * 100);
1043
- let l = /* @__PURE__ */ e(Se, {});
1044
- return t.track_type === d.DEBT_TRACK ? l = /* @__PURE__ */ e(Re, {}) : t.track_type === d.RETIREMENT_TRACK && (l = /* @__PURE__ */ e(Ee, {})), /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1051
+ let l = /* @__PURE__ */ e(Re, {});
1052
+ return t.track_type === u.DEBT_TRACK ? l = /* @__PURE__ */ e(Ee, {}) : t.track_type === u.RETIREMENT_TRACK && (l = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1045
1053
  /* @__PURE__ */ e(oe, { sx: { bgcolor: s, color: p, height: 32, width: 32 }, variant: "rounded", children: l }),
1046
- /* @__PURE__ */ r(yt, { sx: { width: "100%" }, children: [
1054
+ /* @__PURE__ */ r(At, { sx: { width: "100%" }, children: [
1047
1055
  /* @__PURE__ */ e(_e, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1048
1056
  t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: _ })
1049
1057
  ] }),
1050
1058
  /* @__PURE__ */ e(
1051
- Tt,
1059
+ Ct,
1052
1060
  {
1053
1061
  backgroundStrokeColor: i.palette.border.lighter,
1054
1062
  color: i.palette.primary.main,
@@ -1059,7 +1067,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1059
1067
  }
1060
1068
  )
1061
1069
  ] });
1062
- }), Pt = ({ header: t, subText: n, sx: i }) => /* @__PURE__ */ r(
1070
+ }), Vt = ({ header: t, subText: n, sx: i }) => /* @__PURE__ */ r(
1063
1071
  f,
1064
1072
  {
1065
1073
  sx: {
@@ -1069,7 +1077,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1069
1077
  ...i
1070
1078
  },
1071
1079
  children: [
1072
- /* @__PURE__ */ e(qe, { size: 32 }),
1080
+ /* @__PURE__ */ e(Je, { size: 32 }),
1073
1081
  /* @__PURE__ */ e(_e, { fontSize: 15, fontWeight: 600, children: t }),
1074
1082
  /* @__PURE__ */ e(
1075
1083
  W,
@@ -1082,46 +1090,49 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1082
1090
  )
1083
1091
  ]
1084
1092
  }
1085
- ), $n = D(({ onCTAClick: t }) => {
1086
- const { visibleAccounts: n } = V(), { onEvent: i } = Ge(), { goals: s } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: _ } = Ne(), { ongoingGoalsForMicroWidget: g, loadGoals: l, goalsLoaded: h } = I();
1087
- y.useEffect(() => {
1093
+ ), Un = D(({ onCTAClick: t }) => {
1094
+ const { visibleAccounts: n } = V(), { onEvent: i } = Ne(), { goals: s } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: _ } = he(), { ongoingGoalsForMicroWidget: g, loadGoals: l, goalsLoaded: h } = I();
1095
+ Ke({
1096
+ widgetName: "GoalsMicroWidget",
1097
+ isLoaded: h
1098
+ }), y.useEffect(() => {
1088
1099
  a(n);
1089
1100
  }, []), y.useEffect(() => {
1090
1101
  p && (l().finally(), i(Y.GOALS_LOAD_WIDGET, {
1091
1102
  state: n?.length ? "default" : "zeroState"
1092
1103
  }));
1093
1104
  }, [p]);
1094
- const o = y.useMemo(
1105
+ const d = y.useMemo(
1095
1106
  () => h && g.length === 0,
1096
1107
  [g, h]
1097
- ), m = () => {
1108
+ ), o = () => {
1098
1109
  i(
1099
- o ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
1110
+ d ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
1100
1111
  ), t();
1101
1112
  };
1102
- return !h || !_ || !p ? /* @__PURE__ */ e(Ke, {}) : /* @__PURE__ */ e(
1103
- Ct,
1113
+ return !h || !_ || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1114
+ St,
1104
1115
  {
1105
1116
  className: "mx-goals-microwidget",
1106
- ctaLabel: o ? s.get_started : s.view_details,
1107
- onCTAClick: m,
1117
+ ctaLabel: d ? s.get_started : s.view_details,
1118
+ onCTAClick: o,
1108
1119
  title: s.title,
1109
- children: o ? /* @__PURE__ */ e(
1110
- Pt,
1120
+ children: d ? /* @__PURE__ */ e(
1121
+ Vt,
1111
1122
  {
1112
1123
  header: s.create_goals_header,
1113
1124
  subText: s.micro_zero_state_description
1114
1125
  }
1115
- ) : /* @__PURE__ */ e(ft, { sx: { justifyContent: "space-between" }, children: g.map((c, u) => /* @__PURE__ */ r(y.Fragment, { children: [
1116
- /* @__PURE__ */ e(Wt, { goal: c }),
1117
- u !== g.length - 1 && /* @__PURE__ */ e(E, {})
1126
+ ) : /* @__PURE__ */ e(yt, { sx: { justifyContent: "space-between" }, children: g.map((c, m) => /* @__PURE__ */ r(y.Fragment, { children: [
1127
+ /* @__PURE__ */ e(Pt, { goal: c }),
1128
+ m !== g.length - 1 && /* @__PURE__ */ e(E, {})
1118
1129
  ] }, c.guid)) })
1119
1130
  }
1120
1131
  );
1121
1132
  });
1122
1133
  export {
1123
- Yn as GoalApi,
1124
- Zn as GoalStore,
1125
- $n as GoalsMicroWidget,
1126
- Hn as GoalsWidget
1134
+ qn as GoalApi,
1135
+ Jn as GoalStore,
1136
+ Un as GoalsMicroWidget,
1137
+ Xn as GoalsWidget
1127
1138
  };