@mx-cartographer/experiences 9.0.0-alpha.mega1 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (773) hide show
  1. package/CHANGELOG.md +676 -9
  2. package/README.md +216 -47
  3. package/dist/{Account-CMjOp7S2.mjs → Account-BaJmiJAG.mjs} +4 -4
  4. package/dist/{Account-BIKn4XEZ.mjs → Account-BxHMlV9R.mjs} +1 -1
  5. package/dist/AccountDetailsHeader-DIysk_4w.mjs +95 -0
  6. package/dist/AccountFields-mwJ8NXsX.mjs +141 -0
  7. package/dist/AccountListItem-BDXHs4tV.mjs +94 -0
  8. package/dist/AccountUtils-T5_Odvos.mjs +27 -0
  9. package/dist/Accounts-CseLC3lL.mjs +5 -0
  10. package/dist/Analytics-CkYXKvco.mjs +53 -0
  11. package/dist/Analytics-CzGzz_sE.mjs +136 -0
  12. package/dist/ApiEndpoints-DXwIYNUV.mjs +49 -0
  13. package/dist/BudgetUtil-Bg2AQJpQ.mjs +74 -0
  14. package/dist/{Category-Ccoew_sA.mjs → Category-DEKZGLYe.mjs} +3 -3
  15. package/dist/{CategorySelectorDrawer-C4aZYP4N.mjs → CategorySelectorDrawer-CmaDLhnf.mjs} +131 -119
  16. package/dist/Connect-Dk6GZEsA.mjs +39 -0
  17. package/dist/ConnectCard-CCep7Zqe.mjs +54 -0
  18. package/dist/ConnectDrawer-Cnjr3Ddg.mjs +58 -0
  19. package/dist/{ConnectionsDrawer-BExzgE16.mjs → ConnectionsDrawer-CtfPXk0M.mjs} +13 -12
  20. package/dist/CurrencyDialog-DumQCTPO.mjs +373 -0
  21. package/dist/CurrencyInput-adTIRtL3.mjs +87 -0
  22. package/dist/{CurrencyText-C-85TnUF.mjs → CurrencyText-CCbE6MmF.mjs} +1 -1
  23. package/dist/DateFormats-HudZ3Bjs.mjs +64 -0
  24. package/dist/DateUtil-Bhq59ZVg.mjs +58 -0
  25. package/dist/DebtUtils-DD3186U-.mjs +153 -0
  26. package/dist/Dialog-CwWc0AbH.mjs +63 -0
  27. package/dist/Donut-SzzfZDHF.mjs +88 -0
  28. package/dist/{Drawer-Bet2ZPJo.mjs → Drawer-BXqqBMxg.mjs} +32 -34
  29. package/dist/EmbeddedCard-DPwJjqMH.mjs +856 -0
  30. package/dist/{EmptyState-DoxNUae-.mjs → EmptyState-CJUDc3kD.mjs} +21 -22
  31. package/dist/Error-Dogaw2jO.mjs +84 -0
  32. package/dist/ErrorBoundary-CsdOcnJ9.mjs +23 -0
  33. package/dist/{ExportCsvAction-oG_Mn66T.mjs → ExportCsvAction-Bw02ZJEj.mjs} +6 -6
  34. package/dist/GlobalAccountFilter-7Cg2-9A5.mjs +237 -0
  35. package/dist/GlobalCopyApi-wcnDUzMV.mjs +128 -0
  36. package/dist/GoalsUtil-C9EnLWvC.mjs +107 -0
  37. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  38. package/dist/{Help-c-zHlDbv.mjs → Help-CkQTjORd.mjs} +6 -27
  39. package/dist/{Help-BW_ar-4B.mjs → Help-DJ8PrVHX.mjs} +594 -562
  40. package/dist/InformationTooltip-4su8bn1e.mjs +41 -0
  41. package/dist/{InvestmentUtil-jOyOgzIB.mjs → InvestmentUtil-BItV7uEs.mjs} +17 -17
  42. package/dist/LineChart-CejWS_rh.mjs +612 -0
  43. package/dist/{ListItemAction-Cbr3417C.mjs → ListItemAction-CwspSmQi.mjs} +26 -26
  44. package/dist/ListItemRow-kH1rn8Xu.mjs +67 -0
  45. package/dist/ListItemWrapper-B5r-YQQ_.mjs +42 -0
  46. package/dist/Loader-CxeBwuPG.mjs +21 -0
  47. package/dist/Localization-DnoVyBNK.mjs +38 -0
  48. package/dist/ManageIncome-B1JfqslT.mjs +595 -0
  49. package/dist/{MicroWidgetContainer-DSyYwRCU.mjs → MicroWidgetContainer-CfKdQfhi.mjs} +2 -2
  50. package/dist/MiniWidgetContainer-BdPiUU-u.mjs +66 -0
  51. package/dist/NetWorthUtils-DilGN1nW.mjs +95 -0
  52. package/dist/Notification-DTNYSd8P.mjs +7 -0
  53. package/dist/{NotificationSettings-e789PcRb.mjs → NotificationSettings-6p-h5phZ.mjs} +143 -142
  54. package/dist/NotificationUtils-BRGFTePr.mjs +23 -0
  55. package/dist/{NumberFormatting-DjTD0t3W.mjs → NumberFormatting--XMeeBfr.mjs} +2 -1
  56. package/dist/OriginalBalanceAction-CkJPnp2c.mjs +114 -0
  57. package/dist/{RecurringSettings-BpCUcE8w.mjs → RecurringSettings-cm6MK_aS.mjs} +4 -4
  58. package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +253 -0
  59. package/dist/{ResponsiveButton-C6KH8JH4.mjs → ResponsiveButton-CC9F_Ezk.mjs} +4 -4
  60. package/dist/SearchBox-Cpgu_gdO.mjs +50 -0
  61. package/dist/Select-BFt-HD-L.mjs +55 -0
  62. package/dist/SelectionBox-B4xELRgp.mjs +48 -0
  63. package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +1 -1
  64. package/dist/Sizes-DISGrlUg.mjs +6 -0
  65. package/dist/{SpendingData-B7NuTQ9s.mjs → SpendingData-PKlh8caU.mjs} +6 -6
  66. package/dist/SpendingLegend-5Ct_FZ8o.mjs +193 -0
  67. package/dist/ToggleListItem-Dl1lXNwj.mjs +91 -0
  68. package/dist/TransactionDetails-C3dlAzYf.mjs +1714 -0
  69. package/dist/TransactionUtils-BphBJBbU.mjs +234 -0
  70. package/dist/TrendsUtil-D9z3kIj_.mjs +69 -0
  71. package/dist/UserStore-CRpKQjpP.mjs +3002 -0
  72. package/dist/ViewMoreMicroCard-BD_MNc2z.mjs +1295 -0
  73. package/dist/WidgetContainer-DNuz_s7W.mjs +479 -0
  74. package/dist/accounts/AccountsMiniWidget.d.ts +1 -1
  75. package/dist/accounts/AccountsWidget.d.ts +1 -1
  76. package/dist/accounts/components/AccountListItem.d.ts +1 -1
  77. package/dist/accounts/components/AccountsListCompact.d.ts +1 -1
  78. package/dist/accounts/components/detailsdrawer/Accounts/AccountActionsRow.d.ts +1 -0
  79. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -1
  80. package/dist/accounts/hooks/useGetMergeableAccounts.d.ts +1 -1
  81. package/dist/accounts/hooks/useUiStore.d.ts +6 -1
  82. package/dist/accounts/index.d.ts +0 -2
  83. package/dist/accounts/index.es.js +628 -527
  84. package/dist/accounts/utils/AccountDetails.d.ts +1 -1
  85. package/dist/accounts/utils/AccountFields.d.ts +3 -3
  86. package/dist/analytics/index.es.js +93 -112
  87. package/dist/budgets/BubbleBudgetsMiniWidget.d.ts +1 -1
  88. package/dist/budgets/BubbleBudgetsWidget.d.ts +1 -1
  89. package/dist/budgets/components/BubbleChart.d.ts +1 -1
  90. package/dist/budgets/components/BudgetDetailsDrawerV2.d.ts +11 -0
  91. package/dist/budgets/components/MerchantBudgetDetailsDrawer.d.ts +17 -0
  92. package/dist/budgets/components/addbudget/RecalculateBudgetRow.d.ts +1 -1
  93. package/dist/budgets/components/addbudget/UnbudgetedRow.d.ts +1 -1
  94. package/dist/budgets/components/bubblechart/Bubble.d.ts +1 -1
  95. package/dist/budgets/components/budgetdetails/AddSubBudget.d.ts +1 -1
  96. package/dist/budgets/components/budgetdetails/BudgetDetails.d.ts +1 -1
  97. package/dist/budgets/components/budgetdetails/Header.d.ts +1 -1
  98. package/dist/budgets/components/budgetdetails/SubBudgetList.d.ts +1 -1
  99. package/dist/budgets/components/budgetlist/BudgetRow.d.ts +1 -1
  100. package/dist/budgets/components/budgetlist/SubBudgetRow.d.ts +1 -1
  101. package/dist/budgets/components/shared/BudgetDetailsTopSection.d.ts +13 -0
  102. package/dist/budgets/index.d.ts +2 -1
  103. package/dist/budgets/index.es.js +989 -813
  104. package/dist/budgets/utils/BubblesSVG.d.ts +3 -3
  105. package/dist/cashflow/CashflowMiniWidget.d.ts +1 -1
  106. package/dist/cashflow/CashflowWidget.d.ts +1 -1
  107. package/dist/cashflow/components/DetailsExpenseRow.d.ts +1 -1
  108. package/dist/cashflow/context/hooks.d.ts +15 -1
  109. package/dist/cashflow/index.d.ts +0 -2
  110. package/dist/cashflow/index.es.js +461 -490
  111. package/dist/cashflow/util/Filters.d.ts +1 -1
  112. package/dist/categories/components/CategoryRow.d.ts +1 -1
  113. package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -1
  114. package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -1
  115. package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -1
  116. package/dist/categories/components/SubcategoryList.d.ts +1 -1
  117. package/dist/categories/components/SubcategoryRow.d.ts +1 -1
  118. package/dist/categories/context/hooks.d.ts +19 -1
  119. package/dist/categories/index.d.ts +0 -1
  120. package/dist/categories/index.es.js +4 -6
  121. package/dist/common/components/CurrencyDialog.d.ts +19 -0
  122. package/dist/common/components/CurrencyInput.d.ts +1 -1
  123. package/dist/common/components/EmptyState.d.ts +0 -1
  124. package/dist/common/components/Error.d.ts +13 -0
  125. package/dist/common/components/GlobalAccountFilter.d.ts +3 -2
  126. package/dist/common/components/Loader.d.ts +1 -2
  127. package/dist/common/components/MiniWidgetContainer.d.ts +1 -0
  128. package/dist/common/components/TinyBarChart.d.ts +10 -0
  129. package/dist/common/components/WidgetContainer.d.ts +4 -3
  130. package/dist/common/components/WidgetDateRangeSelector.d.ts +12 -0
  131. package/dist/common/components/charts/LineChart.d.ts +1 -0
  132. package/dist/common/components/charts/index.d.ts +1 -0
  133. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +2 -1
  134. package/dist/common/components/charts/linechart/utils/markerShapes.d.ts +3 -0
  135. package/dist/common/components/charts/stackedlinechart/CustomAreaTooltip.d.ts +1 -1
  136. package/dist/common/components/daterangeselector/DateRangeSelector.d.ts +1 -0
  137. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +1 -1
  138. package/dist/common/components/index.d.ts +2 -1
  139. package/dist/common/constants/Account.d.ts +1 -1
  140. package/dist/common/constants/Analytics.d.ts +12 -0
  141. package/dist/common/constants/ScheduledPayment.d.ts +1 -10
  142. package/dist/common/constants/SpendingPlan.d.ts +0 -10
  143. package/dist/common/constants/index.d.ts +2 -6
  144. package/dist/common/context/GlobalDataProvider.d.ts +2 -1
  145. package/dist/common/context/hooks.d.ts +24 -24
  146. package/dist/common/hooks/index.d.ts +2 -0
  147. package/dist/common/hooks/useAccountDisplayName.d.ts +1 -1
  148. package/dist/common/hooks/useCombineEvents.d.ts +1 -1
  149. package/dist/common/hooks/usePrevious.d.ts +2 -0
  150. package/dist/common/hooks/useWidgetHeaderStyles.d.ts +34 -0
  151. package/dist/common/index.d.ts +3 -3
  152. package/dist/common/index.es.js +254 -1348
  153. package/dist/common/utils/AccountDisplayName.d.ts +1 -1
  154. package/dist/common/utils/AccountFilter.d.ts +2 -2
  155. package/dist/common/utils/Analytics.d.ts +1 -1
  156. package/dist/common/utils/PostMessage.d.ts +1 -0
  157. package/dist/common/utils/Theme.d.ts +7 -6
  158. package/dist/common/utils/index.d.ts +1 -6
  159. package/dist/{accounts → core}/api/AccountApi.d.ts +2 -2
  160. package/dist/{common → core}/api/AnalyticsApi.d.ts +1 -1
  161. package/dist/{common → core}/api/AppDataApi.d.ts +2 -2
  162. package/dist/{common → core}/api/BannerApi.d.ts +1 -1
  163. package/dist/{common → core}/api/BeatApi.d.ts +2 -2
  164. package/dist/{budgets → core}/api/BudgetsApi.d.ts +5 -1
  165. package/dist/{common → core}/api/CategoryApi.d.ts +2 -2
  166. package/dist/{finstrong → core}/api/FinstrongApi.d.ts +2 -2
  167. package/dist/{common → core}/api/GlobalCopyApi.d.ts +2 -2
  168. package/dist/{goals → core}/api/GoalApi.d.ts +2 -2
  169. package/dist/{help → core}/api/HelpApi.d.ts +2 -2
  170. package/dist/{investments → core}/api/HoldingApi.d.ts +2 -2
  171. package/dist/{merchants → core}/api/MerchantApi.d.ts +2 -2
  172. package/dist/{common → core}/api/NotificationApi.d.ts +2 -2
  173. package/dist/{recurringtransactions → core}/api/RepeatingTransactionsApi.d.ts +2 -1
  174. package/dist/{common → core}/api/ScheduledPaymentsApi.d.ts +2 -2
  175. package/dist/{settings → core}/api/SettingsApi.d.ts +2 -3
  176. package/dist/{transactions → core}/api/TransactionApi.d.ts +2 -2
  177. package/dist/{common → core}/api/UserApi.d.ts +2 -2
  178. package/dist/{common → core}/api/WidgetApi.d.ts +1 -1
  179. package/dist/core/api/index.d.ts +20 -0
  180. package/dist/{common → core}/constants/ApiEndpoints.d.ts +1 -2
  181. package/dist/{common → core}/constants/DefaultConfig.d.ts +1 -1
  182. package/dist/core/constants/Transaction.d.ts +10 -0
  183. package/dist/core/constants/index.d.ts +4 -0
  184. package/dist/core/constants/repeatingTransactions.d.ts +10 -0
  185. package/dist/core/index.d.ts +4 -0
  186. package/dist/core/index.es.js +108 -0
  187. package/dist/{accounts → core}/stores/AccountStore.d.ts +15 -3
  188. package/dist/{analytics → core}/stores/AnalyticsStore.d.ts +1 -1
  189. package/dist/{common → core}/stores/AppDataStore.d.ts +1 -2
  190. package/dist/{insights/store → core/stores}/BeatStore.d.ts +3 -3
  191. package/dist/{budgets/store → core/stores}/BudgetsStore.d.ts +15 -2
  192. package/dist/{cashflow/stores/UiStore.d.ts → core/stores/CashflowStore.d.ts} +10 -2
  193. package/dist/{categories → core}/stores/CategoryStore.d.ts +24 -2
  194. package/dist/{common → core}/stores/ConnectStore.d.ts +1 -1
  195. package/dist/core/stores/DebtsStore.d.ts +22 -0
  196. package/dist/{finstrong → core}/stores/FinstrongStore.d.ts +5 -4
  197. package/dist/{common → core}/stores/GlobalStore.d.ts +4 -25
  198. package/dist/{goals → core}/stores/GoalStore.d.ts +3 -2
  199. package/dist/{help/store → core/stores}/HelpStore.d.ts +4 -5
  200. package/dist/{investments → core}/stores/HoldingStore.d.ts +4 -3
  201. package/dist/{merchants → core}/stores/MerchantStore.d.ts +3 -2
  202. package/dist/{networth → core}/stores/NetWorthStore.d.ts +3 -3
  203. package/dist/{notifications → core}/stores/NotificationStore.d.ts +3 -1
  204. package/dist/{recurringtransactions → core}/stores/RecurringTransactionsStore.d.ts +3 -2
  205. package/dist/{settings → core}/stores/SettingsStore.d.ts +4 -4
  206. package/dist/{transactions → core}/stores/TransactionStore.d.ts +30 -4
  207. package/dist/{trends → core}/stores/TrendsStore.d.ts +11 -4
  208. package/dist/core/stores/index.d.ts +24 -0
  209. package/dist/{common → core}/types/Analytics.d.ts +6 -3
  210. package/dist/{common → core}/types/AppData.d.ts +8 -2
  211. package/dist/{common → core}/types/Beat.d.ts +2 -0
  212. package/dist/{common → core}/types/Budget.d.ts +8 -0
  213. package/dist/{common → core}/types/Client.d.ts +1 -0
  214. package/dist/{common → core}/types/Expense.d.ts +2 -1
  215. package/dist/{common → core}/types/Finstrong.d.ts +0 -2
  216. package/dist/{networth → core}/types/NetWorth.d.ts +1 -10
  217. package/dist/{common → core}/types/Notification.d.ts +15 -5
  218. package/dist/core/types/Offer.d.ts +32 -0
  219. package/dist/{common → core}/types/Widgets.d.ts +1 -0
  220. package/dist/{common → core}/types/index.d.ts +4 -3
  221. package/dist/{common → core}/types/localization/BudgetsCopy.d.ts +26 -0
  222. package/dist/{common → core}/types/localization/CashflowCopy.d.ts +1 -0
  223. package/dist/{common → core}/types/localization/CommonCopy.d.ts +3 -0
  224. package/dist/{common → core}/types/localization/DebtsCopy.d.ts +5 -0
  225. package/dist/{common → core}/types/localization/GoalsCopy.d.ts +0 -1
  226. package/dist/{common → core}/types/localization/InsightsFeedCopy.d.ts +11 -0
  227. package/dist/{common → core}/types/localization/RecurringCopy.d.ts +2 -0
  228. package/dist/{common → core}/types/localization/SpendingCopy.d.ts +1 -0
  229. package/dist/{common → core}/types/localization/TransactionsCopy.d.ts +11 -6
  230. package/dist/{common → core}/types/localization/TrendsCopy.d.ts +2 -0
  231. package/dist/{accounts/utils/Accounts.d.ts → core/utils/AccountUtils.d.ts} +2 -2
  232. package/dist/{microinsights/utils/beatUtils.d.ts → core/utils/BeatUtils.d.ts} +1 -1
  233. package/dist/{budgets → core}/utils/BudgetUtil.d.ts +7 -2
  234. package/dist/{categories/util → core/utils}/CategoryUtil.d.ts +6 -1
  235. package/dist/core/utils/DebtUtils.d.ts +31 -0
  236. package/dist/core/utils/FinstrongUtils.d.ts +7 -0
  237. package/dist/{goals/util → core/utils}/GoalsUtil.d.ts +1 -1
  238. package/dist/core/utils/HelpUtil.d.ts +3 -0
  239. package/dist/{investments/util → core/utils}/InvestmentUtil.d.ts +2 -2
  240. package/dist/{common → core}/utils/Localization.d.ts +9 -1
  241. package/dist/{networth → core}/utils/NetWorthUtils.d.ts +1 -2
  242. package/dist/{notifications → core}/utils/NotificationUtils.d.ts +2 -1
  243. package/dist/{common → core}/utils/NumberFormatting.d.ts +1 -1
  244. package/dist/{recurringtransactions/util/RecurringTransactions.d.ts → core/utils/RecurringTransactionsUtil.d.ts} +2 -2
  245. package/dist/{settings/util/Notifications.d.ts → core/utils/SettingsUtil.d.ts} +1 -1
  246. package/dist/{transactions/utils/buildDetailedTransactions.d.ts → core/utils/TransactionUtils.d.ts} +12 -2
  247. package/dist/{trends/utils/TrendsData.d.ts → core/utils/TrendsUtil.d.ts} +1 -1
  248. package/dist/core/utils/index.d.ts +2 -0
  249. package/dist/dashboard/index.es.js +39 -38
  250. package/dist/debts/DebtsWidget.d.ts +1 -1
  251. package/dist/debts/components/DebtsChart.d.ts +1 -1
  252. package/dist/debts/components/DebtsTable.d.ts +1 -1
  253. package/dist/debts/components/SnowballCard.d.ts +1 -1
  254. package/dist/debts/components/actions/DebtsPriorityAction.d.ts +6 -1
  255. package/dist/debts/components/actions/InterestRateAction.d.ts +1 -1
  256. package/dist/debts/components/actions/MonthlyPaymentAction.d.ts +1 -1
  257. package/dist/debts/components/actions/OriginalBalanceAction.d.ts +1 -1
  258. package/dist/debts/components/debtspaydown/PaydownButton.d.ts +2 -1
  259. package/dist/debts/components/debtspriority/DebtsPriorityButton.d.ts +3 -1
  260. package/dist/debts/hooks/useDebtsUiStore.d.ts +1 -1
  261. package/dist/debts/index.d.ts +0 -1
  262. package/dist/debts/index.es.js +715 -775
  263. package/dist/debts/utils/DebtsTable.d.ts +1 -1
  264. package/dist/debts/utils/SnowballCard.d.ts +2 -2
  265. package/dist/finstrong/FinstrongWidget.d.ts +2 -2
  266. package/dist/finstrong/components/HealthChart.d.ts +1 -1
  267. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +1 -1
  268. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +1 -1
  269. package/dist/finstrong/components/shared/Accounts.d.ts +1 -1
  270. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +1 -0
  271. package/dist/finstrong/components/shared/ScoreHistoryTimeline.d.ts +1 -1
  272. package/dist/finstrong/components/shared/Transactions.d.ts +1 -1
  273. package/dist/finstrong/index.d.ts +0 -2
  274. package/dist/finstrong/index.es.js +1587 -1349
  275. package/dist/finstrong/util/finstrongUtils.d.ts +3 -9
  276. package/dist/goals/GoalsWidget.d.ts +2 -2
  277. package/dist/goals/components/AccountSelectionDrawer.d.ts +1 -1
  278. package/dist/goals/components/AddGoal.d.ts +1 -1
  279. package/dist/goals/components/GoalDetails.d.ts +1 -1
  280. package/dist/goals/components/GoalDetailsDrawer.d.ts +1 -1
  281. package/dist/goals/components/GoalList.d.ts +1 -1
  282. package/dist/goals/components/GoalStatusCard.d.ts +1 -1
  283. package/dist/goals/components/ManageGoals.d.ts +1 -1
  284. package/dist/goals/components/actions/AccountAction.d.ts +1 -1
  285. package/dist/goals/components/actions/AddRetirementAccountAction.d.ts +1 -1
  286. package/dist/goals/components/actions/AmountToSaveAction.d.ts +1 -1
  287. package/dist/goals/components/actions/BirthdayAction.d.ts +1 -1
  288. package/dist/goals/components/actions/ChangeAccountAction.d.ts +1 -1
  289. package/dist/goals/components/actions/ContributionAction.d.ts +1 -1
  290. package/dist/goals/components/actions/GoalNameAction.d.ts +1 -1
  291. package/dist/goals/components/actions/InterestRateAction.d.ts +1 -1
  292. package/dist/goals/components/actions/MonthlyPaymentAction.d.ts +1 -1
  293. package/dist/goals/components/actions/OriginalBalanceAction.d.ts +1 -1
  294. package/dist/goals/components/actions/RetirementAgeAction.d.ts +1 -1
  295. package/dist/goals/components/addgoal/AddGoalListItem.d.ts +2 -2
  296. package/dist/goals/components/managegoals/CompleteListItem.d.ts +1 -1
  297. package/dist/goals/components/managegoals/OngoingListItem.d.ts +3 -2
  298. package/dist/goals/components/managegoals/ReorderGoals.d.ts +1 -1
  299. package/dist/goals/components/micro/GoalMicroStatusCard.d.ts +1 -1
  300. package/dist/goals/index.d.ts +0 -2
  301. package/dist/goals/index.es.js +707 -787
  302. package/dist/help/HelpWidget.d.ts +2 -2
  303. package/dist/help/components/HelpContent.d.ts +1 -1
  304. package/dist/help/components/HelpList.d.ts +1 -1
  305. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  306. package/dist/help/components/content/ContentItem.d.ts +1 -1
  307. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  308. package/dist/help/components/content/NoImageContent.d.ts +1 -1
  309. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  310. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  311. package/dist/help/components/content/section/Accounts.d.ts +1 -1
  312. package/dist/help/components/content/section/Budgets.d.ts +1 -1
  313. package/dist/help/components/content/section/CashFlow.d.ts +1 -1
  314. package/dist/help/components/content/section/Debts.d.ts +1 -1
  315. package/dist/help/components/content/section/General.d.ts +1 -1
  316. package/dist/help/components/content/section/Goals.d.ts +1 -1
  317. package/dist/help/components/content/section/Insights.d.ts +1 -1
  318. package/dist/help/components/content/section/Investments.d.ts +1 -1
  319. package/dist/help/components/content/section/Mobile.d.ts +1 -1
  320. package/dist/help/components/content/section/NetWorth.d.ts +1 -1
  321. package/dist/help/components/content/section/Notifications.d.ts +1 -1
  322. package/dist/help/components/content/section/RecurringTransactions.d.ts +1 -1
  323. package/dist/help/components/content/section/Spending.d.ts +1 -1
  324. package/dist/help/components/content/section/Transactions.d.ts +1 -1
  325. package/dist/help/components/content/section/Trends.d.ts +1 -1
  326. package/dist/help/components/content/section/index.d.ts +15 -15
  327. package/dist/help/components/requestsupport/ContactSupport.d.ts +1 -1
  328. package/dist/help/components/requestsupport/HelpByCategoryList.d.ts +1 -1
  329. package/dist/help/components/requestsupport/MissingInstitution.d.ts +1 -1
  330. package/dist/help/components/requestsupport/PopularTopicsDrawer.d.ts +1 -1
  331. package/dist/help/components/requestsupport/PopularTopicsList.d.ts +1 -1
  332. package/dist/help/components/requestsupport/RequestSupport.d.ts +1 -1
  333. package/dist/help/components/requestsupport/RequestSupportFooter.d.ts +1 -1
  334. package/dist/help/components/requestsupport/RequestSupportInstitution.d.ts +1 -1
  335. package/dist/help/components/requestsupport/SupportSuccessMessage.d.ts +1 -1
  336. package/dist/help/index.es.js +19 -10
  337. package/dist/help/utils/index.d.ts +0 -1
  338. package/dist/{hooks-fY_n74f7.mjs → hooks-BaO_gOI6.mjs} +23 -23
  339. package/dist/insights/components/feed/Header.d.ts +8 -0
  340. package/dist/insights/components/index.d.ts +53 -0
  341. package/dist/insights/components/insights/AccountDiscoverability/AccountDiscoverability.d.ts +3 -0
  342. package/dist/insights/components/insights/AccountDiscoverability/index.d.ts +1 -0
  343. package/dist/insights/components/insights/AccountDiscoverability/types/AccountDiscoverability.d.ts +3 -0
  344. package/dist/insights/components/insights/AmericanUpcomingTaxDeadlineAlert/AmericanUpcomingTaxDeadlineAlert.d.ts +2 -0
  345. package/dist/insights/components/insights/AmericanUpcomingTaxDeadlineAlert/index.d.ts +1 -0
  346. package/dist/insights/components/insights/AmericanUpcomingTaxDeadlineAlert/types/AmericanUpcomingTaxDeadlineProps.d.ts +4 -0
  347. package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandard.d.ts +3 -0
  348. package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandardMUI.d.ts +3 -0
  349. package/dist/insights/components/insights/BillAmountNotStandard/index.d.ts +2 -0
  350. package/dist/insights/components/insights/BillAmountNotStandard/types/BillAmountNotStandard.d.ts +4 -0
  351. package/dist/insights/components/insights/CashBack/CashBack.d.ts +3 -0
  352. package/dist/insights/components/insights/CashBack/index.d.ts +1 -0
  353. package/dist/insights/components/insights/CashBack/types/CashBack.d.ts +7 -0
  354. package/dist/insights/components/insights/CategoryBudget/CategoryBudget.d.ts +3 -0
  355. package/dist/insights/components/insights/CategoryBudget/index.d.ts +1 -0
  356. package/dist/insights/components/insights/CategoryBudget/types/CategoryBudget.d.ts +10 -0
  357. package/dist/insights/components/insights/CategorySpendingV2/CategorySpendingV2.d.ts +2 -0
  358. package/dist/insights/components/insights/CategorySpendingV2/CategorySpendingV2MUI.d.ts +2 -0
  359. package/dist/insights/components/insights/CategorySpendingV2/index.d.ts +2 -0
  360. package/dist/insights/components/insights/CategorySpendingV2/types/CategorySpendingV2.d.ts +7 -0
  361. package/dist/insights/components/insights/CelebrateCreditCardPayoff/CelebrateCreditCardPayoff.d.ts +3 -0
  362. package/dist/insights/components/insights/CelebrateCreditCardPayoff/index.d.ts +1 -0
  363. package/dist/insights/components/insights/CelebrateCreditCardPayoff/types/CelebrateCreditCardPayoffProps.d.ts +9 -0
  364. package/dist/insights/components/insights/CustomTransaction/CustomTransaction.d.ts +3 -0
  365. package/dist/insights/components/insights/CustomTransaction/index.d.ts +1 -0
  366. package/dist/insights/components/insights/DiscoveredAccounts/DiscoveredAccountsBody.d.ts +9 -0
  367. package/dist/insights/components/insights/DiscoveredAccounts/DiscoveredAccountsLearnMoreDrawerContent.d.ts +21 -0
  368. package/dist/insights/components/insights/DiscoveredAccounts/DiscoveredAccountsMiniInsight.d.ts +6 -0
  369. package/dist/insights/components/insights/DiscoveredAccounts/index.d.ts +3 -0
  370. package/dist/insights/components/insights/FederalBankHoliday/FederalBankHoliday.d.ts +3 -0
  371. package/dist/insights/components/insights/FederalBankHoliday/FederalBankHolidayMUI.d.ts +3 -0
  372. package/dist/insights/components/insights/FederalBankHoliday/index.d.ts +2 -0
  373. package/dist/insights/components/insights/FederalBankHoliday/types/FederalBankHoliday.d.ts +4 -0
  374. package/dist/insights/components/insights/MarketingHub/Offer.d.ts +3 -0
  375. package/dist/insights/components/insights/MarketingHub/Types.d.ts +33 -0
  376. package/dist/insights/components/insights/MarketingHub/index.d.ts +2 -0
  377. package/dist/insights/components/insights/MonthlyDebtToIncomeComparisonV2/MonthlyDebtToIncomeComparisonV2.d.ts +2 -0
  378. package/dist/insights/components/insights/MonthlyDebtToIncomeComparisonV2/index.d.ts +1 -0
  379. package/dist/insights/components/insights/MonthlyDebtToIncomeComparisonV2/types/index.d.ts +4 -0
  380. package/dist/insights/components/insights/MonthlyEmergencyFundReview/LastMonthsContributionSection.d.ts +6 -0
  381. package/dist/insights/components/insights/MonthlyEmergencyFundReview/MonthlyEmergencyFundReviewBody.d.ts +21 -0
  382. package/dist/insights/components/insights/MonthlyEmergencyFundReview/ProjectedCompletionSection.d.ts +6 -0
  383. package/dist/insights/components/insights/MonthlyEmergencyFundReview/TotalSection.d.ts +7 -0
  384. package/dist/insights/components/insights/MonthlyEmergencyFundReview/index.d.ts +4 -0
  385. package/dist/insights/components/insights/MonthlySavingsToIncomeComparison/MonthlySavingsToIncomeComparison.d.ts +2 -0
  386. package/dist/insights/components/insights/MonthlySavingsToIncomeComparison/index.d.ts +1 -0
  387. package/dist/insights/components/insights/MonthlySavingsToIncomeComparison/types/index.d.ts +4 -0
  388. package/dist/insights/components/insights/MonthlySpendToIncomeComparisonV2/MonthlySpendToIncomeComparisonV2.d.ts +2 -0
  389. package/dist/insights/components/insights/MonthlySpendToIncomeComparisonV2/index.d.ts +1 -0
  390. package/dist/insights/components/insights/MonthlySpendToIncomeComparisonV2/types/index.d.ts +4 -0
  391. package/dist/insights/components/insights/MonthlySpendingComparisonV2/MonthlySpendingComparisonV2.d.ts +3 -0
  392. package/dist/insights/components/insights/MonthlySpendingComparisonV2/__test__/MonthlySpendComparisonV2.test.d.ts +1 -0
  393. package/dist/insights/components/insights/MonthlySpendingComparisonV2/index.d.ts +1 -0
  394. package/dist/insights/components/insights/MonthlySpendingComparisonV2/types/MonthlySpendComparisonV2.d.ts +4 -0
  395. package/dist/insights/components/insights/P2pCategorization/P2pCategorization.d.ts +3 -0
  396. package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
  397. package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
  398. package/dist/insights/components/insights/P2pCategorization/index.d.ts +4 -0
  399. package/dist/insights/components/insights/P2pCategorization/shared/P2pCategorizationMultipleTransactions.d.ts +3 -0
  400. package/dist/insights/components/insights/P2pCategorization/shared/P2pCategorizationSingleTransaction.d.ts +3 -0
  401. package/dist/insights/components/insights/P2pCategorization/types/P2pCategorization.d.ts +17 -0
  402. package/dist/insights/components/insights/SavingsAccountBalancesSummary/SavingsAccountBalancesSummary.d.ts +2 -0
  403. package/dist/insights/components/insights/SavingsAccountBalancesSummary/index.d.ts +1 -0
  404. package/dist/insights/components/insights/SavingsAccountBalancesSummary/types/SavingsAccountBalancesSummary.d.ts +4 -0
  405. package/dist/insights/components/insights/SetUpDirectDeposit/SetUpDirectDepositBody.d.ts +3 -0
  406. package/dist/insights/components/insights/SetUpDirectDeposit/index.d.ts +1 -0
  407. package/dist/insights/components/insights/SharedDeposit/SharedDeposit.d.ts +2 -0
  408. package/dist/insights/components/insights/SharedDeposit/index.d.ts +1 -0
  409. package/dist/insights/components/insights/SharedDeposit/types/index.d.ts +7 -0
  410. package/dist/insights/components/insights/SwitchDirectDeposit/AccountBox.d.ts +7 -0
  411. package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositBody.d.ts +10 -0
  412. package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.d.ts +9 -0
  413. package/dist/insights/components/insights/SwitchDirectDeposit/index.d.ts +3 -0
  414. package/dist/insights/components/insights/UnifiedDeposit/UnifiedDeposit.d.ts +7 -0
  415. package/dist/insights/components/insights/UnifiedDeposit/UnifiedDepositBody.d.ts +11 -0
  416. package/dist/insights/components/insights/UnifiedDeposit/index.d.ts +1 -0
  417. package/dist/insights/components/insights/UserFeedback/StyledToggleButton.d.ts +7 -0
  418. package/dist/insights/components/insights/UserFeedback/Types.d.ts +27 -0
  419. package/dist/insights/components/insights/UserFeedback/UserFeedback.d.ts +3 -0
  420. package/dist/insights/components/insights/UserFeedback/index.d.ts +1 -0
  421. package/dist/insights/components/insights/WeeklyNoSpendDays/BubbleWeek.d.ts +9 -0
  422. package/dist/insights/components/insights/WeeklyNoSpendDays/NoSpendIcons.d.ts +1 -0
  423. package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.d.ts +12 -0
  424. package/dist/insights/components/insights/WeeklyNoSpendDays/_tests_/WeeklyNoSpendDays.test.d.ts +0 -0
  425. package/dist/insights/components/insights/WeeklyNoSpendDays/index.d.ts +1 -0
  426. package/dist/insights/components/insights/index.d.ts +25 -0
  427. package/dist/insights/components/shared/AccountBalanceCard.d.ts +13 -0
  428. package/dist/insights/components/shared/BottomSheet.d.ts +13 -0
  429. package/dist/insights/components/shared/CarouselControls.d.ts +14 -0
  430. package/dist/insights/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.d.ts +30 -0
  431. package/dist/insights/components/shared/ChartDrawerTemplate/TipSection.d.ts +9 -0
  432. package/dist/insights/components/shared/ChartTransactionWithDrillDown.d.ts +22 -0
  433. package/dist/insights/components/shared/Charts/BarChart/BarChart.d.ts +2 -0
  434. package/dist/insights/components/shared/Charts/BarChart/BarChartV2.d.ts +2 -0
  435. package/dist/insights/components/shared/Charts/BarChart/ChartLegend.d.ts +9 -0
  436. package/dist/insights/components/shared/Charts/BarChart/ChartLegendV2.d.ts +10 -0
  437. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlot.d.ts +18 -0
  438. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlotV2.d.ts +18 -0
  439. package/dist/insights/components/shared/Charts/BarChart/CustomDoubleBarPlot.d.ts +18 -0
  440. package/dist/insights/components/shared/Charts/BarChart/CustomDoubleBarPlotMXUI.d.ts +18 -0
  441. package/dist/insights/components/shared/Charts/BarChart/DoubleBarChart.d.ts +2 -0
  442. package/dist/insights/components/shared/Charts/BarChart/DoubleBarChartLegend.d.ts +10 -0
  443. package/dist/insights/components/shared/Charts/BarChart/DoubleBarChartLegendMXUI.d.ts +10 -0
  444. package/dist/insights/components/shared/Charts/BarChart/DoubleBarChartMXUI.d.ts +2 -0
  445. package/dist/insights/components/shared/Charts/BarChart/index.d.ts +4 -0
  446. package/dist/insights/components/shared/Charts/EmptyBarChart.d.ts +1 -0
  447. package/dist/insights/components/shared/Charts/index.d.ts +2 -0
  448. package/dist/insights/components/shared/Confetti.d.ts +5 -0
  449. package/dist/insights/components/shared/ConnectionCard.d.ts +14 -0
  450. package/dist/insights/components/shared/ConnectionDetailDrillDown.d.ts +25 -0
  451. package/dist/insights/components/shared/Coupon.d.ts +8 -0
  452. package/dist/insights/components/shared/DeepLinks/DeepLinkDialog.d.ts +11 -0
  453. package/dist/insights/components/shared/DeepLinks/DirectDeposit/Circle.d.ts +6 -0
  454. package/dist/insights/components/shared/DeepLinks/DirectDeposit/DirectDepositDeepLink.d.ts +24 -0
  455. package/dist/insights/components/shared/DeepLinks/DirectDeposit/Dot.d.ts +1 -0
  456. package/dist/insights/components/shared/DeepLinks/DirectDeposit/Oval.d.ts +1 -0
  457. package/dist/insights/components/shared/DirectDeposit/DirectDeposit.d.ts +3 -0
  458. package/dist/insights/components/shared/DirectDeposit/DirectDepositSubHeader.d.ts +14 -0
  459. package/dist/insights/components/shared/DirectDeposit/FullFeedBodyHeader.d.ts +10 -0
  460. package/dist/insights/components/shared/DirectDeposit/LeftBox.d.ts +7 -0
  461. package/dist/insights/components/shared/DirectDeposit/MiniBodyHeader.d.ts +10 -0
  462. package/dist/insights/components/shared/DirectDeposit/RightBox.d.ts +8 -0
  463. package/dist/insights/components/shared/DiscoveredAccountsConnect.d.ts +8 -0
  464. package/dist/insights/components/shared/DonutChartV2.d.ts +13 -0
  465. package/dist/insights/components/shared/DrillDownCalculation/BalanceStepper.d.ts +12 -0
  466. package/dist/insights/components/shared/DrillDownCalculation/DrillDownCalculation.d.ts +31 -0
  467. package/dist/insights/components/shared/ErrorCard/ErrorCard.d.ts +8 -0
  468. package/dist/insights/components/shared/GenericFeedback/FeedbackButtons.d.ts +15 -0
  469. package/dist/insights/components/shared/GenericFeedback/FeedbackDescription.d.ts +5 -0
  470. package/dist/insights/components/shared/GenericFeedback/FeedbackHeader.d.ts +15 -0
  471. package/dist/insights/components/shared/GenericFeedback/FeedbackOptions.d.ts +12 -0
  472. package/dist/insights/components/shared/GenericFeedback/FeedbackText.d.ts +13 -0
  473. package/dist/insights/components/shared/GoalProgress.d.ts +10 -0
  474. package/dist/insights/components/shared/GradientBox.d.ts +8 -0
  475. package/dist/insights/components/shared/InsightsCard/BeatCard.d.ts +20 -0
  476. package/dist/insights/components/shared/InsightsCard/BeatCardMUI.d.ts +20 -0
  477. package/dist/insights/components/shared/InsightsCard/CardButtonSection.d.ts +7 -0
  478. package/dist/insights/components/shared/InsightsCard/CardError.d.ts +5 -0
  479. package/dist/insights/components/shared/InsightsCard/CardFooter.d.ts +7 -0
  480. package/dist/insights/components/shared/InsightsCard/CardHeader.d.ts +11 -0
  481. package/dist/insights/components/shared/InsightsCard/CardHeaderMUI.d.ts +11 -0
  482. package/dist/insights/components/shared/InsightsCard/CardLoading.d.ts +5 -0
  483. package/dist/insights/components/shared/InsightsCard/ClientConfigurableCta.d.ts +5 -0
  484. package/dist/insights/components/shared/InsightsCard/ContentAndDescription.d.ts +15 -0
  485. package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.d.ts +15 -0
  486. package/dist/insights/components/shared/InsightsCard/Description.d.ts +10 -0
  487. package/dist/insights/components/shared/InsightsCard/DescriptionMUI.d.ts +10 -0
  488. package/dist/insights/components/shared/InsightsCard/EmbeddedCard.d.ts +9 -0
  489. package/dist/insights/components/shared/InsightsCard/FeedbackCard.d.ts +13 -0
  490. package/dist/insights/components/shared/InsightsCard/InsightButton.d.ts +12 -0
  491. package/dist/insights/components/shared/InsightsCard/MiniDescription.d.ts +9 -0
  492. package/dist/insights/components/shared/InsightsCard/MiniDescriptionMUI.d.ts +9 -0
  493. package/dist/insights/components/shared/MenuAction.d.ts +15 -0
  494. package/dist/insights/components/shared/MiniInsightCard.d.ts +16 -0
  495. package/dist/insights/components/shared/P2P/P2PMultipleCategorization.d.ts +12 -0
  496. package/dist/insights/components/shared/P2PCategorizationSingleAccount/P2PCategorizationSingleAccount.d.ts +10 -0
  497. package/dist/insights/components/shared/ProgressBar.d.ts +9 -0
  498. package/dist/insights/components/shared/SaveAnExtra100/SaveAnExtra100.d.ts +9 -0
  499. package/dist/insights/components/shared/SaveEnoughToLiveOnBottomSection.d.ts +11 -0
  500. package/dist/insights/components/shared/SaveEnoughToLiveOnTopSection.d.ts +2 -0
  501. package/dist/insights/components/shared/StatusIndicator.d.ts +15 -0
  502. package/dist/insights/components/shared/TabContainer.d.ts +8 -0
  503. package/dist/insights/components/shared/ThemedSVGImage.d.ts +2 -0
  504. package/dist/insights/components/shared/TransactionCard.d.ts +14 -0
  505. package/dist/insights/components/shared/ZeroState/LinedCardZeroState.d.ts +1 -0
  506. package/dist/insights/components/shared/index.d.ts +2 -0
  507. package/dist/insights/hooks/useContainerDimensions.d.ts +5 -0
  508. package/dist/insights/index.d.ts +1 -1
  509. package/dist/insights/index.es.js +4843 -2
  510. package/dist/insights/themes/Typography.d.ts +1 -0
  511. package/dist/insights/themes/index.d.ts +1 -0
  512. package/dist/insights/types/Charts/BarChart.d.ts +96 -0
  513. package/dist/insights/types/CommonBeat.d.ts +367 -0
  514. package/dist/insights/types/DirectDeposit.d.ts +16 -0
  515. package/dist/insights/types/ThemedSVGImage.d.ts +5 -0
  516. package/dist/investments/InvestmentsWidget.d.ts +2 -2
  517. package/dist/investments/components/AnalysisDetails.d.ts +1 -1
  518. package/dist/investments/components/allocation/util/createInvestementsAllocationData.d.ts +2 -2
  519. package/dist/investments/index.es.js +574 -574
  520. package/dist/merchants/index.d.ts +0 -1
  521. package/dist/merchants/index.es.js +18 -20
  522. package/dist/microinsights/InsightsMicroWidget.d.ts +1 -14
  523. package/dist/microinsights/MicroCardTemplate.d.ts +2 -4
  524. package/dist/microinsights/beaticons/AreaChartIcon.d.ts +3 -0
  525. package/dist/microinsights/beaticons/AverageSpendComparisonIcon.d.ts +3 -0
  526. package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +5 -1
  527. package/dist/microinsights/beaticons/InstitutionLogoIcon.d.ts +5 -0
  528. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +0 -2
  529. package/dist/microinsights/beaticons/index.d.ts +3 -0
  530. package/dist/microinsights/cards/InsightCard.d.ts +3 -3
  531. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +3 -3
  532. package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +3 -3
  533. package/dist/microinsights/cards/ZeroStateCard.d.ts +3 -3
  534. package/dist/microinsights/carousel/BeatList.d.ts +3 -3
  535. package/dist/microinsights/carousel/CarouselHeader.d.ts +4 -2
  536. package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +12 -12
  537. package/dist/microinsights/constants/Analytics.d.ts +1 -1
  538. package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -1
  539. package/dist/microinsights/context/hooks.d.ts +1 -1
  540. package/dist/microinsights/index.d.ts +1 -1
  541. package/dist/microinsights/index.es.js +1 -1
  542. package/dist/microinsights/interfaces.d.ts +23 -40
  543. package/dist/microinsights/stores/CopyStore.d.ts +2 -2
  544. package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +2 -2
  545. package/dist/microinsights/utils/DataSeries.d.ts +1 -1
  546. package/dist/microinsights/utils/colorType.d.ts +22 -0
  547. package/dist/networth/NetWorthWidget.d.ts +1 -1
  548. package/dist/networth/components/AssetsLiabilitiesDetail.d.ts +1 -1
  549. package/dist/networth/components/GainsLossesDetail.d.ts +1 -1
  550. package/dist/networth/components/NetWorthChange.d.ts +1 -1
  551. package/dist/networth/components/NetWorthListItem.d.ts +1 -1
  552. package/dist/networth/components/NetWorthSummary.d.ts +1 -1
  553. package/dist/networth/components/micro/NetworthData.d.ts +1 -1
  554. package/dist/networth/components/micro/ZeroState.d.ts +1 -1
  555. package/dist/networth/index.d.ts +0 -4
  556. package/dist/networth/index.es.js +302 -314
  557. package/dist/notifications/components/NotificationBadge.d.ts +1 -1
  558. package/dist/notifications/components/NotificationCard.d.ts +1 -1
  559. package/dist/notifications/components/NotificationDrawer.d.ts +1 -1
  560. package/dist/notifications/components/NotificationList.d.ts +2 -1
  561. package/dist/notifications/index.d.ts +0 -2
  562. package/dist/notifications/index.es.js +101 -93
  563. package/dist/recurringtransactions/RecurringTransactionsMiniWidget.d.ts +1 -1
  564. package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +2 -2
  565. package/dist/recurringtransactions/components/PaymentSchedule.d.ts +1 -1
  566. package/dist/recurringtransactions/components/RecurrenceList.d.ts +1 -1
  567. package/dist/recurringtransactions/components/RecurrenceRow.d.ts +1 -1
  568. package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +1 -1
  569. package/dist/recurringtransactions/components/actions/PaymentScheduleAction.d.ts +1 -1
  570. package/dist/recurringtransactions/components/micro/MerchantLogosRow.d.ts +1 -1
  571. package/dist/recurringtransactions/components/micro/OverlappingMerchantLogos.d.ts +1 -1
  572. package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransactionDetails.d.ts +1 -1
  573. package/dist/recurringtransactions/components/shared/recurringsettings/RecurringRow.d.ts +1 -1
  574. package/dist/recurringtransactions/index.d.ts +0 -1
  575. package/dist/recurringtransactions/index.es.js +489 -462
  576. package/dist/settings/NotificationSettingsWidget.d.ts +1 -1
  577. package/dist/settings/SettingsWidget.d.ts +2 -2
  578. package/dist/settings/TransactionRulesWidget.d.ts +1 -1
  579. package/dist/settings/components/devices/DeviceDialog.d.ts +1 -1
  580. package/dist/settings/components/devices/DeviceList.d.ts +1 -1
  581. package/dist/settings/components/devices/DeviceTable.d.ts +1 -1
  582. package/dist/settings/components/notifications/AccountNotificationProfile.d.ts +1 -1
  583. package/dist/settings/components/notifications/AccountProfileListItem.d.ts +1 -1
  584. package/dist/settings/components/notifications/NotificationProfile.d.ts +1 -1
  585. package/dist/settings/components/notifications/NotificationSettings.d.ts +1 -1
  586. package/dist/settings/components/transactionrules/actions/EditRuleAction.d.ts +1 -1
  587. package/dist/settings/index.d.ts +0 -2
  588. package/dist/settings/index.es.js +419 -430
  589. package/dist/spending/SpendingMiniWidget.d.ts +1 -1
  590. package/dist/spending/SpendingWidget.d.ts +1 -1
  591. package/dist/spending/index.es.js +229 -222
  592. package/dist/spending/utils/SpendingData.d.ts +1 -1
  593. package/dist/transactions/TransactionWidget.d.ts +1 -1
  594. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -1
  595. package/dist/transactions/components/shared/TransactionList.d.ts +3 -4
  596. package/dist/transactions/components/shared/getEmbeddedInstanceSlotByBeatTemplates.d.ts +17 -0
  597. package/dist/transactions/components/shared/transactiondetails/Description.d.ts +1 -1
  598. package/dist/transactions/components/shared/transactiondetails/FlagTransaction.d.ts +1 -1
  599. package/dist/transactions/components/shared/transactiondetails/TransactionAmountHeader.d.ts +1 -1
  600. package/dist/transactions/components/shared/transactiondetails/TransactionDetailsView.d.ts +1 -1
  601. package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +13 -0
  602. package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.d.ts +1 -1
  603. package/dist/transactions/components/shared/transactiondetails/actions/DateAction.d.ts +1 -1
  604. package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.d.ts +1 -1
  605. package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.d.ts +1 -1
  606. package/dist/transactions/components/shared/transactiondetails/actions/ExcludeAction.d.ts +7 -0
  607. package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.d.ts +1 -1
  608. package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.d.ts +1 -1
  609. package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.d.ts +1 -1
  610. package/dist/transactions/components/shared/transactiondetails/actions/index.d.ts +2 -1
  611. package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -1
  612. package/dist/transactions/components/shared/transactiontable/cells/PayeeCell.d.ts +4 -1
  613. package/dist/transactions/components/splitmanager/SplitManager.d.ts +1 -1
  614. package/dist/transactions/components/splitmanager/SplitRow.d.ts +1 -1
  615. package/dist/transactions/components/tagmanager/TagRow.d.ts +1 -1
  616. package/dist/transactions/components/transactionwidget/actions/EditCategoryAction.d.ts +1 -1
  617. package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.d.ts +1 -1
  618. package/dist/transactions/constants/Actions.d.ts +4 -3
  619. package/dist/transactions/context/hooks.d.ts +1 -1
  620. package/dist/transactions/index.d.ts +0 -5
  621. package/dist/transactions/index.es.js +344 -351
  622. package/dist/transactions/utils/Filters.d.ts +1 -1
  623. package/dist/transactions/utils/Transactions.d.ts +17 -1
  624. package/dist/trends/TrendsFullWidget.d.ts +1 -1
  625. package/dist/trends/TrendsMiniWidget.d.ts +1 -1
  626. package/dist/trends/TrendsWidget.d.ts +1 -1
  627. package/dist/trends/components/CategoriesList.d.ts +1 -1
  628. package/dist/trends/components/CategoriesListItem.d.ts +1 -1
  629. package/dist/trends/components/CategoryDetails.d.ts +3 -0
  630. package/dist/trends/components/TrendsChartTotals.d.ts +1 -1
  631. package/dist/trends/components/TrendsInsights.d.ts +1 -1
  632. package/dist/trends/components/{TrendsTable.d.ts → TrendsTableContainer.d.ts} +2 -2
  633. package/dist/trends/components/trendstable/AccessibleSortIcon.d.ts +13 -0
  634. package/dist/trends/components/trendstable/TrendsTable.d.ts +12 -0
  635. package/dist/trends/index.d.ts +0 -1
  636. package/dist/trends/index.es.js +987 -874
  637. package/dist/trends/utils/SpendingData.d.ts +1 -1
  638. package/dist/trends/utils/TrendsTable.d.ts +5 -3
  639. package/dist/trends/utils/TrendsWidget.d.ts +7 -0
  640. package/dist/trends/utils/shared.d.ts +2 -2
  641. package/dist/{useAccountDisplayName-DbkgGLdg.mjs → useAccountDisplayName-CFa_MrS6.mjs} +5 -5
  642. package/dist/{useAriaLive-B3_pRUio.mjs → useAriaLive-MkYebyUR.mjs} +4 -4
  643. package/dist/{useDimensions-27p2evRx.mjs → useDimensions-CeDR9V8N.mjs} +6 -6
  644. package/dist/{useInsightsEnabled-dhmXeSyF.mjs → useInsightsEnabled-DaNLPmUU.mjs} +1 -1
  645. package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-mWpmnh5w.mjs} +3 -3
  646. package/dist/{useWidgetLoadTimer-CrUzxN-P.mjs → useWidgetLoadTimer-CJb-RELP.mjs} +1 -1
  647. package/package.json +65 -43
  648. package/dist/AccountApi-DgZ8ILj1.mjs +0 -19
  649. package/dist/AccountDetailsHeader-BOV91g1o.mjs +0 -95
  650. package/dist/AccountFields-BRRH37K1.mjs +0 -140
  651. package/dist/AccountListItem-Ds5C0mOT.mjs +0 -90
  652. package/dist/AccountStore-BFKvXJSD.mjs +0 -244
  653. package/dist/Accounts-CuE8aSZN.mjs +0 -27
  654. package/dist/BeatApi-De2IaqH2.mjs +0 -21
  655. package/dist/BeatStore-D_NYuBSz.mjs +0 -81
  656. package/dist/BudgetUtil-CDSOZXem.mjs +0 -101
  657. package/dist/CashflowStore-naOtJcwo.mjs +0 -91
  658. package/dist/CategoryStore-DEqAnHbi.mjs +0 -186
  659. package/dist/CategoryUtil-CFHBvaV4.mjs +0 -80
  660. package/dist/CurrencyInput-DDQ4DBrE.mjs +0 -85
  661. package/dist/DateUtil-CVsMhbZU.mjs +0 -48
  662. package/dist/DebtsStore-Dv_T7Dts.mjs +0 -63
  663. package/dist/Dialog-CWymUiuO.mjs +0 -120
  664. package/dist/Donut-Dmy3JTWd.mjs +0 -86
  665. package/dist/Fetch-DecPFeGU.mjs +0 -119
  666. package/dist/FinstrongStore-BjFkMTIL.mjs +0 -451
  667. package/dist/GlobalAccountFilter-BpWlPAl5.mjs +0 -316
  668. package/dist/GoalStore-Dbjgft2i.mjs +0 -422
  669. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
  670. package/dist/LineChart-DHj-Bufi.mjs +0 -580
  671. package/dist/Loader-BSWSYqvn.mjs +0 -24
  672. package/dist/Localization-2MODESHW.mjs +0 -30
  673. package/dist/ManageIncome-DIIyqDTp.mjs +0 -585
  674. package/dist/MerchantStore-WvZ4gnQe.mjs +0 -37
  675. package/dist/MiniWidgetContainer-DKn7ndO6.mjs +0 -56
  676. package/dist/NetWorthStore-B6ziBtaH.mjs +0 -168
  677. package/dist/Notification-Bs1fdbzI.mjs +0 -95
  678. package/dist/NotificationStore-Ck2KdNmT.mjs +0 -79
  679. package/dist/OriginalBalanceAction-DFoG79Ba.mjs +0 -115
  680. package/dist/RecurringTransactionsStore-D_--5PWH.mjs +0 -277
  681. package/dist/RepeatingTransaction-C2txVA9O.mjs +0 -292
  682. package/dist/SearchBox-B2_zLv8-.mjs +0 -42
  683. package/dist/SettingsStore-CInvh-rQ.mjs +0 -269
  684. package/dist/SpendingLegend-BxefXiQd.mjs +0 -193
  685. package/dist/TransactionApi-CjBoLleL.mjs +0 -86
  686. package/dist/TransactionDetails-CPwv9xtZ.mjs +0 -1374
  687. package/dist/TransactionStore-D2aMUClq.mjs +0 -688
  688. package/dist/TrendsStore-BdsYfCc7.mjs +0 -183
  689. package/dist/User-CulNdZUr.mjs +0 -314
  690. package/dist/ViewMoreMicroCard-CDWR16_h.mjs +0 -1147
  691. package/dist/WidgetContainer-mzejMmz2.mjs +0 -555
  692. package/dist/accounts/stores/UiStore.d.ts +0 -10
  693. package/dist/accounts/utils/index.d.ts +0 -1
  694. package/dist/cashflow/api/CashflowApi.d.ts +0 -13
  695. package/dist/cashflow/stores/CashflowStore.d.ts +0 -8
  696. package/dist/categories/stores/UiStore.d.ts +0 -20
  697. package/dist/common/api/LocalizedCopyApi.d.ts +0 -8
  698. package/dist/common/api/index.d.ts +0 -10
  699. package/dist/common/components/barchart/Bar.d.ts +0 -25
  700. package/dist/common/components/barchart/BarChart.d.ts +0 -34
  701. package/dist/common/components/barchart/BarColumn.d.ts +0 -37
  702. package/dist/common/components/barchart/Legend.d.ts +0 -8
  703. package/dist/common/components/barchart/Util.d.ts +0 -42
  704. package/dist/common/components/barchart/index.d.ts +0 -1
  705. package/dist/common/stores/index.d.ts +0 -3
  706. package/dist/common/types/SpendingPlan.d.ts +0 -44
  707. package/dist/common/utils/Categories.d.ts +0 -6
  708. package/dist/debts/store/DebtsStore.d.ts +0 -9
  709. package/dist/debts/store/DebtsUiStore.d.ts +0 -13
  710. package/dist/debts/utils/DebtStore.d.ts +0 -4
  711. package/dist/debts/utils/DebtsWidget.d.ts +0 -14
  712. package/dist/debts/utils/shared.d.ts +0 -12
  713. package/dist/exportTransactionsToCSV-BU1jTY0Q.mjs +0 -48
  714. package/dist/help/constants/index.d.ts +0 -1
  715. package/dist/help/utils/getAccessibleHelpCategories.d.ts +0 -3
  716. package/dist/transactions/analytics.d.ts +0 -3
  717. package/dist/transactions/components/shared/transactiondetails/actions/HideAction.d.ts +0 -7
  718. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
  719. package/dist/transactions/constants/Transaction.d.ts +0 -2
  720. package/dist/transactions/constants/TransactionsTable.d.ts +0 -17
  721. package/dist/transactions/stores/UiStore.d.ts +0 -25
  722. package/dist/transactions/utils/exportTransactionsToCSV.d.ts +0 -9
  723. package/dist/transactions/utils/sortAndFilterTransactions.d.ts +0 -3
  724. package/dist/trends/components/CategoryDetailDrawer.d.ts +0 -7
  725. package/dist/useCombineEvents-CRwX-qWE.mjs +0 -92
  726. package/dist/{common → core}/constants/Category.d.ts +0 -0
  727. package/dist/{common → core}/constants/DateFormats.d.ts +0 -0
  728. package/dist/{debts/constants/index.d.ts → core/constants/Debts.d.ts} +0 -0
  729. package/dist/{help → core}/constants/Help.d.ts +0 -0
  730. package/dist/{investments/constants/index.d.ts → core/constants/Investments.d.ts} +0 -0
  731. package/dist/{common → core}/constants/Numbers.d.ts +0 -0
  732. package/dist/{common → core}/constants/Table.d.ts +0 -0
  733. package/dist/{common → core}/stores/GlobalCopyStore.d.ts +0 -0
  734. package/dist/{common → core}/stores/GlobalUiStore.d.ts +0 -0
  735. package/dist/{common → core}/stores/UserStore.d.ts +1 -1
  736. /package/dist/{common → core}/types/Account.d.ts +0 -0
  737. /package/dist/{common → core}/types/Cashflow.d.ts +0 -0
  738. /package/dist/{common → core}/types/Category.d.ts +0 -0
  739. /package/dist/{common → core}/types/Date.d.ts +0 -0
  740. /package/dist/{common → core}/types/Debt.d.ts +0 -0
  741. /package/dist/{common → core}/types/Global.d.ts +0 -0
  742. /package/dist/{common → core}/types/GlobalCopy.d.ts +0 -0
  743. /package/dist/{common → core}/types/Goal.d.ts +0 -0
  744. /package/dist/{common → core}/types/Handlers.d.ts +0 -0
  745. /package/dist/{common → core}/types/Help.d.ts +0 -0
  746. /package/dist/{common → core}/types/Holding.d.ts +0 -0
  747. /package/dist/{common → core}/types/Institution.d.ts +0 -0
  748. /package/dist/{common → core}/types/LocalizedContent.d.ts +0 -0
  749. /package/dist/{common → core}/types/Merchant.d.ts +0 -0
  750. /package/dist/{common → core}/types/RepeatingTransaction.d.ts +0 -0
  751. /package/dist/{common → core}/types/ScheduledPayment.d.ts +0 -0
  752. /package/dist/{common → core}/types/ScreenSize.d.ts +0 -0
  753. /package/dist/{common → core}/types/Transaction.d.ts +0 -0
  754. /package/dist/{common → core}/types/User.d.ts +0 -0
  755. /package/dist/{common → core}/types/localization/AccountFilterCopy.d.ts +0 -0
  756. /package/dist/{common → core}/types/localization/AccountTypeCopy.d.ts +0 -0
  757. /package/dist/{common → core}/types/localization/AccountsCopy.d.ts +0 -0
  758. /package/dist/{common → core}/types/localization/AnalyticsCopy.d.ts +0 -0
  759. /package/dist/{common → core}/types/localization/CategoryCopy.d.ts +0 -0
  760. /package/dist/{common → core}/types/localization/ConnectCopy.d.ts +0 -0
  761. /package/dist/{common → core}/types/localization/CurrencyInputCopy.d.ts +0 -0
  762. /package/dist/{common → core}/types/localization/DateRangePickerCopy.d.ts +0 -0
  763. /package/dist/{common → core}/types/localization/FinstrongCopy.d.ts +0 -0
  764. /package/dist/{common → core}/types/localization/HelpCopy.d.ts +0 -0
  765. /package/dist/{common → core}/types/localization/InvestmentsCopy.d.ts +0 -0
  766. /package/dist/{common → core}/types/localization/MicroInsightsCopy.d.ts +0 -0
  767. /package/dist/{common → core}/types/localization/NetWorthCopy.d.ts +0 -0
  768. /package/dist/{common → core}/types/localization/NotificationsCopy.d.ts +0 -0
  769. /package/dist/{common → core}/types/localization/SettingsCopy.d.ts +0 -0
  770. /package/dist/{common → core}/types/localization/index.d.ts +0 -0
  771. /package/dist/{common → core}/utils/DateUtil.d.ts +0 -0
  772. /package/dist/{common → core}/utils/Fetch.d.ts +0 -0
  773. /package/dist/{common/utils/User.d.ts → core/utils/UserUtils.d.ts} +0 -0
@@ -1,267 +1,269 @@
1
- import { jsxs as g, jsx as e, Fragment as ze } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as e, Fragment as Ve } from "react/jsx-runtime";
2
2
  import l from "react";
3
- import { observer as E } from "mobx-react-lite";
4
- import { endOfMonth as ue } from "date-fns/endOfMonth";
5
- import { startOfMonth as J } from "date-fns/startOfMonth";
6
- import F from "@mui/material/Box";
7
- import B from "@mui/material/Stack";
8
- import ee from "@mui/material/styles/useTheme";
9
- import { Text as y, CategoryIcon as H, Icon as P, H2 as Ue, H3 as xe } from "@mxenabled/mxui";
10
- import W from "@mui/material/List";
11
- import { u as w, i as D, j as te, m as K, p as ne, g as X, b as oe, h as ae, a as Fe, d as ve } from "../hooks-fY_n74f7.mjs";
12
- import { f as T } from "../NumberFormatting-DjTD0t3W.mjs";
13
- import Ae from "@mui/material/Button";
14
- import re from "@mui/material/Divider";
15
- import V from "@mui/material/ListItem";
16
- import se from "@mui/material/ListItemAvatar";
17
- import Y from "@mui/material/ListItemButton";
18
- import Z from "@mui/material/ListItemText";
19
- import { b as L } from "../Localization-2MODESHW.mjs";
20
- import { D as $ } from "../Drawer-Bet2ZPJo.mjs";
21
- import He from "@mui/material/ListItemSecondaryAction";
22
- import { C as We } from "../CurrencyInput-DDQ4DBrE.mjs";
23
- import { a as z } from "../Dialog-CWymUiuO.mjs";
24
- import { C as Ke } from "../ConnectionsDrawer-BExzgE16.mjs";
3
+ import { observer as I } from "mobx-react-lite";
4
+ import { endOfMonth as Be } from "date-fns/endOfMonth";
5
+ import { isAfter as Ke } from "date-fns/isAfter";
6
+ import { startOfMonth as ie } from "date-fns/startOfMonth";
7
+ import { startOfToday as re } from "date-fns/startOfToday";
8
+ import Ae from "@mui/material/Alert";
9
+ import xe from "@mui/material/Snackbar";
10
+ import x from "@mui/material/Stack";
11
+ import { useTheme as H, alpha as Ye } from "@mui/material/styles";
12
+ import X from "@mui/material/Box";
13
+ import Z from "@mui/material/List";
14
+ import { b as R } from "../Localization-DnoVyBNK.mjs";
15
+ import { Text as C, CategoryIcon as V, Icon as z, H3 as Le } from "@mxenabled/mxui";
16
+ import { f as D } from "../NumberFormatting--XMeeBfr.mjs";
17
+ import { u as E, o as w, i as le, l as q, D as de, a as Ne, g as J, b as Q, h as ee, d as ke } from "../hooks-BaO_gOI6.mjs";
18
+ import $e from "@mui/material/Button";
19
+ import ue from "@mui/material/Divider";
20
+ import te from "@mui/material/ListItem";
21
+ import me from "@mui/material/ListItemAvatar";
22
+ import oe from "@mui/material/ListItemButton";
23
+ import ne from "@mui/material/ListItemText";
24
+ import { D as $ } from "../Drawer-BXqqBMxg.mjs";
25
+ import Xe from "@mui/material/ListItemSecondaryAction";
26
+ import { C as Ze } from "../CurrencyInput-adTIRtL3.mjs";
27
+ import { D as W } from "../Dialog-CwWc0AbH.mjs";
28
+ import { C as qe } from "../ConnectionsDrawer-CtfPXk0M.mjs";
25
29
  import * as O from "d3";
26
- import Xe from "@mui/material/Tooltip";
27
- import { useTheme as Ve } from "@mui/material/styles";
28
- import { L as ge } from "../Loader-BSWSYqvn.mjs";
29
- import { u as ie } from "../useScreenSize-B6JyS_Lj.mjs";
30
- import { E as le } from "../EmptyState-DoxNUae-.mjs";
31
- import { A as N, W as Ye } from "../WidgetContainer-mzejMmz2.mjs";
32
- import { u as Ze } from "../BudgetUtil-CDSOZXem.mjs";
33
- import { M as qe } from "../MiniWidgetContainer-DKn7ndO6.mjs";
34
- import { u as Te } from "../useWidgetLoadTimer-CrUzxN-P.mjs";
35
- import { isAfter as Je } from "date-fns/isAfter";
36
- import { startOfToday as q } from "date-fns/startOfToday";
37
- import we from "@mui/material/Alert";
38
- import De from "@mui/material/Snackbar";
39
- import ye from "@mui/material/Tab";
30
+ import Je from "@mui/material/Tooltip";
31
+ import { u as ge } from "../useScreenSize-mWpmnh5w.mjs";
32
+ import { L as pe } from "../Loader-CxeBwuPG.mjs";
33
+ import { E as _e } from "../EmptyState-CJUDc3kD.mjs";
34
+ import { A as P } from "../Analytics-CzGzz_sE.mjs";
35
+ import Ee from "@mui/material/Tab";
40
36
  import Qe from "@mui/material/Tabs";
41
- import { e as et } from "../exportTransactionsToCSV-BU1jTY0Q.mjs";
42
- import { T as Ee, a as tt } from "../TransactionDetails-CPwv9xtZ.mjs";
43
- import pe from "@mui/material/Card";
44
- import he from "@mui/material/CardContent";
45
- import { S as me } from "../StatusBar-CPfSXe80.mjs";
46
- import { S as Ie } from "../SingleSegmentDonut-PsRQPkmV.mjs";
47
- import { u as nt, C as ot } from "../CategorySelectorDrawer-C4aZYP4N.mjs";
48
- import Oe from "@mui/material/CardHeader";
49
- import { subDays as at } from "date-fns/subDays";
50
- import rt from "@mui/material/IconButton";
51
- import { M as st } from "../ManageIncome-DIIyqDTp.mjs";
52
- const it = E(() => {
53
- const { budgets: t } = w(), { totalBudgeted: o } = D(), { incomeTotal: i } = te(), s = i - o;
54
- return /* @__PURE__ */ g(B, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
55
- /* @__PURE__ */ g(B, { alignItems: "center", children: [
56
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(i, "0,0") }),
57
- /* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.projected_income })
37
+ import { e as et, g as we } from "../TransactionUtils-BphBJBbU.mjs";
38
+ import { T as ve } from "../EmbeddedCard-DPwJjqMH.mjs";
39
+ import { T as tt, c as ot } from "../TransactionDetails-C3dlAzYf.mjs";
40
+ import Te from "@mui/material/Card";
41
+ import De from "@mui/material/CardContent";
42
+ import { S as Se } from "../StatusBar-CPfSXe80.mjs";
43
+ import { S as Ge } from "../SingleSegmentDonut-7Uy6VEld.mjs";
44
+ import { u as nt, C as at } from "../CategorySelectorDrawer-CmaDLhnf.mjs";
45
+ import Pe from "@mui/material/CardHeader";
46
+ import { subDays as rt } from "date-fns/subDays";
47
+ import st from "@mui/material/IconButton";
48
+ import { M as it } from "../ManageIncome-B1JfqslT.mjs";
49
+ import { u as je } from "../useWidgetLoadTimer-CJb-RELP.mjs";
50
+ import { W as ct } from "../WidgetContainer-DNuz_s7W.mjs";
51
+ import { g as lt, a as dt } from "../BudgetUtil-Bg2AQJpQ.mjs";
52
+ import { M as ut } from "../MiniWidgetContainer-BdPiUU-u.mjs";
53
+ import { b as mt } from "../CurrencyDialog-DumQCTPO.mjs";
54
+ const gt = I(() => {
55
+ const { budgets: t } = E(), { totalBudgeted: n } = w(), { incomeTotal: c } = le(), i = c - n;
56
+ return /* @__PURE__ */ m(x, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
57
+ /* @__PURE__ */ m(x, { alignItems: "center", children: [
58
+ /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: D(c, "0,0") }),
59
+ /* @__PURE__ */ e(C, { color: "secondary", variant: "body2", children: t.projected_income })
58
60
  ] }),
59
- /* @__PURE__ */ e(y, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
60
- /* @__PURE__ */ g(B, { alignItems: "center", children: [
61
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(o, "0,0") }),
62
- /* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.budgeted })
61
+ /* @__PURE__ */ e(C, { bold: !0, justifyContent: "center", variant: "body1", children: "-" }),
62
+ /* @__PURE__ */ m(x, { alignItems: "center", children: [
63
+ /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: D(n, "0,0") }),
64
+ /* @__PURE__ */ e(C, { color: "secondary", variant: "body2", children: t.budgeted })
63
65
  ] }),
64
- /* @__PURE__ */ e(y, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
65
- /* @__PURE__ */ g(B, { alignItems: "center", children: [
66
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(s, "0,0") }),
67
- /* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.remaining })
66
+ /* @__PURE__ */ e(C, { bold: !0, justifyContent: "center", variant: "body1", children: "=" }),
67
+ /* @__PURE__ */ m(x, { alignItems: "center", children: [
68
+ /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: D(i, "0,0") }),
69
+ /* @__PURE__ */ e(C, { color: "secondary", variant: "body2", children: t.remaining })
68
70
  ] })
69
71
  ] });
70
- }), ct = E(
72
+ }), pt = I(
71
73
  ({ category: t }) => {
72
- const { budgets: o } = w(), { budgets: i } = D(), s = l.useMemo(() => {
73
- const a = i.find((c) => c.category_guid === t.guid), r = T(t.totalAverageAmount, "0,0"), n = a ? L(o.recalculate_previous_budget, T(a.amount, "0,0")) : o.recalculate_new_budget;
74
- return `${r} - ${n}`;
75
- }, [o, i]);
76
- return /* @__PURE__ */ g(l.Fragment, { children: [
77
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { children: [
78
- /* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(H, { categoryGuid: t.guid, variant: "filled" }) }),
79
- /* @__PURE__ */ e(Z, { primary: t.name, secondary: s })
74
+ const { budgets: n } = E(), { budgets: c } = w(), i = l.useMemo(() => {
75
+ const a = c.find((r) => r.category_guid === t.guid), s = D(t.totalAverageAmount, "0,0"), o = a ? R(n.recalculate_previous_budget, D(a.amount, "0,0")) : n.recalculate_new_budget;
76
+ return `${s} - ${o}`;
77
+ }, [n, c]);
78
+ return /* @__PURE__ */ m(l.Fragment, { children: [
79
+ /* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(oe, { children: [
80
+ /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(V, { categoryGuid: t.guid, variant: "filled" }) }),
81
+ /* @__PURE__ */ e(ne, { primary: t.name, secondary: i })
80
82
  ] }) }),
81
- /* @__PURE__ */ e(re, {})
83
+ /* @__PURE__ */ e(ue, {})
82
84
  ] }, t.guid);
83
85
  }
84
- ), lt = ({ onRecalculateBudgets: t }) => {
85
- const { budgets: o, common: i } = w(), { spendCategories: s } = K(), { recalculateBudgets: a, setAlert: r } = D(), [n, c] = l.useState(!1), d = s.filter((u) => u.totalAverageAmount > 0), m = async () => {
86
- await a(d), c(!1), r(o.alert_recalculated_budgets), t?.();
86
+ ), ht = ({ onRecalculateBudgets: t }) => {
87
+ const { budgets: n, common: c } = E(), { spendCategories: i } = q(), { recalculateBudgets: a, setAlert: s } = w(), [o, r] = l.useState(!1), p = i.filter((u) => u.totalAverageAmount > 0), d = async () => {
88
+ await a(p), r(!1), s(n.alert_recalculated_budgets), t?.();
87
89
  };
88
- return /* @__PURE__ */ g(l.Fragment, { children: [
89
- /* @__PURE__ */ e(Ae, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: o.recalculate_button }),
90
- /* @__PURE__ */ e(y, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: o.recalculate_help }),
90
+ return /* @__PURE__ */ m(l.Fragment, { children: [
91
+ /* @__PURE__ */ e($e, { onClick: () => r(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: n.recalculate_button }),
92
+ /* @__PURE__ */ e(C, { sx: { mx: 24, my: 16, textAlign: "center" }, variant: "subtitle1", children: n.recalculate_help }),
91
93
  /* @__PURE__ */ e(
92
94
  $,
93
95
  {
94
- ariaLabelClose: i.close_aria,
95
- isOpen: n,
96
- onClose: () => c(!1),
97
- onPrimaryAction: m,
98
- title: o.recalculate_title,
99
- children: /* @__PURE__ */ g(B, { children: [
100
- /* @__PURE__ */ g(B, { mx: 24, my: 16, children: [
101
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: o.recalculate_description_top }),
102
- /* @__PURE__ */ e(y, { variant: "ParagraphSmall", children: o.recalculate_description_bottom })
96
+ ariaLabelClose: c.close_aria,
97
+ isOpen: o,
98
+ onClose: () => r(!1),
99
+ onPrimaryAction: d,
100
+ title: n.recalculate_title,
101
+ children: /* @__PURE__ */ m(x, { children: [
102
+ /* @__PURE__ */ m(x, { mx: 24, my: 16, children: [
103
+ /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: n.recalculate_description_top }),
104
+ /* @__PURE__ */ e(C, { variant: "subtitle2", children: n.recalculate_description_bottom })
103
105
  ] }),
104
- /* @__PURE__ */ e(F, { bgcolor: "background.paper", children: /* @__PURE__ */ e(W, { children: d.map((u) => /* @__PURE__ */ e(ct, { category: u }, u.guid)) }) })
106
+ /* @__PURE__ */ e(X, { bgcolor: "background.paper", children: /* @__PURE__ */ e(Z, { children: p.map((u) => /* @__PURE__ */ e(pt, { category: u }, u.guid)) }) })
105
107
  ] })
106
108
  }
107
109
  )
108
110
  ] });
109
- }, ce = ({
111
+ }, he = ({
110
112
  amount: t,
111
- categoryName: o,
112
- onAmountChanged: i
113
+ categoryName: n,
114
+ onAmountChanged: c
113
115
  }) => {
114
- const { budgets: s } = w(), { totalBudgeted: a } = D(), { incomeTotal: r } = te(), n = r - a;
115
- return /* @__PURE__ */ g(B, { gap: 16, children: [
116
- /* @__PURE__ */ g(B, { children: [
117
- /* @__PURE__ */ e(y, { children: L(
118
- s.add_description_top,
119
- T(n, "0,0")
116
+ const { budgets: i } = E(), { totalBudgeted: a } = w(), { incomeTotal: s } = le(), o = s - a;
117
+ return /* @__PURE__ */ m(x, { gap: 16, children: [
118
+ /* @__PURE__ */ m(x, { children: [
119
+ /* @__PURE__ */ e(C, { children: R(
120
+ i.add_description_top,
121
+ D(o, "0,0")
120
122
  ) }),
121
- /* @__PURE__ */ e(y, { children: L(s.add_description_bottom, o) })
123
+ /* @__PURE__ */ e(C, { children: R(i.add_description_bottom, n) })
122
124
  ] }),
123
125
  /* @__PURE__ */ e(
124
- We,
126
+ Ze,
125
127
  {
126
128
  amount: t,
127
129
  autoFocus: !0,
128
- label: s.add_label,
130
+ label: i.add_label,
129
131
  minAmount: 0,
130
- setAmount: i,
131
- sx: { ".MuiTypography-Body": { p: 0 } }
132
+ setAmount: c,
133
+ sx: { ".MuiTypography-body1": { p: 0 } }
132
134
  }
133
135
  )
134
136
  ] });
135
- }, dt = E(({ category: t, onAddBudget: o }) => {
136
- const { budgets: i, common: s } = w(), [a, r] = l.useState(!1), [n, c] = l.useState(
137
+ }, bt = I(({ category: t, onAddBudget: n }) => {
138
+ const { budgets: c, common: i } = E(), [a, s] = l.useState(!1), [o, r] = l.useState(
137
139
  `${t.totalAmount === 0 ? "" : t.totalAmount}`
138
140
  );
139
- return /* @__PURE__ */ g(l.Fragment, { children: [
140
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { onClick: () => r(!0), children: [
141
- /* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(H, { categoryGuid: t.guid }) }),
141
+ return /* @__PURE__ */ m(l.Fragment, { children: [
142
+ /* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(oe, { onClick: () => s(!0), children: [
143
+ /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(V, { categoryGuid: t.guid }) }),
142
144
  /* @__PURE__ */ e(
143
- Z,
145
+ ne,
144
146
  {
145
147
  primary: t.name,
146
- secondary: T(t.totalAmount, "0,0")
148
+ secondary: D(t.totalAmount, "0,0")
147
149
  }
148
150
  ),
149
- /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(P, { name: "add", size: 20 }) })
151
+ /* @__PURE__ */ e(Xe, { children: /* @__PURE__ */ e(z, { name: "add", size: 20 }) })
150
152
  ] }) }, t.guid),
151
153
  /* @__PURE__ */ e(
152
- z,
154
+ W,
153
155
  {
154
- copy: { close_aria: s.close_aria, title: i.add_title },
155
- disablePrimaryButton: Number(n) <= 0,
156
+ copy: { close_aria: i.close_aria, title: c.add_title },
157
+ disablePrimaryButton: Number(o) <= 0,
156
158
  isOpen: a,
157
- onClose: () => r(!1),
158
- onPrimaryAction: () => o(t, Number(n)),
159
- primaryText: i.add_save_button,
160
- children: /* @__PURE__ */ e(ce, { amount: n, categoryName: t.name, onAmountChanged: c })
159
+ onClose: () => s(!1),
160
+ onPrimaryAction: () => n(t, Number(o)),
161
+ primaryText: c.add_save_button,
162
+ children: /* @__PURE__ */ e(he, { amount: o, categoryName: t.name, onAmountChanged: r })
161
163
  }
162
164
  )
163
165
  ] });
164
- }), Re = E(({ onAddBudget: t, onRecalculateBudgets: o }) => {
165
- const { budgets: i } = w(), { addBudget: s, setAlert: a, unbudgetedCategories: r } = D(), n = async (c, d) => {
166
- await s(c, d), t?.(), a(L(i.alert_budget_created, c.name));
166
+ }), ze = I(({ onAddBudget: t, onRecalculateBudgets: n }) => {
167
+ const { budgets: c } = E(), { addBudget: i, setAlert: a, unbudgetedCategories: s } = w(), o = async (r, p) => {
168
+ await i(r, p), t?.(), a(R(c.alert_budget_created, r.name));
167
169
  };
168
- return /* @__PURE__ */ g(B, { children: [
169
- /* @__PURE__ */ e(it, {}),
170
- /* @__PURE__ */ e(F, { bgcolor: "background.paper", children: /* @__PURE__ */ e(W, { children: r.map((c) => /* @__PURE__ */ e(
171
- dt,
170
+ return /* @__PURE__ */ m(x, { children: [
171
+ /* @__PURE__ */ e(gt, {}),
172
+ /* @__PURE__ */ e(X, { bgcolor: "background.paper", children: /* @__PURE__ */ e(Z, { children: s.map((r) => /* @__PURE__ */ e(
173
+ bt,
172
174
  {
173
- category: c,
174
- onAddBudget: n
175
+ category: r,
176
+ onAddBudget: o
175
177
  },
176
- c.guid
178
+ r.guid
177
179
  )) }) }),
178
- /* @__PURE__ */ e(lt, { onRecalculateBudgets: o })
180
+ /* @__PURE__ */ e(ht, { onRecalculateBudgets: n })
179
181
  ] });
180
- }), _e = 5, Me = 100, Q = 25, ut = (t) => {
181
- const o = (a) => {
182
+ }), Ie = 5, Fe = 100, ce = 25, ft = (t) => {
183
+ const n = (a) => {
182
184
  a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
183
- }, i = (a) => {
185
+ }, c = (a) => {
184
186
  a.subject.fx = a.x, a.subject.fy = a.y;
185
- }, s = (a) => {
187
+ }, i = (a) => {
186
188
  a.active || t.alphaTarget(0), a.subject.fx = null, a.subject.fy = null;
187
189
  };
188
- return O.drag().on("start", o).on("drag", i).on("end", s);
189
- }, mt = (t) => {
190
- let o = t.transaction_total / t.amount;
191
- o < 0 ? o = 0 : o > 1 && (o = 1);
192
- const i = o * 2 * Math.PI, s = O.interpolate(0, i), a = O.arc().cornerRadius(5).innerRadius(t.radius - _e * 2).outerRadius(t.radius - _e).startAngle(0).endAngle(0);
193
- return (r) => (a.endAngle(s(r)), a(t) || "");
194
- }, gt = (t) => {
195
- O.selectAll(".bubble").call(ut(t));
196
- }, Ce = (t, o, i) => Math.min(Math.max(t, o), i), pt = (t, o, i) => {
190
+ return O.drag().on("start", n).on("drag", c).on("end", i);
191
+ }, yt = (t) => {
192
+ let n = t.transaction_total / t.amount;
193
+ n < 0 ? n = 0 : n > 1 && (n = 1);
194
+ const c = n * 2 * Math.PI, i = O.interpolate(0, c), a = O.arc().cornerRadius(5).innerRadius(t.radius - Ie * 2).outerRadius(t.radius - Ie).startAngle(0).endAngle(0);
195
+ return (s) => (a.endAngle(i(s)), a(t) || "");
196
+ }, _t = (t) => {
197
+ O.selectAll(".bubble").call(ft(t));
198
+ }, Oe = (t, n, c) => Math.min(Math.max(t, n), c), Ct = (t, n, c) => {
197
199
  t.alpha(1).restart().force(
198
200
  "x",
199
- O.forceX().x(i / 2).strength(0.01)
201
+ O.forceX().x(c / 2).strength(0.01)
200
202
  ).force(
201
203
  "y",
202
- O.forceY().y(o / 2).strength(0.02)
204
+ O.forceY().y(n / 2).strength(0.02)
203
205
  ).on("tick", () => {
204
- const s = t.nodes();
205
- s.forEach((a) => {
206
- const r = a.radius ?? Q;
207
- a.x = Ce(a.x ?? 0, r, i - r), a.y = Ce(a.y ?? 0, r, o - r);
208
- }), O.selectAll(".bubble").data(s).attr("transform", (a) => `translate(${a.x},${a.y})`);
206
+ const i = t.nodes();
207
+ i.forEach((a) => {
208
+ const s = a.radius ?? ce;
209
+ a.x = Oe(a.x ?? 0, s, c - s), a.y = Oe(a.y ?? 0, s, n - s);
210
+ }), O.selectAll(".bubble").data(i).attr("transform", (a) => `translate(${a.x},${a.y})`);
209
211
  });
210
- }, Le = (t, o) => O.scaleLinear().domain([t, o]).range([Q, Me]), ht = (t) => {
211
- const o = t.reduce((r, n) => {
212
- const c = Math.max(n.transaction_total, n.amount);
213
- return c > r ? c : r;
214
- }, 0), i = t.reduce((r, n) => {
215
- const c = Math.max(n.transaction_total, n.amount);
216
- return c < r ? c : r;
217
- }, o), s = Le(i, o), a = t.map((r) => {
218
- const n = s(Math.max(r.transaction_total, r.amount)) || 25;
212
+ }, Ue = (t, n) => O.scaleLinear().domain([t, n]).range([ce, Fe]), Bt = (t) => {
213
+ const n = t.reduce((s, o) => {
214
+ const r = Math.max(o.transaction_total, o.amount);
215
+ return r > s ? r : s;
216
+ }, 0), c = t.reduce((s, o) => {
217
+ const r = Math.max(o.transaction_total, o.amount);
218
+ return r < s ? r : s;
219
+ }, n), i = Ue(c, n), a = t.map((s) => {
220
+ const o = i(Math.max(s.transaction_total, s.amount)) || 25;
219
221
  return {
220
- ...r,
221
- radius: n
222
+ ...s,
223
+ radius: o
222
224
  };
223
225
  });
224
- return O.forceSimulation(a).velocityDecay(0.05).force("collide", O.forceCollide((r) => r.radius + 2).strength(0.7));
225
- }, ft = (t, o, i) => {
226
- const a = Math.PI * Q ** 2 * t, r = i < 400 || o < 300, n = r ? 40 : 20, c = Math.max(100, i - n), d = Math.max(100, o - n), m = c * d;
227
- let u = Q;
228
- if (a < m) {
229
- const h = Math.sqrt(m / (t * Math.PI)), b = Math.min(c, d) / 4;
230
- u = Math.min(Me, h, b);
226
+ return O.forceSimulation(a).velocityDecay(0.05).force("collide", O.forceCollide((s) => s.radius + 2).strength(0.7));
227
+ }, St = (t, n, c) => {
228
+ const a = Math.PI * ce ** 2 * t, s = c < 400 || n < 300, o = s ? 40 : 20, r = Math.max(100, c - o), p = Math.max(100, n - o), d = r * p;
229
+ let u = ce;
230
+ if (a < d) {
231
+ const g = Math.sqrt(d / (t * Math.PI)), h = Math.min(r, p) / 4;
232
+ u = Math.min(Fe, g, h);
231
233
  }
232
- return r && t <= 3 && (u = Math.min(u, 45)), { minRadius: Math.max(20, u * 0.6), maxRadius: u };
233
- }, bt = (t, o, i, s, a) => {
234
- const { maxRadius: r, minRadius: n } = ft(t, o, a);
235
- return O.scaleLinear().domain([s, i]).range([n, r]);
236
- }, yt = (t, o, i = !1, s, a) => {
237
- const r = o.map((m) => Math.max(m.transaction_total, m.amount)), n = Math.min(...r), c = Math.max(...r), d = i ? bt(t.length, s, c, n, a) : Le(n, c);
238
- return t.map((m) => ({
239
- ...m,
240
- radius: d(Math.max(m.transaction_total, m.amount))
234
+ return s && t <= 3 && (u = Math.min(u, 45)), { minRadius: Math.max(20, u * 0.6), maxRadius: u };
235
+ }, At = (t, n, c, i, a) => {
236
+ const { maxRadius: s, minRadius: o } = St(t, n, a);
237
+ return O.scaleLinear().domain([i, c]).range([o, s]);
238
+ }, xt = (t, n, c = !1, i, a) => {
239
+ const s = n.map((d) => Math.max(d.transaction_total, d.amount)), o = Math.min(...s), r = Math.max(...s), p = c ? At(t.length, i, r, o, a) : Ue(o, r);
240
+ return t.map((d) => ({
241
+ ...d,
242
+ radius: p(Math.max(d.transaction_total, d.amount))
241
243
  }));
242
- }, Be = 5, _t = 2e3, Ct = ({ bubble: t }) => {
243
- const o = ee(), {
244
- amount: i,
245
- guid: s,
244
+ }, Me = 5, vt = 2e3, Tt = ({ bubble: t }) => {
245
+ const n = H(), {
246
+ amount: c,
247
+ guid: i,
246
248
  budgetColors: { mercury: a },
247
- radius: r,
248
- transaction_total: n
249
- } = t, c = `mercury-${s}`;
249
+ radius: s,
250
+ transaction_total: o
251
+ } = t, r = `mercury-${i}`;
250
252
  l.useEffect(() => {
251
- O.select(`.${c}`).selectAll(".status").remove(), O.select(`.${c}`).append("path").transition().duration(_t).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => mt(t));
252
- }, [i, r, n]);
253
- const d = O.arc().innerRadius((m) => m - 2 * Be).outerRadius((m) => m - Be).startAngle(0).endAngle(2 * Math.PI);
254
- return /* @__PURE__ */ e("g", { className: c, children: /* @__PURE__ */ e(
253
+ O.select(`.${r}`).selectAll(".status").remove(), O.select(`.${r}`).append("path").transition().duration(vt).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => yt(t));
254
+ }, [c, s, o]);
255
+ const p = O.arc().innerRadius((d) => d - 2 * Me).outerRadius((d) => d - Me).startAngle(0).endAngle(2 * Math.PI);
256
+ return /* @__PURE__ */ e("g", { className: r, children: /* @__PURE__ */ e(
255
257
  "path",
256
258
  {
257
- d: d(r) || "",
258
- style: { fill: o.palette.common.white, fillOpacity: 0.35 }
259
+ d: p(s) || "",
260
+ style: { fill: n.palette.common.white, fillOpacity: 0.35 }
259
261
  }
260
262
  ) });
261
- }, Bt = l.memo(Ct), j = 75, de = 50;
262
- function St({ bubble: t, isDraggable: o, onClick: i = () => {
263
+ }, Dt = l.memo(Tt), U = 75, Ce = 50;
264
+ function Et({ bubble: t, isDraggable: n, onClick: c = () => {
263
265
  } }) {
264
- const [s, a] = l.useState(!1), r = Ve(), { availableWidth: n } = ne(), c = l.useMemo(() => {
266
+ const [i, a] = l.useState(!1), s = H(), { availableWidth: o } = de(), r = l.useMemo(() => {
265
267
  if (t)
266
268
  return {
267
269
  amount: t.amount,
@@ -273,50 +275,50 @@ function St({ bubble: t, isDraggable: o, onClick: i = () => {
273
275
  }, [t.amount, t.budgetColors, t.guid, t.radius, t.transaction_total]);
274
276
  if (!t) return;
275
277
  const {
276
- budgetColors: { background: d, text: m },
277
- category: { icon: u, name: f },
278
- guid: h,
279
- description: b,
280
- radius: p,
281
- x: _,
282
- y: S
283
- } = t, C = n < 400 ? -8 : -12;
284
- let v = C, A = C;
285
- p > j ? (v = -14, A = -45) : p > de && (A = -32);
286
- let x = 32;
287
- p <= j && (x = n < 400 ? 16 : 24);
288
- const R = `${t.category.name}: ${b}`, M = {
278
+ budgetColors: { background: p, text: d },
279
+ category: { icon: u, name: S },
280
+ guid: g,
281
+ description: h,
282
+ radius: _,
283
+ x: y,
284
+ y: A
285
+ } = t, v = o < 400 ? -8 : -12;
286
+ let b = v, B = v;
287
+ _ > U ? (b = -14, B = -45) : _ > Ce && (B = -32);
288
+ let f = 32;
289
+ _ <= U && (f = o < 400 ? 16 : 24);
290
+ const T = `${t.category.name}: ${h}`, L = {
289
291
  modifiers: [
290
292
  {
291
293
  name: "offset",
292
294
  options: { offset: [0, 15] }
293
295
  }
294
296
  ]
295
- }, I = (U) => {
296
- (U.key === "Enter" || U.key === " ") && (U.preventDefault(), i(t));
297
- }, k = () => {
297
+ }, M = (G) => {
298
+ (G.key === "Enter" || G.key === " ") && (G.preventDefault(), c(t));
299
+ }, N = () => {
298
300
  a(!0);
299
- }, G = () => {
301
+ }, k = () => {
300
302
  a(!1);
301
303
  };
302
- return /* @__PURE__ */ g(
304
+ return /* @__PURE__ */ m(
303
305
  "g",
304
306
  {
305
- "aria-label": `${f} - ${b}`,
307
+ "aria-label": `${S} - ${h}`,
306
308
  className: "bubble",
307
- id: `bubble-${h}`,
308
- onBlur: G,
309
- onClick: () => i(t),
310
- onFocus: k,
311
- onKeyDown: I,
309
+ id: `bubble-${g}`,
310
+ onBlur: k,
311
+ onClick: () => c(t),
312
+ onFocus: N,
313
+ onKeyDown: M,
312
314
  onMouseEnter: () => a(!0),
313
315
  onMouseLeave: () => a(!1),
314
316
  role: "button",
315
- style: { cursor: o ? "pointer" : "default" },
317
+ style: { cursor: n ? "pointer" : "default", touchAction: "manipulation" },
316
318
  tabIndex: 0,
317
319
  textAnchor: "middle",
318
- x: _,
319
- y: S,
320
+ x: y,
321
+ y: A,
320
322
  children: [
321
323
  /* @__PURE__ */ e("style", { children: `
322
324
  .bubble:focus,
@@ -325,111 +327,119 @@ function St({ bubble: t, isDraggable: o, onClick: i = () => {
325
327
  }
326
328
  .bubble:focus circle,
327
329
  .bubble:focus-visible circle {
328
- stroke: ${r.palette.primary.main};
330
+ stroke: ${s.palette.primary.main};
329
331
  stroke-width: 3;
330
332
  stroke-opacity: 0.8;
331
333
  }
332
334
  ` }),
333
- /* @__PURE__ */ e(Xe, { open: s, slotProps: { popper: M }, title: R, children: /* @__PURE__ */ e("circle", { fill: d, id: `circle-${h}`, r: p }) }),
334
- /* @__PURE__ */ e("svg", { x: v, y: A, children: /* @__PURE__ */ e(P, { name: u, size: x, sx: { fill: m } }) }),
335
- p > j && /* @__PURE__ */ e(
336
- y,
335
+ /* @__PURE__ */ e(Je, { open: i, slotProps: { popper: L }, title: T, children: /* @__PURE__ */ e("circle", { fill: p, id: `circle-${g}`, r: _ }) }),
336
+ /* @__PURE__ */ e("svg", { x: b, y: B, children: /* @__PURE__ */ e(z, { name: u, size: f, sx: { fill: d } }) }),
337
+ _ > U && /* @__PURE__ */ e(
338
+ C,
337
339
  {
338
340
  bold: !0,
339
341
  component: "text",
340
- id: `budget-category-${h}`,
341
- sx: { fill: m },
342
- variant: "Small",
342
+ id: `budget-category-${g}`,
343
+ sx: { fill: d },
344
+ variant: "body2",
343
345
  y: 4,
344
- children: f
346
+ children: S
345
347
  }
346
348
  ),
347
- p > de && /* @__PURE__ */ e(
348
- y,
349
+ _ > Ce && /* @__PURE__ */ e(
350
+ C,
349
351
  {
350
352
  bold: !0,
351
353
  component: "text",
352
- id: `budget-description-${h}-1`,
353
- sx: { fill: m },
354
- variant: "Body",
355
- y: p <= j ? 12 : 24,
356
- children: p <= j ? b.split(" ")[0] : b
354
+ id: `budget-description-${g}-1`,
355
+ sx: { fill: d },
356
+ variant: "body1",
357
+ y: _ <= U ? 12 : 24,
358
+ children: _ <= U ? h.split(" ")[0] : h
357
359
  }
358
360
  ),
359
- p <= j && p > de && /* @__PURE__ */ e(
360
- y,
361
+ _ <= U && _ > Ce && /* @__PURE__ */ e(
362
+ C,
361
363
  {
362
364
  component: "text",
363
- id: `budget-description-${h}-2`,
364
- sx: { fill: m },
365
- variant: "XSmall",
365
+ id: `budget-description-${g}-2`,
366
+ sx: { fill: d },
367
+ variant: "caption",
366
368
  y: 28,
367
- children: b.split(" ")[1]
369
+ children: h.split(" ")[1]
368
370
  }
369
371
  ),
370
- /* @__PURE__ */ e(Bt, { bubble: c })
372
+ /* @__PURE__ */ e(Dt, { bubble: r })
371
373
  ]
372
374
  },
373
- h
375
+ g
374
376
  );
375
377
  }
376
- const xt = ({
378
+ const wt = ({
377
379
  height: t,
378
- width: o,
379
- isDraggable: i = !1,
380
- onClick: s = () => {
380
+ width: n,
381
+ isDraggable: c = !1,
382
+ onClick: i = () => {
381
383
  }
382
384
  }) => {
383
- const [a, r] = l.useState([]), n = l.useRef(null), c = l.useRef(!1), { detailedBudgets: d } = D(), m = l.useCallback(() => {
384
- const u = n.current, f = ht(d), h = f.nodes();
385
+ const [a, s] = l.useState([]), o = l.useRef(null), r = l.useRef(!1), { detailedBudgets: p } = w(), d = l.useCallback(() => {
386
+ const u = o.current, S = Bt(p), g = S.nodes();
385
387
  if (u) {
386
- const b = u.nodes(), p = new Map(b.map((_) => [_.guid, _]));
387
- h.forEach((_) => {
388
- const S = p.get(_.guid);
389
- S && Object.assign(_, {
390
- vx: S.vx,
391
- vy: S.vy,
392
- x: S.x,
393
- y: S.y
388
+ const h = u.nodes(), _ = new Map(h.map((y) => [y.guid, y]));
389
+ g.forEach((y) => {
390
+ const A = _.get(y.guid);
391
+ A && Object.assign(y, {
392
+ vx: A.vx,
393
+ vy: A.vy,
394
+ x: A.x,
395
+ y: A.y
394
396
  });
395
397
  });
396
398
  }
397
- n.current = f, c.current = !1, r(h);
398
- }, [d]);
399
+ o.current = S, r.current = !1, s(g);
400
+ }, [p]);
399
401
  return l.useEffect(() => {
400
- m();
401
- }, [m]), l.useEffect(() => () => {
402
- n.current && (n.current.stop(), n.current = null);
402
+ d();
403
+ }, [d]), l.useEffect(() => () => {
404
+ o.current && (o.current.stop(), o.current = null);
403
405
  }, []), l.useEffect(() => {
404
- const u = n.current;
406
+ const u = o.current;
405
407
  if (!u) return;
406
- const f = u.nodes(), h = o > 0 && o < 450 || t > 0 && t < 300, b = yt(f, d, h, t, o);
407
- u.nodes(b), pt(u, t, o), i && setTimeout(() => {
408
- gt(u);
409
- }, 0), r([...b]);
410
- }, [t, o, i, d]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(o), children: a.map((u) => /* @__PURE__ */ e(St, { bubble: u, isDraggable: i, onClick: s }, u.guid)) });
411
- }, vt = E(xt), At = ({
408
+ const S = u.nodes(), g = n > 0 && n < 450 || t > 0 && t < 300, h = xt(S, p, g, t, n);
409
+ u.nodes(h), Ct(u, t, n), c && setTimeout(() => {
410
+ _t(u);
411
+ }, 0), s([...h]);
412
+ }, [t, n, c, p]), /* @__PURE__ */ e(
413
+ "svg",
414
+ {
415
+ height: t,
416
+ style: { overflow: "visible", touchAction: "manipulation" },
417
+ width: Math.abs(n),
418
+ children: a.map((u) => /* @__PURE__ */ e(Et, { bubble: u, isDraggable: c, onClick: i }, u.guid))
419
+ }
420
+ );
421
+ }, It = I(wt), Ot = ({
412
422
  isMiniWidget: t = !1,
413
- onConnectAccountsClick: o,
414
- createBudgetOnClick: i
423
+ onConnectAccountsClick: n,
424
+ createBudgetOnClick: c
415
425
  }) => {
416
- const { recalculateBudgets: s } = D(), { spendCategories: a } = K(), { budgets: r } = w(), { availableWidth: n } = ne(), { isMobile: c } = ie(n), d = t && c, [m, u] = l.useState(!1), [f, h] = l.useState(!1), [b, p] = l.useState(!1), _ = l.useMemo(() => [...a.filter((C) => C.totalAverageAmount > 0)], [a]), S = async () => {
417
- p(!0);
418
- const { data: C, isSuccess: v } = await s(_);
419
- p(!1), v ? (C.length === 0 && h(!0), u(!1)) : u(!0);
426
+ const { config: i } = Ne(), { recalculateBudgets: a } = w(), { spendCategories: s } = q(), { budgets: o } = E(), { availableWidth: r } = de(), { isMobile: p } = ge(r), d = t && p, [u, S] = l.useState(!1), [g, h] = l.useState(!1), [_, y] = l.useState(!1), A = l.useMemo(() => [...s.filter((b) => b.totalAverageAmount > 0)], [s]), v = async () => {
427
+ y(!0);
428
+ const { data: b, isSuccess: B } = await a(A);
429
+ y(!1), B ? (b.length === 0 && h(!0), S(!1)) : S(!0);
420
430
  };
421
- return b ? /* @__PURE__ */ e(ge, {}) : m ? /* @__PURE__ */ e(
422
- le,
431
+ return _ ? /* @__PURE__ */ e(pe, {}) : u ? /* @__PURE__ */ e(
432
+ _e,
423
433
  {
424
- header: r.autogenerate_budgets_error_header,
434
+ header: o.autogenerate_budgets_error_header,
425
435
  icon: "error",
426
436
  iconColor: "#4D4D4D",
427
- onClick: (C) => {
428
- C === "primary" ? S() : i();
437
+ onClick: (b) => {
438
+ b === "primary" ? v() : c();
429
439
  },
430
- primaryButton: r.autogenerate_budgets_error_primary_button,
431
- secondaryButton: r.zero_state_generate_budgets_secondary_button,
432
- subText: r.autogenerate_budgets_error_subheader,
440
+ primaryButton: o.autogenerate_budgets_error_primary_button,
441
+ secondaryButton: o.zero_state_generate_budgets_secondary_button,
442
+ subText: o.autogenerate_budgets_error_subheader,
433
443
  sx: {
434
444
  width: { sm: 468 },
435
445
  ".buttons-footer": {
@@ -439,18 +449,18 @@ const xt = ({
439
449
  ...d && { justifyContent: "center", mt: 0, svg: { height: 32, width: 32 } }
440
450
  }
441
451
  }
442
- ) : /* @__PURE__ */ e(ze, { children: f ? /* @__PURE__ */ e(
443
- le,
452
+ ) : /* @__PURE__ */ e(Ve, { children: g ? /* @__PURE__ */ e(
453
+ _e,
444
454
  {
445
- header: r.zero_state_generate_budgets_header,
455
+ header: o.zero_state_generate_budgets_header,
446
456
  icon: "error",
447
457
  iconColor: "#4D4D4D",
448
- onClick: (C) => {
449
- C === "primary" ? o() : i();
458
+ onClick: (b) => {
459
+ b === "primary" ? n() : c();
450
460
  },
451
- primaryButton: r.zero_state_generate_budgets_primary_button,
452
- secondaryButton: r.zero_state_generate_budgets_secondary_button,
453
- subText: r.zero_state_generate_budgets_subheader,
461
+ primaryButton: i.show_connections_widget_in_master ? o.zero_state_generate_budgets_primary_button : void 0,
462
+ secondaryButton: o.zero_state_generate_budgets_secondary_button,
463
+ subText: o.zero_state_generate_budgets_subheader,
454
464
  sx: {
455
465
  width: t ? "100%" : { sm: 500 },
456
466
  height: t ? "100%" : { sm: 468 },
@@ -465,17 +475,17 @@ const xt = ({
465
475
  }
466
476
  }
467
477
  ) : /* @__PURE__ */ e(
468
- le,
478
+ _e,
469
479
  {
470
- header: r.create_budgets_title,
480
+ header: o.create_budgets_title,
471
481
  icon: "bubble_chart",
472
482
  iconColor: "#1A1A1A",
473
- onClick: (C) => {
474
- C === "primary" ? S() : i();
483
+ onClick: (b) => {
484
+ b === "primary" ? v() : c();
475
485
  },
476
- primaryButton: r.empty_state_primary_button,
477
- secondaryButton: t ? void 0 : r.empty_state_secondary_button,
478
- subText: r.empty_state_subheader,
486
+ primaryButton: o.empty_state_primary_button,
487
+ secondaryButton: t ? void 0 : o.empty_state_secondary_button,
488
+ subText: o.empty_state_subheader,
479
489
  sx: {
480
490
  width: t ? "100%" : { sm: 432 },
481
491
  height: t ? "100%" : { sm: 468 },
@@ -490,589 +500,515 @@ const xt = ({
490
500
  }
491
501
  }
492
502
  ) });
493
- }, ke = E(
503
+ }, We = I(
494
504
  ({
495
505
  createBudgetOnClick: t = () => {
496
506
  },
497
- height: o,
498
- isDraggable: i = !1,
499
- isMiniWidget: s = !1,
507
+ height: n,
508
+ isDraggable: c = !1,
509
+ isMiniWidget: i = !1,
500
510
  shouldShowZeroState: a,
501
- unavailableWidth: r = 24
511
+ unavailableWidth: s = 24
502
512
  }) => {
503
- const { onEvent: n } = X(), { setSelectedBudget: c } = D(), { isInitialized: d } = oe(), { accounts: m } = w(), { availableWidth: u } = ne(), { isMobile: f } = ie(), [h, b] = l.useState(!1), p = l.useMemo(() => u - r, [u]), _ = (C) => {
504
- c(C), n(N.BUDGETS_CLICK_BUDGET_CATEGORY, {
505
- budget_category: C.category.name,
513
+ const { onEvent: o } = J(), { setSelectedBudget: r } = w(), { isInitialized: p } = Q(), { accounts: d } = E(), { availableWidth: u } = de(), { isMobile: S } = ge(), [g, h] = l.useState(!1), _ = l.useMemo(() => u - s, [u]), y = (v) => {
514
+ r(v), o(P.BUDGETS_CLICK_BUDGET_CATEGORY, {
515
+ budget_category: v.category.name,
506
516
  click_type: "bubble"
507
517
  });
508
- }, S = () => {
509
- b(!0), n(N.ACCOUNTS_CLICK_CONNECT);
518
+ }, A = () => {
519
+ h(!0), o(P.ACCOUNTS_CLICK_CONNECT);
510
520
  };
511
- return /* @__PURE__ */ g(
512
- F,
521
+ return /* @__PURE__ */ m(
522
+ X,
513
523
  {
514
- ml: a || f ? 0 : 24,
515
- sx: { alignSelf: "center", ...s && { height: "100%" } },
524
+ ml: a || S ? 0 : 24,
525
+ sx: { alignSelf: "center", ...i && { height: "100%" } },
516
526
  children: [
517
- a || !d ? /* @__PURE__ */ e(
518
- At,
527
+ a || !p ? /* @__PURE__ */ e(
528
+ Ot,
519
529
  {
520
530
  createBudgetOnClick: t,
521
- isMiniWidget: s,
522
- onConnectAccountsClick: S
531
+ isMiniWidget: i,
532
+ onConnectAccountsClick: A
523
533
  }
524
534
  ) : /* @__PURE__ */ e(
525
- vt,
535
+ It,
526
536
  {
527
- height: o,
528
- isDraggable: i,
529
- onClick: _,
530
- width: p
537
+ height: n,
538
+ isDraggable: c,
539
+ onClick: y,
540
+ width: _
531
541
  }
532
542
  ),
533
543
  /* @__PURE__ */ e(
534
- Ke,
544
+ qe,
535
545
  {
536
- onClose: () => b(!1),
537
- showConnectionsWidget: h,
538
- title: m.manage_connections
546
+ onClose: () => h(!1),
547
+ showConnectionsWidget: g,
548
+ title: d.manage_connections
539
549
  }
540
550
  )
541
551
  ]
542
552
  }
543
553
  );
544
554
  }
545
- ), Tt = ({
546
- budgetsCopy: t,
547
- difference: o,
548
- handleAddClick: i,
549
- shouldShowZeroState: s
550
- }) => {
551
- const { availableHeight: a = 0 } = ne(), r = l.useRef(null);
552
- l.useEffect(() => {
553
- a > 0 && r.current === null && (r.current = a);
554
- }, [a]);
555
- const n = l.useMemo(() => {
556
- const c = r.current ?? a;
557
- return c > 0 ? Math.round(Math.max(120, Math.min(450, c * 0.8))) - 40 : 450;
558
- }, [a]);
559
- return /* @__PURE__ */ g(B, { sx: { height: "100%", justifyContent: "space-between" }, children: [
560
- /* @__PURE__ */ e(
561
- ke,
562
- {
563
- createBudgetOnClick: i,
564
- height: n,
565
- isMiniWidget: !0,
566
- shouldShowZeroState: s
567
- }
568
- ),
569
- !s && /* @__PURE__ */ g(F, { ml: 16, children: [
570
- /* @__PURE__ */ e(y, { bold: !0, color: o < 0 ? "error.main" : "success.main", children: T(Math.abs(o), "0,0") }),
571
- /* @__PURE__ */ e(y, { children: o < 0 ? t.overspent_in_budgets : t.left_in_budgets })
572
- ] })
573
- ] });
574
- }, wt = (t) => {
575
- const o = ee(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: r, setTheme: n } = D(), { budgets: c, common: d } = w(), { isInitialized: m, selectedAccounts: u } = oe(), { loadDateRangeCategoryTotals: f } = K(), h = Ze(), [b, p] = l.useState(!1);
576
- l.useEffect(() => {
577
- a || r().finally();
578
- }, []), l.useEffect(() => {
579
- n(o);
580
- }, [o]), l.useEffect(() => {
581
- m && !a && f(
582
- u,
583
- J(/* @__PURE__ */ new Date()),
584
- ue(/* @__PURE__ */ new Date())
585
- ).finally();
586
- }, [m, u, a]);
587
- const _ = () => {
588
- p(!0), i(N.BUDGETS_CLICK_ADD);
589
- }, S = () => {
590
- p(!1);
591
- }, C = () => p(!1);
592
- if (Te({
593
- widgetName: "BubbleBudgetsMiniWidget",
594
- isLoaded: a
595
- }), !m || !a) return /* @__PURE__ */ e(ge, {});
596
- const v = s.length === 0;
597
- return /* @__PURE__ */ g(
598
- qe,
599
- {
600
- contentStyles: { height: "calc(100% - 66px)", ":last-child": { pb: 0 } },
601
- primaryCtaLabel: v ? c.get_started_cta : c.details_cta,
602
- sx: { height: "100%" },
603
- title: c.budgets_title,
604
- ...t,
605
- children: [
606
- /* @__PURE__ */ e(
607
- Tt,
608
- {
609
- budgetsCopy: c,
610
- difference: h,
611
- handleAddClick: _,
612
- shouldShowZeroState: v
613
- }
614
- ),
615
- /* @__PURE__ */ e(
616
- $,
617
- {
618
- ariaLabelClose: d.close_aria,
619
- isOpen: b,
620
- onClose: () => p(!1),
621
- title: c.add_new_title,
622
- children: /* @__PURE__ */ e(
623
- Re,
624
- {
625
- onAddBudget: S,
626
- onRecalculateBudgets: C
627
- }
628
- )
629
- }
630
- )
631
- ]
632
- }
633
- );
634
- }, Ln = E(wt), Ne = ({ budget: t }) => {
555
+ ), He = ({ budget: t }) => {
635
556
  const {
636
- amount: o,
637
- budgetColors: { background: i },
638
- category: { name: s },
557
+ amount: n,
558
+ budgetColors: { background: c },
559
+ category: { name: i },
639
560
  category_guid: a,
640
- percentage: r,
641
- transaction_total: n
642
- } = t, c = [
561
+ percentage: s,
562
+ transaction_total: o
563
+ } = t, r = [
643
564
  {
644
- color: i,
645
- percentage: `${r}%`
565
+ color: c,
566
+ percentage: `${s}%`
646
567
  }
647
568
  ];
648
- return /* @__PURE__ */ e(pe, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(he, { children: /* @__PURE__ */ g(B, { alignItems: "center", gap: 16, children: [
649
- /* @__PURE__ */ e(H, { categoryGuid: a, size: 56 }),
650
- /* @__PURE__ */ e(Ue, { variant: "H1", children: `${T(n, "0,0")} / ${T(o, "0,0")}` }),
651
- /* @__PURE__ */ e(y, { bold: !0, variant: "XSmall", children: s }),
652
- /* @__PURE__ */ e(me, { data: c, height: 10 })
569
+ return /* @__PURE__ */ e(Te, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(De, { children: /* @__PURE__ */ m(x, { alignItems: "center", gap: 16, children: [
570
+ /* @__PURE__ */ e(V, { categoryGuid: a, size: 56 }),
571
+ /* @__PURE__ */ e(C, { variant: "h1", children: `${D(o, "0,0")} / ${D(n, "0,0")}` }),
572
+ /* @__PURE__ */ e(C, { bold: !0, variant: "caption", children: i }),
573
+ /* @__PURE__ */ e(Se, { data: r, height: 10 })
653
574
  ] }) }) });
654
- }, Dt = E(() => {
655
- const { budgets: t } = w();
656
- return /* @__PURE__ */ g(B, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
657
- /* @__PURE__ */ e(P, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
658
- /* @__PURE__ */ e(y, { bold: !0, color: "secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
659
- /* @__PURE__ */ e(y, { color: "text.secondary", variant: "XSmall", children: t.zero_state_no_sub_budgets_description })
575
+ }, Mt = I(() => {
576
+ const { budgets: t } = E();
577
+ return /* @__PURE__ */ m(x, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
578
+ /* @__PURE__ */ e(z, { color: "action", name: "bubble_chart", sx: { fontSize: 32 } }),
579
+ /* @__PURE__ */ e(C, { bold: !0, color: "text.secondary", variant: "body2", children: t.zero_state_no_sub_budgets }),
580
+ /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: t.zero_state_no_sub_budgets_description })
660
581
  ] });
661
- }), Et = E(({ budget: t }) => {
582
+ }), Rt = I(({ budget: t }) => {
662
583
  const {
663
- amount: o,
664
- budgetColors: { background: i },
665
- category: s,
584
+ amount: n,
585
+ budgetColors: { background: c },
586
+ category: i,
666
587
  percentage: a,
667
- transaction_total: r
668
- } = t, { setSelectedSubBudget: n } = D();
669
- return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { onClick: () => n(t), children: [
670
- /* @__PURE__ */ e(se, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Ie, { color: i, percent: a, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: s.parent_guid, variant: "basic" }) }) }),
588
+ transaction_total: s
589
+ } = t, { setSelectedSubBudget: o } = w();
590
+ return /* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(oe, { onClick: () => o(t), children: [
591
+ /* @__PURE__ */ e(me, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Ge, { color: c, percent: a, size: 40, children: /* @__PURE__ */ e(V, { categoryGuid: i.parent_guid, variant: "basic" }) }) }),
671
592
  /* @__PURE__ */ e(
672
- Z,
593
+ ne,
673
594
  {
674
- primary: /* @__PURE__ */ e(B, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.category.name }) }),
675
- secondary: /* @__PURE__ */ e(B, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(y, { fontWeight: 400, variant: "Body", children: `
676
- ${T(r, "0,0")} /
677
- ${T(o, "0,0")}
595
+ primary: /* @__PURE__ */ e(x, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.category.name }) }),
596
+ secondary: /* @__PURE__ */ e(x, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(C, { fontWeight: 400, variant: "body1", children: `
597
+ ${D(s, "0,0")} /
598
+ ${D(n, "0,0")}
678
599
  ` }) })
679
600
  }
680
601
  )
681
602
  ] }) });
682
- }), It = E(({ category: t, parentBudget: o }) => {
683
- const { budgets: i, common: s } = w(), { setExpandedGuid: a, setOnSelect: r } = nt(), { addBudget: n } = D(), [c, d] = l.useState(!1), [m, u] = l.useState(!1), [f, h] = l.useState(""), [b, p] = l.useState(void 0);
603
+ }), Lt = I(({ category: t, parentBudget: n }) => {
604
+ const { budgets: c, common: i } = E(), { setExpandedGuid: a, setOnSelect: s } = nt(), { addBudget: o } = w(), [r, p] = l.useState(!1), [d, u] = l.useState(!1), [S, g] = l.useState(""), [h, _] = l.useState(void 0);
684
605
  l.useEffect(() => {
685
- r((C) => {
686
- const v = t.subCategories.find((A) => A.guid === C);
687
- v && (p(v), h(`${v.currentAmount === 0 ? "" : v.currentAmount}`), u(!0));
606
+ s((v) => {
607
+ const b = t.subCategories.find((B) => B.guid === v);
608
+ b && (_(b), g(`${b.currentAmount === 0 ? "" : b.currentAmount}`), u(!0));
688
609
  });
689
610
  }, []);
690
- const _ = () => {
691
- a(t.guid), d(!0);
692
- }, S = async () => {
693
- b && Number(f) > 0 && (await n(b, Number(f), o.guid), u(!1), d(!1), p(void 0));
611
+ const y = () => {
612
+ a(t.guid), p(!0);
613
+ }, A = async () => {
614
+ h && Number(S) > 0 && (await o(h, Number(S), n.guid), u(!1), p(!1), _(void 0));
694
615
  };
695
- return /* @__PURE__ */ g(F, { children: [
696
- /* @__PURE__ */ e(V, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Y, { onClick: _, children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ g(B, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
697
- /* @__PURE__ */ g(B, { alignItems: "center", direction: "row", gap: 8, children: [
698
- /* @__PURE__ */ e(P, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
699
- /* @__PURE__ */ e(y, { bold: !0, sx: { color: "primary.light" }, variant: "Body", children: i.add_sub_budget_button })
616
+ return /* @__PURE__ */ m(X, { children: [
617
+ /* @__PURE__ */ e(te, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(oe, { onClick: y, children: /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ m(x, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
618
+ /* @__PURE__ */ m(x, { alignItems: "center", direction: "row", gap: 8, children: [
619
+ /* @__PURE__ */ e(z, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
620
+ /* @__PURE__ */ e(C, { bold: !0, sx: { color: "primary.light" }, variant: "body1", children: c.add_sub_budget_button })
700
621
  ] }),
701
- /* @__PURE__ */ e(P, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
622
+ /* @__PURE__ */ e(z, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
702
623
  ] }) }) }) }),
703
- /* @__PURE__ */ e(re, {}),
624
+ /* @__PURE__ */ e(ue, {}),
704
625
  /* @__PURE__ */ e(
705
626
  $,
706
627
  {
707
- ariaLabelClose: s.close_aria,
708
- isOpen: c,
709
- onClose: () => d(!1),
710
- title: i.add_sub_budget_title,
711
- children: /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(ot, { category: t, subCategories: t.subCategories }) })
628
+ ariaLabelClose: i.close_aria,
629
+ isOpen: r,
630
+ onClose: () => p(!1),
631
+ title: c.add_sub_budget_title,
632
+ children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(at, { category: t, subCategories: t.subCategories }) })
712
633
  }
713
634
  ),
714
635
  /* @__PURE__ */ e(
715
- z,
636
+ W,
716
637
  {
717
- copy: { close_aria: s.close_aria, title: i.add_title },
718
- disablePrimaryButton: Number(f) <= 0,
719
- isOpen: m,
638
+ copy: { close_aria: i.close_aria, title: c.add_title },
639
+ disablePrimaryButton: Number(S) <= 0,
640
+ isOpen: d,
720
641
  onClose: () => u(!1),
721
- onPrimaryAction: S,
722
- primaryText: i.add_save_button,
642
+ onPrimaryAction: A,
643
+ primaryText: c.add_save_button,
723
644
  children: /* @__PURE__ */ e(
724
- ce,
645
+ he,
725
646
  {
726
- amount: f,
727
- categoryName: b?.name || "",
728
- onAmountChanged: h
647
+ amount: S,
648
+ categoryName: h?.name || "",
649
+ onAmountChanged: g
729
650
  }
730
651
  )
731
652
  }
732
653
  )
733
654
  ] });
734
- }), Ot = E(({ budget: t }) => {
735
- const { category: o, subBudgets: i } = t, { budgets: s, common: a } = w(), { deleteBudget: r, selectedSubBudget: n, setSelectedSubBudget: c, updateBudget: d } = D(), { filter: m, setFilter: u } = ae(), [f, h] = l.useState(!1), [b, p] = l.useState(!1), [_, S] = l.useState("");
655
+ }), Nt = I(({ budget: t }) => {
656
+ const { category: n, subBudgets: c } = t, { budgets: i, common: a } = E(), { deleteBudget: s, selectedSubBudget: o, setSelectedSubBudget: r, updateBudget: p } = w(), { filter: d, setFilter: u } = ee(), [S, g] = l.useState(!1), [h, _] = l.useState(!1), [y, A] = l.useState("");
736
657
  l.useEffect(() => {
737
- n && (S(`${n.amount}`), u({
738
- ...m,
739
- custom: (x) => x.category_guid === n.category_guid
658
+ o && (A(`${o.amount}`), u({
659
+ ...d,
660
+ custom: (f) => f.category_guid === o.category_guid
740
661
  }));
741
- }, [n]);
742
- const C = async () => {
743
- n && await d({
744
- ...n,
745
- amount: Number(_)
662
+ }, [o]);
663
+ const v = async () => {
664
+ o && await p({
665
+ ...o,
666
+ amount: Number(y)
746
667
  });
747
- }, v = async () => {
748
- n && await r(n.guid), p(!1), A();
749
- }, A = () => {
668
+ }, b = async () => {
669
+ o && await s(o.guid), _(!1), B();
670
+ }, B = () => {
750
671
  u({
751
- ...m,
752
- custom: (x) => x.category_guid === t.category_guid || x.top_level_category_guid === t.category_guid
753
- }), c(void 0);
672
+ ...d,
673
+ custom: (f) => f.category_guid === t.category_guid || f.top_level_category_guid === t.category_guid
674
+ }), r(void 0);
754
675
  };
755
- return /* @__PURE__ */ g(l.Fragment, { children: [
756
- /* @__PURE__ */ g(W, { sx: { bgcolor: "background.paper" }, children: [
757
- i.length === 0 ? /* @__PURE__ */ e(Dt, {}) : i.map((x) => /* @__PURE__ */ g(l.Fragment, { children: [
758
- /* @__PURE__ */ e(Et, { budget: x }),
759
- /* @__PURE__ */ e(re, {})
760
- ] }, x.guid)),
761
- /* @__PURE__ */ e(It, { category: o, parentBudget: t })
676
+ return /* @__PURE__ */ m(l.Fragment, { children: [
677
+ /* @__PURE__ */ m(Z, { sx: { bgcolor: "background.paper" }, children: [
678
+ c.length === 0 ? /* @__PURE__ */ e(Mt, {}) : c.map((f) => /* @__PURE__ */ m(l.Fragment, { children: [
679
+ /* @__PURE__ */ e(Rt, { budget: f }),
680
+ /* @__PURE__ */ e(ue, {})
681
+ ] }, f.guid)),
682
+ /* @__PURE__ */ e(Lt, { category: n, parentBudget: t })
762
683
  ] }),
763
684
  /* @__PURE__ */ e(
764
685
  $,
765
686
  {
766
687
  ariaLabelClose: a.close_aria,
767
- isOpen: !!n,
768
- onClose: A,
769
- onPrimaryAction: () => h(!0),
770
- onSecondaryAction: () => p(!0),
771
- primaryText: s.details_edit_button,
772
- secondaryText: s.details_delete_button,
773
- title: s.details_title,
774
- children: n && /* @__PURE__ */ g(B, { gap: 24, children: [
775
- /* @__PURE__ */ e(Ne, { budget: n }),
776
- /* @__PURE__ */ e(Ee, { height: "100%" })
688
+ isOpen: !!o,
689
+ onClose: B,
690
+ onPrimaryAction: () => g(!0),
691
+ onSecondaryAction: () => _(!0),
692
+ primaryText: i.details_edit_button,
693
+ secondaryText: i.details_delete_button,
694
+ title: i.details_title,
695
+ children: o && /* @__PURE__ */ m(x, { gap: 24, children: [
696
+ /* @__PURE__ */ e(He, { budget: o }),
697
+ /* @__PURE__ */ e(ve, { height: "100%" })
777
698
  ] })
778
699
  }
779
700
  ),
780
- n && /* @__PURE__ */ g(l.Fragment, { children: [
701
+ o && /* @__PURE__ */ m(l.Fragment, { children: [
781
702
  /* @__PURE__ */ e(
782
- z,
703
+ W,
783
704
  {
784
- copy: { close_aria: a.close_aria, title: s.details_edit_title },
785
- disablePrimaryButton: Number(_) <= 0,
786
- isOpen: f,
787
- onClose: () => h(!1),
788
- onPrimaryAction: C,
789
- primaryText: s.edit_save_button,
705
+ copy: { close_aria: a.close_aria, title: i.details_edit_title },
706
+ disablePrimaryButton: Number(y) <= 0,
707
+ isOpen: S,
708
+ onClose: () => g(!1),
709
+ onPrimaryAction: v,
710
+ primaryText: i.edit_save_button,
790
711
  children: /* @__PURE__ */ e(
791
- ce,
712
+ he,
792
713
  {
793
- amount: _,
794
- categoryName: n.category.name,
795
- onAmountChanged: S
714
+ amount: y,
715
+ categoryName: o.category.name,
716
+ onAmountChanged: A
796
717
  }
797
718
  )
798
719
  }
799
720
  ),
800
721
  /* @__PURE__ */ e(
801
- z,
722
+ W,
802
723
  {
803
- copy: { close_aria: a.close_aria, title: s.delete_title },
804
- isOpen: b,
805
- onClose: () => p(!1),
806
- onPrimaryAction: v,
724
+ copy: { close_aria: a.close_aria, title: i.delete_title },
725
+ isOpen: h,
726
+ onClose: () => _(!1),
727
+ onPrimaryAction: b,
807
728
  primaryColor: "error",
808
729
  primaryText: "Delete",
809
730
  secondaryColor: "secondary",
810
- children: /* @__PURE__ */ e(y, { variant: "Paragraph", children: L(s.delete_description, n.category.name) })
731
+ children: /* @__PURE__ */ e(C, { variant: "subtitle1", children: R(i.delete_description, o.category.name) })
811
732
  }
812
733
  )
813
734
  ] })
814
735
  ] });
815
- }), Rt = E(({ budget: t }) => {
816
- const { is_mobile_webview: o } = Fe(), { setAlert: i } = D(), { budgets: s, common: a, transactions: r } = w(), { isDesktop: n, isSmallTablet: c, isTablet: d } = ie(), {
817
- sortedTransactions: m,
736
+ }), kt = I(({ budget: t }) => {
737
+ const { is_mobile_webview: n } = Ne(), { setAlert: c } = w(), { budgets: i, common: a, transactions: s } = E(), { isDesktop: o, isSmallTablet: r, isTablet: p } = ge(), {
738
+ sortedTransactions: d,
818
739
  sortedTransactionsWithSplits: u,
819
- tags: f
820
- } = ae(), [h, b] = l.useState(0), [p, _] = l.useState(""), S = l.useMemo(
821
- () => m.find((x) => x.guid === p),
822
- [p, m]
823
- ), C = (x, R) => {
824
- b(R);
825
- }, v = () => {
826
- et(u, f), i(s.alert_csv_downloaded);
827
- }, A = m.length > 0 && !o && (n || d && !c);
828
- return /* @__PURE__ */ g(B, { gap: 24, children: [
829
- /* @__PURE__ */ e(Ne, { budget: t }),
830
- /* @__PURE__ */ g(B, { children: [
831
- /* @__PURE__ */ g(
740
+ tags: S
741
+ } = ee(), [g, h] = l.useState(0), [_, y] = l.useState(""), A = l.useMemo(
742
+ () => d.find((f) => f.guid === _),
743
+ [_, d]
744
+ ), v = (f, T) => {
745
+ h(T);
746
+ }, b = () => {
747
+ et(u, S), c(i.alert_csv_downloaded);
748
+ }, B = d.length > 0 && !n && (o || p && !r);
749
+ return /* @__PURE__ */ m(x, { gap: 24, children: [
750
+ /* @__PURE__ */ e(He, { budget: t }),
751
+ /* @__PURE__ */ m(x, { children: [
752
+ /* @__PURE__ */ m(
832
753
  Qe,
833
754
  {
834
- onChange: C,
755
+ onChange: v,
835
756
  sx: { width: "100%" },
836
757
  textColor: "primary",
837
- value: h,
758
+ value: g,
838
759
  variant: "fullWidth",
839
760
  children: [
840
- /* @__PURE__ */ e(ye, { label: s.details_transactions_tab }),
841
- /* @__PURE__ */ e(ye, { label: s.details_subbudgets_tab })
761
+ /* @__PURE__ */ e(Ee, { label: i.details_transactions_tab }),
762
+ /* @__PURE__ */ e(Ee, { label: i.details_subbudgets_tab })
842
763
  ]
843
764
  }
844
765
  ),
845
- h === 0 && /* @__PURE__ */ g(B, { children: [
846
- A && /* @__PURE__ */ e(B, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
847
- Ae,
766
+ g === 0 && /* @__PURE__ */ m(x, { children: [
767
+ B && /* @__PURE__ */ e(x, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
768
+ $e,
848
769
  {
849
- onClick: v,
850
- startIcon: /* @__PURE__ */ e(P, { name: "ios_share" }),
770
+ onClick: b,
771
+ startIcon: /* @__PURE__ */ e(z, { name: "ios_share" }),
851
772
  variant: "text",
852
- children: r.export_csv_btn
773
+ children: s.export_csv_btn
853
774
  }
854
775
  ) }),
855
- /* @__PURE__ */ e(Ee, { height: "100%", onClick: _ })
776
+ /* @__PURE__ */ e(ve, { height: "100%", onClick: y })
856
777
  ] }),
857
- h === 1 && /* @__PURE__ */ e(Ot, { budget: t }),
778
+ g === 1 && /* @__PURE__ */ e(Nt, { budget: t }),
858
779
  /* @__PURE__ */ e(
859
780
  $,
860
781
  {
861
782
  ariaLabelClose: a.close_aria,
862
- isOpen: !!S,
863
- onClose: () => _(""),
864
- title: s.details_transaction_drawer,
865
- children: S && /* @__PURE__ */ e(tt, { transaction: S })
783
+ isOpen: !!A,
784
+ onClose: () => y(""),
785
+ title: i.details_transaction_drawer,
786
+ children: A && /* @__PURE__ */ e(tt, { transaction: A })
866
787
  }
867
788
  )
868
789
  ] })
869
790
  ] });
870
- }), Mt = E(() => {
871
- const { selectedAccountGuids: t } = oe(), { budgets: o, common: i } = w(), {
872
- alert: s,
791
+ }), $t = I(() => {
792
+ const { selectedAccountGuids: t } = Q(), { budgets: n, common: c } = E(), {
793
+ alert: i,
873
794
  dateRange: a,
874
- deleteBudget: r,
875
- selectedBudget: n,
876
- selectedSubBudget: c,
877
- setAlert: d,
878
- setSelectedBudget: m,
795
+ deleteBudget: s,
796
+ selectedBudget: o,
797
+ selectedSubBudget: r,
798
+ setAlert: p,
799
+ setSelectedBudget: d,
879
800
  updateBudget: u
880
- } = D(), { setFilter: f } = ae(), [h, b] = l.useState(!1), [p, _] = l.useState(!1), [S, C] = l.useState(!1), [v, A] = l.useState("");
801
+ } = w(), { setFilter: S } = ee(), [g, h] = l.useState(!1), [_, y] = l.useState(!1), [A, v] = l.useState(!1), [b, B] = l.useState("");
881
802
  l.useEffect(() => {
882
- n && !c && (A(`${n.amount}`), b(!0), f({
803
+ o && !r && (B(`${o.amount}`), h(!0), S({
883
804
  accounts: t,
884
805
  dateRange: a,
885
- custom: (k) => k.category_guid === n.category_guid || k.top_level_category_guid === n.category_guid,
806
+ custom: (N) => N.category_guid === o.category_guid || N.top_level_category_guid === o.category_guid,
886
807
  showSplits: !0
887
808
  }));
888
- }, [n]);
889
- const x = async () => {
890
- n && (await u({
891
- ...n,
892
- amount: Number(v),
893
- percentage: n.category.totalAmount / Number(v) * 100
894
- }), _(!1), d(L(o.alert_budget_updated, n.category.name)));
895
- }, R = async () => {
896
- n && (await r(n.guid), d(L(o.alert_budget_deleted, n.category.name))), M();
897
- }, M = () => {
898
- b(!1), setTimeout(() => {
899
- m(void 0);
809
+ }, [o]);
810
+ const f = async () => {
811
+ o && (await u({
812
+ ...o,
813
+ amount: Number(b),
814
+ percentage: o.category.totalAmount / Number(b) * 100
815
+ }), y(!1), p(R(n.alert_budget_updated, o.category.name)));
816
+ }, T = async () => {
817
+ o && (await s(o.guid), p(R(n.alert_budget_deleted, o.category.name))), L();
818
+ }, L = () => {
819
+ h(!1), setTimeout(() => {
820
+ d(void 0);
900
821
  }, 250);
901
- }, I = () => {
902
- _(!1), A(`${n?.amount}`);
822
+ }, M = () => {
823
+ y(!1), B(`${o?.amount}`);
903
824
  };
904
- if (n)
905
- return /* @__PURE__ */ g(l.Fragment, { children: [
906
- /* @__PURE__ */ g(
825
+ if (o)
826
+ return /* @__PURE__ */ m(l.Fragment, { children: [
827
+ /* @__PURE__ */ m(
907
828
  $,
908
829
  {
909
- ariaLabelClose: i.close_aria,
910
- isOpen: h,
911
- onClose: M,
912
- onPrimaryAction: () => _(!0),
913
- onSecondaryAction: () => C(!0),
914
- primaryText: o.details_edit_button,
830
+ ariaLabelClose: c.close_aria,
831
+ isOpen: g,
832
+ onClose: L,
833
+ onPrimaryAction: () => y(!0),
834
+ onSecondaryAction: () => v(!0),
835
+ primaryText: n.details_edit_button,
915
836
  secondaryColor: "error",
916
- secondaryText: o.details_delete_button,
917
- title: o.details_title,
837
+ secondaryText: n.details_delete_button,
838
+ title: n.details_title,
918
839
  children: [
919
- /* @__PURE__ */ e(Rt, { budget: n }),
840
+ /* @__PURE__ */ e(kt, { budget: o }),
920
841
  /* @__PURE__ */ e(
921
- De,
842
+ xe,
922
843
  {
923
844
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
924
845
  autoHideDuration: 3500,
925
- onClose: () => d(""),
926
- open: !!s,
927
- children: /* @__PURE__ */ e(we, { closeText: "", onClose: () => d(""), severity: "success", variant: "filled", children: s })
846
+ onClose: () => p(""),
847
+ open: !!i,
848
+ children: /* @__PURE__ */ e(Ae, { closeText: "", onClose: () => p(""), severity: "success", variant: "filled", children: i })
928
849
  }
929
850
  )
930
851
  ]
931
852
  }
932
853
  ),
933
854
  /* @__PURE__ */ e(
934
- z,
855
+ W,
935
856
  {
936
- copy: { close_aria: i.close_aria, title: o.details_edit_title },
937
- disablePrimaryButton: Number(v) <= 0,
938
- isOpen: p,
939
- onClose: I,
940
- onPrimaryAction: x,
941
- onSecondaryAction: I,
942
- primaryText: o.edit_save_button,
857
+ copy: { close_aria: c.close_aria, title: n.details_edit_title },
858
+ disablePrimaryButton: Number(b) <= 0,
859
+ isOpen: _,
860
+ onClose: M,
861
+ onPrimaryAction: f,
862
+ onSecondaryAction: M,
863
+ primaryText: n.edit_save_button,
943
864
  children: /* @__PURE__ */ e(
944
- ce,
865
+ he,
945
866
  {
946
- amount: v,
947
- categoryName: n.category.name,
948
- onAmountChanged: A
867
+ amount: b,
868
+ categoryName: o.category.name,
869
+ onAmountChanged: B
949
870
  }
950
871
  )
951
872
  }
952
873
  ),
953
874
  /* @__PURE__ */ e(
954
- z,
875
+ W,
955
876
  {
956
- copy: { close_aria: i.close_aria, title: o.delete_title },
957
- isOpen: S,
958
- onClose: () => C(!1),
959
- onPrimaryAction: R,
877
+ copy: { close_aria: c.close_aria, title: n.delete_title },
878
+ isOpen: A,
879
+ onClose: () => v(!1),
880
+ onPrimaryAction: T,
960
881
  primaryColor: "error",
961
- primaryText: o.details_delete_button,
882
+ primaryText: n.details_delete_button,
962
883
  secondaryColor: "secondary",
963
- children: /* @__PURE__ */ e(y, { variant: "Paragraph", children: L(o.delete_description, n.category.name) })
884
+ children: /* @__PURE__ */ e(C, { variant: "subtitle1", children: R(n.delete_description, o.category.name) })
964
885
  }
965
886
  )
966
887
  ] });
967
- }), Lt = ({ budget: t, onClick: o }) => {
888
+ }), Gt = ({ budget: t, onClick: n }) => {
968
889
  const {
969
- amount: i,
970
- budgetColors: { background: s, description: a },
971
- category_guid: r,
972
- description: n,
973
- percentage: c,
974
- subBudgets: d,
975
- transaction_total: m
976
- } = t;
977
- return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { onClick: () => o?.(t), children: [
978
- /* @__PURE__ */ e(se, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Ie, { color: s, percent: c, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: r, variant: "basic" }) }) }),
890
+ amount: c,
891
+ budgetColors: { background: i, description: a },
892
+ category_guid: s,
893
+ description: o,
894
+ percentage: r,
895
+ subBudgets: p,
896
+ transaction_total: d
897
+ } = t, u = r > 100;
898
+ return /* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(oe, { onClick: () => n?.(t), children: [
899
+ /* @__PURE__ */ e(me, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Ge, { color: i, percent: r, size: 40, children: /* @__PURE__ */ e(V, { categoryGuid: s, variant: "basic" }) }) }),
979
900
  /* @__PURE__ */ e(
980
- Z,
901
+ ne,
981
902
  {
982
- primary: /* @__PURE__ */ g(B, { component: "span", direction: "row", justifyContent: "space-between", children: [
983
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.category.name }),
984
- /* @__PURE__ */ e(y, { fontWeight: 400, variant: "Body", children: `
985
- ${T(m, "0,0")} /
986
- ${T(i, "0,0")}
903
+ primary: /* @__PURE__ */ m(x, { component: "span", direction: "row", justifyContent: "space-between", children: [
904
+ /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.category.name }),
905
+ /* @__PURE__ */ e(C, { fontWeight: 400, variant: "body1", children: `
906
+ ${D(d, "0,0")} /
907
+ ${D(c, "0,0")}
987
908
  ` })
988
909
  ] }),
989
- secondary: /* @__PURE__ */ g(B, { component: "span", direction: "row", justifyContent: "space-between", children: [
990
- /* @__PURE__ */ e(y, { variant: "XSmall", children: `${d.length} Sub-budgets` }),
991
- /* @__PURE__ */ e(y, { bold: c > 100, color: a, variant: "XSmall", children: n })
910
+ secondary: /* @__PURE__ */ m(x, { component: "span", direction: "row", justifyContent: "space-between", children: [
911
+ /* @__PURE__ */ e(C, { variant: "caption", children: `${p.length} Sub-budgets` }),
912
+ /* @__PURE__ */ e(
913
+ C,
914
+ {
915
+ bold: u,
916
+ sx: {
917
+ color: a,
918
+ ...u && {
919
+ ".MuiListItemButton-root:hover &, .MuiListItemButton-root:active &": {
920
+ color: "error.dark"
921
+ }
922
+ }
923
+ },
924
+ variant: "caption",
925
+ children: o
926
+ }
927
+ )
992
928
  ] })
993
929
  }
994
930
  )
995
931
  ] }) });
996
- }, kt = E(() => {
997
- const { onEvent: t } = X(), { budgets: o } = w(), { detailedBudgets: i, setSelectedBudget: s } = D(), a = (r) => {
998
- s(r), t(N.BUDGETS_CLICK_BUDGET_CATEGORY, {
999
- budget_category: r.category.name,
932
+ }, Pt = I(() => {
933
+ const { onEvent: t } = J(), { budgets: n } = E(), { detailedBudgets: c, setSelectedBudget: i } = w(), a = (s) => {
934
+ i(s), t(P.BUDGETS_CLICK_BUDGET_CATEGORY, {
935
+ budget_category: s.category.name,
1000
936
  click_type: "list"
1001
937
  });
1002
938
  };
1003
- return /* @__PURE__ */ g(pe, { elevation: 2, children: [
1004
- /* @__PURE__ */ e(Oe, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(xe, { children: o.budget_categories_title }) }),
1005
- /* @__PURE__ */ e(he, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(W, { children: i.map((r) => /* @__PURE__ */ g(l.Fragment, { children: [
1006
- /* @__PURE__ */ e(Lt, { budget: r, onClick: a }),
1007
- /* @__PURE__ */ e(re, {})
1008
- ] }, r.guid)) }) })
939
+ return /* @__PURE__ */ m(Te, { elevation: 2, children: [
940
+ /* @__PURE__ */ e(Pe, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children: n.budget_categories_title }) }),
941
+ /* @__PURE__ */ e(De, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(Z, { children: c.map((s) => /* @__PURE__ */ m(l.Fragment, { children: [
942
+ /* @__PURE__ */ e(Gt, { budget: s, onClick: a }),
943
+ /* @__PURE__ */ e(ue, {})
944
+ ] }, s.guid)) }) })
1009
945
  ] });
1010
- }), Nt = E(() => {
1011
- const t = ee(), { onEvent: o } = X(), { visibleAccounts: i } = ve(), { budgets: s, common: a, recurring: r } = w(), { incomeCategories: n, spendCategories: c } = K(), { detailedBudgets: d, totalBudgeted: m } = D(), { incomeTotal: u } = te(), { setFilter: f } = ae(), [h, b] = l.useState(!1), [p, _] = l.useMemo(() => {
1012
- const A = c.reduce((I, k) => I + k.totalAmount, 0);
1013
- let x = A / m;
1014
- x > 1 && (x = 1);
1015
- let R = t.palette.success.main;
1016
- x > 0.8 && x < 1 ? R = t.palette.warning.main : x >= 1 && (R = t.palette.error.main);
1017
- const M = [
946
+ }), jt = I(() => {
947
+ const t = H(), { onEvent: n } = J(), { visibleAccounts: c } = ke(), { budgets: i, common: a, recurring: s } = E(), { incomeCategories: o, spendCategories: r } = q(), { detailedBudgets: p, totalBudgeted: d } = w(), { incomeTotal: u } = le(), { setFilter: S } = ee(), [g, h] = l.useState(!1), [_, y] = l.useMemo(() => {
948
+ const B = r.reduce((M, N) => M + N.totalAmount, 0);
949
+ let f = B / d;
950
+ f > 1 && (f = 1);
951
+ let T = t.palette.success.main;
952
+ f > 0.8 && f < 1 ? T = t.palette.warning.main : f >= 1 && (T = t.palette.error.main);
953
+ const L = [
1018
954
  {
1019
- color: R,
1020
- percentage: `${x}`
955
+ color: T,
956
+ percentage: `${f}`
1021
957
  }
1022
958
  ];
1023
- return [A, M];
1024
- }, [d, c]), [S, C] = l.useMemo(() => {
1025
- const A = Math.abs(
1026
- n.reduce((M, I) => M + I.totalAmount, 0)
959
+ return [B, L];
960
+ }, [p, r]), [A, v] = l.useMemo(() => {
961
+ const B = Math.abs(
962
+ o.reduce((L, M) => L + M.totalAmount, 0)
1027
963
  );
1028
- let x = A / u;
1029
- x > 1 && (x = 1);
1030
- const R = [
964
+ let f = B / u;
965
+ f > 1 && (f = 1);
966
+ const T = [
1031
967
  {
1032
968
  color: t.palette.secondary.main,
1033
- percentage: `${x}`
969
+ percentage: `${f}`
1034
970
  }
1035
971
  ];
1036
- return [A, R];
1037
- }, [n, u]), v = () => {
1038
- f({
1039
- accounts: i.map((A) => A.guid),
972
+ return [B, T];
973
+ }, [o, u]), b = () => {
974
+ S({
975
+ accounts: c.map((B) => B.guid),
1040
976
  dateRange: {
1041
- start: at(/* @__PURE__ */ new Date(), 90),
977
+ start: rt(/* @__PURE__ */ new Date(), 90),
1042
978
  end: /* @__PURE__ */ new Date()
1043
979
  }
1044
- }), b(!0), o(N.BUDGETS_CLICK_EDIT_INCOME);
980
+ }), h(!0), n(P.BUDGETS_CLICK_EDIT_INCOME);
1045
981
  };
1046
- return /* @__PURE__ */ g(pe, { elevation: 2, sx: { overflow: "visible" }, children: [
1047
- /* @__PURE__ */ e(Oe, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(xe, { children: s.overview_title }) }),
1048
- /* @__PURE__ */ e(he, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ g(B, { gap: 24, children: [
1049
- /* @__PURE__ */ g(B, { gap: 8, children: [
1050
- /* @__PURE__ */ e(y, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
1051
- /* @__PURE__ */ e(me, { data: _, height: 16 }),
1052
- /* @__PURE__ */ e(y, { variant: "Small", children: L(
1053
- s.spending_description,
1054
- T(p, "0,0"),
1055
- T(m, "0,0")
982
+ return /* @__PURE__ */ m(Te, { elevation: 2, sx: { overflow: "visible" }, children: [
983
+ /* @__PURE__ */ e(Pe, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children: i.overview_title }) }),
984
+ /* @__PURE__ */ e(De, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ m(x, { gap: 24, children: [
985
+ /* @__PURE__ */ m(x, { gap: 8, children: [
986
+ /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 8 }, variant: "body1", children: i.spending_title }),
987
+ /* @__PURE__ */ e(Se, { data: y, height: 16 }),
988
+ /* @__PURE__ */ e(C, { variant: "body2", children: R(
989
+ i.spending_description,
990
+ D(_, "0,0"),
991
+ D(d, "0,0")
1056
992
  ) })
1057
993
  ] }),
1058
- /* @__PURE__ */ g(B, { gap: 8, children: [
1059
- /* @__PURE__ */ g(B, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
1060
- /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: s.income_title }),
994
+ /* @__PURE__ */ m(x, { gap: 8, children: [
995
+ /* @__PURE__ */ m(x, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
996
+ /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: i.income_title }),
1061
997
  /* @__PURE__ */ e(
1062
- rt,
998
+ st,
1063
999
  {
1064
- "aria-label": r.manage_income,
1065
- onClick: v,
1000
+ "aria-label": s.manage_income,
1001
+ onClick: b,
1066
1002
  sx: { p: 0 },
1067
- children: /* @__PURE__ */ e(P, { color: "primary", name: "edit" })
1003
+ children: /* @__PURE__ */ e(z, { color: "primary", name: "edit" })
1068
1004
  }
1069
1005
  )
1070
1006
  ] }),
1071
- /* @__PURE__ */ e(me, { data: C, height: 16 }),
1072
- /* @__PURE__ */ e(y, { variant: "Small", children: L(
1073
- s.income_description,
1074
- T(S, "0,0"),
1075
- T(u, "0,0")
1007
+ /* @__PURE__ */ e(Se, { data: v, height: 16 }),
1008
+ /* @__PURE__ */ e(C, { variant: "body2", children: R(
1009
+ i.income_description,
1010
+ D(A, "0,0"),
1011
+ D(u, "0,0")
1076
1012
  ) })
1077
1013
  ] })
1078
1014
  ] }) }),
@@ -1080,137 +1016,231 @@ const xt = ({
1080
1016
  $,
1081
1017
  {
1082
1018
  ariaLabelClose: a.close_aria,
1083
- isOpen: h,
1084
- onClose: () => b(!1),
1085
- title: r.manage_income,
1086
- children: /* @__PURE__ */ e(st, { forOverview: !0 })
1019
+ isOpen: g,
1020
+ onClose: () => h(!1),
1021
+ title: s.manage_income,
1022
+ children: /* @__PURE__ */ e(it, { forOverview: !0 })
1087
1023
  }
1088
1024
  )
1089
1025
  ] });
1090
- }), Se = 480, kn = E(({ onBackClick: t, sx: o }) => {
1091
- const i = ee(), { onEvent: s } = X(), { visibleAccounts: a } = ve(), { budgets: r, common: n } = w(), { isInitialized: c, selectedAccounts: d, setDisplayedDate: m } = oe(), {
1092
- alert: u,
1093
- dateRange: f,
1094
- isDataLoaded: h,
1095
- loadBudgetData: b,
1096
- setDateRange: p,
1097
- setAlert: _,
1098
- setTheme: S,
1099
- detailedBudgets: C
1100
- } = D(), { setDateRange: v } = te(), { loadDateRangeCategoryTotals: A } = K(), { isSmallTablet: x, isMobile: R, isSmallMobile: M } = ie(), I = x || R || M, [k, G] = l.useState(!1);
1101
- Te({
1102
- widgetName: "BubbleBudgetsWidget",
1103
- isLoaded: h
1104
- }), l.useEffect(() => {
1105
- S(i), h || b().finally(() => {
1106
- s(N.BUDGETS_VIEW);
1107
- });
1108
- }, []), l.useEffect(() => (p({ start: J(q()), end: ue(q()) }), () => {
1109
- p({ start: J(q()), end: ue(q()) });
1110
- }), [a]), l.useEffect(() => {
1111
- c && (m(f.start, f.end), A(d, f.start, f.end).finally(), v(f));
1112
- }, [c, d, f]);
1113
- const U = (be) => {
1114
- p({ start: be[0] || /* @__PURE__ */ new Date(), end: be[1] || /* @__PURE__ */ new Date() });
1115
- }, $e = () => {
1116
- s(N.BUDGETS_CLICK_FILTER);
1117
- }, fe = () => {
1118
- G(!0), s(N.BUDGETS_CLICK_ADD);
1119
- }, Pe = () => {
1120
- G(!1);
1121
- }, Ge = () => {
1122
- G(!1);
1123
- }, je = Je(f.end, J(/* @__PURE__ */ new Date()));
1124
- return !c || !h ? /* @__PURE__ */ e(ge, {}) : /* @__PURE__ */ g(
1125
- Ye,
1126
- {
1127
- actions: [
1128
- {
1129
- iconName: "add",
1130
- label: r.add_title,
1131
- onClick: fe
1132
- }
1133
- ],
1134
- calendarActions: {
1135
- onRangeChanged: U,
1136
- shouldDisableNext: je,
1137
- shouldDisablePicker: !0
1138
- },
1139
- onAccountsFilterClick: $e,
1140
- onBackClick: t,
1141
- sx: o,
1142
- title: r.budgets_title,
1143
- children: [
1144
- /* @__PURE__ */ g(
1145
- B,
1026
+ }), Re = 480, Uo = I(
1027
+ ({ onBackClick: t, onMenuClick: n, sx: c }) => {
1028
+ const i = H(), { onEvent: a } = J(), { visibleAccounts: s } = ke(), { budgets: o, common: r } = E(), { isInitialized: p, selectedAccounts: d, setDisplayedDate: u } = Q(), {
1029
+ alert: S,
1030
+ dateRange: g,
1031
+ isDataLoaded: h,
1032
+ loadBudgetData: _,
1033
+ setDateRange: y,
1034
+ setAlert: A,
1035
+ setTheme: v,
1036
+ detailedBudgets: b
1037
+ } = w(), { setDateRange: B } = le(), { loadDateRangeCategoryTotals: f, loadMonthlyCategoryTotals: T } = q(), { isSmallTablet: L, isMobile: M, isSmallMobile: N } = ge(), k = L || M || N, [G, F] = l.useState(!1);
1038
+ je({
1039
+ widgetName: "BubbleBudgetsWidget",
1040
+ isLoaded: h
1041
+ }), l.useEffect(() => {
1042
+ v(i), h || _().finally(() => {
1043
+ a(P.BUDGETS_VIEW);
1044
+ });
1045
+ }, []), l.useEffect(() => (y({ start: ie(re()), end: Be(re()) }), () => {
1046
+ y({ start: ie(re()), end: Be(re()) });
1047
+ }), [s]), l.useEffect(() => {
1048
+ p && (u(g.start, g.end), f(d, g.start, g.end).finally(), T(d).finally(), B(g));
1049
+ }, [p, d, g]);
1050
+ const be = (Y) => {
1051
+ y({ start: Y[0] || /* @__PURE__ */ new Date(), end: Y[1] || /* @__PURE__ */ new Date() });
1052
+ }, fe = () => {
1053
+ a(P.BUDGETS_CLICK_FILTER);
1054
+ }, ae = () => {
1055
+ F(!0), a(P.BUDGETS_CLICK_ADD);
1056
+ }, ye = () => {
1057
+ F(!1);
1058
+ }, j = () => {
1059
+ F(!1);
1060
+ }, K = Ke(g.end, ie(/* @__PURE__ */ new Date()));
1061
+ return !p || !h ? /* @__PURE__ */ e(pe, {}) : /* @__PURE__ */ m(
1062
+ ct,
1063
+ {
1064
+ actions: [
1146
1065
  {
1147
- direction: I ? "column" : "row",
1148
- height: "100%",
1149
- sx: { justifyContent: "center" },
1150
- width: "100%",
1151
- children: [
1152
- /* @__PURE__ */ e(B, { height: I ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1153
- ke,
1066
+ iconName: "add",
1067
+ label: o.add_title,
1068
+ onClick: ae
1069
+ }
1070
+ ],
1071
+ calendarActions: {
1072
+ onRangeChanged: be,
1073
+ shouldDisableNext: K,
1074
+ shouldDisablePicker: !0
1075
+ },
1076
+ hasDivider: !0,
1077
+ onAccountsFilterClick: fe,
1078
+ onBackClick: t,
1079
+ onMenuClick: n,
1080
+ sx: c,
1081
+ title: o.budgets_title,
1082
+ children: [
1083
+ /* @__PURE__ */ m(
1084
+ x,
1085
+ {
1086
+ direction: k ? "column" : "row",
1087
+ height: "100%",
1088
+ sx: { justifyContent: "center" },
1089
+ width: "100%",
1090
+ children: [
1091
+ /* @__PURE__ */ e(x, { height: k ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1092
+ We,
1093
+ {
1094
+ createBudgetOnClick: ae,
1095
+ height: k ? 450 : 800,
1096
+ isDraggable: !0,
1097
+ shouldShowZeroState: b.length === 0,
1098
+ unavailableWidth: k ? 0 : Re
1099
+ }
1100
+ ) }),
1101
+ b.length !== 0 && /* @__PURE__ */ m(
1102
+ x,
1103
+ {
1104
+ gap: 24,
1105
+ height: "100%",
1106
+ sx: { mr: 24, mt: 48 },
1107
+ width: k ? "100%" : Re,
1108
+ children: [
1109
+ /* @__PURE__ */ e(jt, {}),
1110
+ /* @__PURE__ */ e(Pt, {})
1111
+ ]
1112
+ }
1113
+ )
1114
+ ]
1115
+ }
1116
+ ),
1117
+ /* @__PURE__ */ e($t, {}),
1118
+ /* @__PURE__ */ e(
1119
+ $,
1120
+ {
1121
+ ariaLabelClose: r.close_aria,
1122
+ isOpen: G,
1123
+ onClose: () => F(!1),
1124
+ title: o.add_new_title,
1125
+ children: /* @__PURE__ */ e(
1126
+ ze,
1154
1127
  {
1155
- createBudgetOnClick: fe,
1156
- height: I ? 450 : 800,
1157
- isDraggable: !0,
1158
- shouldShowZeroState: C.length === 0,
1159
- unavailableWidth: I ? 0 : Se
1128
+ onAddBudget: ye,
1129
+ onRecalculateBudgets: j
1160
1130
  }
1161
- ) }),
1162
- C.length !== 0 && /* @__PURE__ */ g(
1163
- B,
1131
+ )
1132
+ }
1133
+ ),
1134
+ /* @__PURE__ */ e(
1135
+ xe,
1136
+ {
1137
+ anchorOrigin: { vertical: "bottom", horizontal: "right" },
1138
+ autoHideDuration: 3500,
1139
+ onClose: () => {
1140
+ A("");
1141
+ },
1142
+ open: !!S,
1143
+ children: /* @__PURE__ */ e(
1144
+ Ae,
1164
1145
  {
1165
- gap: 24,
1166
- height: "100%",
1167
- sx: { mr: 24, mt: 48 },
1168
- width: I ? "100%" : Se,
1169
- children: [
1170
- /* @__PURE__ */ e(Nt, {}),
1171
- /* @__PURE__ */ e(kt, {})
1172
- ]
1146
+ closeText: "",
1147
+ onClose: () => {
1148
+ A("");
1149
+ },
1150
+ severity: "success",
1151
+ variant: "filled",
1152
+ children: S
1173
1153
  }
1174
1154
  )
1175
- ]
1176
- }
1177
- ),
1178
- /* @__PURE__ */ e(Mt, {}),
1155
+ }
1156
+ )
1157
+ ]
1158
+ }
1159
+ );
1160
+ }
1161
+ ), zt = ({
1162
+ budgetsCopy: t,
1163
+ difference: n,
1164
+ handleAddClick: c,
1165
+ shouldShowZeroState: i
1166
+ }) => {
1167
+ const { availableHeight: a = 0 } = de(), s = l.useRef(null);
1168
+ l.useEffect(() => {
1169
+ a > 0 && s.current === null && (s.current = a);
1170
+ }, [a]);
1171
+ const o = l.useMemo(() => {
1172
+ const r = s.current ?? a;
1173
+ return r > 0 ? Math.round(Math.max(120, Math.min(450, r * 0.8))) - 40 : 450;
1174
+ }, [a]);
1175
+ return /* @__PURE__ */ m(x, { sx: { height: "100%", justifyContent: "space-between" }, children: [
1176
+ /* @__PURE__ */ e(
1177
+ We,
1178
+ {
1179
+ createBudgetOnClick: c,
1180
+ height: o,
1181
+ isMiniWidget: !0,
1182
+ shouldShowZeroState: i
1183
+ }
1184
+ ),
1185
+ !i && /* @__PURE__ */ m(X, { ml: 16, children: [
1186
+ /* @__PURE__ */ e(C, { bold: !0, color: n < 0 ? "error.main" : "success.main", children: D(Math.abs(n), "0,0") }),
1187
+ /* @__PURE__ */ e(C, { children: n < 0 ? t.overspent_in_budgets : t.left_in_budgets })
1188
+ ] })
1189
+ ] });
1190
+ }, Ft = (t) => {
1191
+ const n = H(), { onEvent: c } = J(), { detailedBudgets: i, isDataLoaded: a, loadBudgetData: s, setTheme: o } = w(), { budgets: r, common: p } = E(), { isInitialized: d, selectedAccounts: u } = Q(), { loadDateRangeCategoryTotals: S, loadMonthlyCategoryTotals: g } = q(), h = lt(i), [_, y] = l.useState(!1);
1192
+ l.useEffect(() => {
1193
+ a || s().finally();
1194
+ }, []), l.useEffect(() => {
1195
+ o(n);
1196
+ }, [n]), l.useEffect(() => {
1197
+ d && !a && (S(
1198
+ u,
1199
+ ie(/* @__PURE__ */ new Date()),
1200
+ Be(/* @__PURE__ */ new Date())
1201
+ ).finally(), g(u).finally());
1202
+ }, [d, u, a]);
1203
+ const A = () => {
1204
+ y(!0), c(P.BUDGETS_CLICK_ADD);
1205
+ }, v = () => {
1206
+ y(!1);
1207
+ }, b = () => y(!1);
1208
+ if (je({
1209
+ widgetName: "BubbleBudgetsMiniWidget",
1210
+ isLoaded: a
1211
+ }), !d || !a) return /* @__PURE__ */ e(pe, {});
1212
+ const B = i.length === 0;
1213
+ return /* @__PURE__ */ m(
1214
+ ut,
1215
+ {
1216
+ contentStyles: { height: "calc(100% - 66px)", ":last-child": { pb: 0 } },
1217
+ primaryCtaLabel: B ? r.get_started_cta : r.details_cta,
1218
+ primaryCtaLabelAria: r.details_cta_aria,
1219
+ sx: { height: "100%" },
1220
+ title: r.budgets_title,
1221
+ ...t,
1222
+ children: [
1179
1223
  /* @__PURE__ */ e(
1180
- $,
1224
+ zt,
1181
1225
  {
1182
- ariaLabelClose: n.close_aria,
1183
- isOpen: k,
1184
- onClose: () => G(!1),
1185
- title: r.add_new_title,
1186
- children: /* @__PURE__ */ e(
1187
- Re,
1188
- {
1189
- onAddBudget: Pe,
1190
- onRecalculateBudgets: Ge
1191
- }
1192
- )
1226
+ budgetsCopy: r,
1227
+ difference: h,
1228
+ handleAddClick: A,
1229
+ shouldShowZeroState: B
1193
1230
  }
1194
1231
  ),
1195
1232
  /* @__PURE__ */ e(
1196
- De,
1233
+ $,
1197
1234
  {
1198
- anchorOrigin: { vertical: "bottom", horizontal: "right" },
1199
- autoHideDuration: 3500,
1200
- onClose: () => {
1201
- _("");
1202
- },
1203
- open: !!u,
1235
+ ariaLabelClose: p.close_aria,
1236
+ isOpen: _,
1237
+ onClose: () => y(!1),
1238
+ title: r.add_new_title,
1204
1239
  children: /* @__PURE__ */ e(
1205
- we,
1240
+ ze,
1206
1241
  {
1207
- closeText: "",
1208
- onClose: () => {
1209
- _("");
1210
- },
1211
- severity: "success",
1212
- variant: "filled",
1213
- children: u
1242
+ onAddBudget: v,
1243
+ onRecalculateBudgets: b
1214
1244
  }
1215
1245
  )
1216
1246
  }
@@ -1218,8 +1248,154 @@ const xt = ({
1218
1248
  ]
1219
1249
  }
1220
1250
  );
1221
- });
1251
+ }, Wo = I(Ft), se = {
1252
+ CANCEL_DELETE: "Cancel - Delete",
1253
+ END_SAVE: "End - Save",
1254
+ END_DELETE: "End - Delete",
1255
+ START_DELETE: "Start - Delete"
1256
+ }, Ut = ({
1257
+ onClose: t,
1258
+ onEvent: n,
1259
+ onViewHistory: c,
1260
+ transactionListProps: i
1261
+ }) => {
1262
+ const {
1263
+ alert: a,
1264
+ dateRange: s,
1265
+ deleteBudget: o,
1266
+ selectedBudget: r,
1267
+ selectedSubBudget: p,
1268
+ setAlert: d,
1269
+ setSelectedBudget: u,
1270
+ updateBudget: S
1271
+ } = w(), { budgets: g, common: h } = E(), { isCopyLoaded: _, selectedAccountGuids: y } = Q(), A = H(), { setFilter: v } = ee(), [b, B] = l.useState(""), [f, T] = l.useState(null), [L, M] = l.useState(!1), N = l.useRef(!1);
1272
+ if (l.useEffect(() => {
1273
+ !r || p || (B(`${r.amount}`), v({
1274
+ accounts: y,
1275
+ dateRange: s,
1276
+ custom: ({ category_guid: j, top_level_category_guid: K }) => {
1277
+ const { category_guid: Y } = r;
1278
+ return j === Y || K === Y;
1279
+ }
1280
+ }), M(!0));
1281
+ }, [r]), !_) return /* @__PURE__ */ e(pe, {});
1282
+ if (!r) return null;
1283
+ const k = () => {
1284
+ B(""), T(null), M(!1), setTimeout(() => {
1285
+ u(void 0), t?.();
1286
+ }, 250);
1287
+ }, G = () => {
1288
+ f === "delete" && n?.(se.CANCEL_DELETE, b), B(r.amount ? `${r.amount}` : ""), T(null);
1289
+ }, F = async () => {
1290
+ if (f === "edit") {
1291
+ if (N.current) return;
1292
+ N.current = !0, await S({
1293
+ ...r,
1294
+ amount: Number(b)
1295
+ }), n?.(se.END_SAVE, b), d(
1296
+ R(g.alert_budget_updated, r.category.name)
1297
+ ), T(null), N.current = !1;
1298
+ }
1299
+ f === "delete" && (await o(r.guid), n?.(se.END_DELETE, b), k());
1300
+ }, { remainingAmount: be, spentPercentage: fe, iconColor: ae } = dt(
1301
+ r.transaction_total ?? 0,
1302
+ r.amount ?? 0
1303
+ ), ye = (j, K) => R(j, /* @__PURE__ */ e("b", { children: K }));
1304
+ return /* @__PURE__ */ m(l.Fragment, { children: [
1305
+ /* @__PURE__ */ m(
1306
+ $,
1307
+ {
1308
+ ariaLabelClose: h.close_aria,
1309
+ footerStyles: {
1310
+ px: 24,
1311
+ py: 16
1312
+ },
1313
+ isOpen: L,
1314
+ onClose: k,
1315
+ onPrimaryAction: () => T(
1316
+ "edit"
1317
+ /* EDIT */
1318
+ ),
1319
+ onSecondaryAction: () => {
1320
+ n?.(se.START_DELETE, b), T(
1321
+ "delete"
1322
+ /* DELETE */
1323
+ );
1324
+ },
1325
+ primaryText: g.details_edit_button,
1326
+ secondaryColor: "error",
1327
+ secondaryText: g.details_delete_button,
1328
+ sx: {
1329
+ "& .list-wrapper": {
1330
+ pr: 24
1331
+ }
1332
+ },
1333
+ title: R(g.details_type_title, r.category.name),
1334
+ children: [
1335
+ /* @__PURE__ */ e(
1336
+ ot,
1337
+ {
1338
+ amount: r.amount,
1339
+ icon: /* @__PURE__ */ e(
1340
+ V,
1341
+ {
1342
+ categoryGuid: r.category.guid,
1343
+ size: 44,
1344
+ sx: {
1345
+ bgcolor: Ye(we(r.category.guid, A), 0.15),
1346
+ border: `1px solid ${we(r.category.guid, A)}`,
1347
+ color: "text.primary"
1348
+ }
1349
+ }
1350
+ ),
1351
+ iconColor: ae,
1352
+ onViewHistory: c,
1353
+ remainingAmount: be,
1354
+ spentPercentage: fe,
1355
+ startDate: (s.start.getTime() ?? 0) / 1e3,
1356
+ totalTransaction: r.transaction_total
1357
+ }
1358
+ ),
1359
+ /* @__PURE__ */ e(ve, { ...i }),
1360
+ a && /* @__PURE__ */ e(
1361
+ xe,
1362
+ {
1363
+ anchorOrigin: { horizontal: "right", vertical: "bottom" },
1364
+ autoHideDuration: 3500,
1365
+ onClose: () => d(""),
1366
+ open: !!a,
1367
+ children: /* @__PURE__ */ e(Ae, { closeText: "", onClose: () => d(""), severity: "success", variant: "filled", children: a })
1368
+ }
1369
+ )
1370
+ ]
1371
+ }
1372
+ ),
1373
+ f && /* @__PURE__ */ e(
1374
+ mt,
1375
+ {
1376
+ closeAriaLabel: h.close_aria,
1377
+ content: ye(
1378
+ g[f === "edit" ? "edit_budget_content" : "delete_description"],
1379
+ r.category.name
1380
+ ),
1381
+ handleInputChange: (j) => B(j.toString()),
1382
+ handleModalClose: G,
1383
+ handlePrimaryAction: F,
1384
+ handleSecondaryAction: G,
1385
+ inputLabel: f === "edit" ? g.details_edit_title : "",
1386
+ inputValue: b,
1387
+ isOpen: !0,
1388
+ primaryColor: f === "edit" ? "primary" : "error",
1389
+ primaryText: g[f === "edit" ? "add_save_button" : "details_delete_button"],
1390
+ secondaryColor: f === "edit" ? "primary" : "inherit",
1391
+ secondaryText: h.cancel_button,
1392
+ title: g[f === "edit" ? "details_edit_title" : "delete_title"]
1393
+ }
1394
+ )
1395
+ ] });
1396
+ }, Ho = I(Ut);
1222
1397
  export {
1223
- Ln as BubbleBudgetsMiniWidget,
1224
- kn as BubbleBudgetsWidget
1398
+ Wo as BubbleBudgetsMiniWidget,
1399
+ Uo as BubbleBudgetsWidget,
1400
+ Ho as BudgetDetailsDrawerV2
1225
1401
  };