@stonecrop/desktop 0.12.0 → 0.12.2
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/desktop.css +1 -1
- package/dist/desktop.js +789 -781
- package/dist/desktop.js.map +1 -1
- package/package.json +7 -7
- package/src/components/Desktop.vue +17 -16
- package/src/components/SheetNav.vue +4 -1
package/dist/desktop.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header" }, Pi = ["disabled", "onClick"], qi = { key: 0 }, Vi = { class: "dropdown-header" }, Li = ["onClick"],
|
|
1
|
+
import { defineComponent as Ve, ref as N, onMounted as vr, openBlock as P, createElementBlock as U, normalizeClass as ee, createElementVNode as T, Fragment as ne, renderList as Ne, toDisplayString as Dt, createCommentVNode as Bt, withDirectives as ir, vShow as Br, useTemplateRef as bo, computed as C, watch as rt, nextTick as oe, createBlock as sr, Teleport as Ai, createVNode as re, Transition as Ri, withCtx as Ce, withModifiers as So, vModelText as Io, renderSlot as zr, createTextVNode as ar, toRaw as Eo, isRef as ie, isReactive as yr, toRef as Wt, hasInjectionContext as Wr, inject as xe, getCurrentInstance as Oo, reactive as ko, markRaw as Ie, effectScope as Ni, getCurrentScope as an, onScopeDispose as un, toRefs as qn, provide as Kr, shallowRef as Le, toValue as wt, readonly as _r, customRef as cn, unref as rr, useModel as Ci, watchEffect as xi, resolveDynamicComponent as Vn, mergeProps as ji, mergeModels as Ln, resolveComponent as $i, withKeys as be, normalizeStyle as Ar } from "vue";
|
|
2
|
+
const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header" }, Pi = ["disabled", "onClick"], qi = { key: 0 }, Vi = { class: "dropdown-header" }, Li = ["onClick"], Fi = ["onClick"], Ui = { class: "dropdown-container" }, Bi = { class: "dropdown" }, Wi = ["onClick"], Ki = ["href"], Hi = { class: "dropdown-item" }, Ji = /* @__PURE__ */ Ve({
|
|
3
3
|
__name: "ActionSet",
|
|
4
4
|
props: {
|
|
5
5
|
elements: { default: () => [] }
|
|
@@ -20,54 +20,54 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
20
20
|
}, c = (l, f) => {
|
|
21
21
|
r("actionClick", f, l);
|
|
22
22
|
};
|
|
23
|
-
return (l, f) => (
|
|
23
|
+
return (l, f) => (P(), U("div", {
|
|
24
24
|
class: ee([{ collapsed: !o.value }, "action-set"])
|
|
25
25
|
}, [
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
T("div", Mi, [
|
|
27
|
+
T("div", {
|
|
28
28
|
id: "cross",
|
|
29
29
|
class: ee({ rotated: o.value }),
|
|
30
30
|
onClick: a
|
|
31
31
|
}, "×", 2)
|
|
32
32
|
]),
|
|
33
|
-
f[0] || (f[0] =
|
|
34
|
-
(
|
|
33
|
+
f[0] || (f[0] = T("div", { style: { "margin-right": "30px" } }, null, -1)),
|
|
34
|
+
(P(!0), U(ne, null, Ne(t.elements, (h, p) => (P(), U("div", {
|
|
35
35
|
key: h.label,
|
|
36
36
|
class: "action-element"
|
|
37
37
|
}, [
|
|
38
|
-
|
|
39
|
-
h.type == "button" ? (
|
|
38
|
+
T("div", Ti, [
|
|
39
|
+
h.type == "button" ? (P(), U("button", {
|
|
40
40
|
key: 0,
|
|
41
41
|
disabled: h.disabled,
|
|
42
42
|
class: "button-default",
|
|
43
43
|
onClick: (d) => c(h.action, h.label)
|
|
44
44
|
}, Dt(h.label), 9, Pi)) : Bt("", !0)
|
|
45
45
|
]),
|
|
46
|
-
h.type == "dropdown" ? (
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
h.type == "dropdown" ? (P(), U("div", qi, [
|
|
47
|
+
T("div", Vi, [
|
|
48
|
+
T("div", {
|
|
49
49
|
class: ee(["cross", { rotated: i.value[p] }]),
|
|
50
50
|
onClick: (d) => u(p)
|
|
51
51
|
}, "×", 10, Li),
|
|
52
|
-
|
|
52
|
+
T("button", {
|
|
53
53
|
class: "button-default dropdown-title",
|
|
54
54
|
onClick: (d) => u(p)
|
|
55
|
-
}, Dt(h.label), 9,
|
|
55
|
+
}, Dt(h.label), 9, Fi)
|
|
56
56
|
]),
|
|
57
|
-
ir(
|
|
58
|
-
|
|
59
|
-
(
|
|
57
|
+
ir(T("div", Ui, [
|
|
58
|
+
T("div", Bi, [
|
|
59
|
+
(P(!0), U(ne, null, Ne(h.actions, (d) => (P(), U("div", {
|
|
60
60
|
key: d.label
|
|
61
61
|
}, [
|
|
62
|
-
d.action != null ? (
|
|
62
|
+
d.action != null ? (P(), U("button", {
|
|
63
63
|
key: 0,
|
|
64
64
|
class: "dropdown-item",
|
|
65
|
-
onClick: (
|
|
66
|
-
}, Dt(d.label), 9, Wi)) : d.link != null ? (
|
|
65
|
+
onClick: (y) => c(d.action, d.label)
|
|
66
|
+
}, Dt(d.label), 9, Wi)) : d.link != null ? (P(), U("a", {
|
|
67
67
|
key: 1,
|
|
68
68
|
href: d.link
|
|
69
69
|
}, [
|
|
70
|
-
|
|
70
|
+
T("button", Hi, Dt(d.label), 1)
|
|
71
71
|
], 8, Ki)) : Bt("", !0)
|
|
72
72
|
]))), 128))
|
|
73
73
|
])
|
|
@@ -89,7 +89,7 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
89
89
|
}, Xi = ["onClick", "onMouseover"], Zi = { class: "result-title" }, ts = { class: "result-content" }, es = {
|
|
90
90
|
key: 1,
|
|
91
91
|
class: "command-palette-no-results"
|
|
92
|
-
}, Ao = /* @__PURE__ */
|
|
92
|
+
}, Ao = /* @__PURE__ */ Ve({
|
|
93
93
|
__name: "CommandPalette",
|
|
94
94
|
props: {
|
|
95
95
|
search: { type: Function },
|
|
@@ -99,7 +99,7 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
99
99
|
},
|
|
100
100
|
emits: ["select", "close"],
|
|
101
101
|
setup(t, { emit: e }) {
|
|
102
|
-
const r = e, n = N(""), o = N(0), i = bo("input"), s =
|
|
102
|
+
const r = e, n = N(""), o = N(0), i = bo("input"), s = C(() => n.value ? t.search(n.value).slice(0, t.maxResults) : []);
|
|
103
103
|
rt(
|
|
104
104
|
() => t.isOpen,
|
|
105
105
|
async (l) => {
|
|
@@ -128,21 +128,21 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
128
128
|
}, c = (l) => {
|
|
129
129
|
r("select", l), a();
|
|
130
130
|
};
|
|
131
|
-
return (l, f) => (
|
|
131
|
+
return (l, f) => (P(), sr(Ai, { to: "body" }, [
|
|
132
132
|
re(Ri, { name: "fade" }, {
|
|
133
|
-
default:
|
|
134
|
-
t.isOpen ? (
|
|
133
|
+
default: Ce(() => [
|
|
134
|
+
t.isOpen ? (P(), U("div", {
|
|
135
135
|
key: 0,
|
|
136
136
|
class: "command-palette-overlay",
|
|
137
137
|
onClick: a
|
|
138
138
|
}, [
|
|
139
|
-
|
|
139
|
+
T("div", {
|
|
140
140
|
class: "command-palette",
|
|
141
141
|
onClick: f[1] || (f[1] = So(() => {
|
|
142
142
|
}, ["stop"]))
|
|
143
143
|
}, [
|
|
144
|
-
|
|
145
|
-
ir(
|
|
144
|
+
T("div", Gi, [
|
|
145
|
+
ir(T("input", {
|
|
146
146
|
ref: "input",
|
|
147
147
|
"onUpdate:modelValue": f[0] || (f[0] = (h) => n.value = h),
|
|
148
148
|
type: "text",
|
|
@@ -154,21 +154,21 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
154
154
|
[Io, n.value]
|
|
155
155
|
])
|
|
156
156
|
]),
|
|
157
|
-
s.value.length ? (
|
|
158
|
-
(
|
|
157
|
+
s.value.length ? (P(), U("div", Yi, [
|
|
158
|
+
(P(!0), U(ne, null, Ne(s.value, (h, p) => (P(), U("div", {
|
|
159
159
|
key: p,
|
|
160
160
|
class: ee(["command-palette-result", { selected: p === o.value }]),
|
|
161
161
|
onClick: (d) => c(h),
|
|
162
162
|
onMouseover: (d) => o.value = p
|
|
163
163
|
}, [
|
|
164
|
-
|
|
164
|
+
T("div", Zi, [
|
|
165
165
|
zr(l.$slots, "title", { result: h })
|
|
166
166
|
]),
|
|
167
|
-
|
|
167
|
+
T("div", ts, [
|
|
168
168
|
zr(l.$slots, "content", { result: h })
|
|
169
169
|
])
|
|
170
170
|
], 42, Xi))), 128))
|
|
171
|
-
])) : n.value && !s.value.length ? (
|
|
171
|
+
])) : n.value && !s.value.length ? (P(), U("div", es, [
|
|
172
172
|
zr(l.$slots, "empty", {}, () => [
|
|
173
173
|
ar(' No results found for "' + Dt(n.value) + '" ', 1)
|
|
174
174
|
])
|
|
@@ -182,8 +182,8 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
const Zt = typeof window < "u";
|
|
185
|
-
let
|
|
186
|
-
const ur = (t) =>
|
|
185
|
+
let Ut;
|
|
186
|
+
const ur = (t) => Ut = t;
|
|
187
187
|
process.env.NODE_ENV;
|
|
188
188
|
const Hr = process.env.NODE_ENV !== "production" ? /* @__PURE__ */ Symbol("pinia") : (
|
|
189
189
|
/* istanbul ignore next */
|
|
@@ -208,7 +208,7 @@ function Ro(t, e) {
|
|
|
208
208
|
}
|
|
209
209
|
const No = () => {
|
|
210
210
|
};
|
|
211
|
-
function
|
|
211
|
+
function Fn(t, e, r, n = No) {
|
|
212
212
|
t.add(e);
|
|
213
213
|
const o = () => {
|
|
214
214
|
t.delete(e) && n();
|
|
@@ -220,7 +220,7 @@ function Xt(t, ...e) {
|
|
|
220
220
|
r(...e);
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
const rs = (t) => t(),
|
|
223
|
+
const rs = (t) => t(), Un = /* @__PURE__ */ Symbol(), Rr = /* @__PURE__ */ Symbol();
|
|
224
224
|
function Jr(t, e) {
|
|
225
225
|
t instanceof Map && e instanceof Map ? e.forEach((r, n) => t.set(n, r)) : t instanceof Set && e instanceof Set && e.forEach(t.add, t);
|
|
226
226
|
for (const r in e) {
|
|
@@ -251,7 +251,7 @@ function Wn(t, e, r, n) {
|
|
|
251
251
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
252
252
|
qn(N(o ? o() : {}).value)
|
|
253
253
|
) : qn(r.state.value[t]);
|
|
254
|
-
return gt(l, i, Object.keys(s || {}).reduce((f, h) => (process.env.NODE_ENV !== "production" && h in l && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${h}" in store "${t}".`), f[h] = Ie(
|
|
254
|
+
return gt(l, i, Object.keys(s || {}).reduce((f, h) => (process.env.NODE_ENV !== "production" && h in l && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${h}" in store "${t}".`), f[h] = Ie(C(() => {
|
|
255
255
|
ur(r);
|
|
256
256
|
const p = r._s.get(t);
|
|
257
257
|
return s[h].call(p, p);
|
|
@@ -271,9 +271,9 @@ function Gr(t, e, r = {}, n, o, i) {
|
|
|
271
271
|
let c, l, f = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), p;
|
|
272
272
|
const d = n.state.value[t];
|
|
273
273
|
!i && !d && (process.env.NODE_ENV === "production" || !o) && (n.state.value[t] = {});
|
|
274
|
-
const
|
|
274
|
+
const y = N({});
|
|
275
275
|
let D;
|
|
276
|
-
function
|
|
276
|
+
function $(b) {
|
|
277
277
|
let w;
|
|
278
278
|
c = l = !1, process.env.NODE_ENV !== "production" && (p = []), typeof b == "function" ? (b(n.state.value[t]), w = {
|
|
279
279
|
type: De.patchFunction,
|
|
@@ -305,16 +305,16 @@ function Gr(t, e, r = {}, n, o, i) {
|
|
|
305
305
|
s.stop(), f.clear(), h.clear(), n._s.delete(t);
|
|
306
306
|
}
|
|
307
307
|
const It = (b, w = "") => {
|
|
308
|
-
if (
|
|
308
|
+
if (Un in b)
|
|
309
309
|
return b[Rr] = w, b;
|
|
310
310
|
const R = function() {
|
|
311
311
|
ur(n);
|
|
312
312
|
const J = Array.from(arguments), z = /* @__PURE__ */ new Set(), q = /* @__PURE__ */ new Set();
|
|
313
|
-
function Q(
|
|
314
|
-
z.add(
|
|
313
|
+
function Q(m) {
|
|
314
|
+
z.add(m);
|
|
315
315
|
}
|
|
316
|
-
function Ot(
|
|
317
|
-
q.add(
|
|
316
|
+
function Ot(m) {
|
|
317
|
+
q.add(m);
|
|
318
318
|
}
|
|
319
319
|
Xt(h, {
|
|
320
320
|
args: J,
|
|
@@ -326,26 +326,26 @@ function Gr(t, e, r = {}, n, o, i) {
|
|
|
326
326
|
let ot;
|
|
327
327
|
try {
|
|
328
328
|
ot = b.apply(this && this.$id === t ? this : k, J);
|
|
329
|
-
} catch (
|
|
330
|
-
throw Xt(q,
|
|
329
|
+
} catch (m) {
|
|
330
|
+
throw Xt(q, m), m;
|
|
331
331
|
}
|
|
332
|
-
return ot instanceof Promise ? ot.then((
|
|
332
|
+
return ot instanceof Promise ? ot.then((m) => (Xt(z, m), m)).catch((m) => (Xt(q, m), Promise.reject(m))) : (Xt(z, ot), ot);
|
|
333
333
|
};
|
|
334
|
-
return R[
|
|
334
|
+
return R[Un] = !0, R[Rr] = w, R;
|
|
335
335
|
}, Y = /* @__PURE__ */ Ie({
|
|
336
336
|
actions: {},
|
|
337
337
|
getters: {},
|
|
338
338
|
state: [],
|
|
339
|
-
hotState:
|
|
339
|
+
hotState: y
|
|
340
340
|
}), _t = {
|
|
341
341
|
_p: n,
|
|
342
342
|
// _s: scope,
|
|
343
343
|
$id: t,
|
|
344
|
-
$onAction:
|
|
345
|
-
$patch:
|
|
344
|
+
$onAction: Fn.bind(null, h),
|
|
345
|
+
$patch: $,
|
|
346
346
|
$reset: tt,
|
|
347
347
|
$subscribe(b, w = {}) {
|
|
348
|
-
const R =
|
|
348
|
+
const R = Fn(f, b, w.detached, () => J()), J = s.run(() => rt(() => n.state.value[t], (z) => {
|
|
349
349
|
(w.flush === "sync" ? l : c) && b({
|
|
350
350
|
storeId: t,
|
|
351
351
|
type: De.direct,
|
|
@@ -370,7 +370,7 @@ function Gr(t, e, r = {}, n, o, i) {
|
|
|
370
370
|
for (const b in V) {
|
|
371
371
|
const w = V[b];
|
|
372
372
|
if (ie(w) && !Bn(w) || yr(w))
|
|
373
|
-
process.env.NODE_ENV !== "production" && o ?
|
|
373
|
+
process.env.NODE_ENV !== "production" && o ? y.value[b] = Wt(V, b) : i || (d && os(w) && (ie(w) ? w.value = d[b] : Jr(w, d[b])), n.state.value[t][b] = w), process.env.NODE_ENV !== "production" && Y.state.push(b);
|
|
374
374
|
else if (typeof w == "function") {
|
|
375
375
|
const R = process.env.NODE_ENV !== "production" && o ? w : It(w, b);
|
|
376
376
|
V[b] = R, process.env.NODE_ENV !== "production" && (Y.actions[b] = w), a.actions[b] = w;
|
|
@@ -381,11 +381,11 @@ function Gr(t, e, r = {}, n, o, i) {
|
|
|
381
381
|
(V._getters = Ie([]))).push(b));
|
|
382
382
|
}
|
|
383
383
|
if (gt(k, V), gt(Eo(k), V), Object.defineProperty(k, "$state", {
|
|
384
|
-
get: () => process.env.NODE_ENV !== "production" && o ?
|
|
384
|
+
get: () => process.env.NODE_ENV !== "production" && o ? y.value : n.state.value[t],
|
|
385
385
|
set: (b) => {
|
|
386
386
|
if (process.env.NODE_ENV !== "production" && o)
|
|
387
387
|
throw new Error("cannot set hotState");
|
|
388
|
-
|
|
388
|
+
$((w) => {
|
|
389
389
|
gt(w, b);
|
|
390
390
|
});
|
|
391
391
|
}
|
|
@@ -409,7 +409,7 @@ function Gr(t, e, r = {}, n, o, i) {
|
|
|
409
409
|
for (const w in b._hmrPayload.getters) {
|
|
410
410
|
const R = b._hmrPayload.getters[w], J = i ? (
|
|
411
411
|
// special handling of options api
|
|
412
|
-
|
|
412
|
+
C(() => (ur(n), R.call(k, k)))
|
|
413
413
|
) : R;
|
|
414
414
|
k[w] = //
|
|
415
415
|
J;
|
|
@@ -459,11 +459,11 @@ function is(t, e, r) {
|
|
|
459
459
|
const u = Wr();
|
|
460
460
|
if (s = // in test mode, ignore the argument provided as we can always retrieve a
|
|
461
461
|
// pinia instance with getActivePinia()
|
|
462
|
-
(process.env.NODE_ENV === "test" &&
|
|
462
|
+
(process.env.NODE_ENV === "test" && Ut && Ut._testing ? null : s) || (u ? xe(Hr, null) : null), s && ur(s), process.env.NODE_ENV !== "production" && !Ut)
|
|
463
463
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
464
464
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
465
465
|
This will fail in production.`);
|
|
466
|
-
s =
|
|
466
|
+
s = Ut, s._s.has(t) || (o ? Gr(t, e, n, s) : Wn(t, n, s), process.env.NODE_ENV !== "production" && (i._pinia = s));
|
|
467
467
|
const c = s._s.get(t);
|
|
468
468
|
if (process.env.NODE_ENV !== "production" && a) {
|
|
469
469
|
const l = "__hot:" + t, f = o ? Gr(l, e, n, s, !0) : Wn(l, gt({}, n), s, !0);
|
|
@@ -486,7 +486,7 @@ function ss(t) {
|
|
|
486
486
|
for (const n in e) {
|
|
487
487
|
const o = e[n];
|
|
488
488
|
o.effect ? r[n] = // ...
|
|
489
|
-
|
|
489
|
+
C({
|
|
490
490
|
get: () => t[n],
|
|
491
491
|
set(i) {
|
|
492
492
|
t[n] = i;
|
|
@@ -520,8 +520,8 @@ function hs(t, e) {
|
|
|
520
520
|
}
|
|
521
521
|
return r;
|
|
522
522
|
}
|
|
523
|
-
const
|
|
524
|
-
function ps(t =
|
|
523
|
+
const Co = (t) => t();
|
|
524
|
+
function ps(t = Co, e = {}) {
|
|
525
525
|
const { initialState: r = "active" } = e, n = fs(r === "active");
|
|
526
526
|
function o() {
|
|
527
527
|
n.value = !1;
|
|
@@ -546,7 +546,7 @@ function ds(t) {
|
|
|
546
546
|
return Oo();
|
|
547
547
|
}
|
|
548
548
|
function vs(t, e, r = {}) {
|
|
549
|
-
const { eventFilter: n =
|
|
549
|
+
const { eventFilter: n = Co, ...o } = r;
|
|
550
550
|
return rt(t, hs(n, e), o);
|
|
551
551
|
}
|
|
552
552
|
function ys(t, e, r = {}) {
|
|
@@ -577,7 +577,7 @@ function ms(t) {
|
|
|
577
577
|
return (e = r?.$el) !== null && e !== void 0 ? e : r;
|
|
578
578
|
}
|
|
579
579
|
function Kn(...t) {
|
|
580
|
-
const e = (n, o, i, s) => (n.addEventListener(o, i, s), () => n.removeEventListener(o, i, s)), r =
|
|
580
|
+
const e = (n, o, i, s) => (n.addEventListener(o, i, s), () => n.removeEventListener(o, i, s)), r = C(() => {
|
|
581
581
|
const n = Nr(wt(t[0])).filter((o) => o != null);
|
|
582
582
|
return n.every((o) => typeof o != "string") ? n : void 0;
|
|
583
583
|
});
|
|
@@ -586,7 +586,7 @@ function Kn(...t) {
|
|
|
586
586
|
return [
|
|
587
587
|
(n = (o = r.value) === null || o === void 0 ? void 0 : o.map((i) => ms(i))) !== null && n !== void 0 ? n : [cr].filter((i) => i != null),
|
|
588
588
|
Nr(wt(r.value ? t[1] : t[0])),
|
|
589
|
-
Nr(
|
|
589
|
+
Nr(rr(r.value ? t[2] : t[1])),
|
|
590
590
|
wt(r.value ? t[3] : t[2])
|
|
591
591
|
];
|
|
592
592
|
}, ([n, o, i, s], a, u) => {
|
|
@@ -597,9 +597,9 @@ function Kn(...t) {
|
|
|
597
597
|
});
|
|
598
598
|
}, { flush: "post" });
|
|
599
599
|
}
|
|
600
|
-
const
|
|
600
|
+
const Ge = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Qe = "__vueuse_ssr_handlers__", ws = /* @__PURE__ */ bs();
|
|
601
601
|
function bs() {
|
|
602
|
-
return
|
|
602
|
+
return Qe in Ge || (Ge[Qe] = Ge[Qe] || {}), Ge[Qe];
|
|
603
603
|
}
|
|
604
604
|
function Ss(t, e) {
|
|
605
605
|
return ws[t] || e;
|
|
@@ -645,14 +645,14 @@ function Os(t, e, r, n = {}) {
|
|
|
645
645
|
var o;
|
|
646
646
|
const { flush: i = "pre", deep: s = !0, listenToStorageChanges: a = !0, writeDefaults: u = !0, mergeDefaults: c = !1, shallow: l, window: f = cr, eventFilter: h, onError: p = (z) => {
|
|
647
647
|
console.error(z);
|
|
648
|
-
}, initOnMounted: d } = n,
|
|
648
|
+
}, initOnMounted: d } = n, y = (l ? Le : N)(e), D = C(() => wt(t));
|
|
649
649
|
if (!r) try {
|
|
650
650
|
r = Ss("getDefaultStorage", () => cr?.localStorage)();
|
|
651
651
|
} catch (z) {
|
|
652
652
|
p(z);
|
|
653
653
|
}
|
|
654
|
-
if (!r) return
|
|
655
|
-
const
|
|
654
|
+
if (!r) return y;
|
|
655
|
+
const $ = wt(e), tt = Is($), ut = (o = n.serializer) !== null && o !== void 0 ? o : Es[tt], { pause: It, resume: Y } = ys(y, (z) => b(z), {
|
|
656
656
|
flush: i,
|
|
657
657
|
deep: s,
|
|
658
658
|
eventFilter: h
|
|
@@ -661,10 +661,10 @@ function Os(t, e, r, n = {}) {
|
|
|
661
661
|
let _t = !1;
|
|
662
662
|
const k = (z) => {
|
|
663
663
|
d && !_t || R(z);
|
|
664
|
-
},
|
|
664
|
+
}, Ct = (z) => {
|
|
665
665
|
d && !_t || J(z);
|
|
666
666
|
};
|
|
667
|
-
f && a && (r instanceof Storage ? Kn(f, "storage", k, { passive: !0 }) : Kn(f, Hn,
|
|
667
|
+
f && a && (r instanceof Storage ? Kn(f, "storage", k, { passive: !0 }) : Kn(f, Hn, Ct)), d ? _s(() => {
|
|
668
668
|
_t = !0, R();
|
|
669
669
|
}) : R();
|
|
670
670
|
function V(z, q) {
|
|
@@ -694,11 +694,11 @@ function Os(t, e, r, n = {}) {
|
|
|
694
694
|
function w(z) {
|
|
695
695
|
const q = z ? z.newValue : r.getItem(D.value);
|
|
696
696
|
if (q == null)
|
|
697
|
-
return u &&
|
|
697
|
+
return u && $ != null && r.setItem(D.value, ut.write($)), $;
|
|
698
698
|
if (!z && c) {
|
|
699
699
|
const Q = ut.read(q);
|
|
700
|
-
return typeof c == "function" ? c(Q,
|
|
701
|
-
|
|
700
|
+
return typeof c == "function" ? c(Q, $) : tt === "object" && !Array.isArray(Q) ? {
|
|
701
|
+
...$,
|
|
702
702
|
...Q
|
|
703
703
|
} : Q;
|
|
704
704
|
} else return typeof q != "string" ? q : ut.read(q);
|
|
@@ -706,14 +706,14 @@ function Os(t, e, r, n = {}) {
|
|
|
706
706
|
function R(z) {
|
|
707
707
|
if (!(z && z.storageArea !== r)) {
|
|
708
708
|
if (z && z.key == null) {
|
|
709
|
-
|
|
709
|
+
y.value = $;
|
|
710
710
|
return;
|
|
711
711
|
}
|
|
712
712
|
if (!(z && z.key !== D.value)) {
|
|
713
713
|
It();
|
|
714
714
|
try {
|
|
715
|
-
const q = ut.write(
|
|
716
|
-
(z === void 0 || z?.newValue !== q) && (
|
|
715
|
+
const q = ut.write(y.value);
|
|
716
|
+
(z === void 0 || z?.newValue !== q) && (y.value = w(z));
|
|
717
717
|
} catch (q) {
|
|
718
718
|
p(q);
|
|
719
719
|
} finally {
|
|
@@ -725,16 +725,16 @@ function Os(t, e, r, n = {}) {
|
|
|
725
725
|
function J(z) {
|
|
726
726
|
R(z.detail);
|
|
727
727
|
}
|
|
728
|
-
return
|
|
728
|
+
return y;
|
|
729
729
|
}
|
|
730
730
|
function ks(t, e, r = {}) {
|
|
731
731
|
const { window: n = cr } = r;
|
|
732
732
|
return Os(t, e, n?.localStorage, r);
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function Cr() {
|
|
735
735
|
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
736
736
|
}
|
|
737
|
-
function
|
|
737
|
+
function Ye(t) {
|
|
738
738
|
const e = {
|
|
739
739
|
type: t.type,
|
|
740
740
|
clientId: t.clientId,
|
|
@@ -762,19 +762,19 @@ function Ds(t) {
|
|
|
762
762
|
timestamp: new Date(r.timestamp)
|
|
763
763
|
}))), e;
|
|
764
764
|
}
|
|
765
|
-
const
|
|
765
|
+
const xo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
766
766
|
const t = N({
|
|
767
767
|
maxOperations: 100,
|
|
768
768
|
enableCrossTabSync: !0,
|
|
769
769
|
autoSyncInterval: 3e4,
|
|
770
770
|
enablePersistence: !1,
|
|
771
771
|
persistenceKeyPrefix: "stonecrop-ops"
|
|
772
|
-
}), e = N([]), r = N(-1), n = N(
|
|
773
|
-
let
|
|
772
|
+
}), e = N([]), r = N(-1), n = N(Cr()), o = N(!1), i = N([]), s = C(() => r.value < 0 ? !1 : e.value[r.value]?.reversible ?? !1), a = C(() => r.value < e.value.length - 1), u = C(() => {
|
|
773
|
+
let m = 0;
|
|
774
774
|
for (let S = r.value; S >= 0 && e.value[S]?.reversible; S--)
|
|
775
|
-
|
|
776
|
-
return
|
|
777
|
-
}), c =
|
|
775
|
+
m++;
|
|
776
|
+
return m;
|
|
777
|
+
}), c = C(() => e.value.length - 1 - r.value), l = C(
|
|
778
778
|
() => ({
|
|
779
779
|
canUndo: s.value,
|
|
780
780
|
canRedo: a.value,
|
|
@@ -783,13 +783,13 @@ const jo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
|
783
783
|
currentIndex: r.value
|
|
784
784
|
})
|
|
785
785
|
);
|
|
786
|
-
function f(
|
|
787
|
-
t.value = { ...t.value, ...
|
|
786
|
+
function f(m) {
|
|
787
|
+
t.value = { ...t.value, ...m }, t.value.enablePersistence && (Q(), ot()), t.value.enableCrossTabSync && b();
|
|
788
788
|
}
|
|
789
|
-
function h(
|
|
789
|
+
function h(m, S = "user") {
|
|
790
790
|
const E = {
|
|
791
|
-
...
|
|
792
|
-
id:
|
|
791
|
+
...m,
|
|
792
|
+
id: Cr(),
|
|
793
793
|
timestamp: /* @__PURE__ */ new Date(),
|
|
794
794
|
source: S,
|
|
795
795
|
userId: t.value.userId
|
|
@@ -806,17 +806,17 @@ const jo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
|
806
806
|
}
|
|
807
807
|
function p() {
|
|
808
808
|
o.value = !0, i.value.push({
|
|
809
|
-
id:
|
|
809
|
+
id: Cr(),
|
|
810
810
|
operations: []
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
|
-
function d(
|
|
813
|
+
function d(m) {
|
|
814
814
|
if (!o.value || i.value.length === 0)
|
|
815
815
|
return null;
|
|
816
816
|
const S = i.value.pop(), E = S.operations;
|
|
817
817
|
if (E.length === 0)
|
|
818
818
|
return i.value.length === 0 && (o.value = !1), null;
|
|
819
|
-
const v = S.id,
|
|
819
|
+
const v = S.id, _ = E.every((O) => O.reversible), g = {
|
|
820
820
|
id: v,
|
|
821
821
|
type: "batch",
|
|
822
822
|
path: "",
|
|
@@ -827,19 +827,19 @@ const jo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
|
827
827
|
doctype: E[0]?.doctype || "",
|
|
828
828
|
timestamp: /* @__PURE__ */ new Date(),
|
|
829
829
|
source: "user",
|
|
830
|
-
reversible:
|
|
831
|
-
irreversibleReason:
|
|
830
|
+
reversible: _,
|
|
831
|
+
irreversibleReason: _ ? void 0 : "Contains irreversible operations",
|
|
832
832
|
descendantOperationIds: E.map((O) => O.id),
|
|
833
|
-
metadata: { description:
|
|
833
|
+
metadata: { description: m }
|
|
834
834
|
};
|
|
835
835
|
return E.forEach((O) => {
|
|
836
836
|
O.ancestorOperationId = v;
|
|
837
|
-
}), i.value.length > 0 ? i.value[i.value.length - 1].operations.push(
|
|
837
|
+
}), i.value.length > 0 ? i.value[i.value.length - 1].operations.push(g) : (e.value.push(...E, g), r.value = e.value.length - 1), t.value.enableCrossTabSync && R(E, g), i.value.length === 0 && (o.value = !1), v;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function y() {
|
|
840
840
|
i.value = [], o.value = !1;
|
|
841
841
|
}
|
|
842
|
-
function D(
|
|
842
|
+
function D(m) {
|
|
843
843
|
if (!s.value) return !1;
|
|
844
844
|
const S = e.value[r.value];
|
|
845
845
|
if (!S.reversible)
|
|
@@ -847,46 +847,46 @@ const jo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
|
847
847
|
try {
|
|
848
848
|
if (S.type === "batch" && S.descendantOperationIds)
|
|
849
849
|
for (let E = S.descendantOperationIds.length - 1; E >= 0; E--) {
|
|
850
|
-
const v = S.descendantOperationIds[E],
|
|
851
|
-
|
|
850
|
+
const v = S.descendantOperationIds[E], _ = e.value.find((g) => g.id === v);
|
|
851
|
+
_ && tt(_, m);
|
|
852
852
|
}
|
|
853
853
|
else
|
|
854
|
-
tt(S,
|
|
854
|
+
tt(S, m);
|
|
855
855
|
return r.value--, t.value.enableCrossTabSync && J(S), !0;
|
|
856
856
|
} catch (E) {
|
|
857
857
|
return typeof console < "u" && console.error("Undo failed:", E), !1;
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function $(m) {
|
|
861
861
|
if (!a.value) return !1;
|
|
862
862
|
const S = e.value[r.value + 1];
|
|
863
863
|
try {
|
|
864
864
|
if (S.type === "batch" && S.descendantOperationIds)
|
|
865
865
|
for (const E of S.descendantOperationIds) {
|
|
866
|
-
const v = e.value.find((
|
|
867
|
-
v && ut(v,
|
|
866
|
+
const v = e.value.find((_) => _.id === E);
|
|
867
|
+
v && ut(v, m);
|
|
868
868
|
}
|
|
869
869
|
else
|
|
870
|
-
ut(S,
|
|
870
|
+
ut(S, m);
|
|
871
871
|
return r.value++, t.value.enableCrossTabSync && z(S), !0;
|
|
872
872
|
} catch (E) {
|
|
873
873
|
return typeof console < "u" && console.error("Redo failed:", E), !1;
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
|
-
function tt(
|
|
877
|
-
(
|
|
876
|
+
function tt(m, S) {
|
|
877
|
+
(m.type === "set" || m.type === "delete") && S && typeof S.set == "function" && S.set(m.path, m.beforeValue, "undo");
|
|
878
878
|
}
|
|
879
|
-
function ut(
|
|
880
|
-
(
|
|
879
|
+
function ut(m, S) {
|
|
880
|
+
(m.type === "set" || m.type === "delete") && S && typeof S.set == "function" && S.set(m.path, m.afterValue, "redo");
|
|
881
881
|
}
|
|
882
882
|
function It() {
|
|
883
|
-
const
|
|
883
|
+
const m = e.value.filter((E) => E.reversible).length, S = e.value.map((E) => E.timestamp);
|
|
884
884
|
return {
|
|
885
885
|
operations: [...e.value],
|
|
886
886
|
currentIndex: r.value,
|
|
887
887
|
totalOperations: e.value.length,
|
|
888
|
-
reversibleOperations:
|
|
889
|
-
irreversibleOperations: e.value.length -
|
|
888
|
+
reversibleOperations: m,
|
|
889
|
+
irreversibleOperations: e.value.length - m,
|
|
890
890
|
oldestOperation: S.length > 0 ? new Date(Math.min(...S.map((E) => E.getTime()))) : void 0,
|
|
891
891
|
newestOperation: S.length > 0 ? new Date(Math.max(...S.map((E) => E.getTime()))) : void 0
|
|
892
892
|
};
|
|
@@ -894,116 +894,116 @@ const jo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
|
894
894
|
function Y() {
|
|
895
895
|
e.value = [], r.value = -1;
|
|
896
896
|
}
|
|
897
|
-
function _t(
|
|
898
|
-
return e.value.filter((E) => E.doctype ===
|
|
897
|
+
function _t(m, S) {
|
|
898
|
+
return e.value.filter((E) => E.doctype === m && (S === void 0 || E.recordId === S));
|
|
899
899
|
}
|
|
900
|
-
function k(
|
|
901
|
-
const E = e.value.find((v) => v.id ===
|
|
900
|
+
function k(m, S) {
|
|
901
|
+
const E = e.value.find((v) => v.id === m);
|
|
902
902
|
E && (E.reversible = !1, E.irreversibleReason = S);
|
|
903
903
|
}
|
|
904
|
-
function
|
|
905
|
-
const
|
|
904
|
+
function Ct(m, S, E, v = "success", _) {
|
|
905
|
+
const g = {
|
|
906
906
|
type: "action",
|
|
907
|
-
path: E && E.length > 0 ? `${
|
|
907
|
+
path: E && E.length > 0 ? `${m}.${E[0]}` : m,
|
|
908
908
|
fieldname: "",
|
|
909
909
|
beforeValue: null,
|
|
910
910
|
afterValue: null,
|
|
911
|
-
doctype:
|
|
911
|
+
doctype: m,
|
|
912
912
|
recordId: E && E.length > 0 ? E[0] : void 0,
|
|
913
913
|
reversible: !1,
|
|
914
914
|
// Actions are typically not reversible
|
|
915
915
|
actionName: S,
|
|
916
916
|
actionRecordIds: E,
|
|
917
917
|
actionResult: v,
|
|
918
|
-
actionError:
|
|
918
|
+
actionError: _
|
|
919
919
|
};
|
|
920
|
-
return h(
|
|
920
|
+
return h(g);
|
|
921
921
|
}
|
|
922
922
|
let V = null;
|
|
923
923
|
function b() {
|
|
924
|
-
typeof window > "u" || !window.BroadcastChannel || (V = new BroadcastChannel("stonecrop-operation-log"), V.addEventListener("message", (
|
|
925
|
-
const S =
|
|
924
|
+
typeof window > "u" || !window.BroadcastChannel || (V = new BroadcastChannel("stonecrop-operation-log"), V.addEventListener("message", (m) => {
|
|
925
|
+
const S = m.data;
|
|
926
926
|
if (!S || typeof S != "object") return;
|
|
927
927
|
const E = Ds(S);
|
|
928
928
|
E.clientId !== n.value && (E.type === "operation" && E.operation ? (e.value.push({ ...E.operation, source: "sync" }), r.value = e.value.length - 1) : E.type === "operation" && E.operations && (e.value.push(...E.operations.map((v) => ({ ...v, source: "sync" }))), r.value = e.value.length - 1));
|
|
929
929
|
}));
|
|
930
930
|
}
|
|
931
|
-
function w(
|
|
931
|
+
function w(m) {
|
|
932
932
|
if (!V) return;
|
|
933
933
|
const S = {
|
|
934
934
|
type: "operation",
|
|
935
|
-
operation:
|
|
935
|
+
operation: m,
|
|
936
936
|
clientId: n.value,
|
|
937
937
|
timestamp: /* @__PURE__ */ new Date()
|
|
938
938
|
};
|
|
939
|
-
V.postMessage(
|
|
939
|
+
V.postMessage(Ye(S));
|
|
940
940
|
}
|
|
941
|
-
function R(
|
|
941
|
+
function R(m, S) {
|
|
942
942
|
if (!V) return;
|
|
943
943
|
const E = {
|
|
944
944
|
type: "operation",
|
|
945
|
-
operations: [...
|
|
945
|
+
operations: [...m, S],
|
|
946
946
|
clientId: n.value,
|
|
947
947
|
timestamp: /* @__PURE__ */ new Date()
|
|
948
948
|
};
|
|
949
|
-
V.postMessage(
|
|
949
|
+
V.postMessage(Ye(E));
|
|
950
950
|
}
|
|
951
|
-
function J(
|
|
951
|
+
function J(m) {
|
|
952
952
|
if (!V) return;
|
|
953
953
|
const S = {
|
|
954
954
|
type: "undo",
|
|
955
|
-
operation:
|
|
955
|
+
operation: m,
|
|
956
956
|
clientId: n.value,
|
|
957
957
|
timestamp: /* @__PURE__ */ new Date()
|
|
958
958
|
};
|
|
959
|
-
V.postMessage(
|
|
959
|
+
V.postMessage(Ye(S));
|
|
960
960
|
}
|
|
961
|
-
function z(
|
|
961
|
+
function z(m) {
|
|
962
962
|
if (!V) return;
|
|
963
963
|
const S = {
|
|
964
964
|
type: "redo",
|
|
965
|
-
operation:
|
|
965
|
+
operation: m,
|
|
966
966
|
clientId: n.value,
|
|
967
967
|
timestamp: /* @__PURE__ */ new Date()
|
|
968
968
|
};
|
|
969
|
-
V.postMessage(
|
|
969
|
+
V.postMessage(Ye(S));
|
|
970
970
|
}
|
|
971
971
|
const q = ks("stonecrop-operations", null, {
|
|
972
972
|
serializer: {
|
|
973
|
-
read: (
|
|
973
|
+
read: (m) => {
|
|
974
974
|
try {
|
|
975
|
-
return JSON.parse(
|
|
975
|
+
return JSON.parse(m);
|
|
976
976
|
} catch {
|
|
977
977
|
return null;
|
|
978
978
|
}
|
|
979
979
|
},
|
|
980
|
-
write: (
|
|
980
|
+
write: (m) => m ? JSON.stringify(m) : ""
|
|
981
981
|
}
|
|
982
982
|
});
|
|
983
983
|
function Q() {
|
|
984
984
|
if (!(typeof window > "u"))
|
|
985
985
|
try {
|
|
986
|
-
const
|
|
987
|
-
|
|
986
|
+
const m = q.value;
|
|
987
|
+
m && Array.isArray(m.operations) && (e.value = m.operations.map((S) => ({
|
|
988
988
|
...S,
|
|
989
989
|
timestamp: new Date(S.timestamp)
|
|
990
|
-
})), r.value =
|
|
991
|
-
} catch (
|
|
992
|
-
typeof console < "u" && console.error("Failed to load operations from persistence:",
|
|
990
|
+
})), r.value = m.currentIndex ?? -1);
|
|
991
|
+
} catch (m) {
|
|
992
|
+
typeof console < "u" && console.error("Failed to load operations from persistence:", m);
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
995
|
function Ot() {
|
|
996
996
|
if (!(typeof window > "u"))
|
|
997
997
|
try {
|
|
998
998
|
q.value = {
|
|
999
|
-
operations: e.value.map((
|
|
1000
|
-
...
|
|
1001
|
-
timestamp:
|
|
999
|
+
operations: e.value.map((m) => ({
|
|
1000
|
+
...m,
|
|
1001
|
+
timestamp: m.timestamp.toISOString()
|
|
1002
1002
|
})),
|
|
1003
1003
|
currentIndex: r.value
|
|
1004
1004
|
};
|
|
1005
|
-
} catch (
|
|
1006
|
-
typeof console < "u" && console.error("Failed to save operations to persistence:",
|
|
1005
|
+
} catch (m) {
|
|
1006
|
+
typeof console < "u" && console.error("Failed to save operations to persistence:", m);
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
1009
|
function ot() {
|
|
@@ -1032,17 +1032,17 @@ const jo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
|
1032
1032
|
addOperation: h,
|
|
1033
1033
|
startBatch: p,
|
|
1034
1034
|
commitBatch: d,
|
|
1035
|
-
cancelBatch:
|
|
1035
|
+
cancelBatch: y,
|
|
1036
1036
|
undo: D,
|
|
1037
|
-
redo:
|
|
1037
|
+
redo: $,
|
|
1038
1038
|
clear: Y,
|
|
1039
1039
|
getOperationsFor: _t,
|
|
1040
1040
|
getSnapshot: It,
|
|
1041
1041
|
markIrreversible: k,
|
|
1042
|
-
logAction:
|
|
1042
|
+
logAction: Ct
|
|
1043
1043
|
};
|
|
1044
1044
|
});
|
|
1045
|
-
class
|
|
1045
|
+
let zs = class nr {
|
|
1046
1046
|
/**
|
|
1047
1047
|
* The root FieldTriggerEngine instance
|
|
1048
1048
|
*/
|
|
@@ -1063,9 +1063,9 @@ class ze {
|
|
|
1063
1063
|
* @param options - Configuration options for the field trigger engine
|
|
1064
1064
|
*/
|
|
1065
1065
|
constructor(e = {}) {
|
|
1066
|
-
if (
|
|
1067
|
-
return
|
|
1068
|
-
|
|
1066
|
+
if (nr._root)
|
|
1067
|
+
return nr._root;
|
|
1068
|
+
nr._root = this, this.options = {
|
|
1069
1069
|
defaultTimeout: e.defaultTimeout ?? 5e3,
|
|
1070
1070
|
debug: e.debug ?? !1,
|
|
1071
1071
|
enableRollback: e.enableRollback ?? !0,
|
|
@@ -1166,34 +1166,34 @@ class ze {
|
|
|
1166
1166
|
let u = !1, c = !1, l;
|
|
1167
1167
|
const f = this.getFieldRollback(n, o), h = r.enableRollback ?? f ?? this.options.enableRollback;
|
|
1168
1168
|
h && e.store && (l = this.captureSnapshot(e));
|
|
1169
|
-
for (const
|
|
1169
|
+
for (const y of i)
|
|
1170
1170
|
try {
|
|
1171
|
-
const D = await this.executeAction(
|
|
1171
|
+
const D = await this.executeAction(y, e, r.timeout);
|
|
1172
1172
|
if (a.push(D), !D.success) {
|
|
1173
1173
|
u = !0;
|
|
1174
1174
|
break;
|
|
1175
1175
|
}
|
|
1176
1176
|
} catch (D) {
|
|
1177
|
-
const
|
|
1177
|
+
const $ = {
|
|
1178
1178
|
success: !1,
|
|
1179
1179
|
error: D instanceof Error ? D : new Error(String(D)),
|
|
1180
1180
|
executionTime: 0,
|
|
1181
|
-
action:
|
|
1181
|
+
action: y
|
|
1182
1182
|
};
|
|
1183
|
-
a.push(
|
|
1183
|
+
a.push($), u = !0;
|
|
1184
1184
|
break;
|
|
1185
1185
|
}
|
|
1186
1186
|
if (h && u && l && e.store)
|
|
1187
1187
|
try {
|
|
1188
1188
|
this.restoreSnapshot(e, l), c = !0;
|
|
1189
|
-
} catch (
|
|
1190
|
-
console.error("[FieldTriggers] Rollback failed:",
|
|
1189
|
+
} catch (y) {
|
|
1190
|
+
console.error("[FieldTriggers] Rollback failed:", y);
|
|
1191
1191
|
}
|
|
1192
|
-
const p = performance.now() - s, d = a.filter((
|
|
1192
|
+
const p = performance.now() - s, d = a.filter((y) => !y.success && y.error != null);
|
|
1193
1193
|
if (d.length > 0 && this.options.errorHandler)
|
|
1194
|
-
for (const
|
|
1194
|
+
for (const y of d)
|
|
1195
1195
|
try {
|
|
1196
|
-
|
|
1196
|
+
y.error && this.options.errorHandler(y.error, e, y.action);
|
|
1197
1197
|
} catch (D) {
|
|
1198
1198
|
console.error("[FieldTriggers] Error in global error handler:", D);
|
|
1199
1199
|
}
|
|
@@ -1201,7 +1201,7 @@ class ze {
|
|
|
1201
1201
|
path: e.path,
|
|
1202
1202
|
actionResults: a,
|
|
1203
1203
|
totalExecutionTime: p,
|
|
1204
|
-
allSucceeded: a.every((
|
|
1204
|
+
allSucceeded: a.every((y) => y.success),
|
|
1205
1205
|
stoppedOnError: u,
|
|
1206
1206
|
rolledBack: c,
|
|
1207
1207
|
snapshot: this.options.debug && h ? l : void 0
|
|
@@ -1385,13 +1385,13 @@ class ze {
|
|
|
1385
1385
|
throw console.error("[FieldTriggers] Failed to restore snapshot:", n), n;
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
|
-
}
|
|
1388
|
+
};
|
|
1389
1389
|
function Qr(t) {
|
|
1390
|
-
return new
|
|
1390
|
+
return new zs(t);
|
|
1391
1391
|
}
|
|
1392
1392
|
function Jn() {
|
|
1393
1393
|
try {
|
|
1394
|
-
return
|
|
1394
|
+
return xo();
|
|
1395
1395
|
} catch {
|
|
1396
1396
|
return null;
|
|
1397
1397
|
}
|
|
@@ -1677,10 +1677,10 @@ class lr {
|
|
|
1677
1677
|
return e ? e.replace(/\[(\d+)\]/g, ".$1").split(".").filter((r) => r.length > 0) : [];
|
|
1678
1678
|
}
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1680
|
+
function As(t, e) {
|
|
1681
1681
|
return new lr(t, e, "", null);
|
|
1682
1682
|
}
|
|
1683
|
-
class
|
|
1683
|
+
class ze {
|
|
1684
1684
|
/**
|
|
1685
1685
|
* Singleton instance of Stonecrop. Only one Stonecrop instance can exist
|
|
1686
1686
|
* per application, ensuring consistent HST state and registry access.
|
|
@@ -1702,9 +1702,9 @@ class Ae {
|
|
|
1702
1702
|
* @param options - Options including the data client (can be set later via setClient)
|
|
1703
1703
|
*/
|
|
1704
1704
|
constructor(e, r, n) {
|
|
1705
|
-
if (
|
|
1706
|
-
return
|
|
1707
|
-
|
|
1705
|
+
if (ze._root)
|
|
1706
|
+
return ze._root;
|
|
1707
|
+
ze._root = this, this.registry = e, this._operationLogConfig = r, this._client = n?.client, this.initializeHSTStore(), this.setupRegistrySync();
|
|
1708
1708
|
}
|
|
1709
1709
|
/**
|
|
1710
1710
|
* Set the data client for fetching doctype metadata and records.
|
|
@@ -1734,7 +1734,7 @@ class Ae {
|
|
|
1734
1734
|
* @internal
|
|
1735
1735
|
*/
|
|
1736
1736
|
getOperationLogStore() {
|
|
1737
|
-
return this._operationLogStore || (this._operationLogStore =
|
|
1737
|
+
return this._operationLogStore || (this._operationLogStore = xo(), this._operationLogConfig && this._operationLogStore.configure(this._operationLogConfig)), this._operationLogStore;
|
|
1738
1738
|
}
|
|
1739
1739
|
/**
|
|
1740
1740
|
* Initialize the HST store structure
|
|
@@ -1743,7 +1743,7 @@ class Ae {
|
|
|
1743
1743
|
const e = {};
|
|
1744
1744
|
Object.keys(this.registry.registry).forEach((r) => {
|
|
1745
1745
|
e[r] = {};
|
|
1746
|
-
}), this.hstStore =
|
|
1746
|
+
}), this.hstStore = As(ko(e), "StonecropStore");
|
|
1747
1747
|
}
|
|
1748
1748
|
/**
|
|
1749
1749
|
* Setup automatic sync with Registry when doctypes are added
|
|
@@ -1911,17 +1911,21 @@ class Ae {
|
|
|
1911
1911
|
}
|
|
1912
1912
|
/**
|
|
1913
1913
|
* Get single record from server using the configured data client.
|
|
1914
|
-
* @param doctype - The doctype
|
|
1914
|
+
* @param doctype - The doctype slug string or Doctype object
|
|
1915
1915
|
* @param recordId - The record ID
|
|
1916
1916
|
* @throws Error if no data client has been configured
|
|
1917
|
+
* @throws Error if a slug string is given and no matching doctype is found in the registry
|
|
1917
1918
|
*/
|
|
1918
1919
|
async getRecord(e, r) {
|
|
1919
1920
|
if (!this._client)
|
|
1920
1921
|
throw new Error(
|
|
1921
1922
|
"No data client configured. Call setClient() with a DataClient implementation (e.g., StonecropClient from @stonecrop/graphql-client) before fetching records."
|
|
1922
1923
|
);
|
|
1923
|
-
const n =
|
|
1924
|
-
|
|
1924
|
+
const n = typeof e == "string" ? this.registry.getDoctype(e) : e;
|
|
1925
|
+
if (!n)
|
|
1926
|
+
throw new Error(`Doctype not found: ${typeof e == "string" ? e : e.slug}`);
|
|
1927
|
+
const o = await this._client.getRecord(n, r);
|
|
1928
|
+
o && this.addRecord(n, r, o);
|
|
1925
1929
|
}
|
|
1926
1930
|
/**
|
|
1927
1931
|
* Dispatch an action to the server via the configured data client.
|
|
@@ -2080,11 +2084,11 @@ function Gn(t, e) {
|
|
|
2080
2084
|
const r = new Error(t);
|
|
2081
2085
|
return r.code = e, r;
|
|
2082
2086
|
}
|
|
2083
|
-
function
|
|
2087
|
+
function Rs(t) {
|
|
2084
2088
|
t || (t = {});
|
|
2085
|
-
const e = t.registry ||
|
|
2089
|
+
const e = t.registry || xe("$registry"), r = xe("$stonecrop"), n = N(), o = N(), i = N({}), s = N(), a = N(), u = N([]), c = N(!1), l = N(null), f = N(), h = C(() => !n.value || !f.value || !t.recordId || t.recordId === "new" ? !0 : n.value.isWorkflowReady(f.value, t.recordId).ready), p = C(() => !n.value || !f.value || !t.recordId || t.recordId === "new" ? [] : n.value.isWorkflowReady(f.value, t.recordId).blockedLinks ?? []), d = r || ze._root;
|
|
2086
2090
|
d && (n.value = d), t?.doctype && typeof t.doctype != "string" && (f.value = t.doctype);
|
|
2087
|
-
const
|
|
2091
|
+
const y = N([]), D = N(-1), $ = C(() => n.value?.getOperationLogStore().canUndo ?? !1), tt = C(() => n.value?.getOperationLogStore().canRedo ?? !1), ut = C(() => n.value?.getOperationLogStore().undoCount ?? 0), It = C(() => n.value?.getOperationLogStore().redoCount ?? 0), Y = C(
|
|
2088
2092
|
() => n.value?.getOperationLogStore().undoRedoState ?? {
|
|
2089
2093
|
canUndo: !1,
|
|
2090
2094
|
canRedo: !1,
|
|
@@ -2092,30 +2096,30 @@ function As(t) {
|
|
|
2092
2096
|
redoCount: 0,
|
|
2093
2097
|
currentIndex: -1
|
|
2094
2098
|
}
|
|
2095
|
-
), _t = (
|
|
2099
|
+
), _t = (g) => n.value?.getOperationLogStore().undo(g) ?? !1, k = (g) => n.value?.getOperationLogStore().redo(g) ?? !1, Ct = () => {
|
|
2096
2100
|
n.value?.getOperationLogStore().startBatch();
|
|
2097
|
-
}, V = (
|
|
2101
|
+
}, V = (g) => n.value?.getOperationLogStore().commitBatch(g) ?? null, b = () => {
|
|
2098
2102
|
n.value?.getOperationLogStore().cancelBatch();
|
|
2099
2103
|
}, w = () => {
|
|
2100
2104
|
n.value?.getOperationLogStore().clear();
|
|
2101
|
-
}, R = (
|
|
2105
|
+
}, R = (g, O) => n.value?.getOperationLogStore().getOperationsFor(g, O) ?? [], J = () => n.value?.getOperationLogStore().getSnapshot() ?? {
|
|
2102
2106
|
operations: [],
|
|
2103
2107
|
currentIndex: -1,
|
|
2104
2108
|
totalOperations: 0,
|
|
2105
2109
|
reversibleOperations: 0,
|
|
2106
2110
|
irreversibleOperations: 0
|
|
2107
|
-
}, z = (
|
|
2108
|
-
n.value?.getOperationLogStore().markIrreversible(
|
|
2109
|
-
}, q = (
|
|
2110
|
-
n.value?.getOperationLogStore().configure(
|
|
2111
|
+
}, z = (g, O) => {
|
|
2112
|
+
n.value?.getOperationLogStore().markIrreversible(g, O);
|
|
2113
|
+
}, q = (g, O, I, A = "success", j) => n.value?.getOperationLogStore().logAction(g, O, I, A, j) ?? "", Q = (g) => {
|
|
2114
|
+
n.value?.getOperationLogStore().configure(g);
|
|
2111
2115
|
};
|
|
2112
2116
|
if (e && n.value)
|
|
2113
2117
|
try {
|
|
2114
|
-
const
|
|
2115
|
-
|
|
2118
|
+
const g = n.value.getOperationLogStore(), O = ss(g);
|
|
2119
|
+
y.value = O.operations.value, D.value = O.currentIndex.value, rt(
|
|
2116
2120
|
() => O.operations.value,
|
|
2117
2121
|
(I) => {
|
|
2118
|
-
|
|
2122
|
+
y.value = I;
|
|
2119
2123
|
}
|
|
2120
2124
|
), rt(
|
|
2121
2125
|
() => O.currentIndex.value,
|
|
@@ -2125,38 +2129,38 @@ function As(t) {
|
|
|
2125
2129
|
);
|
|
2126
2130
|
} catch {
|
|
2127
2131
|
}
|
|
2128
|
-
t.doctype && typeof t.doctype != "string" && e && n.value && (o.value = n.value.getStore(), u.value = e.resolveSchema(t.doctype), (!t.recordId || t.recordId === "new") && (i.value = e.initializeRecord(u.value)), o.value &&
|
|
2132
|
+
t.doctype && typeof t.doctype != "string" && e && n.value && (o.value = n.value.getStore(), u.value = e.resolveSchema(t.doctype), (!t.recordId || t.recordId === "new") && (i.value = e.initializeRecord(u.value)), o.value && xr(t.doctype, t.recordId || "new", i, o.value)), vr(async () => {
|
|
2129
2133
|
if (!(!e || !n.value)) {
|
|
2130
2134
|
if (!t.doctype && e.router) {
|
|
2131
|
-
const
|
|
2132
|
-
if (!
|
|
2133
|
-
const O =
|
|
2135
|
+
const g = e.router.currentRoute.value;
|
|
2136
|
+
if (!g.path) return;
|
|
2137
|
+
const O = g.path.split("/").filter((A) => A.length > 0), I = O[1]?.toLowerCase();
|
|
2134
2138
|
if (O.length > 0) {
|
|
2135
2139
|
const A = {
|
|
2136
|
-
path:
|
|
2140
|
+
path: g.path,
|
|
2137
2141
|
segments: O
|
|
2138
|
-
},
|
|
2139
|
-
if (
|
|
2140
|
-
if (e.addDoctype(
|
|
2141
|
-
const Yt = n.value.getRecordById(
|
|
2142
|
+
}, j = await e.getMeta?.(A);
|
|
2143
|
+
if (j) {
|
|
2144
|
+
if (e.addDoctype(j), n.value.setup(j), s.value = j, a.value = I, o.value = n.value.getStore(), e && (u.value = e.resolveSchema(j)), I && I !== "new") {
|
|
2145
|
+
const Yt = n.value.getRecordById(j, I);
|
|
2142
2146
|
if (Yt)
|
|
2143
2147
|
i.value = Yt.get("") || {};
|
|
2144
2148
|
else
|
|
2145
2149
|
try {
|
|
2146
|
-
await n.value.getRecord(
|
|
2147
|
-
const
|
|
2148
|
-
|
|
2150
|
+
await n.value.getRecord(j, I);
|
|
2151
|
+
const xt = n.value.getRecordById(j, I);
|
|
2152
|
+
xt && (i.value = xt.get("") || {});
|
|
2149
2153
|
} catch {
|
|
2150
2154
|
i.value = e.initializeRecord(u.value);
|
|
2151
2155
|
}
|
|
2152
2156
|
} else
|
|
2153
2157
|
i.value = e.initializeRecord(u.value);
|
|
2154
|
-
o.value &&
|
|
2158
|
+
o.value && xr(j, I || "new", i, o.value), n.value.runAction(j, "load", I ? [I] : void 0);
|
|
2155
2159
|
}
|
|
2156
2160
|
}
|
|
2157
2161
|
}
|
|
2158
2162
|
if (t.doctype) {
|
|
2159
|
-
const
|
|
2163
|
+
const g = t.recordId;
|
|
2160
2164
|
if (typeof t.doctype == "string") {
|
|
2161
2165
|
const O = t.doctype;
|
|
2162
2166
|
o.value = n.value.getStore(), c.value = !0, l.value = null;
|
|
@@ -2176,29 +2180,29 @@ function As(t) {
|
|
|
2176
2180
|
c.value = !1;
|
|
2177
2181
|
}
|
|
2178
2182
|
if (f.value = I, !I) return;
|
|
2179
|
-
if (u.value = e.resolveSchema(I),
|
|
2180
|
-
const A = n.value.getRecordById(I,
|
|
2183
|
+
if (u.value = e.resolveSchema(I), g && g !== "new") {
|
|
2184
|
+
const A = n.value.getRecordById(I, g);
|
|
2181
2185
|
if (A)
|
|
2182
2186
|
i.value = A.get("") || {};
|
|
2183
2187
|
else
|
|
2184
2188
|
try {
|
|
2185
|
-
await n.value.getRecord(I,
|
|
2186
|
-
const
|
|
2187
|
-
|
|
2189
|
+
await n.value.getRecord(I, g);
|
|
2190
|
+
const j = n.value.getRecordById(I, g);
|
|
2191
|
+
j && (i.value = j.get("") || {});
|
|
2188
2192
|
} catch {
|
|
2189
2193
|
i.value = e.initializeRecord(u.value);
|
|
2190
2194
|
}
|
|
2191
2195
|
} else
|
|
2192
2196
|
i.value = e.initializeRecord(u.value);
|
|
2193
|
-
o.value &&
|
|
2194
|
-
} else if (
|
|
2195
|
-
const O = t.doctype, I = n.value.getRecordById(O,
|
|
2197
|
+
o.value && xr(I, g || "new", i, o.value);
|
|
2198
|
+
} else if (g && g !== "new") {
|
|
2199
|
+
const O = t.doctype, I = n.value.getRecordById(O, g);
|
|
2196
2200
|
if (I)
|
|
2197
2201
|
i.value = I.get("") || {};
|
|
2198
2202
|
else
|
|
2199
2203
|
try {
|
|
2200
|
-
await n.value.getRecord(O,
|
|
2201
|
-
const A = n.value.getRecordById(O,
|
|
2204
|
+
await n.value.getRecord(O, g);
|
|
2205
|
+
const A = n.value.getRecordById(O, g);
|
|
2202
2206
|
A && (i.value = A.get("") || {});
|
|
2203
2207
|
} catch {
|
|
2204
2208
|
i.value = e.initializeRecord(u.value);
|
|
@@ -2207,67 +2211,67 @@ function As(t) {
|
|
|
2207
2211
|
}
|
|
2208
2212
|
}
|
|
2209
2213
|
});
|
|
2210
|
-
const Ot = (
|
|
2214
|
+
const Ot = (g, O) => {
|
|
2211
2215
|
const I = f.value || s.value;
|
|
2212
2216
|
if (!I) return "";
|
|
2213
2217
|
const A = O || t.recordId || a.value || "new";
|
|
2214
|
-
return `${I.slug}.${A}.${
|
|
2215
|
-
}, ot = (
|
|
2218
|
+
return `${I.slug}.${A}.${g}`;
|
|
2219
|
+
}, ot = (g) => {
|
|
2216
2220
|
const O = f.value || s.value;
|
|
2217
2221
|
if (!(!o.value || !n.value || !O))
|
|
2218
2222
|
try {
|
|
2219
|
-
const I =
|
|
2223
|
+
const I = g.path.split(".");
|
|
2220
2224
|
if (I.length >= 2) {
|
|
2221
|
-
const Yt = I[0],
|
|
2222
|
-
if (o.value.has(`${Yt}.${
|
|
2223
|
-
const ki = `${Yt}.${
|
|
2225
|
+
const Yt = I[0], xt = I[1];
|
|
2226
|
+
if (o.value.has(`${Yt}.${xt}`) || n.value.addRecord(O, xt, { ...i.value }), I.length > 3) {
|
|
2227
|
+
const ki = `${Yt}.${xt}`, kr = I.slice(2);
|
|
2224
2228
|
let Dr = ki;
|
|
2225
|
-
for (let
|
|
2226
|
-
if (Dr += `.${kr[
|
|
2227
|
-
const Di = kr[
|
|
2229
|
+
for (let Je = 0; Je < kr.length - 1; Je++)
|
|
2230
|
+
if (Dr += `.${kr[Je]}`, !o.value.has(Dr)) {
|
|
2231
|
+
const Di = kr[Je + 1], zi = !isNaN(Number(Di));
|
|
2228
2232
|
o.value.set(Dr, zi ? [] : {});
|
|
2229
2233
|
}
|
|
2230
2234
|
}
|
|
2231
2235
|
}
|
|
2232
|
-
o.value.set(
|
|
2233
|
-
const A =
|
|
2234
|
-
A.length === 1 ?
|
|
2236
|
+
o.value.set(g.path, g.value);
|
|
2237
|
+
const A = g.fieldname.split("."), j = { ...i.value };
|
|
2238
|
+
A.length === 1 ? j[A[0]] = g.value : Ns(j, A, g.value), i.value = j;
|
|
2235
2239
|
} catch {
|
|
2236
2240
|
}
|
|
2237
2241
|
};
|
|
2238
2242
|
(t.doctype || e?.router) && (Kr("hstPathProvider", Ot), Kr("hstChangeHandler", ot));
|
|
2239
|
-
const
|
|
2243
|
+
const m = (g, O) => {
|
|
2240
2244
|
if (!n.value)
|
|
2241
2245
|
throw new Error("Stonecrop instance not available");
|
|
2242
|
-
return n.value.initializeNestedData(
|
|
2243
|
-
}, S = async (
|
|
2246
|
+
return n.value.initializeNestedData(g, O);
|
|
2247
|
+
}, S = async (g, O, I, A) => {
|
|
2244
2248
|
if (!n.value)
|
|
2245
2249
|
throw new Error("Stonecrop instance not available");
|
|
2246
|
-
return n.value.fetchNestedData(
|
|
2247
|
-
}, E = (
|
|
2250
|
+
return n.value.fetchNestedData(g, O, I, A);
|
|
2251
|
+
}, E = (g, O) => {
|
|
2248
2252
|
if (!n.value)
|
|
2249
2253
|
throw new Error("Stonecrop instance not available");
|
|
2250
|
-
return n.value.collectRecordPayload(
|
|
2251
|
-
}, v = (
|
|
2252
|
-
provideHSTPath: (I) => `${
|
|
2254
|
+
return n.value.collectRecordPayload(g, O);
|
|
2255
|
+
}, v = (g, O) => ({
|
|
2256
|
+
provideHSTPath: (I) => `${g}.${I}`,
|
|
2253
2257
|
handleHSTChange: (I) => {
|
|
2254
|
-
const A = I.path.startsWith(
|
|
2258
|
+
const A = I.path.startsWith(g) ? I.path : `${g}.${I.fieldname}`;
|
|
2255
2259
|
ot({
|
|
2256
2260
|
...I,
|
|
2257
2261
|
path: A
|
|
2258
2262
|
});
|
|
2259
2263
|
}
|
|
2260
|
-
}),
|
|
2261
|
-
operations:
|
|
2264
|
+
}), _ = {
|
|
2265
|
+
operations: y,
|
|
2262
2266
|
currentIndex: D,
|
|
2263
2267
|
undoRedoState: Y,
|
|
2264
|
-
canUndo:
|
|
2268
|
+
canUndo: $,
|
|
2265
2269
|
canRedo: tt,
|
|
2266
2270
|
undoCount: ut,
|
|
2267
2271
|
redoCount: It,
|
|
2268
2272
|
undo: _t,
|
|
2269
2273
|
redo: k,
|
|
2270
|
-
startBatch:
|
|
2274
|
+
startBatch: Ct,
|
|
2271
2275
|
commitBatch: V,
|
|
2272
2276
|
cancelBatch: b,
|
|
2273
2277
|
clear: w,
|
|
@@ -2279,13 +2283,13 @@ function As(t) {
|
|
|
2279
2283
|
};
|
|
2280
2284
|
return t.doctype ? {
|
|
2281
2285
|
stonecrop: n,
|
|
2282
|
-
operationLog:
|
|
2286
|
+
operationLog: _,
|
|
2283
2287
|
provideHSTPath: Ot,
|
|
2284
2288
|
handleHSTChange: ot,
|
|
2285
2289
|
hstStore: o,
|
|
2286
2290
|
formData: i,
|
|
2287
2291
|
resolvedSchema: u,
|
|
2288
|
-
initializeNestedData:
|
|
2292
|
+
initializeNestedData: m,
|
|
2289
2293
|
fetchNestedData: S,
|
|
2290
2294
|
collectRecordPayload: E,
|
|
2291
2295
|
createNestedContext: v,
|
|
@@ -2296,13 +2300,13 @@ function As(t) {
|
|
|
2296
2300
|
blockedLinks: p
|
|
2297
2301
|
} : !t.doctype && e?.router ? {
|
|
2298
2302
|
stonecrop: n,
|
|
2299
|
-
operationLog:
|
|
2303
|
+
operationLog: _,
|
|
2300
2304
|
provideHSTPath: Ot,
|
|
2301
2305
|
handleHSTChange: ot,
|
|
2302
2306
|
hstStore: o,
|
|
2303
2307
|
formData: i,
|
|
2304
2308
|
resolvedSchema: u,
|
|
2305
|
-
initializeNestedData:
|
|
2309
|
+
initializeNestedData: m,
|
|
2306
2310
|
fetchNestedData: S,
|
|
2307
2311
|
collectRecordPayload: E,
|
|
2308
2312
|
createNestedContext: v,
|
|
@@ -2313,10 +2317,10 @@ function As(t) {
|
|
|
2313
2317
|
blockedLinks: p
|
|
2314
2318
|
} : {
|
|
2315
2319
|
stonecrop: n,
|
|
2316
|
-
operationLog:
|
|
2320
|
+
operationLog: _
|
|
2317
2321
|
};
|
|
2318
2322
|
}
|
|
2319
|
-
function
|
|
2323
|
+
function xr(t, e, r, n) {
|
|
2320
2324
|
rt(
|
|
2321
2325
|
r,
|
|
2322
2326
|
(o) => {
|
|
@@ -2332,7 +2336,7 @@ function jr(t, e, r, n) {
|
|
|
2332
2336
|
{ deep: !0 }
|
|
2333
2337
|
);
|
|
2334
2338
|
}
|
|
2335
|
-
function
|
|
2339
|
+
function Ns(t, e, r) {
|
|
2336
2340
|
let n = t;
|
|
2337
2341
|
for (let i = 0; i < e.length - 1; i++) {
|
|
2338
2342
|
const s = e[i];
|
|
@@ -2354,10 +2358,10 @@ function K(t) {
|
|
|
2354
2358
|
function ln(t) {
|
|
2355
2359
|
return K(t) || bt(t);
|
|
2356
2360
|
}
|
|
2357
|
-
var
|
|
2361
|
+
var jo = "@@__IMMUTABLE_ITERABLE__@@";
|
|
2358
2362
|
function dt(t) {
|
|
2359
2363
|
return !!(t && // @ts-expect-error: maybeCollection is typed as `{}`, need to change in 6.0 to `maybeCollection && typeof maybeCollection === 'object' && IS_COLLECTION_SYMBOL in maybeCollection`
|
|
2360
|
-
t[
|
|
2364
|
+
t[jo]);
|
|
2361
2365
|
}
|
|
2362
2366
|
var et = function(t) {
|
|
2363
2367
|
return dt(t) ? t : ct(t);
|
|
@@ -2380,19 +2384,19 @@ var et = function(t) {
|
|
|
2380
2384
|
et.Keyed = St;
|
|
2381
2385
|
et.Indexed = Ht;
|
|
2382
2386
|
et.Set = de;
|
|
2383
|
-
var ve = 0, vt = 1, yt = 2, Yr = typeof Symbol == "function" && Symbol.iterator, $o = "@@iterator", gr = Yr || $o,
|
|
2387
|
+
var ve = 0, vt = 1, yt = 2, Yr = typeof Symbol == "function" && Symbol.iterator, $o = "@@iterator", gr = Yr || $o, M = function(t) {
|
|
2384
2388
|
this.next = t;
|
|
2385
2389
|
};
|
|
2386
|
-
|
|
2390
|
+
M.prototype.toString = function() {
|
|
2387
2391
|
return "[Iterator]";
|
|
2388
2392
|
};
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
+
M.KEYS = ve;
|
|
2394
|
+
M.VALUES = vt;
|
|
2395
|
+
M.ENTRIES = yt;
|
|
2396
|
+
M.prototype.inspect = M.prototype.toSource = function() {
|
|
2393
2397
|
return this.toString();
|
|
2394
2398
|
};
|
|
2395
|
-
|
|
2399
|
+
M.prototype[gr] = function() {
|
|
2396
2400
|
return this;
|
|
2397
2401
|
};
|
|
2398
2402
|
function H(t, e, r, n) {
|
|
@@ -2424,7 +2428,7 @@ function mr(t) {
|
|
|
2424
2428
|
if (typeof e == "function")
|
|
2425
2429
|
return e;
|
|
2426
2430
|
}
|
|
2427
|
-
function
|
|
2431
|
+
function Cs(t) {
|
|
2428
2432
|
var e = mr(t);
|
|
2429
2433
|
return e && e === t.entries;
|
|
2430
2434
|
}
|
|
@@ -2432,7 +2436,7 @@ function xs(t) {
|
|
|
2432
2436
|
var e = mr(t);
|
|
2433
2437
|
return e && e === t.keys;
|
|
2434
2438
|
}
|
|
2435
|
-
var Fe = "delete",
|
|
2439
|
+
var Fe = "delete", F = 5, ht = 1 << F, it = ht - 1, x = {};
|
|
2436
2440
|
function Zr() {
|
|
2437
2441
|
return { value: !1 };
|
|
2438
2442
|
}
|
|
@@ -2459,7 +2463,7 @@ function To() {
|
|
|
2459
2463
|
function wr(t, e, r) {
|
|
2460
2464
|
return (t === 0 && !qo(t) || r !== void 0 && t <= -r) && (e === void 0 || r !== void 0 && e >= r);
|
|
2461
2465
|
}
|
|
2462
|
-
function
|
|
2466
|
+
function Ue(t, e) {
|
|
2463
2467
|
return Po(t, e, 0);
|
|
2464
2468
|
}
|
|
2465
2469
|
function br(t, e) {
|
|
@@ -2490,7 +2494,7 @@ function hn(t) {
|
|
|
2490
2494
|
t[Lo]);
|
|
2491
2495
|
}
|
|
2492
2496
|
var ye = Object.prototype.hasOwnProperty;
|
|
2493
|
-
function
|
|
2497
|
+
function Fo(t) {
|
|
2494
2498
|
return Array.isArray(t) || typeof t == "string" ? !0 : t && typeof t == "object" && // @ts-expect-error check that `'length' in value &&`
|
|
2495
2499
|
Number.isInteger(t.length) && // @ts-expect-error check that `'length' in value &&`
|
|
2496
2500
|
t.length >= 0 && // @ts-expect-error check that `'length' in value &&`
|
|
@@ -2506,7 +2510,7 @@ function Uo(t) {
|
|
|
2506
2510
|
}
|
|
2507
2511
|
var ct = /* @__PURE__ */ (function(t) {
|
|
2508
2512
|
function e(r) {
|
|
2509
|
-
return r == null ? dn() : Rt(r) ? r.toSeq() :
|
|
2513
|
+
return r == null ? dn() : Rt(r) ? r.toSeq() : $s(r);
|
|
2510
2514
|
}
|
|
2511
2515
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.prototype.toSeq = function() {
|
|
2512
2516
|
return this;
|
|
@@ -2529,7 +2533,7 @@ var ct = /* @__PURE__ */ (function(t) {
|
|
|
2529
2533
|
var o = this._cache;
|
|
2530
2534
|
if (o) {
|
|
2531
2535
|
var i = o.length, s = 0;
|
|
2532
|
-
return new
|
|
2536
|
+
return new M(function() {
|
|
2533
2537
|
if (s === i)
|
|
2534
2538
|
return st();
|
|
2535
2539
|
var a = o[n ? i - ++s : s++];
|
|
@@ -2547,7 +2551,7 @@ var ct = /* @__PURE__ */ (function(t) {
|
|
|
2547
2551
|
}, e;
|
|
2548
2552
|
})(ct), Et = /* @__PURE__ */ (function(t) {
|
|
2549
2553
|
function e(r) {
|
|
2550
|
-
return r == null ? dn() : dt(r) ? K(r) ? r.entrySeq() : r.toIndexedSeq() : Jt(r) ? r.toSeq().entrySeq() :
|
|
2554
|
+
return r == null ? dn() : dt(r) ? K(r) ? r.entrySeq() : r.toIndexedSeq() : Jt(r) ? r.toSeq().entrySeq() : Uo(r);
|
|
2551
2555
|
}
|
|
2552
2556
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.of = function() {
|
|
2553
2557
|
return e(arguments);
|
|
@@ -2586,7 +2590,7 @@ var ae = /* @__PURE__ */ (function(t) {
|
|
|
2586
2590
|
return s;
|
|
2587
2591
|
}, e.prototype.__iterator = function(r, n) {
|
|
2588
2592
|
var o = this._array, i = o.length, s = 0;
|
|
2589
|
-
return new
|
|
2593
|
+
return new M(function() {
|
|
2590
2594
|
if (s === i)
|
|
2591
2595
|
return st();
|
|
2592
2596
|
var a = n ? i - ++s : s++;
|
|
@@ -2613,7 +2617,7 @@ var ae = /* @__PURE__ */ (function(t) {
|
|
|
2613
2617
|
return a;
|
|
2614
2618
|
}, e.prototype.__iterator = function(r, n) {
|
|
2615
2619
|
var o = this._object, i = this._keys, s = i.length, a = 0;
|
|
2616
|
-
return new
|
|
2620
|
+
return new M(function() {
|
|
2617
2621
|
if (a === s)
|
|
2618
2622
|
return st();
|
|
2619
2623
|
var u = i[n ? s - ++a : a++];
|
|
@@ -2639,9 +2643,9 @@ var js = /* @__PURE__ */ (function(t) {
|
|
|
2639
2643
|
return this.cacheResult().__iterator(r, n);
|
|
2640
2644
|
var o = this._collection, i = Xr(o);
|
|
2641
2645
|
if (!Qn(i))
|
|
2642
|
-
return new
|
|
2646
|
+
return new M(st);
|
|
2643
2647
|
var s = 0;
|
|
2644
|
-
return new
|
|
2648
|
+
return new M(function() {
|
|
2645
2649
|
var a = i.next();
|
|
2646
2650
|
return a.done ? a : H(r, s++, a.value);
|
|
2647
2651
|
});
|
|
@@ -2660,7 +2664,7 @@ function vn(t) {
|
|
|
2660
2664
|
"Expected Array or collection object of [k, v] entries, or keyed object: " + t
|
|
2661
2665
|
);
|
|
2662
2666
|
}
|
|
2663
|
-
function
|
|
2667
|
+
function Uo(t) {
|
|
2664
2668
|
var e = yn(t);
|
|
2665
2669
|
if (e)
|
|
2666
2670
|
return e;
|
|
@@ -2668,10 +2672,10 @@ function Fo(t) {
|
|
|
2668
2672
|
"Expected Array or collection object of values: " + t
|
|
2669
2673
|
);
|
|
2670
2674
|
}
|
|
2671
|
-
function
|
|
2675
|
+
function $s(t) {
|
|
2672
2676
|
var e = yn(t);
|
|
2673
2677
|
if (e)
|
|
2674
|
-
return
|
|
2678
|
+
return Cs(t) ? e.fromEntrySeq() : xs(t) ? e.toSetSeq() : e;
|
|
2675
2679
|
if (typeof t == "object")
|
|
2676
2680
|
return new pn(t);
|
|
2677
2681
|
throw new TypeError(
|
|
@@ -2679,12 +2683,12 @@ function Cs(t) {
|
|
|
2679
2683
|
);
|
|
2680
2684
|
}
|
|
2681
2685
|
function yn(t) {
|
|
2682
|
-
return
|
|
2686
|
+
return Fo(t) ? new ae(t) : Mo(t) ? new js(t) : void 0;
|
|
2683
2687
|
}
|
|
2684
|
-
function
|
|
2688
|
+
function Be() {
|
|
2685
2689
|
return this.__ensureOwner();
|
|
2686
2690
|
}
|
|
2687
|
-
function
|
|
2691
|
+
function We() {
|
|
2688
2692
|
return this.__ownerID ? this : this.__ensureOwner(new fn());
|
|
2689
2693
|
}
|
|
2690
2694
|
var Se = typeof Math.imul == "function" && Math.imul(4294967295, 2) === -2 ? Math.imul : function(t, e) {
|
|
@@ -2695,27 +2699,27 @@ var Se = typeof Math.imul == "function" && Math.imul(4294967295, 2) === -2 ? Mat
|
|
|
2695
2699
|
function Sr(t) {
|
|
2696
2700
|
return t >>> 1 & 1073741824 | t & 3221225471;
|
|
2697
2701
|
}
|
|
2698
|
-
var
|
|
2702
|
+
var Ms = Object.prototype.valueOf;
|
|
2699
2703
|
function lt(t) {
|
|
2700
2704
|
if (t == null)
|
|
2701
2705
|
return Xn(t);
|
|
2702
2706
|
if (typeof t.hashCode == "function")
|
|
2703
2707
|
return Sr(t.hashCode(t));
|
|
2704
|
-
var e =
|
|
2708
|
+
var e = Fs(t);
|
|
2705
2709
|
if (e == null)
|
|
2706
2710
|
return Xn(e);
|
|
2707
2711
|
switch (typeof e) {
|
|
2708
2712
|
case "boolean":
|
|
2709
2713
|
return e ? 1108378657 : 1108378656;
|
|
2710
2714
|
case "number":
|
|
2711
|
-
return
|
|
2715
|
+
return Ts(e);
|
|
2712
2716
|
case "string":
|
|
2713
|
-
return e.length > Us ?
|
|
2717
|
+
return e.length > Us ? Ps(e) : tn(e);
|
|
2714
2718
|
case "object":
|
|
2715
2719
|
case "function":
|
|
2716
|
-
return
|
|
2720
|
+
return Vs(e);
|
|
2717
2721
|
case "symbol":
|
|
2718
|
-
return
|
|
2722
|
+
return qs(e);
|
|
2719
2723
|
default:
|
|
2720
2724
|
if (typeof e.toString == "function")
|
|
2721
2725
|
return tn(e.toString());
|
|
@@ -2728,7 +2732,7 @@ function Xn(t) {
|
|
|
2728
2732
|
1108378659
|
|
2729
2733
|
);
|
|
2730
2734
|
}
|
|
2731
|
-
function
|
|
2735
|
+
function Ts(t) {
|
|
2732
2736
|
if (t !== t || t === 1 / 0)
|
|
2733
2737
|
return 0;
|
|
2734
2738
|
var e = t | 0;
|
|
@@ -2736,22 +2740,22 @@ function Ms(t) {
|
|
|
2736
2740
|
t /= 4294967295, e ^= t;
|
|
2737
2741
|
return Sr(e);
|
|
2738
2742
|
}
|
|
2739
|
-
function
|
|
2743
|
+
function Ps(t) {
|
|
2740
2744
|
var e = Mr[t];
|
|
2741
|
-
return e === void 0 && (e = tn(t), $r ===
|
|
2745
|
+
return e === void 0 && (e = tn(t), $r === Bs && ($r = 0, Mr = {}), $r++, Mr[t] = e), e;
|
|
2742
2746
|
}
|
|
2743
2747
|
function tn(t) {
|
|
2744
2748
|
for (var e = 0, r = 0; r < t.length; r++)
|
|
2745
2749
|
e = 31 * e + t.charCodeAt(r) | 0;
|
|
2746
2750
|
return Sr(e);
|
|
2747
2751
|
}
|
|
2748
|
-
function
|
|
2752
|
+
function qs(t) {
|
|
2749
2753
|
var e = eo[t];
|
|
2750
2754
|
return e !== void 0 || (e = Bo(), eo[t] = e), e;
|
|
2751
2755
|
}
|
|
2752
|
-
function
|
|
2756
|
+
function Vs(t) {
|
|
2753
2757
|
var e;
|
|
2754
|
-
if (en && (e = rn.get(t), e !== void 0) || (e = t[
|
|
2758
|
+
if (en && (e = rn.get(t), e !== void 0) || (e = t[Ft], e !== void 0) || !to && (e = t.propertyIsEnumerable && t.propertyIsEnumerable[Ft], e !== void 0 || (e = Ls(t), e !== void 0)))
|
|
2755
2759
|
return e;
|
|
2756
2760
|
if (e = Bo(), en)
|
|
2757
2761
|
rn.set(t, e);
|
|
@@ -2759,7 +2763,7 @@ function qs(t) {
|
|
|
2759
2763
|
if (Zn !== void 0 && Zn(t) === !1)
|
|
2760
2764
|
throw new Error("Non-extensible objects are not allowed as keys.");
|
|
2761
2765
|
if (to)
|
|
2762
|
-
Object.defineProperty(t,
|
|
2766
|
+
Object.defineProperty(t, Ft, {
|
|
2763
2767
|
enumerable: !1,
|
|
2764
2768
|
configurable: !1,
|
|
2765
2769
|
writable: !1,
|
|
@@ -2772,9 +2776,9 @@ function qs(t) {
|
|
|
2772
2776
|
// eslint-disable-next-line prefer-rest-params
|
|
2773
2777
|
arguments
|
|
2774
2778
|
);
|
|
2775
|
-
}, t.propertyIsEnumerable[
|
|
2779
|
+
}, t.propertyIsEnumerable[Ft] = e;
|
|
2776
2780
|
else if (t.nodeType !== void 0)
|
|
2777
|
-
t[
|
|
2781
|
+
t[Ft] = e;
|
|
2778
2782
|
else
|
|
2779
2783
|
throw new Error("Unable to set a non-enumerable property on object.");
|
|
2780
2784
|
}
|
|
@@ -2787,7 +2791,7 @@ var Zn = Object.isExtensible, to = (function() {
|
|
|
2787
2791
|
return !1;
|
|
2788
2792
|
}
|
|
2789
2793
|
})();
|
|
2790
|
-
function
|
|
2794
|
+
function Ls(t) {
|
|
2791
2795
|
if (t && t.nodeType > 0)
|
|
2792
2796
|
switch (t.nodeType) {
|
|
2793
2797
|
case 1:
|
|
@@ -2796,21 +2800,21 @@ function Vs(t) {
|
|
|
2796
2800
|
return t.documentElement && t.documentElement.uniqueID;
|
|
2797
2801
|
}
|
|
2798
2802
|
}
|
|
2799
|
-
function
|
|
2800
|
-
return t.valueOf !==
|
|
2803
|
+
function Fs(t) {
|
|
2804
|
+
return t.valueOf !== Ms && typeof t.valueOf == "function" ? (
|
|
2801
2805
|
// @ts-expect-error weird the "obj" parameter as `valueOf` should not have a parameter
|
|
2802
2806
|
t.valueOf(t)
|
|
2803
2807
|
) : t;
|
|
2804
2808
|
}
|
|
2805
2809
|
function Bo() {
|
|
2806
|
-
var t = ++
|
|
2807
|
-
return
|
|
2810
|
+
var t = ++jr;
|
|
2811
|
+
return jr & 1073741824 && (jr = 0), t;
|
|
2808
2812
|
}
|
|
2809
2813
|
var en = typeof WeakMap == "function", rn;
|
|
2810
2814
|
en && (rn = /* @__PURE__ */ new WeakMap());
|
|
2811
|
-
var eo = /* @__PURE__ */ Object.create(null),
|
|
2812
|
-
typeof Symbol == "function" && (
|
|
2813
|
-
var Us = 16,
|
|
2815
|
+
var eo = /* @__PURE__ */ Object.create(null), jr = 0, Ft = "__immutablehash__";
|
|
2816
|
+
typeof Symbol == "function" && (Ft = Symbol(Ft));
|
|
2817
|
+
var Us = 16, Bs = 255, $r = 0, Mr = {}, Ir = /* @__PURE__ */ (function(t) {
|
|
2814
2818
|
function e(r, n) {
|
|
2815
2819
|
this._iter = r, this._useKeys = n, this.size = r.size;
|
|
2816
2820
|
}
|
|
@@ -2856,7 +2860,7 @@ var Wo = /* @__PURE__ */ (function(t) {
|
|
|
2856
2860
|
);
|
|
2857
2861
|
}, e.prototype.__iterator = function(r, n) {
|
|
2858
2862
|
var o = this, i = this._iter.__iterator(vt, n), s = 0;
|
|
2859
|
-
return n && se(this), new
|
|
2863
|
+
return n && se(this), new M(function() {
|
|
2860
2864
|
var a = i.next();
|
|
2861
2865
|
return a.done ? a : H(
|
|
2862
2866
|
r,
|
|
@@ -2879,7 +2883,7 @@ var Wo = /* @__PURE__ */ (function(t) {
|
|
|
2879
2883
|
}, n);
|
|
2880
2884
|
}, e.prototype.__iterator = function(r, n) {
|
|
2881
2885
|
var o = this._iter.__iterator(vt, n);
|
|
2882
|
-
return new
|
|
2886
|
+
return new M(function() {
|
|
2883
2887
|
var i = o.next();
|
|
2884
2888
|
return i.done ? i : H(r, i.value, i.value, i);
|
|
2885
2889
|
});
|
|
@@ -2905,7 +2909,7 @@ var Wo = /* @__PURE__ */ (function(t) {
|
|
|
2905
2909
|
}, n);
|
|
2906
2910
|
}, e.prototype.__iterator = function(r, n) {
|
|
2907
2911
|
var o = this._iter.__iterator(vt, n);
|
|
2908
|
-
return new
|
|
2912
|
+
return new M(function() {
|
|
2909
2913
|
for (; ; ) {
|
|
2910
2914
|
var i = o.next();
|
|
2911
2915
|
if (i.done)
|
|
@@ -2947,7 +2951,7 @@ function Jo(t) {
|
|
|
2947
2951
|
}, e.__iteratorUncached = function(r, n) {
|
|
2948
2952
|
if (r === yt) {
|
|
2949
2953
|
var o = t.__iterator(r, n);
|
|
2950
|
-
return new
|
|
2954
|
+
return new M(function() {
|
|
2951
2955
|
var i = o.next();
|
|
2952
2956
|
if (!i.done) {
|
|
2953
2957
|
var s = i.value[0];
|
|
@@ -2967,8 +2971,8 @@ function Go(t, e, r) {
|
|
|
2967
2971
|
return n.size = t.size, n.has = function(o) {
|
|
2968
2972
|
return t.has(o);
|
|
2969
2973
|
}, n.get = function(o, i) {
|
|
2970
|
-
var s = t.get(o,
|
|
2971
|
-
return s ===
|
|
2974
|
+
var s = t.get(o, x);
|
|
2975
|
+
return s === x ? i : e.call(r, s, o, t);
|
|
2972
2976
|
}, n.__iterateUncached = function(o, i) {
|
|
2973
2977
|
var s = this;
|
|
2974
2978
|
return t.__iterate(
|
|
@@ -2979,7 +2983,7 @@ function Go(t, e, r) {
|
|
|
2979
2983
|
);
|
|
2980
2984
|
}, n.__iteratorUncached = function(o, i) {
|
|
2981
2985
|
var s = t.__iterator(yt, i);
|
|
2982
|
-
return new
|
|
2986
|
+
return new M(function() {
|
|
2983
2987
|
var a = s.next();
|
|
2984
2988
|
if (a.done)
|
|
2985
2989
|
return a;
|
|
@@ -3020,7 +3024,7 @@ function _n(t, e) {
|
|
|
3020
3024
|
var s = 0;
|
|
3021
3025
|
i && se(t);
|
|
3022
3026
|
var a = t.__iterator(yt, !i);
|
|
3023
|
-
return new
|
|
3027
|
+
return new M(function() {
|
|
3024
3028
|
var u = a.next();
|
|
3025
3029
|
if (u.done)
|
|
3026
3030
|
return u;
|
|
@@ -3037,11 +3041,11 @@ function _n(t, e) {
|
|
|
3037
3041
|
function Qo(t, e, r, n) {
|
|
3038
3042
|
var o = Nt(t);
|
|
3039
3043
|
return n && (o.has = function(i) {
|
|
3040
|
-
var s = t.get(i,
|
|
3041
|
-
return s !==
|
|
3044
|
+
var s = t.get(i, x);
|
|
3045
|
+
return s !== x && !!e.call(r, s, i, t);
|
|
3042
3046
|
}, o.get = function(i, s) {
|
|
3043
|
-
var a = t.get(i,
|
|
3044
|
-
return a !==
|
|
3047
|
+
var a = t.get(i, x);
|
|
3048
|
+
return a !== x && e.call(r, a, i, t) ? a : s;
|
|
3045
3049
|
}), o.__iterateUncached = function(i, s) {
|
|
3046
3050
|
var a = this, u = 0;
|
|
3047
3051
|
return t.__iterate(function(c, l, f) {
|
|
@@ -3050,7 +3054,7 @@ function Qo(t, e, r, n) {
|
|
|
3050
3054
|
}, s), u;
|
|
3051
3055
|
}, o.__iteratorUncached = function(i, s) {
|
|
3052
3056
|
var a = t.__iterator(yt, s), u = 0;
|
|
3053
|
-
return new
|
|
3057
|
+
return new M(function() {
|
|
3054
3058
|
for (; ; ) {
|
|
3055
3059
|
var c = a.next();
|
|
3056
3060
|
if (c.done)
|
|
@@ -3062,7 +3066,7 @@ function Qo(t, e, r, n) {
|
|
|
3062
3066
|
});
|
|
3063
3067
|
}, o;
|
|
3064
3068
|
}
|
|
3065
|
-
function
|
|
3069
|
+
function Ws(t, e, r) {
|
|
3066
3070
|
var n = ge().asMutable();
|
|
3067
3071
|
return t.__iterate(function(o, i) {
|
|
3068
3072
|
n.update(e.call(r, o, i, t), 0, function(s) {
|
|
@@ -3070,7 +3074,7 @@ function Bs(t, e, r) {
|
|
|
3070
3074
|
});
|
|
3071
3075
|
}), n.asImmutable();
|
|
3072
3076
|
}
|
|
3073
|
-
function
|
|
3077
|
+
function Ks(t, e, r) {
|
|
3074
3078
|
var n = K(t), o = (At(t) ? $t() : ge()).asMutable();
|
|
3075
3079
|
t.__iterate(function(s, a) {
|
|
3076
3080
|
o.update(
|
|
@@ -3085,7 +3089,7 @@ function Ws(t, e, r) {
|
|
|
3085
3089
|
return L(t, i(s));
|
|
3086
3090
|
}).asImmutable();
|
|
3087
3091
|
}
|
|
3088
|
-
function
|
|
3092
|
+
function Hs(t, e, r) {
|
|
3089
3093
|
var n = K(t), o = [[], []];
|
|
3090
3094
|
t.__iterate(function(s, a) {
|
|
3091
3095
|
o[e.call(r, s, a, t) ? 1 : 0].push(
|
|
@@ -3103,7 +3107,7 @@ function gn(t, e, r, n) {
|
|
|
3103
3107
|
return t;
|
|
3104
3108
|
if (typeof o > "u" && (e < 0 || r < 0))
|
|
3105
3109
|
return gn(t.toSeq().cacheResult(), e, r, n);
|
|
3106
|
-
var i =
|
|
3110
|
+
var i = Ue(e, o), s = br(r, o), a = s - i, u;
|
|
3107
3111
|
a === a && (u = a < 0 ? 0 : a);
|
|
3108
3112
|
var c = Nt(t);
|
|
3109
3113
|
return c.size = u === 0 ? u : t.size && u || void 0, !n && hn(t) && u >= 0 && (c.get = function(l, f) {
|
|
@@ -3114,28 +3118,28 @@ function gn(t, e, r, n) {
|
|
|
3114
3118
|
return 0;
|
|
3115
3119
|
if (f)
|
|
3116
3120
|
return this.cacheResult().__iterate(l, f);
|
|
3117
|
-
var p = 0, d = !0,
|
|
3118
|
-
return t.__iterate(function(D,
|
|
3121
|
+
var p = 0, d = !0, y = 0;
|
|
3122
|
+
return t.__iterate(function(D, $) {
|
|
3119
3123
|
if (!(d && (d = p++ < i)))
|
|
3120
|
-
return
|
|
3121
|
-
}),
|
|
3124
|
+
return y++, l(D, n ? $ : y - 1, h) !== !1 && y !== u;
|
|
3125
|
+
}), y;
|
|
3122
3126
|
}, c.__iteratorUncached = function(l, f) {
|
|
3123
3127
|
if (u !== 0 && f)
|
|
3124
3128
|
return this.cacheResult().__iterator(l, f);
|
|
3125
3129
|
if (u === 0)
|
|
3126
|
-
return new
|
|
3130
|
+
return new M(st);
|
|
3127
3131
|
var h = t.__iterator(l, f), p = 0, d = 0;
|
|
3128
|
-
return new
|
|
3132
|
+
return new M(function() {
|
|
3129
3133
|
for (; p++ < i; )
|
|
3130
3134
|
h.next();
|
|
3131
3135
|
if (++d > u)
|
|
3132
3136
|
return st();
|
|
3133
|
-
var
|
|
3134
|
-
return n || l === vt ||
|
|
3137
|
+
var y = h.next();
|
|
3138
|
+
return n || l === vt || y.done ? y : l === ve ? H(l, d - 1, void 0, y) : H(l, d - 1, y.value[1], y);
|
|
3135
3139
|
});
|
|
3136
3140
|
}, c;
|
|
3137
3141
|
}
|
|
3138
|
-
function
|
|
3142
|
+
function Js(t, e, r) {
|
|
3139
3143
|
var n = Nt(t);
|
|
3140
3144
|
return n.__iterateUncached = function(o, i) {
|
|
3141
3145
|
var s = this;
|
|
@@ -3152,7 +3156,7 @@ function Hs(t, e, r) {
|
|
|
3152
3156
|
if (i)
|
|
3153
3157
|
return this.cacheResult().__iterator(o, i);
|
|
3154
3158
|
var a = t.__iterator(yt, i), u = !0;
|
|
3155
|
-
return new
|
|
3159
|
+
return new M(function() {
|
|
3156
3160
|
if (!u)
|
|
3157
3161
|
return st();
|
|
3158
3162
|
var c = a.next();
|
|
@@ -3179,7 +3183,7 @@ function Yo(t, e, r, n) {
|
|
|
3179
3183
|
if (s)
|
|
3180
3184
|
return this.cacheResult().__iterator(i, s);
|
|
3181
3185
|
var u = t.__iterator(yt, s), c = !0, l = 0;
|
|
3182
|
-
return new
|
|
3186
|
+
return new M(function() {
|
|
3183
3187
|
var f, h, p;
|
|
3184
3188
|
do {
|
|
3185
3189
|
if (f = u.next(), f.done)
|
|
@@ -3191,7 +3195,7 @@ function Yo(t, e, r, n) {
|
|
|
3191
3195
|
});
|
|
3192
3196
|
}, o;
|
|
3193
3197
|
}
|
|
3194
|
-
var
|
|
3198
|
+
var Gs = /* @__PURE__ */ (function(t) {
|
|
3195
3199
|
function e(r) {
|
|
3196
3200
|
this._wrappedIterables = r.flatMap(function(n) {
|
|
3197
3201
|
return n._wrappedIterables ? n._wrappedIterables : [n];
|
|
@@ -3227,14 +3231,14 @@ var Js = /* @__PURE__ */ (function(t) {
|
|
|
3227
3231
|
}, e.prototype.__iteratorUncached = function(r, n) {
|
|
3228
3232
|
var o = this;
|
|
3229
3233
|
if (this._wrappedIterables.length === 0)
|
|
3230
|
-
return new
|
|
3234
|
+
return new M(st);
|
|
3231
3235
|
if (n)
|
|
3232
3236
|
return this.cacheResult().__iterator(r, n);
|
|
3233
3237
|
var i = 0, s = this._wrappedIterables[i].__iterator(
|
|
3234
3238
|
r,
|
|
3235
3239
|
n
|
|
3236
3240
|
);
|
|
3237
|
-
return new
|
|
3241
|
+
return new M(function() {
|
|
3238
3242
|
for (var a = s.next(); a.done; ) {
|
|
3239
3243
|
if (i++, i === o._wrappedIterables.length)
|
|
3240
3244
|
return a;
|
|
@@ -3247,9 +3251,9 @@ var Js = /* @__PURE__ */ (function(t) {
|
|
|
3247
3251
|
});
|
|
3248
3252
|
}, e;
|
|
3249
3253
|
})(ct);
|
|
3250
|
-
function
|
|
3254
|
+
function Qs(t, e) {
|
|
3251
3255
|
var r = K(t), n = [t].concat(e).map(function(i) {
|
|
3252
|
-
return dt(i) ? r && (i = St(i)) : i = r ? vn(i) :
|
|
3256
|
+
return dt(i) ? r && (i = St(i)) : i = r ? vn(i) : Uo(Array.isArray(i) ? i : [i]), i;
|
|
3253
3257
|
}).filter(function(i) {
|
|
3254
3258
|
return i.size !== 0;
|
|
3255
3259
|
});
|
|
@@ -3260,7 +3264,7 @@ function Gs(t, e) {
|
|
|
3260
3264
|
if (o === t || r && K(o) || bt(t) && bt(o))
|
|
3261
3265
|
return o;
|
|
3262
3266
|
}
|
|
3263
|
-
return new
|
|
3267
|
+
return new Gs(n);
|
|
3264
3268
|
}
|
|
3265
3269
|
function Xo(t, e, r) {
|
|
3266
3270
|
var n = Nt(t);
|
|
@@ -3278,7 +3282,7 @@ function Xo(t, e, r) {
|
|
|
3278
3282
|
if (i)
|
|
3279
3283
|
return this.cacheResult().__iterator(o, i);
|
|
3280
3284
|
var s = t.__iterator(o, i), a = [], u = 0;
|
|
3281
|
-
return new
|
|
3285
|
+
return new M(function() {
|
|
3282
3286
|
for (; s; ) {
|
|
3283
3287
|
var c = s.next();
|
|
3284
3288
|
if (c.done !== !1) {
|
|
@@ -3295,13 +3299,13 @@ function Xo(t, e, r) {
|
|
|
3295
3299
|
});
|
|
3296
3300
|
}, n;
|
|
3297
3301
|
}
|
|
3298
|
-
function
|
|
3302
|
+
function Ys(t, e, r) {
|
|
3299
3303
|
var n = mn(t);
|
|
3300
3304
|
return t.toSeq().map(function(o, i) {
|
|
3301
3305
|
return n(e.call(r, o, i, t));
|
|
3302
3306
|
}).flatten(!0);
|
|
3303
3307
|
}
|
|
3304
|
-
function
|
|
3308
|
+
function Xs(t, e) {
|
|
3305
3309
|
var r = Nt(t);
|
|
3306
3310
|
return r.size = t.size && t.size * 2 - 1, r.__iterateUncached = function(n, o) {
|
|
3307
3311
|
var i = this, s = 0;
|
|
@@ -3313,7 +3317,7 @@ function Ys(t, e) {
|
|
|
3313
3317
|
), s;
|
|
3314
3318
|
}, r.__iteratorUncached = function(n, o) {
|
|
3315
3319
|
var i = t.__iterator(vt, o), s = 0, a;
|
|
3316
|
-
return new
|
|
3320
|
+
return new M(function() {
|
|
3317
3321
|
return (!a || s % 2) && (a = i.next(), a.done) ? a : s % 2 ? H(n, s++, e) : H(n, s++, a.value, a);
|
|
3318
3322
|
});
|
|
3319
3323
|
}, r;
|
|
@@ -3333,7 +3337,7 @@ function ue(t, e, r) {
|
|
|
3333
3337
|
}
|
|
3334
3338
|
), n ? Lt(i) : bt(t) ? Et(i) : _e(i);
|
|
3335
3339
|
}
|
|
3336
|
-
function
|
|
3340
|
+
function Xe(t, e, r) {
|
|
3337
3341
|
if (e || (e = Zo), r) {
|
|
3338
3342
|
var n = t.toSeq().map(function(o, i) {
|
|
3339
3343
|
return [o, r(o, i, t)];
|
|
@@ -3350,7 +3354,7 @@ function ro(t, e, r) {
|
|
|
3350
3354
|
var n = t(r, e);
|
|
3351
3355
|
return n === 0 && r !== e && (r == null || r !== r) || n > 0;
|
|
3352
3356
|
}
|
|
3353
|
-
function
|
|
3357
|
+
function Ze(t, e, r, n) {
|
|
3354
3358
|
var o = Nt(t), i = new ae(r).map(function(s) {
|
|
3355
3359
|
return s.size;
|
|
3356
3360
|
});
|
|
@@ -3364,7 +3368,7 @@ function tr(t, e, r, n) {
|
|
|
3364
3368
|
return f = et(f), Xr(a ? f.reverse() : f);
|
|
3365
3369
|
}
|
|
3366
3370
|
), c = 0, l = !1;
|
|
3367
|
-
return new
|
|
3371
|
+
return new M(function() {
|
|
3368
3372
|
var f;
|
|
3369
3373
|
return l || (f = u.map(function(h) {
|
|
3370
3374
|
return h.next();
|
|
@@ -3453,9 +3457,9 @@ function ni(t, e, r) {
|
|
|
3453
3457
|
ti(
|
|
3454
3458
|
s,
|
|
3455
3459
|
l,
|
|
3456
|
-
|
|
3460
|
+
x,
|
|
3457
3461
|
function(f) {
|
|
3458
|
-
return f ===
|
|
3462
|
+
return f === x ? c : r(f, c, l);
|
|
3459
3463
|
}
|
|
3460
3464
|
);
|
|
3461
3465
|
} : function(c, l) {
|
|
@@ -3464,9 +3468,9 @@ function ni(t, e, r) {
|
|
|
3464
3468
|
n[u].forEach(a);
|
|
3465
3469
|
});
|
|
3466
3470
|
}
|
|
3467
|
-
var
|
|
3468
|
-
function
|
|
3469
|
-
if (!t || typeof t != "object" ||
|
|
3471
|
+
var Zs = Object.prototype.toString;
|
|
3472
|
+
function ta(t) {
|
|
3473
|
+
if (!t || typeof t != "object" || Zs.call(t) !== "[object Object]")
|
|
3470
3474
|
return !1;
|
|
3471
3475
|
var e = Object.getPrototypeOf(t);
|
|
3472
3476
|
if (e === null)
|
|
@@ -3476,7 +3480,7 @@ function Zs(t) {
|
|
|
3476
3480
|
return r === e;
|
|
3477
3481
|
}
|
|
3478
3482
|
function Vt(t) {
|
|
3479
|
-
return typeof t == "object" && (Rt(t) || Array.isArray(t) ||
|
|
3483
|
+
return typeof t == "object" && (Rt(t) || Array.isArray(t) || ta(t));
|
|
3480
3484
|
}
|
|
3481
3485
|
function kt(t, e) {
|
|
3482
3486
|
e = e || 0;
|
|
@@ -3493,7 +3497,7 @@ function pr(t) {
|
|
|
3493
3497
|
return e;
|
|
3494
3498
|
}
|
|
3495
3499
|
function bn(t, e, r) {
|
|
3496
|
-
return Sn(t, e,
|
|
3500
|
+
return Sn(t, e, ea(r));
|
|
3497
3501
|
}
|
|
3498
3502
|
function Sn(t, e, r) {
|
|
3499
3503
|
if (!Vt(t))
|
|
@@ -3511,13 +3515,13 @@ function Sn(t, e, r) {
|
|
|
3511
3515
|
i(e[a]).forEach(s);
|
|
3512
3516
|
return o;
|
|
3513
3517
|
}
|
|
3514
|
-
function
|
|
3518
|
+
function ea(t) {
|
|
3515
3519
|
function e(r, n, o) {
|
|
3516
|
-
return Vt(r) && Vt(n) &&
|
|
3520
|
+
return Vt(r) && Vt(n) && ra(r, n) ? Sn(r, [n], e) : t ? t(r, n, o) : n;
|
|
3517
3521
|
}
|
|
3518
3522
|
return e;
|
|
3519
3523
|
}
|
|
3520
|
-
function
|
|
3524
|
+
function ra(t, e) {
|
|
3521
3525
|
var r = ct(t), n = ct(e);
|
|
3522
3526
|
return bt(r) === bt(n) && K(r) === K(n);
|
|
3523
3527
|
}
|
|
@@ -3546,13 +3550,13 @@ function En(t) {
|
|
|
3546
3550
|
return Sn(n, e);
|
|
3547
3551
|
});
|
|
3548
3552
|
}
|
|
3549
|
-
function
|
|
3550
|
-
return me(t, e,
|
|
3553
|
+
function na(t, e, r) {
|
|
3554
|
+
return me(t, e, x, function() {
|
|
3551
3555
|
return r;
|
|
3552
3556
|
});
|
|
3553
3557
|
}
|
|
3554
3558
|
function On(t, e) {
|
|
3555
|
-
return
|
|
3559
|
+
return na(this, t, e);
|
|
3556
3560
|
}
|
|
3557
3561
|
function kn(t, e, r) {
|
|
3558
3562
|
return arguments.length === 1 ? t(this) : ti(this, t, e, r);
|
|
@@ -3563,7 +3567,7 @@ function Dn(t, e, r) {
|
|
|
3563
3567
|
function zn() {
|
|
3564
3568
|
return this.__altered;
|
|
3565
3569
|
}
|
|
3566
|
-
function
|
|
3570
|
+
function Ke(t) {
|
|
3567
3571
|
var e = this.asMutable();
|
|
3568
3572
|
return t(e), e.wasAltered() ? e.__ensureOwner(this.__ownerID) : this;
|
|
3569
3573
|
}
|
|
@@ -3572,12 +3576,12 @@ function An(t) {
|
|
|
3572
3576
|
return !!(t && // @ts-expect-error: maybeMap is typed as `{}`, need to change in 6.0 to `maybeMap && typeof maybeMap === 'object' && IS_MAP_SYMBOL in maybeMap`
|
|
3573
3577
|
t[si]);
|
|
3574
3578
|
}
|
|
3575
|
-
function
|
|
3579
|
+
function Ae(t, e) {
|
|
3576
3580
|
if (!t)
|
|
3577
3581
|
throw new Error(e);
|
|
3578
3582
|
}
|
|
3579
3583
|
function ft(t) {
|
|
3580
|
-
|
|
3584
|
+
Ae(t !== 1 / 0, "Cannot perform this action with an infinite size.");
|
|
3581
3585
|
}
|
|
3582
3586
|
var ge = /* @__PURE__ */ (function(t) {
|
|
3583
3587
|
function e(r) {
|
|
@@ -3595,7 +3599,7 @@ var ge = /* @__PURE__ */ (function(t) {
|
|
|
3595
3599
|
}, e.prototype.set = function(r, n) {
|
|
3596
3600
|
return ao(this, r, n);
|
|
3597
3601
|
}, e.prototype.remove = function(r) {
|
|
3598
|
-
return ao(this, r,
|
|
3602
|
+
return ao(this, r, x);
|
|
3599
3603
|
}, e.prototype.deleteAll = function(r) {
|
|
3600
3604
|
var n = et(r);
|
|
3601
3605
|
return n.size === 0 ? this : this.withMutations(function(o) {
|
|
@@ -3617,7 +3621,7 @@ var ge = /* @__PURE__ */ (function(t) {
|
|
|
3617
3621
|
});
|
|
3618
3622
|
});
|
|
3619
3623
|
}, e.prototype.__iterator = function(r, n) {
|
|
3620
|
-
return new
|
|
3624
|
+
return new oa(this, r, n);
|
|
3621
3625
|
}, e.prototype.__iterate = function(r, n) {
|
|
3622
3626
|
var o = this, i = 0;
|
|
3623
3627
|
return this._root && this._root.iterate(function(s) {
|
|
@@ -3633,7 +3637,7 @@ W[si] = !0;
|
|
|
3633
3637
|
W[Fe] = W.remove;
|
|
3634
3638
|
W.removeAll = W.deleteAll;
|
|
3635
3639
|
W.setIn = On;
|
|
3636
|
-
W.removeIn = W.deleteIn =
|
|
3640
|
+
W.removeIn = W.deleteIn = xn;
|
|
3637
3641
|
W.update = kn;
|
|
3638
3642
|
W.updateIn = Dn;
|
|
3639
3643
|
W.merge = W.concat = ei;
|
|
@@ -3642,36 +3646,36 @@ W.mergeDeep = oi;
|
|
|
3642
3646
|
W.mergeDeepWith = ii;
|
|
3643
3647
|
W.mergeIn = En;
|
|
3644
3648
|
W.mergeDeepIn = In;
|
|
3645
|
-
W.withMutations =
|
|
3649
|
+
W.withMutations = Ke;
|
|
3646
3650
|
W.wasAltered = zn;
|
|
3647
|
-
W.asImmutable =
|
|
3648
|
-
W["@@transducer/init"] = W.asMutable =
|
|
3651
|
+
W.asImmutable = Be;
|
|
3652
|
+
W["@@transducer/init"] = W.asMutable = We;
|
|
3649
3653
|
W["@@transducer/step"] = function(t, e) {
|
|
3650
3654
|
return t.set(e[0], e[1]);
|
|
3651
3655
|
};
|
|
3652
3656
|
W["@@transducer/result"] = function(t) {
|
|
3653
3657
|
return t.asImmutable();
|
|
3654
3658
|
};
|
|
3655
|
-
var
|
|
3659
|
+
var je = function(t, e) {
|
|
3656
3660
|
this.ownerID = t, this.entries = e;
|
|
3657
3661
|
};
|
|
3658
|
-
|
|
3662
|
+
je.prototype.get = function(t, e, r, n) {
|
|
3659
3663
|
for (var o = this.entries, i = 0, s = o.length; i < s; i++)
|
|
3660
3664
|
if (pt(r, o[i][0]))
|
|
3661
3665
|
return o[i][1];
|
|
3662
3666
|
return n;
|
|
3663
3667
|
};
|
|
3664
|
-
|
|
3665
|
-
for (var a = o ===
|
|
3668
|
+
je.prototype.update = function(t, e, r, n, o, i, s) {
|
|
3669
|
+
for (var a = o === x, u = this.entries, c = 0, l = u.length; c < l && !pt(n, u[c][0]); c++)
|
|
3666
3670
|
;
|
|
3667
3671
|
var f = c < l;
|
|
3668
3672
|
if (f ? u[c][1] === o : a)
|
|
3669
3673
|
return this;
|
|
3670
3674
|
if (mt(s), (a || !f) && mt(i), !(a && u.length === 1)) {
|
|
3671
|
-
if (!f && !a && u.length >=
|
|
3672
|
-
return
|
|
3675
|
+
if (!f && !a && u.length >= la)
|
|
3676
|
+
return ia(t, u, n, o);
|
|
3673
3677
|
var h = t && t === this.ownerID, p = h ? u : kt(u);
|
|
3674
|
-
return f ? a ? c === l - 1 ? p.pop() : p[c] = p.pop() : p[c] = [n, o] : p.push([n, o]), h ? (this.entries = p, this) : new
|
|
3678
|
+
return f ? a ? c === l - 1 ? p.pop() : p[c] = p.pop() : p[c] = [n, o] : p.push([n, o]), h ? (this.entries = p, this) : new je(t, p);
|
|
3675
3679
|
}
|
|
3676
3680
|
};
|
|
3677
3681
|
var ce = function(t, e, r) {
|
|
@@ -3681,7 +3685,7 @@ ce.prototype.get = function(t, e, r, n) {
|
|
|
3681
3685
|
e === void 0 && (e = lt(r));
|
|
3682
3686
|
var o = 1 << ((t === 0 ? e : e >>> t) & it), i = this.bitmap;
|
|
3683
3687
|
return (i & o) === 0 ? n : this.nodes[ai(i & o - 1)].get(
|
|
3684
|
-
t +
|
|
3688
|
+
t + F,
|
|
3685
3689
|
e,
|
|
3686
3690
|
r,
|
|
3687
3691
|
n
|
|
@@ -3690,12 +3694,12 @@ ce.prototype.get = function(t, e, r, n) {
|
|
|
3690
3694
|
ce.prototype.update = function(t, e, r, n, o, i, s) {
|
|
3691
3695
|
r === void 0 && (r = lt(n));
|
|
3692
3696
|
var a = (e === 0 ? r : r >>> e) & it, u = 1 << a, c = this.bitmap, l = (c & u) !== 0;
|
|
3693
|
-
if (!l && o ===
|
|
3697
|
+
if (!l && o === x)
|
|
3694
3698
|
return this;
|
|
3695
3699
|
var f = ai(c & u - 1), h = this.nodes, p = l ? h[f] : void 0, d = Nn(
|
|
3696
3700
|
p,
|
|
3697
3701
|
t,
|
|
3698
|
-
e +
|
|
3702
|
+
e + F,
|
|
3699
3703
|
r,
|
|
3700
3704
|
n,
|
|
3701
3705
|
o,
|
|
@@ -3704,32 +3708,32 @@ ce.prototype.update = function(t, e, r, n, o, i, s) {
|
|
|
3704
3708
|
);
|
|
3705
3709
|
if (d === p)
|
|
3706
3710
|
return this;
|
|
3707
|
-
if (!l && d && h.length >=
|
|
3708
|
-
return
|
|
3711
|
+
if (!l && d && h.length >= fa)
|
|
3712
|
+
return aa(t, h, c, a, d);
|
|
3709
3713
|
if (l && !d && h.length === 2 && uo(h[f ^ 1]))
|
|
3710
3714
|
return h[f ^ 1];
|
|
3711
3715
|
if (l && d && h.length === 1 && uo(d))
|
|
3712
3716
|
return d;
|
|
3713
|
-
var
|
|
3714
|
-
return
|
|
3717
|
+
var y = t && t === this.ownerID, D = l ? d ? c : c ^ u : c | u, $ = l ? d ? ui(h, f, d, y) : ca(h, f, y) : ua(h, f, d, y);
|
|
3718
|
+
return y ? (this.bitmap = D, this.nodes = $, this) : new ce(t, D, $);
|
|
3715
3719
|
};
|
|
3716
|
-
var
|
|
3720
|
+
var $e = function(t, e, r) {
|
|
3717
3721
|
this.ownerID = t, this.count = e, this.nodes = r;
|
|
3718
3722
|
};
|
|
3719
|
-
|
|
3723
|
+
$e.prototype.get = function(t, e, r, n) {
|
|
3720
3724
|
e === void 0 && (e = lt(r));
|
|
3721
3725
|
var o = (t === 0 ? e : e >>> t) & it, i = this.nodes[o];
|
|
3722
|
-
return i ? i.get(t +
|
|
3726
|
+
return i ? i.get(t + F, e, r, n) : n;
|
|
3723
3727
|
};
|
|
3724
|
-
|
|
3728
|
+
$e.prototype.update = function(t, e, r, n, o, i, s) {
|
|
3725
3729
|
r === void 0 && (r = lt(n));
|
|
3726
|
-
var a = (e === 0 ? r : r >>> e) & it, u = o ===
|
|
3730
|
+
var a = (e === 0 ? r : r >>> e) & it, u = o === x, c = this.nodes, l = c[a];
|
|
3727
3731
|
if (u && !l)
|
|
3728
3732
|
return this;
|
|
3729
3733
|
var f = Nn(
|
|
3730
3734
|
l,
|
|
3731
3735
|
t,
|
|
3732
|
-
e +
|
|
3736
|
+
e + F,
|
|
3733
3737
|
r,
|
|
3734
3738
|
n,
|
|
3735
3739
|
o,
|
|
@@ -3741,10 +3745,10 @@ Me.prototype.update = function(t, e, r, n, o, i, s) {
|
|
|
3741
3745
|
var h = this.count;
|
|
3742
3746
|
if (!l)
|
|
3743
3747
|
h++;
|
|
3744
|
-
else if (!f && (h--, h <
|
|
3745
|
-
return
|
|
3748
|
+
else if (!f && (h--, h < ha))
|
|
3749
|
+
return sa(t, c, h, a);
|
|
3746
3750
|
var p = t && t === this.ownerID, d = ui(c, a, f, p);
|
|
3747
|
-
return p ? (this.count = h, this.nodes = d, this) : new
|
|
3751
|
+
return p ? (this.count = h, this.nodes = d, this) : new $e(t, h, d);
|
|
3748
3752
|
};
|
|
3749
3753
|
var le = function(t, e, r) {
|
|
3750
3754
|
this.ownerID = t, this.keyHash = e, this.entries = r;
|
|
@@ -3757,51 +3761,51 @@ le.prototype.get = function(t, e, r, n) {
|
|
|
3757
3761
|
};
|
|
3758
3762
|
le.prototype.update = function(t, e, r, n, o, i, s) {
|
|
3759
3763
|
r === void 0 && (r = lt(n));
|
|
3760
|
-
var a = o ===
|
|
3764
|
+
var a = o === x;
|
|
3761
3765
|
if (r !== this.keyHash)
|
|
3762
|
-
return a ? this : (mt(s), mt(i),
|
|
3766
|
+
return a ? this : (mt(s), mt(i), Cn(this, t, e, r, [n, o]));
|
|
3763
3767
|
for (var u = this.entries, c = 0, l = u.length; c < l && !pt(n, u[c][0]); c++)
|
|
3764
3768
|
;
|
|
3765
3769
|
var f = c < l;
|
|
3766
3770
|
if (f ? u[c][1] === o : a)
|
|
3767
3771
|
return this;
|
|
3768
3772
|
if (mt(s), (a || !f) && mt(i), a && l === 2)
|
|
3769
|
-
return new
|
|
3773
|
+
return new jt(t, this.keyHash, u[c ^ 1]);
|
|
3770
3774
|
var h = t && t === this.ownerID, p = h ? u : kt(u);
|
|
3771
3775
|
return f ? a ? c === l - 1 ? p.pop() : p[c] = p.pop() : p[c] = [n, o] : p.push([n, o]), h ? (this.entries = p, this) : new le(t, this.keyHash, p);
|
|
3772
3776
|
};
|
|
3773
|
-
var
|
|
3777
|
+
var jt = function(t, e, r) {
|
|
3774
3778
|
this.ownerID = t, this.keyHash = e, this.entry = r;
|
|
3775
3779
|
};
|
|
3776
|
-
|
|
3780
|
+
jt.prototype.get = function(t, e, r, n) {
|
|
3777
3781
|
return pt(r, this.entry[0]) ? this.entry[1] : n;
|
|
3778
3782
|
};
|
|
3779
|
-
|
|
3780
|
-
var a = o ===
|
|
3783
|
+
jt.prototype.update = function(t, e, r, n, o, i, s) {
|
|
3784
|
+
var a = o === x, u = pt(n, this.entry[0]);
|
|
3781
3785
|
if (u ? o === this.entry[1] : a)
|
|
3782
3786
|
return this;
|
|
3783
3787
|
if (mt(s), a) {
|
|
3784
3788
|
mt(i);
|
|
3785
3789
|
return;
|
|
3786
3790
|
}
|
|
3787
|
-
return u ? t && t === this.ownerID ? (this.entry[1] = o, this) : new
|
|
3791
|
+
return u ? t && t === this.ownerID ? (this.entry[1] = o, this) : new jt(t, this.keyHash, [n, o]) : (mt(i), Cn(this, t, e, lt(n), [n, o]));
|
|
3788
3792
|
};
|
|
3789
|
-
|
|
3793
|
+
je.prototype.iterate = le.prototype.iterate = function(t, e) {
|
|
3790
3794
|
for (var r = this.entries, n = 0, o = r.length - 1; n <= o; n++)
|
|
3791
3795
|
if (t(r[e ? o - n : n]) === !1)
|
|
3792
3796
|
return !1;
|
|
3793
3797
|
};
|
|
3794
|
-
ce.prototype.iterate =
|
|
3798
|
+
ce.prototype.iterate = $e.prototype.iterate = function(t, e) {
|
|
3795
3799
|
for (var r = this.nodes, n = 0, o = r.length - 1; n <= o; n++) {
|
|
3796
3800
|
var i = r[e ? o - n : n];
|
|
3797
3801
|
if (i && i.iterate(t, e) === !1)
|
|
3798
3802
|
return !1;
|
|
3799
3803
|
}
|
|
3800
3804
|
};
|
|
3801
|
-
|
|
3805
|
+
jt.prototype.iterate = function(t, e) {
|
|
3802
3806
|
return t(this.entry);
|
|
3803
3807
|
};
|
|
3804
|
-
var
|
|
3808
|
+
var oa = /* @__PURE__ */ (function(t) {
|
|
3805
3809
|
function e(r, n, o) {
|
|
3806
3810
|
this._type = n, this._reverse = o, this._stack = r._root && io(r._root);
|
|
3807
3811
|
}
|
|
@@ -3830,7 +3834,7 @@ var na = /* @__PURE__ */ (function(t) {
|
|
|
3830
3834
|
}
|
|
3831
3835
|
return st();
|
|
3832
3836
|
}, e;
|
|
3833
|
-
})(
|
|
3837
|
+
})(M);
|
|
3834
3838
|
function Tr(t, e) {
|
|
3835
3839
|
return H(t, e[0], e[1]);
|
|
3836
3840
|
}
|
|
@@ -3864,11 +3868,11 @@ function ao(t, e, r) {
|
|
|
3864
3868
|
s
|
|
3865
3869
|
), !s.value)
|
|
3866
3870
|
return t;
|
|
3867
|
-
o = t.size + (i.value ? r ===
|
|
3871
|
+
o = t.size + (i.value ? r === x ? -1 : 1 : 0);
|
|
3868
3872
|
} else {
|
|
3869
|
-
if (r ===
|
|
3873
|
+
if (r === x)
|
|
3870
3874
|
return t;
|
|
3871
|
-
o = 1, n = new
|
|
3875
|
+
o = 1, n = new je(t.__ownerID, [[e, r]]);
|
|
3872
3876
|
}
|
|
3873
3877
|
return t.__ownerID ? (t.size = o, t._root = n, t.__hash = void 0, t.__altered = !0, t) : n ? Rn(o, n) : zt();
|
|
3874
3878
|
}
|
|
@@ -3881,36 +3885,36 @@ function Nn(t, e, r, n, o, i, s, a) {
|
|
|
3881
3885
|
i,
|
|
3882
3886
|
s,
|
|
3883
3887
|
a
|
|
3884
|
-
) : i ===
|
|
3888
|
+
) : i === x ? t : (mt(a), mt(s), new jt(e, n, [o, i]));
|
|
3885
3889
|
}
|
|
3886
3890
|
function uo(t) {
|
|
3887
|
-
return t.constructor ===
|
|
3891
|
+
return t.constructor === jt || t.constructor === le;
|
|
3888
3892
|
}
|
|
3889
|
-
function
|
|
3893
|
+
function Cn(t, e, r, n, o) {
|
|
3890
3894
|
if (t.keyHash === n)
|
|
3891
3895
|
return new le(e, n, [t.entry, o]);
|
|
3892
|
-
var i = (r === 0 ? t.keyHash : t.keyHash >>> r) & it, s = (r === 0 ? n : n >>> r) & it, a, u = i === s ? [
|
|
3896
|
+
var i = (r === 0 ? t.keyHash : t.keyHash >>> r) & it, s = (r === 0 ? n : n >>> r) & it, a, u = i === s ? [Cn(t, e, r + F, n, o)] : (a = new jt(e, n, o), i < s ? [t, a] : [a, t]);
|
|
3893
3897
|
return new ce(e, 1 << i | 1 << s, u);
|
|
3894
3898
|
}
|
|
3895
|
-
function
|
|
3899
|
+
function ia(t, e, r, n) {
|
|
3896
3900
|
t || (t = new fn());
|
|
3897
|
-
for (var o = new
|
|
3901
|
+
for (var o = new jt(t, lt(r), [r, n]), i = 0; i < e.length; i++) {
|
|
3898
3902
|
var s = e[i];
|
|
3899
3903
|
o = o.update(t, 0, void 0, s[0], s[1]);
|
|
3900
3904
|
}
|
|
3901
3905
|
return o;
|
|
3902
3906
|
}
|
|
3903
|
-
function
|
|
3907
|
+
function sa(t, e, r, n) {
|
|
3904
3908
|
for (var o = 0, i = 0, s = new Array(r), a = 0, u = 1, c = e.length; a < c; a++, u <<= 1) {
|
|
3905
3909
|
var l = e[a];
|
|
3906
3910
|
l !== void 0 && a !== n && (o |= u, s[i++] = l);
|
|
3907
3911
|
}
|
|
3908
3912
|
return new ce(t, o, s);
|
|
3909
3913
|
}
|
|
3910
|
-
function
|
|
3914
|
+
function aa(t, e, r, n, o) {
|
|
3911
3915
|
for (var i = 0, s = new Array(ht), a = 0; r !== 0; a++, r >>>= 1)
|
|
3912
3916
|
s[a] = r & 1 ? e[i++] : void 0;
|
|
3913
|
-
return s[n] = o, new
|
|
3917
|
+
return s[n] = o, new $e(t, i + 1, s);
|
|
3914
3918
|
}
|
|
3915
3919
|
function ai(t) {
|
|
3916
3920
|
return t -= t >> 1 & 1431655765, t = (t & 858993459) + (t >> 2 & 858993459), t = t + (t >> 4) & 252645135, t += t >> 8, t += t >> 16, t & 127;
|
|
@@ -3919,7 +3923,7 @@ function ui(t, e, r, n) {
|
|
|
3919
3923
|
var o = n ? t : kt(t);
|
|
3920
3924
|
return o[e] = r, o;
|
|
3921
3925
|
}
|
|
3922
|
-
function
|
|
3926
|
+
function ua(t, e, r, n) {
|
|
3923
3927
|
var o = t.length + 1;
|
|
3924
3928
|
if (n && e + 1 === o)
|
|
3925
3929
|
return t[e] = r, t;
|
|
@@ -3927,7 +3931,7 @@ function aa(t, e, r, n) {
|
|
|
3927
3931
|
a === e ? (i[a] = r, s = -1) : i[a] = t[a + s];
|
|
3928
3932
|
return i;
|
|
3929
3933
|
}
|
|
3930
|
-
function
|
|
3934
|
+
function ca(t, e, r) {
|
|
3931
3935
|
var n = t.length - 1;
|
|
3932
3936
|
if (r && e === n)
|
|
3933
3937
|
return t.pop(), t;
|
|
@@ -3935,22 +3939,22 @@ function ua(t, e, r) {
|
|
|
3935
3939
|
s === e && (i = 1), o[s] = t[s + i];
|
|
3936
3940
|
return o;
|
|
3937
3941
|
}
|
|
3938
|
-
var
|
|
3942
|
+
var la = ht / 4, fa = ht / 2, ha = ht / 4;
|
|
3939
3943
|
function ci(t) {
|
|
3940
|
-
if (
|
|
3944
|
+
if (Fo(t) && typeof t != "string")
|
|
3941
3945
|
return t;
|
|
3942
3946
|
if (At(t))
|
|
3943
3947
|
return t.toArray();
|
|
3944
3948
|
throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: " + t);
|
|
3945
3949
|
}
|
|
3946
|
-
function
|
|
3950
|
+
function Me(t) {
|
|
3947
3951
|
try {
|
|
3948
3952
|
return typeof t == "string" ? JSON.stringify(t) : String(t);
|
|
3949
3953
|
} catch {
|
|
3950
3954
|
return JSON.stringify(t);
|
|
3951
3955
|
}
|
|
3952
3956
|
}
|
|
3953
|
-
function
|
|
3957
|
+
function pa(t, e) {
|
|
3954
3958
|
return Rt(t) ? (
|
|
3955
3959
|
// @ts-expect-error key might be a number or symbol, which is not handled be Record key type
|
|
3956
3960
|
t.has(e)
|
|
@@ -3960,7 +3964,7 @@ function ha(t, e) {
|
|
|
3960
3964
|
);
|
|
3961
3965
|
}
|
|
3962
3966
|
function li(t, e, r) {
|
|
3963
|
-
return Rt(t) ? t.get(e, r) :
|
|
3967
|
+
return Rt(t) ? t.get(e, r) : pa(t, e) ? (
|
|
3964
3968
|
// @ts-expect-error weird "get" here,
|
|
3965
3969
|
typeof t.get == "function" ? (
|
|
3966
3970
|
// @ts-expect-error weird "get" here,
|
|
@@ -3971,7 +3975,7 @@ function li(t, e, r) {
|
|
|
3971
3975
|
)
|
|
3972
3976
|
) : r;
|
|
3973
3977
|
}
|
|
3974
|
-
function
|
|
3978
|
+
function da(t, e) {
|
|
3975
3979
|
if (!Vt(t))
|
|
3976
3980
|
throw new TypeError("Cannot update non-data-structure value: " + t);
|
|
3977
3981
|
if (Rt(t)) {
|
|
@@ -3984,7 +3988,7 @@ function pa(t, e) {
|
|
|
3984
3988
|
var r = pr(t);
|
|
3985
3989
|
return Array.isArray(r) ? r.splice(e, 1) : delete r[e], r;
|
|
3986
3990
|
}
|
|
3987
|
-
function
|
|
3991
|
+
function va(t, e, r) {
|
|
3988
3992
|
if (!Vt(t))
|
|
3989
3993
|
throw new TypeError("Cannot update non-data-structure value: " + t);
|
|
3990
3994
|
if (Rt(t)) {
|
|
@@ -4008,18 +4012,18 @@ function me(t, e, r, n) {
|
|
|
4008
4012
|
r,
|
|
4009
4013
|
n
|
|
4010
4014
|
);
|
|
4011
|
-
return o ===
|
|
4015
|
+
return o === x ? r : o;
|
|
4012
4016
|
}
|
|
4013
4017
|
function fi(t, e, r, n, o, i) {
|
|
4014
|
-
var s = e ===
|
|
4018
|
+
var s = e === x;
|
|
4015
4019
|
if (n === r.length) {
|
|
4016
4020
|
var a = s ? o : e, u = i(a);
|
|
4017
4021
|
return u === a ? e : u;
|
|
4018
4022
|
}
|
|
4019
4023
|
if (!s && !Vt(e))
|
|
4020
|
-
throw new TypeError("Cannot update within non-data-structure value in path [" + Array.from(r).slice(0, n).map(
|
|
4021
|
-
var c = r[n], l = s ?
|
|
4022
|
-
l ===
|
|
4024
|
+
throw new TypeError("Cannot update within non-data-structure value in path [" + Array.from(r).slice(0, n).map(Me) + "]: " + e);
|
|
4025
|
+
var c = r[n], l = s ? x : li(e, c, x), f = fi(
|
|
4026
|
+
l === x ? t : Rt(l),
|
|
4023
4027
|
// @ts-expect-error mixed type
|
|
4024
4028
|
l,
|
|
4025
4029
|
r,
|
|
@@ -4027,15 +4031,15 @@ function fi(t, e, r, n, o, i) {
|
|
|
4027
4031
|
o,
|
|
4028
4032
|
i
|
|
4029
4033
|
);
|
|
4030
|
-
return f === l ? e : f ===
|
|
4034
|
+
return f === l ? e : f === x ? da(e, c) : va(s ? t ? zt() : {} : e, c, f);
|
|
4031
4035
|
}
|
|
4032
|
-
function
|
|
4036
|
+
function ya(t, e) {
|
|
4033
4037
|
return me(t, e, function() {
|
|
4034
|
-
return
|
|
4038
|
+
return x;
|
|
4035
4039
|
});
|
|
4036
4040
|
}
|
|
4037
|
-
function
|
|
4038
|
-
return
|
|
4041
|
+
function xn(t) {
|
|
4042
|
+
return ya(this, t);
|
|
4039
4043
|
}
|
|
4040
4044
|
var hi = "@@__IMMUTABLE_LIST__@@";
|
|
4041
4045
|
function pi(t) {
|
|
@@ -4050,7 +4054,7 @@ var Er = /* @__PURE__ */ (function(t) {
|
|
|
4050
4054
|
if (pi(r))
|
|
4051
4055
|
return r;
|
|
4052
4056
|
var o = t(r), i = o.size;
|
|
4053
|
-
return i === 0 ? n : (ft(i), i > 0 && i < ht ?
|
|
4057
|
+
return i === 0 ? n : (ft(i), i > 0 && i < ht ? Te(0, i, F, null, new Tt(o.toArray())) : n.withMutations(function(s) {
|
|
4054
4058
|
s.setSize(i), o.forEach(function(a, u) {
|
|
4055
4059
|
return s.set(u, a);
|
|
4056
4060
|
});
|
|
@@ -4068,13 +4072,13 @@ var Er = /* @__PURE__ */ (function(t) {
|
|
|
4068
4072
|
}
|
|
4069
4073
|
return n;
|
|
4070
4074
|
}, e.prototype.set = function(r, n) {
|
|
4071
|
-
return
|
|
4075
|
+
return _a(this, r, n);
|
|
4072
4076
|
}, e.prototype.remove = function(r) {
|
|
4073
4077
|
return this.has(r) ? r === 0 ? this.shift() : r === this.size - 1 ? this.pop() : this.splice(r, 1) : this;
|
|
4074
4078
|
}, e.prototype.insert = function(r, n) {
|
|
4075
4079
|
return this.splice(r, 0, n);
|
|
4076
4080
|
}, e.prototype.clear = function() {
|
|
4077
|
-
return this.size === 0 ? this : this.__ownerID ? (this.size = this._origin = this._capacity = 0, this._level =
|
|
4081
|
+
return this.size === 0 ? this : this.__ownerID ? (this.size = this._origin = this._capacity = 0, this._level = F, this._root = this._tail = this.__hash = void 0, this.__altered = !0, this) : or();
|
|
4078
4082
|
}, e.prototype.push = function() {
|
|
4079
4083
|
var r = arguments, n = this.size;
|
|
4080
4084
|
return this.withMutations(function(o) {
|
|
@@ -4124,21 +4128,21 @@ var Er = /* @__PURE__ */ (function(t) {
|
|
|
4124
4128
|
var o = this.size;
|
|
4125
4129
|
return wr(r, n, o) ? this : Mt(
|
|
4126
4130
|
this,
|
|
4127
|
-
|
|
4131
|
+
Ue(r, o),
|
|
4128
4132
|
br(n, o)
|
|
4129
4133
|
);
|
|
4130
4134
|
}, e.prototype.__iterator = function(r, n) {
|
|
4131
4135
|
var o = n ? this.size : 0, i = co(this, n);
|
|
4132
|
-
return new
|
|
4136
|
+
return new M(function() {
|
|
4133
4137
|
var s = i();
|
|
4134
|
-
return s ===
|
|
4138
|
+
return s === Re ? st() : H(r, n ? --o : o++, s);
|
|
4135
4139
|
});
|
|
4136
4140
|
}, e.prototype.__iterate = function(r, n) {
|
|
4137
|
-
for (var o = n ? this.size : 0, i = co(this, n), s; (s = i()) !==
|
|
4141
|
+
for (var o = n ? this.size : 0, i = co(this, n), s; (s = i()) !== Re && r(s, n ? --o : o++, this) !== !1; )
|
|
4138
4142
|
;
|
|
4139
4143
|
return o;
|
|
4140
4144
|
}, e.prototype.__ensureOwner = function(r) {
|
|
4141
|
-
return r === this.__ownerID ? this : r ?
|
|
4145
|
+
return r === this.__ownerID ? this : r ? Te(
|
|
4142
4146
|
this._origin,
|
|
4143
4147
|
this._capacity,
|
|
4144
4148
|
this._level,
|
|
@@ -4155,15 +4159,15 @@ G[hi] = !0;
|
|
|
4155
4159
|
G[Fe] = G.remove;
|
|
4156
4160
|
G.merge = G.concat;
|
|
4157
4161
|
G.setIn = On;
|
|
4158
|
-
G.deleteIn = G.removeIn =
|
|
4162
|
+
G.deleteIn = G.removeIn = xn;
|
|
4159
4163
|
G.update = kn;
|
|
4160
4164
|
G.updateIn = Dn;
|
|
4161
4165
|
G.mergeIn = En;
|
|
4162
4166
|
G.mergeDeepIn = In;
|
|
4163
|
-
G.withMutations =
|
|
4167
|
+
G.withMutations = Ke;
|
|
4164
4168
|
G.wasAltered = zn;
|
|
4165
|
-
G.asImmutable =
|
|
4166
|
-
G["@@transducer/init"] = G.asMutable =
|
|
4169
|
+
G.asImmutable = Be;
|
|
4170
|
+
G["@@transducer/init"] = G.asMutable = We;
|
|
4167
4171
|
G["@@transducer/step"] = function(t, e) {
|
|
4168
4172
|
return t.push(e);
|
|
4169
4173
|
};
|
|
@@ -4174,7 +4178,7 @@ var Tt = function(t, e) {
|
|
|
4174
4178
|
this.array = t, this.ownerID = e;
|
|
4175
4179
|
};
|
|
4176
4180
|
Tt.prototype.removeBefore = function(t, e, r) {
|
|
4177
|
-
if ((r & (1 << e +
|
|
4181
|
+
if ((r & (1 << e + F) - 1) === 0 || this.array.length === 0)
|
|
4178
4182
|
return this;
|
|
4179
4183
|
var n = r >>> e & it;
|
|
4180
4184
|
if (n >= this.array.length)
|
|
@@ -4182,7 +4186,7 @@ Tt.prototype.removeBefore = function(t, e, r) {
|
|
|
4182
4186
|
var o = n === 0, i;
|
|
4183
4187
|
if (e > 0) {
|
|
4184
4188
|
var s = this.array[n];
|
|
4185
|
-
if (i = s && s.removeBefore(t, e -
|
|
4189
|
+
if (i = s && s.removeBefore(t, e - F, r), i === s && o)
|
|
4186
4190
|
return this;
|
|
4187
4191
|
}
|
|
4188
4192
|
if (o && !i)
|
|
@@ -4194,7 +4198,7 @@ Tt.prototype.removeBefore = function(t, e, r) {
|
|
|
4194
4198
|
return i && (a.array[n] = i), a;
|
|
4195
4199
|
};
|
|
4196
4200
|
Tt.prototype.removeAfter = function(t, e, r) {
|
|
4197
|
-
if (r === (e ? 1 << e +
|
|
4201
|
+
if (r === (e ? 1 << e + F : ht) || this.array.length === 0)
|
|
4198
4202
|
return this;
|
|
4199
4203
|
var n = r - 1 >>> e & it;
|
|
4200
4204
|
if (n >= this.array.length)
|
|
@@ -4202,15 +4206,15 @@ Tt.prototype.removeAfter = function(t, e, r) {
|
|
|
4202
4206
|
var o;
|
|
4203
4207
|
if (e > 0) {
|
|
4204
4208
|
var i = this.array[n];
|
|
4205
|
-
if (o = i && i.removeAfter(t, e -
|
|
4209
|
+
if (o = i && i.removeAfter(t, e - F, r), o === i && n === this.array.length - 1)
|
|
4206
4210
|
return this;
|
|
4207
4211
|
}
|
|
4208
4212
|
var s = fe(this, t);
|
|
4209
4213
|
return s.array.splice(n + 1), o && (s.array[n] = o), s;
|
|
4210
4214
|
};
|
|
4211
|
-
var
|
|
4215
|
+
var Re = {};
|
|
4212
4216
|
function co(t, e) {
|
|
4213
|
-
var r = t._origin, n = t._capacity, o =
|
|
4217
|
+
var r = t._origin, n = t._capacity, o = Pe(n), i = t._tail;
|
|
4214
4218
|
return s(t._root, t._level, 0);
|
|
4215
4219
|
function s(c, l, f) {
|
|
4216
4220
|
return l === 0 ? a(c, f) : u(c, l, f);
|
|
@@ -4219,41 +4223,41 @@ function co(t, e) {
|
|
|
4219
4223
|
var f = l === o ? i && i.array : c && c.array, h = l > r ? 0 : r - l, p = n - l;
|
|
4220
4224
|
return p > ht && (p = ht), function() {
|
|
4221
4225
|
if (h === p)
|
|
4222
|
-
return
|
|
4226
|
+
return Re;
|
|
4223
4227
|
var d = e ? --p : h++;
|
|
4224
4228
|
return f && f[d];
|
|
4225
4229
|
};
|
|
4226
4230
|
}
|
|
4227
4231
|
function u(c, l, f) {
|
|
4228
|
-
var h, p = c && c.array, d = f > r ? 0 : r - f >> l,
|
|
4229
|
-
return
|
|
4232
|
+
var h, p = c && c.array, d = f > r ? 0 : r - f >> l, y = (n - f >> l) + 1;
|
|
4233
|
+
return y > ht && (y = ht), function() {
|
|
4230
4234
|
for (; ; ) {
|
|
4231
4235
|
if (h) {
|
|
4232
4236
|
var D = h();
|
|
4233
|
-
if (D !==
|
|
4237
|
+
if (D !== Re)
|
|
4234
4238
|
return D;
|
|
4235
4239
|
h = null;
|
|
4236
4240
|
}
|
|
4237
|
-
if (d ===
|
|
4238
|
-
return
|
|
4239
|
-
var
|
|
4241
|
+
if (d === y)
|
|
4242
|
+
return Re;
|
|
4243
|
+
var $ = e ? --y : d++;
|
|
4240
4244
|
h = s(
|
|
4241
|
-
p && p[
|
|
4242
|
-
l -
|
|
4243
|
-
f + (
|
|
4245
|
+
p && p[$],
|
|
4246
|
+
l - F,
|
|
4247
|
+
f + ($ << l)
|
|
4244
4248
|
);
|
|
4245
4249
|
}
|
|
4246
4250
|
};
|
|
4247
4251
|
}
|
|
4248
4252
|
}
|
|
4249
|
-
function
|
|
4253
|
+
function Te(t, e, r, n, o, i, s) {
|
|
4250
4254
|
var a = Object.create(G);
|
|
4251
4255
|
return a.size = e - t, a._origin = t, a._capacity = e, a._level = r, a._root = n, a._tail = o, a.__ownerID = i, a.__hash = s, a.__altered = !1, a;
|
|
4252
4256
|
}
|
|
4253
4257
|
function or() {
|
|
4254
|
-
return
|
|
4258
|
+
return Te(0, 0, F);
|
|
4255
4259
|
}
|
|
4256
|
-
function
|
|
4260
|
+
function _a(t, e, r) {
|
|
4257
4261
|
if (e = Pt(t, e), e !== e)
|
|
4258
4262
|
return t;
|
|
4259
4263
|
if (e >= t.size || e < 0)
|
|
@@ -4262,14 +4266,14 @@ function ya(t, e, r) {
|
|
|
4262
4266
|
});
|
|
4263
4267
|
e += t._origin;
|
|
4264
4268
|
var n = t._tail, o = t._root, i = Zr();
|
|
4265
|
-
return e >=
|
|
4269
|
+
return e >= Pe(t._capacity) ? n = nn(n, t.__ownerID, 0, e, r, i) : o = nn(
|
|
4266
4270
|
o,
|
|
4267
4271
|
t.__ownerID,
|
|
4268
4272
|
t._level,
|
|
4269
4273
|
e,
|
|
4270
4274
|
r,
|
|
4271
4275
|
i
|
|
4272
|
-
), i.value ? t.__ownerID ? (t._root = o, t._tail = n, t.__hash = void 0, t.__altered = !0, t) :
|
|
4276
|
+
), i.value ? t.__ownerID ? (t._root = o, t._tail = n, t.__hash = void 0, t.__altered = !0, t) : Te(t._origin, t._capacity, t._level, o, n) : t;
|
|
4273
4277
|
}
|
|
4274
4278
|
function nn(t, e, r, n, o, i) {
|
|
4275
4279
|
var s = n >>> r & it, a = t && s < t.array.length;
|
|
@@ -4280,7 +4284,7 @@ function nn(t, e, r, n, o, i) {
|
|
|
4280
4284
|
var c = t && t.array[s], l = nn(
|
|
4281
4285
|
c,
|
|
4282
4286
|
e,
|
|
4283
|
-
r -
|
|
4287
|
+
r - F,
|
|
4284
4288
|
n,
|
|
4285
4289
|
o,
|
|
4286
4290
|
i
|
|
@@ -4293,11 +4297,11 @@ function fe(t, e) {
|
|
|
4293
4297
|
return e && t && e === t.ownerID ? t : new Tt(t ? t.array.slice() : [], e);
|
|
4294
4298
|
}
|
|
4295
4299
|
function di(t, e) {
|
|
4296
|
-
if (e >=
|
|
4300
|
+
if (e >= Pe(t._capacity))
|
|
4297
4301
|
return t._tail;
|
|
4298
|
-
if (e < 1 << t._level +
|
|
4302
|
+
if (e < 1 << t._level + F) {
|
|
4299
4303
|
for (var r = t._root, n = t._level; r && n > 0; )
|
|
4300
|
-
r = r.array[e >>> n & it], n -=
|
|
4304
|
+
r = r.array[e >>> n & it], n -= F;
|
|
4301
4305
|
return r;
|
|
4302
4306
|
}
|
|
4303
4307
|
}
|
|
@@ -4312,30 +4316,30 @@ function Mt(t, e, r) {
|
|
|
4312
4316
|
c = new Tt(
|
|
4313
4317
|
c && c.array.length ? [void 0, c] : [],
|
|
4314
4318
|
n
|
|
4315
|
-
), u +=
|
|
4319
|
+
), u += F, l += 1 << u;
|
|
4316
4320
|
l && (s += l, o += l, a += l, i += l);
|
|
4317
|
-
for (var f =
|
|
4321
|
+
for (var f = Pe(i), h = Pe(a); h >= 1 << u + F; )
|
|
4318
4322
|
c = new Tt(
|
|
4319
4323
|
c && c.array.length ? [c] : [],
|
|
4320
4324
|
n
|
|
4321
|
-
), u +=
|
|
4325
|
+
), u += F;
|
|
4322
4326
|
var p = t._tail, d = h < f ? di(t, a - 1) : h > f ? new Tt([], n) : p;
|
|
4323
4327
|
if (p && h > f && s < i && p.array.length) {
|
|
4324
4328
|
c = fe(c, n);
|
|
4325
|
-
for (var
|
|
4326
|
-
var
|
|
4327
|
-
|
|
4329
|
+
for (var y = c, D = u; D > F; D -= F) {
|
|
4330
|
+
var $ = f >>> D & it;
|
|
4331
|
+
y = y.array[$] = fe(y.array[$], n);
|
|
4328
4332
|
}
|
|
4329
|
-
|
|
4333
|
+
y.array[f >>> F & it] = p;
|
|
4330
4334
|
}
|
|
4331
4335
|
if (a < i && (d = d && d.removeAfter(n, 0, a)), s >= h)
|
|
4332
|
-
s -= h, a -= h, u =
|
|
4336
|
+
s -= h, a -= h, u = F, c = null, d = d && d.removeBefore(n, 0, s);
|
|
4333
4337
|
else if (s > o || h < f) {
|
|
4334
4338
|
for (l = 0; c; ) {
|
|
4335
4339
|
var tt = s >>> u & it;
|
|
4336
4340
|
if (tt !== h >>> u & it)
|
|
4337
4341
|
break;
|
|
4338
|
-
tt && (l += (1 << u) * tt), u -=
|
|
4342
|
+
tt && (l += (1 << u) * tt), u -= F, c = c.array[tt];
|
|
4339
4343
|
}
|
|
4340
4344
|
c && s > o && (c = c.removeBefore(n, u, s - l)), c && h < f && (c = c.removeAfter(
|
|
4341
4345
|
n,
|
|
@@ -4343,10 +4347,10 @@ function Mt(t, e, r) {
|
|
|
4343
4347
|
h - l
|
|
4344
4348
|
)), l && (s -= l, a -= l);
|
|
4345
4349
|
}
|
|
4346
|
-
return t.__ownerID ? (t.size = a - s, t._origin = s, t._capacity = a, t._level = u, t._root = c, t._tail = d, t.__hash = void 0, t.__altered = !0, t) :
|
|
4350
|
+
return t.__ownerID ? (t.size = a - s, t._origin = s, t._capacity = a, t._level = u, t._root = c, t._tail = d, t.__hash = void 0, t.__altered = !0, t) : Te(s, a, u, c, d);
|
|
4347
4351
|
}
|
|
4348
|
-
function
|
|
4349
|
-
return t < ht ? 0 : t - 1 >>>
|
|
4352
|
+
function Pe(t) {
|
|
4353
|
+
return t < ht ? 0 : t - 1 >>> F << F;
|
|
4350
4354
|
}
|
|
4351
4355
|
function vi(t) {
|
|
4352
4356
|
return An(t) && At(t);
|
|
@@ -4372,7 +4376,7 @@ var $t = /* @__PURE__ */ (function(t) {
|
|
|
4372
4376
|
}, e.prototype.set = function(r, n) {
|
|
4373
4377
|
return fo(this, r, n);
|
|
4374
4378
|
}, e.prototype.remove = function(r) {
|
|
4375
|
-
return fo(this, r,
|
|
4379
|
+
return fo(this, r, x);
|
|
4376
4380
|
}, e.prototype.__iterate = function(r, n) {
|
|
4377
4381
|
var o = this;
|
|
4378
4382
|
return this._list.__iterate(
|
|
@@ -4387,23 +4391,23 @@ var $t = /* @__PURE__ */ (function(t) {
|
|
|
4387
4391
|
if (r === this.__ownerID)
|
|
4388
4392
|
return this;
|
|
4389
4393
|
var n = this._map.__ensureOwner(r), o = this._list.__ensureOwner(r);
|
|
4390
|
-
return r ?
|
|
4394
|
+
return r ? jn(n, o, r, this.__hash) : this.size === 0 ? Ee() : (this.__ownerID = r, this.__altered = !1, this._map = n, this._list = o, this);
|
|
4391
4395
|
}, e;
|
|
4392
4396
|
})(ge);
|
|
4393
4397
|
$t.isOrderedMap = vi;
|
|
4394
4398
|
$t.prototype[qt] = !0;
|
|
4395
4399
|
$t.prototype[Fe] = $t.prototype.remove;
|
|
4396
|
-
function
|
|
4400
|
+
function jn(t, e, r, n) {
|
|
4397
4401
|
var o = Object.create($t.prototype);
|
|
4398
4402
|
return o.size = t ? t.size : 0, o._map = t, o._list = e, o.__ownerID = r, o.__hash = n, o.__altered = !1, o;
|
|
4399
4403
|
}
|
|
4400
4404
|
var lo;
|
|
4401
4405
|
function Ee() {
|
|
4402
|
-
return lo || (lo =
|
|
4406
|
+
return lo || (lo = jn(zt(), or()));
|
|
4403
4407
|
}
|
|
4404
4408
|
function fo(t, e, r) {
|
|
4405
4409
|
var n = t._map, o = t._list, i = n.get(e), s = i !== void 0, a, u;
|
|
4406
|
-
if (r ===
|
|
4410
|
+
if (r === x) {
|
|
4407
4411
|
if (!s)
|
|
4408
4412
|
return t;
|
|
4409
4413
|
o.size >= ht && o.size >= n.size * 2 ? (u = o.filter(function(c, l) {
|
|
@@ -4417,7 +4421,7 @@ function fo(t, e, r) {
|
|
|
4417
4421
|
a = n, u = o.set(i, [e, r]);
|
|
4418
4422
|
} else
|
|
4419
4423
|
a = n.set(e, o.size), u = o.set(o.size, [e, r]);
|
|
4420
|
-
return t.__ownerID ? (t.size = a.size, t._map = a, t._list = u, t.__hash = void 0, t.__altered = !0, t) :
|
|
4424
|
+
return t.__ownerID ? (t.size = a.size, t._map = a, t._list = u, t.__hash = void 0, t.__altered = !0, t) : jn(a, u);
|
|
4421
4425
|
}
|
|
4422
4426
|
var yi = "@@__IMMUTABLE_STACK__@@";
|
|
4423
4427
|
function on(t) {
|
|
@@ -4426,7 +4430,7 @@ function on(t) {
|
|
|
4426
4430
|
}
|
|
4427
4431
|
var $n = /* @__PURE__ */ (function(t) {
|
|
4428
4432
|
function e(r) {
|
|
4429
|
-
return r == null ?
|
|
4433
|
+
return r == null ? tr() : on(r) ? r : tr().pushAll(r);
|
|
4430
4434
|
}
|
|
4431
4435
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.of = function() {
|
|
4432
4436
|
return this(arguments);
|
|
@@ -4469,18 +4473,18 @@ var $n = /* @__PURE__ */ (function(t) {
|
|
|
4469
4473
|
}, e.prototype.pop = function() {
|
|
4470
4474
|
return this.slice(1);
|
|
4471
4475
|
}, e.prototype.clear = function() {
|
|
4472
|
-
return this.size === 0 ? this : this.__ownerID ? (this.size = 0, this._head = void 0, this.__hash = void 0, this.__altered = !0, this) :
|
|
4476
|
+
return this.size === 0 ? this : this.__ownerID ? (this.size = 0, this._head = void 0, this.__hash = void 0, this.__altered = !0, this) : tr();
|
|
4473
4477
|
}, e.prototype.slice = function(r, n) {
|
|
4474
4478
|
if (wr(r, n, this.size))
|
|
4475
4479
|
return this;
|
|
4476
|
-
var o =
|
|
4480
|
+
var o = Ue(r, this.size), i = br(n, this.size);
|
|
4477
4481
|
if (i !== this.size)
|
|
4478
4482
|
return t.prototype.slice.call(this, r, n);
|
|
4479
4483
|
for (var s = this.size - o, a = this._head; o--; )
|
|
4480
4484
|
a = a.next;
|
|
4481
4485
|
return this.__ownerID ? (this.size = s, this._head = a, this.__hash = void 0, this.__altered = !0, this) : Oe(s, a);
|
|
4482
4486
|
}, e.prototype.__ensureOwner = function(r) {
|
|
4483
|
-
return r === this.__ownerID ? this : r ? Oe(this.size, this._head, r, this.__hash) : this.size === 0 ?
|
|
4487
|
+
return r === this.__ownerID ? this : r ? Oe(this.size, this._head, r, this.__hash) : this.size === 0 ? tr() : (this.__ownerID = r, this.__altered = !1, this);
|
|
4484
4488
|
}, e.prototype.__iterate = function(r, n) {
|
|
4485
4489
|
var o = this;
|
|
4486
4490
|
if (n)
|
|
@@ -4497,7 +4501,7 @@ var $n = /* @__PURE__ */ (function(t) {
|
|
|
4497
4501
|
if (n)
|
|
4498
4502
|
return new ae(this.toArray()).__iterator(r, n);
|
|
4499
4503
|
var o = 0, i = this._head;
|
|
4500
|
-
return new
|
|
4504
|
+
return new M(function() {
|
|
4501
4505
|
if (i) {
|
|
4502
4506
|
var s = i.value;
|
|
4503
4507
|
return i = i.next, H(r, o++, s);
|
|
@@ -4512,10 +4516,10 @@ at[yi] = !0;
|
|
|
4512
4516
|
at.shift = at.pop;
|
|
4513
4517
|
at.unshift = at.push;
|
|
4514
4518
|
at.unshiftAll = at.pushAll;
|
|
4515
|
-
at.withMutations =
|
|
4519
|
+
at.withMutations = Ke;
|
|
4516
4520
|
at.wasAltered = zn;
|
|
4517
|
-
at.asImmutable =
|
|
4518
|
-
at["@@transducer/init"] = at.asMutable =
|
|
4521
|
+
at.asImmutable = Be;
|
|
4522
|
+
at["@@transducer/init"] = at.asMutable = We;
|
|
4519
4523
|
at["@@transducer/step"] = function(t, e) {
|
|
4520
4524
|
return t.unshift(e);
|
|
4521
4525
|
};
|
|
@@ -4527,7 +4531,7 @@ function Oe(t, e, r, n) {
|
|
|
4527
4531
|
return o.size = t, o._head = e, o.__ownerID = r, o.__hash = n, o.__altered = !1, o;
|
|
4528
4532
|
}
|
|
4529
4533
|
var ho;
|
|
4530
|
-
function
|
|
4534
|
+
function tr() {
|
|
4531
4535
|
return ho || (ho = Oe(0));
|
|
4532
4536
|
}
|
|
4533
4537
|
function po(t, e, r, n, o, i) {
|
|
@@ -4535,10 +4539,10 @@ function po(t, e, r, n, o, i) {
|
|
|
4535
4539
|
o ? (o = !1, r = s) : r = e.call(n, r, s, a, u);
|
|
4536
4540
|
}, i), r;
|
|
4537
4541
|
}
|
|
4538
|
-
function
|
|
4542
|
+
function ga(t, e) {
|
|
4539
4543
|
return e;
|
|
4540
4544
|
}
|
|
4541
|
-
function
|
|
4545
|
+
function ma(t, e) {
|
|
4542
4546
|
return [e, t];
|
|
4543
4547
|
}
|
|
4544
4548
|
function Pr(t) {
|
|
@@ -4593,10 +4597,10 @@ function _i(t, e) {
|
|
|
4593
4597
|
!t.has(u)
|
|
4594
4598
|
) : o ? (
|
|
4595
4599
|
// @ts-expect-error type of `get` does not "catch" the version with `notSetValue`
|
|
4596
|
-
!pt(u, t.get(c,
|
|
4600
|
+
!pt(u, t.get(c, x))
|
|
4597
4601
|
) : (
|
|
4598
4602
|
// @ts-expect-error type of `get` does not "catch" the version with `notSetValue`
|
|
4599
|
-
!pt(t.get(c,
|
|
4603
|
+
!pt(t.get(c, x), u)
|
|
4600
4604
|
))
|
|
4601
4605
|
return s = !1, !1;
|
|
4602
4606
|
})
|
|
@@ -4604,14 +4608,14 @@ function _i(t, e) {
|
|
|
4604
4608
|
return s && // @ts-expect-error size should exists on Collection
|
|
4605
4609
|
t.size === a;
|
|
4606
4610
|
}
|
|
4607
|
-
var
|
|
4611
|
+
var wa = /* @__PURE__ */ (function(t) {
|
|
4608
4612
|
function e(r, n, o) {
|
|
4609
4613
|
if (o === void 0 && (o = 1), !(this instanceof e))
|
|
4610
4614
|
return new e(r, n, o);
|
|
4611
|
-
if (
|
|
4615
|
+
if (Ae(o !== 0, "Cannot step a Range by 0"), Ae(
|
|
4612
4616
|
r !== void 0,
|
|
4613
4617
|
"You must define a start value when using Range"
|
|
4614
|
-
),
|
|
4618
|
+
), Ae(
|
|
4615
4619
|
n !== void 0,
|
|
4616
4620
|
"You must define an end value when using Range"
|
|
4617
4621
|
), o = Math.abs(o), n < r && (o = -o), this._start = r, this._end = n, this._step = o, this.size = Math.max(0, Math.ceil((n - r) / o - 1) + 1), this.size === 0) {
|
|
@@ -4628,7 +4632,7 @@ var ma = /* @__PURE__ */ (function(t) {
|
|
|
4628
4632
|
var n = (r - this._start) / this._step;
|
|
4629
4633
|
return n >= 0 && n < this.size && n === Math.floor(n);
|
|
4630
4634
|
}, e.prototype.slice = function(r, n) {
|
|
4631
|
-
return wr(r, n, this.size) ? this : (r =
|
|
4635
|
+
return wr(r, n, this.size) ? this : (r = Ue(r, this.size), n = br(n, this.size), n <= r ? new e(0, 0) : new e(
|
|
4632
4636
|
this.get(r, this._end),
|
|
4633
4637
|
this.get(n, this._end),
|
|
4634
4638
|
this._step
|
|
@@ -4649,7 +4653,7 @@ var ma = /* @__PURE__ */ (function(t) {
|
|
|
4649
4653
|
return a;
|
|
4650
4654
|
}, e.prototype.__iterator = function(r, n) {
|
|
4651
4655
|
var o = this.size, i = this._step, s = n ? this._start + (o - 1) * i : this._start, a = 0;
|
|
4652
|
-
return new
|
|
4656
|
+
return new M(function() {
|
|
4653
4657
|
if (a === o)
|
|
4654
4658
|
return st();
|
|
4655
4659
|
var u = s;
|
|
@@ -4685,13 +4689,13 @@ var Or = /* @__PURE__ */ (function(t) {
|
|
|
4685
4689
|
}, e.prototype.has = function(r) {
|
|
4686
4690
|
return this._map.has(r);
|
|
4687
4691
|
}, e.prototype.add = function(r) {
|
|
4688
|
-
return
|
|
4692
|
+
return er(this, this._map.set(r, r));
|
|
4689
4693
|
}, e.prototype.remove = function(r) {
|
|
4690
|
-
return
|
|
4694
|
+
return er(this, this._map.remove(r));
|
|
4691
4695
|
}, e.prototype.clear = function() {
|
|
4692
|
-
return
|
|
4696
|
+
return er(this, this._map.clear());
|
|
4693
4697
|
}, e.prototype.map = function(r, n) {
|
|
4694
|
-
var o = this, i = !1, s =
|
|
4698
|
+
var o = this, i = !1, s = er(
|
|
4695
4699
|
this,
|
|
4696
4700
|
this._map.mapEntries(function(a) {
|
|
4697
4701
|
var u = a[1], c = r.call(n, u, u, o);
|
|
@@ -4744,9 +4748,9 @@ var Or = /* @__PURE__ */ (function(t) {
|
|
|
4744
4748
|
});
|
|
4745
4749
|
});
|
|
4746
4750
|
}, e.prototype.sort = function(r) {
|
|
4747
|
-
return
|
|
4751
|
+
return qe(ue(this, r));
|
|
4748
4752
|
}, e.prototype.sortBy = function(r, n) {
|
|
4749
|
-
return
|
|
4753
|
+
return qe(ue(this, n, r));
|
|
4750
4754
|
}, e.prototype.wasAltered = function() {
|
|
4751
4755
|
return this._map.wasAltered();
|
|
4752
4756
|
}, e.prototype.__iterate = function(r, n) {
|
|
@@ -4768,9 +4772,9 @@ var Z = Or.prototype;
|
|
|
4768
4772
|
Z[gi] = !0;
|
|
4769
4773
|
Z[Fe] = Z.remove;
|
|
4770
4774
|
Z.merge = Z.concat = Z.union;
|
|
4771
|
-
Z.withMutations =
|
|
4772
|
-
Z.asImmutable =
|
|
4773
|
-
Z["@@transducer/init"] = Z.asMutable =
|
|
4775
|
+
Z.withMutations = Ke;
|
|
4776
|
+
Z.asImmutable = Be;
|
|
4777
|
+
Z["@@transducer/init"] = Z.asMutable = We;
|
|
4774
4778
|
Z["@@transducer/step"] = function(t, e) {
|
|
4775
4779
|
return t.add(e);
|
|
4776
4780
|
};
|
|
@@ -4779,7 +4783,7 @@ Z["@@transducer/result"] = function(t) {
|
|
|
4779
4783
|
};
|
|
4780
4784
|
Z.__empty = ke;
|
|
4781
4785
|
Z.__make = mi;
|
|
4782
|
-
function
|
|
4786
|
+
function er(t, e) {
|
|
4783
4787
|
return t.__ownerID ? (t.size = e.size, t._map = e, t) : e === t._map ? t : e.size === 0 ? t.__empty() : t.__make(e);
|
|
4784
4788
|
}
|
|
4785
4789
|
function mi(t, e) {
|
|
@@ -4792,18 +4796,18 @@ function ke() {
|
|
|
4792
4796
|
}
|
|
4793
4797
|
function wi(t, e, r) {
|
|
4794
4798
|
for (var n = ci(e), o = 0; o !== n.length; )
|
|
4795
|
-
if (t = li(t, n[o++],
|
|
4799
|
+
if (t = li(t, n[o++], x), t === x)
|
|
4796
4800
|
return r;
|
|
4797
4801
|
return t;
|
|
4798
4802
|
}
|
|
4799
4803
|
function bi(t, e) {
|
|
4800
4804
|
return wi(this, t, e);
|
|
4801
4805
|
}
|
|
4802
|
-
function
|
|
4803
|
-
return wi(t, e,
|
|
4806
|
+
function ba(t, e) {
|
|
4807
|
+
return wi(t, e, x) !== x;
|
|
4804
4808
|
}
|
|
4805
|
-
function
|
|
4806
|
-
return
|
|
4809
|
+
function Sa(t) {
|
|
4810
|
+
return ba(this, t);
|
|
4807
4811
|
}
|
|
4808
4812
|
function Si() {
|
|
4809
4813
|
ft(this.size);
|
|
@@ -4831,7 +4835,7 @@ function dr(t) {
|
|
|
4831
4835
|
r.push(dr(n));
|
|
4832
4836
|
}), r;
|
|
4833
4837
|
}
|
|
4834
|
-
function
|
|
4838
|
+
function Ia(t) {
|
|
4835
4839
|
if (t.size === 1 / 0)
|
|
4836
4840
|
return 0;
|
|
4837
4841
|
var e = At(t), r = K(t), n = e ? 1 : 0;
|
|
@@ -4843,9 +4847,9 @@ function Sa(t) {
|
|
|
4843
4847
|
n = 31 * n + lt(o) | 0;
|
|
4844
4848
|
} : function(o) {
|
|
4845
4849
|
n = n + lt(o) | 0;
|
|
4846
|
-
}),
|
|
4850
|
+
}), Ea(t.size, n);
|
|
4847
4851
|
}
|
|
4848
|
-
function
|
|
4852
|
+
function Ea(t, e) {
|
|
4849
4853
|
return e = Se(e, 3432918353), e = Se(e << 15 | e >>> -15, 461845907), e = Se(e << 13 | e >>> -13, 5), e = (e + 3864292196 | 0) ^ t, e = Se(e ^ e >>> 16, 2246822507), e = Se(e ^ e >>> 13, 3266489909), e = Sr(e ^ e >>> 16), e;
|
|
4850
4854
|
}
|
|
4851
4855
|
function go(t, e) {
|
|
@@ -4857,7 +4861,7 @@ function Gt(t, e) {
|
|
|
4857
4861
|
};
|
|
4858
4862
|
return Object.keys(e).forEach(r), Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(e).forEach(r), t;
|
|
4859
4863
|
}
|
|
4860
|
-
et.Iterator =
|
|
4864
|
+
et.Iterator = M;
|
|
4861
4865
|
Gt(et, {
|
|
4862
4866
|
// ### Conversion to other types
|
|
4863
4867
|
toArray: function() {
|
|
@@ -4884,7 +4888,7 @@ Gt(et, {
|
|
|
4884
4888
|
return $t(this.toKeyedSeq());
|
|
4885
4889
|
},
|
|
4886
4890
|
toOrderedSet: function() {
|
|
4887
|
-
return
|
|
4891
|
+
return qe(K(this) ? this.valueSeq() : this);
|
|
4888
4892
|
},
|
|
4889
4893
|
toSet: function() {
|
|
4890
4894
|
return Or(K(this) ? this.valueSeq() : this);
|
|
@@ -4911,7 +4915,7 @@ Gt(et, {
|
|
|
4911
4915
|
// ### ES6 Collection methods (ES6 Array and Map)
|
|
4912
4916
|
concat: function() {
|
|
4913
4917
|
for (var t = [], e = arguments.length; e--; ) t[e] = arguments[e];
|
|
4914
|
-
return L(this,
|
|
4918
|
+
return L(this, Qs(this, t));
|
|
4915
4919
|
},
|
|
4916
4920
|
includes: function(t) {
|
|
4917
4921
|
return this.some(function(e) {
|
|
@@ -4933,7 +4937,7 @@ Gt(et, {
|
|
|
4933
4937
|
return L(this, Qo(this, t, e, !0));
|
|
4934
4938
|
},
|
|
4935
4939
|
partition: function(t, e) {
|
|
4936
|
-
return
|
|
4940
|
+
return Hs(this, t, e);
|
|
4937
4941
|
},
|
|
4938
4942
|
find: function(t, e, r) {
|
|
4939
4943
|
var n = this.findEntry(t, e);
|
|
@@ -5010,7 +5014,7 @@ Gt(et, {
|
|
|
5010
5014
|
);
|
|
5011
5015
|
},
|
|
5012
5016
|
countBy: function(t, e) {
|
|
5013
|
-
return
|
|
5017
|
+
return Ws(this, t, e);
|
|
5014
5018
|
},
|
|
5015
5019
|
equals: function(t) {
|
|
5016
5020
|
return _i(this, t);
|
|
@@ -5019,7 +5023,7 @@ Gt(et, {
|
|
|
5019
5023
|
var t = this;
|
|
5020
5024
|
if (t._cache)
|
|
5021
5025
|
return new ae(t._cache);
|
|
5022
|
-
var e = t.toSeq().map(
|
|
5026
|
+
var e = t.toSeq().map(ma).toIndexedSeq();
|
|
5023
5027
|
return e.fromEntrySeq = function() {
|
|
5024
5028
|
return t.toSeq();
|
|
5025
5029
|
}, e;
|
|
@@ -5051,7 +5055,7 @@ Gt(et, {
|
|
|
5051
5055
|
return this.find(To, null, t);
|
|
5052
5056
|
},
|
|
5053
5057
|
flatMap: function(t, e) {
|
|
5054
|
-
return L(this,
|
|
5058
|
+
return L(this, Ys(this, t, e));
|
|
5055
5059
|
},
|
|
5056
5060
|
flatten: function(t) {
|
|
5057
5061
|
return L(this, Xo(this, t, !0));
|
|
@@ -5066,12 +5070,12 @@ Gt(et, {
|
|
|
5066
5070
|
},
|
|
5067
5071
|
getIn: bi,
|
|
5068
5072
|
groupBy: function(t, e) {
|
|
5069
|
-
return
|
|
5073
|
+
return Ks(this, t, e);
|
|
5070
5074
|
},
|
|
5071
5075
|
has: function(t) {
|
|
5072
|
-
return this.get(t,
|
|
5076
|
+
return this.get(t, x) !== x;
|
|
5073
5077
|
},
|
|
5074
|
-
hasIn:
|
|
5078
|
+
hasIn: Sa,
|
|
5075
5079
|
isSubset: function(t) {
|
|
5076
5080
|
return t = typeof t.includes == "function" ? t : et(t), this.every(function(e) {
|
|
5077
5081
|
return t.includes(e);
|
|
@@ -5086,7 +5090,7 @@ Gt(et, {
|
|
|
5086
5090
|
});
|
|
5087
5091
|
},
|
|
5088
5092
|
keySeq: function() {
|
|
5089
|
-
return this.toSeq().map(
|
|
5093
|
+
return this.toSeq().map(ga).toIndexedSeq();
|
|
5090
5094
|
},
|
|
5091
5095
|
last: function(t) {
|
|
5092
5096
|
return this.toSeq().reverse().first(t);
|
|
@@ -5095,19 +5099,19 @@ Gt(et, {
|
|
|
5095
5099
|
return this.toKeyedSeq().reverse().keyOf(t);
|
|
5096
5100
|
},
|
|
5097
5101
|
max: function(t) {
|
|
5098
|
-
return
|
|
5102
|
+
return Xe(this, t);
|
|
5099
5103
|
},
|
|
5100
5104
|
maxBy: function(t, e) {
|
|
5101
|
-
return
|
|
5105
|
+
return Xe(this, e, t);
|
|
5102
5106
|
},
|
|
5103
5107
|
min: function(t) {
|
|
5104
|
-
return
|
|
5108
|
+
return Xe(
|
|
5105
5109
|
this,
|
|
5106
5110
|
t ? vo(t) : yo
|
|
5107
5111
|
);
|
|
5108
5112
|
},
|
|
5109
5113
|
minBy: function(t, e) {
|
|
5110
|
-
return
|
|
5114
|
+
return Xe(
|
|
5111
5115
|
this,
|
|
5112
5116
|
e ? vo(e) : yo,
|
|
5113
5117
|
t
|
|
@@ -5138,7 +5142,7 @@ Gt(et, {
|
|
|
5138
5142
|
return this.slice(-Math.max(0, t));
|
|
5139
5143
|
},
|
|
5140
5144
|
takeWhile: function(t, e) {
|
|
5141
|
-
return L(this,
|
|
5145
|
+
return L(this, Js(this, t, e));
|
|
5142
5146
|
},
|
|
5143
5147
|
takeUntil: function(t, e) {
|
|
5144
5148
|
return this.takeWhile(Pr(t), e);
|
|
@@ -5151,17 +5155,17 @@ Gt(et, {
|
|
|
5151
5155
|
},
|
|
5152
5156
|
// ### Hashable Object
|
|
5153
5157
|
hashCode: function() {
|
|
5154
|
-
return this.__hash || (this.__hash =
|
|
5158
|
+
return this.__hash || (this.__hash = Ia(this));
|
|
5155
5159
|
}
|
|
5156
5160
|
// ### Internal
|
|
5157
5161
|
// abstract __iterate(fn, reverse)
|
|
5158
5162
|
// abstract __iterator(type, reverse)
|
|
5159
5163
|
});
|
|
5160
5164
|
var nt = et.prototype;
|
|
5161
|
-
nt[
|
|
5165
|
+
nt[jo] = !0;
|
|
5162
5166
|
nt[gr] = nt.values;
|
|
5163
5167
|
nt.toJSON = nt.toArray;
|
|
5164
|
-
nt.__toStringMapper =
|
|
5168
|
+
nt.__toStringMapper = Me;
|
|
5165
5169
|
nt.inspect = nt.toSource = function() {
|
|
5166
5170
|
return this.toString();
|
|
5167
5171
|
};
|
|
@@ -5191,12 +5195,12 @@ Gt(St, {
|
|
|
5191
5195
|
);
|
|
5192
5196
|
}
|
|
5193
5197
|
});
|
|
5194
|
-
var
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
return
|
|
5198
|
+
var He = St.prototype;
|
|
5199
|
+
He[hr] = !0;
|
|
5200
|
+
He[gr] = nt.entries;
|
|
5201
|
+
He.toJSON = Si;
|
|
5202
|
+
He.__toStringMapper = function(t, e) {
|
|
5203
|
+
return Me(e) + ": " + Me(t);
|
|
5200
5204
|
};
|
|
5201
5205
|
Gt(Ht, {
|
|
5202
5206
|
// ### Conversion to other types
|
|
@@ -5229,7 +5233,7 @@ Gt(Ht, {
|
|
|
5229
5233
|
var r = arguments.length;
|
|
5230
5234
|
if (e = Math.max(e || 0, 0), r === 0 || r === 2 && !e)
|
|
5231
5235
|
return this;
|
|
5232
|
-
t =
|
|
5236
|
+
t = Ue(t, t < 0 ? this.count() : this.size);
|
|
5233
5237
|
var n = this.slice(0, t);
|
|
5234
5238
|
return L(
|
|
5235
5239
|
this,
|
|
@@ -5256,14 +5260,14 @@ Gt(Ht, {
|
|
|
5256
5260
|
return t = Pt(this, t), t >= 0 && (this.size !== void 0 ? this.size === 1 / 0 || t < this.size : this.indexOf(t) !== -1);
|
|
5257
5261
|
},
|
|
5258
5262
|
interpose: function(t) {
|
|
5259
|
-
return L(this,
|
|
5263
|
+
return L(this, Xs(this, t));
|
|
5260
5264
|
},
|
|
5261
5265
|
interleave: function() {
|
|
5262
|
-
var t = [this].concat(kt(arguments)), e =
|
|
5266
|
+
var t = [this].concat(kt(arguments)), e = Ze(this.toSeq(), Et.of, t), r = e.flatten(!0);
|
|
5263
5267
|
return e.size && (r.size = e.size * t.length), L(this, r);
|
|
5264
5268
|
},
|
|
5265
5269
|
keySeq: function() {
|
|
5266
|
-
return
|
|
5270
|
+
return wa(0, this.size);
|
|
5267
5271
|
},
|
|
5268
5272
|
last: function(t) {
|
|
5269
5273
|
return this.get(-1, t);
|
|
@@ -5273,15 +5277,15 @@ Gt(Ht, {
|
|
|
5273
5277
|
},
|
|
5274
5278
|
zip: function() {
|
|
5275
5279
|
var t = [this].concat(kt(arguments));
|
|
5276
|
-
return L(this,
|
|
5280
|
+
return L(this, Ze(this, mo, t));
|
|
5277
5281
|
},
|
|
5278
5282
|
zipAll: function() {
|
|
5279
5283
|
var t = [this].concat(kt(arguments));
|
|
5280
|
-
return L(this,
|
|
5284
|
+
return L(this, Ze(this, mo, t, !0));
|
|
5281
5285
|
},
|
|
5282
5286
|
zipWith: function(t) {
|
|
5283
5287
|
var e = kt(arguments);
|
|
5284
|
-
return e[0] = this, L(this,
|
|
5288
|
+
return e[0] = this, L(this, Ze(this, t, e));
|
|
5285
5289
|
}
|
|
5286
5290
|
});
|
|
5287
5291
|
var we = Ht.prototype;
|
|
@@ -5304,7 +5308,7 @@ var he = de.prototype;
|
|
|
5304
5308
|
he.has = nt.includes;
|
|
5305
5309
|
he.contains = he.includes;
|
|
5306
5310
|
he.keys = he.values;
|
|
5307
|
-
Gt(Lt,
|
|
5311
|
+
Gt(Lt, He);
|
|
5308
5312
|
Gt(Et, we);
|
|
5309
5313
|
Gt(_e, he);
|
|
5310
5314
|
function mo() {
|
|
@@ -5313,7 +5317,7 @@ function mo() {
|
|
|
5313
5317
|
function Ii(t) {
|
|
5314
5318
|
return Mn(t) && At(t);
|
|
5315
5319
|
}
|
|
5316
|
-
var
|
|
5320
|
+
var qe = /* @__PURE__ */ (function(t) {
|
|
5317
5321
|
function e(r) {
|
|
5318
5322
|
return r == null ? sn() : Ii(r) ? r : sn().withMutations(function(n) {
|
|
5319
5323
|
var o = de(r);
|
|
@@ -5330,8 +5334,8 @@ var Ve = /* @__PURE__ */ (function(t) {
|
|
|
5330
5334
|
return this.__toString("OrderedSet {", "}");
|
|
5331
5335
|
}, e;
|
|
5332
5336
|
})(Or);
|
|
5333
|
-
|
|
5334
|
-
var Qt =
|
|
5337
|
+
qe.isOrderedSet = Ii;
|
|
5338
|
+
var Qt = qe.prototype;
|
|
5335
5339
|
Qt[qt] = !0;
|
|
5336
5340
|
Qt.zip = we.zip;
|
|
5337
5341
|
Qt.zipWith = we.zipWith;
|
|
@@ -5346,7 +5350,7 @@ var wo;
|
|
|
5346
5350
|
function sn() {
|
|
5347
5351
|
return wo || (wo = Ei(Ee()));
|
|
5348
5352
|
}
|
|
5349
|
-
function
|
|
5353
|
+
function Oa(t) {
|
|
5350
5354
|
if (Jt(t))
|
|
5351
5355
|
throw new Error(
|
|
5352
5356
|
"Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead."
|
|
@@ -5362,7 +5366,7 @@ function Ea(t) {
|
|
|
5362
5366
|
}
|
|
5363
5367
|
var X = function(t, e) {
|
|
5364
5368
|
var r;
|
|
5365
|
-
|
|
5369
|
+
Oa(t);
|
|
5366
5370
|
var n = function(i) {
|
|
5367
5371
|
var s = this;
|
|
5368
5372
|
if (i instanceof n)
|
|
@@ -5377,7 +5381,7 @@ var X = function(t, e) {
|
|
|
5377
5381
|
var l = a[c];
|
|
5378
5382
|
u[l] = c, o[l] ? typeof console == "object" && console.warn && console.warn(
|
|
5379
5383
|
"Cannot define " + Pn(this) + ' with property "' + l + '" since that property name is part of the Record API.'
|
|
5380
|
-
) :
|
|
5384
|
+
) : ka(o, l);
|
|
5381
5385
|
}
|
|
5382
5386
|
}
|
|
5383
5387
|
return this.__ownerID = void 0, this._values = Er().withMutations(function(f) {
|
|
@@ -5390,7 +5394,7 @@ var X = function(t, e) {
|
|
|
5390
5394
|
};
|
|
5391
5395
|
X.prototype.toString = function() {
|
|
5392
5396
|
for (var t = Pn(this) + " { ", e = this._keys, r, n = 0, o = e.length; n !== o; n++)
|
|
5393
|
-
r = e[n], t += (n ? ", " : "") + r + ": " +
|
|
5397
|
+
r = e[n], t += (n ? ", " : "") + r + ": " + Me(this.get(r));
|
|
5394
5398
|
return t + " }";
|
|
5395
5399
|
};
|
|
5396
5400
|
X.prototype.equals = function(t) {
|
|
@@ -5455,7 +5459,7 @@ X.getDescriptiveName = Pn;
|
|
|
5455
5459
|
var B = X.prototype;
|
|
5456
5460
|
B[Vo] = !0;
|
|
5457
5461
|
B[Fe] = B.remove;
|
|
5458
|
-
B.deleteIn = B.removeIn =
|
|
5462
|
+
B.deleteIn = B.removeIn = xn;
|
|
5459
5463
|
B.getIn = bi;
|
|
5460
5464
|
B.hasIn = nt.hasIn;
|
|
5461
5465
|
B.merge = ei;
|
|
@@ -5467,9 +5471,9 @@ B.mergeDeepIn = In;
|
|
|
5467
5471
|
B.setIn = On;
|
|
5468
5472
|
B.update = kn;
|
|
5469
5473
|
B.updateIn = Dn;
|
|
5470
|
-
B.withMutations =
|
|
5471
|
-
B.asMutable =
|
|
5472
|
-
B.asImmutable =
|
|
5474
|
+
B.withMutations = Ke;
|
|
5475
|
+
B.asMutable = We;
|
|
5476
|
+
B.asImmutable = Be;
|
|
5473
5477
|
B[gr] = B.entries;
|
|
5474
5478
|
B.toJSON = B.toObject = nt.toObject;
|
|
5475
5479
|
B.inspect = B.toSource = function() {
|
|
@@ -5487,42 +5491,42 @@ function pe(t) {
|
|
|
5487
5491
|
return [e, t.get(e)];
|
|
5488
5492
|
}));
|
|
5489
5493
|
}
|
|
5490
|
-
function
|
|
5494
|
+
function ka(t, e) {
|
|
5491
5495
|
try {
|
|
5492
5496
|
Object.defineProperty(t, e, {
|
|
5493
5497
|
get: function() {
|
|
5494
5498
|
return this.get(e);
|
|
5495
5499
|
},
|
|
5496
5500
|
set: function(r) {
|
|
5497
|
-
|
|
5501
|
+
Ae(this.__ownerID, "Cannot set on an immutable record."), this.set(e, r);
|
|
5498
5502
|
}
|
|
5499
5503
|
});
|
|
5500
5504
|
} catch {
|
|
5501
5505
|
}
|
|
5502
5506
|
}
|
|
5503
5507
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
5504
|
-
function
|
|
5508
|
+
function Da(t, e) {
|
|
5505
5509
|
return an() ? (un(t, e), !0) : !1;
|
|
5506
5510
|
}
|
|
5507
5511
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
5508
|
-
const
|
|
5512
|
+
const za = () => {
|
|
5509
5513
|
};
|
|
5510
|
-
function
|
|
5514
|
+
function Aa(...t) {
|
|
5511
5515
|
if (t.length !== 1) return Wt(...t);
|
|
5512
5516
|
const e = t[0];
|
|
5513
5517
|
return typeof e == "function" ? _r(cn(() => ({
|
|
5514
5518
|
get: e,
|
|
5515
|
-
set:
|
|
5519
|
+
set: za
|
|
5516
5520
|
}))) : N(e);
|
|
5517
5521
|
}
|
|
5518
5522
|
function Vr(t) {
|
|
5519
5523
|
return typeof Window < "u" && t instanceof Window ? t.document.documentElement : typeof Document < "u" && t instanceof Document ? t.documentElement : t;
|
|
5520
5524
|
}
|
|
5521
5525
|
const Lr = /* @__PURE__ */ new WeakMap();
|
|
5522
|
-
function
|
|
5523
|
-
const r =
|
|
5526
|
+
function Ra(t, e = !1) {
|
|
5527
|
+
const r = Le(e);
|
|
5524
5528
|
let n = "";
|
|
5525
|
-
rt(
|
|
5529
|
+
rt(Aa(t), (s) => {
|
|
5526
5530
|
const a = Vr(wt(s));
|
|
5527
5531
|
if (a) {
|
|
5528
5532
|
const u = a;
|
|
@@ -5537,7 +5541,7 @@ function Aa(t, e = !1) {
|
|
|
5537
5541
|
const s = Vr(wt(t));
|
|
5538
5542
|
!s || !r.value || (s.style.overflow = n, Lr.delete(s), r.value = !1);
|
|
5539
5543
|
};
|
|
5540
|
-
return
|
|
5544
|
+
return Da(i), C({
|
|
5541
5545
|
get() {
|
|
5542
5546
|
return r.value;
|
|
5543
5547
|
},
|
|
@@ -5546,18 +5550,18 @@ function Aa(t, e = !1) {
|
|
|
5546
5550
|
}
|
|
5547
5551
|
});
|
|
5548
5552
|
}
|
|
5549
|
-
function
|
|
5553
|
+
function Na() {
|
|
5550
5554
|
let t = !1;
|
|
5551
|
-
const e =
|
|
5555
|
+
const e = Le(!1);
|
|
5552
5556
|
return (r, n) => {
|
|
5553
5557
|
if (e.value = n.value, t) return;
|
|
5554
5558
|
t = !0;
|
|
5555
|
-
const o =
|
|
5559
|
+
const o = Ra(r, n.value);
|
|
5556
5560
|
rt(e, (i) => o.value = i);
|
|
5557
5561
|
};
|
|
5558
5562
|
}
|
|
5559
|
-
|
|
5560
|
-
const
|
|
5563
|
+
Na();
|
|
5564
|
+
const Ca = (t, e) => {
|
|
5561
5565
|
const r = t.__vccOpts || t;
|
|
5562
5566
|
for (const [n, o] of e)
|
|
5563
5567
|
r[n] = o;
|
|
@@ -5569,7 +5573,7 @@ function xa(t, e) {
|
|
|
5569
5573
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
5570
5574
|
const ja = () => {
|
|
5571
5575
|
};
|
|
5572
|
-
function
|
|
5576
|
+
function $a(...t) {
|
|
5573
5577
|
if (t.length !== 1) return Wt(...t);
|
|
5574
5578
|
const e = t[0];
|
|
5575
5579
|
return typeof e == "function" ? _r(cn(() => ({
|
|
@@ -5577,29 +5581,29 @@ function Ca(...t) {
|
|
|
5577
5581
|
set: ja
|
|
5578
5582
|
}))) : N(e);
|
|
5579
5583
|
}
|
|
5580
|
-
function
|
|
5584
|
+
function Fr(t) {
|
|
5581
5585
|
return typeof Window < "u" && t instanceof Window ? t.document.documentElement : typeof Document < "u" && t instanceof Document ? t.documentElement : t;
|
|
5582
5586
|
}
|
|
5583
|
-
const
|
|
5584
|
-
function
|
|
5585
|
-
const r =
|
|
5587
|
+
const Ur = /* @__PURE__ */ new WeakMap();
|
|
5588
|
+
function Ma(t, e = !1) {
|
|
5589
|
+
const r = Le(e);
|
|
5586
5590
|
let n = "";
|
|
5587
|
-
rt(
|
|
5588
|
-
const a =
|
|
5591
|
+
rt($a(t), (s) => {
|
|
5592
|
+
const a = Fr(wt(s));
|
|
5589
5593
|
if (a) {
|
|
5590
5594
|
const u = a;
|
|
5591
|
-
if (
|
|
5595
|
+
if (Ur.get(u) || Ur.set(u, u.style.overflow), u.style.overflow !== "hidden" && (n = u.style.overflow), u.style.overflow === "hidden") return r.value = !0;
|
|
5592
5596
|
if (r.value) return u.style.overflow = "hidden";
|
|
5593
5597
|
}
|
|
5594
5598
|
}, { immediate: !0 });
|
|
5595
5599
|
const o = () => {
|
|
5596
|
-
const s =
|
|
5600
|
+
const s = Fr(wt(t));
|
|
5597
5601
|
!s || r.value || (s.style.overflow = "hidden", r.value = !0);
|
|
5598
5602
|
}, i = () => {
|
|
5599
|
-
const s =
|
|
5600
|
-
!s || !r.value || (s.style.overflow = n,
|
|
5603
|
+
const s = Fr(wt(t));
|
|
5604
|
+
!s || !r.value || (s.style.overflow = n, Ur.delete(s), r.value = !1);
|
|
5601
5605
|
};
|
|
5602
|
-
return xa(i),
|
|
5606
|
+
return xa(i), C({
|
|
5603
5607
|
get() {
|
|
5604
5608
|
return r.value;
|
|
5605
5609
|
},
|
|
@@ -5608,25 +5612,25 @@ function $a(t, e = !1) {
|
|
|
5608
5612
|
}
|
|
5609
5613
|
});
|
|
5610
5614
|
}
|
|
5611
|
-
function
|
|
5615
|
+
function Ta() {
|
|
5612
5616
|
let t = !1;
|
|
5613
|
-
const e =
|
|
5617
|
+
const e = Le(!1);
|
|
5614
5618
|
return (r, n) => {
|
|
5615
5619
|
if (e.value = n.value, t) return;
|
|
5616
5620
|
t = !0;
|
|
5617
|
-
const o =
|
|
5621
|
+
const o = Ma(r, n.value);
|
|
5618
5622
|
rt(e, (i) => o.value = i);
|
|
5619
5623
|
};
|
|
5620
5624
|
}
|
|
5621
|
-
|
|
5625
|
+
Ta();
|
|
5622
5626
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
5623
|
-
const
|
|
5627
|
+
const Pa = { class: "aform" }, qa = {
|
|
5624
5628
|
key: 0,
|
|
5625
5629
|
class: "aform-nested-section"
|
|
5626
|
-
},
|
|
5630
|
+
}, Va = {
|
|
5627
5631
|
key: 0,
|
|
5628
5632
|
class: "aform-nested-label"
|
|
5629
|
-
},
|
|
5633
|
+
}, La = /* @__PURE__ */ Ve({
|
|
5630
5634
|
__name: "AForm",
|
|
5631
5635
|
props: /* @__PURE__ */ Ln({
|
|
5632
5636
|
schema: {},
|
|
@@ -5637,74 +5641,78 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5637
5641
|
}),
|
|
5638
5642
|
emits: /* @__PURE__ */ Ln(["update:schema", "update:data"], ["update:data"]),
|
|
5639
5643
|
setup(t, { emit: e }) {
|
|
5640
|
-
const r = e, n =
|
|
5644
|
+
const r = e, n = Ci(t, "data"), o = (p) => "schema" in p && Array.isArray(p.schema) && p.schema.length > 0 && (!("kind" in p) || p.kind !== "table"), i = N({});
|
|
5641
5645
|
rt(
|
|
5642
5646
|
() => n.value,
|
|
5643
|
-
(
|
|
5644
|
-
!t.schema || !
|
|
5645
|
-
o(
|
|
5647
|
+
(p) => {
|
|
5648
|
+
!t.schema || !p || t.schema.forEach((d) => {
|
|
5649
|
+
o(d) && (i.value[d.fieldname] = p[d.fieldname] ?? {});
|
|
5646
5650
|
});
|
|
5647
5651
|
},
|
|
5648
5652
|
{ immediate: !0 }
|
|
5649
5653
|
);
|
|
5650
|
-
const s = (
|
|
5651
|
-
i.value[
|
|
5652
|
-
}, a = (
|
|
5653
|
-
const
|
|
5654
|
-
for (const [
|
|
5655
|
-
["component", "fieldtype", "hidden", "mode"].includes(
|
|
5656
|
-
if ("columns" in
|
|
5657
|
-
const
|
|
5658
|
-
(!
|
|
5654
|
+
const s = (p, d) => {
|
|
5655
|
+
i.value[p] = d, n.value && (n.value[p] = d, r("update:data", { ...n.value }));
|
|
5656
|
+
}, a = (p) => {
|
|
5657
|
+
const d = {};
|
|
5658
|
+
for (const [y, D] of Object.entries(p))
|
|
5659
|
+
["component", "fieldtype", "hidden", "mode", "width"].includes(y) || (d[y] = D);
|
|
5660
|
+
if ("columns" in p || "kind" in p && p.kind === "table") {
|
|
5661
|
+
const y = p.rows;
|
|
5662
|
+
(!y || Array.isArray(y) && y.length === 0) && (d.rows = n.value[p.fieldname] || []);
|
|
5659
5663
|
}
|
|
5660
|
-
return
|
|
5661
|
-
}, u =
|
|
5662
|
-
|
|
5663
|
-
return
|
|
5664
|
+
return d;
|
|
5665
|
+
}, u = (p) => {
|
|
5666
|
+
const d = p.width;
|
|
5667
|
+
return d ? { flexBasis: d, width: d } : {};
|
|
5668
|
+
}, c = C(() => t.mode ?? "edit");
|
|
5669
|
+
function l(p) {
|
|
5670
|
+
return p.mode || c.value;
|
|
5664
5671
|
}
|
|
5665
|
-
const
|
|
5666
|
-
|
|
5667
|
-
t.schema &&
|
|
5672
|
+
const f = N([]);
|
|
5673
|
+
xi(() => {
|
|
5674
|
+
t.schema && f.value.length !== t.schema.length && (f.value = t.schema.map((p, d) => C({
|
|
5668
5675
|
get() {
|
|
5669
|
-
return n.value?.[t.schema[
|
|
5676
|
+
return n.value?.[t.schema[d].fieldname];
|
|
5670
5677
|
},
|
|
5671
|
-
set: (
|
|
5672
|
-
const
|
|
5673
|
-
|
|
5678
|
+
set: (y) => {
|
|
5679
|
+
const D = t.schema[d].fieldname;
|
|
5680
|
+
D && n.value && (n.value[D] = y, r("update:data", { ...n.value })), r("update:schema", t.schema);
|
|
5674
5681
|
}
|
|
5675
5682
|
})));
|
|
5676
5683
|
});
|
|
5677
|
-
const
|
|
5678
|
-
return (
|
|
5679
|
-
(
|
|
5680
|
-
o(
|
|
5681
|
-
|
|
5682
|
-
(
|
|
5683
|
-
data: i.value[
|
|
5684
|
-
mode:
|
|
5685
|
-
schema:
|
|
5686
|
-
label:
|
|
5687
|
-
collapsible:
|
|
5688
|
-
"onUpdate:data": (
|
|
5684
|
+
const h = C(() => f.value);
|
|
5685
|
+
return (p, d) => (P(), U("form", Pa, [
|
|
5686
|
+
(P(!0), U(ne, null, Ne(t.schema, (y, D) => (P(), U(ne, { key: D }, [
|
|
5687
|
+
o(y) ? (P(), U("div", qa, [
|
|
5688
|
+
y.label && !("collapsible" in y) ? (P(), U("h4", Va, Dt(y.label), 1)) : Bt("", !0),
|
|
5689
|
+
(P(), sr(Vn(y.component ?? "AForm"), {
|
|
5690
|
+
data: i.value[y.fieldname],
|
|
5691
|
+
mode: l(y),
|
|
5692
|
+
schema: y.schema,
|
|
5693
|
+
label: y.label,
|
|
5694
|
+
collapsible: y.collapsible,
|
|
5695
|
+
"onUpdate:data": ($) => s(y.fieldname, $)
|
|
5689
5696
|
}, null, 40, ["data", "mode", "schema", "label", "collapsible", "onUpdate:data"]))
|
|
5690
|
-
])) :
|
|
5697
|
+
])) : y.hidden ? Bt("", !0) : (P(), sr(Vn(y.component), ji({
|
|
5691
5698
|
key: 1,
|
|
5692
|
-
modelValue:
|
|
5693
|
-
"onUpdate:modelValue": (
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5699
|
+
modelValue: h.value[D].value,
|
|
5700
|
+
"onUpdate:modelValue": ($) => h.value[D].value = $,
|
|
5701
|
+
style: u(y),
|
|
5702
|
+
schema: y,
|
|
5703
|
+
data: n.value[y.fieldname],
|
|
5704
|
+
mode: l(y)
|
|
5705
|
+
}, { ref_for: !0 }, a(y)), null, 16, ["modelValue", "onUpdate:modelValue", "style", "schema", "data", "mode"]))
|
|
5698
5706
|
], 64))), 128))
|
|
5699
5707
|
]));
|
|
5700
5708
|
}
|
|
5701
|
-
}),
|
|
5709
|
+
}), Fa = /* @__PURE__ */ Ca(La, [["__scopeId", "data-v-70086a8f"]]), Ua = { class: "tabs" }, Ba = { tabindex: "0" }, Wa = { tabindex: "0" }, Ka = /* @__PURE__ */ Ve({
|
|
5702
5710
|
__name: "SheetNav",
|
|
5703
5711
|
props: {
|
|
5704
5712
|
breadcrumbs: { default: () => [] }
|
|
5705
5713
|
},
|
|
5706
5714
|
setup(t) {
|
|
5707
|
-
const e = N(!0), r = N(!1), n = N(""), o = bo("searchinput"), i =
|
|
5715
|
+
const e = N(!0), r = N(!1), n = N(""), o = bo("searchinput"), i = C(() => e.value ? "unrotated" : "rotated"), s = () => {
|
|
5708
5716
|
e.value = !e.value;
|
|
5709
5717
|
}, a = async () => {
|
|
5710
5718
|
r.value = !r.value, await oe(() => {
|
|
@@ -5718,20 +5726,20 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5718
5726
|
};
|
|
5719
5727
|
return (f, h) => {
|
|
5720
5728
|
const p = $i("router-link");
|
|
5721
|
-
return
|
|
5722
|
-
|
|
5723
|
-
|
|
5729
|
+
return P(), U("footer", null, [
|
|
5730
|
+
T("ul", Ua, [
|
|
5731
|
+
T("li", {
|
|
5724
5732
|
class: "hidebreadcrumbs",
|
|
5725
5733
|
onClick: s,
|
|
5726
5734
|
onKeydown: be(s, ["enter"])
|
|
5727
5735
|
}, [
|
|
5728
|
-
|
|
5729
|
-
|
|
5736
|
+
T("a", Ba, [
|
|
5737
|
+
T("div", {
|
|
5730
5738
|
class: ee(i.value)
|
|
5731
5739
|
}, "×", 2)
|
|
5732
5740
|
])
|
|
5733
5741
|
], 32),
|
|
5734
|
-
|
|
5742
|
+
T("li", {
|
|
5735
5743
|
class: "hometab",
|
|
5736
5744
|
style: Ar({ display: e.value ? "block" : "none" }),
|
|
5737
5745
|
onClick: l,
|
|
@@ -5741,8 +5749,8 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5741
5749
|
to: "/",
|
|
5742
5750
|
tabindex: "0"
|
|
5743
5751
|
}, {
|
|
5744
|
-
default:
|
|
5745
|
-
|
|
5752
|
+
default: Ce(() => [...h[5] || (h[5] = [
|
|
5753
|
+
T("svg", {
|
|
5746
5754
|
class: "icon",
|
|
5747
5755
|
"aria-label": "Home",
|
|
5748
5756
|
viewBox: "0 0 24 24",
|
|
@@ -5750,19 +5758,19 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5750
5758
|
stroke: "currentColor",
|
|
5751
5759
|
"stroke-width": "2"
|
|
5752
5760
|
}, [
|
|
5753
|
-
|
|
5754
|
-
|
|
5761
|
+
T("path", { d: "M3 12l9-9 9 9" }),
|
|
5762
|
+
T("path", { d: "M9 21V12h6v9" })
|
|
5755
5763
|
], -1)
|
|
5756
5764
|
])]),
|
|
5757
5765
|
_: 1
|
|
5758
5766
|
})
|
|
5759
5767
|
], 36),
|
|
5760
|
-
|
|
5768
|
+
T("li", {
|
|
5761
5769
|
class: ee(["searchtab", { "search-active": r.value }]),
|
|
5762
5770
|
style: Ar({ display: e.value ? "block" : "none" })
|
|
5763
5771
|
}, [
|
|
5764
|
-
|
|
5765
|
-
ir((
|
|
5772
|
+
T("a", Wa, [
|
|
5773
|
+
ir((P(), U("svg", {
|
|
5766
5774
|
class: "icon search-icon",
|
|
5767
5775
|
role: "button",
|
|
5768
5776
|
"aria-label": "Search",
|
|
@@ -5773,16 +5781,16 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5773
5781
|
onClick: a,
|
|
5774
5782
|
onKeydown: be(a, ["enter"])
|
|
5775
5783
|
}, [...h[6] || (h[6] = [
|
|
5776
|
-
|
|
5784
|
+
T("circle", {
|
|
5777
5785
|
cx: "11",
|
|
5778
5786
|
cy: "11",
|
|
5779
5787
|
r: "7"
|
|
5780
5788
|
}, null, -1),
|
|
5781
|
-
|
|
5789
|
+
T("path", { d: "M21 21l-4.35-4.35" }, null, -1)
|
|
5782
5790
|
])], 544)), [
|
|
5783
5791
|
[Br, !r.value]
|
|
5784
5792
|
]),
|
|
5785
|
-
ir(
|
|
5793
|
+
ir(T("input", {
|
|
5786
5794
|
ref: "searchinput",
|
|
5787
5795
|
"onUpdate:modelValue": h[0] || (h[0] = (d) => n.value = d),
|
|
5788
5796
|
type: "text",
|
|
@@ -5801,7 +5809,7 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5801
5809
|
])
|
|
5802
5810
|
])
|
|
5803
5811
|
], 6),
|
|
5804
|
-
(
|
|
5812
|
+
(P(!0), U(ne, null, Ne(t.breadcrumbs, (d) => (P(), U("li", {
|
|
5805
5813
|
key: d.title,
|
|
5806
5814
|
style: Ar({ display: e.value ? "block" : "none" })
|
|
5807
5815
|
}, [
|
|
@@ -5809,7 +5817,7 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5809
5817
|
tabindex: "0",
|
|
5810
5818
|
to: d.to
|
|
5811
5819
|
}, {
|
|
5812
|
-
default:
|
|
5820
|
+
default: Ce(() => [
|
|
5813
5821
|
ar(Dt(d.title), 1)
|
|
5814
5822
|
]),
|
|
5815
5823
|
_: 2
|
|
@@ -5819,13 +5827,13 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5819
5827
|
]);
|
|
5820
5828
|
};
|
|
5821
5829
|
}
|
|
5822
|
-
}), Oi = /* @__PURE__ */ Do(
|
|
5830
|
+
}), Oi = /* @__PURE__ */ Do(Ka, [["__scopeId", "data-v-0072260b"]]), Ha = {
|
|
5823
5831
|
key: 1,
|
|
5824
5832
|
class: "loading"
|
|
5825
|
-
},
|
|
5833
|
+
}, Ja = {
|
|
5826
5834
|
key: 2,
|
|
5827
5835
|
class: "loading"
|
|
5828
|
-
},
|
|
5836
|
+
}, Ga = /* @__PURE__ */ Ve({
|
|
5829
5837
|
__name: "Desktop",
|
|
5830
5838
|
props: {
|
|
5831
5839
|
availableDoctypes: {},
|
|
@@ -5835,7 +5843,7 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5835
5843
|
},
|
|
5836
5844
|
emits: ["action", "navigate", "record:open", "load-records", "load-record"],
|
|
5837
5845
|
setup(t, { emit: e }) {
|
|
5838
|
-
const r = t, n = e, { availableDoctypes: o = [] } = r, { stonecrop: i } =
|
|
5846
|
+
const r = t, n = e, { availableDoctypes: o = [] } = r, { stonecrop: i } = Rs(), s = N(!1), a = N(!1), u = C({
|
|
5839
5847
|
get() {
|
|
5840
5848
|
if (!i.value || !f.value || !p.value)
|
|
5841
5849
|
return {};
|
|
@@ -5848,16 +5856,16 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5848
5856
|
set(v) {
|
|
5849
5857
|
if (!(!i.value || !f.value || !p.value))
|
|
5850
5858
|
try {
|
|
5851
|
-
const
|
|
5852
|
-
for (const [
|
|
5853
|
-
const I = `${f.value}.${p.value}.${
|
|
5854
|
-
(
|
|
5859
|
+
const _ = i.value.getStore();
|
|
5860
|
+
for (const [g, O] of Object.entries(v)) {
|
|
5861
|
+
const I = `${f.value}.${p.value}.${g}`;
|
|
5862
|
+
(_.has(I) ? _.get(I) : void 0) !== O && _.set(I, O);
|
|
5855
5863
|
}
|
|
5856
|
-
} catch (
|
|
5857
|
-
console.warn("HST update failed:",
|
|
5864
|
+
} catch (_) {
|
|
5865
|
+
console.warn("HST update failed:", _);
|
|
5858
5866
|
}
|
|
5859
5867
|
}
|
|
5860
|
-
}), c =
|
|
5868
|
+
}), c = C(() => r.routeAdapter ? null : rr(i.value?.registry.router?.currentRoute)), l = C(() => r.routeAdapter ? null : i.value?.registry.router), f = C(() => {
|
|
5861
5869
|
if (r.routeAdapter) return r.routeAdapter.getCurrentDoctype();
|
|
5862
5870
|
if (!c.value) return "";
|
|
5863
5871
|
if (c.value.meta?.actualDoctype)
|
|
@@ -5866,7 +5874,7 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5866
5874
|
return c.value.params.doctype.toString();
|
|
5867
5875
|
const v = c.value.params.pathMatch;
|
|
5868
5876
|
return v && v.length > 0 ? v[0] : "";
|
|
5869
|
-
}), h =
|
|
5877
|
+
}), h = C(() => {
|
|
5870
5878
|
if (r.routeAdapter) return r.routeAdapter.getCurrentDoctype();
|
|
5871
5879
|
if (!c.value) return "";
|
|
5872
5880
|
if (c.value.meta?.doctype)
|
|
@@ -5875,22 +5883,22 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5875
5883
|
return c.value.params.doctype.toString();
|
|
5876
5884
|
const v = c.value.params.pathMatch;
|
|
5877
5885
|
return v && v.length > 0 ? v[0] : "";
|
|
5878
|
-
}), p =
|
|
5886
|
+
}), p = C(() => {
|
|
5879
5887
|
if (r.routeAdapter) return r.routeAdapter.getCurrentRecordId();
|
|
5880
5888
|
if (!c.value) return "";
|
|
5881
5889
|
if (c.value.params.recordId)
|
|
5882
5890
|
return c.value.params.recordId.toString();
|
|
5883
5891
|
const v = c.value.params.pathMatch;
|
|
5884
5892
|
return v && v.length > 1 ? v[1] : "";
|
|
5885
|
-
}), d =
|
|
5893
|
+
}), d = C(() => p.value?.startsWith("new-")), y = C(() => {
|
|
5886
5894
|
if (r.routeAdapter) return r.routeAdapter.getCurrentView();
|
|
5887
5895
|
if (!c.value || c.value.name === "home" || c.value.path === "/")
|
|
5888
5896
|
return "doctypes";
|
|
5889
5897
|
if (c.value.name && c.value.name !== "catch-all") {
|
|
5890
|
-
const
|
|
5891
|
-
if (
|
|
5898
|
+
const _ = c.value.name;
|
|
5899
|
+
if (_.includes("form") || c.value.params.recordId)
|
|
5892
5900
|
return "record";
|
|
5893
|
-
if (
|
|
5901
|
+
if (_.includes("list") || c.value.params.doctype)
|
|
5894
5902
|
return "records";
|
|
5895
5903
|
}
|
|
5896
5904
|
const v = c.value.params.pathMatch;
|
|
@@ -5901,8 +5909,8 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5901
5909
|
try {
|
|
5902
5910
|
const v = i.value.registry.getDoctype(f.value);
|
|
5903
5911
|
if (!v?.workflow) return [];
|
|
5904
|
-
const
|
|
5905
|
-
return
|
|
5912
|
+
const _ = i.value.getRecordState(f.value, p.value), g = v.getAvailableTransitions(_), O = u.value || {};
|
|
5913
|
+
return g.map(({ name: I, targetState: A }) => ({
|
|
5906
5914
|
label: `${I} (→ ${A})`,
|
|
5907
5915
|
action: () => {
|
|
5908
5916
|
n("action", {
|
|
@@ -5916,9 +5924,9 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5916
5924
|
} catch (v) {
|
|
5917
5925
|
return console.warn("Error getting available transitions:", v), [];
|
|
5918
5926
|
}
|
|
5919
|
-
},
|
|
5927
|
+
}, $ = C(() => {
|
|
5920
5928
|
const v = [];
|
|
5921
|
-
switch (
|
|
5929
|
+
switch (y.value) {
|
|
5922
5930
|
case "records":
|
|
5923
5931
|
v.push({
|
|
5924
5932
|
type: "button",
|
|
@@ -5929,34 +5937,34 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5929
5937
|
});
|
|
5930
5938
|
break;
|
|
5931
5939
|
case "record": {
|
|
5932
|
-
const
|
|
5933
|
-
|
|
5940
|
+
const _ = D();
|
|
5941
|
+
_.length > 0 && v.push({
|
|
5934
5942
|
type: "dropdown",
|
|
5935
5943
|
label: "Actions",
|
|
5936
|
-
actions:
|
|
5944
|
+
actions: _
|
|
5937
5945
|
});
|
|
5938
5946
|
break;
|
|
5939
5947
|
}
|
|
5940
5948
|
}
|
|
5941
5949
|
return v;
|
|
5942
|
-
}), tt =
|
|
5950
|
+
}), tt = C(() => {
|
|
5943
5951
|
const v = [];
|
|
5944
|
-
if (
|
|
5952
|
+
if (y.value === "records" && h.value)
|
|
5945
5953
|
v.push(
|
|
5946
5954
|
{ title: "Home", to: "/" },
|
|
5947
5955
|
{ title: Y(h.value), to: `/${h.value}` }
|
|
5948
5956
|
);
|
|
5949
|
-
else if (
|
|
5950
|
-
const
|
|
5957
|
+
else if (y.value === "record" && h.value) {
|
|
5958
|
+
const _ = p.value ? `/${h.value}/${p.value}` : c.value?.fullPath ?? "";
|
|
5951
5959
|
v.push(
|
|
5952
5960
|
{ title: "Home", to: "/" },
|
|
5953
5961
|
{ title: Y(h.value), to: `/${h.value}` },
|
|
5954
|
-
{ title: d.value ? "New Record" : "Edit Record", to:
|
|
5962
|
+
{ title: d.value ? "New Record" : "Edit Record", to: _ }
|
|
5955
5963
|
);
|
|
5956
5964
|
}
|
|
5957
5965
|
return v;
|
|
5958
5966
|
}), ut = (v) => {
|
|
5959
|
-
const
|
|
5967
|
+
const _ = [
|
|
5960
5968
|
{
|
|
5961
5969
|
title: "Go Home",
|
|
5962
5970
|
description: "Navigate to the home page",
|
|
@@ -5970,48 +5978,48 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
5970
5978
|
action: () => a.value = !a.value
|
|
5971
5979
|
}
|
|
5972
5980
|
];
|
|
5973
|
-
return h.value && (
|
|
5981
|
+
return h.value && (_.push({
|
|
5974
5982
|
title: `View ${Y(h.value)} Records`,
|
|
5975
5983
|
description: `Navigate to ${h.value} list`,
|
|
5976
5984
|
action: () => {
|
|
5977
5985
|
k({ view: "records", doctype: h.value });
|
|
5978
5986
|
}
|
|
5979
|
-
}),
|
|
5987
|
+
}), _.push({
|
|
5980
5988
|
title: `Create New ${Y(h.value)}`,
|
|
5981
5989
|
description: `Create a new ${h.value} record`,
|
|
5982
5990
|
action: () => {
|
|
5983
5991
|
b();
|
|
5984
5992
|
}
|
|
5985
|
-
})), o.forEach((
|
|
5986
|
-
|
|
5987
|
-
title: `View ${Y(
|
|
5988
|
-
description: `Navigate to ${
|
|
5993
|
+
})), o.forEach((g) => {
|
|
5994
|
+
_.push({
|
|
5995
|
+
title: `View ${Y(g)}`,
|
|
5996
|
+
description: `Navigate to ${g} list`,
|
|
5989
5997
|
action: () => {
|
|
5990
|
-
k({ view: "records", doctype:
|
|
5998
|
+
k({ view: "records", doctype: g });
|
|
5991
5999
|
}
|
|
5992
6000
|
});
|
|
5993
|
-
}), v ?
|
|
5994
|
-
(
|
|
5995
|
-
) :
|
|
6001
|
+
}), v ? _.filter(
|
|
6002
|
+
(g) => g.title.toLowerCase().includes(v.toLowerCase()) || g.description.toLowerCase().includes(v.toLowerCase())
|
|
6003
|
+
) : _;
|
|
5996
6004
|
}, It = (v) => {
|
|
5997
6005
|
v.action(), a.value = !1;
|
|
5998
|
-
}, Y = (v) => v.split("-").map((
|
|
6006
|
+
}, Y = (v) => v.split("-").map((_) => _.charAt(0).toUpperCase() + _.slice(1)).join(" "), _t = (v) => i.value ? i.value.getRecordIds(v).length : 0, k = async (v) => {
|
|
5999
6007
|
n("navigate", v), r.routeAdapter ? await r.routeAdapter.navigate(v) : v.view === "doctypes" ? await l.value?.push("/") : v.view === "records" && v.doctype ? await l.value?.push(`/${v.doctype}`) : v.view === "record" && v.doctype && v.recordId && await l.value?.push(`/${v.doctype}/${v.recordId}`);
|
|
6000
|
-
},
|
|
6008
|
+
}, Ct = async (v) => {
|
|
6001
6009
|
await k({ view: "records", doctype: v });
|
|
6002
6010
|
}, V = async (v) => {
|
|
6003
|
-
const
|
|
6004
|
-
n("record:open", { doctype:
|
|
6011
|
+
const _ = h.value;
|
|
6012
|
+
n("record:open", { doctype: _, recordId: v }), await k({ view: "record", doctype: _, recordId: v });
|
|
6005
6013
|
}, b = async () => {
|
|
6006
6014
|
const v = `new-${Date.now()}`;
|
|
6007
6015
|
await k({ view: "record", doctype: h.value, recordId: v });
|
|
6008
6016
|
}, w = () => {
|
|
6009
6017
|
if (!o.length) return [];
|
|
6010
|
-
const v = o.map((
|
|
6011
|
-
id:
|
|
6012
|
-
doctype:
|
|
6013
|
-
display_name: Y(
|
|
6014
|
-
record_count: _t(
|
|
6018
|
+
const v = o.map((_) => ({
|
|
6019
|
+
id: _,
|
|
6020
|
+
doctype: _,
|
|
6021
|
+
display_name: Y(_),
|
|
6022
|
+
record_count: _t(_),
|
|
6015
6023
|
actions: "View Records"
|
|
6016
6024
|
}));
|
|
6017
6025
|
return [
|
|
@@ -6062,14 +6070,14 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
6062
6070
|
}, R = () => {
|
|
6063
6071
|
if (!f.value) return [];
|
|
6064
6072
|
if (!i.value) return [];
|
|
6065
|
-
const v = i.value.registry,
|
|
6066
|
-
if (!
|
|
6067
|
-
const
|
|
6068
|
-
if (
|
|
6069
|
-
const O = z(), I = r.recordIdField || "id", A = O.map((
|
|
6070
|
-
...
|
|
6073
|
+
const v = i.value.registry, _ = v.registry[f.value];
|
|
6074
|
+
if (!_) return [];
|
|
6075
|
+
const g = v.resolveSchema(_);
|
|
6076
|
+
if (g.length === 0) return [];
|
|
6077
|
+
const O = z(), I = r.recordIdField || "id", A = O.map((j) => ({
|
|
6078
|
+
...j,
|
|
6071
6079
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
6072
|
-
id:
|
|
6080
|
+
id: j[I] || j.id || "",
|
|
6073
6081
|
actions: "Edit | Delete"
|
|
6074
6082
|
}));
|
|
6075
6083
|
return [
|
|
@@ -6077,7 +6085,7 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
6077
6085
|
fieldname: "records_table",
|
|
6078
6086
|
component: "ATable",
|
|
6079
6087
|
kind: "table",
|
|
6080
|
-
schema: [...
|
|
6088
|
+
schema: [...g, { fieldname: "actions", label: "Actions", fieldtype: "Data" }],
|
|
6081
6089
|
config: {
|
|
6082
6090
|
view: "list",
|
|
6083
6091
|
fullWidth: !0
|
|
@@ -6089,18 +6097,18 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
6089
6097
|
if (!f.value) return [];
|
|
6090
6098
|
if (!i.value) return [];
|
|
6091
6099
|
try {
|
|
6092
|
-
const v = i.value?.registry,
|
|
6093
|
-
return
|
|
6100
|
+
const v = i.value?.registry, _ = v?.registry[f.value];
|
|
6101
|
+
return _?.schema ? v.resolveSchema(_) : [];
|
|
6094
6102
|
} catch {
|
|
6095
6103
|
return [];
|
|
6096
6104
|
}
|
|
6097
6105
|
}, z = () => {
|
|
6098
6106
|
if (!i.value || !f.value)
|
|
6099
6107
|
return [];
|
|
6100
|
-
const
|
|
6101
|
-
return
|
|
6102
|
-
}, q =
|
|
6103
|
-
switch (
|
|
6108
|
+
const _ = i.value.records(f.value)?.get("");
|
|
6109
|
+
return _ && typeof _ == "object" && !Array.isArray(_) ? Object.values(_) : [];
|
|
6110
|
+
}, q = C(() => {
|
|
6111
|
+
switch (y.value) {
|
|
6104
6112
|
case "doctypes":
|
|
6105
6113
|
return w();
|
|
6106
6114
|
case "records":
|
|
@@ -6110,68 +6118,68 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
6110
6118
|
default:
|
|
6111
6119
|
return [];
|
|
6112
6120
|
}
|
|
6113
|
-
}), Q = (v,
|
|
6114
|
-
|
|
6121
|
+
}), Q = (v, _) => {
|
|
6122
|
+
_ && _();
|
|
6115
6123
|
}, Ot = async (v) => {
|
|
6116
|
-
const
|
|
6117
|
-
if (!
|
|
6124
|
+
const _ = v || p.value;
|
|
6125
|
+
if (!_) return;
|
|
6118
6126
|
(r.confirmFn ? await r.confirmFn("Are you sure you want to delete this record?") : confirm("Are you sure you want to delete this record?")) && n("action", {
|
|
6119
6127
|
name: "DELETE",
|
|
6120
6128
|
doctype: f.value,
|
|
6121
|
-
recordId:
|
|
6129
|
+
recordId: _,
|
|
6122
6130
|
data: u.value || {}
|
|
6123
6131
|
});
|
|
6124
6132
|
}, ot = (v) => {
|
|
6125
|
-
const
|
|
6126
|
-
if (!
|
|
6127
|
-
const
|
|
6128
|
-
if (
|
|
6129
|
-
const O = parseInt(
|
|
6133
|
+
const _ = v.querySelector("td[data-rowindex]");
|
|
6134
|
+
if (!_) return null;
|
|
6135
|
+
const g = _.getAttribute("data-rowindex");
|
|
6136
|
+
if (g === null) return null;
|
|
6137
|
+
const O = parseInt(g, 10);
|
|
6130
6138
|
if (isNaN(O)) return null;
|
|
6131
6139
|
const A = z()[O];
|
|
6132
6140
|
if (!A) return null;
|
|
6133
|
-
const
|
|
6134
|
-
return A[
|
|
6135
|
-
},
|
|
6136
|
-
const
|
|
6137
|
-
|
|
6138
|
-
const O =
|
|
6141
|
+
const j = r.recordIdField || "id";
|
|
6142
|
+
return A[j] || A.id || null;
|
|
6143
|
+
}, m = async (v) => {
|
|
6144
|
+
const _ = v.target;
|
|
6145
|
+
_.getAttribute("data-action") === "create" && await b();
|
|
6146
|
+
const O = _.closest("td, th");
|
|
6139
6147
|
if (O) {
|
|
6140
6148
|
const I = O.textContent?.trim(), A = O.closest("tr");
|
|
6141
6149
|
if (I === "View Records" && A) {
|
|
6142
|
-
const
|
|
6143
|
-
if (
|
|
6144
|
-
const
|
|
6145
|
-
|
|
6150
|
+
const j = A.querySelectorAll("td");
|
|
6151
|
+
if (j.length > 0) {
|
|
6152
|
+
const xt = j[1].textContent?.trim();
|
|
6153
|
+
xt && await Ct(xt);
|
|
6146
6154
|
}
|
|
6147
6155
|
} else if (I?.includes("Edit") && A) {
|
|
6148
|
-
const
|
|
6149
|
-
|
|
6156
|
+
const j = ot(A);
|
|
6157
|
+
j && await V(j);
|
|
6150
6158
|
} else if (I?.includes("Delete") && A) {
|
|
6151
|
-
const
|
|
6152
|
-
|
|
6159
|
+
const j = ot(A);
|
|
6160
|
+
j && await Ot(j);
|
|
6153
6161
|
}
|
|
6154
6162
|
}
|
|
6155
|
-
}, S = () => {
|
|
6156
|
-
if (!(!i.value || !f.value)) {
|
|
6163
|
+
}, S = async () => {
|
|
6164
|
+
if (!(!i.value || !f.value || d.value) && !i.value.getRecordById(f.value, p.value) && i.value.getClient()) {
|
|
6157
6165
|
s.value = !0;
|
|
6158
6166
|
try {
|
|
6159
|
-
|
|
6167
|
+
await i.value.getRecord(f.value, p.value);
|
|
6160
6168
|
} catch (v) {
|
|
6161
|
-
console.warn("Error
|
|
6169
|
+
console.warn("Error fetching record:", v);
|
|
6162
6170
|
} finally {
|
|
6163
6171
|
s.value = !1;
|
|
6164
6172
|
}
|
|
6165
6173
|
}
|
|
6166
6174
|
};
|
|
6167
6175
|
return rt(
|
|
6168
|
-
[
|
|
6176
|
+
[y, f, p],
|
|
6169
6177
|
() => {
|
|
6170
|
-
|
|
6178
|
+
y.value === "records" && f.value ? n("load-records", { doctype: f.value }) : y.value === "record" && f.value && p.value && (n("load-record", { doctype: f.value, recordId: p.value }), S());
|
|
6171
6179
|
},
|
|
6172
6180
|
{ immediate: !0 }
|
|
6173
6181
|
), Kr("desktopMethods", {
|
|
6174
|
-
navigateToDoctype:
|
|
6182
|
+
navigateToDoctype: Ct,
|
|
6175
6183
|
openRecord: V,
|
|
6176
6184
|
createNewRecord: b,
|
|
6177
6185
|
handleDelete: Ot,
|
|
@@ -6179,38 +6187,38 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
6179
6187
|
* Convenience wrapper so child components (e.g. slot content) can emit
|
|
6180
6188
|
* an action event without needing a direct reference to the emit function.
|
|
6181
6189
|
*/
|
|
6182
|
-
emitAction: (v,
|
|
6190
|
+
emitAction: (v, _) => {
|
|
6183
6191
|
n("action", {
|
|
6184
6192
|
name: v,
|
|
6185
6193
|
doctype: f.value,
|
|
6186
6194
|
recordId: p.value,
|
|
6187
|
-
data:
|
|
6195
|
+
data: _ ?? u.value ?? {}
|
|
6188
6196
|
});
|
|
6189
6197
|
}
|
|
6190
6198
|
}), vr(() => {
|
|
6191
|
-
const v = (
|
|
6192
|
-
(
|
|
6199
|
+
const v = (_) => {
|
|
6200
|
+
(_.ctrlKey || _.metaKey) && _.key === "k" && (_.preventDefault(), a.value = !0), _.key === "Escape" && a.value && (a.value = !1);
|
|
6193
6201
|
};
|
|
6194
6202
|
return document.addEventListener("keydown", v), () => {
|
|
6195
6203
|
document.removeEventListener("keydown", v);
|
|
6196
6204
|
};
|
|
6197
|
-
}), (v,
|
|
6205
|
+
}), (v, _) => (P(), U("div", {
|
|
6198
6206
|
class: "desktop",
|
|
6199
|
-
onClick:
|
|
6207
|
+
onClick: m
|
|
6200
6208
|
}, [
|
|
6201
6209
|
re(zo, {
|
|
6202
|
-
elements:
|
|
6210
|
+
elements: $.value,
|
|
6203
6211
|
onActionClick: Q
|
|
6204
6212
|
}, null, 8, ["elements"]),
|
|
6205
|
-
q.value.length > 0 ? (
|
|
6213
|
+
q.value.length > 0 ? (P(), sr(rr(Fa), {
|
|
6206
6214
|
key: 0,
|
|
6207
6215
|
data: u.value,
|
|
6208
|
-
"onUpdate:data":
|
|
6216
|
+
"onUpdate:data": _[0] || (_[0] = (g) => u.value = g),
|
|
6209
6217
|
schema: q.value
|
|
6210
|
-
}, null, 8, ["data", "schema"])) :
|
|
6211
|
-
|
|
6212
|
-
])) : (
|
|
6213
|
-
|
|
6218
|
+
}, null, 8, ["data", "schema"])) : rr(i) ? (P(), U("div", Ja, [
|
|
6219
|
+
T("p", null, "Loading " + Dt(y.value) + " data...", 1)
|
|
6220
|
+
])) : (P(), U("div", Ha, [..._[2] || (_[2] = [
|
|
6221
|
+
T("p", null, "Initializing Stonecrop...", -1)
|
|
6214
6222
|
])])),
|
|
6215
6223
|
re(Oi, { breadcrumbs: tt.value }, null, 8, ["breadcrumbs"]),
|
|
6216
6224
|
re(Ao, {
|
|
@@ -6218,28 +6226,28 @@ const Ta = { class: "aform" }, Pa = {
|
|
|
6218
6226
|
search: ut,
|
|
6219
6227
|
placeholder: "Type a command or search...",
|
|
6220
6228
|
onSelect: It,
|
|
6221
|
-
onClose:
|
|
6229
|
+
onClose: _[1] || (_[1] = (g) => a.value = !1)
|
|
6222
6230
|
}, {
|
|
6223
|
-
title:
|
|
6224
|
-
ar(Dt(
|
|
6231
|
+
title: Ce(({ result: g }) => [
|
|
6232
|
+
ar(Dt(g.title), 1)
|
|
6225
6233
|
]),
|
|
6226
|
-
content:
|
|
6227
|
-
ar(Dt(
|
|
6234
|
+
content: Ce(({ result: g }) => [
|
|
6235
|
+
ar(Dt(g.description), 1)
|
|
6228
6236
|
]),
|
|
6229
6237
|
_: 1
|
|
6230
6238
|
}, 8, ["is-open"])
|
|
6231
6239
|
]));
|
|
6232
6240
|
}
|
|
6233
|
-
}),
|
|
6241
|
+
}), Ya = {
|
|
6234
6242
|
install: (t) => {
|
|
6235
|
-
t.component("ActionSet", zo), t.component("CommandPalette", Ao), t.component("Desktop",
|
|
6243
|
+
t.component("ActionSet", zo), t.component("CommandPalette", Ao), t.component("Desktop", Ga), t.component("SheetNav", Oi);
|
|
6236
6244
|
}
|
|
6237
6245
|
};
|
|
6238
6246
|
export {
|
|
6239
6247
|
zo as ActionSet,
|
|
6240
6248
|
Ao as CommandPalette,
|
|
6241
|
-
|
|
6249
|
+
Ga as Desktop,
|
|
6242
6250
|
Oi as SheetNav,
|
|
6243
|
-
|
|
6251
|
+
Ya as StonecropDesktop
|
|
6244
6252
|
};
|
|
6245
6253
|
//# sourceMappingURL=desktop.js.map
|