@mx-cartographer/experiences 7.8.2-alpha.mm0 → 7.9.1-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 (219) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AccountDetailsHeader-Cf2TUJnM.mjs → AccountDetailsHeader-3ZD1Of4i.mjs} +19 -19
  3. package/dist/{AccountFields-UdOvbQ5H.mjs → AccountFields-CiofAlEI.mjs} +2 -2
  4. package/dist/{AccountListItem-BPVxmNT_.mjs → AccountListItem-CvYjSc-O.mjs} +3 -3
  5. package/dist/{AccountStore-BbPWe2C9.mjs → AccountStore-DxfUstUk.mjs} +1 -1
  6. package/dist/{BudgetUtil-BmZXkL0C.mjs → BudgetUtil-CrAD2kHT.mjs} +1 -1
  7. package/dist/{CategorySelectorDrawer-cQKX5dZb.mjs → CategorySelectorDrawer-euTDUflY.mjs} +3 -3
  8. package/dist/{CategoryStore-BYICdb9m.mjs → CategoryStore-CqSW9TsW.mjs} +1 -1
  9. package/dist/{CategoryUtil-meuejJqP.mjs → CategoryUtil-CCY_tiFg.mjs} +1 -1
  10. package/dist/{ConnectionsDrawer-BDpVTTSe.mjs → ConnectionsDrawer-GcyfM8yJ.mjs} +6 -6
  11. package/dist/{CurrencyInput-itK0R3wV.mjs → CurrencyInput-BBifPjuC.mjs} +6 -6
  12. package/dist/{DateUtil-D7U-nc1Y.mjs → DateUtil-gRDTwAoC.mjs} +1 -1
  13. package/dist/{Dialog-B4PI-_bL.mjs → Dialog-CwiqpTGe.mjs} +4 -4
  14. package/dist/{Donut-Dmy3JTWd.mjs → Donut-DKY8mL3P.mjs} +2 -2
  15. package/dist/{ExportCsvAction-CDuzTva1.mjs → ExportCsvAction-BMWhHM8W.mjs} +3 -3
  16. package/dist/{FinstrongStore-bEn_im_e.mjs → FinstrongStore-DuvM8Gfg.mjs} +6 -6
  17. package/dist/{GlobalAccountFilter-DQCPNc95.mjs → GlobalAccountFilter-xZ4Z8AE-.mjs} +11 -11
  18. package/dist/{GoalStore-B4LVt_kH.mjs → GoalStore-2UZjY0z_.mjs} +3 -3
  19. package/dist/{Help-DhcC-C05.mjs → Help-B8mD4aLJ.mjs} +2 -2
  20. package/dist/{Help-DODxp9uw.mjs → Help-C0hzCqyd.mjs} +2 -2
  21. package/dist/{LineChart-kFoTu9Pi.mjs → LineChart-CfkLqqXU.mjs} +1 -1
  22. package/dist/{ListItemAction-CU42h39I.mjs → ListItemAction-pvmKK9RU.mjs} +6 -6
  23. package/dist/{ManageIncome-Da1ktIdG.mjs → ManageIncome-KIBMKnI6.mjs} +82 -86
  24. package/dist/{MicroWidgetContainer-B2hO9rOG.mjs → MicroWidgetContainer-CX0qZ57D.mjs} +2 -2
  25. package/dist/{MiniWidgetContainer-98-hKFqm.mjs → MiniWidgetContainer-BHk-RlKA.mjs} +2 -2
  26. package/dist/{NotificationSettings-SPg3pwbX.mjs → NotificationSettings-DeLwFzIJ.mjs} +81 -81
  27. package/dist/{OriginalBalanceAction-ChGGq5AH.mjs → OriginalBalanceAction-CQzvRZ7u.mjs} +3 -3
  28. package/dist/{RecurringSettings-B4sByhIM.mjs → RecurringSettings-CvQSL1ny.mjs} +4 -4
  29. package/dist/{RecurringTransactionsStore-BQBEJOPP.mjs → RecurringTransactionsStore-DMKtMn2C.mjs} +1 -1
  30. package/dist/{RepeatingTransaction-miZVnk_A.mjs → RepeatingTransaction-C5AV8wLs.mjs} +2 -2
  31. package/dist/{SpendingData-BmL0bwnS.mjs → SpendingData-DtNL2mQL.mjs} +1 -1
  32. package/dist/{SpendingLegend-CD60HCYS.mjs → SpendingLegend-DCQtF8Wf.mjs} +22 -22
  33. package/dist/{TransactionDetails-B9NQYa6j.mjs → TransactionDetails-CuviEVDJ.mjs} +8 -8
  34. package/dist/{TransactionStore-BSp5bOKg.mjs → TransactionStore-DhG1AyOA.mjs} +3 -3
  35. package/dist/{TrendsStore-DXQnmdc8.mjs → TrendsStore-C6mrxcHX.mjs} +1 -1
  36. package/dist/{User-B0LnmiKO.mjs → User-CCYFbd5i.mjs} +14 -14
  37. package/dist/{ViewMoreMicroCard-DQhcjIOS.mjs → ViewMoreMicroCard-B8C76vIW.mjs} +2 -2
  38. package/dist/{WidgetContainer-CYdQ0BSm.mjs → WidgetContainer-AuyAcUXL.mjs} +150 -153
  39. package/dist/accounts/index.es.js +17 -17
  40. package/dist/analytics/index.es.js +2 -2
  41. package/dist/budgets/index.es.js +12 -12
  42. package/dist/cashflow/index.es.js +11 -11
  43. package/dist/categories/index.es.js +2 -2
  44. package/dist/common/index.es.js +33 -34
  45. package/dist/common/types/AppData.d.ts +0 -1
  46. package/dist/dashboard/index.es.js +7 -7
  47. package/dist/debts/index.es.js +8 -8
  48. package/dist/{exportTransactionsToCSV-DtQ7ovAR.mjs → exportTransactionsToCSV-DNbCbq9P.mjs} +2 -2
  49. package/dist/finstrong/index.es.js +17 -17
  50. package/dist/goals/components/managegoals/OngoingListItem.d.ts +2 -1
  51. package/dist/goals/index.es.js +545 -640
  52. package/dist/help/index.es.js +4 -4
  53. package/dist/{hooks-ZMp65DFz.mjs → hooks-BUCn6FeJ.mjs} +8 -8
  54. package/dist/insights-ui/components/index.d.ts +39 -0
  55. package/dist/insights-ui/components/insights/AccountDiscoverability/AccountDiscoverability.d.ts +3 -0
  56. package/dist/insights-ui/components/insights/AccountDiscoverability/index.d.ts +1 -0
  57. package/dist/insights-ui/components/insights/AccountDiscoverability/types/AccountDiscoverability.d.ts +3 -0
  58. package/dist/insights-ui/components/insights/AmericanUpcomingTaxDeadlineAlert/AmericanUpcomingTaxDeadlineAlert.d.ts +2 -0
  59. package/dist/insights-ui/components/insights/AmericanUpcomingTaxDeadlineAlert/index.d.ts +1 -0
  60. package/dist/insights-ui/components/insights/AmericanUpcomingTaxDeadlineAlert/types/AmericanUpcomingTaxDeadlineProps.d.ts +4 -0
  61. package/dist/insights-ui/components/insights/BillAmountNotStandard/BillAmountNotStandard.d.ts +3 -0
  62. package/dist/insights-ui/components/insights/BillAmountNotStandard/BillAmountNotStandardMUI.d.ts +3 -0
  63. package/dist/insights-ui/components/insights/BillAmountNotStandard/index.d.ts +2 -0
  64. package/dist/insights-ui/components/insights/BillAmountNotStandard/types/BillAmountNotStandard.d.ts +4 -0
  65. package/dist/insights-ui/components/insights/CategoryBudget/CategoryBudget.d.ts +3 -0
  66. package/dist/insights-ui/components/insights/CategoryBudget/index.d.ts +1 -0
  67. package/dist/insights-ui/components/insights/CategoryBudget/types/CategoryBudget.d.ts +8 -0
  68. package/dist/insights-ui/components/insights/CategorySpendingV2/CategorySpendingV2.d.ts +2 -0
  69. package/dist/insights-ui/components/insights/CategorySpendingV2/CategorySpendingV2MUI.d.ts +2 -0
  70. package/dist/insights-ui/components/insights/CategorySpendingV2/index.d.ts +2 -0
  71. package/dist/insights-ui/components/insights/CategorySpendingV2/types/CategorySpendingV2.d.ts +6 -0
  72. package/dist/insights-ui/components/insights/CelebrateCreditCardPayoff/CelebrateCreditCardPayoff.d.ts +3 -0
  73. package/dist/insights-ui/components/insights/CelebrateCreditCardPayoff/index.d.ts +1 -0
  74. package/dist/insights-ui/components/insights/CelebrateCreditCardPayoff/types/CelebrateCreditCardPayoffProps.d.ts +9 -0
  75. package/dist/insights-ui/components/insights/CustomTransaction/CustomTransaction.d.ts +3 -0
  76. package/dist/insights-ui/components/insights/CustomTransaction/index.d.ts +1 -0
  77. package/dist/insights-ui/components/insights/DiscoveredAccounts/DiscoveredAccountsBody.d.ts +9 -0
  78. package/dist/insights-ui/components/insights/DiscoveredAccounts/DiscoveredAccountsLearnMoreDrawerContent.d.ts +21 -0
  79. package/dist/insights-ui/components/insights/DiscoveredAccounts/DiscoveredAccountsMiniInsight.d.ts +6 -0
  80. package/dist/insights-ui/components/insights/DiscoveredAccounts/index.d.ts +3 -0
  81. package/dist/insights-ui/components/insights/FederalBankHoliday/FederalBankHoliday.d.ts +3 -0
  82. package/dist/insights-ui/components/insights/FederalBankHoliday/FederalBankHolidayMUI.d.ts +3 -0
  83. package/dist/insights-ui/components/insights/FederalBankHoliday/index.d.ts +2 -0
  84. package/dist/insights-ui/components/insights/FederalBankHoliday/types/FederalBankHoliday.d.ts +4 -0
  85. package/dist/insights-ui/components/insights/MarketingHub/Offer.d.ts +3 -0
  86. package/dist/insights-ui/components/insights/MarketingHub/Types.d.ts +33 -0
  87. package/dist/insights-ui/components/insights/MarketingHub/index.d.ts +2 -0
  88. package/dist/insights-ui/components/insights/MonthlyDebtToIncomeComparisonV2/MonthlyDebtToIncomeComparisonV2.d.ts +2 -0
  89. package/dist/insights-ui/components/insights/MonthlyDebtToIncomeComparisonV2/index.d.ts +1 -0
  90. package/dist/insights-ui/components/insights/MonthlyDebtToIncomeComparisonV2/types/index.d.ts +4 -0
  91. package/dist/insights-ui/components/insights/MonthlyEmergencyFundReview/LastMonthsContributionSection.d.ts +6 -0
  92. package/dist/insights-ui/components/insights/MonthlyEmergencyFundReview/MonthlyEmergencyFundReviewBody.d.ts +21 -0
  93. package/dist/insights-ui/components/insights/MonthlyEmergencyFundReview/ProjectedCompletionSection.d.ts +6 -0
  94. package/dist/insights-ui/components/insights/MonthlyEmergencyFundReview/TotalSection.d.ts +7 -0
  95. package/dist/insights-ui/components/insights/MonthlyEmergencyFundReview/index.d.ts +4 -0
  96. package/dist/insights-ui/components/insights/MonthlySavingsToIncomeComparison/MonthlySavingsToIncomeComparison.d.ts +2 -0
  97. package/dist/insights-ui/components/insights/MonthlySavingsToIncomeComparison/index.d.ts +1 -0
  98. package/dist/insights-ui/components/insights/MonthlySavingsToIncomeComparison/types/index.d.ts +4 -0
  99. package/dist/insights-ui/components/insights/MonthlySpendToIncomeComparisonV2/MonthlySpendToIncomeComparisonV2.d.ts +2 -0
  100. package/dist/insights-ui/components/insights/MonthlySpendToIncomeComparisonV2/index.d.ts +1 -0
  101. package/dist/insights-ui/components/insights/MonthlySpendToIncomeComparisonV2/types/index.d.ts +4 -0
  102. package/dist/insights-ui/components/insights/MonthlySpendingComparisonV2/MonthlySpendingComparisonV2.d.ts +3 -0
  103. package/dist/insights-ui/components/insights/MonthlySpendingComparisonV2/__test__/MonthlySpendComparisonV2.test.d.ts +1 -0
  104. package/dist/insights-ui/components/insights/MonthlySpendingComparisonV2/index.d.ts +1 -0
  105. package/dist/insights-ui/components/insights/MonthlySpendingComparisonV2/types/MonthlySpendComparisonV2.d.ts +4 -0
  106. package/dist/insights-ui/components/insights/P2pCategorization/P2pCategorization.d.ts +3 -0
  107. package/dist/insights-ui/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
  108. package/dist/insights-ui/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
  109. package/dist/insights-ui/components/insights/P2pCategorization/index.d.ts +4 -0
  110. package/dist/insights-ui/components/insights/P2pCategorization/shared/P2pCategorizationMultipleTransactions.d.ts +3 -0
  111. package/dist/insights-ui/components/insights/P2pCategorization/shared/P2pCategorizationSingleTransaction.d.ts +3 -0
  112. package/dist/insights-ui/components/insights/P2pCategorization/types/P2pCategorization.d.ts +17 -0
  113. package/dist/insights-ui/components/insights/SavingsAccountBalancesSummary/SavingsAccountBalancesSummary.d.ts +2 -0
  114. package/dist/insights-ui/components/insights/SavingsAccountBalancesSummary/index.d.ts +1 -0
  115. package/dist/insights-ui/components/insights/SavingsAccountBalancesSummary/types/SavingsAccountBalancesSummary.d.ts +4 -0
  116. package/dist/insights-ui/components/insights/SetUpDirectDeposit/SetUpDirectDepositBody.d.ts +3 -0
  117. package/dist/insights-ui/components/insights/SetUpDirectDeposit/index.d.ts +1 -0
  118. package/dist/insights-ui/components/insights/SharedDeposit/SharedDeposit.d.ts +2 -0
  119. package/dist/insights-ui/components/insights/SharedDeposit/index.d.ts +1 -0
  120. package/dist/insights-ui/components/insights/SharedDeposit/types/index.d.ts +7 -0
  121. package/dist/insights-ui/components/insights/SwitchDirectDeposit/AccountBox.d.ts +7 -0
  122. package/dist/insights-ui/components/insights/SwitchDirectDeposit/SwitchDirectDepositBody.d.ts +10 -0
  123. package/dist/insights-ui/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.d.ts +9 -0
  124. package/dist/insights-ui/components/insights/SwitchDirectDeposit/index.d.ts +3 -0
  125. package/dist/insights-ui/components/insights/UnifiedDeposit/UnifiedDeposit.d.ts +7 -0
  126. package/dist/insights-ui/components/insights/UnifiedDeposit/UnifiedDepositBody.d.ts +11 -0
  127. package/dist/insights-ui/components/insights/UnifiedDeposit/index.d.ts +1 -0
  128. package/dist/insights-ui/components/insights/UserFeedback/StyledToggleButton.d.ts +7 -0
  129. package/dist/insights-ui/components/insights/UserFeedback/Types.d.ts +27 -0
  130. package/dist/insights-ui/components/insights/UserFeedback/UserFeedback.d.ts +3 -0
  131. package/dist/insights-ui/components/insights/UserFeedback/index.d.ts +1 -0
  132. package/dist/insights-ui/components/insights/WeeklyNoSpendDays/BubbleWeek.d.ts +9 -0
  133. package/dist/insights-ui/components/insights/WeeklyNoSpendDays/NoSpendIcons.d.ts +1 -0
  134. package/dist/insights-ui/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.d.ts +12 -0
  135. package/dist/insights-ui/components/insights/WeeklyNoSpendDays/_tests_/WeeklyNoSpendDays.test.d.ts +0 -0
  136. package/dist/insights-ui/components/insights/WeeklyNoSpendDays/index.d.ts +1 -0
  137. package/dist/insights-ui/components/insights/index.d.ts +24 -0
  138. package/dist/insights-ui/components/shared/BottomSheet.d.ts +13 -0
  139. package/dist/insights-ui/components/shared/CarouselControls.d.ts +14 -0
  140. package/dist/insights-ui/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.d.ts +29 -0
  141. package/dist/insights-ui/components/shared/ChartDrawerTemplate/TipSection.d.ts +7 -0
  142. package/dist/insights-ui/components/shared/Charts/BarChart/BarChart.d.ts +2 -0
  143. package/dist/insights-ui/components/shared/Charts/BarChart/BarChartV2.d.ts +2 -0
  144. package/dist/insights-ui/components/shared/Charts/BarChart/ChartLegend.d.ts +9 -0
  145. package/dist/insights-ui/components/shared/Charts/BarChart/ChartLegendV2.d.ts +10 -0
  146. package/dist/insights-ui/components/shared/Charts/BarChart/CustomBarPlot.d.ts +18 -0
  147. package/dist/insights-ui/components/shared/Charts/BarChart/CustomBarPlotV2.d.ts +18 -0
  148. package/dist/insights-ui/components/shared/Charts/BarChart/CustomDoubleBarPlot.d.ts +24 -0
  149. package/dist/insights-ui/components/shared/Charts/BarChart/DoubleBarChart.d.ts +2 -0
  150. package/dist/insights-ui/components/shared/Charts/BarChart/DoubleBarChartLegend.d.ts +10 -0
  151. package/dist/insights-ui/components/shared/Charts/BarChart/index.d.ts +3 -0
  152. package/dist/insights-ui/components/shared/Charts/EmptyBarChart.d.ts +1 -0
  153. package/dist/insights-ui/components/shared/Charts/index.d.ts +2 -0
  154. package/dist/insights-ui/components/shared/Confetti.d.ts +5 -0
  155. package/dist/insights-ui/components/shared/DeepLinks/DeepLinkDialog.d.ts +11 -0
  156. package/dist/insights-ui/components/shared/DeepLinks/DirectDeposit/Circle.d.ts +6 -0
  157. package/dist/insights-ui/components/shared/DeepLinks/DirectDeposit/DirectDepositDeepLink.d.ts +24 -0
  158. package/dist/insights-ui/components/shared/DeepLinks/DirectDeposit/Dot.d.ts +1 -0
  159. package/dist/insights-ui/components/shared/DeepLinks/DirectDeposit/Oval.d.ts +1 -0
  160. package/dist/insights-ui/components/shared/DirectDeposit/DirectDeposit.d.ts +3 -0
  161. package/dist/insights-ui/components/shared/DirectDeposit/DirectDepositSubHeader.d.ts +14 -0
  162. package/dist/insights-ui/components/shared/DirectDeposit/FullFeedBodyHeader.d.ts +10 -0
  163. package/dist/insights-ui/components/shared/DirectDeposit/LeftBox.d.ts +7 -0
  164. package/dist/insights-ui/components/shared/DirectDeposit/MiniBodyHeader.d.ts +10 -0
  165. package/dist/insights-ui/components/shared/DirectDeposit/RightBox.d.ts +8 -0
  166. package/dist/insights-ui/components/shared/ErrorCard/ErrorCard.d.ts +7 -0
  167. package/dist/insights-ui/components/shared/FormDialog.d.ts +16 -0
  168. package/dist/insights-ui/components/shared/GenericFeedback/FeedbackButtons.d.ts +15 -0
  169. package/dist/insights-ui/components/shared/GenericFeedback/FeedbackDescription.d.ts +5 -0
  170. package/dist/insights-ui/components/shared/GenericFeedback/FeedbackHeader.d.ts +15 -0
  171. package/dist/insights-ui/components/shared/GenericFeedback/FeedbackOptions.d.ts +12 -0
  172. package/dist/insights-ui/components/shared/GenericFeedback/FeedbackText.d.ts +13 -0
  173. package/dist/insights-ui/components/shared/GoalProgress.d.ts +10 -0
  174. package/dist/insights-ui/components/shared/GradientBox.d.ts +8 -0
  175. package/dist/insights-ui/components/shared/InsightsCard/BeatCard.d.ts +20 -0
  176. package/dist/insights-ui/components/shared/InsightsCard/CardButtonSection.d.ts +7 -0
  177. package/dist/insights-ui/components/shared/InsightsCard/CardError.d.ts +5 -0
  178. package/dist/insights-ui/components/shared/InsightsCard/CardFooter.d.ts +7 -0
  179. package/dist/insights-ui/components/shared/InsightsCard/CardHeader.d.ts +11 -0
  180. package/dist/insights-ui/components/shared/InsightsCard/CardLoading.d.ts +5 -0
  181. package/dist/insights-ui/components/shared/InsightsCard/ContentAndDescription.d.ts +17 -0
  182. package/dist/insights-ui/components/shared/InsightsCard/Description.d.ts +12 -0
  183. package/dist/insights-ui/components/shared/InsightsCard/EmbeddedCard.d.ts +10 -0
  184. package/dist/insights-ui/components/shared/InsightsCard/FeedbackCard.d.ts +13 -0
  185. package/dist/insights-ui/components/shared/InsightsCard/InsightButton.d.ts +12 -0
  186. package/dist/insights-ui/components/shared/InsightsCard/MiniDescription.d.ts +9 -0
  187. package/dist/insights-ui/components/shared/MenuAction.d.ts +15 -0
  188. package/dist/insights-ui/components/shared/MiniInsightCard.d.ts +16 -0
  189. package/dist/insights-ui/components/shared/ProgressBar.d.ts +9 -0
  190. package/dist/insights-ui/components/shared/StatusIndicator.d.ts +14 -0
  191. package/dist/insights-ui/components/shared/ThemedSVGImage.d.ts +2 -0
  192. package/dist/insights-ui/components/shared/ZeroState/LinedCardZeroState.d.ts +1 -0
  193. package/dist/insights-ui/components/shared/index.d.ts +1 -0
  194. package/dist/insights-ui/hooks/useContainerDimensions.d.ts +5 -0
  195. package/dist/insights-ui/index.d.ts +1 -0
  196. package/dist/insights-ui/index.es.js +4206 -0
  197. package/dist/insights-ui/themes/Typography.d.ts +3 -0
  198. package/dist/insights-ui/themes/index.d.ts +1 -0
  199. package/dist/insights-ui/types/Charts/BarChart.d.ts +77 -0
  200. package/dist/insights-ui/types/CommonBeat.d.ts +368 -0
  201. package/dist/insights-ui/types/DirectDeposit.d.ts +16 -0
  202. package/dist/insights-ui/types/ThemedSVGImage.d.ts +5 -0
  203. package/dist/investments/index.es.js +5 -5
  204. package/dist/merchants/index.es.js +14 -14
  205. package/dist/microinsights/index.es.js +1 -1
  206. package/dist/networth/index.es.js +35 -35
  207. package/dist/notifications/index.es.js +3 -3
  208. package/dist/recurringtransactions/index.es.js +14 -14
  209. package/dist/settings/index.es.js +64 -64
  210. package/dist/spending/index.es.js +7 -7
  211. package/dist/transactions/index.es.js +16 -16
  212. package/dist/trends/index.es.js +17 -17
  213. package/dist/{useAccountDisplayName-Bot2tb4n.mjs → useAccountDisplayName-D27PXvdj.mjs} +5 -5
  214. package/dist/{useAriaLive-B3_pRUio.mjs → useAriaLive-MkYebyUR.mjs} +4 -4
  215. package/dist/{useCombineEvents-CRwX-qWE.mjs → useCombineEvents-ARuNN9Xh.mjs} +8 -8
  216. package/dist/{useDimensions-27p2evRx.mjs → useDimensions-CeDR9V8N.mjs} +6 -6
  217. package/dist/{useInsightsEnabled-B7dxpDrX.mjs → useInsightsEnabled-CzhMEHNx.mjs} +1 -1
  218. package/dist/{useWidgetLoadTimer-hIOioiKx.mjs → useWidgetLoadTimer-BYMP5Q8g.mjs} +1 -1
  219. package/package.json +10 -1
@@ -1,87 +1,86 @@
1
- import { g as _e, T as s, G as de, a as Pe, M as Z, C as Ae, b as Ve } from "../GoalStore-B4LVt_kH.mjs";
2
- import { c as Un, d as Yn } from "../GoalStore-B4LVt_kH.mjs";
3
- import { jsxs as i, jsx as e, Fragment as H } from "react/jsx-runtime";
4
- import A from "react";
1
+ import { g as de, T as i, G as le, a as Ve, M as Z, C as Ae, b as Pe } from "../GoalStore-2UZjY0z_.mjs";
2
+ import { c as $n, d as Xn } from "../GoalStore-2UZjY0z_.mjs";
3
+ import { jsxs as l, jsx as e, Fragment as $ } from "react/jsx-runtime";
4
+ import T from "react";
5
5
  import { observer as D } from "mobx-react-lite";
6
- import je from "@mui/material/Alert";
7
- import Fe from "@mui/material/Snackbar";
6
+ import ze from "@mui/material/Alert";
7
+ import je from "@mui/material/Snackbar";
8
8
  import g from "@mui/material/Stack";
9
- import se from "@mui/material/Tab";
10
- import ze from "@mui/material/Tabs";
11
- import { Text as T, H2 as ue, P, H3 as me, Icon as He, InstitutionLogo as te } from "@mxenabled/mxui";
12
- import pe from "@mui/material/Button";
9
+ import re from "@mui/material/Tab";
10
+ import Fe from "@mui/material/Tabs";
11
+ import { Text as C, H2 as me, H3 as ce, P as H, Icon as $e, InstitutionLogo as te } from "@mxenabled/mxui";
12
+ import ue from "@mui/material/Button";
13
13
  import Te from "@mui/material/Card";
14
14
  import Ce from "@mui/material/CardActionArea";
15
15
  import Se from "@mui/material/CardContent";
16
- import ge from "@mui/material/Unstable_Grid2";
17
- import ne from "@mui/material/Avatar";
18
- import $e from "@mui/material/CardHeader";
19
- import { Payments as Re, NoteStack as Ee, Person as xe, ChevronRight as O, DragHandle as Xe, CheckCircle as Ue, Icon as ye, ExpandLess as Ye, ExpandMore as Ze, AddBox as ve, Trophy as qe } from "@mxenabled/mx-icons";
20
- import { u as R, l as G, b as he, a as Ge, d as j, o as Ie, g as Ne } from "../hooks-ZMp65DFz.mjs";
21
- import { u as be } from "../useScreenSize-B6JyS_Lj.mjs";
22
- import { f as v } from "../NumberFormatting-DjTD0t3W.mjs";
16
+ import ye from "@mui/material/Unstable_Grid2";
17
+ import ae from "@mui/material/Avatar";
18
+ import Xe from "@mui/material/CardHeader";
19
+ import { Payments as Re, NoteStack as Ee, Person as xe, ArrowUpwardAlt as He, CheckCircle as Ue, ChevronRight as V, Icon as ge, ExpandLess as Ye, ExpandMore as Ze, AddBox as ve, Trophy as qe } from "@mxenabled/mx-icons";
20
+ import { u as S, l as G, b as _e, a as Ie, d as z, o as Ge, g as Ne } from "../hooks-BUCn6FeJ.mjs";
21
+ import { u as pe } from "../useScreenSize-B6JyS_Lj.mjs";
22
+ import { f as I } from "../NumberFormatting-DjTD0t3W.mjs";
23
23
  import { S as Je } from "../StatusBar-BK_uYHAB.mjs";
24
- import E from "@mui/material/Divider";
24
+ import x from "@mui/material/Divider";
25
25
  import L from "@mui/material/List";
26
- import { L as J } from "../ListItemAction-CU42h39I.mjs";
27
- import { C as we } from "../CurrencyInput-itK0R3wV.mjs";
28
- import { fromUnixTime as q } from "date-fns/fromUnixTime";
29
- import w from "@mui/material/ListItem";
30
- import K from "@mui/material/ListItemButton";
31
- import k from "@mui/material/ListItemText";
32
- import { DataGridPro as Qe } from "@mui/x-data-grid-pro";
33
- import { u as et } from "../useAriaLive-B3_pRUio.mjs";
34
- import { D as X } from "../Drawer-DV4NTsFg.mjs";
35
- import { b as M } from "../Localization-2MODESHW.mjs";
36
- import { f as ae, D as oe, a as tt } from "../Dialog-B4PI-_bL.mjs";
37
- import V from "@mui/material/ListItemAvatar";
38
- import { g as ke } from "../AccountDisplayName-CO7z3v99.mjs";
39
- import nt from "@mui/material/Collapse";
40
- import at from "@mui/material/ListItemIcon";
41
- import ot from "@mui/material/Checkbox";
26
+ import { L as q } from "../ListItemAction-pvmKK9RU.mjs";
27
+ import { C as ke } from "../CurrencyInput-BBifPjuC.mjs";
28
+ import { fromUnixTime as ne } from "date-fns/fromUnixTime";
29
+ import Qe from "@mui/material/IconButton";
30
+ import k from "@mui/material/ListItem";
31
+ import P from "@mui/material/ListItemAvatar";
32
+ import M from "@mui/material/ListItemButton";
33
+ import w from "@mui/material/ListItemText";
34
+ import { b as O } from "../Localization-2MODESHW.mjs";
35
+ import { f as he, D as be, a as et } from "../Dialog-CwiqpTGe.mjs";
36
+ import { D as J } from "../Drawer-DV4NTsFg.mjs";
37
+ import { g as we } from "../AccountDisplayName-CO7z3v99.mjs";
38
+ import tt from "@mui/material/Collapse";
39
+ import nt from "@mui/material/ListItemIcon";
40
+ import at from "@mui/material/Checkbox";
42
41
  import { A as fe } from "../Account-BiB1F8lL.mjs";
43
- import { u as rt } from "../useAccountDisplayName-Bot2tb4n.mjs";
42
+ import { u as ot } from "../useAccountDisplayName-D27PXvdj.mjs";
44
43
  import De from "@mui/material/TextField";
45
- import { M as it, I as st, O as lt } from "../OriginalBalanceAction-ChGGq5AH.mjs";
46
- import { getUnixTime as ct } from "date-fns/getUnixTime";
47
- import { isValid as dt } from "date-fns/isValid";
48
- import { AdapterDateFns as mt } from "@mui/x-date-pickers/AdapterDateFnsV3";
49
- import { DatePicker as _t } from "@mui/x-date-pickers";
44
+ import { M as rt, I as it, O as st } from "../OriginalBalanceAction-CQzvRZ7u.mjs";
45
+ import { getUnixTime as lt } from "date-fns/getUnixTime";
46
+ import { isValid as ct } from "date-fns/isValid";
47
+ import { AdapterDateFns as dt } from "@mui/x-date-pickers/AdapterDateFnsV3";
48
+ import { DatePicker as mt } from "@mui/x-date-pickers";
50
49
  import { LocalizationProvider as ut } from "@mui/x-date-pickers/LocalizationProvider";
51
- import { u as Ke } from "../useWidgetLoadTimer-hIOioiKx.mjs";
52
- import { A as $, W as pt } from "../WidgetContainer-CYdQ0BSm.mjs";
50
+ import { u as Ke } from "../useWidgetLoadTimer-BYMP5Q8g.mjs";
51
+ import { A as X, W as _t } from "../WidgetContainer-AuyAcUXL.mjs";
53
52
  import { L as Me } from "../Loader-DUaFpDGv.mjs";
54
- import { E as ht } from "../EmptyState-DoxNUae-.mjs";
55
- import bt from "@mui/material/Stack/Stack";
56
- import gt from "@mui/material/Box";
53
+ import { E as pt } from "../EmptyState-DoxNUae-.mjs";
54
+ import ht from "@mui/material/Stack/Stack";
55
+ import bt from "@mui/material/Box";
57
56
  import yt from "@mui/material/styles/useTheme";
58
- import { S as ft } from "../SingleSegmentDonut-BgbLgwHi.mjs";
59
- import { M as At } from "../MicroWidgetContainer-B2hO9rOG.mjs";
60
- function le({ title: t, subtitle: n }) {
61
- return /* @__PURE__ */ i(g, { children: [
62
- /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t }),
63
- /* @__PURE__ */ e(T, { sx: { fontWeight: 400 }, variant: "Body", children: n })
57
+ import { S as gt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
58
+ import { M as ft } from "../MicroWidgetContainer-CX0qZ57D.mjs";
59
+ function ie({ title: t, subtitle: n }) {
60
+ return /* @__PURE__ */ l(g, { children: [
61
+ /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t }),
62
+ /* @__PURE__ */ e(C, { sx: { fontWeight: 400 }, variant: "Body", children: n })
64
63
  ] });
65
64
  }
66
- const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
65
+ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
67
66
  /(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
68
67
  "$1$2$3"
69
- ) : v(t, "0,0.00"), Le = D(
70
- ({ goal: t, isInDrawer: n = !1, onClick: c }) => {
71
- const { goals: m } = R(), { isMobile: h, isTablet: r } = be(), d = h || r, {
72
- backgroundColor: l,
73
- color: p,
68
+ ) : I(t, "0,0.00"), Le = D(
69
+ ({ goal: t, isInDrawer: n = !1, onClick: m }) => {
70
+ const { goals: c } = S(), { isMobile: p, isTablet: r } = pe(), d = p || r, {
71
+ backgroundColor: s,
72
+ color: _,
74
73
  percentage: b,
75
74
  percentageText: o,
76
75
  projectedText: a
77
- } = _e(m, t), u = t.track_type === s.DEBT_TRACK ? t.initial_amount : t.amount, _ = [
76
+ } = de(c, t), u = t.track_type === i.DEBT_TRACK ? t.initial_amount : t.amount, h = [
78
77
  {
79
- color: l,
78
+ color: s,
80
79
  percentage: `${b}`
81
80
  }
82
81
  ];
83
- let y = /* @__PURE__ */ e(Re, {});
84
- return t.track_type === s.DEBT_TRACK ? y = /* @__PURE__ */ e(Ee, {}) : t.track_type === s.RETIREMENT_TRACK && (y = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ e(
82
+ let f = /* @__PURE__ */ e(Re, {});
83
+ return t.track_type === i.DEBT_TRACK ? f = /* @__PURE__ */ e(Ee, {}) : t.track_type === i.RETIREMENT_TRACK && (f = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ e(
85
84
  Te,
86
85
  {
87
86
  elevation: 2,
@@ -91,291 +90,197 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
91
90
  outlineColor: "primary.main"
92
91
  }
93
92
  },
94
- children: /* @__PURE__ */ i(Ce, { disabled: !c, onClick: c, children: [
93
+ children: /* @__PURE__ */ l(Ce, { disabled: !m, onClick: m, children: [
95
94
  /* @__PURE__ */ e(
96
- $e,
95
+ Xe,
97
96
  {
98
- avatar: /* @__PURE__ */ e(ne, { sx: { bgcolor: l, color: p, height: 48, width: 48 }, variant: "rounded", children: y }),
99
- subheader: /* @__PURE__ */ e(T, { variant: n || d ? "H3" : "H2", children: `${v(t.current_amount, d ? "0,0" : "0,0.00")} / ${Tt(
97
+ avatar: /* @__PURE__ */ e(ae, { sx: { bgcolor: s, color: _, height: 48, width: 48 }, variant: "rounded", children: f }),
98
+ subheader: /* @__PURE__ */ e(C, { variant: n || d ? "H3" : "H2", children: `${I(t.current_amount, d ? "0,0" : "0,0.00")} / ${At(
100
99
  u,
101
100
  d
102
101
  )}` }),
103
- title: /* @__PURE__ */ e(ue, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
102
+ title: /* @__PURE__ */ e(me, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
104
103
  }
105
104
  ),
106
- /* @__PURE__ */ e(Se, { sx: { pt: 0 }, children: /* @__PURE__ */ i(g, { gap: 6, children: [
107
- /* @__PURE__ */ e(Je, { data: _, height: 24 }),
108
- /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
109
- /* @__PURE__ */ e(T, { color: "text.secondary", variant: "XSmall", children: o }),
110
- t.projected_to_complete_at && /* @__PURE__ */ e(T, { color: "text.secondary", variant: "XSmall", children: a })
105
+ /* @__PURE__ */ e(Se, { sx: { pt: 0 }, children: /* @__PURE__ */ l(g, { gap: 6, children: [
106
+ /* @__PURE__ */ e(Je, { data: h, height: 24 }),
107
+ /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
108
+ /* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: o }),
109
+ t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: a })
111
110
  ] })
112
111
  ] }) })
113
112
  ] })
114
113
  }
115
114
  );
116
115
  }
117
- ), Ct = D(({ trackType: t }) => {
118
- const { goals: n } = R(), { setAlert: c, monthlyCashFlowProfile: m, updateMonthlyCashFlowProfile: h } = G(), r = A.useMemo(() => {
116
+ ), Tt = D(({ trackType: t }) => {
117
+ const { goals: n } = S(), { setAlert: m, monthlyCashFlowProfile: c, updateMonthlyCashFlowProfile: p } = G(), r = T.useMemo(() => {
119
118
  let o = 0;
120
- return t === s.SAVINGS_TRACK ? o = m?.amount_allocated_for_savings_goals || 0 : t === s.DEBT_TRACK ? o = m?.amount_allocated_for_debt_goals || 0 : t === s.RETIREMENT_TRACK && (o = m?.amount_allocated_for_retirement_goals || 0), o;
121
- }, [m]);
122
- A.useEffect(() => {
123
- l(r);
119
+ return t === i.SAVINGS_TRACK ? o = c?.amount_allocated_for_savings_goals || 0 : t === i.DEBT_TRACK ? o = c?.amount_allocated_for_debt_goals || 0 : t === i.RETIREMENT_TRACK && (o = c?.amount_allocated_for_retirement_goals || 0), o;
120
+ }, [c]);
121
+ T.useEffect(() => {
122
+ s(r);
124
123
  }, [r]);
125
- const [d, l] = A.useState(r), p = d < 0 || d > 99999999, b = async () => {
126
- if (m) {
127
- const o = { ...m };
128
- t === s.SAVINGS_TRACK ? o.amount_allocated_for_savings_goals = d : t === s.DEBT_TRACK ? o.amount_allocated_for_debt_goals = d : t === s.RETIREMENT_TRACK && (o.amount_allocated_for_retirement_goals = d), await h(o), c(n.alert_contribution_updated);
124
+ const [d, s] = T.useState(r), _ = d < 0 || d > 99999999, b = async () => {
125
+ if (c) {
126
+ const o = { ...c };
127
+ t === i.SAVINGS_TRACK ? o.amount_allocated_for_savings_goals = d : t === i.DEBT_TRACK ? o.amount_allocated_for_debt_goals = d : t === i.RETIREMENT_TRACK && (o.amount_allocated_for_retirement_goals = d), await p(o), m(n.alert_contribution_updated);
129
128
  }
130
129
  };
131
130
  return /* @__PURE__ */ e(g, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
132
- J,
131
+ q,
133
132
  {
134
133
  isSaveDisabled: !d || isNaN(d),
135
134
  label: n.contribution_label,
136
- onCancel: () => l(r),
135
+ onCancel: () => s(r),
137
136
  onSave: b,
138
137
  primaryText: n.contribution_label,
139
- secondaryText: v(r, "0,0.00"),
138
+ secondaryText: I(r, "0,0.00"),
140
139
  children: /* @__PURE__ */ e(
141
- we,
140
+ ke,
142
141
  {
143
142
  amount: d,
144
143
  autoFocus: !0,
145
- error: p,
144
+ error: _,
146
145
  fullWidth: !0,
147
146
  minAmount: 0,
148
- setAmount: (o) => l(isNaN(Number(o)) ? d : Number(o)),
147
+ setAmount: (o) => s(isNaN(Number(o)) ? d : Number(o)),
149
148
  sx: { ".MuiTypography-Body": { p: 0 } }
150
149
  }
151
150
  )
152
151
  }
153
152
  ) });
154
- }), St = ({ goals: t }) => {
155
- const { goals: n, common: c } = R(), { reorderGoals: m, setAlert: h } = G(), { announce: r, ariaLive: d } = et(), [l, p] = A.useState(!1), [b, o] = A.useState(t.map((f) => ({ ...f })));
156
- A.useEffect(() => {
157
- l && o(t.map((f) => ({ ...f })));
158
- }, [l]);
159
- const a = [
153
+ }), Ct = ({ goal: t, index: n, onUpClick: m }) => {
154
+ const { goals: c } = S(), { percentage: p } = de(c, t), r = t.goal_type === le.KEEP_BALANCE_BELOW || t.has_been_spent ? c.goal_completed : O(c.goal_percentage_reached, `${p * 100}`);
155
+ return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(
156
+ M,
160
157
  {
161
- field: "name",
162
- flex: 1,
163
- renderCell: (f) => {
164
- const S = f.row;
165
- return /* @__PURE__ */ i(g, { children: [
166
- /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: S.name }),
167
- /* @__PURE__ */ e(T, { variant: "XSmall", children: M(
168
- n.goal_projection,
169
- ae(
170
- q(S.projected_to_complete_at || 0),
171
- oe.MONTH_SHORT_YEAR
172
- )
173
- ) })
174
- ] });
175
- },
176
- sortable: !1
177
- },
158
+ disableRipple: !0,
159
+ sx: { ":hover": { backgroundColor: "unset" }, cursor: "default" },
160
+ children: [
161
+ t.track_type !== i.RETIREMENT_TRACK && /* @__PURE__ */ e(
162
+ P,
163
+ {
164
+ sx: {
165
+ alignItems: "center",
166
+ display: "flex",
167
+ justifyContent: "center",
168
+ ".MuiAvatar-root": { height: "16px", width: "16px" }
169
+ },
170
+ children: t.track_type === i.SAVINGS_TRACK ? /* @__PURE__ */ e(Qe, { onClick: () => m?.(t), children: /* @__PURE__ */ e(He, { color: "primary", size: 24 }) }) : /* @__PURE__ */ e(ae, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(C, { bold: !0, variant: "XSmall", children: n + 1 }) })
171
+ }
172
+ ),
173
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
174
+ /* @__PURE__ */ l(g, { children: [
175
+ /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t.name }),
176
+ /* @__PURE__ */ e(C, { variant: "XSmall", children: t.is_complete ? r : O(
177
+ c.goal_projection,
178
+ he(
179
+ ne(t.projected_to_complete_at || 0),
180
+ be.MONTH_SHORT_YEAR
181
+ )
182
+ ) })
183
+ ] }),
184
+ /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: I(t.amount, "0,0.00") })
185
+ ] }) })
186
+ ]
187
+ }
188
+ ) });
189
+ }, St = ({ goal: t }) => {
190
+ const { goals: n } = S();
191
+ return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(
192
+ M,
178
193
  {
179
- align: "right",
180
- field: "amount",
181
- minWidth: 140,
182
- renderCell: (f) => {
183
- const S = f.row;
184
- return /* @__PURE__ */ e(T, { bold: !0, sx: { mr: 12 }, variant: "Body", children: v(S.amount, "0,0.00") });
185
- },
186
- sortable: !1
194
+ disableRipple: !0,
195
+ sx: { ":hover": { backgroundColor: "unset" }, cursor: "default" },
196
+ children: [
197
+ /* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ue, { color: "success", filled: !0, size: 20 }) }),
198
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
199
+ /* @__PURE__ */ l(g, { children: [
200
+ /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t.name }),
201
+ /* @__PURE__ */ e(C, { variant: "XSmall", children: O(
202
+ n.completed_label,
203
+ he(
204
+ ne(t.completed_at || 0),
205
+ be.MONTH_SHORT_YEAR
206
+ )
207
+ ) })
208
+ ] }),
209
+ /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: I(t.amount, "0,0.00") })
210
+ ] }) })
211
+ ]
187
212
  }
188
- ], u = b.map((f) => ({
189
- id: f.guid,
190
- isHovering: !1,
191
- __reorder__: f.name,
192
- ...f
193
- })), _ = ({ oldIndex: f, targetIndex: S }) => {
194
- const C = [...b], I = C[f];
195
- C.splice(S, 0, C.splice(f, 1)[0]);
196
- for (let N = 0; N < C.length; N += 1)
197
- C[N].position = N + 1;
198
- o(C), r(
199
- M(
200
- n.reorder_goals_announcement,
201
- I.name,
202
- f + 1,
203
- S + 1
204
- )
205
- );
206
- }, y = async () => {
207
- await m(b), h(n.alert_goals_reordered), p(!1);
213
+ ) }, t.guid);
214
+ }, Rt = ({ trackType: t }) => {
215
+ const { goals: n, common: m } = S(), { loadGoals: c, orderedGoals: p, reorderGoals: r } = G(), d = p.filter((y) => y.track_type === t), s = d.filter(
216
+ (y) => y.track_type === i.SAVINGS_TRACK && !y.has_been_spent || y.track_type !== i.SAVINGS_TRACK && !y.is_complete
217
+ ), _ = d.filter(
218
+ (y) => y.track_type === i.SAVINGS_TRACK && y.has_been_spent || y.track_type !== i.SAVINGS_TRACK && y.is_complete
219
+ ), [b, o] = T.useState(!1);
220
+ let a = n.manage_saving_goals, u = n.manage_saving_drawer_title, h = n.manage_saving_title, f = n.manage_saving_description;
221
+ t === i.DEBT_TRACK ? (a = n.manage_debt_goals, u = n.manage_debt_drawer_title, h = n.manage_debt_title, f = n.manage_debt_description) : t === i.RETIREMENT_TRACK && (a = n.manage_retirement_goals, u = n.manage_retirement_drawer_title, h = n.manage_retirement_title, f = n.manage_retirement_description);
222
+ const v = async (y) => {
223
+ const A = [...s], R = A.findIndex((K) => K.guid === y.guid);
224
+ let N = R - 1;
225
+ N < 0 && (N = A.length - 1), A.splice(N, 0, A.splice(R, 1)[0]);
226
+ for (let K = 0; K < A.length; K++)
227
+ A[K].position = K + 1;
228
+ await r(A), await c();
208
229
  };
209
- return /* @__PURE__ */ i(g, { children: [
210
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(K, { onClick: () => p(!0), children: /* @__PURE__ */ e(k, { children: /* @__PURE__ */ i(
211
- g,
212
- {
213
- alignItems: "center",
214
- color: "action.active",
215
- direction: "row",
216
- justifyContent: "space-between",
217
- children: [
218
- /* @__PURE__ */ e(T, { color: "primary.light", variant: "Body", children: n.reorder_goals_title }),
219
- /* @__PURE__ */ e(O, { color: "primary" })
220
- ]
221
- }
222
- ) }) }) }),
230
+ return /* @__PURE__ */ l(g, { children: [
231
+ /* @__PURE__ */ e(ue, { endIcon: /* @__PURE__ */ e(V, {}), onClick: () => o(!0), children: a }),
223
232
  /* @__PURE__ */ e(
224
- X,
225
- {
226
- ariaLabelClose: c.close_aria,
227
- isOpen: l,
228
- onClose: () => p(!1),
229
- onPrimaryAction: y,
230
- title: n.reorder_goals_title,
231
- children: /* @__PURE__ */ i(g, { children: [
232
- d,
233
- /* @__PURE__ */ e(P, { id: "reorder-instructions", sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
234
- /* @__PURE__ */ e(
235
- Qe,
236
- {
237
- "aria-describedby": "reorder-instructions",
238
- columnHeaderHeight: 0,
239
- columns: a,
240
- disableColumnFilter: !0,
241
- disableColumnMenu: !0,
242
- hideFooter: !0,
243
- onRowOrderChange: _,
244
- rowReordering: !0,
245
- rows: u,
246
- slots: {
247
- rowReorderIcon: () => /* @__PURE__ */ e(Xe, { "aria-label": n.reorder_goals_drag_aria_label, sx: { ml: 12 } })
248
- },
249
- sx: {
250
- "& .MuiDataGrid-columnHeaders": {
251
- borderBottomWidth: 0
252
- }
253
- }
254
- }
255
- )
256
- ] })
257
- }
258
- )
259
- ] });
260
- }, Rt = ({ goal: t, index: n }) => {
261
- const { goals: c } = R(), { percentage: m } = _e(c, t), h = t.goal_type === de.KEEP_BALANCE_BELOW || t.has_been_spent ? c.goal_completed : M(c.goal_percentage_reached, `${m * 100}`);
262
- return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(K, { children: [
263
- t.track_type !== s.RETIREMENT_TRACK && /* @__PURE__ */ e(
264
- V,
233
+ J,
265
234
  {
266
- sx: {
267
- alignItems: "center",
268
- display: "flex",
269
- justifyContent: "center",
270
- ".MuiAvatar-root": { height: "16px", width: "16px" }
271
- },
272
- children: /* @__PURE__ */ e(ne, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(T, { bold: !0, variant: "XSmall", children: n + 1 }) })
273
- }
274
- ),
275
- /* @__PURE__ */ e(k, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
276
- /* @__PURE__ */ i(g, { children: [
277
- /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.name }),
278
- /* @__PURE__ */ e(T, { variant: "XSmall", children: t.is_complete ? h : M(
279
- c.goal_projection,
280
- ae(
281
- q(t.projected_to_complete_at || 0),
282
- oe.MONTH_SHORT_YEAR
283
- )
284
- ) })
285
- ] }),
286
- /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: v(t.amount, "0,0.00") })
287
- ] }) })
288
- ] }) });
289
- }, Et = ({ goal: t }) => {
290
- const { goals: n } = R();
291
- return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(K, { children: [
292
- /* @__PURE__ */ e(V, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ue, { color: "success", filled: !0, size: 20 }) }),
293
- /* @__PURE__ */ e(k, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
294
- /* @__PURE__ */ i(g, { children: [
295
- /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.name }),
296
- /* @__PURE__ */ e(T, { variant: "XSmall", children: M(
297
- n.completed_label,
298
- ae(
299
- q(t.completed_at || 0),
300
- oe.MONTH_SHORT_YEAR
301
- )
302
- ) })
303
- ] }),
304
- /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: v(t.amount, "0,0.00") })
305
- ] }) })
306
- ] }) }, t.guid);
307
- }, xt = ({ trackType: t }) => {
308
- const { goals: n, common: c } = R(), { orderedGoals: m } = G(), h = m.filter((_) => _.track_type === t), r = h.filter(
309
- (_) => _.track_type === s.SAVINGS_TRACK && !_.has_been_spent || _.track_type !== s.SAVINGS_TRACK && !_.is_complete
310
- ), d = h.filter(
311
- (_) => _.track_type === s.SAVINGS_TRACK && _.has_been_spent || _.track_type !== s.SAVINGS_TRACK && _.is_complete
312
- ), [l, p] = A.useState(!1);
313
- let b = n.manage_saving_goals, o = n.manage_saving_drawer_title, a = n.manage_saving_title, u = n.manage_saving_description;
314
- return t === s.DEBT_TRACK ? (b = n.manage_debt_goals, o = n.manage_debt_drawer_title, a = n.manage_debt_title, u = n.manage_debt_description) : t === s.RETIREMENT_TRACK && (b = n.manage_retirement_goals, o = n.manage_retirement_drawer_title, a = n.manage_retirement_title, u = n.manage_retirement_description), /* @__PURE__ */ i(g, { children: [
315
- /* @__PURE__ */ e(pe, { endIcon: /* @__PURE__ */ e(O, {}), onClick: () => p(!0), children: b }),
316
- /* @__PURE__ */ e(
317
- X,
318
- {
319
- ariaLabelClose: c.close_aria,
320
- isOpen: l,
321
- onClose: () => p(!1),
322
- title: o,
323
- children: /* @__PURE__ */ i(g, { children: [
324
- /* @__PURE__ */ i(g, { m: 24, children: [
325
- /* @__PURE__ */ e(me, { children: a }),
326
- /* @__PURE__ */ e(P, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: u })
327
- ] }),
328
- /* @__PURE__ */ e(Ct, { trackType: t }),
329
- /* @__PURE__ */ e(T, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
330
- /* @__PURE__ */ i(L, { sx: { bgcolor: "background.paper" }, children: [
331
- r.map((_, y) => {
332
- const f = y >= r.length - 1;
333
- return /* @__PURE__ */ i(g, { children: [
334
- /* @__PURE__ */ e(Rt, { goal: _, index: y }),
335
- /* @__PURE__ */ e(
336
- E,
337
- {
338
- variant: f && t === s.RETIREMENT_TRACK ? "fullWidth" : "inset"
339
- }
340
- )
341
- ] }, `ongoing-${_.guid}`);
342
- }),
343
- t !== s.RETIREMENT_TRACK && /* @__PURE__ */ i(g, { children: [
344
- /* @__PURE__ */ e(St, { goals: r }),
345
- /* @__PURE__ */ e(E, {})
346
- ] })
235
+ ariaLabelClose: m.close_aria,
236
+ isOpen: b,
237
+ onClose: () => o(!1),
238
+ title: u,
239
+ children: /* @__PURE__ */ l(g, { children: [
240
+ /* @__PURE__ */ l(g, { m: 24, children: [
241
+ /* @__PURE__ */ e(ce, { children: h }),
242
+ /* @__PURE__ */ e(H, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: f })
347
243
  ] }),
348
- t !== s.RETIREMENT_TRACK && d.length > 0 && /* @__PURE__ */ i(g, { children: [
349
- /* @__PURE__ */ e(T, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
350
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: d.map((_, y) => {
351
- const f = y > r.length - 1;
352
- return /* @__PURE__ */ i(g, { children: [
353
- /* @__PURE__ */ e(Et, { goal: _ }),
354
- /* @__PURE__ */ e(E, { variant: f ? "fullWidth" : "inset" })
355
- ] }, `complete-${_.guid}`);
244
+ /* @__PURE__ */ e(Tt, { trackType: t }),
245
+ /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
246
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: s.map((y, A) => {
247
+ const R = A >= s.length - 1;
248
+ return /* @__PURE__ */ l(g, { children: [
249
+ /* @__PURE__ */ e(Ct, { goal: y, index: A, onUpClick: v }),
250
+ /* @__PURE__ */ e(x, { variant: R ? "fullWidth" : "inset" })
251
+ ] }, `ongoing-${y.guid}`);
252
+ }) }),
253
+ t !== i.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ l(g, { children: [
254
+ /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
255
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: _.map((y, A) => {
256
+ const R = A > s.length - 1;
257
+ return /* @__PURE__ */ l(g, { children: [
258
+ /* @__PURE__ */ e(St, { goal: y }),
259
+ /* @__PURE__ */ e(x, { variant: R ? "fullWidth" : "inset" })
260
+ ] }, `complete-${y.guid}`);
356
261
  }) })
357
262
  ] })
358
263
  ] })
359
264
  }
360
265
  )
361
266
  ] });
362
- }, ce = D(({ trackType: t, onAddGoals: n }) => {
363
- const { isMobile: c } = be(), { goals: m } = R(), { selectedAccountGuids: h } = he(), { orderedGoals: r, setSelectedGoal: d } = G(), l = r.filter(
364
- (a) => a.track_type === t && (a.track_type !== s.RETIREMENT_TRACK && h.includes(a.account_guid) || a.track_type === s.RETIREMENT_TRACK)
365
- ), p = l.filter(
366
- (a) => a.track_type === s.SAVINGS_TRACK && !a.has_been_spent || a.track_type !== s.SAVINGS_TRACK && !a.is_complete
367
- ), b = l.filter(
368
- (a) => a.track_type === s.SAVINGS_TRACK && a.has_been_spent || a.track_type !== s.SAVINGS_TRACK && a.is_complete
369
- ), o = t === s.DEBT_TRACK ? m.zero_state_complete_debt : m.zero_state_complete_savings;
370
- return /* @__PURE__ */ i(g, { mt: 16, mx: c ? 24 : 0, children: [
371
- /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
372
- /* @__PURE__ */ e(me, { color: "text.secondary", variant: "Small", children: m.ongoing_title }),
373
- /* @__PURE__ */ e(xt, { trackType: t })
267
+ }, se = D(({ trackType: t, onAddGoals: n }) => {
268
+ const { isMobile: m } = pe(), { goals: c } = S(), { selectedAccountGuids: p } = _e(), { orderedGoals: r, setSelectedGoal: d } = G(), s = r.filter(
269
+ (a) => a.track_type === t && (a.track_type !== i.RETIREMENT_TRACK && p.includes(a.account_guid) || a.track_type === i.RETIREMENT_TRACK)
270
+ ), _ = s.filter(
271
+ (a) => a.track_type === i.SAVINGS_TRACK && !a.has_been_spent || a.track_type !== i.SAVINGS_TRACK && !a.is_complete
272
+ ), b = s.filter(
273
+ (a) => a.track_type === i.SAVINGS_TRACK && a.has_been_spent || a.track_type !== i.SAVINGS_TRACK && a.is_complete
274
+ ), o = t === i.DEBT_TRACK ? c.zero_state_complete_debt : c.zero_state_complete_savings;
275
+ return /* @__PURE__ */ l(g, { mt: 16, mx: m ? 24 : 0, children: [
276
+ /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
277
+ /* @__PURE__ */ e(ce, { color: "text.secondary", variant: "Small", children: c.ongoing_title }),
278
+ /* @__PURE__ */ e(Rt, { trackType: t })
374
279
  ] }),
375
- p.length > 0 ? /* @__PURE__ */ e(ge, { container: !0, spacing: 24, children: p.map((a, u, _) => (
280
+ _.length > 0 ? /* @__PURE__ */ e(ye, { container: !0, spacing: 24, children: _.map((a, u, h) => (
376
281
  // Goal should be full width in mobile or if it's the first goal (unless there are 2)
377
- /* @__PURE__ */ e(ge, { xs: c || u === 0 && _.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: a, onClick: () => d(a) }, a.guid) }, u)
378
- )) }) : /* @__PURE__ */ i(
282
+ /* @__PURE__ */ e(ye, { xs: m || u === 0 && h.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: a, onClick: () => d(a) }, a.guid) }, u)
283
+ )) }) : /* @__PURE__ */ l(
379
284
  g,
380
285
  {
381
286
  alignItems: "center",
@@ -386,7 +291,7 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
386
291
  py: 18,
387
292
  children: [
388
293
  /* @__PURE__ */ e(
389
- P,
294
+ H,
390
295
  {
391
296
  sx: (a) => ({
392
297
  color: "text.secondary",
@@ -396,17 +301,17 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
396
301
  width: { sm: 381 }
397
302
  }),
398
303
  variant: "Small",
399
- children: Pe(t, m)
304
+ children: Ve(t, c)
400
305
  }
401
306
  ),
402
- /* @__PURE__ */ e(pe, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: m.add_goals_button })
307
+ /* @__PURE__ */ e(ue, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: c.add_goals_button })
403
308
  ]
404
309
  }
405
310
  ),
406
- t !== s.RETIREMENT_TRACK && /* @__PURE__ */ i(g, { gap: 16, mt: 48, children: [
407
- /* @__PURE__ */ e(me, { color: "text.secondary", variant: "Small", children: m.complete_title }),
311
+ t !== i.RETIREMENT_TRACK && /* @__PURE__ */ l(g, { gap: 16, mt: 48, children: [
312
+ /* @__PURE__ */ e(ce, { color: "text.secondary", variant: "Small", children: c.complete_title }),
408
313
  b.length === 0 && /* @__PURE__ */ e(g, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
409
- P,
314
+ H,
410
315
  {
411
316
  sx: (a) => ({
412
317
  color: "text.secondary",
@@ -419,73 +324,73 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
419
324
  children: o
420
325
  }
421
326
  ) }),
422
- b.map((a) => /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ e(Ce, { onClick: () => d(a), children: /* @__PURE__ */ e(Se, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
423
- /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", gap: 6, children: [
424
- /* @__PURE__ */ e(He, { color: "success", fill: !0, name: "check_circle", size: 20 }),
425
- /* @__PURE__ */ e(T, { color: "text.secondary", variant: "Body", children: a.name })
327
+ b.map((a) => /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ e(Ce, { onClick: () => d(a), children: /* @__PURE__ */ e(Se, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
328
+ /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", gap: 6, children: [
329
+ /* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
330
+ /* @__PURE__ */ e(C, { color: "text.secondary", variant: "Body", children: a.name })
426
331
  ] }),
427
- /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: v(a.amount, "0,0.00") })
332
+ /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: I(a.amount, "0,0.00") })
428
333
  ] }) }) }) }, a.guid))
429
334
  ] })
430
335
  ] });
431
- }), vt = ({ goalType: t, onClick: n }) => {
432
- const { goals: c } = R(), { bgcolor: m, icon: h, label: r, description: d, subTypes: l, type: p } = t, [b, o] = A.useState(!1), a = l.length > 0;
433
- return /* @__PURE__ */ e(g, { children: /* @__PURE__ */ i(L, { sx: { bgcolor: "background.paper" }, children: [
434
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(
435
- K,
336
+ }), Et = ({ goalType: t, onClick: n }) => {
337
+ const { goals: m } = S(), { bgcolor: c, icon: p, label: r, description: d, subTypes: s, type: _ } = t, [b, o] = T.useState(!1), a = s.length > 0;
338
+ return /* @__PURE__ */ e(g, { children: /* @__PURE__ */ l(L, { sx: { bgcolor: "background.paper" }, children: [
339
+ /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(
340
+ M,
436
341
  {
437
342
  onClick: a ? () => o(!b) : () => n(
438
- p === s.RETIREMENT_TRACK ? c.retirement : "",
439
- p === s.RETIREMENT_TRACK ? Z.RETIREMENT : Z.OTHER,
440
- p
343
+ _ === i.RETIREMENT_TRACK ? m.retirement : "",
344
+ _ === i.RETIREMENT_TRACK ? Z.RETIREMENT : Z.OTHER,
345
+ _
441
346
  ),
442
347
  children: [
443
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(ne, { sx: { bgcolor: m }, variant: "rounded", children: /* @__PURE__ */ e(ye, { name: h, sx: { color: "grey.900" } }) }) }),
444
- /* @__PURE__ */ e(k, { primary: r, secondary: d, sx: { mr: 24 } }),
445
- !a && /* @__PURE__ */ e(O, {}),
348
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(ae, { sx: { bgcolor: c }, variant: "rounded", children: /* @__PURE__ */ e(ge, { name: p, sx: { color: "grey.900" } }) }) }),
349
+ /* @__PURE__ */ e(w, { primary: r, secondary: d, sx: { mr: 24 } }),
350
+ !a && /* @__PURE__ */ e(V, {}),
446
351
  a && (b ? /* @__PURE__ */ e(Ye, {}) : /* @__PURE__ */ e(Ze, {}))
447
352
  ]
448
353
  }
449
354
  ) }),
450
- /* @__PURE__ */ e(E, { variant: "inset" }),
451
- a && /* @__PURE__ */ e(nt, { in: b, children: /* @__PURE__ */ e(L, { sx: { bgcolor: "background.default" }, children: l.map((u, _) => /* @__PURE__ */ e(w, { sx: { pl: 48 }, children: /* @__PURE__ */ i(K, { onClick: () => n(u.label, u.metaType, p), children: [
452
- /* @__PURE__ */ e(at, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ye, { name: u.icon }) }),
355
+ /* @__PURE__ */ e(x, { variant: "inset" }),
356
+ a && /* @__PURE__ */ e(tt, { in: b, children: /* @__PURE__ */ e(L, { sx: { bgcolor: "background.default" }, children: s.map((u, h) => /* @__PURE__ */ e(k, { sx: { pl: 48 }, children: /* @__PURE__ */ l(M, { onClick: () => n(u.label, u.metaType, _), children: [
357
+ /* @__PURE__ */ e(nt, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ge, { name: u.icon }) }),
453
358
  /* @__PURE__ */ e(
454
- k,
359
+ w,
455
360
  {
456
361
  primary: u.label,
457
362
  primaryTypographyProps: { variant: "Body" }
458
363
  }
459
364
  ),
460
- /* @__PURE__ */ e(O, {})
461
- ] }) }, _)) }) })
365
+ /* @__PURE__ */ e(V, {})
366
+ ] }) }, h)) }) })
462
367
  ] }) });
463
368
  }, Be = ({
464
369
  accounts: t,
465
370
  isOpen: n,
466
- onClose: c,
467
- onSave: m,
468
- title: h
371
+ onClose: m,
372
+ onSave: c,
373
+ title: p
469
374
  }) => {
470
- const { goals: r, common: d } = R(), { config: l } = Ge(), [p, b] = A.useState([]), o = (a) => {
471
- const u = p.findIndex((y) => y.guid === a.guid), _ = [...p];
472
- u >= 0 ? _.splice(u, 1) : _.push(a), b(_);
375
+ const { goals: r, common: d } = S(), { config: s } = Ie(), [_, b] = T.useState([]), o = (a) => {
376
+ const u = _.findIndex((f) => f.guid === a.guid), h = [..._];
377
+ u >= 0 ? h.splice(u, 1) : h.push(a), b(h);
473
378
  };
474
- return /* @__PURE__ */ i(
475
- X,
379
+ return /* @__PURE__ */ l(
380
+ J,
476
381
  {
477
382
  ariaLabelClose: d.close_aria,
478
383
  isOpen: n,
479
- onClose: c,
480
- onPrimaryAction: () => m(p),
481
- title: h,
384
+ onClose: m,
385
+ onPrimaryAction: () => c(_),
386
+ title: p,
482
387
  children: [
483
- /* @__PURE__ */ e(P, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: r.select_debt_accounts_description }),
484
- /* @__PURE__ */ i(L, { sx: { bgcolor: "background.white" }, children: [
485
- /* @__PURE__ */ e(E, { variant: "fullWidth" }),
486
- t.map((a, u) => /* @__PURE__ */ i(A.Fragment, { children: [
487
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(K, { onClick: () => o(a), children: [
488
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
388
+ /* @__PURE__ */ e(H, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: r.select_debt_accounts_description }),
389
+ /* @__PURE__ */ l(L, { sx: { bgcolor: "background.white" }, children: [
390
+ /* @__PURE__ */ e(x, { variant: "fullWidth" }),
391
+ t.map((a, u) => /* @__PURE__ */ l(T.Fragment, { children: [
392
+ /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(M, { onClick: () => o(a), children: [
393
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
489
394
  te,
490
395
  {
491
396
  alt: a?.name || "",
@@ -493,17 +398,17 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
493
398
  }
494
399
  ) }),
495
400
  /* @__PURE__ */ e(
496
- k,
401
+ w,
497
402
  {
498
- primary: ke(a, {
499
- allowNickname: l?.show_account_nicknames_in_master
403
+ primary: we(a, {
404
+ allowNickname: s?.show_account_nicknames_in_master
500
405
  }),
501
- secondary: v(a.balance || 0, "0,0.00")
406
+ secondary: I(a.balance || 0, "0,0.00")
502
407
  }
503
408
  ),
504
- /* @__PURE__ */ e(ot, { checked: p.some((_) => _.guid === a.guid) })
409
+ /* @__PURE__ */ e(at, { checked: _.some((h) => h.guid === a.guid) })
505
410
  ] }) }),
506
- /* @__PURE__ */ e(E, { variant: u < t.length - 1 ? "inset" : "fullWidth" })
411
+ /* @__PURE__ */ e(x, { variant: u < t.length - 1 ? "inset" : "fullWidth" })
507
412
  ] }, a.guid))
508
413
  ] }),
509
414
  /* @__PURE__ */ e(
@@ -517,44 +422,44 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
517
422
  ]
518
423
  }
519
424
  );
520
- }, Gt = ({ onClose: t }) => {
521
- const { goals: n } = R(), { addGoal: c, debtGoals: m, setAlert: h, setSelectedGoal: r } = G(), { config: d } = Ge(), { visibleDebtAccounts: l } = j(), [p, b] = A.useState(!1), o = Ve(n), a = (_, y, f) => {
522
- f === s.DEBT_TRACK ? b(!0) : r({
425
+ }, xt = ({ onClose: t }) => {
426
+ const { goals: n } = S(), { addGoal: m, debtGoals: c, setAlert: p, setSelectedGoal: r } = G(), { config: d } = Ie(), { visibleDebtAccounts: s } = z(), [_, b] = T.useState(!1), o = Pe(n), a = (h, f, v) => {
427
+ v === i.DEBT_TRACK ? b(!0) : r({
523
428
  amount: 0,
524
429
  current_amount: 0,
525
- goal_type: de.SAVE_AMOUNT,
430
+ goal_type: le.SAVE_AMOUNT,
526
431
  initial_amount: 0,
527
- meta_type: y,
528
- name: _,
529
- track_type: f
432
+ meta_type: f,
433
+ name: h,
434
+ track_type: v
530
435
  });
531
- }, u = async (_) => {
532
- for (const y of _) {
533
- let f = Z.CREDIT_CARD;
534
- y.account_type === fe.LOAN ? f = Z.LOANS : y.account_type === fe.LINE_OF_CREDIT && (f = Z.LINE_OF_CREDIT), await c({
535
- account_guid: y.guid,
436
+ }, u = async (h) => {
437
+ for (const f of h) {
438
+ let v = Z.CREDIT_CARD;
439
+ f.account_type === fe.LOAN ? v = Z.LOANS : f.account_type === fe.LINE_OF_CREDIT && (v = Z.LINE_OF_CREDIT), await m({
440
+ account_guid: f.guid,
536
441
  amount: 0,
537
442
  current_amount: 0,
538
- goal_type: de.KEEP_BALANCE_BELOW,
539
- initial_amount: y.balance || 0,
540
- interest_rate: y.interest_rate || 0,
541
- meta_type: f,
542
- monthly_payment: y.minimum_payment || 0,
543
- name: ke(y, {
443
+ goal_type: le.KEEP_BALANCE_BELOW,
444
+ initial_amount: f.balance || 0,
445
+ interest_rate: f.interest_rate || 0,
446
+ meta_type: v,
447
+ monthly_payment: f.minimum_payment || 0,
448
+ name: we(f, {
544
449
  allowNickname: d?.show_account_nicknames_in_master
545
450
  }),
546
- track_type: s.DEBT_TRACK
547
- }), h(n.alert_goal_added);
451
+ track_type: i.DEBT_TRACK
452
+ }), p(n.alert_goal_added);
548
453
  }
549
- b(!1), t?.(s.DEBT_TRACK);
454
+ b(!1), t?.(i.DEBT_TRACK);
550
455
  };
551
- return /* @__PURE__ */ i(g, { children: [
552
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: o.map((_, y) => /* @__PURE__ */ e(vt, { goalType: _, onClick: a }, y)) }),
456
+ return /* @__PURE__ */ l(g, { children: [
457
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: o.map((h, f) => /* @__PURE__ */ e(Et, { goalType: h, onClick: a }, f)) }),
553
458
  /* @__PURE__ */ e(
554
459
  Be,
555
460
  {
556
- accounts: l.filter((_) => !m.find((y) => y.account_guid === _.guid)),
557
- isOpen: p,
461
+ accounts: s.filter((h) => !c.find((f) => f.account_guid === h.guid)),
462
+ isOpen: _,
558
463
  onClose: () => b(!1),
559
464
  onSave: u,
560
465
  title: n.select_debt_accounts_title
@@ -562,9 +467,9 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
562
467
  )
563
468
  ] });
564
469
  }, Oe = ({ account: t }) => {
565
- const n = rt(t);
566
- return /* @__PURE__ */ i(w, { sx: { bgcolor: "background.paper", p: 24 }, children: [
567
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
470
+ const n = ot(t);
471
+ return /* @__PURE__ */ l(k, { sx: { bgcolor: "background.paper", p: 24 }, children: [
472
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
568
473
  te,
569
474
  {
570
475
  alt: t.name || "",
@@ -572,24 +477,24 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
572
477
  }
573
478
  ) }),
574
479
  /* @__PURE__ */ e(
575
- k,
480
+ w,
576
481
  {
577
482
  primary: n,
578
- secondary: v(t.balance || 0, "0,0.00")
483
+ secondary: I(t.balance || 0, "0,0.00")
579
484
  }
580
485
  )
581
486
  ] });
582
- }, It = D(({ goal: t }) => {
583
- const { goals: n } = R(), { setAlert: c, setSelectedGoal: m, updateGoal: h, updateRetirementGoal: r } = G(), [d, l] = A.useState(t.amount), p = !t.guid, b = d < 0 || d > 9999999999e-2, o = t.track_type === s.SAVINGS_TRACK && t.has_been_spent || t.track_type !== s.SAVINGS_TRACK && t.is_complete, a = async () => {
584
- const _ = { ...t, amount: d };
585
- t.amount = d, p ? m(_) : (t.track_type !== s.RETIREMENT_TRACK ? await h(_) : await r(_), c(n.alert_goal_updated_amount));
487
+ }, vt = D(({ goal: t }) => {
488
+ const { goals: n } = S(), { setAlert: m, setSelectedGoal: c, updateGoal: p, updateRetirementGoal: r } = G(), [d, s] = T.useState(t.amount), _ = !t.guid, b = d < 0 || d > 9999999999e-2, o = t.track_type === i.SAVINGS_TRACK && t.has_been_spent || t.track_type !== i.SAVINGS_TRACK && t.is_complete, a = async () => {
489
+ const h = { ...t, amount: d };
490
+ t.amount = d, _ ? c(h) : (t.track_type !== i.RETIREMENT_TRACK ? await p(h) : await r(h), m(n.alert_goal_updated_amount));
586
491
  }, u = () => {
587
492
  setTimeout(() => {
588
- l(t.amount);
493
+ s(t.amount);
589
494
  }, 250);
590
495
  };
591
496
  return /* @__PURE__ */ e(
592
- J,
497
+ q,
593
498
  {
594
499
  isDisabled: o,
595
500
  isSaveDisabled: b,
@@ -597,50 +502,50 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
597
502
  onCancel: u,
598
503
  onSave: a,
599
504
  primaryText: n.details_amount_to_save,
600
- secondaryText: v(t.amount, "0,0"),
601
- zeroStateText: p && t.amount === 0 ? n.add_amount : void 0,
505
+ secondaryText: I(t.amount, "0,0"),
506
+ zeroStateText: _ && t.amount === 0 ? n.add_amount : void 0,
602
507
  children: /* @__PURE__ */ e(
603
- we,
508
+ ke,
604
509
  {
605
510
  amount: d,
606
511
  autoFocus: !0,
607
512
  error: b,
608
513
  fullWidth: !0,
609
514
  minAmount: 0,
610
- setAmount: (_) => l(isNaN(Number(_)) ? d : Number(_)),
515
+ setAmount: (h) => s(isNaN(Number(h)) ? d : Number(h)),
611
516
  sx: { ".MuiTypography-Body": { p: 0 } }
612
517
  }
613
518
  )
614
519
  }
615
520
  );
616
- }), Nt = ({ goal: t }) => {
617
- const { visibleCheckingAccounts: n, visibleSavingsAccounts: c } = j(), { accounts: m, goals: h } = R(), { setAlert: r, setSelectedGoal: d, updateGoal: l } = G(), p = !t.guid, [b, o] = A.useState(!1), a = async ({ balance: u, guid: _ }) => {
618
- const y = { ...t, account_guid: _, current_amount: u || 0 };
619
- p ? d(y) : (await l(y), r(h.alert_account_changed)), o(!1);
521
+ }), It = ({ goal: t }) => {
522
+ const { visibleCheckingAccounts: n, visibleSavingsAccounts: m } = z(), { accounts: c, goals: p } = S(), { setAlert: r, setSelectedGoal: d, updateGoal: s } = G(), _ = !t.guid, [b, o] = T.useState(!1), a = async ({ balance: u, guid: h }) => {
523
+ const f = { ...t, account_guid: h, current_amount: u || 0 };
524
+ _ ? d(f) : (await s(f), r(p.alert_account_changed)), o(!1);
620
525
  };
621
- return /* @__PURE__ */ i(g, { children: [
622
- p && !t.account_guid ? /* @__PURE__ */ e(w, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(K, { onClick: () => o(!0), children: [
623
- /* @__PURE__ */ e(k, { children: /* @__PURE__ */ i(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
526
+ return /* @__PURE__ */ l(g, { children: [
527
+ _ && !t.account_guid ? /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ l(M, { onClick: () => o(!0), children: [
528
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ l(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
624
529
  /* @__PURE__ */ e(ve, { filled: !0 }),
625
- h.details_add_account
530
+ p.details_add_account
626
531
  ] }) }),
627
- /* @__PURE__ */ e(O, { color: "primary" })
628
- ] }) }) : /* @__PURE__ */ i(g, { sx: { gap: 8, my: 24, mx: 24 }, children: [
629
- /* @__PURE__ */ e(pe, { onClick: () => o(!0), variant: "text", children: h.details_change_account }),
532
+ /* @__PURE__ */ e(V, { color: "primary" })
533
+ ] }) }) : /* @__PURE__ */ l(g, { sx: { gap: 8, my: 24, mx: 24 }, children: [
534
+ /* @__PURE__ */ e(ue, { onClick: () => o(!0), variant: "text", children: p.details_change_account }),
630
535
  /* @__PURE__ */ e(
631
- T,
536
+ C,
632
537
  {
633
538
  color: "text.secondary",
634
539
  sx: { textAlign: "center", whiteSpace: "wrap" },
635
540
  variant: "Paragraph",
636
- children: M(h.details_change_account_description, t.name)
541
+ children: O(p.details_change_account_description, t.name)
637
542
  }
638
543
  )
639
544
  ] }),
640
- /* @__PURE__ */ e(X, { isOpen: b, onClose: () => o(!1), title: h.details_change_account, children: /* @__PURE__ */ i(g, { children: [
641
- n.length > 0 && /* @__PURE__ */ e(T, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: m.account_types[1] }),
642
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((u) => /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(K, { onClick: () => a(u), children: [
643
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
545
+ /* @__PURE__ */ e(J, { isOpen: b, onClose: () => o(!1), title: p.details_change_account, children: /* @__PURE__ */ l(g, { children: [
546
+ n.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[1] }),
547
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((u) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(M, { onClick: () => a(u), children: [
548
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
644
549
  te,
645
550
  {
646
551
  alt: u?.name || "",
@@ -648,17 +553,17 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
648
553
  }
649
554
  ) }),
650
555
  /* @__PURE__ */ e(
651
- k,
556
+ w,
652
557
  {
653
558
  primary: u?.name || u?.feed_name,
654
- secondary: v(u?.balance || 0, "0,0.00")
559
+ secondary: I(u?.balance || 0, "0,0.00")
655
560
  }
656
561
  ),
657
- /* @__PURE__ */ e(O, {})
562
+ /* @__PURE__ */ e(V, {})
658
563
  ] }) }, u.guid)) }),
659
- c.length > 0 && /* @__PURE__ */ e(T, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: m.account_types[2] }),
660
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: c.map((u) => /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(K, { onClick: () => a(u), children: [
661
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
564
+ m.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[2] }),
565
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: m.map((u) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(M, { onClick: () => a(u), children: [
566
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
662
567
  te,
663
568
  {
664
569
  alt: u?.name || "",
@@ -666,37 +571,37 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
666
571
  }
667
572
  ) }),
668
573
  /* @__PURE__ */ e(
669
- k,
574
+ w,
670
575
  {
671
576
  primary: u?.name || u?.feed_name,
672
- secondary: v(u?.balance || 0, "0,0.00")
577
+ secondary: I(u?.balance || 0, "0,0.00")
673
578
  }
674
579
  ),
675
- /* @__PURE__ */ e(O, {})
580
+ /* @__PURE__ */ e(V, {})
676
581
  ] }) }, u.guid)) }),
677
582
  /* @__PURE__ */ e(
678
583
  Ae,
679
584
  {
680
- description: h.connect_description,
681
- label: h.connect_button,
682
- title: h.connect_title
585
+ description: p.connect_description,
586
+ label: p.connect_button,
587
+ title: p.connect_title
683
588
  }
684
589
  )
685
590
  ] }) })
686
591
  ] });
687
- }, wt = D(({ goal: t }) => {
688
- const { goals: n } = R(), { setAlert: c, setSelectedGoal: m, updateGoal: h } = G(), [r, d] = A.useState(t.name), l = !t.guid, p = t.track_type === s.SAVINGS_TRACK && t.has_been_spent || t.track_type !== s.SAVINGS_TRACK && t.is_complete, b = async () => {
592
+ }, Gt = D(({ goal: t }) => {
593
+ const { goals: n } = S(), { setAlert: m, setSelectedGoal: c, updateGoal: p } = G(), [r, d] = T.useState(t.name), s = !t.guid, _ = t.track_type === i.SAVINGS_TRACK && t.has_been_spent || t.track_type !== i.SAVINGS_TRACK && t.is_complete, b = async () => {
689
594
  const a = { ...t, name: r };
690
- t.name = r, l ? m(a) : (await h(a), c(n.alert_goal_updated_name));
595
+ t.name = r, s ? c(a) : (await p(a), m(n.alert_goal_updated_name));
691
596
  }, o = () => {
692
597
  setTimeout(() => {
693
598
  d(t.name);
694
599
  }, 250);
695
600
  };
696
601
  return /* @__PURE__ */ e(
697
- J,
602
+ q,
698
603
  {
699
- isDisabled: p,
604
+ isDisabled: _,
700
605
  isSaveDisabled: !r,
701
606
  label: n.details_goal_name,
702
607
  onCancel: o,
@@ -715,11 +620,11 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
715
620
  )
716
621
  }
717
622
  );
718
- }), kt = ({ goal: t }) => {
719
- const { goals: n } = R(), { setAlert: c, setSelectedGoal: m, updateRetirementGoal: h } = G(), [r, d] = A.useState(t.retirement_age || 65), l = !t.guid, p = async () => {
623
+ }), Nt = ({ goal: t }) => {
624
+ const { goals: n } = S(), { setAlert: m, setSelectedGoal: c, updateRetirementGoal: p } = G(), [r, d] = T.useState(t.retirement_age || 65), s = !t.guid, _ = async () => {
720
625
  if (!isNaN(r)) {
721
626
  const a = { ...t, retirement_age: r };
722
- t.retirement_age = r, l ? m(a) : (await h(a), c(n.alert_goal_updated_retirement_age));
627
+ t.retirement_age = r, s ? c(a) : (await p(a), m(n.alert_goal_updated_retirement_age));
723
628
  }
724
629
  }, b = () => {
725
630
  setTimeout(() => {
@@ -727,16 +632,16 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
727
632
  }, 250);
728
633
  }, o = !r || isNaN(r) || r < 20 || r >= 100;
729
634
  return /* @__PURE__ */ e(
730
- J,
635
+ q,
731
636
  {
732
637
  isDisabled: t.is_complete,
733
638
  isSaveDisabled: o,
734
639
  label: n.details_retirement_age,
735
640
  onCancel: b,
736
- onSave: p,
641
+ onSave: _,
737
642
  primaryText: n.details_retirement_age,
738
643
  secondaryText: `${t.retirement_age}`,
739
- zeroStateText: l && !t.retirement_age ? n.add_age : void 0,
644
+ zeroStateText: s && !t.retirement_age ? n.add_age : void 0,
740
645
  children: /* @__PURE__ */ e(
741
646
  De,
742
647
  {
@@ -749,302 +654,302 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
749
654
  )
750
655
  }
751
656
  );
752
- }, Dt = D(({ goal: t }) => {
753
- const { goals: n } = R(), { user: c, updateUser: m } = Ie(), { setAlert: h } = G(), [r, d] = A.useState(q(c.birthday ?? 0)), [l, p] = A.useState(null), b = t.is_complete, o = async () => {
754
- r && dt(r) && (await m({ ...c, birthday: ct(r) }), h(n.alert_goal_updated_birthday));
657
+ }, kt = D(({ goal: t }) => {
658
+ const { goals: n } = S(), { user: m, updateUser: c } = Ge(), { setAlert: p } = G(), [r, d] = T.useState(ne(m.birthday ?? 0)), [s, _] = T.useState(null), b = t.is_complete, o = async () => {
659
+ r && ct(r) && (await c({ ...m, birthday: lt(r) }), p(n.alert_goal_updated_birthday));
755
660
  };
756
661
  return /* @__PURE__ */ e(
757
- J,
662
+ q,
758
663
  {
759
664
  isDisabled: b,
760
- isSaveDisabled: !!l,
665
+ isSaveDisabled: !!s,
761
666
  label: n.details_birthday,
762
667
  onSave: o,
763
668
  primaryText: n.details_birthday,
764
- secondaryText: `${ae(q(c.birthday ?? 0), oe.MONTH_DAY_YEAR)}`,
765
- zeroStateText: !t.guid && !c.birthday ? n.add_birthday : void 0,
766
- children: /* @__PURE__ */ e(ut, { dateAdapter: mt, children: /* @__PURE__ */ e(
767
- _t,
669
+ secondaryText: `${he(ne(m.birthday ?? 0), be.MONTH_DAY_YEAR)}`,
670
+ zeroStateText: !t.guid && !m.birthday ? n.add_birthday : void 0,
671
+ children: /* @__PURE__ */ e(ut, { dateAdapter: dt, children: /* @__PURE__ */ e(
672
+ mt,
768
673
  {
769
674
  label: n.details_birthday,
770
675
  onChange: d,
771
- onError: (a) => p(a),
676
+ onError: (a) => _(a),
772
677
  sx: { width: "100%" },
773
678
  value: r
774
679
  }
775
680
  ) })
776
681
  }
777
682
  );
778
- }), Kt = ({ goal: t }) => {
779
- const { goals: n } = R(), { visibleRetirementAccounts: c } = j(), {
780
- addRetirementGoalAccount: m,
781
- newRetirementGoalAccounts: h,
683
+ }), wt = ({ goal: t }) => {
684
+ const { goals: n } = S(), { visibleRetirementAccounts: m } = z(), {
685
+ addRetirementGoalAccount: c,
686
+ newRetirementGoalAccounts: p,
782
687
  retirementGoalAccounts: r,
783
688
  selectedGoal: d,
784
- setAlert: l,
785
- setNewRetirementGoalAccounts: p,
689
+ setAlert: s,
690
+ setNewRetirementGoalAccounts: _,
786
691
  setSelectedGoal: b
787
- } = G(), [o, a] = A.useState(!1), u = !t.guid, _ = c.filter(
788
- (S) => u ? h.find((C) => C.account_guid === S.guid) : r.find((C) => C.account_guid === S.guid)
789
- ), y = c.filter(
790
- (S) => !r.find((C) => C.account_guid === S.guid)
791
- ), f = async (S) => {
792
- const C = S.map((I) => ({
793
- account_guid: I.guid,
692
+ } = G(), [o, a] = T.useState(!1), u = !t.guid, h = m.filter(
693
+ (y) => u ? p.find((A) => A.account_guid === y.guid) : r.find((A) => A.account_guid === y.guid)
694
+ ), f = m.filter(
695
+ (y) => !r.find((A) => A.account_guid === y.guid)
696
+ ), v = async (y) => {
697
+ const A = y.map((R) => ({
698
+ account_guid: R.guid,
794
699
  retirement_goal_guid: t.guid
795
700
  }));
796
701
  if (u)
797
- p(C);
702
+ _(A);
798
703
  else
799
- for (const I of C)
800
- await m(I), l(n.alert_account_added);
704
+ for (const R of A)
705
+ await c(R), s(n.alert_account_added);
801
706
  b({
802
707
  ...d,
803
- current_amount: S.reduce((I, N) => I + (N.balance || 0), 0)
708
+ current_amount: y.reduce((R, N) => R + (N.balance || 0), 0)
804
709
  }), a(!1);
805
710
  };
806
- return /* @__PURE__ */ i(g, { children: [
807
- _.map((S) => /* @__PURE__ */ i(g, { children: [
808
- /* @__PURE__ */ e(Oe, { account: S }),
809
- /* @__PURE__ */ e(E, {})
810
- ] }, S.guid)),
811
- /* @__PURE__ */ e(w, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(K, { onClick: () => a(!0), children: [
812
- /* @__PURE__ */ e(k, { children: /* @__PURE__ */ i(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
711
+ return /* @__PURE__ */ l(g, { children: [
712
+ h.map((y) => /* @__PURE__ */ l(g, { children: [
713
+ /* @__PURE__ */ e(Oe, { account: y }),
714
+ /* @__PURE__ */ e(x, {})
715
+ ] }, y.guid)),
716
+ /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ l(M, { onClick: () => a(!0), children: [
717
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ l(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
813
718
  /* @__PURE__ */ e(ve, { filled: !0 }),
814
719
  n.details_add_account
815
720
  ] }) }),
816
- /* @__PURE__ */ e(O, { color: "primary" })
721
+ /* @__PURE__ */ e(V, { color: "primary" })
817
722
  ] }) }),
818
723
  /* @__PURE__ */ e(
819
724
  Be,
820
725
  {
821
- accounts: y,
726
+ accounts: f,
822
727
  isOpen: o,
823
728
  onClose: () => a(!1),
824
- onSave: f,
729
+ onSave: v,
825
730
  title: n.add_select_accounts
826
731
  }
827
732
  )
828
733
  ] });
829
- }, Mt = D(({ goal: t }) => {
830
- const { goals: n } = R(), { visibleAccounts: c } = j(), m = A.useMemo(
831
- () => c.find((d) => d.guid === t.account_guid),
832
- [c, t]
833
- ), h = t.track_type;
734
+ }, Dt = D(({ goal: t }) => {
735
+ const { goals: n } = S(), { visibleAccounts: m } = z(), c = T.useMemo(
736
+ () => m.find((d) => d.guid === t.account_guid),
737
+ [m, t]
738
+ ), p = t.track_type;
834
739
  let r = n.details_save_title;
835
- return t.track_type === s.DEBT_TRACK ? r = n.details_debt_title : t.track_type === s.RETIREMENT_TRACK && (r = n.details_retirement_title), /* @__PURE__ */ i(g, { children: [
836
- /* @__PURE__ */ i(g, { mx: 24, children: [
837
- /* @__PURE__ */ e(T, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: r }),
740
+ return t.track_type === i.DEBT_TRACK ? r = n.details_debt_title : t.track_type === i.RETIREMENT_TRACK && (r = n.details_retirement_title), /* @__PURE__ */ l(g, { children: [
741
+ /* @__PURE__ */ l(g, { mx: 24, children: [
742
+ /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: r }),
838
743
  /* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
839
- /* @__PURE__ */ e(T, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: n.details_title })
744
+ /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: n.details_title })
840
745
  ] }),
841
- /* @__PURE__ */ i(L, { sx: { bgcolor: "background.paper" }, children: [
842
- h !== s.RETIREMENT_TRACK ? /* @__PURE__ */ e(wt, { goal: t }) : /* @__PURE__ */ e(w, { sx: { px: 24 }, children: /* @__PURE__ */ e(
843
- k,
746
+ /* @__PURE__ */ l(L, { sx: { bgcolor: "background.paper" }, children: [
747
+ p !== i.RETIREMENT_TRACK ? /* @__PURE__ */ e(Gt, { goal: t }) : /* @__PURE__ */ e(k, { sx: { px: 24 }, children: /* @__PURE__ */ e(
748
+ w,
844
749
  {
845
- primary: /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
846
- /* @__PURE__ */ e(T, { variant: "body1", children: n.details_goal_name }),
847
- /* @__PURE__ */ e(T, { bold: !0, color: "text.primary", sx: { mr: 4 }, variant: "body1", children: n.retirement })
750
+ primary: /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
751
+ /* @__PURE__ */ e(C, { variant: "body1", children: n.details_goal_name }),
752
+ /* @__PURE__ */ e(C, { bold: !0, color: "text.primary", sx: { mr: 4 }, variant: "body1", children: n.retirement })
848
753
  ] }),
849
754
  primaryTypographyProps: { variant: "body1" }
850
755
  }
851
756
  ) }),
852
- /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
853
- (h === s.SAVINGS_TRACK || h === s.RETIREMENT_TRACK) && /* @__PURE__ */ i(H, { children: [
854
- /* @__PURE__ */ e(It, { goal: t }),
855
- /* @__PURE__ */ e(E, { sx: { ml: h === s.RETIREMENT_TRACK ? 24 : 0 } })
757
+ /* @__PURE__ */ e(x, { sx: { ml: 24 } }),
758
+ (p === i.SAVINGS_TRACK || p === i.RETIREMENT_TRACK) && /* @__PURE__ */ l($, { children: [
759
+ /* @__PURE__ */ e(vt, { goal: t }),
760
+ /* @__PURE__ */ e(x, { sx: { ml: p === i.RETIREMENT_TRACK ? 24 : 0 } })
856
761
  ] }),
857
- t.track_type === s.DEBT_TRACK && /* @__PURE__ */ i(H, { children: [
762
+ t.track_type === i.DEBT_TRACK && /* @__PURE__ */ l($, { children: [
763
+ /* @__PURE__ */ e(rt, { goal: t }),
764
+ /* @__PURE__ */ e(x, { sx: { ml: 24 } }),
858
765
  /* @__PURE__ */ e(it, { goal: t }),
859
- /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
766
+ /* @__PURE__ */ e(x, { sx: { ml: 24 } }),
860
767
  /* @__PURE__ */ e(st, { goal: t }),
861
- /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
862
- /* @__PURE__ */ e(lt, { goal: t }),
863
- /* @__PURE__ */ e(E, { variant: "fullWidth" })
768
+ /* @__PURE__ */ e(x, { variant: "fullWidth" })
864
769
  ] }),
865
- t.track_type === s.RETIREMENT_TRACK && /* @__PURE__ */ i(H, { children: [
770
+ t.track_type === i.RETIREMENT_TRACK && /* @__PURE__ */ l($, { children: [
771
+ /* @__PURE__ */ e(Nt, { goal: t }),
772
+ /* @__PURE__ */ e(x, { sx: { ml: 24 } }),
866
773
  /* @__PURE__ */ e(kt, { goal: t }),
867
- /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
868
- /* @__PURE__ */ e(Dt, { goal: t }),
869
- /* @__PURE__ */ e(E, { variant: "fullWidth" })
774
+ /* @__PURE__ */ e(x, { variant: "fullWidth" })
870
775
  ] })
871
776
  ] }),
872
- /* @__PURE__ */ e(T, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === s.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
873
- t.track_type !== s.RETIREMENT_TRACK && m && /* @__PURE__ */ i(H, { children: [
874
- /* @__PURE__ */ e(Oe, { account: m }),
875
- /* @__PURE__ */ e(E, {})
777
+ /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === i.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
778
+ t.track_type !== i.RETIREMENT_TRACK && c && /* @__PURE__ */ l($, { children: [
779
+ /* @__PURE__ */ e(Oe, { account: c }),
780
+ /* @__PURE__ */ e(x, {})
876
781
  ] }),
877
- t.track_type === s.RETIREMENT_TRACK && /* @__PURE__ */ i(H, { children: [
878
- /* @__PURE__ */ e(Kt, { goal: t }),
879
- /* @__PURE__ */ e(E, {})
782
+ t.track_type === i.RETIREMENT_TRACK && /* @__PURE__ */ l($, { children: [
783
+ /* @__PURE__ */ e(wt, { goal: t }),
784
+ /* @__PURE__ */ e(x, {})
880
785
  ] }),
881
- t.track_type === s.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Nt, { goal: t })
786
+ t.track_type === i.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(It, { goal: t })
882
787
  ] });
883
- }), Lt = D(({ onClose: t }) => {
884
- const { visibleRetirementAccounts: n } = j(), { goals: c, common: m } = R(), {
885
- addGoal: h,
788
+ }), Kt = D(({ onClose: t }) => {
789
+ const { visibleRetirementAccounts: n } = z(), { goals: m, common: c } = S(), {
790
+ addGoal: p,
886
791
  addRetirementGoal: r,
887
792
  deleteGoal: d,
888
- deleteRetirementGoal: l,
889
- newRetirementGoalAccounts: p,
793
+ deleteRetirementGoal: s,
794
+ newRetirementGoalAccounts: _,
890
795
  retirementGoalAccounts: b,
891
796
  selectedGoal: o,
892
797
  setAlert: a,
893
798
  setSelectedGoal: u,
894
- updateGoal: _
895
- } = G(), { user: y } = Ie(), [f, S] = A.useState(!1), C = !o?.guid, I = o?.track_type === s.SAVINGS_TRACK && o.is_complete && !o.has_been_spent, N = A.useMemo(() => {
896
- const x = C ? p : b;
897
- return n.filter((F) => x.some((z) => z.account_guid === F.guid));
898
- }, [C, n, p, b]), re = A.useMemo(() => {
799
+ updateGoal: h
800
+ } = G(), { user: f } = Ge(), [v, y] = T.useState(!1), A = !o?.guid, R = o?.track_type === i.SAVINGS_TRACK && o.is_complete && !o.has_been_spent, N = T.useMemo(() => {
801
+ const E = A ? _ : b;
802
+ return n.filter((j) => E.some((F) => F.account_guid === j.guid));
803
+ }, [A, n, _, b]), K = T.useMemo(() => {
899
804
  if (!o) return !1;
900
- if (!C && !I) return !0;
901
- const { account_guid: x, track_type: F, name: z, amount: ee, retirement_age: B } = o;
902
- return F === s.SAVINGS_TRACK ? x ? !!z && !!ee : !1 : F === s.RETIREMENT_TRACK ? N.length ? !!z && !!ee && !!B && !!y.birthday : !1 : !0;
903
- }, [o, N, y.birthday]);
904
- let U = m.delete_button, Y = () => S(!0);
905
- C ? (Y = () => ie(), U = m.save_button) : I && (Y = () => Q(), U = c.mark_as_complete_button);
906
- const ie = async () => {
805
+ if (!A && !R) return !0;
806
+ const { account_guid: E, track_type: j, name: F, amount: ee, retirement_age: B } = o;
807
+ return j === i.SAVINGS_TRACK ? E ? !!F && !!ee : !1 : j === i.RETIREMENT_TRACK ? N.length ? !!F && !!ee && !!B && !!f.birthday : !1 : !0;
808
+ }, [o, N, f.birthday]);
809
+ let U = c.delete_button, Y = () => y(!0);
810
+ A ? (Y = () => oe(), U = c.save_button) : R && (Y = () => Q(), U = m.mark_as_complete_button);
811
+ const oe = async () => {
907
812
  if (o) {
908
- const x = o.track_type;
909
- x !== s.RETIREMENT_TRACK ? await h(o) : x === s.RETIREMENT_TRACK && await r({ ...o, target_amount: o.amount }), a(c.alert_goal_added), u(void 0), x && t?.(x);
813
+ const E = o.track_type;
814
+ E !== i.RETIREMENT_TRACK ? await p(o) : E === i.RETIREMENT_TRACK && await r({ ...o, target_amount: o.amount }), a(m.alert_goal_added), u(void 0), E && t?.(E);
910
815
  }
911
816
  }, W = async () => {
912
- o && (o.track_type !== s.RETIREMENT_TRACK ? await d(o.guid) : o.track_type === s.RETIREMENT_TRACK && await l(o), a(c.alert_goal_deleted), u(void 0));
817
+ o && (o.track_type !== i.RETIREMENT_TRACK ? await d(o.guid) : o.track_type === i.RETIREMENT_TRACK && await s(o), a(m.alert_goal_deleted), u(void 0));
913
818
  }, Q = async () => {
914
- const x = {
819
+ const E = {
915
820
  ...o,
916
821
  has_been_spent: !0
917
822
  };
918
- await _(x), a(c.alert_goal_completed), u(void 0);
823
+ await h(E), a(m.alert_goal_completed), u(void 0);
919
824
  };
920
- return /* @__PURE__ */ i(g, { children: [
825
+ return /* @__PURE__ */ l(g, { children: [
921
826
  /* @__PURE__ */ e(
922
- X,
827
+ J,
923
828
  {
924
- ariaLabelClose: m.close_aria,
925
- hasSecondaryAction: C,
829
+ ariaLabelClose: c.close_aria,
830
+ hasSecondaryAction: A,
926
831
  isOpen: !!o,
927
- isPrimaryDisabled: !re,
832
+ isPrimaryDisabled: !K,
928
833
  onClose: () => u(void 0),
929
834
  onPrimaryAction: Y,
930
- primaryColor: C || I ? "primary" : "error",
835
+ primaryColor: A || R ? "primary" : "error",
931
836
  primaryText: U,
932
837
  secondaryColor: "primary",
933
- title: c.goal_details,
934
- children: o && /* @__PURE__ */ e(Mt, { goal: o })
838
+ title: m.goal_details,
839
+ children: o && /* @__PURE__ */ e(Dt, { goal: o })
935
840
  }
936
841
  ),
937
842
  /* @__PURE__ */ e(
938
- tt,
843
+ et,
939
844
  {
940
- copy: { close_aria: m.close_aria, title: c.delete_goal },
941
- isOpen: f,
845
+ copy: { close_aria: c.close_aria, title: m.delete_goal },
846
+ isOpen: v,
942
847
  maxWidth: "xs",
943
- onClose: () => S(!1),
848
+ onClose: () => y(!1),
944
849
  onPrimaryAction: W,
945
850
  primaryColor: "error",
946
- primaryText: m.delete_button,
947
- children: /* @__PURE__ */ e(T, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: M(c.delete_description, o?.name || "") })
851
+ primaryText: c.delete_button,
852
+ children: /* @__PURE__ */ e(C, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: O(m.delete_description, o?.name || "") })
948
853
  }
949
854
  )
950
855
  ] });
951
- }), zn = D(({ onBackClick: t, sx: n }) => {
952
- const { onEvent: c } = Ne(), { isMobile: m } = be(), { isAccountDataLoaded: h, loadAccountData: r } = j(), { isInitialized: d } = he(), { goals: l, common: p } = R(), {
856
+ }), Pn = D(({ onBackClick: t, sx: n }) => {
857
+ const { onEvent: m } = Ne(), { isMobile: c } = pe(), { isAccountDataLoaded: p, loadAccountData: r } = z(), { isInitialized: d } = _e(), { goals: s, common: _ } = S(), {
953
858
  alert: b,
954
859
  goals: o,
955
860
  isAllGoalDataLoaded: a,
956
861
  loadGoalData: u,
957
- monthlyCashFlowProfile: _,
958
- setAlert: y,
959
- retirmentGoals: f
960
- } = G(), [S, C] = A.useState(0), [I, N] = A.useState(!1), re = _?.amount_allocated_for_savings_goals || 0, U = _?.amount_allocated_for_debt_goals || 0, Y = _?.amount_allocated_for_retirement_goals || 0;
862
+ monthlyCashFlowProfile: h,
863
+ setAlert: f,
864
+ retirmentGoals: v
865
+ } = G(), [y, A] = T.useState(0), [R, N] = T.useState(!1), K = h?.amount_allocated_for_savings_goals || 0, U = h?.amount_allocated_for_debt_goals || 0, Y = h?.amount_allocated_for_retirement_goals || 0;
961
866
  Ke({
962
867
  widgetName: "GoalsWidget",
963
868
  isLoaded: a
964
- }), A.useEffect(() => {
965
- h || r().finally(), c($.GOALS_VIEW);
966
- }, []), A.useEffect(() => {
869
+ }), T.useEffect(() => {
870
+ p || r().finally(), m(X.GOALS_VIEW);
871
+ }, []), T.useEffect(() => {
967
872
  d && u().finally();
968
873
  }, [d]);
969
- const ie = () => {
970
- c($.GOALS_CLICK_FILTER);
874
+ const oe = () => {
875
+ m(X.GOALS_CLICK_FILTER);
971
876
  }, W = () => {
972
- N(!0), c($.GOALS_CLICK_ADD);
877
+ N(!0), m(X.GOALS_CLICK_ADD);
973
878
  }, Q = (B) => {
974
- N(!1), B === s.SAVINGS_TRACK ? C(0) : B === s.DEBT_TRACK ? C(1) : B === s.RETIREMENT_TRACK && C(2);
975
- }, x = A.useMemo(
976
- () => a && (o.length === 0 || o.every(({ track_type: B }) => !B) && f.length === 0),
977
- [o, a, f]
879
+ N(!1), B === i.SAVINGS_TRACK ? A(0) : B === i.DEBT_TRACK ? A(1) : B === i.RETIREMENT_TRACK && A(2);
880
+ }, E = T.useMemo(
881
+ () => a && (o.length === 0 || o.every(({ track_type: B }) => !B) && v.length === 0),
882
+ [o, a, v]
978
883
  );
979
884
  if (!d || !a)
980
885
  return /* @__PURE__ */ e(Me, {});
981
- const F = M(
982
- m ? l.tab_subtitle_mobile : l.tab_subtitle,
983
- v(re, "0,0")
984
- ), z = M(
985
- m ? l.tab_subtitle_mobile : l.tab_subtitle,
986
- v(U, "0,0")
987
- ), ee = M(
988
- m ? l.tab_subtitle_mobile : l.tab_subtitle,
989
- v(Y, "0,0")
886
+ const j = O(
887
+ c ? s.tab_subtitle_mobile : s.tab_subtitle,
888
+ I(K, "0,0")
889
+ ), F = O(
890
+ c ? s.tab_subtitle_mobile : s.tab_subtitle,
891
+ I(U, "0,0")
892
+ ), ee = O(
893
+ c ? s.tab_subtitle_mobile : s.tab_subtitle,
894
+ I(Y, "0,0")
990
895
  );
991
- return /* @__PURE__ */ i(
992
- pt,
896
+ return /* @__PURE__ */ l(
897
+ _t,
993
898
  {
994
899
  actions: [
995
900
  {
996
901
  iconName: "add",
997
- label: l.add_title,
902
+ label: s.add_title,
998
903
  onClick: W
999
904
  }
1000
905
  ],
1001
- onAccountsFilterClick: ie,
906
+ onAccountsFilterClick: oe,
1002
907
  onBackClick: t,
1003
908
  sx: n,
1004
- title: l.title,
909
+ title: s.title,
1005
910
  children: [
1006
- /* @__PURE__ */ i(g, { mx: m ? 0 : 48, my: 24, children: [
1007
- /* @__PURE__ */ i(
1008
- ze,
911
+ /* @__PURE__ */ l(g, { mx: c ? 0 : 48, my: 24, children: [
912
+ /* @__PURE__ */ l(
913
+ Fe,
1009
914
  {
1010
- onChange: (B, We) => C(We),
915
+ onChange: (B, We) => A(We),
1011
916
  sx: { bgcolor: "background.paper" },
1012
917
  textColor: "primary",
1013
- value: x ? !1 : S,
918
+ value: E ? !1 : y,
1014
919
  variant: "fullWidth",
1015
920
  children: [
1016
921
  /* @__PURE__ */ e(
1017
- se,
922
+ re,
1018
923
  {
1019
- disabled: x,
1020
- label: /* @__PURE__ */ e(le, { subtitle: F, title: l.tab_saving_title })
924
+ disabled: E,
925
+ label: /* @__PURE__ */ e(ie, { subtitle: j, title: s.tab_saving_title })
1021
926
  }
1022
927
  ),
1023
928
  /* @__PURE__ */ e(
1024
- se,
929
+ re,
1025
930
  {
1026
- disabled: x,
1027
- label: /* @__PURE__ */ e(le, { subtitle: z, title: l.tab_debt_title })
931
+ disabled: E,
932
+ label: /* @__PURE__ */ e(ie, { subtitle: F, title: s.tab_debt_title })
1028
933
  }
1029
934
  ),
1030
935
  /* @__PURE__ */ e(
1031
- se,
936
+ re,
1032
937
  {
1033
- disabled: x,
1034
- label: /* @__PURE__ */ e(le, { subtitle: ee, title: l.tab_retirement_title })
938
+ disabled: E,
939
+ label: /* @__PURE__ */ e(ie, { subtitle: ee, title: s.tab_retirement_title })
1035
940
  }
1036
941
  )
1037
942
  ]
1038
943
  }
1039
944
  ),
1040
- x ? /* @__PURE__ */ e(
1041
- ht,
945
+ E ? /* @__PURE__ */ e(
946
+ pt,
1042
947
  {
1043
- header: l.create_goals_header,
948
+ header: s.create_goals_header,
1044
949
  icon: "trophy",
1045
950
  onClick: W,
1046
- primaryButton: l.add_goals_button,
1047
- subText: l.empty_state_subheader,
951
+ primaryButton: s.add_goals_button,
952
+ subText: s.empty_state_subheader,
1048
953
  sx: {
1049
954
  width: { sm: 432 },
1050
955
  ".buttons-footer": {
@@ -1052,67 +957,67 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
1052
957
  }
1053
958
  }
1054
959
  }
1055
- ) : /* @__PURE__ */ i(H, { children: [
1056
- S === 0 && /* @__PURE__ */ e(ce, { onAddGoals: W, trackType: s.SAVINGS_TRACK }),
1057
- S === 1 && /* @__PURE__ */ e(ce, { onAddGoals: W, trackType: s.DEBT_TRACK }),
1058
- S === 2 && /* @__PURE__ */ e(ce, { onAddGoals: W, trackType: s.RETIREMENT_TRACK })
960
+ ) : /* @__PURE__ */ l($, { children: [
961
+ y === 0 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: i.SAVINGS_TRACK }),
962
+ y === 1 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: i.DEBT_TRACK }),
963
+ y === 2 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: i.RETIREMENT_TRACK })
1059
964
  ] })
1060
965
  ] }),
1061
- /* @__PURE__ */ e(Lt, { onClose: Q }),
966
+ /* @__PURE__ */ e(Kt, { onClose: Q }),
1062
967
  /* @__PURE__ */ e(
1063
- X,
968
+ J,
1064
969
  {
1065
- ariaLabelClose: p.close_aria,
1066
- isOpen: I,
970
+ ariaLabelClose: _.close_aria,
971
+ isOpen: R,
1067
972
  onClose: () => N(!1),
1068
- title: l.add_goal_title,
1069
- children: /* @__PURE__ */ e(Gt, { onClose: Q })
973
+ title: s.add_goal_title,
974
+ children: /* @__PURE__ */ e(xt, { onClose: Q })
1070
975
  }
1071
976
  ),
1072
- /* @__PURE__ */ e(Fe, { onClose: () => y(""), open: !!b, children: /* @__PURE__ */ e(je, { onClose: () => y(""), severity: "success", variant: "filled", children: b }) })
977
+ /* @__PURE__ */ e(je, { onClose: () => f(""), open: !!b, children: /* @__PURE__ */ e(ze, { onClose: () => f(""), severity: "success", variant: "filled", children: b }) })
1073
978
  ]
1074
979
  }
1075
980
  );
1076
- }), Bt = D(({ goal: t }) => {
1077
- const { goals: n } = R(), c = yt(), {
1078
- backgroundColor: m,
1079
- color: h,
981
+ }), Mt = D(({ goal: t }) => {
982
+ const { goals: n } = S(), m = yt(), {
983
+ backgroundColor: c,
984
+ color: p,
1080
985
  percentage: r,
1081
986
  projectedText: d
1082
- } = _e(n, t), l = Math.round(r * 100);
1083
- let p = /* @__PURE__ */ e(Re, {});
1084
- return t.track_type === s.DEBT_TRACK ? p = /* @__PURE__ */ e(Ee, {}) : t.track_type === s.RETIREMENT_TRACK && (p = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1085
- /* @__PURE__ */ e(ne, { sx: { bgcolor: m, color: h, height: 32, width: 32 }, variant: "rounded", children: p }),
1086
- /* @__PURE__ */ i(gt, { sx: { width: "100%" }, children: [
1087
- /* @__PURE__ */ e(ue, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1088
- t.projected_to_complete_at && /* @__PURE__ */ e(T, { color: "text.secondary", variant: "XSmall", children: d })
987
+ } = de(n, t), s = Math.round(r * 100);
988
+ let _ = /* @__PURE__ */ e(Re, {});
989
+ return t.track_type === i.DEBT_TRACK ? _ = /* @__PURE__ */ e(Ee, {}) : t.track_type === i.RETIREMENT_TRACK && (_ = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
990
+ /* @__PURE__ */ e(ae, { sx: { bgcolor: c, color: p, height: 32, width: 32 }, variant: "rounded", children: _ }),
991
+ /* @__PURE__ */ l(bt, { sx: { width: "100%" }, children: [
992
+ /* @__PURE__ */ e(me, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
993
+ t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: d })
1089
994
  ] }),
1090
995
  /* @__PURE__ */ e(
1091
- ft,
996
+ gt,
1092
997
  {
1093
- backgroundStrokeColor: c.palette.border.lighter,
1094
- color: c.palette.primary.main,
1095
- percent: l,
998
+ backgroundStrokeColor: m.palette.border.lighter,
999
+ color: m.palette.primary.main,
1000
+ percent: s,
1096
1001
  size: 40,
1097
1002
  strokeWidth: 3,
1098
- children: /* @__PURE__ */ e(P, { fontWeight: 700, variant: "caption", children: `${l}%` })
1003
+ children: /* @__PURE__ */ e(H, { fontWeight: 700, variant: "caption", children: `${s}%` })
1099
1004
  }
1100
1005
  )
1101
1006
  ] });
1102
- }), Ot = ({ header: t, subText: n, sx: c }) => /* @__PURE__ */ i(
1007
+ }), Lt = ({ header: t, subText: n, sx: m }) => /* @__PURE__ */ l(
1103
1008
  g,
1104
1009
  {
1105
1010
  sx: {
1106
1011
  alignItems: "center",
1107
1012
  alignSelf: "center",
1108
1013
  px: 24,
1109
- ...c
1014
+ ...m
1110
1015
  },
1111
1016
  children: [
1112
1017
  /* @__PURE__ */ e(qe, { size: 32 }),
1113
- /* @__PURE__ */ e(ue, { fontSize: 15, fontWeight: 600, children: t }),
1018
+ /* @__PURE__ */ e(me, { fontSize: 15, fontWeight: 600, children: t }),
1114
1019
  /* @__PURE__ */ e(
1115
- P,
1020
+ H,
1116
1021
  {
1117
1022
  color: "text.secondary",
1118
1023
  sx: { fontWeight: 400, maxWidth: { sm: 424 }, textAlign: "center" },
@@ -1122,49 +1027,49 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
1122
1027
  )
1123
1028
  ]
1124
1029
  }
1125
- ), Hn = D(({ onCTAClick: t }) => {
1126
- const { isAccountDataLoaded: n, loadAccountData: c, visibleAccounts: m } = j(), { onEvent: h } = Ne(), { goals: r } = R(), { isInitialized: d } = he(), { ongoingGoalsForMicroWidget: l, isAllGoalDataLoaded: p, loadGoalData: b } = G();
1030
+ ), zn = D(({ onCTAClick: t }) => {
1031
+ const { isAccountDataLoaded: n, loadAccountData: m, visibleAccounts: c } = z(), { onEvent: p } = Ne(), { goals: r } = S(), { isInitialized: d } = _e(), { ongoingGoalsForMicroWidget: s, isAllGoalDataLoaded: _, loadGoalData: b } = G();
1127
1032
  Ke({
1128
1033
  widgetName: "GoalsMicroWidget",
1129
- isLoaded: p
1130
- }), A.useEffect(() => {
1131
- n || c().finally();
1132
- }, []), A.useEffect(() => {
1133
- d && (b().finally(), h($.GOALS_LOAD_WIDGET, {
1134
- state: m?.length ? "default" : "zeroState"
1034
+ isLoaded: _
1035
+ }), T.useEffect(() => {
1036
+ n || m().finally();
1037
+ }, []), T.useEffect(() => {
1038
+ d && (b().finally(), p(X.GOALS_LOAD_WIDGET, {
1039
+ state: c?.length ? "default" : "zeroState"
1135
1040
  }));
1136
1041
  }, [d]);
1137
- const o = A.useMemo(
1138
- () => p && l.length === 0,
1139
- [l, p]
1042
+ const o = T.useMemo(
1043
+ () => _ && s.length === 0,
1044
+ [s, _]
1140
1045
  ), a = () => {
1141
- h(
1142
- o ? $.GOALS_CLICK_GET_STARTED : $.GOALS_CLICK_VIEW_DETAILS
1046
+ p(
1047
+ o ? X.GOALS_CLICK_GET_STARTED : X.GOALS_CLICK_VIEW_DETAILS
1143
1048
  ), t();
1144
1049
  };
1145
- return !d || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1146
- At,
1050
+ return !d || !_ ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1051
+ ft,
1147
1052
  {
1148
1053
  className: "mx-goals-microwidget",
1149
1054
  ctaLabel: o ? r.get_started : r.view_details,
1150
1055
  onCTAClick: a,
1151
1056
  title: r.title,
1152
1057
  children: o ? /* @__PURE__ */ e(
1153
- Ot,
1058
+ Lt,
1154
1059
  {
1155
1060
  header: r.create_goals_header,
1156
1061
  subText: r.micro_zero_state_description
1157
1062
  }
1158
- ) : /* @__PURE__ */ e(bt, { sx: { justifyContent: "space-between" }, children: l.map((u, _) => /* @__PURE__ */ i(A.Fragment, { children: [
1159
- /* @__PURE__ */ e(Bt, { goal: u }),
1160
- _ !== l.length - 1 && /* @__PURE__ */ e(E, {})
1063
+ ) : /* @__PURE__ */ e(ht, { sx: { justifyContent: "space-between" }, children: s.map((u, h) => /* @__PURE__ */ l(T.Fragment, { children: [
1064
+ /* @__PURE__ */ e(Mt, { goal: u }),
1065
+ h !== s.length - 1 && /* @__PURE__ */ e(x, {})
1161
1066
  ] }, u.guid)) })
1162
1067
  }
1163
1068
  );
1164
1069
  });
1165
1070
  export {
1166
- Un as GoalApi,
1167
- Yn as GoalStore,
1168
- Hn as GoalsMicroWidget,
1169
- zn as GoalsWidget
1071
+ $n as GoalApi,
1072
+ Xn as GoalStore,
1073
+ zn as GoalsMicroWidget,
1074
+ Pn as GoalsWidget
1170
1075
  };