@nizza/core 0.4.0-alpha.7 → 0.4.0-alpha.8
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.cjs +5 -5
- package/dist/index.mjs +976 -973
- package/dist/lib/nizza-store/NizzaStore.d.ts +33 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
var aa = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var G = (e, t, i) => (
|
|
2
|
+
var oa = (e, t, i) => t in e ? aa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
|
+
var G = (e, t, i) => (oa(e, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
4
|
import * as le from "react";
|
|
5
|
-
import
|
|
5
|
+
import Ri, { createContext as Ti, useReducer as sa, useEffect as vt, useDebugValue as ua, useCallback as la, useContext as wn, useMemo as ca, useState as da } from "react";
|
|
6
6
|
import { jsx as fa } from "react/jsx-runtime";
|
|
7
7
|
let ha = 0;
|
|
8
8
|
function ma(e, t) {
|
|
9
9
|
const i = `atom${++ha}`, n = {
|
|
10
10
|
toString: () => i
|
|
11
11
|
};
|
|
12
|
-
return typeof e == "function" ? n.read = e : (n.init = e, n.read = (r) => r(n), n.write = (r, a,
|
|
12
|
+
return typeof e == "function" ? n.read = e : (n.init = e, n.read = (r) => r(n), n.write = (r, a, o) => a(
|
|
13
13
|
n,
|
|
14
|
-
typeof
|
|
14
|
+
typeof o == "function" ? o(r(n)) : o
|
|
15
15
|
)), t && (n.write = t), n;
|
|
16
16
|
}
|
|
17
|
-
const an = (e) => "init" in e,
|
|
17
|
+
const an = (e) => "init" in e, on = (e) => !!e.write, Dt = /* @__PURE__ */ new WeakMap(), va = (e, t) => {
|
|
18
18
|
Dt.set(e, t), e.catch(() => {
|
|
19
19
|
}).finally(() => Dt.delete(e));
|
|
20
|
-
},
|
|
20
|
+
}, zn = (e, t) => {
|
|
21
21
|
const i = Dt.get(e);
|
|
22
22
|
i && (Dt.delete(e), i(t));
|
|
23
|
-
},
|
|
23
|
+
}, Kn = (e, t) => {
|
|
24
24
|
e.status = "fulfilled", e.value = t;
|
|
25
|
-
},
|
|
25
|
+
}, $n = (e, t) => {
|
|
26
26
|
e.status = "rejected", e.reason = t;
|
|
27
|
-
}, Ft = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v),
|
|
27
|
+
}, Ft = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), Wn = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), sn = (e) => "v" in e && e.v instanceof Promise, Ct = (e) => {
|
|
28
28
|
if ("e" in e)
|
|
29
29
|
throw e.e;
|
|
30
30
|
return e.v;
|
|
31
|
-
},
|
|
31
|
+
}, Li = () => {
|
|
32
32
|
const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new Map();
|
|
33
33
|
let n, r;
|
|
34
34
|
({ NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 } && "production") !== "production" && (n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set());
|
|
35
|
-
const a = (g) => e.get(g),
|
|
35
|
+
const a = (g) => e.get(g), o = (g, k) => {
|
|
36
36
|
({ NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 } && "production") !== "production" && Object.freeze(k);
|
|
37
37
|
const F = e.get(g);
|
|
38
|
-
if (e.set(g, k), i.has(g) || i.set(g, F), F &&
|
|
38
|
+
if (e.set(g, k), i.has(g) || i.set(g, F), F && sn(F)) {
|
|
39
39
|
const T = "v" in k ? k.v instanceof Promise ? k.v : Promise.resolve(k.v) : Promise.reject(k.e);
|
|
40
|
-
|
|
40
|
+
zn(F.v, T);
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, s = (g, k, F) => {
|
|
43
43
|
const T = /* @__PURE__ */ new Map();
|
|
44
44
|
let I = !1;
|
|
45
45
|
F.forEach((V, B) => {
|
|
@@ -50,7 +50,7 @@ const an = (e) => "init" in e, sn = (e) => !!e.write, Dt = /* @__PURE__ */ new W
|
|
|
50
50
|
d: (T == null ? void 0 : T.d) || /* @__PURE__ */ new Map(),
|
|
51
51
|
v: k
|
|
52
52
|
};
|
|
53
|
-
return F &&
|
|
53
|
+
return F && s(g, I, F), T && Ft(T, I) && T.d === I.d ? T : (o(g, I), I);
|
|
54
54
|
}, c = (g, k, F, T) => {
|
|
55
55
|
if (k instanceof Promise) {
|
|
56
56
|
let I;
|
|
@@ -65,7 +65,7 @@ const an = (e) => "init" in e, sn = (e) => !!e.write, Dt = /* @__PURE__ */ new W
|
|
|
65
65
|
V,
|
|
66
66
|
F
|
|
67
67
|
);
|
|
68
|
-
|
|
68
|
+
Kn(V, H), B(H), (u == null ? void 0 : u.d) !== d.d && z(g, d, u == null ? void 0 : u.d);
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
(H) => {
|
|
@@ -76,13 +76,13 @@ const an = (e) => "init" in e, sn = (e) => !!e.write, Dt = /* @__PURE__ */ new W
|
|
|
76
76
|
V,
|
|
77
77
|
F
|
|
78
78
|
);
|
|
79
|
-
|
|
79
|
+
$n(V, H), j(H), (u == null ? void 0 : u.d) !== d.d && z(g, d, u == null ? void 0 : u.d);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
), I = (H) => {
|
|
83
83
|
K || (K = !0, H.then(
|
|
84
|
-
(u) =>
|
|
85
|
-
(u) =>
|
|
84
|
+
(u) => Kn(V, u),
|
|
85
|
+
(u) => $n(V, u)
|
|
86
86
|
), B(H));
|
|
87
87
|
};
|
|
88
88
|
});
|
|
@@ -96,7 +96,7 @@ const an = (e) => "init" in e, sn = (e) => !!e.write, Dt = /* @__PURE__ */ new W
|
|
|
96
96
|
d: (T == null ? void 0 : T.d) || /* @__PURE__ */ new Map(),
|
|
97
97
|
e: k
|
|
98
98
|
};
|
|
99
|
-
return F &&
|
|
99
|
+
return F && s(g, I, F), T && Wn(T, I) && T.d === I.d ? T : (o(g, I), I);
|
|
100
100
|
}, v = (g) => {
|
|
101
101
|
const k = a(g);
|
|
102
102
|
if (k && (k.d.forEach((K, H) => {
|
|
@@ -125,7 +125,7 @@ const an = (e) => "init" in e, sn = (e) => !!e.write, Dt = /* @__PURE__ */ new W
|
|
|
125
125
|
return V || (V = new AbortController()), V.signal;
|
|
126
126
|
},
|
|
127
127
|
get setSelf() {
|
|
128
|
-
return ({ NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 } && "production") !== "production" && !
|
|
128
|
+
return ({ NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 } && "production") !== "production" && !on(g) && console.warn("setSelf function cannot be used with read-only atom"), !B && on(g) && (B = (...K) => {
|
|
129
129
|
if (({ NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 } && "production") !== "production" && T && console.warn("setSelf function cannot be called in sync"), !T)
|
|
130
130
|
return L(g, ...K);
|
|
131
131
|
}), B;
|
|
@@ -183,7 +183,7 @@ const an = (e) => "init" in e, sn = (e) => !!e.write, Dt = /* @__PURE__ */ new W
|
|
|
183
183
|
if (t.set(g, F), ({ NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 } && "production") !== "production" && r.add(g), v(g).d.forEach((T, I) => {
|
|
184
184
|
const V = t.get(I);
|
|
185
185
|
V ? V.t.add(g) : I !== g && U(I, g);
|
|
186
|
-
}), v(g),
|
|
186
|
+
}), v(g), on(g) && g.onMount) {
|
|
187
187
|
const T = g.onMount((...I) => L(g, ...I));
|
|
188
188
|
T && (F.u = T);
|
|
189
189
|
}
|
|
@@ -193,7 +193,7 @@ const an = (e) => "init" in e, sn = (e) => !!e.write, Dt = /* @__PURE__ */ new W
|
|
|
193
193
|
const F = (k = t.get(g)) == null ? void 0 : k.u;
|
|
194
194
|
F && F(), t.delete(g), ({ NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 } && "production") !== "production" && r.delete(g);
|
|
195
195
|
const T = a(g);
|
|
196
|
-
T ? (
|
|
196
|
+
T ? (sn(T) && zn(T.v), T.d.forEach((I, V) => {
|
|
197
197
|
if (V !== g) {
|
|
198
198
|
const B = t.get(V);
|
|
199
199
|
B && (B.t.delete(g), R(V, B) && P(V));
|
|
@@ -222,7 +222,7 @@ const an = (e) => "init" in e, sn = (e) => !!e.write, Dt = /* @__PURE__ */ new W
|
|
|
222
222
|
const I = t.get(k);
|
|
223
223
|
I && !// TODO This seems pretty hacky. Hope to fix it.
|
|
224
224
|
// Maybe we could `mountDependencies` in `setAtomState`?
|
|
225
|
-
(F && !
|
|
225
|
+
(F && !sn(F) && (Ft(F, T) || Wn(F, T))) && I.l.forEach((V) => V());
|
|
226
226
|
} else
|
|
227
227
|
({ NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 } && "production") !== "production" && console.warn("[Bug] no atom state to flush");
|
|
228
228
|
});
|
|
@@ -259,10 +259,10 @@ const an = (e) => "init" in e, sn = (e) => !!e.write, Dt = /* @__PURE__ */ new W
|
|
|
259
259
|
};
|
|
260
260
|
};
|
|
261
261
|
let un;
|
|
262
|
-
const pa = () => (un || (un =
|
|
262
|
+
const pa = () => (un || (un = Li()), un), ga = Ti(void 0), xi = (e) => {
|
|
263
263
|
const t = wn(ga);
|
|
264
264
|
return (e == null ? void 0 : e.store) || t || pa();
|
|
265
|
-
}, ka = (e) => e instanceof Promise, ya =
|
|
265
|
+
}, ka = (e) => e instanceof Promise, ya = Ri.use || ((e) => {
|
|
266
266
|
if (e.status === "pending")
|
|
267
267
|
throw e;
|
|
268
268
|
if (e.status === "fulfilled")
|
|
@@ -277,7 +277,7 @@ const pa = () => (un || (un = Ri()), un), ga = Ci(void 0), Ti = (e) => {
|
|
|
277
277
|
), e);
|
|
278
278
|
});
|
|
279
279
|
function _a(e, t) {
|
|
280
|
-
const i =
|
|
280
|
+
const i = xi(t), [[n, r, a], o] = sa(
|
|
281
281
|
(c) => {
|
|
282
282
|
const f = i.get(e);
|
|
283
283
|
return Object.is(c[0], f) && c[1] === i && c[2] === e ? c : [f, i, e];
|
|
@@ -285,22 +285,22 @@ function _a(e, t) {
|
|
|
285
285
|
void 0,
|
|
286
286
|
() => [i.get(e), i, e]
|
|
287
287
|
);
|
|
288
|
-
let
|
|
289
|
-
(r !== i || a !== e) && (
|
|
288
|
+
let s = n;
|
|
289
|
+
(r !== i || a !== e) && (o(), s = i.get(e));
|
|
290
290
|
const l = t == null ? void 0 : t.delay;
|
|
291
291
|
return vt(() => {
|
|
292
292
|
const c = i.sub(e, () => {
|
|
293
293
|
if (typeof l == "number") {
|
|
294
|
-
setTimeout(
|
|
294
|
+
setTimeout(o, l);
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
|
-
|
|
297
|
+
o();
|
|
298
298
|
});
|
|
299
|
-
return
|
|
300
|
-
}, [i, e, l]), ua(
|
|
299
|
+
return o(), c;
|
|
300
|
+
}, [i, e, l]), ua(s), ka(s) ? ya(s) : s;
|
|
301
301
|
}
|
|
302
302
|
function ba(e, t) {
|
|
303
|
-
const i =
|
|
303
|
+
const i = xi(t);
|
|
304
304
|
return la(
|
|
305
305
|
(...r) => {
|
|
306
306
|
if (({ NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 } && "production") !== "production" && !("write" in e))
|
|
@@ -317,7 +317,9 @@ function Sa(e, t) {
|
|
|
317
317
|
ba(e, t)
|
|
318
318
|
];
|
|
319
319
|
}
|
|
320
|
-
const
|
|
320
|
+
const En = ma(null);
|
|
321
|
+
En.debugLabel = "accountAtom";
|
|
322
|
+
const {
|
|
321
323
|
NZ_AWS_REGION: Na,
|
|
322
324
|
NZ_BACKOFFICE_BACK_URL: Oa,
|
|
323
325
|
NZ_CORE_SERVICES_GRAPHQL_URL: wa,
|
|
@@ -348,15 +350,15 @@ const Li = ma(null), {
|
|
|
348
350
|
wssIVSChat: "wss://edge.ivschat.us-east-1.amazonaws.com"
|
|
349
351
|
}
|
|
350
352
|
};
|
|
351
|
-
async function
|
|
353
|
+
async function Pi(e) {
|
|
352
354
|
const {
|
|
353
355
|
url: t,
|
|
354
356
|
method: i = "GET",
|
|
355
357
|
body: n,
|
|
356
358
|
raw: r = !1,
|
|
357
359
|
contentTypeJson: a = !0,
|
|
358
|
-
timeout:
|
|
359
|
-
...
|
|
360
|
+
timeout: o,
|
|
361
|
+
...s
|
|
360
362
|
} = e, l = a && !e.headers ? new Headers({
|
|
361
363
|
"content-type": "application/json"
|
|
362
364
|
}) : e.headers;
|
|
@@ -368,11 +370,11 @@ async function xi(e) {
|
|
|
368
370
|
headers: l,
|
|
369
371
|
body: n,
|
|
370
372
|
signal: f,
|
|
371
|
-
...
|
|
373
|
+
...s
|
|
372
374
|
});
|
|
373
|
-
|
|
375
|
+
o && (v = setTimeout(() => {
|
|
374
376
|
c.abort();
|
|
375
|
-
},
|
|
377
|
+
}, o));
|
|
376
378
|
const A = await O;
|
|
377
379
|
if (r)
|
|
378
380
|
return A;
|
|
@@ -386,7 +388,7 @@ async function xi(e) {
|
|
|
386
388
|
throw console.error("[CustomFetch] ", c), c;
|
|
387
389
|
}
|
|
388
390
|
}
|
|
389
|
-
const ec = (e) =>
|
|
391
|
+
const ec = (e) => Pi({ ...e, contentTypeJson: !1, raw: !1 });
|
|
390
392
|
function tc(e, t, i) {
|
|
391
393
|
fetch(t).then((n) => n.blob()).then((n) => Fa(n, `${e}.${i}`));
|
|
392
394
|
}
|
|
@@ -396,9 +398,9 @@ const Fa = (e, t, i) => {
|
|
|
396
398
|
});
|
|
397
399
|
if (typeof window.navigator.msSaveBlob != "undefined")
|
|
398
400
|
return window.navigator.msSaveBlob(r, t);
|
|
399
|
-
const a = window.URL && window.URL.createObjectURL ? window.URL.createObjectURL(r) : window.webkitURL.createObjectURL(r),
|
|
400
|
-
return
|
|
401
|
-
document.body.removeChild(
|
|
401
|
+
const a = window.URL && window.URL.createObjectURL ? window.URL.createObjectURL(r) : window.webkitURL.createObjectURL(r), o = document.createElement("a");
|
|
402
|
+
return o.style.display = "none", o.href = a, o.setAttribute("download", t), typeof o.download == "undefined" && o.setAttribute("target", "_blank"), document.body.appendChild(o), o.click(), setTimeout(() => {
|
|
403
|
+
document.body.removeChild(o), window.URL.revokeObjectURL(a);
|
|
402
404
|
}, 200);
|
|
403
405
|
};
|
|
404
406
|
let Ca = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, i) => (i &= 63, i < 36 ? t += i.toString(36) : i < 62 ? t += (i - 26).toString(36).toUpperCase() : i > 62 ? t += "-" : t += "_", t), "");
|
|
@@ -411,15 +413,15 @@ function ic() {
|
|
|
411
413
|
`);
|
|
412
414
|
return e.length < 3 ? "" : e[2].trim().substring(3);
|
|
413
415
|
}
|
|
414
|
-
var
|
|
415
|
-
function
|
|
416
|
+
var Di = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
|
|
417
|
+
function Ii(e) {
|
|
416
418
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
417
419
|
}
|
|
418
|
-
var
|
|
420
|
+
var Vi = { exports: {} };
|
|
419
421
|
(function(e) {
|
|
420
422
|
(function(t, i) {
|
|
421
423
|
e.exports ? e.exports = i() : t.prefix = i(t);
|
|
422
|
-
})(
|
|
424
|
+
})(Di, function(t) {
|
|
423
425
|
var i = function(f) {
|
|
424
426
|
for (var v = 1, O = arguments.length, A; v < O; v++)
|
|
425
427
|
for (A in arguments[v])
|
|
@@ -437,11 +439,11 @@ var Ii = { exports: {} };
|
|
|
437
439
|
return f.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1");
|
|
438
440
|
},
|
|
439
441
|
format: void 0
|
|
440
|
-
}, r, a = {},
|
|
442
|
+
}, r, a = {}, o = function(f) {
|
|
441
443
|
if (!f || !f.getLogger)
|
|
442
444
|
throw new TypeError("Argument is not a root logger");
|
|
443
445
|
r = f;
|
|
444
|
-
},
|
|
446
|
+
}, s = function(f, v) {
|
|
445
447
|
if (!f || !f.setLevel)
|
|
446
448
|
throw new TypeError("Argument is not a logger");
|
|
447
449
|
var O = f.methodFactory, A = f.name || "", R = a[A] || a[""] || n;
|
|
@@ -461,21 +463,21 @@ var Ii = { exports: {} };
|
|
|
461
463
|
"It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"
|
|
462
464
|
), f;
|
|
463
465
|
}, l = {
|
|
464
|
-
reg:
|
|
465
|
-
apply:
|
|
466
|
+
reg: o,
|
|
467
|
+
apply: s
|
|
466
468
|
}, c;
|
|
467
469
|
return t && (c = t.prefix, l.noConflict = function() {
|
|
468
470
|
return t.prefix === l && (t.prefix = c), l;
|
|
469
471
|
}), l;
|
|
470
472
|
});
|
|
471
|
-
})(
|
|
472
|
-
var Ta =
|
|
473
|
-
const
|
|
474
|
-
var
|
|
473
|
+
})(Vi);
|
|
474
|
+
var Ta = Vi.exports;
|
|
475
|
+
const ji = /* @__PURE__ */ Ii(Ta);
|
|
476
|
+
var Ui = { exports: {} };
|
|
475
477
|
(function(e) {
|
|
476
478
|
(function(t, i) {
|
|
477
479
|
e.exports ? e.exports = i() : t.log = i();
|
|
478
|
-
})(
|
|
480
|
+
})(Di, function() {
|
|
479
481
|
var t = function() {
|
|
480
482
|
}, i = "undefined", n = typeof window !== i && typeof window.navigator !== i && /Trident\/|MSIE /.test(window.navigator.userAgent), r = [
|
|
481
483
|
"trace",
|
|
@@ -496,11 +498,11 @@ var ji = { exports: {} };
|
|
|
496
498
|
};
|
|
497
499
|
}
|
|
498
500
|
}
|
|
499
|
-
function
|
|
501
|
+
function o() {
|
|
500
502
|
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
501
503
|
}
|
|
502
|
-
function
|
|
503
|
-
return b === "debug" && (b = "log"), typeof console === i ? !1 : b === "trace" && n ?
|
|
504
|
+
function s(b) {
|
|
505
|
+
return b === "debug" && (b = "log"), typeof console === i ? !1 : b === "trace" && n ? o : console[b] !== void 0 ? a(console, b) : console.log !== void 0 ? a(console, "log") : t;
|
|
504
506
|
}
|
|
505
507
|
function l(b, _) {
|
|
506
508
|
for (var C = 0; C < r.length; C++) {
|
|
@@ -515,7 +517,7 @@ var ji = { exports: {} };
|
|
|
515
517
|
};
|
|
516
518
|
}
|
|
517
519
|
function f(b, _, C) {
|
|
518
|
-
return
|
|
520
|
+
return s(b) || c.apply(this, arguments);
|
|
519
521
|
}
|
|
520
522
|
function v(b, _, C) {
|
|
521
523
|
var L = this, U;
|
|
@@ -612,27 +614,27 @@ var ji = { exports: {} };
|
|
|
612
614
|
return A;
|
|
613
615
|
}, O.default = O, O;
|
|
614
616
|
});
|
|
615
|
-
})(
|
|
616
|
-
var La =
|
|
617
|
-
const xa = /* @__PURE__ */
|
|
617
|
+
})(Ui);
|
|
618
|
+
var La = Ui.exports;
|
|
619
|
+
const xa = /* @__PURE__ */ Ii(La);
|
|
618
620
|
function W(e) {
|
|
619
621
|
for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
|
|
620
622
|
i[n - 1] = arguments[n];
|
|
621
623
|
throw new Error(typeof e == "number" ? "[MobX] minified error nr: " + e + (i.length ? " " + i.map(String).join(",") : "") + ". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts" : "[MobX] " + e);
|
|
622
624
|
}
|
|
623
625
|
var Pa = {};
|
|
624
|
-
function
|
|
626
|
+
function Mi() {
|
|
625
627
|
return typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : Pa;
|
|
626
628
|
}
|
|
627
|
-
var
|
|
629
|
+
var Bi = Object.assign, It = Object.getOwnPropertyDescriptor, ve = Object.defineProperty, Wt = Object.prototype, pn = [];
|
|
628
630
|
Object.freeze(pn);
|
|
629
|
-
var
|
|
630
|
-
Object.freeze(
|
|
631
|
+
var An = {};
|
|
632
|
+
Object.freeze(An);
|
|
631
633
|
var Da = typeof Proxy != "undefined", Ia = /* @__PURE__ */ Object.toString();
|
|
632
|
-
function
|
|
634
|
+
function Gi() {
|
|
633
635
|
Da || W("Proxy not available");
|
|
634
636
|
}
|
|
635
|
-
function
|
|
637
|
+
function zi(e) {
|
|
636
638
|
var t = !1;
|
|
637
639
|
return function() {
|
|
638
640
|
if (!t)
|
|
@@ -666,7 +668,7 @@ function Se(e) {
|
|
|
666
668
|
var i = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
667
669
|
return typeof i == "function" && i.toString() === Ia;
|
|
668
670
|
}
|
|
669
|
-
function
|
|
671
|
+
function Ki(e) {
|
|
670
672
|
var t = e == null ? void 0 : e.constructor;
|
|
671
673
|
return t ? t.name === "GeneratorFunction" || t.displayName === "GeneratorFunction" : !1;
|
|
672
674
|
}
|
|
@@ -678,7 +680,7 @@ function pt(e, t, i) {
|
|
|
678
680
|
value: i
|
|
679
681
|
});
|
|
680
682
|
}
|
|
681
|
-
function
|
|
683
|
+
function $i(e, t, i) {
|
|
682
684
|
ve(e, t, {
|
|
683
685
|
enumerable: !1,
|
|
684
686
|
writable: !1,
|
|
@@ -698,23 +700,23 @@ function Ze(e) {
|
|
|
698
700
|
function gt(e) {
|
|
699
701
|
return e instanceof Set;
|
|
700
702
|
}
|
|
701
|
-
var
|
|
703
|
+
var Wi = typeof Object.getOwnPropertySymbols != "undefined";
|
|
702
704
|
function Va(e) {
|
|
703
705
|
var t = Object.keys(e);
|
|
704
|
-
if (
|
|
706
|
+
if (!Wi)
|
|
705
707
|
return t;
|
|
706
708
|
var i = Object.getOwnPropertySymbols(e);
|
|
707
709
|
return i.length ? [].concat(t, i.filter(function(n) {
|
|
708
710
|
return Wt.propertyIsEnumerable.call(e, n);
|
|
709
711
|
})) : t;
|
|
710
712
|
}
|
|
711
|
-
var Ke = typeof Reflect != "undefined" && Reflect.ownKeys ? Reflect.ownKeys :
|
|
713
|
+
var Ke = typeof Reflect != "undefined" && Reflect.ownKeys ? Reflect.ownKeys : Wi ? function(e) {
|
|
712
714
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
713
715
|
} : (
|
|
714
716
|
/* istanbul ignore next */
|
|
715
717
|
Object.getOwnPropertyNames
|
|
716
718
|
);
|
|
717
|
-
function
|
|
719
|
+
function Qi(e) {
|
|
718
720
|
return e === null ? null : typeof e == "object" ? "" + e : e;
|
|
719
721
|
}
|
|
720
722
|
function be(e, t) {
|
|
@@ -726,14 +728,14 @@ var ja = Object.getOwnPropertyDescriptors || function(t) {
|
|
|
726
728
|
i[n] = It(t, n);
|
|
727
729
|
}), i;
|
|
728
730
|
};
|
|
729
|
-
function
|
|
731
|
+
function Qn(e, t) {
|
|
730
732
|
for (var i = 0; i < t.length; i++) {
|
|
731
733
|
var n = t[i];
|
|
732
734
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, Ba(n.key), n);
|
|
733
735
|
}
|
|
734
736
|
}
|
|
735
|
-
function
|
|
736
|
-
return t &&
|
|
737
|
+
function Fn(e, t, i) {
|
|
738
|
+
return t && Qn(e.prototype, t), i && Qn(e, i), Object.defineProperty(e, "prototype", {
|
|
737
739
|
writable: !1
|
|
738
740
|
}), e;
|
|
739
741
|
}
|
|
@@ -747,7 +749,7 @@ function $e() {
|
|
|
747
749
|
return e;
|
|
748
750
|
}, $e.apply(this, arguments);
|
|
749
751
|
}
|
|
750
|
-
function
|
|
752
|
+
function qi(e, t) {
|
|
751
753
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, gn(e, t);
|
|
752
754
|
}
|
|
753
755
|
function gn(e, t) {
|
|
@@ -763,15 +765,15 @@ function ln(e) {
|
|
|
763
765
|
function Ua(e, t) {
|
|
764
766
|
if (e) {
|
|
765
767
|
if (typeof e == "string")
|
|
766
|
-
return
|
|
768
|
+
return qn(e, t);
|
|
767
769
|
var i = Object.prototype.toString.call(e).slice(8, -1);
|
|
768
770
|
if (i === "Object" && e.constructor && (i = e.constructor.name), i === "Map" || i === "Set")
|
|
769
771
|
return Array.from(e);
|
|
770
772
|
if (i === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))
|
|
771
|
-
return
|
|
773
|
+
return qn(e, t);
|
|
772
774
|
}
|
|
773
775
|
}
|
|
774
|
-
function
|
|
776
|
+
function qn(e, t) {
|
|
775
777
|
(t == null || t > e.length) && (t = e.length);
|
|
776
778
|
for (var i = 0, n = new Array(t); i < t; i++)
|
|
777
779
|
n[i] = e[i];
|
|
@@ -839,26 +841,26 @@ var M = /* @__PURE__ */ Symbol("mobx administration"), yt = /* @__PURE__ */ func
|
|
|
839
841
|
return n();
|
|
840
842
|
});
|
|
841
843
|
}, t.reportObserved = function() {
|
|
842
|
-
return
|
|
844
|
+
return mr(this);
|
|
843
845
|
}, t.reportChanged = function() {
|
|
844
|
-
ae(),
|
|
846
|
+
ae(), vr(this), x.stateVersion = x.stateVersion < Number.MAX_SAFE_INTEGER ? x.stateVersion + 1 : Number.MIN_SAFE_INTEGER, oe();
|
|
845
847
|
}, t.toString = function() {
|
|
846
848
|
return this.name_;
|
|
847
849
|
}, e;
|
|
848
|
-
}(),
|
|
849
|
-
function
|
|
850
|
+
}(), Cn = /* @__PURE__ */ Ve("Atom", yt);
|
|
851
|
+
function Ji(e, t, i) {
|
|
850
852
|
t === void 0 && (t = Be), i === void 0 && (i = Be);
|
|
851
853
|
var n = new yt(e);
|
|
852
|
-
return t !== Be &&
|
|
854
|
+
return t !== Be && Jo(n, t), i !== Be && Nr(n, i), n;
|
|
853
855
|
}
|
|
854
856
|
function za(e, t) {
|
|
855
857
|
return e === t;
|
|
856
858
|
}
|
|
857
859
|
function Ka(e, t) {
|
|
858
|
-
return
|
|
860
|
+
return In(e, t);
|
|
859
861
|
}
|
|
860
862
|
function $a(e, t) {
|
|
861
|
-
return
|
|
863
|
+
return In(e, t, 1);
|
|
862
864
|
}
|
|
863
865
|
function Wa(e, t) {
|
|
864
866
|
return Object.is ? Object.is(e, t) : e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
|
|
@@ -878,7 +880,7 @@ function Qe(e, t, i) {
|
|
|
878
880
|
name: i
|
|
879
881
|
}) : gt(e) ? ne.set(e, {
|
|
880
882
|
name: i
|
|
881
|
-
}) : typeof e == "function" && !
|
|
883
|
+
}) : typeof e == "function" && !Ln(e) && !Bt(e) ? Ki(e) ? ct(e) : lt(i, e) : e;
|
|
882
884
|
}
|
|
883
885
|
function Qa(e, t, i) {
|
|
884
886
|
if (e == null || dt(e) || Zt(e) || je(e) || Ye(e))
|
|
@@ -908,7 +910,7 @@ function qt(e) {
|
|
|
908
910
|
return e;
|
|
909
911
|
}
|
|
910
912
|
function qa(e, t) {
|
|
911
|
-
return
|
|
913
|
+
return In(e, t) ? t : e;
|
|
912
914
|
}
|
|
913
915
|
var Ja = "override";
|
|
914
916
|
function Ha(e) {
|
|
@@ -928,20 +930,20 @@ function Za(e, t, i, n) {
|
|
|
928
930
|
return this.extend_(e, t, i, !1) === null ? 0 : 1;
|
|
929
931
|
if (n === e.target_)
|
|
930
932
|
return this.extend_(e, t, i, !1) === null ? 0 : 2;
|
|
931
|
-
if (
|
|
933
|
+
if (Ln(i.value))
|
|
932
934
|
return 1;
|
|
933
|
-
var a =
|
|
935
|
+
var a = Hi(e, this, t, i, !1);
|
|
934
936
|
return ve(n, t, a), 2;
|
|
935
937
|
}
|
|
936
938
|
function Xa(e, t, i, n) {
|
|
937
|
-
var r =
|
|
939
|
+
var r = Hi(e, this, t, i);
|
|
938
940
|
return e.defineProperty_(t, r, n);
|
|
939
941
|
}
|
|
940
942
|
function Ya(e, t, i, n) {
|
|
941
943
|
t.annotationType_, n.value;
|
|
942
944
|
}
|
|
943
|
-
function
|
|
944
|
-
var a,
|
|
945
|
+
function Hi(e, t, i, n, r) {
|
|
946
|
+
var a, o, s, l, c, f, v;
|
|
945
947
|
r === void 0 && (r = x.safeDescriptors), Ya(e, t, i, n);
|
|
946
948
|
var O = n.value;
|
|
947
949
|
if ((a = t.options_) != null && a.bound) {
|
|
@@ -950,7 +952,7 @@ function Ji(e, t, i, n, r) {
|
|
|
950
952
|
}
|
|
951
953
|
return {
|
|
952
954
|
value: qe(
|
|
953
|
-
(
|
|
955
|
+
(o = (s = t.options_) == null ? void 0 : s.name) != null ? o : i.toString(),
|
|
954
956
|
O,
|
|
955
957
|
(l = (c = t.options_) == null ? void 0 : c.autoAction) != null ? l : !1,
|
|
956
958
|
// https://github.com/mobxjs/mobx/discussions/3140
|
|
@@ -966,15 +968,15 @@ function Ji(e, t, i, n, r) {
|
|
|
966
968
|
writable: !r
|
|
967
969
|
};
|
|
968
970
|
}
|
|
969
|
-
function
|
|
971
|
+
function Zi(e, t) {
|
|
970
972
|
return {
|
|
971
973
|
annotationType_: e,
|
|
972
974
|
options_: t,
|
|
973
|
-
make_:
|
|
974
|
-
extend_:
|
|
975
|
+
make_: eo,
|
|
976
|
+
extend_: to
|
|
975
977
|
};
|
|
976
978
|
}
|
|
977
|
-
function
|
|
979
|
+
function eo(e, t, i, n) {
|
|
978
980
|
var r;
|
|
979
981
|
if (n === e.target_)
|
|
980
982
|
return this.extend_(e, t, i, !1) === null ? 0 : 2;
|
|
@@ -982,25 +984,25 @@ function es(e, t, i, n) {
|
|
|
982
984
|
return 0;
|
|
983
985
|
if (Bt(i.value))
|
|
984
986
|
return 1;
|
|
985
|
-
var a =
|
|
987
|
+
var a = Xi(e, this, t, i, !1, !1);
|
|
986
988
|
return ve(n, t, a), 2;
|
|
987
989
|
}
|
|
988
|
-
function
|
|
989
|
-
var r, a =
|
|
990
|
+
function to(e, t, i, n) {
|
|
991
|
+
var r, a = Xi(e, this, t, i, (r = this.options_) == null ? void 0 : r.bound);
|
|
990
992
|
return e.defineProperty_(t, a, n);
|
|
991
993
|
}
|
|
992
|
-
function
|
|
994
|
+
function no(e, t, i, n) {
|
|
993
995
|
t.annotationType_, n.value;
|
|
994
996
|
}
|
|
995
|
-
function
|
|
996
|
-
a === void 0 && (a = x.safeDescriptors),
|
|
997
|
-
var
|
|
998
|
-
if (Bt(
|
|
999
|
-
var
|
|
1000
|
-
|
|
997
|
+
function Xi(e, t, i, n, r, a) {
|
|
998
|
+
a === void 0 && (a = x.safeDescriptors), no(e, t, i, n);
|
|
999
|
+
var o = n.value;
|
|
1000
|
+
if (Bt(o) || (o = ct(o)), r) {
|
|
1001
|
+
var s;
|
|
1002
|
+
o = o.bind((s = e.proxy_) != null ? s : e.target_), o.isMobXFlow = !0;
|
|
1001
1003
|
}
|
|
1002
1004
|
return {
|
|
1003
|
-
value:
|
|
1005
|
+
value: o,
|
|
1004
1006
|
// Non-configurable for classes
|
|
1005
1007
|
// prevents accidental field redefinition in subclass
|
|
1006
1008
|
configurable: a ? e.isPlainObject_ : !0,
|
|
@@ -1011,74 +1013,74 @@ function Zi(e, t, i, n, r, a) {
|
|
|
1011
1013
|
writable: !a
|
|
1012
1014
|
};
|
|
1013
1015
|
}
|
|
1014
|
-
function
|
|
1016
|
+
function Rn(e, t) {
|
|
1015
1017
|
return {
|
|
1016
1018
|
annotationType_: e,
|
|
1017
1019
|
options_: t,
|
|
1018
|
-
make_:
|
|
1019
|
-
extend_:
|
|
1020
|
+
make_: io,
|
|
1021
|
+
extend_: ro
|
|
1020
1022
|
};
|
|
1021
1023
|
}
|
|
1022
|
-
function
|
|
1024
|
+
function io(e, t, i) {
|
|
1023
1025
|
return this.extend_(e, t, i, !1) === null ? 0 : 1;
|
|
1024
1026
|
}
|
|
1025
|
-
function
|
|
1026
|
-
return
|
|
1027
|
+
function ro(e, t, i, n) {
|
|
1028
|
+
return ao(e, this, t, i), e.defineComputedProperty_(t, $e({}, this.options_, {
|
|
1027
1029
|
get: i.get,
|
|
1028
1030
|
set: i.set
|
|
1029
1031
|
}), n);
|
|
1030
1032
|
}
|
|
1031
|
-
function
|
|
1033
|
+
function ao(e, t, i, n) {
|
|
1032
1034
|
t.annotationType_, n.get;
|
|
1033
1035
|
}
|
|
1034
1036
|
function Jt(e, t) {
|
|
1035
1037
|
return {
|
|
1036
1038
|
annotationType_: e,
|
|
1037
1039
|
options_: t,
|
|
1038
|
-
make_:
|
|
1039
|
-
extend_:
|
|
1040
|
+
make_: oo,
|
|
1041
|
+
extend_: so
|
|
1040
1042
|
};
|
|
1041
1043
|
}
|
|
1042
|
-
function
|
|
1044
|
+
function oo(e, t, i) {
|
|
1043
1045
|
return this.extend_(e, t, i, !1) === null ? 0 : 1;
|
|
1044
1046
|
}
|
|
1045
|
-
function
|
|
1047
|
+
function so(e, t, i, n) {
|
|
1046
1048
|
var r, a;
|
|
1047
|
-
return
|
|
1049
|
+
return uo(e, this), e.defineObservableProperty_(t, i.value, (r = (a = this.options_) == null ? void 0 : a.enhancer) != null ? r : Qe, n);
|
|
1048
1050
|
}
|
|
1049
|
-
function
|
|
1051
|
+
function uo(e, t, i, n) {
|
|
1050
1052
|
t.annotationType_;
|
|
1051
1053
|
}
|
|
1052
|
-
var
|
|
1053
|
-
function
|
|
1054
|
+
var lo = "true", co = /* @__PURE__ */ Yi();
|
|
1055
|
+
function Yi(e) {
|
|
1054
1056
|
return {
|
|
1055
|
-
annotationType_:
|
|
1057
|
+
annotationType_: lo,
|
|
1056
1058
|
options_: e,
|
|
1057
|
-
make_:
|
|
1058
|
-
extend_:
|
|
1059
|
+
make_: fo,
|
|
1060
|
+
extend_: ho
|
|
1059
1061
|
};
|
|
1060
1062
|
}
|
|
1061
|
-
function
|
|
1063
|
+
function fo(e, t, i, n) {
|
|
1062
1064
|
var r, a;
|
|
1063
1065
|
if (i.get)
|
|
1064
1066
|
return Ae.make_(e, t, i, n);
|
|
1065
1067
|
if (i.set) {
|
|
1066
|
-
var
|
|
1068
|
+
var o = qe(t.toString(), i.set);
|
|
1067
1069
|
return n === e.target_ ? e.defineProperty_(t, {
|
|
1068
1070
|
configurable: x.safeDescriptors ? e.isPlainObject_ : !0,
|
|
1069
|
-
set:
|
|
1071
|
+
set: o
|
|
1070
1072
|
}) === null ? 0 : 2 : (ve(n, t, {
|
|
1071
1073
|
configurable: !0,
|
|
1072
|
-
set:
|
|
1074
|
+
set: o
|
|
1073
1075
|
}), 2);
|
|
1074
1076
|
}
|
|
1075
1077
|
if (n !== e.target_ && typeof i.value == "function") {
|
|
1076
|
-
var
|
|
1077
|
-
if (
|
|
1078
|
+
var s;
|
|
1079
|
+
if (Ki(i.value)) {
|
|
1078
1080
|
var l, c = (l = this.options_) != null && l.autoBind ? ct.bound : ct;
|
|
1079
1081
|
return c.make_(e, t, i, n);
|
|
1080
1082
|
}
|
|
1081
|
-
var f = (
|
|
1083
|
+
var f = (s = this.options_) != null && s.autoBind ? lt.bound : lt;
|
|
1082
1084
|
return f.make_(e, t, i, n);
|
|
1083
1085
|
}
|
|
1084
1086
|
var v = ((r = this.options_) == null ? void 0 : r.deep) === !1 ? ne.ref : ne;
|
|
@@ -1088,7 +1090,7 @@ function ds(e, t, i, n) {
|
|
|
1088
1090
|
}
|
|
1089
1091
|
return v.make_(e, t, i, n);
|
|
1090
1092
|
}
|
|
1091
|
-
function
|
|
1093
|
+
function ho(e, t, i, n) {
|
|
1092
1094
|
var r, a;
|
|
1093
1095
|
if (i.get)
|
|
1094
1096
|
return Ae.extend_(e, t, i, n);
|
|
@@ -1098,86 +1100,86 @@ function fs(e, t, i, n) {
|
|
|
1098
1100
|
set: qe(t.toString(), i.set)
|
|
1099
1101
|
}, n);
|
|
1100
1102
|
if (typeof i.value == "function" && (r = this.options_) != null && r.autoBind) {
|
|
1101
|
-
var
|
|
1102
|
-
i.value = i.value.bind((
|
|
1103
|
+
var o;
|
|
1104
|
+
i.value = i.value.bind((o = e.proxy_) != null ? o : e.target_);
|
|
1103
1105
|
}
|
|
1104
|
-
var
|
|
1105
|
-
return
|
|
1106
|
+
var s = ((a = this.options_) == null ? void 0 : a.deep) === !1 ? ne.ref : ne;
|
|
1107
|
+
return s.extend_(e, t, i, n);
|
|
1106
1108
|
}
|
|
1107
|
-
var
|
|
1109
|
+
var mo = "observable", vo = "observable.ref", po = "observable.shallow", go = "observable.struct", er = {
|
|
1108
1110
|
deep: !0,
|
|
1109
1111
|
name: void 0,
|
|
1110
1112
|
defaultDecorator: void 0,
|
|
1111
1113
|
proxy: !0
|
|
1112
1114
|
};
|
|
1113
|
-
Object.freeze(
|
|
1115
|
+
Object.freeze(er);
|
|
1114
1116
|
function Rt(e) {
|
|
1115
|
-
return e ||
|
|
1117
|
+
return e || er;
|
|
1116
1118
|
}
|
|
1117
|
-
var
|
|
1119
|
+
var tr = /* @__PURE__ */ Jt(mo), ko = /* @__PURE__ */ Jt(vo, {
|
|
1118
1120
|
enhancer: qt
|
|
1119
|
-
}),
|
|
1121
|
+
}), yo = /* @__PURE__ */ Jt(po, {
|
|
1120
1122
|
enhancer: Qa
|
|
1121
|
-
}),
|
|
1123
|
+
}), _o = /* @__PURE__ */ Jt(go, {
|
|
1122
1124
|
enhancer: qa
|
|
1123
|
-
}),
|
|
1125
|
+
}), nr = /* @__PURE__ */ pe(tr);
|
|
1124
1126
|
function Tt(e) {
|
|
1125
|
-
return e.deep === !0 ? Qe : e.deep === !1 ? qt :
|
|
1127
|
+
return e.deep === !0 ? Qe : e.deep === !1 ? qt : So(e.defaultDecorator);
|
|
1126
1128
|
}
|
|
1127
|
-
function
|
|
1129
|
+
function bo(e) {
|
|
1128
1130
|
var t;
|
|
1129
|
-
return e ? (t = e.defaultDecorator) != null ? t :
|
|
1131
|
+
return e ? (t = e.defaultDecorator) != null ? t : Yi(e) : void 0;
|
|
1130
1132
|
}
|
|
1131
|
-
function
|
|
1133
|
+
function So(e) {
|
|
1132
1134
|
var t, i;
|
|
1133
1135
|
return e && (t = (i = e.options_) == null ? void 0 : i.enhancer) != null ? t : Qe;
|
|
1134
1136
|
}
|
|
1135
|
-
function
|
|
1137
|
+
function ir(e, t, i) {
|
|
1136
1138
|
if (Pe(t)) {
|
|
1137
|
-
kt(e, t,
|
|
1139
|
+
kt(e, t, tr);
|
|
1138
1140
|
return;
|
|
1139
1141
|
}
|
|
1140
1142
|
return Nt(e) ? e : Se(e) ? ne.object(e, t, i) : Array.isArray(e) ? ne.array(e, t) : Ze(e) ? ne.map(e, t) : gt(e) ? ne.set(e, t) : typeof e == "object" && e !== null ? e : ne.box(e, t);
|
|
1141
1143
|
}
|
|
1142
|
-
|
|
1143
|
-
var
|
|
1144
|
+
Bi(ir, nr);
|
|
1145
|
+
var No = {
|
|
1144
1146
|
box: function(t, i) {
|
|
1145
1147
|
var n = Rt(i);
|
|
1146
1148
|
return new ze(t, Tt(n), n.name, !0, n.equals);
|
|
1147
1149
|
},
|
|
1148
1150
|
array: function(t, i) {
|
|
1149
1151
|
var n = Rt(i);
|
|
1150
|
-
return (x.useProxies === !1 || n.proxy === !1 ?
|
|
1152
|
+
return (x.useProxies === !1 || n.proxy === !1 ? ps : ss)(t, Tt(n), n.name);
|
|
1151
1153
|
},
|
|
1152
1154
|
map: function(t, i) {
|
|
1153
1155
|
var n = Rt(i);
|
|
1154
|
-
return new
|
|
1156
|
+
return new Rr(t, Tt(n), n.name);
|
|
1155
1157
|
},
|
|
1156
1158
|
set: function(t, i) {
|
|
1157
1159
|
var n = Rt(i);
|
|
1158
|
-
return new
|
|
1160
|
+
return new xr(t, Tt(n), n.name);
|
|
1159
1161
|
},
|
|
1160
1162
|
object: function(t, i, n) {
|
|
1161
|
-
return
|
|
1163
|
+
return wr(x.useProxies === !1 || (n == null ? void 0 : n.proxy) === !1 ? Et({}, n) : ns({}, n), t, i);
|
|
1162
1164
|
},
|
|
1163
|
-
ref: /* @__PURE__ */ pe(
|
|
1164
|
-
shallow: /* @__PURE__ */ pe(
|
|
1165
|
-
deep:
|
|
1166
|
-
struct: /* @__PURE__ */ pe(
|
|
1167
|
-
}, ne = /* @__PURE__ */
|
|
1165
|
+
ref: /* @__PURE__ */ pe(ko),
|
|
1166
|
+
shallow: /* @__PURE__ */ pe(yo),
|
|
1167
|
+
deep: nr,
|
|
1168
|
+
struct: /* @__PURE__ */ pe(_o)
|
|
1169
|
+
}, ne = /* @__PURE__ */ Bi(ir, No), rr = "computed", Oo = "computed.struct", ar = /* @__PURE__ */ Rn(rr), wo = /* @__PURE__ */ Rn(Oo, {
|
|
1168
1170
|
equals: We.structural
|
|
1169
1171
|
}), Ae = function(t, i) {
|
|
1170
1172
|
if (Pe(i))
|
|
1171
|
-
return kt(t, i,
|
|
1173
|
+
return kt(t, i, ar);
|
|
1172
1174
|
if (Se(t))
|
|
1173
|
-
return pe(
|
|
1175
|
+
return pe(Rn(rr, t));
|
|
1174
1176
|
var n = Se(i) ? i : {};
|
|
1175
1177
|
return n.get = t, n.name || (n.name = t.name || ""), new ut(n);
|
|
1176
1178
|
};
|
|
1177
|
-
Object.assign(Ae,
|
|
1178
|
-
Ae.struct = /* @__PURE__ */ pe(
|
|
1179
|
-
var
|
|
1180
|
-
}, "name")) == null ? void 0 :
|
|
1179
|
+
Object.assign(Ae, ar);
|
|
1180
|
+
Ae.struct = /* @__PURE__ */ pe(wo);
|
|
1181
|
+
var Jn, Hn, Vt = 0, Eo = 1, Ao = (Jn = (Hn = /* @__PURE__ */ It(function() {
|
|
1182
|
+
}, "name")) == null ? void 0 : Hn.configurable) != null ? Jn : !1, Zn = {
|
|
1181
1183
|
value: "action",
|
|
1182
1184
|
configurable: !0,
|
|
1183
1185
|
writable: !1,
|
|
@@ -1186,41 +1188,41 @@ var Qn, qn, Vt = 0, ws = 1, Es = (Qn = (qn = /* @__PURE__ */ It(function() {
|
|
|
1186
1188
|
function qe(e, t, i, n) {
|
|
1187
1189
|
i === void 0 && (i = !1);
|
|
1188
1190
|
function r() {
|
|
1189
|
-
return
|
|
1191
|
+
return Fo(e, i, t, n || this, arguments);
|
|
1190
1192
|
}
|
|
1191
|
-
return r.isMobxAction = !0,
|
|
1193
|
+
return r.isMobxAction = !0, Ao && (Zn.value = e, ve(r, "name", Zn)), r;
|
|
1192
1194
|
}
|
|
1193
|
-
function
|
|
1194
|
-
var a =
|
|
1195
|
+
function Fo(e, t, i, n, r) {
|
|
1196
|
+
var a = Co(e, t);
|
|
1195
1197
|
try {
|
|
1196
1198
|
return i.apply(n, r);
|
|
1197
|
-
} catch (
|
|
1198
|
-
throw a.error_ =
|
|
1199
|
+
} catch (o) {
|
|
1200
|
+
throw a.error_ = o, o;
|
|
1199
1201
|
} finally {
|
|
1200
|
-
|
|
1202
|
+
Ro(a);
|
|
1201
1203
|
}
|
|
1202
1204
|
}
|
|
1203
|
-
function
|
|
1204
|
-
var r = !1, a = 0,
|
|
1205
|
+
function Co(e, t, i, n) {
|
|
1206
|
+
var r = !1, a = 0, o = x.trackingDerivation, s = !t || !o;
|
|
1205
1207
|
ae();
|
|
1206
1208
|
var l = x.allowStateChanges;
|
|
1207
|
-
|
|
1208
|
-
var c =
|
|
1209
|
-
runAsAction_:
|
|
1210
|
-
prevDerivation_:
|
|
1209
|
+
s && (Xe(), l = bt(!0));
|
|
1210
|
+
var c = Tn(!0), f = {
|
|
1211
|
+
runAsAction_: s,
|
|
1212
|
+
prevDerivation_: o,
|
|
1211
1213
|
prevAllowStateChanges_: l,
|
|
1212
1214
|
prevAllowStateReads_: c,
|
|
1213
1215
|
notifySpy_: r,
|
|
1214
1216
|
startTime_: a,
|
|
1215
|
-
actionId_:
|
|
1217
|
+
actionId_: Eo++,
|
|
1216
1218
|
parentActionId_: Vt
|
|
1217
1219
|
};
|
|
1218
1220
|
return Vt = f.actionId_, f;
|
|
1219
1221
|
}
|
|
1220
|
-
function
|
|
1221
|
-
Vt !== e.actionId_ && W(30), Vt = e.parentActionId_, e.error_ !== void 0 && (x.suppressReactionErrors = !0), St(e.prevAllowStateChanges_),
|
|
1222
|
+
function Ro(e) {
|
|
1223
|
+
Vt !== e.actionId_ && W(30), Vt = e.parentActionId_, e.error_ !== void 0 && (x.suppressReactionErrors = !0), St(e.prevAllowStateChanges_), ot(e.prevAllowStateReads_), oe(), e.runAsAction_ && Re(e.prevDerivation_), x.suppressReactionErrors = !1;
|
|
1222
1224
|
}
|
|
1223
|
-
function
|
|
1225
|
+
function or(e, t) {
|
|
1224
1226
|
var i = bt(e);
|
|
1225
1227
|
try {
|
|
1226
1228
|
return t();
|
|
@@ -1238,10 +1240,10 @@ function St(e) {
|
|
|
1238
1240
|
var sr;
|
|
1239
1241
|
sr = Symbol.toPrimitive;
|
|
1240
1242
|
var ze = /* @__PURE__ */ function(e) {
|
|
1241
|
-
|
|
1242
|
-
function t(n, r, a,
|
|
1243
|
+
qi(t, e);
|
|
1244
|
+
function t(n, r, a, o, s) {
|
|
1243
1245
|
var l;
|
|
1244
|
-
return a === void 0 && (a = "ObservableValue"),
|
|
1246
|
+
return a === void 0 && (a = "ObservableValue"), s === void 0 && (s = We.default), l = e.call(this, a) || this, l.enhancer = void 0, l.name_ = void 0, l.equals = void 0, l.hasUnreportedChange_ = !1, l.interceptors_ = void 0, l.changeListeners_ = void 0, l.value_ = void 0, l.dehancer = void 0, l.enhancer = r, l.name_ = a, l.equals = s, l.value_ = r(n, void 0, a), l;
|
|
1245
1247
|
}
|
|
1246
1248
|
var i = t.prototype;
|
|
1247
1249
|
return i.dehanceValue = function(r) {
|
|
@@ -1249,7 +1251,7 @@ var ze = /* @__PURE__ */ function(e) {
|
|
|
1249
1251
|
}, i.set = function(r) {
|
|
1250
1252
|
this.value_, r = this.prepareNewValue_(r), r !== x.UNCHANGED && this.setNewValue_(r);
|
|
1251
1253
|
}, i.prepareNewValue_ = function(r) {
|
|
1252
|
-
if (
|
|
1254
|
+
if (se(this)) {
|
|
1253
1255
|
var a = ue(this, {
|
|
1254
1256
|
object: this,
|
|
1255
1257
|
type: ge,
|
|
@@ -1288,19 +1290,19 @@ var ze = /* @__PURE__ */ function(e) {
|
|
|
1288
1290
|
}, i.toString = function() {
|
|
1289
1291
|
return this.name_ + "[" + this.value_ + "]";
|
|
1290
1292
|
}, i.valueOf = function() {
|
|
1291
|
-
return
|
|
1293
|
+
return Qi(this.get());
|
|
1292
1294
|
}, i[sr] = function() {
|
|
1293
1295
|
return this.valueOf();
|
|
1294
1296
|
}, t;
|
|
1295
|
-
}(yt),
|
|
1296
|
-
|
|
1297
|
+
}(yt), ur;
|
|
1298
|
+
ur = Symbol.toPrimitive;
|
|
1297
1299
|
var ut = /* @__PURE__ */ function() {
|
|
1298
1300
|
function e(i) {
|
|
1299
1301
|
this.dependenciesState_ = $.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.isBeingObserved_ = !1, this.isPendingUnobservation_ = !1, this.observers_ = /* @__PURE__ */ new Set(), this.diffValue_ = 0, this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = $.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new jt(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.isComputing_ = !1, this.isRunningSetter_ = !1, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = xe.NONE, this.scope_ = void 0, this.equals_ = void 0, this.requiresReaction_ = void 0, this.keepAlive_ = void 0, this.onBOL = void 0, this.onBUOL = void 0, i.get || W(31), this.derivation = i.get, this.name_ = i.name || "ComputedValue", i.set && (this.setter_ = qe("ComputedValue-setter", i.set)), this.equals_ = i.equals || (i.compareStructural || i.struct ? We.structural : We.default), this.scope_ = i.context, this.requiresReaction_ = i.requiresReaction, this.keepAlive_ = !!i.keepAlive;
|
|
1300
1302
|
}
|
|
1301
1303
|
var t = e.prototype;
|
|
1302
1304
|
return t.onBecomeStale_ = function() {
|
|
1303
|
-
|
|
1305
|
+
Po(this);
|
|
1304
1306
|
}, t.onBO = function() {
|
|
1305
1307
|
this.onBOL && this.onBOL.forEach(function(n) {
|
|
1306
1308
|
return n();
|
|
@@ -1312,10 +1314,10 @@ var ut = /* @__PURE__ */ function() {
|
|
|
1312
1314
|
}, t.get = function() {
|
|
1313
1315
|
if (this.isComputing_ && W(32, this.name_, this.derivation), x.inBatch === 0 && // !globalState.trackingDerivatpion &&
|
|
1314
1316
|
this.observers_.size === 0 && !this.keepAlive_)
|
|
1315
|
-
kn(this) && (this.warnAboutUntrackedRead_(), ae(), this.value_ = this.computeValue_(!1),
|
|
1316
|
-
else if (
|
|
1317
|
+
kn(this) && (this.warnAboutUntrackedRead_(), ae(), this.value_ = this.computeValue_(!1), oe());
|
|
1318
|
+
else if (mr(this), kn(this)) {
|
|
1317
1319
|
var n = x.trackingContext;
|
|
1318
|
-
this.keepAlive_ && !n && (x.trackingContext = this), this.trackAndCompute() &&
|
|
1320
|
+
this.keepAlive_ && !n && (x.trackingContext = this), this.trackAndCompute() && xo(this), x.trackingContext = n;
|
|
1319
1321
|
}
|
|
1320
1322
|
var r = this.value_;
|
|
1321
1323
|
if (xt(r))
|
|
@@ -1335,29 +1337,29 @@ var ut = /* @__PURE__ */ function() {
|
|
|
1335
1337
|
var n = this.value_, r = (
|
|
1336
1338
|
/* see #1208 */
|
|
1337
1339
|
this.dependenciesState_ === $.NOT_TRACKING_
|
|
1338
|
-
), a = this.computeValue_(!0),
|
|
1339
|
-
return
|
|
1340
|
+
), a = this.computeValue_(!0), o = r || xt(n) || xt(a) || !this.equals_(n, a);
|
|
1341
|
+
return o && (this.value_ = a), o;
|
|
1340
1342
|
}, t.computeValue_ = function(n) {
|
|
1341
1343
|
this.isComputing_ = !0;
|
|
1342
1344
|
var r = bt(!1), a;
|
|
1343
1345
|
if (n)
|
|
1344
|
-
a =
|
|
1346
|
+
a = lr(this, this.derivation, this.scope_);
|
|
1345
1347
|
else if (x.disableErrorBoundaries === !0)
|
|
1346
1348
|
a = this.derivation.call(this.scope_);
|
|
1347
1349
|
else
|
|
1348
1350
|
try {
|
|
1349
1351
|
a = this.derivation.call(this.scope_);
|
|
1350
|
-
} catch (
|
|
1351
|
-
a = new jt(
|
|
1352
|
+
} catch (o) {
|
|
1353
|
+
a = new jt(o);
|
|
1352
1354
|
}
|
|
1353
1355
|
return St(r), this.isComputing_ = !1, a;
|
|
1354
1356
|
}, t.suspend_ = function() {
|
|
1355
1357
|
this.keepAlive_ || (yn(this), this.value_ = void 0);
|
|
1356
1358
|
}, t.observe_ = function(n, r) {
|
|
1357
|
-
var a = this,
|
|
1358
|
-
return
|
|
1359
|
+
var a = this, o = !0, s = void 0;
|
|
1360
|
+
return xn(function() {
|
|
1359
1361
|
var l = a.get();
|
|
1360
|
-
if (!
|
|
1362
|
+
if (!o || r) {
|
|
1361
1363
|
var c = Xe();
|
|
1362
1364
|
n({
|
|
1363
1365
|
observableKind: "computed",
|
|
@@ -1365,17 +1367,17 @@ var ut = /* @__PURE__ */ function() {
|
|
|
1365
1367
|
type: ge,
|
|
1366
1368
|
object: a,
|
|
1367
1369
|
newValue: l,
|
|
1368
|
-
oldValue:
|
|
1370
|
+
oldValue: s
|
|
1369
1371
|
}), Re(c);
|
|
1370
1372
|
}
|
|
1371
|
-
|
|
1373
|
+
o = !1, s = l;
|
|
1372
1374
|
});
|
|
1373
1375
|
}, t.warnAboutUntrackedRead_ = function() {
|
|
1374
1376
|
}, t.toString = function() {
|
|
1375
1377
|
return this.name_ + "[" + this.derivation.toString() + "]";
|
|
1376
1378
|
}, t.valueOf = function() {
|
|
1377
|
-
return
|
|
1378
|
-
}, t[
|
|
1379
|
+
return Qi(this.get());
|
|
1380
|
+
}, t[ur] = function() {
|
|
1379
1381
|
return this.valueOf();
|
|
1380
1382
|
}, e;
|
|
1381
1383
|
}(), Ht = /* @__PURE__ */ Ve("ComputedValue", ut), $;
|
|
@@ -1400,28 +1402,28 @@ function kn(e) {
|
|
|
1400
1402
|
case $.STALE_:
|
|
1401
1403
|
return !0;
|
|
1402
1404
|
case $.POSSIBLY_STALE_: {
|
|
1403
|
-
for (var t =
|
|
1404
|
-
var
|
|
1405
|
-
if (Ht(
|
|
1405
|
+
for (var t = Tn(!0), i = Xe(), n = e.observing_, r = n.length, a = 0; a < r; a++) {
|
|
1406
|
+
var o = n[a];
|
|
1407
|
+
if (Ht(o)) {
|
|
1406
1408
|
if (x.disableErrorBoundaries)
|
|
1407
|
-
|
|
1409
|
+
o.get();
|
|
1408
1410
|
else
|
|
1409
1411
|
try {
|
|
1410
|
-
|
|
1412
|
+
o.get();
|
|
1411
1413
|
} catch {
|
|
1412
|
-
return Re(i),
|
|
1414
|
+
return Re(i), ot(t), !0;
|
|
1413
1415
|
}
|
|
1414
1416
|
if (e.dependenciesState_ === $.STALE_)
|
|
1415
|
-
return Re(i),
|
|
1417
|
+
return Re(i), ot(t), !0;
|
|
1416
1418
|
}
|
|
1417
1419
|
}
|
|
1418
|
-
return
|
|
1420
|
+
return dr(e), Re(i), ot(t), !1;
|
|
1419
1421
|
}
|
|
1420
1422
|
}
|
|
1421
1423
|
}
|
|
1422
|
-
function
|
|
1423
|
-
var n =
|
|
1424
|
-
|
|
1424
|
+
function lr(e, t, i) {
|
|
1425
|
+
var n = Tn(!0);
|
|
1426
|
+
dr(e), e.newObserving_ = new Array(e.observing_.length + 100), e.unboundDepsCount_ = 0, e.runId_ = ++x.runId;
|
|
1425
1427
|
var r = x.trackingDerivation;
|
|
1426
1428
|
x.trackingDerivation = e, x.inBatch++;
|
|
1427
1429
|
var a;
|
|
@@ -1430,23 +1432,23 @@ function ur(e, t, i) {
|
|
|
1430
1432
|
else
|
|
1431
1433
|
try {
|
|
1432
1434
|
a = t.call(i);
|
|
1433
|
-
} catch (
|
|
1434
|
-
a = new jt(
|
|
1435
|
+
} catch (o) {
|
|
1436
|
+
a = new jt(o);
|
|
1435
1437
|
}
|
|
1436
|
-
return x.inBatch--, x.trackingDerivation = r,
|
|
1438
|
+
return x.inBatch--, x.trackingDerivation = r, To(e), ot(n), a;
|
|
1437
1439
|
}
|
|
1438
|
-
function
|
|
1439
|
-
for (var t = e.observing_, i = e.observing_ = e.newObserving_, n = $.UP_TO_DATE_, r = 0, a = e.unboundDepsCount_,
|
|
1440
|
-
var
|
|
1441
|
-
|
|
1440
|
+
function To(e) {
|
|
1441
|
+
for (var t = e.observing_, i = e.observing_ = e.newObserving_, n = $.UP_TO_DATE_, r = 0, a = e.unboundDepsCount_, o = 0; o < a; o++) {
|
|
1442
|
+
var s = i[o];
|
|
1443
|
+
s.diffValue_ === 0 && (s.diffValue_ = 1, r !== o && (i[r] = s), r++), s.dependenciesState_ > n && (n = s.dependenciesState_);
|
|
1442
1444
|
}
|
|
1443
1445
|
for (i.length = r, e.newObserving_ = null, a = t.length; a--; ) {
|
|
1444
1446
|
var l = t[a];
|
|
1445
|
-
l.diffValue_ === 0 &&
|
|
1447
|
+
l.diffValue_ === 0 && fr(l, e), l.diffValue_ = 0;
|
|
1446
1448
|
}
|
|
1447
1449
|
for (; r--; ) {
|
|
1448
1450
|
var c = i[r];
|
|
1449
|
-
c.diffValue_ === 1 && (c.diffValue_ = 0,
|
|
1451
|
+
c.diffValue_ === 1 && (c.diffValue_ = 0, Lo(c, e));
|
|
1450
1452
|
}
|
|
1451
1453
|
n !== $.UP_TO_DATE_ && (e.dependenciesState_ = n, e.onBecomeStale_());
|
|
1452
1454
|
}
|
|
@@ -1454,10 +1456,10 @@ function yn(e) {
|
|
|
1454
1456
|
var t = e.observing_;
|
|
1455
1457
|
e.observing_ = [];
|
|
1456
1458
|
for (var i = t.length; i--; )
|
|
1457
|
-
|
|
1459
|
+
fr(t[i], e);
|
|
1458
1460
|
e.dependenciesState_ = $.NOT_TRACKING_;
|
|
1459
1461
|
}
|
|
1460
|
-
function
|
|
1462
|
+
function cr(e) {
|
|
1461
1463
|
var t = Xe();
|
|
1462
1464
|
try {
|
|
1463
1465
|
return e();
|
|
@@ -1472,14 +1474,14 @@ function Xe() {
|
|
|
1472
1474
|
function Re(e) {
|
|
1473
1475
|
x.trackingDerivation = e;
|
|
1474
1476
|
}
|
|
1475
|
-
function
|
|
1477
|
+
function Tn(e) {
|
|
1476
1478
|
var t = x.allowStateReads;
|
|
1477
1479
|
return x.allowStateReads = e, t;
|
|
1478
1480
|
}
|
|
1479
|
-
function
|
|
1481
|
+
function ot(e) {
|
|
1480
1482
|
x.allowStateReads = e;
|
|
1481
1483
|
}
|
|
1482
|
-
function
|
|
1484
|
+
function dr(e) {
|
|
1483
1485
|
if (e.dependenciesState_ !== $.UP_TO_DATE_) {
|
|
1484
1486
|
e.dependenciesState_ = $.UP_TO_DATE_;
|
|
1485
1487
|
for (var t = e.observing_, i = t.length; i--; )
|
|
@@ -1489,26 +1491,26 @@ function cr(e) {
|
|
|
1489
1491
|
var cn = function() {
|
|
1490
1492
|
this.version = 6, this.UNCHANGED = {}, this.trackingDerivation = null, this.trackingContext = null, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !1, this.allowStateReads = !0, this.enforceActions = !0, this.spyListeners = [], this.globalReactionErrorHandlers = [], this.computedRequiresReaction = !1, this.reactionRequiresObservable = !1, this.observableRequiresReaction = !1, this.disableErrorBoundaries = !1, this.suppressReactionErrors = !1, this.useProxies = !0, this.verifyProxies = !1, this.safeDescriptors = !0, this.stateVersion = Number.MIN_SAFE_INTEGER;
|
|
1491
1493
|
}, dn = !0, x = /* @__PURE__ */ function() {
|
|
1492
|
-
var e = /* @__PURE__ */
|
|
1494
|
+
var e = /* @__PURE__ */ Mi();
|
|
1493
1495
|
return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (dn = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new cn().version && (dn = !1), dn ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = /* @__PURE__ */ new cn()) : (setTimeout(function() {
|
|
1494
1496
|
W(35);
|
|
1495
1497
|
}, 1), new cn());
|
|
1496
1498
|
}();
|
|
1497
|
-
function
|
|
1499
|
+
function Lo(e, t) {
|
|
1498
1500
|
e.observers_.add(t), e.lowestObserverState_ > t.dependenciesState_ && (e.lowestObserverState_ = t.dependenciesState_);
|
|
1499
1501
|
}
|
|
1500
|
-
function
|
|
1501
|
-
e.observers_.delete(t), e.observers_.size === 0 &&
|
|
1502
|
+
function fr(e, t) {
|
|
1503
|
+
e.observers_.delete(t), e.observers_.size === 0 && hr(e);
|
|
1502
1504
|
}
|
|
1503
|
-
function
|
|
1505
|
+
function hr(e) {
|
|
1504
1506
|
e.isPendingUnobservation_ === !1 && (e.isPendingUnobservation_ = !0, x.pendingUnobservations.push(e));
|
|
1505
1507
|
}
|
|
1506
1508
|
function ae() {
|
|
1507
1509
|
x.inBatch++;
|
|
1508
1510
|
}
|
|
1509
|
-
function
|
|
1511
|
+
function oe() {
|
|
1510
1512
|
if (--x.inBatch === 0) {
|
|
1511
|
-
|
|
1513
|
+
pr();
|
|
1512
1514
|
for (var e = x.pendingUnobservations, t = 0; t < e.length; t++) {
|
|
1513
1515
|
var i = e[t];
|
|
1514
1516
|
i.isPendingUnobservation_ = !1, i.observers_.size === 0 && (i.isBeingObserved_ && (i.isBeingObserved_ = !1, i.onBUO()), i instanceof ut && i.suspend_());
|
|
@@ -1516,21 +1518,21 @@ function se() {
|
|
|
1516
1518
|
x.pendingUnobservations = [];
|
|
1517
1519
|
}
|
|
1518
1520
|
}
|
|
1519
|
-
function
|
|
1521
|
+
function mr(e) {
|
|
1520
1522
|
var t = x.trackingDerivation;
|
|
1521
|
-
return t !== null ? (t.runId_ !== e.lastAccessedBy_ && (e.lastAccessedBy_ = t.runId_, t.newObserving_[t.unboundDepsCount_++] = e, !e.isBeingObserved_ && x.trackingContext && (e.isBeingObserved_ = !0, e.onBO())), e.isBeingObserved_) : (e.observers_.size === 0 && x.inBatch > 0 &&
|
|
1523
|
+
return t !== null ? (t.runId_ !== e.lastAccessedBy_ && (e.lastAccessedBy_ = t.runId_, t.newObserving_[t.unboundDepsCount_++] = e, !e.isBeingObserved_ && x.trackingContext && (e.isBeingObserved_ = !0, e.onBO())), e.isBeingObserved_) : (e.observers_.size === 0 && x.inBatch > 0 && hr(e), !1);
|
|
1522
1524
|
}
|
|
1523
|
-
function
|
|
1525
|
+
function vr(e) {
|
|
1524
1526
|
e.lowestObserverState_ !== $.STALE_ && (e.lowestObserverState_ = $.STALE_, e.observers_.forEach(function(t) {
|
|
1525
1527
|
t.dependenciesState_ === $.UP_TO_DATE_ && t.onBecomeStale_(), t.dependenciesState_ = $.STALE_;
|
|
1526
1528
|
}));
|
|
1527
1529
|
}
|
|
1528
|
-
function
|
|
1530
|
+
function xo(e) {
|
|
1529
1531
|
e.lowestObserverState_ !== $.STALE_ && (e.lowestObserverState_ = $.STALE_, e.observers_.forEach(function(t) {
|
|
1530
1532
|
t.dependenciesState_ === $.POSSIBLY_STALE_ ? t.dependenciesState_ = $.STALE_ : t.dependenciesState_ === $.UP_TO_DATE_ && (e.lowestObserverState_ = $.UP_TO_DATE_);
|
|
1531
1533
|
}));
|
|
1532
1534
|
}
|
|
1533
|
-
function
|
|
1535
|
+
function Po(e) {
|
|
1534
1536
|
e.lowestObserverState_ === $.UP_TO_DATE_ && (e.lowestObserverState_ = $.POSSIBLY_STALE_, e.observers_.forEach(function(t) {
|
|
1535
1537
|
t.dependenciesState_ === $.UP_TO_DATE_ && (t.dependenciesState_ = $.POSSIBLY_STALE_, t.onBecomeStale_());
|
|
1536
1538
|
}));
|
|
@@ -1543,7 +1545,7 @@ var Ut = /* @__PURE__ */ function() {
|
|
|
1543
1545
|
return t.onBecomeStale_ = function() {
|
|
1544
1546
|
this.schedule_();
|
|
1545
1547
|
}, t.schedule_ = function() {
|
|
1546
|
-
this.isScheduled_ || (this.isScheduled_ = !0, x.pendingReactions.push(this),
|
|
1548
|
+
this.isScheduled_ || (this.isScheduled_ = !0, x.pendingReactions.push(this), pr());
|
|
1547
1549
|
}, t.isScheduled = function() {
|
|
1548
1550
|
return this.isScheduled_;
|
|
1549
1551
|
}, t.runReaction_ = function() {
|
|
@@ -1558,15 +1560,15 @@ var Ut = /* @__PURE__ */ function() {
|
|
|
1558
1560
|
this.reportExceptionInDerivation_(r);
|
|
1559
1561
|
}
|
|
1560
1562
|
}
|
|
1561
|
-
x.trackingContext = n,
|
|
1563
|
+
x.trackingContext = n, oe();
|
|
1562
1564
|
}
|
|
1563
1565
|
}, t.track = function(n) {
|
|
1564
1566
|
if (!this.isDisposed_) {
|
|
1565
1567
|
ae(), this.isRunning_ = !0;
|
|
1566
1568
|
var r = x.trackingContext;
|
|
1567
1569
|
x.trackingContext = this;
|
|
1568
|
-
var a =
|
|
1569
|
-
x.trackingContext = r, this.isRunning_ = !1, this.isTrackPending_ = !1, this.isDisposed_ && yn(this), xt(a) && this.reportExceptionInDerivation_(a.cause),
|
|
1570
|
+
var a = lr(this, n, void 0);
|
|
1571
|
+
x.trackingContext = r, this.isRunning_ = !1, this.isTrackPending_ = !1, this.isDisposed_ && yn(this), xt(a) && this.reportExceptionInDerivation_(a.cause), oe();
|
|
1570
1572
|
}
|
|
1571
1573
|
}, t.reportExceptionInDerivation_ = function(n) {
|
|
1572
1574
|
var r = this;
|
|
@@ -1577,115 +1579,115 @@ var Ut = /* @__PURE__ */ function() {
|
|
|
1577
1579
|
if (x.disableErrorBoundaries)
|
|
1578
1580
|
throw n;
|
|
1579
1581
|
var a = "[mobx] uncaught error in '" + this + "'";
|
|
1580
|
-
x.suppressReactionErrors || console.error(a, n), x.globalReactionErrorHandlers.forEach(function(
|
|
1581
|
-
return
|
|
1582
|
+
x.suppressReactionErrors || console.error(a, n), x.globalReactionErrorHandlers.forEach(function(o) {
|
|
1583
|
+
return o(n, r);
|
|
1582
1584
|
});
|
|
1583
1585
|
}, t.dispose = function() {
|
|
1584
|
-
this.isDisposed_ || (this.isDisposed_ = !0, this.isRunning_ || (ae(), yn(this),
|
|
1586
|
+
this.isDisposed_ || (this.isDisposed_ = !0, this.isRunning_ || (ae(), yn(this), oe()));
|
|
1585
1587
|
}, t.getDisposer_ = function() {
|
|
1586
1588
|
var n = this.dispose.bind(this);
|
|
1587
1589
|
return n[M] = this, n;
|
|
1588
1590
|
}, t.toString = function() {
|
|
1589
1591
|
return "Reaction[" + this.name_ + "]";
|
|
1590
1592
|
}, t.trace = function(n) {
|
|
1591
|
-
n === void 0 && (n = !1),
|
|
1593
|
+
n === void 0 && (n = !1), Yo(this, n);
|
|
1592
1594
|
}, e;
|
|
1593
|
-
}(),
|
|
1595
|
+
}(), Do = 100, Io = function(t) {
|
|
1594
1596
|
return t();
|
|
1595
1597
|
};
|
|
1596
|
-
function
|
|
1597
|
-
x.inBatch > 0 || x.isRunningReactions ||
|
|
1598
|
+
function pr() {
|
|
1599
|
+
x.inBatch > 0 || x.isRunningReactions || Io(Vo);
|
|
1598
1600
|
}
|
|
1599
|
-
function
|
|
1601
|
+
function Vo() {
|
|
1600
1602
|
x.isRunningReactions = !0;
|
|
1601
1603
|
for (var e = x.pendingReactions, t = 0; e.length > 0; ) {
|
|
1602
|
-
++t ===
|
|
1604
|
+
++t === Do && (console.error("[mobx] cycle in reaction: " + e[0]), e.splice(0));
|
|
1603
1605
|
for (var i = e.splice(0), n = 0, r = i.length; n < r; n++)
|
|
1604
1606
|
i[n].runReaction_();
|
|
1605
1607
|
}
|
|
1606
1608
|
x.isRunningReactions = !1;
|
|
1607
1609
|
}
|
|
1608
1610
|
var Mt = /* @__PURE__ */ Ve("Reaction", Ut);
|
|
1609
|
-
function
|
|
1611
|
+
function st() {
|
|
1610
1612
|
return !1;
|
|
1611
1613
|
}
|
|
1612
|
-
function
|
|
1614
|
+
function jo(e) {
|
|
1613
1615
|
return console.warn("[mobx.spy] Is a no-op in production builds"), function() {
|
|
1614
1616
|
};
|
|
1615
1617
|
}
|
|
1616
|
-
var
|
|
1618
|
+
var gr = "action", Uo = "action.bound", kr = "autoAction", Mo = "autoAction.bound", Bo = "<unnamed action>", yr = /* @__PURE__ */ _t(gr), Go = /* @__PURE__ */ _t(Uo, {
|
|
1617
1619
|
bound: !0
|
|
1618
|
-
}),
|
|
1620
|
+
}), _r = /* @__PURE__ */ _t(kr, {
|
|
1619
1621
|
autoAction: !0
|
|
1620
|
-
}),
|
|
1622
|
+
}), zo = /* @__PURE__ */ _t(Mo, {
|
|
1621
1623
|
autoAction: !0,
|
|
1622
1624
|
bound: !0
|
|
1623
1625
|
});
|
|
1624
|
-
function
|
|
1626
|
+
function br(e) {
|
|
1625
1627
|
var t = function(n, r) {
|
|
1626
1628
|
if (he(n))
|
|
1627
|
-
return qe(n.name ||
|
|
1629
|
+
return qe(n.name || Bo, n, e);
|
|
1628
1630
|
if (he(r))
|
|
1629
1631
|
return qe(n, r, e);
|
|
1630
1632
|
if (Pe(r))
|
|
1631
|
-
return kt(n, r, e ?
|
|
1633
|
+
return kt(n, r, e ? _r : yr);
|
|
1632
1634
|
if (Pe(n))
|
|
1633
|
-
return pe(_t(e ?
|
|
1635
|
+
return pe(_t(e ? kr : gr, {
|
|
1634
1636
|
name: n,
|
|
1635
1637
|
autoAction: e
|
|
1636
1638
|
}));
|
|
1637
1639
|
};
|
|
1638
1640
|
return t;
|
|
1639
1641
|
}
|
|
1640
|
-
var Fe = /* @__PURE__ */
|
|
1641
|
-
Object.assign(Fe,
|
|
1642
|
-
var lt = /* @__PURE__ */
|
|
1643
|
-
Object.assign(lt,
|
|
1644
|
-
Fe.bound = /* @__PURE__ */ pe(
|
|
1645
|
-
lt.bound = /* @__PURE__ */ pe(
|
|
1646
|
-
function
|
|
1642
|
+
var Fe = /* @__PURE__ */ br(!1);
|
|
1643
|
+
Object.assign(Fe, yr);
|
|
1644
|
+
var lt = /* @__PURE__ */ br(!0);
|
|
1645
|
+
Object.assign(lt, _r);
|
|
1646
|
+
Fe.bound = /* @__PURE__ */ pe(Go);
|
|
1647
|
+
lt.bound = /* @__PURE__ */ pe(zo);
|
|
1648
|
+
function Ln(e) {
|
|
1647
1649
|
return he(e) && e.isMobxAction === !0;
|
|
1648
1650
|
}
|
|
1649
|
-
function
|
|
1651
|
+
function xn(e, t) {
|
|
1650
1652
|
var i, n;
|
|
1651
|
-
t === void 0 && (t =
|
|
1652
|
-
var r = (i = (n = t) == null ? void 0 : n.name) != null ? i : "Autorun", a = !t.scheduler && !t.delay,
|
|
1653
|
+
t === void 0 && (t = An);
|
|
1654
|
+
var r = (i = (n = t) == null ? void 0 : n.name) != null ? i : "Autorun", a = !t.scheduler && !t.delay, o;
|
|
1653
1655
|
if (a)
|
|
1654
|
-
|
|
1656
|
+
o = new Ut(r, function() {
|
|
1655
1657
|
this.track(c);
|
|
1656
1658
|
}, t.onError, t.requiresObservable);
|
|
1657
1659
|
else {
|
|
1658
|
-
var
|
|
1659
|
-
|
|
1660
|
-
l || (l = !0,
|
|
1661
|
-
l = !1,
|
|
1660
|
+
var s = Sr(t), l = !1;
|
|
1661
|
+
o = new Ut(r, function() {
|
|
1662
|
+
l || (l = !0, s(function() {
|
|
1663
|
+
l = !1, o.isDisposed_ || o.track(c);
|
|
1662
1664
|
}));
|
|
1663
1665
|
}, t.onError, t.requiresObservable);
|
|
1664
1666
|
}
|
|
1665
1667
|
function c() {
|
|
1666
|
-
e(
|
|
1668
|
+
e(o);
|
|
1667
1669
|
}
|
|
1668
|
-
return
|
|
1670
|
+
return o.schedule_(), o.getDisposer_();
|
|
1669
1671
|
}
|
|
1670
|
-
var
|
|
1672
|
+
var Ko = function(t) {
|
|
1671
1673
|
return t();
|
|
1672
1674
|
};
|
|
1673
|
-
function
|
|
1675
|
+
function Sr(e) {
|
|
1674
1676
|
return e.scheduler ? e.scheduler : e.delay ? function(t) {
|
|
1675
1677
|
return setTimeout(t, e.delay);
|
|
1676
|
-
} :
|
|
1678
|
+
} : Ko;
|
|
1677
1679
|
}
|
|
1678
|
-
function
|
|
1680
|
+
function $o(e, t, i) {
|
|
1679
1681
|
var n;
|
|
1680
|
-
i === void 0 && (i =
|
|
1681
|
-
var r = (n = i.name) != null ? n : "Reaction", a = Fe(r, i.onError ?
|
|
1682
|
-
l ||
|
|
1682
|
+
i === void 0 && (i = An);
|
|
1683
|
+
var r = (n = i.name) != null ? n : "Reaction", a = Fe(r, i.onError ? Wo(i.onError, t) : t), o = !i.scheduler && !i.delay, s = Sr(i), l = !0, c = !1, f, v, O = i.compareStructural ? We.structural : i.equals || We.default, A = new Ut(r, function() {
|
|
1684
|
+
l || o ? R() : c || (c = !0, s(R));
|
|
1683
1685
|
}, i.onError, i.requiresObservable);
|
|
1684
1686
|
function R() {
|
|
1685
1687
|
if (c = !1, !A.isDisposed_) {
|
|
1686
1688
|
var b = !1;
|
|
1687
1689
|
A.track(function() {
|
|
1688
|
-
var _ =
|
|
1690
|
+
var _ = or(!1, function() {
|
|
1689
1691
|
return e(A);
|
|
1690
1692
|
});
|
|
1691
1693
|
b = l || !O(f, _), v = f, f = _;
|
|
@@ -1694,7 +1696,7 @@ function Ks(e, t, i) {
|
|
|
1694
1696
|
}
|
|
1695
1697
|
return A.schedule_(), A.getDisposer_();
|
|
1696
1698
|
}
|
|
1697
|
-
function
|
|
1699
|
+
function Wo(e, t) {
|
|
1698
1700
|
return function() {
|
|
1699
1701
|
try {
|
|
1700
1702
|
return t.apply(this, arguments);
|
|
@@ -1703,49 +1705,49 @@ function $s(e, t) {
|
|
|
1703
1705
|
}
|
|
1704
1706
|
};
|
|
1705
1707
|
}
|
|
1706
|
-
var
|
|
1707
|
-
function
|
|
1708
|
-
return
|
|
1708
|
+
var Qo = "onBO", qo = "onBUO";
|
|
1709
|
+
function Jo(e, t, i) {
|
|
1710
|
+
return Or(Qo, e, t, i);
|
|
1709
1711
|
}
|
|
1710
|
-
function
|
|
1711
|
-
return
|
|
1712
|
+
function Nr(e, t, i) {
|
|
1713
|
+
return Or(qo, e, t, i);
|
|
1712
1714
|
}
|
|
1713
|
-
function
|
|
1714
|
-
var r = typeof n == "function" ? De(t, i) : De(t), a = he(n) ? n : i,
|
|
1715
|
-
return r[
|
|
1716
|
-
var
|
|
1717
|
-
|
|
1715
|
+
function Or(e, t, i, n) {
|
|
1716
|
+
var r = typeof n == "function" ? De(t, i) : De(t), a = he(n) ? n : i, o = e + "L";
|
|
1717
|
+
return r[o] ? r[o].add(a) : r[o] = /* @__PURE__ */ new Set([a]), function() {
|
|
1718
|
+
var s = r[o];
|
|
1719
|
+
s && (s.delete(a), s.size === 0 && delete r[o]);
|
|
1718
1720
|
};
|
|
1719
1721
|
}
|
|
1720
|
-
function
|
|
1722
|
+
function wr(e, t, i, n) {
|
|
1721
1723
|
var r = ja(t), a = Et(e, n)[M];
|
|
1722
1724
|
ae();
|
|
1723
1725
|
try {
|
|
1724
|
-
Ke(r).forEach(function(
|
|
1726
|
+
Ke(r).forEach(function(o) {
|
|
1725
1727
|
a.extend_(
|
|
1726
|
-
|
|
1727
|
-
r[
|
|
1728
|
+
o,
|
|
1729
|
+
r[o],
|
|
1728
1730
|
// must pass "undefined" for { key: undefined }
|
|
1729
|
-
i &&
|
|
1731
|
+
i && o in i ? i[o] : !0
|
|
1730
1732
|
);
|
|
1731
1733
|
});
|
|
1732
1734
|
} finally {
|
|
1733
|
-
|
|
1735
|
+
oe();
|
|
1734
1736
|
}
|
|
1735
1737
|
return e;
|
|
1736
1738
|
}
|
|
1737
|
-
var
|
|
1738
|
-
function
|
|
1739
|
+
var Ho = 0;
|
|
1740
|
+
function Er() {
|
|
1739
1741
|
this.message = "FLOW_CANCELLED";
|
|
1740
1742
|
}
|
|
1741
|
-
|
|
1742
|
-
var
|
|
1743
|
+
Er.prototype = /* @__PURE__ */ Object.create(Error.prototype);
|
|
1744
|
+
var Xn = /* @__PURE__ */ Zi("flow"), Zo = /* @__PURE__ */ Zi("flow.bound", {
|
|
1743
1745
|
bound: !0
|
|
1744
1746
|
}), ct = /* @__PURE__ */ Object.assign(function(t, i) {
|
|
1745
1747
|
if (Pe(i))
|
|
1746
|
-
return kt(t, i,
|
|
1748
|
+
return kt(t, i, Xn);
|
|
1747
1749
|
var n = t, r = n.name || "<unnamed flow>", a = function() {
|
|
1748
|
-
var
|
|
1750
|
+
var s = this, l = arguments, c = ++Ho, f = Fe(r + " - runid: " + c + " - init", n).apply(s, l), v, O = void 0, A = new Promise(function(R, b) {
|
|
1749
1751
|
var _ = 0;
|
|
1750
1752
|
v = b;
|
|
1751
1753
|
function C(P) {
|
|
@@ -1779,40 +1781,40 @@ var Hn = /* @__PURE__ */ Hi("flow"), Hs = /* @__PURE__ */ Hi("flow.bound", {
|
|
|
1779
1781
|
});
|
|
1780
1782
|
return A.cancel = Fe(r + " - runid: " + c + " - cancel", function() {
|
|
1781
1783
|
try {
|
|
1782
|
-
O &&
|
|
1784
|
+
O && Yn(O);
|
|
1783
1785
|
var R = f.return(void 0), b = Promise.resolve(R.value);
|
|
1784
|
-
b.then(Be, Be),
|
|
1786
|
+
b.then(Be, Be), Yn(b), v(new Er());
|
|
1785
1787
|
} catch (_) {
|
|
1786
1788
|
v(_);
|
|
1787
1789
|
}
|
|
1788
1790
|
}), A;
|
|
1789
1791
|
};
|
|
1790
1792
|
return a.isMobXFlow = !0, a;
|
|
1791
|
-
},
|
|
1792
|
-
ct.bound = /* @__PURE__ */ pe(
|
|
1793
|
-
function
|
|
1793
|
+
}, Xn);
|
|
1794
|
+
ct.bound = /* @__PURE__ */ pe(Zo);
|
|
1795
|
+
function Yn(e) {
|
|
1794
1796
|
he(e.cancel) && e.cancel();
|
|
1795
1797
|
}
|
|
1796
1798
|
function Bt(e) {
|
|
1797
1799
|
return (e == null ? void 0 : e.isMobXFlow) === !0;
|
|
1798
1800
|
}
|
|
1799
|
-
function
|
|
1800
|
-
return e ? t !== void 0 ? dt(e) ? e[M].values_.has(t) : !1 : dt(e) || !!e[M] ||
|
|
1801
|
+
function Xo(e, t) {
|
|
1802
|
+
return e ? t !== void 0 ? dt(e) ? e[M].values_.has(t) : !1 : dt(e) || !!e[M] || Cn(e) || Mt(e) || Ht(e) : !1;
|
|
1801
1803
|
}
|
|
1802
1804
|
function Nt(e) {
|
|
1803
|
-
return
|
|
1805
|
+
return Xo(e);
|
|
1804
1806
|
}
|
|
1805
|
-
function
|
|
1807
|
+
function Yo() {
|
|
1806
1808
|
W("trace() is not available in production builds");
|
|
1807
1809
|
for (var e = !1, t = arguments.length, i = new Array(t), n = 0; n < t; n++)
|
|
1808
1810
|
i[n] = arguments[n];
|
|
1809
1811
|
typeof i[i.length - 1] == "boolean" && (e = i.pop());
|
|
1810
|
-
var r =
|
|
1812
|
+
var r = es(i);
|
|
1811
1813
|
if (!r)
|
|
1812
1814
|
return W("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");
|
|
1813
1815
|
r.isTracing_ === xe.NONE && console.log("[mobx.trace] '" + r.name_ + "' tracing enabled"), r.isTracing_ = e ? xe.BREAK : xe.LOG;
|
|
1814
1816
|
}
|
|
1815
|
-
function
|
|
1817
|
+
function es(e) {
|
|
1816
1818
|
switch (e.length) {
|
|
1817
1819
|
case 0:
|
|
1818
1820
|
return x.trackingDerivation;
|
|
@@ -1827,13 +1829,13 @@ function ye(e, t) {
|
|
|
1827
1829
|
try {
|
|
1828
1830
|
return e.apply(t);
|
|
1829
1831
|
} finally {
|
|
1830
|
-
|
|
1832
|
+
oe();
|
|
1831
1833
|
}
|
|
1832
1834
|
}
|
|
1833
1835
|
function Ue(e) {
|
|
1834
1836
|
return e[M];
|
|
1835
1837
|
}
|
|
1836
|
-
var
|
|
1838
|
+
var ts = {
|
|
1837
1839
|
has: function(t, i) {
|
|
1838
1840
|
return Ue(t).has_(i);
|
|
1839
1841
|
},
|
|
@@ -1859,16 +1861,16 @@ var eo = {
|
|
|
1859
1861
|
W(13);
|
|
1860
1862
|
}
|
|
1861
1863
|
};
|
|
1862
|
-
function
|
|
1864
|
+
function ns(e, t) {
|
|
1863
1865
|
var i, n;
|
|
1864
|
-
return
|
|
1866
|
+
return Gi(), e = Et(e, t), (n = (i = e[M]).proxy_) != null ? n : i.proxy_ = new Proxy(e, ts);
|
|
1865
1867
|
}
|
|
1866
|
-
function
|
|
1868
|
+
function se(e) {
|
|
1867
1869
|
return e.interceptors_ !== void 0 && e.interceptors_.length > 0;
|
|
1868
1870
|
}
|
|
1869
1871
|
function Ot(e, t) {
|
|
1870
1872
|
var i = e.interceptors_ || (e.interceptors_ = []);
|
|
1871
|
-
return i.push(t),
|
|
1873
|
+
return i.push(t), zi(function() {
|
|
1872
1874
|
var n = i.indexOf(t);
|
|
1873
1875
|
n !== -1 && i.splice(n, 1);
|
|
1874
1876
|
});
|
|
@@ -1888,7 +1890,7 @@ function ce(e) {
|
|
|
1888
1890
|
}
|
|
1889
1891
|
function wt(e, t) {
|
|
1890
1892
|
var i = e.changeListeners_ || (e.changeListeners_ = []);
|
|
1891
|
-
return i.push(t),
|
|
1893
|
+
return i.push(t), zi(function() {
|
|
1892
1894
|
var n = i.indexOf(t);
|
|
1893
1895
|
n !== -1 && i.splice(n, 1);
|
|
1894
1896
|
});
|
|
@@ -1902,7 +1904,7 @@ function de(e, t) {
|
|
|
1902
1904
|
Re(i);
|
|
1903
1905
|
}
|
|
1904
1906
|
}
|
|
1905
|
-
function
|
|
1907
|
+
function is(e, t, i) {
|
|
1906
1908
|
var n = Et(e, i)[M];
|
|
1907
1909
|
ae();
|
|
1908
1910
|
try {
|
|
@@ -1911,14 +1913,14 @@ function no(e, t, i) {
|
|
|
1911
1913
|
return n.make_(a, t[a]);
|
|
1912
1914
|
});
|
|
1913
1915
|
} finally {
|
|
1914
|
-
|
|
1916
|
+
oe();
|
|
1915
1917
|
}
|
|
1916
1918
|
return e;
|
|
1917
1919
|
}
|
|
1918
1920
|
var fn = /* @__PURE__ */ Symbol("mobx-keys");
|
|
1919
|
-
function
|
|
1921
|
+
function rs(e, t, i) {
|
|
1920
1922
|
if (Se(e))
|
|
1921
|
-
return
|
|
1923
|
+
return wr(e, e, t, i);
|
|
1922
1924
|
var n = Et(e, i)[M];
|
|
1923
1925
|
if (!e[fn]) {
|
|
1924
1926
|
var r = Object.getPrototypeOf(e), a = new Set([].concat(Ke(e), Ke(r)));
|
|
@@ -1926,19 +1928,19 @@ function io(e, t, i) {
|
|
|
1926
1928
|
}
|
|
1927
1929
|
ae();
|
|
1928
1930
|
try {
|
|
1929
|
-
e[fn].forEach(function(
|
|
1931
|
+
e[fn].forEach(function(o) {
|
|
1930
1932
|
return n.make_(
|
|
1931
|
-
|
|
1933
|
+
o,
|
|
1932
1934
|
// must pass "undefined" for { key: undefined }
|
|
1933
|
-
t &&
|
|
1935
|
+
t && o in t ? t[o] : !0
|
|
1934
1936
|
);
|
|
1935
1937
|
});
|
|
1936
1938
|
} finally {
|
|
1937
|
-
|
|
1939
|
+
oe();
|
|
1938
1940
|
}
|
|
1939
1941
|
return e;
|
|
1940
1942
|
}
|
|
1941
|
-
var
|
|
1943
|
+
var ei = "splice", ge = "update", as = 1e4, os = {
|
|
1942
1944
|
get: function(t, i) {
|
|
1943
1945
|
var n = t[M];
|
|
1944
1946
|
return i === M ? n : i === "length" ? n.getArrayLength_() : typeof i == "string" && !isNaN(i) ? n.get_(parseInt(i)) : be(Gt, i) ? Gt[i] : t[i];
|
|
@@ -1950,10 +1952,10 @@ var Xn = "splice", ge = "update", ro = 1e4, ao = {
|
|
|
1950
1952
|
preventExtensions: function() {
|
|
1951
1953
|
W(15);
|
|
1952
1954
|
}
|
|
1953
|
-
},
|
|
1955
|
+
}, Pn = /* @__PURE__ */ function() {
|
|
1954
1956
|
function e(i, n, r, a) {
|
|
1955
|
-
i === void 0 && (i = "ObservableArray"), this.owned_ = void 0, this.legacyMode_ = void 0, this.atom_ = void 0, this.values_ = [], this.interceptors_ = void 0, this.changeListeners_ = void 0, this.enhancer_ = void 0, this.dehancer = void 0, this.proxy_ = void 0, this.lastKnownLength_ = 0, this.owned_ = r, this.legacyMode_ = a, this.atom_ = new yt(i), this.enhancer_ = function(
|
|
1956
|
-
return n(
|
|
1957
|
+
i === void 0 && (i = "ObservableArray"), this.owned_ = void 0, this.legacyMode_ = void 0, this.atom_ = void 0, this.values_ = [], this.interceptors_ = void 0, this.changeListeners_ = void 0, this.enhancer_ = void 0, this.dehancer = void 0, this.proxy_ = void 0, this.lastKnownLength_ = 0, this.owned_ = r, this.legacyMode_ = a, this.atom_ = new yt(i), this.enhancer_ = function(o, s) {
|
|
1958
|
+
return n(o, s, "ObservableArray[..]");
|
|
1957
1959
|
};
|
|
1958
1960
|
}
|
|
1959
1961
|
var t = e.prototype;
|
|
@@ -1982,21 +1984,21 @@ var Xn = "splice", ge = "update", ro = 1e4, ao = {
|
|
|
1982
1984
|
var r = this.values_.length;
|
|
1983
1985
|
if (n !== r)
|
|
1984
1986
|
if (n > r) {
|
|
1985
|
-
for (var a = new Array(n - r),
|
|
1986
|
-
a[
|
|
1987
|
+
for (var a = new Array(n - r), o = 0; o < n - r; o++)
|
|
1988
|
+
a[o] = void 0;
|
|
1987
1989
|
this.spliceWithArray_(r, 0, a);
|
|
1988
1990
|
} else
|
|
1989
1991
|
this.spliceWithArray_(n, r - n);
|
|
1990
1992
|
}, t.updateArrayLength_ = function(n, r) {
|
|
1991
|
-
n !== this.lastKnownLength_ && W(16), this.lastKnownLength_ += r, this.legacyMode_ && r > 0 &&
|
|
1993
|
+
n !== this.lastKnownLength_ && W(16), this.lastKnownLength_ += r, this.legacyMode_ && r > 0 && Vr(n + r + 1);
|
|
1992
1994
|
}, t.spliceWithArray_ = function(n, r, a) {
|
|
1993
|
-
var
|
|
1995
|
+
var o = this;
|
|
1994
1996
|
this.atom_;
|
|
1995
|
-
var
|
|
1996
|
-
if (n === void 0 ? n = 0 : n >
|
|
1997
|
+
var s = this.values_.length;
|
|
1998
|
+
if (n === void 0 ? n = 0 : n > s ? n = s : n < 0 && (n = Math.max(0, s + n)), arguments.length === 1 ? r = s - n : r == null ? r = 0 : r = Math.max(0, Math.min(r, s - n)), a === void 0 && (a = pn), se(this)) {
|
|
1997
1999
|
var l = ue(this, {
|
|
1998
2000
|
object: this.proxy_,
|
|
1999
|
-
type:
|
|
2001
|
+
type: ei,
|
|
2000
2002
|
index: n,
|
|
2001
2003
|
removedCount: r,
|
|
2002
2004
|
added: a
|
|
@@ -2006,28 +2008,28 @@ var Xn = "splice", ge = "update", ro = 1e4, ao = {
|
|
|
2006
2008
|
r = l.removedCount, a = l.added;
|
|
2007
2009
|
}
|
|
2008
2010
|
if (a = a.length === 0 ? a : a.map(function(v) {
|
|
2009
|
-
return
|
|
2011
|
+
return o.enhancer_(v, void 0);
|
|
2010
2012
|
}), this.legacyMode_) {
|
|
2011
2013
|
var c = a.length - r;
|
|
2012
|
-
this.updateArrayLength_(
|
|
2014
|
+
this.updateArrayLength_(s, c);
|
|
2013
2015
|
}
|
|
2014
2016
|
var f = this.spliceItemsIntoValues_(n, r, a);
|
|
2015
2017
|
return (r !== 0 || a.length !== 0) && this.notifyArraySplice_(n, a, f), this.dehanceValues_(f);
|
|
2016
2018
|
}, t.spliceItemsIntoValues_ = function(n, r, a) {
|
|
2017
|
-
if (a.length <
|
|
2018
|
-
var
|
|
2019
|
-
return (
|
|
2019
|
+
if (a.length < as) {
|
|
2020
|
+
var o;
|
|
2021
|
+
return (o = this.values_).splice.apply(o, [n, r].concat(a));
|
|
2020
2022
|
} else {
|
|
2021
|
-
var
|
|
2023
|
+
var s = this.values_.slice(n, n + r), l = this.values_.slice(n + r);
|
|
2022
2024
|
this.values_.length += a.length - r;
|
|
2023
2025
|
for (var c = 0; c < a.length; c++)
|
|
2024
2026
|
this.values_[n + c] = a[c];
|
|
2025
2027
|
for (var f = 0; f < l.length; f++)
|
|
2026
2028
|
this.values_[n + a.length + f] = l[f];
|
|
2027
|
-
return
|
|
2029
|
+
return s;
|
|
2028
2030
|
}
|
|
2029
2031
|
}, t.notifyArrayChildUpdate_ = function(n, r, a) {
|
|
2030
|
-
var
|
|
2032
|
+
var o = !this.owned_ && st(), s = ce(this), l = s || o ? {
|
|
2031
2033
|
observableKind: "array",
|
|
2032
2034
|
object: this.proxy_,
|
|
2033
2035
|
type: ge,
|
|
@@ -2036,20 +2038,20 @@ var Xn = "splice", ge = "update", ro = 1e4, ao = {
|
|
|
2036
2038
|
newValue: r,
|
|
2037
2039
|
oldValue: a
|
|
2038
2040
|
} : null;
|
|
2039
|
-
this.atom_.reportChanged(),
|
|
2041
|
+
this.atom_.reportChanged(), s && de(this, l);
|
|
2040
2042
|
}, t.notifyArraySplice_ = function(n, r, a) {
|
|
2041
|
-
var
|
|
2043
|
+
var o = !this.owned_ && st(), s = ce(this), l = s || o ? {
|
|
2042
2044
|
observableKind: "array",
|
|
2043
2045
|
object: this.proxy_,
|
|
2044
2046
|
debugObjectName: this.atom_.name_,
|
|
2045
|
-
type:
|
|
2047
|
+
type: ei,
|
|
2046
2048
|
index: n,
|
|
2047
2049
|
removed: a,
|
|
2048
2050
|
added: r,
|
|
2049
2051
|
removedCount: a.length,
|
|
2050
2052
|
addedCount: r.length
|
|
2051
2053
|
} : null;
|
|
2052
|
-
this.atom_.reportChanged(),
|
|
2054
|
+
this.atom_.reportChanged(), s && de(this, l);
|
|
2053
2055
|
}, t.get_ = function(n) {
|
|
2054
2056
|
if (this.legacyMode_ && n >= this.values_.length) {
|
|
2055
2057
|
console.warn("[mobx] Out of bounds read: " + n);
|
|
@@ -2060,21 +2062,21 @@ var Xn = "splice", ge = "update", ro = 1e4, ao = {
|
|
|
2060
2062
|
var a = this.values_;
|
|
2061
2063
|
if (this.legacyMode_ && n > a.length && W(17, n, a.length), n < a.length) {
|
|
2062
2064
|
this.atom_;
|
|
2063
|
-
var
|
|
2064
|
-
if (
|
|
2065
|
-
var
|
|
2065
|
+
var o = a[n];
|
|
2066
|
+
if (se(this)) {
|
|
2067
|
+
var s = ue(this, {
|
|
2066
2068
|
type: ge,
|
|
2067
2069
|
object: this.proxy_,
|
|
2068
2070
|
index: n,
|
|
2069
2071
|
newValue: r
|
|
2070
2072
|
});
|
|
2071
|
-
if (!
|
|
2073
|
+
if (!s)
|
|
2072
2074
|
return;
|
|
2073
|
-
r =
|
|
2075
|
+
r = s.newValue;
|
|
2074
2076
|
}
|
|
2075
|
-
r = this.enhancer_(r,
|
|
2076
|
-
var l = r !==
|
|
2077
|
-
l && (a[n] = r, this.notifyArrayChildUpdate_(n, r,
|
|
2077
|
+
r = this.enhancer_(r, o);
|
|
2078
|
+
var l = r !== o;
|
|
2079
|
+
l && (a[n] = r, this.notifyArrayChildUpdate_(n, r, o));
|
|
2078
2080
|
} else {
|
|
2079
2081
|
for (var c = new Array(n + 1 - a.length), f = 0; f < c.length - 1; f++)
|
|
2080
2082
|
c[f] = void 0;
|
|
@@ -2082,14 +2084,14 @@ var Xn = "splice", ge = "update", ro = 1e4, ao = {
|
|
|
2082
2084
|
}
|
|
2083
2085
|
}, e;
|
|
2084
2086
|
}();
|
|
2085
|
-
function
|
|
2086
|
-
i === void 0 && (i = "ObservableArray"), n === void 0 && (n = !1),
|
|
2087
|
-
var r = new
|
|
2088
|
-
|
|
2089
|
-
var a = new Proxy(r.values_,
|
|
2087
|
+
function ss(e, t, i, n) {
|
|
2088
|
+
i === void 0 && (i = "ObservableArray"), n === void 0 && (n = !1), Gi();
|
|
2089
|
+
var r = new Pn(i, t, n, !1);
|
|
2090
|
+
$i(r.values_, M, r);
|
|
2091
|
+
var a = new Proxy(r.values_, os);
|
|
2090
2092
|
if (r.proxy_ = a, e && e.length) {
|
|
2091
|
-
var
|
|
2092
|
-
r.spliceWithArray_(0, 0, e), St(
|
|
2093
|
+
var o = bt(!0);
|
|
2094
|
+
r.spliceWithArray_(0, 0, e), St(o);
|
|
2093
2095
|
}
|
|
2094
2096
|
return a;
|
|
2095
2097
|
}
|
|
@@ -2114,16 +2116,16 @@ var Gt = {
|
|
|
2114
2116
|
splice: function(t, i) {
|
|
2115
2117
|
for (var n = arguments.length, r = new Array(n > 2 ? n - 2 : 0), a = 2; a < n; a++)
|
|
2116
2118
|
r[a - 2] = arguments[a];
|
|
2117
|
-
var
|
|
2119
|
+
var o = this[M];
|
|
2118
2120
|
switch (arguments.length) {
|
|
2119
2121
|
case 0:
|
|
2120
2122
|
return [];
|
|
2121
2123
|
case 1:
|
|
2122
|
-
return
|
|
2124
|
+
return o.spliceWithArray_(t);
|
|
2123
2125
|
case 2:
|
|
2124
|
-
return
|
|
2126
|
+
return o.spliceWithArray_(t, i);
|
|
2125
2127
|
}
|
|
2126
|
-
return
|
|
2128
|
+
return o.spliceWithArray_(t, i, r);
|
|
2127
2129
|
},
|
|
2128
2130
|
spliceWithArray: function(t, i, n) {
|
|
2129
2131
|
return this[M].spliceWithArray_(t, i, n);
|
|
@@ -2174,8 +2176,8 @@ ee("flatMap", Le);
|
|
|
2174
2176
|
ee("forEach", Le);
|
|
2175
2177
|
ee("map", Le);
|
|
2176
2178
|
ee("some", Le);
|
|
2177
|
-
ee("reduce",
|
|
2178
|
-
ee("reduceRight",
|
|
2179
|
+
ee("reduce", Ar);
|
|
2180
|
+
ee("reduceRight", Ar);
|
|
2179
2181
|
function ee(e, t) {
|
|
2180
2182
|
typeof Array.prototype[e] == "function" && (Gt[e] = t(e));
|
|
2181
2183
|
}
|
|
@@ -2192,32 +2194,32 @@ function Le(e) {
|
|
|
2192
2194
|
var n = this, r = this[M];
|
|
2193
2195
|
r.atom_.reportObserved();
|
|
2194
2196
|
var a = r.dehanceValues_(r.values_);
|
|
2195
|
-
return a[e](function(
|
|
2196
|
-
return t.call(i,
|
|
2197
|
+
return a[e](function(o, s) {
|
|
2198
|
+
return t.call(i, o, s, n);
|
|
2197
2199
|
});
|
|
2198
2200
|
};
|
|
2199
2201
|
}
|
|
2200
|
-
function
|
|
2202
|
+
function Ar(e) {
|
|
2201
2203
|
return function() {
|
|
2202
2204
|
var t = this, i = this[M];
|
|
2203
2205
|
i.atom_.reportObserved();
|
|
2204
2206
|
var n = i.dehanceValues_(i.values_), r = arguments[0];
|
|
2205
|
-
return arguments[0] = function(a,
|
|
2206
|
-
return r(a,
|
|
2207
|
+
return arguments[0] = function(a, o, s) {
|
|
2208
|
+
return r(a, o, s, t);
|
|
2207
2209
|
}, n[e].apply(n, arguments);
|
|
2208
2210
|
};
|
|
2209
2211
|
}
|
|
2210
|
-
var
|
|
2212
|
+
var us = /* @__PURE__ */ Ve("ObservableArrayAdministration", Pn);
|
|
2211
2213
|
function Zt(e) {
|
|
2212
|
-
return Qt(e) &&
|
|
2214
|
+
return Qt(e) && us(e[M]);
|
|
2213
2215
|
}
|
|
2214
|
-
var
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
var
|
|
2216
|
+
var Fr, Cr, ls = {}, Ce = "add", zt = "delete";
|
|
2217
|
+
Fr = Symbol.iterator;
|
|
2218
|
+
Cr = Symbol.toStringTag;
|
|
2219
|
+
var Rr = /* @__PURE__ */ function() {
|
|
2218
2220
|
function e(i, n, r) {
|
|
2219
2221
|
var a = this;
|
|
2220
|
-
n === void 0 && (n = Qe), r === void 0 && (r = "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[M] =
|
|
2222
|
+
n === void 0 && (n = Qe), r === void 0 && (r = "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[M] = ls, this.data_ = void 0, this.hasMap_ = void 0, this.keysAtom_ = void 0, this.interceptors_ = void 0, this.changeListeners_ = void 0, this.dehancer = void 0, this.enhancer_ = n, this.name_ = r, he(Map) || W(18), this.keysAtom_ = Ji("ObservableMap.keys()"), this.data_ = /* @__PURE__ */ new Map(), this.hasMap_ = /* @__PURE__ */ new Map(), or(!0, function() {
|
|
2221
2223
|
a.merge(i);
|
|
2222
2224
|
});
|
|
2223
2225
|
}
|
|
@@ -2230,29 +2232,29 @@ var Cr = /* @__PURE__ */ function() {
|
|
|
2230
2232
|
return this.has_(n);
|
|
2231
2233
|
var a = this.hasMap_.get(n);
|
|
2232
2234
|
if (!a) {
|
|
2233
|
-
var
|
|
2234
|
-
this.hasMap_.set(n,
|
|
2235
|
+
var o = a = new ze(this.has_(n), qt, "ObservableMap.key?", !1);
|
|
2236
|
+
this.hasMap_.set(n, o), Nr(o, function() {
|
|
2235
2237
|
return r.hasMap_.delete(n);
|
|
2236
2238
|
});
|
|
2237
2239
|
}
|
|
2238
2240
|
return a.get();
|
|
2239
2241
|
}, t.set = function(n, r) {
|
|
2240
2242
|
var a = this.has_(n);
|
|
2241
|
-
if (
|
|
2242
|
-
var
|
|
2243
|
+
if (se(this)) {
|
|
2244
|
+
var o = ue(this, {
|
|
2243
2245
|
type: a ? ge : Ce,
|
|
2244
2246
|
object: this,
|
|
2245
2247
|
newValue: r,
|
|
2246
2248
|
name: n
|
|
2247
2249
|
});
|
|
2248
|
-
if (!
|
|
2250
|
+
if (!o)
|
|
2249
2251
|
return this;
|
|
2250
|
-
r =
|
|
2252
|
+
r = o.newValue;
|
|
2251
2253
|
}
|
|
2252
2254
|
return a ? this.updateValue_(n, r) : this.addValue_(n, r), this;
|
|
2253
2255
|
}, t.delete = function(n) {
|
|
2254
2256
|
var r = this;
|
|
2255
|
-
if (this.keysAtom_,
|
|
2257
|
+
if (this.keysAtom_, se(this)) {
|
|
2256
2258
|
var a = ue(this, {
|
|
2257
2259
|
type: zt,
|
|
2258
2260
|
object: this,
|
|
@@ -2262,7 +2264,7 @@ var Cr = /* @__PURE__ */ function() {
|
|
|
2262
2264
|
return !1;
|
|
2263
2265
|
}
|
|
2264
2266
|
if (this.has_(n)) {
|
|
2265
|
-
var
|
|
2267
|
+
var o = st(), s = ce(this), l = s || o ? {
|
|
2266
2268
|
observableKind: "map",
|
|
2267
2269
|
debugObjectName: this.name_,
|
|
2268
2270
|
type: zt,
|
|
@@ -2275,13 +2277,13 @@ var Cr = /* @__PURE__ */ function() {
|
|
|
2275
2277
|
r.keysAtom_.reportChanged(), (c = r.hasMap_.get(n)) == null || c.setNewValue_(!1);
|
|
2276
2278
|
var f = r.data_.get(n);
|
|
2277
2279
|
f.setNewValue_(void 0), r.data_.delete(n);
|
|
2278
|
-
}),
|
|
2280
|
+
}), s && de(this, l), !0;
|
|
2279
2281
|
}
|
|
2280
2282
|
return !1;
|
|
2281
2283
|
}, t.updateValue_ = function(n, r) {
|
|
2282
2284
|
var a = this.data_.get(n);
|
|
2283
2285
|
if (r = a.prepareNewValue_(r), r !== x.UNCHANGED) {
|
|
2284
|
-
var
|
|
2286
|
+
var o = st(), s = ce(this), l = s || o ? {
|
|
2285
2287
|
observableKind: "map",
|
|
2286
2288
|
debugObjectName: this.name_,
|
|
2287
2289
|
type: ge,
|
|
@@ -2290,7 +2292,7 @@ var Cr = /* @__PURE__ */ function() {
|
|
|
2290
2292
|
name: n,
|
|
2291
2293
|
newValue: r
|
|
2292
2294
|
} : null;
|
|
2293
|
-
a.setNewValue_(r),
|
|
2295
|
+
a.setNewValue_(r), s && de(this, l);
|
|
2294
2296
|
}
|
|
2295
2297
|
}, t.addValue_ = function(n, r) {
|
|
2296
2298
|
var a = this;
|
|
@@ -2298,7 +2300,7 @@ var Cr = /* @__PURE__ */ function() {
|
|
|
2298
2300
|
var c, f = new ze(r, a.enhancer_, "ObservableMap.key", !1);
|
|
2299
2301
|
a.data_.set(n, f), r = f.value_, (c = a.hasMap_.get(n)) == null || c.setNewValue_(!0), a.keysAtom_.reportChanged();
|
|
2300
2302
|
});
|
|
2301
|
-
var
|
|
2303
|
+
var o = st(), s = ce(this), l = s || o ? {
|
|
2302
2304
|
observableKind: "map",
|
|
2303
2305
|
debugObjectName: this.name_,
|
|
2304
2306
|
type: Ce,
|
|
@@ -2306,7 +2308,7 @@ var Cr = /* @__PURE__ */ function() {
|
|
|
2306
2308
|
name: n,
|
|
2307
2309
|
newValue: r
|
|
2308
2310
|
} : null;
|
|
2309
|
-
|
|
2311
|
+
s && de(this, l);
|
|
2310
2312
|
}, t.get = function(n) {
|
|
2311
2313
|
return this.has(n) ? this.dehanceValue_(this.data_.get(n).get()) : this.dehanceValue_(void 0);
|
|
2312
2314
|
}, t.dehanceValue_ = function(n) {
|
|
@@ -2317,10 +2319,10 @@ var Cr = /* @__PURE__ */ function() {
|
|
|
2317
2319
|
var n = this, r = this.keys();
|
|
2318
2320
|
return ft({
|
|
2319
2321
|
next: function() {
|
|
2320
|
-
var
|
|
2322
|
+
var o = r.next(), s = o.done, l = o.value;
|
|
2321
2323
|
return {
|
|
2322
|
-
done:
|
|
2323
|
-
value:
|
|
2324
|
+
done: s,
|
|
2325
|
+
value: s ? void 0 : n.get(l)
|
|
2324
2326
|
};
|
|
2325
2327
|
}
|
|
2326
2328
|
});
|
|
@@ -2328,18 +2330,18 @@ var Cr = /* @__PURE__ */ function() {
|
|
|
2328
2330
|
var n = this, r = this.keys();
|
|
2329
2331
|
return ft({
|
|
2330
2332
|
next: function() {
|
|
2331
|
-
var
|
|
2333
|
+
var o = r.next(), s = o.done, l = o.value;
|
|
2332
2334
|
return {
|
|
2333
|
-
done:
|
|
2334
|
-
value:
|
|
2335
|
+
done: s,
|
|
2336
|
+
value: s ? void 0 : [l, n.get(l)]
|
|
2335
2337
|
};
|
|
2336
2338
|
}
|
|
2337
2339
|
});
|
|
2338
|
-
}, t[
|
|
2340
|
+
}, t[Fr] = function() {
|
|
2339
2341
|
return this.entries();
|
|
2340
2342
|
}, t.forEach = function(n, r) {
|
|
2341
|
-
for (var a = Ge(this),
|
|
2342
|
-
var
|
|
2343
|
+
for (var a = Ge(this), o; !(o = a()).done; ) {
|
|
2344
|
+
var s = o.value, l = s[0], c = s[1];
|
|
2343
2345
|
n.call(r, c, l, this);
|
|
2344
2346
|
}
|
|
2345
2347
|
}, t.merge = function(n) {
|
|
@@ -2348,34 +2350,34 @@ var Cr = /* @__PURE__ */ function() {
|
|
|
2348
2350
|
Se(n) ? Va(n).forEach(function(a) {
|
|
2349
2351
|
return r.set(a, n[a]);
|
|
2350
2352
|
}) : Array.isArray(n) ? n.forEach(function(a) {
|
|
2351
|
-
var
|
|
2352
|
-
return r.set(
|
|
2353
|
-
}) : Ze(n) ? (n.constructor !== Map && W(19, n), n.forEach(function(a,
|
|
2354
|
-
return r.set(
|
|
2353
|
+
var o = a[0], s = a[1];
|
|
2354
|
+
return r.set(o, s);
|
|
2355
|
+
}) : Ze(n) ? (n.constructor !== Map && W(19, n), n.forEach(function(a, o) {
|
|
2356
|
+
return r.set(o, a);
|
|
2355
2357
|
})) : n != null && W(20, n);
|
|
2356
2358
|
}), this;
|
|
2357
2359
|
}, t.clear = function() {
|
|
2358
2360
|
var n = this;
|
|
2359
2361
|
ye(function() {
|
|
2360
|
-
|
|
2362
|
+
cr(function() {
|
|
2361
2363
|
for (var r = Ge(n.keys()), a; !(a = r()).done; ) {
|
|
2362
|
-
var
|
|
2363
|
-
n.delete(
|
|
2364
|
+
var o = a.value;
|
|
2365
|
+
n.delete(o);
|
|
2364
2366
|
}
|
|
2365
2367
|
});
|
|
2366
2368
|
});
|
|
2367
2369
|
}, t.replace = function(n) {
|
|
2368
2370
|
var r = this;
|
|
2369
2371
|
return ye(function() {
|
|
2370
|
-
for (var a =
|
|
2372
|
+
for (var a = cs(n), o = /* @__PURE__ */ new Map(), s = !1, l = Ge(r.data_.keys()), c; !(c = l()).done; ) {
|
|
2371
2373
|
var f = c.value;
|
|
2372
2374
|
if (!a.has(f)) {
|
|
2373
2375
|
var v = r.delete(f);
|
|
2374
2376
|
if (v)
|
|
2375
|
-
|
|
2377
|
+
s = !0;
|
|
2376
2378
|
else {
|
|
2377
2379
|
var O = r.data_.get(f);
|
|
2378
|
-
|
|
2380
|
+
o.set(f, O);
|
|
2379
2381
|
}
|
|
2380
2382
|
}
|
|
2381
2383
|
}
|
|
@@ -2383,21 +2385,21 @@ var Cr = /* @__PURE__ */ function() {
|
|
|
2383
2385
|
var b = R.value, _ = b[0], C = b[1], L = r.data_.has(_);
|
|
2384
2386
|
if (r.set(_, C), r.data_.has(_)) {
|
|
2385
2387
|
var U = r.data_.get(_);
|
|
2386
|
-
|
|
2388
|
+
o.set(_, U), L || (s = !0);
|
|
2387
2389
|
}
|
|
2388
2390
|
}
|
|
2389
|
-
if (!
|
|
2390
|
-
if (r.data_.size !==
|
|
2391
|
+
if (!s)
|
|
2392
|
+
if (r.data_.size !== o.size)
|
|
2391
2393
|
r.keysAtom_.reportChanged();
|
|
2392
2394
|
else
|
|
2393
|
-
for (var P = r.data_.keys(), z =
|
|
2395
|
+
for (var P = r.data_.keys(), z = o.keys(), Q = P.next(), Y = z.next(); !Q.done; ) {
|
|
2394
2396
|
if (Q.value !== Y.value) {
|
|
2395
2397
|
r.keysAtom_.reportChanged();
|
|
2396
2398
|
break;
|
|
2397
2399
|
}
|
|
2398
2400
|
Q = P.next(), Y = z.next();
|
|
2399
2401
|
}
|
|
2400
|
-
r.data_ =
|
|
2402
|
+
r.data_ = o;
|
|
2401
2403
|
}), this;
|
|
2402
2404
|
}, t.toString = function() {
|
|
2403
2405
|
return "[object ObservableMap]";
|
|
@@ -2407,19 +2409,19 @@ var Cr = /* @__PURE__ */ function() {
|
|
|
2407
2409
|
return wt(this, n);
|
|
2408
2410
|
}, t.intercept_ = function(n) {
|
|
2409
2411
|
return Ot(this, n);
|
|
2410
|
-
},
|
|
2412
|
+
}, Fn(e, [{
|
|
2411
2413
|
key: "size",
|
|
2412
2414
|
get: function() {
|
|
2413
2415
|
return this.keysAtom_.reportObserved(), this.data_.size;
|
|
2414
2416
|
}
|
|
2415
2417
|
}, {
|
|
2416
|
-
key:
|
|
2418
|
+
key: Cr,
|
|
2417
2419
|
get: function() {
|
|
2418
2420
|
return "Map";
|
|
2419
2421
|
}
|
|
2420
2422
|
}]), e;
|
|
2421
|
-
}(), je = /* @__PURE__ */ Ve("ObservableMap",
|
|
2422
|
-
function
|
|
2423
|
+
}(), je = /* @__PURE__ */ Ve("ObservableMap", Rr);
|
|
2424
|
+
function cs(e) {
|
|
2423
2425
|
if (Ze(e) || je(e))
|
|
2424
2426
|
return e;
|
|
2425
2427
|
if (Array.isArray(e))
|
|
@@ -2432,13 +2434,13 @@ function lo(e) {
|
|
|
2432
2434
|
} else
|
|
2433
2435
|
return W(21, e);
|
|
2434
2436
|
}
|
|
2435
|
-
var
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
var
|
|
2437
|
+
var Tr, Lr, ds = {};
|
|
2438
|
+
Tr = Symbol.iterator;
|
|
2439
|
+
Lr = Symbol.toStringTag;
|
|
2440
|
+
var xr = /* @__PURE__ */ function() {
|
|
2439
2441
|
function e(i, n, r) {
|
|
2440
|
-
n === void 0 && (n = Qe), r === void 0 && (r = "ObservableSet"), this.name_ = void 0, this[M] =
|
|
2441
|
-
return n(a,
|
|
2442
|
+
n === void 0 && (n = Qe), r === void 0 && (r = "ObservableSet"), this.name_ = void 0, this[M] = ds, this.data_ = /* @__PURE__ */ new Set(), this.atom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.dehancer = void 0, this.enhancer_ = void 0, this.name_ = r, he(Set) || W(22), this.atom_ = Ji(this.name_), this.enhancer_ = function(a, o) {
|
|
2443
|
+
return n(a, o, r);
|
|
2442
2444
|
}, i && this.replace(i);
|
|
2443
2445
|
}
|
|
2444
2446
|
var t = e.prototype;
|
|
@@ -2447,21 +2449,21 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2447
2449
|
}, t.clear = function() {
|
|
2448
2450
|
var n = this;
|
|
2449
2451
|
ye(function() {
|
|
2450
|
-
|
|
2452
|
+
cr(function() {
|
|
2451
2453
|
for (var r = Ge(n.data_.values()), a; !(a = r()).done; ) {
|
|
2452
|
-
var
|
|
2453
|
-
n.delete(
|
|
2454
|
+
var o = a.value;
|
|
2455
|
+
n.delete(o);
|
|
2454
2456
|
}
|
|
2455
2457
|
});
|
|
2456
2458
|
});
|
|
2457
2459
|
}, t.forEach = function(n, r) {
|
|
2458
|
-
for (var a = Ge(this),
|
|
2459
|
-
var
|
|
2460
|
-
n.call(r,
|
|
2460
|
+
for (var a = Ge(this), o; !(o = a()).done; ) {
|
|
2461
|
+
var s = o.value;
|
|
2462
|
+
n.call(r, s, s, this);
|
|
2461
2463
|
}
|
|
2462
2464
|
}, t.add = function(n) {
|
|
2463
2465
|
var r = this;
|
|
2464
|
-
if (this.atom_,
|
|
2466
|
+
if (this.atom_, se(this)) {
|
|
2465
2467
|
var a = ue(this, {
|
|
2466
2468
|
type: Ce,
|
|
2467
2469
|
object: this,
|
|
@@ -2474,19 +2476,19 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2474
2476
|
ye(function() {
|
|
2475
2477
|
r.data_.add(r.enhancer_(n, void 0)), r.atom_.reportChanged();
|
|
2476
2478
|
});
|
|
2477
|
-
var
|
|
2479
|
+
var o = !1, s = ce(this), l = s || o ? {
|
|
2478
2480
|
observableKind: "set",
|
|
2479
2481
|
debugObjectName: this.name_,
|
|
2480
2482
|
type: Ce,
|
|
2481
2483
|
object: this,
|
|
2482
2484
|
newValue: n
|
|
2483
2485
|
} : null;
|
|
2484
|
-
|
|
2486
|
+
s && de(this, l);
|
|
2485
2487
|
}
|
|
2486
2488
|
return this;
|
|
2487
2489
|
}, t.delete = function(n) {
|
|
2488
2490
|
var r = this;
|
|
2489
|
-
if (
|
|
2491
|
+
if (se(this)) {
|
|
2490
2492
|
var a = ue(this, {
|
|
2491
2493
|
type: zt,
|
|
2492
2494
|
object: this,
|
|
@@ -2496,7 +2498,7 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2496
2498
|
return !1;
|
|
2497
2499
|
}
|
|
2498
2500
|
if (this.has(n)) {
|
|
2499
|
-
var
|
|
2501
|
+
var o = !1, s = ce(this), l = s || o ? {
|
|
2500
2502
|
observableKind: "set",
|
|
2501
2503
|
debugObjectName: this.name_,
|
|
2502
2504
|
type: zt,
|
|
@@ -2505,7 +2507,7 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2505
2507
|
} : null;
|
|
2506
2508
|
return ye(function() {
|
|
2507
2509
|
r.atom_.reportChanged(), r.data_.delete(n);
|
|
2508
|
-
}),
|
|
2510
|
+
}), s && de(this, l), !0;
|
|
2509
2511
|
}
|
|
2510
2512
|
return !1;
|
|
2511
2513
|
}, t.has = function(n) {
|
|
@@ -2514,9 +2516,9 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2514
2516
|
var n = 0, r = Array.from(this.keys()), a = Array.from(this.values());
|
|
2515
2517
|
return ft({
|
|
2516
2518
|
next: function() {
|
|
2517
|
-
var
|
|
2518
|
-
return n += 1,
|
|
2519
|
-
value: [r[
|
|
2519
|
+
var s = n;
|
|
2520
|
+
return n += 1, s < a.length ? {
|
|
2521
|
+
value: [r[s], a[s]],
|
|
2520
2522
|
done: !1
|
|
2521
2523
|
} : {
|
|
2522
2524
|
done: !0
|
|
@@ -2555,22 +2557,22 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2555
2557
|
return Array.from(this);
|
|
2556
2558
|
}, t.toString = function() {
|
|
2557
2559
|
return "[object ObservableSet]";
|
|
2558
|
-
}, t[
|
|
2560
|
+
}, t[Tr] = function() {
|
|
2559
2561
|
return this.values();
|
|
2560
|
-
},
|
|
2562
|
+
}, Fn(e, [{
|
|
2561
2563
|
key: "size",
|
|
2562
2564
|
get: function() {
|
|
2563
2565
|
return this.atom_.reportObserved(), this.data_.size;
|
|
2564
2566
|
}
|
|
2565
2567
|
}, {
|
|
2566
|
-
key:
|
|
2568
|
+
key: Lr,
|
|
2567
2569
|
get: function() {
|
|
2568
2570
|
return "Set";
|
|
2569
2571
|
}
|
|
2570
2572
|
}]), e;
|
|
2571
|
-
}(), Ye = /* @__PURE__ */ Ve("ObservableSet",
|
|
2573
|
+
}(), Ye = /* @__PURE__ */ Ve("ObservableSet", xr), ti = /* @__PURE__ */ Object.create(null), ni = "remove", Pr = /* @__PURE__ */ function() {
|
|
2572
2574
|
function e(i, n, r, a) {
|
|
2573
|
-
n === void 0 && (n = /* @__PURE__ */ new Map()), a === void 0 && (a =
|
|
2575
|
+
n === void 0 && (n = /* @__PURE__ */ new Map()), a === void 0 && (a = co), this.target_ = void 0, this.values_ = void 0, this.name_ = void 0, this.defaultAnnotation_ = void 0, this.keysAtom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.proxy_ = void 0, this.isPlainObject_ = void 0, this.appliedAnnotations_ = void 0, this.pendingKeys_ = void 0, this.target_ = i, this.values_ = n, this.name_ = r, this.defaultAnnotation_ = a, this.keysAtom_ = new yt("ObservableObject.keys"), this.isPlainObject_ = Se(this.target_);
|
|
2574
2576
|
}
|
|
2575
2577
|
var t = e.prototype;
|
|
2576
2578
|
return t.getObservablePropValue_ = function(n) {
|
|
@@ -2579,19 +2581,19 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2579
2581
|
var a = this.values_.get(n);
|
|
2580
2582
|
if (a instanceof ut)
|
|
2581
2583
|
return a.set(r), !0;
|
|
2582
|
-
if (
|
|
2583
|
-
var
|
|
2584
|
+
if (se(this)) {
|
|
2585
|
+
var o = ue(this, {
|
|
2584
2586
|
type: ge,
|
|
2585
2587
|
object: this.proxy_ || this.target_,
|
|
2586
2588
|
name: n,
|
|
2587
2589
|
newValue: r
|
|
2588
2590
|
});
|
|
2589
|
-
if (!
|
|
2591
|
+
if (!o)
|
|
2590
2592
|
return null;
|
|
2591
|
-
r =
|
|
2593
|
+
r = o.newValue;
|
|
2592
2594
|
}
|
|
2593
2595
|
if (r = a.prepareNewValue_(r), r !== x.UNCHANGED) {
|
|
2594
|
-
var
|
|
2596
|
+
var s = ce(this), l = !1, c = s || l ? {
|
|
2595
2597
|
type: ge,
|
|
2596
2598
|
observableKind: "object",
|
|
2597
2599
|
debugObjectName: this.name_,
|
|
@@ -2600,7 +2602,7 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2600
2602
|
name: n,
|
|
2601
2603
|
newValue: r
|
|
2602
2604
|
} : null;
|
|
2603
|
-
a.setNewValue_(r),
|
|
2605
|
+
a.setNewValue_(r), s && de(this, c);
|
|
2604
2606
|
}
|
|
2605
2607
|
return !0;
|
|
2606
2608
|
}, t.get_ = function(n) {
|
|
@@ -2626,41 +2628,41 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2626
2628
|
return;
|
|
2627
2629
|
W(1, r.annotationType_, this.name_ + "." + n.toString());
|
|
2628
2630
|
}
|
|
2629
|
-
for (var
|
|
2630
|
-
var
|
|
2631
|
-
if (
|
|
2632
|
-
var l = r.make_(this, n,
|
|
2631
|
+
for (var o = this.target_; o && o !== Wt; ) {
|
|
2632
|
+
var s = It(o, n);
|
|
2633
|
+
if (s) {
|
|
2634
|
+
var l = r.make_(this, n, s, o);
|
|
2633
2635
|
if (l === 0)
|
|
2634
2636
|
return;
|
|
2635
2637
|
if (l === 1)
|
|
2636
2638
|
break;
|
|
2637
2639
|
}
|
|
2638
|
-
|
|
2640
|
+
o = Object.getPrototypeOf(o);
|
|
2639
2641
|
}
|
|
2640
|
-
|
|
2642
|
+
ri(this, r, n);
|
|
2641
2643
|
}
|
|
2642
|
-
}, t.extend_ = function(n, r, a,
|
|
2643
|
-
if (
|
|
2644
|
-
return this.defineProperty_(n, r,
|
|
2645
|
-
var
|
|
2646
|
-
return
|
|
2644
|
+
}, t.extend_ = function(n, r, a, o) {
|
|
2645
|
+
if (o === void 0 && (o = !1), a === !0 && (a = this.defaultAnnotation_), a === !1)
|
|
2646
|
+
return this.defineProperty_(n, r, o);
|
|
2647
|
+
var s = a.extend_(this, n, r, o);
|
|
2648
|
+
return s && ri(this, a, n), s;
|
|
2647
2649
|
}, t.defineProperty_ = function(n, r, a) {
|
|
2648
2650
|
a === void 0 && (a = !1);
|
|
2649
2651
|
try {
|
|
2650
2652
|
ae();
|
|
2651
|
-
var
|
|
2652
|
-
if (!
|
|
2653
|
-
return
|
|
2654
|
-
if (
|
|
2655
|
-
var
|
|
2653
|
+
var o = this.delete_(n);
|
|
2654
|
+
if (!o)
|
|
2655
|
+
return o;
|
|
2656
|
+
if (se(this)) {
|
|
2657
|
+
var s = ue(this, {
|
|
2656
2658
|
object: this.proxy_ || this.target_,
|
|
2657
2659
|
name: n,
|
|
2658
2660
|
type: Ce,
|
|
2659
2661
|
newValue: r.value
|
|
2660
2662
|
});
|
|
2661
|
-
if (!
|
|
2663
|
+
if (!s)
|
|
2662
2664
|
return null;
|
|
2663
|
-
var l =
|
|
2665
|
+
var l = s.newValue;
|
|
2664
2666
|
r.value !== l && (r = $e({}, r, {
|
|
2665
2667
|
value: l
|
|
2666
2668
|
}));
|
|
@@ -2672,17 +2674,17 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2672
2674
|
ve(this.target_, n, r);
|
|
2673
2675
|
this.notifyPropertyAddition_(n, r.value);
|
|
2674
2676
|
} finally {
|
|
2675
|
-
|
|
2677
|
+
oe();
|
|
2676
2678
|
}
|
|
2677
2679
|
return !0;
|
|
2678
|
-
}, t.defineObservableProperty_ = function(n, r, a,
|
|
2679
|
-
|
|
2680
|
+
}, t.defineObservableProperty_ = function(n, r, a, o) {
|
|
2681
|
+
o === void 0 && (o = !1);
|
|
2680
2682
|
try {
|
|
2681
2683
|
ae();
|
|
2682
|
-
var
|
|
2683
|
-
if (!
|
|
2684
|
-
return
|
|
2685
|
-
if (
|
|
2684
|
+
var s = this.delete_(n);
|
|
2685
|
+
if (!s)
|
|
2686
|
+
return s;
|
|
2687
|
+
if (se(this)) {
|
|
2686
2688
|
var l = ue(this, {
|
|
2687
2689
|
object: this.proxy_ || this.target_,
|
|
2688
2690
|
name: n,
|
|
@@ -2693,13 +2695,13 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2693
2695
|
return null;
|
|
2694
2696
|
r = l.newValue;
|
|
2695
2697
|
}
|
|
2696
|
-
var c =
|
|
2698
|
+
var c = ii(n), f = {
|
|
2697
2699
|
configurable: x.safeDescriptors ? this.isPlainObject_ : !0,
|
|
2698
2700
|
enumerable: !0,
|
|
2699
2701
|
get: c.get,
|
|
2700
2702
|
set: c.set
|
|
2701
2703
|
};
|
|
2702
|
-
if (
|
|
2704
|
+
if (o) {
|
|
2703
2705
|
if (!Reflect.defineProperty(this.target_, n, f))
|
|
2704
2706
|
return !1;
|
|
2705
2707
|
} else
|
|
@@ -2707,28 +2709,28 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2707
2709
|
var v = new ze(r, a, "ObservableObject.key", !1);
|
|
2708
2710
|
this.values_.set(n, v), this.notifyPropertyAddition_(n, v.value_);
|
|
2709
2711
|
} finally {
|
|
2710
|
-
|
|
2712
|
+
oe();
|
|
2711
2713
|
}
|
|
2712
2714
|
return !0;
|
|
2713
2715
|
}, t.defineComputedProperty_ = function(n, r, a) {
|
|
2714
2716
|
a === void 0 && (a = !1);
|
|
2715
2717
|
try {
|
|
2716
2718
|
ae();
|
|
2717
|
-
var
|
|
2718
|
-
if (!
|
|
2719
|
-
return
|
|
2720
|
-
if (
|
|
2721
|
-
var
|
|
2719
|
+
var o = this.delete_(n);
|
|
2720
|
+
if (!o)
|
|
2721
|
+
return o;
|
|
2722
|
+
if (se(this)) {
|
|
2723
|
+
var s = ue(this, {
|
|
2722
2724
|
object: this.proxy_ || this.target_,
|
|
2723
2725
|
name: n,
|
|
2724
2726
|
type: Ce,
|
|
2725
2727
|
newValue: void 0
|
|
2726
2728
|
});
|
|
2727
|
-
if (!
|
|
2729
|
+
if (!s)
|
|
2728
2730
|
return null;
|
|
2729
2731
|
}
|
|
2730
2732
|
r.name || (r.name = "ObservableObject.key"), r.context = this.proxy_ || this.target_;
|
|
2731
|
-
var l =
|
|
2733
|
+
var l = ii(n), c = {
|
|
2732
2734
|
configurable: x.safeDescriptors ? this.isPlainObject_ : !0,
|
|
2733
2735
|
enumerable: !1,
|
|
2734
2736
|
get: l.get,
|
|
@@ -2741,23 +2743,23 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2741
2743
|
ve(this.target_, n, c);
|
|
2742
2744
|
this.values_.set(n, new ut(r)), this.notifyPropertyAddition_(n, void 0);
|
|
2743
2745
|
} finally {
|
|
2744
|
-
|
|
2746
|
+
oe();
|
|
2745
2747
|
}
|
|
2746
2748
|
return !0;
|
|
2747
2749
|
}, t.delete_ = function(n, r) {
|
|
2748
2750
|
if (r === void 0 && (r = !1), !be(this.target_, n))
|
|
2749
2751
|
return !0;
|
|
2750
|
-
if (
|
|
2752
|
+
if (se(this)) {
|
|
2751
2753
|
var a = ue(this, {
|
|
2752
2754
|
object: this.proxy_ || this.target_,
|
|
2753
2755
|
name: n,
|
|
2754
|
-
type:
|
|
2756
|
+
type: ni
|
|
2755
2757
|
});
|
|
2756
2758
|
if (!a)
|
|
2757
2759
|
return null;
|
|
2758
2760
|
}
|
|
2759
2761
|
try {
|
|
2760
|
-
var
|
|
2762
|
+
var o, s;
|
|
2761
2763
|
ae();
|
|
2762
2764
|
var l = ce(this), c = !1, f = this.values_.get(n), v = void 0;
|
|
2763
2765
|
if (!f && (l || c)) {
|
|
@@ -2769,9 +2771,9 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2769
2771
|
return !1;
|
|
2770
2772
|
} else
|
|
2771
2773
|
delete this.target_[n];
|
|
2772
|
-
if (f && (this.values_.delete(n), f instanceof ze && (v = f.value_),
|
|
2774
|
+
if (f && (this.values_.delete(n), f instanceof ze && (v = f.value_), vr(f)), this.keysAtom_.reportChanged(), (o = this.pendingKeys_) == null || (s = o.get(n)) == null || s.set(n in this.target_), l || c) {
|
|
2773
2775
|
var A = {
|
|
2774
|
-
type:
|
|
2776
|
+
type: ni,
|
|
2775
2777
|
observableKind: "object",
|
|
2776
2778
|
object: this.proxy_ || this.target_,
|
|
2777
2779
|
debugObjectName: this.name_,
|
|
@@ -2781,7 +2783,7 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2781
2783
|
l && de(this, A);
|
|
2782
2784
|
}
|
|
2783
2785
|
} finally {
|
|
2784
|
-
|
|
2786
|
+
oe();
|
|
2785
2787
|
}
|
|
2786
2788
|
return !0;
|
|
2787
2789
|
}, t.observe_ = function(n, r) {
|
|
@@ -2789,9 +2791,9 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2789
2791
|
}, t.intercept_ = function(n) {
|
|
2790
2792
|
return Ot(this, n);
|
|
2791
2793
|
}, t.notifyPropertyAddition_ = function(n, r) {
|
|
2792
|
-
var a,
|
|
2793
|
-
if (
|
|
2794
|
-
var c =
|
|
2794
|
+
var a, o, s = ce(this), l = !1;
|
|
2795
|
+
if (s || l) {
|
|
2796
|
+
var c = s || l ? {
|
|
2795
2797
|
type: Ce,
|
|
2796
2798
|
observableKind: "object",
|
|
2797
2799
|
debugObjectName: this.name_,
|
|
@@ -2799,9 +2801,9 @@ var Lr = /* @__PURE__ */ function() {
|
|
|
2799
2801
|
name: n,
|
|
2800
2802
|
newValue: r
|
|
2801
2803
|
} : null;
|
|
2802
|
-
|
|
2804
|
+
s && de(this, c);
|
|
2803
2805
|
}
|
|
2804
|
-
(a = this.pendingKeys_) == null || (
|
|
2806
|
+
(a = this.pendingKeys_) == null || (o = a.get(n)) == null || o.set(!0), this.keysAtom_.reportChanged();
|
|
2805
2807
|
}, t.ownKeys_ = function() {
|
|
2806
2808
|
return this.keysAtom_.reportObserved(), Ke(this.target_);
|
|
2807
2809
|
}, t.keys_ = function() {
|
|
@@ -2812,12 +2814,12 @@ function Et(e, t) {
|
|
|
2812
2814
|
var i;
|
|
2813
2815
|
if (be(e, M))
|
|
2814
2816
|
return e;
|
|
2815
|
-
var n = (i = t == null ? void 0 : t.name) != null ? i : "ObservableObject", r = new
|
|
2817
|
+
var n = (i = t == null ? void 0 : t.name) != null ? i : "ObservableObject", r = new Pr(e, /* @__PURE__ */ new Map(), String(n), bo(t));
|
|
2816
2818
|
return pt(e, M, r), e;
|
|
2817
2819
|
}
|
|
2818
|
-
var
|
|
2819
|
-
function
|
|
2820
|
-
return
|
|
2820
|
+
var fs = /* @__PURE__ */ Ve("ObservableObjectAdministration", Pr);
|
|
2821
|
+
function ii(e) {
|
|
2822
|
+
return ti[e] || (ti[e] = {
|
|
2821
2823
|
get: function() {
|
|
2822
2824
|
return this[M].getObservablePropValue_(e);
|
|
2823
2825
|
},
|
|
@@ -2827,48 +2829,48 @@ function ti(e) {
|
|
|
2827
2829
|
});
|
|
2828
2830
|
}
|
|
2829
2831
|
function dt(e) {
|
|
2830
|
-
return Qt(e) ?
|
|
2832
|
+
return Qt(e) ? fs(e[M]) : !1;
|
|
2831
2833
|
}
|
|
2832
|
-
function
|
|
2834
|
+
function ri(e, t, i) {
|
|
2833
2835
|
var n;
|
|
2834
2836
|
(n = e.target_[me]) == null || delete n[i];
|
|
2835
2837
|
}
|
|
2836
|
-
var
|
|
2838
|
+
var hs = /* @__PURE__ */ Ir(0), hn = 0, Dr = function() {
|
|
2837
2839
|
};
|
|
2838
|
-
function
|
|
2840
|
+
function ms(e, t) {
|
|
2839
2841
|
Object.setPrototypeOf ? Object.setPrototypeOf(e.prototype, t) : e.prototype.__proto__ !== void 0 ? e.prototype.__proto__ = t : e.prototype = t;
|
|
2840
2842
|
}
|
|
2841
|
-
|
|
2842
|
-
var
|
|
2843
|
-
|
|
2844
|
-
function n(a,
|
|
2843
|
+
ms(Dr, Array.prototype);
|
|
2844
|
+
var Dn = /* @__PURE__ */ function(e, t, i) {
|
|
2845
|
+
qi(n, e);
|
|
2846
|
+
function n(a, o, s, l) {
|
|
2845
2847
|
var c;
|
|
2846
|
-
|
|
2847
|
-
var f = new
|
|
2848
|
-
if (f.proxy_ = ln(c),
|
|
2848
|
+
s === void 0 && (s = "ObservableArray"), l === void 0 && (l = !1), c = e.call(this) || this;
|
|
2849
|
+
var f = new Pn(s, o, l, !0);
|
|
2850
|
+
if (f.proxy_ = ln(c), $i(ln(c), M, f), a && a.length) {
|
|
2849
2851
|
var v = bt(!0);
|
|
2850
2852
|
c.spliceWithArray(0, 0, a), St(v);
|
|
2851
2853
|
}
|
|
2852
|
-
return Object.defineProperty(ln(c), "0",
|
|
2854
|
+
return Object.defineProperty(ln(c), "0", hs), c;
|
|
2853
2855
|
}
|
|
2854
2856
|
var r = n.prototype;
|
|
2855
2857
|
return r.concat = function() {
|
|
2856
2858
|
this[M].atom_.reportObserved();
|
|
2857
|
-
for (var
|
|
2858
|
-
|
|
2859
|
+
for (var o = arguments.length, s = new Array(o), l = 0; l < o; l++)
|
|
2860
|
+
s[l] = arguments[l];
|
|
2859
2861
|
return Array.prototype.concat.apply(
|
|
2860
2862
|
this.slice(),
|
|
2861
2863
|
//@ts-ignore
|
|
2862
|
-
|
|
2864
|
+
s.map(function(c) {
|
|
2863
2865
|
return Zt(c) ? c.slice() : c;
|
|
2864
2866
|
})
|
|
2865
2867
|
);
|
|
2866
2868
|
}, r[i] = function() {
|
|
2867
|
-
var a = this,
|
|
2869
|
+
var a = this, o = 0;
|
|
2868
2870
|
return ft({
|
|
2869
2871
|
next: function() {
|
|
2870
|
-
return
|
|
2871
|
-
value: a[
|
|
2872
|
+
return o < a.length ? {
|
|
2873
|
+
value: a[o++],
|
|
2872
2874
|
done: !1
|
|
2873
2875
|
} : {
|
|
2874
2876
|
done: !0,
|
|
@@ -2876,13 +2878,13 @@ var Pn = /* @__PURE__ */ function(e, t, i) {
|
|
|
2876
2878
|
};
|
|
2877
2879
|
}
|
|
2878
2880
|
});
|
|
2879
|
-
},
|
|
2881
|
+
}, Fn(n, [{
|
|
2880
2882
|
key: "length",
|
|
2881
2883
|
get: function() {
|
|
2882
2884
|
return this[M].getArrayLength_();
|
|
2883
2885
|
},
|
|
2884
|
-
set: function(
|
|
2885
|
-
this[M].setArrayLength_(
|
|
2886
|
+
set: function(o) {
|
|
2887
|
+
this[M].setArrayLength_(o);
|
|
2886
2888
|
}
|
|
2887
2889
|
}, {
|
|
2888
2890
|
key: t,
|
|
@@ -2890,12 +2892,12 @@ var Pn = /* @__PURE__ */ function(e, t, i) {
|
|
|
2890
2892
|
return "Array";
|
|
2891
2893
|
}
|
|
2892
2894
|
}]), n;
|
|
2893
|
-
}(
|
|
2895
|
+
}(Dr, Symbol.toStringTag, Symbol.iterator);
|
|
2894
2896
|
Object.entries(Gt).forEach(function(e) {
|
|
2895
2897
|
var t = e[0], i = e[1];
|
|
2896
|
-
t !== "concat" && pt(
|
|
2898
|
+
t !== "concat" && pt(Dn.prototype, t, i);
|
|
2897
2899
|
});
|
|
2898
|
-
function
|
|
2900
|
+
function Ir(e) {
|
|
2899
2901
|
return {
|
|
2900
2902
|
enumerable: !1,
|
|
2901
2903
|
configurable: !0,
|
|
@@ -2907,19 +2909,19 @@ function Dr(e) {
|
|
|
2907
2909
|
}
|
|
2908
2910
|
};
|
|
2909
2911
|
}
|
|
2910
|
-
function
|
|
2911
|
-
ve(
|
|
2912
|
+
function vs(e) {
|
|
2913
|
+
ve(Dn.prototype, "" + e, Ir(e));
|
|
2912
2914
|
}
|
|
2913
|
-
function
|
|
2915
|
+
function Vr(e) {
|
|
2914
2916
|
if (e > hn) {
|
|
2915
2917
|
for (var t = hn; t < e + 100; t++)
|
|
2916
|
-
|
|
2918
|
+
vs(t);
|
|
2917
2919
|
hn = e;
|
|
2918
2920
|
}
|
|
2919
2921
|
}
|
|
2920
|
-
|
|
2921
|
-
function
|
|
2922
|
-
return new
|
|
2922
|
+
Vr(1e3);
|
|
2923
|
+
function ps(e, t, i) {
|
|
2924
|
+
return new Dn(e, t, i);
|
|
2923
2925
|
}
|
|
2924
2926
|
function De(e, t) {
|
|
2925
2927
|
if (typeof e == "object" && e !== null) {
|
|
@@ -2939,16 +2941,16 @@ function De(e, t) {
|
|
|
2939
2941
|
var n = e[M].values_.get(t);
|
|
2940
2942
|
return n || W(27, t, _n(e)), n;
|
|
2941
2943
|
}
|
|
2942
|
-
if (
|
|
2944
|
+
if (Cn(e) || Ht(e) || Mt(e))
|
|
2943
2945
|
return e;
|
|
2944
2946
|
} else if (he(e) && Mt(e[M]))
|
|
2945
2947
|
return e[M];
|
|
2946
2948
|
W(28);
|
|
2947
2949
|
}
|
|
2948
|
-
function
|
|
2950
|
+
function jr(e, t) {
|
|
2949
2951
|
if (e || W(29), t !== void 0)
|
|
2950
|
-
return
|
|
2951
|
-
if (
|
|
2952
|
+
return jr(De(e, t));
|
|
2953
|
+
if (Cn(e) || Ht(e) || Mt(e) || je(e) || Ye(e))
|
|
2952
2954
|
return e;
|
|
2953
2955
|
if (e[M])
|
|
2954
2956
|
return e[M];
|
|
@@ -2959,14 +2961,14 @@ function _n(e, t) {
|
|
|
2959
2961
|
if (t !== void 0)
|
|
2960
2962
|
i = De(e, t);
|
|
2961
2963
|
else {
|
|
2962
|
-
if (
|
|
2964
|
+
if (Ln(e))
|
|
2963
2965
|
return e.name;
|
|
2964
|
-
dt(e) || je(e) || Ye(e) ? i =
|
|
2966
|
+
dt(e) || je(e) || Ye(e) ? i = jr(e) : i = De(e);
|
|
2965
2967
|
}
|
|
2966
2968
|
return i.name_;
|
|
2967
2969
|
}
|
|
2968
|
-
var
|
|
2969
|
-
function
|
|
2970
|
+
var ai = Wt.toString;
|
|
2971
|
+
function In(e, t, i) {
|
|
2970
2972
|
return i === void 0 && (i = -1), bn(e, t, i);
|
|
2971
2973
|
}
|
|
2972
2974
|
function bn(e, t, i, n, r) {
|
|
@@ -2979,10 +2981,10 @@ function bn(e, t, i, n, r) {
|
|
|
2979
2981
|
var a = typeof e;
|
|
2980
2982
|
if (a !== "function" && a !== "object" && typeof t != "object")
|
|
2981
2983
|
return !1;
|
|
2982
|
-
var
|
|
2983
|
-
if (
|
|
2984
|
+
var o = ai.call(e);
|
|
2985
|
+
if (o !== ai.call(t))
|
|
2984
2986
|
return !1;
|
|
2985
|
-
switch (
|
|
2987
|
+
switch (o) {
|
|
2986
2988
|
case "[object RegExp]":
|
|
2987
2989
|
case "[object String]":
|
|
2988
2990
|
return "" + e == "" + t;
|
|
@@ -2998,9 +3000,9 @@ function bn(e, t, i, n, r) {
|
|
|
2998
3000
|
i >= 0 && i++;
|
|
2999
3001
|
break;
|
|
3000
3002
|
}
|
|
3001
|
-
e =
|
|
3002
|
-
var
|
|
3003
|
-
if (!
|
|
3003
|
+
e = oi(e), t = oi(t);
|
|
3004
|
+
var s = o === "[object Array]";
|
|
3005
|
+
if (!s) {
|
|
3004
3006
|
if (typeof e != "object" || typeof t != "object")
|
|
3005
3007
|
return !1;
|
|
3006
3008
|
var l = e.constructor, c = t.constructor;
|
|
@@ -3013,7 +3015,7 @@ function bn(e, t, i, n, r) {
|
|
|
3013
3015
|
for (var f = n.length; f--; )
|
|
3014
3016
|
if (n[f] === e)
|
|
3015
3017
|
return r[f] === t;
|
|
3016
|
-
if (n.push(e), r.push(t),
|
|
3018
|
+
if (n.push(e), r.push(t), s) {
|
|
3017
3019
|
if (f = e.length, f !== t.length)
|
|
3018
3020
|
return !1;
|
|
3019
3021
|
for (; f--; )
|
|
@@ -3029,21 +3031,21 @@ function bn(e, t, i, n, r) {
|
|
|
3029
3031
|
}
|
|
3030
3032
|
return n.pop(), r.pop(), !0;
|
|
3031
3033
|
}
|
|
3032
|
-
function
|
|
3034
|
+
function oi(e) {
|
|
3033
3035
|
return Zt(e) ? e.slice() : Ze(e) || je(e) || gt(e) || Ye(e) ? Array.from(e.entries()) : e;
|
|
3034
3036
|
}
|
|
3035
3037
|
function ft(e) {
|
|
3036
|
-
return e[Symbol.iterator] =
|
|
3038
|
+
return e[Symbol.iterator] = gs, e;
|
|
3037
3039
|
}
|
|
3038
|
-
function
|
|
3040
|
+
function gs() {
|
|
3039
3041
|
return this;
|
|
3040
3042
|
}
|
|
3041
3043
|
["Symbol", "Map", "Set"].forEach(function(e) {
|
|
3042
|
-
var t =
|
|
3044
|
+
var t = Mi();
|
|
3043
3045
|
typeof t[e] == "undefined" && W("MobX requires global '" + e + "' to be available or polyfilled");
|
|
3044
3046
|
});
|
|
3045
3047
|
typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({
|
|
3046
|
-
spy:
|
|
3048
|
+
spy: jo,
|
|
3047
3049
|
extras: {
|
|
3048
3050
|
getDebugName: _n
|
|
3049
3051
|
},
|
|
@@ -3061,7 +3063,7 @@ class Xt extends Error {
|
|
|
3061
3063
|
};
|
|
3062
3064
|
}
|
|
3063
3065
|
}
|
|
3064
|
-
class
|
|
3066
|
+
class ks extends Xt {
|
|
3065
3067
|
constructor(t) {
|
|
3066
3068
|
super(
|
|
3067
3069
|
"RESOURCE_NOT_FOUND_ERROR",
|
|
@@ -3070,7 +3072,7 @@ class ko extends Xt {
|
|
|
3070
3072
|
);
|
|
3071
3073
|
}
|
|
3072
3074
|
}
|
|
3073
|
-
class
|
|
3075
|
+
class ys extends Xt {
|
|
3074
3076
|
constructor(t) {
|
|
3075
3077
|
var i;
|
|
3076
3078
|
super(
|
|
@@ -3085,7 +3087,7 @@ class rc extends Xt {
|
|
|
3085
3087
|
super("APP_ACCOUNT_INVALID_ERROR", "Account not defined");
|
|
3086
3088
|
}
|
|
3087
3089
|
}
|
|
3088
|
-
class
|
|
3090
|
+
class _s extends Xt {
|
|
3089
3091
|
constructor(t) {
|
|
3090
3092
|
super(
|
|
3091
3093
|
"INVALID_NIZZA_GLOBAL_OBJECT_ERROR",
|
|
@@ -3113,18 +3115,18 @@ class _o extends Xt {
|
|
|
3113
3115
|
);
|
|
3114
3116
|
}
|
|
3115
3117
|
}
|
|
3116
|
-
const
|
|
3118
|
+
const bs = ["account"];
|
|
3117
3119
|
function rt() {
|
|
3118
|
-
|
|
3120
|
+
bs.forEach((e) => {
|
|
3119
3121
|
if (e === void 0)
|
|
3120
|
-
throw new
|
|
3122
|
+
throw new _s(e);
|
|
3121
3123
|
});
|
|
3122
3124
|
}
|
|
3123
|
-
class
|
|
3125
|
+
class Ss {
|
|
3124
3126
|
constructor() {
|
|
3125
3127
|
G(this, "_config", null);
|
|
3126
3128
|
G(this, "_account");
|
|
3127
|
-
|
|
3129
|
+
rs(
|
|
3128
3130
|
this,
|
|
3129
3131
|
{},
|
|
3130
3132
|
{ name: "NizzaConfigManager", autoBind: !0 }
|
|
@@ -3155,7 +3157,7 @@ class So {
|
|
|
3155
3157
|
this._account = t;
|
|
3156
3158
|
}
|
|
3157
3159
|
}
|
|
3158
|
-
var
|
|
3160
|
+
var Ur = { exports: {} };
|
|
3159
3161
|
/*!
|
|
3160
3162
|
* EventEmitter2
|
|
3161
3163
|
* https://github.com/hij1nx/EventEmitter2
|
|
@@ -3167,7 +3169,7 @@ var jr = { exports: {} };
|
|
|
3167
3169
|
(function(i) {
|
|
3168
3170
|
var n = Object.hasOwnProperty, r = Array.isArray ? Array.isArray : function(d) {
|
|
3169
3171
|
return Object.prototype.toString.call(d) === "[object Array]";
|
|
3170
|
-
}, a = 10,
|
|
3172
|
+
}, a = 10, o = typeof process == "object" && typeof process.nextTick == "function", s = typeof Symbol == "function", l = typeof Reflect == "object", c = typeof setImmediate == "function", f = c ? setImmediate : setTimeout, v = s ? l && typeof Reflect.ownKeys == "function" ? Reflect.ownKeys : function(u) {
|
|
3171
3173
|
var d = Object.getOwnPropertyNames(u);
|
|
3172
3174
|
return d.push.apply(d, Object.getOwnPropertySymbols(u)), d;
|
|
3173
3175
|
} : Object.keys;
|
|
@@ -3441,7 +3443,7 @@ var jr = { exports: {} };
|
|
|
3441
3443
|
}
|
|
3442
3444
|
if (m || y || p) {
|
|
3443
3445
|
var E = d, N = d._origin || d;
|
|
3444
|
-
if (y && !
|
|
3446
|
+
if (y && !o)
|
|
3445
3447
|
throw Error("process.nextTick is not supported");
|
|
3446
3448
|
p === i && (p = d.constructor.name === "AsyncFunction"), d = function() {
|
|
3447
3449
|
var w = arguments, D = this, te = this.event;
|
|
@@ -3525,7 +3527,7 @@ var jr = { exports: {} };
|
|
|
3525
3527
|
if (u === "newListener" && !this._newListener && !this._events.newListener)
|
|
3526
3528
|
return !1;
|
|
3527
3529
|
if (h && (d = u, u !== "newListener" && u !== "removeListener" && typeof u == "object")) {
|
|
3528
|
-
if (p = u.length,
|
|
3530
|
+
if (p = u.length, s) {
|
|
3529
3531
|
for (y = 0; y < p; y++)
|
|
3530
3532
|
if (typeof u[y] == "symbol") {
|
|
3531
3533
|
E = !0;
|
|
@@ -3601,7 +3603,7 @@ var jr = { exports: {} };
|
|
|
3601
3603
|
if (u === "newListener" && !this._newListener && !this._events.newListener)
|
|
3602
3604
|
return Promise.resolve([!1]);
|
|
3603
3605
|
if (d && (h = u, u !== "newListener" && u !== "removeListener" && typeof u == "object")) {
|
|
3604
|
-
if (y = u.length,
|
|
3606
|
+
if (y = u.length, s) {
|
|
3605
3607
|
for (S = 0; S < y; S++)
|
|
3606
3608
|
if (typeof u[S] == "symbol") {
|
|
3607
3609
|
m = !0;
|
|
@@ -3864,12 +3866,12 @@ var jr = { exports: {} };
|
|
|
3864
3866
|
return j;
|
|
3865
3867
|
}) : e.exports = j;
|
|
3866
3868
|
})();
|
|
3867
|
-
})(
|
|
3868
|
-
var
|
|
3869
|
-
class
|
|
3869
|
+
})(Ur);
|
|
3870
|
+
var Ns = Ur.exports;
|
|
3871
|
+
class Os {
|
|
3870
3872
|
constructor() {
|
|
3871
3873
|
G(this, "emitter");
|
|
3872
|
-
this.emitter = new
|
|
3874
|
+
this.emitter = new Ns.EventEmitter2({
|
|
3873
3875
|
wildcard: !0,
|
|
3874
3876
|
delimiter: ":"
|
|
3875
3877
|
});
|
|
@@ -3898,11 +3900,12 @@ class Oo {
|
|
|
3898
3900
|
const Ee = class {
|
|
3899
3901
|
constructor() {
|
|
3900
3902
|
G(this, "_productDataSource", null);
|
|
3901
|
-
G(this, "_configManager", new
|
|
3902
|
-
G(this, "_eventBus", new
|
|
3903
|
+
G(this, "_configManager", new Ss());
|
|
3904
|
+
G(this, "_eventBus", new Os());
|
|
3903
3905
|
G(this, "instanceId", Ra());
|
|
3904
3906
|
G(this, "log", xa);
|
|
3905
|
-
|
|
3907
|
+
G(this, "globalAtomStore", Li());
|
|
3908
|
+
is(
|
|
3906
3909
|
this,
|
|
3907
3910
|
{
|
|
3908
3911
|
config: Ae,
|
|
@@ -3944,10 +3947,10 @@ const Ee = class {
|
|
|
3944
3947
|
};
|
|
3945
3948
|
let Pt = Ee;
|
|
3946
3949
|
G(Pt, "_instance");
|
|
3947
|
-
const
|
|
3950
|
+
const Vn = Pt.instance(), At = Vn.log, Mr = At.levels.INFO;
|
|
3948
3951
|
At.setDefaultLevel(Mr);
|
|
3949
|
-
|
|
3950
|
-
|
|
3952
|
+
ji.reg(At);
|
|
3953
|
+
ji.apply(At, {
|
|
3951
3954
|
template: "[%t] %l (%n)",
|
|
3952
3955
|
nameFormatter: (e) => {
|
|
3953
3956
|
var t;
|
|
@@ -3955,22 +3958,22 @@ Vi.apply(At, {
|
|
|
3955
3958
|
},
|
|
3956
3959
|
timestampFormatter: () => (/* @__PURE__ */ new Date()).toTimeString().slice(0, 8)
|
|
3957
3960
|
});
|
|
3958
|
-
const Br = {}, ac =
|
|
3959
|
-
function
|
|
3961
|
+
const Br = {}, ac = Fs("main");
|
|
3962
|
+
function ws(e) {
|
|
3960
3963
|
const t = At.getLogger(e);
|
|
3961
3964
|
return t.setLevel(Mr), t;
|
|
3962
3965
|
}
|
|
3963
|
-
function
|
|
3966
|
+
function Es(e, t) {
|
|
3964
3967
|
Br[e] = t;
|
|
3965
3968
|
}
|
|
3966
|
-
function
|
|
3969
|
+
function As(e) {
|
|
3967
3970
|
return Br[e];
|
|
3968
3971
|
}
|
|
3969
|
-
function
|
|
3970
|
-
const t =
|
|
3971
|
-
return
|
|
3972
|
+
function Fs(e) {
|
|
3973
|
+
const t = ws(e);
|
|
3974
|
+
return Es(e, t), As(e);
|
|
3972
3975
|
}
|
|
3973
|
-
class
|
|
3976
|
+
class Cs {
|
|
3974
3977
|
constructor(t) {
|
|
3975
3978
|
G(this, "aggregate");
|
|
3976
3979
|
G(this, "_numSetPropsApplied", 0);
|
|
@@ -3985,12 +3988,12 @@ class Co {
|
|
|
3985
3988
|
return this._numSetPropsApplied === 1;
|
|
3986
3989
|
}
|
|
3987
3990
|
}
|
|
3988
|
-
function
|
|
3989
|
-
return new
|
|
3990
|
-
}
|
|
3991
|
-
class sc {
|
|
3991
|
+
function Rs(e) {
|
|
3992
|
+
return new Cs(e);
|
|
3992
3993
|
}
|
|
3993
3994
|
class oc {
|
|
3995
|
+
}
|
|
3996
|
+
class sc {
|
|
3994
3997
|
constructor(t) {
|
|
3995
3998
|
G(this, "_value");
|
|
3996
3999
|
t !== void 0 && (this._value = t);
|
|
@@ -3999,10 +4002,10 @@ class oc {
|
|
|
3999
4002
|
return this._value;
|
|
4000
4003
|
}
|
|
4001
4004
|
}
|
|
4002
|
-
var Gr = /* @__PURE__ */ ((e) => (e.VTEX = "VTEX", e.VTEX_IO = "VTEX-IO", e.VTEX_CMS = "PORTAL-VTEX", e.PLATFORM = "PLATFORM", e.UNKNOWN = "UNKNOWN", e))(Gr || {}),
|
|
4003
|
-
class
|
|
4005
|
+
var Gr = /* @__PURE__ */ ((e) => (e.VTEX = "VTEX", e.VTEX_IO = "VTEX-IO", e.VTEX_CMS = "PORTAL-VTEX", e.PLATFORM = "PLATFORM", e.UNKNOWN = "UNKNOWN", e))(Gr || {}), Ts = /* @__PURE__ */ ((e) => (e.PLATFORM = "platform_module", e.ADENDA = "subscription_module", e.APP_STORE = "app_store", e))(Ts || {}), zr = /* @__PURE__ */ ((e) => (e.ACTIVE = "active_contract", e.INACTIVE = "inactive_contract", e))(zr || {}), Ls = /* @__PURE__ */ ((e) => (e.LITE = "lite", e.STANDARD = "standard", e.PRO = "pro", e))(Ls || {}), xs = /* @__PURE__ */ ((e) => (e.LITE = "PLAN_LITE", e.STANDARD = "PLAN_ESTANDAR", e.PRO = "PLAN_PRO", e.NONE = "NO_PLAN", e))(xs || {}), Ps = /* @__PURE__ */ ((e) => (e.PAST = "past", e.LIVE = "live", e.FUTURE = "future", e))(Ps || {});
|
|
4006
|
+
class jn {
|
|
4004
4007
|
constructor(t) {
|
|
4005
|
-
G(this, "root",
|
|
4008
|
+
G(this, "root", Rs(this));
|
|
4006
4009
|
G(this, "id");
|
|
4007
4010
|
G(this, "account");
|
|
4008
4011
|
G(this, "accountType", Gr.UNKNOWN);
|
|
@@ -4034,7 +4037,7 @@ class In {
|
|
|
4034
4037
|
...n,
|
|
4035
4038
|
createdAt: new Date(Number(i))
|
|
4036
4039
|
};
|
|
4037
|
-
return new
|
|
4040
|
+
return new jn(r);
|
|
4038
4041
|
}
|
|
4039
4042
|
toPrimitives() {
|
|
4040
4043
|
const { root: t, createdAt: i, ...n } = this;
|
|
@@ -4044,16 +4047,16 @@ class In {
|
|
|
4044
4047
|
};
|
|
4045
4048
|
}
|
|
4046
4049
|
}
|
|
4047
|
-
const
|
|
4048
|
-
class
|
|
4050
|
+
const Ds = `${Aa.apiUrls.restV1}/accounts/v2`;
|
|
4051
|
+
class Is {
|
|
4049
4052
|
async get(t) {
|
|
4050
|
-
const i = `${
|
|
4053
|
+
const i = `${Ds}/${t}`, { data: n } = await Pi({
|
|
4051
4054
|
url: i
|
|
4052
4055
|
});
|
|
4053
|
-
return n ?
|
|
4056
|
+
return n ? jn.toDomain(n) : null;
|
|
4054
4057
|
}
|
|
4055
4058
|
}
|
|
4056
|
-
class
|
|
4059
|
+
class Vs {
|
|
4057
4060
|
constructor(t) {
|
|
4058
4061
|
this.accountRepository = t;
|
|
4059
4062
|
}
|
|
@@ -4061,15 +4064,15 @@ class Vo {
|
|
|
4061
4064
|
try {
|
|
4062
4065
|
const i = await this.accountRepository.get(t);
|
|
4063
4066
|
if (!i)
|
|
4064
|
-
throw new
|
|
4067
|
+
throw new ks(t);
|
|
4065
4068
|
return i;
|
|
4066
4069
|
} catch (i) {
|
|
4067
|
-
throw new
|
|
4070
|
+
throw new ys(i);
|
|
4068
4071
|
}
|
|
4069
4072
|
}
|
|
4070
4073
|
}
|
|
4071
|
-
const
|
|
4072
|
-
class
|
|
4074
|
+
const js = new Is(), Kr = new Vs(js);
|
|
4075
|
+
class Un {
|
|
4073
4076
|
constructor() {
|
|
4074
4077
|
this.listeners = [], this.subscribe = this.subscribe.bind(this);
|
|
4075
4078
|
}
|
|
@@ -4087,16 +4090,16 @@ class Vn {
|
|
|
4087
4090
|
}
|
|
4088
4091
|
}
|
|
4089
4092
|
const Kt = typeof window == "undefined" || "Deno" in window;
|
|
4090
|
-
function
|
|
4093
|
+
function Us() {
|
|
4091
4094
|
}
|
|
4092
|
-
function
|
|
4095
|
+
function si(e) {
|
|
4093
4096
|
return typeof e == "number" && e >= 0 && e !== 1 / 0;
|
|
4094
4097
|
}
|
|
4095
|
-
function
|
|
4098
|
+
function Ms(e, t) {
|
|
4096
4099
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
4097
4100
|
}
|
|
4098
|
-
function
|
|
4099
|
-
return
|
|
4101
|
+
function Bs(e, t, i) {
|
|
4102
|
+
return Gs(e) ? typeof t == "function" ? {
|
|
4100
4103
|
...i,
|
|
4101
4104
|
queryKey: e,
|
|
4102
4105
|
queryFn: t
|
|
@@ -4108,19 +4111,19 @@ function Bo(e, t, i) {
|
|
|
4108
4111
|
function $r(e, t) {
|
|
4109
4112
|
if (e === t)
|
|
4110
4113
|
return e;
|
|
4111
|
-
const i =
|
|
4112
|
-
if (i ||
|
|
4113
|
-
const n = i ? e.length : Object.keys(e).length, r = i ? t : Object.keys(t), a = r.length,
|
|
4114
|
-
let
|
|
4114
|
+
const i = li(e) && li(t);
|
|
4115
|
+
if (i || ci(e) && ci(t)) {
|
|
4116
|
+
const n = i ? e.length : Object.keys(e).length, r = i ? t : Object.keys(t), a = r.length, o = i ? [] : {};
|
|
4117
|
+
let s = 0;
|
|
4115
4118
|
for (let l = 0; l < a; l++) {
|
|
4116
4119
|
const c = i ? l : r[l];
|
|
4117
|
-
|
|
4120
|
+
o[c] = $r(e[c], t[c]), o[c] === e[c] && s++;
|
|
4118
4121
|
}
|
|
4119
|
-
return n === a &&
|
|
4122
|
+
return n === a && s === n ? e : o;
|
|
4120
4123
|
}
|
|
4121
4124
|
return t;
|
|
4122
4125
|
}
|
|
4123
|
-
function
|
|
4126
|
+
function ui(e, t) {
|
|
4124
4127
|
if (e && !t || t && !e)
|
|
4125
4128
|
return !1;
|
|
4126
4129
|
for (const i in e)
|
|
@@ -4128,36 +4131,36 @@ function si(e, t) {
|
|
|
4128
4131
|
return !1;
|
|
4129
4132
|
return !0;
|
|
4130
4133
|
}
|
|
4131
|
-
function
|
|
4134
|
+
function li(e) {
|
|
4132
4135
|
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
4133
4136
|
}
|
|
4134
|
-
function
|
|
4135
|
-
if (!
|
|
4137
|
+
function ci(e) {
|
|
4138
|
+
if (!di(e))
|
|
4136
4139
|
return !1;
|
|
4137
4140
|
const t = e.constructor;
|
|
4138
4141
|
if (typeof t == "undefined")
|
|
4139
4142
|
return !0;
|
|
4140
4143
|
const i = t.prototype;
|
|
4141
|
-
return !(!
|
|
4144
|
+
return !(!di(i) || !i.hasOwnProperty("isPrototypeOf"));
|
|
4142
4145
|
}
|
|
4143
|
-
function
|
|
4146
|
+
function di(e) {
|
|
4144
4147
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
4145
4148
|
}
|
|
4146
|
-
function
|
|
4149
|
+
function Gs(e) {
|
|
4147
4150
|
return Array.isArray(e);
|
|
4148
4151
|
}
|
|
4149
|
-
function
|
|
4152
|
+
function zs(e) {
|
|
4150
4153
|
return new Promise((t) => {
|
|
4151
4154
|
setTimeout(t, e);
|
|
4152
4155
|
});
|
|
4153
4156
|
}
|
|
4154
|
-
function
|
|
4155
|
-
|
|
4157
|
+
function fi(e) {
|
|
4158
|
+
zs(0).then(e);
|
|
4156
4159
|
}
|
|
4157
|
-
function
|
|
4160
|
+
function hi(e, t, i) {
|
|
4158
4161
|
return i.isDataEqual != null && i.isDataEqual(e, t) ? e : typeof i.structuralSharing == "function" ? i.structuralSharing(e, t) : i.structuralSharing !== !1 ? $r(e, t) : t;
|
|
4159
4162
|
}
|
|
4160
|
-
class
|
|
4163
|
+
class Ks extends Un {
|
|
4161
4164
|
constructor() {
|
|
4162
4165
|
super(), this.setup = (t) => {
|
|
4163
4166
|
if (!Kt && window.addEventListener) {
|
|
@@ -4195,8 +4198,8 @@ class Ko extends Vn {
|
|
|
4195
4198
|
return typeof this.focused == "boolean" ? this.focused : typeof document == "undefined" ? !0 : [void 0, "visible", "prerender"].includes(document.visibilityState);
|
|
4196
4199
|
}
|
|
4197
4200
|
}
|
|
4198
|
-
const $
|
|
4199
|
-
class
|
|
4201
|
+
const $s = new Ks();
|
|
4202
|
+
class Ws extends Un {
|
|
4200
4203
|
constructor() {
|
|
4201
4204
|
super(), this.setup = (t) => {
|
|
4202
4205
|
if (!Kt && window.addEventListener) {
|
|
@@ -4234,19 +4237,19 @@ class Wo extends Vn {
|
|
|
4234
4237
|
return typeof this.online == "boolean" ? this.online : typeof navigator == "undefined" || typeof navigator.onLine == "undefined" ? !0 : navigator.onLine;
|
|
4235
4238
|
}
|
|
4236
4239
|
}
|
|
4237
|
-
const
|
|
4238
|
-
function
|
|
4239
|
-
return (e != null ? e : "online") === "online" ?
|
|
4240
|
+
const Qs = new Ws();
|
|
4241
|
+
function qs(e) {
|
|
4242
|
+
return (e != null ? e : "online") === "online" ? Qs.isOnline() : !0;
|
|
4240
4243
|
}
|
|
4241
|
-
class
|
|
4244
|
+
class Js {
|
|
4242
4245
|
constructor(t) {
|
|
4243
4246
|
this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
|
|
4244
4247
|
}
|
|
4245
4248
|
}
|
|
4246
|
-
function
|
|
4247
|
-
return e instanceof
|
|
4249
|
+
function Hs(e) {
|
|
4250
|
+
return e instanceof Js;
|
|
4248
4251
|
}
|
|
4249
|
-
function
|
|
4252
|
+
function Zs() {
|
|
4250
4253
|
let e = [], t = 0, i = (f) => {
|
|
4251
4254
|
f();
|
|
4252
4255
|
}, n = (f) => {
|
|
@@ -4258,20 +4261,20 @@ function Zo() {
|
|
|
4258
4261
|
try {
|
|
4259
4262
|
v = f();
|
|
4260
4263
|
} finally {
|
|
4261
|
-
t--, t ||
|
|
4264
|
+
t--, t || s();
|
|
4262
4265
|
}
|
|
4263
4266
|
return v;
|
|
4264
4267
|
}, a = (f) => {
|
|
4265
|
-
t ? e.push(f) :
|
|
4268
|
+
t ? e.push(f) : fi(() => {
|
|
4266
4269
|
i(f);
|
|
4267
4270
|
});
|
|
4268
|
-
},
|
|
4271
|
+
}, o = (f) => (...v) => {
|
|
4269
4272
|
a(() => {
|
|
4270
4273
|
f(...v);
|
|
4271
4274
|
});
|
|
4272
|
-
},
|
|
4275
|
+
}, s = () => {
|
|
4273
4276
|
const f = e;
|
|
4274
|
-
e = [], f.length &&
|
|
4277
|
+
e = [], f.length && fi(() => {
|
|
4275
4278
|
n(() => {
|
|
4276
4279
|
f.forEach((v) => {
|
|
4277
4280
|
i(v);
|
|
@@ -4281,7 +4284,7 @@ function Zo() {
|
|
|
4281
4284
|
};
|
|
4282
4285
|
return {
|
|
4283
4286
|
batch: r,
|
|
4284
|
-
batchCalls:
|
|
4287
|
+
batchCalls: o,
|
|
4285
4288
|
schedule: a,
|
|
4286
4289
|
setNotifyFunction: (f) => {
|
|
4287
4290
|
i = f;
|
|
@@ -4291,8 +4294,8 @@ function Zo() {
|
|
|
4291
4294
|
}
|
|
4292
4295
|
};
|
|
4293
4296
|
}
|
|
4294
|
-
const at =
|
|
4295
|
-
class
|
|
4297
|
+
const at = Zs();
|
|
4298
|
+
class Xs extends Un {
|
|
4296
4299
|
constructor(t, i) {
|
|
4297
4300
|
super(), this.client = t, this.options = i, this.trackedProps = /* @__PURE__ */ new Set(), this.selectError = null, this.bindMethods(), this.setOptions(i);
|
|
4298
4301
|
}
|
|
@@ -4300,7 +4303,7 @@ class Xo extends Vn {
|
|
|
4300
4303
|
this.remove = this.remove.bind(this), this.refetch = this.refetch.bind(this);
|
|
4301
4304
|
}
|
|
4302
4305
|
onSubscribe() {
|
|
4303
|
-
this.listeners.length === 1 && (this.currentQuery.addObserver(this),
|
|
4306
|
+
this.listeners.length === 1 && (this.currentQuery.addObserver(this), mi(this.currentQuery, this.options) && this.executeFetch(), this.updateTimers());
|
|
4304
4307
|
}
|
|
4305
4308
|
onUnsubscribe() {
|
|
4306
4309
|
this.listeners.length || this.destroy();
|
|
@@ -4316,7 +4319,7 @@ class Xo extends Vn {
|
|
|
4316
4319
|
}
|
|
4317
4320
|
setOptions(t, i) {
|
|
4318
4321
|
const n = this.options, r = this.currentQuery;
|
|
4319
|
-
if (this.options = this.client.defaultQueryOptions(t),
|
|
4322
|
+
if (this.options = this.client.defaultQueryOptions(t), ui(n, this.options) || this.client.getQueryCache().notify({
|
|
4320
4323
|
type: "observerOptionsUpdated",
|
|
4321
4324
|
query: this.currentQuery,
|
|
4322
4325
|
observer: this
|
|
@@ -4324,9 +4327,9 @@ class Xo extends Vn {
|
|
|
4324
4327
|
throw new Error("Expected enabled to be a boolean");
|
|
4325
4328
|
this.options.queryKey || (this.options.queryKey = n.queryKey), this.updateQuery();
|
|
4326
4329
|
const a = this.hasListeners();
|
|
4327
|
-
a &&
|
|
4328
|
-
const
|
|
4329
|
-
a && (this.currentQuery !== r || this.options.enabled !== n.enabled ||
|
|
4330
|
+
a && vi(this.currentQuery, r, this.options, n) && this.executeFetch(), this.updateResult(i), a && (this.currentQuery !== r || this.options.enabled !== n.enabled || this.options.staleTime !== n.staleTime) && this.updateStaleTimeout();
|
|
4331
|
+
const o = this.computeRefetchInterval();
|
|
4332
|
+
a && (this.currentQuery !== r || this.options.enabled !== n.enabled || o !== this.currentRefetchInterval) && this.updateRefetchInterval(o);
|
|
4330
4333
|
}
|
|
4331
4334
|
getOptimisticResult(t) {
|
|
4332
4335
|
const i = this.client.getQueryCache().build(this.client, t);
|
|
@@ -4376,12 +4379,12 @@ class Xo extends Vn {
|
|
|
4376
4379
|
executeFetch(t) {
|
|
4377
4380
|
this.updateQuery();
|
|
4378
4381
|
let i = this.currentQuery.fetch(this.options, t);
|
|
4379
|
-
return t != null && t.throwOnError || (i = i.catch(
|
|
4382
|
+
return t != null && t.throwOnError || (i = i.catch(Us)), i;
|
|
4380
4383
|
}
|
|
4381
4384
|
updateStaleTimeout() {
|
|
4382
|
-
if (this.clearStaleTimeout(), Kt || this.currentResult.isStale || !
|
|
4385
|
+
if (this.clearStaleTimeout(), Kt || this.currentResult.isStale || !si(this.options.staleTime))
|
|
4383
4386
|
return;
|
|
4384
|
-
const i =
|
|
4387
|
+
const i = Ms(this.currentResult.dataUpdatedAt, this.options.staleTime) + 1;
|
|
4385
4388
|
this.staleTimeoutId = setTimeout(() => {
|
|
4386
4389
|
this.currentResult.isStale || this.updateResult();
|
|
4387
4390
|
}, i);
|
|
@@ -4391,8 +4394,8 @@ class Xo extends Vn {
|
|
|
4391
4394
|
return typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (t = this.options.refetchInterval) != null ? t : !1;
|
|
4392
4395
|
}
|
|
4393
4396
|
updateRefetchInterval(t) {
|
|
4394
|
-
this.clearRefetchInterval(), this.currentRefetchInterval = t, !(Kt || this.options.enabled === !1 || !
|
|
4395
|
-
(this.options.refetchIntervalInBackground || $
|
|
4397
|
+
this.clearRefetchInterval(), this.currentRefetchInterval = t, !(Kt || this.options.enabled === !1 || !si(this.currentRefetchInterval) || this.currentRefetchInterval === 0) && (this.refetchIntervalId = setInterval(() => {
|
|
4398
|
+
(this.options.refetchIntervalInBackground || $s.isFocused()) && this.executeFetch();
|
|
4396
4399
|
}, this.currentRefetchInterval));
|
|
4397
4400
|
}
|
|
4398
4401
|
updateTimers() {
|
|
@@ -4405,7 +4408,7 @@ class Xo extends Vn {
|
|
|
4405
4408
|
this.refetchIntervalId && (clearInterval(this.refetchIntervalId), this.refetchIntervalId = void 0);
|
|
4406
4409
|
}
|
|
4407
4410
|
createResult(t, i) {
|
|
4408
|
-
const n = this.currentQuery, r = this.options, a = this.currentResult,
|
|
4411
|
+
const n = this.currentQuery, r = this.options, a = this.currentResult, o = this.currentResultState, s = this.currentResultOptions, l = t !== n, c = l ? t.state : this.currentQueryInitialState, f = l ? this.currentResult : this.previousQueryResult, {
|
|
4409
4412
|
state: v
|
|
4410
4413
|
} = t;
|
|
4411
4414
|
let {
|
|
@@ -4416,17 +4419,17 @@ class Xo extends Vn {
|
|
|
4416
4419
|
status: _
|
|
4417
4420
|
} = v, C = !1, L = !1, U;
|
|
4418
4421
|
if (i._optimisticResults) {
|
|
4419
|
-
const g = this.hasListeners(), k = !g &&
|
|
4420
|
-
(k || F) && (b =
|
|
4422
|
+
const g = this.hasListeners(), k = !g && mi(t, i), F = g && vi(t, n, i, r);
|
|
4423
|
+
(k || F) && (b = qs(t.options.networkMode) ? "fetching" : "paused", O || (_ = "loading")), i._optimisticResults === "isRestoring" && (b = "idle");
|
|
4421
4424
|
}
|
|
4422
4425
|
if (i.keepPreviousData && !v.dataUpdatedAt && f != null && f.isSuccess && _ !== "error")
|
|
4423
4426
|
U = f.data, O = f.dataUpdatedAt, _ = f.status, C = !0;
|
|
4424
4427
|
else if (i.select && typeof v.data != "undefined")
|
|
4425
|
-
if (a && v.data === (
|
|
4428
|
+
if (a && v.data === (o == null ? void 0 : o.data) && i.select === this.selectFn)
|
|
4426
4429
|
U = this.selectResult;
|
|
4427
4430
|
else
|
|
4428
4431
|
try {
|
|
4429
|
-
this.selectFn = i.select, U = i.select(v.data), U =
|
|
4432
|
+
this.selectFn = i.select, U = i.select(v.data), U = hi(a == null ? void 0 : a.data, U, i), this.selectResult = U, this.selectError = null;
|
|
4430
4433
|
} catch (g) {
|
|
4431
4434
|
this.selectError = g;
|
|
4432
4435
|
}
|
|
@@ -4434,7 +4437,7 @@ class Xo extends Vn {
|
|
|
4434
4437
|
U = v.data;
|
|
4435
4438
|
if (typeof i.placeholderData != "undefined" && typeof U == "undefined" && _ === "loading") {
|
|
4436
4439
|
let g;
|
|
4437
|
-
if (a != null && a.isPlaceholderData && i.placeholderData === (
|
|
4440
|
+
if (a != null && a.isPlaceholderData && i.placeholderData === (s == null ? void 0 : s.placeholderData))
|
|
4438
4441
|
g = a.data;
|
|
4439
4442
|
else if (g = typeof i.placeholderData == "function" ? i.placeholderData() : i.placeholderData, i.select && typeof g != "undefined")
|
|
4440
4443
|
try {
|
|
@@ -4442,7 +4445,7 @@ class Xo extends Vn {
|
|
|
4442
4445
|
} catch (k) {
|
|
4443
4446
|
this.selectError = k;
|
|
4444
4447
|
}
|
|
4445
|
-
typeof g != "undefined" && (_ = "success", U =
|
|
4448
|
+
typeof g != "undefined" && (_ = "success", U = hi(a == null ? void 0 : a.data, g, i), L = !0);
|
|
4446
4449
|
}
|
|
4447
4450
|
this.selectError && (A = this.selectError, U = this.selectResult, R = Date.now(), _ = "error");
|
|
4448
4451
|
const P = b === "fetching", z = _ === "loading", Q = _ === "error";
|
|
@@ -4469,14 +4472,14 @@ class Xo extends Vn {
|
|
|
4469
4472
|
isPlaceholderData: L,
|
|
4470
4473
|
isPreviousData: C,
|
|
4471
4474
|
isRefetchError: Q && v.dataUpdatedAt !== 0,
|
|
4472
|
-
isStale:
|
|
4475
|
+
isStale: Mn(t, i),
|
|
4473
4476
|
refetch: this.refetch,
|
|
4474
4477
|
remove: this.remove
|
|
4475
4478
|
};
|
|
4476
4479
|
}
|
|
4477
4480
|
updateResult(t) {
|
|
4478
4481
|
const i = this.currentResult, n = this.createResult(this.currentQuery, this.options);
|
|
4479
|
-
if (this.currentResultState = this.currentQuery.state, this.currentResultOptions = this.options,
|
|
4482
|
+
if (this.currentResultState = this.currentQuery.state, this.currentResultOptions = this.options, ui(n, i))
|
|
4480
4483
|
return;
|
|
4481
4484
|
this.currentResult = n;
|
|
4482
4485
|
const r = {
|
|
@@ -4485,14 +4488,14 @@ class Xo extends Vn {
|
|
|
4485
4488
|
if (!i)
|
|
4486
4489
|
return !0;
|
|
4487
4490
|
const {
|
|
4488
|
-
notifyOnChangeProps:
|
|
4491
|
+
notifyOnChangeProps: o
|
|
4489
4492
|
} = this.options;
|
|
4490
|
-
if (
|
|
4493
|
+
if (o === "all" || !o && !this.trackedProps.size)
|
|
4491
4494
|
return !0;
|
|
4492
|
-
const
|
|
4493
|
-
return this.options.useErrorBoundary &&
|
|
4495
|
+
const s = new Set(o != null ? o : this.trackedProps);
|
|
4496
|
+
return this.options.useErrorBoundary && s.add("error"), Object.keys(this.currentResult).some((l) => {
|
|
4494
4497
|
const c = l;
|
|
4495
|
-
return this.currentResult[c] !== i[c] &&
|
|
4498
|
+
return this.currentResult[c] !== i[c] && s.has(c);
|
|
4496
4499
|
});
|
|
4497
4500
|
};
|
|
4498
4501
|
(t == null ? void 0 : t.listeners) !== !1 && a() && (r.listeners = !0), this.notify({
|
|
@@ -4509,7 +4512,7 @@ class Xo extends Vn {
|
|
|
4509
4512
|
}
|
|
4510
4513
|
onQueryUpdate(t) {
|
|
4511
4514
|
const i = {};
|
|
4512
|
-
t.type === "success" ? i.onSuccess = !t.manual : t.type === "error" && !
|
|
4515
|
+
t.type === "success" ? i.onSuccess = !t.manual : t.type === "error" && !Hs(t.error) && (i.onError = !0), this.updateResult(i), this.hasListeners() && this.updateTimers();
|
|
4513
4516
|
}
|
|
4514
4517
|
notify(t) {
|
|
4515
4518
|
at.batch(() => {
|
|
@@ -4517,8 +4520,8 @@ class Xo extends Vn {
|
|
|
4517
4520
|
var i, n, r, a;
|
|
4518
4521
|
(i = (n = this.options).onSuccess) == null || i.call(n, this.currentResult.data), (r = (a = this.options).onSettled) == null || r.call(a, this.currentResult.data, null);
|
|
4519
4522
|
} else if (t.onError) {
|
|
4520
|
-
var
|
|
4521
|
-
(
|
|
4523
|
+
var o, s, l, c;
|
|
4524
|
+
(o = (s = this.options).onError) == null || o.call(s, this.currentResult.error), (l = (c = this.options).onSettled) == null || l.call(c, void 0, this.currentResult.error);
|
|
4522
4525
|
}
|
|
4523
4526
|
t.listeners && this.listeners.forEach((f) => {
|
|
4524
4527
|
f(this.currentResult);
|
|
@@ -4529,23 +4532,23 @@ class Xo extends Vn {
|
|
|
4529
4532
|
});
|
|
4530
4533
|
}
|
|
4531
4534
|
}
|
|
4532
|
-
function
|
|
4535
|
+
function Ys(e, t) {
|
|
4533
4536
|
return t.enabled !== !1 && !e.state.dataUpdatedAt && !(e.state.status === "error" && t.retryOnMount === !1);
|
|
4534
4537
|
}
|
|
4535
|
-
function
|
|
4536
|
-
return
|
|
4538
|
+
function mi(e, t) {
|
|
4539
|
+
return Ys(e, t) || e.state.dataUpdatedAt > 0 && Sn(e, t, t.refetchOnMount);
|
|
4537
4540
|
}
|
|
4538
4541
|
function Sn(e, t, i) {
|
|
4539
4542
|
if (t.enabled !== !1) {
|
|
4540
4543
|
const n = typeof i == "function" ? i(e) : i;
|
|
4541
|
-
return n === "always" || n !== !1 &&
|
|
4544
|
+
return n === "always" || n !== !1 && Mn(e, t);
|
|
4542
4545
|
}
|
|
4543
4546
|
return !1;
|
|
4544
4547
|
}
|
|
4545
|
-
function
|
|
4546
|
-
return i.enabled !== !1 && (e !== t || n.enabled === !1) && (!i.suspense || e.state.status !== "error") &&
|
|
4548
|
+
function vi(e, t, i, n) {
|
|
4549
|
+
return i.enabled !== !1 && (e !== t || n.enabled === !1) && (!i.suspense || e.state.status !== "error") && Mn(e, i);
|
|
4547
4550
|
}
|
|
4548
|
-
function
|
|
4551
|
+
function Mn(e, t) {
|
|
4549
4552
|
return e.isStaleByTime(t.staleTime);
|
|
4550
4553
|
}
|
|
4551
4554
|
var Wr = { exports: {} }, Qr = {};
|
|
@@ -4558,12 +4561,12 @@ var Wr = { exports: {} }, Qr = {};
|
|
|
4558
4561
|
* This source code is licensed under the MIT license found in the
|
|
4559
4562
|
* LICENSE file in the root directory of this source tree.
|
|
4560
4563
|
*/
|
|
4561
|
-
var Je =
|
|
4564
|
+
var Je = Ri;
|
|
4562
4565
|
function eu(e, t) {
|
|
4563
4566
|
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
|
|
4564
4567
|
}
|
|
4565
4568
|
var tu = typeof Object.is == "function" ? Object.is : eu, nu = Je.useState, iu = Je.useEffect, ru = Je.useLayoutEffect, au = Je.useDebugValue;
|
|
4566
|
-
function
|
|
4569
|
+
function ou(e, t) {
|
|
4567
4570
|
var i = t(), n = nu({ inst: { value: i, getSnapshot: t } }), r = n[0].inst, a = n[1];
|
|
4568
4571
|
return ru(function() {
|
|
4569
4572
|
r.value = i, r.getSnapshot = t, mn(r) && a({ inst: r });
|
|
@@ -4583,16 +4586,16 @@ function mn(e) {
|
|
|
4583
4586
|
return !0;
|
|
4584
4587
|
}
|
|
4585
4588
|
}
|
|
4586
|
-
function
|
|
4589
|
+
function su(e, t) {
|
|
4587
4590
|
return t();
|
|
4588
4591
|
}
|
|
4589
|
-
var uu = typeof window == "undefined" || typeof window.document == "undefined" || typeof window.document.createElement == "undefined" ?
|
|
4592
|
+
var uu = typeof window == "undefined" || typeof window.document == "undefined" || typeof window.document.createElement == "undefined" ? su : ou;
|
|
4590
4593
|
Qr.useSyncExternalStore = Je.useSyncExternalStore !== void 0 ? Je.useSyncExternalStore : uu;
|
|
4591
4594
|
Wr.exports = Qr;
|
|
4592
4595
|
var lu = Wr.exports;
|
|
4593
|
-
const cu = lu.useSyncExternalStore,
|
|
4596
|
+
const cu = lu.useSyncExternalStore, pi = /* @__PURE__ */ le.createContext(void 0), du = /* @__PURE__ */ le.createContext(!1);
|
|
4594
4597
|
function fu(e, t) {
|
|
4595
|
-
return e || (t && typeof window != "undefined" ? (window.ReactQueryClientContext || (window.ReactQueryClientContext =
|
|
4598
|
+
return e || (t && typeof window != "undefined" ? (window.ReactQueryClientContext || (window.ReactQueryClientContext = pi), window.ReactQueryClientContext) : pi);
|
|
4596
4599
|
}
|
|
4597
4600
|
const hu = ({
|
|
4598
4601
|
context: e
|
|
@@ -4644,32 +4647,32 @@ function Eu(e, t) {
|
|
|
4644
4647
|
context: e.context
|
|
4645
4648
|
}), n = mu(), r = gu(), a = i.defaultQueryOptions(e);
|
|
4646
4649
|
a._optimisticResults = n ? "isRestoring" : "optimistic", a.onError && (a.onError = at.batchCalls(a.onError)), a.onSuccess && (a.onSuccess = at.batchCalls(a.onSuccess)), a.onSettled && (a.onSettled = at.batchCalls(a.onSettled)), Su(a), yu(a, r), _u(r);
|
|
4647
|
-
const [
|
|
4650
|
+
const [o] = le.useState(() => new t(i, a)), s = o.getOptimisticResult(a);
|
|
4648
4651
|
if (cu(le.useCallback((l) => n ? () => {
|
|
4649
|
-
} :
|
|
4650
|
-
|
|
4652
|
+
} : o.subscribe(at.batchCalls(l)), [o, n]), () => o.getCurrentResult(), () => o.getCurrentResult()), le.useEffect(() => {
|
|
4653
|
+
o.setOptions(a, {
|
|
4651
4654
|
listeners: !1
|
|
4652
4655
|
});
|
|
4653
|
-
}, [a,
|
|
4654
|
-
throw wu(a,
|
|
4656
|
+
}, [a, o]), Ou(a, s, n))
|
|
4657
|
+
throw wu(a, o, r);
|
|
4655
4658
|
if (bu({
|
|
4656
|
-
result:
|
|
4659
|
+
result: s,
|
|
4657
4660
|
errorResetBoundary: r,
|
|
4658
4661
|
useErrorBoundary: a.useErrorBoundary,
|
|
4659
|
-
query:
|
|
4662
|
+
query: o.getCurrentQuery()
|
|
4660
4663
|
}))
|
|
4661
|
-
throw
|
|
4662
|
-
return a.notifyOnChangeProps ?
|
|
4664
|
+
throw s.error;
|
|
4665
|
+
return a.notifyOnChangeProps ? s : o.trackResult(s);
|
|
4663
4666
|
}
|
|
4664
4667
|
function Au(e, t, i) {
|
|
4665
|
-
const n =
|
|
4666
|
-
return Eu(n,
|
|
4668
|
+
const n = Bs(e, t, i);
|
|
4669
|
+
return Eu(n, Xs);
|
|
4667
4670
|
}
|
|
4668
|
-
let
|
|
4669
|
-
const Nn =
|
|
4671
|
+
let Bn = /* @__PURE__ */ new Map();
|
|
4672
|
+
const Nn = Ti(Bn), uc = ({ children: e, stores: t }) => {
|
|
4670
4673
|
const i = wn(Nn), n = ca(() => {
|
|
4671
4674
|
const r = /* @__PURE__ */ new Map();
|
|
4672
|
-
return t.forEach((a) => r.set(a.class, a.value)),
|
|
4675
|
+
return t.forEach((a) => r.set(a.class, a.value)), Bn = new Map([...i, ...r]);
|
|
4673
4676
|
}, []);
|
|
4674
4677
|
return /* @__PURE__ */ fa(Nn.Provider, { value: n, children: e });
|
|
4675
4678
|
};
|
|
@@ -4677,19 +4680,19 @@ function lc(e) {
|
|
|
4677
4680
|
return wn(Nn).get(e);
|
|
4678
4681
|
}
|
|
4679
4682
|
function cc(e) {
|
|
4680
|
-
return
|
|
4683
|
+
return Bn.get(e);
|
|
4681
4684
|
}
|
|
4682
4685
|
function dc(e, t = []) {
|
|
4683
4686
|
if (Array.isArray(t) && t.some((i) => Nt(i)))
|
|
4684
4687
|
throw new Error("useEffect dependencies must not contain observables, ...");
|
|
4685
|
-
vt(() =>
|
|
4688
|
+
vt(() => xn(e), t);
|
|
4686
4689
|
}
|
|
4687
4690
|
function Fu(e, t = []) {
|
|
4688
4691
|
if (Array.isArray(t) && t.some((r) => Nt(r)))
|
|
4689
4692
|
throw new Error("useEffect dependencies must not contain observables, ...");
|
|
4690
4693
|
const [i, n] = da();
|
|
4691
4694
|
return vt(
|
|
4692
|
-
() =>
|
|
4695
|
+
() => xn(() => {
|
|
4693
4696
|
const r = e();
|
|
4694
4697
|
n(r);
|
|
4695
4698
|
}),
|
|
@@ -4699,13 +4702,13 @@ function Fu(e, t = []) {
|
|
|
4699
4702
|
function fc(e, t, i = []) {
|
|
4700
4703
|
if (Array.isArray(i) && i.some((n) => Nt(n)))
|
|
4701
4704
|
throw new Error("useEffect dependencies must not contain observables, ...");
|
|
4702
|
-
vt(() =>
|
|
4705
|
+
vt(() => $o(e, t), i);
|
|
4703
4706
|
}
|
|
4704
4707
|
const Cu = () => ["account"], hc = () => {
|
|
4705
4708
|
const e = Fu(() => {
|
|
4706
4709
|
var r;
|
|
4707
|
-
return (r =
|
|
4708
|
-
}), [t, i] = Sa(
|
|
4710
|
+
return (r = Vn.config) == null ? void 0 : r.account;
|
|
4711
|
+
}), [t, i] = Sa(En), n = Au(
|
|
4709
4712
|
Cu(),
|
|
4710
4713
|
() => Kr.get(e),
|
|
4711
4714
|
{
|
|
@@ -4721,10 +4724,10 @@ const Cu = () => ["account"], hc = () => {
|
|
|
4721
4724
|
findQuery: n,
|
|
4722
4725
|
account: t
|
|
4723
4726
|
};
|
|
4724
|
-
}, Ru =
|
|
4727
|
+
}, Ru = Vn.globalAtomStore;
|
|
4725
4728
|
async function Tu(e) {
|
|
4726
4729
|
const t = await Kr.get(e);
|
|
4727
|
-
return Ru.set(
|
|
4730
|
+
return Ru.set(En, t), t;
|
|
4728
4731
|
}
|
|
4729
4732
|
var Lu = /* @__PURE__ */ ((e) => (e.CREATED = "CREATED", e.STARTING = "STARTING", e.LIVE = "LIVE", e.FINALIZED = "FINALIZED", e))(Lu || {});
|
|
4730
4733
|
const mc = {
|
|
@@ -4789,14 +4792,14 @@ function Oe(e, t) {
|
|
|
4789
4792
|
if (!(e instanceof t))
|
|
4790
4793
|
throw new TypeError("Cannot call a class as a function");
|
|
4791
4794
|
}
|
|
4792
|
-
function
|
|
4795
|
+
function gi(e, t) {
|
|
4793
4796
|
for (var i = 0; i < t.length; i++) {
|
|
4794
4797
|
var n = t[i];
|
|
4795
4798
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, Jr(n.key), n);
|
|
4796
4799
|
}
|
|
4797
4800
|
}
|
|
4798
4801
|
function we(e, t, i) {
|
|
4799
|
-
return t &&
|
|
4802
|
+
return t && gi(e.prototype, t), i && gi(e, i), Object.defineProperty(e, "prototype", {
|
|
4800
4803
|
writable: !1
|
|
4801
4804
|
}), e;
|
|
4802
4805
|
}
|
|
@@ -4937,14 +4940,14 @@ var ju = {
|
|
|
4937
4940
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++)
|
|
4938
4941
|
r[a - 1] = arguments[a];
|
|
4939
4942
|
if (this.observers[i]) {
|
|
4940
|
-
var
|
|
4941
|
-
|
|
4943
|
+
var o = [].concat(this.observers[i]);
|
|
4944
|
+
o.forEach(function(l) {
|
|
4942
4945
|
l.apply(void 0, r);
|
|
4943
4946
|
});
|
|
4944
4947
|
}
|
|
4945
4948
|
if (this.observers["*"]) {
|
|
4946
|
-
var
|
|
4947
|
-
|
|
4949
|
+
var s = [].concat(this.observers["*"]);
|
|
4950
|
+
s.forEach(function(l) {
|
|
4948
4951
|
l.apply(l, [i].concat(r));
|
|
4949
4952
|
});
|
|
4950
4953
|
}
|
|
@@ -4957,7 +4960,7 @@ function tt() {
|
|
|
4957
4960
|
});
|
|
4958
4961
|
return i.resolve = e, i.reject = t, i;
|
|
4959
4962
|
}
|
|
4960
|
-
function
|
|
4963
|
+
function ki(e) {
|
|
4961
4964
|
return e == null ? "" : "" + e;
|
|
4962
4965
|
}
|
|
4963
4966
|
function Mu(e, t, i) {
|
|
@@ -4965,9 +4968,9 @@ function Mu(e, t, i) {
|
|
|
4965
4968
|
t[n] && (i[n] = t[n]);
|
|
4966
4969
|
});
|
|
4967
4970
|
}
|
|
4968
|
-
function
|
|
4969
|
-
function n(
|
|
4970
|
-
return
|
|
4971
|
+
function Gn(e, t, i) {
|
|
4972
|
+
function n(s) {
|
|
4973
|
+
return s && s.indexOf("###") > -1 ? s.replace(/###/g, ".") : s;
|
|
4971
4974
|
}
|
|
4972
4975
|
function r() {
|
|
4973
4976
|
return !e || typeof e == "string";
|
|
@@ -4975,28 +4978,28 @@ function Mn(e, t, i) {
|
|
|
4975
4978
|
for (var a = typeof t != "string" ? [].concat(t) : t.split("."); a.length > 1; ) {
|
|
4976
4979
|
if (r())
|
|
4977
4980
|
return {};
|
|
4978
|
-
var
|
|
4979
|
-
!e[
|
|
4981
|
+
var o = n(a.shift());
|
|
4982
|
+
!e[o] && i && (e[o] = new i()), Object.prototype.hasOwnProperty.call(e, o) ? e = e[o] : e = {};
|
|
4980
4983
|
}
|
|
4981
4984
|
return r() ? {} : {
|
|
4982
4985
|
obj: e,
|
|
4983
4986
|
k: n(a.shift())
|
|
4984
4987
|
};
|
|
4985
4988
|
}
|
|
4986
|
-
function
|
|
4987
|
-
var n =
|
|
4989
|
+
function yi(e, t, i) {
|
|
4990
|
+
var n = Gn(e, t, Object), r = n.obj, a = n.k;
|
|
4988
4991
|
r[a] = i;
|
|
4989
4992
|
}
|
|
4990
4993
|
function Bu(e, t, i, n) {
|
|
4991
|
-
var r =
|
|
4992
|
-
a[
|
|
4994
|
+
var r = Gn(e, t, Object), a = r.obj, o = r.k;
|
|
4995
|
+
a[o] = a[o] || [], n && (a[o] = a[o].concat(i)), n || a[o].push(i);
|
|
4993
4996
|
}
|
|
4994
4997
|
function $t(e, t) {
|
|
4995
|
-
var i =
|
|
4998
|
+
var i = Gn(e, t), n = i.obj, r = i.k;
|
|
4996
4999
|
if (n)
|
|
4997
5000
|
return n[r];
|
|
4998
5001
|
}
|
|
4999
|
-
function
|
|
5002
|
+
function _i(e, t, i) {
|
|
5000
5003
|
var n = $t(e, i);
|
|
5001
5004
|
return n !== void 0 ? n : $t(t, i);
|
|
5002
5005
|
}
|
|
@@ -5031,15 +5034,15 @@ function Zr(e, t) {
|
|
|
5031
5034
|
if (typeof r[n[a]] == "string" && a + 1 < n.length)
|
|
5032
5035
|
return;
|
|
5033
5036
|
if (r[n[a]] === void 0) {
|
|
5034
|
-
for (var
|
|
5035
|
-
|
|
5037
|
+
for (var o = 2, s = n.slice(a, a + o).join(i), l = r[s]; l === void 0 && n.length > a + o; )
|
|
5038
|
+
o++, s = n.slice(a, a + o).join(i), l = r[s];
|
|
5036
5039
|
if (l === void 0)
|
|
5037
5040
|
return;
|
|
5038
5041
|
if (typeof l == "string")
|
|
5039
5042
|
return l;
|
|
5040
|
-
if (
|
|
5041
|
-
return l[
|
|
5042
|
-
var c = n.slice(a +
|
|
5043
|
+
if (s && typeof l[s] == "string")
|
|
5044
|
+
return l[s];
|
|
5045
|
+
var c = n.slice(a + o).join(i);
|
|
5043
5046
|
return c ? Zr(l, c, i) : void 0;
|
|
5044
5047
|
}
|
|
5045
5048
|
r = r[n[a]];
|
|
@@ -5070,42 +5073,42 @@ var Ku = function(e) {
|
|
|
5070
5073
|
}, {
|
|
5071
5074
|
key: "getResource",
|
|
5072
5075
|
value: function(n, r, a) {
|
|
5073
|
-
var
|
|
5074
|
-
a && typeof a != "string" && (c = c.concat(a)), a && typeof a == "string" && (c = c.concat(
|
|
5076
|
+
var o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, s = o.keySeparator !== void 0 ? o.keySeparator : this.options.keySeparator, l = o.ignoreJSONStructure !== void 0 ? o.ignoreJSONStructure : this.options.ignoreJSONStructure, c = [n, r];
|
|
5077
|
+
a && typeof a != "string" && (c = c.concat(a)), a && typeof a == "string" && (c = c.concat(s ? a.split(s) : a)), n.indexOf(".") > -1 && (c = n.split("."));
|
|
5075
5078
|
var f = $t(this.data, c);
|
|
5076
|
-
return f || !l || typeof a != "string" ? f : Zr(this.data && this.data[n] && this.data[n][r], a,
|
|
5079
|
+
return f || !l || typeof a != "string" ? f : Zr(this.data && this.data[n] && this.data[n][r], a, s);
|
|
5077
5080
|
}
|
|
5078
5081
|
}, {
|
|
5079
5082
|
key: "addResource",
|
|
5080
|
-
value: function(n, r, a,
|
|
5081
|
-
var
|
|
5083
|
+
value: function(n, r, a, o) {
|
|
5084
|
+
var s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
5082
5085
|
silent: !1
|
|
5083
5086
|
}, l = this.options.keySeparator;
|
|
5084
5087
|
l === void 0 && (l = ".");
|
|
5085
5088
|
var c = [n, r];
|
|
5086
|
-
a && (c = c.concat(l ? a.split(l) : a)), n.indexOf(".") > -1 && (c = n.split("."),
|
|
5089
|
+
a && (c = c.concat(l ? a.split(l) : a)), n.indexOf(".") > -1 && (c = n.split("."), o = r, r = c[1]), this.addNamespaces(r), yi(this.data, c, o), s.silent || this.emit("added", n, r, a, o);
|
|
5087
5090
|
}
|
|
5088
5091
|
}, {
|
|
5089
5092
|
key: "addResources",
|
|
5090
5093
|
value: function(n, r, a) {
|
|
5091
|
-
var
|
|
5094
|
+
var o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
|
|
5092
5095
|
silent: !1
|
|
5093
5096
|
};
|
|
5094
|
-
for (var
|
|
5095
|
-
(typeof a[
|
|
5097
|
+
for (var s in a)
|
|
5098
|
+
(typeof a[s] == "string" || Object.prototype.toString.apply(a[s]) === "[object Array]") && this.addResource(n, r, s, a[s], {
|
|
5096
5099
|
silent: !0
|
|
5097
5100
|
});
|
|
5098
|
-
|
|
5101
|
+
o.silent || this.emit("added", n, r, a);
|
|
5099
5102
|
}
|
|
5100
5103
|
}, {
|
|
5101
5104
|
key: "addResourceBundle",
|
|
5102
|
-
value: function(n, r, a,
|
|
5105
|
+
value: function(n, r, a, o, s) {
|
|
5103
5106
|
var l = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
|
|
5104
5107
|
silent: !1
|
|
5105
5108
|
}, c = [n, r];
|
|
5106
|
-
n.indexOf(".") > -1 && (c = n.split("."),
|
|
5109
|
+
n.indexOf(".") > -1 && (c = n.split("."), o = a, a = r, r = c[1]), this.addNamespaces(r);
|
|
5107
5110
|
var f = $t(this.data, c) || {};
|
|
5108
|
-
|
|
5111
|
+
o ? Hr(f, a, s) : f = X({}, f, a), yi(this.data, c, f), l.silent || this.emit("added", n, r, a);
|
|
5109
5112
|
}
|
|
5110
5113
|
}, {
|
|
5111
5114
|
key: "removeResourceBundle",
|
|
@@ -5139,12 +5142,12 @@ var Ku = function(e) {
|
|
|
5139
5142
|
this.processors[t.name] = t;
|
|
5140
5143
|
},
|
|
5141
5144
|
handle: function(t, i, n, r, a) {
|
|
5142
|
-
var
|
|
5143
|
-
return t.forEach(function(
|
|
5144
|
-
|
|
5145
|
+
var o = this;
|
|
5146
|
+
return t.forEach(function(s) {
|
|
5147
|
+
o.processors[s] && (i = o.processors[s].process(i, n, r, a));
|
|
5145
5148
|
}), i;
|
|
5146
5149
|
}
|
|
5147
|
-
},
|
|
5150
|
+
}, bi = {}, Si = function(e) {
|
|
5148
5151
|
Yt(t, e);
|
|
5149
5152
|
function t(i) {
|
|
5150
5153
|
var n, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -5168,30 +5171,30 @@ var Ku = function(e) {
|
|
|
5168
5171
|
value: function(n, r) {
|
|
5169
5172
|
var a = r.nsSeparator !== void 0 ? r.nsSeparator : this.options.nsSeparator;
|
|
5170
5173
|
a === void 0 && (a = ":");
|
|
5171
|
-
var
|
|
5174
|
+
var o = r.keySeparator !== void 0 ? r.keySeparator : this.options.keySeparator, s = r.ns || this.options.defaultNS;
|
|
5172
5175
|
if (a && n.indexOf(a) > -1) {
|
|
5173
5176
|
var l = n.match(this.interpolator.nestingRegexp);
|
|
5174
5177
|
if (l && l.length > 0)
|
|
5175
5178
|
return {
|
|
5176
5179
|
key: n,
|
|
5177
|
-
namespaces:
|
|
5180
|
+
namespaces: s
|
|
5178
5181
|
};
|
|
5179
5182
|
var c = n.split(a);
|
|
5180
|
-
(a !==
|
|
5183
|
+
(a !== o || a === o && this.options.ns.indexOf(c[0]) > -1) && (s = c.shift()), n = c.join(o);
|
|
5181
5184
|
}
|
|
5182
|
-
return typeof
|
|
5185
|
+
return typeof s == "string" && (s = [s]), {
|
|
5183
5186
|
key: n,
|
|
5184
|
-
namespaces:
|
|
5187
|
+
namespaces: s
|
|
5185
5188
|
};
|
|
5186
5189
|
}
|
|
5187
5190
|
}, {
|
|
5188
5191
|
key: "translate",
|
|
5189
5192
|
value: function(n, r, a) {
|
|
5190
|
-
var
|
|
5193
|
+
var o = this;
|
|
5191
5194
|
if (fe(r) !== "object" && this.options.overloadTranslationOptionHandler && (r = this.options.overloadTranslationOptionHandler(arguments)), r || (r = {}), n == null)
|
|
5192
5195
|
return "";
|
|
5193
5196
|
Array.isArray(n) || (n = [String(n)]);
|
|
5194
|
-
var
|
|
5197
|
+
var s = r.keySeparator !== void 0 ? r.keySeparator : this.options.keySeparator, l = this.extractFromKey(n[n.length - 1], r), c = l.key, f = l.namespaces, v = f[f.length - 1], O = r.lng || this.language, A = r.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
5195
5198
|
if (O && O.toLowerCase() === "cimode") {
|
|
5196
5199
|
if (A) {
|
|
5197
5200
|
var R = r.nsSeparator || this.options.nsSeparator;
|
|
@@ -5205,11 +5208,11 @@ var Ku = function(e) {
|
|
|
5205
5208
|
return this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!"), this.options.returnedObjectHandler ? this.options.returnedObjectHandler(C, _, X({}, r, {
|
|
5206
5209
|
ns: f
|
|
5207
5210
|
})) : "key '".concat(c, " (").concat(this.language, ")' returned an object instead of string.");
|
|
5208
|
-
if (
|
|
5211
|
+
if (s) {
|
|
5209
5212
|
var g = U === "[object Array]", k = g ? [] : {}, F = g ? L : C;
|
|
5210
5213
|
for (var T in _)
|
|
5211
5214
|
if (Object.prototype.hasOwnProperty.call(_, T)) {
|
|
5212
|
-
var I = "".concat(F).concat(
|
|
5215
|
+
var I = "".concat(F).concat(s).concat(T);
|
|
5213
5216
|
k[T] = this.translate(I, X({}, r, {
|
|
5214
5217
|
joinArrays: !1,
|
|
5215
5218
|
ns: f
|
|
@@ -5224,7 +5227,7 @@ var Ku = function(e) {
|
|
|
5224
5227
|
!this.isValidLookup(_) && K && (V = !0, _ = u), this.isValidLookup(_) || (B = !0, _ = c);
|
|
5225
5228
|
var d = K && u !== _ && this.options.updateMissing;
|
|
5226
5229
|
if (B || V || d) {
|
|
5227
|
-
if (this.logger.log(d ? "updateKey" : "missingKey", O, v, c, d ? u : _),
|
|
5230
|
+
if (this.logger.log(d ? "updateKey" : "missingKey", O, v, c, d ? u : _), s) {
|
|
5228
5231
|
var h = this.resolve(c, X({}, r, {
|
|
5229
5232
|
keySeparator: !1
|
|
5230
5233
|
}));
|
|
@@ -5237,10 +5240,10 @@ var Ku = function(e) {
|
|
|
5237
5240
|
else
|
|
5238
5241
|
this.options.saveMissingTo === "all" ? m = this.languageUtils.toResolveHierarchy(r.lng || this.language) : m.push(r.lng || this.language);
|
|
5239
5242
|
var S = function(N, w, D) {
|
|
5240
|
-
|
|
5243
|
+
o.options.missingKeyHandler ? o.options.missingKeyHandler(N, v, w, d ? D : _, d, r) : o.backendConnector && o.backendConnector.saveMissing && o.backendConnector.saveMissing(N, v, w, d ? D : _, d, r), o.emit("missingKey", N, v, w, _);
|
|
5241
5244
|
};
|
|
5242
5245
|
this.options.saveMissing && (this.options.saveMissingPlurals && j ? m.forEach(function(E) {
|
|
5243
|
-
|
|
5246
|
+
o.pluralResolver.getSuffixes(E).forEach(function(N) {
|
|
5244
5247
|
S([E], c + N, r["defaultValue".concat(N)] || u);
|
|
5245
5248
|
});
|
|
5246
5249
|
}) : S(m, c, u));
|
|
@@ -5251,11 +5254,11 @@ var Ku = function(e) {
|
|
|
5251
5254
|
}
|
|
5252
5255
|
}, {
|
|
5253
5256
|
key: "extendTranslation",
|
|
5254
|
-
value: function(n, r, a,
|
|
5257
|
+
value: function(n, r, a, o, s) {
|
|
5255
5258
|
var l = this;
|
|
5256
5259
|
if (this.i18nFormat && this.i18nFormat.parse)
|
|
5257
|
-
n = this.i18nFormat.parse(n, a,
|
|
5258
|
-
resolved:
|
|
5260
|
+
n = this.i18nFormat.parse(n, a, o.usedLng, o.usedNS, o.usedKey, {
|
|
5261
|
+
resolved: o
|
|
5259
5262
|
});
|
|
5260
5263
|
else if (!a.skipInterpolation) {
|
|
5261
5264
|
a.interpolation && this.interpolator.init(X({}, a, {
|
|
@@ -5274,28 +5277,28 @@ var Ku = function(e) {
|
|
|
5274
5277
|
a.nest !== !1 && (n = this.interpolator.nest(n, function() {
|
|
5275
5278
|
for (var C = arguments.length, L = new Array(C), U = 0; U < C; U++)
|
|
5276
5279
|
L[U] = arguments[U];
|
|
5277
|
-
return
|
|
5280
|
+
return s && s[0] === L[0] && !a.context ? (l.logger.warn("It seems you are nesting recursively key: ".concat(L[0], " in key: ").concat(r[0])), null) : l.translate.apply(l, L.concat([r]));
|
|
5278
5281
|
}, a)), a.interpolation && this.interpolator.reset();
|
|
5279
5282
|
}
|
|
5280
5283
|
var b = a.postProcess || this.options.postProcess, _ = typeof b == "string" ? [b] : b;
|
|
5281
5284
|
return n != null && _ && _.length && a.applyPostProcessor !== !1 && (n = Xr.handle(_, n, r, this.options && this.options.postProcessPassResolved ? X({
|
|
5282
|
-
i18nResolved:
|
|
5285
|
+
i18nResolved: o
|
|
5283
5286
|
}, a) : a, this)), n;
|
|
5284
5287
|
}
|
|
5285
5288
|
}, {
|
|
5286
5289
|
key: "resolve",
|
|
5287
5290
|
value: function(n) {
|
|
5288
|
-
var r = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
5291
|
+
var r = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o, s, l, c, f;
|
|
5289
5292
|
return typeof n == "string" && (n = [n]), n.forEach(function(v) {
|
|
5290
|
-
if (!r.isValidLookup(
|
|
5293
|
+
if (!r.isValidLookup(o)) {
|
|
5291
5294
|
var O = r.extractFromKey(v, a), A = O.key;
|
|
5292
|
-
|
|
5295
|
+
s = A;
|
|
5293
5296
|
var R = O.namespaces;
|
|
5294
5297
|
r.options.fallbackNS && (R = R.concat(r.options.fallbackNS));
|
|
5295
5298
|
var b = a.count !== void 0 && typeof a.count != "string", _ = a.context !== void 0 && (typeof a.context == "string" || typeof a.context == "number") && a.context !== "", C = a.lngs ? a.lngs : r.languageUtils.toResolveHierarchy(a.lng || r.language, a.fallbackLng);
|
|
5296
5299
|
R.forEach(function(L) {
|
|
5297
|
-
r.isValidLookup(
|
|
5298
|
-
if (!r.isValidLookup(
|
|
5300
|
+
r.isValidLookup(o) || (f = L, !bi["".concat(C[0], "-").concat(L)] && r.utils && r.utils.hasLoadedNamespace && !r.utils.hasLoadedNamespace(f) && (bi["".concat(C[0], "-").concat(L)] = !0, r.logger.warn('key "'.concat(s, '" for languages "').concat(C.join(", "), `" won't get resolved as namespace "`).concat(f, '" was not yet loaded'), "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), C.forEach(function(U) {
|
|
5301
|
+
if (!r.isValidLookup(o)) {
|
|
5299
5302
|
c = U;
|
|
5300
5303
|
var P = A, z = [P];
|
|
5301
5304
|
if (r.i18nFormat && r.i18nFormat.addLookupKeys)
|
|
@@ -5305,14 +5308,14 @@ var Ku = function(e) {
|
|
|
5305
5308
|
b && (Q = r.pluralResolver.getSuffix(U, a.count)), b && _ && z.push(P + Q), _ && z.push(P += "".concat(r.options.contextSeparator).concat(a.context)), b && z.push(P += Q);
|
|
5306
5309
|
}
|
|
5307
5310
|
for (var Y; Y = z.pop(); )
|
|
5308
|
-
r.isValidLookup(
|
|
5311
|
+
r.isValidLookup(o) || (l = Y, o = r.getResource(U, L, Y, a));
|
|
5309
5312
|
}
|
|
5310
5313
|
}));
|
|
5311
5314
|
});
|
|
5312
5315
|
}
|
|
5313
5316
|
}), {
|
|
5314
|
-
res:
|
|
5315
|
-
usedKey:
|
|
5317
|
+
res: o,
|
|
5318
|
+
usedKey: s,
|
|
5316
5319
|
exactUsedKey: l,
|
|
5317
5320
|
usedLng: c,
|
|
5318
5321
|
usedNS: f
|
|
@@ -5326,8 +5329,8 @@ var Ku = function(e) {
|
|
|
5326
5329
|
}, {
|
|
5327
5330
|
key: "getResource",
|
|
5328
5331
|
value: function(n, r, a) {
|
|
5329
|
-
var
|
|
5330
|
-
return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(n, r, a,
|
|
5332
|
+
var o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
5333
|
+
return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(n, r, a, o) : this.resourceStore.getResource(n, r, a, o);
|
|
5331
5334
|
}
|
|
5332
5335
|
}], [{
|
|
5333
5336
|
key: "hasDefaultValue",
|
|
@@ -5393,17 +5396,17 @@ var $u = function() {
|
|
|
5393
5396
|
var r;
|
|
5394
5397
|
return i.forEach(function(a) {
|
|
5395
5398
|
if (!r) {
|
|
5396
|
-
var
|
|
5397
|
-
(!n.options.supportedLngs || n.isSupportedCode(
|
|
5399
|
+
var o = n.formatLanguageCode(a);
|
|
5400
|
+
(!n.options.supportedLngs || n.isSupportedCode(o)) && (r = o);
|
|
5398
5401
|
}
|
|
5399
5402
|
}), !r && this.options.supportedLngs && i.forEach(function(a) {
|
|
5400
5403
|
if (!r) {
|
|
5401
|
-
var
|
|
5402
|
-
if (n.isSupportedCode(
|
|
5403
|
-
return r =
|
|
5404
|
-
r = n.options.supportedLngs.find(function(
|
|
5405
|
-
if (
|
|
5406
|
-
return
|
|
5404
|
+
var o = n.getLanguagePartFromCode(a);
|
|
5405
|
+
if (n.isSupportedCode(o))
|
|
5406
|
+
return r = o;
|
|
5407
|
+
r = n.options.supportedLngs.find(function(s) {
|
|
5408
|
+
if (s.indexOf(o) === 0)
|
|
5409
|
+
return s;
|
|
5407
5410
|
});
|
|
5408
5411
|
}
|
|
5409
5412
|
}), r || (r = this.getFallbackCodes(this.options.fallbackLng)[0]), r;
|
|
@@ -5423,12 +5426,12 @@ var $u = function() {
|
|
|
5423
5426
|
}, {
|
|
5424
5427
|
key: "toResolveHierarchy",
|
|
5425
5428
|
value: function(i, n) {
|
|
5426
|
-
var r = this, a = this.getFallbackCodes(n || this.options.fallbackLng || [], i),
|
|
5427
|
-
c && (r.isSupportedCode(c) ?
|
|
5429
|
+
var r = this, a = this.getFallbackCodes(n || this.options.fallbackLng || [], i), o = [], s = function(c) {
|
|
5430
|
+
c && (r.isSupportedCode(c) ? o.push(c) : r.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)));
|
|
5428
5431
|
};
|
|
5429
|
-
return typeof i == "string" && i.indexOf("-") > -1 ? (this.options.load !== "languageOnly" &&
|
|
5430
|
-
|
|
5431
|
-
}),
|
|
5432
|
+
return typeof i == "string" && i.indexOf("-") > -1 ? (this.options.load !== "languageOnly" && s(this.formatLanguageCode(i)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && s(this.getScriptPartFromCode(i)), this.options.load !== "currentOnly" && s(this.getLanguagePartFromCode(i))) : typeof i == "string" && s(this.formatLanguageCode(i)), a.forEach(function(l) {
|
|
5433
|
+
o.indexOf(l) < 0 && s(r.formatLanguageCode(l));
|
|
5434
|
+
}), o;
|
|
5432
5435
|
}
|
|
5433
5436
|
}]), e;
|
|
5434
5437
|
}(), Wu = [{
|
|
@@ -5643,12 +5646,12 @@ var Ju = function() {
|
|
|
5643
5646
|
value: function(i, n) {
|
|
5644
5647
|
var r = this, a = this.getRule(i);
|
|
5645
5648
|
if (a) {
|
|
5646
|
-
var
|
|
5647
|
-
this.options.simplifyPluralSuffix && a.numbers.length === 2 && a.numbers[0] === 1 && (
|
|
5649
|
+
var o = a.noAbs ? a.plurals(n) : a.plurals(Math.abs(n)), s = a.numbers[o];
|
|
5650
|
+
this.options.simplifyPluralSuffix && a.numbers.length === 2 && a.numbers[0] === 1 && (s === 2 ? s = "plural" : s === 1 && (s = ""));
|
|
5648
5651
|
var l = function() {
|
|
5649
|
-
return r.options.prepend &&
|
|
5652
|
+
return r.options.prepend && s.toString() ? r.options.prepend + s.toString() : s.toString();
|
|
5650
5653
|
};
|
|
5651
|
-
return this.options.compatibilityJSON === "v1" ?
|
|
5654
|
+
return this.options.compatibilityJSON === "v1" ? s === 1 ? "" : typeof s == "number" ? "_plural_".concat(s.toString()) : l() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && a.numbers.length === 2 && a.numbers[0] === 1 ? l() : this.options.prepend && o.toString() ? this.options.prepend + o.toString() : o.toString();
|
|
5652
5655
|
}
|
|
5653
5656
|
return this.logger.warn("no plural rule found for: ".concat(i)), "";
|
|
5654
5657
|
}
|
|
@@ -5688,19 +5691,19 @@ var Ju = function() {
|
|
|
5688
5691
|
}, {
|
|
5689
5692
|
key: "interpolate",
|
|
5690
5693
|
value: function(i, n, r, a) {
|
|
5691
|
-
var
|
|
5694
|
+
var o = this, s, l, c, f = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
|
5692
5695
|
function v(_) {
|
|
5693
5696
|
return _.replace(/\$/g, "$$$$");
|
|
5694
5697
|
}
|
|
5695
5698
|
var O = function(C) {
|
|
5696
|
-
if (C.indexOf(
|
|
5697
|
-
var L =
|
|
5698
|
-
return
|
|
5699
|
+
if (C.indexOf(o.formatSeparator) < 0) {
|
|
5700
|
+
var L = _i(n, f, C);
|
|
5701
|
+
return o.alwaysFormat ? o.format(L, void 0, r, X({}, a, n, {
|
|
5699
5702
|
interpolationkey: C
|
|
5700
5703
|
})) : L;
|
|
5701
5704
|
}
|
|
5702
|
-
var U = C.split(
|
|
5703
|
-
return
|
|
5705
|
+
var U = C.split(o.formatSeparator), P = U.shift().trim(), z = U.join(o.formatSeparator).trim();
|
|
5706
|
+
return o.format(_i(n, f, P), z, r, X({}, a, n, {
|
|
5704
5707
|
interpolationkey: P
|
|
5705
5708
|
}));
|
|
5706
5709
|
};
|
|
@@ -5713,24 +5716,24 @@ var Ju = function() {
|
|
|
5713
5716
|
}, {
|
|
5714
5717
|
regex: this.regexp,
|
|
5715
5718
|
safeValue: function(C) {
|
|
5716
|
-
return
|
|
5719
|
+
return o.escapeValue ? v(o.escape(C)) : v(C);
|
|
5717
5720
|
}
|
|
5718
5721
|
}];
|
|
5719
5722
|
return b.forEach(function(_) {
|
|
5720
|
-
for (c = 0;
|
|
5721
|
-
if (l = O(
|
|
5723
|
+
for (c = 0; s = _.regex.exec(i); ) {
|
|
5724
|
+
if (l = O(s[1].trim()), l === void 0)
|
|
5722
5725
|
if (typeof A == "function") {
|
|
5723
|
-
var C = A(i,
|
|
5726
|
+
var C = A(i, s, a);
|
|
5724
5727
|
l = typeof C == "string" ? C : "";
|
|
5725
5728
|
} else if (R) {
|
|
5726
|
-
l =
|
|
5729
|
+
l = s[0];
|
|
5727
5730
|
continue;
|
|
5728
5731
|
} else
|
|
5729
|
-
|
|
5732
|
+
o.logger.warn("missed to pass in variable ".concat(s[1], " for interpolating ").concat(i)), l = "";
|
|
5730
5733
|
else
|
|
5731
|
-
typeof l != "string" && !
|
|
5734
|
+
typeof l != "string" && !o.useRawValueToEscape && (l = ki(l));
|
|
5732
5735
|
var L = _.safeValue(l);
|
|
5733
|
-
if (i = i.replace(
|
|
5736
|
+
if (i = i.replace(s[0], L), R ? (_.regex.lastIndex += L.length, _.regex.lastIndex -= s[0].length) : _.regex.lastIndex = 0, c++, c >= o.maxReplaces)
|
|
5734
5737
|
break;
|
|
5735
5738
|
}
|
|
5736
5739
|
}), i;
|
|
@@ -5738,7 +5741,7 @@ var Ju = function() {
|
|
|
5738
5741
|
}, {
|
|
5739
5742
|
key: "nest",
|
|
5740
5743
|
value: function(i, n) {
|
|
5741
|
-
var r = this, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
|
|
5744
|
+
var r = this, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o, s, l = X({}, a);
|
|
5742
5745
|
l.applyPostProcessor = !1, delete l.defaultValue;
|
|
5743
5746
|
function c(A, R) {
|
|
5744
5747
|
var b = this.nestingOptionsSeparator;
|
|
@@ -5753,21 +5756,21 @@ var Ju = function() {
|
|
|
5753
5756
|
}
|
|
5754
5757
|
return delete l.defaultValue, A;
|
|
5755
5758
|
}
|
|
5756
|
-
for (;
|
|
5759
|
+
for (; o = this.nestingRegexp.exec(i); ) {
|
|
5757
5760
|
var f = [], v = !1;
|
|
5758
|
-
if (
|
|
5759
|
-
var O =
|
|
5761
|
+
if (o[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(o[1])) {
|
|
5762
|
+
var O = o[1].split(this.formatSeparator).map(function(A) {
|
|
5760
5763
|
return A.trim();
|
|
5761
5764
|
});
|
|
5762
|
-
|
|
5765
|
+
o[1] = O.shift(), f = O, v = !0;
|
|
5763
5766
|
}
|
|
5764
|
-
if (
|
|
5765
|
-
return
|
|
5766
|
-
typeof
|
|
5767
|
+
if (s = n(c.call(this, o[1].trim(), l), l), s && o[0] === i && typeof s != "string")
|
|
5768
|
+
return s;
|
|
5769
|
+
typeof s != "string" && (s = ki(s)), s || (this.logger.warn("missed to resolve ".concat(o[1], " for nesting ").concat(i)), s = ""), v && (s = f.reduce(function(A, R) {
|
|
5767
5770
|
return r.format(A, R, a.lng, X({}, a, {
|
|
5768
|
-
interpolationkey:
|
|
5771
|
+
interpolationkey: o[1].trim()
|
|
5769
5772
|
}));
|
|
5770
|
-
},
|
|
5773
|
+
}, s.trim())), i = i.replace(o[0], s), this.regexp.lastIndex = 0;
|
|
5771
5774
|
}
|
|
5772
5775
|
return i;
|
|
5773
5776
|
}
|
|
@@ -5780,24 +5783,24 @@ function Zu(e, t) {
|
|
|
5780
5783
|
var Xu = function(e) {
|
|
5781
5784
|
Yt(t, e);
|
|
5782
5785
|
function t(i, n, r) {
|
|
5783
|
-
var a,
|
|
5784
|
-
return Oe(this, t), a = ht(this, He(t).call(this)), en && Te.call(Ie(a)), a.backend = i, a.store = n, a.services = r, a.languageUtils = r.languageUtils, a.options =
|
|
5786
|
+
var a, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
5787
|
+
return Oe(this, t), a = ht(this, He(t).call(this)), en && Te.call(Ie(a)), a.backend = i, a.store = n, a.services = r, a.languageUtils = r.languageUtils, a.options = o, a.logger = _e.create("backendConnector"), a.state = {}, a.queue = [], a.backend && a.backend.init && a.backend.init(r, o.backend, o), a;
|
|
5785
5788
|
}
|
|
5786
5789
|
return we(t, [{
|
|
5787
5790
|
key: "queueLoad",
|
|
5788
|
-
value: function(n, r, a,
|
|
5789
|
-
var
|
|
5791
|
+
value: function(n, r, a, o) {
|
|
5792
|
+
var s = this, l = [], c = [], f = [], v = [];
|
|
5790
5793
|
return n.forEach(function(O) {
|
|
5791
5794
|
var A = !0;
|
|
5792
5795
|
r.forEach(function(R) {
|
|
5793
5796
|
var b = "".concat(O, "|").concat(R);
|
|
5794
|
-
!a.reload &&
|
|
5797
|
+
!a.reload && s.store.hasResourceBundle(O, R) ? s.state[b] = 2 : s.state[b] < 0 || (s.state[b] === 1 ? c.indexOf(b) < 0 && c.push(b) : (s.state[b] = 1, A = !1, c.indexOf(b) < 0 && c.push(b), l.indexOf(b) < 0 && l.push(b), v.indexOf(R) < 0 && v.push(R)));
|
|
5795
5798
|
}), A || f.push(O);
|
|
5796
5799
|
}), (l.length || c.length) && this.queue.push({
|
|
5797
5800
|
pending: c,
|
|
5798
5801
|
loaded: {},
|
|
5799
5802
|
errors: [],
|
|
5800
|
-
callback:
|
|
5803
|
+
callback: o
|
|
5801
5804
|
}), {
|
|
5802
5805
|
toLoad: l,
|
|
5803
5806
|
pending: c,
|
|
@@ -5808,11 +5811,11 @@ var Xu = function(e) {
|
|
|
5808
5811
|
}, {
|
|
5809
5812
|
key: "loaded",
|
|
5810
5813
|
value: function(n, r, a) {
|
|
5811
|
-
var
|
|
5812
|
-
r && this.emit("failedLoading",
|
|
5814
|
+
var o = n.split("|"), s = o[0], l = o[1];
|
|
5815
|
+
r && this.emit("failedLoading", s, l, r), a && this.store.addResourceBundle(s, l, a), this.state[n] = r ? -1 : 2;
|
|
5813
5816
|
var c = {};
|
|
5814
5817
|
this.queue.forEach(function(f) {
|
|
5815
|
-
Bu(f.loaded, [
|
|
5818
|
+
Bu(f.loaded, [s], l), Zu(f.pending, n), r && f.errors.push(r), f.pending.length === 0 && !f.done && (Object.keys(f.loaded).forEach(function(v) {
|
|
5816
5819
|
c[v] || (c[v] = []), f.loaded[v].length && f.loaded[v].forEach(function(O) {
|
|
5817
5820
|
c[v].indexOf(O) < 0 && c[v].push(O);
|
|
5818
5821
|
});
|
|
@@ -5824,11 +5827,11 @@ var Xu = function(e) {
|
|
|
5824
5827
|
}, {
|
|
5825
5828
|
key: "read",
|
|
5826
5829
|
value: function(n, r, a) {
|
|
5827
|
-
var
|
|
5830
|
+
var o = this, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, l = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 350, c = arguments.length > 5 ? arguments[5] : void 0;
|
|
5828
5831
|
return n.length ? this.backend[a](n, r, function(f, v) {
|
|
5829
|
-
if (f && v &&
|
|
5832
|
+
if (f && v && s < 5) {
|
|
5830
5833
|
setTimeout(function() {
|
|
5831
|
-
|
|
5834
|
+
o.read.call(o, n, r, a, s + 1, l * 2, c);
|
|
5832
5835
|
}, l);
|
|
5833
5836
|
return;
|
|
5834
5837
|
}
|
|
@@ -5838,13 +5841,13 @@ var Xu = function(e) {
|
|
|
5838
5841
|
}, {
|
|
5839
5842
|
key: "prepareLoading",
|
|
5840
5843
|
value: function(n, r) {
|
|
5841
|
-
var a = this,
|
|
5844
|
+
var a = this, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = arguments.length > 3 ? arguments[3] : void 0;
|
|
5842
5845
|
if (!this.backend)
|
|
5843
|
-
return this.logger.warn("No backend was added via i18next.use. Will not load resources."),
|
|
5846
|
+
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s();
|
|
5844
5847
|
typeof n == "string" && (n = this.languageUtils.toResolveHierarchy(n)), typeof r == "string" && (r = [r]);
|
|
5845
|
-
var l = this.queueLoad(n, r,
|
|
5848
|
+
var l = this.queueLoad(n, r, o, s);
|
|
5846
5849
|
if (!l.toLoad.length)
|
|
5847
|
-
return l.pending.length ||
|
|
5850
|
+
return l.pending.length || s(), null;
|
|
5848
5851
|
l.toLoad.forEach(function(c) {
|
|
5849
5852
|
a.loadOne(c);
|
|
5850
5853
|
});
|
|
@@ -5864,22 +5867,22 @@ var Xu = function(e) {
|
|
|
5864
5867
|
}, {
|
|
5865
5868
|
key: "loadOne",
|
|
5866
5869
|
value: function(n) {
|
|
5867
|
-
var r = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "",
|
|
5868
|
-
this.read(
|
|
5869
|
-
c && r.logger.warn("".concat(a, "loading namespace ").concat(l, " for language ").concat(
|
|
5870
|
+
var r = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", o = n.split("|"), s = o[0], l = o[1];
|
|
5871
|
+
this.read(s, l, "read", void 0, void 0, function(c, f) {
|
|
5872
|
+
c && r.logger.warn("".concat(a, "loading namespace ").concat(l, " for language ").concat(s, " failed"), c), !c && f && r.logger.log("".concat(a, "loaded namespace ").concat(l, " for language ").concat(s), f), r.loaded(n, c, f);
|
|
5870
5873
|
});
|
|
5871
5874
|
}
|
|
5872
5875
|
}, {
|
|
5873
5876
|
key: "saveMissing",
|
|
5874
|
-
value: function(n, r, a,
|
|
5877
|
+
value: function(n, r, a, o, s) {
|
|
5875
5878
|
var l = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
|
|
5876
5879
|
if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(r)) {
|
|
5877
5880
|
this.logger.warn('did not save key "'.concat(a, '" as the namespace "').concat(r, '" was not yet loaded'), "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
|
|
5878
5881
|
return;
|
|
5879
5882
|
}
|
|
5880
|
-
a == null || a === "" || (this.backend && this.backend.create && this.backend.create(n, r, a,
|
|
5881
|
-
isUpdate:
|
|
5882
|
-
})), !(!n || !n[0]) && this.store.addResource(n[0], r, a,
|
|
5883
|
+
a == null || a === "" || (this.backend && this.backend.create && this.backend.create(n, r, a, o, null, X({}, l, {
|
|
5884
|
+
isUpdate: s
|
|
5885
|
+
})), !(!n || !n[0]) && this.store.addResource(n[0], r, a, o));
|
|
5883
5886
|
}
|
|
5884
5887
|
}]), t;
|
|
5885
5888
|
}(Te);
|
|
@@ -5946,7 +5949,7 @@ function Yu() {
|
|
|
5946
5949
|
}
|
|
5947
5950
|
};
|
|
5948
5951
|
}
|
|
5949
|
-
function
|
|
5952
|
+
function Ni(e) {
|
|
5950
5953
|
return typeof e.ns == "string" && (e.ns = [e.ns]), typeof e.fallbackLng == "string" && (e.fallbackLng = [e.fallbackLng]), typeof e.fallbackNS == "string" && (e.fallbackNS = [e.fallbackNS]), e.whitelist && (e.whitelist && e.whitelist.indexOf("cimode") < 0 && (e.whitelist = e.whitelist.concat(["cimode"])), e.supportedLngs = e.whitelist), e.nonExplicitWhitelist && (e.nonExplicitSupportedLngs = e.nonExplicitWhitelist), e.supportedLngs && e.supportedLngs.indexOf("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), e;
|
|
5951
5954
|
}
|
|
5952
5955
|
function Lt() {
|
|
@@ -5955,7 +5958,7 @@ var el = function(e) {
|
|
|
5955
5958
|
Yt(t, e);
|
|
5956
5959
|
function t() {
|
|
5957
5960
|
var i, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
|
|
5958
|
-
if (Oe(this, t), i = ht(this, He(t).call(this)), en && Te.call(Ie(i)), i.options =
|
|
5961
|
+
if (Oe(this, t), i = ht(this, He(t).call(this)), en && Te.call(Ie(i)), i.options = Ni(n), i.services = {}, i.logger = _e, i.modules = {
|
|
5959
5962
|
external: []
|
|
5960
5963
|
}, r && !i.isInitialized && !n.isClone) {
|
|
5961
5964
|
if (!i.options.initImmediate)
|
|
@@ -5970,26 +5973,26 @@ var el = function(e) {
|
|
|
5970
5973
|
key: "init",
|
|
5971
5974
|
value: function() {
|
|
5972
5975
|
var n = this, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = arguments.length > 1 ? arguments[1] : void 0;
|
|
5973
|
-
typeof r == "function" && (a = r, r = {}), r.whitelist && !r.supportedLngs && this.logger.deprecate("whitelist", 'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'), r.nonExplicitWhitelist && !r.nonExplicitSupportedLngs && this.logger.deprecate("whitelist", 'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'), this.options = X({}, Yu(), this.options,
|
|
5974
|
-
function
|
|
5976
|
+
typeof r == "function" && (a = r, r = {}), r.whitelist && !r.supportedLngs && this.logger.deprecate("whitelist", 'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'), r.nonExplicitWhitelist && !r.nonExplicitSupportedLngs && this.logger.deprecate("whitelist", 'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'), this.options = X({}, Yu(), this.options, Ni(r)), this.format = this.options.interpolation.format, a || (a = Lt);
|
|
5977
|
+
function o(R) {
|
|
5975
5978
|
return R ? typeof R == "function" ? new R() : R : null;
|
|
5976
5979
|
}
|
|
5977
5980
|
if (!this.options.isClone) {
|
|
5978
|
-
this.modules.logger ? _e.init(
|
|
5979
|
-
var
|
|
5981
|
+
this.modules.logger ? _e.init(o(this.modules.logger), this.options) : _e.init(null, this.options);
|
|
5982
|
+
var s = new $u(this.options);
|
|
5980
5983
|
this.store = new Ku(this.options.resources, this.options);
|
|
5981
5984
|
var l = this.services;
|
|
5982
|
-
l.logger = _e, l.resourceStore = this.store, l.languageUtils =
|
|
5985
|
+
l.logger = _e, l.resourceStore = this.store, l.languageUtils = s, l.pluralResolver = new Ju(s, {
|
|
5983
5986
|
prepend: this.options.pluralSeparator,
|
|
5984
5987
|
compatibilityJSON: this.options.compatibilityJSON,
|
|
5985
5988
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
5986
5989
|
}), l.interpolator = new Hu(this.options), l.utils = {
|
|
5987
5990
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
5988
|
-
}, l.backendConnector = new Xu(
|
|
5991
|
+
}, l.backendConnector = new Xu(o(this.modules.backend), l.resourceStore, l, this.options), l.backendConnector.on("*", function(R) {
|
|
5989
5992
|
for (var b = arguments.length, _ = new Array(b > 1 ? b - 1 : 0), C = 1; C < b; C++)
|
|
5990
5993
|
_[C - 1] = arguments[C];
|
|
5991
5994
|
n.emit.apply(n, [R].concat(_));
|
|
5992
|
-
}), this.modules.languageDetector && (l.languageDetector =
|
|
5995
|
+
}), this.modules.languageDetector && (l.languageDetector = o(this.modules.languageDetector), l.languageDetector.init(l, this.options.detection, this.options)), this.modules.i18nFormat && (l.i18nFormat = o(this.modules.i18nFormat), l.i18nFormat.init && l.i18nFormat.init(this)), this.translator = new Si(this.services, this.options), this.translator.on("*", function(R) {
|
|
5993
5996
|
for (var b = arguments.length, _ = new Array(b > 1 ? b - 1 : 0), C = 1; C < b; C++)
|
|
5994
5997
|
_[C - 1] = arguments[C];
|
|
5995
5998
|
n.emit.apply(n, [R].concat(_));
|
|
@@ -6029,10 +6032,10 @@ var el = function(e) {
|
|
|
6029
6032
|
}, {
|
|
6030
6033
|
key: "loadResources",
|
|
6031
6034
|
value: function(n) {
|
|
6032
|
-
var r = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Lt,
|
|
6033
|
-
if (typeof n == "function" && (
|
|
6034
|
-
if (
|
|
6035
|
-
return
|
|
6035
|
+
var r = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Lt, o = a, s = typeof n == "string" ? n : this.language;
|
|
6036
|
+
if (typeof n == "function" && (o = n), !this.options.resources || this.options.partialBundledLanguages) {
|
|
6037
|
+
if (s && s.toLowerCase() === "cimode")
|
|
6038
|
+
return o();
|
|
6036
6039
|
var l = [], c = function(O) {
|
|
6037
6040
|
if (O) {
|
|
6038
6041
|
var A = r.services.languageUtils.toResolveHierarchy(O);
|
|
@@ -6041,8 +6044,8 @@ var el = function(e) {
|
|
|
6041
6044
|
});
|
|
6042
6045
|
}
|
|
6043
6046
|
};
|
|
6044
|
-
if (
|
|
6045
|
-
c(
|
|
6047
|
+
if (s)
|
|
6048
|
+
c(s);
|
|
6046
6049
|
else {
|
|
6047
6050
|
var f = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
6048
6051
|
f.forEach(function(v) {
|
|
@@ -6051,17 +6054,17 @@ var el = function(e) {
|
|
|
6051
6054
|
}
|
|
6052
6055
|
this.options.preload && this.options.preload.forEach(function(v) {
|
|
6053
6056
|
return c(v);
|
|
6054
|
-
}), this.services.backendConnector.load(l, this.options.ns,
|
|
6057
|
+
}), this.services.backendConnector.load(l, this.options.ns, o);
|
|
6055
6058
|
} else
|
|
6056
|
-
|
|
6059
|
+
o(null);
|
|
6057
6060
|
}
|
|
6058
6061
|
}, {
|
|
6059
6062
|
key: "reloadResources",
|
|
6060
6063
|
value: function(n, r, a) {
|
|
6061
|
-
var
|
|
6062
|
-
return n || (n = this.languages), r || (r = this.options.ns), a || (a = Lt), this.services.backendConnector.reload(n, r, function(
|
|
6063
|
-
|
|
6064
|
-
}),
|
|
6064
|
+
var o = tt();
|
|
6065
|
+
return n || (n = this.languages), r || (r = this.options.ns), a || (a = Lt), this.services.backendConnector.reload(n, r, function(s) {
|
|
6066
|
+
o.resolve(), a(s);
|
|
6067
|
+
}), o;
|
|
6065
6068
|
}
|
|
6066
6069
|
}, {
|
|
6067
6070
|
key: "use",
|
|
@@ -6077,10 +6080,10 @@ var el = function(e) {
|
|
|
6077
6080
|
value: function(n, r) {
|
|
6078
6081
|
var a = this;
|
|
6079
6082
|
this.isLanguageChangingTo = n;
|
|
6080
|
-
var
|
|
6083
|
+
var o = tt();
|
|
6081
6084
|
this.emit("languageChanging", n);
|
|
6082
|
-
var
|
|
6083
|
-
v ? (a.language = v, a.languages = a.services.languageUtils.toResolveHierarchy(v), a.translator.changeLanguage(v), a.isLanguageChangingTo = void 0, a.emit("languageChanged", v), a.logger.log("languageChanged", v)) : a.isLanguageChangingTo = void 0,
|
|
6085
|
+
var s = function(f, v) {
|
|
6086
|
+
v ? (a.language = v, a.languages = a.services.languageUtils.toResolveHierarchy(v), a.translator.changeLanguage(v), a.isLanguageChangingTo = void 0, a.emit("languageChanged", v), a.logger.log("languageChanged", v)) : a.isLanguageChangingTo = void 0, o.resolve(function() {
|
|
6084
6087
|
return a.t.apply(a, arguments);
|
|
6085
6088
|
}), r && r(f, function() {
|
|
6086
6089
|
return a.t.apply(a, arguments);
|
|
@@ -6089,15 +6092,15 @@ var el = function(e) {
|
|
|
6089
6092
|
!n && !f && a.services.languageDetector && (f = []);
|
|
6090
6093
|
var v = typeof f == "string" ? f : a.services.languageUtils.getBestMatchFromCodes(f);
|
|
6091
6094
|
v && (a.language || (a.language = v, a.languages = a.services.languageUtils.toResolveHierarchy(v)), a.translator.language || a.translator.changeLanguage(v), a.services.languageDetector && a.services.languageDetector.cacheUserLanguage(v)), a.loadResources(v, function(O) {
|
|
6092
|
-
|
|
6095
|
+
s(O, v);
|
|
6093
6096
|
});
|
|
6094
6097
|
};
|
|
6095
|
-
return !n && this.services.languageDetector && !this.services.languageDetector.async ? l(this.services.languageDetector.detect()) : !n && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect(l) : l(n),
|
|
6098
|
+
return !n && this.services.languageDetector && !this.services.languageDetector.async ? l(this.services.languageDetector.detect()) : !n && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect(l) : l(n), o;
|
|
6096
6099
|
}
|
|
6097
6100
|
}, {
|
|
6098
6101
|
key: "getFixedT",
|
|
6099
6102
|
value: function(n, r) {
|
|
6100
|
-
var a = this,
|
|
6103
|
+
var a = this, o = function s(l, c) {
|
|
6101
6104
|
var f;
|
|
6102
6105
|
if (fe(c) !== "object") {
|
|
6103
6106
|
for (var v = arguments.length, O = new Array(v > 2 ? v - 2 : 0), A = 2; A < v; A++)
|
|
@@ -6105,9 +6108,9 @@ var el = function(e) {
|
|
|
6105
6108
|
f = a.options.overloadTranslationOptionHandler([l, c].concat(O));
|
|
6106
6109
|
} else
|
|
6107
6110
|
f = X({}, c);
|
|
6108
|
-
return f.lng = f.lng ||
|
|
6111
|
+
return f.lng = f.lng || s.lng, f.lngs = f.lngs || s.lngs, f.ns = f.ns || s.ns, a.t(l, f);
|
|
6109
6112
|
};
|
|
6110
|
-
return typeof n == "string" ?
|
|
6113
|
+
return typeof n == "string" ? o.lng = n : o.lngs = n, o.ns = r, o;
|
|
6111
6114
|
}
|
|
6112
6115
|
}, {
|
|
6113
6116
|
key: "t",
|
|
@@ -6134,8 +6137,8 @@ var el = function(e) {
|
|
|
6134
6137
|
return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
|
|
6135
6138
|
if (!this.languages || !this.languages.length)
|
|
6136
6139
|
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
6137
|
-
var
|
|
6138
|
-
if (
|
|
6140
|
+
var o = this.languages[0], s = this.options ? this.options.fallbackLng : !1, l = this.languages[this.languages.length - 1];
|
|
6141
|
+
if (o.toLowerCase() === "cimode")
|
|
6139
6142
|
return !0;
|
|
6140
6143
|
var c = function(O, A) {
|
|
6141
6144
|
var R = r.services.backendConnector.state["".concat(O, "|").concat(A)];
|
|
@@ -6146,27 +6149,27 @@ var el = function(e) {
|
|
|
6146
6149
|
if (f !== void 0)
|
|
6147
6150
|
return f;
|
|
6148
6151
|
}
|
|
6149
|
-
return !!(this.hasResourceBundle(
|
|
6152
|
+
return !!(this.hasResourceBundle(o, n) || !this.services.backendConnector.backend || c(o, n) && (!s || c(l, n)));
|
|
6150
6153
|
}
|
|
6151
6154
|
}, {
|
|
6152
6155
|
key: "loadNamespaces",
|
|
6153
6156
|
value: function(n, r) {
|
|
6154
|
-
var a = this,
|
|
6155
|
-
return this.options.ns ? (typeof n == "string" && (n = [n]), n.forEach(function(
|
|
6156
|
-
a.options.ns.indexOf(
|
|
6157
|
-
}), this.loadResources(function(
|
|
6158
|
-
|
|
6159
|
-
}),
|
|
6157
|
+
var a = this, o = tt();
|
|
6158
|
+
return this.options.ns ? (typeof n == "string" && (n = [n]), n.forEach(function(s) {
|
|
6159
|
+
a.options.ns.indexOf(s) < 0 && a.options.ns.push(s);
|
|
6160
|
+
}), this.loadResources(function(s) {
|
|
6161
|
+
o.resolve(), r && r(s);
|
|
6162
|
+
}), o) : (r && r(), Promise.resolve());
|
|
6160
6163
|
}
|
|
6161
6164
|
}, {
|
|
6162
6165
|
key: "loadLanguages",
|
|
6163
6166
|
value: function(n, r) {
|
|
6164
6167
|
var a = tt();
|
|
6165
6168
|
typeof n == "string" && (n = [n]);
|
|
6166
|
-
var
|
|
6167
|
-
return
|
|
6169
|
+
var o = this.options.preload || [], s = n.filter(function(l) {
|
|
6170
|
+
return o.indexOf(l) < 0;
|
|
6168
6171
|
});
|
|
6169
|
-
return
|
|
6172
|
+
return s.length ? (this.options.preload = o.concat(s), this.loadResources(function(l) {
|
|
6170
6173
|
a.resolve(), r && r(l);
|
|
6171
6174
|
}), a) : (r && r(), Promise.resolve());
|
|
6172
6175
|
}
|
|
@@ -6187,20 +6190,20 @@ var el = function(e) {
|
|
|
6187
6190
|
}, {
|
|
6188
6191
|
key: "cloneInstance",
|
|
6189
6192
|
value: function() {
|
|
6190
|
-
var n = this, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Lt,
|
|
6193
|
+
var n = this, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Lt, o = X({}, this.options, r, {
|
|
6191
6194
|
isClone: !0
|
|
6192
|
-
}),
|
|
6195
|
+
}), s = new t(o), l = ["store", "services", "language"];
|
|
6193
6196
|
return l.forEach(function(c) {
|
|
6194
|
-
|
|
6195
|
-
}),
|
|
6196
|
-
hasLoadedNamespace:
|
|
6197
|
-
},
|
|
6197
|
+
s[c] = n[c];
|
|
6198
|
+
}), s.services = X({}, this.services), s.services.utils = {
|
|
6199
|
+
hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
|
|
6200
|
+
}, s.translator = new Si(s.services, s.options), s.translator.on("*", function(c) {
|
|
6198
6201
|
for (var f = arguments.length, v = new Array(f > 1 ? f - 1 : 0), O = 1; O < f; O++)
|
|
6199
6202
|
v[O - 1] = arguments[O];
|
|
6200
|
-
|
|
6201
|
-
}),
|
|
6202
|
-
hasLoadedNamespace:
|
|
6203
|
-
},
|
|
6203
|
+
s.emit.apply(s, [c].concat(v));
|
|
6204
|
+
}), s.init(o, a), s.translator.options = s.options, s.translator.backendConnector.services.utils = {
|
|
6205
|
+
hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
|
|
6206
|
+
}, s;
|
|
6204
6207
|
}
|
|
6205
6208
|
}, {
|
|
6206
6209
|
key: "toJSON",
|
|
@@ -6260,71 +6263,71 @@ function al(e) {
|
|
|
6260
6263
|
var t = rl(e, "string");
|
|
6261
6264
|
return mt(t) === "symbol" ? t : String(t);
|
|
6262
6265
|
}
|
|
6263
|
-
function
|
|
6266
|
+
function Oi(e, t) {
|
|
6264
6267
|
for (var i = 0; i < t.length; i++) {
|
|
6265
6268
|
var n = t[i];
|
|
6266
6269
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, al(n.key), n);
|
|
6267
6270
|
}
|
|
6268
6271
|
}
|
|
6269
|
-
function
|
|
6270
|
-
return t &&
|
|
6272
|
+
function ol(e, t, i) {
|
|
6273
|
+
return t && Oi(e.prototype, t), i && Oi(e, i), Object.defineProperty(e, "prototype", {
|
|
6271
6274
|
writable: !1
|
|
6272
6275
|
}), e;
|
|
6273
6276
|
}
|
|
6274
|
-
var ea = [],
|
|
6277
|
+
var ea = [], sl = ea.forEach, ul = ea.slice;
|
|
6275
6278
|
function ll(e) {
|
|
6276
|
-
return
|
|
6279
|
+
return sl.call(ul.call(arguments, 1), function(t) {
|
|
6277
6280
|
if (t)
|
|
6278
6281
|
for (var i in t)
|
|
6279
6282
|
e[i] === void 0 && (e[i] = t[i]);
|
|
6280
6283
|
}), e;
|
|
6281
6284
|
}
|
|
6282
|
-
var
|
|
6285
|
+
var wi = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, cl = function(t, i, n) {
|
|
6283
6286
|
var r = n || {};
|
|
6284
6287
|
r.path = r.path || "/";
|
|
6285
|
-
var a = encodeURIComponent(i),
|
|
6288
|
+
var a = encodeURIComponent(i), o = "".concat(t, "=").concat(a);
|
|
6286
6289
|
if (r.maxAge > 0) {
|
|
6287
|
-
var
|
|
6288
|
-
if (Number.isNaN(
|
|
6290
|
+
var s = r.maxAge - 0;
|
|
6291
|
+
if (Number.isNaN(s))
|
|
6289
6292
|
throw new Error("maxAge should be a Number");
|
|
6290
|
-
|
|
6293
|
+
o += "; Max-Age=".concat(Math.floor(s));
|
|
6291
6294
|
}
|
|
6292
6295
|
if (r.domain) {
|
|
6293
|
-
if (!
|
|
6296
|
+
if (!wi.test(r.domain))
|
|
6294
6297
|
throw new TypeError("option domain is invalid");
|
|
6295
|
-
|
|
6298
|
+
o += "; Domain=".concat(r.domain);
|
|
6296
6299
|
}
|
|
6297
6300
|
if (r.path) {
|
|
6298
|
-
if (!
|
|
6301
|
+
if (!wi.test(r.path))
|
|
6299
6302
|
throw new TypeError("option path is invalid");
|
|
6300
|
-
|
|
6303
|
+
o += "; Path=".concat(r.path);
|
|
6301
6304
|
}
|
|
6302
6305
|
if (r.expires) {
|
|
6303
6306
|
if (typeof r.expires.toUTCString != "function")
|
|
6304
6307
|
throw new TypeError("option expires is invalid");
|
|
6305
|
-
|
|
6308
|
+
o += "; Expires=".concat(r.expires.toUTCString());
|
|
6306
6309
|
}
|
|
6307
|
-
if (r.httpOnly && (
|
|
6310
|
+
if (r.httpOnly && (o += "; HttpOnly"), r.secure && (o += "; Secure"), r.sameSite) {
|
|
6308
6311
|
var l = typeof r.sameSite == "string" ? r.sameSite.toLowerCase() : r.sameSite;
|
|
6309
6312
|
switch (l) {
|
|
6310
6313
|
case !0:
|
|
6311
|
-
|
|
6314
|
+
o += "; SameSite=Strict";
|
|
6312
6315
|
break;
|
|
6313
6316
|
case "lax":
|
|
6314
|
-
|
|
6317
|
+
o += "; SameSite=Lax";
|
|
6315
6318
|
break;
|
|
6316
6319
|
case "strict":
|
|
6317
|
-
|
|
6320
|
+
o += "; SameSite=Strict";
|
|
6318
6321
|
break;
|
|
6319
6322
|
case "none":
|
|
6320
|
-
|
|
6323
|
+
o += "; SameSite=None";
|
|
6321
6324
|
break;
|
|
6322
6325
|
default:
|
|
6323
6326
|
throw new TypeError("option sameSite is invalid");
|
|
6324
6327
|
}
|
|
6325
6328
|
}
|
|
6326
|
-
return
|
|
6327
|
-
},
|
|
6329
|
+
return o;
|
|
6330
|
+
}, Ei = {
|
|
6328
6331
|
create: function(t, i, n, r) {
|
|
6329
6332
|
var a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
6330
6333
|
path: "/",
|
|
@@ -6349,13 +6352,13 @@ var Ni = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, cl = function(t, i, n) {
|
|
|
6349
6352
|
lookup: function(t) {
|
|
6350
6353
|
var i;
|
|
6351
6354
|
if (t.lookupCookie && typeof document != "undefined") {
|
|
6352
|
-
var n =
|
|
6355
|
+
var n = Ei.read(t.lookupCookie);
|
|
6353
6356
|
n && (i = n);
|
|
6354
6357
|
}
|
|
6355
6358
|
return i;
|
|
6356
6359
|
},
|
|
6357
6360
|
cacheUserLanguage: function(t, i) {
|
|
6358
|
-
i.lookupCookie && typeof document != "undefined" &&
|
|
6361
|
+
i.lookupCookie && typeof document != "undefined" && Ei.create(i.lookupCookie, t, i.cookieMinutes, i.cookieDomain, i.cookieOptions);
|
|
6359
6362
|
}
|
|
6360
6363
|
}, fl = {
|
|
6361
6364
|
name: "querystring",
|
|
@@ -6364,17 +6367,17 @@ var Ni = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, cl = function(t, i, n) {
|
|
|
6364
6367
|
if (typeof window != "undefined") {
|
|
6365
6368
|
var n = window.location.search;
|
|
6366
6369
|
!window.location.search && window.location.hash && window.location.hash.indexOf("?") > -1 && (n = window.location.hash.substring(window.location.hash.indexOf("?")));
|
|
6367
|
-
for (var r = n.substring(1), a = r.split("&"),
|
|
6368
|
-
var
|
|
6369
|
-
if (
|
|
6370
|
-
var l = a[
|
|
6371
|
-
l === t.lookupQuerystring && (i = a[
|
|
6370
|
+
for (var r = n.substring(1), a = r.split("&"), o = 0; o < a.length; o++) {
|
|
6371
|
+
var s = a[o].indexOf("=");
|
|
6372
|
+
if (s > 0) {
|
|
6373
|
+
var l = a[o].substring(0, s);
|
|
6374
|
+
l === t.lookupQuerystring && (i = a[o].substring(s + 1));
|
|
6372
6375
|
}
|
|
6373
6376
|
}
|
|
6374
6377
|
}
|
|
6375
6378
|
return i;
|
|
6376
6379
|
}
|
|
6377
|
-
}, nt = null,
|
|
6380
|
+
}, nt = null, Ai = function() {
|
|
6378
6381
|
if (nt !== null)
|
|
6379
6382
|
return nt;
|
|
6380
6383
|
try {
|
|
@@ -6389,16 +6392,16 @@ var Ni = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, cl = function(t, i, n) {
|
|
|
6389
6392
|
name: "localStorage",
|
|
6390
6393
|
lookup: function(t) {
|
|
6391
6394
|
var i;
|
|
6392
|
-
if (t.lookupLocalStorage &&
|
|
6395
|
+
if (t.lookupLocalStorage && Ai()) {
|
|
6393
6396
|
var n = window.localStorage.getItem(t.lookupLocalStorage);
|
|
6394
6397
|
n && (i = n);
|
|
6395
6398
|
}
|
|
6396
6399
|
return i;
|
|
6397
6400
|
},
|
|
6398
6401
|
cacheUserLanguage: function(t, i) {
|
|
6399
|
-
i.lookupLocalStorage &&
|
|
6402
|
+
i.lookupLocalStorage && Ai() && window.localStorage.setItem(i.lookupLocalStorage, t);
|
|
6400
6403
|
}
|
|
6401
|
-
}, it = null,
|
|
6404
|
+
}, it = null, Fi = function() {
|
|
6402
6405
|
if (it !== null)
|
|
6403
6406
|
return it;
|
|
6404
6407
|
try {
|
|
@@ -6413,14 +6416,14 @@ var Ni = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, cl = function(t, i, n) {
|
|
|
6413
6416
|
name: "sessionStorage",
|
|
6414
6417
|
lookup: function(t) {
|
|
6415
6418
|
var i;
|
|
6416
|
-
if (t.lookupSessionStorage &&
|
|
6419
|
+
if (t.lookupSessionStorage && Fi()) {
|
|
6417
6420
|
var n = window.sessionStorage.getItem(t.lookupSessionStorage);
|
|
6418
6421
|
n && (i = n);
|
|
6419
6422
|
}
|
|
6420
6423
|
return i;
|
|
6421
6424
|
},
|
|
6422
6425
|
cacheUserLanguage: function(t, i) {
|
|
6423
|
-
i.lookupSessionStorage &&
|
|
6426
|
+
i.lookupSessionStorage && Fi() && window.sessionStorage.setItem(i.lookupSessionStorage, t);
|
|
6424
6427
|
}
|
|
6425
6428
|
}, vl = {
|
|
6426
6429
|
name: "navigator",
|
|
@@ -6486,7 +6489,7 @@ var ta = /* @__PURE__ */ function() {
|
|
|
6486
6489
|
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6487
6490
|
il(this, e), this.type = "languageDetector", this.detectors = {}, this.init(t, i);
|
|
6488
6491
|
}
|
|
6489
|
-
return
|
|
6492
|
+
return ol(e, [{
|
|
6490
6493
|
key: "init",
|
|
6491
6494
|
value: function(i) {
|
|
6492
6495
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
@@ -6509,8 +6512,8 @@ var ta = /* @__PURE__ */ function() {
|
|
|
6509
6512
|
var r = [];
|
|
6510
6513
|
return i.forEach(function(a) {
|
|
6511
6514
|
if (n.detectors[a]) {
|
|
6512
|
-
var
|
|
6513
|
-
|
|
6515
|
+
var o = n.detectors[a].lookup(n.options);
|
|
6516
|
+
o && typeof o == "string" && (o = [o]), o && (r = r.concat(o));
|
|
6514
6517
|
}
|
|
6515
6518
|
}), r = r.map(function(a) {
|
|
6516
6519
|
return n.options.convertDetectedLanguage(a);
|
|
@@ -6549,7 +6552,7 @@ const _l = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|
|
|
|
6549
6552
|
"/": "/",
|
|
6550
6553
|
"/": "/"
|
|
6551
6554
|
}, Sl = (e) => bl[e], Nl = (e) => e.replace(_l, Sl);
|
|
6552
|
-
let
|
|
6555
|
+
let Ci = {
|
|
6553
6556
|
bindI18n: "languageChanged",
|
|
6554
6557
|
bindI18nStore: "",
|
|
6555
6558
|
transEmptyNodeValue: "",
|
|
@@ -6561,8 +6564,8 @@ let Ai = {
|
|
|
6561
6564
|
};
|
|
6562
6565
|
function Ol() {
|
|
6563
6566
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
6564
|
-
|
|
6565
|
-
...
|
|
6567
|
+
Ci = {
|
|
6568
|
+
...Ci,
|
|
6566
6569
|
...e
|
|
6567
6570
|
};
|
|
6568
6571
|
}
|
|
@@ -6652,50 +6655,50 @@ function yc(e) {
|
|
|
6652
6655
|
}
|
|
6653
6656
|
export {
|
|
6654
6657
|
zr as AccountContractStatusTypes,
|
|
6655
|
-
|
|
6658
|
+
Ts as AccountContractTypes,
|
|
6656
6659
|
rc as AccountInvalidError,
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6660
|
+
xs as AccountPlanDescriptionTypes,
|
|
6661
|
+
Is as AccountRestRepository,
|
|
6662
|
+
Vs as AccountService,
|
|
6663
|
+
Ls as AccountSubscriptionTypes,
|
|
6661
6664
|
Gr as AccountTypes,
|
|
6662
|
-
|
|
6665
|
+
Cs as AggregateRoot,
|
|
6663
6666
|
kc as ApiGraphqlTypes,
|
|
6664
|
-
|
|
6667
|
+
oc as BaseMobxStore,
|
|
6665
6668
|
Xt as DomainError,
|
|
6666
6669
|
mc as EventBusWildcards,
|
|
6667
6670
|
vc as EventNames,
|
|
6668
|
-
|
|
6669
|
-
|
|
6671
|
+
Ps as GlobalPageSectionTypes,
|
|
6672
|
+
_s as InvalidNizzaGlobalObjectError,
|
|
6670
6673
|
xu as LanguageTypes,
|
|
6671
|
-
|
|
6674
|
+
jn as NizzaAccount,
|
|
6672
6675
|
Lu as NizzaEventStatus,
|
|
6673
6676
|
Du as NizzaProductRequestOriginTypes,
|
|
6674
6677
|
Pt as NizzaStore,
|
|
6675
6678
|
Pu as NizzaVariationTypes,
|
|
6676
|
-
|
|
6679
|
+
ks as ResourceNotFoundError,
|
|
6677
6680
|
uc as StoreProvider,
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
+
ys as UnexpectedError,
|
|
6682
|
+
sc as ValueObject,
|
|
6683
|
+
En as accountAtom,
|
|
6681
6684
|
Kr as accountService,
|
|
6682
6685
|
ec as apiCall,
|
|
6683
|
-
|
|
6684
|
-
|
|
6686
|
+
Rs as createAggregateRoot,
|
|
6687
|
+
ws as createLogger,
|
|
6685
6688
|
yc as createStore,
|
|
6686
|
-
|
|
6689
|
+
Pi as customFetch,
|
|
6687
6690
|
tc as downloadFile,
|
|
6688
6691
|
ic as fileOrigin,
|
|
6689
6692
|
Tu as getAccount,
|
|
6690
|
-
|
|
6693
|
+
As as getLogger,
|
|
6691
6694
|
cc as getStore,
|
|
6692
6695
|
Ru as globalAtomStore,
|
|
6693
6696
|
gc as i18n,
|
|
6694
|
-
|
|
6697
|
+
Fs as initializeLogger,
|
|
6695
6698
|
Fa as jsDownload,
|
|
6696
6699
|
ac as logger,
|
|
6697
|
-
|
|
6698
|
-
|
|
6700
|
+
Vn as nizza,
|
|
6701
|
+
Es as registerLogger,
|
|
6699
6702
|
pc as registerTranslations,
|
|
6700
6703
|
nc as searchParams,
|
|
6701
6704
|
Ra as shortId,
|