@mx-cartographer/experiences 4.2.0-alpha.sms2 → 4.2.0-alpha.sms4
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.
- package/dist/index.es.js +63 -63
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -41,7 +41,7 @@ import { eachWeekOfInterval as $o } from "date-fns/eachWeekOfInterval";
|
|
|
41
41
|
import { endOfMonth as Re } from "date-fns/endOfMonth";
|
|
42
42
|
import { format as Ve } from "date-fns/format";
|
|
43
43
|
import { isSameMonth as es } from "date-fns/isSameMonth";
|
|
44
|
-
import { startOfMonth as
|
|
44
|
+
import { startOfMonth as De } from "date-fns/startOfMonth";
|
|
45
45
|
import { subMonths as bA } from "date-fns/subMonths";
|
|
46
46
|
import gA from "@mui/material/Paper";
|
|
47
47
|
import As from "@mui/icons-material/KeyboardArrowLeftRounded";
|
|
@@ -80,7 +80,7 @@ import vA from "@mui/material/Avatar";
|
|
|
80
80
|
import be from "@mui/material/ListItemAvatar";
|
|
81
81
|
import nA from "@mui/material/ListItemIcon";
|
|
82
82
|
import { ChevronRight as wA, Payments as xs, NoteStack as Os, Person as _s, CheckCircle as Ns, Icon as Ya, ExpandLess as Ps, ExpandMore as Ms, AccountBalance as Rs, AddBox as di } from "@mxenabled/mx-icons";
|
|
83
|
-
import { makeAutoObservable as
|
|
83
|
+
import { makeAutoObservable as xe, runInAction as Y, reaction as oa, autorun as Hs, observable as Bs } from "mobx";
|
|
84
84
|
import { differenceInDays as zs } from "date-fns/differenceInDays";
|
|
85
85
|
import Cn from "@mui/icons-material/ChevronRight";
|
|
86
86
|
import sa from "@mui/icons-material/ExpandMore";
|
|
@@ -1741,7 +1741,7 @@ const dl = ({
|
|
|
1741
1741
|
h(A), p(n), A && d(A);
|
|
1742
1742
|
}, [A, n]);
|
|
1743
1743
|
const f = g.useMemo(() => {
|
|
1744
|
-
const w = $o({ start:
|
|
1744
|
+
const w = $o({ start: De(c), end: Re(c) }), D = [];
|
|
1745
1745
|
for (let _ = 0; _ < w.length; _++) {
|
|
1746
1746
|
const O = w[_], x = Zo({ start: O, end: OA(O, 6) }), z = [];
|
|
1747
1747
|
for (let K = 0; K < x.length; K++)
|
|
@@ -2655,7 +2655,7 @@ const dl = ({
|
|
|
2655
2655
|
calendarActions: e,
|
|
2656
2656
|
color: A = "primary",
|
|
2657
2657
|
copy: n,
|
|
2658
|
-
range: a = [
|
|
2658
|
+
range: a = [De(ie()), Re(ot())],
|
|
2659
2659
|
shouldShrinkToIcon: r = !0,
|
|
2660
2660
|
toolTipContent: i = "",
|
|
2661
2661
|
variant: o = "outlined"
|
|
@@ -3677,7 +3677,7 @@ class Kl {
|
|
|
3677
3677
|
api = new cn("/", "");
|
|
3678
3678
|
isInitialized = !1;
|
|
3679
3679
|
constructor() {
|
|
3680
|
-
|
|
3680
|
+
xe(this);
|
|
3681
3681
|
}
|
|
3682
3682
|
initialize = async (A, n) => {
|
|
3683
3683
|
this.api = new cn(A, n), await this.getCopy(this.featureNamespace), Y(() => {
|
|
@@ -3706,7 +3706,7 @@ class ql {
|
|
|
3706
3706
|
appData = {};
|
|
3707
3707
|
api = new Cr("/", "");
|
|
3708
3708
|
constructor() {
|
|
3709
|
-
|
|
3709
|
+
xe(this);
|
|
3710
3710
|
}
|
|
3711
3711
|
initialize = async (A, n) => {
|
|
3712
3712
|
this.api = new Cr(A, n), await this.loadAppData();
|
|
@@ -3734,7 +3734,7 @@ class kl {
|
|
|
3734
3734
|
beats = [];
|
|
3735
3735
|
api = new Et("/", "");
|
|
3736
3736
|
constructor() {
|
|
3737
|
-
|
|
3737
|
+
xe(this);
|
|
3738
3738
|
}
|
|
3739
3739
|
initialize = async (A, n) => {
|
|
3740
3740
|
this.api = new Et(A, n), await this.loadBeats();
|
|
@@ -3825,13 +3825,13 @@ class jl {
|
|
|
3825
3825
|
categoryApi = new sn("/", "");
|
|
3826
3826
|
globalStore;
|
|
3827
3827
|
alert = "";
|
|
3828
|
-
dateRange = { start:
|
|
3828
|
+
dateRange = { start: De(ie()), end: Re(ie()) };
|
|
3829
3829
|
budgets = [];
|
|
3830
3830
|
selectedBudget;
|
|
3831
3831
|
selectedSubBudget;
|
|
3832
3832
|
theme = {};
|
|
3833
3833
|
constructor(A) {
|
|
3834
|
-
this.globalStore = A,
|
|
3834
|
+
this.globalStore = A, xe(this);
|
|
3835
3835
|
}
|
|
3836
3836
|
initialize = async (A, n) => {
|
|
3837
3837
|
this.api = new fr(A, n), this.categoryApi = new sn(A, n), oa(
|
|
@@ -4537,7 +4537,7 @@ const Vl = [
|
|
|
4537
4537
|
}, td = (e, A, n) => {
|
|
4538
4538
|
const {
|
|
4539
4539
|
accounts: a = [],
|
|
4540
|
-
dateRange: r = { start:
|
|
4540
|
+
dateRange: r = { start: De(ie()), end: ot() },
|
|
4541
4541
|
custom: i = () => !0,
|
|
4542
4542
|
searchTerm: o = ""
|
|
4543
4543
|
} = e;
|
|
@@ -4590,7 +4590,7 @@ const Fi = {
|
|
|
4590
4590
|
tags: []
|
|
4591
4591
|
};
|
|
4592
4592
|
let sd = class {
|
|
4593
|
-
beginDate =
|
|
4593
|
+
beginDate = De(/* @__PURE__ */ new Date());
|
|
4594
4594
|
endDate = Re(/* @__PURE__ */ new Date());
|
|
4595
4595
|
expandedSplits = [];
|
|
4596
4596
|
isInitialized = !1;
|
|
@@ -4603,7 +4603,7 @@ let sd = class {
|
|
|
4603
4603
|
isAmountValid = !1;
|
|
4604
4604
|
showInsights = !1;
|
|
4605
4605
|
constructor() {
|
|
4606
|
-
|
|
4606
|
+
xe(this);
|
|
4607
4607
|
}
|
|
4608
4608
|
setDateRange = (A, n) => {
|
|
4609
4609
|
this.beginDate = A, this.endDate = n;
|
|
@@ -4660,18 +4660,18 @@ class cd {
|
|
|
4660
4660
|
tags: r = [],
|
|
4661
4661
|
transactionRules: i = [],
|
|
4662
4662
|
transactions: o = [],
|
|
4663
|
-
associatedBeats
|
|
4664
|
-
updateExternallyManagedTransactions:
|
|
4663
|
+
// associatedBeats = [],
|
|
4664
|
+
updateExternallyManagedTransactions: s
|
|
4665
4665
|
} = n;
|
|
4666
|
-
this.taggings = a, this.tags = r, this.transactionRules = i, this.transactions = o, this.
|
|
4666
|
+
this.taggings = a, this.tags = r, this.transactionRules = i, this.transactions = o, this.updateExternallyManagedTransactions = s, this.setIsLoading(!1), this.shouldManageDataExternally = !0;
|
|
4667
4667
|
}
|
|
4668
|
-
this.globalStore = A, this.uiStore = new sd(),
|
|
4668
|
+
this.globalStore = A, this.uiStore = new sd(), xe(this);
|
|
4669
4669
|
}
|
|
4670
4670
|
initialize = async (A, n) => {
|
|
4671
|
-
this.api = new Er(A, n), this.beatApi = new Et(A, n), this.shouldManageDataExternally ? (this.uiStore.setIsInitialized(!0), Hs(() => {
|
|
4671
|
+
this.api = new Er(A, n), this.beatApi = new Et(A, n), this.shouldManageDataExternally ? (this.uiStore.setIsInitialized(!0), await this.loadAssociatedBeats(De(/* @__PURE__ */ new Date())), Hs(() => {
|
|
4672
4672
|
this.globalStore.isInitialized && (this.transactions = this.augmentTransactions(this.transactions));
|
|
4673
4673
|
})) : await Promise.all([
|
|
4674
|
-
this.loadAssociatedBeats(
|
|
4674
|
+
this.loadAssociatedBeats(De(/* @__PURE__ */ new Date())),
|
|
4675
4675
|
this.loadTags(),
|
|
4676
4676
|
this.loadTaggings(),
|
|
4677
4677
|
this.loadTransactionRules(),
|
|
@@ -5550,7 +5550,7 @@ const xd = ({
|
|
|
5550
5550
|
}, Dr = (e) => {
|
|
5551
5551
|
const A = [], n = ie();
|
|
5552
5552
|
for (let a = 0; a <= Ir; a++) {
|
|
5553
|
-
const r =
|
|
5553
|
+
const r = De(bA(n, Ir - a)), o = e.filter(
|
|
5554
5554
|
(s) => s.year_month === Number(Ve(r, "yyyyMM"))
|
|
5555
5555
|
).reduce((s, c) => s + c.total, 0);
|
|
5556
5556
|
A.push({
|
|
@@ -5572,7 +5572,7 @@ let Yd = class {
|
|
|
5572
5572
|
savedOnSelect;
|
|
5573
5573
|
// todo
|
|
5574
5574
|
constructor() {
|
|
5575
|
-
|
|
5575
|
+
xe(this);
|
|
5576
5576
|
}
|
|
5577
5577
|
setExpandedGuid = (A) => this.expandedGuid = A;
|
|
5578
5578
|
setSelectedGuid = (A) => this.selectedGuid = A;
|
|
@@ -5593,7 +5593,7 @@ class Vd {
|
|
|
5593
5593
|
monthlyCategoryTotals = [];
|
|
5594
5594
|
isLoadingCategoryTotals = !1;
|
|
5595
5595
|
constructor(A) {
|
|
5596
|
-
this.globalStore = A, this.uiStore = new Yd(),
|
|
5596
|
+
this.globalStore = A, this.uiStore = new Yd(), xe(this);
|
|
5597
5597
|
}
|
|
5598
5598
|
initialize = async (A, n) => {
|
|
5599
5599
|
this.api = new sn(A, n), await this.loadCategories();
|
|
@@ -5653,7 +5653,7 @@ class Vd {
|
|
|
5653
5653
|
}
|
|
5654
5654
|
};
|
|
5655
5655
|
loadMonthlyCategoryTotals = async (A = this.globalStore.accountStore.accounts, n, a) => {
|
|
5656
|
-
const r = Ce(
|
|
5656
|
+
const r = Ce(De(n ?? bA(/* @__PURE__ */ new Date(), 11))), i = Ce(Re(a ?? /* @__PURE__ */ new Date()));
|
|
5657
5657
|
try {
|
|
5658
5658
|
const o = await this.api.getMonthlyCategoryTotals(r, i, A);
|
|
5659
5659
|
Y(() => {
|
|
@@ -5671,7 +5671,7 @@ class Vd {
|
|
|
5671
5671
|
Ce(a),
|
|
5672
5672
|
A
|
|
5673
5673
|
), i = await this.api.getMonthlyCategoryTotals(
|
|
5674
|
-
Ce(
|
|
5674
|
+
Ce(De(bA(a, 11))),
|
|
5675
5675
|
Ce(Re(a)),
|
|
5676
5676
|
A
|
|
5677
5677
|
);
|
|
@@ -6942,7 +6942,7 @@ const Qi = ({ transaction: e }) => {
|
|
|
6942
6942
|
g.useEffect(() => {
|
|
6943
6943
|
te(r);
|
|
6944
6944
|
}, [r]), g.useEffect(() => {
|
|
6945
|
-
const ze =
|
|
6945
|
+
const ze = De(ie()), ka = Re(ie());
|
|
6946
6946
|
V(ze, ka), E({
|
|
6947
6947
|
dateRange: { start: ze, end: ka },
|
|
6948
6948
|
accounts: G.map((zo) => zo.guid)
|
|
@@ -7827,7 +7827,7 @@ const Qi = ({ transaction: e }) => {
|
|
|
7827
7827
|
};
|
|
7828
7828
|
}), s = a.filter(
|
|
7829
7829
|
(u) => ft(Le(u.expected_date), {
|
|
7830
|
-
start:
|
|
7830
|
+
start: De(ie()),
|
|
7831
7831
|
end: OA(ie(), 30)
|
|
7832
7832
|
})
|
|
7833
7833
|
).filter((u) => {
|
|
@@ -7877,7 +7877,7 @@ const Qi = ({ transaction: e }) => {
|
|
|
7877
7877
|
recurrenceDay: A.recurrence_day,
|
|
7878
7878
|
scheduledPaymentGuid: A.guid,
|
|
7879
7879
|
transactionGuid: ""
|
|
7880
|
-
}, c = A.recurrence_day, d = ie(), u =
|
|
7880
|
+
}, c = A.recurrence_day, d = ie(), u = De(ie()), h = OA(ie(), 30);
|
|
7881
7881
|
let m = u;
|
|
7882
7882
|
switch (A.recurrence_type) {
|
|
7883
7883
|
case X.EveryWeek:
|
|
@@ -8024,16 +8024,16 @@ const Qi = ({ transaction: e }) => {
|
|
|
8024
8024
|
e === 1 && /* @__PURE__ */ t(Pa, {})
|
|
8025
8025
|
] });
|
|
8026
8026
|
}, io = T(Zu), _t = (e, A) => e + A.amount, zn = (e) => e.activityType === Ne.Income && ft(e.expectedDate, {
|
|
8027
|
-
start:
|
|
8027
|
+
start: De(ie()),
|
|
8028
8028
|
end: Re(ie())
|
|
8029
8029
|
}), en = (e) => e.activityType === Ne.Expense && ft(e.expectedDate, {
|
|
8030
|
-
start:
|
|
8030
|
+
start: De(ie()),
|
|
8031
8031
|
end: Re(ie())
|
|
8032
8032
|
}), Kn = (e) => e.occurredOnDate && ft(e.occurredOnDate, {
|
|
8033
|
-
start:
|
|
8033
|
+
start: De(/* @__PURE__ */ new Date()),
|
|
8034
8034
|
end: OA(ie(), 30)
|
|
8035
8035
|
}) || ft(e.expectedDate, {
|
|
8036
|
-
start:
|
|
8036
|
+
start: De(/* @__PURE__ */ new Date()),
|
|
8037
8037
|
end: OA(ie(), 30)
|
|
8038
8038
|
}), $u = ({ day: e, outsideCurrentMonth: A, ...n }) => {
|
|
8039
8039
|
const { recurring: a } = L(), { selectedAccountGuids: r } = ye(), { activities: i, setSelectedDay: o } = ke(), c = g.useMemo(
|
|
@@ -8119,7 +8119,7 @@ const Qi = ({ transaction: e }) => {
|
|
|
8119
8119
|
ha,
|
|
8120
8120
|
{
|
|
8121
8121
|
maxDate: Re(oA(/* @__PURE__ */ new Date(), 1)),
|
|
8122
|
-
minDate:
|
|
8122
|
+
minDate: De(/* @__PURE__ */ new Date()),
|
|
8123
8123
|
onMonthChange: i,
|
|
8124
8124
|
showDaysOutsideCurrentMonth: !0,
|
|
8125
8125
|
slots: {
|
|
@@ -8453,7 +8453,7 @@ class hh {
|
|
|
8453
8453
|
selectedDay;
|
|
8454
8454
|
isLoading = !0;
|
|
8455
8455
|
constructor(A) {
|
|
8456
|
-
this.globalStore = A,
|
|
8456
|
+
this.globalStore = A, xe(this);
|
|
8457
8457
|
}
|
|
8458
8458
|
initialize = async (A, n) => {
|
|
8459
8459
|
this.api = new or(A, n), this.cashflowApi = new Br(A, n), this.loadActivity();
|
|
@@ -8566,7 +8566,7 @@ class hh {
|
|
|
8566
8566
|
loadExpectedEvents = async () => {
|
|
8567
8567
|
try {
|
|
8568
8568
|
const A = await this.cashflowApi.getProjectedCashflowEvents(
|
|
8569
|
-
|
|
8569
|
+
De(ie()),
|
|
8570
8570
|
OA(ie(), 30)
|
|
8571
8571
|
);
|
|
8572
8572
|
Y(() => {
|
|
@@ -9442,7 +9442,7 @@ const wh = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
|
9442
9442
|
), V = !!n.length, te = async () => {
|
|
9443
9443
|
O(2), c(
|
|
9444
9444
|
// Beginning of the month, 90 days before today
|
|
9445
|
-
|
|
9445
|
+
De(TA(ie(), 90)),
|
|
9446
9446
|
ie()
|
|
9447
9447
|
), u({ ...d, custom: Xt }), O(3);
|
|
9448
9448
|
}, ue = async () => {
|
|
@@ -9696,7 +9696,7 @@ let Fh = class {
|
|
|
9696
9696
|
upcomingExpenses = [];
|
|
9697
9697
|
selectedCashAccounts = [];
|
|
9698
9698
|
constructor() {
|
|
9699
|
-
|
|
9699
|
+
xe(this);
|
|
9700
9700
|
}
|
|
9701
9701
|
// Returns the number of days until the next income activity or 0 if there is no income activity
|
|
9702
9702
|
get daysUntilNextIncome() {
|
|
@@ -9721,7 +9721,7 @@ class Xh {
|
|
|
9721
9721
|
globalStore;
|
|
9722
9722
|
uiStore;
|
|
9723
9723
|
constructor(A) {
|
|
9724
|
-
this.globalStore = A, this.uiStore = new Fh(),
|
|
9724
|
+
this.globalStore = A, this.uiStore = new Fh(), xe(this);
|
|
9725
9725
|
}
|
|
9726
9726
|
completeOnboarding = async () => {
|
|
9727
9727
|
const A = {
|
|
@@ -9735,7 +9735,7 @@ class jh {
|
|
|
9735
9735
|
widgetApi = new cr("/", "");
|
|
9736
9736
|
globalStore;
|
|
9737
9737
|
constructor(A) {
|
|
9738
|
-
this.globalStore = A,
|
|
9738
|
+
this.globalStore = A, xe(this);
|
|
9739
9739
|
}
|
|
9740
9740
|
initialize = async (A, n) => {
|
|
9741
9741
|
this.widgetApi = new cr(A, n);
|
|
@@ -10182,7 +10182,7 @@ const tn = {
|
|
|
10182
10182
|
return ve().uiStore;
|
|
10183
10183
|
}, On = (e) => e.top_level_category_guid === b.INCOME || e.category_guid === b.INCOME, Jh = (e) => !On(e) && !lo(e), co = (e) => tr.includes(e.top_level_category_guid) || tr.includes(e.category_guid), lo = (e) => e.top_level_category_guid === b.TRANSFER || e.category_guid === b.TRANSFER, Zh = (e) => !On(e) && !co(e) && !lo(e), $h = (e) => e.filter((A) => A.category_guid === A.top_level_category_guid), Ra = (e, A) => {
|
|
10184
10184
|
const n = [];
|
|
10185
|
-
let a =
|
|
10185
|
+
let a = De(bA(/* @__PURE__ */ new Date(), 5));
|
|
10186
10186
|
const r = /* @__PURE__ */ new Date();
|
|
10187
10187
|
for (; Te(a, r); )
|
|
10188
10188
|
n.push({
|
|
@@ -10203,7 +10203,7 @@ const tn = {
|
|
|
10203
10203
|
const A = [], n = e.filter(
|
|
10204
10204
|
(i) => i.top_level_category_guid !== b.INCOME && i.top_level_category_guid !== b.TRANSFER && i.total > 0
|
|
10205
10205
|
);
|
|
10206
|
-
let a =
|
|
10206
|
+
let a = De(bA(/* @__PURE__ */ new Date(), 5));
|
|
10207
10207
|
const r = Re(/* @__PURE__ */ new Date());
|
|
10208
10208
|
for (; Te(a, r); )
|
|
10209
10209
|
A.push({
|
|
@@ -11179,7 +11179,7 @@ class zg {
|
|
|
11179
11179
|
isLoading = !1;
|
|
11180
11180
|
selectedDebtChartData = {};
|
|
11181
11181
|
constructor() {
|
|
11182
|
-
|
|
11182
|
+
xe(this);
|
|
11183
11183
|
}
|
|
11184
11184
|
get showError() {
|
|
11185
11185
|
const { interest_rate: A, monthly_payment: n } = this.selectedDebtChartData;
|
|
@@ -11195,7 +11195,7 @@ class Kg {
|
|
|
11195
11195
|
globalStore;
|
|
11196
11196
|
uiStore;
|
|
11197
11197
|
constructor(A) {
|
|
11198
|
-
this.globalStore = A, this.uiStore = new zg(),
|
|
11198
|
+
this.globalStore = A, this.uiStore = new zg(), xe(this);
|
|
11199
11199
|
}
|
|
11200
11200
|
get debts() {
|
|
11201
11201
|
const { debtAccounts: A } = this.globalStore.accountStore, { debtGoals: n } = this.globalStore.goalStore;
|
|
@@ -11209,11 +11209,11 @@ class qg {
|
|
|
11209
11209
|
selectedAccountGuids = this.selectedAccounts.map((A) => A.guid);
|
|
11210
11210
|
displayedDate = /* @__PURE__ */ new Date();
|
|
11211
11211
|
displayedDateRange = {
|
|
11212
|
-
start:
|
|
11212
|
+
start: De(this.displayedDate),
|
|
11213
11213
|
end: Re(this.displayedDate)
|
|
11214
11214
|
};
|
|
11215
11215
|
constructor(A) {
|
|
11216
|
-
|
|
11216
|
+
xe(this), this.globalStore = A;
|
|
11217
11217
|
}
|
|
11218
11218
|
setInitialized = (A) => {
|
|
11219
11219
|
this.isInitialized = A;
|
|
@@ -12232,7 +12232,7 @@ class a1 {
|
|
|
12232
12232
|
selectedGoal = void 0;
|
|
12233
12233
|
monthlyCashFlowProfile = void 0;
|
|
12234
12234
|
constructor(A) {
|
|
12235
|
-
this.globalStore = A,
|
|
12235
|
+
this.globalStore = A, xe(this);
|
|
12236
12236
|
}
|
|
12237
12237
|
initialize = async (A, n) => {
|
|
12238
12238
|
this.api = new kr(A, n);
|
|
@@ -12630,7 +12630,7 @@ class s1 {
|
|
|
12630
12630
|
appConfig;
|
|
12631
12631
|
globalStore;
|
|
12632
12632
|
constructor(A) {
|
|
12633
|
-
this.globalStore = A,
|
|
12633
|
+
this.globalStore = A, xe(this);
|
|
12634
12634
|
}
|
|
12635
12635
|
loadAppConfig = (A) => this.appConfig = A;
|
|
12636
12636
|
get helpCategories() {
|
|
@@ -12716,7 +12716,7 @@ class u1 {
|
|
|
12716
12716
|
merchants = [];
|
|
12717
12717
|
isLoading = !1;
|
|
12718
12718
|
constructor() {
|
|
12719
|
-
|
|
12719
|
+
xe(this);
|
|
12720
12720
|
}
|
|
12721
12721
|
initialize = async (A, n) => {
|
|
12722
12722
|
this.api = new Fr(A, n);
|
|
@@ -12739,7 +12739,7 @@ const vo = 13, h1 = (e, A) => e.filter((n) => {
|
|
|
12739
12739
|
}), g1 = (e, A) => [...e, ...A], Xr = (e) => {
|
|
12740
12740
|
if (e && e.length > 0)
|
|
12741
12741
|
return e[e.length - 1];
|
|
12742
|
-
}, m1 = (e, A) => e.year_month - A.year_month, p1 = () => Array.from({ length: vo }, (e, A) => Math.floor(
|
|
12742
|
+
}, m1 = (e, A) => e.year_month - A.year_month, p1 = () => Array.from({ length: vo }, (e, A) => Math.floor(De(bA(/* @__PURE__ */ new Date(), A)).getTime() / 1e3)).sort(), C1 = (e, A, n) => !e.length || !A.length ? [] : p1().reduceRight((r, i) => {
|
|
12743
12743
|
const o = A.filter(
|
|
12744
12744
|
({ year_month: u }) => u === parseInt(Ve(Le(i), "yyyyMM"))
|
|
12745
12745
|
), s = e.map((u) => {
|
|
@@ -12819,7 +12819,7 @@ class y1 {
|
|
|
12819
12819
|
hoveredData;
|
|
12820
12820
|
selectedData;
|
|
12821
12821
|
constructor(A) {
|
|
12822
|
-
this.globalStore = A,
|
|
12822
|
+
this.globalStore = A, xe(this);
|
|
12823
12823
|
}
|
|
12824
12824
|
loadNetWorthData = async (A) => {
|
|
12825
12825
|
try {
|
|
@@ -13313,7 +13313,7 @@ class H1 {
|
|
|
13313
13313
|
notifications = [];
|
|
13314
13314
|
recentNotifications = [];
|
|
13315
13315
|
constructor() {
|
|
13316
|
-
|
|
13316
|
+
xe(this, { notifications: Bs });
|
|
13317
13317
|
}
|
|
13318
13318
|
initialize = async (A, n) => {
|
|
13319
13319
|
this.api = new ir(A, n), await this.loadNotifications();
|
|
@@ -13419,7 +13419,7 @@ class F1 {
|
|
|
13419
13419
|
globalStore;
|
|
13420
13420
|
api = new sr("/", "");
|
|
13421
13421
|
constructor(A) {
|
|
13422
|
-
this.globalStore = A,
|
|
13422
|
+
this.globalStore = A, xe(this);
|
|
13423
13423
|
}
|
|
13424
13424
|
initialize = async (A, n) => {
|
|
13425
13425
|
this.api = new sr(A, n);
|
|
@@ -13484,7 +13484,7 @@ class G8 {
|
|
|
13484
13484
|
accountStoreProps: A = void 0,
|
|
13485
13485
|
transactionStoreProps: n = void 0
|
|
13486
13486
|
}) {
|
|
13487
|
-
this.accountStore = new vm(this, A), this.appDataStore = new ql(), this.beatStore = new kl(), this.budgetsStore = new jl(this), this.cashflowStore = new Xh(this), this.categoryStore = new Vd(this), this.connectStore = new jh(this), this.copyStore = new Kl(), this.debtsStore = new Kg(this), this.goalStore = new a1(this), this.helpStore = new s1(this), this.merchantStore = new u1(), this.netWorthStore = new y1(this), this.notificationStore = new H1(), this.recurringActivityStore = new hh(this), this.transactionStore = new cd(this, n), this.userStore = new F1(this), this.globalUiStore = new qg(this),
|
|
13487
|
+
this.accountStore = new vm(this, A), this.appDataStore = new ql(), this.beatStore = new kl(), this.budgetsStore = new jl(this), this.cashflowStore = new Xh(this), this.categoryStore = new Vd(this), this.connectStore = new jh(this), this.copyStore = new Kl(), this.debtsStore = new Kg(this), this.goalStore = new a1(this), this.helpStore = new s1(this), this.merchantStore = new u1(), this.netWorthStore = new y1(this), this.notificationStore = new H1(), this.recurringActivityStore = new hh(this), this.transactionStore = new cd(this, n), this.userStore = new F1(this), this.globalUiStore = new qg(this), xe(this);
|
|
13488
13488
|
}
|
|
13489
13489
|
initialize = async (A, n, a = X1) => {
|
|
13490
13490
|
await this.copyStore.initialize(A, n), await this.appDataStore.initialize(A, n);
|
|
@@ -14800,7 +14800,7 @@ class fm {
|
|
|
14800
14800
|
selectedAccount = {};
|
|
14801
14801
|
selectedMember = {};
|
|
14802
14802
|
constructor() {
|
|
14803
|
-
|
|
14803
|
+
xe(this);
|
|
14804
14804
|
}
|
|
14805
14805
|
setIsLoading = (A) => this.isLoading = A;
|
|
14806
14806
|
setSelectedAccount = (A) => this.selectedAccount = A;
|
|
@@ -14827,15 +14827,15 @@ class vm {
|
|
|
14827
14827
|
const {
|
|
14828
14828
|
accounts: a = [],
|
|
14829
14829
|
institutions: r = [],
|
|
14830
|
-
members
|
|
14831
|
-
updateExternallyManagedAccounts:
|
|
14830
|
+
// members = [],
|
|
14831
|
+
updateExternallyManagedAccounts: i
|
|
14832
14832
|
} = n;
|
|
14833
|
-
this.accounts = a, this.institutions = r, this.
|
|
14833
|
+
this.accounts = a, this.institutions = r, this.updateExternallyManagedAccounts = i, this.shouldManageDataExternally = !!a.length && !!r;
|
|
14834
14834
|
}
|
|
14835
|
-
this.globalStore = A, this.uiStore = new fm(),
|
|
14835
|
+
this.globalStore = A, this.uiStore = new fm(), xe(this);
|
|
14836
14836
|
}
|
|
14837
14837
|
initialize = async (A, n) => {
|
|
14838
|
-
this.api = new Qr(A, n), this.shouldManageDataExternally
|
|
14838
|
+
this.api = new Qr(A, n), this.shouldManageDataExternally ? await this.loadMembers() : await Promise.all([this.loadAccounts(), this.loadInstitutions()]), oa(
|
|
14839
14839
|
() => this.accounts,
|
|
14840
14840
|
(a) => {
|
|
14841
14841
|
this.shouldManageDataExternally && (this.accounts = this.sortAccounts(this.augmentAccounts(a)), this.updateExternallyManagedAccounts?.(a));
|
|
@@ -15773,7 +15773,7 @@ const _m = ({
|
|
|
15773
15773
|
z(!0), a(F.BUDGETS_CLICK_ADD);
|
|
15774
15774
|
}, V = () => {
|
|
15775
15775
|
z(!1);
|
|
15776
|
-
}, te = yt(m.end,
|
|
15776
|
+
}, te = yt(m.end, De(/* @__PURE__ */ new Date()));
|
|
15777
15777
|
return !s || !_ ? /* @__PURE__ */ t(We, {}) : /* @__PURE__ */ l(
|
|
15778
15778
|
CA,
|
|
15779
15779
|
{
|
|
@@ -16729,7 +16729,7 @@ class lp {
|
|
|
16729
16729
|
namespace = "experiences";
|
|
16730
16730
|
translationKey = "micro_insights";
|
|
16731
16731
|
constructor() {
|
|
16732
|
-
|
|
16732
|
+
xe(this);
|
|
16733
16733
|
}
|
|
16734
16734
|
initialize = async (A, n) => {
|
|
16735
16735
|
this.copyApi = new cn(A, n), await this.loadCopy();
|
|
@@ -16904,7 +16904,7 @@ class gp {
|
|
|
16904
16904
|
onAnalyticPageView = ti;
|
|
16905
16905
|
beatApi = new Et("/", "");
|
|
16906
16906
|
constructor() {
|
|
16907
|
-
|
|
16907
|
+
xe(this);
|
|
16908
16908
|
}
|
|
16909
16909
|
initialize = async (A, n, a) => {
|
|
16910
16910
|
this.onAnalyticEvent = (r, i) => {
|
|
@@ -16929,7 +16929,7 @@ class mp {
|
|
|
16929
16929
|
token = "";
|
|
16930
16930
|
isInitialized = !1;
|
|
16931
16931
|
constructor() {
|
|
16932
|
-
this.copyStore = new lp(), this.insightsMicroWidgetStore = new gp(),
|
|
16932
|
+
this.copyStore = new lp(), this.insightsMicroWidgetStore = new gp(), xe(this);
|
|
16933
16933
|
}
|
|
16934
16934
|
initialize = async (A, n, a) => {
|
|
16935
16935
|
await this.copyStore.initialize(A, n), await this.insightsMicroWidgetStore.initialize(A, n, a), this.session = await Ic(A, n, "1.0.0", "Micro Insights Carousel"), Y(() => {
|
|
@@ -18689,7 +18689,7 @@ const Vt = g.createContext(null), pp = ({
|
|
|
18689
18689
|
g.useEffect(() => {
|
|
18690
18690
|
o(
|
|
18691
18691
|
n,
|
|
18692
|
-
|
|
18692
|
+
De(/* @__PURE__ */ new Date()),
|
|
18693
18693
|
Re(/* @__PURE__ */ new Date())
|
|
18694
18694
|
).finally();
|
|
18695
18695
|
}, [n]);
|
|
@@ -19032,7 +19032,7 @@ const Vt = g.createContext(null), pp = ({
|
|
|
19032
19032
|
g.useEffect(() => {
|
|
19033
19033
|
o(n);
|
|
19034
19034
|
}, [n]), g.useEffect(() => {
|
|
19035
|
-
i(
|
|
19035
|
+
i(De(ie()), Re(ie())), d(!0), s(F.SPENDING_VIEW);
|
|
19036
19036
|
}, []);
|
|
19037
19037
|
const u = (h) => {
|
|
19038
19038
|
i(h[0], h[1]);
|