@solidjs/signals 0.9.8 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev.js +397 -175
- package/dist/node.cjs +1158 -953
- package/dist/prod.js +955 -756
- package/dist/types/boundaries.d.ts +3 -2
- package/dist/types/core/core.d.ts +3 -2
- package/dist/types/core/error.d.ts +6 -2
- package/dist/types/core/scheduler.d.ts +66 -16
- package/package.json +1 -1
package/dist/node.cjs
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
class NotReadyError extends Error {
|
|
3
|
-
|
|
3
|
+
t;
|
|
4
4
|
constructor(e) {
|
|
5
5
|
super();
|
|
6
|
-
this.
|
|
6
|
+
this.t = e;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
class StatusError extends Error {
|
|
10
|
+
t;
|
|
11
|
+
constructor(e, t) {
|
|
12
|
+
super(t instanceof Error ? t.message : String(t), { cause: t });
|
|
13
|
+
this.t = e;
|
|
7
14
|
}
|
|
8
15
|
}
|
|
9
16
|
class NoOwnerError extends Error {
|
|
@@ -24,258 +31,322 @@ const i = 1 << 3;
|
|
|
24
31
|
const s = 1 << 4;
|
|
25
32
|
const o = 1 << 5;
|
|
26
33
|
const u = 1 << 6;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const c = 1 <<
|
|
30
|
-
const a = 1 <<
|
|
31
|
-
const d = 1
|
|
32
|
-
const p =
|
|
33
|
-
const h =
|
|
34
|
-
const y =
|
|
35
|
-
const g =
|
|
36
|
-
const w =
|
|
37
|
-
const S =
|
|
38
|
-
const m = Symbol("refresh");
|
|
34
|
+
const f = 1 << 7;
|
|
35
|
+
const l = 1 << 0;
|
|
36
|
+
const c = 1 << 1;
|
|
37
|
+
const a = 1 << 2;
|
|
38
|
+
const d = 1;
|
|
39
|
+
const p = 2;
|
|
40
|
+
const h = 3;
|
|
41
|
+
const y = {};
|
|
42
|
+
const g = typeof Proxy === "function";
|
|
43
|
+
const w = {};
|
|
44
|
+
const S = Symbol("refresh");
|
|
39
45
|
function actualInsertIntoHeap(e, t) {
|
|
40
|
-
const n = (e.i
|
|
41
|
-
if (n >= e.
|
|
42
|
-
const r = e.
|
|
43
|
-
const i = t.
|
|
44
|
-
if (i === undefined) t.
|
|
46
|
+
const n = (e.o?.i ? e.o.l?.u : e.o?.u) ?? -1;
|
|
47
|
+
if (n >= e.u) e.u = n + 1;
|
|
48
|
+
const r = e.u;
|
|
49
|
+
const i = t.p[r];
|
|
50
|
+
if (i === undefined) t.p[r] = e;
|
|
45
51
|
else {
|
|
46
|
-
const t = i.
|
|
47
|
-
t.
|
|
48
|
-
e.
|
|
49
|
-
i.
|
|
52
|
+
const t = i.h;
|
|
53
|
+
t.S = e;
|
|
54
|
+
e.h = t;
|
|
55
|
+
i.h = e;
|
|
50
56
|
}
|
|
51
|
-
if (r > t.
|
|
57
|
+
if (r > t.m) t.m = r;
|
|
52
58
|
}
|
|
53
59
|
function insertIntoHeap(e, o) {
|
|
54
|
-
let u = e.
|
|
60
|
+
let u = e._;
|
|
55
61
|
if (u & (i | r)) return;
|
|
56
62
|
if (u & t) {
|
|
57
|
-
e.
|
|
58
|
-
} else e.
|
|
63
|
+
e._ = (u & -4) | n | i;
|
|
64
|
+
} else e._ = u | i;
|
|
59
65
|
if (!(u & s)) actualInsertIntoHeap(e, o);
|
|
60
66
|
}
|
|
61
67
|
function insertIntoHeapHeight(e, t) {
|
|
62
|
-
let n = e.
|
|
68
|
+
let n = e._;
|
|
63
69
|
if (n & (i | r | s)) return;
|
|
64
|
-
e.
|
|
70
|
+
e._ = n | s;
|
|
65
71
|
actualInsertIntoHeap(e, t);
|
|
66
72
|
}
|
|
67
73
|
function deleteFromHeap(e, t) {
|
|
68
|
-
const n = e.
|
|
74
|
+
const n = e._;
|
|
69
75
|
if (!(n & (i | s))) return;
|
|
70
|
-
e.
|
|
71
|
-
const r = e.
|
|
72
|
-
if (e.
|
|
76
|
+
e._ = n & -25;
|
|
77
|
+
const r = e.u;
|
|
78
|
+
if (e.h === e) t.p[r] = undefined;
|
|
73
79
|
else {
|
|
74
|
-
const n = e.
|
|
75
|
-
const i = t.
|
|
80
|
+
const n = e.S;
|
|
81
|
+
const i = t.p[r];
|
|
76
82
|
const s = n ?? i;
|
|
77
|
-
if (e === i) t.
|
|
78
|
-
else e.
|
|
79
|
-
s.
|
|
83
|
+
if (e === i) t.p[r] = n;
|
|
84
|
+
else e.h.S = n;
|
|
85
|
+
s.h = e.h;
|
|
80
86
|
}
|
|
81
|
-
e.
|
|
82
|
-
e.
|
|
87
|
+
e.h = e;
|
|
88
|
+
e.S = undefined;
|
|
83
89
|
}
|
|
84
90
|
function markHeap(e) {
|
|
85
|
-
if (e.
|
|
86
|
-
e.
|
|
87
|
-
for (let t = 0; t <= e.
|
|
88
|
-
for (let n = e.
|
|
89
|
-
if (n.
|
|
91
|
+
if (e.O) return;
|
|
92
|
+
e.O = true;
|
|
93
|
+
for (let t = 0; t <= e.m; t++) {
|
|
94
|
+
for (let n = e.p[t]; n !== undefined; n = n.S) {
|
|
95
|
+
if (n._ & i) markNode(n);
|
|
90
96
|
}
|
|
91
97
|
}
|
|
92
98
|
}
|
|
93
99
|
function markNode(e, r = n) {
|
|
94
|
-
const i = e.
|
|
100
|
+
const i = e._;
|
|
95
101
|
if ((i & (t | n)) >= r) return;
|
|
96
|
-
e.
|
|
97
|
-
for (let n = e.
|
|
98
|
-
markNode(n.
|
|
99
|
-
}
|
|
100
|
-
if (e.
|
|
101
|
-
for (let n = e.
|
|
102
|
-
for (let e = n.
|
|
103
|
-
markNode(e.
|
|
102
|
+
e._ = (i & -4) | r;
|
|
103
|
+
for (let n = e.P; n !== null; n = n.C) {
|
|
104
|
+
markNode(n.k, t);
|
|
105
|
+
}
|
|
106
|
+
if (e.A !== null) {
|
|
107
|
+
for (let n = e.A; n !== null; n = n.W) {
|
|
108
|
+
for (let e = n.P; e !== null; e = e.C) {
|
|
109
|
+
markNode(e.k, t);
|
|
104
110
|
}
|
|
105
111
|
}
|
|
106
112
|
}
|
|
107
113
|
}
|
|
108
114
|
function runHeap(e, t) {
|
|
109
|
-
e.
|
|
110
|
-
for (e.
|
|
111
|
-
let n = e.
|
|
115
|
+
e.O = false;
|
|
116
|
+
for (e.j = 0; e.j <= e.m; e.j++) {
|
|
117
|
+
let n = e.p[e.j];
|
|
112
118
|
while (n !== undefined) {
|
|
113
|
-
if (n.
|
|
119
|
+
if (n._ & i) t(n);
|
|
114
120
|
else adjustHeight(n, e);
|
|
115
|
-
n = e.
|
|
121
|
+
n = e.p[e.j];
|
|
116
122
|
}
|
|
117
123
|
}
|
|
118
|
-
e.
|
|
124
|
+
e.m = 0;
|
|
119
125
|
}
|
|
120
126
|
function adjustHeight(e, t) {
|
|
121
127
|
deleteFromHeap(e, t);
|
|
122
|
-
let n = e.
|
|
123
|
-
for (let t = e.
|
|
124
|
-
const e = t.
|
|
125
|
-
const r = e.
|
|
126
|
-
if (r.R && r.
|
|
128
|
+
let n = e.u;
|
|
129
|
+
for (let t = e.N; t; t = t.L) {
|
|
130
|
+
const e = t.I;
|
|
131
|
+
const r = e.H || e;
|
|
132
|
+
if (r.R && r.u >= n) n = r.u + 1;
|
|
127
133
|
}
|
|
128
|
-
if (e.
|
|
129
|
-
e.
|
|
130
|
-
for (let n = e.
|
|
131
|
-
insertIntoHeapHeight(n.
|
|
134
|
+
if (e.u !== n) {
|
|
135
|
+
e.u = n;
|
|
136
|
+
for (let n = e.P; n !== null; n = n.C) {
|
|
137
|
+
insertIntoHeapHeight(n.k, t);
|
|
132
138
|
}
|
|
133
139
|
}
|
|
134
140
|
}
|
|
135
|
-
const
|
|
136
|
-
const _ = {
|
|
137
|
-
const
|
|
138
|
-
let
|
|
139
|
-
let
|
|
141
|
+
const m = new Set();
|
|
142
|
+
const _ = { p: new Array(2e3).fill(undefined), O: false, j: 0, m: 0 };
|
|
143
|
+
const b = { p: new Array(2e3).fill(undefined), O: false, j: 0, m: 0 };
|
|
144
|
+
let O = 0;
|
|
145
|
+
let x = null;
|
|
146
|
+
let v = false;
|
|
140
147
|
let P = false;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
148
|
+
const C = new WeakMap();
|
|
149
|
+
const k = new Set();
|
|
150
|
+
let A = null;
|
|
151
|
+
function setCurrentOptimisticLane(e) {
|
|
152
|
+
A = e;
|
|
153
|
+
}
|
|
154
|
+
function getOrCreateLane(e) {
|
|
155
|
+
let t = C.get(e);
|
|
156
|
+
if (t) {
|
|
157
|
+
return findLane(t);
|
|
158
|
+
}
|
|
159
|
+
t = { t: e, T: new Set(), M: [[], []], q: null, F: x };
|
|
160
|
+
C.set(e, t);
|
|
161
|
+
k.add(t);
|
|
162
|
+
e.V = e.B || 0;
|
|
163
|
+
return t;
|
|
164
|
+
}
|
|
165
|
+
function findLane(e) {
|
|
166
|
+
while (e.q) e = e.q;
|
|
167
|
+
return e;
|
|
168
|
+
}
|
|
169
|
+
function mergeLanes(e, t) {
|
|
170
|
+
e = findLane(e);
|
|
171
|
+
t = findLane(t);
|
|
172
|
+
if (e === t) return e;
|
|
173
|
+
t.q = e;
|
|
174
|
+
for (const n of t.T) e.T.add(n);
|
|
175
|
+
e.M[0].push(...t.M[0]);
|
|
176
|
+
e.M[1].push(...t.M[1]);
|
|
177
|
+
return e;
|
|
178
|
+
}
|
|
179
|
+
function clearLaneEntry(e) {
|
|
180
|
+
C.delete(e);
|
|
181
|
+
}
|
|
182
|
+
function resolveLane(e) {
|
|
183
|
+
const t = e.D;
|
|
184
|
+
if (!t) return undefined;
|
|
185
|
+
const n = findLane(t);
|
|
186
|
+
if (k.has(n)) return n;
|
|
187
|
+
e.D = undefined;
|
|
188
|
+
return undefined;
|
|
189
|
+
}
|
|
190
|
+
function hasActiveOverride(e) {
|
|
191
|
+
return !!(e.G && e.K !== y);
|
|
192
|
+
}
|
|
193
|
+
function assignOrMergeLane(e, t) {
|
|
194
|
+
const n = findLane(t);
|
|
195
|
+
const r = e.D;
|
|
196
|
+
if (r) {
|
|
197
|
+
if (r.q) {
|
|
198
|
+
e.D = t;
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const i = findLane(r);
|
|
202
|
+
if (k.has(i)) {
|
|
203
|
+
if (i !== n && !hasActiveOverride(e)) {
|
|
204
|
+
mergeLanes(n, i);
|
|
205
|
+
}
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
e.D = t;
|
|
210
|
+
}
|
|
211
|
+
function runLaneEffects(e) {
|
|
212
|
+
for (const t of k) {
|
|
213
|
+
if (t.q || t.T.size > 0) continue;
|
|
214
|
+
const n = t.M[e - 1];
|
|
215
|
+
if (n.length) {
|
|
216
|
+
t.M[e - 1] = [];
|
|
217
|
+
runQueue(n, e);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
145
220
|
}
|
|
146
221
|
function setProjectionWriteActive(e) {
|
|
147
|
-
|
|
222
|
+
P = e;
|
|
148
223
|
}
|
|
149
224
|
function schedule() {
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
if (!
|
|
225
|
+
if (v) return;
|
|
226
|
+
v = true;
|
|
227
|
+
if (!E.U) queueMicrotask(flush);
|
|
153
228
|
}
|
|
154
229
|
class Queue {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
created = x;
|
|
230
|
+
o = null;
|
|
231
|
+
J = [[], []];
|
|
232
|
+
X = [];
|
|
233
|
+
created = O;
|
|
160
234
|
addChild(e) {
|
|
161
|
-
this.
|
|
162
|
-
e.
|
|
235
|
+
this.X.push(e);
|
|
236
|
+
e.o = this;
|
|
163
237
|
}
|
|
164
238
|
removeChild(e) {
|
|
165
|
-
const t = this.
|
|
239
|
+
const t = this.X.indexOf(e);
|
|
166
240
|
if (t >= 0) {
|
|
167
|
-
this.
|
|
168
|
-
e.
|
|
241
|
+
this.X.splice(t, 1);
|
|
242
|
+
e.o = null;
|
|
169
243
|
}
|
|
170
244
|
}
|
|
171
|
-
notify(e, t, n) {
|
|
172
|
-
if (this.
|
|
245
|
+
notify(e, t, n, r) {
|
|
246
|
+
if (this.o) return this.o.notify(e, t, n, r);
|
|
173
247
|
return false;
|
|
174
248
|
}
|
|
175
|
-
M(e, t, n) {
|
|
176
|
-
if (t[e - 1].length) {
|
|
177
|
-
const n = t[e - 1];
|
|
178
|
-
t[e - 1] = [];
|
|
179
|
-
runQueue(n, e);
|
|
180
|
-
}
|
|
181
|
-
for (let t = 0; t < this.V.length; t++) {
|
|
182
|
-
this.V[t][n]?.(e);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
249
|
run(e) {
|
|
186
|
-
this.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
250
|
+
if (this.J[e - 1].length) {
|
|
251
|
+
const t = this.J[e - 1];
|
|
252
|
+
this.J[e - 1] = [];
|
|
253
|
+
runQueue(t, e);
|
|
254
|
+
}
|
|
255
|
+
for (let t = 0; t < this.X.length; t++) this.X[t].run?.(e);
|
|
190
256
|
}
|
|
191
257
|
enqueue(e, t) {
|
|
192
258
|
if (e) {
|
|
193
|
-
|
|
194
|
-
|
|
259
|
+
if (A) {
|
|
260
|
+
const n = findLane(A);
|
|
261
|
+
n.M[e - 1].push(t);
|
|
262
|
+
} else {
|
|
263
|
+
this.J[e - 1].push(t);
|
|
264
|
+
}
|
|
195
265
|
}
|
|
196
266
|
schedule();
|
|
197
267
|
}
|
|
198
268
|
stashQueues(e) {
|
|
199
|
-
e.
|
|
200
|
-
e.
|
|
201
|
-
this.
|
|
202
|
-
for (let t = 0; t < this.
|
|
203
|
-
let n = this.
|
|
204
|
-
let r = e.
|
|
269
|
+
e.J[0].push(...this.J[0]);
|
|
270
|
+
e.J[1].push(...this.J[1]);
|
|
271
|
+
this.J = [[], []];
|
|
272
|
+
for (let t = 0; t < this.X.length; t++) {
|
|
273
|
+
let n = this.X[t];
|
|
274
|
+
let r = e.X[t];
|
|
205
275
|
if (!r) {
|
|
206
|
-
r = {
|
|
207
|
-
e.
|
|
276
|
+
r = { J: [[], []], X: [] };
|
|
277
|
+
e.X[t] = r;
|
|
208
278
|
}
|
|
209
279
|
n.stashQueues(r);
|
|
210
280
|
}
|
|
211
281
|
}
|
|
212
282
|
restoreQueues(e) {
|
|
213
|
-
this.
|
|
214
|
-
this.
|
|
215
|
-
for (let t = 0; t < e.
|
|
216
|
-
const n = e.
|
|
217
|
-
let r = this.
|
|
283
|
+
this.J[0].push(...e.J[0]);
|
|
284
|
+
this.J[1].push(...e.J[1]);
|
|
285
|
+
for (let t = 0; t < e.X.length; t++) {
|
|
286
|
+
const n = e.X[t];
|
|
287
|
+
let r = this.X[t];
|
|
218
288
|
if (r) r.restoreQueues(n);
|
|
219
289
|
}
|
|
220
290
|
}
|
|
221
291
|
}
|
|
222
292
|
class GlobalQueue extends Queue {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
static
|
|
228
|
-
static
|
|
229
|
-
static
|
|
293
|
+
U = false;
|
|
294
|
+
Y = [];
|
|
295
|
+
Z = [];
|
|
296
|
+
$ = new Set();
|
|
297
|
+
static ee;
|
|
298
|
+
static te;
|
|
299
|
+
static ne = null;
|
|
230
300
|
flush() {
|
|
231
|
-
if (this.
|
|
232
|
-
this.
|
|
301
|
+
if (this.U) return;
|
|
302
|
+
this.U = true;
|
|
233
303
|
try {
|
|
234
|
-
runHeap(_, GlobalQueue.
|
|
235
|
-
if (
|
|
236
|
-
const e = transitionComplete(
|
|
304
|
+
runHeap(_, GlobalQueue.ee);
|
|
305
|
+
if (x) {
|
|
306
|
+
const e = transitionComplete(x);
|
|
237
307
|
if (!e) {
|
|
238
|
-
let e =
|
|
239
|
-
runHeap(
|
|
240
|
-
this.
|
|
241
|
-
this.
|
|
242
|
-
this
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
this.stashQueues(
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
308
|
+
let e = x;
|
|
309
|
+
runHeap(b, GlobalQueue.ee);
|
|
310
|
+
this.Y = [];
|
|
311
|
+
this.Z = [];
|
|
312
|
+
this.$ = new Set();
|
|
313
|
+
runLaneEffects(d);
|
|
314
|
+
runLaneEffects(p);
|
|
315
|
+
this.stashQueues(x.re);
|
|
316
|
+
O++;
|
|
317
|
+
v = _.m >= _.j;
|
|
318
|
+
reassignPendingTransition(x.Y);
|
|
319
|
+
x = null;
|
|
250
320
|
finalizePureQueue(null, true);
|
|
251
321
|
return;
|
|
252
322
|
}
|
|
253
|
-
this.
|
|
254
|
-
this.restoreQueues(
|
|
255
|
-
|
|
256
|
-
const t =
|
|
257
|
-
|
|
258
|
-
|
|
323
|
+
this.Y !== x.Y && this.Y.push(...x.Y);
|
|
324
|
+
this.restoreQueues(x.re);
|
|
325
|
+
m.delete(x);
|
|
326
|
+
const t = x;
|
|
327
|
+
x = null;
|
|
328
|
+
reassignPendingTransition(this.Y);
|
|
259
329
|
finalizePureQueue(t);
|
|
260
330
|
} else {
|
|
261
|
-
if (
|
|
331
|
+
if (m.size) runHeap(b, GlobalQueue.ee);
|
|
262
332
|
finalizePureQueue();
|
|
263
333
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
334
|
+
O++;
|
|
335
|
+
v = _.m >= _.j;
|
|
336
|
+
runLaneEffects(d);
|
|
337
|
+
this.run(d);
|
|
338
|
+
runLaneEffects(p);
|
|
267
339
|
this.run(p);
|
|
268
|
-
this.runOptimistic(h);
|
|
269
|
-
this.run(h);
|
|
270
340
|
} finally {
|
|
271
|
-
this.
|
|
341
|
+
this.U = false;
|
|
272
342
|
}
|
|
273
343
|
}
|
|
274
|
-
notify(e, t, n) {
|
|
275
|
-
if (t &
|
|
276
|
-
if (n &
|
|
277
|
-
|
|
278
|
-
|
|
344
|
+
notify(e, t, n, r) {
|
|
345
|
+
if (t & l) {
|
|
346
|
+
if (n & l) {
|
|
347
|
+
const t = r !== undefined ? r : e.ie;
|
|
348
|
+
if (x && t && !x.se.includes(t.t)) {
|
|
349
|
+
x.se.push(t.t);
|
|
279
350
|
schedule();
|
|
280
351
|
}
|
|
281
352
|
}
|
|
@@ -285,146 +356,183 @@ class GlobalQueue extends Queue {
|
|
|
285
356
|
}
|
|
286
357
|
initTransition(e) {
|
|
287
358
|
if (e) e = currentTransition(e);
|
|
288
|
-
if (e && e ===
|
|
289
|
-
if (!e &&
|
|
290
|
-
if (!
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
359
|
+
if (e && e === x) return;
|
|
360
|
+
if (!e && x && x.oe === O) return;
|
|
361
|
+
if (!x) {
|
|
362
|
+
x = e ?? {
|
|
363
|
+
oe: O,
|
|
364
|
+
Y: [],
|
|
365
|
+
se: [],
|
|
366
|
+
Z: [],
|
|
367
|
+
$: new Set(),
|
|
368
|
+
ue: [],
|
|
369
|
+
re: { J: [[], []], X: [] },
|
|
370
|
+
fe: false
|
|
300
371
|
};
|
|
301
372
|
} else if (e) {
|
|
302
|
-
|
|
303
|
-
e
|
|
304
|
-
|
|
305
|
-
|
|
373
|
+
const t = x;
|
|
374
|
+
t.fe = e;
|
|
375
|
+
e.ue.push(...t.ue);
|
|
376
|
+
for (const n of k) {
|
|
377
|
+
if (n.F === t) n.F = e;
|
|
378
|
+
}
|
|
379
|
+
e.Z.push(...t.Z);
|
|
380
|
+
for (const n of t.$) {
|
|
381
|
+
e.$.add(n);
|
|
382
|
+
}
|
|
383
|
+
m.delete(t);
|
|
384
|
+
x = e;
|
|
306
385
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
for (let e = 0; e < this.
|
|
310
|
-
const t = this.
|
|
311
|
-
t.
|
|
312
|
-
|
|
386
|
+
m.add(x);
|
|
387
|
+
x.oe = O;
|
|
388
|
+
for (let e = 0; e < this.Y.length; e++) {
|
|
389
|
+
const t = this.Y[e];
|
|
390
|
+
t.F = x;
|
|
391
|
+
x.Y.push(t);
|
|
313
392
|
}
|
|
314
|
-
this.
|
|
315
|
-
for (let e = 0; e < this.
|
|
316
|
-
const t = this.
|
|
317
|
-
t.
|
|
318
|
-
|
|
393
|
+
this.Y = x.Y;
|
|
394
|
+
for (let e = 0; e < this.Z.length; e++) {
|
|
395
|
+
const t = this.Z[e];
|
|
396
|
+
t.F = x;
|
|
397
|
+
x.Z.push(t);
|
|
319
398
|
}
|
|
320
|
-
this.
|
|
321
|
-
for (const e of
|
|
322
|
-
|
|
399
|
+
this.Z = x.Z;
|
|
400
|
+
for (const e of k) {
|
|
401
|
+
if (!e.F) e.F = x;
|
|
323
402
|
}
|
|
324
|
-
this
|
|
403
|
+
for (const e of this.$) x.$.add(e);
|
|
404
|
+
this.$ = x.$;
|
|
325
405
|
}
|
|
326
406
|
}
|
|
327
407
|
function insertSubs(e, t = false) {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
408
|
+
const n = e.D || A;
|
|
409
|
+
for (let r = e.P; r !== null; r = r.C) {
|
|
410
|
+
if (t && n) {
|
|
411
|
+
r.k._ |= f;
|
|
412
|
+
assignOrMergeLane(r.k, n);
|
|
413
|
+
} else if (t) {
|
|
414
|
+
r.k._ |= f;
|
|
415
|
+
r.k.D = undefined;
|
|
416
|
+
}
|
|
417
|
+
const e = r.k;
|
|
418
|
+
if (e.le === h) {
|
|
419
|
+
if (!e.ce) {
|
|
420
|
+
e.ce = true;
|
|
421
|
+
e.ae.enqueue(p, e.de);
|
|
335
422
|
}
|
|
336
423
|
continue;
|
|
337
424
|
}
|
|
338
|
-
const
|
|
339
|
-
if (
|
|
340
|
-
insertIntoHeap(
|
|
425
|
+
const i = r.k._ & o ? b : _;
|
|
426
|
+
if (i.j > r.k.u) i.j = r.k.u;
|
|
427
|
+
insertIntoHeap(r.k, i);
|
|
341
428
|
}
|
|
342
429
|
}
|
|
343
430
|
function finalizePureQueue(e = null, t = false) {
|
|
344
431
|
let n = !t;
|
|
345
|
-
if (
|
|
346
|
-
|
|
347
|
-
}
|
|
432
|
+
if (!t) checkBoundaryChildren(E);
|
|
433
|
+
if (_.m >= _.j) runHeap(_, GlobalQueue.ee);
|
|
348
434
|
if (n) {
|
|
349
|
-
const t =
|
|
435
|
+
const t = E.Y;
|
|
350
436
|
for (let e = 0; e < t.length; e++) {
|
|
351
437
|
const n = t[e];
|
|
352
|
-
if (n.
|
|
353
|
-
n.
|
|
354
|
-
n.
|
|
355
|
-
if (n.
|
|
438
|
+
if (n.K !== y) {
|
|
439
|
+
n.pe = n.K;
|
|
440
|
+
n.K = y;
|
|
441
|
+
if (n.le && n.le !== h) n.ce = true;
|
|
356
442
|
}
|
|
357
|
-
|
|
443
|
+
n.he &= ~a;
|
|
444
|
+
if (n.R) GlobalQueue.te(n, false, true);
|
|
358
445
|
}
|
|
359
446
|
t.length = 0;
|
|
360
|
-
const n = e ? e.
|
|
447
|
+
const n = e ? e.Z : E.Z;
|
|
361
448
|
for (let e = 0; e < n.length; e++) {
|
|
362
449
|
const t = n[e];
|
|
363
|
-
const r = t.
|
|
364
|
-
|
|
365
|
-
|
|
450
|
+
const r = t.K;
|
|
451
|
+
t.D = undefined;
|
|
452
|
+
if (r !== y && t.pe !== r) {
|
|
453
|
+
t.pe = r;
|
|
366
454
|
insertSubs(t, true);
|
|
367
455
|
}
|
|
368
|
-
t.
|
|
369
|
-
t.
|
|
456
|
+
t.K = y;
|
|
457
|
+
t.F = null;
|
|
370
458
|
}
|
|
371
459
|
n.length = 0;
|
|
372
|
-
const r = e ? e
|
|
373
|
-
if (GlobalQueue.
|
|
460
|
+
const r = e ? e.$ : E.$;
|
|
461
|
+
if (GlobalQueue.ne && r.size) {
|
|
374
462
|
for (const e of r) {
|
|
375
|
-
GlobalQueue.
|
|
463
|
+
GlobalQueue.ne(e);
|
|
376
464
|
}
|
|
377
465
|
r.clear();
|
|
378
466
|
schedule();
|
|
379
467
|
}
|
|
468
|
+
for (const t of k) {
|
|
469
|
+
const n = e ? t.F === e : !t.F;
|
|
470
|
+
if (!n) continue;
|
|
471
|
+
if (!t.q) {
|
|
472
|
+
if (t.M[0].length) runQueue(t.M[0], d);
|
|
473
|
+
if (t.M[1].length) runQueue(t.M[1], p);
|
|
474
|
+
}
|
|
475
|
+
if (t.t.D === t) t.t.D = undefined;
|
|
476
|
+
t.T.clear();
|
|
477
|
+
t.M[0].length = 0;
|
|
478
|
+
t.M[1].length = 0;
|
|
479
|
+
k.delete(t);
|
|
480
|
+
C.delete(t.t);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
function checkBoundaryChildren(e) {
|
|
485
|
+
for (const t of e.X) {
|
|
486
|
+
t.checkSources?.();
|
|
487
|
+
checkBoundaryChildren(t);
|
|
380
488
|
}
|
|
381
489
|
}
|
|
382
490
|
function trackOptimisticStore(e) {
|
|
383
|
-
|
|
491
|
+
E.$.add(e);
|
|
384
492
|
schedule();
|
|
385
493
|
}
|
|
386
|
-
function
|
|
494
|
+
function reassignPendingTransition(e) {
|
|
387
495
|
for (let t = 0; t < e.length; t++) {
|
|
388
|
-
e[t].
|
|
496
|
+
e[t].F = x;
|
|
389
497
|
}
|
|
390
498
|
}
|
|
391
|
-
const
|
|
499
|
+
const E = new GlobalQueue();
|
|
392
500
|
function flush() {
|
|
393
|
-
while (
|
|
394
|
-
|
|
501
|
+
while (v) {
|
|
502
|
+
E.flush();
|
|
395
503
|
}
|
|
396
504
|
}
|
|
397
505
|
function runQueue(e, t) {
|
|
398
506
|
for (let n = 0; n < e.length; n++) e[n](t);
|
|
399
507
|
}
|
|
400
508
|
function transitionComplete(e) {
|
|
401
|
-
if (e.
|
|
402
|
-
if (e.
|
|
509
|
+
if (e.fe) return true;
|
|
510
|
+
if (e.ue.length) return false;
|
|
403
511
|
let t = true;
|
|
404
|
-
for (let n = 0; n < e.
|
|
405
|
-
if (e.
|
|
512
|
+
for (let n = 0; n < e.se.length; n++) {
|
|
513
|
+
if (e.se[n].he & l) {
|
|
406
514
|
t = false;
|
|
407
515
|
break;
|
|
408
516
|
}
|
|
409
517
|
}
|
|
410
|
-
t && (e.
|
|
518
|
+
t && (e.fe = true);
|
|
411
519
|
return t;
|
|
412
520
|
}
|
|
413
521
|
function currentTransition(e) {
|
|
414
|
-
while (e.
|
|
522
|
+
while (e.fe && typeof e.fe === "object") e = e.fe;
|
|
415
523
|
return e;
|
|
416
524
|
}
|
|
417
525
|
function runInTransition(e, t) {
|
|
418
|
-
const n =
|
|
526
|
+
const n = x;
|
|
419
527
|
try {
|
|
420
|
-
|
|
528
|
+
x = currentTransition(e);
|
|
421
529
|
return t();
|
|
422
530
|
} finally {
|
|
423
|
-
|
|
531
|
+
x = n;
|
|
424
532
|
}
|
|
425
533
|
}
|
|
426
534
|
function restoreTransition(e, t) {
|
|
427
|
-
|
|
535
|
+
E.initTransition(e);
|
|
428
536
|
const n = t();
|
|
429
537
|
flush();
|
|
430
538
|
return n;
|
|
@@ -433,14 +541,14 @@ function action(e) {
|
|
|
433
541
|
return (...t) =>
|
|
434
542
|
new Promise((n, r) => {
|
|
435
543
|
const i = e(...t);
|
|
436
|
-
|
|
437
|
-
let s =
|
|
438
|
-
s.
|
|
544
|
+
E.initTransition();
|
|
545
|
+
let s = x;
|
|
546
|
+
s.ue.push(i);
|
|
439
547
|
const done = (e, t) => {
|
|
440
548
|
s = currentTransition(s);
|
|
441
|
-
const o = s.
|
|
442
|
-
if (o >= 0) s.
|
|
443
|
-
|
|
549
|
+
const o = s.ue.indexOf(i);
|
|
550
|
+
if (o >= 0) s.ue.splice(o, 1);
|
|
551
|
+
x = s;
|
|
444
552
|
schedule();
|
|
445
553
|
t ? r(t) : n(e);
|
|
446
554
|
};
|
|
@@ -467,124 +575,164 @@ function action(e) {
|
|
|
467
575
|
step();
|
|
468
576
|
});
|
|
469
577
|
}
|
|
470
|
-
GlobalQueue.
|
|
471
|
-
GlobalQueue.
|
|
578
|
+
GlobalQueue.ee = recompute;
|
|
579
|
+
GlobalQueue.te = disposeChildren;
|
|
472
580
|
let W = false;
|
|
473
581
|
let j = false;
|
|
474
582
|
let N = false;
|
|
475
|
-
let
|
|
476
|
-
let
|
|
583
|
+
let L = false;
|
|
584
|
+
let Q = false;
|
|
477
585
|
let I = false;
|
|
478
|
-
let
|
|
586
|
+
let H = null;
|
|
479
587
|
function recompute(t, n = false) {
|
|
480
|
-
const i = t.
|
|
588
|
+
const i = t.le;
|
|
481
589
|
if (!n) {
|
|
482
|
-
if (t.
|
|
483
|
-
deleteFromHeap(t, t.
|
|
484
|
-
if (t.
|
|
590
|
+
if (t.F && (!i || x) && x !== t.F) E.initTransition(t.F);
|
|
591
|
+
deleteFromHeap(t, t._ & o ? b : _);
|
|
592
|
+
if (t.F || i === h) disposeChildren(t);
|
|
485
593
|
else {
|
|
486
594
|
markDisposal(t);
|
|
487
|
-
t.
|
|
488
|
-
t.
|
|
489
|
-
t.
|
|
490
|
-
t.
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
const s = !!(t.
|
|
494
|
-
const u = t
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
t.
|
|
499
|
-
t.
|
|
500
|
-
|
|
501
|
-
let p = t.
|
|
502
|
-
let
|
|
503
|
-
let
|
|
595
|
+
t.ye = t.ge;
|
|
596
|
+
t.we = t.Se;
|
|
597
|
+
t.ge = null;
|
|
598
|
+
t.Se = null;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
const s = !!(t._ & f);
|
|
602
|
+
const u = hasActiveOverride(t);
|
|
603
|
+
const a = !!(t.he & l);
|
|
604
|
+
const d = H;
|
|
605
|
+
H = t;
|
|
606
|
+
t.me = null;
|
|
607
|
+
t._ = r;
|
|
608
|
+
t.oe = O;
|
|
609
|
+
let p = t.K === y ? t.pe : t.K;
|
|
610
|
+
let g = t.u;
|
|
611
|
+
let w = W;
|
|
612
|
+
let S = A;
|
|
504
613
|
W = true;
|
|
505
|
-
if (s)
|
|
614
|
+
if (s) {
|
|
615
|
+
const e = resolveLane(t);
|
|
616
|
+
if (e) setCurrentOptimisticLane(e);
|
|
617
|
+
}
|
|
506
618
|
try {
|
|
507
|
-
|
|
619
|
+
p = handleAsync(t, t.R(p));
|
|
508
620
|
clearStatus(t);
|
|
621
|
+
const e = resolveLane(t);
|
|
622
|
+
if (e) e.T.delete(t);
|
|
509
623
|
} catch (e) {
|
|
510
|
-
if (e instanceof NotReadyError) {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
624
|
+
if (e instanceof NotReadyError && A) {
|
|
625
|
+
const e = findLane(A);
|
|
626
|
+
if (e.t !== t) {
|
|
627
|
+
e.T.add(t);
|
|
628
|
+
t.D = e;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
notifyStatus(
|
|
632
|
+
t,
|
|
633
|
+
e instanceof NotReadyError ? l : c,
|
|
634
|
+
e,
|
|
635
|
+
undefined,
|
|
636
|
+
e instanceof NotReadyError ? t.D : undefined
|
|
637
|
+
);
|
|
514
638
|
} finally {
|
|
515
|
-
W =
|
|
516
|
-
t.
|
|
517
|
-
|
|
639
|
+
W = w;
|
|
640
|
+
t._ = e;
|
|
641
|
+
H = d;
|
|
518
642
|
}
|
|
519
|
-
if (!t.
|
|
520
|
-
const e = t.
|
|
521
|
-
let r = e !== null ? e.
|
|
643
|
+
if (!t.ie) {
|
|
644
|
+
const e = t.me;
|
|
645
|
+
let r = e !== null ? e.L : t.N;
|
|
522
646
|
if (r !== null) {
|
|
523
647
|
do {
|
|
524
648
|
r = unlinkSubs(r);
|
|
525
649
|
} while (r !== null);
|
|
526
|
-
if (e !== null) e.
|
|
527
|
-
else t.
|
|
650
|
+
if (e !== null) e.L = null;
|
|
651
|
+
else t.N = null;
|
|
528
652
|
}
|
|
529
|
-
const
|
|
653
|
+
const f = u ? t.pe : t.K === y ? t.pe : t.K;
|
|
654
|
+
const l = !t._e || !t._e(f, p);
|
|
530
655
|
if (l) {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
656
|
+
const e = u ? t.pe : undefined;
|
|
657
|
+
if (n || (i && x !== t.F) || s) t.pe = p;
|
|
658
|
+
else t.K = p;
|
|
659
|
+
if (u && !s && a) {
|
|
660
|
+
const e = t.B || 0;
|
|
661
|
+
const n = t.V || 0;
|
|
662
|
+
if (e <= n) t.pe = p;
|
|
663
|
+
}
|
|
664
|
+
if (!u || s || t.pe !== e) {
|
|
665
|
+
insertSubs(t, s || u);
|
|
666
|
+
}
|
|
667
|
+
} else if (u) {
|
|
668
|
+
t.K = p;
|
|
669
|
+
} else if (t.u != g) {
|
|
670
|
+
for (let e = t.P; e !== null; e = e.C) {
|
|
671
|
+
insertIntoHeapHeight(e.k, e.k._ & o ? b : _);
|
|
537
672
|
}
|
|
538
673
|
}
|
|
539
674
|
}
|
|
540
|
-
|
|
541
|
-
(!n || t.
|
|
542
|
-
t.
|
|
675
|
+
setCurrentOptimisticLane(S);
|
|
676
|
+
(!n || t.he & l) && !t.F && !(x && t.G) && E.Y.push(t);
|
|
677
|
+
t.F && i && x !== t.F && runInTransition(t.F, () => recompute(t));
|
|
543
678
|
}
|
|
544
|
-
function handleAsync(e, t,
|
|
545
|
-
const
|
|
546
|
-
const
|
|
547
|
-
const
|
|
548
|
-
if (!
|
|
549
|
-
e.
|
|
679
|
+
function handleAsync(e, t, r) {
|
|
680
|
+
const i = typeof t === "object" && t !== null;
|
|
681
|
+
const s = i && untrack(() => t[Symbol.asyncIterator]);
|
|
682
|
+
const o = !s && i && untrack(() => typeof t.then === "function");
|
|
683
|
+
if (!o && !s) {
|
|
684
|
+
e.be = null;
|
|
550
685
|
return t;
|
|
551
686
|
}
|
|
552
|
-
e.
|
|
553
|
-
let
|
|
687
|
+
e.be = t;
|
|
688
|
+
let u;
|
|
554
689
|
const handleError = n => {
|
|
555
|
-
if (e.
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
notifyStatus(e, c, n);
|
|
560
|
-
} else notifyStatus(e, a, n);
|
|
561
|
-
e.ce = x;
|
|
690
|
+
if (e.be !== t) return;
|
|
691
|
+
E.initTransition(e.F);
|
|
692
|
+
notifyStatus(e, n instanceof NotReadyError ? l : c, n);
|
|
693
|
+
e.oe = O;
|
|
562
694
|
};
|
|
563
|
-
const asyncWrite = (
|
|
564
|
-
if (e.
|
|
565
|
-
|
|
695
|
+
const asyncWrite = (i, s) => {
|
|
696
|
+
if (e.be !== t) return;
|
|
697
|
+
if (e._ & (n | f)) return;
|
|
698
|
+
E.initTransition(e.F);
|
|
566
699
|
clearStatus(e);
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
700
|
+
const o = resolveLane(e);
|
|
701
|
+
if (o) o.T.delete(e);
|
|
702
|
+
if (r) r(i);
|
|
703
|
+
else if (e.G) {
|
|
704
|
+
const t = e.K !== y;
|
|
705
|
+
if (e.R) e.K = i;
|
|
571
706
|
if (!t) {
|
|
572
|
-
e.
|
|
707
|
+
e.pe = i;
|
|
573
708
|
insertSubs(e);
|
|
574
709
|
}
|
|
575
|
-
e.
|
|
576
|
-
|
|
577
|
-
|
|
710
|
+
e.oe = O;
|
|
711
|
+
} else if (o) {
|
|
712
|
+
const t = e.pe;
|
|
713
|
+
const n = e._e;
|
|
714
|
+
if (!n || !n(i, t)) {
|
|
715
|
+
e.pe = i;
|
|
716
|
+
e.oe = O;
|
|
717
|
+
if (e.Oe) {
|
|
718
|
+
setSignal(e.Oe, i);
|
|
719
|
+
}
|
|
720
|
+
insertSubs(e, true);
|
|
721
|
+
}
|
|
722
|
+
} else {
|
|
723
|
+
setSignal(e, () => i);
|
|
724
|
+
}
|
|
725
|
+
schedule();
|
|
578
726
|
flush();
|
|
579
|
-
|
|
727
|
+
s?.();
|
|
580
728
|
};
|
|
581
|
-
if (
|
|
729
|
+
if (o) {
|
|
582
730
|
let n = false,
|
|
583
731
|
r = true;
|
|
584
732
|
t.then(
|
|
585
733
|
e => {
|
|
586
734
|
if (r) {
|
|
587
|
-
|
|
735
|
+
u = e;
|
|
588
736
|
n = true;
|
|
589
737
|
} else asyncWrite(e);
|
|
590
738
|
},
|
|
@@ -594,11 +742,11 @@ function handleAsync(e, t, n) {
|
|
|
594
742
|
);
|
|
595
743
|
r = false;
|
|
596
744
|
if (!n) {
|
|
597
|
-
|
|
598
|
-
throw new NotReadyError(
|
|
745
|
+
E.initTransition(e.F);
|
|
746
|
+
throw new NotReadyError(H);
|
|
599
747
|
}
|
|
600
748
|
}
|
|
601
|
-
if (
|
|
749
|
+
if (s) {
|
|
602
750
|
const n = t[Symbol.asyncIterator]();
|
|
603
751
|
let r = false;
|
|
604
752
|
const iterate = () => {
|
|
@@ -618,7 +766,7 @@ function handleAsync(e, t, n) {
|
|
|
618
766
|
);
|
|
619
767
|
i = false;
|
|
620
768
|
if (t && !e.done) {
|
|
621
|
-
|
|
769
|
+
u = e.value;
|
|
622
770
|
r = true;
|
|
623
771
|
return iterate();
|
|
624
772
|
}
|
|
@@ -626,177 +774,191 @@ function handleAsync(e, t, n) {
|
|
|
626
774
|
};
|
|
627
775
|
const i = iterate();
|
|
628
776
|
if (!r && !i) {
|
|
629
|
-
|
|
630
|
-
throw new NotReadyError(
|
|
777
|
+
E.initTransition(e.F);
|
|
778
|
+
throw new NotReadyError(H);
|
|
631
779
|
}
|
|
632
780
|
}
|
|
633
|
-
return
|
|
781
|
+
return u;
|
|
634
782
|
}
|
|
635
783
|
function clearStatus(e) {
|
|
636
|
-
e.
|
|
637
|
-
e.
|
|
784
|
+
e.he = e.he & a;
|
|
785
|
+
e.ie = null;
|
|
638
786
|
updatePendingSignal(e);
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
787
|
+
e.xe?.();
|
|
788
|
+
}
|
|
789
|
+
function notifyStatus(e, t, n, r, i) {
|
|
790
|
+
if (t === c && !(n instanceof StatusError) && !(n instanceof NotReadyError))
|
|
791
|
+
n = new StatusError(e, n);
|
|
792
|
+
const s = n instanceof NotReadyError && n.t === e;
|
|
793
|
+
const o = t === l && e.G && !s;
|
|
794
|
+
const u = o && hasActiveOverride(e);
|
|
795
|
+
if (!r) {
|
|
796
|
+
e.he = t | (t !== c ? e.he & a : 0);
|
|
797
|
+
e.ie = n;
|
|
798
|
+
updatePendingSignal(e);
|
|
799
|
+
}
|
|
800
|
+
if (i && !r) {
|
|
801
|
+
assignOrMergeLane(e, i);
|
|
802
|
+
}
|
|
803
|
+
if (u && x && n instanceof NotReadyError) {
|
|
804
|
+
const e = n.t;
|
|
805
|
+
if (!x.se.includes(e)) {
|
|
806
|
+
x.se.push(e);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
const f = r || u;
|
|
810
|
+
const d = r || o ? undefined : i;
|
|
811
|
+
if (e.xe) {
|
|
812
|
+
if (f) {
|
|
813
|
+
e.xe(t, n);
|
|
814
|
+
} else {
|
|
815
|
+
e.xe();
|
|
648
816
|
}
|
|
649
|
-
|
|
817
|
+
return;
|
|
650
818
|
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
if (e.pe) return e.pe();
|
|
657
|
-
for (let r = e.O; r !== null; r = r.P) {
|
|
658
|
-
r.C.ce = x;
|
|
659
|
-
if (r.C.J !== n) {
|
|
660
|
-
!r.C.X && A.D.push(r.C);
|
|
661
|
-
notifyStatus(r.C, t, n);
|
|
819
|
+
for (let r = e.P; r !== null; r = r.C) {
|
|
820
|
+
r.k.oe = O;
|
|
821
|
+
if (r.k.ie !== n) {
|
|
822
|
+
!r.k.F && E.Y.push(r.k);
|
|
823
|
+
notifyStatus(r.k, t, n, f, d);
|
|
662
824
|
}
|
|
663
825
|
}
|
|
664
|
-
for (let r = e.
|
|
665
|
-
for (let e = r.
|
|
666
|
-
e.
|
|
667
|
-
if (e.
|
|
668
|
-
!e.
|
|
669
|
-
notifyStatus(e.
|
|
826
|
+
for (let r = e.A; r !== null; r = r.W) {
|
|
827
|
+
for (let e = r.P; e !== null; e = e.C) {
|
|
828
|
+
e.k.oe = O;
|
|
829
|
+
if (e.k.ie !== n) {
|
|
830
|
+
!e.k.F && E.Y.push(e.k);
|
|
831
|
+
notifyStatus(e.k, t, n, f, d);
|
|
670
832
|
}
|
|
671
833
|
}
|
|
672
834
|
}
|
|
673
835
|
}
|
|
674
836
|
function updateIfNecessary(r) {
|
|
675
|
-
if (r.
|
|
676
|
-
for (let e = r.
|
|
677
|
-
const t = e.
|
|
678
|
-
const i = t.
|
|
837
|
+
if (r._ & t) {
|
|
838
|
+
for (let e = r.N; e; e = e.L) {
|
|
839
|
+
const t = e.I;
|
|
840
|
+
const i = t.H || t;
|
|
679
841
|
if (i.R) {
|
|
680
842
|
updateIfNecessary(i);
|
|
681
843
|
}
|
|
682
|
-
if (r.
|
|
844
|
+
if (r._ & n) {
|
|
683
845
|
break;
|
|
684
846
|
}
|
|
685
847
|
}
|
|
686
848
|
}
|
|
687
|
-
if (r.
|
|
849
|
+
if (r._ & (n | f) || (r.ie && r.oe < O)) {
|
|
688
850
|
recompute(r);
|
|
689
851
|
}
|
|
690
|
-
r.
|
|
852
|
+
r._ = e;
|
|
691
853
|
}
|
|
692
854
|
function unlinkSubs(e) {
|
|
693
|
-
const t = e.
|
|
694
|
-
const n = e.
|
|
695
|
-
const r = e.
|
|
696
|
-
const i = e.
|
|
697
|
-
if (r !== null) r.
|
|
698
|
-
else t.
|
|
699
|
-
if (i !== null) i.
|
|
855
|
+
const t = e.I;
|
|
856
|
+
const n = e.L;
|
|
857
|
+
const r = e.C;
|
|
858
|
+
const i = e.ve;
|
|
859
|
+
if (r !== null) r.ve = i;
|
|
860
|
+
else t.Pe = i;
|
|
861
|
+
if (i !== null) i.C = r;
|
|
700
862
|
else {
|
|
701
|
-
t.
|
|
863
|
+
t.P = r;
|
|
702
864
|
if (r === null) {
|
|
703
|
-
t.
|
|
704
|
-
t.R && !t.
|
|
865
|
+
t.Ce?.();
|
|
866
|
+
t.R && !t.ke && unobserved(t);
|
|
705
867
|
}
|
|
706
868
|
}
|
|
707
869
|
return n;
|
|
708
870
|
}
|
|
709
871
|
function unobserved(e) {
|
|
710
|
-
deleteFromHeap(e, e.
|
|
711
|
-
let t = e.
|
|
872
|
+
deleteFromHeap(e, e._ & o ? b : _);
|
|
873
|
+
let t = e.N;
|
|
712
874
|
while (t !== null) {
|
|
713
875
|
t = unlinkSubs(t);
|
|
714
876
|
}
|
|
715
|
-
e.
|
|
877
|
+
e.N = null;
|
|
716
878
|
disposeChildren(e, true);
|
|
717
879
|
}
|
|
718
880
|
function link(e, t) {
|
|
719
|
-
const n = t.
|
|
720
|
-
if (n !== null && n.
|
|
881
|
+
const n = t.me;
|
|
882
|
+
if (n !== null && n.I === e) return;
|
|
721
883
|
let i = null;
|
|
722
|
-
const s = t.
|
|
884
|
+
const s = t._ & r;
|
|
723
885
|
if (s) {
|
|
724
|
-
i = n !== null ? n.
|
|
725
|
-
if (i !== null && i.
|
|
726
|
-
t.
|
|
886
|
+
i = n !== null ? n.L : t.N;
|
|
887
|
+
if (i !== null && i.I === e) {
|
|
888
|
+
t.me = i;
|
|
727
889
|
return;
|
|
728
890
|
}
|
|
729
891
|
}
|
|
730
|
-
const o = e.
|
|
731
|
-
if (o !== null && o.
|
|
732
|
-
const u = (t.
|
|
733
|
-
if (n !== null) n.
|
|
734
|
-
else t.
|
|
735
|
-
if (o !== null) o.
|
|
736
|
-
else e.
|
|
892
|
+
const o = e.Pe;
|
|
893
|
+
if (o !== null && o.k === t && (!s || isValidLink(o, t))) return;
|
|
894
|
+
const u = (t.me = e.Pe = { I: e, k: t, L: i, ve: o, C: null });
|
|
895
|
+
if (n !== null) n.L = u;
|
|
896
|
+
else t.N = u;
|
|
897
|
+
if (o !== null) o.C = u;
|
|
898
|
+
else e.P = u;
|
|
737
899
|
}
|
|
738
900
|
function isValidLink(e, t) {
|
|
739
|
-
const n = t.
|
|
901
|
+
const n = t.me;
|
|
740
902
|
if (n !== null) {
|
|
741
|
-
let r = t.
|
|
903
|
+
let r = t.N;
|
|
742
904
|
do {
|
|
743
905
|
if (r === e) return true;
|
|
744
906
|
if (r === n) break;
|
|
745
|
-
r = r.
|
|
907
|
+
r = r.L;
|
|
746
908
|
} while (r !== null);
|
|
747
909
|
}
|
|
748
910
|
return false;
|
|
749
911
|
}
|
|
750
912
|
function markDisposal(e) {
|
|
751
|
-
let t = e.
|
|
913
|
+
let t = e.Se;
|
|
752
914
|
while (t) {
|
|
753
|
-
t.
|
|
754
|
-
if (t.
|
|
915
|
+
t._ |= o;
|
|
916
|
+
if (t._ & i) {
|
|
755
917
|
deleteFromHeap(t, _);
|
|
756
|
-
insertIntoHeap(t,
|
|
918
|
+
insertIntoHeap(t, b);
|
|
757
919
|
}
|
|
758
920
|
markDisposal(t);
|
|
759
|
-
t = t.
|
|
921
|
+
t = t.Ae;
|
|
760
922
|
}
|
|
761
923
|
}
|
|
762
924
|
function dispose(e) {
|
|
763
|
-
let t = e.
|
|
925
|
+
let t = e.N || null;
|
|
764
926
|
do {
|
|
765
927
|
t = unlinkSubs(t);
|
|
766
928
|
} while (t !== null);
|
|
767
|
-
e.
|
|
768
|
-
e.
|
|
929
|
+
e.N = null;
|
|
930
|
+
e.me = null;
|
|
769
931
|
disposeChildren(e, true);
|
|
770
932
|
}
|
|
771
933
|
function disposeChildren(e, t = false, n) {
|
|
772
|
-
if (e.
|
|
773
|
-
if (t) e.
|
|
774
|
-
let r = n ? e.
|
|
934
|
+
if (e._ & u) return;
|
|
935
|
+
if (t) e._ = u;
|
|
936
|
+
let r = n ? e.we : e.Se;
|
|
775
937
|
while (r) {
|
|
776
|
-
const e = r.
|
|
777
|
-
if (r.
|
|
938
|
+
const e = r.Ae;
|
|
939
|
+
if (r.N) {
|
|
778
940
|
const e = r;
|
|
779
|
-
deleteFromHeap(e, e.
|
|
780
|
-
let t = e.
|
|
941
|
+
deleteFromHeap(e, e._ & o ? b : _);
|
|
942
|
+
let t = e.N;
|
|
781
943
|
do {
|
|
782
944
|
t = unlinkSubs(t);
|
|
783
945
|
} while (t !== null);
|
|
784
|
-
e.
|
|
785
|
-
e.
|
|
946
|
+
e.N = null;
|
|
947
|
+
e.me = null;
|
|
786
948
|
}
|
|
787
949
|
disposeChildren(r, true);
|
|
788
950
|
r = e;
|
|
789
951
|
}
|
|
790
952
|
if (n) {
|
|
791
|
-
e.
|
|
953
|
+
e.we = null;
|
|
792
954
|
} else {
|
|
793
|
-
e.ue = null;
|
|
794
955
|
e.Se = null;
|
|
956
|
+
e.Ae = null;
|
|
795
957
|
}
|
|
796
958
|
runDisposal(e, n);
|
|
797
959
|
}
|
|
798
960
|
function runDisposal(e, t) {
|
|
799
|
-
let n = t ? e.
|
|
961
|
+
let n = t ? e.ye : e.ge;
|
|
800
962
|
if (!n) return;
|
|
801
963
|
if (Array.isArray(n)) {
|
|
802
964
|
for (let e = 0; e < n.length; e++) {
|
|
@@ -806,10 +968,10 @@ function runDisposal(e, t) {
|
|
|
806
968
|
} else {
|
|
807
969
|
n.call(n);
|
|
808
970
|
}
|
|
809
|
-
t ? (e.
|
|
971
|
+
t ? (e.ye = null) : (e.ge = null);
|
|
810
972
|
}
|
|
811
973
|
function getNextChildId(e) {
|
|
812
|
-
if (e.id != null) return formatId(e.id, e.
|
|
974
|
+
if (e.id != null) return formatId(e.id, e.Ee++);
|
|
813
975
|
throw new Error("Cannot get child id from owner without an id");
|
|
814
976
|
}
|
|
815
977
|
function formatId(e, t) {
|
|
@@ -819,103 +981,118 @@ function formatId(e, t) {
|
|
|
819
981
|
}
|
|
820
982
|
function computed(t, n, r) {
|
|
821
983
|
const i = {
|
|
822
|
-
id: r?.id ?? (
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
984
|
+
id: r?.id ?? (H?.id != null ? getNextChildId(H) : undefined),
|
|
985
|
+
_e: r?.equals != null ? r.equals : isEqual,
|
|
986
|
+
We: !!r?.pureWrite,
|
|
987
|
+
Ce: r?.unobserved,
|
|
988
|
+
ge: null,
|
|
989
|
+
ae: H?.ae ?? E,
|
|
990
|
+
je: H?.je ?? w,
|
|
991
|
+
Ee: 0,
|
|
830
992
|
R: t,
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
993
|
+
pe: n,
|
|
994
|
+
u: 0,
|
|
995
|
+
A: null,
|
|
996
|
+
S: undefined,
|
|
997
|
+
h: null,
|
|
998
|
+
N: null,
|
|
999
|
+
me: null,
|
|
1000
|
+
P: null,
|
|
1001
|
+
Pe: null,
|
|
1002
|
+
o: H,
|
|
1003
|
+
Ae: null,
|
|
841
1004
|
Se: null,
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
X: null
|
|
1005
|
+
_: e,
|
|
1006
|
+
he: a,
|
|
1007
|
+
oe: O,
|
|
1008
|
+
K: y,
|
|
1009
|
+
ye: null,
|
|
1010
|
+
we: null,
|
|
1011
|
+
be: null,
|
|
1012
|
+
F: null
|
|
851
1013
|
};
|
|
852
|
-
i.
|
|
853
|
-
const s =
|
|
854
|
-
if (
|
|
855
|
-
const e =
|
|
1014
|
+
i.h = i;
|
|
1015
|
+
const s = H?.i ? H.l : H;
|
|
1016
|
+
if (H) {
|
|
1017
|
+
const e = H.Se;
|
|
856
1018
|
if (e === null) {
|
|
857
|
-
|
|
1019
|
+
H.Se = i;
|
|
858
1020
|
} else {
|
|
859
|
-
i.
|
|
860
|
-
|
|
1021
|
+
i.Ae = e;
|
|
1022
|
+
H.Se = i;
|
|
861
1023
|
}
|
|
862
1024
|
}
|
|
863
|
-
if (s) i.
|
|
1025
|
+
if (s) i.u = s.u + 1;
|
|
864
1026
|
!r?.lazy && recompute(i, true);
|
|
865
1027
|
return i;
|
|
866
1028
|
}
|
|
867
1029
|
function signal(e, t, n = null) {
|
|
868
1030
|
const r = {
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
1031
|
+
_e: t?.equals != null ? t.equals : isEqual,
|
|
1032
|
+
We: !!t?.pureWrite,
|
|
1033
|
+
Ce: t?.unobserved,
|
|
1034
|
+
pe: e,
|
|
1035
|
+
P: null,
|
|
1036
|
+
Pe: null,
|
|
1037
|
+
oe: O,
|
|
1038
|
+
H: n,
|
|
1039
|
+
W: n?.A || null,
|
|
1040
|
+
K: y
|
|
879
1041
|
};
|
|
880
|
-
n && (n.
|
|
1042
|
+
n && (n.A = r);
|
|
881
1043
|
return r;
|
|
882
1044
|
}
|
|
883
1045
|
function optimisticSignal(e, t) {
|
|
884
1046
|
const n = signal(e, t);
|
|
885
|
-
n.
|
|
1047
|
+
n.G = true;
|
|
886
1048
|
return n;
|
|
887
1049
|
}
|
|
888
1050
|
function optimisticComputed(e, t, n) {
|
|
889
1051
|
const r = computed(e, t, n);
|
|
890
|
-
r.
|
|
1052
|
+
r.G = true;
|
|
891
1053
|
return r;
|
|
892
1054
|
}
|
|
893
1055
|
function getPendingSignal(e) {
|
|
894
|
-
if (!e.
|
|
895
|
-
e.
|
|
896
|
-
if (computePendingState(e)) setSignal(e.
|
|
1056
|
+
if (!e.Ne) {
|
|
1057
|
+
e.Ne = optimisticSignal(false, { pureWrite: true });
|
|
1058
|
+
if (computePendingState(e)) setSignal(e.Ne, true);
|
|
897
1059
|
}
|
|
898
|
-
return e.
|
|
1060
|
+
return e.Ne;
|
|
899
1061
|
}
|
|
900
1062
|
function computePendingState(e) {
|
|
901
|
-
if (e.te !== g) return true;
|
|
902
1063
|
const t = e;
|
|
903
|
-
|
|
1064
|
+
if (e.K !== y && !(t.he & a)) return true;
|
|
1065
|
+
return !!(t.he & l && !(t.he & a));
|
|
904
1066
|
}
|
|
905
1067
|
function getPendingValueComputed(e) {
|
|
906
|
-
if (!e.
|
|
1068
|
+
if (!e.Oe) {
|
|
907
1069
|
const t = I;
|
|
908
1070
|
I = false;
|
|
909
|
-
const n =
|
|
910
|
-
|
|
911
|
-
e.
|
|
912
|
-
|
|
1071
|
+
const n = H;
|
|
1072
|
+
H = null;
|
|
1073
|
+
e.Oe = optimisticComputed(() => read(e));
|
|
1074
|
+
H = n;
|
|
913
1075
|
I = t;
|
|
914
1076
|
}
|
|
915
|
-
return e.
|
|
1077
|
+
return e.Oe;
|
|
916
1078
|
}
|
|
917
1079
|
function updatePendingSignal(e) {
|
|
918
|
-
if (e.
|
|
1080
|
+
if (e.Ne) {
|
|
1081
|
+
const t = computePendingState(e);
|
|
1082
|
+
const n = e.Ne;
|
|
1083
|
+
setSignal(n, t);
|
|
1084
|
+
if (!t && n.D) {
|
|
1085
|
+
const t = resolveLane(e);
|
|
1086
|
+
if (t && t.T.size > 0) {
|
|
1087
|
+
const e = findLane(n.D);
|
|
1088
|
+
if (e !== t) {
|
|
1089
|
+
mergeLanes(t, e);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
clearLaneEntry(n);
|
|
1093
|
+
n.D = undefined;
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
919
1096
|
}
|
|
920
1097
|
function isEqual(e, t) {
|
|
921
1098
|
return e === t;
|
|
@@ -930,16 +1107,16 @@ function untrack(e) {
|
|
|
930
1107
|
}
|
|
931
1108
|
}
|
|
932
1109
|
function read(e) {
|
|
933
|
-
if (
|
|
934
|
-
const t = e.
|
|
1110
|
+
if (L) {
|
|
1111
|
+
const t = e.H || e;
|
|
935
1112
|
const n = getPendingSignal(t);
|
|
936
|
-
const r =
|
|
937
|
-
|
|
1113
|
+
const r = L;
|
|
1114
|
+
L = false;
|
|
938
1115
|
if (read(n)) {
|
|
939
|
-
|
|
1116
|
+
Q = true;
|
|
940
1117
|
}
|
|
941
|
-
|
|
942
|
-
return e.
|
|
1118
|
+
L = r;
|
|
1119
|
+
return e.pe;
|
|
943
1120
|
}
|
|
944
1121
|
if (I) {
|
|
945
1122
|
const t = getPendingValueComputed(e);
|
|
@@ -947,112 +1124,133 @@ function read(e) {
|
|
|
947
1124
|
I = false;
|
|
948
1125
|
const r = read(t);
|
|
949
1126
|
I = n;
|
|
950
|
-
if (t.
|
|
1127
|
+
if (t.he & l) return e.pe;
|
|
951
1128
|
return r;
|
|
952
1129
|
}
|
|
953
|
-
let t =
|
|
954
|
-
if (t?.
|
|
1130
|
+
let t = H;
|
|
1131
|
+
if (t?.i) t = t.l;
|
|
955
1132
|
if (N && e.R) recompute(e);
|
|
956
1133
|
if (t && W) {
|
|
957
|
-
if (e.R && e.
|
|
1134
|
+
if (e.R && e._ & u) recompute(e);
|
|
958
1135
|
link(e, t);
|
|
959
|
-
const n = e.
|
|
1136
|
+
const n = e.H || e;
|
|
960
1137
|
if (n.R) {
|
|
961
|
-
const r = e.
|
|
962
|
-
if (n.
|
|
1138
|
+
const r = e._ & o;
|
|
1139
|
+
if (n.u >= (r ? b.j : _.j)) {
|
|
963
1140
|
markNode(t);
|
|
964
|
-
markHeap(r ?
|
|
1141
|
+
markHeap(r ? b : _);
|
|
965
1142
|
updateIfNecessary(n);
|
|
966
1143
|
}
|
|
967
|
-
const i = n.
|
|
968
|
-
if (i >= t.
|
|
969
|
-
t.
|
|
1144
|
+
const i = n.u;
|
|
1145
|
+
if (i >= t.u && e.o !== t) {
|
|
1146
|
+
t.u = i + 1;
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
const n = e.H || e;
|
|
1151
|
+
if (t && n.he & l && !(j && n.F && x !== n.F)) {
|
|
1152
|
+
if (A) {
|
|
1153
|
+
const r = n.D;
|
|
1154
|
+
const i = findLane(A);
|
|
1155
|
+
if (r && findLane(r) === i && !hasActiveOverride(n)) {
|
|
1156
|
+
if (!W) link(e, t);
|
|
1157
|
+
throw n.ie;
|
|
970
1158
|
}
|
|
1159
|
+
} else {
|
|
1160
|
+
if (!W) link(e, t);
|
|
1161
|
+
throw n.ie;
|
|
971
1162
|
}
|
|
972
1163
|
}
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
if (e.R && e.re & a) {
|
|
976
|
-
if (e.ce < x) {
|
|
1164
|
+
if (e.R && e.he & c) {
|
|
1165
|
+
if (e.oe < O) {
|
|
977
1166
|
recompute(e, true);
|
|
978
1167
|
return read(e);
|
|
979
|
-
} else throw e.
|
|
1168
|
+
} else throw e.ie;
|
|
980
1169
|
}
|
|
981
|
-
return !t ||
|
|
1170
|
+
return !t || A !== null || e.K === y || (j && e.F && x !== e.F) ? e.pe : e.K;
|
|
982
1171
|
}
|
|
983
1172
|
function setSignal(e, t) {
|
|
984
|
-
if (e.
|
|
985
|
-
const n = e.
|
|
986
|
-
const r = n ? e.
|
|
1173
|
+
if (e.F && x !== e.F) E.initTransition(e.F);
|
|
1174
|
+
const n = e.G && !P;
|
|
1175
|
+
const r = n ? e.pe : e.K === y ? e.pe : e.K;
|
|
987
1176
|
if (typeof t === "function") t = t(r);
|
|
988
|
-
const i = !e.
|
|
989
|
-
if (!i)
|
|
1177
|
+
const i = !e._e || !e._e(r, t);
|
|
1178
|
+
if (!i) {
|
|
1179
|
+
if (n && e.K !== y && e.R) {
|
|
1180
|
+
insertSubs(e, true);
|
|
1181
|
+
schedule();
|
|
1182
|
+
}
|
|
1183
|
+
return t;
|
|
1184
|
+
}
|
|
990
1185
|
if (n) {
|
|
991
|
-
const n =
|
|
992
|
-
if (e.
|
|
993
|
-
|
|
1186
|
+
const n = E.Z.includes(e);
|
|
1187
|
+
if (e.F && n) {
|
|
1188
|
+
E.initTransition(e.F);
|
|
994
1189
|
}
|
|
995
|
-
if (e.
|
|
996
|
-
e.
|
|
1190
|
+
if (e.K === y) {
|
|
1191
|
+
e.K = e.pe;
|
|
997
1192
|
}
|
|
998
1193
|
if (!n) {
|
|
999
|
-
|
|
1194
|
+
E.Z.push(e);
|
|
1000
1195
|
}
|
|
1001
|
-
e.
|
|
1196
|
+
e.B = (e.B || 0) + 1;
|
|
1197
|
+
const r = getOrCreateLane(e);
|
|
1198
|
+
e.D = r;
|
|
1199
|
+
e.pe = t;
|
|
1002
1200
|
} else {
|
|
1003
|
-
if (e.
|
|
1004
|
-
e.
|
|
1201
|
+
if (e.K === y) E.Y.push(e);
|
|
1202
|
+
e.K = t;
|
|
1005
1203
|
}
|
|
1006
1204
|
updatePendingSignal(e);
|
|
1007
|
-
if (e.
|
|
1008
|
-
setSignal(e.
|
|
1205
|
+
if (e.Oe) {
|
|
1206
|
+
setSignal(e.Oe, t);
|
|
1009
1207
|
}
|
|
1010
|
-
e.
|
|
1208
|
+
e.oe = O;
|
|
1011
1209
|
insertSubs(e, n);
|
|
1012
1210
|
schedule();
|
|
1013
1211
|
return t;
|
|
1014
1212
|
}
|
|
1015
1213
|
const R = {};
|
|
1016
1214
|
function getObserver() {
|
|
1017
|
-
if (
|
|
1018
|
-
return W ?
|
|
1215
|
+
if (L || I) return R;
|
|
1216
|
+
return W ? H : null;
|
|
1019
1217
|
}
|
|
1020
1218
|
function getOwner() {
|
|
1021
|
-
return
|
|
1219
|
+
return H;
|
|
1022
1220
|
}
|
|
1023
1221
|
function onCleanup(e) {
|
|
1024
|
-
if (!
|
|
1025
|
-
if (!
|
|
1026
|
-
else if (Array.isArray(
|
|
1027
|
-
else
|
|
1222
|
+
if (!H) return e;
|
|
1223
|
+
if (!H.ge) H.ge = e;
|
|
1224
|
+
else if (Array.isArray(H.ge)) H.ge.push(e);
|
|
1225
|
+
else H.ge = [H.ge, e];
|
|
1028
1226
|
return e;
|
|
1029
1227
|
}
|
|
1030
1228
|
function createOwner(e) {
|
|
1031
|
-
const t =
|
|
1229
|
+
const t = H;
|
|
1032
1230
|
const n = {
|
|
1033
1231
|
id: e?.id ?? (t?.id != null ? getNextChildId(t) : undefined),
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
ue: null,
|
|
1232
|
+
i: true,
|
|
1233
|
+
l: t?.i ? t.l : t,
|
|
1037
1234
|
Se: null,
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1235
|
+
Ae: null,
|
|
1236
|
+
ge: null,
|
|
1237
|
+
ae: t?.ae ?? E,
|
|
1238
|
+
je: t?.je || w,
|
|
1239
|
+
Ee: 0,
|
|
1240
|
+
ye: null,
|
|
1241
|
+
we: null,
|
|
1242
|
+
o: t,
|
|
1045
1243
|
dispose(e = true) {
|
|
1046
1244
|
disposeChildren(n, e);
|
|
1047
1245
|
}
|
|
1048
1246
|
};
|
|
1049
1247
|
if (t) {
|
|
1050
|
-
const e = t.
|
|
1248
|
+
const e = t.Se;
|
|
1051
1249
|
if (e === null) {
|
|
1052
|
-
t.
|
|
1250
|
+
t.Se = n;
|
|
1053
1251
|
} else {
|
|
1054
|
-
n.
|
|
1055
|
-
t.
|
|
1252
|
+
n.Ae = e;
|
|
1253
|
+
t.Se = n;
|
|
1056
1254
|
}
|
|
1057
1255
|
}
|
|
1058
1256
|
return n;
|
|
@@ -1062,14 +1260,14 @@ function createRoot(e, t) {
|
|
|
1062
1260
|
return runWithOwner(n, () => e(n.dispose));
|
|
1063
1261
|
}
|
|
1064
1262
|
function runWithOwner(e, t) {
|
|
1065
|
-
const n =
|
|
1263
|
+
const n = H;
|
|
1066
1264
|
const r = W;
|
|
1067
|
-
|
|
1265
|
+
H = e;
|
|
1068
1266
|
W = false;
|
|
1069
1267
|
try {
|
|
1070
1268
|
return t();
|
|
1071
1269
|
} finally {
|
|
1072
|
-
|
|
1270
|
+
H = n;
|
|
1073
1271
|
W = r;
|
|
1074
1272
|
}
|
|
1075
1273
|
}
|
|
@@ -1092,16 +1290,18 @@ function pending(e) {
|
|
|
1092
1290
|
}
|
|
1093
1291
|
}
|
|
1094
1292
|
function isPending(e) {
|
|
1095
|
-
const t =
|
|
1096
|
-
const n =
|
|
1097
|
-
|
|
1098
|
-
|
|
1293
|
+
const t = L;
|
|
1294
|
+
const n = Q;
|
|
1295
|
+
L = true;
|
|
1296
|
+
Q = false;
|
|
1099
1297
|
try {
|
|
1100
1298
|
e();
|
|
1101
|
-
return
|
|
1299
|
+
return Q;
|
|
1300
|
+
} catch {
|
|
1301
|
+
return Q;
|
|
1102
1302
|
} finally {
|
|
1103
|
-
|
|
1104
|
-
|
|
1303
|
+
L = t;
|
|
1304
|
+
Q = n;
|
|
1105
1305
|
}
|
|
1106
1306
|
}
|
|
1107
1307
|
function refresh(e) {
|
|
@@ -1109,7 +1309,7 @@ function refresh(e) {
|
|
|
1109
1309
|
N = true;
|
|
1110
1310
|
try {
|
|
1111
1311
|
if (typeof e !== "function") {
|
|
1112
|
-
recompute(e[
|
|
1312
|
+
recompute(e[S]);
|
|
1113
1313
|
return e;
|
|
1114
1314
|
}
|
|
1115
1315
|
return untrack(e);
|
|
@@ -1130,7 +1330,7 @@ function getContext(e, t = getOwner()) {
|
|
|
1130
1330
|
if (!t) {
|
|
1131
1331
|
throw new NoOwnerError();
|
|
1132
1332
|
}
|
|
1133
|
-
const n = hasContext(e, t) ? t.
|
|
1333
|
+
const n = hasContext(e, t) ? t.je[e.id] : e.defaultValue;
|
|
1134
1334
|
if (isUndefined(n)) {
|
|
1135
1335
|
throw new ContextNotFoundError();
|
|
1136
1336
|
}
|
|
@@ -1140,10 +1340,10 @@ function setContext(e, t, n = getOwner()) {
|
|
|
1140
1340
|
if (!n) {
|
|
1141
1341
|
throw new NoOwnerError();
|
|
1142
1342
|
}
|
|
1143
|
-
n.
|
|
1343
|
+
n.je = { ...n.je, [e.id]: isUndefined(t) ? e.defaultValue : t };
|
|
1144
1344
|
}
|
|
1145
1345
|
function hasContext(e, t) {
|
|
1146
|
-
return !isUndefined(t?.
|
|
1346
|
+
return !isUndefined(t?.je[e.id]);
|
|
1147
1347
|
}
|
|
1148
1348
|
function isUndefined(e) {
|
|
1149
1349
|
return typeof e === "undefined";
|
|
@@ -1153,78 +1353,80 @@ function effect(e, t, n, r, i) {
|
|
|
1153
1353
|
const o = computed(i?.render ? t => staleValues(() => e(t)) : e, r, {
|
|
1154
1354
|
...i,
|
|
1155
1355
|
equals: () => {
|
|
1156
|
-
o.
|
|
1157
|
-
if (s) o
|
|
1356
|
+
o.ce = !o.ie;
|
|
1357
|
+
if (s) o.ae.enqueue(o.le, runEffect.bind(o));
|
|
1158
1358
|
return false;
|
|
1159
1359
|
},
|
|
1160
1360
|
lazy: true
|
|
1161
1361
|
});
|
|
1162
|
-
o.
|
|
1163
|
-
o.
|
|
1164
|
-
o.
|
|
1165
|
-
o.
|
|
1166
|
-
o.
|
|
1167
|
-
o.
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1362
|
+
o.Le = r;
|
|
1363
|
+
o.Qe = t;
|
|
1364
|
+
o.Ie = n;
|
|
1365
|
+
o.He = undefined;
|
|
1366
|
+
o.le = i?.render ? d : p;
|
|
1367
|
+
o.xe = (e, t) => {
|
|
1368
|
+
const n = e !== undefined ? e : o.he;
|
|
1369
|
+
const r = t !== undefined ? t : o.ie;
|
|
1370
|
+
if (n & c) {
|
|
1371
|
+
let e = r;
|
|
1372
|
+
o.ae.notify(o, l, 0);
|
|
1373
|
+
if (o.le === p) {
|
|
1172
1374
|
try {
|
|
1173
|
-
return o.
|
|
1174
|
-
? o.
|
|
1175
|
-
o.
|
|
1176
|
-
o.
|
|
1375
|
+
return o.Ie
|
|
1376
|
+
? o.Ie(e, () => {
|
|
1377
|
+
o.He?.();
|
|
1378
|
+
o.He = undefined;
|
|
1177
1379
|
})
|
|
1178
1380
|
: console.error(e);
|
|
1179
1381
|
} catch (t) {
|
|
1180
1382
|
e = t;
|
|
1181
1383
|
}
|
|
1182
1384
|
}
|
|
1183
|
-
if (!o
|
|
1184
|
-
} else if (o.
|
|
1385
|
+
if (!o.ae.notify(o, c, c)) throw e;
|
|
1386
|
+
} else if (o.le === d) o.ae.notify(o, l | c, n, r);
|
|
1185
1387
|
};
|
|
1186
1388
|
recompute(o, true);
|
|
1187
|
-
!i?.defer && (o.
|
|
1389
|
+
!i?.defer && (o.le === p ? o.ae.enqueue(o.le, runEffect.bind(o)) : runEffect.call(o));
|
|
1188
1390
|
s = true;
|
|
1189
|
-
onCleanup(() => o.
|
|
1391
|
+
onCleanup(() => o.He?.());
|
|
1190
1392
|
}
|
|
1191
1393
|
function runEffect() {
|
|
1192
|
-
if (!this.
|
|
1193
|
-
this.
|
|
1194
|
-
this.
|
|
1394
|
+
if (!this.ce || this._ & u) return;
|
|
1395
|
+
this.He?.();
|
|
1396
|
+
this.He = undefined;
|
|
1195
1397
|
try {
|
|
1196
|
-
this.
|
|
1398
|
+
this.He = this.Qe(this.pe, this.Le);
|
|
1197
1399
|
} catch (e) {
|
|
1198
|
-
if (!this
|
|
1400
|
+
if (!this.ae.notify(this, c, c)) throw e;
|
|
1199
1401
|
} finally {
|
|
1200
|
-
this.
|
|
1201
|
-
this.
|
|
1402
|
+
this.Le = this.pe;
|
|
1403
|
+
this.ce = false;
|
|
1202
1404
|
}
|
|
1203
1405
|
}
|
|
1204
1406
|
function trackedEffect(e, t) {
|
|
1205
1407
|
const run = () => {
|
|
1206
|
-
if (!n.
|
|
1207
|
-
n.
|
|
1408
|
+
if (!n.ce || n._ & u) return;
|
|
1409
|
+
n.ce = false;
|
|
1208
1410
|
recompute(n);
|
|
1209
1411
|
};
|
|
1210
1412
|
const n = computed(
|
|
1211
1413
|
() => {
|
|
1212
1414
|
try {
|
|
1213
|
-
n.
|
|
1214
|
-
n.
|
|
1215
|
-
n.
|
|
1415
|
+
n.He?.();
|
|
1416
|
+
n.He = undefined;
|
|
1417
|
+
n.He = staleValues(e) || undefined;
|
|
1216
1418
|
} finally {
|
|
1217
1419
|
}
|
|
1218
1420
|
},
|
|
1219
1421
|
undefined,
|
|
1220
1422
|
{ ...t, lazy: true, pureWrite: true }
|
|
1221
1423
|
);
|
|
1222
|
-
n.
|
|
1223
|
-
n.
|
|
1224
|
-
n.
|
|
1225
|
-
n.
|
|
1226
|
-
n
|
|
1227
|
-
onCleanup(() => n.
|
|
1424
|
+
n.He = undefined;
|
|
1425
|
+
n.ce = true;
|
|
1426
|
+
n.le = h;
|
|
1427
|
+
n.de = run;
|
|
1428
|
+
n.ae.enqueue(p, run);
|
|
1429
|
+
onCleanup(() => n.He?.());
|
|
1228
1430
|
}
|
|
1229
1431
|
function createSignal(e, t, n) {
|
|
1230
1432
|
if (typeof e === "function") {
|
|
@@ -1289,13 +1491,13 @@ function createOptimistic(e, t, n) {
|
|
|
1289
1491
|
function onSettled(e) {
|
|
1290
1492
|
getOwner()
|
|
1291
1493
|
? createTrackedEffect(() => untrack(e))
|
|
1292
|
-
:
|
|
1494
|
+
: E.enqueue(p, () => {
|
|
1293
1495
|
const t = e();
|
|
1294
1496
|
t?.();
|
|
1295
1497
|
});
|
|
1296
1498
|
}
|
|
1297
1499
|
function unwrap(e) {
|
|
1298
|
-
return e?.[
|
|
1500
|
+
return e?.[F]?.[U] ?? e;
|
|
1299
1501
|
}
|
|
1300
1502
|
function getOverrideValue(e, t, n, r) {
|
|
1301
1503
|
return t && r in t ? t[r] : e[r];
|
|
@@ -1306,22 +1508,22 @@ function getAllKeys(e, t, n) {
|
|
|
1306
1508
|
return Array.from(new Set([...r, ...i]));
|
|
1307
1509
|
}
|
|
1308
1510
|
function applyState(e, t, n, r) {
|
|
1309
|
-
const i = t?.[
|
|
1511
|
+
const i = t?.[F];
|
|
1310
1512
|
if (!i) return;
|
|
1311
1513
|
const s = i[G];
|
|
1312
1514
|
const o = i[K];
|
|
1313
1515
|
let u = i[U];
|
|
1314
1516
|
if (e === s && !o) return;
|
|
1315
|
-
(i[
|
|
1517
|
+
(i[Y] || ee).set(e, i[V]);
|
|
1316
1518
|
i[G] = e;
|
|
1317
1519
|
i[K] = undefined;
|
|
1318
1520
|
if (Array.isArray(s)) {
|
|
1319
1521
|
let t = false;
|
|
1320
|
-
const
|
|
1321
|
-
if (e.length &&
|
|
1322
|
-
let
|
|
1522
|
+
const f = getOverrideValue(s, o, u, "length");
|
|
1523
|
+
if (e.length && f && e[0] && n(e[0]) != null) {
|
|
1524
|
+
let l, c, a, d, p, h, y, g;
|
|
1323
1525
|
for (
|
|
1324
|
-
a = 0, d = Math.min(
|
|
1526
|
+
a = 0, d = Math.min(f, e.length);
|
|
1325
1527
|
a < d && ((h = getOverrideValue(s, o, u, a)) === e[a] || (h && e[a] && n(h) === n(e[a])));
|
|
1326
1528
|
a++
|
|
1327
1529
|
) {
|
|
@@ -1330,7 +1532,7 @@ function applyState(e, t, n, r) {
|
|
|
1330
1532
|
const w = new Array(e.length),
|
|
1331
1533
|
S = new Map();
|
|
1332
1534
|
for (
|
|
1333
|
-
d =
|
|
1535
|
+
d = f - 1, p = e.length - 1;
|
|
1334
1536
|
d >= a &&
|
|
1335
1537
|
p >= a &&
|
|
1336
1538
|
((h = getOverrideValue(s, o, u, d)) === e[p] || (h && e[p] && n(h) === n(e[p])));
|
|
@@ -1349,20 +1551,20 @@ function applyState(e, t, n, r) {
|
|
|
1349
1551
|
i[U][c] && setSignal(i[U][c], s);
|
|
1350
1552
|
applyState(e[c], s, n, r);
|
|
1351
1553
|
}
|
|
1352
|
-
t && i[U][
|
|
1353
|
-
|
|
1554
|
+
t && i[U][M] && setSignal(i[U][M], void 0);
|
|
1555
|
+
f !== e.length && i[U].length && setSignal(i[U].length, e.length);
|
|
1354
1556
|
return;
|
|
1355
1557
|
}
|
|
1356
1558
|
y = new Array(p + 1);
|
|
1357
1559
|
for (c = p; c >= a; c--) {
|
|
1358
1560
|
h = e[c];
|
|
1359
1561
|
g = h ? n(h) : h;
|
|
1360
|
-
|
|
1361
|
-
y[c] =
|
|
1562
|
+
l = S.get(g);
|
|
1563
|
+
y[c] = l === undefined ? -1 : l;
|
|
1362
1564
|
S.set(g, c);
|
|
1363
1565
|
}
|
|
1364
|
-
for (
|
|
1365
|
-
h = getOverrideValue(s, o, u,
|
|
1566
|
+
for (l = a; l <= d; l++) {
|
|
1567
|
+
h = getOverrideValue(s, o, u, l);
|
|
1366
1568
|
g = h ? n(h) : h;
|
|
1367
1569
|
c = S.get(g);
|
|
1368
1570
|
if (c !== undefined && c !== -1) {
|
|
@@ -1380,23 +1582,23 @@ function applyState(e, t, n, r) {
|
|
|
1380
1582
|
}
|
|
1381
1583
|
if (a < e.length) t = true;
|
|
1382
1584
|
} else if (e.length) {
|
|
1383
|
-
for (let t = 0,
|
|
1384
|
-
const
|
|
1385
|
-
isWrappable(
|
|
1585
|
+
for (let t = 0, f = e.length; t < f; t++) {
|
|
1586
|
+
const f = getOverrideValue(s, o, u, t);
|
|
1587
|
+
isWrappable(f) ? applyState(e[t], wrap(f, i), n, r) : i[U][t] && setSignal(i[U][t], e[t]);
|
|
1386
1588
|
}
|
|
1387
1589
|
}
|
|
1388
|
-
if (
|
|
1590
|
+
if (f !== e.length) {
|
|
1389
1591
|
t = true;
|
|
1390
1592
|
i[U].length && setSignal(i[U].length, e.length);
|
|
1391
1593
|
}
|
|
1392
|
-
t && i[U][
|
|
1594
|
+
t && i[U][M] && setSignal(i[U][M], void 0);
|
|
1393
1595
|
return;
|
|
1394
1596
|
}
|
|
1395
1597
|
if (u) {
|
|
1396
|
-
const t = u[
|
|
1397
|
-
const
|
|
1398
|
-
for (let
|
|
1399
|
-
const c = l
|
|
1598
|
+
const t = u[M];
|
|
1599
|
+
const f = t || r ? getAllKeys(s, o, e) : Object.keys(u);
|
|
1600
|
+
for (let l = 0, c = f.length; l < c; l++) {
|
|
1601
|
+
const c = f[l];
|
|
1400
1602
|
const a = u[c];
|
|
1401
1603
|
const d = unwrap(getOverrideValue(s, o, u, c));
|
|
1402
1604
|
let p = unwrap(e[c]);
|
|
@@ -1407,7 +1609,7 @@ function applyState(e, t, n, r) {
|
|
|
1407
1609
|
} else applyState(p, wrap(d, i), n, r);
|
|
1408
1610
|
}
|
|
1409
1611
|
}
|
|
1410
|
-
if ((u = i[
|
|
1612
|
+
if ((u = i[J])) {
|
|
1411
1613
|
const t = Object.keys(u);
|
|
1412
1614
|
for (let n = 0, r = t.length; n < r; n++) {
|
|
1413
1615
|
const r = t[n];
|
|
@@ -1429,9 +1631,9 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
1429
1631
|
let r;
|
|
1430
1632
|
const i = new WeakMap();
|
|
1431
1633
|
const wrapper = e => {
|
|
1432
|
-
e[
|
|
1433
|
-
e[
|
|
1434
|
-
Object.defineProperty(e,
|
|
1634
|
+
e[X] = wrapProjection;
|
|
1635
|
+
e[Y] = i;
|
|
1636
|
+
Object.defineProperty(e, Z, {
|
|
1435
1637
|
get() {
|
|
1436
1638
|
return r;
|
|
1437
1639
|
},
|
|
@@ -1440,8 +1642,8 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
1440
1642
|
};
|
|
1441
1643
|
const wrapProjection = e => {
|
|
1442
1644
|
if (i.has(e)) return i.get(e);
|
|
1443
|
-
if (e[
|
|
1444
|
-
const t = createStoreProxy(e,
|
|
1645
|
+
if (e[F]?.[X] === wrapProjection) return e;
|
|
1646
|
+
const t = createStoreProxy(e, re, wrapper);
|
|
1445
1647
|
i.set(e, t);
|
|
1446
1648
|
return t;
|
|
1447
1649
|
};
|
|
@@ -1456,7 +1658,7 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
1456
1658
|
i !== r && i !== undefined && reconcile(i, n?.key || "id", n?.all)(s);
|
|
1457
1659
|
});
|
|
1458
1660
|
});
|
|
1459
|
-
r.
|
|
1661
|
+
r.ke = true;
|
|
1460
1662
|
return { store: s, node: r };
|
|
1461
1663
|
}
|
|
1462
1664
|
function createProjection(e, t = {}, n) {
|
|
@@ -1498,46 +1700,46 @@ const T = {
|
|
|
1498
1700
|
return true;
|
|
1499
1701
|
}
|
|
1500
1702
|
};
|
|
1501
|
-
const
|
|
1703
|
+
const M = Symbol(0),
|
|
1704
|
+
q = Symbol(0),
|
|
1502
1705
|
F = Symbol(0),
|
|
1503
1706
|
V = Symbol(0),
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
const B = new WeakMap();
|
|
1707
|
+
B = Symbol(0);
|
|
1708
|
+
const D = new WeakMap();
|
|
1507
1709
|
const G = "v",
|
|
1508
1710
|
K = "o",
|
|
1509
1711
|
z = "x",
|
|
1510
1712
|
U = "n",
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
function createStoreProxy(e, t =
|
|
1713
|
+
J = "h",
|
|
1714
|
+
X = "w",
|
|
1715
|
+
Y = "l",
|
|
1716
|
+
Z = "f",
|
|
1717
|
+
$ = "p";
|
|
1718
|
+
function createStoreProxy(e, t = re, n) {
|
|
1517
1719
|
let r;
|
|
1518
1720
|
if (Array.isArray(e)) {
|
|
1519
1721
|
r = [];
|
|
1520
1722
|
r.v = e;
|
|
1521
1723
|
} else r = { v: e };
|
|
1522
1724
|
n && n(r);
|
|
1523
|
-
return (r[
|
|
1725
|
+
return (r[V] = new Proxy(r, t));
|
|
1524
1726
|
}
|
|
1525
|
-
const
|
|
1727
|
+
const ee = new WeakMap();
|
|
1526
1728
|
function wrap(e, t) {
|
|
1527
|
-
if (t?.[
|
|
1528
|
-
let n = e[
|
|
1529
|
-
if (!n)
|
|
1729
|
+
if (t?.[X]) return t[X](e, t);
|
|
1730
|
+
let n = e[V] || ee.get(e);
|
|
1731
|
+
if (!n) ee.set(e, (n = createStoreProxy(e)));
|
|
1530
1732
|
return n;
|
|
1531
1733
|
}
|
|
1532
1734
|
function isWrappable(e) {
|
|
1533
1735
|
return e != null && typeof e === "object" && !Object.isFrozen(e);
|
|
1534
1736
|
}
|
|
1535
|
-
let
|
|
1737
|
+
let te = false;
|
|
1536
1738
|
function setWriteOverride(e) {
|
|
1537
|
-
|
|
1739
|
+
te = e;
|
|
1538
1740
|
}
|
|
1539
1741
|
function writeOnly(e) {
|
|
1540
|
-
return
|
|
1742
|
+
return te || !!ne?.has(e);
|
|
1541
1743
|
}
|
|
1542
1744
|
function getNodes(e, t) {
|
|
1543
1745
|
let n = e[t];
|
|
@@ -1556,11 +1758,11 @@ function getNode(e, t, n, r, i = isEqual, s) {
|
|
|
1556
1758
|
},
|
|
1557
1759
|
r
|
|
1558
1760
|
);
|
|
1559
|
-
if (s) o.
|
|
1761
|
+
if (s) o.G = true;
|
|
1560
1762
|
return (e[t] = o);
|
|
1561
1763
|
}
|
|
1562
|
-
function trackSelf(e, t =
|
|
1563
|
-
getObserver() && read(getNode(getNodes(e, U), t, undefined, e[
|
|
1764
|
+
function trackSelf(e, t = M) {
|
|
1765
|
+
getObserver() && read(getNode(getNodes(e, U), t, undefined, e[Z], false, e[$]));
|
|
1564
1766
|
}
|
|
1565
1767
|
function getKeys(e, t, n = true) {
|
|
1566
1768
|
const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
|
|
@@ -1568,7 +1770,7 @@ function getKeys(e, t, n = true) {
|
|
|
1568
1770
|
const i = new Set(r);
|
|
1569
1771
|
const s = Reflect.ownKeys(t);
|
|
1570
1772
|
for (const e of s) {
|
|
1571
|
-
if (t[e] !==
|
|
1773
|
+
if (t[e] !== B) i.add(e);
|
|
1572
1774
|
else i.delete(e);
|
|
1573
1775
|
}
|
|
1574
1776
|
return Array.from(i);
|
|
@@ -1576,18 +1778,18 @@ function getKeys(e, t, n = true) {
|
|
|
1576
1778
|
function getPropertyDescriptor(e, t, n) {
|
|
1577
1779
|
let r = e;
|
|
1578
1780
|
if (t && n in t) {
|
|
1579
|
-
if (r[n] ===
|
|
1781
|
+
if (r[n] === B) return void 0;
|
|
1580
1782
|
if (!(n in r)) r = t;
|
|
1581
1783
|
}
|
|
1582
1784
|
return Reflect.getOwnPropertyDescriptor(r, n);
|
|
1583
1785
|
}
|
|
1584
|
-
let
|
|
1585
|
-
const
|
|
1786
|
+
let ne = null;
|
|
1787
|
+
const re = {
|
|
1586
1788
|
get(e, t, n) {
|
|
1587
|
-
if (t ===
|
|
1588
|
-
if (t ===
|
|
1589
|
-
if (t ===
|
|
1590
|
-
if (t ===
|
|
1789
|
+
if (t === F) return e;
|
|
1790
|
+
if (t === V) return n;
|
|
1791
|
+
if (t === S) return e[Z];
|
|
1792
|
+
if (t === M || t === q) {
|
|
1591
1793
|
trackSelf(e, t);
|
|
1592
1794
|
return n;
|
|
1593
1795
|
}
|
|
@@ -1595,105 +1797,105 @@ const ne = {
|
|
|
1595
1797
|
const i = r[t];
|
|
1596
1798
|
const s = e[z] && t in e[z];
|
|
1597
1799
|
const o = s || (e[K] && t in e[K]);
|
|
1598
|
-
const u = !!e[G][
|
|
1599
|
-
const
|
|
1800
|
+
const u = !!e[G][F];
|
|
1801
|
+
const f = s ? e[z] : e[K] && t in e[K] ? e[K] : e[G];
|
|
1600
1802
|
if (!i) {
|
|
1601
|
-
const e = Object.getOwnPropertyDescriptor(
|
|
1803
|
+
const e = Object.getOwnPropertyDescriptor(f, t);
|
|
1602
1804
|
if (e && e.get) return e.get.call(n);
|
|
1603
1805
|
}
|
|
1604
1806
|
if (writeOnly(n)) {
|
|
1605
|
-
let n = i && (o || !u) ? (i.
|
|
1606
|
-
n ===
|
|
1807
|
+
let n = i && (o || !u) ? (i.K !== y ? (i.G ? i.pe : i.K) : i.pe) : f[t];
|
|
1808
|
+
n === B && (n = undefined);
|
|
1607
1809
|
if (!isWrappable(n)) return n;
|
|
1608
1810
|
const r = wrap(n, e);
|
|
1609
|
-
|
|
1811
|
+
ne?.add(r);
|
|
1610
1812
|
return r;
|
|
1611
1813
|
}
|
|
1612
|
-
let
|
|
1613
|
-
|
|
1814
|
+
let l = i ? (o || !u ? read(r[t]) : (read(r[t]), f[t])) : f[t];
|
|
1815
|
+
l === B && (l = undefined);
|
|
1614
1816
|
if (!i) {
|
|
1615
|
-
if (!o && typeof
|
|
1817
|
+
if (!o && typeof l === "function" && !f.hasOwnProperty(t)) {
|
|
1616
1818
|
let t;
|
|
1617
1819
|
return !Array.isArray(e[G]) && (t = Object.getPrototypeOf(e[G])) && t !== Object.prototype
|
|
1618
|
-
?
|
|
1619
|
-
:
|
|
1820
|
+
? l.bind(f)
|
|
1821
|
+
: l;
|
|
1620
1822
|
} else if (getObserver()) {
|
|
1621
|
-
return read(getNode(r, t, isWrappable(
|
|
1823
|
+
return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[Z], isEqual, e[$]));
|
|
1622
1824
|
}
|
|
1623
1825
|
}
|
|
1624
|
-
return isWrappable(
|
|
1826
|
+
return isWrappable(l) ? wrap(l, e) : l;
|
|
1625
1827
|
},
|
|
1626
1828
|
has(e, t) {
|
|
1627
|
-
if (t ===
|
|
1628
|
-
const n = e[z] && t in e[z] ? e[z][t] !==
|
|
1629
|
-
getObserver() && read(getNode(getNodes(e,
|
|
1829
|
+
if (t === V || t === M || t === "__proto__") return true;
|
|
1830
|
+
const n = e[z] && t in e[z] ? e[z][t] !== B : e[K] && t in e[K] ? e[K][t] !== B : t in e[G];
|
|
1831
|
+
getObserver() && read(getNode(getNodes(e, J), t, n, e[Z], isEqual, e[$]));
|
|
1630
1832
|
return n;
|
|
1631
1833
|
},
|
|
1632
1834
|
set(e, t, n) {
|
|
1633
|
-
const r = e[
|
|
1835
|
+
const r = e[V];
|
|
1634
1836
|
if (writeOnly(r)) {
|
|
1635
|
-
if (e[
|
|
1636
|
-
const t = e[
|
|
1637
|
-
if (t?.
|
|
1638
|
-
|
|
1837
|
+
if (e[$]) {
|
|
1838
|
+
const t = e[Z];
|
|
1839
|
+
if (t?.F) {
|
|
1840
|
+
E.initTransition(t.F);
|
|
1639
1841
|
}
|
|
1640
1842
|
}
|
|
1641
1843
|
untrack(() => {
|
|
1642
1844
|
const i = e[G];
|
|
1643
1845
|
const s = i[t];
|
|
1644
|
-
const o = e[
|
|
1846
|
+
const o = e[$] && !P;
|
|
1645
1847
|
const u = o ? z : K;
|
|
1646
1848
|
if (o) trackOptimisticStore(r);
|
|
1647
|
-
const
|
|
1648
|
-
const
|
|
1649
|
-
if (
|
|
1849
|
+
const f = e[z] && t in e[z] ? e[z][t] : e[K] && t in e[K] ? e[K][t] : s;
|
|
1850
|
+
const l = n?.[F]?.[G] ?? n;
|
|
1851
|
+
if (f === l) return true;
|
|
1650
1852
|
const c = e[z]?.length || e[K]?.length || i.length;
|
|
1651
|
-
if (
|
|
1652
|
-
else (e[u] || (e[u] = Object.create(null)))[t] =
|
|
1653
|
-
const a = isWrappable(
|
|
1654
|
-
if (isWrappable(
|
|
1655
|
-
const e =
|
|
1656
|
-
e && (e instanceof Set ? e.delete(r) :
|
|
1853
|
+
if (l !== undefined && l === s) delete e[u][t];
|
|
1854
|
+
else (e[u] || (e[u] = Object.create(null)))[t] = l;
|
|
1855
|
+
const a = isWrappable(l);
|
|
1856
|
+
if (isWrappable(f)) {
|
|
1857
|
+
const e = D.get(f);
|
|
1858
|
+
e && (e instanceof Set ? e.delete(r) : D.delete(f));
|
|
1657
1859
|
}
|
|
1658
|
-
if (recursivelyNotify(r,
|
|
1659
|
-
e[
|
|
1860
|
+
if (recursivelyNotify(r, ee) && a) recursivelyAddParent(l, r);
|
|
1861
|
+
e[J]?.[t] && setSignal(e[J][t], true);
|
|
1660
1862
|
const d = getNodes(e, U);
|
|
1661
|
-
d[t] && setSignal(d[t], () => (a ? wrap(
|
|
1863
|
+
d[t] && setSignal(d[t], () => (a ? wrap(l, e) : l));
|
|
1662
1864
|
if (Array.isArray(i)) {
|
|
1663
1865
|
if (t === "length") {
|
|
1664
|
-
d.length && setSignal(d.length,
|
|
1866
|
+
d.length && setSignal(d.length, l);
|
|
1665
1867
|
} else {
|
|
1666
1868
|
const e = parseInt(t) + 1;
|
|
1667
1869
|
if (e > c) d.length && setSignal(d.length, e);
|
|
1668
1870
|
}
|
|
1669
1871
|
}
|
|
1670
|
-
d[
|
|
1872
|
+
d[M] && setSignal(d[M], undefined);
|
|
1671
1873
|
});
|
|
1672
1874
|
}
|
|
1673
1875
|
return true;
|
|
1674
1876
|
},
|
|
1675
1877
|
deleteProperty(e, t) {
|
|
1676
|
-
const n = e[z]?.[t] ===
|
|
1677
|
-
const r = e[K]?.[t] ===
|
|
1678
|
-
if (writeOnly(e[
|
|
1878
|
+
const n = e[z]?.[t] === B;
|
|
1879
|
+
const r = e[K]?.[t] === B;
|
|
1880
|
+
if (writeOnly(e[V]) && !n && !r) {
|
|
1679
1881
|
untrack(() => {
|
|
1680
|
-
const n = e[
|
|
1882
|
+
const n = e[$] && !P;
|
|
1681
1883
|
const r = n ? z : K;
|
|
1682
|
-
if (n) trackOptimisticStore(e[
|
|
1884
|
+
if (n) trackOptimisticStore(e[V]);
|
|
1683
1885
|
const i = e[z] && t in e[z] ? e[z][t] : e[K] && t in e[K] ? e[K][t] : e[G][t];
|
|
1684
1886
|
if (t in e[G] || (e[K] && t in e[K])) {
|
|
1685
|
-
(e[r] || (e[r] = Object.create(null)))[t] =
|
|
1887
|
+
(e[r] || (e[r] = Object.create(null)))[t] = B;
|
|
1686
1888
|
} else if (e[r] && t in e[r]) {
|
|
1687
1889
|
delete e[r][t];
|
|
1688
1890
|
} else return true;
|
|
1689
1891
|
if (isWrappable(i)) {
|
|
1690
|
-
const t =
|
|
1691
|
-
t && (t instanceof Set ? t.delete(e) :
|
|
1892
|
+
const t = D.get(i);
|
|
1893
|
+
t && (t instanceof Set ? t.delete(e) : D.delete(i));
|
|
1692
1894
|
}
|
|
1693
|
-
if (e[
|
|
1895
|
+
if (e[J]?.[t]) setSignal(e[J][t], false);
|
|
1694
1896
|
const s = getNodes(e, U);
|
|
1695
1897
|
s[t] && setSignal(s[t], undefined);
|
|
1696
|
-
s[
|
|
1898
|
+
s[M] && setSignal(s[M], undefined);
|
|
1697
1899
|
});
|
|
1698
1900
|
}
|
|
1699
1901
|
return true;
|
|
@@ -1704,7 +1906,7 @@ const ne = {
|
|
|
1704
1906
|
if (e[z]) {
|
|
1705
1907
|
const n = new Set(t);
|
|
1706
1908
|
for (const t of Reflect.ownKeys(e[z])) {
|
|
1707
|
-
if (e[z][t] !==
|
|
1909
|
+
if (e[z][t] !== B) n.add(t);
|
|
1708
1910
|
else n.delete(t);
|
|
1709
1911
|
}
|
|
1710
1912
|
t = Array.from(n);
|
|
@@ -1712,9 +1914,9 @@ const ne = {
|
|
|
1712
1914
|
return t;
|
|
1713
1915
|
},
|
|
1714
1916
|
getOwnPropertyDescriptor(e, t) {
|
|
1715
|
-
if (t ===
|
|
1917
|
+
if (t === V) return { value: e[V], writable: true, configurable: true };
|
|
1716
1918
|
if (e[z] && t in e[z]) {
|
|
1717
|
-
if (e[z][t] ===
|
|
1919
|
+
if (e[z][t] === B) return undefined;
|
|
1718
1920
|
const n = getPropertyDescriptor(e[G], e[K], t);
|
|
1719
1921
|
if (n) {
|
|
1720
1922
|
return { ...n, value: e[z][t] };
|
|
@@ -1728,9 +1930,9 @@ const ne = {
|
|
|
1728
1930
|
}
|
|
1729
1931
|
};
|
|
1730
1932
|
function storeSetter(e, t) {
|
|
1731
|
-
const n =
|
|
1732
|
-
|
|
1733
|
-
|
|
1933
|
+
const n = ne;
|
|
1934
|
+
ne = new Set();
|
|
1935
|
+
ne.add(e);
|
|
1734
1936
|
try {
|
|
1735
1937
|
const n = t(e);
|
|
1736
1938
|
if (n !== e && n !== undefined) {
|
|
@@ -1746,8 +1948,8 @@ function storeSetter(e, t) {
|
|
|
1746
1948
|
}
|
|
1747
1949
|
}
|
|
1748
1950
|
} finally {
|
|
1749
|
-
|
|
1750
|
-
|
|
1951
|
+
ne.clear();
|
|
1952
|
+
ne = n;
|
|
1751
1953
|
}
|
|
1752
1954
|
}
|
|
1753
1955
|
function createStore(e, t, n) {
|
|
@@ -1756,17 +1958,17 @@ function createStore(e, t, n) {
|
|
|
1756
1958
|
return [i, e => storeSetter(i, e)];
|
|
1757
1959
|
}
|
|
1758
1960
|
function recursivelyNotify(e, t) {
|
|
1759
|
-
let n = e[
|
|
1961
|
+
let n = e[F] || t?.get(e)?.[F];
|
|
1760
1962
|
let r = false;
|
|
1761
1963
|
if (n) {
|
|
1762
|
-
const e = getNodes(n, U)[
|
|
1964
|
+
const e = getNodes(n, U)[q];
|
|
1763
1965
|
if (e) {
|
|
1764
1966
|
setSignal(e, undefined);
|
|
1765
1967
|
r = true;
|
|
1766
1968
|
}
|
|
1767
|
-
t = n[
|
|
1969
|
+
t = n[Y] || t;
|
|
1768
1970
|
}
|
|
1769
|
-
const i =
|
|
1971
|
+
const i = D.get(n?.[G] || e);
|
|
1770
1972
|
if (!i) return r;
|
|
1771
1973
|
if (i instanceof Set) {
|
|
1772
1974
|
for (let e of i) r = recursivelyNotify(e, t) || r;
|
|
@@ -1775,16 +1977,16 @@ function recursivelyNotify(e, t) {
|
|
|
1775
1977
|
}
|
|
1776
1978
|
function recursivelyAddParent(e, t) {
|
|
1777
1979
|
let n;
|
|
1778
|
-
const r = e[
|
|
1980
|
+
const r = e[F];
|
|
1779
1981
|
if (r) {
|
|
1780
1982
|
n = r[K];
|
|
1781
1983
|
e = r[G];
|
|
1782
1984
|
}
|
|
1783
1985
|
if (t) {
|
|
1784
|
-
let n =
|
|
1785
|
-
if (!n)
|
|
1986
|
+
let n = D.get(e);
|
|
1987
|
+
if (!n) D.set(e, t);
|
|
1786
1988
|
else if (n !== t) {
|
|
1787
|
-
if (!(n instanceof Set))
|
|
1989
|
+
if (!(n instanceof Set)) D.set(e, (n = new Set([n])));
|
|
1788
1990
|
else if (n.has(t)) return;
|
|
1789
1991
|
n.add(t);
|
|
1790
1992
|
} else return;
|
|
@@ -1806,10 +2008,10 @@ function recursivelyAddParent(e, t) {
|
|
|
1806
2008
|
}
|
|
1807
2009
|
function deep(e) {
|
|
1808
2010
|
recursivelyAddParent(e);
|
|
1809
|
-
return e[
|
|
2011
|
+
return e[q];
|
|
1810
2012
|
}
|
|
1811
2013
|
function createOptimisticStore(e, t, n) {
|
|
1812
|
-
GlobalQueue.
|
|
2014
|
+
GlobalQueue.ne ||= clearOptimisticStore;
|
|
1813
2015
|
const r = typeof e === "function";
|
|
1814
2016
|
const i = (r ? t : e) ?? {};
|
|
1815
2017
|
const s = r ? e : undefined;
|
|
@@ -1817,19 +2019,28 @@ function createOptimisticStore(e, t, n) {
|
|
|
1817
2019
|
return [o, e => storeSetter(o, e)];
|
|
1818
2020
|
}
|
|
1819
2021
|
function clearOptimisticStore(e) {
|
|
1820
|
-
const t = e[
|
|
2022
|
+
const t = e[F];
|
|
1821
2023
|
if (!t || !t[z]) return;
|
|
1822
2024
|
const n = t[z];
|
|
1823
2025
|
const r = t[U];
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
2026
|
+
setProjectionWriteActive(true);
|
|
2027
|
+
try {
|
|
2028
|
+
if (r) {
|
|
2029
|
+
for (const e of Reflect.ownKeys(n)) {
|
|
2030
|
+
if (r[e]) {
|
|
2031
|
+
r[e].D = undefined;
|
|
2032
|
+
const n = t[K] && e in t[K] ? t[K][e] : t[G][e];
|
|
2033
|
+
const i = n === B ? undefined : n;
|
|
2034
|
+
setSignal(r[e], isWrappable(i) ? wrap(i, t) : i);
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
2037
|
+
if (r[M]) {
|
|
2038
|
+
r[M].D = undefined;
|
|
2039
|
+
setSignal(r[M], undefined);
|
|
1830
2040
|
}
|
|
1831
2041
|
}
|
|
1832
|
-
|
|
2042
|
+
} finally {
|
|
2043
|
+
setProjectionWriteActive(false);
|
|
1833
2044
|
}
|
|
1834
2045
|
delete t[z];
|
|
1835
2046
|
}
|
|
@@ -1837,10 +2048,10 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
|
|
|
1837
2048
|
let r;
|
|
1838
2049
|
const i = new WeakMap();
|
|
1839
2050
|
const wrapper = e => {
|
|
1840
|
-
e[
|
|
1841
|
-
e[
|
|
1842
|
-
e[
|
|
1843
|
-
Object.defineProperty(e,
|
|
2051
|
+
e[X] = wrapProjection;
|
|
2052
|
+
e[Y] = i;
|
|
2053
|
+
e[$] = true;
|
|
2054
|
+
Object.defineProperty(e, Z, {
|
|
1844
2055
|
get() {
|
|
1845
2056
|
return r;
|
|
1846
2057
|
},
|
|
@@ -1849,8 +2060,8 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
|
|
|
1849
2060
|
};
|
|
1850
2061
|
const wrapProjection = e => {
|
|
1851
2062
|
if (i.has(e)) return i.get(e);
|
|
1852
|
-
if (e[
|
|
1853
|
-
const t = createStoreProxy(e,
|
|
2063
|
+
if (e[F]?.[X] === wrapProjection) return e;
|
|
2064
|
+
const t = createStoreProxy(e, re, wrapper);
|
|
1854
2065
|
i.set(e, t);
|
|
1855
2066
|
return t;
|
|
1856
2067
|
};
|
|
@@ -1875,21 +2086,21 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
|
|
|
1875
2086
|
setProjectionWriteActive(false);
|
|
1876
2087
|
}
|
|
1877
2088
|
});
|
|
1878
|
-
r.
|
|
2089
|
+
r.ke = true;
|
|
1879
2090
|
}
|
|
1880
2091
|
return { store: s, node: r };
|
|
1881
2092
|
}
|
|
1882
2093
|
function snapshot(e, t, n) {
|
|
1883
|
-
let r, i, s, o, u,
|
|
2094
|
+
let r, i, s, o, u, f;
|
|
1884
2095
|
if (!isWrappable(e)) return e;
|
|
1885
2096
|
if (t && t.has(e)) return t.get(e);
|
|
1886
2097
|
if (!t) t = new Map();
|
|
1887
|
-
if ((r = e[
|
|
2098
|
+
if ((r = e[F] || n?.get(e)?.[F])) {
|
|
1888
2099
|
s = r[K];
|
|
1889
2100
|
i = Array.isArray(r[G]);
|
|
1890
2101
|
t.set(e, s ? (o = i ? [] : Object.create(Object.getPrototypeOf(r[G]))) : r[G]);
|
|
1891
2102
|
e = r[G];
|
|
1892
|
-
n =
|
|
2103
|
+
n = ee;
|
|
1893
2104
|
} else {
|
|
1894
2105
|
i = Array.isArray(e);
|
|
1895
2106
|
t.set(e, e);
|
|
@@ -1897,26 +2108,26 @@ function snapshot(e, t, n) {
|
|
|
1897
2108
|
if (i) {
|
|
1898
2109
|
const r = s?.length || e.length;
|
|
1899
2110
|
for (let i = 0; i < r; i++) {
|
|
1900
|
-
|
|
1901
|
-
if (
|
|
1902
|
-
if ((u = snapshot(
|
|
2111
|
+
f = s && i in s ? s[i] : e[i];
|
|
2112
|
+
if (f === B) continue;
|
|
2113
|
+
if ((u = snapshot(f, t, n)) !== f || o) {
|
|
1903
2114
|
if (!o) t.set(e, (o = [...e]));
|
|
1904
2115
|
o[i] = u;
|
|
1905
2116
|
}
|
|
1906
2117
|
}
|
|
1907
2118
|
} else {
|
|
1908
2119
|
const r = getKeys(e, s);
|
|
1909
|
-
for (let i = 0,
|
|
1910
|
-
let
|
|
1911
|
-
const c = getPropertyDescriptor(e, s,
|
|
2120
|
+
for (let i = 0, l = r.length; i < l; i++) {
|
|
2121
|
+
let l = r[i];
|
|
2122
|
+
const c = getPropertyDescriptor(e, s, l);
|
|
1912
2123
|
if (c.get) continue;
|
|
1913
|
-
|
|
1914
|
-
if ((u = snapshot(
|
|
2124
|
+
f = s && l in s ? s[l] : e[l];
|
|
2125
|
+
if ((u = snapshot(f, t, n)) !== e[l] || o) {
|
|
1915
2126
|
if (!o) {
|
|
1916
2127
|
o = Object.create(Object.getPrototypeOf(e));
|
|
1917
2128
|
Object.assign(o, e);
|
|
1918
2129
|
}
|
|
1919
|
-
o[
|
|
2130
|
+
o[l] = u;
|
|
1920
2131
|
}
|
|
1921
2132
|
}
|
|
1922
2133
|
}
|
|
@@ -1925,13 +2136,13 @@ function snapshot(e, t, n) {
|
|
|
1925
2136
|
function trueFn() {
|
|
1926
2137
|
return true;
|
|
1927
2138
|
}
|
|
1928
|
-
const
|
|
2139
|
+
const ie = {
|
|
1929
2140
|
get(e, t, n) {
|
|
1930
|
-
if (t ===
|
|
2141
|
+
if (t === V) return n;
|
|
1931
2142
|
return e.get(t);
|
|
1932
2143
|
},
|
|
1933
2144
|
has(e, t) {
|
|
1934
|
-
if (t ===
|
|
2145
|
+
if (t === V) return true;
|
|
1935
2146
|
return e.has(t);
|
|
1936
2147
|
},
|
|
1937
2148
|
set: trueFn,
|
|
@@ -1954,23 +2165,23 @@ const re = {
|
|
|
1954
2165
|
function resolveSource(e) {
|
|
1955
2166
|
return !(e = typeof e === "function" ? e() : e) ? {} : e;
|
|
1956
2167
|
}
|
|
1957
|
-
const
|
|
2168
|
+
const se = Symbol(0);
|
|
1958
2169
|
function merge(...e) {
|
|
1959
2170
|
if (e.length === 1 && typeof e[0] !== "function") return e[0];
|
|
1960
2171
|
let t = false;
|
|
1961
2172
|
const n = [];
|
|
1962
2173
|
for (let r = 0; r < e.length; r++) {
|
|
1963
2174
|
const i = e[r];
|
|
1964
|
-
t = t || (!!i &&
|
|
1965
|
-
const s = !!i && i[
|
|
2175
|
+
t = t || (!!i && V in i);
|
|
2176
|
+
const s = !!i && i[se];
|
|
1966
2177
|
if (s) n.push(...s);
|
|
1967
2178
|
else n.push(typeof i === "function" ? ((t = true), createMemo(i)) : i);
|
|
1968
2179
|
}
|
|
1969
|
-
if (
|
|
2180
|
+
if (g && t) {
|
|
1970
2181
|
return new Proxy(
|
|
1971
2182
|
{
|
|
1972
2183
|
get(e) {
|
|
1973
|
-
if (e ===
|
|
2184
|
+
if (e === se) return n;
|
|
1974
2185
|
for (let t = n.length - 1; t >= 0; t--) {
|
|
1975
2186
|
const r = resolveSource(n[t]);
|
|
1976
2187
|
if (e in r) return r[e];
|
|
@@ -1988,7 +2199,7 @@ function merge(...e) {
|
|
|
1988
2199
|
return [...new Set(e)];
|
|
1989
2200
|
}
|
|
1990
2201
|
},
|
|
1991
|
-
|
|
2202
|
+
ie
|
|
1992
2203
|
);
|
|
1993
2204
|
}
|
|
1994
2205
|
const r = Object.create(null);
|
|
@@ -2020,12 +2231,12 @@ function merge(...e) {
|
|
|
2020
2231
|
if (n.get) Object.defineProperty(o, t, n);
|
|
2021
2232
|
else o[t] = n.value;
|
|
2022
2233
|
}
|
|
2023
|
-
o[
|
|
2234
|
+
o[se] = n;
|
|
2024
2235
|
return o;
|
|
2025
2236
|
}
|
|
2026
2237
|
function omit(e, ...t) {
|
|
2027
2238
|
const n = new Set(t);
|
|
2028
|
-
if (
|
|
2239
|
+
if (g && V in e) {
|
|
2029
2240
|
return new Proxy(
|
|
2030
2241
|
{
|
|
2031
2242
|
get(t) {
|
|
@@ -2038,7 +2249,7 @@ function omit(e, ...t) {
|
|
|
2038
2249
|
return Object.keys(e).filter(e => !n.has(e));
|
|
2039
2250
|
}
|
|
2040
2251
|
},
|
|
2041
|
-
|
|
2252
|
+
ie
|
|
2042
2253
|
);
|
|
2043
2254
|
}
|
|
2044
2255
|
const r = {};
|
|
@@ -2056,313 +2267,321 @@ function mapArray(e, t, n) {
|
|
|
2056
2267
|
const r = typeof n?.keyed === "function" ? n.keyed : undefined;
|
|
2057
2268
|
return createMemo(
|
|
2058
2269
|
updateKeyedMap.bind({
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2270
|
+
Re: createOwner(),
|
|
2271
|
+
Te: 0,
|
|
2272
|
+
Me: e,
|
|
2273
|
+
qe: [],
|
|
2274
|
+
Fe: t,
|
|
2275
|
+
Ve: [],
|
|
2276
|
+
Be: [],
|
|
2277
|
+
De: r,
|
|
2278
|
+
Ge: r || n?.keyed === false ? [] : undefined,
|
|
2279
|
+
Ke: t.length > 1 ? [] : undefined,
|
|
2280
|
+
ze: n?.fallback
|
|
2070
2281
|
})
|
|
2071
2282
|
);
|
|
2072
2283
|
}
|
|
2073
|
-
const
|
|
2284
|
+
const oe = { pureWrite: true };
|
|
2074
2285
|
function updateKeyedMap() {
|
|
2075
|
-
const e = this.
|
|
2286
|
+
const e = this.Me() || [],
|
|
2076
2287
|
t = e.length;
|
|
2077
|
-
e[
|
|
2078
|
-
runWithOwner(this.
|
|
2288
|
+
e[M];
|
|
2289
|
+
runWithOwner(this.Re, () => {
|
|
2079
2290
|
let n,
|
|
2080
2291
|
r,
|
|
2081
|
-
i = this.
|
|
2292
|
+
i = this.Ge
|
|
2082
2293
|
? () => {
|
|
2083
|
-
this.
|
|
2084
|
-
this.
|
|
2085
|
-
return this.
|
|
2086
|
-
read.bind(null, this.
|
|
2087
|
-
this.
|
|
2294
|
+
this.Ge[r] = signal(e[r], oe);
|
|
2295
|
+
this.Ke && (this.Ke[r] = signal(r, oe));
|
|
2296
|
+
return this.Fe(
|
|
2297
|
+
read.bind(null, this.Ge[r]),
|
|
2298
|
+
this.Ke ? read.bind(null, this.Ke[r]) : undefined
|
|
2088
2299
|
);
|
|
2089
2300
|
}
|
|
2090
|
-
: this.
|
|
2301
|
+
: this.Ke
|
|
2091
2302
|
? () => {
|
|
2092
2303
|
const t = e[r];
|
|
2093
|
-
this.
|
|
2094
|
-
return this.
|
|
2304
|
+
this.Ke[r] = signal(r, oe);
|
|
2305
|
+
return this.Fe(() => t, read.bind(null, this.Ke[r]));
|
|
2095
2306
|
}
|
|
2096
2307
|
: () => {
|
|
2097
2308
|
const t = e[r];
|
|
2098
|
-
return this.
|
|
2309
|
+
return this.Fe(() => t);
|
|
2099
2310
|
};
|
|
2100
2311
|
if (t === 0) {
|
|
2101
|
-
if (this.
|
|
2102
|
-
this.
|
|
2103
|
-
this.
|
|
2104
|
-
this.
|
|
2105
|
-
this.
|
|
2106
|
-
this.
|
|
2107
|
-
this.
|
|
2108
|
-
this.
|
|
2109
|
-
}
|
|
2110
|
-
if (this.
|
|
2111
|
-
this.
|
|
2112
|
-
}
|
|
2113
|
-
} else if (this.
|
|
2114
|
-
if (this.
|
|
2115
|
-
this.
|
|
2312
|
+
if (this.Te !== 0) {
|
|
2313
|
+
this.Re.dispose(false);
|
|
2314
|
+
this.Be = [];
|
|
2315
|
+
this.qe = [];
|
|
2316
|
+
this.Ve = [];
|
|
2317
|
+
this.Te = 0;
|
|
2318
|
+
this.Ge && (this.Ge = []);
|
|
2319
|
+
this.Ke && (this.Ke = []);
|
|
2320
|
+
}
|
|
2321
|
+
if (this.ze && !this.Ve[0]) {
|
|
2322
|
+
this.Ve[0] = runWithOwner((this.Be[0] = createOwner()), this.ze);
|
|
2323
|
+
}
|
|
2324
|
+
} else if (this.Te === 0) {
|
|
2325
|
+
if (this.Be[0]) this.Be[0].dispose();
|
|
2326
|
+
this.Ve = new Array(t);
|
|
2116
2327
|
for (r = 0; r < t; r++) {
|
|
2117
|
-
this.
|
|
2118
|
-
this.
|
|
2328
|
+
this.qe[r] = e[r];
|
|
2329
|
+
this.Ve[r] = runWithOwner((this.Be[r] = createOwner()), i);
|
|
2119
2330
|
}
|
|
2120
|
-
this.
|
|
2331
|
+
this.Te = t;
|
|
2121
2332
|
} else {
|
|
2122
2333
|
let s,
|
|
2123
2334
|
o,
|
|
2124
2335
|
u,
|
|
2125
|
-
l,
|
|
2126
2336
|
f,
|
|
2337
|
+
l,
|
|
2127
2338
|
c,
|
|
2128
2339
|
a,
|
|
2129
2340
|
d = new Array(t),
|
|
2130
2341
|
p = new Array(t),
|
|
2131
|
-
h = this.
|
|
2132
|
-
y = this.
|
|
2342
|
+
h = this.Ge ? new Array(t) : undefined,
|
|
2343
|
+
y = this.Ke ? new Array(t) : undefined;
|
|
2133
2344
|
for (
|
|
2134
|
-
s = 0, o = Math.min(this.
|
|
2135
|
-
s < o && (this.
|
|
2345
|
+
s = 0, o = Math.min(this.Te, t);
|
|
2346
|
+
s < o && (this.qe[s] === e[s] || (this.Ge && compare(this.De, this.qe[s], e[s])));
|
|
2136
2347
|
s++
|
|
2137
2348
|
) {
|
|
2138
|
-
if (this.
|
|
2349
|
+
if (this.Ge) setSignal(this.Ge[s], e[s]);
|
|
2139
2350
|
}
|
|
2140
2351
|
for (
|
|
2141
|
-
o = this.
|
|
2352
|
+
o = this.Te - 1, u = t - 1;
|
|
2142
2353
|
o >= s &&
|
|
2143
2354
|
u >= s &&
|
|
2144
|
-
(this.
|
|
2355
|
+
(this.qe[o] === e[u] || (this.Ge && compare(this.De, this.qe[o], e[u])));
|
|
2145
2356
|
o--, u--
|
|
2146
2357
|
) {
|
|
2147
|
-
d[u] = this.
|
|
2148
|
-
p[u] = this.
|
|
2149
|
-
h && (h[u] = this.
|
|
2150
|
-
y && (y[u] = this.
|
|
2358
|
+
d[u] = this.Ve[o];
|
|
2359
|
+
p[u] = this.Be[o];
|
|
2360
|
+
h && (h[u] = this.Ge[o]);
|
|
2361
|
+
y && (y[u] = this.Ke[o]);
|
|
2151
2362
|
}
|
|
2152
2363
|
c = new Map();
|
|
2153
2364
|
a = new Array(u + 1);
|
|
2154
2365
|
for (r = u; r >= s; r--) {
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
n = c.get(
|
|
2366
|
+
f = e[r];
|
|
2367
|
+
l = this.De ? this.De(f) : f;
|
|
2368
|
+
n = c.get(l);
|
|
2158
2369
|
a[r] = n === undefined ? -1 : n;
|
|
2159
|
-
c.set(
|
|
2370
|
+
c.set(l, r);
|
|
2160
2371
|
}
|
|
2161
2372
|
for (n = s; n <= o; n++) {
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
r = c.get(
|
|
2373
|
+
f = this.qe[n];
|
|
2374
|
+
l = this.De ? this.De(f) : f;
|
|
2375
|
+
r = c.get(l);
|
|
2165
2376
|
if (r !== undefined && r !== -1) {
|
|
2166
|
-
d[r] = this.
|
|
2167
|
-
p[r] = this.
|
|
2168
|
-
h && (h[r] = this.
|
|
2169
|
-
y && (y[r] = this.
|
|
2377
|
+
d[r] = this.Ve[n];
|
|
2378
|
+
p[r] = this.Be[n];
|
|
2379
|
+
h && (h[r] = this.Ge[n]);
|
|
2380
|
+
y && (y[r] = this.Ke[n]);
|
|
2170
2381
|
r = a[r];
|
|
2171
|
-
c.set(
|
|
2172
|
-
} else this.
|
|
2382
|
+
c.set(l, r);
|
|
2383
|
+
} else this.Be[n].dispose();
|
|
2173
2384
|
}
|
|
2174
2385
|
for (r = s; r < t; r++) {
|
|
2175
2386
|
if (r in d) {
|
|
2176
|
-
this.
|
|
2177
|
-
this.
|
|
2387
|
+
this.Ve[r] = d[r];
|
|
2388
|
+
this.Be[r] = p[r];
|
|
2178
2389
|
if (h) {
|
|
2179
|
-
this.
|
|
2180
|
-
setSignal(this.
|
|
2390
|
+
this.Ge[r] = h[r];
|
|
2391
|
+
setSignal(this.Ge[r], e[r]);
|
|
2181
2392
|
}
|
|
2182
2393
|
if (y) {
|
|
2183
|
-
this.
|
|
2184
|
-
setSignal(this.
|
|
2394
|
+
this.Ke[r] = y[r];
|
|
2395
|
+
setSignal(this.Ke[r], r);
|
|
2185
2396
|
}
|
|
2186
2397
|
} else {
|
|
2187
|
-
this.
|
|
2398
|
+
this.Ve[r] = runWithOwner((this.Be[r] = createOwner()), i);
|
|
2188
2399
|
}
|
|
2189
2400
|
}
|
|
2190
|
-
this.
|
|
2191
|
-
this.
|
|
2401
|
+
this.Ve = this.Ve.slice(0, (this.Te = t));
|
|
2402
|
+
this.qe = e.slice(0);
|
|
2192
2403
|
}
|
|
2193
2404
|
});
|
|
2194
|
-
return this.
|
|
2405
|
+
return this.Ve;
|
|
2195
2406
|
}
|
|
2196
2407
|
function repeat(e, t, n) {
|
|
2197
2408
|
return updateRepeat.bind({
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2409
|
+
Re: createOwner(),
|
|
2410
|
+
Te: 0,
|
|
2411
|
+
Ue: 0,
|
|
2412
|
+
Je: e,
|
|
2413
|
+
Fe: t,
|
|
2414
|
+
Be: [],
|
|
2415
|
+
Ve: [],
|
|
2416
|
+
Xe: n?.from,
|
|
2417
|
+
ze: n?.fallback
|
|
2207
2418
|
});
|
|
2208
2419
|
}
|
|
2209
2420
|
function updateRepeat() {
|
|
2210
|
-
const e = this.
|
|
2211
|
-
const t = this.
|
|
2212
|
-
runWithOwner(this.
|
|
2421
|
+
const e = this.Je();
|
|
2422
|
+
const t = this.Xe?.() || 0;
|
|
2423
|
+
runWithOwner(this.Re, () => {
|
|
2213
2424
|
if (e === 0) {
|
|
2214
|
-
if (this.
|
|
2215
|
-
this.
|
|
2216
|
-
this.
|
|
2217
|
-
this.
|
|
2218
|
-
this.
|
|
2425
|
+
if (this.Te !== 0) {
|
|
2426
|
+
this.Re.dispose(false);
|
|
2427
|
+
this.Be = [];
|
|
2428
|
+
this.Ve = [];
|
|
2429
|
+
this.Te = 0;
|
|
2219
2430
|
}
|
|
2220
|
-
if (this.
|
|
2221
|
-
this.
|
|
2431
|
+
if (this.ze && !this.Ve[0]) {
|
|
2432
|
+
this.Ve[0] = runWithOwner((this.Be[0] = createOwner()), this.ze);
|
|
2222
2433
|
}
|
|
2223
2434
|
return;
|
|
2224
2435
|
}
|
|
2225
2436
|
const n = t + e;
|
|
2226
|
-
const r = this.
|
|
2227
|
-
if (this.
|
|
2228
|
-
for (let e = n; e < r; e++) this.
|
|
2229
|
-
if (this.
|
|
2230
|
-
let e = this.
|
|
2231
|
-
while (e < t && e < this.
|
|
2232
|
-
this.
|
|
2233
|
-
this.
|
|
2234
|
-
} else if (this.
|
|
2235
|
-
let n = r - this.
|
|
2236
|
-
let i = this.
|
|
2237
|
-
this.
|
|
2437
|
+
const r = this.Ue + this.Te;
|
|
2438
|
+
if (this.Te === 0 && this.Be[0]) this.Be[0].dispose();
|
|
2439
|
+
for (let e = n; e < r; e++) this.Be[e - this.Ue].dispose();
|
|
2440
|
+
if (this.Ue < t) {
|
|
2441
|
+
let e = this.Ue;
|
|
2442
|
+
while (e < t && e < this.Te) this.Be[e++].dispose();
|
|
2443
|
+
this.Be.splice(0, t - this.Ue);
|
|
2444
|
+
this.Ve.splice(0, t - this.Ue);
|
|
2445
|
+
} else if (this.Ue > t) {
|
|
2446
|
+
let n = r - this.Ue - 1;
|
|
2447
|
+
let i = this.Ue - t;
|
|
2448
|
+
this.Be.length = this.Ve.length = e;
|
|
2238
2449
|
while (n >= i) {
|
|
2239
|
-
this.
|
|
2240
|
-
this.
|
|
2450
|
+
this.Be[n] = this.Be[n - i];
|
|
2451
|
+
this.Ve[n] = this.Ve[n - i];
|
|
2241
2452
|
n--;
|
|
2242
2453
|
}
|
|
2243
2454
|
for (let e = 0; e < i; e++) {
|
|
2244
|
-
this.
|
|
2455
|
+
this.Ve[e] = runWithOwner((this.Be[e] = createOwner()), () => this.Fe(e + t));
|
|
2245
2456
|
}
|
|
2246
2457
|
}
|
|
2247
2458
|
for (let e = r; e < n; e++) {
|
|
2248
|
-
this.
|
|
2459
|
+
this.Ve[e - t] = runWithOwner((this.Be[e - t] = createOwner()), () => this.Fe(e));
|
|
2249
2460
|
}
|
|
2250
|
-
this.
|
|
2251
|
-
this.
|
|
2252
|
-
this.
|
|
2461
|
+
this.Ve = this.Ve.slice(0, e);
|
|
2462
|
+
this.Ue = t;
|
|
2463
|
+
this.Te = e;
|
|
2253
2464
|
});
|
|
2254
|
-
return this.
|
|
2465
|
+
return this.Ve;
|
|
2255
2466
|
}
|
|
2256
2467
|
function compare(e, t, n) {
|
|
2257
2468
|
return e ? e(t) === e(n) : true;
|
|
2258
2469
|
}
|
|
2259
2470
|
function boundaryComputed(e, t) {
|
|
2260
2471
|
const n = computed(e, undefined, { lazy: true });
|
|
2261
|
-
n.
|
|
2262
|
-
const
|
|
2263
|
-
|
|
2264
|
-
n
|
|
2472
|
+
n.xe = (e, t) => {
|
|
2473
|
+
const r = e !== undefined ? e : n.he;
|
|
2474
|
+
const i = t !== undefined ? t : n.ie;
|
|
2475
|
+
n.he &= ~n.Ye;
|
|
2476
|
+
n.ae.notify(n, n.Ye, r, i);
|
|
2265
2477
|
};
|
|
2266
|
-
n.
|
|
2267
|
-
n.
|
|
2478
|
+
n.Ye = t;
|
|
2479
|
+
n.ke = true;
|
|
2268
2480
|
recompute(n, true);
|
|
2269
2481
|
return n;
|
|
2270
2482
|
}
|
|
2271
2483
|
function createBoundChildren(e, t, n, r) {
|
|
2272
|
-
const i = e
|
|
2273
|
-
i.addChild((e
|
|
2274
|
-
onCleanup(() => i.removeChild(e
|
|
2484
|
+
const i = e.ae;
|
|
2485
|
+
i.addChild((e.ae = n));
|
|
2486
|
+
onCleanup(() => i.removeChild(e.ae));
|
|
2275
2487
|
return runWithOwner(e, () => {
|
|
2276
2488
|
const e = computed(t);
|
|
2277
2489
|
return boundaryComputed(() => staleValues(() => flatten(read(e))), r);
|
|
2278
2490
|
});
|
|
2279
2491
|
}
|
|
2280
2492
|
class ConditionalQueue extends Queue {
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2493
|
+
Ze;
|
|
2494
|
+
$e = new Set();
|
|
2495
|
+
Y = new Set();
|
|
2284
2496
|
constructor(e) {
|
|
2285
2497
|
super();
|
|
2286
|
-
this.
|
|
2498
|
+
this.Ze = e;
|
|
2287
2499
|
}
|
|
2288
2500
|
run(e) {
|
|
2289
|
-
if (!e || read(this.
|
|
2501
|
+
if (!e || read(this.Ze)) return;
|
|
2290
2502
|
return super.run(e);
|
|
2291
2503
|
}
|
|
2292
|
-
notify(e, t, n) {
|
|
2293
|
-
if (read(this.
|
|
2504
|
+
notify(e, t, n, r) {
|
|
2505
|
+
if (read(this.Ze)) {
|
|
2506
|
+
if (t & l) {
|
|
2507
|
+
if (n & l) {
|
|
2508
|
+
this.Y.add(e);
|
|
2509
|
+
t &= ~l;
|
|
2510
|
+
} else if (this.Y.delete(e)) t &= ~l;
|
|
2511
|
+
}
|
|
2294
2512
|
if (t & c) {
|
|
2295
2513
|
if (n & c) {
|
|
2296
|
-
this.
|
|
2514
|
+
this.$e.add(e);
|
|
2297
2515
|
t &= ~c;
|
|
2298
|
-
} else if (this.
|
|
2299
|
-
}
|
|
2300
|
-
if (t & a) {
|
|
2301
|
-
if (n & a) {
|
|
2302
|
-
this.Ge.add(e);
|
|
2303
|
-
t &= ~a;
|
|
2304
|
-
} else if (this.Ge.delete(e)) t &= ~a;
|
|
2516
|
+
} else if (this.$e.delete(e)) t &= ~c;
|
|
2305
2517
|
}
|
|
2306
2518
|
}
|
|
2307
|
-
return t ? super.notify(e, t, n) : true;
|
|
2519
|
+
return t ? super.notify(e, t, n, r ?? e.ie) : true;
|
|
2308
2520
|
}
|
|
2309
2521
|
}
|
|
2310
2522
|
class CollectionQueue extends Queue {
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2523
|
+
et;
|
|
2524
|
+
tt = new Set();
|
|
2525
|
+
Ze = signal(false, { pureWrite: true });
|
|
2526
|
+
nt = false;
|
|
2315
2527
|
constructor(e) {
|
|
2316
2528
|
super();
|
|
2317
|
-
this.
|
|
2529
|
+
this.et = e;
|
|
2318
2530
|
}
|
|
2319
2531
|
run(e) {
|
|
2320
|
-
if (!e || read(this.
|
|
2532
|
+
if (!e || read(this.Ze)) return;
|
|
2321
2533
|
return super.run(e);
|
|
2322
2534
|
}
|
|
2323
|
-
notify(e, t, n) {
|
|
2324
|
-
if (!(t & this.
|
|
2325
|
-
if (n & this.
|
|
2326
|
-
|
|
2327
|
-
if (
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2535
|
+
notify(e, t, n, r) {
|
|
2536
|
+
if (!(t & this.et) || (this.et & l && this.nt)) return super.notify(e, t, n, r);
|
|
2537
|
+
if (n & this.et) {
|
|
2538
|
+
const t = r?.t || e.ie?.t;
|
|
2539
|
+
if (t) {
|
|
2540
|
+
const e = this.tt.size === 0;
|
|
2541
|
+
this.tt.add(t);
|
|
2542
|
+
if (e) setSignal(this.Ze, true);
|
|
2543
|
+
}
|
|
2544
|
+
}
|
|
2545
|
+
t &= ~this.et;
|
|
2546
|
+
return t ? super.notify(e, t, n, r) : true;
|
|
2547
|
+
}
|
|
2548
|
+
checkSources() {
|
|
2549
|
+
for (const e of this.tt) {
|
|
2550
|
+
if (!(e.he & this.et)) this.tt.delete(e);
|
|
2331
2551
|
}
|
|
2332
|
-
|
|
2333
|
-
return t ? super.notify(e, t, n) : true;
|
|
2552
|
+
if (!this.tt.size) setSignal(this.Ze, false);
|
|
2334
2553
|
}
|
|
2335
2554
|
}
|
|
2336
|
-
var
|
|
2555
|
+
var ue;
|
|
2337
2556
|
(function (e) {
|
|
2338
2557
|
e["VISIBLE"] = "visible";
|
|
2339
2558
|
e["HIDDEN"] = "hidden";
|
|
2340
|
-
})(
|
|
2559
|
+
})(ue || (ue = {}));
|
|
2341
2560
|
function createBoundary(e, t) {
|
|
2342
2561
|
const n = createOwner();
|
|
2343
|
-
const r = new ConditionalQueue(computed(() => t() ===
|
|
2562
|
+
const r = new ConditionalQueue(computed(() => t() === ue.HIDDEN));
|
|
2344
2563
|
const i = createBoundChildren(n, e, r, 0);
|
|
2345
2564
|
computed(() => {
|
|
2346
|
-
const e = read(r.
|
|
2347
|
-
i.
|
|
2565
|
+
const e = read(r.Ze);
|
|
2566
|
+
i.Ye = e ? c | l : 0;
|
|
2348
2567
|
if (!e) {
|
|
2349
|
-
r.
|
|
2350
|
-
r.
|
|
2351
|
-
r.
|
|
2352
|
-
r.
|
|
2568
|
+
r.Y.forEach(e => r.notify(e, l, l, e.ie));
|
|
2569
|
+
r.$e.forEach(e => r.notify(e, c, c, e.ie));
|
|
2570
|
+
r.Y.clear();
|
|
2571
|
+
r.$e.clear();
|
|
2353
2572
|
}
|
|
2354
2573
|
});
|
|
2355
|
-
return () => (read(r.
|
|
2574
|
+
return () => (read(r.Ze) ? undefined : read(i));
|
|
2356
2575
|
}
|
|
2357
2576
|
function createCollectionBoundary(e, t, n) {
|
|
2358
2577
|
const r = createOwner();
|
|
2359
2578
|
const i = new CollectionQueue(e);
|
|
2360
2579
|
const s = createBoundChildren(r, t, i, e);
|
|
2361
2580
|
const o = computed(() => {
|
|
2362
|
-
if (!read(i.
|
|
2581
|
+
if (!read(i.Ze)) {
|
|
2363
2582
|
const e = read(s);
|
|
2364
|
-
if (!untrack(() => read(i.
|
|
2365
|
-
i.
|
|
2583
|
+
if (!untrack(() => read(i.Ze))) {
|
|
2584
|
+
i.nt = true;
|
|
2366
2585
|
return e;
|
|
2367
2586
|
}
|
|
2368
2587
|
}
|
|
@@ -2371,28 +2590,14 @@ function createCollectionBoundary(e, t, n) {
|
|
|
2371
2590
|
return read.bind(null, o);
|
|
2372
2591
|
}
|
|
2373
2592
|
function createLoadBoundary(e, t) {
|
|
2374
|
-
return createCollectionBoundary(
|
|
2375
|
-
}
|
|
2376
|
-
function collectErrorSources(e, t) {
|
|
2377
|
-
let n = true;
|
|
2378
|
-
let r = e.j;
|
|
2379
|
-
while (r !== null) {
|
|
2380
|
-
const e = r.H;
|
|
2381
|
-
if (e.j && e.re & a) {
|
|
2382
|
-
n = false;
|
|
2383
|
-
collectErrorSources(e, t);
|
|
2384
|
-
}
|
|
2385
|
-
r = r.N;
|
|
2386
|
-
}
|
|
2387
|
-
n && t.push(e);
|
|
2593
|
+
return createCollectionBoundary(l, e, () => t());
|
|
2388
2594
|
}
|
|
2389
2595
|
function createErrorBoundary(e, t) {
|
|
2390
|
-
return createCollectionBoundary(
|
|
2391
|
-
let n = e.
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
for (const
|
|
2395
|
-
for (const e of t) recompute(e);
|
|
2596
|
+
return createCollectionBoundary(c, e, e => {
|
|
2597
|
+
let n = e.tt.values().next().value;
|
|
2598
|
+
const r = n.ie?.cause ?? n.ie;
|
|
2599
|
+
return t(r, () => {
|
|
2600
|
+
for (const t of e.tt) recompute(t);
|
|
2396
2601
|
schedule();
|
|
2397
2602
|
});
|
|
2398
2603
|
});
|
|
@@ -2446,13 +2651,13 @@ function flattenArray(e, t = [], n) {
|
|
|
2446
2651
|
if (r) throw r;
|
|
2447
2652
|
return i;
|
|
2448
2653
|
}
|
|
2449
|
-
exports.$PROXY =
|
|
2450
|
-
exports.$TARGET =
|
|
2451
|
-
exports.$TRACK =
|
|
2654
|
+
exports.$PROXY = V;
|
|
2655
|
+
exports.$TARGET = F;
|
|
2656
|
+
exports.$TRACK = M;
|
|
2452
2657
|
exports.ContextNotFoundError = ContextNotFoundError;
|
|
2453
2658
|
exports.NoOwnerError = NoOwnerError;
|
|
2454
2659
|
exports.NotReadyError = NotReadyError;
|
|
2455
|
-
exports.SUPPORTS_PROXY =
|
|
2660
|
+
exports.SUPPORTS_PROXY = g;
|
|
2456
2661
|
exports.action = action;
|
|
2457
2662
|
exports.createBoundary = createBoundary;
|
|
2458
2663
|
exports.createContext = createContext;
|