@fest-lib/object 0.1.2 → 0.1.5
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/README.md +9 -10
- package/dist/object.js +623 -611
- package/package.json +5 -4
package/dist/object.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
var
|
|
1
|
+
var je = /* @__PURE__ */ Symbol.for("@fix"), m = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" || typeof e > "u" || e == null, E = (e, t) => m(e) ? t == "number" ? Number(e) || 0 : t == "string" ? String(e) || "" : t == "boolean" ? !!e : e : null, ke = (e, t = "value") => (typeof e == "object" || typeof e == "function") && e != null && (t in e || e?.[t] != null), I = (e) => ke(e, "value"), Ke = (e) => m(e) ? e : I(e) ? e?.value : e, S = (e, t) => e?.[je] ?? e ?? t ?? t, yt = (e) => {
|
|
2
2
|
if (typeof e == "function" || e == null) return e;
|
|
3
3
|
const t = function() {
|
|
4
4
|
};
|
|
5
|
-
return t[
|
|
6
|
-
},
|
|
7
|
-
ke(e, r) && (e[
|
|
5
|
+
return t[je] = e, t;
|
|
6
|
+
}, X = /* @__PURE__ */ Symbol.for("@trigger-lock"), ye = (e, t, r = "value") => {
|
|
7
|
+
ke(e, r) && (e[X] = !0);
|
|
8
8
|
let n;
|
|
9
9
|
try {
|
|
10
10
|
n = t?.();
|
|
11
11
|
} finally {
|
|
12
|
-
ke(e, r) && delete e[
|
|
12
|
+
ke(e, r) && delete e[X];
|
|
13
13
|
}
|
|
14
14
|
return n;
|
|
15
|
-
},
|
|
15
|
+
}, at = (e, t) => e instanceof Promise || typeof e?.then == "function" ? e?.then?.(t) : t?.(e), ht = (e, t) => e instanceof Promise || typeof e?.then == "function" ? e?.then?.(t) : t?.(e), pe = function(e) {
|
|
16
16
|
return (t) => {
|
|
17
|
-
e[
|
|
17
|
+
e[X] = !0;
|
|
18
18
|
let r;
|
|
19
19
|
try {
|
|
20
20
|
r = t?.();
|
|
21
21
|
} finally {
|
|
22
|
-
e[
|
|
22
|
+
e[X] = !1;
|
|
23
23
|
}
|
|
24
24
|
return r;
|
|
25
25
|
};
|
|
26
|
-
},
|
|
26
|
+
}, dt = (e) => {
|
|
27
27
|
switch (typeof e) {
|
|
28
28
|
case "number":
|
|
29
29
|
return 0;
|
|
@@ -40,77 +40,77 @@ var Le = /* @__PURE__ */ Symbol.for("@fix"), m = (e) => typeof e == "string" ||
|
|
|
40
40
|
case "bigint":
|
|
41
41
|
return 0n;
|
|
42
42
|
}
|
|
43
|
-
},
|
|
43
|
+
}, J = (e) => typeof e?.[Symbol.iterator] == "function", N = (e) => [
|
|
44
44
|
"symbol",
|
|
45
45
|
"string",
|
|
46
46
|
"number"
|
|
47
|
-
].indexOf(typeof e) >= 0,
|
|
47
|
+
].indexOf(typeof e) >= 0, vt = (e, t, r = null) => {
|
|
48
48
|
const n = r != null && (typeof e == "object" || typeof e == "function") ? e?.[r] ?? e : e;
|
|
49
49
|
let i = [];
|
|
50
|
-
t instanceof Set || t instanceof Map || Array.isArray(t) ||
|
|
51
|
-
let
|
|
52
|
-
Array.isArray(n) ?
|
|
53
|
-
const
|
|
50
|
+
t instanceof Set || t instanceof Map || Array.isArray(t) || J(t) ? i = (n instanceof Set || n instanceof WeakSet ? t?.values?.() : t?.entries?.()) || (Array.isArray(t) || J(t) ? t : []) : (typeof t == "object" || typeof t == "function") && (i = n instanceof Set || n instanceof WeakSet ? Object.values(t) : Object.entries(t));
|
|
51
|
+
let s = [];
|
|
52
|
+
Array.isArray(n) ? s = n.entries() : n instanceof Map || n instanceof WeakMap ? s = n?.entries?.() : n instanceof Set || n instanceof WeakSet ? s = n?.values?.() : (typeof n == "object" || typeof n == "function") && (s = Object.entries(n));
|
|
53
|
+
const u = new Set(Array.from(i).map((o) => o?.[0])), l = new Set(Array.from(s).map((o) => o?.[0])), f = u?.difference?.(l);
|
|
54
54
|
if (Array.isArray(n)) {
|
|
55
55
|
const o = n.filter((y, a) => !f.has(a));
|
|
56
56
|
n.splice(0, n.length), n.push(...o);
|
|
57
57
|
} else if (n instanceof Map || n instanceof Set || n instanceof WeakMap || n instanceof WeakSet) for (const o of f) n.delete(o);
|
|
58
58
|
else if (typeof n == "function" || typeof n == "object") for (const o of f) delete n[o];
|
|
59
59
|
return n;
|
|
60
|
-
},
|
|
61
|
-
const
|
|
62
|
-
let
|
|
63
|
-
if (n &&
|
|
64
|
-
if (
|
|
65
|
-
for (const l of
|
|
66
|
-
return
|
|
60
|
+
}, ie = (e, t, r = null, n = !0, i = "id") => {
|
|
61
|
+
const s = r != null && (typeof e == "object" || typeof e == "function") ? e?.[r] ?? e : e;
|
|
62
|
+
let u = null;
|
|
63
|
+
if (n && vt(s, t), t instanceof Set || t instanceof Map || Array.isArray(t) || J(t) ? u = (s instanceof Set || s instanceof WeakSet ? t?.values?.() : t?.entries?.()) || (Array.isArray(t) || J(t) ? t : []) : (typeof t == "object" || typeof t == "function") && (u = s instanceof Set || s instanceof WeakSet ? Object.values(t) : Object.entries(t)), s && u && (typeof u == "object" || typeof u == "function")) {
|
|
64
|
+
if (s instanceof Map || s instanceof WeakMap) {
|
|
65
|
+
for (const l of u) s.set(...l);
|
|
66
|
+
return s;
|
|
67
67
|
}
|
|
68
|
-
if (
|
|
69
|
-
for (const l of
|
|
70
|
-
const f = l?.[i] ? Array.from(
|
|
71
|
-
f != null ?
|
|
68
|
+
if (s instanceof Set || s instanceof WeakSet) {
|
|
69
|
+
for (const l of u) {
|
|
70
|
+
const f = l?.[i] ? Array.from(s?.values?.() || []).find((o) => !x?.(o?.[i], l?.[i])) : null;
|
|
71
|
+
f != null ? ie(f, l, null, n, i) : s.add(l);
|
|
72
72
|
}
|
|
73
|
-
return
|
|
73
|
+
return s;
|
|
74
74
|
}
|
|
75
|
-
if (typeof
|
|
76
|
-
if (Array.isArray(
|
|
75
|
+
if (typeof s == "object" || typeof s == "function") {
|
|
76
|
+
if (Array.isArray(s) || J(s)) {
|
|
77
77
|
let l = 0;
|
|
78
|
-
for (const f of
|
|
79
|
-
return
|
|
78
|
+
for (const f of u) l < s.length ? s[l++] = f?.[1] : s?.push?.(f?.[1]);
|
|
79
|
+
return s;
|
|
80
80
|
}
|
|
81
|
-
return Object.assign(
|
|
81
|
+
return Object.assign(s, Object.fromEntries([...u || []].filter((l) => typeof l != "symbol")));
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
return r != null ? (Reflect.set(e, r, t), e) : typeof t == "object" || typeof t == "function" ? Object.assign(e, t) : t;
|
|
85
|
-
},
|
|
85
|
+
}, bt = (e, t) => pt.getOrInsert(e, /* @__PURE__ */ new WeakMap()).getOrInsert(t, t?.bind?.(e)), K = (e, t) => (typeof t == "function" ? bt(e, t) : t) ?? t, ae = (e, t, r, n) => {
|
|
86
86
|
if (t == Symbol.iterator) return Ve(e, r, n);
|
|
87
87
|
if (t == null || typeof t == "symbol" || typeof t == "object" || typeof t == "function") return;
|
|
88
|
-
const i = (
|
|
89
|
-
if (
|
|
88
|
+
const i = (s, ...u) => {
|
|
89
|
+
if (s != null) return r?.(s, ...u);
|
|
90
90
|
};
|
|
91
91
|
if (e instanceof Map || e instanceof WeakMap) {
|
|
92
92
|
if (e.has(t)) return i?.(e.get(t), t, null, "@set");
|
|
93
93
|
} else if (e instanceof Set || e instanceof WeakSet) {
|
|
94
94
|
if (e.has(t)) return i?.(t, t, null, "@add");
|
|
95
95
|
} else if (Array.isArray(e) && typeof t == "string" && [...t?.matchAll?.(/^\d+$/g)].length == 1 && Number.isInteger(typeof t == "string" ? parseInt(t) : t)) {
|
|
96
|
-
const
|
|
97
|
-
return i?.(e?.[
|
|
96
|
+
const s = typeof t == "string" ? parseInt(t) : t;
|
|
97
|
+
return i?.(e?.[s], s, null, "@add");
|
|
98
98
|
} else if (typeof e == "function" || typeof e == "object") return i?.(e?.[t], t, null, "@set");
|
|
99
|
-
},
|
|
99
|
+
}, St = (e, t = {}) => (Object.entries(t)?.forEach?.(([r, n]) => {
|
|
100
100
|
x(n, e[r]) && (e[r] = n);
|
|
101
101
|
}), e), Ve = (e, t, r) => {
|
|
102
102
|
if (e == null) return;
|
|
103
103
|
let n = [];
|
|
104
104
|
if (e instanceof Set || e instanceof Map || typeof e?.keys == "function") return [...e?.keys?.() || n].forEach?.((i) => ae(e, i, t, r));
|
|
105
|
-
if (Array.isArray(e) ||
|
|
105
|
+
if (Array.isArray(e) || J(e)) return [...e].forEach?.((i, s) => ae(e, s, t, r));
|
|
106
106
|
if (typeof e == "object" || typeof e == "function") return [...Object.keys(e) || n].forEach?.((i) => ae(e, i, t, r));
|
|
107
|
-
}, x = (e, t) => e == null && t == null ? !1 : e == null || t == null ? !0 : typeof e == "boolean" && typeof t == "boolean" ? e != t : typeof e == "number" && typeof t == "number" ? !(e == t || Math.abs(e - t) < 1e-9) : typeof e == "string" && typeof t == "string" ? e != "" && t != "" && e != t || e !== t : typeof e != typeof t ? e !== t : e && t && e != t || e !== t,
|
|
107
|
+
}, x = (e, t) => e == null && t == null ? !1 : e == null || t == null ? !0 : typeof e == "boolean" && typeof t == "boolean" ? e != t : typeof e == "number" && typeof t == "number" ? !(e == t || Math.abs(e - t) < 1e-9) : typeof e == "string" && typeof t == "string" ? e != "" && t != "" && e != t || e !== t : typeof e != typeof t ? e !== t : e && t && e != t || e !== t, pt = /* @__PURE__ */ new WeakMap(), le = (e, t) => {
|
|
108
108
|
const r = e == null || e < 0 || typeof e != "number" || e == Symbol.iterator || (t != null ? e >= (t?.length || 0) : !1);
|
|
109
109
|
return t != null ? Array.isArray(t) && r : !1;
|
|
110
110
|
}, _ = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), T = (e, t) => e instanceof Promise || typeof e?.then == "function" ? _?.has?.(e) ? t(_?.get?.(e)) : Promise.try?.(async () => {
|
|
111
111
|
const r = await e;
|
|
112
112
|
return _?.set?.(e, r), r;
|
|
113
|
-
})?.then?.(t) : t(e),
|
|
113
|
+
})?.then?.(t) : t(e), mt = class {
|
|
114
114
|
#t;
|
|
115
115
|
#e;
|
|
116
116
|
constructor(e, t) {
|
|
@@ -150,12 +150,12 @@ var Le = /* @__PURE__ */ Symbol.for("@fix"), m = (e) => typeof e == "string" ||
|
|
|
150
150
|
get(e, t, r) {
|
|
151
151
|
if (e = S(e), t == "promise") return e;
|
|
152
152
|
if (t == "resolve" && this.#t) return (...i) => {
|
|
153
|
-
const
|
|
154
|
-
return this.#t = null,
|
|
153
|
+
const s = this.#t?.(...i);
|
|
154
|
+
return this.#t = null, s;
|
|
155
155
|
};
|
|
156
156
|
if (t == "reject" && this.#e) return (...i) => {
|
|
157
|
-
const
|
|
158
|
-
return this.#e = null,
|
|
157
|
+
const s = this.#e?.(...i);
|
|
158
|
+
return this.#e = null, s;
|
|
159
159
|
};
|
|
160
160
|
if (t == "then" || t == "catch" || t == "finally") {
|
|
161
161
|
if (e instanceof Promise) return e?.[t]?.bind?.(e);
|
|
@@ -168,13 +168,13 @@ var Le = /* @__PURE__ */ Symbol.for("@fix"), m = (e) => typeof e == "string" ||
|
|
|
168
168
|
return _?.has?.(e) && (n = _?.get?.(e))?.[t] != null ? n = _?.get?.(e)?.[t] : n = Ee(T(e, async (i) => {
|
|
169
169
|
if (S(i) instanceof Promise) return Reflect.get(i, t, r);
|
|
170
170
|
if (m(i)) return t == Symbol.toPrimitive || t == Symbol.toStringTag ? i : void 0;
|
|
171
|
-
let
|
|
171
|
+
let s;
|
|
172
172
|
try {
|
|
173
|
-
|
|
173
|
+
s = Reflect.get(i, t, r);
|
|
174
174
|
} catch {
|
|
175
|
-
|
|
175
|
+
s = e?.[t];
|
|
176
176
|
}
|
|
177
|
-
return typeof
|
|
177
|
+
return typeof s == "function" ? s?.bind?.(i) : s;
|
|
178
178
|
})), t == Symbol.toStringTag ? m(n) ? String(n ?? "") || "" : n?.[Symbol.toStringTag]?.() || String(n ?? "") || "" : t == Symbol.toPrimitive ? (i) => {
|
|
179
179
|
if (m(n)) return E(n, i);
|
|
180
180
|
} : n;
|
|
@@ -194,34 +194,34 @@ var Le = /* @__PURE__ */ Symbol.for("@fix"), m = (e) => typeof e == "string" ||
|
|
|
194
194
|
}
|
|
195
195
|
};
|
|
196
196
|
function Ee(e, t, r) {
|
|
197
|
-
return e instanceof Promise || typeof e?.then == "function" ? _?.has?.(e) ? _?.get?.(e) : (Ge?.has?.(e) || e?.then?.((n) => _?.set?.(e, n)), Ge?.getOrInsertComputed?.(e, () => new Proxy(
|
|
197
|
+
return e instanceof Promise || typeof e?.then == "function" ? _?.has?.(e) ? _?.get?.(e) : (Ge?.has?.(e) || e?.then?.((n) => _?.set?.(e, n)), Ge?.getOrInsertComputed?.(e, () => new Proxy(yt(e), new mt(t, r)))) : e;
|
|
198
198
|
}
|
|
199
199
|
Symbol.observable ||= /* @__PURE__ */ Symbol.for("observable");
|
|
200
200
|
Symbol.subscribe ||= /* @__PURE__ */ Symbol.for("subscribe");
|
|
201
201
|
Symbol.unsubscribe ||= /* @__PURE__ */ Symbol.for("unsubscribe");
|
|
202
|
-
var
|
|
203
|
-
const t = typeof e == "object" || typeof e == "function" ? e?.[g] ?? e : e, r = (n) =>
|
|
204
|
-
return Array.isArray(t) ? t?.map?.(r) || Array.from(t || [])?.map?.(r) || [] : t instanceof Map || t instanceof WeakMap ? new Map(Array.from(t?.entries?.() || [])?.map?.(([n, i]) => [n,
|
|
205
|
-
},
|
|
202
|
+
var d = /* @__PURE__ */ Symbol.for("@value"), g = /* @__PURE__ */ Symbol.for("@extract"), $ = /* @__PURE__ */ Symbol.for("@origin"), se = /* @__PURE__ */ Symbol.for("@registry"), G = /* @__PURE__ */ Symbol.for("@behavior"), oe = /* @__PURE__ */ Symbol.for("@promise"), me = /* @__PURE__ */ Symbol.for("@trigger-less"), h = /* @__PURE__ */ Symbol.for("@trigger-lock"), gt = /* @__PURE__ */ Symbol.for("@trigger-control"), D = /* @__PURE__ */ Symbol.for("@trigger"), ue = /* @__PURE__ */ Symbol.for("@subscribe"), At = /* @__PURE__ */ Symbol.for("@isNotEqual"), de = /* @__PURE__ */ Symbol.for("@realProp"), qe = /* @__PURE__ */ new WeakMap(), he = (e) => {
|
|
203
|
+
const t = typeof e == "object" || typeof e == "function" ? e?.[g] ?? e : e, r = (n) => he(n);
|
|
204
|
+
return Array.isArray(t) ? t?.map?.(r) || Array.from(t || [])?.map?.(r) || [] : t instanceof Map || t instanceof WeakMap ? new Map(Array.from(t?.entries?.() || [])?.map?.(([n, i]) => [n, he(i)])) : t instanceof Set || t instanceof WeakSet ? new Set(Array.from(t?.values?.() || [])?.map?.(r)) : t != null && typeof t == "function" || typeof t == "object" ? Object.fromEntries(Array.from(Object.entries(t || {}) || [])?.filter?.(([n]) => n != g && n != $ && n != se)?.map?.(([n, i]) => [n, he(i)])) : t;
|
|
205
|
+
}, Ot = (e) => e?.[g] ?? e?.["@target"] ?? e, V = (e, t = !1) => {
|
|
206
206
|
const r = e;
|
|
207
207
|
if (m(e) || typeof e == "symbol") return e;
|
|
208
208
|
if (e != null && (e instanceof WeakRef || "deref" in e && typeof e?.deref == "function") && (e = e?.deref?.()), e != null && (typeof e == "object" || typeof e == "function")) {
|
|
209
|
-
e =
|
|
210
|
-
const n = t &&
|
|
209
|
+
e = Ot(e);
|
|
210
|
+
const n = t && I(e) && e?.value;
|
|
211
211
|
if (n != null && (typeof n == "object" || typeof n == "function") && (e = n), r != e) return V(e, t);
|
|
212
212
|
}
|
|
213
213
|
return e;
|
|
214
|
-
}, We = (e) => e != null && typeof e.then == "function",
|
|
214
|
+
}, We = (e) => e != null && typeof e.then == "function", xt = (e, t) => m(e) || typeof e == "function" ? t?.(e) : We(e) ? e.then(t) : e?.promise && We(e.promise) ? e.promise.then(t) : t?.(e), Ue = /* @__PURE__ */ new WeakMap(), wt = new FinalizationRegistry((e) => {
|
|
215
215
|
e?.forEach?.((t) => t?.());
|
|
216
216
|
});
|
|
217
|
-
function
|
|
217
|
+
function M(e, t, r) {
|
|
218
218
|
if (!(!r || typeof r != "function" || typeof e != "object" && typeof e != "function"))
|
|
219
219
|
if (t == Symbol.dispose) {
|
|
220
220
|
const n = e?.[g] ?? e;
|
|
221
221
|
Ue?.getOrInsertComputed?.(n, () => {
|
|
222
222
|
const i = /* @__PURE__ */ new Set();
|
|
223
|
-
return (typeof n == "object" || typeof n == "function") && (
|
|
224
|
-
|
|
223
|
+
return (typeof n == "object" || typeof n == "function") && (wt.register(n, i), Ue.set(n, i), n[Symbol.dispose] ??= () => i.forEach((s) => {
|
|
224
|
+
s?.();
|
|
225
225
|
})), i;
|
|
226
226
|
})?.add?.(r);
|
|
227
227
|
} else e[t] = function(...n) {
|
|
@@ -229,12 +229,12 @@ function I(e, t, r) {
|
|
|
229
229
|
typeof i == "function" && i.apply(this, n), r.apply(this, n);
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
|
-
var
|
|
232
|
+
var ee = (e) => {
|
|
233
233
|
if (typeof e != "string" || e === "") return !1;
|
|
234
234
|
const t = Number(e);
|
|
235
235
|
return Number.isInteger(t) && t >= 0 && String(t) === e;
|
|
236
236
|
};
|
|
237
|
-
function
|
|
237
|
+
function vr(e = [], t = {}) {
|
|
238
238
|
let r = /* @__PURE__ */ new Set();
|
|
239
239
|
const n = (l, f, o) => {
|
|
240
240
|
t.onDuplicate?.({
|
|
@@ -251,10 +251,10 @@ function or(e = [], t = {}) {
|
|
|
251
251
|
}
|
|
252
252
|
r.add(l);
|
|
253
253
|
}
|
|
254
|
-
const i = () => Array.from(r),
|
|
254
|
+
const i = () => Array.from(r), s = (l) => {
|
|
255
255
|
r.clear();
|
|
256
256
|
for (const f of l) r.add(f);
|
|
257
|
-
},
|
|
257
|
+
}, u = {
|
|
258
258
|
push: (...l) => {
|
|
259
259
|
let f = r.size;
|
|
260
260
|
for (const o of l) {
|
|
@@ -290,19 +290,19 @@ function or(e = [], t = {}) {
|
|
|
290
290
|
}
|
|
291
291
|
if (!o.length) return f.length;
|
|
292
292
|
const y = [...o, ...f];
|
|
293
|
-
return
|
|
293
|
+
return s(y), y.length;
|
|
294
294
|
},
|
|
295
295
|
splice: (l, f, ...o) => {
|
|
296
296
|
const y = i(), a = Math.min(Math.max(l, 0), y.length), v = f === void 0 ? y.length - a : Math.max(0, Math.min(f, y.length - a)), A = y.splice(a, v);
|
|
297
|
-
let
|
|
297
|
+
let w = a;
|
|
298
298
|
for (const O of o) {
|
|
299
299
|
if (y.includes(O)) {
|
|
300
|
-
n(O, "splice",
|
|
300
|
+
n(O, "splice", w);
|
|
301
301
|
continue;
|
|
302
302
|
}
|
|
303
|
-
y.splice(
|
|
303
|
+
y.splice(w++, 0, O);
|
|
304
304
|
}
|
|
305
|
-
return
|
|
305
|
+
return s(y), A;
|
|
306
306
|
},
|
|
307
307
|
includes: (l) => r.has(l),
|
|
308
308
|
indexOf: (l) => i().indexOf(l),
|
|
@@ -314,11 +314,11 @@ function or(e = [], t = {}) {
|
|
|
314
314
|
toSet: () => new Set(r),
|
|
315
315
|
[Symbol.iterator]: () => r[Symbol.iterator]()
|
|
316
316
|
};
|
|
317
|
-
return new Proxy(
|
|
317
|
+
return new Proxy(u, {
|
|
318
318
|
get: (l, f) => {
|
|
319
319
|
if (f === "length") return r.size;
|
|
320
|
-
if (
|
|
321
|
-
const o =
|
|
320
|
+
if (ee(f)) return i()[Number(f)];
|
|
321
|
+
const o = u[f];
|
|
322
322
|
return o;
|
|
323
323
|
},
|
|
324
324
|
set: (l, f, o) => {
|
|
@@ -327,16 +327,16 @@ function or(e = [], t = {}) {
|
|
|
327
327
|
const y = Math.floor(o);
|
|
328
328
|
if (y >= r.size) return !0;
|
|
329
329
|
const a = i().slice(0, y);
|
|
330
|
-
return
|
|
330
|
+
return s(a), !0;
|
|
331
331
|
}
|
|
332
|
-
if (
|
|
332
|
+
if (ee(f)) {
|
|
333
333
|
const y = i(), a = Number(f);
|
|
334
334
|
if (a > y.length) return !0;
|
|
335
335
|
const v = o;
|
|
336
336
|
if (a < y.length) {
|
|
337
337
|
const A = y[a];
|
|
338
338
|
if (Object.is(A, v)) return !0;
|
|
339
|
-
if (y.some((
|
|
339
|
+
if (y.some((w, O) => O !== a && Object.is(w, v)))
|
|
340
340
|
return n(v, "set", a), !0;
|
|
341
341
|
y[a] = v;
|
|
342
342
|
} else {
|
|
@@ -344,17 +344,17 @@ function or(e = [], t = {}) {
|
|
|
344
344
|
return n(v, "set", a), !0;
|
|
345
345
|
y.push(v);
|
|
346
346
|
}
|
|
347
|
-
return
|
|
347
|
+
return s(y), !0;
|
|
348
348
|
}
|
|
349
|
-
return Reflect.set(
|
|
349
|
+
return Reflect.set(u, f, o);
|
|
350
350
|
},
|
|
351
351
|
deleteProperty: (l, f) => {
|
|
352
352
|
if (f === "length") return !1;
|
|
353
|
-
if (
|
|
353
|
+
if (ee(f)) {
|
|
354
354
|
const o = i(), y = Number(f);
|
|
355
|
-
return y >= o.length || (o.splice(y, 1),
|
|
355
|
+
return y >= o.length || (o.splice(y, 1), s(o)), !0;
|
|
356
356
|
}
|
|
357
|
-
return Reflect.deleteProperty(
|
|
357
|
+
return Reflect.deleteProperty(u, f);
|
|
358
358
|
},
|
|
359
359
|
ownKeys: () => {
|
|
360
360
|
const l = [];
|
|
@@ -369,7 +369,7 @@ function or(e = [], t = {}) {
|
|
|
369
369
|
writable: !0,
|
|
370
370
|
value: r.size
|
|
371
371
|
};
|
|
372
|
-
if (
|
|
372
|
+
if (ee(f)) {
|
|
373
373
|
const o = i(), y = Number(f);
|
|
374
374
|
return y >= o.length ? void 0 : {
|
|
375
375
|
configurable: !0,
|
|
@@ -378,19 +378,19 @@ function or(e = [], t = {}) {
|
|
|
378
378
|
value: o[y]
|
|
379
379
|
};
|
|
380
380
|
}
|
|
381
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
381
|
+
return Reflect.getOwnPropertyDescriptor(u, f);
|
|
382
382
|
},
|
|
383
383
|
has: (l, f) => {
|
|
384
384
|
if (f === "length") return !0;
|
|
385
|
-
if (
|
|
385
|
+
if (ee(f)) {
|
|
386
386
|
const o = Number(f);
|
|
387
387
|
return o >= 0 && o < r.size;
|
|
388
388
|
}
|
|
389
|
-
return f in
|
|
389
|
+
return f in u;
|
|
390
390
|
}
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
|
-
var
|
|
393
|
+
var Rt = class {
|
|
394
394
|
constructor() {
|
|
395
395
|
}
|
|
396
396
|
deleteProperty(e, t) {
|
|
@@ -406,36 +406,44 @@ var mt = class {
|
|
|
406
406
|
return Reflect.has(e, t);
|
|
407
407
|
}
|
|
408
408
|
set(e, t, r) {
|
|
409
|
-
return
|
|
409
|
+
return ie(e, r, t), !0;
|
|
410
410
|
}
|
|
411
411
|
get(e, t, r) {
|
|
412
412
|
return typeof t == "symbol" ? e?.[t] ?? e : Reflect.get(e, t, r);
|
|
413
413
|
}
|
|
414
|
-
},
|
|
414
|
+
}, br = (e) => {
|
|
415
415
|
if (e?.[$] || qe.has(e)) return e;
|
|
416
|
-
const t = new Proxy(e, new
|
|
416
|
+
const t = new Proxy(e, new Rt());
|
|
417
417
|
return qe.set(t, e), t;
|
|
418
|
-
},
|
|
418
|
+
}, Le = /* @__PURE__ */ Symbol.for("object.ts@withUnsub");
|
|
419
|
+
globalThis[Le] ??= /* @__PURE__ */ new WeakMap();
|
|
420
|
+
var Pt = globalThis[Le], Tt = (e, t, r) => Pt.getOrInsert(e, () => {
|
|
419
421
|
const n = t?.deref?.();
|
|
420
422
|
n?.affected?.(r);
|
|
421
|
-
const i = e?.complete?.bind?.(e),
|
|
422
|
-
const
|
|
423
|
-
return n?.unaffected?.(r),
|
|
423
|
+
const i = e?.complete?.bind?.(e), s = () => {
|
|
424
|
+
const u = i?.();
|
|
425
|
+
return n?.unaffected?.(r), u;
|
|
424
426
|
};
|
|
425
|
-
return e.complete =
|
|
426
|
-
unaffected:
|
|
427
|
-
[Symbol.dispose]:
|
|
428
|
-
[Symbol.asyncDispose]:
|
|
427
|
+
return e.complete = s, {
|
|
428
|
+
unaffected: s,
|
|
429
|
+
[Symbol.dispose]: s,
|
|
430
|
+
[Symbol.asyncDispose]: s
|
|
429
431
|
};
|
|
430
|
-
}),
|
|
432
|
+
}), et = /* @__PURE__ */ Symbol.for("object.ts@subscriptRegistry");
|
|
433
|
+
globalThis[et] ??= /* @__PURE__ */ new WeakMap();
|
|
434
|
+
var p = globalThis[et] ??= /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ Symbol.for("object.ts@globalEffectListeners");
|
|
435
|
+
globalThis[tt] ??= /* @__PURE__ */ new Map();
|
|
436
|
+
var ve = globalThis[tt], Je = (e, t = ["*"]) => {
|
|
431
437
|
if (e == null || typeof e != "function") return;
|
|
432
|
-
const r =
|
|
438
|
+
const r = ut(t);
|
|
433
439
|
return ve.set(e, r.affectTypes), () => ve.delete(e);
|
|
434
|
-
},
|
|
440
|
+
}, rt = /* @__PURE__ */ Symbol.for("object.ts@wrapped");
|
|
441
|
+
globalThis[rt] ??= /* @__PURE__ */ new WeakMap();
|
|
442
|
+
var Mt = globalThis[rt], It = (e, t) => {
|
|
435
443
|
const r = e?.[g] ?? e;
|
|
436
444
|
let n = p.get(r);
|
|
437
|
-
return n ? n.bindSource(r) : (n = new
|
|
438
|
-
},
|
|
445
|
+
return n ? n.bindSource(r) : (n = new Et(r), p.set(r, n)), t;
|
|
446
|
+
}, ce = (e, t) => (e = V(e?.[g] ?? e), typeof e == "symbol" || !(typeof e == "object" || typeof e == "function") || e == null ? e : Mt.getOrInsertComputed(e, () => new Proxy(e, It(e, t)))), te = /* @__PURE__ */ Symbol.for("@allProps"), nt = /* @__PURE__ */ new Set(["*", "all"]), Ce = /* @__PURE__ */ new Map([
|
|
439
447
|
["set", ["setter", "@set"]],
|
|
440
448
|
["add", ["@add"]],
|
|
441
449
|
["delete", ["@delete"]],
|
|
@@ -445,39 +453,42 @@ var mt = class {
|
|
|
445
453
|
["setAll", ["@setAll"]],
|
|
446
454
|
["addAll", ["@addAll"]],
|
|
447
455
|
["deleteAll", ["@deleteAll", "@clear"]]
|
|
448
|
-
]),
|
|
456
|
+
]), it = /* @__PURE__ */ Symbol.for("object.ts@triggerCanonicalNames");
|
|
457
|
+
globalThis[it] ??= new Map(Array.from(Ce.entries()).flatMap(([e, t]) => t.map((r) => [r, e])));
|
|
458
|
+
var kt = globalThis[it], fe = (e = "set") => {
|
|
449
459
|
if (e == null) return e;
|
|
450
460
|
const t = String(e || "set");
|
|
451
|
-
return
|
|
452
|
-
},
|
|
453
|
-
const t = e == null ? "all" : String(
|
|
454
|
-
return [t, ...
|
|
455
|
-
}, Qe = (e = ["*"]) => new Set([...
|
|
461
|
+
return kt.get(t) ?? t;
|
|
462
|
+
}, lt = (e) => {
|
|
463
|
+
const t = e == null ? "all" : String(fe(e) ?? "all");
|
|
464
|
+
return [t, ...Ce.get(t) ?? []];
|
|
465
|
+
}, Qe = (e = ["*"]) => new Set([...Y(e)].flatMap((t) => [t, ...Ce.get(t) ?? []])), Y = (e = ["*"]) => {
|
|
456
466
|
const t = typeof e == "string" ? [e] : Array.from(e ?? ["*"]), r = new Set(t.map((n) => {
|
|
457
467
|
const i = String(n || "*");
|
|
458
|
-
return
|
|
468
|
+
return nt.has(i) ? i : String(fe(i) ?? i);
|
|
459
469
|
}));
|
|
460
470
|
return r.size ? r : /* @__PURE__ */ new Set(["*"]);
|
|
461
|
-
},
|
|
462
|
-
const r = e instanceof Set ? e :
|
|
463
|
-
return [...
|
|
464
|
-
},
|
|
465
|
-
if (
|
|
466
|
-
affectTypes:
|
|
471
|
+
}, Q = (e, t) => {
|
|
472
|
+
const r = e instanceof Set ? e : Y(e);
|
|
473
|
+
return [...nt].some((n) => r.has(n)) || lt(t).some((n) => r.has(n));
|
|
474
|
+
}, st = (e) => !!e && typeof e == "object" && !Array.isArray(e) && ("affectTypes" in e || "triggers" in e || "triggerImmediately" in e), ge = (e = ["*"]) => {
|
|
475
|
+
if (st(e)) return {
|
|
476
|
+
affectTypes: Y(e.affectTypes ?? e.triggers ?? ["*"]),
|
|
467
477
|
triggerImmediately: e.triggerImmediately !== !1
|
|
468
478
|
};
|
|
469
|
-
const t =
|
|
479
|
+
const t = Y(e);
|
|
470
480
|
return {
|
|
471
481
|
affectTypes: t,
|
|
472
|
-
triggerImmediately:
|
|
482
|
+
triggerImmediately: Q(t, "initial")
|
|
473
483
|
};
|
|
474
|
-
},
|
|
475
|
-
affectTypes:
|
|
484
|
+
}, ut = (e = ["*"]) => st(e) ? {
|
|
485
|
+
affectTypes: Y(e.affectTypes ?? e.triggers ?? ["*"]),
|
|
476
486
|
triggerImmediately: e.triggerImmediately === !0
|
|
477
487
|
} : {
|
|
478
|
-
affectTypes:
|
|
488
|
+
affectTypes: Y(e),
|
|
479
489
|
triggerImmediately: !1
|
|
480
|
-
},
|
|
490
|
+
}, ft = /* @__PURE__ */ Symbol.for("object.ts@Subscript");
|
|
491
|
+
globalThis[ft] ??= class {
|
|
481
492
|
compatible;
|
|
482
493
|
#t;
|
|
483
494
|
#e;
|
|
@@ -490,133 +501,133 @@ var mt = class {
|
|
|
490
501
|
#y = /* @__PURE__ */ new Map();
|
|
491
502
|
#i = /* @__PURE__ */ new Map();
|
|
492
503
|
#s = !1;
|
|
493
|
-
constructor(
|
|
494
|
-
this.#t =
|
|
495
|
-
enable: (
|
|
496
|
-
disable: (
|
|
497
|
-
set: (
|
|
498
|
-
with: (
|
|
499
|
-
without: (
|
|
500
|
-
isEnabled: (
|
|
501
|
-
}, this.#o = { next: (
|
|
502
|
-
|
|
504
|
+
constructor(t) {
|
|
505
|
+
this.#t = t, this.#e = /* @__PURE__ */ new Map(), this.#r = /* @__PURE__ */ new WeakSet(), this.#c = {
|
|
506
|
+
enable: (i = ["*"], s) => s ? this.withTriggers(i, !0, s) : this.setTriggersEnabled(i, !0),
|
|
507
|
+
disable: (i = ["*"], s) => s ? this.withTriggers(i, !1, s) : this.setTriggersEnabled(i, !1),
|
|
508
|
+
set: (i, s) => this.setTriggersEnabled(i, s),
|
|
509
|
+
with: (i, s) => this.withTriggers(i, !0, s),
|
|
510
|
+
without: (i, s) => this.withTriggers(i, !1, s),
|
|
511
|
+
isEnabled: (i) => this.isTriggerEnabled(i)
|
|
512
|
+
}, this.#o = { next: (i) => {
|
|
513
|
+
i && (Array.isArray(i) ? this.#u(...i) : this.#u(i));
|
|
503
514
|
} };
|
|
504
|
-
const
|
|
505
|
-
const
|
|
506
|
-
return
|
|
515
|
+
const r = new WeakRef(this), n = function(i) {
|
|
516
|
+
const s = i?.next?.bind?.(i);
|
|
517
|
+
return Tt(i, r, s);
|
|
507
518
|
};
|
|
508
|
-
this.#f = typeof Observable < "u" ? new Observable(
|
|
519
|
+
this.#f = typeof Observable < "u" ? new Observable(n) : null, this.compatible = () => this.#f;
|
|
509
520
|
}
|
|
510
|
-
bindSource(
|
|
511
|
-
return this.#t ??=
|
|
521
|
+
bindSource(t) {
|
|
522
|
+
return this.#t ??= t, this;
|
|
512
523
|
}
|
|
513
|
-
$safeExec(
|
|
514
|
-
if (!(!
|
|
515
|
-
this.#r.add(
|
|
524
|
+
$safeExec(t, ...r) {
|
|
525
|
+
if (!(!t || this.#r.has(t))) {
|
|
526
|
+
this.#r.add(t);
|
|
516
527
|
try {
|
|
517
|
-
const
|
|
518
|
-
if (
|
|
519
|
-
|
|
528
|
+
const n = t(...r);
|
|
529
|
+
if (n && typeof n.then == "function") {
|
|
530
|
+
n.catch(console.warn);
|
|
520
531
|
return;
|
|
521
532
|
}
|
|
522
|
-
return
|
|
523
|
-
} catch (
|
|
524
|
-
console.warn(
|
|
533
|
+
return n;
|
|
534
|
+
} catch (n) {
|
|
535
|
+
console.warn(n);
|
|
525
536
|
} finally {
|
|
526
|
-
this.#r.delete(
|
|
537
|
+
this.#r.delete(t);
|
|
527
538
|
}
|
|
528
539
|
}
|
|
529
540
|
}
|
|
530
|
-
#u(
|
|
531
|
-
|
|
541
|
+
#u(t, r = null, n, i = "all", ...s) {
|
|
542
|
+
i = fe(i) ?? i;
|
|
532
543
|
const u = this.#e;
|
|
533
544
|
if (u?.size)
|
|
534
|
-
for (const [
|
|
545
|
+
for (const [l, f] of u.entries()) (f.prop === t || f.prop === te || f.prop === null) && Q(f.triggers, i) && this.$safeExec(l, r, t, n, i, ...s);
|
|
535
546
|
if (ve.size) {
|
|
536
|
-
const
|
|
547
|
+
const l = {
|
|
537
548
|
source: this.#t,
|
|
538
549
|
target: this.#t,
|
|
539
|
-
value:
|
|
540
|
-
prop:
|
|
541
|
-
name:
|
|
542
|
-
oldValue:
|
|
543
|
-
trigger:
|
|
544
|
-
args:
|
|
550
|
+
value: r,
|
|
551
|
+
prop: t,
|
|
552
|
+
name: t,
|
|
553
|
+
oldValue: n,
|
|
554
|
+
trigger: i,
|
|
555
|
+
args: s
|
|
545
556
|
};
|
|
546
|
-
for (const [
|
|
557
|
+
for (const [f, o] of ve.entries()) Q(o, i) && this.$safeExec(f, l);
|
|
547
558
|
}
|
|
548
559
|
}
|
|
549
|
-
wrap(
|
|
550
|
-
return Array.isArray(
|
|
560
|
+
wrap(t) {
|
|
561
|
+
return Array.isArray(t) ? ce(t, this) : t;
|
|
551
562
|
}
|
|
552
563
|
get triggerControl() {
|
|
553
564
|
return this.#c;
|
|
554
565
|
}
|
|
555
|
-
isTriggerEnabled(
|
|
556
|
-
return !
|
|
566
|
+
isTriggerEnabled(t) {
|
|
567
|
+
return !Q(this.#n, "all") && !lt(t).some((r) => this.#n.has(r));
|
|
557
568
|
}
|
|
558
|
-
setTriggersEnabled(
|
|
559
|
-
const
|
|
560
|
-
for (const
|
|
569
|
+
setTriggersEnabled(t = ["*"], r = !0) {
|
|
570
|
+
const n = Qe(t);
|
|
571
|
+
for (const i of n) r ? this.#n.delete(i) : this.#n.add(i);
|
|
561
572
|
}
|
|
562
|
-
withTriggers(
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
|
|
573
|
+
withTriggers(t, r, n) {
|
|
574
|
+
const i = [...Qe(t)], s = new Map(i.map((l) => [l, this.#n.has(l)])), u = () => {
|
|
575
|
+
s.forEach((l, f) => {
|
|
576
|
+
l ? this.#n.add(f) : this.#n.delete(f);
|
|
566
577
|
});
|
|
567
578
|
};
|
|
568
|
-
this.setTriggersEnabled(
|
|
579
|
+
this.setTriggersEnabled(i, r);
|
|
569
580
|
try {
|
|
570
|
-
const
|
|
571
|
-
return
|
|
572
|
-
} catch (
|
|
573
|
-
throw u(),
|
|
581
|
+
const l = n?.();
|
|
582
|
+
return l && typeof l.finally == "function" ? l.finally(u) : (u(), l);
|
|
583
|
+
} catch (l) {
|
|
584
|
+
throw u(), l;
|
|
574
585
|
}
|
|
575
586
|
}
|
|
576
|
-
affected(
|
|
577
|
-
if (
|
|
578
|
-
const
|
|
579
|
-
return this.#e.set(
|
|
580
|
-
prop:
|
|
581
|
-
triggers:
|
|
582
|
-
}), () => this.unaffected(
|
|
583
|
-
}
|
|
584
|
-
unaffected(
|
|
585
|
-
if (
|
|
586
|
-
const
|
|
587
|
-
if (
|
|
588
|
-
return
|
|
587
|
+
affected(t, r, n = ["*"]) {
|
|
588
|
+
if (t == null || typeof t != "function") return;
|
|
589
|
+
const i = ge(n);
|
|
590
|
+
return this.#e.set(t, {
|
|
591
|
+
prop: r || te,
|
|
592
|
+
triggers: i.affectTypes
|
|
593
|
+
}), () => this.unaffected(t, r || te);
|
|
594
|
+
}
|
|
595
|
+
unaffected(t, r) {
|
|
596
|
+
if (t != null && typeof t == "function") {
|
|
597
|
+
const n = this.#e, i = n?.get(t);
|
|
598
|
+
if (i && (i.prop == r || r == null || r == te))
|
|
599
|
+
return n.delete(t), () => this.affected(t, r || te, i.triggers);
|
|
589
600
|
}
|
|
590
601
|
return this.#e.clear();
|
|
591
602
|
}
|
|
592
|
-
trigger(
|
|
593
|
-
if (typeof
|
|
594
|
-
const u = `${
|
|
595
|
-
let
|
|
596
|
-
|
|
597
|
-
e,
|
|
603
|
+
trigger(t, r, n, i = "set", ...s) {
|
|
604
|
+
if (typeof t == "symbol" || (i === void 0 && (i = "set"), i = fe(i) ?? i, !this.isTriggerEnabled(i))) return;
|
|
605
|
+
const u = `${i ?? "all"}`;
|
|
606
|
+
let l = this.#i.get(t);
|
|
607
|
+
l || (l = /* @__PURE__ */ new Map(), this.#i.set(t, l)), l.set(u, [
|
|
598
608
|
t,
|
|
599
609
|
r,
|
|
600
610
|
n,
|
|
601
|
-
i
|
|
611
|
+
i,
|
|
612
|
+
s
|
|
602
613
|
]), !this.#s && (this.#s = !0, queueMicrotask(() => {
|
|
603
614
|
this.#s = !1;
|
|
604
|
-
const
|
|
615
|
+
const f = this.#i;
|
|
605
616
|
this.#i = /* @__PURE__ */ new Map();
|
|
606
|
-
for (const [
|
|
607
|
-
if (!(
|
|
608
|
-
|
|
617
|
+
for (const [o, y] of f)
|
|
618
|
+
if (!(o != null && this.#l.has(o))) {
|
|
619
|
+
o != null && this.#l.add(o);
|
|
609
620
|
try {
|
|
610
|
-
for (const [,
|
|
611
|
-
const [
|
|
621
|
+
for (const [, a] of y) {
|
|
622
|
+
const [v, A, w, O, k] = a;
|
|
612
623
|
try {
|
|
613
|
-
this.#u(
|
|
614
|
-
} catch (
|
|
615
|
-
console.warn(
|
|
624
|
+
this.#u(v, A, w, O, ...k ?? []);
|
|
625
|
+
} catch (q) {
|
|
626
|
+
console.warn(q);
|
|
616
627
|
}
|
|
617
628
|
}
|
|
618
629
|
} finally {
|
|
619
|
-
|
|
630
|
+
o != null && this.#l.delete(o);
|
|
620
631
|
}
|
|
621
632
|
}
|
|
622
633
|
}));
|
|
@@ -624,7 +635,8 @@ var mt = class {
|
|
|
624
635
|
get iterator() {
|
|
625
636
|
return this.#o;
|
|
626
637
|
}
|
|
627
|
-
}
|
|
638
|
+
};
|
|
639
|
+
var Et = globalThis[ft], Wt = /* @__PURE__ */ new Set([
|
|
628
640
|
Symbol.toStringTag,
|
|
629
641
|
Symbol.iterator,
|
|
630
642
|
Symbol.asyncIterator,
|
|
@@ -639,19 +651,19 @@ var mt = class {
|
|
|
639
651
|
"catch",
|
|
640
652
|
"finally",
|
|
641
653
|
"next"
|
|
642
|
-
]),
|
|
643
|
-
if (!
|
|
654
|
+
]), re = (e, t) => {
|
|
655
|
+
if (!Wt.has(t)) return null;
|
|
644
656
|
const r = c(e, t);
|
|
645
657
|
return typeof r == "function" ? K(e, r) : r;
|
|
646
|
-
},
|
|
647
|
-
function
|
|
658
|
+
}, R = /* @__PURE__ */ new WeakMap();
|
|
659
|
+
function $t(e, t) {
|
|
648
660
|
let r = !0;
|
|
649
661
|
try {
|
|
650
|
-
|
|
662
|
+
R?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), R?.get?.(e)?.has?.(t) && (r = !0), r = typeof Reflect.getOwnPropertyDescriptor(e, t)?.get == "function";
|
|
651
663
|
} catch {
|
|
652
664
|
r = !0;
|
|
653
665
|
} finally {
|
|
654
|
-
|
|
666
|
+
R?.get?.(e)?.delete?.(t);
|
|
655
667
|
}
|
|
656
668
|
return r;
|
|
657
669
|
}
|
|
@@ -663,16 +675,16 @@ var H = (e, t) => {
|
|
|
663
675
|
return n != null && !m(n) ? H(n, t) : r;
|
|
664
676
|
} else if (t == "value" && r != null && !m(r) && typeof r != "function") return H(r, t) ?? r ?? e;
|
|
665
677
|
return r ?? e;
|
|
666
|
-
},
|
|
678
|
+
}, _t = (e, t, r) => {
|
|
667
679
|
if (e == null) return !1;
|
|
668
680
|
let n = __safeSetGuard.getOrInsert(e, /* @__PURE__ */ new Set());
|
|
669
681
|
return n?.has?.(t) ? !1 : (n?.add?.(t), Reflect.set(e, t, r));
|
|
670
682
|
}, c = (e, t, r) => {
|
|
671
683
|
let n;
|
|
672
684
|
if (e == null) return e;
|
|
673
|
-
let i =
|
|
685
|
+
let i = R.getOrInsert(e, /* @__PURE__ */ new Set());
|
|
674
686
|
if (i?.has?.(t)) return null;
|
|
675
|
-
if (
|
|
687
|
+
if (!$t(e, t)) n ??= Reflect.get(e, t, r ?? e);
|
|
676
688
|
else {
|
|
677
689
|
i?.add?.(t);
|
|
678
690
|
try {
|
|
@@ -680,29 +692,29 @@ var H = (e, t) => {
|
|
|
680
692
|
} catch {
|
|
681
693
|
n = void 0;
|
|
682
694
|
} finally {
|
|
683
|
-
i.delete(t), i?.size === 0 &&
|
|
695
|
+
i.delete(t), i?.size === 0 && R?.delete?.(e);
|
|
684
696
|
}
|
|
685
697
|
}
|
|
686
698
|
return typeof n == "function" ? K(e, n) : n;
|
|
687
|
-
}, W = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Pe = (e, t = !1) => !!e && typeof e == "object" && !Array.isArray(e) && (W(e, "key") || W(e, "name") || W(e, "oldValue") || W(e, "old") || W(e, "op") || W(e, "trigger") || t && W(e, "value")),
|
|
688
|
-
const t = c(e,
|
|
689
|
-
return
|
|
690
|
-
}, Xe = (e, t) => t == "value" ? be(e) ?? t : t,
|
|
699
|
+
}, W = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Pe = (e, t = !1) => !!e && typeof e == "object" && !Array.isArray(e) && (W(e, "key") || W(e, "name") || W(e, "oldValue") || W(e, "old") || W(e, "op") || W(e, "trigger") || t && W(e, "value")), z = (e, t, r) => W(e, t) ? e[t] : t == "oldValue" && W(e, "old") ? e.old : r(), Ae = (e, t = "manual") => fe(e.trigger ?? e.op ?? t), Vt = (e) => typeof e == "string" || typeof e == "number" || typeof e == "symbol", be = (e) => {
|
|
700
|
+
const t = c(e, de) ?? c(e, "realProp");
|
|
701
|
+
return Vt(t) ? t : null;
|
|
702
|
+
}, Xe = (e, t) => t == "value" ? be(e) ?? t : t, Ct = (e, t) => {
|
|
691
703
|
const r = be(e);
|
|
692
|
-
return r != null && t == r ? c(e, "value") ?? c(e,
|
|
704
|
+
return r != null && t == r ? c(e, "value") ?? c(e, d) ?? c(e, t) : t == null ? void 0 : c(e, t);
|
|
693
705
|
}, Oe = (e, t) => {
|
|
694
|
-
const r = (i,
|
|
706
|
+
const r = (i, s, u) => (Pe(s) || (u ??= s), t(Pe(i) ? i : Pe(s, !0) ? {
|
|
695
707
|
key: i,
|
|
696
|
-
trigger:
|
|
697
|
-
...
|
|
708
|
+
trigger: u,
|
|
709
|
+
...s
|
|
698
710
|
} : {
|
|
699
711
|
key: i,
|
|
700
|
-
trigger:
|
|
712
|
+
trigger: u ?? s
|
|
701
713
|
})), n = e?.triggerControl;
|
|
702
|
-
return n && Object.assign(r, n), r.custom = (i,
|
|
703
|
-
key:
|
|
714
|
+
return n && Object.assign(r, n), r.custom = (i, s, u, l) => r({
|
|
715
|
+
key: s,
|
|
704
716
|
trigger: i,
|
|
705
|
-
value:
|
|
717
|
+
value: u,
|
|
706
718
|
oldValue: l
|
|
707
719
|
}), r;
|
|
708
720
|
}, xe = (e, t, r) => {
|
|
@@ -713,32 +725,32 @@ var H = (e, t) => {
|
|
|
713
725
|
"@target",
|
|
714
726
|
$,
|
|
715
727
|
g,
|
|
716
|
-
|
|
728
|
+
se
|
|
717
729
|
].indexOf(t) < 0 ? c(e, t)?.bind?.(e) : null) != null) return null;
|
|
718
730
|
if ([g, $].indexOf(t) >= 0) return c(e, t) ?? e;
|
|
719
|
-
if (t ==
|
|
720
|
-
if (t ==
|
|
721
|
-
if (t ==
|
|
731
|
+
if (t == d) return c(e, t) ?? c(e, "value");
|
|
732
|
+
if (t == se) return r;
|
|
733
|
+
if (t == gt) return r?.triggerControl;
|
|
722
734
|
if (t == Symbol.observable) return r?.compatible;
|
|
723
|
-
if (t == Symbol.subscribe) return (n, i,
|
|
735
|
+
if (t == Symbol.subscribe) return (n, i, s) => b(i != null ? [e, i] : e, n, s);
|
|
724
736
|
if (t == Symbol.iterator || t == Symbol.asyncIterator) return c(e, t);
|
|
725
737
|
if (t == Symbol.dispose) return (n) => {
|
|
726
|
-
c(e, Symbol.dispose)?.(n),
|
|
738
|
+
c(e, Symbol.dispose)?.(n), Ie(n != null ? [e, n] : e);
|
|
727
739
|
};
|
|
728
740
|
if (t == Symbol.asyncDispose) return (n) => {
|
|
729
|
-
c(e, Symbol.asyncDispose)?.(n),
|
|
741
|
+
c(e, Symbol.asyncDispose)?.(n), Ie(n != null ? [e, n] : e);
|
|
730
742
|
};
|
|
731
|
-
if (t == Symbol.unsubscribe) return (n) =>
|
|
743
|
+
if (t == Symbol.unsubscribe) return (n) => Ie(n != null ? [e, n] : e);
|
|
732
744
|
if (typeof t == "symbol" && (t in e || c(e, t) != null)) return c(e, t);
|
|
733
|
-
},
|
|
745
|
+
}, we = (e, t, r) => {
|
|
734
746
|
if (t == "subscribe") return r?.compatible?.[t] ?? ((n) => {
|
|
735
747
|
if (typeof n == "function") return b(e, n);
|
|
736
748
|
if ("next" in n && n?.next != null) {
|
|
737
|
-
const i = b(e, n?.next),
|
|
738
|
-
return n.complete = (...
|
|
749
|
+
const i = b(e, n?.next), s = n?.complete;
|
|
750
|
+
return n.complete = (...u) => (i?.(), s?.(...u)), n.complete;
|
|
739
751
|
}
|
|
740
752
|
});
|
|
741
|
-
},
|
|
753
|
+
}, Nt = class {
|
|
742
754
|
#t;
|
|
743
755
|
#e;
|
|
744
756
|
#r;
|
|
@@ -746,37 +758,37 @@ var H = (e, t) => {
|
|
|
746
758
|
this.#t = e, this.#e = t, this.#r = r;
|
|
747
759
|
}
|
|
748
760
|
get(e, t, r) {
|
|
749
|
-
const n =
|
|
761
|
+
const n = re(e, t);
|
|
750
762
|
return n ?? Reflect.get(e, t, r);
|
|
751
763
|
}
|
|
752
764
|
apply(e, t, r) {
|
|
753
|
-
let n = [], i = [],
|
|
765
|
+
let n = [], i = [], s = [], u = [...this.#e], l = -1;
|
|
754
766
|
const f = Reflect.apply(e, t || this.#e, r);
|
|
755
|
-
if (this.#r?.[
|
|
767
|
+
if (this.#r?.[h])
|
|
756
768
|
return Array.isArray(f) ? $e(f) : f;
|
|
757
769
|
switch (this.#t) {
|
|
758
770
|
case "push":
|
|
759
|
-
l =
|
|
771
|
+
l = u?.length, n = r;
|
|
760
772
|
break;
|
|
761
773
|
case "unshift":
|
|
762
774
|
l = 0, n = r;
|
|
763
775
|
break;
|
|
764
776
|
case "pop":
|
|
765
|
-
l =
|
|
777
|
+
l = u?.length - 1, u.length > 0 && (i = [u[l]]);
|
|
766
778
|
break;
|
|
767
779
|
case "shift":
|
|
768
|
-
l = 0,
|
|
780
|
+
l = 0, u.length > 0 && (i = [u[l]]);
|
|
769
781
|
break;
|
|
770
782
|
case "splice":
|
|
771
783
|
l = r[0];
|
|
772
|
-
for (let y = 0; y < Math.max(
|
|
773
|
-
const a =
|
|
774
|
-
v === void 0 && y >= this.#e.length ? i.push(a) : a === void 0 && y >=
|
|
784
|
+
for (let y = 0; y < Math.max(u.length, this.#e.length); y++) {
|
|
785
|
+
const a = u[y], v = this.#e[y];
|
|
786
|
+
v === void 0 && y >= this.#e.length ? i.push(a) : a === void 0 && y >= u.length ? s.push([
|
|
775
787
|
y,
|
|
776
788
|
v,
|
|
777
789
|
void 0,
|
|
778
790
|
!1
|
|
779
|
-
]) : x(a, v) &&
|
|
791
|
+
]) : x(a, v) && s.push([
|
|
780
792
|
y,
|
|
781
793
|
v,
|
|
782
794
|
a,
|
|
@@ -789,46 +801,46 @@ var H = (e, t) => {
|
|
|
789
801
|
case "reverse":
|
|
790
802
|
case "copyWithin":
|
|
791
803
|
l = 0;
|
|
792
|
-
for (let y = 0; y <
|
|
804
|
+
for (let y = 0; y < u.length; y++) x(u[y], this.#e[y]) && s.push([
|
|
793
805
|
l + y,
|
|
794
806
|
this.#e[y],
|
|
795
|
-
|
|
807
|
+
u[y],
|
|
796
808
|
!0
|
|
797
809
|
]);
|
|
798
810
|
break;
|
|
799
811
|
case "set":
|
|
800
|
-
l = r[1],
|
|
812
|
+
l = r[1], s.push([
|
|
801
813
|
l,
|
|
802
814
|
r[0],
|
|
803
|
-
|
|
804
|
-
l in
|
|
815
|
+
u?.[l],
|
|
816
|
+
l in u
|
|
805
817
|
]);
|
|
806
818
|
break;
|
|
807
819
|
}
|
|
808
820
|
const o = p.get(this.#e);
|
|
809
|
-
return n?.length == 1 ? o?.trigger?.(l, n[0], null, "add") : n?.length > 1 && (o?.trigger?.(l, n, null, "addAll"), n.forEach((y, a) => o?.trigger?.(l + a, y, null, "add"))),
|
|
821
|
+
return n?.length == 1 ? o?.trigger?.(l, n[0], null, "add") : n?.length > 1 && (o?.trigger?.(l, n, null, "addAll"), n.forEach((y, a) => o?.trigger?.(l + a, y, null, "add"))), s?.length == 1 ? o?.trigger?.(s[0]?.[0] ?? l, s[0]?.[1], s[0]?.[2], s[0]?.[3] === !1 ? "add" : "set") : s?.length > 1 && (o?.trigger?.(l, s, u, "setAll"), s.forEach((y, a) => o?.trigger?.(y?.[0] ?? l + a, y?.[1], y?.[2], y?.[3] === !1 ? "add" : "set"))), i?.length == 1 ? o?.trigger?.(l, null, i[0], "delete") : i?.length > 1 && (o?.trigger?.(l, null, i, "deleteAll"), i.forEach((y, a) => o?.trigger?.(l + a, null, y, "delete"))), f == e ? new Proxy(f, this.#r) : Array.isArray(f) ? $e(f) : f;
|
|
810
822
|
}
|
|
811
|
-
},
|
|
823
|
+
}, zt = (e, t, r, n) => {
|
|
812
824
|
const i = Number.isInteger(r) && Number.isInteger(n) && n < r ? t.slice(n, r) : [];
|
|
813
|
-
if (!e[
|
|
814
|
-
const
|
|
815
|
-
i.length === 1 ?
|
|
816
|
-
const
|
|
817
|
-
if (
|
|
818
|
-
else if (
|
|
819
|
-
const l = Array(
|
|
820
|
-
|
|
825
|
+
if (!e[h] && r !== n) {
|
|
826
|
+
const s = p.get(t);
|
|
827
|
+
i.length === 1 ? s?.trigger?.(n, null, i[0], "delete") : i.length > 1 && (s?.trigger?.(n, null, i, "deleteAll"), i.forEach((l, f) => s?.trigger?.(n + f, null, l, "delete")));
|
|
828
|
+
const u = Number.isInteger(r) && Number.isInteger(n) && n > r ? n - r : 0;
|
|
829
|
+
if (u === 1) s?.trigger?.(r, void 0, null, "add");
|
|
830
|
+
else if (u > 1) {
|
|
831
|
+
const l = Array(u).fill(void 0);
|
|
832
|
+
s?.trigger?.(r, l, null, "addAll"), l.forEach((f, o) => s?.trigger?.(r + o, void 0, null, "add"));
|
|
821
833
|
}
|
|
822
834
|
}
|
|
823
|
-
},
|
|
824
|
-
[
|
|
835
|
+
}, Dt = class {
|
|
836
|
+
[h];
|
|
825
837
|
constructor() {
|
|
826
838
|
}
|
|
827
839
|
has(e, t) {
|
|
828
840
|
return Reflect.has(e, t);
|
|
829
841
|
}
|
|
830
842
|
get(e, t, r) {
|
|
831
|
-
const n =
|
|
843
|
+
const n = re(e, t);
|
|
832
844
|
if (n != null) return n;
|
|
833
845
|
if ([
|
|
834
846
|
g,
|
|
@@ -836,13 +848,13 @@ var H = (e, t) => {
|
|
|
836
848
|
"@target",
|
|
837
849
|
"deref"
|
|
838
850
|
].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ? c(e, t)?.bind?.(e) : c(e, t);
|
|
839
|
-
const i = p?.get?.(e),
|
|
840
|
-
if (u != null) return u;
|
|
841
|
-
const s = Re(e, t, i);
|
|
851
|
+
const i = p?.get?.(e), s = xe(e, t, i);
|
|
842
852
|
if (s != null) return s;
|
|
853
|
+
const u = we(e, t, i);
|
|
854
|
+
if (u != null) return u;
|
|
843
855
|
if (t == me) return pe.call(this, this);
|
|
844
856
|
if (t == D) return Oe(i, (f) => {
|
|
845
|
-
const o = f.key ?? f.name ?? 0, y =
|
|
857
|
+
const o = f.key ?? f.name ?? 0, y = z(f, "value", () => c(e, o)), a = z(f, "oldValue", () => {
|
|
846
858
|
});
|
|
847
859
|
return i?.trigger?.(o, y, a, Ae(f, "manual"));
|
|
848
860
|
});
|
|
@@ -855,36 +867,36 @@ var H = (e, t) => {
|
|
|
855
867
|
if (t == "g") return () => e?.g ?? e?.[1];
|
|
856
868
|
if (t == "b") return () => e?.b ?? e?.[2];
|
|
857
869
|
if (t == "a") return () => e?.a ?? e?.[3];
|
|
858
|
-
const l = c(e, t) ?? (t == "value" ? c(e,
|
|
859
|
-
return typeof l == "function" ? new Proxy(typeof l == "function" ? l?.bind?.(e) : l, new
|
|
870
|
+
const l = c(e, t) ?? (t == "value" ? c(e, d) : null);
|
|
871
|
+
return typeof l == "function" ? new Proxy(typeof l == "function" ? l?.bind?.(e) : l, new Nt(t, e, this)) : l;
|
|
860
872
|
}
|
|
861
873
|
set(e, t, r) {
|
|
862
|
-
if (typeof t != "symbol" && Number.isInteger(parseInt(t)) && (t = parseInt(t) ?? t), t ==
|
|
863
|
-
return this[
|
|
864
|
-
if (t ==
|
|
865
|
-
return delete this[
|
|
874
|
+
if (typeof t != "symbol" && Number.isInteger(parseInt(t)) && (t = parseInt(t) ?? t), t == h && r)
|
|
875
|
+
return this[h] = !!r, !0;
|
|
876
|
+
if (t == h && !r)
|
|
877
|
+
return delete this[h], !0;
|
|
866
878
|
const n = c(e, t), i = [
|
|
867
879
|
"x",
|
|
868
880
|
"y",
|
|
869
881
|
"z",
|
|
870
882
|
"w"
|
|
871
|
-
],
|
|
883
|
+
], s = [
|
|
872
884
|
"r",
|
|
873
885
|
"g",
|
|
874
886
|
"b",
|
|
875
887
|
"a"
|
|
876
|
-
],
|
|
888
|
+
], u = i.indexOf(t), l = s.indexOf(t);
|
|
877
889
|
let f = !1;
|
|
878
|
-
return
|
|
890
|
+
return u >= 0 ? f = Reflect.set(e, u, r) : l >= 0 ? f = Reflect.set(e, l, r) : f = Reflect.set(e, t, r), t == "length" && x(n, r) && zt(this, e, n, r), !this[h] && typeof t != "symbol" && x(n, r) && p?.get?.(e)?.trigger?.(t, r, n, "set"), f;
|
|
879
891
|
}
|
|
880
892
|
deleteProperty(e, t) {
|
|
881
|
-
if (typeof t != "symbol" && Number.isInteger(parseInt(t)) && (t = parseInt(t) ?? t), t ==
|
|
882
|
-
return delete this[
|
|
893
|
+
if (typeof t != "symbol" && Number.isInteger(parseInt(t)) && (t = parseInt(t) ?? t), t == h)
|
|
894
|
+
return delete this[h], !0;
|
|
883
895
|
const r = c(e, t), n = Reflect.deleteProperty(e, t);
|
|
884
|
-
return !this[
|
|
896
|
+
return !this[h] && t != "length" && t != h && typeof t != "symbol" && r != null && p.get(e)?.trigger?.(t, t, r, "delete"), n;
|
|
885
897
|
}
|
|
886
|
-
},
|
|
887
|
-
[
|
|
898
|
+
}, Bt = class {
|
|
899
|
+
[h];
|
|
888
900
|
constructor() {
|
|
889
901
|
}
|
|
890
902
|
get(e, t, r) {
|
|
@@ -899,23 +911,23 @@ var H = (e, t) => {
|
|
|
899
911
|
].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ? K(e, c(e, t)) : c(e, t);
|
|
900
912
|
const n = p.get(e) ?? p.get(c(e, "value") ?? e), i = xe(e, t, n);
|
|
901
913
|
if (i != null) return i;
|
|
902
|
-
c(e, t) == null && t != "value" &&
|
|
903
|
-
const
|
|
904
|
-
return
|
|
905
|
-
const l = Xe(e,
|
|
906
|
-
return n?.trigger?.(l, o, f, Ae(
|
|
907
|
-
}) : t == Symbol.toPrimitive ? (
|
|
914
|
+
c(e, t) == null && t != "value" && I(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e);
|
|
915
|
+
const s = we(e, t, n);
|
|
916
|
+
return s ?? (t == me ? pe.call(this, this) : t == D ? Oe(n, (u) => {
|
|
917
|
+
const l = Xe(e, u.key ?? u.name ?? be(e) ?? "value"), f = z(u, "oldValue", () => l == "value" || l == be(e) ? c(e, d) : void 0), o = z(u, "value", () => Ct(e, l));
|
|
918
|
+
return n?.trigger?.(l, o, f, Ae(u, "manual"));
|
|
919
|
+
}) : t == Symbol.toPrimitive ? (u) => {
|
|
908
920
|
const l = H(e, t);
|
|
909
|
-
return c(l, t) ? c(l, t)?.(
|
|
921
|
+
return c(l, t) ? c(l, t)?.(u) : m(l) ? E(l, u) : m(c(l, "value")) ? E(c(l, "value"), u) : E(c(l, "value") ?? l, u);
|
|
910
922
|
} : t == Symbol.toStringTag ? () => {
|
|
911
|
-
const
|
|
912
|
-
return c(
|
|
923
|
+
const u = H(e, t);
|
|
924
|
+
return c(u, t) ? c(u, t)?.() : m(u) ? String(u ?? "") || "" : m(c(u, "value")) ? String(c(u, "value") ?? "") || "" : String(c(u, "value") ?? u ?? "") || "";
|
|
913
925
|
} : t == "toString" ? () => {
|
|
914
|
-
const
|
|
915
|
-
return c(
|
|
926
|
+
const u = H(e, t);
|
|
927
|
+
return c(u, t) ? c(u, t)?.() : c(u, Symbol.toStringTag) ? c(u, Symbol.toStringTag)?.() : m(u) ? String(u ?? "") || "" : m(c(u, "value")) ? String(c(u, "value") ?? "") || "" : String(c(u, "value") ?? u ?? "") || "";
|
|
916
928
|
} : t == "valueOf" ? () => {
|
|
917
|
-
const
|
|
918
|
-
return c(
|
|
929
|
+
const u = H(e, t);
|
|
930
|
+
return c(u, t) ? c(u, t)?.() : c(u, Symbol.toPrimitive) ? c(u, Symbol.toPrimitive)?.() : m(u) ? u : m(c(u, "value")) ? c(u, "value") : c(u, "value") ?? u;
|
|
919
931
|
} : typeof t == "symbol" && (t in e || c(e, t) != null) ? c(e, t) : H(e, t));
|
|
920
932
|
}
|
|
921
933
|
apply(e, t, r) {
|
|
@@ -933,11 +945,11 @@ var H = (e, t) => {
|
|
|
933
945
|
getOwnPropertyDescriptor(e, t) {
|
|
934
946
|
let r;
|
|
935
947
|
try {
|
|
936
|
-
|
|
948
|
+
R?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), R?.get?.(e)?.has?.(t) && (r = void 0), r = Reflect.getOwnPropertyDescriptor(e, t);
|
|
937
949
|
} catch {
|
|
938
950
|
r = void 0;
|
|
939
951
|
} finally {
|
|
940
|
-
|
|
952
|
+
R?.get?.(e)?.delete?.(t);
|
|
941
953
|
}
|
|
942
954
|
return r;
|
|
943
955
|
}
|
|
@@ -945,47 +957,47 @@ var H = (e, t) => {
|
|
|
945
957
|
return t in e;
|
|
946
958
|
}
|
|
947
959
|
set(e, t, r) {
|
|
948
|
-
const n =
|
|
949
|
-
return n ??
|
|
950
|
-
const
|
|
951
|
-
if (
|
|
952
|
-
if (t ==
|
|
953
|
-
return this[
|
|
954
|
-
if (t ==
|
|
955
|
-
return delete this[
|
|
956
|
-
const
|
|
957
|
-
if (c(e, t) == null && t != "value" &&
|
|
958
|
-
const l = Xe(e, t), f = t == "value" ? c(e,
|
|
960
|
+
const n = re(e, t);
|
|
961
|
+
return n ?? at(r, (i) => {
|
|
962
|
+
const s = re(i, t);
|
|
963
|
+
if (s != null) return s;
|
|
964
|
+
if (t == h && r)
|
|
965
|
+
return this[h] = !!r, !0;
|
|
966
|
+
if (t == h && !r)
|
|
967
|
+
return delete this[h], !0;
|
|
968
|
+
const u = e;
|
|
969
|
+
if (c(e, t) == null && t != "value" && I(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e), typeof t == "symbol" && !(c(e, t) != null && t in e)) return;
|
|
970
|
+
const l = Xe(e, t), f = t == "value" ? c(e, d) ?? c(e, t) : c(e, t);
|
|
959
971
|
e[t] = i;
|
|
960
972
|
const o = c(e, t) ?? i;
|
|
961
|
-
return !this[
|
|
973
|
+
return !this[h] && typeof t != "symbol" && (c(e, At) ?? x)?.(f, o) && (p.get(e) ?? p.get(u))?.trigger?.(l, i, f), !0;
|
|
962
974
|
});
|
|
963
975
|
}
|
|
964
976
|
defineProperty(e, t, r) {
|
|
965
|
-
const n =
|
|
977
|
+
const n = re(e, t);
|
|
966
978
|
if (n != null) return n;
|
|
967
|
-
if (t ==
|
|
968
|
-
return this[
|
|
969
|
-
if (t ==
|
|
970
|
-
return delete this[
|
|
971
|
-
if (c(e, t) == null && t != "value" &&
|
|
972
|
-
const i = c(e, t),
|
|
979
|
+
if (t == h && r.value)
|
|
980
|
+
return this[h] = !!r.value, !0;
|
|
981
|
+
if (t == h && !r.value)
|
|
982
|
+
return delete this[h], !0;
|
|
983
|
+
if (c(e, t) == null && t != "value" && I(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e), r.get == null && r.set == null) return Reflect.defineProperty(e, t, r);
|
|
984
|
+
const i = c(e, t), s = Reflect.defineProperty(e, t, {
|
|
973
985
|
get: r.get,
|
|
974
986
|
set: r.set,
|
|
975
987
|
enumerable: r.enumerable ?? !0,
|
|
976
988
|
configurable: r.configurable ?? !0
|
|
977
989
|
});
|
|
978
|
-
return
|
|
990
|
+
return _t(e, t, i), s;
|
|
979
991
|
}
|
|
980
992
|
deleteProperty(e, t) {
|
|
981
|
-
if (t ==
|
|
982
|
-
return delete this[
|
|
983
|
-
c(e, t) == null && t != "value" &&
|
|
993
|
+
if (t == h)
|
|
994
|
+
return delete this[h], !0;
|
|
995
|
+
c(e, t) == null && t != "value" && I(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e);
|
|
984
996
|
const r = c(e, t), n = Reflect.deleteProperty(e, t);
|
|
985
|
-
return !this[
|
|
997
|
+
return !this[h] && t != h && typeof t != "symbol" && p.get(e)?.trigger?.(t, null, r, "delete"), n;
|
|
986
998
|
}
|
|
987
|
-
},
|
|
988
|
-
[
|
|
999
|
+
}, Ft = class {
|
|
1000
|
+
[h];
|
|
989
1001
|
constructor() {
|
|
990
1002
|
}
|
|
991
1003
|
get(e, t, r) {
|
|
@@ -997,33 +1009,33 @@ var H = (e, t) => {
|
|
|
997
1009
|
].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ? K(e, c(e, t)) : c(e, t);
|
|
998
1010
|
const n = p.get(e), i = xe(e, t, n);
|
|
999
1011
|
if (i != null) return i;
|
|
1000
|
-
const
|
|
1001
|
-
if (
|
|
1012
|
+
const s = we(e, t, n);
|
|
1013
|
+
if (s != null) return s;
|
|
1002
1014
|
e = c(e, g) ?? c(e, $) ?? e;
|
|
1003
|
-
const
|
|
1004
|
-
return typeof t == "symbol" && (t in e || c(e, t) != null) ?
|
|
1015
|
+
const u = K(e, c(e, t));
|
|
1016
|
+
return typeof t == "symbol" && (t in e || c(e, t) != null) ? u : t == me ? pe.call(this, this) : t == D ? Oe(n, (l) => {
|
|
1005
1017
|
const f = l.key ?? l.name;
|
|
1006
1018
|
if (f == null) return;
|
|
1007
|
-
const o =
|
|
1019
|
+
const o = z(l, "value", () => e.get(f));
|
|
1008
1020
|
if (o == null && !W(l, "value")) return;
|
|
1009
|
-
const y =
|
|
1021
|
+
const y = z(l, "oldValue", () => {
|
|
1010
1022
|
});
|
|
1011
1023
|
return n?.trigger?.(f, o, y, Ae(l, "manual"));
|
|
1012
1024
|
}) : t == "clear" ? () => {
|
|
1013
|
-
const l = Array.from(e?.entries?.() || []), f =
|
|
1025
|
+
const l = Array.from(e?.entries?.() || []), f = u();
|
|
1014
1026
|
return l.forEach(([o, y]) => {
|
|
1015
|
-
this[
|
|
1027
|
+
this[h] || p.get(e)?.trigger?.(o, null, y, "delete");
|
|
1016
1028
|
}), f;
|
|
1017
1029
|
} : t == "delete" ? (l, f = null) => {
|
|
1018
|
-
const o = e.has(l), y = e.get(l), a =
|
|
1019
|
-
return !this[
|
|
1020
|
-
} : t == "set" ? (l, f) =>
|
|
1021
|
-
const y = e.has(l), a = e.get(l), v =
|
|
1022
|
-
return (!y || x(a, o)) && (this[
|
|
1023
|
-
}) :
|
|
1030
|
+
const o = e.has(l), y = e.get(l), a = u(l);
|
|
1031
|
+
return !this[h] && o && p.get(e)?.trigger?.(l, null, y, "delete"), a;
|
|
1032
|
+
} : t == "set" ? (l, f) => ht(f, (o) => {
|
|
1033
|
+
const y = e.has(l), a = e.get(l), v = u(l, o);
|
|
1034
|
+
return (!y || x(a, o)) && (this[h] || p.get(e)?.trigger?.(l, o, y ? a : null, y ? "set" : "add")), v;
|
|
1035
|
+
}) : u;
|
|
1024
1036
|
}
|
|
1025
1037
|
set(e, t, r) {
|
|
1026
|
-
return t ==
|
|
1038
|
+
return t == h ? (this[h] = !!r, !0) : t == h && !r ? (delete this[h], !0) : Reflect.set(e, t, r);
|
|
1027
1039
|
}
|
|
1028
1040
|
has(e, t) {
|
|
1029
1041
|
return Reflect.has(e, t);
|
|
@@ -1043,19 +1055,19 @@ var H = (e, t) => {
|
|
|
1043
1055
|
getOwnPropertyDescriptor(e, t) {
|
|
1044
1056
|
let r;
|
|
1045
1057
|
try {
|
|
1046
|
-
|
|
1058
|
+
R?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), R?.get?.(e)?.has?.(t) && (r = void 0), r = Reflect.getOwnPropertyDescriptor(e, t);
|
|
1047
1059
|
} catch {
|
|
1048
1060
|
r = void 0;
|
|
1049
1061
|
} finally {
|
|
1050
|
-
|
|
1062
|
+
R?.get?.(e)?.delete?.(t);
|
|
1051
1063
|
}
|
|
1052
1064
|
return r;
|
|
1053
1065
|
}
|
|
1054
1066
|
deleteProperty(e, t) {
|
|
1055
|
-
return t ==
|
|
1067
|
+
return t == h ? (delete this[h], !0) : Reflect.deleteProperty(e, t);
|
|
1056
1068
|
}
|
|
1057
|
-
},
|
|
1058
|
-
[
|
|
1069
|
+
}, Ht = class {
|
|
1070
|
+
[h] = !1;
|
|
1059
1071
|
constructor() {
|
|
1060
1072
|
}
|
|
1061
1073
|
get(e, t, r) {
|
|
@@ -1067,31 +1079,31 @@ var H = (e, t) => {
|
|
|
1067
1079
|
].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ? K(e, c(e, t)) : c(e, t);
|
|
1068
1080
|
const n = p.get(e), i = xe(e, t, n);
|
|
1069
1081
|
if (i != null) return i;
|
|
1070
|
-
const
|
|
1071
|
-
if (
|
|
1082
|
+
const s = we(e, t, n);
|
|
1083
|
+
if (s != null) return s;
|
|
1072
1084
|
e = c(e, g) ?? c(e, $) ?? e;
|
|
1073
|
-
const
|
|
1074
|
-
return typeof t == "symbol" && (t in e || c(e, t) != null) ?
|
|
1085
|
+
const u = K(e, c(e, t));
|
|
1086
|
+
return typeof t == "symbol" && (t in e || c(e, t) != null) ? u : t == me ? pe.call(this, this) : t == D ? Oe(n, (l) => {
|
|
1075
1087
|
const f = l.key ?? l.name;
|
|
1076
1088
|
if (f == null) return;
|
|
1077
|
-
const o =
|
|
1089
|
+
const o = z(l, "value", () => e.has(f)), y = z(l, "oldValue", () => {
|
|
1078
1090
|
});
|
|
1079
1091
|
return n?.trigger?.(f, o, y, Ae(l, "manual"));
|
|
1080
1092
|
}) : t == "clear" ? () => {
|
|
1081
|
-
const l = Array.from(e?.values?.() || []), f =
|
|
1093
|
+
const l = Array.from(e?.values?.() || []), f = u();
|
|
1082
1094
|
return l.forEach((o) => {
|
|
1083
|
-
this[
|
|
1095
|
+
this[h] || p.get(e)?.trigger?.(null, null, o, "delete");
|
|
1084
1096
|
}), f;
|
|
1085
1097
|
} : t == "delete" ? (l) => {
|
|
1086
|
-
const f = e.has(l), o = f ? l : null, y =
|
|
1087
|
-
return !this[
|
|
1098
|
+
const f = e.has(l), o = f ? l : null, y = u(l);
|
|
1099
|
+
return !this[h] && f && p.get(e)?.trigger?.(l, null, o, "delete"), y;
|
|
1088
1100
|
} : t == "add" ? (l) => {
|
|
1089
|
-
const f = e.has(l), o = f ? l : null, y =
|
|
1090
|
-
return f || this[
|
|
1091
|
-
} :
|
|
1101
|
+
const f = e.has(l), o = f ? l : null, y = u(l);
|
|
1102
|
+
return f || this[h] || p.get(e)?.trigger?.(l, l, o, "add"), y;
|
|
1103
|
+
} : u;
|
|
1092
1104
|
}
|
|
1093
1105
|
set(e, t, r) {
|
|
1094
|
-
return t ==
|
|
1106
|
+
return t == h && r ? (this[h] = !!r, !0) : t == h && !r ? (delete this[h], !0) : Reflect.set(e, t, r);
|
|
1095
1107
|
}
|
|
1096
1108
|
has(e, t) {
|
|
1097
1109
|
return Reflect.has(e, t);
|
|
@@ -1111,77 +1123,77 @@ var H = (e, t) => {
|
|
|
1111
1123
|
getOwnPropertyDescriptor(e, t) {
|
|
1112
1124
|
let r;
|
|
1113
1125
|
try {
|
|
1114
|
-
|
|
1126
|
+
R?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), R?.get?.(e)?.has?.(t) && (r = void 0), r = Reflect.getOwnPropertyDescriptor(e, t);
|
|
1115
1127
|
} catch {
|
|
1116
1128
|
r = void 0;
|
|
1117
1129
|
} finally {
|
|
1118
|
-
|
|
1130
|
+
R?.get?.(e)?.delete?.(t);
|
|
1119
1131
|
}
|
|
1120
1132
|
return r;
|
|
1121
1133
|
}
|
|
1122
1134
|
deleteProperty(e, t) {
|
|
1123
|
-
return t ==
|
|
1135
|
+
return t == h ? (delete this[h], !0) : Reflect.deleteProperty(e, t);
|
|
1124
1136
|
}
|
|
1125
|
-
},
|
|
1137
|
+
}, Z = (e) => !!((typeof e == "object" || typeof e == "function") && e != null && (e?.[g] || e?.[ue])), $e = (e) => Z(e) ? e : ce(e, new Dt()), Kt = (e) => Z(e) ? e : ce(e, new Bt()), Gt = (e) => Z(e) ? e : ce(e, new Ft()), qt = (e) => Z(e) ? e : ce(e, new Ht()), Ut = (e, t) => {
|
|
1126
1138
|
const r = e instanceof Promise || typeof e?.then == "function", n = P({
|
|
1127
|
-
[
|
|
1128
|
-
[
|
|
1139
|
+
[oe]: r ? e : null,
|
|
1140
|
+
[d]: r ? 0 : Number(V(e) || 0) || 0,
|
|
1129
1141
|
[G]: t,
|
|
1130
1142
|
[Symbol?.toStringTag]() {
|
|
1131
|
-
return String(this?.[
|
|
1143
|
+
return String(this?.[d] ?? "") || "";
|
|
1132
1144
|
},
|
|
1133
1145
|
[Symbol?.toPrimitive](i) {
|
|
1134
|
-
return E((typeof this?.[
|
|
1146
|
+
return E((typeof this?.[d] != "object" ? this?.[d] : this?.[d]?.value || 0) ?? 0, i);
|
|
1135
1147
|
},
|
|
1136
1148
|
set value(i) {
|
|
1137
|
-
this[
|
|
1149
|
+
this[d] = (i != null && !Number.isNaN(i) ? Number(i) : this[d]) || 0;
|
|
1138
1150
|
},
|
|
1139
1151
|
get value() {
|
|
1140
|
-
return Number(this[
|
|
1152
|
+
return Number(this[d] || 0) || 0;
|
|
1141
1153
|
}
|
|
1142
1154
|
});
|
|
1143
1155
|
return e?.then?.((i) => n.value = i), n;
|
|
1144
|
-
},
|
|
1156
|
+
}, Jt = (e, t) => {
|
|
1145
1157
|
const r = e instanceof Promise || typeof e?.then == "function", n = P({
|
|
1146
|
-
[
|
|
1147
|
-
[
|
|
1158
|
+
[oe]: r ? e : null,
|
|
1159
|
+
[d]: (r ? "" : String(V(typeof e == "number" ? String(e) : e || ""))) ?? "",
|
|
1148
1160
|
[G]: t,
|
|
1149
1161
|
[Symbol?.toStringTag]() {
|
|
1150
|
-
return String(this?.[
|
|
1162
|
+
return String(this?.[d] ?? "") ?? "";
|
|
1151
1163
|
},
|
|
1152
1164
|
[Symbol?.toPrimitive](i) {
|
|
1153
|
-
return E(this?.[
|
|
1165
|
+
return E(this?.[d] ?? "", i);
|
|
1154
1166
|
},
|
|
1155
1167
|
set value(i) {
|
|
1156
|
-
this[
|
|
1168
|
+
this[d] = String(typeof i == "number" ? String(i) : i || "") ?? "";
|
|
1157
1169
|
},
|
|
1158
1170
|
get value() {
|
|
1159
|
-
return String(this[
|
|
1171
|
+
return String(this[d] ?? "") ?? "";
|
|
1160
1172
|
}
|
|
1161
1173
|
});
|
|
1162
1174
|
return e?.then?.((i) => n.value = i), n;
|
|
1163
|
-
},
|
|
1175
|
+
}, Qt = (e, t) => {
|
|
1164
1176
|
const r = e instanceof Promise || typeof e?.then == "function", n = P({
|
|
1165
|
-
[
|
|
1166
|
-
[
|
|
1177
|
+
[oe]: r ? e : null,
|
|
1178
|
+
[d]: (r ? !1 : (V(e) != null ? typeof V(e) == "string" ? !0 : !!V(e) : !1) || !1) || !1,
|
|
1167
1179
|
[G]: t,
|
|
1168
1180
|
[Symbol?.toStringTag]() {
|
|
1169
|
-
return String(this?.[
|
|
1181
|
+
return String(this?.[d] ?? "") || "";
|
|
1170
1182
|
},
|
|
1171
1183
|
[Symbol?.toPrimitive](i) {
|
|
1172
|
-
return E(!!this?.[
|
|
1184
|
+
return E(!!this?.[d] || !1, i);
|
|
1173
1185
|
},
|
|
1174
1186
|
set value(i) {
|
|
1175
|
-
this[
|
|
1187
|
+
this[d] = (i != null ? typeof i == "string" ? !0 : !!i : this[d]) || !1;
|
|
1176
1188
|
},
|
|
1177
1189
|
get value() {
|
|
1178
|
-
return this[
|
|
1190
|
+
return this[d] || !1;
|
|
1179
1191
|
}
|
|
1180
1192
|
});
|
|
1181
1193
|
return e?.then?.((i) => n.value = i), n;
|
|
1182
1194
|
}, Ye = (e, t) => {
|
|
1183
1195
|
const r = e instanceof Promise || typeof e?.then == "function", n = P({
|
|
1184
|
-
[
|
|
1196
|
+
[oe]: r ? e : null,
|
|
1185
1197
|
[G]: t,
|
|
1186
1198
|
[Symbol?.toStringTag]() {
|
|
1187
1199
|
return String(this.value ?? "") || "";
|
|
@@ -1197,14 +1209,14 @@ var H = (e, t) => {
|
|
|
1197
1209
|
}, Te = (e, t) => {
|
|
1198
1210
|
if (e == null || typeof e != "object" && typeof e != "function") return e;
|
|
1199
1211
|
try {
|
|
1200
|
-
Object.defineProperty(e,
|
|
1212
|
+
Object.defineProperty(e, de, {
|
|
1201
1213
|
value: t,
|
|
1202
1214
|
writable: !0,
|
|
1203
1215
|
configurable: !0
|
|
1204
1216
|
});
|
|
1205
1217
|
} catch {
|
|
1206
1218
|
try {
|
|
1207
|
-
e[
|
|
1219
|
+
e[de] = t;
|
|
1208
1220
|
} catch {
|
|
1209
1221
|
}
|
|
1210
1222
|
}
|
|
@@ -1221,144 +1233,144 @@ var H = (e, t) => {
|
|
|
1221
1233
|
}
|
|
1222
1234
|
}
|
|
1223
1235
|
return e;
|
|
1224
|
-
},
|
|
1236
|
+
}, Xt = (e, t = "value", r, n) => {
|
|
1225
1237
|
if (m(e) || !e) return e;
|
|
1226
|
-
Array.isArray(e) && e.length == 2 && e[0] != null && (e[0] instanceof Map || e[0] instanceof WeakMap || e[0] instanceof Set || e[0] instanceof WeakSet) ? ((t == null || t === "value") && (t = e[1]), e = e[0]) : Array.isArray(e) && !
|
|
1227
|
-
const i = e instanceof Map || e instanceof WeakMap,
|
|
1228
|
-
if (i ||
|
|
1238
|
+
Array.isArray(e) && e.length == 2 && e[0] != null && (e[0] instanceof Map || e[0] instanceof WeakMap || e[0] instanceof Set || e[0] instanceof WeakSet) ? ((t == null || t === "value") && (t = e[1]), e = e[0]) : Array.isArray(e) && !le(e?.[1], e) && (Array.isArray(e?.[0]) || typeof e?.[0] == "object" || typeof e?.[0] == "function") && (e = e?.[0]);
|
|
1239
|
+
const i = e instanceof Map || e instanceof WeakMap, s = e instanceof Set || e instanceof WeakSet;
|
|
1240
|
+
if (i || s) {
|
|
1229
1241
|
if (t == null) return;
|
|
1230
|
-
} else if ((t ??= Array.isArray(e) ? null : "value") == null ||
|
|
1231
|
-
const
|
|
1232
|
-
i && r !== void 0 && !e.has(t) ? e.set(t, r) :
|
|
1233
|
-
const f =
|
|
1234
|
-
if (!
|
|
1235
|
-
if (!i && !
|
|
1236
|
-
!i && !
|
|
1242
|
+
} else if ((t ??= Array.isArray(e) ? null : "value") == null || le(t, e)) return;
|
|
1243
|
+
const u = () => i ? e.get(t) : s ? e.has(t) : e?.[t], l = (a) => i ? (e.set(t, a), a) : s ? (a ? e.add(t) : e.delete(t), e.has(t)) : e[t] = a;
|
|
1244
|
+
i && r !== void 0 && !e.has(t) ? e.set(t, r) : s && r && !e.has(t) && e.add(t);
|
|
1245
|
+
const f = u();
|
|
1246
|
+
if (!s && t != null && I(f) && C(f)) return Te(jt(f), t);
|
|
1247
|
+
if (!i && !s && t && typeof e?.getProperty == "function" && C(e?.getProperty?.(t))) return Te(e?.getProperty?.(t), t);
|
|
1248
|
+
!i && !s && (e[t] ??= r ?? e[t]);
|
|
1237
1249
|
const o = P({
|
|
1238
|
-
[
|
|
1250
|
+
[d]: s ? !!u() : u() ?? r,
|
|
1239
1251
|
[G]: n,
|
|
1240
1252
|
[Symbol?.toStringTag]() {
|
|
1241
|
-
return String(
|
|
1253
|
+
return String(u() ?? this[d] ?? "") || "";
|
|
1242
1254
|
},
|
|
1243
1255
|
[Symbol?.toPrimitive](a) {
|
|
1244
|
-
return E(
|
|
1256
|
+
return E(u(), a);
|
|
1245
1257
|
},
|
|
1246
1258
|
set value(a) {
|
|
1247
|
-
if (o[
|
|
1259
|
+
if (o[X] = !0, s) this[d] = l(a);
|
|
1248
1260
|
else {
|
|
1249
|
-
const v = a ??
|
|
1250
|
-
this[
|
|
1261
|
+
const v = a ?? dt(u());
|
|
1262
|
+
this[d] = l(v);
|
|
1251
1263
|
}
|
|
1252
|
-
o[
|
|
1264
|
+
o[X] = !1;
|
|
1253
1265
|
},
|
|
1254
1266
|
get value() {
|
|
1255
|
-
const a =
|
|
1256
|
-
return this[
|
|
1267
|
+
const a = u();
|
|
1268
|
+
return this[d] = s ? !!a : a ?? this[d];
|
|
1257
1269
|
}
|
|
1258
1270
|
});
|
|
1259
1271
|
Te(o, t);
|
|
1260
|
-
const y = b(e, (a, v, A,
|
|
1272
|
+
const y = b(e, (a, v, A, w) => {
|
|
1261
1273
|
if (v === t) {
|
|
1262
|
-
const O =
|
|
1274
|
+
const O = s ? a != null : a, k = s ? A != null : A;
|
|
1263
1275
|
o?.[D]?.({
|
|
1264
1276
|
key: t,
|
|
1265
1277
|
value: O,
|
|
1266
1278
|
oldValue: k,
|
|
1267
|
-
trigger:
|
|
1279
|
+
trigger: w
|
|
1268
1280
|
});
|
|
1269
1281
|
}
|
|
1270
1282
|
});
|
|
1271
|
-
return
|
|
1272
|
-
},
|
|
1283
|
+
return M(o, Symbol.dispose, y), o;
|
|
1284
|
+
}, Yt = (e, t) => {
|
|
1273
1285
|
switch (typeof e) {
|
|
1274
1286
|
case "boolean":
|
|
1275
|
-
return
|
|
1287
|
+
return Qt(e, t);
|
|
1276
1288
|
case "number":
|
|
1277
|
-
return
|
|
1289
|
+
return Ut(e, t);
|
|
1278
1290
|
case "string":
|
|
1279
|
-
return
|
|
1291
|
+
return Jt(e, t);
|
|
1280
1292
|
case "object":
|
|
1281
1293
|
if (e != null) return Ye(P(e), t);
|
|
1282
1294
|
default:
|
|
1283
1295
|
return Ye(e, t);
|
|
1284
1296
|
}
|
|
1285
|
-
},
|
|
1286
|
-
const n =
|
|
1287
|
-
return t != null ?
|
|
1288
|
-
},
|
|
1297
|
+
}, Zt = (e, t = "value", r) => {
|
|
1298
|
+
const n = C(e) ? e : Yt(e, r);
|
|
1299
|
+
return t != null ? Xt(n, t, r) : n;
|
|
1300
|
+
}, pr = (e, t) => Zt(e, t), Ne = (e, t, r = 100) => {
|
|
1289
1301
|
if (e?.value ?? e) return setTimeout(() => {
|
|
1290
1302
|
e.value && t?.();
|
|
1291
1303
|
}, r);
|
|
1292
|
-
},
|
|
1293
|
-
let i =
|
|
1304
|
+
}, mr = (e = 100) => (t, [r], [n]) => {
|
|
1305
|
+
let i = Ne(r, t, e);
|
|
1294
1306
|
n?.addEventListener?.("abort", () => {
|
|
1295
1307
|
i && clearTimeout(i);
|
|
1296
1308
|
}, { once: !0 });
|
|
1297
|
-
},
|
|
1298
|
-
let i =
|
|
1309
|
+
}, gr = (e = 100) => (t, [r], [n]) => {
|
|
1310
|
+
let i = Ne(r, t, e);
|
|
1299
1311
|
n?.addEventListener?.("abort", () => {
|
|
1300
1312
|
i && clearTimeout(i);
|
|
1301
1313
|
}, { once: !0 }), i || t?.();
|
|
1302
1314
|
};
|
|
1303
1315
|
function P(e, t) {
|
|
1304
|
-
if (e == null || typeof e == "symbol" || !(typeof e == "object" || typeof e == "function") ||
|
|
1316
|
+
if (e == null || typeof e == "symbol" || !(typeof e == "object" || typeof e == "function") || Z(e) || (e = V?.(e)) == null || e instanceof Promise || e instanceof WeakRef || Z(e)) return e;
|
|
1305
1317
|
const r = e;
|
|
1306
1318
|
if (r == null || typeof r == "symbol" || !(typeof r == "object" || typeof r == "function") || r instanceof Promise || r instanceof WeakRef) return r;
|
|
1307
1319
|
let n = r;
|
|
1308
|
-
return Array.isArray(r) ? (n = $e(r), n) : r instanceof Map ? (n =
|
|
1320
|
+
return Array.isArray(r) ? (n = $e(r), n) : r instanceof Map ? (n = Gt(r), n) : r instanceof Set ? (n = qt(r), n) : ((typeof r == "function" || typeof r == "object") && (n = Kt(r)), n);
|
|
1309
1321
|
}
|
|
1310
|
-
var
|
|
1322
|
+
var C = (e) => typeof HTMLInputElement < "u" && e instanceof HTMLInputElement ? !0 : !!((typeof e == "object" || typeof e == "function") && e != null && (e?.[g] || e?.[ue] || p?.has?.(e))), jt = (e) => C(e) ? P(e) : null, Ar = (e) => {
|
|
1311
1323
|
if (e == null || typeof e != "object" && typeof e != "function" || e?.[Symbol.observable] != null) return e;
|
|
1312
1324
|
try {
|
|
1313
1325
|
e[Symbol.observable] = self?.compatible;
|
|
1314
1326
|
} catch {
|
|
1315
1327
|
console.warn("Unable to assign <[Symbol.observable]>, object will not observable by other frameworks");
|
|
1316
1328
|
}
|
|
1317
|
-
return e[
|
|
1329
|
+
return e[ue] = (t, r, n) => {
|
|
1318
1330
|
const i = e?.[Symbol?.observable];
|
|
1319
1331
|
return i?.()?.affected?.(t, r, n), () => i?.()?.unaffected?.(t, r);
|
|
1320
1332
|
}, e;
|
|
1321
|
-
},
|
|
1333
|
+
}, U = /* @__PURE__ */ new WeakMap(), ze = (e) => {
|
|
1322
1334
|
if (!(typeof e == "symbol" || e == null || !(typeof e == "object" || typeof e == "function")))
|
|
1323
1335
|
return e;
|
|
1324
1336
|
}, Se = "initial", De = (e) => {
|
|
1325
|
-
const t = e?.[
|
|
1326
|
-
return
|
|
1337
|
+
const t = e?.[de] ?? e?.realProp;
|
|
1338
|
+
return N(t) ? t : null;
|
|
1327
1339
|
}, Be = (e, t) => {
|
|
1328
1340
|
const r = De(e);
|
|
1329
1341
|
return r != null && (t == null || t == "value") ? r : t;
|
|
1330
|
-
},
|
|
1342
|
+
}, Lt = (e, t) => t != null && t == De(e) ? e?.value : e?.[t], _e = (e, t, r, n) => {
|
|
1331
1343
|
if (t != null && t == De(e)) {
|
|
1332
|
-
const i =
|
|
1344
|
+
const i = Lt(e, t);
|
|
1333
1345
|
if (i != null) return r?.(i, t, null, "set");
|
|
1334
1346
|
}
|
|
1335
1347
|
return ae(e, t, r, n);
|
|
1336
|
-
},
|
|
1348
|
+
}, ot = (e, t, r) => {
|
|
1337
1349
|
const n = ge(t);
|
|
1338
1350
|
if (r == Se) {
|
|
1339
1351
|
if (!n.triggerImmediately) return;
|
|
1340
|
-
} else if (!
|
|
1341
|
-
return (i,
|
|
1342
|
-
},
|
|
1343
|
-
if (!e || !
|
|
1352
|
+
} else if (!Q(n.affectTypes, r)) return;
|
|
1353
|
+
return (i, s, u, ...l) => e?.(i, s, u, r, ...l);
|
|
1354
|
+
}, er = (e, t, r, n = ["*"]) => {
|
|
1355
|
+
if (!e || !ze(e)) return;
|
|
1344
1356
|
const i = t != Symbol.iterator ? Be(e, t) : null;
|
|
1345
|
-
let
|
|
1357
|
+
let s = e?.[se] ?? p.get(e);
|
|
1346
1358
|
e = e?.[g] ?? e, queueMicrotask(() => {
|
|
1347
|
-
const l =
|
|
1359
|
+
const l = ot(r, n, Se);
|
|
1348
1360
|
l && (i != null && i != Symbol.iterator ? _e(e, i, l, null) : Ve(e, l, null));
|
|
1349
1361
|
});
|
|
1350
|
-
let
|
|
1351
|
-
return e?.[Symbol.dispose] || (
|
|
1352
|
-
},
|
|
1353
|
-
const i = ge(n).affectTypes,
|
|
1354
|
-
let
|
|
1362
|
+
let u = s?.affected?.(r, i, n);
|
|
1363
|
+
return e?.[Symbol.dispose] || (M(u, Symbol.dispose, u), M(u, Symbol.asyncDispose, u), M(e, Symbol.dispose, u), M(e, Symbol.asyncDispose, u)), u;
|
|
1364
|
+
}, tr = (e, t, r, n = ["*"]) => {
|
|
1365
|
+
const i = ge(n).affectTypes, s = {};
|
|
1366
|
+
let u = e?.value;
|
|
1355
1367
|
const l = (f) => {
|
|
1356
1368
|
const o = f?.target?.value;
|
|
1357
|
-
|
|
1369
|
+
Q(i, "set") && r?.(o, "value", u, "set", f), u = o;
|
|
1358
1370
|
};
|
|
1359
|
-
return e?.addEventListener?.("change", l,
|
|
1360
|
-
},
|
|
1361
|
-
if (
|
|
1371
|
+
return e?.addEventListener?.("change", l, s), () => e?.removeEventListener?.("change", l, s);
|
|
1372
|
+
}, ne = (e) => Array.isArray(e) && e?.length == 2 && ze(e?.[0]) && (N(e?.[1]) || e?.[1] == Symbol.iterator), rr = (e) => !!e && typeof e == "object" && !Array.isArray(e) && ("affectTypes" in e || "triggers" in e || "triggerImmediately" in e), nr = (e) => e == null ? [] : Array.isArray(e) && !ne(e) && !C(e) ? e : [e], ir = (e) => {
|
|
1373
|
+
if (ne(e)) {
|
|
1362
1374
|
const t = e?.[0];
|
|
1363
1375
|
return {
|
|
1364
1376
|
source: e,
|
|
@@ -1371,51 +1383,51 @@ var z = (e) => typeof HTMLInputElement < "u" && e instanceof HTMLInputElement ?
|
|
|
1371
1383
|
target: e,
|
|
1372
1384
|
prop: null
|
|
1373
1385
|
};
|
|
1374
|
-
},
|
|
1386
|
+
}, lr = (e, t, r, n, i, s, u) => ({
|
|
1375
1387
|
source: e,
|
|
1376
1388
|
target: t,
|
|
1377
1389
|
value: r,
|
|
1378
1390
|
prop: n,
|
|
1379
1391
|
name: n,
|
|
1380
1392
|
oldValue: i,
|
|
1381
|
-
trigger:
|
|
1382
|
-
args:
|
|
1383
|
-
}),
|
|
1384
|
-
const i =
|
|
1393
|
+
trigger: s,
|
|
1394
|
+
args: u
|
|
1395
|
+
}), sr = (e, t, r, n = ["*"]) => {
|
|
1396
|
+
const i = N(e?.[1]) ? e?.[1] : null;
|
|
1385
1397
|
return b(e?.[0], i, r, n);
|
|
1386
|
-
},
|
|
1398
|
+
}, ur = (e, t, r, n = ["*"]) => e?.then?.((i) => b?.(i, t, r, n))?.catch?.((i) => (console.warn(i), null)), b = (e, t, r = () => {
|
|
1387
1399
|
}, n) => {
|
|
1388
1400
|
if (typeof t == "function" ? (n = r, r = t, t = null) : t = Be(e, t), (typeof r == "object" || Array.isArray(r)) && (n = r, r = () => {
|
|
1389
1401
|
}), (m(e) || typeof e == "symbol") && ge(n).triggerImmediately)
|
|
1390
1402
|
return Ee(globalThis?.Promise?.try?.(() => r?.(e, null, null, null, Se)));
|
|
1391
|
-
if (typeof e?.[
|
|
1392
|
-
if (
|
|
1403
|
+
if (typeof e?.[ue] == "function") return e?.[ue]?.(r, t, n);
|
|
1404
|
+
if (ze(e)) {
|
|
1393
1405
|
const i = e;
|
|
1394
|
-
if (
|
|
1395
|
-
if (
|
|
1406
|
+
if (U?.has?.(e = e?.[g] ?? e)) return U?.get?.(e)?.(i, t, r, n);
|
|
1407
|
+
if (C(i) || ne(e) && C(e?.[0])) return We(e) ? U?.getOrInsert?.(e, ur)?.(e, t, r, n) : ne(e) ? U?.getOrInsert?.(e, sr)?.(e, t, r, n) : typeof HTMLInputElement < "u" && e instanceof HTMLInputElement ? U?.getOrInsert?.(e, tr)?.(e, t, r, n) : U?.getOrInsert?.(e, er)?.(i, t, r, n);
|
|
1396
1408
|
{
|
|
1397
|
-
const
|
|
1398
|
-
return
|
|
1409
|
+
const s = ot(r, n, Se);
|
|
1410
|
+
return s ? Ee(globalThis?.Promise?.try?.(() => ne(e) ? _e?.(e?.[0], e?.[1], s, null) : t != null && t != Symbol.iterator ? _e?.(e, t, s, null) : Ve?.(e, s, null))) : void 0;
|
|
1399
1411
|
}
|
|
1400
1412
|
}
|
|
1401
1413
|
};
|
|
1402
|
-
function
|
|
1414
|
+
function fr(e, t, r) {
|
|
1403
1415
|
if (e == null || typeof e != "function") return;
|
|
1404
|
-
if (
|
|
1416
|
+
if (rr(t) && r === void 0) return Je(e, t);
|
|
1405
1417
|
if (t == null) return Je(e, r);
|
|
1406
|
-
const n =
|
|
1418
|
+
const n = ut(r), i = {
|
|
1407
1419
|
affectTypes: n.affectTypes,
|
|
1408
1420
|
triggerImmediately: n.triggerImmediately
|
|
1409
|
-
},
|
|
1410
|
-
const l =
|
|
1411
|
-
return b(l.target, l.prop, (f, o, y, a, ...v) => e(
|
|
1412
|
-
}).filter((
|
|
1413
|
-
return () =>
|
|
1421
|
+
}, s = nr(t).map((u) => {
|
|
1422
|
+
const l = ir(u);
|
|
1423
|
+
return b(l.target, l.prop, (f, o, y, a, ...v) => e(lr(l.source, l.target, f, o, y, a ?? null, v)), i);
|
|
1424
|
+
}).filter((u) => typeof u == "function");
|
|
1425
|
+
return () => s.forEach((u) => u?.());
|
|
1414
1426
|
}
|
|
1415
|
-
function
|
|
1416
|
-
return
|
|
1427
|
+
function Or(e, t, r) {
|
|
1428
|
+
return fr(t, e, r);
|
|
1417
1429
|
}
|
|
1418
|
-
var
|
|
1430
|
+
var xr = (e) => e instanceof Set ? ct(e) : e instanceof Map ? hr(e) : e, or = class {
|
|
1419
1431
|
#t = /* @__PURE__ */ new WeakMap();
|
|
1420
1432
|
#e(e) {
|
|
1421
1433
|
let t = this.#t.get(e);
|
|
@@ -1449,8 +1461,8 @@ var br = (e) => e instanceof Set ? it(e) : e instanceof Map ? ur(e) : e, nr = cl
|
|
|
1449
1461
|
getOrCreate(e, t) {
|
|
1450
1462
|
const [r, n] = this.#r(e), i = this.#e(r);
|
|
1451
1463
|
if (i.has(n)) return i.get(n);
|
|
1452
|
-
const
|
|
1453
|
-
return i.set(n,
|
|
1464
|
+
const s = t();
|
|
1465
|
+
return i.set(n, s), s;
|
|
1454
1466
|
}
|
|
1455
1467
|
getOrInsert(e, t) {
|
|
1456
1468
|
const [r, n] = this.#r(e), i = this.#e(r);
|
|
@@ -1459,45 +1471,45 @@ var br = (e) => e instanceof Set ? it(e) : e instanceof Map ? ur(e) : e, nr = cl
|
|
|
1459
1471
|
getOrInsertComputed(e, t) {
|
|
1460
1472
|
const [r, n] = this.#r(e), i = this.#e(r);
|
|
1461
1473
|
if (i.has(n)) return i.get(n);
|
|
1462
|
-
const
|
|
1463
|
-
return i.set(n,
|
|
1474
|
+
const s = t([r, n]);
|
|
1475
|
+
return i.set(n, s), s;
|
|
1464
1476
|
}
|
|
1465
|
-
},
|
|
1466
|
-
function
|
|
1477
|
+
}, Me = new or();
|
|
1478
|
+
function cr(e, t, r = ["*"]) {
|
|
1467
1479
|
if (!e) return;
|
|
1468
|
-
if (
|
|
1469
|
-
const n = (i,
|
|
1470
|
-
if (
|
|
1471
|
-
const f = (
|
|
1480
|
+
if (Me.has([e, t])) return Me.get([e, t]);
|
|
1481
|
+
const n = (i, s, u, l) => {
|
|
1482
|
+
if (s == "value") {
|
|
1483
|
+
const f = (u?.value ?? u)?.entries?.(), o = e?.value ?? i?.value ?? i;
|
|
1472
1484
|
if (f) for (const [y, a] of f) {
|
|
1473
|
-
const v = a ?? (
|
|
1485
|
+
const v = a ?? (u?.value ?? u)?.[y] ?? null, A = o?.[y];
|
|
1474
1486
|
v == null && A != null ? t(A, y, null, "add") : v != null && A == null ? t(null, y, v, "delete") : x(v, A) && t(A, y, v, "set");
|
|
1475
1487
|
}
|
|
1476
|
-
return
|
|
1488
|
+
return cr(i ?? e?.value, t, r);
|
|
1477
1489
|
}
|
|
1478
|
-
return
|
|
1490
|
+
return s == null ? void 0 : e[s];
|
|
1479
1491
|
};
|
|
1480
|
-
return
|
|
1492
|
+
return Me.getOrInsertComputed([e, t], () => e instanceof Set ? b([ct(e), Symbol.iterator], t, r) : e instanceof Map ? b(e, t, r) : I(e) ? b(e, n, r) : Array.isArray(e) && !(e?.length == 2 && N(e?.[1]) && C(e?.[0])) ? b([e, Symbol.iterator], t, r) : b(e, t, r));
|
|
1481
1493
|
}
|
|
1482
|
-
function
|
|
1483
|
-
return
|
|
1484
|
-
const n = Array.isArray(r) && r?.length == 2 && ["object", "function"].indexOf(typeof r?.[0]) >= 0 &&
|
|
1494
|
+
function Ie(e, t) {
|
|
1495
|
+
return xt(e, (r) => {
|
|
1496
|
+
const n = Array.isArray(r) && r?.length == 2 && ["object", "function"].indexOf(typeof r?.[0]) >= 0 && N(r?.[1]), i = n ? r?.[1] : null;
|
|
1485
1497
|
r = n && i != null ? r?.[0] ?? r : r;
|
|
1486
|
-
const
|
|
1487
|
-
(r?.[
|
|
1498
|
+
const s = typeof r == "object" || typeof r == "function" ? r?.[g] ?? r : r;
|
|
1499
|
+
(r?.[se] ?? p.get(s))?.unaffected?.(t, i);
|
|
1488
1500
|
});
|
|
1489
1501
|
}
|
|
1490
|
-
var
|
|
1491
|
-
|
|
1502
|
+
var yr = (e, t, r) => (b(t, null, (n, i) => {
|
|
1503
|
+
ie(e, n, i, !0);
|
|
1492
1504
|
}), r?.(() => e, (n) => {
|
|
1493
|
-
for (const i in n)
|
|
1494
|
-
}, { deep: !0 }), e),
|
|
1495
|
-
i == r() &&
|
|
1496
|
-
}),
|
|
1497
|
-
const t = P({ value: 0 }), r = (l) => typeof l == "function" ? l() :
|
|
1505
|
+
for (const i in n) ie(t, n[i], i, !0);
|
|
1506
|
+
}, { deep: !0 }), e), wr = (e, t, r) => yr(t(he(e)), e, r), Rr = (e, t, r = () => "") => b(t, null, (n, i) => {
|
|
1507
|
+
i == r() && ie(e, n, null, !0);
|
|
1508
|
+
}), Pr = (e = []) => {
|
|
1509
|
+
const t = P({ value: 0 }), r = (l) => typeof l == "function" ? l() : I(l) ? l.value : l, i = dr([t, "value"], () => e.findIndex((l) => !!r(l)), "value"), s = () => {
|
|
1498
1510
|
t.value++;
|
|
1499
|
-
},
|
|
1500
|
-
|
|
1511
|
+
}, u = [];
|
|
1512
|
+
C(e) && u.push(b(e, s, {
|
|
1501
1513
|
affectTypes: [
|
|
1502
1514
|
"add",
|
|
1503
1515
|
"set",
|
|
@@ -1505,213 +1517,213 @@ var lr = (e, t, r) => (b(t, null, (n, i) => {
|
|
|
1505
1517
|
],
|
|
1506
1518
|
triggerImmediately: !1
|
|
1507
1519
|
}));
|
|
1508
|
-
for (const l of e)
|
|
1520
|
+
for (const l of e) I(l) && u.push(b([l, "value"], s, {
|
|
1509
1521
|
affectTypes: ["setter"],
|
|
1510
1522
|
triggerImmediately: !1
|
|
1511
1523
|
}));
|
|
1512
|
-
return
|
|
1513
|
-
},
|
|
1524
|
+
return M(i, Symbol.dispose, () => u.forEach((l) => l?.())), i;
|
|
1525
|
+
}, ar = (e, t, r, n) => {
|
|
1514
1526
|
if (m(e)) return e ? t : r;
|
|
1515
|
-
const i = () => t,
|
|
1516
|
-
[
|
|
1527
|
+
const i = () => t, s = () => r, u = (o) => (o != null && (e.value = I(o) ? o?.value : o), (I(e) ? e?.value : e) ? i() : s()), l = P({
|
|
1528
|
+
[d]: u(),
|
|
1517
1529
|
[G]: n,
|
|
1518
1530
|
[Symbol?.toStringTag]() {
|
|
1519
|
-
return String(
|
|
1531
|
+
return String(u() ?? this[d] ?? "") || "";
|
|
1520
1532
|
},
|
|
1521
1533
|
[Symbol?.toPrimitive](o) {
|
|
1522
|
-
return E(
|
|
1534
|
+
return E(u() ?? this[d], o);
|
|
1523
1535
|
},
|
|
1524
1536
|
set value(o) {
|
|
1525
|
-
this[
|
|
1537
|
+
this[d] = u(o);
|
|
1526
1538
|
},
|
|
1527
1539
|
get value() {
|
|
1528
|
-
return this[
|
|
1540
|
+
return this[d] = u() ?? this[d];
|
|
1529
1541
|
}
|
|
1530
1542
|
}), f = b([e, "value"], () => {
|
|
1531
|
-
const o = l?.[
|
|
1532
|
-
l[
|
|
1543
|
+
const o = l?.[d], y = u();
|
|
1544
|
+
l[d] = y, l?.[D]?.({
|
|
1533
1545
|
key: "value",
|
|
1534
1546
|
value: y,
|
|
1535
1547
|
oldValue: o,
|
|
1536
1548
|
trigger: "manual"
|
|
1537
1549
|
});
|
|
1538
1550
|
});
|
|
1539
|
-
return
|
|
1540
|
-
},
|
|
1551
|
+
return M(l, Symbol.dispose, f), l;
|
|
1552
|
+
}, Tr = ar, Mr = (e, t, r) => {
|
|
1541
1553
|
r || (r = P({}));
|
|
1542
|
-
const n = b(e, (i,
|
|
1543
|
-
if (
|
|
1544
|
-
const l = t?.(i,
|
|
1545
|
-
typeof l == "object" ?
|
|
1554
|
+
const n = b(e, (i, s, u) => {
|
|
1555
|
+
if (s == null) return;
|
|
1556
|
+
const l = t?.(i, s, u);
|
|
1557
|
+
typeof l == "object" ? St(r, l) : x(r[s], l) && (r[s] = l);
|
|
1546
1558
|
});
|
|
1547
|
-
return r &&
|
|
1548
|
-
},
|
|
1559
|
+
return r && M(r, Symbol.dispose, n), r;
|
|
1560
|
+
}, Ir = (...e) => {
|
|
1549
1561
|
const t = P({});
|
|
1550
|
-
return e?.forEach?.((r) => b(r, (n, i,
|
|
1562
|
+
return e?.forEach?.((r) => b(r, (n, i, s) => {
|
|
1551
1563
|
i != null && x(t[i], n) && (t[i] = n);
|
|
1552
1564
|
})), t;
|
|
1553
|
-
},
|
|
1565
|
+
}, ct = (e) => {
|
|
1554
1566
|
const t = P([]);
|
|
1555
|
-
return t.push(...Array.from(e?.values?.() || [])),
|
|
1567
|
+
return t.push(...Array.from(e?.values?.() || [])), M(t, Symbol.dispose, b(e, (r, n, i) => {
|
|
1556
1568
|
if (x(r, i)) if (i == null && r != null) t.push(r);
|
|
1557
1569
|
else if (i != null && r == null) {
|
|
1558
|
-
const
|
|
1559
|
-
|
|
1570
|
+
const s = t.indexOf(i);
|
|
1571
|
+
s >= 0 && t.splice(s, 1);
|
|
1560
1572
|
} else {
|
|
1561
|
-
const
|
|
1562
|
-
|
|
1573
|
+
const s = t.indexOf(i);
|
|
1574
|
+
s >= 0 && x(t[s], r) && (t[s] = r);
|
|
1563
1575
|
}
|
|
1564
1576
|
})), t;
|
|
1565
|
-
},
|
|
1577
|
+
}, hr = (e) => {
|
|
1566
1578
|
const t = P([]), r = Array.from(e.entries());
|
|
1567
|
-
return t.push(...r),
|
|
1568
|
-
if (x(n,
|
|
1569
|
-
let
|
|
1570
|
-
|
|
1579
|
+
return t.push(...r), M(t, Symbol.dispose, b(e, (n, i, s) => {
|
|
1580
|
+
if (x(n, s) || s == null && n != null || s != null && n == null) if (s != null && n == null) {
|
|
1581
|
+
let u = t.findIndex(([l, f]) => l == i);
|
|
1582
|
+
u < 0 && (u = t.findLastIndex(([l, f]) => s === f)), u >= 0 && t.splice(u, 1);
|
|
1571
1583
|
} else {
|
|
1572
|
-
let
|
|
1573
|
-
|
|
1584
|
+
let u = t.findIndex(([l, f]) => l == i);
|
|
1585
|
+
u >= 0 && u < t.length ? x(t[u]?.[1], n) && (t[u] = [i, n]) : t.push([i, n]);
|
|
1574
1586
|
}
|
|
1575
1587
|
})), t;
|
|
1576
1588
|
}, F = /* @__PURE__ */ new WeakMap(), Ze = (e, t, r = "value") => {
|
|
1577
|
-
const n = typeof e?.[1] == "function" && e?.length == 2, i = typeof t?.[1] == "function" && t?.length == 2,
|
|
1578
|
-
let l =
|
|
1579
|
-
!
|
|
1580
|
-
const f = (
|
|
1589
|
+
const n = typeof e?.[1] == "function" && e?.length == 2, i = typeof t?.[1] == "function" && t?.length == 2, s = i ? t?.[1] : null, u = (N(e?.[1]) || e?.[1] == Symbol.iterator) && e?.length == 2;
|
|
1590
|
+
let l = u && !n ? e?.[1] : Array.isArray(e) ? null : r;
|
|
1591
|
+
!u && !n && (e = [e, l]), n && (e[1] = l);
|
|
1592
|
+
const f = (N(t?.[1]) || t?.[1] == Symbol.iterator) && t?.length == 2;
|
|
1581
1593
|
let o = f && !i ? t?.[1] : Array.isArray(t) ? null : r;
|
|
1582
|
-
if (!f && !i && (t = [t, o]), i && (t[1] = o), l == null || o == null ||
|
|
1594
|
+
if (!f && !i && (t = [t, o]), i && (t[1] = o), l == null || o == null || le(l, e?.[0]) || le(o, t?.[0])) return;
|
|
1583
1595
|
if (!((typeof t?.[0] == "object" || typeof t?.[0] == "function") && t?.[0] != null) && !Array.isArray(e[0]))
|
|
1584
1596
|
return ye(t, () => {
|
|
1585
1597
|
e[0][l] = t?.[0];
|
|
1586
1598
|
}), () => {
|
|
1587
1599
|
};
|
|
1588
|
-
const y = (
|
|
1600
|
+
const y = (q, j) => {
|
|
1589
1601
|
const B = A?.deref?.(), L = v?.deref?.();
|
|
1590
1602
|
if (F?.get?.(B)?.get?.(l)?.bound == L) {
|
|
1591
|
-
let
|
|
1603
|
+
let Re = null;
|
|
1592
1604
|
const Fe = F?.get?.(B)?.get?.(l)?.cmpfx;
|
|
1593
1605
|
ye(L, () => {
|
|
1594
|
-
typeof Fe == "function" ?
|
|
1606
|
+
typeof Fe == "function" ? Re = Fe?.(Ke(L) ?? q, j, null) : Re = L?.[j] ?? q;
|
|
1595
1607
|
});
|
|
1596
|
-
const He = Ke(
|
|
1608
|
+
const He = Ke(Re);
|
|
1597
1609
|
x(B[l], He) && ye(L, () => {
|
|
1598
1610
|
B[l] = He;
|
|
1599
1611
|
});
|
|
1600
1612
|
} else F?.get?.(B)?.get?.(l)?.dispose?.();
|
|
1601
1613
|
}, a = () => {
|
|
1602
|
-
const
|
|
1603
|
-
|
|
1614
|
+
const q = A?.deref?.(), j = F?.get?.(q), B = j?.get?.(l);
|
|
1615
|
+
j?.delete?.(l), B?.unsub?.();
|
|
1604
1616
|
}, v = t?.[0] != null && (typeof t?.[0] == "object" || typeof t?.[0] == "function") && !(t?.[0] instanceof WeakRef || typeof t?.[0]?.deref == "function") ? new WeakRef(t?.[0]) : t?.[0], A = e?.[0] != null && (typeof e?.[0] == "object" || typeof e?.[0] == "function") && !(e?.[0] instanceof WeakRef || typeof e?.[0]?.deref == "function") ? new WeakRef(e?.[0]) : e?.[0];
|
|
1605
|
-
let
|
|
1617
|
+
let w = {
|
|
1606
1618
|
compute: y,
|
|
1607
1619
|
dispose: a,
|
|
1608
|
-
cmpfx:
|
|
1620
|
+
cmpfx: s
|
|
1609
1621
|
};
|
|
1610
1622
|
const O = A?.deref?.(), k = v?.deref?.();
|
|
1611
|
-
return A instanceof WeakRef && (F?.get?.(O)?.get?.(l)?.bound != k && F?.get?.(O)?.delete?.(l),
|
|
1623
|
+
return A instanceof WeakRef && (F?.get?.(O)?.get?.(l)?.bound != k && F?.get?.(O)?.delete?.(l), w = F?.getOrInsert?.(O, /* @__PURE__ */ new Map())?.getOrInsertComputed?.(l, () => ({
|
|
1612
1624
|
bound: k,
|
|
1613
|
-
cmpfx:
|
|
1625
|
+
cmpfx: s,
|
|
1614
1626
|
unsub: null,
|
|
1615
1627
|
compute: y,
|
|
1616
1628
|
dispose: a
|
|
1617
|
-
})),
|
|
1629
|
+
})), w.unsub = b(t, y), w.cmpfx = s, M(O, Symbol.dispose, w?.dispose), M(k, Symbol.dispose, w?.dispose)), k && !Array.isArray(k) && ye(O, () => {
|
|
1618
1630
|
k[o] ??= O?.[l] ?? k[o];
|
|
1619
|
-
}),
|
|
1620
|
-
},
|
|
1631
|
+
}), w?.dispose;
|
|
1632
|
+
}, kr = (e, t, r = "value") => {
|
|
1621
1633
|
const n = [Ze(e, t, r), Ze(t, e, r)];
|
|
1622
1634
|
return () => n?.map?.((i) => i?.());
|
|
1623
|
-
},
|
|
1624
|
-
const i = typeof e?.[1] == "function" && e?.length == 2,
|
|
1625
|
-
let
|
|
1626
|
-
if (!
|
|
1635
|
+
}, dr = (e, t, r, n = "value") => {
|
|
1636
|
+
const i = typeof e?.[1] == "function" && e?.length == 2, s = (N(e?.[1]) || e?.[1] == Symbol.iterator) && e?.length == 2;
|
|
1637
|
+
let u = s && !i ? e?.[1] : Array.isArray(e) ? null : n;
|
|
1638
|
+
if (!s && !i && (e = [s ? e?.[0] : e, u]), i && (e[1] = u), u == null || le(u, e?.[0])) return;
|
|
1627
1639
|
const l = (a) => {
|
|
1628
1640
|
let v;
|
|
1629
|
-
return a != null && (v = e[0][
|
|
1641
|
+
return a != null && (v = e[0][u], e[0][u] = a), t?.(e?.[0]?.[u], u, v);
|
|
1630
1642
|
}, f = l(), o = P({
|
|
1631
|
-
[
|
|
1632
|
-
[
|
|
1643
|
+
[oe]: void 0,
|
|
1644
|
+
[d]: f,
|
|
1633
1645
|
[G]: r,
|
|
1634
1646
|
[Symbol?.toStringTag]() {
|
|
1635
|
-
return String(l() ?? this[
|
|
1647
|
+
return String(l() ?? this[d] ?? "") || "";
|
|
1636
1648
|
},
|
|
1637
1649
|
[Symbol?.toPrimitive](a) {
|
|
1638
|
-
return E(l() ?? this[
|
|
1650
|
+
return E(l() ?? this[d], a);
|
|
1639
1651
|
},
|
|
1640
1652
|
set value(a) {
|
|
1641
|
-
this[
|
|
1653
|
+
this[d] = l(a);
|
|
1642
1654
|
},
|
|
1643
1655
|
get value() {
|
|
1644
|
-
return this[
|
|
1656
|
+
return this[d] = l() ?? this[d];
|
|
1645
1657
|
}
|
|
1646
|
-
}), y = b([e?.[0] ?? e,
|
|
1647
|
-
const a = o?.[
|
|
1648
|
-
o[
|
|
1658
|
+
}), y = b([e?.[0] ?? e, u ?? "value"], () => {
|
|
1659
|
+
const a = o?.[d], v = l();
|
|
1660
|
+
o[d] = v, o?.[D]?.({
|
|
1649
1661
|
key: "value",
|
|
1650
1662
|
value: v,
|
|
1651
1663
|
oldValue: a,
|
|
1652
1664
|
trigger: "manual"
|
|
1653
1665
|
});
|
|
1654
1666
|
});
|
|
1655
|
-
return
|
|
1656
|
-
},
|
|
1667
|
+
return M(o, Symbol.dispose, y), o;
|
|
1668
|
+
}, Er = (e, t, r = 100) => {
|
|
1657
1669
|
let n;
|
|
1658
1670
|
return b(e, "value", (i) => {
|
|
1659
|
-
!i && n ? (clearTimeout(n), n = null) : i && !n && (n =
|
|
1671
|
+
!i && n ? (clearTimeout(n), n = null) : i && !n && (n = Ne(e, t, r) ?? n);
|
|
1660
1672
|
});
|
|
1661
1673
|
};
|
|
1662
1674
|
export {
|
|
1663
|
-
|
|
1664
|
-
|
|
1675
|
+
ue as $affected,
|
|
1676
|
+
Yt as $ref,
|
|
1665
1677
|
D as $trigger,
|
|
1666
|
-
|
|
1678
|
+
gt as $triggerControl,
|
|
1667
1679
|
me as $triggerLess,
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1680
|
+
h as $triggerLock,
|
|
1681
|
+
Rt as AssignObjectHandler,
|
|
1682
|
+
or as DoubleWeakMap,
|
|
1683
|
+
M as addToCallChain,
|
|
1672
1684
|
b as affected,
|
|
1673
1685
|
Ze as assign,
|
|
1674
1686
|
F as assignMap,
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1687
|
+
yr as bindBy,
|
|
1688
|
+
Rr as bindByKey,
|
|
1689
|
+
Qt as booleanRef,
|
|
1690
|
+
dr as computed,
|
|
1691
|
+
Tr as conditional,
|
|
1692
|
+
Pr as conditionalIndex,
|
|
1693
|
+
ar as conditionalRef,
|
|
1694
|
+
mr as delayedBehavior,
|
|
1695
|
+
gr as delayedOrInstantBehavior,
|
|
1696
|
+
Er as delayedSubscribe,
|
|
1685
1697
|
V as deref,
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1698
|
+
wr as derivate,
|
|
1699
|
+
fr as effect,
|
|
1700
|
+
Or as effected,
|
|
1701
|
+
C as isObservable,
|
|
1702
|
+
cr as iterated,
|
|
1703
|
+
kr as link,
|
|
1704
|
+
xr as makeArrayObservable,
|
|
1705
|
+
br as makeObjectAssignable,
|
|
1706
|
+
Ut as numberRef,
|
|
1707
|
+
hr as observableByMap,
|
|
1708
|
+
ct as observableBySet,
|
|
1697
1709
|
P as observe,
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1710
|
+
pr as promised,
|
|
1711
|
+
Xt as propRef,
|
|
1712
|
+
jt as recoverReactive,
|
|
1713
|
+
Zt as ref,
|
|
1714
|
+
Mr as remap,
|
|
1715
|
+
he as safe,
|
|
1716
|
+
U as specializedSubscribe,
|
|
1717
|
+
Jt as stringRef,
|
|
1718
|
+
er as subscribeDirectly,
|
|
1719
|
+
tr as subscribeInput,
|
|
1720
|
+
sr as subscribePaired,
|
|
1721
|
+
ur as subscribeThenable,
|
|
1722
|
+
Ne as triggerWithDelay,
|
|
1723
|
+
Ie as unaffected,
|
|
1724
|
+
Ir as unified,
|
|
1725
|
+
Ot as unwrap,
|
|
1726
|
+
Ar as useObservable,
|
|
1715
1727
|
Ye as wrapRef,
|
|
1716
|
-
|
|
1728
|
+
vr as wrapSetAsArray
|
|
1717
1729
|
};
|