@solidjs/universal 2.0.0-beta.2 → 2.0.0-beta.3
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.cjs +266 -252
- package/dist/dev.js +266 -252
- package/dist/universal.cjs +266 -252
- package/dist/universal.js +266 -252
- package/package.json +3 -3
package/dist/dev.cjs
CHANGED
|
@@ -72,9 +72,9 @@ function deleteFromHeap(e, t) {
|
|
|
72
72
|
if (e.T === e) t.l[i] = undefined;else {
|
|
73
73
|
const n = e.S;
|
|
74
74
|
const r = t.l[i];
|
|
75
|
-
const
|
|
75
|
+
const o = n ?? r;
|
|
76
76
|
if (e === r) t.l[i] = n;else e.T.S = n;
|
|
77
|
-
|
|
77
|
+
o.T = e.T;
|
|
78
78
|
}
|
|
79
79
|
e.T = e;
|
|
80
80
|
e.S = undefined;
|
|
@@ -96,7 +96,7 @@ function markNode(e, t = REACTIVE_DIRTY) {
|
|
|
96
96
|
markNode(t.h, REACTIVE_CHECK);
|
|
97
97
|
}
|
|
98
98
|
if (e.A !== null) {
|
|
99
|
-
for (let t = e.A; t !== null; t = t.
|
|
99
|
+
for (let t = e.A; t !== null; t = t.N) {
|
|
100
100
|
for (let e = t.I; e !== null; e = e.p) {
|
|
101
101
|
markNode(e.h, REACTIVE_CHECK);
|
|
102
102
|
}
|
|
@@ -105,11 +105,11 @@ function markNode(e, t = REACTIVE_DIRTY) {
|
|
|
105
105
|
}
|
|
106
106
|
function runHeap(e, t) {
|
|
107
107
|
e._ = false;
|
|
108
|
-
for (e.
|
|
109
|
-
let n = e.l[e.
|
|
108
|
+
for (e.P = 0; e.P <= e.R; e.P++) {
|
|
109
|
+
let n = e.l[e.P];
|
|
110
110
|
while (n !== undefined) {
|
|
111
111
|
if (n.O & REACTIVE_IN_HEAP) t(n);else adjustHeight(n, e);
|
|
112
|
-
n = e.l[e.
|
|
112
|
+
n = e.l[e.P];
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
e.R = 0;
|
|
@@ -118,8 +118,8 @@ function adjustHeight(e, t) {
|
|
|
118
118
|
deleteFromHeap(e, t);
|
|
119
119
|
let n = e.o;
|
|
120
120
|
for (let t = e.C; t; t = t.D) {
|
|
121
|
-
const e = t.
|
|
122
|
-
const i = e.
|
|
121
|
+
const e = t.m;
|
|
122
|
+
const i = e.V || e;
|
|
123
123
|
if (i.L && i.o >= n) n = i.o + 1;
|
|
124
124
|
}
|
|
125
125
|
if (e.o !== n) {
|
|
@@ -133,13 +133,13 @@ const transitions = new Set();
|
|
|
133
133
|
const dirtyQueue = {
|
|
134
134
|
l: new Array(2e3).fill(undefined),
|
|
135
135
|
_: false,
|
|
136
|
-
|
|
136
|
+
P: 0,
|
|
137
137
|
R: 0
|
|
138
138
|
};
|
|
139
139
|
const zombieQueue = {
|
|
140
140
|
l: new Array(2e3).fill(undefined),
|
|
141
141
|
_: false,
|
|
142
|
-
|
|
142
|
+
P: 0,
|
|
143
143
|
R: 0
|
|
144
144
|
};
|
|
145
145
|
let clock = 0;
|
|
@@ -163,16 +163,16 @@ function schedule() {
|
|
|
163
163
|
class Queue {
|
|
164
164
|
i = null;
|
|
165
165
|
G = [[], []];
|
|
166
|
-
|
|
166
|
+
F = [];
|
|
167
167
|
created = clock;
|
|
168
168
|
addChild(e) {
|
|
169
|
-
this.
|
|
169
|
+
this.F.push(e);
|
|
170
170
|
e.i = this;
|
|
171
171
|
}
|
|
172
172
|
removeChild(e) {
|
|
173
|
-
const t = this.
|
|
173
|
+
const t = this.F.indexOf(e);
|
|
174
174
|
if (t >= 0) {
|
|
175
|
-
this.
|
|
175
|
+
this.F.splice(t, 1);
|
|
176
176
|
e.i = null;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
@@ -186,7 +186,7 @@ class Queue {
|
|
|
186
186
|
this.G[e - 1] = [];
|
|
187
187
|
runQueue(t, e);
|
|
188
188
|
}
|
|
189
|
-
for (let t = 0; t < this.
|
|
189
|
+
for (let t = 0; t < this.F.length; t++) this.F[t].run?.(e);
|
|
190
190
|
}
|
|
191
191
|
enqueue(e, t) {
|
|
192
192
|
if (e) {
|
|
@@ -203,15 +203,15 @@ class Queue {
|
|
|
203
203
|
e.G[0].push(...this.G[0]);
|
|
204
204
|
e.G[1].push(...this.G[1]);
|
|
205
205
|
this.G = [[], []];
|
|
206
|
-
for (let t = 0; t < this.
|
|
207
|
-
let n = this.
|
|
208
|
-
let i = e.
|
|
206
|
+
for (let t = 0; t < this.F.length; t++) {
|
|
207
|
+
let n = this.F[t];
|
|
208
|
+
let i = e.F[t];
|
|
209
209
|
if (!i) {
|
|
210
210
|
i = {
|
|
211
211
|
G: [[], []],
|
|
212
|
-
|
|
212
|
+
F: []
|
|
213
213
|
};
|
|
214
|
-
e.
|
|
214
|
+
e.F[t] = i;
|
|
215
215
|
}
|
|
216
216
|
n.stashQueues(i);
|
|
217
217
|
}
|
|
@@ -219,21 +219,21 @@ class Queue {
|
|
|
219
219
|
restoreQueues(e) {
|
|
220
220
|
this.G[0].push(...e.G[0]);
|
|
221
221
|
this.G[1].push(...e.G[1]);
|
|
222
|
-
for (let t = 0; t < e.
|
|
223
|
-
const n = e.
|
|
224
|
-
let i = this.
|
|
222
|
+
for (let t = 0; t < e.F.length; t++) {
|
|
223
|
+
const n = e.F[t];
|
|
224
|
+
let i = this.F[t];
|
|
225
225
|
if (i) i.restoreQueues(n);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
class GlobalQueue extends Queue {
|
|
230
230
|
H = false;
|
|
231
|
-
|
|
231
|
+
M = [];
|
|
232
232
|
$ = [];
|
|
233
233
|
j = new Set();
|
|
234
234
|
static K;
|
|
235
235
|
static Y;
|
|
236
|
-
static
|
|
236
|
+
static B = null;
|
|
237
237
|
flush() {
|
|
238
238
|
if (this.H) return;
|
|
239
239
|
this.H = true;
|
|
@@ -244,32 +244,32 @@ class GlobalQueue extends Queue {
|
|
|
244
244
|
if (!e) {
|
|
245
245
|
let e = activeTransition;
|
|
246
246
|
runHeap(zombieQueue, GlobalQueue.K);
|
|
247
|
-
this.
|
|
247
|
+
this.M = [];
|
|
248
248
|
this.$ = [];
|
|
249
249
|
this.j = new Set();
|
|
250
250
|
runLaneEffects(EFFECT_RENDER);
|
|
251
251
|
runLaneEffects(EFFECT_USER);
|
|
252
|
-
this.stashQueues(activeTransition.
|
|
252
|
+
this.stashQueues(activeTransition.Z);
|
|
253
253
|
clock++;
|
|
254
|
-
scheduled = dirtyQueue.R >= dirtyQueue.
|
|
255
|
-
reassignPendingTransition(activeTransition.
|
|
254
|
+
scheduled = dirtyQueue.R >= dirtyQueue.P;
|
|
255
|
+
reassignPendingTransition(activeTransition.M);
|
|
256
256
|
activeTransition = null;
|
|
257
257
|
finalizePureQueue(null, true);
|
|
258
258
|
return;
|
|
259
259
|
}
|
|
260
|
-
this.
|
|
261
|
-
this.restoreQueues(activeTransition.
|
|
260
|
+
this.M !== activeTransition.M && this.M.push(...activeTransition.M);
|
|
261
|
+
this.restoreQueues(activeTransition.Z);
|
|
262
262
|
transitions.delete(activeTransition);
|
|
263
263
|
const t = activeTransition;
|
|
264
264
|
activeTransition = null;
|
|
265
|
-
reassignPendingTransition(this.
|
|
265
|
+
reassignPendingTransition(this.M);
|
|
266
266
|
finalizePureQueue(t);
|
|
267
267
|
} else {
|
|
268
268
|
if (transitions.size) runHeap(zombieQueue, GlobalQueue.K);
|
|
269
269
|
finalizePureQueue();
|
|
270
270
|
}
|
|
271
271
|
clock++;
|
|
272
|
-
scheduled = dirtyQueue.R >= dirtyQueue.
|
|
272
|
+
scheduled = dirtyQueue.R >= dirtyQueue.P;
|
|
273
273
|
runLaneEffects(EFFECT_RENDER);
|
|
274
274
|
this.run(EFFECT_RENDER);
|
|
275
275
|
runLaneEffects(EFFECT_USER);
|
|
@@ -281,9 +281,9 @@ class GlobalQueue extends Queue {
|
|
|
281
281
|
notify(e, t, n, i) {
|
|
282
282
|
if (t & STATUS_PENDING) {
|
|
283
283
|
if (n & STATUS_PENDING) {
|
|
284
|
-
const t = i !== undefined ? i : e.
|
|
285
|
-
if (activeTransition && t && !activeTransition.
|
|
286
|
-
activeTransition.
|
|
284
|
+
const t = i !== undefined ? i : e.q;
|
|
285
|
+
if (activeTransition && t && !activeTransition.X.includes(t.source)) {
|
|
286
|
+
activeTransition.X.push(t.source);
|
|
287
287
|
schedule();
|
|
288
288
|
}
|
|
289
289
|
}
|
|
@@ -298,14 +298,14 @@ class GlobalQueue extends Queue {
|
|
|
298
298
|
if (!activeTransition) {
|
|
299
299
|
activeTransition = e ?? {
|
|
300
300
|
J: clock,
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
M: [],
|
|
302
|
+
X: [],
|
|
303
303
|
$: [],
|
|
304
304
|
j: new Set(),
|
|
305
305
|
ee: [],
|
|
306
|
-
|
|
306
|
+
Z: {
|
|
307
307
|
G: [[], []],
|
|
308
|
-
|
|
308
|
+
F: []
|
|
309
309
|
},
|
|
310
310
|
te: false
|
|
311
311
|
};
|
|
@@ -325,12 +325,12 @@ class GlobalQueue extends Queue {
|
|
|
325
325
|
}
|
|
326
326
|
transitions.add(activeTransition);
|
|
327
327
|
activeTransition.J = clock;
|
|
328
|
-
for (let e = 0; e < this.
|
|
329
|
-
const t = this.
|
|
328
|
+
for (let e = 0; e < this.M.length; e++) {
|
|
329
|
+
const t = this.M[e];
|
|
330
330
|
t.ne = activeTransition;
|
|
331
|
-
activeTransition.
|
|
331
|
+
activeTransition.M.push(t);
|
|
332
332
|
}
|
|
333
|
-
this.
|
|
333
|
+
this.M = activeTransition.M;
|
|
334
334
|
for (let e = 0; e < this.$.length; e++) {
|
|
335
335
|
const t = this.$[e];
|
|
336
336
|
t.ne = activeTransition;
|
|
@@ -348,7 +348,7 @@ function insertSubs(e, t = false) {
|
|
|
348
348
|
const n = e.ie || currentOptimisticLane;
|
|
349
349
|
const i = e.re !== undefined;
|
|
350
350
|
for (let r = e.I; r !== null; r = r.p) {
|
|
351
|
-
if (i && r.h.
|
|
351
|
+
if (i && r.h.oe) {
|
|
352
352
|
r.h.O |= REACTIVE_SNAPSHOT_STALE;
|
|
353
353
|
continue;
|
|
354
354
|
}
|
|
@@ -360,48 +360,59 @@ function insertSubs(e, t = false) {
|
|
|
360
360
|
r.h.ie = undefined;
|
|
361
361
|
}
|
|
362
362
|
const e = r.h;
|
|
363
|
-
if (e.
|
|
363
|
+
if (e.se === EFFECT_TRACKED) {
|
|
364
364
|
if (!e.ue) {
|
|
365
365
|
e.ue = true;
|
|
366
|
-
e.ce.enqueue(EFFECT_USER, e.
|
|
366
|
+
e.ce.enqueue(EFFECT_USER, e.ae);
|
|
367
367
|
}
|
|
368
368
|
continue;
|
|
369
369
|
}
|
|
370
|
-
const
|
|
371
|
-
if (
|
|
372
|
-
insertIntoHeap(r.h,
|
|
370
|
+
const o = r.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
|
|
371
|
+
if (o.P > r.h.o) o.P = r.h.o;
|
|
372
|
+
insertIntoHeap(r.h, o);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
function commitPendingNodes() {
|
|
376
|
+
const e = globalQueue.M;
|
|
377
|
+
for (let t = 0; t < e.length; t++) {
|
|
378
|
+
const n = e[t];
|
|
379
|
+
if (n.le !== NOT_PENDING) {
|
|
380
|
+
n.fe = n.le;
|
|
381
|
+
n.le = NOT_PENDING;
|
|
382
|
+
if (n.se && n.se !== EFFECT_TRACKED) n.ue = true;
|
|
383
|
+
}
|
|
384
|
+
if (n.Ee & STATUS_PENDING) {
|
|
385
|
+
const e = n.q?.source;
|
|
386
|
+
if (e && !(e.Ee & STATUS_PENDING)) {
|
|
387
|
+
n.Ee &= -6;
|
|
388
|
+
n.q = null;
|
|
389
|
+
}
|
|
390
|
+
} else n.Ee &= ~STATUS_UNINITIALIZED;
|
|
391
|
+
if (n.L) GlobalQueue.Y(n, false, true);
|
|
373
392
|
}
|
|
393
|
+
e.length = 0;
|
|
374
394
|
}
|
|
375
395
|
function finalizePureQueue(e = null, t = false) {
|
|
376
396
|
let n = !t;
|
|
397
|
+
if (n) commitPendingNodes();
|
|
377
398
|
if (!t) checkBoundaryChildren(globalQueue);
|
|
378
|
-
if (dirtyQueue.R >= dirtyQueue.
|
|
399
|
+
if (dirtyQueue.R >= dirtyQueue.P) runHeap(dirtyQueue, GlobalQueue.K);
|
|
379
400
|
if (n) {
|
|
380
|
-
|
|
401
|
+
commitPendingNodes();
|
|
402
|
+
const t = e ? e.$ : globalQueue.$;
|
|
381
403
|
for (let e = 0; e < t.length; e++) {
|
|
382
404
|
const n = t[e];
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
n.
|
|
386
|
-
|
|
405
|
+
n.ie = undefined;
|
|
406
|
+
if (n.le !== NOT_PENDING) {
|
|
407
|
+
n.fe = n.le;
|
|
408
|
+
n.le = NOT_PENDING;
|
|
387
409
|
}
|
|
388
|
-
|
|
389
|
-
|
|
410
|
+
const i = n.Te;
|
|
411
|
+
n.Te = NOT_PENDING;
|
|
412
|
+
if (i !== NOT_PENDING && n.fe !== i) insertSubs(n, true);
|
|
413
|
+
n.ne = null;
|
|
390
414
|
}
|
|
391
415
|
t.length = 0;
|
|
392
|
-
const n = e ? e.$ : globalQueue.$;
|
|
393
|
-
for (let e = 0; e < n.length; e++) {
|
|
394
|
-
const t = n[e];
|
|
395
|
-
const i = t.ae;
|
|
396
|
-
t.ie = undefined;
|
|
397
|
-
if (i !== NOT_PENDING && t.fe !== i) {
|
|
398
|
-
t.fe = i;
|
|
399
|
-
insertSubs(t, true);
|
|
400
|
-
}
|
|
401
|
-
t.ae = NOT_PENDING;
|
|
402
|
-
t.ne = null;
|
|
403
|
-
}
|
|
404
|
-
n.length = 0;
|
|
405
416
|
e ? e.j : globalQueue.j;
|
|
406
417
|
for (const t of activeLanes) {
|
|
407
418
|
const n = e ? t.ne === e : !t.ne;
|
|
@@ -410,17 +421,17 @@ function finalizePureQueue(e = null, t = false) {
|
|
|
410
421
|
if (t.W[0].length) runQueue(t.W[0], EFFECT_RENDER);
|
|
411
422
|
if (t.W[1].length) runQueue(t.W[1], EFFECT_USER);
|
|
412
423
|
}
|
|
413
|
-
if (t.
|
|
424
|
+
if (t.de.ie === t) t.de.ie = undefined;
|
|
414
425
|
t.U.clear();
|
|
415
426
|
t.W[0].length = 0;
|
|
416
427
|
t.W[1].length = 0;
|
|
417
428
|
activeLanes.delete(t);
|
|
418
|
-
signalLanes.delete(t.
|
|
429
|
+
signalLanes.delete(t.de);
|
|
419
430
|
}
|
|
420
431
|
}
|
|
421
432
|
}
|
|
422
433
|
function checkBoundaryChildren(e) {
|
|
423
|
-
for (const t of e.
|
|
434
|
+
for (const t of e.F) {
|
|
424
435
|
t.checkSources?.();
|
|
425
436
|
checkBoundaryChildren(t);
|
|
426
437
|
}
|
|
@@ -443,9 +454,9 @@ function transitionComplete(e) {
|
|
|
443
454
|
if (e.te) return true;
|
|
444
455
|
if (e.ee.length) return false;
|
|
445
456
|
let t = true;
|
|
446
|
-
for (let n = 0; n < e.
|
|
447
|
-
const i = e.
|
|
448
|
-
if (i.Ee & STATUS_PENDING && i.
|
|
457
|
+
for (let n = 0; n < e.X.length; n++) {
|
|
458
|
+
const i = e.X[n];
|
|
459
|
+
if (i.Ee & STATUS_PENDING && i.q?.source === i) {
|
|
449
460
|
t = false;
|
|
450
461
|
break;
|
|
451
462
|
}
|
|
@@ -473,19 +484,19 @@ function getOrCreateLane(e) {
|
|
|
473
484
|
if (t) {
|
|
474
485
|
return findLane(t);
|
|
475
486
|
}
|
|
476
|
-
const n = e.
|
|
487
|
+
const n = e.Se;
|
|
477
488
|
const i = n?.ie ? findLane(n.ie) : null;
|
|
478
489
|
t = {
|
|
479
|
-
|
|
490
|
+
de: e,
|
|
480
491
|
U: new Set(),
|
|
481
492
|
W: [[], []],
|
|
482
493
|
k: null,
|
|
483
494
|
ne: activeTransition,
|
|
484
|
-
|
|
495
|
+
Re: i
|
|
485
496
|
};
|
|
486
497
|
signalLanes.set(e, t);
|
|
487
498
|
activeLanes.add(t);
|
|
488
|
-
e.
|
|
499
|
+
e.Oe = false;
|
|
489
500
|
return t;
|
|
490
501
|
}
|
|
491
502
|
function findLane(e) {
|
|
@@ -511,7 +522,7 @@ function resolveLane(e) {
|
|
|
511
522
|
return undefined;
|
|
512
523
|
}
|
|
513
524
|
function hasActiveOverride(e) {
|
|
514
|
-
return !!(e.
|
|
525
|
+
return !!(e.Te !== undefined && e.Te !== NOT_PENDING);
|
|
515
526
|
}
|
|
516
527
|
function assignOrMergeLane(e, t) {
|
|
517
528
|
const n = findLane(t);
|
|
@@ -524,9 +535,9 @@ function assignOrMergeLane(e, t) {
|
|
|
524
535
|
const r = findLane(i);
|
|
525
536
|
if (activeLanes.has(r)) {
|
|
526
537
|
if (r !== n && !hasActiveOverride(e)) {
|
|
527
|
-
if (n.
|
|
538
|
+
if (n.Re && findLane(n.Re) === r) {
|
|
528
539
|
e.ie = t;
|
|
529
|
-
} else if (r.
|
|
540
|
+
} else if (r.Re && findLane(r.Re) === n) ;else mergeLanes(n, r);
|
|
530
541
|
}
|
|
531
542
|
return;
|
|
532
543
|
}
|
|
@@ -536,42 +547,40 @@ function assignOrMergeLane(e, t) {
|
|
|
536
547
|
function handleAsync(e, t, n) {
|
|
537
548
|
const i = typeof t === "object" && t !== null;
|
|
538
549
|
const r = i && untrack(() => t[Symbol.asyncIterator]);
|
|
539
|
-
const
|
|
540
|
-
if (!
|
|
541
|
-
e.
|
|
550
|
+
const o = !r && i && untrack(() => typeof t.then === "function");
|
|
551
|
+
if (!o && !r) {
|
|
552
|
+
e._e = null;
|
|
542
553
|
return t;
|
|
543
554
|
}
|
|
544
|
-
e.
|
|
545
|
-
let
|
|
555
|
+
e._e = t;
|
|
556
|
+
let s;
|
|
546
557
|
const handleError = n => {
|
|
547
|
-
if (e.
|
|
558
|
+
if (e._e !== t) return;
|
|
548
559
|
globalQueue.initTransition(e.ne);
|
|
549
560
|
notifyStatus(e, n instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, n);
|
|
550
561
|
e.J = clock;
|
|
551
562
|
};
|
|
552
563
|
const asyncWrite = (i, r) => {
|
|
553
|
-
if (e.
|
|
564
|
+
if (e._e !== t) return;
|
|
554
565
|
if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
|
|
555
566
|
globalQueue.initTransition(e.ne);
|
|
556
567
|
clearStatus(e);
|
|
557
|
-
const
|
|
558
|
-
if (
|
|
559
|
-
if (e.
|
|
560
|
-
|
|
561
|
-
if (e.L) e.ae = i;
|
|
562
|
-
if (!t) {
|
|
568
|
+
const o = resolveLane(e);
|
|
569
|
+
if (o) o.U.delete(e);
|
|
570
|
+
if (e.Te !== undefined) {
|
|
571
|
+
if (e.Te !== undefined && e.Te !== NOT_PENDING) e.le = i;else {
|
|
563
572
|
e.fe = i;
|
|
564
573
|
insertSubs(e);
|
|
565
574
|
}
|
|
566
575
|
e.J = clock;
|
|
567
|
-
} else if (
|
|
576
|
+
} else if (o) {
|
|
568
577
|
const t = e.fe;
|
|
569
|
-
const n = e.
|
|
578
|
+
const n = e.Ie;
|
|
570
579
|
if (!n || !n(i, t)) {
|
|
571
580
|
e.fe = i;
|
|
572
581
|
e.J = clock;
|
|
573
|
-
if (e.
|
|
574
|
-
setSignal(e.
|
|
582
|
+
if (e.pe) {
|
|
583
|
+
setSignal(e.pe, i);
|
|
575
584
|
}
|
|
576
585
|
insertSubs(e, true);
|
|
577
586
|
}
|
|
@@ -582,12 +591,12 @@ function handleAsync(e, t, n) {
|
|
|
582
591
|
flush();
|
|
583
592
|
r?.();
|
|
584
593
|
};
|
|
585
|
-
if (
|
|
594
|
+
if (o) {
|
|
586
595
|
let n = false,
|
|
587
596
|
i = true;
|
|
588
597
|
t.then(e => {
|
|
589
598
|
if (i) {
|
|
590
|
-
|
|
599
|
+
s = e;
|
|
591
600
|
n = true;
|
|
592
601
|
} else asyncWrite(e);
|
|
593
602
|
}, e => {
|
|
@@ -619,7 +628,7 @@ function handleAsync(e, t, n) {
|
|
|
619
628
|
});
|
|
620
629
|
r = false;
|
|
621
630
|
if (t && !e.done) {
|
|
622
|
-
|
|
631
|
+
s = e.value;
|
|
623
632
|
i = true;
|
|
624
633
|
return iterate();
|
|
625
634
|
}
|
|
@@ -631,22 +640,22 @@ function handleAsync(e, t, n) {
|
|
|
631
640
|
throw new NotReadyError(context);
|
|
632
641
|
}
|
|
633
642
|
}
|
|
634
|
-
return
|
|
643
|
+
return s;
|
|
635
644
|
}
|
|
636
645
|
function clearStatus(e) {
|
|
637
646
|
e.Ee = e.Ee & STATUS_UNINITIALIZED;
|
|
638
|
-
e.
|
|
647
|
+
e.q = null;
|
|
639
648
|
updatePendingSignal(e);
|
|
640
|
-
e.
|
|
649
|
+
e.he?.();
|
|
641
650
|
}
|
|
642
651
|
function notifyStatus(e, t, n, i, r) {
|
|
643
652
|
if (t === STATUS_ERROR && !(n instanceof StatusError) && !(n instanceof NotReadyError)) n = new StatusError(e, n);
|
|
644
|
-
const
|
|
645
|
-
const
|
|
646
|
-
const u =
|
|
653
|
+
const o = n instanceof NotReadyError && n.source === e;
|
|
654
|
+
const s = t === STATUS_PENDING && e.Te !== undefined && !o;
|
|
655
|
+
const u = s && hasActiveOverride(e);
|
|
647
656
|
if (!i) {
|
|
648
657
|
e.Ee = t | (t !== STATUS_ERROR ? e.Ee & STATUS_UNINITIALIZED : 0);
|
|
649
|
-
e.
|
|
658
|
+
e.q = n;
|
|
650
659
|
updatePendingSignal(e);
|
|
651
660
|
}
|
|
652
661
|
if (r && !i) {
|
|
@@ -654,48 +663,48 @@ function notifyStatus(e, t, n, i, r) {
|
|
|
654
663
|
}
|
|
655
664
|
if (u && activeTransition && n instanceof NotReadyError) {
|
|
656
665
|
const e = n.source;
|
|
657
|
-
if (!activeTransition.
|
|
658
|
-
activeTransition.
|
|
666
|
+
if (!activeTransition.X.includes(e)) {
|
|
667
|
+
activeTransition.X.push(e);
|
|
659
668
|
}
|
|
660
669
|
}
|
|
661
670
|
const c = i || u;
|
|
662
|
-
const
|
|
663
|
-
if (e.
|
|
671
|
+
const a = i || s ? undefined : r;
|
|
672
|
+
if (e.he) {
|
|
664
673
|
if (c) {
|
|
665
|
-
e.
|
|
674
|
+
e.he(t, n);
|
|
666
675
|
} else {
|
|
667
|
-
e.
|
|
676
|
+
e.he();
|
|
668
677
|
}
|
|
669
678
|
return;
|
|
670
679
|
}
|
|
671
680
|
for (let i = e.I; i !== null; i = i.p) {
|
|
672
681
|
i.h.J = clock;
|
|
673
|
-
if (i.h.
|
|
674
|
-
!i.h.ne && globalQueue.
|
|
675
|
-
notifyStatus(i.h, t, n, c,
|
|
682
|
+
if (i.h.q !== n) {
|
|
683
|
+
!i.h.ne && globalQueue.M.push(i.h);
|
|
684
|
+
notifyStatus(i.h, t, n, c, a);
|
|
676
685
|
}
|
|
677
686
|
}
|
|
678
|
-
for (let i = e.A; i !== null; i = i.
|
|
687
|
+
for (let i = e.A; i !== null; i = i.N) {
|
|
679
688
|
for (let e = i.I; e !== null; e = e.p) {
|
|
680
689
|
e.h.J = clock;
|
|
681
|
-
if (e.h.
|
|
682
|
-
!e.h.ne && globalQueue.
|
|
683
|
-
notifyStatus(e.h, t, n, c,
|
|
690
|
+
if (e.h.q !== n) {
|
|
691
|
+
!e.h.ne && globalQueue.M.push(e.h);
|
|
692
|
+
notifyStatus(e.h, t, n, c, a);
|
|
684
693
|
}
|
|
685
694
|
}
|
|
686
695
|
}
|
|
687
696
|
}
|
|
688
697
|
function unlinkSubs(e) {
|
|
689
|
-
const t = e.
|
|
698
|
+
const t = e.m;
|
|
690
699
|
const n = e.D;
|
|
691
700
|
const i = e.p;
|
|
692
|
-
const r = e.
|
|
693
|
-
if (i !== null) i.
|
|
701
|
+
const r = e.Ae;
|
|
702
|
+
if (i !== null) i.Ae = r;else t.Ne = r;
|
|
694
703
|
if (r !== null) r.p = i;else {
|
|
695
704
|
t.I = i;
|
|
696
705
|
if (i === null) {
|
|
697
706
|
t.ge?.();
|
|
698
|
-
t.L && !t.
|
|
707
|
+
t.L && !t.Pe && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
|
|
699
708
|
}
|
|
700
709
|
}
|
|
701
710
|
return n;
|
|
@@ -710,31 +719,31 @@ function unobserved(e) {
|
|
|
710
719
|
disposeChildren(e, true);
|
|
711
720
|
}
|
|
712
721
|
function link(e, t) {
|
|
713
|
-
const n = t.
|
|
714
|
-
if (n !== null && n.
|
|
722
|
+
const n = t.Ce;
|
|
723
|
+
if (n !== null && n.m === e) return;
|
|
715
724
|
let i = null;
|
|
716
725
|
const r = t.O & REACTIVE_RECOMPUTING_DEPS;
|
|
717
726
|
if (r) {
|
|
718
727
|
i = n !== null ? n.D : t.C;
|
|
719
|
-
if (i !== null && i.
|
|
720
|
-
t.
|
|
728
|
+
if (i !== null && i.m === e) {
|
|
729
|
+
t.Ce = i;
|
|
721
730
|
return;
|
|
722
731
|
}
|
|
723
732
|
}
|
|
724
|
-
const
|
|
725
|
-
if (
|
|
726
|
-
const
|
|
727
|
-
|
|
733
|
+
const o = e.Ne;
|
|
734
|
+
if (o !== null && o.h === t && (!r || isValidLink(o, t))) return;
|
|
735
|
+
const s = t.Ce = e.Ne = {
|
|
736
|
+
m: e,
|
|
728
737
|
h: t,
|
|
729
738
|
D: i,
|
|
730
|
-
|
|
739
|
+
Ae: o,
|
|
731
740
|
p: null
|
|
732
741
|
};
|
|
733
|
-
if (n !== null) n.D =
|
|
734
|
-
if (
|
|
742
|
+
if (n !== null) n.D = s;else t.C = s;
|
|
743
|
+
if (o !== null) o.p = s;else e.I = s;
|
|
735
744
|
}
|
|
736
745
|
function isValidLink(e, t) {
|
|
737
|
-
const n = t.
|
|
746
|
+
const n = t.Ce;
|
|
738
747
|
if (n !== null) {
|
|
739
748
|
let i = t.C;
|
|
740
749
|
do {
|
|
@@ -754,15 +763,15 @@ function markDisposal(e) {
|
|
|
754
763
|
insertIntoHeap(t, zombieQueue);
|
|
755
764
|
}
|
|
756
765
|
markDisposal(t);
|
|
757
|
-
t = t.
|
|
766
|
+
t = t.ye;
|
|
758
767
|
}
|
|
759
768
|
}
|
|
760
769
|
function disposeChildren(e, t = false, n) {
|
|
761
770
|
if (e.O & REACTIVE_DISPOSED) return;
|
|
762
771
|
if (t) e.O = REACTIVE_DISPOSED;
|
|
763
|
-
let i = n ? e.
|
|
772
|
+
let i = n ? e.ve : e.De;
|
|
764
773
|
while (i) {
|
|
765
|
-
const e = i.
|
|
774
|
+
const e = i.ye;
|
|
766
775
|
if (i.C) {
|
|
767
776
|
const e = i;
|
|
768
777
|
deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
@@ -771,22 +780,21 @@ function disposeChildren(e, t = false, n) {
|
|
|
771
780
|
t = unlinkSubs(t);
|
|
772
781
|
} while (t !== null);
|
|
773
782
|
e.C = null;
|
|
774
|
-
e.
|
|
783
|
+
e.Ce = null;
|
|
775
784
|
}
|
|
776
785
|
disposeChildren(i, true);
|
|
777
786
|
i = e;
|
|
778
787
|
}
|
|
779
788
|
if (n) {
|
|
780
|
-
e.
|
|
789
|
+
e.ve = null;
|
|
781
790
|
} else {
|
|
782
791
|
e.De = null;
|
|
783
|
-
e.ve = null;
|
|
784
792
|
e.we = 0;
|
|
785
793
|
}
|
|
786
794
|
runDisposal(e, n);
|
|
787
795
|
}
|
|
788
796
|
function runDisposal(e, t) {
|
|
789
|
-
let n = t ? e.
|
|
797
|
+
let n = t ? e.be : e.me;
|
|
790
798
|
if (!n) return;
|
|
791
799
|
if (Array.isArray(n)) {
|
|
792
800
|
for (let e = 0; e < n.length; e++) {
|
|
@@ -796,8 +804,9 @@ function runDisposal(e, t) {
|
|
|
796
804
|
} else {
|
|
797
805
|
n.call(n);
|
|
798
806
|
}
|
|
799
|
-
t ? e.
|
|
807
|
+
t ? e.be = null : e.me = null;
|
|
800
808
|
}
|
|
809
|
+
let externalSourceConfig = null;
|
|
801
810
|
GlobalQueue.K = recompute;
|
|
802
811
|
GlobalQueue.Y = disposeChildren;
|
|
803
812
|
let tracking = false;
|
|
@@ -805,31 +814,31 @@ let stale = false;
|
|
|
805
814
|
let context = null;
|
|
806
815
|
let currentOptimisticLane = null;
|
|
807
816
|
function recompute(e, t = false) {
|
|
808
|
-
const n = e.
|
|
817
|
+
const n = e.se;
|
|
809
818
|
if (!t) {
|
|
810
819
|
if (e.ne && (!n || activeTransition) && activeTransition !== e.ne) globalQueue.initTransition(e.ne);
|
|
811
820
|
deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
812
821
|
if (e.ne || n === EFFECT_TRACKED) disposeChildren(e);else {
|
|
813
822
|
markDisposal(e);
|
|
814
|
-
e.
|
|
815
|
-
e.
|
|
823
|
+
e.be = e.me;
|
|
824
|
+
e.ve = e.De;
|
|
816
825
|
e.me = null;
|
|
817
826
|
e.De = null;
|
|
818
827
|
e.we = 0;
|
|
819
828
|
}
|
|
820
829
|
}
|
|
821
830
|
const i = !!(e.O & REACTIVE_OPTIMISTIC_DIRTY);
|
|
822
|
-
const r =
|
|
823
|
-
const
|
|
824
|
-
const
|
|
831
|
+
const r = e.Te !== undefined && e.Te !== NOT_PENDING;
|
|
832
|
+
const o = !!(e.Ee & STATUS_PENDING);
|
|
833
|
+
const s = context;
|
|
825
834
|
context = e;
|
|
826
|
-
e.
|
|
835
|
+
e.Ce = null;
|
|
827
836
|
e.O = REACTIVE_RECOMPUTING_DEPS;
|
|
828
837
|
e.J = clock;
|
|
829
|
-
let u = e.
|
|
838
|
+
let u = e.le === NOT_PENDING ? e.fe : e.le;
|
|
830
839
|
let c = e.o;
|
|
831
|
-
let
|
|
832
|
-
let
|
|
840
|
+
let a = tracking;
|
|
841
|
+
let l = currentOptimisticLane;
|
|
833
842
|
tracking = true;
|
|
834
843
|
if (i) {
|
|
835
844
|
const t = resolveLane(e);
|
|
@@ -841,62 +850,62 @@ function recompute(e, t = false) {
|
|
|
841
850
|
const t = resolveLane(e);
|
|
842
851
|
if (t) {
|
|
843
852
|
t.U.delete(e);
|
|
844
|
-
updatePendingSignal(t.
|
|
853
|
+
updatePendingSignal(t.de);
|
|
845
854
|
}
|
|
846
855
|
} catch (t) {
|
|
847
856
|
if (t instanceof NotReadyError && currentOptimisticLane) {
|
|
848
857
|
const t = findLane(currentOptimisticLane);
|
|
849
|
-
if (t.
|
|
858
|
+
if (t.de !== e) {
|
|
850
859
|
t.U.add(e);
|
|
851
860
|
e.ie = t;
|
|
852
|
-
updatePendingSignal(t.
|
|
861
|
+
updatePendingSignal(t.de);
|
|
853
862
|
}
|
|
854
863
|
}
|
|
855
864
|
notifyStatus(e, t instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, t, undefined, t instanceof NotReadyError ? e.ie : undefined);
|
|
856
865
|
} finally {
|
|
857
|
-
tracking =
|
|
866
|
+
tracking = a;
|
|
858
867
|
e.O = REACTIVE_NONE | (t ? e.O & REACTIVE_SNAPSHOT_STALE : 0);
|
|
859
|
-
context =
|
|
868
|
+
context = s;
|
|
860
869
|
}
|
|
861
|
-
if (!e.
|
|
862
|
-
const
|
|
863
|
-
let
|
|
864
|
-
if (
|
|
870
|
+
if (!e.q) {
|
|
871
|
+
const s = e.Ce;
|
|
872
|
+
let a = s !== null ? s.D : e.C;
|
|
873
|
+
if (a !== null) {
|
|
865
874
|
do {
|
|
866
|
-
|
|
867
|
-
} while (
|
|
868
|
-
if (
|
|
875
|
+
a = unlinkSubs(a);
|
|
876
|
+
} while (a !== null);
|
|
877
|
+
if (s !== null) s.D = null;else e.C = null;
|
|
869
878
|
}
|
|
870
|
-
const
|
|
871
|
-
const f = !e.
|
|
879
|
+
const l = r ? e.Te : e.le === NOT_PENDING ? e.fe : e.le;
|
|
880
|
+
const f = !e.Ie || !e.Ie(l, u);
|
|
872
881
|
if (f) {
|
|
873
|
-
const
|
|
874
|
-
if (t || n && activeTransition !== e.ne || i)
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
882
|
+
const s = r ? e.Te : undefined;
|
|
883
|
+
if (t || n && activeTransition !== e.ne || i) {
|
|
884
|
+
e.fe = u;
|
|
885
|
+
if (r && i) {
|
|
886
|
+
e.Te = u;
|
|
887
|
+
e.le = u;
|
|
888
|
+
}
|
|
889
|
+
} else e.le = u;
|
|
890
|
+
if (r && !i && o && !e.Oe) e.Te = u;
|
|
891
|
+
if (!r || i || e.Te !== s) insertSubs(e, i || r);
|
|
883
892
|
} else if (r) {
|
|
884
|
-
e.
|
|
893
|
+
e.le = u;
|
|
885
894
|
} else if (e.o != c) {
|
|
886
895
|
for (let t = e.I; t !== null; t = t.p) {
|
|
887
896
|
insertIntoHeapHeight(t.h, t.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
888
897
|
}
|
|
889
898
|
}
|
|
890
899
|
}
|
|
891
|
-
currentOptimisticLane =
|
|
892
|
-
(!t || e.Ee & STATUS_PENDING) && !e.ne && !(activeTransition &&
|
|
900
|
+
currentOptimisticLane = l;
|
|
901
|
+
(!t || e.Ee & STATUS_PENDING) && !e.ne && !(activeTransition && r) && globalQueue.M.push(e);
|
|
893
902
|
e.ne && n && activeTransition !== e.ne && runInTransition(e.ne, () => recompute(e));
|
|
894
903
|
}
|
|
895
904
|
function updateIfNecessary(e) {
|
|
896
905
|
if (e.O & REACTIVE_CHECK) {
|
|
897
906
|
for (let t = e.C; t; t = t.D) {
|
|
898
|
-
const n = t.
|
|
899
|
-
const i = n.
|
|
907
|
+
const n = t.m;
|
|
908
|
+
const i = n.V || n;
|
|
900
909
|
if (i.L) {
|
|
901
910
|
updateIfNecessary(i);
|
|
902
911
|
}
|
|
@@ -905,7 +914,7 @@ function updateIfNecessary(e) {
|
|
|
905
914
|
}
|
|
906
915
|
}
|
|
907
916
|
}
|
|
908
|
-
if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY) || e.
|
|
917
|
+
if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY) || e.q && e.J < clock && !e._e) {
|
|
909
918
|
recompute(e);
|
|
910
919
|
}
|
|
911
920
|
e.O = REACTIVE_NONE | e.O & REACTIVE_SNAPSHOT_STALE;
|
|
@@ -914,13 +923,13 @@ function computed(e, t, n) {
|
|
|
914
923
|
const i = n?.transparent;
|
|
915
924
|
const r = {
|
|
916
925
|
id: n?.id ?? (context?.id ),
|
|
917
|
-
|
|
918
|
-
|
|
926
|
+
Ve: i,
|
|
927
|
+
Ie: n?.equals != null ? n.equals : isEqual,
|
|
919
928
|
Ge: !!n?.pureWrite,
|
|
920
929
|
ge: n?.unobserved,
|
|
921
930
|
me: null,
|
|
922
931
|
ce: context?.ce ?? globalQueue,
|
|
923
|
-
|
|
932
|
+
Le: context?.Le ?? defaultContext,
|
|
924
933
|
we: 0,
|
|
925
934
|
L: e,
|
|
926
935
|
fe: t,
|
|
@@ -929,33 +938,33 @@ function computed(e, t, n) {
|
|
|
929
938
|
S: undefined,
|
|
930
939
|
T: null,
|
|
931
940
|
C: null,
|
|
932
|
-
|
|
941
|
+
Ce: null,
|
|
933
942
|
I: null,
|
|
934
943
|
Ne: null,
|
|
935
944
|
i: context,
|
|
936
|
-
|
|
945
|
+
ye: null,
|
|
937
946
|
De: null,
|
|
938
947
|
O: n?.lazy ? REACTIVE_LAZY : REACTIVE_NONE,
|
|
939
948
|
Ee: STATUS_UNINITIALIZED,
|
|
940
949
|
J: clock,
|
|
941
|
-
|
|
942
|
-
Ve: null,
|
|
950
|
+
le: NOT_PENDING,
|
|
943
951
|
be: null,
|
|
944
|
-
|
|
952
|
+
ve: null,
|
|
953
|
+
_e: null,
|
|
945
954
|
ne: null
|
|
946
955
|
};
|
|
947
956
|
r.T = r;
|
|
948
|
-
const
|
|
957
|
+
const o = context?.t ? context.u : context;
|
|
949
958
|
if (context) {
|
|
950
959
|
const e = context.De;
|
|
951
960
|
if (e === null) {
|
|
952
961
|
context.De = r;
|
|
953
962
|
} else {
|
|
954
|
-
r.
|
|
963
|
+
r.ye = e;
|
|
955
964
|
context.De = r;
|
|
956
965
|
}
|
|
957
966
|
}
|
|
958
|
-
if (
|
|
967
|
+
if (o) r.o = o.o + 1;
|
|
959
968
|
!n?.lazy && recompute(r, true);
|
|
960
969
|
return r;
|
|
961
970
|
}
|
|
@@ -967,6 +976,7 @@ function untrack(e, t) {
|
|
|
967
976
|
const n = tracking;
|
|
968
977
|
tracking = false;
|
|
969
978
|
try {
|
|
979
|
+
if (externalSourceConfig) ;
|
|
970
980
|
return e();
|
|
971
981
|
} finally {
|
|
972
982
|
tracking = n;
|
|
@@ -979,13 +989,13 @@ function read(e) {
|
|
|
979
989
|
e.O &= ~REACTIVE_LAZY;
|
|
980
990
|
recompute(e, true);
|
|
981
991
|
}
|
|
982
|
-
const n = e.
|
|
992
|
+
const n = e.V || e;
|
|
983
993
|
if (t && tracking) {
|
|
984
994
|
if (e.L && e.O & REACTIVE_DISPOSED) recompute(e);
|
|
985
995
|
link(e, t);
|
|
986
996
|
if (n.L) {
|
|
987
997
|
const i = e.O & REACTIVE_ZOMBIE;
|
|
988
|
-
if (n.o >= (i ? zombieQueue.
|
|
998
|
+
if (n.o >= (i ? zombieQueue.P : dirtyQueue.P)) {
|
|
989
999
|
markNode(t);
|
|
990
1000
|
markHeap(i ? zombieQueue : dirtyQueue);
|
|
991
1001
|
updateIfNecessary(n);
|
|
@@ -997,65 +1007,64 @@ function read(e) {
|
|
|
997
1007
|
}
|
|
998
1008
|
}
|
|
999
1009
|
if (n.Ee & STATUS_PENDING) {
|
|
1000
|
-
|
|
1010
|
+
const i = n.q?.source;
|
|
1011
|
+
if (i && !(i.Ee & STATUS_PENDING)) clearStatus(n);else if (t && true) {
|
|
1001
1012
|
if (currentOptimisticLane) {
|
|
1002
1013
|
const i = n.ie;
|
|
1003
1014
|
const r = findLane(currentOptimisticLane);
|
|
1004
1015
|
if (i && findLane(i) === r && !hasActiveOverride(n)) {
|
|
1005
|
-
if (!tracking) link(e, t);
|
|
1006
|
-
throw n.
|
|
1016
|
+
if (!tracking && e !== t) link(e, t);
|
|
1017
|
+
throw n.q;
|
|
1007
1018
|
}
|
|
1008
1019
|
} else {
|
|
1009
|
-
if (!tracking) link(e, t);
|
|
1010
|
-
throw n.
|
|
1020
|
+
if (!tracking && e !== t) link(e, t);
|
|
1021
|
+
throw n.q;
|
|
1011
1022
|
}
|
|
1012
1023
|
} else if (!t && n.Ee & STATUS_UNINITIALIZED) {
|
|
1013
|
-
throw n.
|
|
1024
|
+
throw n.q;
|
|
1014
1025
|
}
|
|
1015
1026
|
}
|
|
1016
1027
|
if (e.L && e.Ee & STATUS_ERROR) {
|
|
1017
1028
|
if (e.J < clock) {
|
|
1018
1029
|
recompute(e, true);
|
|
1019
1030
|
return read(e);
|
|
1020
|
-
} else throw e.
|
|
1031
|
+
} else throw e.q;
|
|
1021
1032
|
}
|
|
1022
|
-
|
|
1033
|
+
if (e.Te !== undefined && e.Te !== NOT_PENDING) return e.Te;
|
|
1034
|
+
return !t || currentOptimisticLane !== null && (e.Te !== undefined || e.ie || n === e && stale || !!(n.Ee & STATUS_PENDING)) || e.le === NOT_PENDING || stale ? e.fe : e.le;
|
|
1023
1035
|
}
|
|
1024
1036
|
function setSignal(e, t) {
|
|
1025
1037
|
if (e.ne && activeTransition !== e.ne) globalQueue.initTransition(e.ne);
|
|
1026
|
-
const n = e.
|
|
1027
|
-
const i =
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1038
|
+
const n = e.Te !== undefined && true;
|
|
1039
|
+
const i = e.Te !== undefined && e.Te !== NOT_PENDING;
|
|
1040
|
+
const r = n ? i ? e.Te : e.fe : e.le === NOT_PENDING ? e.fe : e.le;
|
|
1041
|
+
if (typeof t === "function") t = t(r);
|
|
1042
|
+
const o = !e.Ie || !e.Ie(r, t) || !!(e.Ee & STATUS_UNINITIALIZED);
|
|
1043
|
+
if (!o) {
|
|
1044
|
+
if (n && i && e.L) {
|
|
1032
1045
|
insertSubs(e, true);
|
|
1033
1046
|
schedule();
|
|
1034
1047
|
}
|
|
1035
1048
|
return t;
|
|
1036
1049
|
}
|
|
1037
1050
|
if (n) {
|
|
1038
|
-
const n =
|
|
1039
|
-
if (e.ne
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
if (e.ae === NOT_PENDING) {
|
|
1043
|
-
e.ae = e.fe;
|
|
1044
|
-
}
|
|
1045
|
-
if (!n) {
|
|
1051
|
+
const n = e.Te === NOT_PENDING;
|
|
1052
|
+
if (!n && e.ne) globalQueue.initTransition(e.ne);
|
|
1053
|
+
if (n) {
|
|
1054
|
+
e.le = e.fe;
|
|
1046
1055
|
globalQueue.$.push(e);
|
|
1047
1056
|
}
|
|
1048
|
-
e.Oe =
|
|
1057
|
+
e.Oe = true;
|
|
1049
1058
|
const i = getOrCreateLane(e);
|
|
1050
1059
|
e.ie = i;
|
|
1051
|
-
e.
|
|
1060
|
+
e.Te = t;
|
|
1052
1061
|
} else {
|
|
1053
|
-
if (e.
|
|
1054
|
-
e.
|
|
1062
|
+
if (e.le === NOT_PENDING) globalQueue.M.push(e);
|
|
1063
|
+
e.le = t;
|
|
1055
1064
|
}
|
|
1056
1065
|
updatePendingSignal(e);
|
|
1057
|
-
if (e.
|
|
1058
|
-
setSignal(e.
|
|
1066
|
+
if (e.pe) {
|
|
1067
|
+
setSignal(e.pe, t);
|
|
1059
1068
|
}
|
|
1060
1069
|
e.J = clock;
|
|
1061
1070
|
insertSubs(e, n);
|
|
@@ -1064,21 +1073,21 @@ function setSignal(e, t) {
|
|
|
1064
1073
|
}
|
|
1065
1074
|
function computePendingState(e) {
|
|
1066
1075
|
const t = e;
|
|
1067
|
-
if (e.
|
|
1076
|
+
if (e.Te !== undefined && e.Te !== NOT_PENDING) {
|
|
1068
1077
|
if (t.Ee & STATUS_PENDING && !(t.Ee & STATUS_UNINITIALIZED)) return true;
|
|
1069
|
-
if (e.
|
|
1078
|
+
if (e.Se) {
|
|
1070
1079
|
const t = e.ie ? findLane(e.ie) : null;
|
|
1071
1080
|
return !!(t && t.U.size > 0);
|
|
1072
1081
|
}
|
|
1073
1082
|
return true;
|
|
1074
1083
|
}
|
|
1075
|
-
if (e.
|
|
1084
|
+
if (e.le !== NOT_PENDING && !(t.Ee & STATUS_UNINITIALIZED)) return true;
|
|
1076
1085
|
return !!(t.Ee & STATUS_PENDING && !(t.Ee & STATUS_UNINITIALIZED));
|
|
1077
1086
|
}
|
|
1078
1087
|
function updatePendingSignal(e) {
|
|
1079
|
-
if (e.
|
|
1088
|
+
if (e.Fe) {
|
|
1080
1089
|
const t = computePendingState(e);
|
|
1081
|
-
const n = e.
|
|
1090
|
+
const n = e.Fe;
|
|
1082
1091
|
setSignal(n, t);
|
|
1083
1092
|
if (!t && n.ie) {
|
|
1084
1093
|
const t = resolveLane(e);
|
|
@@ -1093,9 +1102,14 @@ function updatePendingSignal(e) {
|
|
|
1093
1102
|
}
|
|
1094
1103
|
}
|
|
1095
1104
|
}
|
|
1105
|
+
function accessor(e) {
|
|
1106
|
+
const t = read.bind(null, e);
|
|
1107
|
+
t.$r = true;
|
|
1108
|
+
return t;
|
|
1109
|
+
}
|
|
1096
1110
|
function createMemo(e, t, n) {
|
|
1097
1111
|
let i = computed(e, t, n);
|
|
1098
|
-
return
|
|
1112
|
+
return accessor(i);
|
|
1099
1113
|
}
|
|
1100
1114
|
function isWrappable(e) {
|
|
1101
1115
|
return e != null && typeof e === "object" && !Object.isFrozen(e);
|
|
@@ -1106,8 +1120,8 @@ function updatePath(e, t, n = 0) {
|
|
|
1106
1120
|
r = e;
|
|
1107
1121
|
if (n < t.length - 1) {
|
|
1108
1122
|
i = t[n];
|
|
1109
|
-
const
|
|
1110
|
-
const
|
|
1123
|
+
const o = typeof i;
|
|
1124
|
+
const s = Array.isArray(e);
|
|
1111
1125
|
if (Array.isArray(i)) {
|
|
1112
1126
|
for (let r = 0; r < i.length; r++) {
|
|
1113
1127
|
t[n] = i[r];
|
|
@@ -1115,7 +1129,7 @@ function updatePath(e, t, n = 0) {
|
|
|
1115
1129
|
}
|
|
1116
1130
|
t[n] = i;
|
|
1117
1131
|
return;
|
|
1118
|
-
} else if (
|
|
1132
|
+
} else if (s && o === "function") {
|
|
1119
1133
|
for (let r = 0; r < e.length; r++) {
|
|
1120
1134
|
if (i(e[r], r)) {
|
|
1121
1135
|
t[n] = r;
|
|
@@ -1124,13 +1138,13 @@ function updatePath(e, t, n = 0) {
|
|
|
1124
1138
|
}
|
|
1125
1139
|
t[n] = i;
|
|
1126
1140
|
return;
|
|
1127
|
-
} else if (
|
|
1141
|
+
} else if (s && o === "object") {
|
|
1128
1142
|
const {
|
|
1129
1143
|
from: r = 0,
|
|
1130
|
-
to:
|
|
1131
|
-
by:
|
|
1144
|
+
to: o = e.length - 1,
|
|
1145
|
+
by: s = 1
|
|
1132
1146
|
} = i;
|
|
1133
|
-
for (let i = r; i <=
|
|
1147
|
+
for (let i = r; i <= o; i += s) {
|
|
1134
1148
|
t[n] = i;
|
|
1135
1149
|
updatePath(e, t, n);
|
|
1136
1150
|
}
|
|
@@ -1142,20 +1156,20 @@ function updatePath(e, t, n = 0) {
|
|
|
1142
1156
|
}
|
|
1143
1157
|
r = e[i];
|
|
1144
1158
|
}
|
|
1145
|
-
let
|
|
1146
|
-
if (typeof
|
|
1147
|
-
|
|
1148
|
-
if (
|
|
1159
|
+
let o = t[t.length - 1];
|
|
1160
|
+
if (typeof o === "function") {
|
|
1161
|
+
o = o(r);
|
|
1162
|
+
if (o === r) return;
|
|
1149
1163
|
}
|
|
1150
|
-
if (i === undefined &&
|
|
1151
|
-
if (
|
|
1164
|
+
if (i === undefined && o == undefined) return;
|
|
1165
|
+
if (o === DELETE) {
|
|
1152
1166
|
delete e[i];
|
|
1153
|
-
} else if (i === undefined || isWrappable(r) && isWrappable(
|
|
1167
|
+
} else if (i === undefined || isWrappable(r) && isWrappable(o) && !Array.isArray(o)) {
|
|
1154
1168
|
const t = i !== undefined ? e[i] : e;
|
|
1155
|
-
const n = Object.keys(
|
|
1156
|
-
for (let e = 0; e < n.length; e++) t[n[e]] =
|
|
1169
|
+
const n = Object.keys(o);
|
|
1170
|
+
for (let e = 0; e < n.length; e++) t[n[e]] = o[n[e]];
|
|
1157
1171
|
} else {
|
|
1158
|
-
e[i] =
|
|
1172
|
+
e[i] = o;
|
|
1159
1173
|
}
|
|
1160
1174
|
}
|
|
1161
1175
|
Object.assign(function storePath(...e) {
|