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