@solidjs/signals 2.0.0-beta.12 → 2.0.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/dev.js +95 -15
- package/dist/node.cjs +854 -790
- package/dist/prod.js +649 -585
- package/dist/types/boundaries.d.ts +7 -5
- package/dist/types/core/core.d.ts +6 -2
- package/dist/types/store/index.d.ts +1 -1
- package/dist/types/store/store.d.ts +6 -2
- package/dist/types-cjs/boundaries.d.cts +7 -5
- package/dist/types-cjs/core/core.d.cts +6 -2
- package/dist/types-cjs/store/index.d.cts +1 -1
- package/dist/types-cjs/store/store.d.cts +6 -2
- package/package.json +1 -1
package/dist/node.cjs
CHANGED
|
@@ -31,26 +31,26 @@ const i = 1 << 3;
|
|
|
31
31
|
const s = 1 << 4;
|
|
32
32
|
const o = 1 << 5;
|
|
33
33
|
const u = 1 << 6;
|
|
34
|
-
const
|
|
35
|
-
const
|
|
34
|
+
const f = 1 << 7;
|
|
35
|
+
const l = 1 << 8;
|
|
36
36
|
const c = 1 << 9;
|
|
37
37
|
const a = 1 << 10;
|
|
38
38
|
const d = 1 << 0;
|
|
39
39
|
const p = 1 << 1;
|
|
40
40
|
const h = 1 << 2;
|
|
41
|
-
const
|
|
41
|
+
const y = 1 << 3;
|
|
42
42
|
const S = 1 << 4;
|
|
43
|
-
const
|
|
43
|
+
const g = 1 << 5;
|
|
44
44
|
const w = 1 << 6;
|
|
45
|
-
const
|
|
46
|
-
const
|
|
45
|
+
const _ = 1 << 0;
|
|
46
|
+
const m = 1 << 1;
|
|
47
47
|
const b = 1 << 2;
|
|
48
48
|
const O = 1;
|
|
49
49
|
const v = 2;
|
|
50
50
|
const P = 3;
|
|
51
51
|
const x = {};
|
|
52
|
-
const
|
|
53
|
-
const
|
|
52
|
+
const N = {};
|
|
53
|
+
const C = "sp";
|
|
54
54
|
const E = typeof Proxy === "function";
|
|
55
55
|
const k = {};
|
|
56
56
|
const j = Symbol("refresh");
|
|
@@ -79,23 +79,23 @@ function actualInsertIntoHeap(e, t) {
|
|
|
79
79
|
if (r > t.S) t.S = r;
|
|
80
80
|
}
|
|
81
81
|
function insertIntoHeap(e, o) {
|
|
82
|
-
let u = e.
|
|
82
|
+
let u = e._;
|
|
83
83
|
if (u & (i | r | a)) return;
|
|
84
84
|
if (u & t) {
|
|
85
|
-
e.
|
|
86
|
-
} else e.
|
|
85
|
+
e._ = (u & -4) | n | i;
|
|
86
|
+
} else e._ = u | i;
|
|
87
87
|
if (!(u & s)) actualInsertIntoHeap(e, o);
|
|
88
88
|
}
|
|
89
89
|
function insertIntoHeapHeight(e, t) {
|
|
90
|
-
let n = e.
|
|
90
|
+
let n = e._;
|
|
91
91
|
if (n & (i | r | s | a)) return;
|
|
92
|
-
e.
|
|
92
|
+
e._ = n | s;
|
|
93
93
|
actualInsertIntoHeap(e, t);
|
|
94
94
|
}
|
|
95
95
|
function deleteFromHeap(e, t) {
|
|
96
|
-
const n = e.
|
|
96
|
+
const n = e._;
|
|
97
97
|
if (!(n & (i | s))) return;
|
|
98
|
-
e.
|
|
98
|
+
e._ = n & -25;
|
|
99
99
|
const r = e.o;
|
|
100
100
|
if (e.p === e) t.l[r] = undefined;
|
|
101
101
|
else {
|
|
@@ -110,35 +110,35 @@ function deleteFromHeap(e, t) {
|
|
|
110
110
|
e.h = undefined;
|
|
111
111
|
}
|
|
112
112
|
function markHeap(e) {
|
|
113
|
-
if (e.
|
|
114
|
-
e.
|
|
113
|
+
if (e.m) return;
|
|
114
|
+
e.m = true;
|
|
115
115
|
for (let t = 0; t <= e.S; t++) {
|
|
116
116
|
for (let n = e.l[t]; n !== undefined; n = n.h) {
|
|
117
|
-
if (n.
|
|
117
|
+
if (n._ & i) markNode(n);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
function markNode(e, r = n) {
|
|
122
|
-
const i = e.
|
|
122
|
+
const i = e._;
|
|
123
123
|
if ((i & (t | n)) >= r) return;
|
|
124
|
-
e.
|
|
124
|
+
e._ = (i & -4) | r;
|
|
125
125
|
for (let n = e.O; n !== null; n = n.P) {
|
|
126
|
-
markNode(n.
|
|
126
|
+
markNode(n.N, t);
|
|
127
127
|
}
|
|
128
|
-
if (e.
|
|
129
|
-
for (let n = e.
|
|
128
|
+
if (e.C !== null) {
|
|
129
|
+
for (let n = e.C; n !== null; n = n.k) {
|
|
130
130
|
for (let e = n.O; e !== null; e = e.P) {
|
|
131
|
-
markNode(e.
|
|
131
|
+
markNode(e.N, t);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
function runHeap(e, t) {
|
|
137
|
-
e.
|
|
137
|
+
e.m = false;
|
|
138
138
|
for (e.j = 0; e.j <= e.S; e.j++) {
|
|
139
139
|
let n = e.l[e.j];
|
|
140
140
|
while (n !== undefined) {
|
|
141
|
-
if (n.
|
|
141
|
+
if (n._ & i) t(n);
|
|
142
142
|
else adjustHeight(n, e);
|
|
143
143
|
n = e.l[e.j];
|
|
144
144
|
}
|
|
@@ -156,7 +156,7 @@ function adjustHeight(e, t) {
|
|
|
156
156
|
if (e.o !== n) {
|
|
157
157
|
e.o = n;
|
|
158
158
|
for (let n = e.O; n !== null; n = n.P) {
|
|
159
|
-
insertIntoHeapHeight(n.
|
|
159
|
+
insertIntoHeapHeight(n.N, t);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
|
@@ -225,8 +225,8 @@ function assignOrMergeLane(e, t) {
|
|
|
225
225
|
e.H = t;
|
|
226
226
|
}
|
|
227
227
|
const H = new Set();
|
|
228
|
-
const q = { l: new Array(2e3).fill(undefined),
|
|
229
|
-
const Q = { l: new Array(2e3).fill(undefined),
|
|
228
|
+
const q = { l: new Array(2e3).fill(undefined), m: false, j: 0, S: 0 };
|
|
229
|
+
const Q = { l: new Array(2e3).fill(undefined), m: false, j: 0, S: 0 };
|
|
230
230
|
let F = 0;
|
|
231
231
|
let M = null;
|
|
232
232
|
let D = false;
|
|
@@ -242,8 +242,8 @@ function canUseSimpleSyncFlush(e) {
|
|
|
242
242
|
H.size === 0 &&
|
|
243
243
|
T.size === 0 &&
|
|
244
244
|
e.U.length === 0 &&
|
|
245
|
-
e
|
|
246
|
-
e.
|
|
245
|
+
e.$.length === 0 &&
|
|
246
|
+
e.J.size === 0 &&
|
|
247
247
|
G.size === 0
|
|
248
248
|
);
|
|
249
249
|
}
|
|
@@ -254,10 +254,10 @@ function sweepTransientStoreNodes() {
|
|
|
254
254
|
G.delete(e);
|
|
255
255
|
continue;
|
|
256
256
|
}
|
|
257
|
-
if (e.
|
|
257
|
+
if (e.X !== x) continue;
|
|
258
258
|
if (e.G !== undefined && e.G !== x) continue;
|
|
259
259
|
G.delete(e);
|
|
260
|
-
e.
|
|
260
|
+
e.Y?.();
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
function enforceLoadingBoundary(e) {}
|
|
@@ -276,16 +276,16 @@ function runLaneEffects(e) {
|
|
|
276
276
|
}
|
|
277
277
|
function queueStashedOptimisticEffects(e) {
|
|
278
278
|
for (let t = e.O; t !== null; t = t.P) {
|
|
279
|
-
const e = t.
|
|
280
|
-
if (!e
|
|
281
|
-
if (e
|
|
279
|
+
const e = t.N;
|
|
280
|
+
if (!e.Z) continue;
|
|
281
|
+
if (e.Z === P) {
|
|
282
282
|
if (!e.ee) {
|
|
283
283
|
e.ee = true;
|
|
284
284
|
e.te.enqueue(v, e.ne);
|
|
285
285
|
}
|
|
286
286
|
continue;
|
|
287
287
|
}
|
|
288
|
-
const n = e.
|
|
288
|
+
const n = e._ & o ? Q : q;
|
|
289
289
|
if (n.j > e.o) n.j = e.o;
|
|
290
290
|
insertIntoHeap(e, n);
|
|
291
291
|
}
|
|
@@ -297,8 +297,8 @@ function mergeTransitionState(e, t) {
|
|
|
297
297
|
t.re = e;
|
|
298
298
|
e.ie.push(...t.ie);
|
|
299
299
|
for (const n of T) if (n.V === t) n.V = e;
|
|
300
|
-
e
|
|
301
|
-
for (const n of t.
|
|
300
|
+
e.$.push(...t.$);
|
|
301
|
+
for (const n of t.J) e.J.add(n);
|
|
302
302
|
for (const [n, r] of t.se) {
|
|
303
303
|
let t = e.se.get(n);
|
|
304
304
|
if (!t) e.se.set(n, (t = new Set()));
|
|
@@ -310,9 +310,9 @@ function resolveOptimisticNodes(e) {
|
|
|
310
310
|
for (let t = 0; t < e.length; t++) {
|
|
311
311
|
const n = e[t];
|
|
312
312
|
n.H = undefined;
|
|
313
|
-
if (n.
|
|
314
|
-
n.ue = n.
|
|
315
|
-
n.
|
|
313
|
+
if (n.X !== x) {
|
|
314
|
+
n.ue = n.X;
|
|
315
|
+
n.X = x;
|
|
316
316
|
}
|
|
317
317
|
const r = n.G;
|
|
318
318
|
n.G = x;
|
|
@@ -340,11 +340,11 @@ function cleanupCompletedLanes(e) {
|
|
|
340
340
|
function schedule() {
|
|
341
341
|
if (D) return;
|
|
342
342
|
D = true;
|
|
343
|
-
if (!V && !z.
|
|
343
|
+
if (!V && !z.fe && !K) queueMicrotask(flush);
|
|
344
344
|
}
|
|
345
345
|
class Queue {
|
|
346
346
|
i = null;
|
|
347
|
-
|
|
347
|
+
le = [[], []];
|
|
348
348
|
U = [];
|
|
349
349
|
created = F;
|
|
350
350
|
addChild(e) {
|
|
@@ -363,9 +363,9 @@ class Queue {
|
|
|
363
363
|
return false;
|
|
364
364
|
}
|
|
365
365
|
run(e) {
|
|
366
|
-
if (this.
|
|
367
|
-
const t = this.
|
|
368
|
-
this.
|
|
366
|
+
if (this.le[e - 1].length) {
|
|
367
|
+
const t = this.le[e - 1];
|
|
368
|
+
this.le[e - 1] = [];
|
|
369
369
|
runQueue(t, e);
|
|
370
370
|
}
|
|
371
371
|
for (let t = 0; t < this.U.length; t++) this.U[t].run?.(e);
|
|
@@ -376,28 +376,28 @@ class Queue {
|
|
|
376
376
|
const n = findLane(re);
|
|
377
377
|
n.M[e - 1].push(t);
|
|
378
378
|
} else {
|
|
379
|
-
this.
|
|
379
|
+
this.le[e - 1].push(t);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
schedule();
|
|
383
383
|
}
|
|
384
384
|
stashQueues(e) {
|
|
385
|
-
e.
|
|
386
|
-
e.
|
|
387
|
-
this.
|
|
385
|
+
e.le[0].push(...this.le[0]);
|
|
386
|
+
e.le[1].push(...this.le[1]);
|
|
387
|
+
this.le = [[], []];
|
|
388
388
|
for (let t = 0; t < this.U.length; t++) {
|
|
389
389
|
let n = this.U[t];
|
|
390
390
|
let r = e.U[t];
|
|
391
391
|
if (!r) {
|
|
392
|
-
r = {
|
|
392
|
+
r = { le: [[], []], U: [] };
|
|
393
393
|
e.U[t] = r;
|
|
394
394
|
}
|
|
395
395
|
n.stashQueues(r);
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
restoreQueues(e) {
|
|
399
|
-
this.
|
|
400
|
-
this.
|
|
399
|
+
this.le[0].push(...e.le[0]);
|
|
400
|
+
this.le[1].push(...e.le[1]);
|
|
401
401
|
for (let t = 0; t < e.U.length; t++) {
|
|
402
402
|
const n = e.U[t];
|
|
403
403
|
let r = this.U[t];
|
|
@@ -406,18 +406,18 @@ class Queue {
|
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
class GlobalQueue extends Queue {
|
|
409
|
-
|
|
409
|
+
fe = false;
|
|
410
410
|
ce = null;
|
|
411
411
|
ae = [];
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
$ = [];
|
|
413
|
+
J = new Set();
|
|
414
414
|
static de;
|
|
415
415
|
static pe;
|
|
416
416
|
static he;
|
|
417
|
-
static
|
|
417
|
+
static ye = null;
|
|
418
418
|
flush() {
|
|
419
|
-
if (this.
|
|
420
|
-
this.
|
|
419
|
+
if (this.fe) return;
|
|
420
|
+
this.fe = true;
|
|
421
421
|
try {
|
|
422
422
|
runHeap(q, GlobalQueue.de);
|
|
423
423
|
if (M) {
|
|
@@ -427,8 +427,8 @@ class GlobalQueue extends Queue {
|
|
|
427
427
|
runHeap(Q, GlobalQueue.de);
|
|
428
428
|
this.ce = null;
|
|
429
429
|
this.ae = [];
|
|
430
|
-
this
|
|
431
|
-
this.
|
|
430
|
+
this.$ = [];
|
|
431
|
+
this.J = new Set();
|
|
432
432
|
runLaneEffects(O);
|
|
433
433
|
runLaneEffects(v);
|
|
434
434
|
this.stashQueues(e.Se);
|
|
@@ -436,11 +436,11 @@ class GlobalQueue extends Queue {
|
|
|
436
436
|
D = q.S >= q.j;
|
|
437
437
|
reassignPendingTransition(e.ae);
|
|
438
438
|
M = null;
|
|
439
|
-
if (!e.ie.length && !e.se.size && e
|
|
439
|
+
if (!e.ie.length && !e.se.size && e.$.length) {
|
|
440
440
|
B = new Set();
|
|
441
|
-
for (let t = 0; t < e
|
|
442
|
-
const n = e
|
|
443
|
-
if (n.L || n.
|
|
441
|
+
for (let t = 0; t < e.$.length; t++) {
|
|
442
|
+
const n = e.$[t];
|
|
443
|
+
if (n.L || n.ge & d) continue;
|
|
444
444
|
B.add(n);
|
|
445
445
|
queueStashedOptimisticEffects(n);
|
|
446
446
|
}
|
|
@@ -479,12 +479,12 @@ class GlobalQueue extends Queue {
|
|
|
479
479
|
this.run(v);
|
|
480
480
|
if (false);
|
|
481
481
|
} finally {
|
|
482
|
-
this.
|
|
482
|
+
this.fe = false;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
notify(e, t, n, r) {
|
|
486
|
-
if (t &
|
|
487
|
-
if (n &
|
|
486
|
+
if (t & _) {
|
|
487
|
+
if (n & _) {
|
|
488
488
|
const t = r !== undefined ? r : e.we;
|
|
489
489
|
if (M && t) {
|
|
490
490
|
const n = t.source;
|
|
@@ -502,16 +502,16 @@ class GlobalQueue extends Queue {
|
|
|
502
502
|
initTransition(e) {
|
|
503
503
|
if (e) e = currentTransition(e);
|
|
504
504
|
if (e && e === M) return;
|
|
505
|
-
if (!e && M && M.
|
|
505
|
+
if (!e && M && M._e === F) return;
|
|
506
506
|
if (!M) {
|
|
507
507
|
M = e ?? {
|
|
508
|
-
|
|
508
|
+
_e: F,
|
|
509
509
|
ae: [],
|
|
510
510
|
se: new Map(),
|
|
511
|
-
|
|
512
|
-
|
|
511
|
+
$: [],
|
|
512
|
+
J: new Set(),
|
|
513
513
|
ie: [],
|
|
514
|
-
Se: {
|
|
514
|
+
Se: { le: [[], []], U: [] },
|
|
515
515
|
re: false,
|
|
516
516
|
oe: new Set()
|
|
517
517
|
};
|
|
@@ -522,7 +522,7 @@ class GlobalQueue extends Queue {
|
|
|
522
522
|
M = e;
|
|
523
523
|
}
|
|
524
524
|
H.add(M);
|
|
525
|
-
M.
|
|
525
|
+
M._e = F;
|
|
526
526
|
if (this.ce !== null) {
|
|
527
527
|
this.ce.V = M;
|
|
528
528
|
M.ae.push(this.ce);
|
|
@@ -536,20 +536,20 @@ class GlobalQueue extends Queue {
|
|
|
536
536
|
}
|
|
537
537
|
this.ae = M.ae;
|
|
538
538
|
}
|
|
539
|
-
if (this
|
|
540
|
-
for (let e = 0; e < this
|
|
541
|
-
const t = this
|
|
539
|
+
if (this.$ !== M.$) {
|
|
540
|
+
for (let e = 0; e < this.$.length; e++) {
|
|
541
|
+
const t = this.$[e];
|
|
542
542
|
t.V = M;
|
|
543
|
-
M
|
|
543
|
+
M.$.push(t);
|
|
544
544
|
}
|
|
545
|
-
this
|
|
545
|
+
this.$ = M.$;
|
|
546
546
|
}
|
|
547
547
|
for (const e of T) {
|
|
548
548
|
if (!e.V) e.V = M;
|
|
549
549
|
}
|
|
550
|
-
if (this.
|
|
551
|
-
for (const e of this.
|
|
552
|
-
this.
|
|
550
|
+
if (this.J !== M.J) {
|
|
551
|
+
for (const e of this.J) M.J.add(e);
|
|
552
|
+
this.J = M.J;
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
}
|
|
@@ -570,48 +570,48 @@ function queuePendingNode(e) {
|
|
|
570
570
|
}
|
|
571
571
|
function insertSubs(e, t = false) {
|
|
572
572
|
const n = e.H || re;
|
|
573
|
-
const r = e.
|
|
573
|
+
const r = e.me !== undefined;
|
|
574
574
|
for (let i = e.O; i !== null; i = i.P) {
|
|
575
|
-
if (r && i.
|
|
576
|
-
i.
|
|
575
|
+
if (r && i.N.ge & y) {
|
|
576
|
+
i.N._ |= l;
|
|
577
577
|
continue;
|
|
578
578
|
}
|
|
579
579
|
if (t && n) {
|
|
580
|
-
i.
|
|
581
|
-
assignOrMergeLane(i.
|
|
580
|
+
i.N._ |= f;
|
|
581
|
+
assignOrMergeLane(i.N, n);
|
|
582
582
|
} else if (t) {
|
|
583
|
-
i.
|
|
584
|
-
i.
|
|
583
|
+
i.N._ |= f;
|
|
584
|
+
i.N.H = undefined;
|
|
585
585
|
}
|
|
586
|
-
const e = i.
|
|
587
|
-
if (e
|
|
586
|
+
const e = i.N;
|
|
587
|
+
if (e.Z === P) {
|
|
588
588
|
if (!e.ee) {
|
|
589
589
|
e.ee = true;
|
|
590
590
|
e.te.enqueue(v, e.ne);
|
|
591
591
|
}
|
|
592
592
|
continue;
|
|
593
593
|
}
|
|
594
|
-
const s = i.
|
|
595
|
-
if (s.j > i.
|
|
596
|
-
insertIntoHeap(i.
|
|
594
|
+
const s = i.N._ & o ? Q : q;
|
|
595
|
+
if (s.j > i.N.o) s.j = i.N.o;
|
|
596
|
+
insertIntoHeap(i.N, s);
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
function commitPendingNode(e) {
|
|
600
600
|
const t = e;
|
|
601
601
|
if (!t.L) {
|
|
602
|
-
if (e.
|
|
603
|
-
e.ue = e.
|
|
604
|
-
e.
|
|
602
|
+
if (e.X !== x) {
|
|
603
|
+
e.ue = e.X;
|
|
604
|
+
e.X = x;
|
|
605
605
|
}
|
|
606
606
|
return;
|
|
607
607
|
}
|
|
608
|
-
if (e.
|
|
609
|
-
e.ue = e.
|
|
610
|
-
e.
|
|
611
|
-
if (e
|
|
608
|
+
if (e.X !== x) {
|
|
609
|
+
e.ue = e.X;
|
|
610
|
+
e.X = x;
|
|
611
|
+
if (e.Z && e.Z !== P) e.ee = true;
|
|
612
612
|
}
|
|
613
|
-
t.
|
|
614
|
-
if (!(t.be &
|
|
613
|
+
t._ &= ~a;
|
|
614
|
+
if (!(t.be & _)) t.be &= ~b;
|
|
615
615
|
if (t.Oe !== null || t.ve !== null) GlobalQueue.pe(t, false, true);
|
|
616
616
|
}
|
|
617
617
|
function commitPendingNodes() {
|
|
@@ -633,27 +633,27 @@ function finalizePureQueue(e = null, t = false) {
|
|
|
633
633
|
if (r) runHeap(q, GlobalQueue.de);
|
|
634
634
|
if (n) {
|
|
635
635
|
if (r) commitPendingNodes();
|
|
636
|
-
resolveOptimisticNodes(e ? e
|
|
636
|
+
resolveOptimisticNodes(e ? e.$ : z.$);
|
|
637
637
|
if (e && e.oe.size) {
|
|
638
638
|
for (const t of e.oe) {
|
|
639
|
-
if (t.
|
|
640
|
-
if (t
|
|
639
|
+
if (t._ & u) continue;
|
|
640
|
+
if (t.Z === P) {
|
|
641
641
|
if (!t.ee) {
|
|
642
642
|
t.ee = true;
|
|
643
643
|
t.te.enqueue(v, t.ne);
|
|
644
644
|
}
|
|
645
645
|
continue;
|
|
646
646
|
}
|
|
647
|
-
const e = t.
|
|
647
|
+
const e = t._ & o ? Q : q;
|
|
648
648
|
if (e.j > t.o) e.j = t.o;
|
|
649
649
|
insertIntoHeap(t, e);
|
|
650
650
|
}
|
|
651
651
|
e.oe.clear();
|
|
652
652
|
}
|
|
653
|
-
const t = e ? e.
|
|
654
|
-
if (GlobalQueue.
|
|
653
|
+
const t = e ? e.J : z.J;
|
|
654
|
+
if (GlobalQueue.ye && t.size) {
|
|
655
655
|
for (const e of t) {
|
|
656
|
-
GlobalQueue.
|
|
656
|
+
GlobalQueue.ye(e);
|
|
657
657
|
}
|
|
658
658
|
t.clear();
|
|
659
659
|
schedule();
|
|
@@ -669,7 +669,7 @@ function checkBoundaryChildren(e) {
|
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
function trackOptimisticStore(e) {
|
|
672
|
-
z.
|
|
672
|
+
z.J.add(e);
|
|
673
673
|
schedule();
|
|
674
674
|
}
|
|
675
675
|
function reassignPendingTransition(e) {
|
|
@@ -688,7 +688,7 @@ function flush(e) {
|
|
|
688
688
|
V--;
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
|
-
if (z.
|
|
691
|
+
if (z.fe) {
|
|
692
692
|
return;
|
|
693
693
|
}
|
|
694
694
|
while (D || M) {
|
|
@@ -699,7 +699,7 @@ function runQueue(e, t) {
|
|
|
699
699
|
for (let n = 0; n < e.length; n++) e[n](t);
|
|
700
700
|
}
|
|
701
701
|
function reporterBlocksSource(e, t) {
|
|
702
|
-
if (e.
|
|
702
|
+
if (e._ & (o | u)) return false;
|
|
703
703
|
if (e.Pe === t || e.xe?.has(t)) return true;
|
|
704
704
|
for (let n = e.W; n; n = n.R) {
|
|
705
705
|
let e = n.A;
|
|
@@ -708,7 +708,7 @@ function reporterBlocksSource(e, t) {
|
|
|
708
708
|
e = e.T;
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
return !!(e.be &
|
|
711
|
+
return !!(e.be & _ && e.we instanceof NotReadyError && e.we.source === t);
|
|
712
712
|
}
|
|
713
713
|
function transitionComplete(e) {
|
|
714
714
|
if (e.re) return true;
|
|
@@ -724,18 +724,18 @@ function transitionComplete(e) {
|
|
|
724
724
|
r.delete(e);
|
|
725
725
|
}
|
|
726
726
|
if (!i) e.se.delete(n);
|
|
727
|
-
else if (n.be &
|
|
727
|
+
else if (n.be & _ && n.we?.source === n) {
|
|
728
728
|
t = false;
|
|
729
729
|
break;
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
732
|
if (t) {
|
|
733
|
-
for (let n = 0; n < e
|
|
734
|
-
const r = e
|
|
733
|
+
for (let n = 0; n < e.$.length; n++) {
|
|
734
|
+
const r = e.$[n];
|
|
735
735
|
if (
|
|
736
736
|
hasActiveOverride(r) &&
|
|
737
737
|
"be" in r &&
|
|
738
|
-
r.be &
|
|
738
|
+
r.be & _ &&
|
|
739
739
|
r.we instanceof NotReadyError &&
|
|
740
740
|
r.we.source !== r
|
|
741
741
|
) {
|
|
@@ -765,15 +765,15 @@ function runInTransition(e, t) {
|
|
|
765
765
|
}
|
|
766
766
|
const U = {};
|
|
767
767
|
function markDisposal(e) {
|
|
768
|
-
let t = e.
|
|
768
|
+
let t = e.Ne;
|
|
769
769
|
while (t) {
|
|
770
|
-
t.
|
|
771
|
-
if (t.
|
|
770
|
+
t._ |= o;
|
|
771
|
+
if (t._ & i) {
|
|
772
772
|
deleteFromHeap(t, q);
|
|
773
773
|
insertIntoHeap(t, Q);
|
|
774
774
|
}
|
|
775
775
|
markDisposal(t);
|
|
776
|
-
t = t.
|
|
776
|
+
t = t.Ce;
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
779
|
function dispose(e) {
|
|
@@ -786,16 +786,16 @@ function dispose(e) {
|
|
|
786
786
|
disposeChildren(e, true);
|
|
787
787
|
}
|
|
788
788
|
function disposeChildren(e, t = false, n) {
|
|
789
|
-
const r = e.
|
|
789
|
+
const r = e._;
|
|
790
790
|
if (r & u) return;
|
|
791
|
-
if (t) e.
|
|
791
|
+
if (t) e._ = r | u;
|
|
792
792
|
if (t && e.L) e.ke = null;
|
|
793
|
-
let i = n ? e.Oe : e.
|
|
793
|
+
let i = n ? e.Oe : e.Ne;
|
|
794
794
|
while (i) {
|
|
795
|
-
const e = i.
|
|
795
|
+
const e = i.Ce;
|
|
796
796
|
if (i.W) {
|
|
797
797
|
const e = i;
|
|
798
|
-
deleteFromHeap(e, e.
|
|
798
|
+
deleteFromHeap(e, e._ & o ? Q : q);
|
|
799
799
|
let t = e.W;
|
|
800
800
|
do {
|
|
801
801
|
t = unlinkSubs(t);
|
|
@@ -809,14 +809,14 @@ function disposeChildren(e, t = false, n) {
|
|
|
809
809
|
if (n) {
|
|
810
810
|
e.Oe = null;
|
|
811
811
|
} else {
|
|
812
|
-
e.
|
|
812
|
+
e.Ne = null;
|
|
813
813
|
e.je = 0;
|
|
814
814
|
}
|
|
815
|
-
if (t && !n && !(r & o) && e.i !== null && !(e.i.
|
|
815
|
+
if (t && !n && !(r & o) && e.i !== null && !(e.i._ & u)) {
|
|
816
816
|
const t = e.We;
|
|
817
|
-
const n = e.
|
|
818
|
-
if (t !== null) t.
|
|
819
|
-
else e.i.
|
|
817
|
+
const n = e.Ce;
|
|
818
|
+
if (t !== null) t.Ce = n;
|
|
819
|
+
else e.i.Ne = n;
|
|
820
820
|
if (n !== null) n.We = t;
|
|
821
821
|
e.We = null;
|
|
822
822
|
}
|
|
@@ -837,7 +837,7 @@ function runDisposal(e, t) {
|
|
|
837
837
|
}
|
|
838
838
|
function childId(e, t) {
|
|
839
839
|
let n = e;
|
|
840
|
-
while (n.
|
|
840
|
+
while (n.ge & h && n.i) n = n.i;
|
|
841
841
|
if (n.id != null) return formatId(n.id, t ? n.je++ : n.je);
|
|
842
842
|
throw new Error("Cannot get child id from owner without an id");
|
|
843
843
|
}
|
|
@@ -853,8 +853,8 @@ function formatId(e, t) {
|
|
|
853
853
|
return e + (r ? String.fromCharCode(64 + r) : "") + n;
|
|
854
854
|
}
|
|
855
855
|
function getObserver() {
|
|
856
|
-
if (
|
|
857
|
-
return
|
|
856
|
+
if (Z || te) return U;
|
|
857
|
+
return J ? ne : null;
|
|
858
858
|
}
|
|
859
859
|
function getOwner() {
|
|
860
860
|
return ne;
|
|
@@ -867,7 +867,7 @@ function cleanup(e) {
|
|
|
867
867
|
return e;
|
|
868
868
|
}
|
|
869
869
|
function isDisposed(e) {
|
|
870
|
-
return !!(e.
|
|
870
|
+
return !!(e._ & (u | o));
|
|
871
871
|
}
|
|
872
872
|
function disposeRootSelf(e = true) {
|
|
873
873
|
disposeChildren(this, e);
|
|
@@ -877,11 +877,11 @@ function createOwner(e) {
|
|
|
877
877
|
const n = e?.transparent ?? false;
|
|
878
878
|
const r = {
|
|
879
879
|
id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
|
|
880
|
-
|
|
880
|
+
ge: n ? h : 0,
|
|
881
881
|
t: true,
|
|
882
882
|
u: t?.t ? t.u : t,
|
|
883
|
-
Ce: null,
|
|
884
883
|
Ne: null,
|
|
884
|
+
Ce: null,
|
|
885
885
|
We: null,
|
|
886
886
|
Re: null,
|
|
887
887
|
te: t?.te ?? z,
|
|
@@ -893,13 +893,13 @@ function createOwner(e) {
|
|
|
893
893
|
dispose: disposeRootSelf
|
|
894
894
|
};
|
|
895
895
|
if (t) {
|
|
896
|
-
const e = t.
|
|
896
|
+
const e = t.Ne;
|
|
897
897
|
if (e === null) {
|
|
898
|
-
t.
|
|
898
|
+
t.Ne = r;
|
|
899
899
|
} else {
|
|
900
|
-
r.
|
|
900
|
+
r.Ce = e;
|
|
901
901
|
e.We = r;
|
|
902
|
-
t.
|
|
902
|
+
t.Ne = r;
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
905
|
return r;
|
|
@@ -919,9 +919,9 @@ function unlinkSubs(e) {
|
|
|
919
919
|
else {
|
|
920
920
|
t.O = r;
|
|
921
921
|
if (r === null) {
|
|
922
|
-
t.
|
|
922
|
+
t.Y?.();
|
|
923
923
|
const e = t;
|
|
924
|
-
e.L && e.
|
|
924
|
+
e.L && e.ge & g && !(e._ & o) && unobserved(e);
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
927
|
return n;
|
|
@@ -938,7 +938,7 @@ function trimStaleDeps(e) {
|
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
940
|
function unobserved(e) {
|
|
941
|
-
deleteFromHeap(e, e.
|
|
941
|
+
deleteFromHeap(e, e._ & o ? Q : q);
|
|
942
942
|
let t = e.W;
|
|
943
943
|
while (t !== null) {
|
|
944
944
|
t = unlinkSubs(t);
|
|
@@ -951,7 +951,7 @@ function link(e, t) {
|
|
|
951
951
|
const n = t.Ee;
|
|
952
952
|
if (n !== null && n.A === e) return;
|
|
953
953
|
let i = null;
|
|
954
|
-
const s = t.
|
|
954
|
+
const s = t._ & r;
|
|
955
955
|
if (s) {
|
|
956
956
|
i = n !== null ? n.R : t.W;
|
|
957
957
|
if (i !== null && i.A === e) {
|
|
@@ -960,8 +960,8 @@ function link(e, t) {
|
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
const o = e.Le;
|
|
963
|
-
if (o !== null && o.
|
|
964
|
-
const u = (t.Ee = e.Le = { A: e,
|
|
963
|
+
if (o !== null && o.N === t && (!s || isValidLink(o, t))) return;
|
|
964
|
+
const u = (t.Ee = e.Le = { A: e, N: t, R: i, Ie: o, P: null });
|
|
965
965
|
if (n !== null) n.R = u;
|
|
966
966
|
else t.W = u;
|
|
967
967
|
if (o !== null) o.P = u;
|
|
@@ -1028,9 +1028,9 @@ function setPendingError(e, t, n) {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
function forEachDependent(e, t) {
|
|
1031
|
-
for (let n = e.O; n !== null; n = n.P) t(n.
|
|
1032
|
-
for (let n = e.
|
|
1033
|
-
for (let e = n.O; e !== null; e = e.P) t(e.
|
|
1031
|
+
for (let n = e.O; n !== null; n = n.P) t(n.N);
|
|
1032
|
+
for (let n = e.C; n !== null; n = n.k) {
|
|
1033
|
+
for (let e = n.O; e !== null; e = e.P) t(e.N);
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
1036
|
function settlePendingSource(e) {
|
|
@@ -1039,24 +1039,24 @@ function settlePendingSource(e) {
|
|
|
1039
1039
|
const settle = r => {
|
|
1040
1040
|
if (n.has(r) || !removePendingSource(r, e)) return;
|
|
1041
1041
|
n.add(r);
|
|
1042
|
-
r.
|
|
1042
|
+
r._e = F;
|
|
1043
1043
|
const i = r.Pe ?? r.xe?.values().next().value;
|
|
1044
1044
|
if (i) {
|
|
1045
1045
|
setPendingError(r, i);
|
|
1046
1046
|
updatePendingSignal(r);
|
|
1047
1047
|
} else {
|
|
1048
|
-
r.be &= ~
|
|
1048
|
+
r.be &= ~_;
|
|
1049
1049
|
setPendingError(r);
|
|
1050
1050
|
updatePendingSignal(r);
|
|
1051
1051
|
if (r.Te) {
|
|
1052
|
-
if (r
|
|
1052
|
+
if (r.Z === P) {
|
|
1053
1053
|
const e = r;
|
|
1054
1054
|
if (!e.ee) {
|
|
1055
1055
|
e.ee = true;
|
|
1056
1056
|
e.te.enqueue(v, e.ne);
|
|
1057
1057
|
}
|
|
1058
1058
|
} else {
|
|
1059
|
-
const e = r.
|
|
1059
|
+
const e = r._ & o ? Q : q;
|
|
1060
1060
|
if (e.j > r.o) e.j = r.o;
|
|
1061
1061
|
insertIntoHeap(r, e);
|
|
1062
1062
|
}
|
|
@@ -1087,12 +1087,12 @@ function handleAsync(e, t, r) {
|
|
|
1087
1087
|
const handleError = n => {
|
|
1088
1088
|
if (e.ke !== t) return;
|
|
1089
1089
|
z.initTransition(resolveTransition(e));
|
|
1090
|
-
notifyStatus(e, n instanceof NotReadyError ?
|
|
1091
|
-
e.
|
|
1090
|
+
notifyStatus(e, n instanceof NotReadyError ? _ : m, n);
|
|
1091
|
+
e._e = F;
|
|
1092
1092
|
};
|
|
1093
1093
|
const asyncWrite = (i, s) => {
|
|
1094
1094
|
if (e.ke !== t) return;
|
|
1095
|
-
if (e.
|
|
1095
|
+
if (e._ & (n | f)) return;
|
|
1096
1096
|
z.initTransition(resolveTransition(e));
|
|
1097
1097
|
const o = !!(e.be & b);
|
|
1098
1098
|
trimStaleDeps(e);
|
|
@@ -1101,19 +1101,19 @@ function handleAsync(e, t, r) {
|
|
|
1101
1101
|
if (u) u.F.delete(e);
|
|
1102
1102
|
if (r) r(i);
|
|
1103
1103
|
else if (e.G !== undefined) {
|
|
1104
|
-
if (e.G !== undefined && e.G !== x) e.
|
|
1104
|
+
if (e.G !== undefined && e.G !== x) e.X = i;
|
|
1105
1105
|
else {
|
|
1106
1106
|
e.ue = i;
|
|
1107
1107
|
insertSubs(e);
|
|
1108
1108
|
}
|
|
1109
|
-
e.
|
|
1109
|
+
e._e = F;
|
|
1110
1110
|
} else if (u) {
|
|
1111
|
-
const t = e
|
|
1111
|
+
const t = e.Z;
|
|
1112
1112
|
const n = e.ue;
|
|
1113
1113
|
const r = e.He;
|
|
1114
1114
|
if ((!t && o) || !r || !r(i, n)) {
|
|
1115
1115
|
e.ue = i;
|
|
1116
|
-
e.
|
|
1116
|
+
e._e = F;
|
|
1117
1117
|
if (e.qe) {
|
|
1118
1118
|
setSignal(e.qe, i);
|
|
1119
1119
|
}
|
|
@@ -1164,10 +1164,10 @@ function handleAsync(e, t, r) {
|
|
|
1164
1164
|
const iterate = () => {
|
|
1165
1165
|
let s,
|
|
1166
1166
|
u = false,
|
|
1167
|
-
|
|
1167
|
+
f = true;
|
|
1168
1168
|
n.next().then(
|
|
1169
1169
|
n => {
|
|
1170
|
-
if (
|
|
1170
|
+
if (f) {
|
|
1171
1171
|
s = n;
|
|
1172
1172
|
u = true;
|
|
1173
1173
|
if (n.done) i = true;
|
|
@@ -1181,13 +1181,13 @@ function handleAsync(e, t, r) {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
},
|
|
1183
1183
|
n => {
|
|
1184
|
-
if (!
|
|
1184
|
+
if (!f && e.ke === t) {
|
|
1185
1185
|
i = true;
|
|
1186
1186
|
handleError(n);
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
1189
|
);
|
|
1190
|
-
|
|
1190
|
+
f = false;
|
|
1191
1191
|
if (u && !s.done) {
|
|
1192
1192
|
o = s.value;
|
|
1193
1193
|
r = true;
|
|
@@ -1212,20 +1212,20 @@ function clearStatus(e, t = false) {
|
|
|
1212
1212
|
if (e.Fe) e.Fe();
|
|
1213
1213
|
}
|
|
1214
1214
|
function notifyStatus(e, t, n, r, i) {
|
|
1215
|
-
if (t ===
|
|
1215
|
+
if (t === m && !(n instanceof StatusError) && !(n instanceof NotReadyError))
|
|
1216
1216
|
n = new StatusError(e, n);
|
|
1217
|
-
const s = t ===
|
|
1217
|
+
const s = t === _ && n instanceof NotReadyError ? n.source : undefined;
|
|
1218
1218
|
const o = s === e;
|
|
1219
|
-
const u = t ===
|
|
1220
|
-
const
|
|
1219
|
+
const u = t === _ && e.G !== undefined && !o;
|
|
1220
|
+
const f = u && hasActiveOverride(e);
|
|
1221
1221
|
if (!r) {
|
|
1222
|
-
if (t ===
|
|
1222
|
+
if (t === _ && s) {
|
|
1223
1223
|
addPendingSource(e, s);
|
|
1224
|
-
e.be =
|
|
1224
|
+
e.be = _ | (e.be & b);
|
|
1225
1225
|
setPendingError(e, s, n);
|
|
1226
1226
|
} else {
|
|
1227
1227
|
clearPendingSources(e);
|
|
1228
|
-
e.be = t | (t !==
|
|
1228
|
+
e.be = t | (t !== m ? e.be & b : 0);
|
|
1229
1229
|
e.we = n;
|
|
1230
1230
|
}
|
|
1231
1231
|
updatePendingSignal(e);
|
|
@@ -1233,13 +1233,13 @@ function notifyStatus(e, t, n, r, i) {
|
|
|
1233
1233
|
if (i && !r) {
|
|
1234
1234
|
assignOrMergeLane(e, i);
|
|
1235
1235
|
}
|
|
1236
|
-
const
|
|
1236
|
+
const l = r || f;
|
|
1237
1237
|
const c = r || u ? undefined : i;
|
|
1238
1238
|
if (e.Fe) {
|
|
1239
|
-
if (r && t ===
|
|
1239
|
+
if (r && t === _) {
|
|
1240
1240
|
return;
|
|
1241
1241
|
}
|
|
1242
|
-
if (
|
|
1242
|
+
if (l) {
|
|
1243
1243
|
e.Fe(t, n);
|
|
1244
1244
|
} else {
|
|
1245
1245
|
e.Fe();
|
|
@@ -1247,22 +1247,22 @@ function notifyStatus(e, t, n, r, i) {
|
|
|
1247
1247
|
return;
|
|
1248
1248
|
}
|
|
1249
1249
|
forEachDependent(e, e => {
|
|
1250
|
-
e.
|
|
1250
|
+
e._e = F;
|
|
1251
1251
|
if (
|
|
1252
|
-
(t ===
|
|
1253
|
-
(t !==
|
|
1252
|
+
(t === _ && s && e.Pe !== s && !e.xe?.has(s)) ||
|
|
1253
|
+
(t !== _ && (e.we !== n || e.Pe || e.xe))
|
|
1254
1254
|
) {
|
|
1255
|
-
if (!
|
|
1256
|
-
notifyStatus(e, t, n,
|
|
1255
|
+
if (!l && !e.V) queuePendingNode(e);
|
|
1256
|
+
notifyStatus(e, t, n, l, c);
|
|
1257
1257
|
}
|
|
1258
1258
|
});
|
|
1259
1259
|
}
|
|
1260
|
-
let
|
|
1260
|
+
let $ = null;
|
|
1261
1261
|
function enableExternalSource(e) {
|
|
1262
1262
|
const { factory: t, untrack: n = e => e() } = e;
|
|
1263
|
-
if (
|
|
1264
|
-
const { factory: e, untrack: r } =
|
|
1265
|
-
|
|
1263
|
+
if ($) {
|
|
1264
|
+
const { factory: e, untrack: r } = $;
|
|
1265
|
+
$ = {
|
|
1266
1266
|
factory: (n, r) => {
|
|
1267
1267
|
const i = e(n, r);
|
|
1268
1268
|
const s = t(e => i.track(e), r);
|
|
@@ -1277,21 +1277,22 @@ function enableExternalSource(e) {
|
|
|
1277
1277
|
untrack: e => r(() => n(e))
|
|
1278
1278
|
};
|
|
1279
1279
|
} else {
|
|
1280
|
-
|
|
1280
|
+
$ = { factory: t, untrack: n };
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
1283
|
GlobalQueue.de = recompute;
|
|
1284
1284
|
GlobalQueue.pe = disposeChildren;
|
|
1285
|
+
let J = false;
|
|
1285
1286
|
let X = false;
|
|
1286
1287
|
let Y = false;
|
|
1287
1288
|
let Z = false;
|
|
1288
|
-
let $ = false;
|
|
1289
1289
|
let ee = false;
|
|
1290
1290
|
let te = false;
|
|
1291
1291
|
let ne = null;
|
|
1292
1292
|
let re = null;
|
|
1293
|
-
let ie =
|
|
1294
|
-
let se =
|
|
1293
|
+
let ie = null;
|
|
1294
|
+
let se = false;
|
|
1295
|
+
let oe = null;
|
|
1295
1296
|
function ownerInSnapshotScope(e) {
|
|
1296
1297
|
while (e) {
|
|
1297
1298
|
if (e.Me) return true;
|
|
@@ -1300,8 +1301,8 @@ function ownerInSnapshotScope(e) {
|
|
|
1300
1301
|
return false;
|
|
1301
1302
|
}
|
|
1302
1303
|
function setSnapshotCapture(e) {
|
|
1303
|
-
|
|
1304
|
-
if (e && !
|
|
1304
|
+
se = e;
|
|
1305
|
+
if (e && !oe) oe = new Set();
|
|
1305
1306
|
}
|
|
1306
1307
|
function markSnapshotScope(e) {
|
|
1307
1308
|
e.Me = true;
|
|
@@ -1312,89 +1313,89 @@ function releaseSnapshotScope(e) {
|
|
|
1312
1313
|
schedule();
|
|
1313
1314
|
}
|
|
1314
1315
|
function releaseSubtree(e) {
|
|
1315
|
-
let t = e.
|
|
1316
|
+
let t = e.Ne;
|
|
1316
1317
|
while (t) {
|
|
1317
1318
|
if (t.Me) {
|
|
1318
|
-
t = t.
|
|
1319
|
+
t = t.Ce;
|
|
1319
1320
|
continue;
|
|
1320
1321
|
}
|
|
1321
1322
|
if (t.L) {
|
|
1322
1323
|
const e = t;
|
|
1323
|
-
e.
|
|
1324
|
-
if (e.
|
|
1325
|
-
e.
|
|
1326
|
-
e.
|
|
1324
|
+
e.ge &= ~y;
|
|
1325
|
+
if (e._ & l) {
|
|
1326
|
+
e._ &= ~l;
|
|
1327
|
+
e._ |= n;
|
|
1327
1328
|
if (q.j > e.o) q.j = e.o;
|
|
1328
1329
|
insertIntoHeap(e, q);
|
|
1329
1330
|
}
|
|
1330
1331
|
}
|
|
1331
1332
|
releaseSubtree(t);
|
|
1332
|
-
t = t.
|
|
1333
|
+
t = t.Ce;
|
|
1333
1334
|
}
|
|
1334
1335
|
}
|
|
1335
1336
|
function clearSnapshots() {
|
|
1336
|
-
if (
|
|
1337
|
-
for (const e of
|
|
1338
|
-
delete e.
|
|
1339
|
-
delete e[
|
|
1337
|
+
if (oe) {
|
|
1338
|
+
for (const e of oe) {
|
|
1339
|
+
delete e.me;
|
|
1340
|
+
delete e[C];
|
|
1340
1341
|
}
|
|
1341
|
-
|
|
1342
|
+
oe = null;
|
|
1342
1343
|
}
|
|
1343
|
-
|
|
1344
|
+
se = false;
|
|
1344
1345
|
}
|
|
1345
1346
|
function recompute(t, n = false) {
|
|
1346
|
-
const i = t
|
|
1347
|
+
const i = t.Z;
|
|
1347
1348
|
if (!n) {
|
|
1348
1349
|
if (t.V && (!i || M) && M !== t.V) z.initTransition(t.V);
|
|
1349
|
-
deleteFromHeap(t, t.
|
|
1350
|
+
deleteFromHeap(t, t._ & o ? Q : q);
|
|
1350
1351
|
t.ke = null;
|
|
1351
1352
|
if (t.V || i === P) disposeChildren(t);
|
|
1352
|
-
else if (t.
|
|
1353
|
+
else if (t.Ne !== null || t.Re !== null) {
|
|
1353
1354
|
markDisposal(t);
|
|
1354
1355
|
t.ve = t.Re;
|
|
1355
|
-
t.Oe = t.
|
|
1356
|
+
t.Oe = t.Ne;
|
|
1356
1357
|
t.Re = null;
|
|
1357
|
-
t.
|
|
1358
|
+
t.Ne = null;
|
|
1358
1359
|
t.je = 0;
|
|
1359
1360
|
} else;
|
|
1360
1361
|
}
|
|
1361
|
-
let s = !!(t.
|
|
1362
|
+
let s = !!(t._ & f);
|
|
1362
1363
|
const u = t.G !== undefined && t.G !== x;
|
|
1363
|
-
const c = !!(t.be &
|
|
1364
|
+
const c = !!(t.be & _);
|
|
1364
1365
|
const a = !!(t.be & b);
|
|
1365
1366
|
const d = ne;
|
|
1366
1367
|
ne = t;
|
|
1367
1368
|
t.Ee = null;
|
|
1368
|
-
t.
|
|
1369
|
-
t.
|
|
1370
|
-
let p = t.
|
|
1369
|
+
t._ = r;
|
|
1370
|
+
t._e = F;
|
|
1371
|
+
let p = t.X === x ? t.ue : t.X;
|
|
1371
1372
|
let h = t.o;
|
|
1372
|
-
let
|
|
1373
|
+
let y = J;
|
|
1373
1374
|
let S = re;
|
|
1374
|
-
|
|
1375
|
+
J = true;
|
|
1375
1376
|
if (s) {
|
|
1376
1377
|
const e = resolveLane(t);
|
|
1377
1378
|
if (e) re = e;
|
|
1378
|
-
} else if (M && !n && M
|
|
1379
|
+
} else if (M && !n && M.$.length) {
|
|
1379
1380
|
for (let e = t.W; e; e = e.R) {
|
|
1380
1381
|
const n = e.A;
|
|
1381
|
-
if (n.
|
|
1382
|
+
if (n._ & f) {
|
|
1382
1383
|
const e = resolveLane(n);
|
|
1383
1384
|
if (e) {
|
|
1384
1385
|
s = true;
|
|
1385
1386
|
re = e;
|
|
1386
|
-
t.
|
|
1387
|
+
t._ |= f;
|
|
1387
1388
|
assignOrMergeLane(t, e);
|
|
1388
1389
|
break;
|
|
1389
1390
|
}
|
|
1390
1391
|
}
|
|
1391
1392
|
}
|
|
1392
1393
|
}
|
|
1393
|
-
const
|
|
1394
|
-
const O =
|
|
1395
|
-
if (
|
|
1394
|
+
const g = i && i !== v;
|
|
1395
|
+
const O = X;
|
|
1396
|
+
if (g) X = true;
|
|
1396
1397
|
try {
|
|
1397
|
-
if (!false && t.
|
|
1398
|
+
if (!false && t.ge & w) {
|
|
1398
1399
|
p = t.L(p);
|
|
1399
1400
|
t.ke = null;
|
|
1400
1401
|
} else {
|
|
@@ -1425,20 +1426,20 @@ function recompute(t, n = false) {
|
|
|
1425
1426
|
if (e instanceof NotReadyError) t.Te = true;
|
|
1426
1427
|
notifyStatus(
|
|
1427
1428
|
t,
|
|
1428
|
-
e instanceof NotReadyError ?
|
|
1429
|
+
e instanceof NotReadyError ? _ : m,
|
|
1429
1430
|
e,
|
|
1430
1431
|
undefined,
|
|
1431
1432
|
e instanceof NotReadyError ? t.H : undefined
|
|
1432
1433
|
);
|
|
1433
1434
|
} finally {
|
|
1434
|
-
|
|
1435
|
-
if (
|
|
1436
|
-
t.
|
|
1435
|
+
J = y;
|
|
1436
|
+
if (g) X = O;
|
|
1437
|
+
t._ = e | (n ? t._ & l : 0);
|
|
1437
1438
|
ne = d;
|
|
1438
1439
|
}
|
|
1439
1440
|
if (!t.we) {
|
|
1440
1441
|
trimStaleDeps(t);
|
|
1441
|
-
const e = u ? t.G : t.
|
|
1442
|
+
const e = u ? t.G : t.X === x ? t.ue : t.X;
|
|
1442
1443
|
const r = (!i && a) || !t.He || !t.He(e, p);
|
|
1443
1444
|
if (i && r) {
|
|
1444
1445
|
t.ee = !t.we;
|
|
@@ -1450,54 +1451,54 @@ function recompute(t, n = false) {
|
|
|
1450
1451
|
t.ue = p;
|
|
1451
1452
|
if (u && s) {
|
|
1452
1453
|
t.G = p;
|
|
1453
|
-
t.
|
|
1454
|
+
t.X = p;
|
|
1454
1455
|
}
|
|
1455
|
-
} else t.
|
|
1456
|
+
} else t.X = p;
|
|
1456
1457
|
if (u && !s && c && !t.B) t.G = p;
|
|
1457
1458
|
if (!u || s || t.G !== e) insertSubs(t, s || u);
|
|
1458
1459
|
} else if (u) {
|
|
1459
|
-
t.
|
|
1460
|
+
t.X = p;
|
|
1460
1461
|
} else if (t.o != h) {
|
|
1461
1462
|
for (let e = t.O; e !== null; e = e.P) {
|
|
1462
|
-
insertIntoHeapHeight(e.
|
|
1463
|
+
insertIntoHeapHeight(e.N, e.N._ & o ? Q : q);
|
|
1463
1464
|
}
|
|
1464
1465
|
}
|
|
1465
1466
|
}
|
|
1466
1467
|
re = S;
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1468
|
+
const N = t.X !== x || t.Oe !== null || t.ve !== null || !!(t.be & (_ | b));
|
|
1469
|
+
N && (!n || t.be & _) && !t.V && !(M && u) && queuePendingNode(t);
|
|
1469
1470
|
t.V && i && M !== t.V && runInTransition(t.V, () => recompute(t));
|
|
1470
1471
|
}
|
|
1471
1472
|
function updateIfNecessary(e) {
|
|
1472
|
-
if (e.
|
|
1473
|
+
if (e._ & t) {
|
|
1473
1474
|
for (let t = e.W; t; t = t.R) {
|
|
1474
1475
|
const r = t.A;
|
|
1475
1476
|
const i = r.I || r;
|
|
1476
1477
|
if (i.L) {
|
|
1477
1478
|
updateIfNecessary(i);
|
|
1478
1479
|
}
|
|
1479
|
-
if (e.
|
|
1480
|
+
if (e._ & n) {
|
|
1480
1481
|
break;
|
|
1481
1482
|
}
|
|
1482
1483
|
}
|
|
1483
1484
|
}
|
|
1484
|
-
if (e.
|
|
1485
|
+
if (e._ & (n | f) || (e.we && e._e < F && !e.ke)) {
|
|
1485
1486
|
recompute(e);
|
|
1486
1487
|
}
|
|
1487
|
-
e.
|
|
1488
|
+
e._ = e._ & (l | i | s);
|
|
1488
1489
|
}
|
|
1489
1490
|
function computed(t, n) {
|
|
1490
1491
|
const r = n?.transparent ?? false;
|
|
1491
1492
|
const i = {
|
|
1492
1493
|
id: n?.id ?? (r ? ne?.id : ne?.id != null ? getNextChildId(ne) : undefined),
|
|
1493
|
-
|
|
1494
|
+
ge:
|
|
1494
1495
|
(r ? h : 0) |
|
|
1495
1496
|
(n?.ownedWrite ? d : 0) |
|
|
1496
|
-
(!ne || n?.lazy ?
|
|
1497
|
+
(!ne || n?.lazy ? g : 0) |
|
|
1497
1498
|
(n?.sync ? w : 0) |
|
|
1498
|
-
(
|
|
1499
|
+
(se && ownerInSnapshotScope(ne) ? y : 0),
|
|
1499
1500
|
He: n?.equals != null ? n.equals : isEqual,
|
|
1500
|
-
|
|
1501
|
+
Y: n?.unobserved,
|
|
1501
1502
|
Re: null,
|
|
1502
1503
|
te: ne?.te ?? z,
|
|
1503
1504
|
Ae: ne?.Ae ?? k,
|
|
@@ -1505,7 +1506,7 @@ function computed(t, n) {
|
|
|
1505
1506
|
L: t,
|
|
1506
1507
|
ue: undefined,
|
|
1507
1508
|
o: 0,
|
|
1508
|
-
|
|
1509
|
+
C: null,
|
|
1509
1510
|
h: undefined,
|
|
1510
1511
|
p: null,
|
|
1511
1512
|
W: null,
|
|
@@ -1513,13 +1514,13 @@ function computed(t, n) {
|
|
|
1513
1514
|
O: null,
|
|
1514
1515
|
Le: null,
|
|
1515
1516
|
i: ne,
|
|
1516
|
-
Ne: null,
|
|
1517
|
-
We: null,
|
|
1518
1517
|
Ce: null,
|
|
1519
|
-
|
|
1518
|
+
We: null,
|
|
1519
|
+
Ne: null,
|
|
1520
|
+
_: n?.lazy ? c : e,
|
|
1520
1521
|
be: b,
|
|
1521
|
-
|
|
1522
|
-
|
|
1522
|
+
_e: F,
|
|
1523
|
+
X: x,
|
|
1523
1524
|
ve: null,
|
|
1524
1525
|
Oe: null,
|
|
1525
1526
|
ke: null,
|
|
@@ -1532,13 +1533,13 @@ function createEffectNode(e, t, n, r, i, s) {
|
|
|
1532
1533
|
const o = s?.transparent ?? false;
|
|
1533
1534
|
const u = {
|
|
1534
1535
|
id: s?.id ?? (o ? ne?.id : ne?.id != null ? getNextChildId(ne) : undefined),
|
|
1535
|
-
|
|
1536
|
+
ge:
|
|
1536
1537
|
(o ? h : 0) |
|
|
1537
1538
|
(s?.ownedWrite ? d : 0) |
|
|
1538
1539
|
(s?.sync ? w : 0) |
|
|
1539
|
-
(
|
|
1540
|
+
(se && ownerInSnapshotScope(ne) ? y : 0),
|
|
1540
1541
|
He: false,
|
|
1541
|
-
|
|
1542
|
+
Y: s?.unobserved,
|
|
1542
1543
|
Re: null,
|
|
1543
1544
|
te: ne?.te ?? z,
|
|
1544
1545
|
Ae: ne?.Ae ?? k,
|
|
@@ -1546,7 +1547,7 @@ function createEffectNode(e, t, n, r, i, s) {
|
|
|
1546
1547
|
L: e,
|
|
1547
1548
|
ue: undefined,
|
|
1548
1549
|
o: 0,
|
|
1549
|
-
|
|
1550
|
+
C: null,
|
|
1550
1551
|
h: undefined,
|
|
1551
1552
|
p: null,
|
|
1552
1553
|
W: null,
|
|
@@ -1554,13 +1555,13 @@ function createEffectNode(e, t, n, r, i, s) {
|
|
|
1554
1555
|
O: null,
|
|
1555
1556
|
Le: null,
|
|
1556
1557
|
i: ne,
|
|
1557
|
-
Ne: null,
|
|
1558
|
-
We: null,
|
|
1559
1558
|
Ce: null,
|
|
1560
|
-
|
|
1559
|
+
We: null,
|
|
1560
|
+
Ne: null,
|
|
1561
|
+
_: c,
|
|
1561
1562
|
be: b,
|
|
1562
|
-
|
|
1563
|
-
|
|
1563
|
+
_e: F,
|
|
1564
|
+
X: x,
|
|
1564
1565
|
ve: null,
|
|
1565
1566
|
Oe: null,
|
|
1566
1567
|
ke: null,
|
|
@@ -1571,30 +1572,30 @@ function createEffectNode(e, t, n, r, i, s) {
|
|
|
1571
1572
|
Ke: n,
|
|
1572
1573
|
Be: undefined,
|
|
1573
1574
|
Ge: false,
|
|
1574
|
-
|
|
1575
|
+
Z: r,
|
|
1575
1576
|
Fe: i
|
|
1576
1577
|
};
|
|
1577
|
-
setupComputedNode(u,
|
|
1578
|
+
setupComputedNode(u, ue);
|
|
1578
1579
|
return u;
|
|
1579
1580
|
}
|
|
1580
|
-
const
|
|
1581
|
+
const ue = { lazy: true };
|
|
1581
1582
|
function setupComputedNode(e, t) {
|
|
1582
1583
|
e.p = e;
|
|
1583
1584
|
const n = ne?.t ? ne.u : ne;
|
|
1584
1585
|
if (ne) {
|
|
1585
|
-
const t = ne.
|
|
1586
|
+
const t = ne.Ne;
|
|
1586
1587
|
if (t === null) {
|
|
1587
|
-
ne.
|
|
1588
|
+
ne.Ne = e;
|
|
1588
1589
|
} else {
|
|
1589
|
-
e.
|
|
1590
|
+
e.Ce = t;
|
|
1590
1591
|
t.We = e;
|
|
1591
|
-
ne.
|
|
1592
|
+
ne.Ne = e;
|
|
1592
1593
|
}
|
|
1593
1594
|
}
|
|
1594
1595
|
if (n) e.o = n.o + 1;
|
|
1595
|
-
if (
|
|
1596
|
+
if ($) {
|
|
1596
1597
|
const t = signal(undefined, { equals: false, ownedWrite: true });
|
|
1597
|
-
const n =
|
|
1598
|
+
const n = $.factory(e.L, () => {
|
|
1598
1599
|
setSignal(t, undefined);
|
|
1599
1600
|
});
|
|
1600
1601
|
cleanup(() => n.dispose());
|
|
@@ -1604,30 +1605,30 @@ function setupComputedNode(e, t) {
|
|
|
1604
1605
|
};
|
|
1605
1606
|
}
|
|
1606
1607
|
!t?.lazy && recompute(e, true);
|
|
1607
|
-
if (
|
|
1608
|
-
if (!(e.be &
|
|
1609
|
-
e.
|
|
1610
|
-
|
|
1608
|
+
if (se && !t?.lazy) {
|
|
1609
|
+
if (!(e.be & _)) {
|
|
1610
|
+
e.me = e.ue === undefined ? N : e.ue;
|
|
1611
|
+
oe.add(e);
|
|
1611
1612
|
}
|
|
1612
1613
|
}
|
|
1613
1614
|
}
|
|
1614
1615
|
function signal(e, t, n = null) {
|
|
1615
1616
|
const r = {
|
|
1616
1617
|
He: t?.equals != null ? t.equals : isEqual,
|
|
1617
|
-
|
|
1618
|
-
|
|
1618
|
+
ge: (t?.ownedWrite ? d : 0) | (t?.ze ? p : 0),
|
|
1619
|
+
Y: t?.unobserved,
|
|
1619
1620
|
ue: e,
|
|
1620
1621
|
O: null,
|
|
1621
1622
|
Le: null,
|
|
1622
|
-
|
|
1623
|
+
_e: F,
|
|
1623
1624
|
I: n,
|
|
1624
|
-
k: n?.
|
|
1625
|
-
|
|
1625
|
+
k: n?.C || null,
|
|
1626
|
+
X: x
|
|
1626
1627
|
};
|
|
1627
|
-
n && (n.
|
|
1628
|
-
if (
|
|
1629
|
-
r.
|
|
1630
|
-
|
|
1628
|
+
n && (n.C = r);
|
|
1629
|
+
if (se && !(r.ge & p) && !((n?.be ?? 0) & _)) {
|
|
1630
|
+
r.me = e === undefined ? N : e;
|
|
1631
|
+
oe.add(r);
|
|
1631
1632
|
}
|
|
1632
1633
|
return r;
|
|
1633
1634
|
}
|
|
@@ -1645,14 +1646,14 @@ function isEqual(e, t) {
|
|
|
1645
1646
|
return e === t;
|
|
1646
1647
|
}
|
|
1647
1648
|
function untrack(e, t) {
|
|
1648
|
-
if (
|
|
1649
|
-
const n =
|
|
1650
|
-
|
|
1649
|
+
if (!$ && !J && true) return e();
|
|
1650
|
+
const n = J;
|
|
1651
|
+
J = false;
|
|
1651
1652
|
try {
|
|
1652
|
-
if (
|
|
1653
|
+
if ($) return $.untrack(e);
|
|
1653
1654
|
return e();
|
|
1654
1655
|
} finally {
|
|
1655
|
-
|
|
1656
|
+
J = n;
|
|
1656
1657
|
}
|
|
1657
1658
|
}
|
|
1658
1659
|
function read(e) {
|
|
@@ -1670,8 +1671,8 @@ function read(e) {
|
|
|
1670
1671
|
} finally {
|
|
1671
1672
|
te = n;
|
|
1672
1673
|
}
|
|
1673
|
-
if (t.be &
|
|
1674
|
-
if (
|
|
1674
|
+
if (t.be & _) return r;
|
|
1675
|
+
if (X && re && t.H) {
|
|
1675
1676
|
const e = findLane(t.H);
|
|
1676
1677
|
const n = findLane(re);
|
|
1677
1678
|
if (e !== n && e.F.size > 0) {
|
|
@@ -1680,35 +1681,52 @@ function read(e) {
|
|
|
1680
1681
|
}
|
|
1681
1682
|
return i;
|
|
1682
1683
|
}
|
|
1683
|
-
if (
|
|
1684
|
+
if (Z) {
|
|
1684
1685
|
const t = e.I;
|
|
1685
|
-
const n =
|
|
1686
|
-
|
|
1686
|
+
const n = Z;
|
|
1687
|
+
Z = false;
|
|
1688
|
+
let r = ne;
|
|
1689
|
+
if (r?.t) r = r.u;
|
|
1690
|
+
const i = t || e;
|
|
1691
|
+
const s = e;
|
|
1692
|
+
if (typeof s.L === "function") {
|
|
1693
|
+
const t = e;
|
|
1694
|
+
if (t._ & c) {
|
|
1695
|
+
t._ &= ~c;
|
|
1696
|
+
recompute(t, true);
|
|
1697
|
+
} else if (t._ & u) {
|
|
1698
|
+
recompute(t, true);
|
|
1699
|
+
} else {
|
|
1700
|
+
updateIfNecessary(t);
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
if (r && i.be & _ && i.be & b) {
|
|
1704
|
+
if (J && e !== r) link(e, r);
|
|
1705
|
+
Z = n;
|
|
1706
|
+
throw i.we;
|
|
1707
|
+
}
|
|
1687
1708
|
if (t && e.G !== undefined) {
|
|
1688
|
-
if (e.G !== x && (t.ke || !!(t.be &
|
|
1709
|
+
if (e.G !== x && (t.ke || !!(t.be & _))) {
|
|
1689
1710
|
ee = true;
|
|
1690
1711
|
}
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
if (
|
|
1694
|
-
read(getPendingSignal(e));
|
|
1695
|
-
read(getPendingSignal(t));
|
|
1712
|
+
collectPendingSources(e);
|
|
1713
|
+
collectPendingSources(t);
|
|
1714
|
+
if (r && J) link(e, r);
|
|
1696
1715
|
} else {
|
|
1697
|
-
|
|
1698
|
-
if (t
|
|
1716
|
+
collectPendingSources(e);
|
|
1717
|
+
if (t) collectPendingSources(t);
|
|
1699
1718
|
}
|
|
1700
|
-
|
|
1701
|
-
return e.ue;
|
|
1719
|
+
Z = n;
|
|
1702
1720
|
}
|
|
1703
1721
|
let t = ne;
|
|
1704
1722
|
if (t?.t) t = t.u;
|
|
1705
1723
|
const n = e;
|
|
1706
1724
|
if (typeof n.L === "function") {
|
|
1707
1725
|
const t = e;
|
|
1708
|
-
if (t.
|
|
1709
|
-
t.
|
|
1726
|
+
if (t._ & c) {
|
|
1727
|
+
t._ &= ~c;
|
|
1710
1728
|
recompute(t, true);
|
|
1711
|
-
} else if (t.
|
|
1729
|
+
} else if (t._ & u) {
|
|
1712
1730
|
recompute(t, true);
|
|
1713
1731
|
}
|
|
1714
1732
|
}
|
|
@@ -1717,19 +1735,19 @@ function read(e) {
|
|
|
1717
1735
|
!n.L &&
|
|
1718
1736
|
r === e &&
|
|
1719
1737
|
e.G === undefined &&
|
|
1720
|
-
e.
|
|
1738
|
+
e.me === undefined &&
|
|
1721
1739
|
M === null &&
|
|
1722
1740
|
re === null &&
|
|
1723
|
-
!
|
|
1741
|
+
!se &&
|
|
1724
1742
|
true
|
|
1725
1743
|
) {
|
|
1726
|
-
if (t &&
|
|
1727
|
-
return !t || e.
|
|
1744
|
+
if (t && J) link(e, t);
|
|
1745
|
+
return !t || e.X === x ? e.ue : e.X;
|
|
1728
1746
|
}
|
|
1729
|
-
if (t &&
|
|
1747
|
+
if (t && J) {
|
|
1730
1748
|
link(e, t);
|
|
1731
1749
|
if (r.L) {
|
|
1732
|
-
const n = e.
|
|
1750
|
+
const n = e._ & o;
|
|
1733
1751
|
if (r.o >= (n ? Q.j : q.j)) {
|
|
1734
1752
|
markNode(t);
|
|
1735
1753
|
markHeap(n ? Q : q);
|
|
@@ -1741,57 +1759,57 @@ function read(e) {
|
|
|
1741
1759
|
}
|
|
1742
1760
|
}
|
|
1743
1761
|
}
|
|
1744
|
-
if (r.be &
|
|
1745
|
-
if (t && !(
|
|
1762
|
+
if (r.be & _) {
|
|
1763
|
+
if (t && !(X && r.V && M !== r.V)) {
|
|
1746
1764
|
if (re) {
|
|
1747
1765
|
const n = r.H;
|
|
1748
1766
|
const i = findLane(re);
|
|
1749
1767
|
if (n && findLane(n) === i && !hasActiveOverride(r)) {
|
|
1750
|
-
if (!
|
|
1768
|
+
if (!J && e !== t) link(e, t);
|
|
1751
1769
|
throw r.we;
|
|
1752
1770
|
}
|
|
1753
1771
|
} else {
|
|
1754
|
-
if (!
|
|
1772
|
+
if (!J && e !== t) link(e, t);
|
|
1755
1773
|
throw r.we;
|
|
1756
1774
|
}
|
|
1757
1775
|
} else if (t && r !== e && r.be & b) {
|
|
1758
|
-
if (!
|
|
1776
|
+
if (!J && e !== t) link(e, t);
|
|
1759
1777
|
throw r.we;
|
|
1760
1778
|
} else if (!t && r.be & b) {
|
|
1761
1779
|
throw r.we;
|
|
1762
1780
|
}
|
|
1763
1781
|
}
|
|
1764
|
-
if (e.L && e.be &
|
|
1765
|
-
if (e.
|
|
1782
|
+
if (e.L && e.be & m) {
|
|
1783
|
+
if (e._e < F) {
|
|
1766
1784
|
recompute(e);
|
|
1767
1785
|
return read(e);
|
|
1768
1786
|
} else throw e.we;
|
|
1769
1787
|
}
|
|
1770
|
-
if (
|
|
1771
|
-
const n = e.
|
|
1788
|
+
if (se && t && t.ge & y) {
|
|
1789
|
+
const n = e.me;
|
|
1772
1790
|
if (n !== undefined) {
|
|
1773
|
-
const r = n ===
|
|
1774
|
-
const i = e.
|
|
1775
|
-
if (i !== r) t.
|
|
1791
|
+
const r = n === N ? undefined : n;
|
|
1792
|
+
const i = e.X !== x ? e.X : e.ue;
|
|
1793
|
+
if (i !== r) t._ |= l;
|
|
1776
1794
|
return r;
|
|
1777
1795
|
}
|
|
1778
1796
|
}
|
|
1779
1797
|
if (e.G !== undefined && e.G !== x) {
|
|
1780
|
-
if (t &&
|
|
1798
|
+
if (t && X && shouldReadStashedOptimisticValue(e)) return e.ue;
|
|
1781
1799
|
return e.G;
|
|
1782
1800
|
}
|
|
1783
|
-
if (M !== null && re !== null && !te && e.
|
|
1801
|
+
if (M !== null && re !== null && !te && e.X !== x && r === e && !e.L && t) {
|
|
1784
1802
|
M.oe.add(t);
|
|
1785
1803
|
return e.ue;
|
|
1786
1804
|
}
|
|
1787
1805
|
const i =
|
|
1788
1806
|
!t ||
|
|
1789
|
-
(re !== null && (e.G !== undefined || e.H || (r === e &&
|
|
1790
|
-
e.
|
|
1791
|
-
(
|
|
1807
|
+
(re !== null && (e.G !== undefined || e.H || (r === e && X) || !!(r.be & _))) ||
|
|
1808
|
+
e.X === x ||
|
|
1809
|
+
(X && e.V && M !== e.V)
|
|
1792
1810
|
? e.ue
|
|
1793
|
-
: e.
|
|
1794
|
-
if (!t && r === e && typeof n.L === "function" && e.
|
|
1811
|
+
: e.X;
|
|
1812
|
+
if (!t && r === e && typeof n.L === "function" && e.ge & g && !(r.be & _) && !e.O) {
|
|
1795
1813
|
unobserved(e);
|
|
1796
1814
|
}
|
|
1797
1815
|
return i;
|
|
@@ -1800,7 +1818,7 @@ function setSignal(e, t) {
|
|
|
1800
1818
|
if (e.V && M !== e.V) z.initTransition(e.V);
|
|
1801
1819
|
const n = e.G !== undefined && !K;
|
|
1802
1820
|
const r = e.G !== undefined && e.G !== x;
|
|
1803
|
-
const i = n ? (r ? e.G : e.ue) : e.
|
|
1821
|
+
const i = n ? (r ? e.G : e.ue) : e.X === x ? e.ue : e.X;
|
|
1804
1822
|
if (typeof t === "function") t = t(i);
|
|
1805
1823
|
const s = !e.He || !e.He(i, t) || !!(e.be & b);
|
|
1806
1824
|
if (!s) {
|
|
@@ -1814,30 +1832,30 @@ function setSignal(e, t) {
|
|
|
1814
1832
|
const n = e.G === x;
|
|
1815
1833
|
if (!n) z.initTransition(resolveTransition(e));
|
|
1816
1834
|
if (n) {
|
|
1817
|
-
e.
|
|
1818
|
-
z
|
|
1835
|
+
e.X = e.ue;
|
|
1836
|
+
z.$.push(e);
|
|
1819
1837
|
}
|
|
1820
1838
|
e.B = true;
|
|
1821
1839
|
const r = getOrCreateLane(e);
|
|
1822
1840
|
e.H = r;
|
|
1823
1841
|
e.G = t;
|
|
1824
1842
|
} else {
|
|
1825
|
-
if (e.
|
|
1826
|
-
e.
|
|
1843
|
+
if (e.X === x) queuePendingNode(e);
|
|
1844
|
+
e.X = t;
|
|
1827
1845
|
}
|
|
1828
1846
|
if (e.Qe) updatePendingSignal(e);
|
|
1829
1847
|
if (e.qe) {
|
|
1830
1848
|
setSignal(e.qe, t);
|
|
1831
1849
|
}
|
|
1832
|
-
e.
|
|
1850
|
+
e._e = F;
|
|
1833
1851
|
insertSubs(e, n);
|
|
1834
1852
|
schedule();
|
|
1835
1853
|
return t;
|
|
1836
1854
|
}
|
|
1837
1855
|
function suppressComputedRecompute(e) {
|
|
1838
|
-
deleteFromHeap(e, e.
|
|
1839
|
-
if (!(e.
|
|
1840
|
-
e.
|
|
1856
|
+
deleteFromHeap(e, e._ & o ? Q : q);
|
|
1857
|
+
if (!(e._ & a) && e.X === x) queuePendingNode(e);
|
|
1858
|
+
e._ = (e._ & -4) | a;
|
|
1841
1859
|
}
|
|
1842
1860
|
function setMemo(e, t) {
|
|
1843
1861
|
const n = setSignal(e, t);
|
|
@@ -1846,14 +1864,14 @@ function setMemo(e, t) {
|
|
|
1846
1864
|
}
|
|
1847
1865
|
function runWithOwner(e, t) {
|
|
1848
1866
|
const n = ne;
|
|
1849
|
-
const r =
|
|
1867
|
+
const r = J;
|
|
1850
1868
|
ne = e;
|
|
1851
|
-
|
|
1869
|
+
J = false;
|
|
1852
1870
|
try {
|
|
1853
1871
|
return t();
|
|
1854
1872
|
} finally {
|
|
1855
1873
|
ne = n;
|
|
1856
|
-
|
|
1874
|
+
J = r;
|
|
1857
1875
|
}
|
|
1858
1876
|
}
|
|
1859
1877
|
function getPendingSignal(e) {
|
|
@@ -1866,14 +1884,24 @@ function getPendingSignal(e) {
|
|
|
1866
1884
|
}
|
|
1867
1885
|
return e.Qe;
|
|
1868
1886
|
}
|
|
1887
|
+
function collectPendingSources(e) {
|
|
1888
|
+
ie?.add(e);
|
|
1889
|
+
const t = e.I || e;
|
|
1890
|
+
if (t !== e) ie?.add(t);
|
|
1891
|
+
}
|
|
1869
1892
|
function computePendingState(e) {
|
|
1870
1893
|
const t = e;
|
|
1871
1894
|
const n = e.I;
|
|
1872
|
-
if (
|
|
1873
|
-
|
|
1895
|
+
if (e.T) {
|
|
1896
|
+
const n = e.T;
|
|
1897
|
+
if (n.be & _ && !(n.be & b)) return true;
|
|
1898
|
+
return e.X !== x && !(t.be & b);
|
|
1899
|
+
}
|
|
1900
|
+
if (n && e.X !== x) {
|
|
1901
|
+
return !n.ke && !(n.be & _);
|
|
1874
1902
|
}
|
|
1875
1903
|
if (e.G !== undefined && e.G !== x) {
|
|
1876
|
-
if (t.be &
|
|
1904
|
+
if (t.be & _ && !(t.be & b)) return true;
|
|
1877
1905
|
if (e.T) {
|
|
1878
1906
|
const t = e.H ? findLane(e.H) : null;
|
|
1879
1907
|
return !!(t && t.F.size > 0);
|
|
@@ -1883,8 +1911,8 @@ function computePendingState(e) {
|
|
|
1883
1911
|
if (e.G !== undefined && e.G === x && !e.T) {
|
|
1884
1912
|
return false;
|
|
1885
1913
|
}
|
|
1886
|
-
if (e.
|
|
1887
|
-
return !!(t.be &
|
|
1914
|
+
if (e.X !== x && !(t.be & b)) return true;
|
|
1915
|
+
return !!(t.be & _ && !(t.be & b));
|
|
1888
1916
|
}
|
|
1889
1917
|
function updatePendingSignal(e) {
|
|
1890
1918
|
if (e.Qe) {
|
|
@@ -1908,25 +1936,25 @@ function getLatestValueComputed(e) {
|
|
|
1908
1936
|
if (!e.qe) {
|
|
1909
1937
|
const t = te;
|
|
1910
1938
|
te = false;
|
|
1911
|
-
const n =
|
|
1912
|
-
|
|
1939
|
+
const n = Z;
|
|
1940
|
+
Z = false;
|
|
1913
1941
|
const r = ne;
|
|
1914
1942
|
ne = null;
|
|
1915
1943
|
e.qe = optimisticComputed(() => read(e));
|
|
1916
1944
|
e.qe.T = e;
|
|
1917
1945
|
ne = r;
|
|
1918
|
-
|
|
1946
|
+
Z = n;
|
|
1919
1947
|
te = t;
|
|
1920
1948
|
}
|
|
1921
1949
|
return e.qe;
|
|
1922
1950
|
}
|
|
1923
1951
|
function staleValues(e, t = true) {
|
|
1924
|
-
const n =
|
|
1925
|
-
|
|
1952
|
+
const n = X;
|
|
1953
|
+
X = t;
|
|
1926
1954
|
try {
|
|
1927
1955
|
return e();
|
|
1928
1956
|
} finally {
|
|
1929
|
-
|
|
1957
|
+
X = n;
|
|
1930
1958
|
}
|
|
1931
1959
|
}
|
|
1932
1960
|
function latest(e) {
|
|
@@ -1939,38 +1967,57 @@ function latest(e) {
|
|
|
1939
1967
|
}
|
|
1940
1968
|
}
|
|
1941
1969
|
function isPending(e) {
|
|
1942
|
-
const t =
|
|
1970
|
+
const t = Z;
|
|
1943
1971
|
const n = ee;
|
|
1944
|
-
|
|
1972
|
+
const r = ie;
|
|
1973
|
+
Z = true;
|
|
1945
1974
|
ee = false;
|
|
1975
|
+
ie = new Set();
|
|
1976
|
+
const collectPending = () => {
|
|
1977
|
+
Z = false;
|
|
1978
|
+
try {
|
|
1979
|
+
ie.forEach(e => {
|
|
1980
|
+
if (read(getPendingSignal(e))) ee = true;
|
|
1981
|
+
});
|
|
1982
|
+
} finally {
|
|
1983
|
+
Z = true;
|
|
1984
|
+
}
|
|
1985
|
+
};
|
|
1946
1986
|
try {
|
|
1947
1987
|
e();
|
|
1988
|
+
collectPending();
|
|
1948
1989
|
return ee;
|
|
1949
|
-
} catch {
|
|
1990
|
+
} catch (e) {
|
|
1991
|
+
collectPending();
|
|
1992
|
+
if (e instanceof NotReadyError) {
|
|
1993
|
+
if (ee && !(e.source?.be & b)) return true;
|
|
1994
|
+
if (ne) throw e;
|
|
1995
|
+
}
|
|
1950
1996
|
return ee;
|
|
1951
1997
|
} finally {
|
|
1952
|
-
|
|
1998
|
+
Z = t;
|
|
1953
1999
|
ee = n;
|
|
2000
|
+
ie = r;
|
|
1954
2001
|
}
|
|
1955
2002
|
}
|
|
1956
2003
|
function refresh(e) {
|
|
1957
|
-
let t =
|
|
1958
|
-
|
|
2004
|
+
let t = Y;
|
|
2005
|
+
Y = true;
|
|
1959
2006
|
try {
|
|
1960
2007
|
const t = e?.[j];
|
|
1961
2008
|
if (false && !t);
|
|
1962
|
-
if (t && typeof t.L === "function" && !(t.
|
|
2009
|
+
if (t && typeof t.L === "function" && !(t._ & u)) {
|
|
1963
2010
|
recompute(t);
|
|
1964
2011
|
}
|
|
1965
2012
|
} finally {
|
|
1966
|
-
|
|
2013
|
+
Y = t;
|
|
1967
2014
|
if (!t) {
|
|
1968
2015
|
schedule();
|
|
1969
2016
|
}
|
|
1970
2017
|
}
|
|
1971
2018
|
}
|
|
1972
2019
|
function isRefreshing() {
|
|
1973
|
-
return
|
|
2020
|
+
return Y;
|
|
1974
2021
|
}
|
|
1975
2022
|
function createContext(e, t) {
|
|
1976
2023
|
return { id: Symbol(t), defaultValue: e };
|
|
@@ -2002,15 +2049,15 @@ function effect(e, t, n, r) {
|
|
|
2002
2049
|
const s = createEffectNode(e, t, n, i ? v : O, notifyEffectStatus, r);
|
|
2003
2050
|
recompute(s, true);
|
|
2004
2051
|
!r?.defer &&
|
|
2005
|
-
(s
|
|
2052
|
+
(s.Z === v || r?.schedule ? s.te.enqueue(s.Z, runEffect.bind(null, s)) : runEffect(s));
|
|
2006
2053
|
}
|
|
2007
2054
|
function notifyEffectStatus(e, t) {
|
|
2008
2055
|
const n = e !== undefined ? e : this.be;
|
|
2009
2056
|
const r = t !== undefined ? t : this.we;
|
|
2010
|
-
if (n &
|
|
2057
|
+
if (n & m) {
|
|
2011
2058
|
let e = r;
|
|
2012
|
-
this.te.notify(this,
|
|
2013
|
-
if (this
|
|
2059
|
+
this.te.notify(this, _, 0);
|
|
2060
|
+
if (this.Z === v) {
|
|
2014
2061
|
try {
|
|
2015
2062
|
return this.Ke
|
|
2016
2063
|
? this.Ke(e, () => {
|
|
@@ -2022,13 +2069,13 @@ function notifyEffectStatus(e, t) {
|
|
|
2022
2069
|
e = t;
|
|
2023
2070
|
}
|
|
2024
2071
|
}
|
|
2025
|
-
if (!this.te.notify(this,
|
|
2026
|
-
} else if (this
|
|
2027
|
-
this.te.notify(this,
|
|
2072
|
+
if (!this.te.notify(this, m, m)) throw e;
|
|
2073
|
+
} else if (this.Z === O) {
|
|
2074
|
+
this.te.notify(this, _ | m, n, r);
|
|
2028
2075
|
}
|
|
2029
2076
|
}
|
|
2030
2077
|
function runEffect(e) {
|
|
2031
|
-
if (!e.ee || e.
|
|
2078
|
+
if (!e.ee || e._ & u) return;
|
|
2032
2079
|
e.Be?.();
|
|
2033
2080
|
e.Be = undefined;
|
|
2034
2081
|
try {
|
|
@@ -2041,8 +2088,8 @@ function runEffect(e) {
|
|
|
2041
2088
|
}
|
|
2042
2089
|
} catch (t) {
|
|
2043
2090
|
e.we = new StatusError(e, t);
|
|
2044
|
-
e.be |=
|
|
2045
|
-
if (!e.te.notify(e,
|
|
2091
|
+
e.be |= m;
|
|
2092
|
+
if (!e.te.notify(e, m, m)) throw t;
|
|
2046
2093
|
} finally {
|
|
2047
2094
|
e.De = e.ue;
|
|
2048
2095
|
e.ee = false;
|
|
@@ -2051,7 +2098,7 @@ function runEffect(e) {
|
|
|
2051
2098
|
GlobalQueue.he = runEffect;
|
|
2052
2099
|
function trackedEffect(e, t) {
|
|
2053
2100
|
const run = () => {
|
|
2054
|
-
if (!n.ee || n.
|
|
2101
|
+
if (!n.ee || n._ & u) return;
|
|
2055
2102
|
try {
|
|
2056
2103
|
n.ee = false;
|
|
2057
2104
|
recompute(n);
|
|
@@ -2068,15 +2115,15 @@ function trackedEffect(e, t) {
|
|
|
2068
2115
|
{ ...t, lazy: true }
|
|
2069
2116
|
);
|
|
2070
2117
|
n.Be = undefined;
|
|
2071
|
-
n.
|
|
2118
|
+
n.ge = (n.ge & ~g) | S;
|
|
2072
2119
|
n.ee = true;
|
|
2073
|
-
n
|
|
2120
|
+
n.Z = P;
|
|
2074
2121
|
n.Fe = (e, t) => {
|
|
2075
2122
|
const r = e !== undefined ? e : n.be;
|
|
2076
|
-
if (r &
|
|
2077
|
-
n.te.notify(n,
|
|
2123
|
+
if (r & m) {
|
|
2124
|
+
n.te.notify(n, _, 0);
|
|
2078
2125
|
const e = t !== undefined ? t : n.we;
|
|
2079
|
-
if (!n.te.notify(n,
|
|
2126
|
+
if (!n.te.notify(n, m, m)) throw e;
|
|
2080
2127
|
}
|
|
2081
2128
|
};
|
|
2082
2129
|
n.ne = run;
|
|
@@ -2138,7 +2185,7 @@ function accessor(e) {
|
|
|
2138
2185
|
function createSignal(e, t) {
|
|
2139
2186
|
if (typeof e === "function") {
|
|
2140
2187
|
const n = computed(e, t);
|
|
2141
|
-
n.
|
|
2188
|
+
n.ge &= ~g;
|
|
2142
2189
|
return [accessor(n), setMemo.bind(null, n)];
|
|
2143
2190
|
}
|
|
2144
2191
|
const n = signal(e, t);
|
|
@@ -2195,7 +2242,7 @@ function resolve(e) {
|
|
|
2195
2242
|
function createOptimistic(e, t) {
|
|
2196
2243
|
if (typeof e === "function") {
|
|
2197
2244
|
const n = optimisticComputed(e, t);
|
|
2198
|
-
n.
|
|
2245
|
+
n.ge &= ~g;
|
|
2199
2246
|
return [accessor(n), setSignal.bind(null, n)];
|
|
2200
2247
|
}
|
|
2201
2248
|
const n = optimisticSignal(e, t);
|
|
@@ -2203,7 +2250,7 @@ function createOptimistic(e, t) {
|
|
|
2203
2250
|
}
|
|
2204
2251
|
function onSettled(e) {
|
|
2205
2252
|
const t = getOwner();
|
|
2206
|
-
t && !(t.
|
|
2253
|
+
t && !(t.ge & S)
|
|
2207
2254
|
? createTrackedEffect(() => untrack(e), undefined)
|
|
2208
2255
|
: z.enqueue(v, () => {
|
|
2209
2256
|
const t = e();
|
|
@@ -2211,7 +2258,7 @@ function onSettled(e) {
|
|
|
2211
2258
|
});
|
|
2212
2259
|
}
|
|
2213
2260
|
function unwrap(e) {
|
|
2214
|
-
return e?.[le]?.[
|
|
2261
|
+
return e?.[le]?.[ye] ?? e;
|
|
2215
2262
|
}
|
|
2216
2263
|
function getOverrideValue(e, t, n, r) {
|
|
2217
2264
|
if (r && n in r) return r[n];
|
|
@@ -2225,109 +2272,109 @@ function getAllKeys(e, t, n) {
|
|
|
2225
2272
|
function applyState(e, t, n) {
|
|
2226
2273
|
const r = t?.[le];
|
|
2227
2274
|
if (!r) return;
|
|
2228
|
-
if (r[
|
|
2275
|
+
if (r[pe] || r[he]) {
|
|
2229
2276
|
applyStateSlow(e, r, n);
|
|
2230
2277
|
} else {
|
|
2231
2278
|
applyStateFast(e, r, n);
|
|
2232
2279
|
}
|
|
2233
2280
|
}
|
|
2234
2281
|
function applyStateFast(e, t, n) {
|
|
2235
|
-
const r = t[
|
|
2282
|
+
const r = t[de];
|
|
2236
2283
|
if (e === r) return;
|
|
2237
|
-
(t[
|
|
2238
|
-
t[
|
|
2284
|
+
(t[_e] || Oe).set(e, t[ce]);
|
|
2285
|
+
t[de] = e;
|
|
2239
2286
|
if (Array.isArray(r)) {
|
|
2240
2287
|
let i = false;
|
|
2241
2288
|
const s = r.length;
|
|
2242
2289
|
if (e.length && s && e[0] && n(e[0]) != null) {
|
|
2243
|
-
let o, u,
|
|
2290
|
+
let o, u, f, l, c, a, d, p;
|
|
2244
2291
|
for (
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2292
|
+
f = 0, l = Math.min(s, e.length);
|
|
2293
|
+
f < l && ((a = r[f]) === e[f] || (a && e[f] && n(a) === n(e[f])));
|
|
2294
|
+
f++
|
|
2248
2295
|
) {
|
|
2249
|
-
applyState(e[
|
|
2296
|
+
applyState(e[f], wrap(a, t), n);
|
|
2250
2297
|
}
|
|
2251
2298
|
const h = new Array(e.length),
|
|
2252
|
-
|
|
2299
|
+
y = new Map();
|
|
2253
2300
|
for (
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2301
|
+
l = s - 1, c = e.length - 1;
|
|
2302
|
+
l >= f && c >= f && ((a = r[l]) === e[c] || (a && e[c] && n(a) === n(e[c])));
|
|
2303
|
+
l--, c--
|
|
2257
2304
|
) {
|
|
2258
2305
|
h[c] = a;
|
|
2259
2306
|
}
|
|
2260
|
-
if (
|
|
2261
|
-
for (u =
|
|
2307
|
+
if (f > c || f > l) {
|
|
2308
|
+
for (u = f; u <= c; u++) {
|
|
2262
2309
|
i = true;
|
|
2263
|
-
t[
|
|
2310
|
+
t[ye][u] && setSignal(t[ye][u], wrap(e[u], t));
|
|
2264
2311
|
}
|
|
2265
2312
|
for (; u < e.length; u++) {
|
|
2266
2313
|
i = true;
|
|
2267
2314
|
const r = wrap(h[u], t);
|
|
2268
|
-
t[
|
|
2315
|
+
t[ye][u] && setSignal(t[ye][u], r);
|
|
2269
2316
|
applyState(e[u], r, n);
|
|
2270
2317
|
}
|
|
2271
|
-
i && t[
|
|
2272
|
-
s !== e.length && t[
|
|
2318
|
+
i && t[ye][fe] && setSignal(t[ye][fe], void 0);
|
|
2319
|
+
s !== e.length && t[ye].length && setSignal(t[ye].length, e.length);
|
|
2273
2320
|
return;
|
|
2274
2321
|
}
|
|
2275
2322
|
d = new Array(c + 1);
|
|
2276
|
-
for (u = c; u >=
|
|
2323
|
+
for (u = c; u >= f; u--) {
|
|
2277
2324
|
a = e[u];
|
|
2278
2325
|
p = a ? n(a) : a;
|
|
2279
|
-
o =
|
|
2326
|
+
o = y.get(p);
|
|
2280
2327
|
d[u] = o === undefined ? -1 : o;
|
|
2281
|
-
|
|
2328
|
+
y.set(p, u);
|
|
2282
2329
|
}
|
|
2283
|
-
for (o =
|
|
2330
|
+
for (o = f; o <= l; o++) {
|
|
2284
2331
|
a = r[o];
|
|
2285
2332
|
p = a ? n(a) : a;
|
|
2286
|
-
u =
|
|
2333
|
+
u = y.get(p);
|
|
2287
2334
|
if (u !== undefined && u !== -1) {
|
|
2288
2335
|
h[u] = a;
|
|
2289
2336
|
u = d[u];
|
|
2290
|
-
|
|
2337
|
+
y.set(p, u);
|
|
2291
2338
|
}
|
|
2292
2339
|
}
|
|
2293
|
-
for (u =
|
|
2340
|
+
for (u = f; u < e.length; u++) {
|
|
2294
2341
|
if (u in h) {
|
|
2295
2342
|
const r = wrap(h[u], t);
|
|
2296
|
-
t[
|
|
2343
|
+
t[ye][u] && setSignal(t[ye][u], r);
|
|
2297
2344
|
applyState(e[u], r, n);
|
|
2298
|
-
} else t[
|
|
2345
|
+
} else t[ye][u] && setSignal(t[ye][u], wrap(e[u], t));
|
|
2299
2346
|
}
|
|
2300
|
-
if (
|
|
2347
|
+
if (f < e.length) i = true;
|
|
2301
2348
|
} else if (e.length) {
|
|
2302
2349
|
for (let i = 0, s = e.length; i < s; i++) {
|
|
2303
2350
|
const s = r[i];
|
|
2304
|
-
isWrappable(s) ? applyState(e[i], wrap(s, t), n) : t[
|
|
2351
|
+
isWrappable(s) ? applyState(e[i], wrap(s, t), n) : t[ye][i] && setSignal(t[ye][i], e[i]);
|
|
2305
2352
|
}
|
|
2306
2353
|
}
|
|
2307
2354
|
if (s !== e.length) {
|
|
2308
2355
|
i = true;
|
|
2309
|
-
t[
|
|
2356
|
+
t[ye].length && setSignal(t[ye].length, e.length);
|
|
2310
2357
|
}
|
|
2311
|
-
i && t[
|
|
2358
|
+
i && t[ye][fe] && setSignal(t[ye][fe], void 0);
|
|
2312
2359
|
return;
|
|
2313
2360
|
}
|
|
2314
|
-
let i = t[
|
|
2361
|
+
let i = t[ye];
|
|
2315
2362
|
if (i) {
|
|
2316
|
-
const s = i[
|
|
2363
|
+
const s = i[fe];
|
|
2317
2364
|
const o = s ? getAllKeys(r, undefined, e) : Object.keys(i);
|
|
2318
|
-
for (let u = 0,
|
|
2319
|
-
const
|
|
2320
|
-
const
|
|
2321
|
-
const c = unwrap(r[
|
|
2322
|
-
let a = unwrap(e[
|
|
2365
|
+
for (let u = 0, f = o.length; u < f; u++) {
|
|
2366
|
+
const f = o[u];
|
|
2367
|
+
const l = i[f];
|
|
2368
|
+
const c = unwrap(r[f]);
|
|
2369
|
+
let a = unwrap(e[f]);
|
|
2323
2370
|
if (c === a) continue;
|
|
2324
2371
|
if (!c || !isWrappable(c) || !isWrappable(a) || (n(c) != null && n(c) !== n(a))) {
|
|
2325
2372
|
s && setSignal(s, void 0);
|
|
2326
|
-
|
|
2373
|
+
l && setSignal(l, isWrappable(a) ? wrap(a, t) : a);
|
|
2327
2374
|
} else applyState(a, wrap(c, t), n);
|
|
2328
2375
|
}
|
|
2329
2376
|
}
|
|
2330
|
-
if ((i = t[
|
|
2377
|
+
if ((i = t[Se])) {
|
|
2331
2378
|
const t = Object.keys(i);
|
|
2332
2379
|
for (let n = 0, r = t.length; n < r; n++) {
|
|
2333
2380
|
const r = t[n];
|
|
@@ -2336,18 +2383,18 @@ function applyStateFast(e, t, n) {
|
|
|
2336
2383
|
}
|
|
2337
2384
|
}
|
|
2338
2385
|
function applyStateSlow(e, t, n) {
|
|
2339
|
-
const r = t[
|
|
2340
|
-
const i = t[
|
|
2341
|
-
const s = t[
|
|
2342
|
-
let o = t[
|
|
2343
|
-
(t[
|
|
2344
|
-
t[
|
|
2345
|
-
t[
|
|
2386
|
+
const r = t[de];
|
|
2387
|
+
const i = t[pe];
|
|
2388
|
+
const s = t[he];
|
|
2389
|
+
let o = t[ye];
|
|
2390
|
+
(t[_e] || Oe).set(e, t[ce]);
|
|
2391
|
+
t[de] = e;
|
|
2392
|
+
t[pe] = undefined;
|
|
2346
2393
|
if (Array.isArray(r)) {
|
|
2347
2394
|
let o = false;
|
|
2348
2395
|
const u = getOverrideValue(r, i, "length", s);
|
|
2349
2396
|
if (e.length && u && e[0] && n(e[0]) != null) {
|
|
2350
|
-
let
|
|
2397
|
+
let f, l, c, a, d, p, h, y;
|
|
2351
2398
|
for (
|
|
2352
2399
|
c = 0, a = Math.min(u, e.length);
|
|
2353
2400
|
c < a && ((p = getOverrideValue(r, i, c, s)) === e[c] || (p && e[c] && n(p) === n(e[c])));
|
|
@@ -2356,7 +2403,7 @@ function applyStateSlow(e, t, n) {
|
|
|
2356
2403
|
applyState(e[c], wrap(p, t), n);
|
|
2357
2404
|
}
|
|
2358
2405
|
const S = new Array(e.length),
|
|
2359
|
-
|
|
2406
|
+
g = new Map();
|
|
2360
2407
|
for (
|
|
2361
2408
|
a = u - 1, d = e.length - 1;
|
|
2362
2409
|
a >= c &&
|
|
@@ -2367,64 +2414,64 @@ function applyStateSlow(e, t, n) {
|
|
|
2367
2414
|
S[d] = p;
|
|
2368
2415
|
}
|
|
2369
2416
|
if (c > d || c > a) {
|
|
2370
|
-
for (
|
|
2417
|
+
for (l = c; l <= d; l++) {
|
|
2371
2418
|
o = true;
|
|
2372
|
-
t[
|
|
2419
|
+
t[ye][l] && setSignal(t[ye][l], wrap(e[l], t));
|
|
2373
2420
|
}
|
|
2374
|
-
for (;
|
|
2421
|
+
for (; l < e.length; l++) {
|
|
2375
2422
|
o = true;
|
|
2376
|
-
const r = wrap(S[
|
|
2377
|
-
t[
|
|
2378
|
-
applyState(e[
|
|
2423
|
+
const r = wrap(S[l], t);
|
|
2424
|
+
t[ye][l] && setSignal(t[ye][l], r);
|
|
2425
|
+
applyState(e[l], r, n);
|
|
2379
2426
|
}
|
|
2380
|
-
o && t[
|
|
2381
|
-
u !== e.length && t[
|
|
2427
|
+
o && t[ye][fe] && setSignal(t[ye][fe], void 0);
|
|
2428
|
+
u !== e.length && t[ye].length && setSignal(t[ye].length, e.length);
|
|
2382
2429
|
return;
|
|
2383
2430
|
}
|
|
2384
2431
|
h = new Array(d + 1);
|
|
2385
|
-
for (
|
|
2386
|
-
p = e[
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
h[
|
|
2390
|
-
|
|
2391
|
-
}
|
|
2392
|
-
for (
|
|
2393
|
-
p = getOverrideValue(r, i,
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
if (
|
|
2397
|
-
S[
|
|
2398
|
-
|
|
2399
|
-
|
|
2432
|
+
for (l = d; l >= c; l--) {
|
|
2433
|
+
p = e[l];
|
|
2434
|
+
y = p ? n(p) : p;
|
|
2435
|
+
f = g.get(y);
|
|
2436
|
+
h[l] = f === undefined ? -1 : f;
|
|
2437
|
+
g.set(y, l);
|
|
2438
|
+
}
|
|
2439
|
+
for (f = c; f <= a; f++) {
|
|
2440
|
+
p = getOverrideValue(r, i, f, s);
|
|
2441
|
+
y = p ? n(p) : p;
|
|
2442
|
+
l = g.get(y);
|
|
2443
|
+
if (l !== undefined && l !== -1) {
|
|
2444
|
+
S[l] = p;
|
|
2445
|
+
l = h[l];
|
|
2446
|
+
g.set(y, l);
|
|
2400
2447
|
}
|
|
2401
2448
|
}
|
|
2402
|
-
for (
|
|
2403
|
-
if (
|
|
2404
|
-
const r = wrap(S[
|
|
2405
|
-
t[
|
|
2406
|
-
applyState(e[
|
|
2407
|
-
} else t[
|
|
2449
|
+
for (l = c; l < e.length; l++) {
|
|
2450
|
+
if (l in S) {
|
|
2451
|
+
const r = wrap(S[l], t);
|
|
2452
|
+
t[ye][l] && setSignal(t[ye][l], r);
|
|
2453
|
+
applyState(e[l], r, n);
|
|
2454
|
+
} else t[ye][l] && setSignal(t[ye][l], wrap(e[l], t));
|
|
2408
2455
|
}
|
|
2409
2456
|
if (c < e.length) o = true;
|
|
2410
2457
|
} else if (e.length) {
|
|
2411
2458
|
for (let o = 0, u = e.length; o < u; o++) {
|
|
2412
2459
|
const u = getOverrideValue(r, i, o, s);
|
|
2413
|
-
isWrappable(u) ? applyState(e[o], wrap(u, t), n) : t[
|
|
2460
|
+
isWrappable(u) ? applyState(e[o], wrap(u, t), n) : t[ye][o] && setSignal(t[ye][o], e[o]);
|
|
2414
2461
|
}
|
|
2415
2462
|
}
|
|
2416
2463
|
if (u !== e.length) {
|
|
2417
2464
|
o = true;
|
|
2418
|
-
t[
|
|
2465
|
+
t[ye].length && setSignal(t[ye].length, e.length);
|
|
2419
2466
|
}
|
|
2420
|
-
o && t[
|
|
2467
|
+
o && t[ye][fe] && setSignal(t[ye][fe], void 0);
|
|
2421
2468
|
return;
|
|
2422
2469
|
}
|
|
2423
2470
|
if (o) {
|
|
2424
|
-
const u = o[
|
|
2425
|
-
const
|
|
2426
|
-
for (let
|
|
2427
|
-
const c = l
|
|
2471
|
+
const u = o[fe];
|
|
2472
|
+
const f = u ? getAllKeys(r, i, e) : Object.keys(o);
|
|
2473
|
+
for (let l = 0, c = f.length; l < c; l++) {
|
|
2474
|
+
const c = f[l];
|
|
2428
2475
|
const a = o[c];
|
|
2429
2476
|
const d = unwrap(getOverrideValue(r, i, c, s));
|
|
2430
2477
|
let p = unwrap(e[c]);
|
|
@@ -2435,7 +2482,7 @@ function applyStateSlow(e, t, n) {
|
|
|
2435
2482
|
} else applyState(p, wrap(d, t), n);
|
|
2436
2483
|
}
|
|
2437
2484
|
}
|
|
2438
|
-
if ((o = t[
|
|
2485
|
+
if ((o = t[Se])) {
|
|
2439
2486
|
const t = Object.keys(o);
|
|
2440
2487
|
for (let n = 0, r = t.length; n < r; n++) {
|
|
2441
2488
|
const r = t[n];
|
|
@@ -2457,8 +2504,8 @@ function createProjectionInternal(e, t, n) {
|
|
|
2457
2504
|
let r;
|
|
2458
2505
|
const i = new WeakMap();
|
|
2459
2506
|
const wrapper = e => {
|
|
2460
|
-
e[
|
|
2461
|
-
e[
|
|
2507
|
+
e[we] = wrapProjection;
|
|
2508
|
+
e[_e] = i;
|
|
2462
2509
|
Object.defineProperty(e, me, {
|
|
2463
2510
|
get() {
|
|
2464
2511
|
return r;
|
|
@@ -2468,8 +2515,8 @@ function createProjectionInternal(e, t, n) {
|
|
|
2468
2515
|
};
|
|
2469
2516
|
const wrapProjection = e => {
|
|
2470
2517
|
if (i.has(e)) return i.get(e);
|
|
2471
|
-
if (e[le]?.[
|
|
2472
|
-
const t = createStoreProxy(e,
|
|
2518
|
+
if (e[le]?.[we] === wrapProjection) return e;
|
|
2519
|
+
const t = createStoreProxy(e, xe, wrapper);
|
|
2473
2520
|
i.set(e, t);
|
|
2474
2521
|
return t;
|
|
2475
2522
|
};
|
|
@@ -2478,7 +2525,7 @@ function createProjectionInternal(e, t, n) {
|
|
|
2478
2525
|
if (!r) r = getOwner();
|
|
2479
2526
|
runProjectionComputed(s, e, n?.key || "id");
|
|
2480
2527
|
}, undefined);
|
|
2481
|
-
r.
|
|
2528
|
+
r.ge &= ~g;
|
|
2482
2529
|
return { store: s, node: r };
|
|
2483
2530
|
}
|
|
2484
2531
|
function createProjection(e, t, n) {
|
|
@@ -2557,56 +2604,66 @@ function createWriteTraps(e) {
|
|
|
2557
2604
|
};
|
|
2558
2605
|
return t;
|
|
2559
2606
|
}
|
|
2560
|
-
const
|
|
2607
|
+
const fe = Symbol(0),
|
|
2561
2608
|
le = Symbol(0),
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
const
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2609
|
+
ce = Symbol(0),
|
|
2610
|
+
ae = Symbol(0);
|
|
2611
|
+
const de = "v",
|
|
2612
|
+
pe = "o",
|
|
2613
|
+
he = "x",
|
|
2614
|
+
ye = "n",
|
|
2615
|
+
Se = "h",
|
|
2616
|
+
ge = "c",
|
|
2617
|
+
we = "w",
|
|
2618
|
+
_e = "l",
|
|
2572
2619
|
me = "f",
|
|
2573
|
-
|
|
2574
|
-
function createStoreProxy(e, t =
|
|
2620
|
+
be = "p";
|
|
2621
|
+
function createStoreProxy(e, t = xe, n) {
|
|
2575
2622
|
let r;
|
|
2576
2623
|
if (Array.isArray(e)) {
|
|
2577
2624
|
r = [];
|
|
2578
2625
|
r.v = e;
|
|
2579
2626
|
} else {
|
|
2580
2627
|
r = { v: e };
|
|
2581
|
-
const t = e?.[le]?.[
|
|
2628
|
+
const t = e?.[le]?.[de] ?? e;
|
|
2582
2629
|
const n = Object.getPrototypeOf(t);
|
|
2583
2630
|
if (n !== null && n !== Object.prototype) {
|
|
2584
|
-
r[
|
|
2631
|
+
r[ge] = true;
|
|
2585
2632
|
}
|
|
2586
2633
|
}
|
|
2587
2634
|
n && n(r);
|
|
2588
|
-
return (r[
|
|
2635
|
+
return (r[ce] = new Proxy(r, t));
|
|
2589
2636
|
}
|
|
2590
|
-
const
|
|
2637
|
+
const Oe = new WeakMap();
|
|
2591
2638
|
function wrap(e, t) {
|
|
2592
|
-
if (t?.[
|
|
2593
|
-
let n = e[
|
|
2594
|
-
if (!n)
|
|
2639
|
+
if (t?.[we]) return t[we](e, t);
|
|
2640
|
+
let n = e[ce] || Oe.get(e);
|
|
2641
|
+
if (!n) Oe.set(e, (n = createStoreProxy(e)));
|
|
2595
2642
|
return n;
|
|
2596
2643
|
}
|
|
2597
2644
|
function isWrappable(e) {
|
|
2598
2645
|
if (e == null || typeof e !== "object" || Object.isFrozen(e)) return false;
|
|
2599
2646
|
return typeof Node === "undefined" || !(e instanceof Node);
|
|
2600
2647
|
}
|
|
2601
|
-
let
|
|
2648
|
+
let ve = false;
|
|
2602
2649
|
function setWriteOverride(e) {
|
|
2603
|
-
|
|
2650
|
+
ve = e;
|
|
2604
2651
|
}
|
|
2605
2652
|
function writeOnly(e) {
|
|
2606
|
-
return
|
|
2653
|
+
return ve || !!Pe?.has(e);
|
|
2607
2654
|
}
|
|
2608
2655
|
function unwrapStoreValue(e) {
|
|
2609
|
-
return e?.[le]?.[
|
|
2656
|
+
return e?.[le]?.[de] ?? e;
|
|
2657
|
+
}
|
|
2658
|
+
function isPrototypePollutionKey$1(e) {
|
|
2659
|
+
return e === "__proto__" || e === "constructor" || e === "prototype";
|
|
2660
|
+
}
|
|
2661
|
+
function hasOwnStoreProperty(e, t) {
|
|
2662
|
+
const n = e[he];
|
|
2663
|
+
if (n && Object.prototype.hasOwnProperty.call(n, t) && n[t] !== ae) return true;
|
|
2664
|
+
const r = e[pe];
|
|
2665
|
+
if (r && Object.prototype.hasOwnProperty.call(r, t) && r[t] !== ae) return true;
|
|
2666
|
+
return Object.prototype.hasOwnProperty.call(unwrapStoreValue(e[de]), t);
|
|
2610
2667
|
}
|
|
2611
2668
|
function hasInheritedAccessor(e, t) {
|
|
2612
2669
|
let n = Object.getPrototypeOf(e);
|
|
@@ -2639,13 +2696,13 @@ function getNode(e, t, n, r, i = isEqual, s, o) {
|
|
|
2639
2696
|
}
|
|
2640
2697
|
if (o && t in o) {
|
|
2641
2698
|
const e = o[t];
|
|
2642
|
-
u.
|
|
2643
|
-
|
|
2699
|
+
u.me = e === undefined ? N : e;
|
|
2700
|
+
oe?.add(u);
|
|
2644
2701
|
}
|
|
2645
2702
|
return (e[t] = u);
|
|
2646
2703
|
}
|
|
2647
|
-
function trackSelf(e, t =
|
|
2648
|
-
getObserver() && read(getNode(getNodes(e,
|
|
2704
|
+
function trackSelf(e, t = fe) {
|
|
2705
|
+
getObserver() && read(getNode(getNodes(e, ye), t, undefined, e[me], false, e[be]));
|
|
2649
2706
|
}
|
|
2650
2707
|
function getKeys(e, t, n = true) {
|
|
2651
2708
|
const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
|
|
@@ -2653,102 +2710,102 @@ function getKeys(e, t, n = true) {
|
|
|
2653
2710
|
const i = new Set(r);
|
|
2654
2711
|
const s = Reflect.ownKeys(t);
|
|
2655
2712
|
for (const e of s) {
|
|
2656
|
-
if (t[e] !==
|
|
2713
|
+
if (t[e] !== ae) i.add(e);
|
|
2657
2714
|
else i.delete(e);
|
|
2658
2715
|
}
|
|
2659
2716
|
return Array.from(i);
|
|
2660
2717
|
}
|
|
2661
2718
|
function getPropertyDescriptor(e, t, n) {
|
|
2662
2719
|
if (t && n in t) {
|
|
2663
|
-
if (t[n] ===
|
|
2720
|
+
if (t[n] === ae) return void 0;
|
|
2664
2721
|
const r = Reflect.getOwnPropertyDescriptor(t, n);
|
|
2665
2722
|
if (r?.get || r?.set || !(n in e)) return r;
|
|
2666
2723
|
}
|
|
2667
2724
|
return Reflect.getOwnPropertyDescriptor(e, n);
|
|
2668
2725
|
}
|
|
2669
2726
|
function prepareStoreWrite(e, t, n) {
|
|
2670
|
-
if (e[
|
|
2727
|
+
if (e[be]) {
|
|
2671
2728
|
const t = e[me];
|
|
2672
2729
|
if (t?.V) {
|
|
2673
2730
|
z.initTransition(t.V);
|
|
2674
2731
|
}
|
|
2675
2732
|
}
|
|
2676
|
-
const r = e[
|
|
2733
|
+
const r = e[de];
|
|
2677
2734
|
const i = r[n];
|
|
2678
|
-
if (
|
|
2679
|
-
if (!e[
|
|
2680
|
-
e[
|
|
2681
|
-
|
|
2735
|
+
if (se && typeof n !== "symbol" && !((e[me]?.be ?? 0) & _)) {
|
|
2736
|
+
if (!e[C]) {
|
|
2737
|
+
e[C] = Object.create(null);
|
|
2738
|
+
oe?.add(e);
|
|
2682
2739
|
}
|
|
2683
|
-
if (!(n in e[
|
|
2684
|
-
e[
|
|
2740
|
+
if (!(n in e[C])) {
|
|
2741
|
+
e[C][n] = i;
|
|
2685
2742
|
}
|
|
2686
2743
|
}
|
|
2687
|
-
const s = e[
|
|
2688
|
-
const o = s ?
|
|
2744
|
+
const s = e[be] && !K;
|
|
2745
|
+
const o = s ? he : pe;
|
|
2689
2746
|
if (s) trackOptimisticStore(t);
|
|
2690
2747
|
return { base: i, overrideKey: o, state: r };
|
|
2691
2748
|
}
|
|
2692
2749
|
function upsertStoreNode(e, t, n, r, i) {
|
|
2693
2750
|
if (t[n]) return t[n];
|
|
2694
2751
|
const s = isWrappable(r) ? wrap(r, e) : r;
|
|
2695
|
-
const o = getNode(t, n, s, e[me], isEqual, e[
|
|
2752
|
+
const o = getNode(t, n, s, e[me], isEqual, e[be], i);
|
|
2696
2753
|
registerTransientStoreNode(o);
|
|
2697
2754
|
return o;
|
|
2698
2755
|
}
|
|
2699
2756
|
function notifyStoreProperty(e, t, n, r, i, s) {
|
|
2700
|
-
const o = K || e[
|
|
2757
|
+
const o = K || e[be];
|
|
2701
2758
|
const u = n !== "delete";
|
|
2702
|
-
const
|
|
2703
|
-
if (
|
|
2704
|
-
setSignal(
|
|
2759
|
+
const f = e[Se]?.[t];
|
|
2760
|
+
if (f) {
|
|
2761
|
+
setSignal(f, u);
|
|
2705
2762
|
} else if (!o && n !== "invalidate" && s !== u) {
|
|
2706
|
-
const n = upsertStoreNode(e, getNodes(e,
|
|
2763
|
+
const n = upsertStoreNode(e, getNodes(e, Se), t, s);
|
|
2707
2764
|
setSignal(n, u);
|
|
2708
2765
|
}
|
|
2709
|
-
const
|
|
2766
|
+
const l = getNodes(e, ye);
|
|
2710
2767
|
if (n === "set") {
|
|
2711
|
-
if (
|
|
2712
|
-
setSignal(
|
|
2768
|
+
if (l[t]) {
|
|
2769
|
+
setSignal(l[t], () => (isWrappable(r) ? wrap(r, e) : r));
|
|
2713
2770
|
} else if (!o) {
|
|
2714
|
-
const n = upsertStoreNode(e,
|
|
2771
|
+
const n = upsertStoreNode(e, l, t, i, e[C]);
|
|
2715
2772
|
setSignal(n, () => (isWrappable(r) ? wrap(r, e) : r));
|
|
2716
2773
|
}
|
|
2717
2774
|
} else if (n === "invalidate") {
|
|
2718
|
-
if (
|
|
2719
|
-
setSignal(
|
|
2720
|
-
delete
|
|
2775
|
+
if (l[t]) {
|
|
2776
|
+
setSignal(l[t], {});
|
|
2777
|
+
delete l[t];
|
|
2721
2778
|
}
|
|
2722
2779
|
} else {
|
|
2723
|
-
if (
|
|
2724
|
-
setSignal(
|
|
2780
|
+
if (l[t]) {
|
|
2781
|
+
setSignal(l[t], undefined);
|
|
2725
2782
|
} else if (!o) {
|
|
2726
|
-
const n = upsertStoreNode(e,
|
|
2783
|
+
const n = upsertStoreNode(e, l, t, i, e[C]);
|
|
2727
2784
|
setSignal(n, undefined);
|
|
2728
2785
|
}
|
|
2729
2786
|
}
|
|
2730
|
-
|
|
2787
|
+
l[fe] && setSignal(l[fe], undefined);
|
|
2731
2788
|
}
|
|
2732
|
-
let
|
|
2733
|
-
const
|
|
2789
|
+
let Pe = null;
|
|
2790
|
+
const xe = {
|
|
2734
2791
|
get(e, t, n) {
|
|
2735
2792
|
if (t === le) return e;
|
|
2736
|
-
if (t ===
|
|
2793
|
+
if (t === ce) return n;
|
|
2737
2794
|
if (t === j) return e[me];
|
|
2738
|
-
if (t ===
|
|
2795
|
+
if (t === fe) {
|
|
2739
2796
|
trackSelf(e);
|
|
2740
2797
|
return n;
|
|
2741
2798
|
}
|
|
2742
|
-
const r = getNodes(e,
|
|
2799
|
+
const r = getNodes(e, ye);
|
|
2743
2800
|
const i = r[t];
|
|
2744
|
-
const s = e[
|
|
2801
|
+
const s = e[de];
|
|
2745
2802
|
if (
|
|
2746
2803
|
!i &&
|
|
2747
|
-
!e[de] &&
|
|
2748
2804
|
!e[pe] &&
|
|
2749
|
-
!e[
|
|
2750
|
-
!e[
|
|
2751
|
-
!e[
|
|
2805
|
+
!e[he] &&
|
|
2806
|
+
!e[ge] &&
|
|
2807
|
+
!e[be] &&
|
|
2808
|
+
!e[C] &&
|
|
2752
2809
|
!s[le] &&
|
|
2753
2810
|
!(t in s) &&
|
|
2754
2811
|
getObserver() &&
|
|
@@ -2756,92 +2813,94 @@ const Pe = {
|
|
|
2756
2813
|
) {
|
|
2757
2814
|
return read(getNode(r, t, undefined, e[me]));
|
|
2758
2815
|
}
|
|
2759
|
-
const o = e[
|
|
2760
|
-
const u = o || (e[
|
|
2761
|
-
const
|
|
2762
|
-
const
|
|
2816
|
+
const o = e[he] && t in e[he];
|
|
2817
|
+
const u = o || (e[pe] && t in e[pe]);
|
|
2818
|
+
const f = !!e[de][le];
|
|
2819
|
+
const l = o ? e[he] : e[pe] && t in e[pe] ? e[pe] : e[de];
|
|
2763
2820
|
if (!i) {
|
|
2764
|
-
const r = Object.getOwnPropertyDescriptor(
|
|
2821
|
+
const r = Object.getOwnPropertyDescriptor(l, t);
|
|
2765
2822
|
if (r && r.get) return r.get.call(n);
|
|
2766
|
-
if (!r && !u && e[
|
|
2767
|
-
const e = unwrapStoreValue(
|
|
2823
|
+
if (!r && !u && e[ge]) {
|
|
2824
|
+
const e = unwrapStoreValue(l);
|
|
2768
2825
|
if (hasInheritedAccessor(e, t)) {
|
|
2769
|
-
return Reflect.get(
|
|
2826
|
+
return Reflect.get(l, t, n);
|
|
2770
2827
|
}
|
|
2771
2828
|
}
|
|
2772
2829
|
}
|
|
2773
2830
|
if (writeOnly(n)) {
|
|
2831
|
+
if (isPrototypePollutionKey$1(t) && !hasOwnStoreProperty(e, t)) return undefined;
|
|
2774
2832
|
let n =
|
|
2775
|
-
i && (u || !
|
|
2776
|
-
n ===
|
|
2833
|
+
i && (u || !f) ? (i.G !== undefined && i.G !== x ? i.G : i.X !== x ? i.X : i.ue) : l[t];
|
|
2834
|
+
n === ae && (n = undefined);
|
|
2777
2835
|
if (!isWrappable(n)) return n;
|
|
2778
2836
|
const r = wrap(n, e);
|
|
2779
|
-
|
|
2837
|
+
Pe?.add(r);
|
|
2780
2838
|
return r;
|
|
2781
2839
|
}
|
|
2782
|
-
let c = i ? (u || !
|
|
2783
|
-
c ===
|
|
2840
|
+
let c = i ? (u || !f ? read(r[t]) : (read(r[t]), l[t])) : l[t];
|
|
2841
|
+
c === ae && (c = undefined);
|
|
2784
2842
|
if (!i) {
|
|
2785
|
-
if (!u && typeof c === "function" && !
|
|
2843
|
+
if (!u && typeof c === "function" && !l.hasOwnProperty(t)) {
|
|
2786
2844
|
let t;
|
|
2787
|
-
return !Array.isArray(e[
|
|
2788
|
-
? c.bind(
|
|
2845
|
+
return !Array.isArray(e[de]) && (t = Object.getPrototypeOf(e[de])) && t !== Object.prototype
|
|
2846
|
+
? c.bind(l)
|
|
2789
2847
|
: c;
|
|
2790
2848
|
} else if (getObserver()) {
|
|
2791
|
-
return read(getNode(r, t, isWrappable(c) ? wrap(c, e) : c, e[me], isEqual, e[
|
|
2849
|
+
return read(getNode(r, t, isWrappable(c) ? wrap(c, e) : c, e[me], isEqual, e[be], e[C]));
|
|
2792
2850
|
}
|
|
2793
2851
|
}
|
|
2794
2852
|
return isWrappable(c) ? wrap(c, e) : c;
|
|
2795
2853
|
},
|
|
2796
2854
|
has(e, t) {
|
|
2797
|
-
if (t ===
|
|
2855
|
+
if (t === ce || t === fe || t === "__proto__") return true;
|
|
2798
2856
|
const n =
|
|
2799
|
-
e[
|
|
2800
|
-
if (writeOnly(e[
|
|
2801
|
-
const r = getNodes(e,
|
|
2857
|
+
e[he] && t in e[he] ? e[he][t] !== ae : e[pe] && t in e[pe] ? e[pe][t] !== ae : t in e[de];
|
|
2858
|
+
if (writeOnly(e[ce])) return n;
|
|
2859
|
+
const r = getNodes(e, Se);
|
|
2802
2860
|
if (r[t]) return read(r[t]);
|
|
2803
2861
|
if (getObserver()) {
|
|
2804
|
-
return read(getNode(r, t, n, e[me], isEqual, e[
|
|
2862
|
+
return read(getNode(r, t, n, e[me], isEqual, e[be]));
|
|
2805
2863
|
}
|
|
2806
2864
|
return n;
|
|
2807
2865
|
},
|
|
2808
2866
|
set(e, t, n) {
|
|
2809
|
-
|
|
2867
|
+
if (t === "__proto__") return true;
|
|
2868
|
+
const r = e[ce];
|
|
2810
2869
|
if (writeOnly(r)) {
|
|
2811
2870
|
untrack(() => {
|
|
2812
2871
|
const { base: i, overrideKey: s, state: o } = prepareStoreWrite(e, r, t);
|
|
2813
|
-
const u = e[
|
|
2814
|
-
const
|
|
2815
|
-
e[
|
|
2816
|
-
? e[
|
|
2817
|
-
: e[
|
|
2818
|
-
? e[
|
|
2819
|
-
: t in e[
|
|
2820
|
-
const
|
|
2872
|
+
const u = e[he] && t in e[he] ? e[he][t] : e[pe] && t in e[pe] ? e[pe][t] : i;
|
|
2873
|
+
const f =
|
|
2874
|
+
e[he] && t in e[he]
|
|
2875
|
+
? e[he][t] !== ae
|
|
2876
|
+
: e[pe] && t in e[pe]
|
|
2877
|
+
? e[pe][t] !== ae
|
|
2878
|
+
: t in e[de];
|
|
2879
|
+
const l = unwrapStoreValue(n);
|
|
2821
2880
|
const c = Array.isArray(o) && t !== "length";
|
|
2822
2881
|
const a = c ? parseInt(t) + 1 : 0;
|
|
2823
2882
|
const d =
|
|
2824
2883
|
c &&
|
|
2825
|
-
(e[
|
|
2826
|
-
? e[
|
|
2827
|
-
: e[
|
|
2828
|
-
? e[
|
|
2884
|
+
(e[he] && "length" in e[he]
|
|
2885
|
+
? e[he].length
|
|
2886
|
+
: e[pe] && "length" in e[pe]
|
|
2887
|
+
? e[pe].length
|
|
2829
2888
|
: o.length);
|
|
2830
2889
|
const p = c && a > d ? a : undefined;
|
|
2831
|
-
if (u ===
|
|
2832
|
-
if (
|
|
2890
|
+
if (u === l && p === undefined) return true;
|
|
2891
|
+
if (l !== undefined && l === i && p === undefined) delete e[s]?.[t];
|
|
2833
2892
|
else {
|
|
2834
2893
|
const n = e[s] || (e[s] = Object.create(null));
|
|
2835
|
-
n[t] =
|
|
2894
|
+
n[t] = l;
|
|
2836
2895
|
if (p !== undefined) n.length = p;
|
|
2837
2896
|
}
|
|
2838
|
-
notifyStoreProperty(e, t, "set",
|
|
2897
|
+
notifyStoreProperty(e, t, "set", l, u, f);
|
|
2839
2898
|
if (Array.isArray(o) && t !== "length" && p !== undefined) {
|
|
2840
|
-
const t = getNodes(e,
|
|
2899
|
+
const t = getNodes(e, ye);
|
|
2841
2900
|
if (t.length) {
|
|
2842
2901
|
setSignal(t.length, p);
|
|
2843
|
-
} else if (!K && !e[
|
|
2844
|
-
const n = upsertStoreNode(e, t, "length", d, e[
|
|
2902
|
+
} else if (!K && !e[be]) {
|
|
2903
|
+
const n = upsertStoreNode(e, t, "length", d, e[C]);
|
|
2845
2904
|
setSignal(n, p);
|
|
2846
2905
|
}
|
|
2847
2906
|
}
|
|
@@ -2851,7 +2910,8 @@ const Pe = {
|
|
|
2851
2910
|
return true;
|
|
2852
2911
|
},
|
|
2853
2912
|
defineProperty(e, t, n) {
|
|
2854
|
-
|
|
2913
|
+
if (t === "__proto__") return true;
|
|
2914
|
+
const r = e[ce];
|
|
2855
2915
|
if (writeOnly(r)) {
|
|
2856
2916
|
untrack(() => {
|
|
2857
2917
|
const { base: i, overrideKey: s } = prepareStoreWrite(e, r, t);
|
|
@@ -2864,16 +2924,17 @@ const Pe = {
|
|
|
2864
2924
|
return true;
|
|
2865
2925
|
},
|
|
2866
2926
|
deleteProperty(e, t) {
|
|
2867
|
-
|
|
2868
|
-
const
|
|
2869
|
-
|
|
2927
|
+
if (t === "__proto__") return true;
|
|
2928
|
+
const n = e[he]?.[t] === ae;
|
|
2929
|
+
const r = e[pe]?.[t] === ae;
|
|
2930
|
+
if (writeOnly(e[ce]) && !n && !r) {
|
|
2870
2931
|
untrack(() => {
|
|
2871
|
-
const n = e[
|
|
2872
|
-
const r = n ?
|
|
2873
|
-
if (n) trackOptimisticStore(e[
|
|
2874
|
-
const i = e[
|
|
2875
|
-
if (t in e[
|
|
2876
|
-
(e[r] || (e[r] = Object.create(null)))[t] =
|
|
2932
|
+
const n = e[be] && !K;
|
|
2933
|
+
const r = n ? he : pe;
|
|
2934
|
+
if (n) trackOptimisticStore(e[ce]);
|
|
2935
|
+
const i = e[he] && t in e[he] ? e[he][t] : e[pe] && t in e[pe] ? e[pe][t] : e[de][t];
|
|
2936
|
+
if (t in e[de] || (e[pe] && t in e[pe])) {
|
|
2937
|
+
(e[r] || (e[r] = Object.create(null)))[t] = ae;
|
|
2877
2938
|
} else if (e[r] && t in e[r]) {
|
|
2878
2939
|
delete e[r][t];
|
|
2879
2940
|
} else return true;
|
|
@@ -2884,11 +2945,11 @@ const Pe = {
|
|
|
2884
2945
|
},
|
|
2885
2946
|
ownKeys(e) {
|
|
2886
2947
|
trackSelf(e);
|
|
2887
|
-
let t = getKeys(e[
|
|
2888
|
-
if (e[
|
|
2948
|
+
let t = getKeys(e[de], e[pe], false);
|
|
2949
|
+
if (e[he]) {
|
|
2889
2950
|
const n = new Set(t);
|
|
2890
|
-
for (const t of Reflect.ownKeys(e[
|
|
2891
|
-
if (e[
|
|
2951
|
+
for (const t of Reflect.ownKeys(e[he])) {
|
|
2952
|
+
if (e[he][t] !== ae) n.add(t);
|
|
2892
2953
|
else n.delete(t);
|
|
2893
2954
|
}
|
|
2894
2955
|
t = Array.from(n);
|
|
@@ -2896,27 +2957,27 @@ const Pe = {
|
|
|
2896
2957
|
return t;
|
|
2897
2958
|
},
|
|
2898
2959
|
getOwnPropertyDescriptor(e, t) {
|
|
2899
|
-
if (t ===
|
|
2900
|
-
if (e[
|
|
2901
|
-
if (e[
|
|
2902
|
-
const n = Reflect.getOwnPropertyDescriptor(e[
|
|
2903
|
-
if (n?.get || n?.set || !(t in e[
|
|
2904
|
-
const r = getPropertyDescriptor(e[
|
|
2960
|
+
if (t === ce) return { value: e[ce], writable: true, configurable: true };
|
|
2961
|
+
if (e[he] && t in e[he]) {
|
|
2962
|
+
if (e[he][t] === ae) return undefined;
|
|
2963
|
+
const n = Reflect.getOwnPropertyDescriptor(e[he], t);
|
|
2964
|
+
if (n?.get || n?.set || !(t in e[de])) return n;
|
|
2965
|
+
const r = getPropertyDescriptor(e[de], e[pe], t);
|
|
2905
2966
|
if (r) {
|
|
2906
|
-
return { ...r, value: e[
|
|
2967
|
+
return { ...r, value: e[he][t] };
|
|
2907
2968
|
}
|
|
2908
|
-
return { value: e[
|
|
2969
|
+
return { value: e[he][t], writable: true, enumerable: true, configurable: true };
|
|
2909
2970
|
}
|
|
2910
|
-
return getPropertyDescriptor(e[
|
|
2971
|
+
return getPropertyDescriptor(e[de], e[pe], t);
|
|
2911
2972
|
},
|
|
2912
2973
|
getPrototypeOf(e) {
|
|
2913
|
-
return Object.getPrototypeOf(e[
|
|
2974
|
+
return Object.getPrototypeOf(e[de]);
|
|
2914
2975
|
}
|
|
2915
2976
|
};
|
|
2916
2977
|
function storeSetter(e, t) {
|
|
2917
|
-
const n =
|
|
2918
|
-
|
|
2919
|
-
|
|
2978
|
+
const n = Pe;
|
|
2979
|
+
Pe = new Set();
|
|
2980
|
+
Pe.add(e);
|
|
2920
2981
|
try {
|
|
2921
2982
|
const n = t(e);
|
|
2922
2983
|
if (n !== e && n !== undefined) {
|
|
@@ -2932,8 +2993,8 @@ function storeSetter(e, t) {
|
|
|
2932
2993
|
}
|
|
2933
2994
|
}
|
|
2934
2995
|
} finally {
|
|
2935
|
-
|
|
2936
|
-
|
|
2996
|
+
Pe.clear();
|
|
2997
|
+
Pe = n;
|
|
2937
2998
|
}
|
|
2938
2999
|
}
|
|
2939
3000
|
function createStore(e, t, n) {
|
|
@@ -2945,7 +3006,7 @@ function createStore(e, t, n) {
|
|
|
2945
3006
|
];
|
|
2946
3007
|
}
|
|
2947
3008
|
function createOptimisticStore(e, t, n) {
|
|
2948
|
-
GlobalQueue.
|
|
3009
|
+
GlobalQueue.ye ||= clearOptimisticStore;
|
|
2949
3010
|
const r = typeof e === "function";
|
|
2950
3011
|
const i = r ? t : e;
|
|
2951
3012
|
const s = r ? e : undefined;
|
|
@@ -2954,37 +3015,37 @@ function createOptimisticStore(e, t, n) {
|
|
|
2954
3015
|
}
|
|
2955
3016
|
function clearOptimisticStore(e) {
|
|
2956
3017
|
const t = e[le];
|
|
2957
|
-
if (!t || !t[
|
|
2958
|
-
const n = t[
|
|
2959
|
-
const r = t[
|
|
3018
|
+
if (!t || !t[he]) return;
|
|
3019
|
+
const n = t[he];
|
|
3020
|
+
const r = t[ye];
|
|
2960
3021
|
setProjectionWriteActive(true);
|
|
2961
3022
|
try {
|
|
2962
3023
|
if (r) {
|
|
2963
3024
|
for (const e of Reflect.ownKeys(n)) {
|
|
2964
3025
|
if (r[e]) {
|
|
2965
3026
|
r[e].H = undefined;
|
|
2966
|
-
const n = t[
|
|
2967
|
-
const i = n ===
|
|
3027
|
+
const n = t[pe] && e in t[pe] ? t[pe][e] : t[de][e];
|
|
3028
|
+
const i = n === ae ? undefined : n;
|
|
2968
3029
|
setSignal(r[e], isWrappable(i) ? wrap(i, t) : i);
|
|
2969
3030
|
}
|
|
2970
3031
|
}
|
|
2971
|
-
if (r[
|
|
2972
|
-
r[
|
|
2973
|
-
setSignal(r[
|
|
3032
|
+
if (r[fe]) {
|
|
3033
|
+
r[fe].H = undefined;
|
|
3034
|
+
setSignal(r[fe], undefined);
|
|
2974
3035
|
}
|
|
2975
3036
|
}
|
|
2976
3037
|
} finally {
|
|
2977
3038
|
setProjectionWriteActive(false);
|
|
2978
3039
|
}
|
|
2979
|
-
delete t[
|
|
3040
|
+
delete t[he];
|
|
2980
3041
|
}
|
|
2981
3042
|
function createOptimisticProjectionInternal(e, t, n) {
|
|
2982
3043
|
let r;
|
|
2983
3044
|
const i = new WeakMap();
|
|
2984
3045
|
const wrapper = e => {
|
|
2985
|
-
e[
|
|
2986
|
-
e[
|
|
2987
|
-
e[
|
|
3046
|
+
e[we] = wrapProjection;
|
|
3047
|
+
e[_e] = i;
|
|
3048
|
+
e[be] = true;
|
|
2988
3049
|
Object.defineProperty(e, me, {
|
|
2989
3050
|
get() {
|
|
2990
3051
|
return r;
|
|
@@ -2994,8 +3055,8 @@ function createOptimisticProjectionInternal(e, t, n) {
|
|
|
2994
3055
|
};
|
|
2995
3056
|
const wrapProjection = e => {
|
|
2996
3057
|
if (i.has(e)) return i.get(e);
|
|
2997
|
-
if (e[le]?.[
|
|
2998
|
-
const t = createStoreProxy(e,
|
|
3058
|
+
if (e[le]?.[we] === wrapProjection) return e;
|
|
3059
|
+
const t = createStoreProxy(e, xe, wrapper);
|
|
2999
3060
|
i.set(e, t);
|
|
3000
3061
|
return t;
|
|
3001
3062
|
};
|
|
@@ -3017,11 +3078,11 @@ function createOptimisticProjectionInternal(e, t, n) {
|
|
|
3017
3078
|
setProjectionWriteActive(false);
|
|
3018
3079
|
}
|
|
3019
3080
|
}, undefined);
|
|
3020
|
-
r.
|
|
3081
|
+
r.ge &= ~g;
|
|
3021
3082
|
}
|
|
3022
3083
|
return { store: s, node: r };
|
|
3023
3084
|
}
|
|
3024
|
-
const
|
|
3085
|
+
const Ne = Symbol(0);
|
|
3025
3086
|
function isPrototypePollutionKey(e) {
|
|
3026
3087
|
return e === "__proto__" || e === "constructor" || e === "prototype";
|
|
3027
3088
|
}
|
|
@@ -3069,7 +3130,7 @@ function updatePath(e, t, n = 0) {
|
|
|
3069
3130
|
if (s === i) return;
|
|
3070
3131
|
}
|
|
3071
3132
|
if (r === undefined && s == undefined) return;
|
|
3072
|
-
if (s ===
|
|
3133
|
+
if (s === Ne) {
|
|
3073
3134
|
delete e[r];
|
|
3074
3135
|
} else if (r === undefined || (isWrappable(i) && isWrappable(s) && !Array.isArray(s))) {
|
|
3075
3136
|
const t = r !== undefined ? e[r] : e;
|
|
@@ -3091,20 +3152,20 @@ const Ce = Object.assign(
|
|
|
3091
3152
|
updatePath(t, e);
|
|
3092
3153
|
};
|
|
3093
3154
|
},
|
|
3094
|
-
{ DELETE:
|
|
3155
|
+
{ DELETE: Ne }
|
|
3095
3156
|
);
|
|
3096
3157
|
function snapshotImpl(e, t, n, r) {
|
|
3097
|
-
let i, s, o, u,
|
|
3158
|
+
let i, s, o, u, f, l;
|
|
3098
3159
|
if (!isWrappable(e)) return e;
|
|
3099
3160
|
if (n && n.has(e)) return n.get(e);
|
|
3100
3161
|
if (!n) n = new Map();
|
|
3101
3162
|
if ((i = e[le] || r?.get(e)?.[le])) {
|
|
3102
|
-
if (t) trackSelf(i,
|
|
3103
|
-
o = i[
|
|
3104
|
-
s = Array.isArray(i[
|
|
3105
|
-
n.set(e, o ? (u = s ? [] : Object.create(Object.getPrototypeOf(i[
|
|
3106
|
-
e = i[
|
|
3107
|
-
r =
|
|
3163
|
+
if (t) trackSelf(i, fe);
|
|
3164
|
+
o = i[pe];
|
|
3165
|
+
s = Array.isArray(i[de]);
|
|
3166
|
+
n.set(e, o ? (u = s ? [] : Object.create(Object.getPrototypeOf(i[de]))) : i[de]);
|
|
3167
|
+
e = i[de];
|
|
3168
|
+
r = Oe;
|
|
3108
3169
|
} else {
|
|
3109
3170
|
s = Array.isArray(e);
|
|
3110
3171
|
n.set(e, e);
|
|
@@ -3112,12 +3173,12 @@ function snapshotImpl(e, t, n, r) {
|
|
|
3112
3173
|
if (s) {
|
|
3113
3174
|
const s = o?.length || e.length;
|
|
3114
3175
|
for (let c = 0; c < s; c++) {
|
|
3115
|
-
|
|
3116
|
-
if (
|
|
3117
|
-
if (t && isWrappable(
|
|
3118
|
-
if ((
|
|
3176
|
+
l = o && c in o ? o[c] : e[c];
|
|
3177
|
+
if (l === ae) continue;
|
|
3178
|
+
if (t && isWrappable(l)) wrap(l, i);
|
|
3179
|
+
if ((f = snapshotImpl(l, t, n, r)) !== l || u) {
|
|
3119
3180
|
if (!u) n.set(e, (u = [...e]));
|
|
3120
|
-
u[c] =
|
|
3181
|
+
u[c] = f;
|
|
3121
3182
|
}
|
|
3122
3183
|
}
|
|
3123
3184
|
} else {
|
|
@@ -3126,14 +3187,14 @@ function snapshotImpl(e, t, n, r) {
|
|
|
3126
3187
|
let a = s[c];
|
|
3127
3188
|
const d = getPropertyDescriptor(e, o, a);
|
|
3128
3189
|
if (d.get) continue;
|
|
3129
|
-
|
|
3130
|
-
if (t && isWrappable(
|
|
3131
|
-
if ((
|
|
3190
|
+
l = o && a in o ? o[a] : e[a];
|
|
3191
|
+
if (t && isWrappable(l)) wrap(l, i);
|
|
3192
|
+
if ((f = snapshotImpl(l, t, n, r)) !== e[a] || u) {
|
|
3132
3193
|
if (!u) {
|
|
3133
3194
|
u = Object.create(Object.getPrototypeOf(e));
|
|
3134
3195
|
Object.assign(u, e);
|
|
3135
3196
|
}
|
|
3136
|
-
u[a] =
|
|
3197
|
+
u[a] = f;
|
|
3137
3198
|
}
|
|
3138
3199
|
}
|
|
3139
3200
|
}
|
|
@@ -3148,13 +3209,13 @@ function deep(e) {
|
|
|
3148
3209
|
function trueFn() {
|
|
3149
3210
|
return true;
|
|
3150
3211
|
}
|
|
3151
|
-
const
|
|
3212
|
+
const Ee = {
|
|
3152
3213
|
get(e, t, n) {
|
|
3153
|
-
if (t ===
|
|
3214
|
+
if (t === ce) return n;
|
|
3154
3215
|
return e.get(t);
|
|
3155
3216
|
},
|
|
3156
3217
|
has(e, t) {
|
|
3157
|
-
if (t ===
|
|
3218
|
+
if (t === ce) return true;
|
|
3158
3219
|
return e.has(t);
|
|
3159
3220
|
},
|
|
3160
3221
|
set: trueFn,
|
|
@@ -3177,15 +3238,15 @@ const Ne = {
|
|
|
3177
3238
|
function resolveSource(e) {
|
|
3178
3239
|
return !(e = typeof e === "function" ? e() : e) ? {} : e;
|
|
3179
3240
|
}
|
|
3180
|
-
const
|
|
3241
|
+
const ke = Symbol(0);
|
|
3181
3242
|
function merge(...e) {
|
|
3182
3243
|
if (e.length === 1 && typeof e[0] !== "function") return e[0];
|
|
3183
3244
|
let t = false;
|
|
3184
3245
|
const n = [];
|
|
3185
3246
|
for (let r = 0; r < e.length; r++) {
|
|
3186
3247
|
const i = e[r];
|
|
3187
|
-
t = t || (!!i &&
|
|
3188
|
-
const s = !!i && i[
|
|
3248
|
+
t = t || (!!i && ce in i);
|
|
3249
|
+
const s = !!i && i[ke];
|
|
3189
3250
|
if (s) {
|
|
3190
3251
|
for (let e = 0; e < s.length; e++) n.push(s[e]);
|
|
3191
3252
|
} else n.push(typeof i === "function" ? ((t = true), createMemo(i)) : i);
|
|
@@ -3194,7 +3255,7 @@ function merge(...e) {
|
|
|
3194
3255
|
return new Proxy(
|
|
3195
3256
|
{
|
|
3196
3257
|
get(e) {
|
|
3197
|
-
if (e ===
|
|
3258
|
+
if (e === ke) return n;
|
|
3198
3259
|
for (let t = n.length - 1; t >= 0; t--) {
|
|
3199
3260
|
const r = resolveSource(n[t]);
|
|
3200
3261
|
if (e in r) return r[e];
|
|
@@ -3215,7 +3276,7 @@ function merge(...e) {
|
|
|
3215
3276
|
return [...e];
|
|
3216
3277
|
}
|
|
3217
3278
|
},
|
|
3218
|
-
|
|
3279
|
+
Ee
|
|
3219
3280
|
);
|
|
3220
3281
|
}
|
|
3221
3282
|
const r = Object.create(null);
|
|
@@ -3247,11 +3308,11 @@ function merge(...e) {
|
|
|
3247
3308
|
if (n.get) Object.defineProperty(o, t, n);
|
|
3248
3309
|
else o[t] = n.value;
|
|
3249
3310
|
}
|
|
3250
|
-
o[
|
|
3311
|
+
o[ke] = n;
|
|
3251
3312
|
return o;
|
|
3252
3313
|
}
|
|
3253
3314
|
function omit(e, ...t) {
|
|
3254
|
-
if (E &&
|
|
3315
|
+
if (E && ce in e) {
|
|
3255
3316
|
return new Proxy(
|
|
3256
3317
|
{
|
|
3257
3318
|
get(n) {
|
|
@@ -3264,7 +3325,7 @@ function omit(e, ...t) {
|
|
|
3264
3325
|
return Object.keys(e).filter(e => !t.includes(e));
|
|
3265
3326
|
}
|
|
3266
3327
|
},
|
|
3267
|
-
|
|
3328
|
+
Ee
|
|
3268
3329
|
);
|
|
3269
3330
|
}
|
|
3270
3331
|
const n = {};
|
|
@@ -3286,11 +3347,11 @@ function mapArray(e, t, n) {
|
|
|
3286
3347
|
const s = t;
|
|
3287
3348
|
const o = {
|
|
3288
3349
|
Ue: createOwner(),
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3350
|
+
$e: 0,
|
|
3351
|
+
Je: e,
|
|
3352
|
+
Xe: [],
|
|
3353
|
+
Ye: s,
|
|
3354
|
+
Ze: [],
|
|
3294
3355
|
et: [],
|
|
3295
3356
|
tt: r,
|
|
3296
3357
|
nt: r || n?.keyed === false ? [] : undefined,
|
|
@@ -3300,198 +3361,198 @@ function mapArray(e, t, n) {
|
|
|
3300
3361
|
};
|
|
3301
3362
|
const u = computed(updateKeyedMap.bind(o));
|
|
3302
3363
|
o.Ue.u = u;
|
|
3303
|
-
u.
|
|
3364
|
+
u.ge &= ~g;
|
|
3304
3365
|
return accessor(u);
|
|
3305
3366
|
}
|
|
3306
|
-
const
|
|
3367
|
+
const je = { ownedWrite: true };
|
|
3307
3368
|
function updateKeyedMap() {
|
|
3308
|
-
const e = this.
|
|
3369
|
+
const e = this.Je() || [],
|
|
3309
3370
|
t = e.length;
|
|
3310
|
-
e[
|
|
3371
|
+
e[fe];
|
|
3311
3372
|
runWithOwner(this.Ue, () => {
|
|
3312
3373
|
let n,
|
|
3313
3374
|
r,
|
|
3314
3375
|
i = this.nt
|
|
3315
3376
|
? this.it
|
|
3316
3377
|
? () => {
|
|
3317
|
-
this.nt[r] = signal(e[r],
|
|
3318
|
-
return this.
|
|
3378
|
+
this.nt[r] = signal(e[r], je);
|
|
3379
|
+
return this.Ye(accessor(this.nt[r]), r);
|
|
3319
3380
|
}
|
|
3320
3381
|
: () => {
|
|
3321
|
-
this.nt[r] = signal(e[r],
|
|
3322
|
-
this.rt && (this.rt[r] = signal(r,
|
|
3323
|
-
return this.
|
|
3382
|
+
this.nt[r] = signal(e[r], je);
|
|
3383
|
+
this.rt && (this.rt[r] = signal(r, je));
|
|
3384
|
+
return this.Ye(accessor(this.nt[r]), this.rt ? accessor(this.rt[r]) : undefined);
|
|
3324
3385
|
}
|
|
3325
3386
|
: this.rt
|
|
3326
3387
|
? () => {
|
|
3327
3388
|
const t = e[r];
|
|
3328
|
-
this.rt[r] = signal(r,
|
|
3329
|
-
return this.
|
|
3389
|
+
this.rt[r] = signal(r, je);
|
|
3390
|
+
return this.Ye(t, accessor(this.rt[r]));
|
|
3330
3391
|
}
|
|
3331
3392
|
: () => {
|
|
3332
3393
|
const t = e[r];
|
|
3333
|
-
return this.
|
|
3394
|
+
return this.Ye(t);
|
|
3334
3395
|
};
|
|
3335
3396
|
if (t === 0) {
|
|
3336
|
-
if (this
|
|
3397
|
+
if (this.$e !== 0) {
|
|
3337
3398
|
this.Ue.dispose(false);
|
|
3338
3399
|
this.et = [];
|
|
3339
|
-
this.
|
|
3340
|
-
this
|
|
3341
|
-
this
|
|
3400
|
+
this.Xe = [];
|
|
3401
|
+
this.Ze = [];
|
|
3402
|
+
this.$e = 0;
|
|
3342
3403
|
this.nt && (this.nt = []);
|
|
3343
3404
|
this.rt && (this.rt = []);
|
|
3344
3405
|
}
|
|
3345
|
-
if (this.st && !this
|
|
3346
|
-
this
|
|
3406
|
+
if (this.st && !this.Ze[0]) {
|
|
3407
|
+
this.Ze[0] = runWithOwner((this.et[0] = createOwner()), this.st);
|
|
3347
3408
|
}
|
|
3348
|
-
} else if (this
|
|
3409
|
+
} else if (this.$e === 0) {
|
|
3349
3410
|
if (this.et[0]) this.et[0].dispose();
|
|
3350
|
-
this
|
|
3411
|
+
this.Ze = new Array(t);
|
|
3351
3412
|
for (r = 0; r < t; r++) {
|
|
3352
|
-
this.
|
|
3353
|
-
this
|
|
3413
|
+
this.Xe[r] = e[r];
|
|
3414
|
+
this.Ze[r] = runWithOwner((this.et[r] = createOwner()), i);
|
|
3354
3415
|
}
|
|
3355
|
-
this
|
|
3416
|
+
this.$e = t;
|
|
3356
3417
|
} else {
|
|
3357
3418
|
let s,
|
|
3358
3419
|
o,
|
|
3359
3420
|
u,
|
|
3360
|
-
l,
|
|
3361
3421
|
f,
|
|
3422
|
+
l,
|
|
3362
3423
|
c,
|
|
3363
3424
|
a,
|
|
3364
3425
|
d = new Array(t),
|
|
3365
3426
|
p = new Array(t),
|
|
3366
3427
|
h = this.nt ? new Array(t) : undefined,
|
|
3367
|
-
|
|
3428
|
+
y = this.rt ? new Array(t) : undefined;
|
|
3368
3429
|
for (
|
|
3369
|
-
s = 0, o = Math.min(this
|
|
3370
|
-
s < o && (this.
|
|
3430
|
+
s = 0, o = Math.min(this.$e, t);
|
|
3431
|
+
s < o && (this.Xe[s] === e[s] || (this.nt && compare(this.tt, this.Xe[s], e[s])));
|
|
3371
3432
|
s++
|
|
3372
3433
|
) {
|
|
3373
3434
|
if (this.nt) setSignal(this.nt[s], e[s]);
|
|
3374
3435
|
}
|
|
3375
3436
|
for (
|
|
3376
|
-
o = this
|
|
3437
|
+
o = this.$e - 1, u = t - 1;
|
|
3377
3438
|
o >= s &&
|
|
3378
3439
|
u >= s &&
|
|
3379
|
-
(this.
|
|
3440
|
+
(this.Xe[o] === e[u] || (this.nt && compare(this.tt, this.Xe[o], e[u])));
|
|
3380
3441
|
o--, u--
|
|
3381
3442
|
) {
|
|
3382
|
-
d[u] = this
|
|
3443
|
+
d[u] = this.Ze[o];
|
|
3383
3444
|
p[u] = this.et[o];
|
|
3384
3445
|
h && (h[u] = this.nt[o]);
|
|
3385
|
-
|
|
3446
|
+
y && (y[u] = this.rt[o]);
|
|
3386
3447
|
}
|
|
3387
3448
|
c = new Map();
|
|
3388
3449
|
a = new Array(u + 1);
|
|
3389
3450
|
for (r = u; r >= s; r--) {
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
n = c.get(
|
|
3451
|
+
f = e[r];
|
|
3452
|
+
l = this.tt ? this.tt(f) : f;
|
|
3453
|
+
n = c.get(l);
|
|
3393
3454
|
a[r] = n === undefined ? -1 : n;
|
|
3394
|
-
c.set(
|
|
3455
|
+
c.set(l, r);
|
|
3395
3456
|
}
|
|
3396
3457
|
for (n = s; n <= o; n++) {
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
r = c.get(
|
|
3458
|
+
f = this.Xe[n];
|
|
3459
|
+
l = this.tt ? this.tt(f) : f;
|
|
3460
|
+
r = c.get(l);
|
|
3400
3461
|
if (r !== undefined && r !== -1) {
|
|
3401
|
-
d[r] = this
|
|
3462
|
+
d[r] = this.Ze[n];
|
|
3402
3463
|
p[r] = this.et[n];
|
|
3403
3464
|
h && (h[r] = this.nt[n]);
|
|
3404
|
-
|
|
3465
|
+
y && (y[r] = this.rt[n]);
|
|
3405
3466
|
r = a[r];
|
|
3406
|
-
c.set(
|
|
3467
|
+
c.set(l, r);
|
|
3407
3468
|
} else this.et[n].dispose();
|
|
3408
3469
|
}
|
|
3409
3470
|
for (r = s; r < t; r++) {
|
|
3410
3471
|
if (r in d) {
|
|
3411
|
-
this
|
|
3472
|
+
this.Ze[r] = d[r];
|
|
3412
3473
|
this.et[r] = p[r];
|
|
3413
3474
|
if (h) {
|
|
3414
3475
|
this.nt[r] = h[r];
|
|
3415
3476
|
setSignal(this.nt[r], e[r]);
|
|
3416
3477
|
}
|
|
3417
|
-
if (
|
|
3418
|
-
this.rt[r] =
|
|
3478
|
+
if (y) {
|
|
3479
|
+
this.rt[r] = y[r];
|
|
3419
3480
|
setSignal(this.rt[r], r);
|
|
3420
3481
|
}
|
|
3421
3482
|
} else {
|
|
3422
|
-
this
|
|
3483
|
+
this.Ze[r] = runWithOwner((this.et[r] = createOwner()), i);
|
|
3423
3484
|
}
|
|
3424
3485
|
}
|
|
3425
|
-
this
|
|
3426
|
-
this.
|
|
3486
|
+
this.Ze = this.Ze.slice(0, (this.$e = t));
|
|
3487
|
+
this.Xe = e.slice(0);
|
|
3427
3488
|
}
|
|
3428
3489
|
});
|
|
3429
|
-
return this
|
|
3490
|
+
return this.Ze;
|
|
3430
3491
|
}
|
|
3431
3492
|
function repeat(e, t, n) {
|
|
3432
3493
|
const r = t;
|
|
3433
3494
|
const i = computed(
|
|
3434
3495
|
updateRepeat.bind({
|
|
3435
3496
|
Ue: createOwner(),
|
|
3436
|
-
|
|
3497
|
+
$e: 0,
|
|
3437
3498
|
ot: 0,
|
|
3438
3499
|
ut: e,
|
|
3439
|
-
|
|
3500
|
+
Ye: r,
|
|
3440
3501
|
et: [],
|
|
3441
|
-
|
|
3442
|
-
|
|
3502
|
+
Ze: [],
|
|
3503
|
+
ft: n?.from,
|
|
3443
3504
|
st: n?.fallback
|
|
3444
3505
|
})
|
|
3445
3506
|
);
|
|
3446
|
-
i.
|
|
3507
|
+
i.ge &= ~g;
|
|
3447
3508
|
return accessor(i);
|
|
3448
3509
|
}
|
|
3449
3510
|
function updateRepeat() {
|
|
3450
3511
|
const e = this.ut();
|
|
3451
|
-
const t = this.
|
|
3512
|
+
const t = this.ft?.() || 0;
|
|
3452
3513
|
runWithOwner(this.Ue, () => {
|
|
3453
3514
|
if (e === 0) {
|
|
3454
|
-
if (this
|
|
3515
|
+
if (this.$e !== 0) {
|
|
3455
3516
|
this.Ue.dispose(false);
|
|
3456
3517
|
this.et = [];
|
|
3457
|
-
this
|
|
3458
|
-
this
|
|
3518
|
+
this.Ze = [];
|
|
3519
|
+
this.$e = 0;
|
|
3459
3520
|
}
|
|
3460
|
-
if (this.st && !this
|
|
3461
|
-
this
|
|
3521
|
+
if (this.st && !this.Ze[0]) {
|
|
3522
|
+
this.Ze[0] = runWithOwner((this.et[0] = createOwner()), this.st);
|
|
3462
3523
|
}
|
|
3463
3524
|
return;
|
|
3464
3525
|
}
|
|
3465
3526
|
const n = t + e;
|
|
3466
|
-
const r = this.ot + this
|
|
3467
|
-
if (this
|
|
3527
|
+
const r = this.ot + this.$e;
|
|
3528
|
+
if (this.$e === 0 && this.et[0]) this.et[0].dispose();
|
|
3468
3529
|
for (let e = n; e < r; e++) this.et[e - this.ot].dispose();
|
|
3469
3530
|
if (this.ot < t) {
|
|
3470
3531
|
let e = this.ot;
|
|
3471
|
-
while (e < t && e < this
|
|
3532
|
+
while (e < t && e < this.$e) this.et[e++].dispose();
|
|
3472
3533
|
this.et.splice(0, t - this.ot);
|
|
3473
|
-
this
|
|
3534
|
+
this.Ze.splice(0, t - this.ot);
|
|
3474
3535
|
} else if (this.ot > t) {
|
|
3475
3536
|
let n = r - this.ot - 1;
|
|
3476
3537
|
let i = this.ot - t;
|
|
3477
|
-
this.et.length = this
|
|
3538
|
+
this.et.length = this.Ze.length = e;
|
|
3478
3539
|
while (n >= i) {
|
|
3479
3540
|
this.et[n] = this.et[n - i];
|
|
3480
|
-
this
|
|
3541
|
+
this.Ze[n] = this.Ze[n - i];
|
|
3481
3542
|
n--;
|
|
3482
3543
|
}
|
|
3483
3544
|
for (let e = 0; e < i; e++) {
|
|
3484
|
-
this
|
|
3545
|
+
this.Ze[e] = runWithOwner((this.et[e] = createOwner()), () => this.Ye(e + t));
|
|
3485
3546
|
}
|
|
3486
3547
|
}
|
|
3487
3548
|
for (let e = r; e < n; e++) {
|
|
3488
|
-
this
|
|
3549
|
+
this.Ze[e - t] = runWithOwner((this.et[e - t] = createOwner()), () => this.Ye(e));
|
|
3489
3550
|
}
|
|
3490
|
-
this
|
|
3551
|
+
this.Ze = this.Ze.slice(0, e);
|
|
3491
3552
|
this.ot = t;
|
|
3492
|
-
this
|
|
3553
|
+
this.$e = e;
|
|
3493
3554
|
});
|
|
3494
|
-
return this
|
|
3555
|
+
return this.Ze;
|
|
3495
3556
|
}
|
|
3496
3557
|
function compare(e, t, n) {
|
|
3497
3558
|
return e ? e(t) === e(n) : true;
|
|
@@ -3501,11 +3562,11 @@ function boundaryComputed(e, t) {
|
|
|
3501
3562
|
n.Fe = (e, t) => {
|
|
3502
3563
|
const r = e !== undefined ? e : n.be;
|
|
3503
3564
|
const i = t !== undefined ? t : n.we;
|
|
3504
|
-
n.be &= ~n.
|
|
3505
|
-
n.te.notify(n, n.
|
|
3565
|
+
n.be &= ~n.lt;
|
|
3566
|
+
n.te.notify(n, n.lt, r, i);
|
|
3506
3567
|
};
|
|
3507
|
-
n.
|
|
3508
|
-
n.
|
|
3568
|
+
n.lt = t;
|
|
3569
|
+
n.ge &= ~g;
|
|
3509
3570
|
recompute(n, true);
|
|
3510
3571
|
return n;
|
|
3511
3572
|
}
|
|
@@ -3515,12 +3576,12 @@ function createBoundChildren(e, t, n, r) {
|
|
|
3515
3576
|
cleanup(() => i.removeChild(e.te));
|
|
3516
3577
|
return runWithOwner(e, () => {
|
|
3517
3578
|
const e = computed(t);
|
|
3518
|
-
return boundaryComputed(() =>
|
|
3579
|
+
return boundaryComputed(() => flatten(read(e)), r);
|
|
3519
3580
|
});
|
|
3520
3581
|
}
|
|
3521
|
-
const
|
|
3522
|
-
const
|
|
3523
|
-
let
|
|
3582
|
+
const We = Symbol();
|
|
3583
|
+
const Re = createContext(null);
|
|
3584
|
+
let Ae = false;
|
|
3524
3585
|
const FALSE_ACCESSOR = () => false;
|
|
3525
3586
|
const SEQUENTIAL_ACCESSOR = () => "sequential";
|
|
3526
3587
|
function isRevealController(e) {
|
|
@@ -3534,12 +3595,12 @@ function isSlotMinimallyReady(e) {
|
|
|
3534
3595
|
}
|
|
3535
3596
|
function setSlotState(e, t, n, r) {
|
|
3536
3597
|
setSignal(e.ht, n);
|
|
3537
|
-
setSignal(e.
|
|
3598
|
+
setSignal(e.yt, r);
|
|
3538
3599
|
if (isRevealController(e)) {
|
|
3539
3600
|
if (!n && e.St === t) e.St = undefined;
|
|
3540
3601
|
return e.evaluate(n, r);
|
|
3541
3602
|
}
|
|
3542
|
-
if (!n && e.
|
|
3603
|
+
if (!n && e.gt === t && e.wt) e.gt = undefined;
|
|
3543
3604
|
}
|
|
3544
3605
|
class RevealController {
|
|
3545
3606
|
_t;
|
|
@@ -3547,7 +3608,7 @@ class RevealController {
|
|
|
3547
3608
|
Ot = [];
|
|
3548
3609
|
St;
|
|
3549
3610
|
ht = signal(false, { ownedWrite: true, ze: true });
|
|
3550
|
-
|
|
3611
|
+
yt = signal(false, { ownedWrite: true, ze: true });
|
|
3551
3612
|
vt = true;
|
|
3552
3613
|
Pt = true;
|
|
3553
3614
|
xt = false;
|
|
@@ -3555,16 +3616,16 @@ class RevealController {
|
|
|
3555
3616
|
this._t = e;
|
|
3556
3617
|
this.bt = t;
|
|
3557
3618
|
}
|
|
3558
|
-
|
|
3619
|
+
Nt(e) {
|
|
3559
3620
|
for (let t = 0; t < this.Ot.length; t++) {
|
|
3560
3621
|
const n = this.Ot[t];
|
|
3561
|
-
if ((isRevealController(n) ? n.St : n.
|
|
3622
|
+
if ((isRevealController(n) ? n.St : n.gt) !== this) continue;
|
|
3562
3623
|
if (e(n) === false) return false;
|
|
3563
3624
|
}
|
|
3564
3625
|
return true;
|
|
3565
3626
|
}
|
|
3566
3627
|
isReady() {
|
|
3567
|
-
return this.
|
|
3628
|
+
return this.Nt(isSlotReady);
|
|
3568
3629
|
}
|
|
3569
3630
|
isMinimallyReady() {
|
|
3570
3631
|
const e = untrack(this._t);
|
|
@@ -3572,7 +3633,7 @@ class RevealController {
|
|
|
3572
3633
|
if (e === "natural") {
|
|
3573
3634
|
let e = false;
|
|
3574
3635
|
let t = false;
|
|
3575
|
-
this.
|
|
3636
|
+
this.Nt(n => {
|
|
3576
3637
|
e = true;
|
|
3577
3638
|
if (isSlotMinimallyReady(n)) {
|
|
3578
3639
|
t = true;
|
|
@@ -3582,7 +3643,7 @@ class RevealController {
|
|
|
3582
3643
|
return !e || t;
|
|
3583
3644
|
}
|
|
3584
3645
|
let t = true;
|
|
3585
|
-
this.
|
|
3646
|
+
this.Nt(e => {
|
|
3586
3647
|
t = isSlotMinimallyReady(e);
|
|
3587
3648
|
return false;
|
|
3588
3649
|
});
|
|
@@ -3592,7 +3653,7 @@ class RevealController {
|
|
|
3592
3653
|
if (this.Ot.includes(e)) return;
|
|
3593
3654
|
this.Ot.push(e);
|
|
3594
3655
|
const t = untrack(this._t);
|
|
3595
|
-
(setSignal(e.ht, true), setSignal(e.
|
|
3656
|
+
(setSignal(e.ht, true), setSignal(e.yt, t === "sequential" ? !!untrack(this.bt) : false));
|
|
3596
3657
|
untrack(() => this.evaluate());
|
|
3597
3658
|
}
|
|
3598
3659
|
unregister(e) {
|
|
@@ -3611,11 +3672,11 @@ class RevealController {
|
|
|
3611
3672
|
i = r === "sequential" && !!untrack(this.bt),
|
|
3612
3673
|
s = t ?? i;
|
|
3613
3674
|
if (n) {
|
|
3614
|
-
this.
|
|
3675
|
+
this.Nt(e => setSlotState(e, this, true, s));
|
|
3615
3676
|
} else if (r === "natural") {
|
|
3616
|
-
this.
|
|
3677
|
+
this.Nt(e => {
|
|
3617
3678
|
if (isRevealController(e)) {
|
|
3618
|
-
setSignal(e.
|
|
3679
|
+
setSignal(e.yt, false);
|
|
3619
3680
|
setSignal(e.ht, false);
|
|
3620
3681
|
e.evaluate(false, false);
|
|
3621
3682
|
} else {
|
|
@@ -3623,16 +3684,16 @@ class RevealController {
|
|
|
3623
3684
|
}
|
|
3624
3685
|
});
|
|
3625
3686
|
} else if (r === "together") {
|
|
3626
|
-
const e = this.
|
|
3627
|
-
this.
|
|
3687
|
+
const e = this.Nt(isSlotMinimallyReady);
|
|
3688
|
+
this.Nt(t => setSlotState(t, this, !e, false));
|
|
3628
3689
|
} else {
|
|
3629
3690
|
let e = false;
|
|
3630
|
-
this.
|
|
3691
|
+
this.Nt(t => {
|
|
3631
3692
|
if (e) return setSlotState(t, this, true, i);
|
|
3632
3693
|
if (isSlotReady(t)) return setSlotState(t, this, false, false);
|
|
3633
3694
|
e = true;
|
|
3634
3695
|
if (isRevealController(t)) {
|
|
3635
|
-
setSignal(t.
|
|
3696
|
+
setSignal(t.yt, false);
|
|
3636
3697
|
setSignal(t.ht, false);
|
|
3637
3698
|
t.evaluate(false, false);
|
|
3638
3699
|
} else {
|
|
@@ -3649,32 +3710,33 @@ class RevealController {
|
|
|
3649
3710
|
}
|
|
3650
3711
|
}
|
|
3651
3712
|
class CollectionQueue extends Queue {
|
|
3652
|
-
|
|
3713
|
+
Ct;
|
|
3653
3714
|
ct = new Set();
|
|
3654
3715
|
Et;
|
|
3655
3716
|
dt = true;
|
|
3656
3717
|
ht = signal(false, { ownedWrite: true, ze: true });
|
|
3657
|
-
|
|
3658
|
-
yt;
|
|
3718
|
+
we;
|
|
3719
|
+
yt = signal(false, { ownedWrite: true, ze: true });
|
|
3720
|
+
gt;
|
|
3659
3721
|
wt = false;
|
|
3660
3722
|
kt;
|
|
3661
|
-
jt =
|
|
3723
|
+
jt = We;
|
|
3662
3724
|
constructor(e) {
|
|
3663
3725
|
super();
|
|
3664
|
-
this.
|
|
3726
|
+
this.Ct = e;
|
|
3665
3727
|
}
|
|
3666
3728
|
run(e) {
|
|
3667
|
-
if (!e || (read(this.ht) && (!
|
|
3729
|
+
if (!e || (read(this.ht) && (!Ae || read(this.yt)))) return;
|
|
3668
3730
|
return super.run(e);
|
|
3669
3731
|
}
|
|
3670
3732
|
notify(e, t, n, r) {
|
|
3671
|
-
if (!(t & this.
|
|
3733
|
+
if (!(t & this.Ct)) return super.notify(e, t, n, r);
|
|
3672
3734
|
if (this.wt && this.kt) {
|
|
3673
3735
|
const e = untrack(() => {
|
|
3674
3736
|
try {
|
|
3675
3737
|
return this.kt();
|
|
3676
3738
|
} catch {
|
|
3677
|
-
return
|
|
3739
|
+
return We;
|
|
3678
3740
|
}
|
|
3679
3741
|
});
|
|
3680
3742
|
if (e !== this.jt) {
|
|
@@ -3683,29 +3745,32 @@ class CollectionQueue extends Queue {
|
|
|
3683
3745
|
this.ct.clear();
|
|
3684
3746
|
}
|
|
3685
3747
|
}
|
|
3686
|
-
if (this.
|
|
3687
|
-
if (this.
|
|
3688
|
-
return super.notify(e,
|
|
3748
|
+
if (this.Ct & _ && this.wt) return super.notify(e, t, n, r);
|
|
3749
|
+
if (this.Ct & _ && n & m) {
|
|
3750
|
+
return super.notify(e, m, n, r);
|
|
3689
3751
|
}
|
|
3690
|
-
if (n & this.
|
|
3752
|
+
if (n & this.Ct) {
|
|
3691
3753
|
this.dt = true;
|
|
3692
3754
|
const t = r?.source || e.we?.source;
|
|
3693
3755
|
if (t) {
|
|
3694
3756
|
const e = this.ct.size === 0;
|
|
3695
3757
|
this.ct.add(t);
|
|
3696
3758
|
if (e) setSignal(this.ht, true);
|
|
3759
|
+
if (this.Ct & m) {
|
|
3760
|
+
setSignal(this.we, t.we?.cause ?? t.we);
|
|
3761
|
+
}
|
|
3697
3762
|
}
|
|
3698
3763
|
}
|
|
3699
|
-
t &= ~this.
|
|
3764
|
+
t &= ~this.Ct;
|
|
3700
3765
|
return t ? super.notify(e, t, n, r) : true;
|
|
3701
3766
|
}
|
|
3702
3767
|
checkSources() {
|
|
3703
3768
|
for (const e of this.ct) {
|
|
3704
|
-
if (e.
|
|
3769
|
+
if (e._ & u || (!(e.be & this.Ct) && !(this.Ct & m && e.be & _))) this.ct.delete(e);
|
|
3705
3770
|
}
|
|
3706
3771
|
if (!this.ct.size) {
|
|
3707
|
-
if (this.
|
|
3708
|
-
this.dt = !!(this.Et.be & this.
|
|
3772
|
+
if (this.Ct & _ && this.dt && !this.wt && this.Et) {
|
|
3773
|
+
this.dt = !!(this.Et.be & this.Ct);
|
|
3709
3774
|
} else {
|
|
3710
3775
|
this.dt = false;
|
|
3711
3776
|
}
|
|
@@ -3718,13 +3783,14 @@ class CollectionQueue extends Queue {
|
|
|
3718
3783
|
}
|
|
3719
3784
|
}
|
|
3720
3785
|
}
|
|
3721
|
-
if (
|
|
3786
|
+
if (Ae) this.gt?.evaluate();
|
|
3722
3787
|
}
|
|
3723
3788
|
}
|
|
3724
3789
|
function createCollectionBoundary(e, t, n, r) {
|
|
3725
3790
|
const i = createOwner();
|
|
3726
|
-
if (
|
|
3791
|
+
if (Ae) setContext(Re, null, i);
|
|
3727
3792
|
const s = new CollectionQueue(e);
|
|
3793
|
+
if (e === m) s.we = signal(undefined, { ownedWrite: true, ze: true });
|
|
3728
3794
|
if (r) s.kt = r;
|
|
3729
3795
|
const o = (s.Et = createBoundChildren(i, t, s, e));
|
|
3730
3796
|
untrack(() => {
|
|
@@ -3737,9 +3803,9 @@ function createCollectionBoundary(e, t, n, r) {
|
|
|
3737
3803
|
}
|
|
3738
3804
|
s.dt = t || !!(o.be & e) || o.we instanceof NotReadyError;
|
|
3739
3805
|
});
|
|
3740
|
-
const u =
|
|
3806
|
+
const u = Ae && e === _ ? getContext(Re) : null;
|
|
3741
3807
|
if (u) {
|
|
3742
|
-
s.
|
|
3808
|
+
s.gt = u;
|
|
3743
3809
|
u.register(s);
|
|
3744
3810
|
cleanup(() => u.unregister(s));
|
|
3745
3811
|
}
|
|
@@ -3749,32 +3815,30 @@ function createCollectionBoundary(e, t, n, r) {
|
|
|
3749
3815
|
const e = read(o);
|
|
3750
3816
|
if (!untrack(() => read(s.ht))) return ((s.wt = true), e);
|
|
3751
3817
|
}
|
|
3752
|
-
if (
|
|
3818
|
+
if (Ae && read(s.yt)) return undefined;
|
|
3753
3819
|
return n(s);
|
|
3754
3820
|
})
|
|
3755
3821
|
);
|
|
3756
3822
|
}
|
|
3757
3823
|
function createLoadingBoundary(e, t, n) {
|
|
3758
|
-
return createCollectionBoundary(
|
|
3824
|
+
return createCollectionBoundary(_, e, () => t(), n?.on);
|
|
3759
3825
|
}
|
|
3760
3826
|
function createErrorBoundary(e, t) {
|
|
3761
|
-
return createCollectionBoundary(
|
|
3762
|
-
|
|
3763
|
-
const r = n.we?.cause ?? n.we;
|
|
3764
|
-
return t(r, () => {
|
|
3827
|
+
return createCollectionBoundary(m, e, e =>
|
|
3828
|
+
t(accessor(e.we), () => {
|
|
3765
3829
|
for (const t of e.ct) recompute(t);
|
|
3766
3830
|
schedule();
|
|
3767
|
-
})
|
|
3768
|
-
|
|
3831
|
+
})
|
|
3832
|
+
);
|
|
3769
3833
|
}
|
|
3770
3834
|
function createRevealOrder(e, t) {
|
|
3771
|
-
|
|
3835
|
+
Ae = true;
|
|
3772
3836
|
const n = createOwner();
|
|
3773
|
-
const r = getContext(
|
|
3837
|
+
const r = getContext(Re);
|
|
3774
3838
|
const i = t?.order || SEQUENTIAL_ACCESSOR,
|
|
3775
3839
|
s = t?.collapsed || FALSE_ACCESSOR;
|
|
3776
3840
|
const o = new RevealController(i, s);
|
|
3777
|
-
setContext(
|
|
3841
|
+
setContext(Re, o, n);
|
|
3778
3842
|
return runWithOwner(n, () => {
|
|
3779
3843
|
const t = e();
|
|
3780
3844
|
computed(() => {
|
|
@@ -3839,13 +3903,13 @@ function flattenArray(e, t = [], n) {
|
|
|
3839
3903
|
if (r) throw r;
|
|
3840
3904
|
return i;
|
|
3841
3905
|
}
|
|
3842
|
-
const
|
|
3843
|
-
exports.$PROXY =
|
|
3906
|
+
const Ie = undefined;
|
|
3907
|
+
exports.$PROXY = ce;
|
|
3844
3908
|
exports.$REFRESH = j;
|
|
3845
3909
|
exports.$TARGET = le;
|
|
3846
|
-
exports.$TRACK =
|
|
3910
|
+
exports.$TRACK = fe;
|
|
3847
3911
|
exports.ContextNotFoundError = ContextNotFoundError;
|
|
3848
|
-
exports.DEV =
|
|
3912
|
+
exports.DEV = Ie;
|
|
3849
3913
|
exports.NoOwnerError = NoOwnerError;
|
|
3850
3914
|
exports.NotReadyError = NotReadyError;
|
|
3851
3915
|
exports.SUPPORTS_PROXY = E;
|