@mx-cartographer/experiences 8.0.0-alpha.test2 → 8.0.0-alpha.v2

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 (513) hide show
  1. package/CHANGELOG.md +335 -0
  2. package/README.md +5 -3
  3. package/dist/{Account-CMjOp7S2.mjs → Account-BiB1F8lL.mjs} +2 -2
  4. package/dist/{Account-BIKn4XEZ.mjs → Account-DuOz1a27.mjs} +1 -1
  5. package/dist/{AccountApi-DgZ8ILj1.mjs → AccountApi-ChQr5PAZ.mjs} +1 -1
  6. package/dist/AccountDetailsHeader-D9gbTbUt.mjs +95 -0
  7. package/dist/{AccountFields-DuFtmuud.mjs → AccountFields-CxqONzjY.mjs} +12 -12
  8. package/dist/AccountListItem-D9WJDbZ1.mjs +94 -0
  9. package/dist/{AccountStore-Cq_w2Hfb.mjs → AccountStore-DpYvNnql.mjs} +15 -9
  10. package/dist/Accounts-CseLC3lL.mjs +5 -0
  11. package/dist/Accounts-o7ohkngR.mjs +27 -0
  12. package/dist/{Analytics-i5h6BxR1.mjs → Analytics-BYItVAe-.mjs} +10 -0
  13. package/dist/{BeatApi-De2IaqH2.mjs → BeatApi-EFHXULDx.mjs} +1 -1
  14. package/dist/{BeatStore-D_NYuBSz.mjs → BeatStore-C6CAT-ce.mjs} +1 -1
  15. package/dist/BudgetUtil-CLhRnCoX.mjs +479 -0
  16. package/dist/CashflowStore-CeAzChyD.mjs +91 -0
  17. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  18. package/dist/{CategorySelectorDrawer-CzRxYpiP.mjs → CategorySelectorDrawer-Dc9Widy9.mjs} +118 -110
  19. package/dist/{CategoryStore-V-0d9oje.mjs → CategoryStore-FTxUbn0f.mjs} +3 -3
  20. package/dist/{CategoryUtil-DB-9JMbi.mjs → CategoryUtil-BVixr0d5.mjs} +4 -4
  21. package/dist/Connect-eYIWqCEr.mjs +39 -0
  22. package/dist/ConnectDrawer-C0wjwcJt.mjs +58 -0
  23. package/dist/{ConnectionsDrawer-DMBBzlIJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +10 -9
  24. package/dist/CurrencyInput-DuMktPu3.mjs +85 -0
  25. package/dist/{CurrencyText-C-85TnUF.mjs → CurrencyText-CA-E5N_y.mjs} +1 -1
  26. package/dist/{DateFormats-Cs-NbEZ7.mjs → DateFormats-BMpMrZpW.mjs} +1 -1
  27. package/dist/{DateUtil-CVXVMbjf.mjs → DateUtil-wcYTmDRD.mjs} +1 -1
  28. package/dist/{DebtsStore-Dv_T7Dts.mjs → DebtsStore-BZqNLaqd.mjs} +3 -3
  29. package/dist/Dialog-Ck34yr-d.mjs +63 -0
  30. package/dist/{Donut-DKY8mL3P.mjs → Donut-CpxJlVvJ.mjs} +29 -27
  31. package/dist/{Drawer-Bet2ZPJo.mjs → Drawer-Bbe4AMB1.mjs} +14 -14
  32. package/dist/{ExportCsvAction-Cc14QGA9.mjs → ExportCsvAction-ErKh7wJ2.mjs} +4 -4
  33. package/dist/{Fetch-DecPFeGU.mjs → Fetch-B6tMJC1r.mjs} +2 -1
  34. package/dist/{FinstrongStore-DW7-LvAh.mjs → FinstrongStore-BQxXxxYD.mjs} +129 -129
  35. package/dist/GlobalAccountFilter-B73Pw1hJ.mjs +237 -0
  36. package/dist/Goal-0loDagc5.mjs +6 -0
  37. package/dist/GoalStore-fgXt--2Y.mjs +418 -0
  38. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  39. package/dist/{Help-CgpJK03Q.mjs → Help-B8mD4aLJ.mjs} +6 -6
  40. package/dist/{Help-DOPJteew.mjs → Help-D-laTbKu.mjs} +544 -493
  41. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  42. package/dist/LineChart-EAr5ox5U.mjs +612 -0
  43. package/dist/{ListItemAction-engf-T9W.mjs → ListItemAction-4KB7P75M.mjs} +2 -2
  44. package/dist/Loader-D3rjKx72.mjs +21 -0
  45. package/dist/Localization-CPkpIwIx.mjs +37 -0
  46. package/dist/{ManageIncome-BVqHHIO7.mjs → ManageIncome-Cc-wba0I.mjs} +118 -113
  47. package/dist/{MerchantStore-WvZ4gnQe.mjs → MerchantStore-BzGi4JAZ.mjs} +1 -1
  48. package/dist/MicroWidgetContainer-B_EnfvCq.mjs +45 -0
  49. package/dist/MiniWidgetContainer-Bhkv-hpz.mjs +66 -0
  50. package/dist/{NetWorthStore-B6ziBtaH.mjs → NetWorthStore-BqZ44-4M.mjs} +5 -5
  51. package/dist/Notification-DTNYSd8P.mjs +7 -0
  52. package/dist/{NotificationSettings-CEzQSKfg.mjs → NotificationSettings-D7VqsrZy.mjs} +160 -159
  53. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-D_e8zo5M.mjs} +28 -21
  54. package/dist/{NumberFormatting-DjTD0t3W.mjs → NumberFormatting-QCaNwbjv.mjs} +1 -1
  55. package/dist/{Transaction-C8QRYhYc.mjs → OnClickEvents-CseHDZ94.mjs} +32 -25
  56. package/dist/{OriginalBalanceAction-CYqr8z8w.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +10 -10
  57. package/dist/{RecurringSettings-rEotGPcM.mjs → RecurringSettings-BN9H5ALr.mjs} +4 -4
  58. package/dist/RecurringTransactions-BCJp-Nap.mjs +297 -0
  59. package/dist/{RecurringTransactionsStore-DpzLX8E8.mjs → RecurringTransactionsStore-CkMA7gY3.mjs} +11 -10
  60. package/dist/RepeatingTransaction-DF4vJn_v.mjs +7 -0
  61. package/dist/{ResponsiveButton-BNsV08Ud.mjs → ResponsiveButton-DZFp78fJ.mjs} +12 -12
  62. package/dist/SearchBox-CwDgvWVJ.mjs +48 -0
  63. package/dist/{SettingsStore-ImYpLCSK.mjs → SettingsStore-BoIoiRLj.mjs} +3 -3
  64. package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +5 -5
  65. package/dist/{SpendingData-CI_C9xln.mjs → SpendingData-Bz1bCWAs.mjs} +4 -4
  66. package/dist/SpendingLegend-BgjazduU.mjs +193 -0
  67. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  68. package/dist/StatusIndicator-4tWnjeKS.mjs +264 -0
  69. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  70. package/dist/ToggleListItem-BLu_fWA2.mjs +90 -0
  71. package/dist/Transaction-Cn5_iFm0.mjs +5 -0
  72. package/dist/{TransactionApi-CjBoLleL.mjs → TransactionApi-Ck5Ua-7F.mjs} +1 -1
  73. package/dist/TransactionDetails-D1I1XEsT.mjs +1469 -0
  74. package/dist/{TransactionStore-CEehNrKo.mjs → TransactionStore-Bx9euVrY.mjs} +195 -177
  75. package/dist/{TrendsStore-ncmbS9eE.mjs → TrendsStore-CYdTo7cN.mjs} +10 -10
  76. package/dist/ViewMoreMicroCard-D24H9kDm.mjs +1291 -0
  77. package/dist/{WidgetContainer-DFwVgavi.mjs → WidgetContainer-B7xDq2bM.mjs} +47 -46
  78. package/dist/accounts/AccountsMiniWidget.d.ts +1 -1
  79. package/dist/accounts/AccountsWidget.d.ts +1 -1
  80. package/dist/accounts/api/AccountApi.d.ts +1 -1
  81. package/dist/accounts/components/AccountListItem.d.ts +1 -1
  82. package/dist/accounts/components/AccountsListCompact.d.ts +1 -1
  83. package/dist/accounts/components/detailsdrawer/Accounts/AccountActionsRow.d.ts +1 -0
  84. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -1
  85. package/dist/accounts/hooks/useGetMergeableAccounts.d.ts +1 -1
  86. package/dist/accounts/index.es.js +459 -368
  87. package/dist/accounts/stores/AccountStore.d.ts +2 -1
  88. package/dist/accounts/stores/UiStore.d.ts +1 -1
  89. package/dist/accounts/utils/AccountDetails.d.ts +1 -1
  90. package/dist/accounts/utils/AccountFields.d.ts +1 -1
  91. package/dist/accounts/utils/Accounts.d.ts +2 -2
  92. package/dist/analytics/index.es.js +93 -112
  93. package/dist/budgets/BubbleBudgetsMiniWidget.d.ts +1 -1
  94. package/dist/budgets/BubbleBudgetsWidget.d.ts +1 -1
  95. package/dist/budgets/api/BudgetsApi.d.ts +5 -1
  96. package/dist/budgets/components/BubbleChart.d.ts +1 -1
  97. package/dist/budgets/components/BudgetDetailsDrawerV2.d.ts +4 -1
  98. package/dist/budgets/components/MerchantBudgetDetailsDrawer.d.ts +17 -0
  99. package/dist/budgets/components/addbudget/RecalculateBudgetRow.d.ts +1 -1
  100. package/dist/budgets/components/addbudget/UnbudgetedRow.d.ts +1 -1
  101. package/dist/budgets/components/bubblechart/Bubble.d.ts +1 -1
  102. package/dist/budgets/components/budgetdetails/AddSubBudget.d.ts +1 -1
  103. package/dist/budgets/components/budgetdetails/BudgetDetails.d.ts +1 -1
  104. package/dist/budgets/components/budgetdetails/Header.d.ts +1 -1
  105. package/dist/budgets/components/budgetdetails/SubBudgetList.d.ts +1 -1
  106. package/dist/budgets/components/budgetlist/BudgetRow.d.ts +1 -1
  107. package/dist/budgets/components/budgetlist/SubBudgetRow.d.ts +1 -1
  108. package/dist/budgets/components/shared/BudgetDetailsTopSection.d.ts +13 -0
  109. package/dist/budgets/index.es.js +851 -865
  110. package/dist/budgets/store/BudgetsStore.d.ts +15 -1
  111. package/dist/budgets/utils/BubblesSVG.d.ts +3 -3
  112. package/dist/budgets/utils/BudgetUtil.d.ts +6 -1
  113. package/dist/cashflow/CashflowMiniWidget.d.ts +1 -1
  114. package/dist/cashflow/CashflowWidget.d.ts +1 -1
  115. package/dist/cashflow/api/CashflowApi.d.ts +1 -1
  116. package/dist/cashflow/components/DetailsExpenseRow.d.ts +1 -1
  117. package/dist/cashflow/index.es.js +290 -288
  118. package/dist/cashflow/stores/UiStore.d.ts +1 -1
  119. package/dist/cashflow/util/Filters.d.ts +1 -1
  120. package/dist/categories/components/CategoryRow.d.ts +1 -1
  121. package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -1
  122. package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -1
  123. package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -1
  124. package/dist/categories/components/SubcategoryList.d.ts +1 -1
  125. package/dist/categories/components/SubcategoryRow.d.ts +1 -1
  126. package/dist/categories/index.es.js +2 -2
  127. package/dist/categories/stores/CategoryStore.d.ts +2 -1
  128. package/dist/categories/util/CategoryUtil.d.ts +1 -1
  129. package/dist/common/api/AnalyticsApi.d.ts +1 -1
  130. package/dist/common/api/AppDataApi.d.ts +1 -1
  131. package/dist/common/api/BeatApi.d.ts +1 -1
  132. package/dist/common/api/CategoryApi.d.ts +1 -1
  133. package/dist/common/api/GlobalCopyApi.d.ts +1 -1
  134. package/dist/common/api/LocalizedCopyApi.d.ts +1 -1
  135. package/dist/common/api/NotificationApi.d.ts +1 -1
  136. package/dist/common/api/ScheduledPaymentsApi.d.ts +1 -1
  137. package/dist/common/api/UserApi.d.ts +1 -1
  138. package/dist/common/components/CurrencyDialog.d.ts +1 -1
  139. package/dist/common/components/CurrencyInput.d.ts +1 -1
  140. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  141. package/dist/common/components/GlobalAccountFilter.d.ts +1 -1
  142. package/dist/common/components/Loader.d.ts +1 -2
  143. package/dist/common/components/MiniWidgetContainer.d.ts +1 -0
  144. package/dist/common/components/WidgetContainer.d.ts +1 -1
  145. package/dist/common/components/charts/LineChart.d.ts +1 -0
  146. package/dist/common/components/charts/index.d.ts +1 -0
  147. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +2 -1
  148. package/dist/common/components/charts/linechart/utils/markerShapes.d.ts +3 -0
  149. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +1 -1
  150. package/dist/common/components/index.d.ts +0 -1
  151. package/dist/common/constants/Account.d.ts +1 -1
  152. package/dist/common/constants/Analytics.d.ts +10 -0
  153. package/dist/common/constants/ApiEndpoints.d.ts +1 -0
  154. package/dist/common/constants/DefaultConfig.d.ts +1 -1
  155. package/dist/common/constants/ScheduledPayment.d.ts +1 -10
  156. package/dist/common/constants/SpendingPlan.d.ts +0 -10
  157. package/dist/common/constants/index.d.ts +2 -2
  158. package/dist/common/context/GlobalDataProvider.d.ts +2 -1
  159. package/dist/common/context/hooks.d.ts +4 -4
  160. package/dist/common/hooks/index.d.ts +1 -0
  161. package/dist/common/hooks/useAccountDisplayName.d.ts +1 -1
  162. package/dist/common/hooks/useCombineEvents.d.ts +1 -1
  163. package/dist/common/hooks/usePrevious.d.ts +2 -0
  164. package/dist/common/index.d.ts +0 -1
  165. package/dist/common/index.es.js +625 -860
  166. package/dist/common/stores/AppDataStore.d.ts +3 -3
  167. package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
  168. package/dist/common/stores/GlobalStore.d.ts +4 -2
  169. package/dist/common/stores/GlobalUiStore.d.ts +3 -3
  170. package/dist/common/stores/UserStore.d.ts +1 -1
  171. package/dist/common/utils/AccountDisplayName.d.ts +1 -1
  172. package/dist/common/utils/AccountFilter.d.ts +1 -1
  173. package/dist/common/utils/Analytics.d.ts +1 -1
  174. package/dist/common/utils/Categories.d.ts +1 -1
  175. package/dist/common/utils/Fetch.d.ts +1 -1
  176. package/dist/common/utils/Localization.d.ts +9 -1
  177. package/dist/common/utils/Theme.d.ts +3 -3
  178. package/dist/common/utils/User.d.ts +1 -1
  179. package/dist/common/utils/index.d.ts +1 -1
  180. package/dist/core/constants/index.d.ts +1 -0
  181. package/dist/core/constants/repeatingTransactions.d.ts +10 -0
  182. package/dist/core/index.d.ts +2 -0
  183. package/dist/core/index.es.js +41 -0
  184. package/dist/{common → core}/types/Analytics.d.ts +6 -3
  185. package/dist/{common → core}/types/AppData.d.ts +1 -0
  186. package/dist/{common → core}/types/Beat.d.ts +2 -0
  187. package/dist/{common → core}/types/Budget.d.ts +8 -0
  188. package/dist/{common → core}/types/Expense.d.ts +2 -1
  189. package/dist/{common → core}/types/Finstrong.d.ts +0 -2
  190. package/dist/{common → core}/types/Notification.d.ts +15 -5
  191. package/dist/{common → core}/types/index.d.ts +1 -2
  192. package/dist/{common → core}/types/localization/BudgetsCopy.d.ts +11 -0
  193. package/dist/{common → core}/types/localization/CashflowCopy.d.ts +1 -0
  194. package/dist/{common → core}/types/localization/CommonCopy.d.ts +2 -0
  195. package/dist/{common → core}/types/localization/DebtsCopy.d.ts +5 -0
  196. package/dist/{common → core}/types/localization/RecurringCopy.d.ts +2 -0
  197. package/dist/{common → core}/types/localization/SpendingCopy.d.ts +1 -0
  198. package/dist/dashboard/index.es.js +46 -45
  199. package/dist/debts/DebtsWidget.d.ts +1 -1
  200. package/dist/debts/components/actions/DebtsPriorityAction.d.ts +5 -1
  201. package/dist/debts/components/debtspaydown/PaydownButton.d.ts +2 -1
  202. package/dist/debts/components/debtspriority/DebtsPriorityButton.d.ts +2 -1
  203. package/dist/debts/index.es.js +705 -646
  204. package/dist/debts/store/DebtsStore.d.ts +2 -1
  205. package/dist/debts/utils/DebtStore.d.ts +1 -1
  206. package/dist/debts/utils/DebtsWidget.d.ts +7 -1
  207. package/dist/debts/utils/shared.d.ts +1 -1
  208. package/dist/{exportTransactionsToCSV-CGnrndmA.mjs → exportTransactionsToCSV-MCYH_zzN.mjs} +5 -5
  209. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  210. package/dist/finstrong/api/FinstrongApi.d.ts +1 -1
  211. package/dist/finstrong/components/HealthChart.d.ts +1 -1
  212. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +1 -1
  213. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +1 -1
  214. package/dist/finstrong/components/shared/Accounts.d.ts +1 -1
  215. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +1 -0
  216. package/dist/finstrong/components/shared/ScoreHistoryTimeline.d.ts +1 -1
  217. package/dist/finstrong/components/shared/Transactions.d.ts +1 -1
  218. package/dist/finstrong/index.es.js +161 -159
  219. package/dist/finstrong/stores/FinstrongStore.d.ts +3 -2
  220. package/dist/finstrong/util/finstrongUtils.d.ts +3 -3
  221. package/dist/goals/GoalsWidget.d.ts +1 -1
  222. package/dist/goals/api/GoalApi.d.ts +2 -2
  223. package/dist/goals/components/AccountSelectionDrawer.d.ts +1 -1
  224. package/dist/goals/components/AddGoal.d.ts +1 -1
  225. package/dist/goals/components/GoalDetails.d.ts +1 -1
  226. package/dist/goals/components/GoalDetailsDrawer.d.ts +1 -1
  227. package/dist/goals/components/GoalList.d.ts +1 -1
  228. package/dist/goals/components/GoalStatusCard.d.ts +1 -1
  229. package/dist/goals/components/ManageGoals.d.ts +1 -1
  230. package/dist/goals/components/actions/AccountAction.d.ts +1 -1
  231. package/dist/goals/components/actions/AddRetirementAccountAction.d.ts +1 -1
  232. package/dist/goals/components/actions/AmountToSaveAction.d.ts +1 -1
  233. package/dist/goals/components/actions/BirthdayAction.d.ts +1 -1
  234. package/dist/goals/components/actions/ChangeAccountAction.d.ts +1 -1
  235. package/dist/goals/components/actions/ContributionAction.d.ts +1 -1
  236. package/dist/goals/components/actions/GoalNameAction.d.ts +1 -1
  237. package/dist/goals/components/actions/InterestRateAction.d.ts +1 -1
  238. package/dist/goals/components/actions/MonthlyPaymentAction.d.ts +1 -1
  239. package/dist/goals/components/actions/OriginalBalanceAction.d.ts +1 -1
  240. package/dist/goals/components/actions/RetirementAgeAction.d.ts +1 -1
  241. package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
  242. package/dist/goals/components/managegoals/CompleteListItem.d.ts +1 -1
  243. package/dist/goals/components/managegoals/OngoingListItem.d.ts +1 -1
  244. package/dist/goals/components/managegoals/ReorderGoals.d.ts +1 -1
  245. package/dist/goals/components/micro/GoalMicroStatusCard.d.ts +1 -1
  246. package/dist/goals/index.es.js +445 -419
  247. package/dist/goals/stores/GoalStore.d.ts +2 -1
  248. package/dist/goals/util/GoalsUtil.d.ts +1 -1
  249. package/dist/help/HelpWidget.d.ts +1 -1
  250. package/dist/help/api/HelpApi.d.ts +1 -1
  251. package/dist/help/components/HelpContent.d.ts +1 -1
  252. package/dist/help/components/HelpList.d.ts +1 -1
  253. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  254. package/dist/help/components/content/ContentItem.d.ts +1 -1
  255. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  256. package/dist/help/components/content/NoImageContent.d.ts +1 -1
  257. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  258. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  259. package/dist/help/components/content/section/Accounts.d.ts +1 -1
  260. package/dist/help/components/content/section/Budgets.d.ts +1 -1
  261. package/dist/help/components/content/section/CashFlow.d.ts +1 -1
  262. package/dist/help/components/content/section/Debts.d.ts +1 -1
  263. package/dist/help/components/content/section/General.d.ts +1 -1
  264. package/dist/help/components/content/section/Goals.d.ts +1 -1
  265. package/dist/help/components/content/section/Insights.d.ts +1 -1
  266. package/dist/help/components/content/section/Investments.d.ts +1 -1
  267. package/dist/help/components/content/section/Mobile.d.ts +1 -1
  268. package/dist/help/components/content/section/NetWorth.d.ts +1 -1
  269. package/dist/help/components/content/section/Notifications.d.ts +1 -1
  270. package/dist/help/components/content/section/RecurringTransactions.d.ts +1 -1
  271. package/dist/help/components/content/section/Spending.d.ts +1 -1
  272. package/dist/help/components/content/section/Transactions.d.ts +1 -1
  273. package/dist/help/components/content/section/Trends.d.ts +1 -1
  274. package/dist/help/components/content/section/index.d.ts +15 -15
  275. package/dist/help/components/requestsupport/ContactSupport.d.ts +1 -1
  276. package/dist/help/components/requestsupport/HelpByCategoryList.d.ts +1 -1
  277. package/dist/help/components/requestsupport/MissingInstitution.d.ts +1 -1
  278. package/dist/help/components/requestsupport/PopularTopicsDrawer.d.ts +1 -1
  279. package/dist/help/components/requestsupport/PopularTopicsList.d.ts +1 -1
  280. package/dist/help/components/requestsupport/RequestSupport.d.ts +1 -1
  281. package/dist/help/components/requestsupport/RequestSupportFooter.d.ts +1 -1
  282. package/dist/help/components/requestsupport/RequestSupportInstitution.d.ts +1 -1
  283. package/dist/help/components/requestsupport/SupportSuccessMessage.d.ts +1 -1
  284. package/dist/help/index.es.js +8 -8
  285. package/dist/help/store/HelpStore.d.ts +5 -4
  286. package/dist/help/utils/getAccessibleHelpCategories.d.ts +2 -2
  287. package/dist/{hooks-CBl85iRr.mjs → hooks-BxkfR-Ff.mjs} +12 -12
  288. package/dist/insights/components/feed/Header.d.ts +8 -0
  289. package/dist/insights/components/index.d.ts +4 -0
  290. package/dist/insights/components/insights/CategoryBudget/types/CategoryBudget.d.ts +1 -0
  291. package/dist/insights/components/insights/CategorySpendingV2/types/CategorySpendingV2.d.ts +1 -0
  292. package/dist/insights/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.d.ts +2 -1
  293. package/dist/insights/components/shared/ChartDrawerTemplate/TipSection.d.ts +3 -1
  294. package/dist/insights/components/shared/ChartTransactionWithDrillDown.d.ts +2 -1
  295. package/dist/insights/components/shared/DonutChartV2.d.ts +13 -0
  296. package/dist/insights/components/shared/InsightsCard/BeatCardMUI.d.ts +20 -0
  297. package/dist/insights/components/shared/InsightsCard/CardHeaderMUI.d.ts +11 -0
  298. package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.d.ts +17 -0
  299. package/dist/insights/components/shared/InsightsCard/DescriptionMUI.d.ts +12 -0
  300. package/dist/insights/components/shared/InsightsCard/MiniDescriptionMUI.d.ts +9 -0
  301. package/dist/insights/components/shared/StatusIndicator.d.ts +1 -1
  302. package/dist/insights/components/shared/TransactionCard.d.ts +14 -0
  303. package/dist/insights/index.es.js +1361 -1081
  304. package/dist/insights/store/BeatStore.d.ts +1 -1
  305. package/dist/investments/InvestmentsWidget.d.ts +1 -1
  306. package/dist/investments/api/HoldingApi.d.ts +1 -1
  307. package/dist/investments/components/allocation/util/createInvestementsAllocationData.d.ts +2 -2
  308. package/dist/investments/index.es.js +258 -258
  309. package/dist/investments/stores/HoldingStore.d.ts +2 -1
  310. package/dist/investments/util/InvestmentUtil.d.ts +1 -1
  311. package/dist/merchants/api/MerchantApi.d.ts +1 -1
  312. package/dist/merchants/index.es.js +16 -16
  313. package/dist/merchants/stores/MerchantStore.d.ts +2 -1
  314. package/dist/microinsights/InsightsMicroWidget.d.ts +1 -1
  315. package/dist/microinsights/beaticons/AreaChartIcon.d.ts +3 -0
  316. package/dist/microinsights/beaticons/AverageSpendComparisonIcon.d.ts +3 -0
  317. package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +5 -1
  318. package/dist/microinsights/beaticons/InstitutionLogoIcon.d.ts +5 -0
  319. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +0 -2
  320. package/dist/microinsights/beaticons/index.d.ts +3 -0
  321. package/dist/microinsights/cards/InsightCard.d.ts +1 -1
  322. package/dist/microinsights/carousel/BeatList.d.ts +1 -1
  323. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -1
  324. package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +1 -1
  325. package/dist/microinsights/constants/Analytics.d.ts +1 -1
  326. package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -1
  327. package/dist/microinsights/context/hooks.d.ts +1 -1
  328. package/dist/microinsights/index.es.js +1 -1
  329. package/dist/microinsights/interfaces.d.ts +1 -1
  330. package/dist/microinsights/stores/CopyStore.d.ts +1 -1
  331. package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
  332. package/dist/microinsights/utils/DataSeries.d.ts +1 -1
  333. package/dist/microinsights/utils/colorType.d.ts +22 -0
  334. package/dist/networth/NetWorthWidget.d.ts +1 -1
  335. package/dist/networth/components/micro/NetworthData.d.ts +1 -1
  336. package/dist/networth/components/micro/ZeroState.d.ts +1 -1
  337. package/dist/networth/index.es.js +181 -174
  338. package/dist/networth/stores/NetWorthStore.d.ts +2 -1
  339. package/dist/networth/types/NetWorth.d.ts +1 -1
  340. package/dist/networth/utils/NetWorthUtils.d.ts +1 -1
  341. package/dist/notifications/components/NotificationBadge.d.ts +1 -1
  342. package/dist/notifications/components/NotificationCard.d.ts +1 -1
  343. package/dist/notifications/components/NotificationDrawer.d.ts +1 -1
  344. package/dist/notifications/components/NotificationList.d.ts +2 -1
  345. package/dist/notifications/index.es.js +104 -92
  346. package/dist/notifications/stores/NotificationStore.d.ts +2 -1
  347. package/dist/notifications/utils/NotificationUtils.d.ts +2 -1
  348. package/dist/recurringtransactions/RecurringTransactionsMiniWidget.d.ts +1 -1
  349. package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
  350. package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -1
  351. package/dist/recurringtransactions/components/PaymentSchedule.d.ts +1 -1
  352. package/dist/recurringtransactions/components/RecurrenceList.d.ts +1 -1
  353. package/dist/recurringtransactions/components/RecurrenceRow.d.ts +1 -1
  354. package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +1 -1
  355. package/dist/recurringtransactions/components/actions/PaymentScheduleAction.d.ts +1 -1
  356. package/dist/recurringtransactions/components/micro/MerchantLogosRow.d.ts +1 -1
  357. package/dist/recurringtransactions/components/micro/OverlappingMerchantLogos.d.ts +1 -1
  358. package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransactionDetails.d.ts +1 -1
  359. package/dist/recurringtransactions/components/shared/recurringsettings/RecurringRow.d.ts +1 -1
  360. package/dist/recurringtransactions/index.es.js +477 -451
  361. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -1
  362. package/dist/recurringtransactions/util/RecurringTransactions.d.ts +1 -1
  363. package/dist/repeatingTransactions-DHIG94pi.mjs +4 -0
  364. package/dist/settings/NotificationSettingsWidget.d.ts +1 -1
  365. package/dist/settings/SettingsWidget.d.ts +1 -1
  366. package/dist/settings/TransactionRulesWidget.d.ts +1 -1
  367. package/dist/settings/api/SettingsApi.d.ts +1 -2
  368. package/dist/settings/components/devices/DeviceDialog.d.ts +1 -1
  369. package/dist/settings/components/devices/DeviceList.d.ts +1 -1
  370. package/dist/settings/components/devices/DeviceTable.d.ts +1 -1
  371. package/dist/settings/components/notifications/AccountNotificationProfile.d.ts +1 -1
  372. package/dist/settings/components/notifications/AccountProfileListItem.d.ts +1 -1
  373. package/dist/settings/components/notifications/NotificationProfile.d.ts +1 -1
  374. package/dist/settings/components/notifications/NotificationSettings.d.ts +1 -1
  375. package/dist/settings/components/transactionrules/actions/EditRuleAction.d.ts +1 -1
  376. package/dist/settings/index.es.js +314 -323
  377. package/dist/settings/stores/SettingsStore.d.ts +3 -2
  378. package/dist/settings/util/Notifications.d.ts +1 -1
  379. package/dist/spending/SpendingMiniWidget.d.ts +1 -1
  380. package/dist/spending/SpendingWidget.d.ts +1 -1
  381. package/dist/spending/index.es.js +167 -166
  382. package/dist/spending/utils/SpendingData.d.ts +1 -1
  383. package/dist/transactions/TransactionWidget.d.ts +1 -1
  384. package/dist/transactions/api/TransactionApi.d.ts +1 -1
  385. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -1
  386. package/dist/transactions/components/shared/TransactionList.d.ts +1 -1
  387. package/dist/transactions/components/shared/getEmbeddedInstanceSlotByBeatTemplates.d.ts +1 -1
  388. package/dist/transactions/components/shared/transactiondetails/Description.d.ts +1 -1
  389. package/dist/transactions/components/shared/transactiondetails/FlagTransaction.d.ts +1 -1
  390. package/dist/transactions/components/shared/transactiondetails/TransactionAmountHeader.d.ts +1 -1
  391. package/dist/transactions/components/shared/transactiondetails/TransactionDetailsView.d.ts +1 -1
  392. package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +13 -0
  393. package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.d.ts +1 -1
  394. package/dist/transactions/components/shared/transactiondetails/actions/DateAction.d.ts +1 -1
  395. package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.d.ts +1 -1
  396. package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.d.ts +1 -1
  397. package/dist/transactions/components/shared/transactiondetails/actions/HideAction.d.ts +1 -1
  398. package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.d.ts +1 -1
  399. package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.d.ts +1 -1
  400. package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.d.ts +1 -1
  401. package/dist/transactions/components/shared/transactiondetails/actions/index.d.ts +1 -0
  402. package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -1
  403. package/dist/transactions/components/splitmanager/SplitManager.d.ts +1 -1
  404. package/dist/transactions/components/splitmanager/SplitRow.d.ts +1 -1
  405. package/dist/transactions/components/tagmanager/TagRow.d.ts +1 -1
  406. package/dist/transactions/components/transactionwidget/actions/EditCategoryAction.d.ts +1 -1
  407. package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.d.ts +1 -1
  408. package/dist/transactions/constants/Actions.d.ts +4 -3
  409. package/dist/transactions/constants/Transaction.d.ts +1 -1
  410. package/dist/transactions/index.es.js +195 -187
  411. package/dist/transactions/stores/TransactionStore.d.ts +2 -1
  412. package/dist/transactions/stores/UiStore.d.ts +1 -1
  413. package/dist/transactions/utils/Filters.d.ts +1 -1
  414. package/dist/transactions/utils/Transactions.d.ts +1 -1
  415. package/dist/transactions/utils/buildDetailedTransactions.d.ts +2 -2
  416. package/dist/transactions/utils/exportTransactionsToCSV.d.ts +1 -1
  417. package/dist/transactions/utils/sortAndFilterTransactions.d.ts +1 -1
  418. package/dist/trends/TrendsFullWidget.d.ts +1 -1
  419. package/dist/trends/TrendsMiniWidget.d.ts +1 -1
  420. package/dist/trends/TrendsWidget.d.ts +1 -1
  421. package/dist/trends/components/CategoriesList.d.ts +1 -1
  422. package/dist/trends/components/CategoriesListItem.d.ts +1 -1
  423. package/dist/trends/components/CategoryDetails.d.ts +3 -0
  424. package/dist/trends/components/TrendsChartTotals.d.ts +1 -1
  425. package/dist/trends/components/TrendsInsights.d.ts +1 -1
  426. package/dist/trends/components/trendstable/AccessibleSortIcon.d.ts +13 -0
  427. package/dist/trends/components/trendstable/TrendsTable.d.ts +1 -1
  428. package/dist/trends/index.es.js +817 -764
  429. package/dist/trends/stores/TrendsStore.d.ts +2 -1
  430. package/dist/trends/utils/SpendingData.d.ts +1 -1
  431. package/dist/trends/utils/TrendsData.d.ts +1 -1
  432. package/dist/trends/utils/TrendsTable.d.ts +1 -1
  433. package/dist/trends/utils/TrendsWidget.d.ts +7 -0
  434. package/dist/trends/utils/shared.d.ts +1 -1
  435. package/dist/{useAccountDisplayName-b2xxcD0C.mjs → useAccountDisplayName-DKwT1mWv.mjs} +1 -1
  436. package/dist/{useCombineEvents-ARuNN9Xh.mjs → useCombineEvents-Bqojlv8q.mjs} +3 -3
  437. package/dist/{useInsightsEnabled-Dd-AfsqC.mjs → useInsightsEnabled-DL_oNyI0.mjs} +1 -1
  438. package/dist/{useWidgetLoadTimer-DmNCCLa-.mjs → useWidgetLoadTimer-DgN1bTyu.mjs} +1 -1
  439. package/package.json +17 -10
  440. package/dist/AccountDetailsHeader-Bn2E0Qjk.mjs +0 -95
  441. package/dist/AccountListItem-k63LpVBs.mjs +0 -90
  442. package/dist/Accounts-CuE8aSZN.mjs +0 -27
  443. package/dist/BudgetUtil-BZiGckNY.mjs +0 -238
  444. package/dist/CashflowStore-naOtJcwo.mjs +0 -91
  445. package/dist/CurrencyInput-BEB3FS70.mjs +0 -85
  446. package/dist/Dialog-jmgGw5WA.mjs +0 -58
  447. package/dist/GlobalAccountFilter-CIF-aT3F.mjs +0 -316
  448. package/dist/GoalStore-BjHKNAVm.mjs +0 -421
  449. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
  450. package/dist/LineChart-CnscUFUG.mjs +0 -580
  451. package/dist/Loader-icSc5MlE.mjs +0 -24
  452. package/dist/Localization-2MODESHW.mjs +0 -30
  453. package/dist/MicroWidgetContainer-CBRk9KG-.mjs +0 -45
  454. package/dist/MiniWidgetContainer-CXQcSWSl.mjs +0 -56
  455. package/dist/Notification-Bs1fdbzI.mjs +0 -95
  456. package/dist/RecurringTransactions-DlKYwpfK.mjs +0 -296
  457. package/dist/SearchBox-B2_zLv8-.mjs +0 -42
  458. package/dist/SpendingLegend-Bld71d7q.mjs +0 -193
  459. package/dist/StatusIndicator-CNMQeYyJ.mjs +0 -55
  460. package/dist/TransactionDetails-Lvt9GCU5.mjs +0 -1194
  461. package/dist/TransactionList-BDffKJMO.mjs +0 -204
  462. package/dist/User-DS18cMaz.mjs +0 -237
  463. package/dist/ViewMoreMicroCard-YHRLl08A.mjs +0 -1152
  464. package/dist/common/components/barchart/Bar.d.ts +0 -25
  465. package/dist/common/components/barchart/BarChart.d.ts +0 -34
  466. package/dist/common/components/barchart/BarColumn.d.ts +0 -37
  467. package/dist/common/components/barchart/Legend.d.ts +0 -8
  468. package/dist/common/components/barchart/Util.d.ts +0 -42
  469. package/dist/common/components/barchart/index.d.ts +0 -1
  470. package/dist/common/types/SpendingPlan.d.ts +0 -44
  471. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
  472. package/dist/trends/components/CategoryDetailDrawer.d.ts +0 -7
  473. /package/dist/{common → core}/types/Account.d.ts +0 -0
  474. /package/dist/{common → core}/types/Cashflow.d.ts +0 -0
  475. /package/dist/{common → core}/types/Category.d.ts +0 -0
  476. /package/dist/{common → core}/types/Client.d.ts +0 -0
  477. /package/dist/{common → core}/types/Date.d.ts +0 -0
  478. /package/dist/{common → core}/types/Debt.d.ts +0 -0
  479. /package/dist/{common → core}/types/Global.d.ts +0 -0
  480. /package/dist/{common → core}/types/GlobalCopy.d.ts +0 -0
  481. /package/dist/{common → core}/types/Goal.d.ts +0 -0
  482. /package/dist/{common → core}/types/Handlers.d.ts +0 -0
  483. /package/dist/{common → core}/types/Help.d.ts +0 -0
  484. /package/dist/{common → core}/types/Holding.d.ts +0 -0
  485. /package/dist/{common → core}/types/Institution.d.ts +0 -0
  486. /package/dist/{common → core}/types/LocalizedContent.d.ts +0 -0
  487. /package/dist/{common → core}/types/Merchant.d.ts +0 -0
  488. /package/dist/{common → core}/types/RepeatingTransaction.d.ts +0 -0
  489. /package/dist/{common → core}/types/ScheduledPayment.d.ts +0 -0
  490. /package/dist/{common → core}/types/ScreenSize.d.ts +0 -0
  491. /package/dist/{common → core}/types/Transaction.d.ts +0 -0
  492. /package/dist/{common → core}/types/User.d.ts +0 -0
  493. /package/dist/{common → core}/types/Widgets.d.ts +0 -0
  494. /package/dist/{common → core}/types/localization/AccountFilterCopy.d.ts +0 -0
  495. /package/dist/{common → core}/types/localization/AccountTypeCopy.d.ts +0 -0
  496. /package/dist/{common → core}/types/localization/AccountsCopy.d.ts +0 -0
  497. /package/dist/{common → core}/types/localization/AnalyticsCopy.d.ts +0 -0
  498. /package/dist/{common → core}/types/localization/CategoryCopy.d.ts +0 -0
  499. /package/dist/{common → core}/types/localization/ConnectCopy.d.ts +0 -0
  500. /package/dist/{common → core}/types/localization/CurrencyInputCopy.d.ts +0 -0
  501. /package/dist/{common → core}/types/localization/DateRangePickerCopy.d.ts +0 -0
  502. /package/dist/{common → core}/types/localization/FinstrongCopy.d.ts +0 -0
  503. /package/dist/{common → core}/types/localization/GoalsCopy.d.ts +0 -0
  504. /package/dist/{common → core}/types/localization/HelpCopy.d.ts +0 -0
  505. /package/dist/{common → core}/types/localization/InsightsFeedCopy.d.ts +0 -0
  506. /package/dist/{common → core}/types/localization/InvestmentsCopy.d.ts +0 -0
  507. /package/dist/{common → core}/types/localization/MicroInsightsCopy.d.ts +0 -0
  508. /package/dist/{common → core}/types/localization/NetWorthCopy.d.ts +0 -0
  509. /package/dist/{common → core}/types/localization/NotificationsCopy.d.ts +0 -0
  510. /package/dist/{common → core}/types/localization/SettingsCopy.d.ts +0 -0
  511. /package/dist/{common → core}/types/localization/TransactionsCopy.d.ts +0 -0
  512. /package/dist/{common → core}/types/localization/TrendsCopy.d.ts +0 -0
  513. /package/dist/{common → core}/types/localization/index.d.ts +0 -0
@@ -1,123 +1,125 @@
1
- import { jsxs as C, jsx as e, Fragment as St } from "react/jsx-runtime";
2
- import g, { useRef as wt, useState as xt, useEffect as vt } from "react";
3
- import { observer as M } from "mobx-react-lite";
4
- import { CategoryIcon as ve, Text as Q, Icon as He, H3 as Oe, P as ye, ChevronRightIcon as Dt } from "@mxenabled/mxui";
5
- import W from "@mui/material/Box";
6
- import w from "@mui/material/Stack";
7
- import Se from "@mui/material/Button";
8
- import { addSeconds as qe } from "date-fns/addSeconds";
9
- import { differenceInCalendarMonths as we } from "date-fns/differenceInCalendarMonths";
1
+ import { jsxs as C, jsx as e, Fragment as wt } from "react/jsx-runtime";
2
+ import g, { useRef as vt, useState as Dt, useEffect as It } from "react";
3
+ import { observer as A } from "mobx-react-lite";
4
+ import { CategoryIcon as we, Text as F, Icon as He, H3 as Ge, P as pe } from "@mxenabled/mxui";
5
+ import N from "@mui/material/Box";
6
+ import S from "@mui/material/Stack";
7
+ import Te from "@mui/material/Button";
8
+ import { addSeconds as et } from "date-fns/addSeconds";
9
+ import { differenceInCalendarMonths as Se } from "date-fns/differenceInCalendarMonths";
10
10
  import Lt from "numeral";
11
- import { useTheme as de } from "@mui/material/styles";
12
- import { useItemTooltip as It, ChartsTooltipContainer as Et } from "@mui/x-charts/ChartsTooltip";
13
- import { LineChart as Mt } from "@mui/x-charts/LineChart";
14
- import { u as q } from "../useScreenSize-B6JyS_Lj.mjs";
15
- import { u as At } from "../useDimensions-CeDR9V8N.mjs";
16
- import Je from "@mui/material/Card";
17
- import et from "@mui/material/CardContent";
11
+ import { useTheme as ae, styled as Et, alpha as Mt } from "@mui/material/styles";
12
+ import { useItemTooltip as At, ChartsTooltipContainer as Rt } from "@mui/x-charts/ChartsTooltip";
13
+ import { LineChart as kt } from "@mui/x-charts/LineChart";
14
+ import { u as j } from "../useScreenSize-B6JyS_Lj.mjs";
15
+ import { u as Ht } from "../useDimensions-CeDR9V8N.mjs";
16
+ import tt from "@mui/material/Card";
17
+ import ot from "@mui/material/CardContent";
18
18
  import Ne from "@mui/material/Divider";
19
- import Ve from "@mui/material/Grid";
20
- import { u as A, m as J, g as z, b as Ce, h as De, d as Le, v as _e, p as tt, f as Ge, a as ot } from "../hooks-CBl85iRr.mjs";
21
- import { b as nt } from "../Localization-2MODESHW.mjs";
22
- import { C as xe } from "../CurrencyText-C-85TnUF.mjs";
23
- import { a as Re, b as Fe, c as Rt } from "../Category-Ccoew_sA.mjs";
24
- import { f as Z, D as B } from "../DateFormats-Cs-NbEZ7.mjs";
25
- import { f as oe, a as kt } from "../NumberFormatting-DjTD0t3W.mjs";
26
- import { a as ze, c as Ht, g as Nt, L as st } from "../TrendsStore-ncmbS9eE.mjs";
27
- import { T as es } from "../TrendsStore-ncmbS9eE.mjs";
28
- import { c as Wt, i as Ot, d as Gt, e as Bt, g as rt, b as at, f as $e } from "../SpendingData-CI_C9xln.mjs";
29
- import Pt from "@mui/material/ToggleButton";
30
- import Vt from "@mui/material/ToggleButtonGroup";
31
- import { parseISO as it } from "date-fns/parseISO";
32
- import { H as ke } from "../HeaderCell-DjuifqHJ.mjs";
33
- import { T as G, a as Ft } from "../ViewMoreMicroCard-YHRLl08A.mjs";
34
- import { DataGridPro as zt } from "@mui/x-data-grid-pro";
35
- import { A as v } from "../Analytics-i5h6BxR1.mjs";
36
- import { T as lt } from "../TransactionList-BDffKJMO.mjs";
37
- import { T as ct } from "../TransactionDetails-Lvt9GCU5.mjs";
38
- import { D as We } from "../Drawer-Bet2ZPJo.mjs";
39
- import { L as Ie } from "../Loader-icSc5MlE.mjs";
40
- import { u as Ee } from "../useWidgetLoadTimer-DmNCCLa-.mjs";
41
- import { W as dt } from "../WidgetContainer-DFwVgavi.mjs";
42
- import { L as Be } from "../LineChart-CnscUFUG.mjs";
43
- import { M as $t } from "../MiniWidgetContainer-CXQcSWSl.mjs";
44
- import { subMonths as Kt } from "date-fns";
45
- import { TrendingUp as Yt, TrendingDown as jt, MultilineChart as Ut, ExpandLess as Xt, ExpandMore as Zt, ArrowBack as Qt } from "@mxenabled/mx-icons";
46
- import { M as qt } from "../MicroWidgetContainer-CBRk9KG-.mjs";
47
- import Jt from "@mui/material/Collapse";
48
- import eo from "@mui/material/List";
49
- import to from "@mui/material/ListItem";
50
- import oo from "@mui/material/ListItemButton";
51
- import no from "@mui/material/ListItemIcon";
52
- import so from "@mui/material/ListItemText";
53
- import ut from "@mui/material/styles/useTheme";
54
- import { Stack as ro } from "@mui/material";
55
- import ao from "@mui/material/Paper";
56
- import { b as io } from "../CategoryUtil-DB-9JMbi.mjs";
57
- import { E as lo } from "../ExportCsvAction-Cc14QGA9.mjs";
58
- import { u as co } from "../useInsightsEnabled-Dd-AfsqC.mjs";
59
- import { E as uo } from "../EmptyState-DHAkGsjk.mjs";
60
- import { b as ho } from "../GlobalAccountFilter-CIF-aT3F.mjs";
61
- const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
62
- const { categories: n } = A(), { getCategoryName: o } = J(), s = o(t);
63
- return /* @__PURE__ */ C(w, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
19
+ import $e from "@mui/material/Grid";
20
+ import { u as R, l as U, g as $, b as fe, h as ve, d as De, B as ye, p as nt, f as Be, a as st } from "../hooks-BxkfR-Ff.mjs";
21
+ import { b as rt } from "../Localization-CPkpIwIx.mjs";
22
+ import { C as xe } from "../CurrencyText-CA-E5N_y.mjs";
23
+ import { C as Re, b as ze, c as Nt } from "../Category-CevNQ03n.mjs";
24
+ import { f as Y, D as P } from "../DateFormats-BMpMrZpW.mjs";
25
+ import { f as re, a as Wt } from "../NumberFormatting-QCaNwbjv.mjs";
26
+ import { c as Ot, a as Ke, g as Gt, L as Bt } from "../TrendsStore-CYdTo7cN.mjs";
27
+ import { T as us } from "../TrendsStore-CYdTo7cN.mjs";
28
+ import { c as Pt, i as Vt, d as Ft, e as $t, b as at, g as it, f as Ye } from "../SpendingData-Bz1bCWAs.mjs";
29
+ import zt from "@mui/material/ToggleButton";
30
+ import Kt from "@mui/material/ToggleButtonGroup";
31
+ import { parseISO as lt } from "date-fns/parseISO";
32
+ import { H as ke } from "../HeaderCell-P8w6CmfO.mjs";
33
+ import { T as W, b as Yt } from "../ViewMoreMicroCard-D24H9kDm.mjs";
34
+ import { useGridApiContext as jt, useGridRootProps as Ut, DataGridPro as Xt } from "@mui/x-data-grid-pro";
35
+ import Zt from "@mui/material/Badge";
36
+ import Qt from "@mui/material/IconButton";
37
+ import { A as v } from "../Analytics-BYItVAe-.mjs";
38
+ import { T as ct } from "../StatusIndicator-4tWnjeKS.mjs";
39
+ import { T as dt } from "../TransactionDetails-D1I1XEsT.mjs";
40
+ import { D as Pe } from "../Drawer-Bbe4AMB1.mjs";
41
+ import { u as Ie } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
42
+ import { L as Le } from "../Loader-D3rjKx72.mjs";
43
+ import { W as ut } from "../WidgetContainer-B7xDq2bM.mjs";
44
+ import { L as Ve } from "../LineChart-EAr5ox5U.mjs";
45
+ import { M as qt } from "../MiniWidgetContainer-Bhkv-hpz.mjs";
46
+ import { subMonths as Jt } from "date-fns";
47
+ import { TrendingUp as eo, TrendingDown as to, MultilineChart as oo, ExpandLess as no, ExpandMore as so, ChevronRight as ro, ArrowBack as ao } from "@mxenabled/mx-icons";
48
+ import { M as io } from "../MicroWidgetContainer-B_EnfvCq.mjs";
49
+ import lo from "@mui/material/Collapse";
50
+ import We from "@mui/material/List";
51
+ import mt from "@mui/material/ListItem";
52
+ import co from "@mui/material/ListItemButton";
53
+ import uo from "@mui/material/ListItemIcon";
54
+ import ht from "@mui/material/ListItemText";
55
+ import gt from "@mui/material/styles/useTheme";
56
+ import { b as Oe } from "../CategoryUtil-BVixr0d5.mjs";
57
+ import { Stack as mo } from "@mui/material";
58
+ import ho from "@mui/material/ListItemAvatar";
59
+ import { E as go } from "../ExportCsvAction-ErKh7wJ2.mjs";
60
+ import { u as po } from "../useInsightsEnabled-DL_oNyI0.mjs";
61
+ import { E as fo } from "../EmptyState-DHAkGsjk.mjs";
62
+ import { C as yo } from "../ConnectDrawer-C0wjwcJt.mjs";
63
+ const pt = ({ categoryGuid: t, topLevelCategoryGuid: s }) => {
64
+ const { categories: n } = R(), { getCategoryName: o } = U(), r = o(t);
65
+ return /* @__PURE__ */ C(S, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
64
66
  /* @__PURE__ */ e(
65
- W,
67
+ N,
66
68
  {
67
- "aria-label": nt(n.category_icon_label_aria, s),
69
+ "aria-label": rt(n.category_icon_label_aria, r),
68
70
  mb: 4,
69
71
  role: "img",
70
- children: /* @__PURE__ */ e(ve, { categoryGuid: r })
72
+ children: /* @__PURE__ */ e(we, { categoryGuid: s })
71
73
  }
72
74
  ),
73
- /* @__PURE__ */ e(Q, { variant: "Body", children: s })
75
+ /* @__PURE__ */ e(F, { variant: "body1", children: r })
74
76
  ] });
75
- }, go = ({
76
- categoryGuids: { guid: t, topLevelGuid: r },
77
+ }, Co = ({
78
+ categoryGuids: { guid: t, topLevelGuid: s },
77
79
  hoveredAreaData: n,
78
80
  cursorPosition: o,
79
- chartContainerRef: s
81
+ chartContainerRef: r
80
82
  }) => {
81
- const c = de(), a = wt(null), [u, d] = xt({ x: o.x, y: o.y });
82
- if (vt(() => {
83
+ const i = ae(), a = vt(null), [c, u] = Dt({ x: o.x, y: o.y });
84
+ if (It(() => {
83
85
  (() => {
84
- const m = a.current, _ = s.current;
86
+ const m = a.current, _ = r.current;
85
87
  if (!m || !_) return;
86
88
  const h = m.getBoundingClientRect(), p = _.getBoundingClientRect();
87
- let f = o.x, x = o.y;
88
- f + h.width * 2 > p.right ? f = o.x - h.width : f - h.width < p.left && (f = o.x), x + h.height * 2 > p.bottom && (x = o.y - h.height), d({ x: f, y: x });
89
+ let f = o.x, T = o.y;
90
+ f + h.width * 2 > p.right ? f = o.x - h.width : f - h.width < p.left && (f = o.x), T + h.height * 2 > p.bottom && (T = o.y - h.height), u({ x: f, y: T });
89
91
  })();
90
- }, [o, s]), !n) return null;
91
- const i = n.reduce((y, m) => y + m.y, 0);
92
+ }, [o, r]), !n) return null;
93
+ const l = n.reduce((y, m) => y + m.y, 0);
92
94
  return /* @__PURE__ */ e(
93
- Je,
95
+ tt,
94
96
  {
95
97
  ref: a,
96
98
  sx: {
97
99
  position: "absolute",
98
- top: u.y,
99
- left: u.x,
100
+ top: c.y,
101
+ left: c.x,
100
102
  width: 250,
101
103
  pointerEvents: "none"
102
104
  },
103
- children: /* @__PURE__ */ C(et, { children: [
104
- /* @__PURE__ */ C(W, { alignItems: "center", display: "flex", flexDirection: "column", children: [
105
- /* @__PURE__ */ e(ht, { categoryGuid: t, topLevelCategoryGuid: r }),
106
- /* @__PURE__ */ e(Q, { variant: "Small", children: `${n.length}-month total` }),
107
- /* @__PURE__ */ e(xe, { amount: i, bold: !0, formatString: "0,0", variant: "body2" })
105
+ children: /* @__PURE__ */ C(ot, { children: [
106
+ /* @__PURE__ */ C(N, { alignItems: "center", display: "flex", flexDirection: "column", children: [
107
+ /* @__PURE__ */ e(pt, { categoryGuid: t, topLevelCategoryGuid: s }),
108
+ /* @__PURE__ */ e(F, { variant: "body2", children: `${n.length}-month total` }),
109
+ /* @__PURE__ */ e(xe, { amount: l, bold: !0, formatString: "0,0", variant: "body2" })
108
110
  ] }),
109
111
  /* @__PURE__ */ e(Ne, { sx: { my: 16, width: "100%" } }),
110
- /* @__PURE__ */ e(Ve, { container: !0, children: n.map((y, m) => /* @__PURE__ */ C(g.Fragment, { children: [
112
+ /* @__PURE__ */ e($e, { container: !0, children: n.map((y, m) => /* @__PURE__ */ C(g.Fragment, { children: [
111
113
  m > 0 && m % 3 === 0 && /* @__PURE__ */ e(Ne, { sx: { my: 16, width: "100%" } }),
112
- /* @__PURE__ */ e(Ve, { item: !0, xs: 4, children: /* @__PURE__ */ C(W, { alignItems: "center", display: "flex", flexDirection: "column", children: [
113
- /* @__PURE__ */ e(Q, { color: c.palette.text.secondary, variant: "XSmall", children: y.x }),
114
+ /* @__PURE__ */ e($e, { item: !0, xs: 4, children: /* @__PURE__ */ C(N, { alignItems: "center", display: "flex", flexDirection: "column", children: [
115
+ /* @__PURE__ */ e(F, { color: i.palette.text.secondary, variant: "caption", children: y.x }),
114
116
  /* @__PURE__ */ e(
115
117
  xe,
116
118
  {
117
119
  amount: y.y,
118
120
  bold: !0,
119
121
  formatString: "0,0",
120
- variant: "Body"
122
+ variant: "body1"
121
123
  }
122
124
  )
123
125
  ] }) })
@@ -125,17 +127,17 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
125
127
  ] })
126
128
  }
127
129
  );
128
- }, mo = M(go), po = ({
130
+ }, _o = A(Co), bo = ({
129
131
  sx: t,
130
- categoryGuids: r,
132
+ categoryGuids: s,
131
133
  hoveredLegend: n,
132
134
  legendRef: o,
133
- onHoverLegend: s,
134
- onClickLegend: c
135
+ onHoverLegend: r,
136
+ onClickLegend: i
135
137
  }) => {
136
- const { isMobile: a } = q(), { getCategoryName: u } = J();
138
+ const { isMobile: a } = j(), { getCategoryName: c } = U();
137
139
  return /* @__PURE__ */ e(
138
- w,
140
+ S,
139
141
  {
140
142
  direction: "row",
141
143
  flexWrap: "wrap",
@@ -143,14 +145,14 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
143
145
  justifyContent: "start",
144
146
  ref: o,
145
147
  sx: t,
146
- children: r.map(({ guid: d, top_level_guid: i }) => {
147
- const y = n === d, m = Re[d], _ = Re[i], h = m ?? _ ?? Re.default, p = h + "33";
148
+ children: s.map(({ guid: u, top_level_guid: l }) => {
149
+ const y = n === u, m = Re[u], _ = Re[l], h = m ?? _ ?? Re.default, p = h + "33";
148
150
  return /* @__PURE__ */ C(
149
- Se,
151
+ Te,
150
152
  {
151
- onClick: () => c(d),
152
- onMouseEnter: () => s(d),
153
- onMouseLeave: () => s(null),
153
+ onClick: () => i(u),
154
+ onMouseEnter: () => r(u),
155
+ onMouseLeave: () => r(null),
154
156
  sx: {
155
157
  color: "text.primary",
156
158
  fontWeight: "normal",
@@ -164,7 +166,7 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
164
166
  },
165
167
  children: [
166
168
  /* @__PURE__ */ e(
167
- W,
169
+ N,
168
170
  {
169
171
  sx: {
170
172
  width: 16,
@@ -175,136 +177,136 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
175
177
  }
176
178
  }
177
179
  ),
178
- /* @__PURE__ */ e(Q, { variant: "Body", children: u(d) })
180
+ /* @__PURE__ */ e(F, { variant: "body1", children: c(u) })
179
181
  ]
180
182
  },
181
- d
183
+ u
182
184
  );
183
185
  })
184
186
  }
185
187
  );
186
- }, fo = ({
187
- categoryGuids: { guid: t, topLevelGuid: r },
188
+ }, To = ({
189
+ categoryGuids: { guid: t, topLevelGuid: s },
188
190
  series: n,
189
191
  xData: o
190
192
  }) => {
191
- const s = It(), c = de();
192
- if (!s?.identifier) return null;
193
- const { dataIndex: a, seriesId: u } = s.identifier;
194
- if (a == null || !u) return null;
195
- const i = n.find((m) => m.id === u)?.data?.[a], y = o?.[a];
196
- return i === void 0 || !y ? null : /* @__PURE__ */ e(Je, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(et, { children: /* @__PURE__ */ C(W, { alignItems: "center", display: "flex", flexDirection: "column", children: [
197
- /* @__PURE__ */ e(ht, { categoryGuid: t, topLevelCategoryGuid: r }),
198
- /* @__PURE__ */ e(Q, { color: c.palette.text.secondary, variant: "Small", children: Z(y, B.MONTH_SHORT_YEAR) }),
199
- /* @__PURE__ */ e(xe, { amount: String(i), bold: !0, formatString: "0,0", variant: "Body" })
193
+ const r = At(), i = ae();
194
+ if (!r?.identifier) return null;
195
+ const { dataIndex: a, seriesId: c } = r.identifier;
196
+ if (a == null || !c) return null;
197
+ const l = n.find((m) => m.id === c)?.data?.[a], y = o?.[a];
198
+ return l === void 0 || !y ? null : /* @__PURE__ */ e(tt, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(ot, { children: /* @__PURE__ */ C(N, { alignItems: "center", display: "flex", flexDirection: "column", children: [
199
+ /* @__PURE__ */ e(pt, { categoryGuid: t, topLevelCategoryGuid: s }),
200
+ /* @__PURE__ */ e(F, { color: i.palette.text.secondary, variant: "body2", children: Y(y, P.MONTH_SHORT_YEAR) }),
201
+ /* @__PURE__ */ e(xe, { amount: String(l), bold: !0, formatString: "0,0", variant: "body1" })
200
202
  ] }) }) });
201
- }, yo = ({
203
+ }, So = ({
202
204
  onHoverArea: t,
203
- onHoverPoint: r,
205
+ onHoverPoint: s,
204
206
  onHoverLegend: n,
205
207
  onClickLegend: o,
206
- stackedDatasets: s,
207
- unstackedDatasets: c = [],
208
+ stackedDatasets: r,
209
+ unstackedDatasets: i = [],
208
210
  availableHeight: a = 0,
209
- minimumHeight: u = 350
211
+ minimumHeight: c = 350
210
212
  }) => {
211
- const d = de(), { isMobile: i } = q(), [y, { height: m }] = At(), _ = g.useRef(null), [h, p] = g.useState(0);
213
+ const u = ae(), { isMobile: l } = j(), [y, { height: m }] = Ht(), _ = g.useRef(null), [h, p] = g.useState(0);
212
214
  g.useEffect(() => {
213
- const l = Math.max(a - m, u);
214
- p(l);
215
+ const d = Math.max(a - m, c);
216
+ p(d);
215
217
  }, [a, m]);
216
- const [f, x] = g.useState(null), [b, R] = g.useState({
218
+ const [f, T] = g.useState(null), [x, k] = g.useState({
217
219
  hoveredSeriesId: null,
218
220
  hoveredAreaData: null,
219
221
  isAreaHovered: !1,
220
222
  cursorPos: { x: 0, y: 0 }
221
- }), { hoveredSeriesId: E, hoveredAreaData: S, isAreaHovered: k, cursorPos: H } = b, $ = k && E && S, P = !$, K = [...s, ...c], I = K[0]?.dataset.length ?? 0, te = K.flatMap((l) => l.dataset.map((T) => T.x)), O = K.flatMap((l) => l.dataset.map((T) => T.y)), ne = s[0]?.dataset?.map(
222
- (l, T) => s.reduce((L, U) => L + U.dataset[T]?.y || 0, 0)
223
- ) ?? [0], se = Math.max(...ne), X = Math.max(
224
- ...c.flatMap((l) => l.dataset.map((T) => T.y))
225
- ), ue = Math.floor(Math.min(...O) / 100) * 100, he = Math.ceil(Math.max(se, X) / 100) * 100, V = s.map((l, T) => ({
226
- id: `stacked-${T}`,
227
- guid: l.category_guid,
228
- top_level_guid: l.top_level_category_guid,
223
+ }), { hoveredSeriesId: L, hoveredAreaData: E, isAreaHovered: w, cursorPos: M } = x, ie = w && L && E, X = !ie, V = [...r, ...i], Z = V[0]?.dataset.length ?? 0, O = V.flatMap((d) => d.dataset.map((b) => b.x)), G = V.flatMap((d) => d.dataset.map((b) => b.y)), Q = r[0]?.dataset?.map(
224
+ (d, b) => r.reduce((I, K) => I + K.dataset[b]?.y || 0, 0)
225
+ ) ?? [0], Ce = Math.max(...Q), le = Math.max(
226
+ ...i.flatMap((d) => d.dataset.map((b) => b.y))
227
+ ), q = Math.floor(Math.min(...G) / 100) * 100, ce = Math.ceil(Math.max(Ce, le) / 100) * 100, z = r.map((d, b) => ({
228
+ id: `stacked-${b}`,
229
+ guid: d.category_guid,
230
+ top_level_guid: d.top_level_category_guid,
229
231
  area: !0,
230
- color: s[T].category_color ?? d.palette.primary.main,
231
- data: l.dataset.map((L) => L.y),
232
- label: s[T].category_name,
232
+ color: r[b].category_color ?? u.palette.primary.main,
233
+ data: d.dataset.map((I) => I.y),
234
+ label: r[b].category_name,
233
235
  stack: "total",
234
236
  type: "line",
235
237
  highlightScope: { highlight: "item" },
236
- valueFormatter: (L) => oe(L, "0,0")
237
- })), re = c.map((l, T) => ({
238
- id: `unstacked-${T}`,
239
- guid: l.category_guid,
240
- top_level_guid: l.top_level_category_guid,
238
+ valueFormatter: (I) => re(I, "0,0")
239
+ })), J = i.map((d, b) => ({
240
+ id: `unstacked-${b}`,
241
+ guid: d.category_guid,
242
+ top_level_guid: d.top_level_category_guid,
241
243
  area: !1,
242
- color: l.category_color,
243
- data: l.dataset.map((L) => L.y),
244
- label: l.category_name,
244
+ color: d.category_color,
245
+ data: d.dataset.map((I) => I.y),
246
+ label: d.category_name,
245
247
  type: "line",
246
- valueFormatter: (L) => oe(L, "0,0")
247
- })), Y = [...V, ...re], ge = [
248
- ...V.map(({ guid: l, top_level_guid: T }) => ({
249
- guid: l,
250
- top_level_guid: T
248
+ valueFormatter: (I) => re(I, "0,0")
249
+ })), ne = [...z, ...J], ee = [
250
+ ...z.map(({ guid: d, top_level_guid: b }) => ({
251
+ guid: d,
252
+ top_level_guid: b
251
253
  })),
252
- ...re.map(({ guid: l, top_level_guid: T }) => ({
253
- guid: l,
254
- top_level_guid: T
254
+ ...J.map(({ guid: d, top_level_guid: b }) => ({
255
+ guid: d,
256
+ top_level_guid: b
255
257
  }))
256
- ], j = (l) => {
257
- const L = l.startsWith("stacked-") ? s[parseInt(l.split("-")[1])] : c[parseInt(l.split("-")[1])];
258
+ ], te = (d) => {
259
+ const I = d.startsWith("stacked-") ? r[parseInt(d.split("-")[1])] : i[parseInt(d.split("-")[1])];
258
260
  return {
259
- guid: L?.category_guid,
260
- topLevelGuid: L?.top_level_category_guid
261
+ guid: I?.category_guid,
262
+ topLevelGuid: I?.top_level_category_guid
261
263
  };
262
- }, ae = (l) => {
263
- x(l), n?.(l ?? "");
264
- }, me = (l) => {
265
- o?.(l ?? "");
266
- }, ie = () => {
267
- const l = j(String(E)).guid;
268
- l && o?.(l);
269
- }, le = (l) => {
270
- const T = String(l?.seriesId), L = j(T).guid, U = Y.find((pe) => pe.id === T), ce = U && l?.dataIndex !== void 0, Te = U && l?.dataIndex === void 0;
271
- if (ce)
272
- R({
273
- hoveredSeriesId: T,
264
+ }, se = (d) => {
265
+ T(d), n?.(d ?? "");
266
+ }, de = (d) => {
267
+ o?.(d ?? "");
268
+ }, ue = () => {
269
+ const d = te(String(L)).guid;
270
+ d && o?.(d);
271
+ }, me = (d) => {
272
+ const b = String(d?.seriesId), I = te(b).guid, K = ne.find((he) => he.id === b), _e = K && d?.dataIndex !== void 0, Ee = K && d?.dataIndex === void 0;
273
+ if (_e)
274
+ k({
275
+ hoveredSeriesId: b,
274
276
  hoveredAreaData: null,
275
277
  isAreaHovered: !1,
276
- cursorPos: H
277
- }), r?.(L);
278
- else if (Te) {
279
- const pe = U?.data.map((Me, Ae) => ({
280
- x: te[Ae],
278
+ cursorPos: M
279
+ }), s?.(I);
280
+ else if (Ee) {
281
+ const he = K?.data.map((Me, Ae) => ({
282
+ x: O[Ae],
281
283
  y: Me
282
284
  })) ?? [];
283
- R({
284
- hoveredSeriesId: T,
285
- hoveredAreaData: pe,
285
+ k({
286
+ hoveredSeriesId: b,
287
+ hoveredAreaData: he,
286
288
  isAreaHovered: !0,
287
- cursorPos: H
288
- }), t?.(L);
289
+ cursorPos: M
290
+ }), t?.(I);
289
291
  } else
290
- R({
292
+ k({
291
293
  hoveredSeriesId: null,
292
294
  hoveredAreaData: null,
293
295
  isAreaHovered: !1,
294
- cursorPos: H
296
+ cursorPos: M
295
297
  });
296
- }, D = (l) => {
297
- if (l.target instanceof Element && l.target.classList[0]?.includes("MuiMarkElement-root"))
298
+ }, D = (d) => {
299
+ if (d.target instanceof Element && d.target.classList[0]?.includes("MuiMarkElement-root"))
298
300
  return;
299
- const T = l.currentTarget.getBoundingClientRect();
300
- R((L) => ({
301
- ...L,
301
+ const b = d.currentTarget.getBoundingClientRect();
302
+ k((I) => ({
303
+ ...I,
302
304
  cursorPos: {
303
- x: l.clientX - T.left,
304
- y: l.clientY - T.top
305
+ x: d.clientX - b.left,
306
+ y: d.clientY - b.top
305
307
  }
306
308
  }));
307
- }, F = {
309
+ }, B = {
308
310
  p: 4,
309
311
  "& .MuiBarLabel-root": {
310
312
  fontSize: 10,
@@ -320,15 +322,15 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
320
322
  '& [class*="MuiLineElement-series-unstacked-"]': {
321
323
  strokeWidth: 3
322
324
  },
323
- ...f && V.reduce((l, T, L) => {
324
- const U = `.MuiAreaElement-series-stacked-${L}`;
325
- return l[U] = {
326
- opacity: V[L].guid === f ? 0.9 : 0.2
327
- }, l;
325
+ ...f && z.reduce((d, b, I) => {
326
+ const K = `.MuiAreaElement-series-stacked-${I}`;
327
+ return d[K] = {
328
+ opacity: z[I].guid === f ? 0.9 : 0.2
329
+ }, d;
328
330
  }, {})
329
331
  };
330
332
  return /* @__PURE__ */ e(
331
- W,
333
+ N,
332
334
  {
333
335
  onMouseMove: D,
334
336
  ref: _,
@@ -344,75 +346,75 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
344
346
  }
345
347
  },
346
348
  children: /* @__PURE__ */ C(
347
- w,
349
+ S,
348
350
  {
349
351
  direction: { xs: "column", md: "column" },
350
352
  spacing: { xs: 0, md: 4 },
351
353
  sx: { width: "100%", position: "relative" },
352
354
  children: [
353
355
  /* @__PURE__ */ e(
354
- Mt,
356
+ kt,
355
357
  {
356
358
  height: h,
357
359
  hideLegend: !0,
358
360
  margin: { bottom: 24, left: 12, right: 54, top: 48 },
359
- onAreaClick: ie,
360
- onHighlightChange: le,
361
- series: Y,
361
+ onAreaClick: ue,
362
+ onHighlightChange: me,
363
+ series: ne,
362
364
  skipAnimation: !0,
363
365
  slotProps: {
364
- tooltip: { trigger: P ? "item" : "none" }
366
+ tooltip: { trigger: X ? "item" : "none" }
365
367
  },
366
368
  slots: {
367
- tooltip: P && E ? (l) => /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ e(
368
- fo,
369
+ tooltip: X && L ? (d) => /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(
370
+ To,
369
371
  {
370
- ...l,
371
- categoryGuids: j(E),
372
- series: Y,
373
- xData: te
372
+ ...d,
373
+ categoryGuids: te(L),
374
+ series: ne,
375
+ xData: O
374
376
  }
375
377
  ) }) : void 0
376
378
  },
377
- sx: F,
379
+ sx: B,
378
380
  xAxis: [
379
381
  {
380
- data: te,
382
+ data: O,
381
383
  scaleType: "time",
382
- valueFormatter: (l) => Z(l, B.MONTH_SHORT_YEAR),
383
- tickNumber: I
384
+ valueFormatter: (d) => Y(d, P.MONTH_SHORT_YEAR),
385
+ tickNumber: Z
384
386
  // How many ticks to show on the x-axis
385
387
  }
386
388
  ],
387
389
  yAxis: [
388
390
  {
389
- min: ue,
390
- max: he || 100,
391
- valueFormatter: (l) => Lt(l).format("0a")
391
+ min: q,
392
+ max: ce || 100,
393
+ valueFormatter: (d) => Lt(d).format("0a")
392
394
  }
393
395
  ]
394
396
  }
395
397
  ),
396
398
  /* @__PURE__ */ e(
397
- po,
399
+ bo,
398
400
  {
399
- categoryGuids: ge,
401
+ categoryGuids: ee,
400
402
  hoveredLegend: f,
401
403
  legendRef: y,
402
- onClickLegend: me,
403
- onHoverLegend: ae,
404
- sx: { px: i ? 0 : 24 }
404
+ onClickLegend: de,
405
+ onHoverLegend: se,
406
+ sx: { px: l ? 0 : 24 }
405
407
  }
406
408
  ),
407
- $ && /* @__PURE__ */ e(
408
- mo,
409
+ ie && /* @__PURE__ */ e(
410
+ _o,
409
411
  {
410
- categoryGuids: j(E),
412
+ categoryGuids: te(L),
411
413
  chartContainerRef: _,
412
- cursorPosition: H,
413
- hoveredAreaData: S.map((l) => ({
414
- ...l,
415
- x: Z(l.x, B.MONTH_SHORT_YEAR)
414
+ cursorPosition: M,
415
+ hoveredAreaData: E.map((d) => ({
416
+ ...d,
417
+ x: Y(d.x, P.MONTH_SHORT_YEAR)
416
418
  }))
417
419
  }
418
420
  )
@@ -421,18 +423,18 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
421
423
  )
422
424
  }
423
425
  );
424
- }, gt = ({ selectedTab: t, onTabChange: r }) => {
425
- const { common: n } = A();
426
+ }, ft = ({ selectedTab: t, onTabChange: s }) => {
427
+ const { common: n } = R();
426
428
  return /* @__PURE__ */ e(
427
- Vt,
429
+ Kt,
428
430
  {
429
431
  "aria-label": n.view_toggle,
430
432
  exclusive: !0,
431
- onChange: r,
433
+ onChange: s,
432
434
  orientation: "horizontal",
433
435
  value: t,
434
436
  children: ["Chart", "Table"].map((o) => /* @__PURE__ */ e(
435
- Pt,
437
+ zt,
436
438
  {
437
439
  "aria-label": o === "Chart" ? n.view_chart : n.view_table,
438
440
  "aria-pressed": t === o,
@@ -445,162 +447,199 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
445
447
  ))
446
448
  }
447
449
  );
448
- }, mt = ({ selectedDateRange: t, selectedCategoryGuid: r }) => {
449
- const { trends: n } = A(), { isMobile: o, isDesktop: s } = q(), { getCategoryName: c } = J(), a = g.useMemo(() => {
450
- const i = t.start.getFullYear() === t.end.getFullYear() ? Z(
450
+ }, yt = ({ selectedDateRange: t, selectedCategoryGuid: s }) => {
451
+ const { trends: n } = R(), { isMobile: o, isDesktop: r } = j(), { getCategoryName: i } = U(), a = g.useMemo(() => {
452
+ const l = t.start.getFullYear() === t.end.getFullYear() ? Y(
451
453
  t.start,
452
- o ? B.MONTH_SHORT : B.MONTH_LONG
453
- ) : Z(
454
+ o ? P.MONTH_SHORT : P.MONTH_LONG
455
+ ) : Y(
454
456
  t.start,
455
- o ? B.MONTH_SHORT_YEAR : B.MONTH_YEAR
456
- ), y = Z(
457
+ o ? P.MONTH_SHORT_YEAR : P.MONTH_YEAR
458
+ ), y = Y(
457
459
  t.end,
458
- o ? B.MONTH_SHORT_YEAR : B.MONTH_YEAR
460
+ o ? P.MONTH_SHORT_YEAR : P.MONTH_YEAR
459
461
  );
460
- return `${i} - ${y}`;
461
- }, [t, o]), d = c(r) || (o ? n.sub_title : n.sub_title_by_category);
462
- return /* @__PURE__ */ C(W, { children: [
462
+ return `${l} - ${y}`;
463
+ }, [t, o]), u = i(s) || (o ? n.sub_title : n.sub_title_by_category);
464
+ return /* @__PURE__ */ C(N, { children: [
463
465
  /* @__PURE__ */ e(
464
- Oe,
466
+ Ge,
465
467
  {
466
468
  sx: {
467
- fontSize: s ? null : 15,
469
+ fontSize: r ? null : 15,
468
470
  whiteSpace: "normal",
469
471
  overflow: "visible",
470
472
  textOverflow: "unset"
471
473
  },
472
- children: d
474
+ children: u
473
475
  }
474
476
  ),
475
- /* @__PURE__ */ e(Q, { variant: s ? "subtitle1" : "body2", children: a })
477
+ /* @__PURE__ */ e(F, { variant: r ? "subtitle1" : "body2", children: a })
476
478
  ] });
477
- }, Co = (t) => {
478
- const r = t.id === "total";
479
- return /* @__PURE__ */ C(w, { alignItems: "center", direction: "row", role: "rowheader", tabIndex: t.tabIndex, children: [
480
- !r && /* @__PURE__ */ e(W, { "aria-hidden": !0, children: /* @__PURE__ */ e(ve, { categoryGuid: t.row.top_level_category_guid, variant: "twotone" }) }),
481
- /* @__PURE__ */ e(Q, { bold: r, sx: { ml: 12 }, variant: r ? "body1" : "body2", children: t.row.category })
479
+ }, xo = (t) => {
480
+ const s = t.id === "total";
481
+ return /* @__PURE__ */ C(S, { alignItems: "center", direction: "row", role: "rowheader", tabIndex: t.tabIndex, children: [
482
+ !s && /* @__PURE__ */ e(N, { "aria-hidden": !0, children: /* @__PURE__ */ e(we, { categoryGuid: t.row.top_level_category_guid, variant: "twotone" }) }),
483
+ /* @__PURE__ */ e(F, { bold: s, sx: { ml: 12 }, variant: s ? "body1" : "body2", children: t.row.category })
482
484
  ] });
483
- }, Ke = (t) => {
484
- const r = t.row.category_guid, n = t.row.top_level_category_guid, o = r === Fe.INCOME || n === Fe.INCOME, s = t.id === "total", c = t.field === "total", a = c ? t.row[t.field] : t.row.monthlyAmounts[t.field];
485
- return /* @__PURE__ */ e(w, { alignItems: "flex-end", direction: "row", tabIndex: t.tabIndex, children: /* @__PURE__ */ e(
485
+ }, je = (t) => {
486
+ const s = t.row.category_guid, n = t.row.top_level_category_guid, o = s === ze.INCOME || n === ze.INCOME, r = t.id === "total", i = t.field === "total", a = i ? t.row[t.field] : t.row.monthlyAmounts[t.field];
487
+ return /* @__PURE__ */ e(S, { alignItems: "flex-end", direction: "row", tabIndex: t.tabIndex, children: /* @__PURE__ */ e(
486
488
  xe,
487
489
  {
488
490
  amount: o ? Math.abs(a) : a,
489
491
  isIncome: o,
490
- sx: { fontWeight: o || c || s ? 600 : 500 },
492
+ sx: { fontWeight: o || i || r ? 600 : 500 },
491
493
  symbol: o ? "+" : void 0,
492
- variant: s ? "body1" : "body2"
494
+ variant: r ? "body1" : "body2"
493
495
  }
494
496
  ) });
495
- }, Ye = (t, r) => {
496
- const n = Z(it(r.isoDate), B.MONTH_LONG);
497
- return t[n] = r.amount, t;
498
- }, je = (t) => (r, n) => {
499
- const o = Z(it(n.isoDate), B.MONTH_LONG);
500
- return r + (t.includes(o) ? n.amount : 0);
501
- }, _o = (t, r) => {
497
+ }, Ue = (t, s) => {
498
+ const n = Y(lt(s.isoDate), P.MONTH_LONG);
499
+ return t[n] = s.amount, t;
500
+ }, Xe = (t) => (s, n) => {
501
+ const o = Y(lt(n.isoDate), P.MONTH_LONG);
502
+ return s + (t.includes(o) ? n.amount : 0);
503
+ }, wo = (t, s) => {
502
504
  const n = [], o = new Date(t);
503
- for (; o <= r; ) {
504
- const s = Z(o, B.MONTH_LONG);
505
- n.push(s), o.setMonth(o.getMonth() + 1);
505
+ for (; o <= s; ) {
506
+ const r = Y(o, P.MONTH_LONG);
507
+ n.push(r), o.setMonth(o.getMonth() + 1);
506
508
  }
507
509
  return n;
508
- }, To = (t, r) => {
510
+ }, vo = (t, s) => {
509
511
  const n = {
510
512
  field: "category",
511
513
  flex: 1,
512
514
  headerClassName: "trends-table-header",
513
- headerName: r.category_title,
515
+ headerName: s.category_title,
514
516
  minWidth: 210,
515
517
  renderHeader: ke,
516
- renderCell: Co,
518
+ renderCell: xo,
517
519
  sortable: !0,
518
- sortComparator: Ht,
520
+ sortComparator: Ot,
519
521
  type: "string"
520
- }, o = t.map((c) => ({
521
- field: c,
522
+ }, o = t.map((i) => ({
523
+ field: i,
522
524
  flex: 1,
523
525
  headerClassName: "trends-table-header",
524
- headerName: c,
526
+ headerName: i,
525
527
  minWidth: 100,
526
528
  renderHeader: ke,
527
- renderCell: Ke,
529
+ renderCell: je,
528
530
  align: "center",
529
531
  headerAlign: "center",
530
532
  sortable: !0,
531
533
  hideSortIcons: !1,
532
534
  type: "number",
533
- sortComparator: ze
534
- })), s = {
535
+ sortComparator: Ke,
536
+ valueGetter: (a, c) => c.monthlyAmounts?.[i] ?? 0
537
+ })), r = {
535
538
  field: "total",
536
539
  flex: 1,
537
540
  headerClassName: "trends-table-header",
538
- headerName: r.table_column_total,
541
+ headerName: s.table_column_total,
539
542
  minWidth: 100,
540
543
  renderHeader: ke,
541
- renderCell: Ke,
544
+ renderCell: je,
542
545
  align: "center",
543
546
  headerAlign: "center",
544
547
  sortable: !0,
545
548
  hideSortIcons: !1,
546
549
  type: "number",
547
- sortComparator: ze
550
+ sortComparator: Ke
548
551
  };
549
- return [n, ...o, s];
550
- }, Ue = (t, r, n, o, s) => {
551
- const c = t.filter((a) => a.is_income === n).map((a) => {
552
- let u = a.totalMonthlyAmounts;
553
- return s && (u = a.monthlyAmounts), {
552
+ return [n, ...o, r];
553
+ }, Ze = (t, s, n, o, r) => {
554
+ const i = t.filter((a) => a.is_income === n).map((a) => {
555
+ let c = a.totalMonthlyAmounts;
556
+ return r && (c = a.monthlyAmounts), {
554
557
  id: a.guid,
555
558
  category: a.name,
556
559
  category_guid: a.guid,
557
560
  isParent: !1,
558
561
  top_level_category_guid: a.parent_guid || a.guid,
559
- total: u.reduce(je(o), 0),
560
- monthlyAmounts: u.reduce(Ye, {})
562
+ total: c.reduce(Xe(o), 0),
563
+ monthlyAmounts: c.reduce(Ue, {})
561
564
  };
562
565
  });
563
- if (s && s.is_income === n) {
564
- const a = s.monthlyAmounts.reduce(je(o), 0);
565
- a !== 0 && c.push({
566
- id: `sub-${s.guid}`,
567
- category: nt(r.category_general, s.name),
568
- category_guid: s.guid,
566
+ if (r && r.is_income === n) {
567
+ const a = r.monthlyAmounts.reduce(Xe(o), 0);
568
+ a !== 0 && i.push({
569
+ id: `sub-${r.guid}`,
570
+ category: rt(s.category_general, r.name),
571
+ category_guid: r.guid,
569
572
  isParent: !0,
570
- top_level_category_guid: s.guid,
573
+ top_level_category_guid: r.guid,
571
574
  total: a,
572
- monthlyAmounts: s.monthlyAmounts.reduce(Ye, {})
575
+ monthlyAmounts: r.monthlyAmounts.reduce(Ue, {})
573
576
  });
574
577
  }
575
- return c;
576
- }, Xe = ({
578
+ return i;
579
+ }, Do = Et("div")({
580
+ display: "flex",
581
+ visibility: "hidden",
582
+ width: 0
583
+ });
584
+ function Io({
585
+ direction: t,
586
+ index: s,
587
+ sortingOrder: n,
588
+ disabled: o,
589
+ className: r,
590
+ field: i
591
+ }) {
592
+ const a = jt(), c = Ut();
593
+ let u = null;
594
+ const l = {};
595
+ if (t === "asc" ? u = c.slots.columnSortedAscendingIcon : t === "desc" ? u = c.slots.columnSortedDescendingIcon : (u = c.slots.columnUnsortedIcon ?? null, l.sortingOrder = n), !u) return null;
596
+ const m = a.current.getColumn(i)?.headerName ?? i;
597
+ let _ = "";
598
+ t === "asc" ? _ = ", sorted ascending" : t === "desc" && (_ = ", sorted descending");
599
+ const h = ["Total", "Category"].includes(m) ? "" : " category totals", p = `Sort by ${m}${h}${_}`, f = /* @__PURE__ */ e(u, { className: "MuiDataGrid-sortIcon", fontSize: "small", ...l }), T = /* @__PURE__ */ e(
600
+ Qt,
601
+ {
602
+ disabled: o,
603
+ size: "small",
604
+ tabIndex: -1,
605
+ ...c.slotProps?.baseIconButton,
606
+ "aria-label": p,
607
+ className: `MuiDataGrid-sortButton${r ? ` ${r}` : ""}`,
608
+ title: p,
609
+ children: f
610
+ }
611
+ );
612
+ return /* @__PURE__ */ e(Do, { className: "MuiDataGrid-iconButtonContainer", children: s != null ? /* @__PURE__ */ e(Zt, { badgeContent: s, color: "default", overlap: "circular", children: T }) : T });
613
+ }
614
+ const Lo = g.memo(Io), Qe = ({
577
615
  columns: t,
578
- onRowClick: r,
616
+ onRowClick: s,
579
617
  parentCategory: n,
580
618
  rows: o,
581
- totalRow: s
619
+ totalRow: r
582
620
  }) => {
583
- const c = de(), { onEvent: a } = z(), u = c.palette.mode === "light";
621
+ const i = ae(), { onEvent: a } = $(), c = i.palette.mode === "light";
584
622
  return /* @__PURE__ */ e(
585
- zt,
623
+ Xt,
586
624
  {
587
625
  columns: t,
588
626
  disableColumnFilter: !0,
589
627
  disableColumnMenu: !0,
590
628
  hideFooter: !0,
591
629
  initialState: { sorting: { sortModel: [{ field: "category", sort: "asc" }] } },
592
- onRowClick: (d) => {
593
- n || r?.(d.row.category_guid), a(v.TRENDS_CLICK_LIST_ITEM, {
594
- ...G,
595
- listItem: Rt[d.row.category_guid]
630
+ onRowClick: (u) => {
631
+ n || s?.(u.row.category_guid), a(v.TRENDS_CLICK_LIST_ITEM, {
632
+ ...W,
633
+ listItem: Nt[u.row.category_guid]
596
634
  });
597
635
  },
598
636
  pinnedRows: {
599
- bottom: s ? [s] : []
637
+ bottom: r ? [r] : []
600
638
  },
601
639
  rowHeight: 64,
602
640
  rows: o,
603
641
  slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
642
+ slots: { columnHeaderSortIcon: Lo },
604
643
  sortingOrder: ["asc", "desc"],
605
644
  sx: {
606
645
  borderColor: "divider",
@@ -608,68 +647,68 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
608
647
  borderStyle: "solid",
609
648
  borderRadius: 2,
610
649
  "& .MuiDataGrid-columnHeaders": {
611
- bgcolor: u ? "neutral.50" : "neutral.800",
650
+ bgcolor: c ? "neutral.50" : "neutral.800",
612
651
  borderBottom: "none"
613
652
  },
614
653
  "& .trends-table-header": {
615
- bgcolor: u ? "neutral.50" : "neutral.800"
654
+ bgcolor: c ? "neutral.50" : "neutral.800"
616
655
  }
617
656
  }
618
657
  }
619
658
  );
620
- }, pt = ({
659
+ }, Ct = ({
621
660
  selectedDateRange: t,
622
- selectedCategory: r,
661
+ selectedCategory: s,
623
662
  onClickRow: n,
624
663
  height: o = "100%",
625
- sx: s = {}
664
+ sx: r = {}
626
665
  }) => {
627
- const { trends: c } = A(), { trendsCategories: a } = J(), u = g.useMemo(() => _o(t.start, t.end), [t]), d = g.useMemo(() => To(u, c), [u, c]), i = g.useMemo(() => {
628
- if (r)
629
- return a.find((h) => h.guid === r);
630
- }, [r, a]), [y, m] = g.useMemo(() => {
666
+ const { trends: i } = R(), { trendsCategories: a } = U(), c = g.useMemo(() => wo(t.start, t.end), [t]), u = g.useMemo(() => vo(c, i), [c, i]), l = g.useMemo(() => {
667
+ if (s)
668
+ return a.find((h) => h.guid === s);
669
+ }, [s, a]), [y, m] = g.useMemo(() => {
631
670
  let h = a;
632
- return i && (h = i.subCategories.filter(
671
+ return l && (h = l.subCategories.filter(
633
672
  (p) => p.monthlyAmounts.some((f) => f.amount !== 0)
634
673
  )), [
635
- Ue(h, c, !0, u, i),
636
- Ue(h, c, !1, u, i)
674
+ Ze(h, i, !0, c, l),
675
+ Ze(h, i, !1, c, l)
637
676
  ];
638
- }, [a, u, i, c]), _ = {
677
+ }, [a, c, l, i]), _ = {
639
678
  id: "total",
640
- category: c.table_column_total,
679
+ category: i.table_column_total,
641
680
  category_guid: "total",
642
681
  isParent: !1,
643
682
  top_level_category_guid: "total",
644
683
  total: m.reduce((h, p) => h + p.total, 0),
645
684
  monthlyAmounts: m.reduce(
646
- (h, p) => (Object.entries(p.monthlyAmounts).forEach(([f, x]) => {
647
- h[f] = (h[f] || 0) + x;
685
+ (h, p) => (Object.entries(p.monthlyAmounts).forEach(([f, T]) => {
686
+ h[f] = (h[f] || 0) + T;
648
687
  }), h),
649
688
  {}
650
689
  )
651
690
  };
652
691
  return /* @__PURE__ */ C(
653
- w,
692
+ S,
654
693
  {
655
694
  gap: 24,
656
- sx: { height: o, width: "100%", overflowX: "auto", boxShadow: "none", ...s },
695
+ sx: { height: o, width: "100%", overflowX: "auto", boxShadow: "none", ...r },
657
696
  children: [
658
- (!i || i && i.is_income) && /* @__PURE__ */ e(
659
- Xe,
697
+ (!l || l && l.is_income) && /* @__PURE__ */ e(
698
+ Qe,
660
699
  {
661
- columns: d,
700
+ columns: u,
662
701
  onRowClick: n,
663
- parentCategory: i,
702
+ parentCategory: l,
664
703
  rows: y
665
704
  }
666
705
  ),
667
- (!i || i && !i.is_income) && /* @__PURE__ */ e(
668
- Xe,
706
+ (!l || l && !l.is_income) && /* @__PURE__ */ e(
707
+ Qe,
669
708
  {
670
- columns: d,
709
+ columns: u,
671
710
  onRowClick: n,
672
- parentCategory: i,
711
+ parentCategory: l,
673
712
  rows: m,
674
713
  totalRow: _
675
714
  }
@@ -677,171 +716,171 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
677
716
  ]
678
717
  }
679
718
  );
680
- }, bo = {
719
+ }, Eo = {
681
720
  title: "Transaction List"
682
- }, So = ({
721
+ }, Mo = ({
683
722
  categoryGuid: t,
684
- dateRange: r,
723
+ dateRange: s,
685
724
  isOpen: n,
686
725
  onClose: o
687
726
  }) => {
688
- const { onEvent: s } = z(), { selectedAccountGuids: c } = Ce(), { common: a } = A(), { setFilter: u, sortedTransactions: d } = De(), [i, y] = g.useState(""), m = g.useMemo(
689
- () => d.find((h) => h.guid === i),
690
- [i, d]
727
+ const { onEvent: r } = $(), { selectedAccountGuids: i } = fe(), { common: a } = R(), { setFilter: c, sortedTransactions: u } = ve(), [l, y] = g.useState(""), m = g.useMemo(
728
+ () => u.find((h) => h.guid === l),
729
+ [l, u]
691
730
  );
692
731
  g.useEffect(() => {
693
- u({
694
- accounts: c,
695
- dateRange: r,
732
+ c({
733
+ accounts: i,
734
+ dateRange: s,
696
735
  custom: (h) => t === "" || t === h.category_guid || t === h.top_level_category_guid,
697
736
  showSplits: !!t
698
737
  });
699
- }, [c, t, r]), g.useEffect(() => s(v.TRENDS_VIEW_TRANSACTIONS), []);
738
+ }, [i, t, s]), g.useEffect(() => r(v.TRENDS_VIEW_TRANSACTIONS), []);
700
739
  const _ = () => {
701
740
  y(""), o();
702
741
  };
703
742
  return /* @__PURE__ */ C(
704
- We,
743
+ Pe,
705
744
  {
706
745
  ariaLabelClose: a.close_aria,
707
746
  isOpen: n,
708
747
  onClose: _,
709
- title: bo.title,
748
+ title: Eo.title,
710
749
  children: [
711
- m && /* @__PURE__ */ e(ct, { transaction: m }),
712
- !m && /* @__PURE__ */ e(lt, { onClick: y })
750
+ m && /* @__PURE__ */ e(dt, { transaction: m }),
751
+ !m && /* @__PURE__ */ e(ct, { onClick: y })
713
752
  ]
714
753
  }
715
754
  );
716
- }, wo = M(So), xo = ({ onBackClick: t, sx: r }) => {
717
- const { onEvent: n } = z(), { isDesktop: o, isTablet: s, isMobile: c } = q(), { isAccountDataLoaded: a, loadAccountData: u } = Le(), {
718
- categoriesLoaded: d,
719
- loadCategories: i,
755
+ }, Ao = A(Mo), Ro = ({ onBackClick: t, sx: s }) => {
756
+ const { onEvent: n } = $(), { isDesktop: o, isTablet: r, isMobile: i } = j(), { isAccountDataLoaded: a, loadAccountData: c } = De(), {
757
+ categoriesLoaded: u,
758
+ loadCategories: l,
720
759
  loadDateRangeCategoryTotals: y,
721
760
  loadMonthlyCategoryTotals: m,
722
761
  monthlyCategoryTotals: _,
723
762
  getCategoryName: h
724
- } = J(), {
763
+ } = U(), {
725
764
  isTransactionDataLoaded: p,
726
765
  loadTransactionData: f,
727
- sortedTransactions: x
728
- } = De(), { selectedDateRange: b, setSelectedDateRange: R } = _e(), { isInitialized: E, selectedAccounts: S } = Ce(), { trends: k } = A(), [H, $] = g.useState(!1), [P, K] = g.useState(!1), [I, te] = g.useState("Chart"), [O, ne] = g.useState(""), [se, X] = g.useState(window.innerHeight), he = se - (c ? 315 : 345);
729
- Ee({
766
+ sortedTransactions: T
767
+ } = ve(), { selectedDateRange: x, setSelectedDateRange: k } = ye(), { isInitialized: L, selectedAccounts: E } = fe(), { trends: w } = R(), [M, ie] = g.useState(!1), [X, V] = g.useState(!1), [Z, O] = g.useState("Chart"), [G, Q] = g.useState(""), [Ce, le] = g.useState(window.innerHeight), ce = Ce - (i ? 315 : 345);
768
+ Ie({
730
769
  widgetName: "TrendsFullWidget",
731
- isLoaded: H
770
+ isLoaded: M
732
771
  }), g.useEffect(() => {
733
- const D = () => X(window.innerHeight);
734
- return window.addEventListener("resize", D), a || u().finally(), d || i().finally(), p || f().finally(), () => window.removeEventListener("resize", D);
772
+ const D = () => le(window.innerHeight);
773
+ return window.addEventListener("resize", D), a || c().finally(), u || l().finally(), p || f().finally(), () => window.removeEventListener("resize", D);
735
774
  }, []), g.useEffect(() => {
736
- E && y(S, b.start, b.end).then(() => {
775
+ L && y(E, x.start, x.end).then(() => {
737
776
  m(
738
- S,
739
- b.start,
740
- b.end
777
+ E,
778
+ x.start,
779
+ x.end
741
780
  );
742
781
  }).finally(() => {
743
- $(!0), n(v.TRENDS_LOAD_WIDGET, {
744
- ...G,
745
- time_period: `${we(b.end, b.start)}M`
782
+ ie(!0), n(v.TRENDS_LOAD_WIDGET, {
783
+ ...W,
784
+ time_period: `${Se(x.end, x.start)}M`
746
785
  });
747
786
  });
748
- }, [E, S, b]);
749
- const V = g.useMemo(() => {
750
- if (!H) return { stackedDatasets: [], unstackedDatasets: [] };
751
- const D = Nt(
787
+ }, [L, E, x]);
788
+ const z = g.useMemo(() => {
789
+ if (!M) return { stackedDatasets: [], unstackedDatasets: [] };
790
+ const D = Gt(
752
791
  _,
753
- b.start,
754
- b.end
755
- ), F = O.length ? D.filter(
756
- (l) => l.top_level_category_guid === O || l.category_guid === O
757
- ) : Wt(D);
792
+ x.start,
793
+ x.end
794
+ ), B = G.length ? D.filter(
795
+ (d) => d.top_level_category_guid === G || d.category_guid === G
796
+ ) : Pt(D);
758
797
  return {
759
- stackedDatasets: F.filter(Gt),
760
- unstackedDatasets: F.filter(Ot)
798
+ stackedDatasets: B.filter(Vt),
799
+ unstackedDatasets: B.filter(Ft)
761
800
  };
762
- }, [_, O, b]), re = (D, F) => {
763
- te(F ?? I), n(v.TRENDS_CLICK_TOGGLE_VIEW);
764
- }, Y = (D) => {
765
- const F = qe(D?.[0], 1), l = D?.[1], T = we(l, F);
766
- R({ start: F, end: l }), n(v.TRENDS_CLICK_TIME_WINDOW, {
767
- time_period: T + "M"
801
+ }, [_, G, x]), J = (D, B) => {
802
+ O(B ?? Z), n(v.TRENDS_CLICK_TOGGLE_VIEW);
803
+ }, ne = (D) => {
804
+ const B = et(D?.[0], 1), d = D?.[1], b = Se(d, B);
805
+ k({ start: B, end: d }), n(v.TRENDS_CLICK_TIME_WINDOW, {
806
+ time_period: b + "M"
768
807
  });
769
- }, ge = () => {
808
+ }, ee = () => {
770
809
  n(v.TRENDS_CLICK_FILTER);
771
- }, j = (D) => {
772
- ne(D);
773
- }, ae = (D) => {
774
- ne(D), n(v.TRENDS_CLICK_LEGEND, { category: h(D) });
775
- }, me = (D) => {
810
+ }, te = (D) => {
811
+ Q(D);
812
+ }, se = (D) => {
813
+ Q(D), n(v.TRENDS_CLICK_LEGEND, { category: h(D) });
814
+ }, de = (D) => {
776
815
  n(v.TRENDS_HOVER_LEGEND, { category: h(D) });
777
- }, ie = (D) => {
816
+ }, ue = (D) => {
778
817
  n(v.TRENDS_HOVER_AREA, { category: D });
779
- }, le = (D) => {
818
+ }, me = (D) => {
780
819
  n(v.TRENDS_HOVER_POINT, { category: D });
781
820
  };
782
- return !E || !H ? /* @__PURE__ */ e(Ie, {}) : /* @__PURE__ */ C(
783
- dt,
821
+ return !L || !M ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ C(
822
+ ut,
784
823
  {
785
- calendarActions: { onRangeChanged: Y },
786
- dateRange: b,
824
+ calendarActions: { onRangeChanged: ne },
825
+ dateRange: x,
787
826
  dateRangeVariant: "timeframebuttons",
788
- onAccountsFilterClick: ge,
827
+ onAccountsFilterClick: ee,
789
828
  onBackClick: t,
790
- sx: r,
791
- title: k.title,
829
+ sx: s,
830
+ title: w.title,
792
831
  children: [
793
832
  /* @__PURE__ */ C(
794
- w,
833
+ S,
795
834
  {
796
835
  sx: {
797
836
  // eslint-disable-next-line no-nested-ternary
798
- px: o ? 48 : s ? 24 : 12
837
+ px: o ? 48 : r ? 24 : 12
799
838
  },
800
839
  children: [
801
840
  /* @__PURE__ */ C(
802
- w,
841
+ S,
803
842
  {
804
843
  flexDirection: "row",
805
844
  justifyContent: "space-between",
806
- sx: { pb: c ? 12 : 24, pt: c ? 24 : 48 },
845
+ sx: { pb: i ? 12 : 24, pt: i ? 24 : 48 },
807
846
  children: [
808
847
  /* @__PURE__ */ e(
809
- mt,
848
+ yt,
810
849
  {
811
- selectedCategoryGuid: O,
812
- selectedDateRange: b
850
+ selectedCategoryGuid: G,
851
+ selectedDateRange: x
813
852
  }
814
853
  ),
815
- /* @__PURE__ */ e(gt, { onTabChange: re, selectedTab: I })
854
+ /* @__PURE__ */ e(ft, { onTabChange: J, selectedTab: Z })
816
855
  ]
817
856
  }
818
857
  ),
819
- /* @__PURE__ */ C(w, { alignItems: "center", flexDirection: "row", width: "100%", children: [
820
- /* @__PURE__ */ e(W, { flexGrow: 1, children: O && /* @__PURE__ */ C(Se, { onClick: () => ne(""), sx: { p: 0, pr: 5 }, children: [
858
+ /* @__PURE__ */ C(S, { alignItems: "center", flexDirection: "row", width: "100%", children: [
859
+ /* @__PURE__ */ e(N, { flexGrow: 1, children: G && /* @__PURE__ */ C(Te, { onClick: () => Q(""), sx: { p: 0, pr: 5 }, children: [
821
860
  /* @__PURE__ */ e(He, { name: "arrow_back" }),
822
- k.all_categories
861
+ w.all_categories
823
862
  ] }) }),
824
- /* @__PURE__ */ e(Se, { onClick: () => K(!0), sx: { px: 5 }, children: `${k.view_transactions} (${x.length})` })
863
+ /* @__PURE__ */ e(Te, { onClick: () => V(!0), sx: { px: 5 }, children: `${w.view_transactions} (${T.length})` })
825
864
  ] }),
826
- /* @__PURE__ */ C(W, { children: [
827
- I === "Chart" && /* @__PURE__ */ e(
828
- yo,
865
+ /* @__PURE__ */ C(N, { children: [
866
+ Z === "Chart" && /* @__PURE__ */ e(
867
+ So,
829
868
  {
830
- availableHeight: he,
831
- onClickLegend: ae,
832
- onHoverArea: ie,
833
- onHoverLegend: me,
834
- onHoverPoint: le,
835
- stackedDatasets: V.stackedDatasets,
836
- unstackedDatasets: V.unstackedDatasets
869
+ availableHeight: ce,
870
+ onClickLegend: se,
871
+ onHoverArea: ue,
872
+ onHoverLegend: de,
873
+ onHoverPoint: me,
874
+ stackedDatasets: z.stackedDatasets,
875
+ unstackedDatasets: z.unstackedDatasets
837
876
  }
838
877
  ),
839
- I === "Table" && /* @__PURE__ */ e(
840
- pt,
878
+ Z === "Table" && /* @__PURE__ */ e(
879
+ Ct,
841
880
  {
842
- onClickRow: j,
843
- selectedCategory: O,
844
- selectedDateRange: b
881
+ onClickRow: te,
882
+ selectedCategory: G,
883
+ selectedDateRange: x
845
884
  }
846
885
  )
847
886
  ] })
@@ -849,27 +888,27 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
849
888
  }
850
889
  ),
851
890
  /* @__PURE__ */ e(
852
- wo,
891
+ Ao,
853
892
  {
854
- categoryGuid: O,
855
- dateRange: b,
856
- isOpen: P,
857
- onClose: () => K(!1)
893
+ categoryGuid: G,
894
+ dateRange: x,
895
+ isOpen: X,
896
+ onClose: () => V(!1)
858
897
  }
859
898
  )
860
899
  ]
861
900
  }
862
901
  );
863
- }, Un = M(xo), vo = () => {
864
- const { monthlyCategoryTotals: t } = J(), { trends: r } = A(), n = de(), { availableHeight: o = 300 } = tt(), s = g.useMemo(() => Bt(t), [t]);
902
+ }, rs = A(Ro), ko = () => {
903
+ const { monthlyCategoryTotals: t } = U(), { trends: s } = R(), n = ae(), { availableHeight: o = 300 } = nt(), r = g.useMemo(() => $t(t), [t]);
865
904
  return /* @__PURE__ */ e(
866
- Be,
905
+ Ve,
867
906
  {
868
907
  baseline: "min",
869
908
  colors: [n.palette.primary.main],
870
- datasets: [s],
909
+ datasets: [r],
871
910
  height: o,
872
- labels: [r.spending_label],
911
+ labels: [s.spending_label],
873
912
  showArea: !0,
874
913
  showAverage: !0,
875
914
  showLegend: !0,
@@ -878,41 +917,41 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
878
917
  valueFormatterString: "0,0"
879
918
  }
880
919
  );
881
- }, Do = M(vo), Lo = ({ onPrimaryCtaClick: t, sx: r }) => {
882
- const { isAccountDataLoaded: n, loadAccountData: o } = Le(), { loadMonthlyCategoryTotals: s, monthlyTotalsLoaded: c } = J(), { isInitialized: a } = Ge(), { trends: u } = A(), { selectedAccounts: d } = Ce();
920
+ }, Ho = A(ko), No = ({ onPrimaryCtaClick: t, sx: s }) => {
921
+ const { isAccountDataLoaded: n, loadAccountData: o } = De(), { loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: i } = U(), { isInitialized: a } = Be(), { trends: c } = R(), { selectedAccounts: u } = fe();
883
922
  return g.useEffect(() => {
884
923
  n || o().finally();
885
- }, []), Ee({
924
+ }, []), Ie({
886
925
  widgetName: "TrendsMiniWidget",
887
- isLoaded: c
926
+ isLoaded: i
888
927
  }), g.useEffect(() => {
889
- a && n && s(d).finally();
890
- }, [n, a, d]), !n || !a || !c ? /* @__PURE__ */ e(Ie, {}) : /* @__PURE__ */ e(
891
- $t,
928
+ a && n && r(u).finally();
929
+ }, [n, a, u]), !n || !a || !i ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
930
+ qt,
892
931
  {
893
932
  contentStyles: { height: "calc(100% - 72px)", minHeight: 300, ":last-child": { pb: 0 } },
894
933
  onPrimaryCtaClick: t,
895
- primaryCtaLabel: u.primary_cta,
896
- subTitle: u.sub_title,
897
- sx: { height: "100%", ...r },
898
- title: u.mini_title,
899
- children: /* @__PURE__ */ e(Do, {})
934
+ primaryCtaLabel: c.primary_cta,
935
+ subTitle: c.sub_title,
936
+ sx: { height: "100%", ...s },
937
+ title: c.mini_title,
938
+ children: /* @__PURE__ */ e(Ho, {})
900
939
  }
901
940
  );
902
- }, Xn = M(Lo), Io = 70, Ze = ({
941
+ }, as = A(No), Wo = 70, qe = ({
903
942
  title: t,
904
- totalAmount: r,
943
+ totalAmount: s,
905
944
  transactionType: n,
906
945
  percentage: o,
907
- secondaryLabel: s,
908
- shouldDisplayPercentage: c
946
+ secondaryLabel: r,
947
+ shouldDisplayPercentage: i
909
948
  }) => {
910
- const { availableWidth: a } = tt(), u = g.useRef(null), d = g.useRef(null), i = kt(Number(Math.abs(o)), {
949
+ const { availableWidth: a } = nt(), c = g.useRef(null), u = g.useRef(null), l = Wt(Number(Math.abs(o)), {
911
950
  style: "percent",
912
951
  minimumIntegerDigits: 1
913
- }), y = a === 288 && oe(r, "0,0.00").length > 10 ? oe(r, "0,0") : oe(r, "0,0.00"), m = n === "spending" ? o > 0 : o >= 0, _ = n === "spending" ? "error.main" : "success.main", h = n === "spending" ? "success.main" : "text.secondary", p = u?.current, f = d?.current, x = p && f ? p.scrollWidth > f.clientWidth - Io : !1;
952
+ }), y = a === 288 && re(s, "0,0.00").length > 10 ? re(s, "0,0") : re(s, "0,0.00"), m = n === "spending" ? o > 0 : o >= 0, _ = n === "spending" ? "error.main" : "success.main", h = n === "spending" ? "success.main" : "text.secondary", p = c?.current, f = u?.current, T = p && f ? p.scrollWidth > f.clientWidth - Wo : !1;
914
953
  return /* @__PURE__ */ C(
915
- w,
954
+ S,
916
955
  {
917
956
  sx: {
918
957
  border: 1,
@@ -925,7 +964,7 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
925
964
  },
926
965
  children: [
927
966
  /* @__PURE__ */ C(
928
- w,
967
+ S,
929
968
  {
930
969
  sx: {
931
970
  alignItems: "center",
@@ -933,18 +972,18 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
933
972
  justifyContent: "space-between"
934
973
  },
935
974
  children: [
936
- /* @__PURE__ */ e(ye, { color: "text.secondary", variant: "caption", children: t }),
937
- c && /* @__PURE__ */ C(w, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
938
- m ? /* @__PURE__ */ e(Yt, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e(jt, { size: 20, sx: { color: h } }),
975
+ /* @__PURE__ */ e(pe, { color: "text.secondary", variant: "caption", children: t }),
976
+ i && /* @__PURE__ */ C(S, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
977
+ m ? /* @__PURE__ */ e(eo, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e(to, { size: 20, sx: { color: h } }),
939
978
  /* @__PURE__ */ e(
940
- ye,
979
+ pe,
941
980
  {
942
981
  sx: {
943
982
  color: m ? _ : h,
944
983
  fontWeight: 600
945
984
  },
946
985
  variant: "body2",
947
- children: i
986
+ children: l
948
987
  }
949
988
  )
950
989
  ] })
@@ -952,9 +991,9 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
952
991
  }
953
992
  ),
954
993
  /* @__PURE__ */ C(
955
- w,
994
+ S,
956
995
  {
957
- ref: d,
996
+ ref: u,
958
997
  sx: {
959
998
  alignItems: "center",
960
999
  flexDirection: "row",
@@ -962,19 +1001,19 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
962
1001
  },
963
1002
  children: [
964
1003
  /* @__PURE__ */ e(
965
- W,
1004
+ N,
966
1005
  {
967
- ref: u,
1006
+ ref: c,
968
1007
  sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
969
- children: /* @__PURE__ */ e(Oe, { children: y })
1008
+ children: /* @__PURE__ */ e(Ge, { children: y })
970
1009
  }
971
1010
  ),
972
- c && a >= 450 && !x && /* @__PURE__ */ e(
973
- ye,
1011
+ i && a >= 450 && !T && /* @__PURE__ */ e(
1012
+ pe,
974
1013
  {
975
1014
  color: m ? _ : h,
976
1015
  variant: "caption",
977
- children: s
1016
+ children: r
978
1017
  }
979
1018
  )
980
1019
  ]
@@ -983,55 +1022,55 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
983
1022
  ]
984
1023
  }
985
1024
  );
986
- }, Eo = M(() => {
987
- const { trends: t } = A();
988
- return /* @__PURE__ */ C(w, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
989
- /* @__PURE__ */ e(Ut, { size: 32 }),
990
- /* @__PURE__ */ C(w, { children: [
991
- /* @__PURE__ */ e(ye, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
992
- /* @__PURE__ */ e(ye, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
1025
+ }, Oo = A(() => {
1026
+ const { trends: t } = R();
1027
+ return /* @__PURE__ */ C(S, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
1028
+ /* @__PURE__ */ e(oo, { size: 32 }),
1029
+ /* @__PURE__ */ C(S, { children: [
1030
+ /* @__PURE__ */ e(pe, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
1031
+ /* @__PURE__ */ e(pe, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
993
1032
  ] })
994
1033
  ] });
995
- }), Zn = M(({ onCtaClick: t }) => {
996
- const { isAccountDataLoaded: r, loadAccountData: n, visibleAccounts: o } = Le();
1034
+ }), is = A(({ onCtaClick: t }) => {
1035
+ const { isAccountDataLoaded: s, loadAccountData: n, visibleAccounts: o } = De();
997
1036
  g.useEffect(() => {
998
- r || n().finally();
1037
+ s || n().finally();
999
1038
  }, []);
1000
- const { onEvent: s } = z(), { monthlyCategoryTotals: c, loadMonthlyCategoryTotals: a, monthlyTotalsLoaded: u } = J(), d = {
1001
- start: Kt(/* @__PURE__ */ new Date(), 1),
1039
+ const { onEvent: r } = $(), { monthlyCategoryTotals: i, loadMonthlyCategoryTotals: a, monthlyTotalsLoaded: c } = U(), u = {
1040
+ start: Jt(/* @__PURE__ */ new Date(), 1),
1002
1041
  end: /* @__PURE__ */ new Date()
1003
- }, { trends: i } = A(), { selectedAccounts: y, isInitialized: m } = Ce();
1004
- Ee({
1042
+ }, { trends: l } = R(), { selectedAccounts: y, isInitialized: m } = fe();
1043
+ Ie({
1005
1044
  widgetName: "TrendsMicroWidget",
1006
- isLoaded: u
1045
+ isLoaded: c
1007
1046
  }), g.useEffect(() => {
1008
- m && a(y, d.start).then(() => {
1009
- s(v.TRENDS_LOAD_WIDGET, {
1047
+ m && a(y, u.start).then(() => {
1048
+ r(v.TRENDS_LOAD_WIDGET, {
1010
1049
  state: o?.length ? "default" : "zeroState"
1011
1050
  });
1012
1051
  });
1013
1052
  }, [m, y]);
1014
1053
  const { spendingData: _, incomeData: h } = g.useMemo(
1015
1054
  () => ({
1016
- spendingData: at(c, d),
1017
- incomeData: rt(c, d)
1055
+ spendingData: at(i, u),
1056
+ incomeData: it(i, u)
1018
1057
  }),
1019
- [c, d]
1020
- ), [p, f] = _, [x, b] = h, R = $e(f.y, p.y), E = $e(b.y, x.y), S = m && !o?.length, k = () => {
1021
- s(
1022
- S ? v.TRENDS_CLICK_GET_STARTED : v.TRENDS_CLICK_VIEW_MORE
1058
+ [i, u]
1059
+ ), [p, f] = _, [T, x] = h, k = Ye(f.y, p.y), L = Ye(x.y, T.y), E = m && !o?.length, w = () => {
1060
+ r(
1061
+ E ? v.TRENDS_CLICK_GET_STARTED : v.TRENDS_CLICK_VIEW_MORE
1023
1062
  ), t();
1024
1063
  };
1025
- return !u || !m ? /* @__PURE__ */ e(Ie, {}) : /* @__PURE__ */ e(
1026
- qt,
1064
+ return !c || !m ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
1065
+ io,
1027
1066
  {
1028
1067
  className: "mx-trends-microwidget",
1029
- ctaLabel: i.micro_primary_cta_label,
1030
- onCTAClick: k,
1031
- subHeader: S ? void 0 : i.micro_subheader,
1032
- title: i.title,
1033
- children: S ? /* @__PURE__ */ e(Eo, {}) : /* @__PURE__ */ C(
1034
- w,
1068
+ ctaLabel: l.micro_primary_cta_label,
1069
+ onCTAClick: w,
1070
+ subHeader: E ? void 0 : l.micro_subheader,
1071
+ title: l.title,
1072
+ children: E ? /* @__PURE__ */ e(Oo, {}) : /* @__PURE__ */ C(
1073
+ S,
1035
1074
  {
1036
1075
  sx: {
1037
1076
  alignItems: "stretch",
@@ -1040,24 +1079,24 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
1040
1079
  },
1041
1080
  children: [
1042
1081
  /* @__PURE__ */ e(
1043
- Ze,
1082
+ qe,
1044
1083
  {
1045
- percentage: R,
1046
- secondaryLabel: i.micro_secondary_label,
1084
+ percentage: k,
1085
+ secondaryLabel: l.micro_secondary_label,
1047
1086
  shouldDisplayPercentage: f.y !== 0 && p.y !== 0,
1048
- title: i.spending_label,
1087
+ title: l.spending_label,
1049
1088
  totalAmount: f.y,
1050
1089
  transactionType: "spending"
1051
1090
  }
1052
1091
  ),
1053
1092
  /* @__PURE__ */ e(
1054
- Ze,
1093
+ qe,
1055
1094
  {
1056
- percentage: E,
1057
- secondaryLabel: i.micro_secondary_label,
1058
- shouldDisplayPercentage: b.y !== 0 && x.y !== 0,
1059
- title: i.income_label,
1060
- totalAmount: b.y,
1095
+ percentage: L,
1096
+ secondaryLabel: l.micro_secondary_label,
1097
+ shouldDisplayPercentage: x.y !== 0 && T.y !== 0,
1098
+ title: l.income_label,
1099
+ totalAmount: x.y,
1061
1100
  transactionType: "income"
1062
1101
  }
1063
1102
  )
@@ -1066,17 +1105,17 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
1066
1105
  )
1067
1106
  }
1068
1107
  );
1069
- }), Mo = M(
1070
- ({ isExpanded: t, onClick: r }) => {
1071
- const n = ut();
1072
- return /* @__PURE__ */ e(to, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(oo, { onClick: r, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
1073
- w,
1108
+ }), Go = A(
1109
+ ({ isExpanded: t, onClick: s }) => {
1110
+ const n = gt();
1111
+ return /* @__PURE__ */ e(mt, { children: /* @__PURE__ */ e(co, { onClick: s, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
1112
+ S,
1074
1113
  {
1075
1114
  sx: { color: n.palette.primary.main, flexDirection: "row", alignItems: "center" },
1076
1115
  children: [
1077
- /* @__PURE__ */ e(so, { children: /* @__PURE__ */ e(Q, { bold: !0, variant: "body2", children: t ? "View less" : "View more" }) }),
1078
- /* @__PURE__ */ e(no, { sx: { color: n.palette.primary.main }, children: t ? /* @__PURE__ */ e(Xt, {}) : /* @__PURE__ */ e(
1079
- Zt,
1116
+ /* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e(F, { bold: !0, variant: "body2", children: t ? "View less" : "View more" }) }),
1117
+ /* @__PURE__ */ e(uo, { sx: { color: n.palette.primary.main }, children: t ? /* @__PURE__ */ e(no, {}) : /* @__PURE__ */ e(
1118
+ so,
1080
1119
  {
1081
1120
  sx: {
1082
1121
  transition: "transform 0.3s ease-in-out",
@@ -1088,128 +1127,141 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
1088
1127
  }
1089
1128
  ) }) });
1090
1129
  }
1091
- ), Qe = M(
1130
+ ), Je = A(
1092
1131
  ({
1093
1132
  totalAmount: t,
1094
- guid: r,
1133
+ guid: s,
1095
1134
  name: n,
1096
1135
  transactions: o,
1097
- onClick: s,
1098
- isLastItem: c = !1,
1136
+ onClick: r,
1137
+ isLastItem: i = !1,
1099
1138
  showDivider: a = !0
1100
1139
  }) => {
1101
- const { trends: u } = A(), { onEvent: d } = z(), i = `${o.length} ${o.length === 1 ? u.transaction : u.transactions}`, y = () => {
1102
- s?.(), d(v.TRENDS_CLICK_LIST_ITEM, {
1103
- ...G,
1140
+ const { trends: c } = R(), { onEvent: u } = $(), l = ae(), y = `${o.length} ${o.length === 1 ? c.transaction : c.transactions}`, m = () => {
1141
+ r?.(), u(v.TRENDS_CLICK_LIST_ITEM, {
1142
+ ...W,
1104
1143
  listItem: n
1105
1144
  });
1106
1145
  };
1107
1146
  return /* @__PURE__ */ C(g.Fragment, { children: [
1108
1147
  /* @__PURE__ */ e(
1109
- st,
1148
+ Bt,
1110
1149
  {
1111
- leftIcon: r ? /* @__PURE__ */ e(ve, { categoryGuid: r }) : void 0,
1112
- onClick: y,
1113
- rightContent: oe(Math.abs(t), "0,0.00"),
1114
- rightIcon: s ? /* @__PURE__ */ e(Dt, {}) : void 0,
1115
- subtitle: i,
1150
+ leftIcon: s ? /* @__PURE__ */ e(
1151
+ we,
1152
+ {
1153
+ categoryGuid: s,
1154
+ sx: {
1155
+ bgcolor: Mt(Oe(s, l), 0.15),
1156
+ border: `1px solid ${Oe(s, l)}`,
1157
+ color: "text.primary"
1158
+ }
1159
+ }
1160
+ ) : void 0,
1161
+ onClick: m,
1162
+ rightContent: re(Math.abs(t), "0,0.00"),
1163
+ rightIcon: r ? /* @__PURE__ */ e(ro, {}) : void 0,
1164
+ subtitle: y,
1116
1165
  title: n
1117
1166
  }
1118
1167
  ),
1119
- a && /* @__PURE__ */ e(Ne, { sx: { ml: c ? 24 : 68 } })
1120
- ] }, r);
1168
+ a && /* @__PURE__ */ e(Ne, { component: "li", sx: { ml: i ? 24 : 68 } })
1169
+ ] }, s);
1121
1170
  }
1122
- ), Ao = M(
1123
- ({ availableHeight: t = 0, onCategoryClick: r }) => {
1124
- const { collapsedCategories: n, visibleCategories: o, setVisibleListLength: s } = _e(), { isLargeDesktop: c, isDesktop: a } = q(), { trends: u } = A(), { onEvent: d } = z(), [i, y] = g.useState(!1), m = a || c;
1171
+ ), Bo = A(
1172
+ ({ availableHeight: t = 0, onCategoryClick: s }) => {
1173
+ const { collapsedCategories: n, visibleCategories: o, setVisibleListLength: r } = ye(), { isLargeDesktop: i, isDesktop: a } = j(), { trends: c } = R(), { onEvent: u } = $(), [l, y] = g.useState(!1), m = a || i;
1125
1174
  g.useEffect(() => {
1126
1175
  const p = Math.floor(t / 64) - 1, f = o.length + n.length;
1127
- p !== o.length && (s(m ? Math.max(p, 5) : 5), y(p >= f));
1176
+ p !== o.length && (r(m ? Math.max(p, 5) : 5), y(p >= f));
1128
1177
  }, [t]);
1129
1178
  const _ = () => {
1130
- y(!i), d(v.TRENDS_CLICK_VIEW_MORE, {
1131
- ...G
1179
+ y(!l), u(v.TRENDS_CLICK_VIEW_MORE, {
1180
+ ...W
1132
1181
  });
1133
- }, h = o.length + (i ? n.length : 0);
1134
- return /* @__PURE__ */ e(w, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ C(eo, { children: [
1135
- /* @__PURE__ */ e(w, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(Oe, { children: u.categories }) }),
1136
- o.map((p, f) => /* @__PURE__ */ e(
1137
- Qe,
1138
- {
1139
- ...p,
1140
- isLastItem: f === h - 1,
1141
- onClick: p.transactions.length > 0 ? () => r(p) : void 0,
1142
- showDivider: !0
1143
- },
1144
- p.guid
1145
- )),
1146
- /* @__PURE__ */ e(
1147
- Jt,
1148
- {
1149
- in: i,
1150
- sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
1151
- children: n.map((p, f) => {
1152
- const x = o.length + f;
1153
- return /* @__PURE__ */ e(
1154
- Qe,
1155
- {
1156
- ...p,
1157
- isLastItem: x === h - 1,
1158
- onClick: p.transactions.length > 0 ? () => r(p) : void 0,
1159
- showDivider: !0
1160
- },
1161
- p.guid
1162
- );
1163
- })
1164
- }
1165
- ),
1166
- n.length > 0 && /* @__PURE__ */ e(Mo, { isExpanded: i, onClick: _ })
1167
- ] }) });
1182
+ }, h = o.length + (l ? n.length : 0);
1183
+ return /* @__PURE__ */ C(S, { sx: { width: "100%" }, children: [
1184
+ /* @__PURE__ */ e(S, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(Ge, { children: c.categories }) }),
1185
+ /* @__PURE__ */ C(We, { children: [
1186
+ o.map((p, f) => /* @__PURE__ */ e(
1187
+ Je,
1188
+ {
1189
+ ...p,
1190
+ isLastItem: f === h - 1,
1191
+ onClick: p.transactions.length > 0 ? () => s(p) : void 0,
1192
+ showDivider: !0
1193
+ },
1194
+ p.guid
1195
+ )),
1196
+ /* @__PURE__ */ e(
1197
+ lo,
1198
+ {
1199
+ component: "li",
1200
+ in: l,
1201
+ sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
1202
+ children: /* @__PURE__ */ e(We, { children: n.map((p, f) => {
1203
+ const T = o.length + f;
1204
+ return /* @__PURE__ */ e(
1205
+ Je,
1206
+ {
1207
+ ...p,
1208
+ isLastItem: T === h - 1,
1209
+ onClick: p.transactions.length > 0 ? () => s(p) : void 0,
1210
+ showDivider: !0
1211
+ },
1212
+ p.guid
1213
+ );
1214
+ }) })
1215
+ }
1216
+ ),
1217
+ n.length > 0 && /* @__PURE__ */ e(Go, { isExpanded: l, onClick: _ })
1218
+ ] })
1219
+ ] });
1168
1220
  }
1169
- ), Ro = ({ beats: t, onInsightCardClick: r }) => {
1170
- const { onEvent: n } = z(), { isMobile: o, isDesktop: s, isLargeDesktop: c } = q(), { beatStore: a, endpoint: u, sessionToken: d } = Ge(), i = s || c, y = i || o ? 1 : 2, m = () => null, _ = (b) => {
1171
- r?.(b), n(v.TRENDS_CLICK_INSIGHT, G);
1172
- }, h = i ? 200 : 170, p = i ? 170 : 124, f = i ? 56 : 0, x = t.length > 0 ? h + f : p;
1173
- return /* @__PURE__ */ e(ro, { sx: { height: x }, children: /* @__PURE__ */ e(
1174
- Ft,
1221
+ ), Po = ({ beats: t, onInsightCardClick: s }) => {
1222
+ const { onEvent: n } = $(), { isMobile: o, isDesktop: r, isLargeDesktop: i } = j(), { beatStore: a, endpoint: c, sessionToken: u } = Be(), l = r || i, y = l || o ? 1 : 2, m = () => null, _ = (T) => {
1223
+ s?.(T), n(v.TRENDS_CLICK_INSIGHT, W);
1224
+ }, h = l ? 200 : 170, p = l ? 170 : 124, f = t.length > 0 ? h : p;
1225
+ return /* @__PURE__ */ e(mo, { sx: { height: f }, children: /* @__PURE__ */ e(
1226
+ Yt,
1175
1227
  {
1176
1228
  areBeatsLoading: a.isLoading,
1177
1229
  beats: t,
1178
- endpoint: u,
1230
+ endpoint: c,
1179
1231
  headerSx: { p: 0 },
1180
1232
  logOutUser: m,
1181
1233
  onCardClick: _,
1182
1234
  showBorder: !0,
1183
1235
  showCTAColocatedWithText: !1,
1184
1236
  showCarouselControls: !0,
1185
- showHeader: i,
1237
+ showHeader: l,
1186
1238
  showIcon: !0,
1187
1239
  showWithMargin: !1,
1188
- token: d,
1240
+ token: u,
1189
1241
  userHasFullInsightFeedBeats: !1,
1190
1242
  variant: "outlined",
1191
1243
  visibleCardsCount: y
1192
1244
  }
1193
1245
  ) });
1194
- }, ko = M(Ro), Ho = M(({ chartLabel: t, chartColor: r }) => {
1195
- const { onEvent: n } = z(), {
1196
- categoryDetailsChartData: { monthlyAmounts: o, tooltipLabels: s }
1197
- } = _e();
1198
- return /* @__PURE__ */ e(w, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
1199
- Be,
1246
+ }, Vo = A(Po), Fo = A(({ chartLabel: t, chartColor: s }) => {
1247
+ const { onEvent: n } = $(), {
1248
+ categoryDetailsChartData: { monthlyAmounts: o, tooltipLabels: r }
1249
+ } = ye();
1250
+ return /* @__PURE__ */ e(S, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
1251
+ Ve,
1200
1252
  {
1201
1253
  baseline: "min",
1202
- colors: [r],
1254
+ colors: [s],
1203
1255
  curveType: "bump",
1204
- customTooltipLabels: s,
1256
+ customTooltipLabels: r,
1205
1257
  datasets: [o],
1206
1258
  height: 265,
1207
1259
  labels: [t],
1208
1260
  markStyles: () => ({
1209
- stroke: r
1261
+ stroke: s
1210
1262
  }),
1211
1263
  onItemClick: () => {
1212
- n(v.TRENDS_CLICK_CHART, G);
1264
+ n(v.TRENDS_CLICK_CHART, W);
1213
1265
  },
1214
1266
  showArea: !0,
1215
1267
  showAverage: !0,
@@ -1224,100 +1276,90 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
1224
1276
  valueFormatterString: "0,0"
1225
1277
  }
1226
1278
  ) });
1227
- }), No = M(({ onClose: t }) => {
1228
- const r = ut(), { is_mobile_webview: n } = ot(), { isDesktop: o, isSmallTablet: s, isTablet: c } = q(), { onEvent: a } = z(), { common: u, trends: d } = A(), { selectedCategoryData: i, selectedDateRangeMonthRange: y } = _e(), { sortedTransactions: m } = De(), [_, h] = g.useState(null);
1229
- if (!i)
1279
+ }), $o = A(() => {
1280
+ const t = gt(), { is_mobile_webview: s } = st(), { isDesktop: n, isSmallTablet: o, isTablet: r } = j(), { common: i, trends: a } = R(), { selectedCategoryData: c, selectedDateRangeMonthRange: u } = ye(), { sortedTransactions: l } = ve(), [y, m] = g.useState(null);
1281
+ if (!c)
1230
1282
  return null;
1231
- const { guid: p, name: f, is_income: x, totalAmount: b } = i, R = x ? d.category_income : d.category_spending, E = io(p, r), S = x ? d.income_label : d.spending_label, k = ` ${i.transactions.length === 1 ? d.transaction : d.transactions} (${i.transactions.length})`, H = g.useMemo(
1232
- () => m.find((I) => I.guid === _),
1233
- [_, m]
1234
- ), $ = m.length > 0 && !n && (o || c && !s), P = (I) => I.category_guid === p || I.top_level_category_guid === p, K = () => {
1235
- t?.(), a(v.TRENDS_CLICK_BACK, G);
1236
- };
1237
- return /* @__PURE__ */ C(
1238
- We,
1239
- {
1240
- ariaLabelClose: d.close_category_details,
1241
- isOpen: !0,
1242
- onClose: K,
1243
- shouldShowHeaderShadow: !0,
1244
- title: R,
1245
- children: [
1246
- /* @__PURE__ */ C(w, { sx: { alignItems: "center", height: "100%" }, children: [
1247
- /* @__PURE__ */ C(ao, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
1248
- /* @__PURE__ */ e(
1249
- st,
1250
- {
1251
- leftIcon: /* @__PURE__ */ e(ve, { categoryGuid: p }),
1252
- rightContent: oe(Math.abs(b), "0,0.00"),
1253
- subtitle: y,
1254
- title: f
1255
- }
1256
- ),
1257
- /* @__PURE__ */ e(Ho, { chartColor: E, chartLabel: S }),
1258
- /* @__PURE__ */ C(w, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
1259
- /* @__PURE__ */ e(Q, { bold: !0, variant: "body1", children: k }),
1260
- $ && /* @__PURE__ */ e(lo, { filter: P })
1261
- ] })
1262
- ] }),
1263
- /* @__PURE__ */ e(
1264
- lt,
1265
- {
1266
- bgcolor: "transparent",
1267
- filter: P,
1268
- height: "calc(100vh - 475px)",
1269
- onClick: h
1270
- }
1271
- )
1272
- ] }),
1283
+ const { guid: _, name: h, is_income: p, totalAmount: f } = c, T = Oe(_, t), x = p ? a.income_label : a.spending_label, k = ` ${c.transactions.length === 1 ? a.transaction : a.transactions} (${c.transactions.length})`, L = g.useMemo(
1284
+ () => l.find((M) => M.guid === y),
1285
+ [y, l]
1286
+ ), E = l.length > 0 && !s && (n || r && !o), w = (M) => M.category_guid === _ || M.top_level_category_guid === _;
1287
+ return /* @__PURE__ */ C(S, { sx: { alignItems: "center", height: "100%" }, children: [
1288
+ /* @__PURE__ */ C(S, { sx: { borderRadius: 0, pb: 4, pt: 16, px: 12, width: "100%" }, children: [
1289
+ /* @__PURE__ */ e(We, { sx: { px: 12 }, children: /* @__PURE__ */ C(mt, { children: [
1290
+ /* @__PURE__ */ e(ho, { children: /* @__PURE__ */ e(we, { categoryGuid: _ }) }),
1273
1291
  /* @__PURE__ */ e(
1274
- We,
1292
+ ht,
1275
1293
  {
1276
- ariaLabelClose: u.close_aria,
1277
- isOpen: !!H,
1278
- onClose: () => h(""),
1279
- title: d.transaction,
1280
- children: H && /* @__PURE__ */ e(ct, { transaction: H })
1294
+ primary: h,
1295
+ primaryTypographyProps: { component: "div", variant: "h3" },
1296
+ secondary: u,
1297
+ secondaryTypographyProps: { component: "div", variant: "body2" }
1281
1298
  }
1282
- )
1283
- ]
1284
- }
1285
- );
1286
- }), Wo = (t, r) => {
1287
- const n = rt(t, r), o = at(t, r);
1288
- return [n, o].filter((s) => s.length > 0);
1289
- }, Oo = (t, r) => {
1290
- const [n, o] = t, s = n, c = o ?? n, a = [];
1291
- if (s) {
1292
- const u = s.reduce((d, i) => d + i.y, 0);
1293
- a.push({ label: r.income_label, amount: u });
1299
+ ),
1300
+ /* @__PURE__ */ e(F, { component: "div", variant: "h3", children: re(Math.abs(f), "0,0.00") })
1301
+ ] }) }),
1302
+ /* @__PURE__ */ e(Fo, { chartColor: T, chartLabel: x }),
1303
+ /* @__PURE__ */ C(S, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 12 }, children: [
1304
+ /* @__PURE__ */ e(F, { bold: !0, variant: "body1", children: k }),
1305
+ E && /* @__PURE__ */ e(go, { filter: w })
1306
+ ] })
1307
+ ] }),
1308
+ /* @__PURE__ */ e(
1309
+ ct,
1310
+ {
1311
+ bgcolor: "transparent",
1312
+ filter: w,
1313
+ height: "calc(100vh - 475px)",
1314
+ onClick: m
1315
+ }
1316
+ ),
1317
+ /* @__PURE__ */ e(
1318
+ Pe,
1319
+ {
1320
+ ariaLabelClose: i.close_aria,
1321
+ isOpen: !!L,
1322
+ onClose: () => m(""),
1323
+ title: a.transaction,
1324
+ children: L && /* @__PURE__ */ e(dt, { transaction: L })
1325
+ }
1326
+ )
1327
+ ] });
1328
+ }), zo = (t, s) => {
1329
+ const n = it(t, s), o = at(t, s);
1330
+ return [n, o].filter((r) => r.length > 0);
1331
+ }, Ko = (t, s) => {
1332
+ const [n, o] = t, r = n, i = o ?? n, a = [];
1333
+ if (r) {
1334
+ const c = r.reduce((u, l) => u + l.y, 0);
1335
+ a.push({ label: s.income_label, amount: c });
1294
1336
  }
1295
- if (c) {
1296
- const u = c.reduce((d, i) => d + i.y, 0);
1297
- a.push({ label: r.spending_label, amount: u });
1337
+ if (i) {
1338
+ const c = i.reduce((u, l) => u + l.y, 0);
1339
+ a.push({ label: s.spending_label, amount: c });
1298
1340
  }
1299
1341
  return a;
1300
- }, Go = ({
1342
+ }, Yo = ({
1301
1343
  availableHeight: t = 0,
1302
- minHeight: r = 500,
1344
+ minHeight: s = 500,
1303
1345
  selectedDateRange: n,
1304
1346
  totals: o
1305
1347
  }) => {
1306
- const s = de(), { onEvent: c } = z(), { trends: a } = A(), { isSmallMobile: u, isMobile: d, isSmallTablet: i, isTablet: y } = q(), m = [s.palette.chart?.chart1, s.palette.chart?.chart2], _ = Wo(o, n), h = Oo(_, a), [p, f] = g.useState(0), x = 458, b = 195, R = 56, E = d || u ? b : i || y ? x : p;
1348
+ const r = ae(), { onEvent: i } = $(), { trends: a } = R(), { isSmallMobile: c, isMobile: u, isSmallTablet: l, isTablet: y } = j(), m = [r.palette.chart?.chart1, r.palette.chart?.chart2], _ = zo(o, n), h = Ko(_, a), [p, f] = g.useState(0), T = 458, x = 195, k = 56, L = u || c ? x : l || y ? T : p;
1307
1349
  return g.useEffect(() => {
1308
- const k = Math.max(t - R, r);
1309
- f(k);
1350
+ const w = Math.max(t - k, s);
1351
+ f(w);
1310
1352
  }, [t]), /* @__PURE__ */ e(
1311
- Be,
1353
+ Ve,
1312
1354
  {
1313
1355
  baseline: "min",
1314
1356
  colors: m,
1315
1357
  curveType: "bump",
1316
1358
  datasets: _,
1317
- height: E,
1359
+ height: L,
1318
1360
  labels: h,
1319
1361
  onItemClick: () => {
1320
- c(v.TRENDS_CLICK_CHART, G);
1362
+ i(v.TRENDS_CLICK_CHART, W);
1321
1363
  },
1322
1364
  showArea: !0,
1323
1365
  showAxisHighlight: !0,
@@ -1330,7 +1372,7 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
1330
1372
  valueFormatterString: "0.0a"
1331
1373
  }
1332
1374
  );
1333
- }, Bo = M(Go), Po = [
1375
+ }, jo = A(Yo), Uo = [
1334
1376
  "BillAmountNotStandard",
1335
1377
  "CategorySpendingV2",
1336
1378
  "CostOfLivingToIncome",
@@ -1364,193 +1406,204 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
1364
1406
  "WeeklyNewMerchantsV2",
1365
1407
  "WeeklyNoSpendDays",
1366
1408
  "WeeklySmallPurchasesSummary"
1367
- ], Vo = ({ onBackClick: t, onInsightCardClick: r, sx: n }) => {
1368
- const { onEvent: o } = z(), { config: s } = ot(), { isDesktop: c, isLargeDesktop: a, isMobile: u } = q(), { isAccountDataLoaded: d, loadAccountData: i, visibleAccounts: y } = Le(), {
1409
+ ], Xo = (t, s, n) => ({
1410
+ description: s ? t.empty_state_sub_text : t.empty_state_sub_text_no_aggregation,
1411
+ header: s ? t.zero_state_content_header : t.zero_state_content_header_no_aggregation,
1412
+ onClickHandler: s ? n : void 0,
1413
+ primaryButton: s ? t.empty_state_primary : void 0
1414
+ }), Zo = ({ onBackClick: t, onInsightCardClick: s, sx: n }) => {
1415
+ const { onEvent: o } = $(), { config: r } = st(), { isDesktop: i, isLargeDesktop: a, isMobile: c } = j(), { isAccountDataLoaded: u, loadAccountData: l, visibleAccounts: y } = De(), {
1369
1416
  categoriesLoaded: m,
1370
1417
  loadCategories: _,
1371
1418
  loadDateRangeCategoryTotals: h,
1372
1419
  loadMonthlyCategoryTotals: p,
1373
1420
  monthlyCategoryTotals: f,
1374
- monthlyTotalsLoaded: x
1375
- } = J(), { isTransactionDataLoaded: b, loadTransactionData: R, setFilter: E } = De(), { selectedDateRange: S, setSelectedCategoryData: k, setSelectedDateRange: H } = _e(), { isInitialized: $, selectedAccounts: P, selectedAccountGuids: K } = Ce(), { trends: I, connect: te } = A(), { beatStore: O } = Ge(), se = co() && s.show_insights_widget_in_master, X = c || a, [ue, he] = g.useState(!1), [V, re] = g.useState(!1), [Y, ge] = g.useState("Chart"), [j, ae] = g.useState(""), [me, ie] = g.useState(!1), [le, D] = g.useState(window.innerHeight), F = X ? 56 : 0, l = le - 208, T = le - (se ? 550 + F : 266), [L, U] = g.useState(!1), ce = s.show_connections_widget_in_master;
1376
- Ee({
1421
+ monthlyTotalsLoaded: T
1422
+ } = U(), { isTransactionDataLoaded: x, loadTransactionData: k, setFilter: L } = ve(), { selectedCategoryData: E, selectedDateRange: w, setSelectedCategoryData: M, setSelectedDateRange: ie } = ye(), { isInitialized: X, selectedAccounts: V, selectedAccountGuids: Z } = fe(), { trends: O, connect: G } = R(), { beatStore: Q } = Be(), le = po() && r.show_insights_widget_in_master, q = i || a, [ce, z] = g.useState(!1), [J, ne] = g.useState(!1), [ee, te] = g.useState("Chart"), [se, de] = g.useState(""), [ue, me] = g.useState(window.innerHeight), D = q ? 56 : 0, B = ue - 208, d = ue - (le ? 550 + D : 266), [b, I] = g.useState(!1), K = r.show_connections_widget_in_master;
1423
+ Ie({
1377
1424
  widgetName: "TrendsWidget",
1378
- isLoaded: ue
1425
+ isLoaded: ce
1379
1426
  });
1380
- const Te = g.useMemo(() => V ? O.getFilteredBeats({ templates: Po }) : [], [V]);
1427
+ const _e = g.useMemo(() => J ? Q.getFilteredBeats({ templates: Uo }) : [], [J]);
1381
1428
  g.useEffect(() => {
1382
- const N = () => D(window.innerHeight);
1383
- return window.addEventListener("resize", N), d || i().finally(), m || _().finally(), b || R().finally(), () => window.removeEventListener("resize", N);
1429
+ const H = () => me(window.innerHeight);
1430
+ return window.addEventListener("resize", H), u || l().finally(), m || _().finally(), x || k().finally(), () => window.removeEventListener("resize", H);
1384
1431
  }, []), g.useEffect(() => {
1385
- $ && (O.loadBeats().finally(() => re(!0)), h(P, S.start, S.end).then(() => {
1432
+ X && u && (Q.loadBeats().finally(() => ne(!0)), h(V, w.start, w.end).then(() => {
1386
1433
  p(
1387
- P,
1388
- S.start,
1389
- S.end
1390
- );
1434
+ V,
1435
+ w.start,
1436
+ w.end
1437
+ ).finally();
1391
1438
  }).finally(() => {
1392
- he(!0), o(v.TRENDS_LOAD_WIDGET, {
1393
- ...G,
1394
- time_period: `${we(S.end, S.start)}M`
1439
+ z(!0), o(v.TRENDS_LOAD_WIDGET, {
1440
+ ...W,
1441
+ time_period: `${Se(w.end, w.start)}M`
1395
1442
  });
1396
1443
  }));
1397
- }, [$, P, S]), g.useEffect(() => {
1444
+ }, [X, u, V, w]), g.useEffect(() => {
1398
1445
  if (f.length !== 0) {
1399
- const N = {
1400
- accounts: K,
1401
- dateRange: { start: S.start, end: S.end }
1446
+ const H = {
1447
+ accounts: Z,
1448
+ dateRange: { start: w.start, end: w.end }
1402
1449
  };
1403
- E({
1404
- ...N,
1405
- custom: (ee) => !!f.find(
1406
- (fe) => fe.top_level_category_guid === ee.top_level_category_guid || fe.category_guid === ee.category_guid
1450
+ L({
1451
+ ...H,
1452
+ custom: (oe) => !!f.find(
1453
+ (ge) => ge.top_level_category_guid === oe.top_level_category_guid || ge.category_guid === oe.category_guid
1407
1454
  )
1408
1455
  });
1409
1456
  }
1410
1457
  }, [f]);
1411
- const pe = (N) => {
1412
- k(N), ie(!0);
1458
+ const Ee = (H) => {
1459
+ M(H);
1460
+ }, he = () => {
1461
+ M(null), o(v.TRENDS_CLICK_BACK, W);
1413
1462
  }, Me = () => {
1414
- k(null), ie(!1);
1415
- }, Ae = () => {
1416
- U(!0), o(v.TRENDS_CLICK_CONNECT_ACCOUNTS);
1417
- }, ft = (N, ee) => {
1418
- ge(ee ?? Y), o(v.TRENDS_CLICK_TOGGLE_VIEW, {
1419
- ...G,
1420
- toggleView: ee
1463
+ I(!0), o(v.TRENDS_CLICK_CONNECT_ACCOUNTS);
1464
+ }, Ae = (H, oe) => {
1465
+ te(oe ?? ee), o(v.TRENDS_CLICK_TOGGLE_VIEW, {
1466
+ ...W,
1467
+ toggleView: oe
1421
1468
  });
1422
- }, yt = (N) => {
1423
- const ee = qe(N?.[0], 1), fe = N?.[1], bt = we(fe, ee);
1424
- H({ start: ee, end: fe }), o(v.TRENDS_CLICK_TIME_WINDOW, {
1425
- ...G,
1426
- time_period: bt + "M"
1469
+ }, _t = (H) => {
1470
+ const oe = et(H?.[0], 1), ge = H?.[1], xt = Se(ge, oe);
1471
+ ie({ start: oe, end: ge }), o(v.TRENDS_CLICK_TIME_WINDOW, {
1472
+ ...W,
1473
+ time_period: xt + "M"
1427
1474
  });
1428
- }, Ct = (N) => {
1475
+ }, bt = (H) => {
1429
1476
  o(v.TRENDS_CLICK_FILTER, {
1430
- ...G,
1431
- filterValue: N
1477
+ ...W,
1478
+ filterValue: H
1432
1479
  });
1433
- }, _t = (N) => {
1434
- ae(N);
1435
- }, Tt = () => {
1436
- ae(""), o(v.TRENDS_CLICK_ALL_CATEGORIES, G);
1437
- };
1438
- if (!$ || !ue || !x) return /* @__PURE__ */ e(Ie, {});
1439
- const Pe = y && y.length === 0 || f.length === 0, be = {
1440
- description: ce ? I.empty_state_sub_text : I.empty_state_sub_text_no_aggregation,
1441
- header: ce ? I.zero_state_content_header : I.zero_state_content_header_no_aggregation,
1442
- onClick: ce ? Ae : void 0,
1443
- primaryButton: ce ? I.empty_state_primary : void 0
1480
+ }, Tt = (H) => {
1481
+ de(H);
1482
+ }, St = () => {
1483
+ de(""), o(v.TRENDS_CLICK_ALL_CATEGORIES, W);
1444
1484
  };
1485
+ if (!X || !u || !ce || !T)
1486
+ return /* @__PURE__ */ e(Le, {});
1487
+ const Fe = y.length === 0 || f.length === 0, be = Xo(O, K, Me);
1445
1488
  return /* @__PURE__ */ C(
1446
- dt,
1489
+ ut,
1447
1490
  {
1448
- calendarActions: { onRangeChanged: yt },
1449
- dateRange: S,
1450
- dateRangeVariant: u ? "timeframetabs" : "timeframebuttons",
1451
- onAccountsFilterClick: Ct,
1491
+ calendarActions: { onRangeChanged: _t },
1492
+ dateRange: w,
1493
+ dateRangeVariant: c ? "timeframetabs" : "timeframebuttons",
1494
+ onAccountsFilterClick: bt,
1452
1495
  onBackClick: t,
1453
1496
  sx: n,
1454
- title: I.title,
1497
+ title: O.title,
1455
1498
  children: [
1456
1499
  /* @__PURE__ */ C(
1457
- w,
1500
+ S,
1458
1501
  {
1459
1502
  sx: {
1460
- px: u ? 0 : 48
1503
+ px: c ? 0 : 48
1461
1504
  },
1462
1505
  children: [
1463
1506
  /* @__PURE__ */ C(
1464
- w,
1507
+ S,
1465
1508
  {
1466
1509
  flexDirection: "row",
1467
1510
  justifyContent: "space-between",
1468
- sx: { px: u ? 16 : 0, py: 16 },
1511
+ sx: { px: c ? 16 : 0, py: 16 },
1469
1512
  children: [
1470
1513
  /* @__PURE__ */ e(
1471
- mt,
1514
+ yt,
1472
1515
  {
1473
- selectedCategoryGuid: j,
1474
- selectedDateRange: S
1516
+ selectedCategoryGuid: se,
1517
+ selectedDateRange: w
1475
1518
  }
1476
1519
  ),
1477
- /* @__PURE__ */ e(gt, { onTabChange: ft, selectedTab: Y })
1520
+ /* @__PURE__ */ e(ft, { onTabChange: Ae, selectedTab: ee })
1478
1521
  ]
1479
1522
  }
1480
1523
  ),
1481
- /* @__PURE__ */ e(w, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(W, { flexGrow: 1, children: j && /* @__PURE__ */ C(Se, { onClick: Tt, sx: { p: 0, pr: 5 }, children: [
1482
- /* @__PURE__ */ e(Qt, {}),
1483
- I.all_categories
1524
+ /* @__PURE__ */ e(S, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(N, { flexGrow: 1, children: se && /* @__PURE__ */ C(Te, { onClick: St, sx: { p: 0, pr: 5 }, children: [
1525
+ /* @__PURE__ */ e(ao, {}),
1526
+ O.all_categories
1484
1527
  ] }) }) }),
1485
- Pe && /* @__PURE__ */ e(
1486
- uo,
1528
+ Fe && /* @__PURE__ */ e(
1529
+ fo,
1487
1530
  {
1488
1531
  header: be.header,
1489
1532
  icon: "multiline_chart",
1490
- onClick: be.onClick,
1533
+ onClick: be.onClickHandler,
1491
1534
  primaryButton: be.primaryButton,
1492
1535
  subText: be.description,
1493
- sx: { height: l, maxWidth: 432 }
1536
+ sx: { height: B, maxWidth: 432 }
1494
1537
  }
1495
1538
  ),
1496
- !Pe && /* @__PURE__ */ C(w, { flexDirection: X ? "row" : "column", gap: X ? 48 : 16, children: [
1497
- Y === "Chart" && /* @__PURE__ */ C(St, { children: [
1498
- /* @__PURE__ */ e(W, { sx: { width: X ? "68%" : "100%" }, children: /* @__PURE__ */ e(
1499
- Bo,
1539
+ !Fe && /* @__PURE__ */ C(S, { flexDirection: q ? "row" : "column", gap: q ? 48 : 16, children: [
1540
+ ee === "Chart" && /* @__PURE__ */ C(wt, { children: [
1541
+ /* @__PURE__ */ e(N, { sx: { width: q ? "68%" : "100%" }, children: /* @__PURE__ */ e(
1542
+ jo,
1500
1543
  {
1501
- availableHeight: l,
1544
+ availableHeight: B,
1502
1545
  minHeight: 450,
1503
- selectedDateRange: S,
1546
+ selectedDateRange: w,
1504
1547
  totals: f
1505
1548
  }
1506
1549
  ) }),
1507
- /* @__PURE__ */ C(w, { gap: 16, sx: { width: X ? "32%" : "100%" }, children: [
1508
- se && V && Te.length > 0 && /* @__PURE__ */ e(
1509
- ko,
1550
+ /* @__PURE__ */ C(S, { gap: 16, sx: { width: q ? "32%" : "100%" }, children: [
1551
+ le && J && _e.length > 0 && /* @__PURE__ */ e(
1552
+ Vo,
1510
1553
  {
1511
- beats: Te,
1512
- onInsightCardClick: r
1554
+ beats: _e,
1555
+ onInsightCardClick: s
1513
1556
  }
1514
1557
  ),
1515
1558
  /* @__PURE__ */ e(
1516
- Ao,
1559
+ Bo,
1517
1560
  {
1518
- availableHeight: T,
1519
- onCategoryClick: pe
1561
+ availableHeight: d,
1562
+ onCategoryClick: Ee
1520
1563
  }
1521
1564
  )
1522
1565
  ] })
1523
1566
  ] }),
1524
- Y === "Table" && /* @__PURE__ */ e(W, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
1525
- pt,
1567
+ ee === "Table" && /* @__PURE__ */ e(N, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
1568
+ Ct,
1526
1569
  {
1527
1570
  height: "unset",
1528
- onClickRow: _t,
1529
- selectedCategory: j,
1530
- selectedDateRange: S
1571
+ onClickRow: Tt,
1572
+ selectedCategory: se,
1573
+ selectedDateRange: w
1531
1574
  }
1532
1575
  ) })
1533
1576
  ] }),
1534
- me && /* @__PURE__ */ e(No, { onClose: Me })
1577
+ /* @__PURE__ */ e(
1578
+ Pe,
1579
+ {
1580
+ ariaLabelClose: O.close_category_details,
1581
+ isOpen: !!E,
1582
+ onClose: he,
1583
+ shouldShowHeaderShadow: !0,
1584
+ title: E?.is_income ? O.category_income : O.category_spending,
1585
+ children: E && /* @__PURE__ */ e($o, {})
1586
+ }
1587
+ )
1535
1588
  ]
1536
1589
  }
1537
1590
  ),
1538
1591
  /* @__PURE__ */ e(
1539
- ho,
1592
+ yo,
1540
1593
  {
1541
- onClose: () => U(!1),
1542
- showConnectWidget: L,
1543
- title: te.mini_title
1594
+ onClose: () => I(!1),
1595
+ showConnectWidget: b,
1596
+ title: G.mini_title
1544
1597
  }
1545
1598
  )
1546
1599
  ]
1547
1600
  }
1548
1601
  );
1549
- }, Qn = M(Vo);
1602
+ }, ls = A(Zo);
1550
1603
  export {
1551
- Un as TrendsFullWidget,
1552
- Zn as TrendsMicroWidget,
1553
- Xn as TrendsMiniWidget,
1554
- es as TrendsStore,
1555
- Qn as TrendsWidget
1604
+ rs as TrendsFullWidget,
1605
+ is as TrendsMicroWidget,
1606
+ as as TrendsMiniWidget,
1607
+ us as TrendsStore,
1608
+ ls as TrendsWidget
1556
1609
  };