@solidjs/signals 0.13.13 → 2.0.0-beta.11
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 +8 -7
- package/dist/dev.js +1230 -598
- package/dist/node.cjs +2064 -1555
- package/dist/prod.js +1783 -1251
- package/dist/types/boundaries.d.ts +126 -5
- package/dist/types/core/action.d.ts +34 -0
- package/dist/types/core/constants.d.ts +26 -0
- package/dist/types/core/context.d.ts +10 -2
- package/dist/types/core/core.d.ts +129 -9
- package/dist/types/core/dev.d.ts +1 -1
- package/dist/types/core/effect.d.ts +4 -2
- package/dist/types/core/error.d.ts +24 -0
- package/dist/types/core/external.d.ts +19 -0
- package/dist/types/core/graph.d.ts +2 -0
- package/dist/types/core/index.d.ts +1 -1
- package/dist/types/core/owner.d.ts +93 -3
- package/dist/types/core/scheduler.d.ts +43 -2
- package/dist/types/core/types.d.ts +5 -6
- package/dist/types/index.d.ts +3 -3
- package/dist/types/map.d.ts +32 -3
- package/dist/types/signals.d.ts +362 -42
- package/dist/types/src/boundaries.d.ts +173 -0
- package/dist/types/src/core/action.d.ts +35 -0
- package/dist/types/src/core/async.d.ts +6 -0
- package/dist/types/src/core/constants.d.ts +51 -0
- package/dist/types/src/core/context.d.ts +36 -0
- package/dist/types/src/core/core.d.ts +174 -0
- package/dist/types/src/core/dev.d.ts +49 -0
- package/dist/types/src/core/effect.d.ts +32 -0
- package/dist/types/src/core/error.d.ts +38 -0
- package/dist/types/src/core/external.d.ts +45 -0
- package/dist/types/src/core/graph.d.ts +5 -0
- package/dist/types/src/core/heap.d.ts +14 -0
- package/dist/types/src/core/index.d.ts +12 -0
- package/dist/types/src/core/lanes.d.ts +54 -0
- package/dist/types/src/core/owner.d.ts +116 -0
- package/dist/types/src/core/scheduler.d.ts +122 -0
- package/dist/types/src/core/types.d.ts +85 -0
- package/dist/types/src/index.d.ts +9 -0
- package/dist/types/src/map.d.ts +53 -0
- package/dist/types/src/signals.d.ts +512 -0
- package/dist/types/src/store/index.d.ts +9 -0
- package/dist/types/src/store/optimistic.d.ts +45 -0
- package/dist/types/src/store/projection.d.ts +66 -0
- package/dist/types/src/store/reconcile.d.ts +23 -0
- package/dist/types/src/store/store.d.ts +125 -0
- package/dist/types/src/store/storePath.d.ts +58 -0
- package/dist/types/src/store/utils.d.ts +114 -0
- package/dist/types/store/optimistic.d.ts +38 -12
- package/dist/types/store/projection.d.ts +55 -15
- package/dist/types/store/reconcile.d.ts +22 -0
- package/dist/types/store/store.d.ts +72 -15
- package/dist/types/store/storePath.d.ts +28 -0
- package/dist/types/store/utils.d.ts +78 -7
- package/dist/types-cjs/boundaries.d.cts +173 -0
- package/dist/types-cjs/core/action.d.cts +35 -0
- package/dist/types-cjs/core/async.d.cts +6 -0
- package/dist/types-cjs/core/constants.d.cts +51 -0
- package/dist/types-cjs/core/context.d.cts +36 -0
- package/dist/types-cjs/core/core.d.cts +174 -0
- package/dist/types-cjs/core/dev.d.cts +49 -0
- package/dist/types-cjs/core/effect.d.cts +32 -0
- package/dist/types-cjs/core/error.d.cts +38 -0
- package/dist/types-cjs/core/external.d.cts +45 -0
- package/dist/types-cjs/core/graph.d.cts +5 -0
- package/dist/types-cjs/core/heap.d.cts +14 -0
- package/dist/types-cjs/core/index.d.cts +12 -0
- package/dist/types-cjs/core/lanes.d.cts +54 -0
- package/dist/types-cjs/core/owner.d.cts +116 -0
- package/dist/types-cjs/core/scheduler.d.cts +122 -0
- package/dist/types-cjs/core/types.d.cts +85 -0
- package/dist/types-cjs/index.d.cts +9 -0
- package/dist/types-cjs/map.d.cts +53 -0
- package/dist/types-cjs/package.json +3 -0
- package/dist/types-cjs/signals.d.cts +512 -0
- package/dist/types-cjs/src/boundaries.d.cts +173 -0
- package/dist/types-cjs/src/core/action.d.cts +35 -0
- package/dist/types-cjs/src/core/async.d.cts +6 -0
- package/dist/types-cjs/src/core/constants.d.cts +51 -0
- package/dist/types-cjs/src/core/context.d.cts +36 -0
- package/dist/types-cjs/src/core/core.d.cts +174 -0
- package/dist/types-cjs/src/core/dev.d.cts +49 -0
- package/dist/types-cjs/src/core/effect.d.cts +32 -0
- package/dist/types-cjs/src/core/error.d.cts +38 -0
- package/dist/types-cjs/src/core/external.d.cts +45 -0
- package/dist/types-cjs/src/core/graph.d.cts +5 -0
- package/dist/types-cjs/src/core/heap.d.cts +14 -0
- package/dist/types-cjs/src/core/index.d.cts +12 -0
- package/dist/types-cjs/src/core/lanes.d.cts +54 -0
- package/dist/types-cjs/src/core/owner.d.cts +116 -0
- package/dist/types-cjs/src/core/scheduler.d.cts +122 -0
- package/dist/types-cjs/src/core/types.d.cts +85 -0
- package/dist/types-cjs/src/index.d.cts +9 -0
- package/dist/types-cjs/src/map.d.cts +53 -0
- package/dist/types-cjs/src/signals.d.cts +512 -0
- package/dist/types-cjs/src/store/index.d.cts +9 -0
- package/dist/types-cjs/src/store/optimistic.d.cts +45 -0
- package/dist/types-cjs/src/store/projection.d.cts +66 -0
- package/dist/types-cjs/src/store/reconcile.d.cts +23 -0
- package/dist/types-cjs/src/store/store.d.cts +125 -0
- package/dist/types-cjs/src/store/storePath.d.cts +58 -0
- package/dist/types-cjs/src/store/utils.d.cts +114 -0
- package/dist/types-cjs/store/index.d.cts +9 -0
- package/dist/types-cjs/store/optimistic.d.cts +45 -0
- package/dist/types-cjs/store/projection.d.cts +66 -0
- package/dist/types-cjs/store/reconcile.d.cts +23 -0
- package/dist/types-cjs/store/store.d.cts +125 -0
- package/dist/types-cjs/store/storePath.d.cts +58 -0
- package/dist/types-cjs/store/utils.d.cts +114 -0
- package/package.json +35 -27
package/dist/node.cjs
CHANGED
|
@@ -31,21 +31,39 @@ 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 l = 1 << 7;
|
|
35
|
+
const f = 1 << 8;
|
|
36
36
|
const c = 1 << 9;
|
|
37
|
-
const a = 1 <<
|
|
38
|
-
const d = 1 <<
|
|
37
|
+
const a = 1 << 10;
|
|
38
|
+
const d = 1 << 0;
|
|
39
|
+
const p = 1 << 1;
|
|
39
40
|
const h = 1 << 2;
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const b =
|
|
47
|
-
const
|
|
48
|
-
const
|
|
41
|
+
const g = 1 << 3;
|
|
42
|
+
const S = 1 << 4;
|
|
43
|
+
const y = 1 << 5;
|
|
44
|
+
const w = 1 << 6;
|
|
45
|
+
const m = 1 << 0;
|
|
46
|
+
const _ = 1 << 1;
|
|
47
|
+
const b = 1 << 2;
|
|
48
|
+
const O = 1;
|
|
49
|
+
const v = 2;
|
|
50
|
+
const P = 3;
|
|
51
|
+
const x = {};
|
|
52
|
+
const C = {};
|
|
53
|
+
const N = "sp";
|
|
54
|
+
const E = typeof Proxy === "function";
|
|
55
|
+
const k = {};
|
|
56
|
+
const j = Symbol("refresh");
|
|
57
|
+
const W = new Set();
|
|
58
|
+
const R = new Set();
|
|
59
|
+
let A = 0;
|
|
60
|
+
const L = undefined;
|
|
61
|
+
function emitDiagnostic(e) {
|
|
62
|
+
const t = { sequence: ++A, ...e };
|
|
63
|
+
for (const e of W) e(t);
|
|
64
|
+
for (const e of R) e.push(t);
|
|
65
|
+
return t;
|
|
66
|
+
}
|
|
49
67
|
function actualInsertIntoHeap(e, t) {
|
|
50
68
|
const n = (e.i?.t ? e.i.u?.o : e.i?.o) ?? -1;
|
|
51
69
|
if (n >= e.o) e.o = n + 1;
|
|
@@ -53,16 +71,16 @@ function actualInsertIntoHeap(e, t) {
|
|
|
53
71
|
const i = t.l[r];
|
|
54
72
|
if (i === undefined) t.l[r] = e;
|
|
55
73
|
else {
|
|
56
|
-
const t = i.
|
|
57
|
-
t.
|
|
58
|
-
e.
|
|
59
|
-
i.
|
|
74
|
+
const t = i.p;
|
|
75
|
+
t.h = e;
|
|
76
|
+
e.p = t;
|
|
77
|
+
i.p = e;
|
|
60
78
|
}
|
|
61
79
|
if (r > t.S) t.S = r;
|
|
62
80
|
}
|
|
63
81
|
function insertIntoHeap(e, o) {
|
|
64
82
|
let u = e.m;
|
|
65
|
-
if (u & (i | r)) return;
|
|
83
|
+
if (u & (i | r | a)) return;
|
|
66
84
|
if (u & t) {
|
|
67
85
|
e.m = (u & -4) | n | i;
|
|
68
86
|
} else e.m = u | i;
|
|
@@ -70,7 +88,7 @@ function insertIntoHeap(e, o) {
|
|
|
70
88
|
}
|
|
71
89
|
function insertIntoHeapHeight(e, t) {
|
|
72
90
|
let n = e.m;
|
|
73
|
-
if (n & (i | r | s)) return;
|
|
91
|
+
if (n & (i | r | s | a)) return;
|
|
74
92
|
e.m = n | s;
|
|
75
93
|
actualInsertIntoHeap(e, t);
|
|
76
94
|
}
|
|
@@ -79,23 +97,23 @@ function deleteFromHeap(e, t) {
|
|
|
79
97
|
if (!(n & (i | s))) return;
|
|
80
98
|
e.m = n & -25;
|
|
81
99
|
const r = e.o;
|
|
82
|
-
if (e.
|
|
100
|
+
if (e.p === e) t.l[r] = undefined;
|
|
83
101
|
else {
|
|
84
|
-
const n = e.
|
|
102
|
+
const n = e.h;
|
|
85
103
|
const i = t.l[r];
|
|
86
104
|
const s = n ?? i;
|
|
87
105
|
if (e === i) t.l[r] = n;
|
|
88
|
-
else e.h
|
|
89
|
-
s.
|
|
106
|
+
else e.p.h = n;
|
|
107
|
+
s.p = e.p;
|
|
90
108
|
}
|
|
91
|
-
e.
|
|
92
|
-
e.
|
|
109
|
+
e.p = e;
|
|
110
|
+
e.h = undefined;
|
|
93
111
|
}
|
|
94
112
|
function markHeap(e) {
|
|
95
113
|
if (e._) return;
|
|
96
114
|
e._ = true;
|
|
97
115
|
for (let t = 0; t <= e.S; t++) {
|
|
98
|
-
for (let n = e.l[t]; n !== undefined; n = n.
|
|
116
|
+
for (let n = e.l[t]; n !== undefined; n = n.h) {
|
|
99
117
|
if (n.m & i) markNode(n);
|
|
100
118
|
}
|
|
101
119
|
}
|
|
@@ -105,12 +123,12 @@ function markNode(e, r = n) {
|
|
|
105
123
|
if ((i & (t | n)) >= r) return;
|
|
106
124
|
e.m = (i & -4) | r;
|
|
107
125
|
for (let n = e.O; n !== null; n = n.P) {
|
|
108
|
-
markNode(n.
|
|
126
|
+
markNode(n.C, t);
|
|
109
127
|
}
|
|
110
|
-
if (e.
|
|
111
|
-
for (let n = e.
|
|
128
|
+
if (e.N !== null) {
|
|
129
|
+
for (let n = e.N; n !== null; n = n.k) {
|
|
112
130
|
for (let e = n.O; e !== null; e = e.P) {
|
|
113
|
-
markNode(e.
|
|
131
|
+
markNode(e.C, t);
|
|
114
132
|
}
|
|
115
133
|
}
|
|
116
134
|
}
|
|
@@ -130,121 +148,213 @@ function runHeap(e, t) {
|
|
|
130
148
|
function adjustHeight(e, t) {
|
|
131
149
|
deleteFromHeap(e, t);
|
|
132
150
|
let n = e.o;
|
|
133
|
-
for (let t = e.
|
|
134
|
-
const e = t.
|
|
151
|
+
for (let t = e.W; t; t = t.R) {
|
|
152
|
+
const e = t.A;
|
|
135
153
|
const r = e.L || e;
|
|
136
154
|
if (r.I && r.o >= n) n = r.o + 1;
|
|
137
155
|
}
|
|
138
156
|
if (e.o !== n) {
|
|
139
157
|
e.o = n;
|
|
140
158
|
for (let n = e.O; n !== null; n = n.P) {
|
|
141
|
-
insertIntoHeapHeight(n.
|
|
159
|
+
insertIntoHeapHeight(n.C, t);
|
|
142
160
|
}
|
|
143
161
|
}
|
|
144
162
|
}
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
163
|
+
const I = new WeakMap();
|
|
164
|
+
const T = new Set();
|
|
165
|
+
function getOrCreateLane(e) {
|
|
166
|
+
let t = I.get(e);
|
|
167
|
+
if (t) {
|
|
168
|
+
return findLane(t);
|
|
169
|
+
}
|
|
170
|
+
const n = e.T;
|
|
171
|
+
const r = n?.H ? findLane(n.H) : null;
|
|
172
|
+
t = { q: e, F: new Set(), M: [[], []], D: null, V: M, K: r };
|
|
173
|
+
I.set(e, t);
|
|
174
|
+
T.add(t);
|
|
175
|
+
e.B = false;
|
|
176
|
+
return t;
|
|
177
|
+
}
|
|
178
|
+
function findLane(e) {
|
|
179
|
+
while (e.D) e = e.D;
|
|
180
|
+
return e;
|
|
181
|
+
}
|
|
182
|
+
function mergeLanes(e, t) {
|
|
183
|
+
e = findLane(e);
|
|
184
|
+
t = findLane(t);
|
|
185
|
+
if (e === t) return e;
|
|
186
|
+
t.D = e;
|
|
187
|
+
for (const n of t.F) e.F.add(n);
|
|
188
|
+
e.M[0].push(...t.M[0]);
|
|
189
|
+
e.M[1].push(...t.M[1]);
|
|
190
|
+
return e;
|
|
191
|
+
}
|
|
192
|
+
function resolveLane(e) {
|
|
193
|
+
const t = e.H;
|
|
194
|
+
if (!t) return undefined;
|
|
195
|
+
const n = findLane(t);
|
|
196
|
+
if (T.has(n)) return n;
|
|
197
|
+
e.H = undefined;
|
|
198
|
+
return undefined;
|
|
199
|
+
}
|
|
200
|
+
function resolveTransition(e) {
|
|
201
|
+
return resolveLane(e)?.V ?? e.V;
|
|
202
|
+
}
|
|
203
|
+
function hasActiveOverride(e) {
|
|
204
|
+
return !!(e.G !== undefined && e.G !== x);
|
|
205
|
+
}
|
|
206
|
+
function assignOrMergeLane(e, t) {
|
|
207
|
+
const n = findLane(t);
|
|
208
|
+
const r = e.H;
|
|
209
|
+
if (r) {
|
|
210
|
+
if (r.D) {
|
|
211
|
+
e.H = t;
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
const i = findLane(r);
|
|
215
|
+
if (T.has(i)) {
|
|
216
|
+
if (i !== n && !hasActiveOverride(e)) {
|
|
217
|
+
if (n.K && findLane(n.K) === i) {
|
|
218
|
+
e.H = t;
|
|
219
|
+
} else if (i.K && findLane(i.K) === n);
|
|
220
|
+
else mergeLanes(n, i);
|
|
221
|
+
}
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
e.H = t;
|
|
226
|
+
}
|
|
227
|
+
const H = new Set();
|
|
228
|
+
const q = { l: new Array(2e3).fill(undefined), _: false, j: 0, S: 0 };
|
|
229
|
+
const Q = { l: new Array(2e3).fill(undefined), _: false, j: 0, S: 0 };
|
|
230
|
+
let F = 0;
|
|
231
|
+
let M = null;
|
|
232
|
+
let D = false;
|
|
233
|
+
let V = 0;
|
|
234
|
+
let K = false;
|
|
235
|
+
let B = null;
|
|
236
|
+
const G = new Set();
|
|
237
|
+
function registerTransientStoreNode(e) {
|
|
238
|
+
G.add(e);
|
|
239
|
+
}
|
|
240
|
+
function canUseSimpleSyncFlush(e) {
|
|
241
|
+
return (
|
|
242
|
+
H.size === 0 &&
|
|
243
|
+
T.size === 0 &&
|
|
244
|
+
e.U.length === 0 &&
|
|
245
|
+
e.J.length === 0 &&
|
|
246
|
+
e.X.size === 0 &&
|
|
247
|
+
G.size === 0
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
function sweepTransientStoreNodes() {
|
|
251
|
+
if (G.size === 0) return;
|
|
252
|
+
for (const e of G) {
|
|
253
|
+
if (e.O !== null) {
|
|
254
|
+
G.delete(e);
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
if (e.Y !== x) continue;
|
|
258
|
+
if (e.G !== undefined && e.G !== x) continue;
|
|
259
|
+
G.delete(e);
|
|
260
|
+
e.Z?.();
|
|
261
|
+
}
|
|
262
|
+
}
|
|
154
263
|
function enforceLoadingBoundary(e) {}
|
|
155
264
|
function shouldReadStashedOptimisticValue(e) {
|
|
156
|
-
return !!
|
|
265
|
+
return !!B?.has(e);
|
|
157
266
|
}
|
|
158
267
|
function runLaneEffects(e) {
|
|
159
|
-
for (const t of
|
|
160
|
-
if (t.
|
|
161
|
-
const n = t.
|
|
268
|
+
for (const t of T) {
|
|
269
|
+
if (t.D || t.F.size > 0) continue;
|
|
270
|
+
const n = t.M[e - 1];
|
|
162
271
|
if (n.length) {
|
|
163
|
-
t.
|
|
272
|
+
t.M[e - 1] = [];
|
|
164
273
|
runQueue(n, e);
|
|
165
274
|
}
|
|
166
275
|
}
|
|
167
276
|
}
|
|
168
277
|
function queueStashedOptimisticEffects(e) {
|
|
169
278
|
for (let t = e.O; t !== null; t = t.P) {
|
|
170
|
-
const e = t.
|
|
171
|
-
if (!e
|
|
172
|
-
if (e
|
|
173
|
-
if (!e.
|
|
174
|
-
e.
|
|
175
|
-
e.
|
|
279
|
+
const e = t.C;
|
|
280
|
+
if (!e.$) continue;
|
|
281
|
+
if (e.$ === P) {
|
|
282
|
+
if (!e.ee) {
|
|
283
|
+
e.ee = true;
|
|
284
|
+
e.te.enqueue(v, e.ne);
|
|
176
285
|
}
|
|
177
286
|
continue;
|
|
178
287
|
}
|
|
179
|
-
const n = e.m & o ?
|
|
288
|
+
const n = e.m & o ? Q : q;
|
|
180
289
|
if (n.j > e.o) n.j = e.o;
|
|
181
290
|
insertIntoHeap(e, n);
|
|
182
291
|
}
|
|
183
292
|
}
|
|
184
293
|
function setProjectionWriteActive(e) {
|
|
185
|
-
|
|
294
|
+
K = e;
|
|
186
295
|
}
|
|
187
296
|
function mergeTransitionState(e, t) {
|
|
188
|
-
t.
|
|
189
|
-
e.
|
|
190
|
-
for (const n of
|
|
191
|
-
e.
|
|
192
|
-
for (const n of t.
|
|
193
|
-
for (const [n, r] of t.
|
|
194
|
-
let t = e.
|
|
195
|
-
if (!t) e.
|
|
297
|
+
t.re = e;
|
|
298
|
+
e.ie.push(...t.ie);
|
|
299
|
+
for (const n of T) if (n.V === t) n.V = e;
|
|
300
|
+
e.J.push(...t.J);
|
|
301
|
+
for (const n of t.X) e.X.add(n);
|
|
302
|
+
for (const [n, r] of t.se) {
|
|
303
|
+
let t = e.se.get(n);
|
|
304
|
+
if (!t) e.se.set(n, (t = new Set()));
|
|
196
305
|
for (const e of r) t.add(e);
|
|
197
306
|
}
|
|
307
|
+
for (const n of t.oe) e.oe.add(n);
|
|
198
308
|
}
|
|
199
309
|
function resolveOptimisticNodes(e) {
|
|
200
310
|
for (let t = 0; t < e.length; t++) {
|
|
201
311
|
const n = e[t];
|
|
202
|
-
n.
|
|
203
|
-
if (n.
|
|
204
|
-
n
|
|
205
|
-
n.
|
|
312
|
+
n.H = undefined;
|
|
313
|
+
if (n.Y !== x) {
|
|
314
|
+
n.ue = n.Y;
|
|
315
|
+
n.Y = x;
|
|
206
316
|
}
|
|
207
|
-
const r = n.
|
|
208
|
-
n.
|
|
209
|
-
if (r !==
|
|
210
|
-
n.
|
|
317
|
+
const r = n.G;
|
|
318
|
+
n.G = x;
|
|
319
|
+
if (r !== x && n.ue !== r) insertSubs(n, true);
|
|
320
|
+
n.V = null;
|
|
211
321
|
}
|
|
212
322
|
e.length = 0;
|
|
213
323
|
}
|
|
214
324
|
function cleanupCompletedLanes(e) {
|
|
215
|
-
for (const t of
|
|
216
|
-
const n = e ? t.
|
|
325
|
+
for (const t of T) {
|
|
326
|
+
const n = e ? t.V === e : !t.V;
|
|
217
327
|
if (!n) continue;
|
|
218
|
-
if (!t.
|
|
219
|
-
if (t.
|
|
220
|
-
if (t.
|
|
328
|
+
if (!t.D) {
|
|
329
|
+
if (t.M[0].length) runQueue(t.M[0], O);
|
|
330
|
+
if (t.M[1].length) runQueue(t.M[1], v);
|
|
221
331
|
}
|
|
222
|
-
if (t.
|
|
223
|
-
t.
|
|
224
|
-
t.
|
|
225
|
-
t.
|
|
226
|
-
|
|
227
|
-
|
|
332
|
+
if (t.q.H === t) t.q.H = undefined;
|
|
333
|
+
t.F.clear();
|
|
334
|
+
t.M[0].length = 0;
|
|
335
|
+
t.M[1].length = 0;
|
|
336
|
+
T.delete(t);
|
|
337
|
+
I.delete(t.q);
|
|
228
338
|
}
|
|
229
339
|
}
|
|
230
340
|
function schedule() {
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
if (!
|
|
341
|
+
if (D) return;
|
|
342
|
+
D = true;
|
|
343
|
+
if (!V && !z.le && !K) queueMicrotask(flush);
|
|
234
344
|
}
|
|
235
345
|
class Queue {
|
|
236
346
|
i = null;
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
created =
|
|
347
|
+
fe = [[], []];
|
|
348
|
+
U = [];
|
|
349
|
+
created = F;
|
|
240
350
|
addChild(e) {
|
|
241
|
-
this.
|
|
351
|
+
this.U.push(e);
|
|
242
352
|
e.i = this;
|
|
243
353
|
}
|
|
244
354
|
removeChild(e) {
|
|
245
|
-
const t = this.
|
|
355
|
+
const t = this.U.indexOf(e);
|
|
246
356
|
if (t >= 0) {
|
|
247
|
-
this.
|
|
357
|
+
this.U.splice(t, 1);
|
|
248
358
|
e.i = null;
|
|
249
359
|
}
|
|
250
360
|
}
|
|
@@ -253,122 +363,133 @@ class Queue {
|
|
|
253
363
|
return false;
|
|
254
364
|
}
|
|
255
365
|
run(e) {
|
|
256
|
-
if (this.
|
|
257
|
-
const t = this.
|
|
258
|
-
this.
|
|
366
|
+
if (this.fe[e - 1].length) {
|
|
367
|
+
const t = this.fe[e - 1];
|
|
368
|
+
this.fe[e - 1] = [];
|
|
259
369
|
runQueue(t, e);
|
|
260
370
|
}
|
|
261
|
-
for (let t = 0; t < this.
|
|
371
|
+
for (let t = 0; t < this.U.length; t++) this.U[t].run?.(e);
|
|
262
372
|
}
|
|
263
373
|
enqueue(e, t) {
|
|
264
374
|
if (e) {
|
|
265
|
-
if (
|
|
266
|
-
const n = findLane(
|
|
267
|
-
n.
|
|
375
|
+
if (re) {
|
|
376
|
+
const n = findLane(re);
|
|
377
|
+
n.M[e - 1].push(t);
|
|
268
378
|
} else {
|
|
269
|
-
this.
|
|
379
|
+
this.fe[e - 1].push(t);
|
|
270
380
|
}
|
|
271
381
|
}
|
|
272
382
|
schedule();
|
|
273
383
|
}
|
|
274
384
|
stashQueues(e) {
|
|
275
|
-
e.
|
|
276
|
-
e.
|
|
277
|
-
this.
|
|
278
|
-
for (let t = 0; t < this.
|
|
279
|
-
let n = this.
|
|
280
|
-
let r = e.
|
|
385
|
+
e.fe[0].push(...this.fe[0]);
|
|
386
|
+
e.fe[1].push(...this.fe[1]);
|
|
387
|
+
this.fe = [[], []];
|
|
388
|
+
for (let t = 0; t < this.U.length; t++) {
|
|
389
|
+
let n = this.U[t];
|
|
390
|
+
let r = e.U[t];
|
|
281
391
|
if (!r) {
|
|
282
|
-
r = {
|
|
283
|
-
e.
|
|
392
|
+
r = { fe: [[], []], U: [] };
|
|
393
|
+
e.U[t] = r;
|
|
284
394
|
}
|
|
285
395
|
n.stashQueues(r);
|
|
286
396
|
}
|
|
287
397
|
}
|
|
288
398
|
restoreQueues(e) {
|
|
289
|
-
this.
|
|
290
|
-
this.
|
|
291
|
-
for (let t = 0; t < e.
|
|
292
|
-
const n = e.
|
|
293
|
-
let r = this.
|
|
399
|
+
this.fe[0].push(...e.fe[0]);
|
|
400
|
+
this.fe[1].push(...e.fe[1]);
|
|
401
|
+
for (let t = 0; t < e.U.length; t++) {
|
|
402
|
+
const n = e.U[t];
|
|
403
|
+
let r = this.U[t];
|
|
294
404
|
if (r) r.restoreQueues(n);
|
|
295
405
|
}
|
|
296
406
|
}
|
|
297
407
|
}
|
|
298
408
|
class GlobalQueue extends Queue {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
J =
|
|
303
|
-
|
|
304
|
-
static
|
|
305
|
-
static
|
|
409
|
+
le = false;
|
|
410
|
+
ce = null;
|
|
411
|
+
ae = [];
|
|
412
|
+
J = [];
|
|
413
|
+
X = new Set();
|
|
414
|
+
static de;
|
|
415
|
+
static pe;
|
|
416
|
+
static he;
|
|
417
|
+
static ge = null;
|
|
306
418
|
flush() {
|
|
307
|
-
if (this.
|
|
308
|
-
this.
|
|
419
|
+
if (this.le) return;
|
|
420
|
+
this.le = true;
|
|
309
421
|
try {
|
|
310
|
-
runHeap(
|
|
311
|
-
if (
|
|
312
|
-
const e = transitionComplete(
|
|
422
|
+
runHeap(q, GlobalQueue.de);
|
|
423
|
+
if (M) {
|
|
424
|
+
const e = transitionComplete(M);
|
|
313
425
|
if (!e) {
|
|
314
|
-
const e =
|
|
315
|
-
runHeap(
|
|
316
|
-
this.
|
|
317
|
-
this.
|
|
318
|
-
this.J =
|
|
319
|
-
|
|
320
|
-
runLaneEffects(
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
426
|
+
const e = M;
|
|
427
|
+
runHeap(Q, GlobalQueue.de);
|
|
428
|
+
this.ce = null;
|
|
429
|
+
this.ae = [];
|
|
430
|
+
this.J = [];
|
|
431
|
+
this.X = new Set();
|
|
432
|
+
runLaneEffects(O);
|
|
433
|
+
runLaneEffects(v);
|
|
434
|
+
this.stashQueues(e.Se);
|
|
435
|
+
F++;
|
|
436
|
+
D = q.S >= q.j;
|
|
437
|
+
reassignPendingTransition(e.ae);
|
|
438
|
+
M = null;
|
|
439
|
+
if (!e.ie.length && !e.se.size && e.J.length) {
|
|
440
|
+
B = new Set();
|
|
441
|
+
for (let t = 0; t < e.J.length; t++) {
|
|
442
|
+
const n = e.J[t];
|
|
443
|
+
if (n.I || n.ye & d) continue;
|
|
444
|
+
B.add(n);
|
|
332
445
|
queueStashedOptimisticEffects(n);
|
|
333
446
|
}
|
|
334
447
|
}
|
|
335
448
|
try {
|
|
336
449
|
finalizePureQueue(null, true);
|
|
337
450
|
} finally {
|
|
338
|
-
|
|
451
|
+
B = null;
|
|
339
452
|
}
|
|
340
453
|
return;
|
|
341
454
|
}
|
|
342
|
-
this.
|
|
343
|
-
this.restoreQueues(
|
|
344
|
-
|
|
345
|
-
const t =
|
|
346
|
-
|
|
347
|
-
reassignPendingTransition(this.
|
|
455
|
+
this.ae !== M.ae && this.ae.push(...M.ae);
|
|
456
|
+
this.restoreQueues(M.Se);
|
|
457
|
+
H.delete(M);
|
|
458
|
+
const t = M;
|
|
459
|
+
M = null;
|
|
460
|
+
reassignPendingTransition(this.ae);
|
|
348
461
|
finalizePureQueue(t);
|
|
349
462
|
} else {
|
|
350
|
-
if (
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
463
|
+
if (canUseSimpleSyncFlush(this)) {
|
|
464
|
+
commitPendingNodes();
|
|
465
|
+
if (q.S >= q.j) {
|
|
466
|
+
runHeap(q, GlobalQueue.de);
|
|
467
|
+
commitPendingNodes();
|
|
468
|
+
}
|
|
469
|
+
} else {
|
|
470
|
+
if (H.size) runHeap(Q, GlobalQueue.de);
|
|
471
|
+
finalizePureQueue();
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
F++;
|
|
475
|
+
D = q.S >= q.j;
|
|
476
|
+
T.size && runLaneEffects(O);
|
|
477
|
+
this.run(O);
|
|
478
|
+
T.size && runLaneEffects(v);
|
|
479
|
+
this.run(v);
|
|
359
480
|
if (false);
|
|
360
481
|
} finally {
|
|
361
|
-
this.
|
|
482
|
+
this.le = false;
|
|
362
483
|
}
|
|
363
484
|
}
|
|
364
485
|
notify(e, t, n, r) {
|
|
365
|
-
if (t &
|
|
366
|
-
if (n &
|
|
367
|
-
const t = r !== undefined ? r : e.
|
|
368
|
-
if (
|
|
486
|
+
if (t & m) {
|
|
487
|
+
if (n & m) {
|
|
488
|
+
const t = r !== undefined ? r : e.we;
|
|
489
|
+
if (M && t) {
|
|
369
490
|
const n = t.source;
|
|
370
|
-
let r =
|
|
371
|
-
if (!r)
|
|
491
|
+
let r = M.se.get(n);
|
|
492
|
+
if (!r) M.se.set(n, (r = new Set()));
|
|
372
493
|
const i = r.size;
|
|
373
494
|
r.add(e);
|
|
374
495
|
if (r.size !== i) schedule();
|
|
@@ -380,135 +501,198 @@ class GlobalQueue extends Queue {
|
|
|
380
501
|
}
|
|
381
502
|
initTransition(e) {
|
|
382
503
|
if (e) e = currentTransition(e);
|
|
383
|
-
if (e && e ===
|
|
384
|
-
if (!e &&
|
|
385
|
-
if (!
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
504
|
+
if (e && e === M) return;
|
|
505
|
+
if (!e && M && M.me === F) return;
|
|
506
|
+
if (!M) {
|
|
507
|
+
M = e ?? {
|
|
508
|
+
me: F,
|
|
509
|
+
ae: [],
|
|
510
|
+
se: new Map(),
|
|
511
|
+
J: [],
|
|
512
|
+
X: new Set(),
|
|
513
|
+
ie: [],
|
|
514
|
+
Se: { fe: [[], []], U: [] },
|
|
515
|
+
re: false,
|
|
516
|
+
oe: new Set()
|
|
395
517
|
};
|
|
396
518
|
} else if (e) {
|
|
397
|
-
const t =
|
|
519
|
+
const t = M;
|
|
398
520
|
mergeTransitionState(e, t);
|
|
399
|
-
|
|
400
|
-
|
|
521
|
+
H.delete(t);
|
|
522
|
+
M = e;
|
|
401
523
|
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
if (this.
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
524
|
+
H.add(M);
|
|
525
|
+
M.me = F;
|
|
526
|
+
if (this.ce !== null) {
|
|
527
|
+
this.ce.V = M;
|
|
528
|
+
M.ae.push(this.ce);
|
|
529
|
+
this.ce = null;
|
|
530
|
+
}
|
|
531
|
+
if (this.ae !== M.ae) {
|
|
532
|
+
for (let e = 0; e < this.ae.length; e++) {
|
|
533
|
+
const t = this.ae[e];
|
|
534
|
+
t.V = M;
|
|
535
|
+
M.ae.push(t);
|
|
409
536
|
}
|
|
410
|
-
this.
|
|
537
|
+
this.ae = M.ae;
|
|
411
538
|
}
|
|
412
|
-
if (this.
|
|
413
|
-
for (let e = 0; e < this.
|
|
414
|
-
const t = this.
|
|
415
|
-
t.
|
|
416
|
-
|
|
539
|
+
if (this.J !== M.J) {
|
|
540
|
+
for (let e = 0; e < this.J.length; e++) {
|
|
541
|
+
const t = this.J[e];
|
|
542
|
+
t.V = M;
|
|
543
|
+
M.J.push(t);
|
|
417
544
|
}
|
|
418
|
-
this.
|
|
545
|
+
this.J = M.J;
|
|
419
546
|
}
|
|
420
|
-
for (const e of
|
|
421
|
-
if (!e.
|
|
547
|
+
for (const e of T) {
|
|
548
|
+
if (!e.V) e.V = M;
|
|
422
549
|
}
|
|
423
|
-
if (this.
|
|
424
|
-
for (const e of this.
|
|
425
|
-
this.
|
|
550
|
+
if (this.X !== M.X) {
|
|
551
|
+
for (const e of this.X) M.X.add(e);
|
|
552
|
+
this.X = M.X;
|
|
426
553
|
}
|
|
427
554
|
}
|
|
428
555
|
}
|
|
556
|
+
function queuePendingNode(e) {
|
|
557
|
+
if (M) {
|
|
558
|
+
z.ae.push(e);
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
561
|
+
if (z.ce === null && z.ae.length === 0) {
|
|
562
|
+
z.ce = e;
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
if (z.ce !== null) {
|
|
566
|
+
z.ae.push(z.ce);
|
|
567
|
+
z.ce = null;
|
|
568
|
+
}
|
|
569
|
+
z.ae.push(e);
|
|
570
|
+
}
|
|
429
571
|
function insertSubs(e, t = false) {
|
|
430
|
-
const n = e.
|
|
431
|
-
const r = e.
|
|
572
|
+
const n = e.H || re;
|
|
573
|
+
const r = e._e !== undefined;
|
|
432
574
|
for (let i = e.O; i !== null; i = i.P) {
|
|
433
|
-
if (r && i.
|
|
434
|
-
i.
|
|
575
|
+
if (r && i.C.ye & g) {
|
|
576
|
+
i.C.m |= f;
|
|
435
577
|
continue;
|
|
436
578
|
}
|
|
437
579
|
if (t && n) {
|
|
438
|
-
i.
|
|
439
|
-
assignOrMergeLane(i.
|
|
580
|
+
i.C.m |= l;
|
|
581
|
+
assignOrMergeLane(i.C, n);
|
|
440
582
|
} else if (t) {
|
|
441
|
-
i.
|
|
442
|
-
i.
|
|
583
|
+
i.C.m |= l;
|
|
584
|
+
i.C.H = undefined;
|
|
443
585
|
}
|
|
444
|
-
const e = i.
|
|
445
|
-
if (e
|
|
446
|
-
if (!e.
|
|
447
|
-
e.
|
|
448
|
-
e.
|
|
586
|
+
const e = i.C;
|
|
587
|
+
if (e.$ === P) {
|
|
588
|
+
if (!e.ee) {
|
|
589
|
+
e.ee = true;
|
|
590
|
+
e.te.enqueue(v, e.ne);
|
|
449
591
|
}
|
|
450
592
|
continue;
|
|
451
593
|
}
|
|
452
|
-
const s = i.
|
|
453
|
-
if (s.j > i.
|
|
454
|
-
insertIntoHeap(i.
|
|
594
|
+
const s = i.C.m & o ? Q : q;
|
|
595
|
+
if (s.j > i.C.o) s.j = i.C.o;
|
|
596
|
+
insertIntoHeap(i.C, s);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
function commitPendingNode(e) {
|
|
600
|
+
const t = e;
|
|
601
|
+
if (!t.I) {
|
|
602
|
+
if (e.Y !== x) {
|
|
603
|
+
e.ue = e.Y;
|
|
604
|
+
e.Y = x;
|
|
605
|
+
}
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
608
|
+
if (e.Y !== x) {
|
|
609
|
+
e.ue = e.Y;
|
|
610
|
+
e.Y = x;
|
|
611
|
+
if (e.$ && e.$ !== P) e.ee = true;
|
|
455
612
|
}
|
|
613
|
+
t.m &= ~a;
|
|
614
|
+
if (!(t.be & m)) t.be &= ~b;
|
|
615
|
+
if (t.Oe !== null || t.ve !== null) GlobalQueue.pe(t, false, true);
|
|
456
616
|
}
|
|
457
617
|
function commitPendingNodes() {
|
|
458
|
-
|
|
618
|
+
if (z.ce !== null) {
|
|
619
|
+
commitPendingNode(z.ce);
|
|
620
|
+
z.ce = null;
|
|
621
|
+
}
|
|
622
|
+
const e = z.ae;
|
|
459
623
|
for (let t = 0; t < e.length; t++) {
|
|
460
|
-
|
|
461
|
-
if (n.Z !== S) {
|
|
462
|
-
n.$ = n.Z;
|
|
463
|
-
n.Z = S;
|
|
464
|
-
if (n.D && n.D !== g) n.F = true;
|
|
465
|
-
}
|
|
466
|
-
if (!(n.ye & a)) n.ye &= ~h;
|
|
467
|
-
if (n.I) GlobalQueue.ue(n, false, true);
|
|
624
|
+
commitPendingNode(e[t]);
|
|
468
625
|
}
|
|
469
626
|
e.length = 0;
|
|
470
627
|
}
|
|
471
628
|
function finalizePureQueue(e = null, t = false) {
|
|
472
629
|
const n = !t;
|
|
473
630
|
if (n) commitPendingNodes();
|
|
474
|
-
if (!t) checkBoundaryChildren(
|
|
475
|
-
|
|
631
|
+
if (!t && z.U.length) checkBoundaryChildren(z);
|
|
632
|
+
const r = q.S >= q.j;
|
|
633
|
+
if (r) runHeap(q, GlobalQueue.de);
|
|
476
634
|
if (n) {
|
|
477
|
-
commitPendingNodes();
|
|
478
|
-
resolveOptimisticNodes(e ? e.
|
|
479
|
-
|
|
480
|
-
|
|
635
|
+
if (r) commitPendingNodes();
|
|
636
|
+
resolveOptimisticNodes(e ? e.J : z.J);
|
|
637
|
+
if (e && e.oe.size) {
|
|
638
|
+
for (const t of e.oe) {
|
|
639
|
+
if (t.m & u) continue;
|
|
640
|
+
if (t.$ === P) {
|
|
641
|
+
if (!t.ee) {
|
|
642
|
+
t.ee = true;
|
|
643
|
+
t.te.enqueue(v, t.ne);
|
|
644
|
+
}
|
|
645
|
+
continue;
|
|
646
|
+
}
|
|
647
|
+
const e = t.m & o ? Q : q;
|
|
648
|
+
if (e.j > t.o) e.j = t.o;
|
|
649
|
+
insertIntoHeap(t, e);
|
|
650
|
+
}
|
|
651
|
+
e.oe.clear();
|
|
652
|
+
}
|
|
653
|
+
const t = e ? e.X : z.X;
|
|
654
|
+
if (GlobalQueue.ge && t.size) {
|
|
481
655
|
for (const e of t) {
|
|
482
|
-
GlobalQueue.
|
|
656
|
+
GlobalQueue.ge(e);
|
|
483
657
|
}
|
|
484
658
|
t.clear();
|
|
485
659
|
schedule();
|
|
486
660
|
}
|
|
661
|
+
sweepTransientStoreNodes();
|
|
487
662
|
cleanupCompletedLanes(e);
|
|
488
663
|
}
|
|
489
664
|
}
|
|
490
665
|
function checkBoundaryChildren(e) {
|
|
491
|
-
for (const t of e.
|
|
666
|
+
for (const t of e.U) {
|
|
492
667
|
t.checkSources?.();
|
|
493
668
|
checkBoundaryChildren(t);
|
|
494
669
|
}
|
|
495
670
|
}
|
|
496
671
|
function trackOptimisticStore(e) {
|
|
497
|
-
|
|
672
|
+
z.X.add(e);
|
|
498
673
|
schedule();
|
|
499
674
|
}
|
|
500
675
|
function reassignPendingTransition(e) {
|
|
501
676
|
for (let t = 0; t < e.length; t++) {
|
|
502
|
-
e[t].
|
|
677
|
+
e[t].V = M;
|
|
503
678
|
}
|
|
504
679
|
}
|
|
505
|
-
const
|
|
506
|
-
function flush() {
|
|
507
|
-
if (
|
|
680
|
+
const z = new GlobalQueue();
|
|
681
|
+
function flush(e) {
|
|
682
|
+
if (e) {
|
|
683
|
+
V++;
|
|
684
|
+
try {
|
|
685
|
+
return e();
|
|
686
|
+
} finally {
|
|
687
|
+
flush();
|
|
688
|
+
V--;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
if (z.le) {
|
|
508
692
|
return;
|
|
509
693
|
}
|
|
510
|
-
while (
|
|
511
|
-
|
|
694
|
+
while (D || M) {
|
|
695
|
+
z.flush();
|
|
512
696
|
}
|
|
513
697
|
}
|
|
514
698
|
function runQueue(e, t) {
|
|
@@ -516,21 +700,21 @@ function runQueue(e, t) {
|
|
|
516
700
|
}
|
|
517
701
|
function reporterBlocksSource(e, t) {
|
|
518
702
|
if (e.m & (o | u)) return false;
|
|
519
|
-
if (e.
|
|
520
|
-
for (let n = e.
|
|
521
|
-
let e = n.
|
|
703
|
+
if (e.Pe === t || e.xe?.has(t)) return true;
|
|
704
|
+
for (let n = e.W; n; n = n.R) {
|
|
705
|
+
let e = n.A;
|
|
522
706
|
while (e) {
|
|
523
707
|
if (e === t || e.L === t) return true;
|
|
524
|
-
e = e.
|
|
708
|
+
e = e.T;
|
|
525
709
|
}
|
|
526
710
|
}
|
|
527
|
-
return !!(e.
|
|
711
|
+
return !!(e.be & m && e.we instanceof NotReadyError && e.we.source === t);
|
|
528
712
|
}
|
|
529
713
|
function transitionComplete(e) {
|
|
530
|
-
if (e.
|
|
531
|
-
if (e.
|
|
714
|
+
if (e.re) return true;
|
|
715
|
+
if (e.ie.length) return false;
|
|
532
716
|
let t = true;
|
|
533
|
-
for (const [n, r] of e.
|
|
717
|
+
for (const [n, r] of e.se) {
|
|
534
718
|
let i = false;
|
|
535
719
|
for (const e of r) {
|
|
536
720
|
if (reporterBlocksSource(e, n)) {
|
|
@@ -539,220 +723,107 @@ function transitionComplete(e) {
|
|
|
539
723
|
}
|
|
540
724
|
r.delete(e);
|
|
541
725
|
}
|
|
542
|
-
if (!i) e.
|
|
543
|
-
else if (n.
|
|
726
|
+
if (!i) e.se.delete(n);
|
|
727
|
+
else if (n.be & m && n.we?.source === n) {
|
|
544
728
|
t = false;
|
|
545
729
|
break;
|
|
546
730
|
}
|
|
547
731
|
}
|
|
548
732
|
if (t) {
|
|
549
|
-
for (let n = 0; n < e.
|
|
550
|
-
const r = e.
|
|
733
|
+
for (let n = 0; n < e.J.length; n++) {
|
|
734
|
+
const r = e.J[n];
|
|
551
735
|
if (
|
|
552
736
|
hasActiveOverride(r) &&
|
|
553
|
-
"
|
|
554
|
-
r.
|
|
555
|
-
r.
|
|
556
|
-
r.
|
|
737
|
+
"be" in r &&
|
|
738
|
+
r.be & m &&
|
|
739
|
+
r.we instanceof NotReadyError &&
|
|
740
|
+
r.we.source !== r
|
|
557
741
|
) {
|
|
558
742
|
t = false;
|
|
559
743
|
break;
|
|
560
744
|
}
|
|
561
745
|
}
|
|
562
746
|
}
|
|
563
|
-
t && (e.
|
|
747
|
+
t && (e.re = true);
|
|
564
748
|
return t;
|
|
565
749
|
}
|
|
566
750
|
function currentTransition(e) {
|
|
567
|
-
while (e.
|
|
751
|
+
while (e.re && typeof e.re === "object") e = e.re;
|
|
568
752
|
return e;
|
|
569
753
|
}
|
|
570
754
|
function setActiveTransition(e) {
|
|
571
|
-
|
|
755
|
+
M = e;
|
|
572
756
|
}
|
|
573
757
|
function runInTransition(e, t) {
|
|
574
|
-
const n =
|
|
758
|
+
const n = M;
|
|
575
759
|
try {
|
|
576
|
-
|
|
760
|
+
M = currentTransition(e);
|
|
577
761
|
return t();
|
|
578
762
|
} finally {
|
|
579
|
-
|
|
763
|
+
M = n;
|
|
580
764
|
}
|
|
581
765
|
}
|
|
582
|
-
const
|
|
583
|
-
const L = new Set();
|
|
584
|
-
function getOrCreateLane(e) {
|
|
585
|
-
let t = R.get(e);
|
|
586
|
-
if (t) {
|
|
587
|
-
return findLane(t);
|
|
588
|
-
}
|
|
589
|
-
const n = e.we;
|
|
590
|
-
const r = n?.Y ? findLane(n.Y) : null;
|
|
591
|
-
t = { te: e, H: new Set(), q: [[], []], T: null, G: C, me: r };
|
|
592
|
-
R.set(e, t);
|
|
593
|
-
L.add(t);
|
|
594
|
-
e.be = false;
|
|
595
|
-
return t;
|
|
596
|
-
}
|
|
597
|
-
function findLane(e) {
|
|
598
|
-
while (e.T) e = e.T;
|
|
599
|
-
return e;
|
|
600
|
-
}
|
|
601
|
-
function mergeLanes(e, t) {
|
|
602
|
-
e = findLane(e);
|
|
603
|
-
t = findLane(t);
|
|
604
|
-
if (e === t) return e;
|
|
605
|
-
t.T = e;
|
|
606
|
-
for (const n of t.H) e.H.add(n);
|
|
607
|
-
e.q[0].push(...t.q[0]);
|
|
608
|
-
e.q[1].push(...t.q[1]);
|
|
609
|
-
return e;
|
|
610
|
-
}
|
|
611
|
-
function resolveLane(e) {
|
|
612
|
-
const t = e.Y;
|
|
613
|
-
if (!t) return undefined;
|
|
614
|
-
const n = findLane(t);
|
|
615
|
-
if (L.has(n)) return n;
|
|
616
|
-
e.Y = undefined;
|
|
617
|
-
return undefined;
|
|
618
|
-
}
|
|
619
|
-
function resolveTransition(e) {
|
|
620
|
-
return resolveLane(e)?.G ?? e.G;
|
|
621
|
-
}
|
|
622
|
-
function hasActiveOverride(e) {
|
|
623
|
-
return !!(e.ee !== undefined && e.ee !== S);
|
|
624
|
-
}
|
|
625
|
-
function assignOrMergeLane(e, t) {
|
|
626
|
-
const n = findLane(t);
|
|
627
|
-
const r = e.Y;
|
|
628
|
-
if (r) {
|
|
629
|
-
if (r.T) {
|
|
630
|
-
e.Y = t;
|
|
631
|
-
return;
|
|
632
|
-
}
|
|
633
|
-
const i = findLane(r);
|
|
634
|
-
if (L.has(i)) {
|
|
635
|
-
if (i !== n && !hasActiveOverride(e)) {
|
|
636
|
-
if (n.me && findLane(n.me) === i) {
|
|
637
|
-
e.Y = t;
|
|
638
|
-
} else if (i.me && findLane(i.me) === n);
|
|
639
|
-
else mergeLanes(n, i);
|
|
640
|
-
}
|
|
641
|
-
return;
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
e.Y = t;
|
|
645
|
-
}
|
|
646
|
-
function unlinkSubs(e) {
|
|
647
|
-
const t = e.R;
|
|
648
|
-
const n = e.N;
|
|
649
|
-
const r = e.P;
|
|
650
|
-
const i = e._e;
|
|
651
|
-
if (r !== null) r._e = i;
|
|
652
|
-
else t.Oe = i;
|
|
653
|
-
if (i !== null) i.P = r;
|
|
654
|
-
else {
|
|
655
|
-
t.O = r;
|
|
656
|
-
if (r === null) {
|
|
657
|
-
t.xe?.();
|
|
658
|
-
t.I && !t.ve && !(t.m & o) && unobserved(t);
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
return n;
|
|
662
|
-
}
|
|
663
|
-
function unobserved(e) {
|
|
664
|
-
deleteFromHeap(e, e.m & o ? k : P);
|
|
665
|
-
let t = e.A;
|
|
666
|
-
while (t !== null) {
|
|
667
|
-
t = unlinkSubs(t);
|
|
668
|
-
}
|
|
669
|
-
e.A = null;
|
|
670
|
-
disposeChildren(e, true);
|
|
671
|
-
}
|
|
672
|
-
function link(e, t) {
|
|
673
|
-
const n = t.Pe;
|
|
674
|
-
if (n !== null && n.R === e) return;
|
|
675
|
-
let i = null;
|
|
676
|
-
const s = t.m & r;
|
|
677
|
-
if (s) {
|
|
678
|
-
i = n !== null ? n.N : t.A;
|
|
679
|
-
if (i !== null && i.R === e) {
|
|
680
|
-
t.Pe = i;
|
|
681
|
-
return;
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
const o = e.Oe;
|
|
685
|
-
if (o !== null && o.k === t && (!s || isValidLink(o, t))) return;
|
|
686
|
-
const u = (t.Pe = e.Oe = { R: e, k: t, N: i, _e: o, P: null });
|
|
687
|
-
if (n !== null) n.N = u;
|
|
688
|
-
else t.A = u;
|
|
689
|
-
if (o !== null) o.P = u;
|
|
690
|
-
else e.O = u;
|
|
691
|
-
}
|
|
692
|
-
function isValidLink(e, t) {
|
|
693
|
-
const n = t.Pe;
|
|
694
|
-
if (n !== null) {
|
|
695
|
-
let r = t.A;
|
|
696
|
-
do {
|
|
697
|
-
if (r === e) return true;
|
|
698
|
-
if (r === n) break;
|
|
699
|
-
r = r.N;
|
|
700
|
-
} while (r !== null);
|
|
701
|
-
}
|
|
702
|
-
return false;
|
|
703
|
-
}
|
|
704
|
-
const I = {};
|
|
766
|
+
const U = {};
|
|
705
767
|
function markDisposal(e) {
|
|
706
|
-
let t = e.
|
|
768
|
+
let t = e.Ce;
|
|
707
769
|
while (t) {
|
|
708
770
|
t.m |= o;
|
|
709
771
|
if (t.m & i) {
|
|
710
|
-
deleteFromHeap(t,
|
|
711
|
-
insertIntoHeap(t,
|
|
772
|
+
deleteFromHeap(t, q);
|
|
773
|
+
insertIntoHeap(t, Q);
|
|
712
774
|
}
|
|
713
775
|
markDisposal(t);
|
|
714
|
-
t = t.
|
|
776
|
+
t = t.Ne;
|
|
715
777
|
}
|
|
716
778
|
}
|
|
717
779
|
function dispose(e) {
|
|
718
|
-
let t = e.
|
|
780
|
+
let t = e.W || null;
|
|
719
781
|
do {
|
|
720
782
|
t = unlinkSubs(t);
|
|
721
783
|
} while (t !== null);
|
|
722
|
-
e.
|
|
723
|
-
e.
|
|
784
|
+
e.W = null;
|
|
785
|
+
e.Ee = null;
|
|
724
786
|
disposeChildren(e, true);
|
|
725
787
|
}
|
|
726
788
|
function disposeChildren(e, t = false, n) {
|
|
727
|
-
|
|
728
|
-
if (
|
|
729
|
-
if (t
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
789
|
+
const r = e.m;
|
|
790
|
+
if (r & u) return;
|
|
791
|
+
if (t) e.m = r | u;
|
|
792
|
+
if (t && e.I) e.ke = null;
|
|
793
|
+
let i = n ? e.Oe : e.Ce;
|
|
794
|
+
while (i) {
|
|
795
|
+
const e = i.Ne;
|
|
796
|
+
if (i.W) {
|
|
797
|
+
const e = i;
|
|
798
|
+
deleteFromHeap(e, e.m & o ? Q : q);
|
|
799
|
+
let t = e.W;
|
|
737
800
|
do {
|
|
738
801
|
t = unlinkSubs(t);
|
|
739
802
|
} while (t !== null);
|
|
740
|
-
e.
|
|
741
|
-
e.
|
|
803
|
+
e.W = null;
|
|
804
|
+
e.Ee = null;
|
|
742
805
|
}
|
|
743
|
-
disposeChildren(
|
|
744
|
-
|
|
806
|
+
disposeChildren(i, true);
|
|
807
|
+
i = e;
|
|
745
808
|
}
|
|
746
809
|
if (n) {
|
|
747
|
-
e.
|
|
810
|
+
e.Oe = null;
|
|
748
811
|
} else {
|
|
749
|
-
e.
|
|
812
|
+
e.Ce = null;
|
|
750
813
|
e.je = 0;
|
|
751
814
|
}
|
|
815
|
+
if (t && !n && !(r & o) && e.i !== null && !(e.i.m & u)) {
|
|
816
|
+
const t = e.We;
|
|
817
|
+
const n = e.Ne;
|
|
818
|
+
if (t !== null) t.Ne = n;
|
|
819
|
+
else e.i.Ce = n;
|
|
820
|
+
if (n !== null) n.We = t;
|
|
821
|
+
e.We = null;
|
|
822
|
+
}
|
|
752
823
|
runDisposal(e, n);
|
|
753
824
|
}
|
|
754
825
|
function runDisposal(e, t) {
|
|
755
|
-
let n = t ? e.
|
|
826
|
+
let n = t ? e.ve : e.Re;
|
|
756
827
|
if (!n) return;
|
|
757
828
|
if (Array.isArray(n)) {
|
|
758
829
|
for (let e = 0; e < n.length; e++) {
|
|
@@ -762,11 +833,11 @@ function runDisposal(e, t) {
|
|
|
762
833
|
} else {
|
|
763
834
|
n.call(n);
|
|
764
835
|
}
|
|
765
|
-
t ? (e.
|
|
836
|
+
t ? (e.ve = null) : (e.Re = null);
|
|
766
837
|
}
|
|
767
838
|
function childId(e, t) {
|
|
768
839
|
let n = e;
|
|
769
|
-
while (n.
|
|
840
|
+
while (n.ye & h && n.i) n = n.i;
|
|
770
841
|
if (n.id != null) return formatId(n.id, t ? n.je++ : n.je);
|
|
771
842
|
throw new Error("Cannot get child id from owner without an id");
|
|
772
843
|
}
|
|
@@ -782,110 +853,184 @@ function formatId(e, t) {
|
|
|
782
853
|
return e + (r ? String.fromCharCode(64 + r) : "") + n;
|
|
783
854
|
}
|
|
784
855
|
function getObserver() {
|
|
785
|
-
if (
|
|
786
|
-
return
|
|
856
|
+
if ($ || te) return U;
|
|
857
|
+
return X ? ne : null;
|
|
787
858
|
}
|
|
788
859
|
function getOwner() {
|
|
789
|
-
return
|
|
860
|
+
return ne;
|
|
790
861
|
}
|
|
791
862
|
function cleanup(e) {
|
|
792
|
-
if (!
|
|
793
|
-
if (!
|
|
794
|
-
else if (Array.isArray(
|
|
795
|
-
else
|
|
863
|
+
if (!ne) return e;
|
|
864
|
+
if (!ne.Re) ne.Re = e;
|
|
865
|
+
else if (Array.isArray(ne.Re)) ne.Re.push(e);
|
|
866
|
+
else ne.Re = [ne.Re, e];
|
|
796
867
|
return e;
|
|
797
868
|
}
|
|
798
869
|
function isDisposed(e) {
|
|
799
870
|
return !!(e.m & (u | o));
|
|
800
871
|
}
|
|
872
|
+
function disposeRootSelf(e = true) {
|
|
873
|
+
disposeChildren(this, e);
|
|
874
|
+
}
|
|
801
875
|
function createOwner(e) {
|
|
802
|
-
const t =
|
|
876
|
+
const t = ne;
|
|
803
877
|
const n = e?.transparent ?? false;
|
|
804
878
|
const r = {
|
|
805
879
|
id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
|
|
806
|
-
|
|
880
|
+
ye: n ? h : 0,
|
|
807
881
|
t: true,
|
|
808
882
|
u: t?.t ? t.u : t,
|
|
809
|
-
|
|
810
|
-
Ee: null,
|
|
883
|
+
Ce: null,
|
|
811
884
|
Ne: null,
|
|
812
|
-
M: t?.M ?? N,
|
|
813
|
-
Le: t?.Le || _,
|
|
814
|
-
je: 0,
|
|
815
|
-
Ae: null,
|
|
816
885
|
We: null,
|
|
886
|
+
Re: null,
|
|
887
|
+
te: t?.te ?? z,
|
|
888
|
+
Ae: t?.Ae || k,
|
|
889
|
+
je: 0,
|
|
890
|
+
ve: null,
|
|
891
|
+
Oe: null,
|
|
817
892
|
i: t,
|
|
818
|
-
dispose
|
|
819
|
-
disposeChildren(r, e);
|
|
820
|
-
}
|
|
893
|
+
dispose: disposeRootSelf
|
|
821
894
|
};
|
|
822
895
|
if (t) {
|
|
823
|
-
const e = t.
|
|
896
|
+
const e = t.Ce;
|
|
824
897
|
if (e === null) {
|
|
825
|
-
t.
|
|
898
|
+
t.Ce = r;
|
|
826
899
|
} else {
|
|
827
|
-
r.
|
|
828
|
-
|
|
900
|
+
r.Ne = e;
|
|
901
|
+
e.We = r;
|
|
902
|
+
t.Ce = r;
|
|
829
903
|
}
|
|
830
904
|
}
|
|
831
905
|
return r;
|
|
832
906
|
}
|
|
833
907
|
function createRoot(e, t) {
|
|
834
908
|
const n = createOwner(t);
|
|
835
|
-
return runWithOwner(n, () => e(n.dispose));
|
|
909
|
+
return runWithOwner(n, () => e(() => n.dispose()));
|
|
910
|
+
}
|
|
911
|
+
function unlinkSubs(e) {
|
|
912
|
+
const t = e.A;
|
|
913
|
+
const n = e.R;
|
|
914
|
+
const r = e.P;
|
|
915
|
+
const i = e.Le;
|
|
916
|
+
if (r !== null) r.Le = i;
|
|
917
|
+
else t.Ie = i;
|
|
918
|
+
if (i !== null) i.P = r;
|
|
919
|
+
else {
|
|
920
|
+
t.O = r;
|
|
921
|
+
if (r === null) {
|
|
922
|
+
t.Z?.();
|
|
923
|
+
const e = t;
|
|
924
|
+
e.I && e.ye & y && !(e.m & o) && unobserved(e);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
return n;
|
|
928
|
+
}
|
|
929
|
+
function trimStaleDeps(e) {
|
|
930
|
+
const t = e.Ee;
|
|
931
|
+
let n = t !== null ? t.R : e.W;
|
|
932
|
+
if (n !== null) {
|
|
933
|
+
do {
|
|
934
|
+
n = unlinkSubs(n);
|
|
935
|
+
} while (n !== null);
|
|
936
|
+
if (t !== null) t.R = null;
|
|
937
|
+
else e.W = null;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
function unobserved(e) {
|
|
941
|
+
deleteFromHeap(e, e.m & o ? Q : q);
|
|
942
|
+
let t = e.W;
|
|
943
|
+
while (t !== null) {
|
|
944
|
+
t = unlinkSubs(t);
|
|
945
|
+
}
|
|
946
|
+
e.W = null;
|
|
947
|
+
e.Ee = null;
|
|
948
|
+
disposeChildren(e, true);
|
|
949
|
+
}
|
|
950
|
+
function link(e, t) {
|
|
951
|
+
const n = t.Ee;
|
|
952
|
+
if (n !== null && n.A === e) return;
|
|
953
|
+
let i = null;
|
|
954
|
+
const s = t.m & r;
|
|
955
|
+
if (s) {
|
|
956
|
+
i = n !== null ? n.R : t.W;
|
|
957
|
+
if (i !== null && i.A === e) {
|
|
958
|
+
t.Ee = i;
|
|
959
|
+
return;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
const o = e.Ie;
|
|
963
|
+
if (o !== null && o.C === t && (!s || isValidLink(o, t))) return;
|
|
964
|
+
const u = (t.Ee = e.Ie = { A: e, C: t, R: i, Le: o, P: null });
|
|
965
|
+
if (n !== null) n.R = u;
|
|
966
|
+
else t.W = u;
|
|
967
|
+
if (o !== null) o.P = u;
|
|
968
|
+
else e.O = u;
|
|
969
|
+
}
|
|
970
|
+
function isValidLink(e, t) {
|
|
971
|
+
const n = t.Ee;
|
|
972
|
+
if (n !== null) {
|
|
973
|
+
let r = t.W;
|
|
974
|
+
do {
|
|
975
|
+
if (r === e) return true;
|
|
976
|
+
if (r === n) break;
|
|
977
|
+
r = r.R;
|
|
978
|
+
} while (r !== null);
|
|
979
|
+
}
|
|
980
|
+
return false;
|
|
836
981
|
}
|
|
837
982
|
function addPendingSource(e, t) {
|
|
838
|
-
if (e.
|
|
839
|
-
if (!e.
|
|
840
|
-
e.
|
|
983
|
+
if (e.Pe === t || e.xe?.has(t)) return false;
|
|
984
|
+
if (!e.Pe) {
|
|
985
|
+
e.Pe = t;
|
|
841
986
|
return true;
|
|
842
987
|
}
|
|
843
|
-
if (!e.
|
|
844
|
-
e.
|
|
988
|
+
if (!e.xe) {
|
|
989
|
+
e.xe = new Set([e.Pe, t]);
|
|
845
990
|
} else {
|
|
846
|
-
e.
|
|
991
|
+
e.xe.add(t);
|
|
847
992
|
}
|
|
848
|
-
e.
|
|
993
|
+
e.Pe = undefined;
|
|
849
994
|
return true;
|
|
850
995
|
}
|
|
851
996
|
function removePendingSource(e, t) {
|
|
852
|
-
if (e.
|
|
853
|
-
if (e.
|
|
854
|
-
e.
|
|
997
|
+
if (e.Pe) {
|
|
998
|
+
if (e.Pe !== t) return false;
|
|
999
|
+
e.Pe = undefined;
|
|
855
1000
|
return true;
|
|
856
1001
|
}
|
|
857
|
-
if (!e.
|
|
858
|
-
if (e.
|
|
859
|
-
e.
|
|
860
|
-
e.
|
|
861
|
-
} else if (e.
|
|
862
|
-
e.
|
|
1002
|
+
if (!e.xe?.delete(t)) return false;
|
|
1003
|
+
if (e.xe.size === 1) {
|
|
1004
|
+
e.Pe = e.xe.values().next().value;
|
|
1005
|
+
e.xe = undefined;
|
|
1006
|
+
} else if (e.xe.size === 0) {
|
|
1007
|
+
e.xe = undefined;
|
|
863
1008
|
}
|
|
864
1009
|
return true;
|
|
865
1010
|
}
|
|
866
1011
|
function clearPendingSources(e) {
|
|
867
|
-
e.
|
|
868
|
-
e.
|
|
869
|
-
e.
|
|
1012
|
+
e.Pe = undefined;
|
|
1013
|
+
e.xe?.clear();
|
|
1014
|
+
e.xe = undefined;
|
|
870
1015
|
}
|
|
871
1016
|
function setPendingError(e, t, n) {
|
|
872
1017
|
if (!t) {
|
|
873
|
-
e.
|
|
1018
|
+
e.we = null;
|
|
874
1019
|
return;
|
|
875
1020
|
}
|
|
876
1021
|
if (n instanceof NotReadyError && n.source === t) {
|
|
877
|
-
e.
|
|
1022
|
+
e.we = n;
|
|
878
1023
|
return;
|
|
879
1024
|
}
|
|
880
|
-
const r = e.
|
|
1025
|
+
const r = e.we;
|
|
881
1026
|
if (!(r instanceof NotReadyError) || r.source !== t) {
|
|
882
|
-
e.
|
|
1027
|
+
e.we = new NotReadyError(t);
|
|
883
1028
|
}
|
|
884
1029
|
}
|
|
885
1030
|
function forEachDependent(e, t) {
|
|
886
|
-
for (let n = e.O; n !== null; n = n.P) t(n.
|
|
887
|
-
for (let n = e.
|
|
888
|
-
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.C);
|
|
1032
|
+
for (let n = e.N; n !== null; n = n.k) {
|
|
1033
|
+
for (let e = n.O; e !== null; e = e.P) t(e.C);
|
|
889
1034
|
}
|
|
890
1035
|
}
|
|
891
1036
|
function settlePendingSource(e) {
|
|
@@ -894,30 +1039,30 @@ function settlePendingSource(e) {
|
|
|
894
1039
|
const settle = r => {
|
|
895
1040
|
if (n.has(r) || !removePendingSource(r, e)) return;
|
|
896
1041
|
n.add(r);
|
|
897
|
-
r.
|
|
898
|
-
const i = r.
|
|
1042
|
+
r.me = F;
|
|
1043
|
+
const i = r.Pe ?? r.xe?.values().next().value;
|
|
899
1044
|
if (i) {
|
|
900
1045
|
setPendingError(r, i);
|
|
901
1046
|
updatePendingSignal(r);
|
|
902
1047
|
} else {
|
|
903
|
-
r.
|
|
1048
|
+
r.be &= ~m;
|
|
904
1049
|
setPendingError(r);
|
|
905
1050
|
updatePendingSignal(r);
|
|
906
|
-
if (r.
|
|
907
|
-
if (r
|
|
1051
|
+
if (r.Te) {
|
|
1052
|
+
if (r.$ === P) {
|
|
908
1053
|
const e = r;
|
|
909
|
-
if (!e.
|
|
910
|
-
e.
|
|
911
|
-
e.
|
|
1054
|
+
if (!e.ee) {
|
|
1055
|
+
e.ee = true;
|
|
1056
|
+
e.te.enqueue(v, e.ne);
|
|
912
1057
|
}
|
|
913
1058
|
} else {
|
|
914
|
-
const e = r.m & o ?
|
|
1059
|
+
const e = r.m & o ? Q : q;
|
|
915
1060
|
if (e.j > r.o) e.j = r.o;
|
|
916
1061
|
insertIntoHeap(r, e);
|
|
917
1062
|
}
|
|
918
1063
|
t = true;
|
|
919
1064
|
}
|
|
920
|
-
r.
|
|
1065
|
+
r.Te = false;
|
|
921
1066
|
}
|
|
922
1067
|
forEachDependent(r, settle);
|
|
923
1068
|
};
|
|
@@ -925,46 +1070,52 @@ function settlePendingSource(e) {
|
|
|
925
1070
|
if (t) schedule();
|
|
926
1071
|
}
|
|
927
1072
|
function handleAsync(e, t, r) {
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
1073
|
+
let i = false;
|
|
1074
|
+
let s = false;
|
|
1075
|
+
if (typeof t === "object" && t !== null) {
|
|
1076
|
+
untrack(() => {
|
|
1077
|
+
i = t[Symbol.asyncIterator];
|
|
1078
|
+
s = !i && typeof t.then === "function";
|
|
1079
|
+
});
|
|
1080
|
+
}
|
|
1081
|
+
if (!s && !i) {
|
|
1082
|
+
e.ke = null;
|
|
933
1083
|
return t;
|
|
934
1084
|
}
|
|
935
|
-
e.
|
|
936
|
-
let
|
|
1085
|
+
e.ke = t;
|
|
1086
|
+
let o;
|
|
937
1087
|
const handleError = n => {
|
|
938
|
-
if (e.
|
|
939
|
-
|
|
940
|
-
notifyStatus(e, n instanceof NotReadyError ?
|
|
941
|
-
e.
|
|
1088
|
+
if (e.ke !== t) return;
|
|
1089
|
+
z.initTransition(resolveTransition(e));
|
|
1090
|
+
notifyStatus(e, n instanceof NotReadyError ? m : _, n);
|
|
1091
|
+
e.me = F;
|
|
942
1092
|
};
|
|
943
1093
|
const asyncWrite = (i, s) => {
|
|
944
|
-
if (e.
|
|
945
|
-
if (e.m & (n |
|
|
946
|
-
|
|
947
|
-
const o = !!(e.
|
|
1094
|
+
if (e.ke !== t) return;
|
|
1095
|
+
if (e.m & (n | l)) return;
|
|
1096
|
+
z.initTransition(resolveTransition(e));
|
|
1097
|
+
const o = !!(e.be & b);
|
|
1098
|
+
trimStaleDeps(e);
|
|
948
1099
|
clearStatus(e);
|
|
949
1100
|
const u = resolveLane(e);
|
|
950
|
-
if (u) u.
|
|
1101
|
+
if (u) u.F.delete(e);
|
|
951
1102
|
if (r) r(i);
|
|
952
|
-
else if (e.
|
|
953
|
-
if (e.
|
|
1103
|
+
else if (e.G !== undefined) {
|
|
1104
|
+
if (e.G !== undefined && e.G !== x) e.Y = i;
|
|
954
1105
|
else {
|
|
955
|
-
e
|
|
1106
|
+
e.ue = i;
|
|
956
1107
|
insertSubs(e);
|
|
957
1108
|
}
|
|
958
|
-
e.
|
|
1109
|
+
e.me = F;
|
|
959
1110
|
} else if (u) {
|
|
960
|
-
const t = e
|
|
961
|
-
const n = e
|
|
962
|
-
const r = e.
|
|
1111
|
+
const t = e.$;
|
|
1112
|
+
const n = e.ue;
|
|
1113
|
+
const r = e.He;
|
|
963
1114
|
if ((!t && o) || !r || !r(i, n)) {
|
|
964
|
-
e
|
|
965
|
-
e.
|
|
966
|
-
if (e.
|
|
967
|
-
setSignal(e.
|
|
1115
|
+
e.ue = i;
|
|
1116
|
+
e.me = F;
|
|
1117
|
+
if (e.qe) {
|
|
1118
|
+
setSignal(e.qe, i);
|
|
968
1119
|
}
|
|
969
1120
|
insertSubs(e, true);
|
|
970
1121
|
}
|
|
@@ -976,13 +1127,13 @@ function handleAsync(e, t, r) {
|
|
|
976
1127
|
flush();
|
|
977
1128
|
s?.();
|
|
978
1129
|
};
|
|
979
|
-
if (
|
|
1130
|
+
if (s) {
|
|
980
1131
|
let n = false,
|
|
981
1132
|
r = true;
|
|
982
1133
|
t.then(
|
|
983
1134
|
e => {
|
|
984
1135
|
if (r) {
|
|
985
|
-
|
|
1136
|
+
o = e;
|
|
986
1137
|
n = true;
|
|
987
1138
|
} else asyncWrite(e);
|
|
988
1139
|
},
|
|
@@ -992,11 +1143,11 @@ function handleAsync(e, t, r) {
|
|
|
992
1143
|
);
|
|
993
1144
|
r = false;
|
|
994
1145
|
if (!n) {
|
|
995
|
-
|
|
996
|
-
throw new NotReadyError(
|
|
1146
|
+
z.initTransition(resolveTransition(e));
|
|
1147
|
+
throw new NotReadyError(ne);
|
|
997
1148
|
}
|
|
998
1149
|
}
|
|
999
|
-
if (
|
|
1150
|
+
if (i) {
|
|
1000
1151
|
const n = t[Symbol.asyncIterator]();
|
|
1001
1152
|
let r = false;
|
|
1002
1153
|
let i = false;
|
|
@@ -1012,15 +1163,15 @@ function handleAsync(e, t, r) {
|
|
|
1012
1163
|
});
|
|
1013
1164
|
const iterate = () => {
|
|
1014
1165
|
let s,
|
|
1015
|
-
|
|
1016
|
-
|
|
1166
|
+
u = false,
|
|
1167
|
+
l = true;
|
|
1017
1168
|
n.next().then(
|
|
1018
1169
|
n => {
|
|
1019
|
-
if (
|
|
1170
|
+
if (l) {
|
|
1020
1171
|
s = n;
|
|
1021
|
-
|
|
1172
|
+
u = true;
|
|
1022
1173
|
if (n.done) i = true;
|
|
1023
|
-
} else if (e.
|
|
1174
|
+
} else if (e.ke !== t) {
|
|
1024
1175
|
return;
|
|
1025
1176
|
} else if (!n.done) asyncWrite(n.value, iterate);
|
|
1026
1177
|
else {
|
|
@@ -1030,88 +1181,88 @@ function handleAsync(e, t, r) {
|
|
|
1030
1181
|
}
|
|
1031
1182
|
},
|
|
1032
1183
|
n => {
|
|
1033
|
-
if (!
|
|
1184
|
+
if (!l && e.ke === t) {
|
|
1034
1185
|
i = true;
|
|
1035
1186
|
handleError(n);
|
|
1036
1187
|
}
|
|
1037
1188
|
}
|
|
1038
1189
|
);
|
|
1039
|
-
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
1190
|
+
l = false;
|
|
1191
|
+
if (u && !s.done) {
|
|
1192
|
+
o = s.value;
|
|
1042
1193
|
r = true;
|
|
1043
1194
|
return iterate();
|
|
1044
1195
|
}
|
|
1045
|
-
return
|
|
1196
|
+
return u && s.done;
|
|
1046
1197
|
};
|
|
1047
1198
|
const s = iterate();
|
|
1048
1199
|
if (!r && !s) {
|
|
1049
|
-
|
|
1050
|
-
throw new NotReadyError(
|
|
1200
|
+
z.initTransition(resolveTransition(e));
|
|
1201
|
+
throw new NotReadyError(ne);
|
|
1051
1202
|
}
|
|
1052
1203
|
}
|
|
1053
|
-
return
|
|
1204
|
+
return o;
|
|
1054
1205
|
}
|
|
1055
1206
|
function clearStatus(e, t = false) {
|
|
1056
|
-
clearPendingSources(e);
|
|
1057
|
-
e.
|
|
1058
|
-
e.
|
|
1059
|
-
setPendingError(e);
|
|
1060
|
-
updatePendingSignal(e);
|
|
1061
|
-
e.
|
|
1207
|
+
if (e.Pe || e.xe) clearPendingSources(e);
|
|
1208
|
+
if (e.Te) e.Te = false;
|
|
1209
|
+
e.be = t ? 0 : e.be & b;
|
|
1210
|
+
if (e.we) setPendingError(e);
|
|
1211
|
+
if (e.Qe) updatePendingSignal(e);
|
|
1212
|
+
if (e.Fe) e.Fe();
|
|
1062
1213
|
}
|
|
1063
1214
|
function notifyStatus(e, t, n, r, i) {
|
|
1064
|
-
if (t ===
|
|
1215
|
+
if (t === _ && !(n instanceof StatusError) && !(n instanceof NotReadyError))
|
|
1065
1216
|
n = new StatusError(e, n);
|
|
1066
|
-
const s = t ===
|
|
1217
|
+
const s = t === m && n instanceof NotReadyError ? n.source : undefined;
|
|
1067
1218
|
const o = s === e;
|
|
1068
|
-
const u = t ===
|
|
1069
|
-
const
|
|
1219
|
+
const u = t === m && e.G !== undefined && !o;
|
|
1220
|
+
const l = u && hasActiveOverride(e);
|
|
1070
1221
|
if (!r) {
|
|
1071
|
-
if (t ===
|
|
1222
|
+
if (t === m && s) {
|
|
1072
1223
|
addPendingSource(e, s);
|
|
1073
|
-
e.
|
|
1224
|
+
e.be = m | (e.be & b);
|
|
1074
1225
|
setPendingError(e, s, n);
|
|
1075
1226
|
} else {
|
|
1076
1227
|
clearPendingSources(e);
|
|
1077
|
-
e.
|
|
1078
|
-
e.
|
|
1228
|
+
e.be = t | (t !== _ ? e.be & b : 0);
|
|
1229
|
+
e.we = n;
|
|
1079
1230
|
}
|
|
1080
1231
|
updatePendingSignal(e);
|
|
1081
1232
|
}
|
|
1082
1233
|
if (i && !r) {
|
|
1083
1234
|
assignOrMergeLane(e, i);
|
|
1084
1235
|
}
|
|
1085
|
-
const
|
|
1236
|
+
const f = r || l;
|
|
1086
1237
|
const c = r || u ? undefined : i;
|
|
1087
|
-
if (e.
|
|
1088
|
-
if (r && t ===
|
|
1238
|
+
if (e.Fe) {
|
|
1239
|
+
if (r && t === m) {
|
|
1089
1240
|
return;
|
|
1090
1241
|
}
|
|
1091
|
-
if (
|
|
1092
|
-
e.
|
|
1242
|
+
if (f) {
|
|
1243
|
+
e.Fe(t, n);
|
|
1093
1244
|
} else {
|
|
1094
|
-
e.
|
|
1245
|
+
e.Fe();
|
|
1095
1246
|
}
|
|
1096
1247
|
return;
|
|
1097
1248
|
}
|
|
1098
1249
|
forEachDependent(e, e => {
|
|
1099
|
-
e.
|
|
1250
|
+
e.me = F;
|
|
1100
1251
|
if (
|
|
1101
|
-
(t ===
|
|
1102
|
-
(t !==
|
|
1252
|
+
(t === m && s && e.Pe !== s && !e.xe?.has(s)) ||
|
|
1253
|
+
(t !== m && (e.we !== n || e.Pe || e.xe))
|
|
1103
1254
|
) {
|
|
1104
|
-
if (!
|
|
1105
|
-
notifyStatus(e, t, n,
|
|
1255
|
+
if (!f && !e.V) queuePendingNode(e);
|
|
1256
|
+
notifyStatus(e, t, n, f, c);
|
|
1106
1257
|
}
|
|
1107
1258
|
});
|
|
1108
1259
|
}
|
|
1109
|
-
let
|
|
1260
|
+
let J = null;
|
|
1110
1261
|
function enableExternalSource(e) {
|
|
1111
1262
|
const { factory: t, untrack: n = e => e() } = e;
|
|
1112
|
-
if (
|
|
1113
|
-
const { factory: e, untrack: r } =
|
|
1114
|
-
|
|
1263
|
+
if (J) {
|
|
1264
|
+
const { factory: e, untrack: r } = J;
|
|
1265
|
+
J = {
|
|
1115
1266
|
factory: (n, r) => {
|
|
1116
1267
|
const i = e(n, r);
|
|
1117
1268
|
const s = t(e => i.track(e), r);
|
|
@@ -1126,174 +1277,201 @@ function enableExternalSource(e) {
|
|
|
1126
1277
|
untrack: e => r(() => n(e))
|
|
1127
1278
|
};
|
|
1128
1279
|
} else {
|
|
1129
|
-
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
GlobalQueue.
|
|
1133
|
-
GlobalQueue.
|
|
1134
|
-
let
|
|
1135
|
-
let
|
|
1136
|
-
let
|
|
1137
|
-
let
|
|
1138
|
-
let
|
|
1139
|
-
let
|
|
1140
|
-
let
|
|
1141
|
-
let
|
|
1142
|
-
let
|
|
1143
|
-
let
|
|
1280
|
+
J = { factory: t, untrack: n };
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
GlobalQueue.de = recompute;
|
|
1284
|
+
GlobalQueue.pe = disposeChildren;
|
|
1285
|
+
let X = false;
|
|
1286
|
+
let Y = false;
|
|
1287
|
+
let Z = false;
|
|
1288
|
+
let $ = false;
|
|
1289
|
+
let ee = false;
|
|
1290
|
+
let te = false;
|
|
1291
|
+
let ne = null;
|
|
1292
|
+
let re = null;
|
|
1293
|
+
let ie = false;
|
|
1294
|
+
let se = null;
|
|
1144
1295
|
function ownerInSnapshotScope(e) {
|
|
1145
1296
|
while (e) {
|
|
1146
|
-
if (e.
|
|
1297
|
+
if (e.Me) return true;
|
|
1147
1298
|
e = e.i;
|
|
1148
1299
|
}
|
|
1149
1300
|
return false;
|
|
1150
1301
|
}
|
|
1151
1302
|
function setSnapshotCapture(e) {
|
|
1152
|
-
|
|
1153
|
-
if (e && !
|
|
1303
|
+
ie = e;
|
|
1304
|
+
if (e && !se) se = new Set();
|
|
1154
1305
|
}
|
|
1155
1306
|
function markSnapshotScope(e) {
|
|
1156
|
-
e.
|
|
1307
|
+
e.Me = true;
|
|
1157
1308
|
}
|
|
1158
1309
|
function releaseSnapshotScope(e) {
|
|
1159
|
-
e.
|
|
1310
|
+
e.Me = false;
|
|
1160
1311
|
releaseSubtree(e);
|
|
1161
1312
|
schedule();
|
|
1162
1313
|
}
|
|
1163
1314
|
function releaseSubtree(e) {
|
|
1164
|
-
let t = e.
|
|
1315
|
+
let t = e.Ce;
|
|
1165
1316
|
while (t) {
|
|
1166
|
-
if (t.
|
|
1167
|
-
t = t.
|
|
1317
|
+
if (t.Me) {
|
|
1318
|
+
t = t.Ne;
|
|
1168
1319
|
continue;
|
|
1169
1320
|
}
|
|
1170
1321
|
if (t.I) {
|
|
1171
1322
|
const e = t;
|
|
1172
|
-
e.
|
|
1173
|
-
if (e.m &
|
|
1174
|
-
e.m &= ~
|
|
1323
|
+
e.ye &= ~g;
|
|
1324
|
+
if (e.m & f) {
|
|
1325
|
+
e.m &= ~f;
|
|
1175
1326
|
e.m |= n;
|
|
1176
|
-
if (
|
|
1177
|
-
insertIntoHeap(e,
|
|
1327
|
+
if (q.j > e.o) q.j = e.o;
|
|
1328
|
+
insertIntoHeap(e, q);
|
|
1178
1329
|
}
|
|
1179
1330
|
}
|
|
1180
1331
|
releaseSubtree(t);
|
|
1181
|
-
t = t.
|
|
1332
|
+
t = t.Ne;
|
|
1182
1333
|
}
|
|
1183
1334
|
}
|
|
1184
1335
|
function clearSnapshots() {
|
|
1185
|
-
if (
|
|
1186
|
-
for (const e of
|
|
1187
|
-
delete e.
|
|
1188
|
-
delete e[
|
|
1336
|
+
if (se) {
|
|
1337
|
+
for (const e of se) {
|
|
1338
|
+
delete e._e;
|
|
1339
|
+
delete e[N];
|
|
1189
1340
|
}
|
|
1190
|
-
|
|
1341
|
+
se = null;
|
|
1191
1342
|
}
|
|
1192
|
-
|
|
1343
|
+
ie = false;
|
|
1193
1344
|
}
|
|
1194
1345
|
function recompute(t, n = false) {
|
|
1195
|
-
const i = t
|
|
1346
|
+
const i = t.$;
|
|
1196
1347
|
if (!n) {
|
|
1197
|
-
if (t.
|
|
1198
|
-
deleteFromHeap(t, t.m & o ?
|
|
1199
|
-
t.
|
|
1200
|
-
if (t.
|
|
1201
|
-
else {
|
|
1348
|
+
if (t.V && (!i || M) && M !== t.V) z.initTransition(t.V);
|
|
1349
|
+
deleteFromHeap(t, t.m & o ? Q : q);
|
|
1350
|
+
t.ke = null;
|
|
1351
|
+
if (t.V || i === P) disposeChildren(t);
|
|
1352
|
+
else if (t.Ce !== null || t.Re !== null) {
|
|
1202
1353
|
markDisposal(t);
|
|
1203
|
-
t.
|
|
1204
|
-
t.
|
|
1205
|
-
t.
|
|
1206
|
-
t.
|
|
1354
|
+
t.ve = t.Re;
|
|
1355
|
+
t.Oe = t.Ce;
|
|
1356
|
+
t.Re = null;
|
|
1357
|
+
t.Ce = null;
|
|
1207
1358
|
t.je = 0;
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
const u = t.
|
|
1212
|
-
const c = !!(t.
|
|
1213
|
-
const
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1216
|
-
t.
|
|
1359
|
+
} else;
|
|
1360
|
+
}
|
|
1361
|
+
let s = !!(t.m & l);
|
|
1362
|
+
const u = t.G !== undefined && t.G !== x;
|
|
1363
|
+
const c = !!(t.be & m);
|
|
1364
|
+
const a = !!(t.be & b);
|
|
1365
|
+
const d = ne;
|
|
1366
|
+
ne = t;
|
|
1367
|
+
t.Ee = null;
|
|
1217
1368
|
t.m = r;
|
|
1218
|
-
t.
|
|
1219
|
-
let
|
|
1220
|
-
let
|
|
1221
|
-
let
|
|
1222
|
-
let
|
|
1223
|
-
|
|
1369
|
+
t.me = F;
|
|
1370
|
+
let p = t.Y === x ? t.ue : t.Y;
|
|
1371
|
+
let h = t.o;
|
|
1372
|
+
let g = X;
|
|
1373
|
+
let S = re;
|
|
1374
|
+
X = true;
|
|
1224
1375
|
if (s) {
|
|
1225
1376
|
const e = resolveLane(t);
|
|
1226
|
-
if (e)
|
|
1377
|
+
if (e) re = e;
|
|
1378
|
+
} else if (M && !n && M.J.length) {
|
|
1379
|
+
for (let e = t.W; e; e = e.R) {
|
|
1380
|
+
const n = e.A;
|
|
1381
|
+
if (n.m & l) {
|
|
1382
|
+
const e = resolveLane(n);
|
|
1383
|
+
if (e) {
|
|
1384
|
+
s = true;
|
|
1385
|
+
re = e;
|
|
1386
|
+
t.m |= l;
|
|
1387
|
+
assignOrMergeLane(t, e);
|
|
1388
|
+
break;
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1227
1392
|
}
|
|
1393
|
+
const y = i && i !== v;
|
|
1394
|
+
const O = Y;
|
|
1395
|
+
if (y) Y = true;
|
|
1228
1396
|
try {
|
|
1229
|
-
|
|
1397
|
+
if (!false && t.ye & w) {
|
|
1398
|
+
p = t.I(p);
|
|
1399
|
+
t.ke = null;
|
|
1400
|
+
} else {
|
|
1401
|
+
const e = t.ke;
|
|
1402
|
+
const n = t.I(p);
|
|
1403
|
+
const r = typeof n === "object" && n !== null;
|
|
1404
|
+
const i = t.ke !== e;
|
|
1405
|
+
p = i || !r ? n : handleAsync(t, n);
|
|
1406
|
+
if (!i && !r) t.ke = null;
|
|
1407
|
+
}
|
|
1230
1408
|
clearStatus(t, n);
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
e
|
|
1234
|
-
|
|
1409
|
+
if (t.H) {
|
|
1410
|
+
const e = resolveLane(t);
|
|
1411
|
+
if (e) {
|
|
1412
|
+
e.F.delete(t);
|
|
1413
|
+
updatePendingSignal(e.q);
|
|
1414
|
+
}
|
|
1235
1415
|
}
|
|
1236
1416
|
} catch (e) {
|
|
1237
|
-
if (e instanceof NotReadyError &&
|
|
1238
|
-
const e = findLane(
|
|
1239
|
-
if (e.
|
|
1240
|
-
e.
|
|
1241
|
-
t.
|
|
1242
|
-
updatePendingSignal(e.
|
|
1417
|
+
if (e instanceof NotReadyError && re) {
|
|
1418
|
+
const e = findLane(re);
|
|
1419
|
+
if (e.q !== t) {
|
|
1420
|
+
e.F.add(t);
|
|
1421
|
+
t.H = e;
|
|
1422
|
+
updatePendingSignal(e.q);
|
|
1243
1423
|
}
|
|
1244
1424
|
}
|
|
1245
|
-
if (e instanceof NotReadyError) t.
|
|
1425
|
+
if (e instanceof NotReadyError) t.Te = true;
|
|
1246
1426
|
notifyStatus(
|
|
1247
1427
|
t,
|
|
1248
|
-
e instanceof NotReadyError ?
|
|
1428
|
+
e instanceof NotReadyError ? m : _,
|
|
1249
1429
|
e,
|
|
1250
1430
|
undefined,
|
|
1251
|
-
e instanceof NotReadyError ? t.
|
|
1431
|
+
e instanceof NotReadyError ? t.H : undefined
|
|
1252
1432
|
);
|
|
1253
1433
|
} finally {
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
if (
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
const e = u ? t.ee : undefined;
|
|
1272
|
-
if (n || (i && C !== t.G) || s) {
|
|
1273
|
-
t.$ = w;
|
|
1434
|
+
X = g;
|
|
1435
|
+
if (y) Y = O;
|
|
1436
|
+
t.m = e | (n ? t.m & f : 0);
|
|
1437
|
+
ne = d;
|
|
1438
|
+
}
|
|
1439
|
+
if (!t.we) {
|
|
1440
|
+
trimStaleDeps(t);
|
|
1441
|
+
const e = u ? t.G : t.Y === x ? t.ue : t.Y;
|
|
1442
|
+
const r = (!i && a) || !t.He || !t.He(e, p);
|
|
1443
|
+
if (i && r) {
|
|
1444
|
+
t.ee = !t.we;
|
|
1445
|
+
if (!n) t.te.enqueue(i, GlobalQueue.he.bind(null, t));
|
|
1446
|
+
}
|
|
1447
|
+
if (r) {
|
|
1448
|
+
const e = u ? t.G : undefined;
|
|
1449
|
+
if (n || (i && M !== t.V) || s) {
|
|
1450
|
+
t.ue = p;
|
|
1274
1451
|
if (u && s) {
|
|
1275
|
-
t.
|
|
1276
|
-
t.
|
|
1452
|
+
t.G = p;
|
|
1453
|
+
t.Y = p;
|
|
1277
1454
|
}
|
|
1278
|
-
} else t.
|
|
1279
|
-
if (u && !s && c && !t.
|
|
1280
|
-
if (!u || s || t.
|
|
1455
|
+
} else t.Y = p;
|
|
1456
|
+
if (u && !s && c && !t.B) t.G = p;
|
|
1457
|
+
if (!u || s || t.G !== e) insertSubs(t, s || u);
|
|
1281
1458
|
} else if (u) {
|
|
1282
|
-
t.
|
|
1283
|
-
} else if (t.o !=
|
|
1459
|
+
t.Y = p;
|
|
1460
|
+
} else if (t.o != h) {
|
|
1284
1461
|
for (let e = t.O; e !== null; e = e.P) {
|
|
1285
|
-
insertIntoHeapHeight(e.
|
|
1462
|
+
insertIntoHeapHeight(e.C, e.C.m & o ? Q : q);
|
|
1286
1463
|
}
|
|
1287
1464
|
}
|
|
1288
1465
|
}
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
t.
|
|
1466
|
+
re = S;
|
|
1467
|
+
const C = t.Y !== x || t.Oe !== null || t.ve !== null || !!(t.be & (m | b));
|
|
1468
|
+
C && (!n || t.be & m) && !t.V && !(M && u) && queuePendingNode(t);
|
|
1469
|
+
t.V && i && M !== t.V && runInTransition(t.V, () => recompute(t));
|
|
1292
1470
|
}
|
|
1293
1471
|
function updateIfNecessary(e) {
|
|
1294
1472
|
if (e.m & t) {
|
|
1295
|
-
for (let t = e.
|
|
1296
|
-
const r = t.
|
|
1473
|
+
for (let t = e.W; t; t = t.R) {
|
|
1474
|
+
const r = t.A;
|
|
1297
1475
|
const i = r.L || r;
|
|
1298
1476
|
if (i.I) {
|
|
1299
1477
|
updateIfNecessary(i);
|
|
@@ -1303,245 +1481,328 @@ function updateIfNecessary(e) {
|
|
|
1303
1481
|
}
|
|
1304
1482
|
}
|
|
1305
1483
|
}
|
|
1306
|
-
if (e.m & (n |
|
|
1484
|
+
if (e.m & (n | l) || (e.we && e.me < F && !e.ke)) {
|
|
1307
1485
|
recompute(e);
|
|
1308
1486
|
}
|
|
1309
|
-
e.m = e.m & (
|
|
1310
|
-
}
|
|
1311
|
-
function computed(t, n
|
|
1312
|
-
const
|
|
1313
|
-
const
|
|
1314
|
-
id:
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1487
|
+
e.m = e.m & (f | i | s);
|
|
1488
|
+
}
|
|
1489
|
+
function computed(t, n) {
|
|
1490
|
+
const r = n?.transparent ?? false;
|
|
1491
|
+
const i = {
|
|
1492
|
+
id: n?.id ?? (r ? ne?.id : ne?.id != null ? getNextChildId(ne) : undefined),
|
|
1493
|
+
ye:
|
|
1494
|
+
(r ? h : 0) |
|
|
1495
|
+
(n?.ownedWrite ? d : 0) |
|
|
1496
|
+
(!ne || n?.lazy ? y : 0) |
|
|
1497
|
+
(n?.sync ? w : 0) |
|
|
1498
|
+
(ie && ownerInSnapshotScope(ne) ? g : 0),
|
|
1499
|
+
He: n?.equals != null ? n.equals : isEqual,
|
|
1500
|
+
Z: n?.unobserved,
|
|
1501
|
+
Re: null,
|
|
1502
|
+
te: ne?.te ?? z,
|
|
1503
|
+
Ae: ne?.Ae ?? k,
|
|
1322
1504
|
je: 0,
|
|
1323
1505
|
I: t,
|
|
1324
|
-
|
|
1506
|
+
ue: undefined,
|
|
1325
1507
|
o: 0,
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1508
|
+
N: null,
|
|
1509
|
+
h: undefined,
|
|
1510
|
+
p: null,
|
|
1511
|
+
W: null,
|
|
1512
|
+
Ee: null,
|
|
1331
1513
|
O: null,
|
|
1514
|
+
Ie: null,
|
|
1515
|
+
i: ne,
|
|
1516
|
+
Ne: null,
|
|
1517
|
+
We: null,
|
|
1518
|
+
Ce: null,
|
|
1519
|
+
m: n?.lazy ? c : e,
|
|
1520
|
+
be: b,
|
|
1521
|
+
me: F,
|
|
1522
|
+
Y: x,
|
|
1523
|
+
ve: null,
|
|
1332
1524
|
Oe: null,
|
|
1333
|
-
i: V,
|
|
1334
|
-
Ee: null,
|
|
1335
1525
|
ke: null,
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1526
|
+
V: null
|
|
1527
|
+
};
|
|
1528
|
+
setupComputedNode(i, n);
|
|
1529
|
+
return i;
|
|
1530
|
+
}
|
|
1531
|
+
function createEffectNode(e, t, n, r, i, s) {
|
|
1532
|
+
const o = s?.transparent ?? false;
|
|
1533
|
+
const u = {
|
|
1534
|
+
id: s?.id ?? (o ? ne?.id : ne?.id != null ? getNextChildId(ne) : undefined),
|
|
1535
|
+
ye:
|
|
1536
|
+
(o ? h : 0) |
|
|
1537
|
+
(s?.ownedWrite ? d : 0) |
|
|
1538
|
+
(s?.sync ? w : 0) |
|
|
1539
|
+
(ie && ownerInSnapshotScope(ne) ? g : 0),
|
|
1540
|
+
He: false,
|
|
1541
|
+
Z: s?.unobserved,
|
|
1542
|
+
Re: null,
|
|
1543
|
+
te: ne?.te ?? z,
|
|
1544
|
+
Ae: ne?.Ae ?? k,
|
|
1545
|
+
je: 0,
|
|
1546
|
+
I: e,
|
|
1547
|
+
ue: undefined,
|
|
1548
|
+
o: 0,
|
|
1549
|
+
N: null,
|
|
1550
|
+
h: undefined,
|
|
1551
|
+
p: null,
|
|
1552
|
+
W: null,
|
|
1553
|
+
Ee: null,
|
|
1554
|
+
O: null,
|
|
1555
|
+
Ie: null,
|
|
1556
|
+
i: ne,
|
|
1557
|
+
Ne: null,
|
|
1341
1558
|
We: null,
|
|
1342
1559
|
Ce: null,
|
|
1343
|
-
|
|
1560
|
+
m: c,
|
|
1561
|
+
be: b,
|
|
1562
|
+
me: F,
|
|
1563
|
+
Y: x,
|
|
1564
|
+
ve: null,
|
|
1565
|
+
Oe: null,
|
|
1566
|
+
ke: null,
|
|
1567
|
+
V: null,
|
|
1568
|
+
ee: false,
|
|
1569
|
+
De: undefined,
|
|
1570
|
+
Ve: t,
|
|
1571
|
+
Ke: n,
|
|
1572
|
+
Be: undefined,
|
|
1573
|
+
Ge: false,
|
|
1574
|
+
$: r,
|
|
1575
|
+
Fe: i
|
|
1344
1576
|
};
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1577
|
+
setupComputedNode(u, oe);
|
|
1578
|
+
return u;
|
|
1579
|
+
}
|
|
1580
|
+
const oe = { lazy: true };
|
|
1581
|
+
function setupComputedNode(e, t) {
|
|
1582
|
+
e.p = e;
|
|
1583
|
+
const n = ne?.t ? ne.u : ne;
|
|
1584
|
+
if (ne) {
|
|
1585
|
+
const t = ne.Ce;
|
|
1586
|
+
if (t === null) {
|
|
1587
|
+
ne.Ce = e;
|
|
1351
1588
|
} else {
|
|
1352
|
-
|
|
1353
|
-
|
|
1589
|
+
e.Ne = t;
|
|
1590
|
+
t.We = e;
|
|
1591
|
+
ne.Ce = e;
|
|
1354
1592
|
}
|
|
1355
1593
|
}
|
|
1356
|
-
if (
|
|
1357
|
-
if (
|
|
1358
|
-
|
|
1359
|
-
const
|
|
1360
|
-
|
|
1361
|
-
setSignal(e, undefined);
|
|
1594
|
+
if (n) e.o = n.o + 1;
|
|
1595
|
+
if (J) {
|
|
1596
|
+
const t = signal(undefined, { equals: false, ownedWrite: true });
|
|
1597
|
+
const n = J.factory(e.I, () => {
|
|
1598
|
+
setSignal(t, undefined);
|
|
1362
1599
|
});
|
|
1363
|
-
cleanup(() =>
|
|
1364
|
-
|
|
1365
|
-
read(
|
|
1366
|
-
return
|
|
1600
|
+
cleanup(() => n.dispose());
|
|
1601
|
+
e.I = e => {
|
|
1602
|
+
read(t);
|
|
1603
|
+
return n.track(e);
|
|
1367
1604
|
};
|
|
1368
1605
|
}
|
|
1369
|
-
!
|
|
1370
|
-
if (
|
|
1371
|
-
if (!(
|
|
1372
|
-
|
|
1373
|
-
|
|
1606
|
+
!t?.lazy && recompute(e, true);
|
|
1607
|
+
if (ie && !t?.lazy) {
|
|
1608
|
+
if (!(e.be & m)) {
|
|
1609
|
+
e._e = e.ue === undefined ? C : e.ue;
|
|
1610
|
+
se.add(e);
|
|
1374
1611
|
}
|
|
1375
1612
|
}
|
|
1376
|
-
return s;
|
|
1377
1613
|
}
|
|
1378
1614
|
function signal(e, t, n = null) {
|
|
1379
1615
|
const r = {
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
$: e,
|
|
1616
|
+
He: t?.equals != null ? t.equals : isEqual,
|
|
1617
|
+
ye: (t?.ownedWrite ? d : 0) | (t?.ze ? p : 0),
|
|
1618
|
+
Z: t?.unobserved,
|
|
1619
|
+
ue: e,
|
|
1385
1620
|
O: null,
|
|
1386
|
-
|
|
1387
|
-
|
|
1621
|
+
Ie: null,
|
|
1622
|
+
me: F,
|
|
1388
1623
|
L: n,
|
|
1389
|
-
|
|
1390
|
-
|
|
1624
|
+
k: n?.N || null,
|
|
1625
|
+
Y: x
|
|
1391
1626
|
};
|
|
1392
|
-
n && (n.
|
|
1393
|
-
if (
|
|
1394
|
-
r.
|
|
1395
|
-
|
|
1627
|
+
n && (n.N = r);
|
|
1628
|
+
if (ie && !(r.ye & p) && !((n?.be ?? 0) & m)) {
|
|
1629
|
+
r._e = e === undefined ? C : e;
|
|
1630
|
+
se.add(r);
|
|
1396
1631
|
}
|
|
1397
1632
|
return r;
|
|
1398
1633
|
}
|
|
1399
1634
|
function optimisticSignal(e, t) {
|
|
1400
1635
|
const n = signal(e, t);
|
|
1401
|
-
n.
|
|
1636
|
+
n.G = x;
|
|
1402
1637
|
return n;
|
|
1403
1638
|
}
|
|
1404
|
-
function optimisticComputed(e, t
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1407
|
-
return
|
|
1639
|
+
function optimisticComputed(e, t) {
|
|
1640
|
+
const n = computed(e, t);
|
|
1641
|
+
n.G = x;
|
|
1642
|
+
return n;
|
|
1408
1643
|
}
|
|
1409
1644
|
function isEqual(e, t) {
|
|
1410
1645
|
return e === t;
|
|
1411
1646
|
}
|
|
1412
1647
|
function untrack(e, t) {
|
|
1413
|
-
if (!
|
|
1414
|
-
const n =
|
|
1415
|
-
|
|
1648
|
+
if (!J && !X && true) return e();
|
|
1649
|
+
const n = X;
|
|
1650
|
+
X = false;
|
|
1416
1651
|
try {
|
|
1417
|
-
if (
|
|
1652
|
+
if (J) return J.untrack(e);
|
|
1418
1653
|
return e();
|
|
1419
1654
|
} finally {
|
|
1420
|
-
|
|
1655
|
+
X = n;
|
|
1421
1656
|
}
|
|
1422
1657
|
}
|
|
1423
1658
|
function read(e) {
|
|
1424
|
-
if (
|
|
1659
|
+
if (te) {
|
|
1425
1660
|
const t = getLatestValueComputed(e);
|
|
1426
|
-
const n =
|
|
1427
|
-
|
|
1428
|
-
const r = e.
|
|
1661
|
+
const n = te;
|
|
1662
|
+
te = false;
|
|
1663
|
+
const r = e.G !== undefined && e.G !== x ? e.G : e.ue;
|
|
1429
1664
|
let i;
|
|
1430
1665
|
try {
|
|
1431
1666
|
i = read(t);
|
|
1432
1667
|
} catch (e) {
|
|
1433
|
-
if (!
|
|
1668
|
+
if (!ne && e instanceof NotReadyError) return r;
|
|
1434
1669
|
throw e;
|
|
1435
1670
|
} finally {
|
|
1436
|
-
|
|
1671
|
+
te = n;
|
|
1437
1672
|
}
|
|
1438
|
-
if (t.
|
|
1439
|
-
if (
|
|
1440
|
-
const e = findLane(t.
|
|
1441
|
-
const n = findLane(
|
|
1442
|
-
if (e !== n && e.
|
|
1673
|
+
if (t.be & m) return r;
|
|
1674
|
+
if (Y && re && t.H) {
|
|
1675
|
+
const e = findLane(t.H);
|
|
1676
|
+
const n = findLane(re);
|
|
1677
|
+
if (e !== n && e.F.size > 0) {
|
|
1443
1678
|
return r;
|
|
1444
1679
|
}
|
|
1445
1680
|
}
|
|
1446
1681
|
return i;
|
|
1447
1682
|
}
|
|
1448
|
-
if (
|
|
1683
|
+
if ($) {
|
|
1449
1684
|
const t = e.L;
|
|
1450
|
-
const n =
|
|
1451
|
-
|
|
1452
|
-
if (t && e.
|
|
1453
|
-
if (e.
|
|
1454
|
-
|
|
1685
|
+
const n = $;
|
|
1686
|
+
$ = false;
|
|
1687
|
+
if (t && e.G !== undefined) {
|
|
1688
|
+
if (e.G !== x && (t.ke || !!(t.be & m))) {
|
|
1689
|
+
ee = true;
|
|
1455
1690
|
}
|
|
1456
|
-
let n =
|
|
1691
|
+
let n = ne;
|
|
1457
1692
|
if (n?.t) n = n.u;
|
|
1458
|
-
if (n &&
|
|
1693
|
+
if (n && X) link(e, n);
|
|
1459
1694
|
read(getPendingSignal(e));
|
|
1460
1695
|
read(getPendingSignal(t));
|
|
1461
1696
|
} else {
|
|
1462
|
-
if (read(getPendingSignal(e)))
|
|
1463
|
-
if (t && read(getPendingSignal(t)))
|
|
1697
|
+
if (read(getPendingSignal(e))) ee = true;
|
|
1698
|
+
if (t && read(getPendingSignal(t))) ee = true;
|
|
1464
1699
|
}
|
|
1465
|
-
|
|
1466
|
-
return e
|
|
1700
|
+
$ = n;
|
|
1701
|
+
return e.ue;
|
|
1467
1702
|
}
|
|
1468
|
-
let t =
|
|
1703
|
+
let t = ne;
|
|
1469
1704
|
if (t?.t) t = t.u;
|
|
1470
|
-
|
|
1471
|
-
if (
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1705
|
+
const n = e;
|
|
1706
|
+
if (typeof n.I === "function") {
|
|
1707
|
+
const t = e;
|
|
1708
|
+
if (t.m & c) {
|
|
1709
|
+
t.m &= ~c;
|
|
1710
|
+
recompute(t, true);
|
|
1711
|
+
} else if (t.m & u) {
|
|
1712
|
+
recompute(t, true);
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
const r = e.L || e;
|
|
1716
|
+
if (
|
|
1717
|
+
!n.I &&
|
|
1718
|
+
r === e &&
|
|
1719
|
+
e.G === undefined &&
|
|
1720
|
+
e._e === undefined &&
|
|
1721
|
+
M === null &&
|
|
1722
|
+
re === null &&
|
|
1723
|
+
!ie &&
|
|
1724
|
+
true
|
|
1725
|
+
) {
|
|
1726
|
+
if (t && X) link(e, t);
|
|
1727
|
+
return !t || e.Y === x ? e.ue : e.Y;
|
|
1728
|
+
}
|
|
1729
|
+
if (t && X) {
|
|
1478
1730
|
link(e, t);
|
|
1479
|
-
if (
|
|
1480
|
-
const
|
|
1481
|
-
if (
|
|
1731
|
+
if (r.I) {
|
|
1732
|
+
const n = e.m & o;
|
|
1733
|
+
if (r.o >= (n ? Q.j : q.j)) {
|
|
1482
1734
|
markNode(t);
|
|
1483
|
-
markHeap(
|
|
1484
|
-
updateIfNecessary(
|
|
1735
|
+
markHeap(n ? Q : q);
|
|
1736
|
+
updateIfNecessary(r);
|
|
1485
1737
|
}
|
|
1486
|
-
const i =
|
|
1738
|
+
const i = r.o;
|
|
1487
1739
|
if (i >= t.o && e.i !== t) {
|
|
1488
1740
|
t.o = i + 1;
|
|
1489
1741
|
}
|
|
1490
1742
|
}
|
|
1491
1743
|
}
|
|
1492
|
-
if (
|
|
1493
|
-
if (t && !(
|
|
1494
|
-
if (
|
|
1495
|
-
const
|
|
1496
|
-
const i = findLane(
|
|
1497
|
-
if (
|
|
1498
|
-
if (!
|
|
1499
|
-
throw
|
|
1744
|
+
if (r.be & m) {
|
|
1745
|
+
if (t && !(Y && r.V && M !== r.V)) {
|
|
1746
|
+
if (re) {
|
|
1747
|
+
const n = r.H;
|
|
1748
|
+
const i = findLane(re);
|
|
1749
|
+
if (n && findLane(n) === i && !hasActiveOverride(r)) {
|
|
1750
|
+
if (!X && e !== t) link(e, t);
|
|
1751
|
+
throw r.we;
|
|
1500
1752
|
}
|
|
1501
1753
|
} else {
|
|
1502
|
-
if (!
|
|
1503
|
-
throw
|
|
1754
|
+
if (!X && e !== t) link(e, t);
|
|
1755
|
+
throw r.we;
|
|
1504
1756
|
}
|
|
1505
|
-
} else if (t &&
|
|
1506
|
-
if (!
|
|
1507
|
-
throw
|
|
1508
|
-
} else if (!t &&
|
|
1509
|
-
throw
|
|
1757
|
+
} else if (t && r !== e && r.be & b) {
|
|
1758
|
+
if (!X && e !== t) link(e, t);
|
|
1759
|
+
throw r.we;
|
|
1760
|
+
} else if (!t && r.be & b) {
|
|
1761
|
+
throw r.we;
|
|
1510
1762
|
}
|
|
1511
1763
|
}
|
|
1512
|
-
if (e.I && e.
|
|
1513
|
-
if (e.
|
|
1764
|
+
if (e.I && e.be & _) {
|
|
1765
|
+
if (e.me < F) {
|
|
1514
1766
|
recompute(e);
|
|
1515
1767
|
return read(e);
|
|
1516
|
-
} else throw e.
|
|
1768
|
+
} else throw e.we;
|
|
1517
1769
|
}
|
|
1518
|
-
if (
|
|
1519
|
-
const n = e.
|
|
1770
|
+
if (ie && t && t.ye & g) {
|
|
1771
|
+
const n = e._e;
|
|
1520
1772
|
if (n !== undefined) {
|
|
1521
|
-
const r = n ===
|
|
1522
|
-
const i = e.
|
|
1523
|
-
if (i !== r) t.m |=
|
|
1773
|
+
const r = n === C ? undefined : n;
|
|
1774
|
+
const i = e.Y !== x ? e.Y : e.ue;
|
|
1775
|
+
if (i !== r) t.m |= f;
|
|
1524
1776
|
return r;
|
|
1525
1777
|
}
|
|
1526
1778
|
}
|
|
1527
|
-
if (e.
|
|
1528
|
-
if (t &&
|
|
1529
|
-
return e.
|
|
1779
|
+
if (e.G !== undefined && e.G !== x) {
|
|
1780
|
+
if (t && Y && shouldReadStashedOptimisticValue(e)) return e.ue;
|
|
1781
|
+
return e.G;
|
|
1782
|
+
}
|
|
1783
|
+
if (M !== null && re !== null && !te && e.Y !== x && r === e && !e.I && t) {
|
|
1784
|
+
M.oe.add(t);
|
|
1785
|
+
return e.ue;
|
|
1786
|
+
}
|
|
1787
|
+
const i =
|
|
1788
|
+
!t ||
|
|
1789
|
+
(re !== null && (e.G !== undefined || e.H || (r === e && Y) || !!(r.be & m))) ||
|
|
1790
|
+
e.Y === x ||
|
|
1791
|
+
(Y && e.V && M !== e.V)
|
|
1792
|
+
? e.ue
|
|
1793
|
+
: e.Y;
|
|
1794
|
+
if (!t && r === e && typeof n.I === "function" && e.ye & y && !(r.be & m) && !e.O) {
|
|
1795
|
+
unobserved(e);
|
|
1530
1796
|
}
|
|
1531
|
-
return
|
|
1532
|
-
(B !== null && (e.ee !== undefined || e.Y || (n === e && Q) || !!(n.ye & a))) ||
|
|
1533
|
-
e.Z === S ||
|
|
1534
|
-
(Q && e.G && C !== e.G)
|
|
1535
|
-
? e.$
|
|
1536
|
-
: e.Z;
|
|
1797
|
+
return i;
|
|
1537
1798
|
}
|
|
1538
1799
|
function setSignal(e, t) {
|
|
1539
|
-
if (e.
|
|
1540
|
-
const n = e.
|
|
1541
|
-
const r = e.
|
|
1542
|
-
const i = n ? (r ? e.
|
|
1800
|
+
if (e.V && M !== e.V) z.initTransition(e.V);
|
|
1801
|
+
const n = e.G !== undefined && !K;
|
|
1802
|
+
const r = e.G !== undefined && e.G !== x;
|
|
1803
|
+
const i = n ? (r ? e.G : e.ue) : e.Y === x ? e.ue : e.Y;
|
|
1543
1804
|
if (typeof t === "function") t = t(i);
|
|
1544
|
-
const s = !e.
|
|
1805
|
+
const s = !e.He || !e.He(i, t) || !!(e.be & b);
|
|
1545
1806
|
if (!s) {
|
|
1546
1807
|
if (n && r && e.I) {
|
|
1547
1808
|
insertSubs(e, true);
|
|
@@ -1550,156 +1811,166 @@ function setSignal(e, t) {
|
|
|
1550
1811
|
return t;
|
|
1551
1812
|
}
|
|
1552
1813
|
if (n) {
|
|
1553
|
-
const n = e.
|
|
1554
|
-
if (!n)
|
|
1814
|
+
const n = e.G === x;
|
|
1815
|
+
if (!n) z.initTransition(resolveTransition(e));
|
|
1555
1816
|
if (n) {
|
|
1556
|
-
e.
|
|
1557
|
-
|
|
1817
|
+
e.Y = e.ue;
|
|
1818
|
+
z.J.push(e);
|
|
1558
1819
|
}
|
|
1559
|
-
e.
|
|
1820
|
+
e.B = true;
|
|
1560
1821
|
const r = getOrCreateLane(e);
|
|
1561
|
-
e.
|
|
1562
|
-
e.
|
|
1822
|
+
e.H = r;
|
|
1823
|
+
e.G = t;
|
|
1563
1824
|
} else {
|
|
1564
|
-
if (e.
|
|
1565
|
-
e.
|
|
1825
|
+
if (e.Y === x) queuePendingNode(e);
|
|
1826
|
+
e.Y = t;
|
|
1566
1827
|
}
|
|
1567
|
-
updatePendingSignal(e);
|
|
1568
|
-
if (e.
|
|
1569
|
-
setSignal(e.
|
|
1828
|
+
if (e.Qe) updatePendingSignal(e);
|
|
1829
|
+
if (e.qe) {
|
|
1830
|
+
setSignal(e.qe, t);
|
|
1570
1831
|
}
|
|
1571
|
-
e.
|
|
1832
|
+
e.me = F;
|
|
1572
1833
|
insertSubs(e, n);
|
|
1573
1834
|
schedule();
|
|
1574
1835
|
return t;
|
|
1575
1836
|
}
|
|
1837
|
+
function suppressComputedRecompute(e) {
|
|
1838
|
+
deleteFromHeap(e, e.m & o ? Q : q);
|
|
1839
|
+
if (!(e.m & a) && e.Y === x) queuePendingNode(e);
|
|
1840
|
+
e.m = (e.m & -4) | a;
|
|
1841
|
+
}
|
|
1842
|
+
function setMemo(e, t) {
|
|
1843
|
+
const n = setSignal(e, t);
|
|
1844
|
+
suppressComputedRecompute(e);
|
|
1845
|
+
return n;
|
|
1846
|
+
}
|
|
1576
1847
|
function runWithOwner(e, t) {
|
|
1577
|
-
const n =
|
|
1578
|
-
const r =
|
|
1579
|
-
|
|
1580
|
-
|
|
1848
|
+
const n = ne;
|
|
1849
|
+
const r = X;
|
|
1850
|
+
ne = e;
|
|
1851
|
+
X = false;
|
|
1581
1852
|
try {
|
|
1582
1853
|
return t();
|
|
1583
1854
|
} finally {
|
|
1584
|
-
|
|
1585
|
-
|
|
1855
|
+
ne = n;
|
|
1856
|
+
X = r;
|
|
1586
1857
|
}
|
|
1587
1858
|
}
|
|
1588
1859
|
function getPendingSignal(e) {
|
|
1589
|
-
if (!e.
|
|
1590
|
-
e.
|
|
1591
|
-
if (e.
|
|
1592
|
-
e.
|
|
1860
|
+
if (!e.Qe) {
|
|
1861
|
+
e.Qe = optimisticSignal(false, { ownedWrite: true });
|
|
1862
|
+
if (e.T) {
|
|
1863
|
+
e.Qe.T = e;
|
|
1593
1864
|
}
|
|
1594
|
-
if (computePendingState(e)) setSignal(e.
|
|
1865
|
+
if (computePendingState(e)) setSignal(e.Qe, true);
|
|
1595
1866
|
}
|
|
1596
|
-
return e.
|
|
1867
|
+
return e.Qe;
|
|
1597
1868
|
}
|
|
1598
1869
|
function computePendingState(e) {
|
|
1599
1870
|
const t = e;
|
|
1600
1871
|
const n = e.L;
|
|
1601
|
-
if (n && e.
|
|
1602
|
-
return !n.
|
|
1872
|
+
if (n && e.Y !== x) {
|
|
1873
|
+
return !n.ke && !(n.be & m);
|
|
1603
1874
|
}
|
|
1604
|
-
if (e.
|
|
1605
|
-
if (t.
|
|
1606
|
-
if (e.
|
|
1607
|
-
const t = e.
|
|
1608
|
-
return !!(t && t.
|
|
1875
|
+
if (e.G !== undefined && e.G !== x) {
|
|
1876
|
+
if (t.be & m && !(t.be & b)) return true;
|
|
1877
|
+
if (e.T) {
|
|
1878
|
+
const t = e.H ? findLane(e.H) : null;
|
|
1879
|
+
return !!(t && t.F.size > 0);
|
|
1609
1880
|
}
|
|
1610
1881
|
return true;
|
|
1611
1882
|
}
|
|
1612
|
-
if (e.
|
|
1883
|
+
if (e.G !== undefined && e.G === x && !e.T) {
|
|
1613
1884
|
return false;
|
|
1614
1885
|
}
|
|
1615
|
-
if (e.
|
|
1616
|
-
return !!(t.
|
|
1886
|
+
if (e.Y !== x && !(t.be & b)) return true;
|
|
1887
|
+
return !!(t.be & m && !(t.be & b));
|
|
1617
1888
|
}
|
|
1618
1889
|
function updatePendingSignal(e) {
|
|
1619
|
-
if (e.
|
|
1890
|
+
if (e.Qe) {
|
|
1620
1891
|
const t = computePendingState(e);
|
|
1621
|
-
const n = e.
|
|
1892
|
+
const n = e.Qe;
|
|
1622
1893
|
setSignal(n, t);
|
|
1623
|
-
if (!t && n.
|
|
1894
|
+
if (!t && n.H) {
|
|
1624
1895
|
const t = resolveLane(e);
|
|
1625
|
-
if (t && t.
|
|
1626
|
-
const e = findLane(n.
|
|
1896
|
+
if (t && t.F.size > 0) {
|
|
1897
|
+
const e = findLane(n.H);
|
|
1627
1898
|
if (e !== t) {
|
|
1628
1899
|
mergeLanes(t, e);
|
|
1629
1900
|
}
|
|
1630
1901
|
}
|
|
1631
|
-
|
|
1632
|
-
n.
|
|
1902
|
+
I.delete(n);
|
|
1903
|
+
n.H = undefined;
|
|
1633
1904
|
}
|
|
1634
1905
|
}
|
|
1635
1906
|
}
|
|
1636
1907
|
function getLatestValueComputed(e) {
|
|
1637
|
-
if (!e.
|
|
1638
|
-
const t =
|
|
1639
|
-
|
|
1640
|
-
const n =
|
|
1641
|
-
|
|
1642
|
-
const r =
|
|
1643
|
-
|
|
1644
|
-
e.
|
|
1645
|
-
e.
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
}
|
|
1650
|
-
return e.
|
|
1908
|
+
if (!e.qe) {
|
|
1909
|
+
const t = te;
|
|
1910
|
+
te = false;
|
|
1911
|
+
const n = $;
|
|
1912
|
+
$ = false;
|
|
1913
|
+
const r = ne;
|
|
1914
|
+
ne = null;
|
|
1915
|
+
e.qe = optimisticComputed(() => read(e));
|
|
1916
|
+
e.qe.T = e;
|
|
1917
|
+
ne = r;
|
|
1918
|
+
$ = n;
|
|
1919
|
+
te = t;
|
|
1920
|
+
}
|
|
1921
|
+
return e.qe;
|
|
1651
1922
|
}
|
|
1652
1923
|
function staleValues(e, t = true) {
|
|
1653
|
-
const n =
|
|
1654
|
-
|
|
1924
|
+
const n = Y;
|
|
1925
|
+
Y = t;
|
|
1655
1926
|
try {
|
|
1656
1927
|
return e();
|
|
1657
1928
|
} finally {
|
|
1658
|
-
|
|
1929
|
+
Y = n;
|
|
1659
1930
|
}
|
|
1660
1931
|
}
|
|
1661
1932
|
function latest(e) {
|
|
1662
|
-
const t =
|
|
1663
|
-
|
|
1933
|
+
const t = te;
|
|
1934
|
+
te = true;
|
|
1664
1935
|
try {
|
|
1665
1936
|
return e();
|
|
1666
1937
|
} finally {
|
|
1667
|
-
|
|
1938
|
+
te = t;
|
|
1668
1939
|
}
|
|
1669
1940
|
}
|
|
1670
1941
|
function isPending(e) {
|
|
1671
|
-
const t =
|
|
1672
|
-
const n =
|
|
1673
|
-
|
|
1674
|
-
|
|
1942
|
+
const t = $;
|
|
1943
|
+
const n = ee;
|
|
1944
|
+
$ = true;
|
|
1945
|
+
ee = false;
|
|
1675
1946
|
try {
|
|
1676
1947
|
e();
|
|
1677
|
-
return
|
|
1948
|
+
return ee;
|
|
1678
1949
|
} catch {
|
|
1679
|
-
return
|
|
1950
|
+
return ee;
|
|
1680
1951
|
} finally {
|
|
1681
|
-
|
|
1682
|
-
|
|
1952
|
+
$ = t;
|
|
1953
|
+
ee = n;
|
|
1683
1954
|
}
|
|
1684
1955
|
}
|
|
1685
1956
|
function refresh(e) {
|
|
1686
|
-
let t =
|
|
1687
|
-
|
|
1957
|
+
let t = Z;
|
|
1958
|
+
Z = true;
|
|
1688
1959
|
try {
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1960
|
+
const t = e?.[j];
|
|
1961
|
+
if (false && !t);
|
|
1962
|
+
if (t && typeof t.I === "function" && !(t.m & u)) {
|
|
1963
|
+
recompute(t);
|
|
1692
1964
|
}
|
|
1693
|
-
return untrack(e);
|
|
1694
1965
|
} finally {
|
|
1695
|
-
|
|
1966
|
+
Z = t;
|
|
1696
1967
|
if (!t) {
|
|
1697
1968
|
schedule();
|
|
1698
1969
|
}
|
|
1699
1970
|
}
|
|
1700
1971
|
}
|
|
1701
1972
|
function isRefreshing() {
|
|
1702
|
-
return
|
|
1973
|
+
return Z;
|
|
1703
1974
|
}
|
|
1704
1975
|
function createContext(e, t) {
|
|
1705
1976
|
return { id: Symbol(t), defaultValue: e };
|
|
@@ -1708,7 +1979,7 @@ function getContext(e, t = getOwner()) {
|
|
|
1708
1979
|
if (!t) {
|
|
1709
1980
|
throw new NoOwnerError();
|
|
1710
1981
|
}
|
|
1711
|
-
const n = hasContext(e, t) ? t.
|
|
1982
|
+
const n = hasContext(e, t) ? t.Ae[e.id] : e.defaultValue;
|
|
1712
1983
|
if (isUndefined(n)) {
|
|
1713
1984
|
throw new ContextNotFoundError();
|
|
1714
1985
|
}
|
|
@@ -1718,112 +1989,102 @@ function setContext(e, t, n = getOwner()) {
|
|
|
1718
1989
|
if (!n) {
|
|
1719
1990
|
throw new NoOwnerError();
|
|
1720
1991
|
}
|
|
1721
|
-
n.
|
|
1992
|
+
n.Ae = { ...n.Ae, [e.id]: isUndefined(t) ? e.defaultValue : t };
|
|
1722
1993
|
}
|
|
1723
1994
|
function hasContext(e, t) {
|
|
1724
|
-
return !isUndefined(t?.
|
|
1995
|
+
return !isUndefined(t?.Ae[e.id]);
|
|
1725
1996
|
}
|
|
1726
1997
|
function isUndefined(e) {
|
|
1727
1998
|
return typeof e === "undefined";
|
|
1728
1999
|
}
|
|
1729
|
-
function effect(e, t, n, r
|
|
1730
|
-
|
|
1731
|
-
const
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
try {
|
|
1753
|
-
return o.Be
|
|
1754
|
-
? o.Be(e, () => {
|
|
1755
|
-
o.Ke?.();
|
|
1756
|
-
o.Ke = undefined;
|
|
1757
|
-
})
|
|
1758
|
-
: console.error(e);
|
|
1759
|
-
} catch (t) {
|
|
1760
|
-
e = t;
|
|
1761
|
-
}
|
|
2000
|
+
function effect(e, t, n, r) {
|
|
2001
|
+
const i = !!r?.user;
|
|
2002
|
+
const s = createEffectNode(e, t, n, i ? v : O, notifyEffectStatus, r);
|
|
2003
|
+
recompute(s, true);
|
|
2004
|
+
!r?.defer &&
|
|
2005
|
+
(s.$ === v || r?.schedule ? s.te.enqueue(s.$, runEffect.bind(null, s)) : runEffect(s));
|
|
2006
|
+
}
|
|
2007
|
+
function notifyEffectStatus(e, t) {
|
|
2008
|
+
const n = e !== undefined ? e : this.be;
|
|
2009
|
+
const r = t !== undefined ? t : this.we;
|
|
2010
|
+
if (n & _) {
|
|
2011
|
+
let e = r;
|
|
2012
|
+
this.te.notify(this, m, 0);
|
|
2013
|
+
if (this.$ === v) {
|
|
2014
|
+
try {
|
|
2015
|
+
return this.Ke
|
|
2016
|
+
? this.Ke(e, () => {
|
|
2017
|
+
this.Be?.();
|
|
2018
|
+
this.Be = undefined;
|
|
2019
|
+
})
|
|
2020
|
+
: console.error(e);
|
|
2021
|
+
} catch (t) {
|
|
2022
|
+
e = t;
|
|
1762
2023
|
}
|
|
1763
|
-
if (!o.M.notify(o, d, d)) throw e;
|
|
1764
|
-
} else if (o.D === p) {
|
|
1765
|
-
o.M.notify(o, a | d, n, r);
|
|
1766
2024
|
}
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
this.Ke = undefined;
|
|
2025
|
+
if (!this.te.notify(this, _, _)) throw e;
|
|
2026
|
+
} else if (this.$ === O) {
|
|
2027
|
+
this.te.notify(this, m | _, n, r);
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2030
|
+
function runEffect(e) {
|
|
2031
|
+
if (!e.ee || e.m & u) return;
|
|
2032
|
+
e.Be?.();
|
|
2033
|
+
e.Be = undefined;
|
|
1777
2034
|
try {
|
|
1778
|
-
const
|
|
1779
|
-
if (false &&
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
2035
|
+
const t = e.Ve(e.ue, e.De);
|
|
2036
|
+
if (false && t !== undefined && typeof t !== "function");
|
|
2037
|
+
e.Be = t;
|
|
2038
|
+
if (e.Be && !e.Ge) {
|
|
2039
|
+
e.Ge = true;
|
|
2040
|
+
runWithOwner(e.i, () => cleanup(() => e.Be?.()));
|
|
2041
|
+
}
|
|
2042
|
+
} catch (t) {
|
|
2043
|
+
e.we = new StatusError(e, t);
|
|
2044
|
+
e.be |= _;
|
|
2045
|
+
if (!e.te.notify(e, _, _)) throw t;
|
|
1785
2046
|
} finally {
|
|
1786
|
-
|
|
1787
|
-
|
|
2047
|
+
e.De = e.ue;
|
|
2048
|
+
e.ee = false;
|
|
1788
2049
|
}
|
|
1789
2050
|
}
|
|
2051
|
+
GlobalQueue.he = runEffect;
|
|
1790
2052
|
function trackedEffect(e, t) {
|
|
1791
2053
|
const run = () => {
|
|
1792
|
-
if (!n.
|
|
2054
|
+
if (!n.ee || n.m & u) return;
|
|
1793
2055
|
try {
|
|
1794
|
-
n.
|
|
2056
|
+
n.ee = false;
|
|
1795
2057
|
recompute(n);
|
|
1796
2058
|
} finally {
|
|
1797
2059
|
}
|
|
1798
2060
|
};
|
|
1799
2061
|
const n = computed(
|
|
1800
2062
|
() => {
|
|
1801
|
-
n.
|
|
1802
|
-
n.
|
|
2063
|
+
n.Be?.();
|
|
2064
|
+
n.Be = undefined;
|
|
1803
2065
|
const t = staleValues(e);
|
|
1804
|
-
n.
|
|
2066
|
+
n.Be = t;
|
|
1805
2067
|
},
|
|
1806
|
-
undefined,
|
|
1807
2068
|
{ ...t, lazy: true }
|
|
1808
2069
|
);
|
|
1809
|
-
n.
|
|
1810
|
-
n.
|
|
1811
|
-
n.
|
|
1812
|
-
n
|
|
1813
|
-
n.
|
|
1814
|
-
const r = e !== undefined ? e : n.
|
|
1815
|
-
if (r &
|
|
1816
|
-
n.
|
|
1817
|
-
const e = t !== undefined ? t : n.
|
|
1818
|
-
if (!n.
|
|
2070
|
+
n.Be = undefined;
|
|
2071
|
+
n.ye = (n.ye & ~y) | S;
|
|
2072
|
+
n.ee = true;
|
|
2073
|
+
n.$ = P;
|
|
2074
|
+
n.Fe = (e, t) => {
|
|
2075
|
+
const r = e !== undefined ? e : n.be;
|
|
2076
|
+
if (r & _) {
|
|
2077
|
+
n.te.notify(n, m, 0);
|
|
2078
|
+
const e = t !== undefined ? t : n.we;
|
|
2079
|
+
if (!n.te.notify(n, _, _)) throw e;
|
|
1819
2080
|
}
|
|
1820
2081
|
};
|
|
1821
|
-
n.
|
|
1822
|
-
n.
|
|
1823
|
-
cleanup(() => n.
|
|
2082
|
+
n.ne = run;
|
|
2083
|
+
n.te.enqueue(v, run);
|
|
2084
|
+
cleanup(() => n.Be?.());
|
|
1824
2085
|
}
|
|
1825
2086
|
function restoreTransition(e, t) {
|
|
1826
|
-
|
|
2087
|
+
z.initTransition(e);
|
|
1827
2088
|
const n = t();
|
|
1828
2089
|
flush();
|
|
1829
2090
|
return n;
|
|
@@ -1832,13 +2093,13 @@ function action(e) {
|
|
|
1832
2093
|
return (...t) =>
|
|
1833
2094
|
new Promise((n, r) => {
|
|
1834
2095
|
const i = e(...t);
|
|
1835
|
-
|
|
1836
|
-
let s =
|
|
1837
|
-
s.
|
|
2096
|
+
z.initTransition();
|
|
2097
|
+
let s = M;
|
|
2098
|
+
s.ie.push(i);
|
|
1838
2099
|
const done = (e, t) => {
|
|
1839
2100
|
s = currentTransition(s);
|
|
1840
|
-
const o = s.
|
|
1841
|
-
if (o >= 0) s.
|
|
2101
|
+
const o = s.ie.indexOf(i);
|
|
2102
|
+
if (o >= 0) s.ie.splice(o, 1);
|
|
1842
2103
|
setActiveTransition(s);
|
|
1843
2104
|
schedule();
|
|
1844
2105
|
t ? r(t) : n(e);
|
|
@@ -1871,26 +2132,26 @@ function onCleanup(e) {
|
|
|
1871
2132
|
}
|
|
1872
2133
|
function accessor(e) {
|
|
1873
2134
|
const t = read.bind(null, e);
|
|
1874
|
-
t
|
|
2135
|
+
t[j] = e;
|
|
1875
2136
|
return t;
|
|
1876
2137
|
}
|
|
1877
|
-
function createSignal(e, t
|
|
2138
|
+
function createSignal(e, t) {
|
|
1878
2139
|
if (typeof e === "function") {
|
|
1879
|
-
const
|
|
1880
|
-
|
|
2140
|
+
const n = computed(e, t);
|
|
2141
|
+
n.ye &= ~y;
|
|
2142
|
+
return [accessor(n), setMemo.bind(null, n)];
|
|
1881
2143
|
}
|
|
1882
|
-
const
|
|
1883
|
-
return [accessor(
|
|
2144
|
+
const n = signal(e, t);
|
|
2145
|
+
return [accessor(n), setSignal.bind(null, n)];
|
|
1884
2146
|
}
|
|
1885
|
-
function createMemo(e, t
|
|
1886
|
-
|
|
1887
|
-
return accessor(r);
|
|
2147
|
+
function createMemo(e, t) {
|
|
2148
|
+
return accessor(computed(e, t));
|
|
1888
2149
|
}
|
|
1889
|
-
function createEffect(e, t, n
|
|
1890
|
-
effect(e, t.effect || t, t.error,
|
|
2150
|
+
function createEffect(e, t, n) {
|
|
2151
|
+
effect(e, t.effect || t, t.error, { user: true, ...n });
|
|
1891
2152
|
}
|
|
1892
|
-
function createRenderEffect(e, t, n
|
|
1893
|
-
effect(e, t, undefined, n
|
|
2153
|
+
function createRenderEffect(e, t, n) {
|
|
2154
|
+
effect(e, t, undefined, n);
|
|
1894
2155
|
}
|
|
1895
2156
|
function createTrackedEffect(e, t) {
|
|
1896
2157
|
trackedEffect(e, t);
|
|
@@ -1911,8 +2172,7 @@ function createReaction(e, t) {
|
|
|
1911
2172
|
dispose(t);
|
|
1912
2173
|
},
|
|
1913
2174
|
e.error,
|
|
1914
|
-
|
|
1915
|
-
{ defer: true, ...(false ? { ...t, name: t?.name ?? "effect" } : t) }
|
|
2175
|
+
{ ...(false ? { ...t, name: t?.name ?? "effect" } : t), user: true, defer: true }
|
|
1916
2176
|
);
|
|
1917
2177
|
});
|
|
1918
2178
|
};
|
|
@@ -1932,29 +2192,30 @@ function resolve(e) {
|
|
|
1932
2192
|
});
|
|
1933
2193
|
});
|
|
1934
2194
|
}
|
|
1935
|
-
function createOptimistic(e, t
|
|
2195
|
+
function createOptimistic(e, t) {
|
|
1936
2196
|
if (typeof e === "function") {
|
|
1937
|
-
const
|
|
1938
|
-
|
|
2197
|
+
const n = optimisticComputed(e, t);
|
|
2198
|
+
n.ye &= ~y;
|
|
2199
|
+
return [accessor(n), setSignal.bind(null, n)];
|
|
1939
2200
|
}
|
|
1940
|
-
const
|
|
1941
|
-
return [accessor(
|
|
2201
|
+
const n = optimisticSignal(e, t);
|
|
2202
|
+
return [accessor(n), setSignal.bind(null, n)];
|
|
1942
2203
|
}
|
|
1943
2204
|
function onSettled(e) {
|
|
1944
2205
|
const t = getOwner();
|
|
1945
|
-
t && !t.
|
|
2206
|
+
t && !(t.ye & S)
|
|
1946
2207
|
? createTrackedEffect(() => untrack(e), undefined)
|
|
1947
|
-
:
|
|
2208
|
+
: z.enqueue(v, () => {
|
|
1948
2209
|
const t = e();
|
|
1949
2210
|
t?.();
|
|
1950
2211
|
});
|
|
1951
2212
|
}
|
|
1952
2213
|
function unwrap(e) {
|
|
1953
|
-
return e?.[
|
|
2214
|
+
return e?.[le]?.[he] ?? e;
|
|
1954
2215
|
}
|
|
1955
|
-
function getOverrideValue(e, t, n, r
|
|
1956
|
-
if (
|
|
1957
|
-
return t &&
|
|
2216
|
+
function getOverrideValue(e, t, n, r) {
|
|
2217
|
+
if (r && n in r) return r[n];
|
|
2218
|
+
return t && n in t ? t[n] : e[n];
|
|
1958
2219
|
}
|
|
1959
2220
|
function getAllKeys(e, t, n) {
|
|
1960
2221
|
const r = getKeys(e, t);
|
|
@@ -1962,114 +2223,223 @@ function getAllKeys(e, t, n) {
|
|
|
1962
2223
|
return Array.from(new Set([...r, ...i]));
|
|
1963
2224
|
}
|
|
1964
2225
|
function applyState(e, t, n) {
|
|
1965
|
-
const r = t?.[
|
|
2226
|
+
const r = t?.[le];
|
|
1966
2227
|
if (!r) return;
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
r
|
|
1975
|
-
if (
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
2228
|
+
if (r[de] || r[pe]) {
|
|
2229
|
+
applyStateSlow(e, r, n);
|
|
2230
|
+
} else {
|
|
2231
|
+
applyStateFast(e, r, n);
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
function applyStateFast(e, t, n) {
|
|
2235
|
+
const r = t[ae];
|
|
2236
|
+
if (e === r) return;
|
|
2237
|
+
(t[we] || be).set(e, t[fe]);
|
|
2238
|
+
t[ae] = e;
|
|
2239
|
+
if (Array.isArray(r)) {
|
|
2240
|
+
let i = false;
|
|
2241
|
+
const s = r.length;
|
|
2242
|
+
if (e.length && s && e[0] && n(e[0]) != null) {
|
|
2243
|
+
let o, u, l, f, c, a, d, p;
|
|
2244
|
+
for (
|
|
2245
|
+
l = 0, f = Math.min(s, e.length);
|
|
2246
|
+
l < f && ((a = r[l]) === e[l] || (a && e[l] && n(a) === n(e[l])));
|
|
2247
|
+
l++
|
|
2248
|
+
) {
|
|
2249
|
+
applyState(e[l], wrap(a, t), n);
|
|
2250
|
+
}
|
|
2251
|
+
const h = new Array(e.length),
|
|
2252
|
+
g = new Map();
|
|
1980
2253
|
for (
|
|
1981
|
-
|
|
1982
|
-
a
|
|
1983
|
-
|
|
1984
|
-
a++
|
|
2254
|
+
f = s - 1, c = e.length - 1;
|
|
2255
|
+
f >= l && c >= l && ((a = r[f]) === e[c] || (a && e[c] && n(a) === n(e[c])));
|
|
2256
|
+
f--, c--
|
|
1985
2257
|
) {
|
|
1986
|
-
|
|
2258
|
+
h[c] = a;
|
|
2259
|
+
}
|
|
2260
|
+
if (l > c || l > f) {
|
|
2261
|
+
for (u = l; u <= c; u++) {
|
|
2262
|
+
i = true;
|
|
2263
|
+
t[he][u] && setSignal(t[he][u], wrap(e[u], t));
|
|
2264
|
+
}
|
|
2265
|
+
for (; u < e.length; u++) {
|
|
2266
|
+
i = true;
|
|
2267
|
+
const r = wrap(h[u], t);
|
|
2268
|
+
t[he][u] && setSignal(t[he][u], r);
|
|
2269
|
+
applyState(e[u], r, n);
|
|
2270
|
+
}
|
|
2271
|
+
i && t[he][ue] && setSignal(t[he][ue], void 0);
|
|
2272
|
+
s !== e.length && t[he].length && setSignal(t[he].length, e.length);
|
|
2273
|
+
return;
|
|
2274
|
+
}
|
|
2275
|
+
d = new Array(c + 1);
|
|
2276
|
+
for (u = c; u >= l; u--) {
|
|
2277
|
+
a = e[u];
|
|
2278
|
+
p = a ? n(a) : a;
|
|
2279
|
+
o = g.get(p);
|
|
2280
|
+
d[u] = o === undefined ? -1 : o;
|
|
2281
|
+
g.set(p, u);
|
|
2282
|
+
}
|
|
2283
|
+
for (o = l; o <= f; o++) {
|
|
2284
|
+
a = r[o];
|
|
2285
|
+
p = a ? n(a) : a;
|
|
2286
|
+
u = g.get(p);
|
|
2287
|
+
if (u !== undefined && u !== -1) {
|
|
2288
|
+
h[u] = a;
|
|
2289
|
+
u = d[u];
|
|
2290
|
+
g.set(p, u);
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
for (u = l; u < e.length; u++) {
|
|
2294
|
+
if (u in h) {
|
|
2295
|
+
const r = wrap(h[u], t);
|
|
2296
|
+
t[he][u] && setSignal(t[he][u], r);
|
|
2297
|
+
applyState(e[u], r, n);
|
|
2298
|
+
} else t[he][u] && setSignal(t[he][u], wrap(e[u], t));
|
|
2299
|
+
}
|
|
2300
|
+
if (l < e.length) i = true;
|
|
2301
|
+
} else if (e.length) {
|
|
2302
|
+
for (let i = 0, s = e.length; i < s; i++) {
|
|
2303
|
+
const s = r[i];
|
|
2304
|
+
isWrappable(s) ? applyState(e[i], wrap(s, t), n) : t[he][i] && setSignal(t[he][i], e[i]);
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2307
|
+
if (s !== e.length) {
|
|
2308
|
+
i = true;
|
|
2309
|
+
t[he].length && setSignal(t[he].length, e.length);
|
|
2310
|
+
}
|
|
2311
|
+
i && t[he][ue] && setSignal(t[he][ue], void 0);
|
|
2312
|
+
return;
|
|
2313
|
+
}
|
|
2314
|
+
let i = t[he];
|
|
2315
|
+
if (i) {
|
|
2316
|
+
const s = i[ue];
|
|
2317
|
+
const o = s ? getAllKeys(r, undefined, e) : Object.keys(i);
|
|
2318
|
+
for (let u = 0, l = o.length; u < l; u++) {
|
|
2319
|
+
const l = o[u];
|
|
2320
|
+
const f = i[l];
|
|
2321
|
+
const c = unwrap(r[l]);
|
|
2322
|
+
let a = unwrap(e[l]);
|
|
2323
|
+
if (c === a) continue;
|
|
2324
|
+
if (!c || !isWrappable(c) || !isWrappable(a) || (n(c) != null && n(c) !== n(a))) {
|
|
2325
|
+
s && setSignal(s, void 0);
|
|
2326
|
+
f && setSignal(f, isWrappable(a) ? wrap(a, t) : a);
|
|
2327
|
+
} else applyState(a, wrap(c, t), n);
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
if ((i = t[ge])) {
|
|
2331
|
+
const t = Object.keys(i);
|
|
2332
|
+
for (let n = 0, r = t.length; n < r; n++) {
|
|
2333
|
+
const r = t[n];
|
|
2334
|
+
setSignal(i[r], r in e);
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
function applyStateSlow(e, t, n) {
|
|
2339
|
+
const r = t[ae];
|
|
2340
|
+
const i = t[de];
|
|
2341
|
+
const s = t[pe];
|
|
2342
|
+
let o = t[he];
|
|
2343
|
+
(t[we] || be).set(e, t[fe]);
|
|
2344
|
+
t[ae] = e;
|
|
2345
|
+
t[de] = undefined;
|
|
2346
|
+
if (Array.isArray(r)) {
|
|
2347
|
+
let o = false;
|
|
2348
|
+
const u = getOverrideValue(r, i, "length", s);
|
|
2349
|
+
if (e.length && u && e[0] && n(e[0]) != null) {
|
|
2350
|
+
let l, f, c, a, d, p, h, g;
|
|
2351
|
+
for (
|
|
2352
|
+
c = 0, a = Math.min(u, e.length);
|
|
2353
|
+
c < a && ((p = getOverrideValue(r, i, c, s)) === e[c] || (p && e[c] && n(p) === n(e[c])));
|
|
2354
|
+
c++
|
|
2355
|
+
) {
|
|
2356
|
+
applyState(e[c], wrap(p, t), n);
|
|
1987
2357
|
}
|
|
1988
2358
|
const S = new Array(e.length),
|
|
1989
|
-
|
|
2359
|
+
y = new Map();
|
|
1990
2360
|
for (
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
((p = getOverrideValue(
|
|
1995
|
-
|
|
2361
|
+
a = u - 1, d = e.length - 1;
|
|
2362
|
+
a >= c &&
|
|
2363
|
+
d >= c &&
|
|
2364
|
+
((p = getOverrideValue(r, i, a, s)) === e[d] || (p && e[d] && n(p) === n(e[d])));
|
|
2365
|
+
a--, d--
|
|
1996
2366
|
) {
|
|
1997
|
-
S[
|
|
2367
|
+
S[d] = p;
|
|
1998
2368
|
}
|
|
1999
|
-
if (
|
|
2000
|
-
for (
|
|
2001
|
-
|
|
2002
|
-
|
|
2369
|
+
if (c > d || c > a) {
|
|
2370
|
+
for (f = c; f <= d; f++) {
|
|
2371
|
+
o = true;
|
|
2372
|
+
t[he][f] && setSignal(t[he][f], wrap(e[f], t));
|
|
2003
2373
|
}
|
|
2004
|
-
for (;
|
|
2005
|
-
|
|
2006
|
-
const
|
|
2007
|
-
|
|
2008
|
-
applyState(e[
|
|
2374
|
+
for (; f < e.length; f++) {
|
|
2375
|
+
o = true;
|
|
2376
|
+
const r = wrap(S[f], t);
|
|
2377
|
+
t[he][f] && setSignal(t[he][f], r);
|
|
2378
|
+
applyState(e[f], r, n);
|
|
2009
2379
|
}
|
|
2010
|
-
|
|
2011
|
-
|
|
2380
|
+
o && t[he][ue] && setSignal(t[he][ue], void 0);
|
|
2381
|
+
u !== e.length && t[he].length && setSignal(t[he].length, e.length);
|
|
2012
2382
|
return;
|
|
2013
2383
|
}
|
|
2014
|
-
|
|
2015
|
-
for (
|
|
2016
|
-
p = e[
|
|
2384
|
+
h = new Array(d + 1);
|
|
2385
|
+
for (f = d; f >= c; f--) {
|
|
2386
|
+
p = e[f];
|
|
2017
2387
|
g = p ? n(p) : p;
|
|
2018
|
-
l =
|
|
2019
|
-
|
|
2020
|
-
|
|
2388
|
+
l = y.get(g);
|
|
2389
|
+
h[f] = l === undefined ? -1 : l;
|
|
2390
|
+
y.set(g, f);
|
|
2021
2391
|
}
|
|
2022
|
-
for (l =
|
|
2023
|
-
p = getOverrideValue(
|
|
2392
|
+
for (l = c; l <= a; l++) {
|
|
2393
|
+
p = getOverrideValue(r, i, l, s);
|
|
2024
2394
|
g = p ? n(p) : p;
|
|
2025
|
-
|
|
2026
|
-
if (
|
|
2027
|
-
S[
|
|
2028
|
-
|
|
2029
|
-
|
|
2395
|
+
f = y.get(g);
|
|
2396
|
+
if (f !== undefined && f !== -1) {
|
|
2397
|
+
S[f] = p;
|
|
2398
|
+
f = h[f];
|
|
2399
|
+
y.set(g, f);
|
|
2030
2400
|
}
|
|
2031
2401
|
}
|
|
2032
|
-
for (
|
|
2033
|
-
if (
|
|
2034
|
-
const
|
|
2035
|
-
|
|
2036
|
-
applyState(e[
|
|
2037
|
-
} else
|
|
2402
|
+
for (f = c; f < e.length; f++) {
|
|
2403
|
+
if (f in S) {
|
|
2404
|
+
const r = wrap(S[f], t);
|
|
2405
|
+
t[he][f] && setSignal(t[he][f], r);
|
|
2406
|
+
applyState(e[f], r, n);
|
|
2407
|
+
} else t[he][f] && setSignal(t[he][f], wrap(e[f], t));
|
|
2038
2408
|
}
|
|
2039
|
-
if (
|
|
2409
|
+
if (c < e.length) o = true;
|
|
2040
2410
|
} else if (e.length) {
|
|
2041
|
-
for (let
|
|
2042
|
-
const
|
|
2043
|
-
isWrappable(
|
|
2411
|
+
for (let o = 0, u = e.length; o < u; o++) {
|
|
2412
|
+
const u = getOverrideValue(r, i, o, s);
|
|
2413
|
+
isWrappable(u) ? applyState(e[o], wrap(u, t), n) : t[he][o] && setSignal(t[he][o], e[o]);
|
|
2044
2414
|
}
|
|
2045
2415
|
}
|
|
2046
|
-
if (
|
|
2047
|
-
|
|
2048
|
-
|
|
2416
|
+
if (u !== e.length) {
|
|
2417
|
+
o = true;
|
|
2418
|
+
t[he].length && setSignal(t[he].length, e.length);
|
|
2049
2419
|
}
|
|
2050
|
-
|
|
2420
|
+
o && t[he][ue] && setSignal(t[he][ue], void 0);
|
|
2051
2421
|
return;
|
|
2052
2422
|
}
|
|
2053
|
-
if (
|
|
2054
|
-
const
|
|
2055
|
-
const
|
|
2056
|
-
for (let
|
|
2057
|
-
const c = f
|
|
2058
|
-
const a =
|
|
2059
|
-
const d = unwrap(getOverrideValue(
|
|
2060
|
-
let
|
|
2061
|
-
if (d ===
|
|
2062
|
-
if (!d || !isWrappable(d) || !isWrappable(
|
|
2063
|
-
|
|
2064
|
-
a && setSignal(a, isWrappable(
|
|
2065
|
-
} else applyState(
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
2068
|
-
if ((
|
|
2069
|
-
const t = Object.keys(
|
|
2423
|
+
if (o) {
|
|
2424
|
+
const u = o[ue];
|
|
2425
|
+
const l = u ? getAllKeys(r, i, e) : Object.keys(o);
|
|
2426
|
+
for (let f = 0, c = l.length; f < c; f++) {
|
|
2427
|
+
const c = l[f];
|
|
2428
|
+
const a = o[c];
|
|
2429
|
+
const d = unwrap(getOverrideValue(r, i, c, s));
|
|
2430
|
+
let p = unwrap(e[c]);
|
|
2431
|
+
if (d === p) continue;
|
|
2432
|
+
if (!d || !isWrappable(d) || !isWrappable(p) || (n(d) != null && n(d) !== n(p))) {
|
|
2433
|
+
u && setSignal(u, void 0);
|
|
2434
|
+
a && setSignal(a, isWrappable(p) ? wrap(p, t) : p);
|
|
2435
|
+
} else applyState(p, wrap(d, t), n);
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2438
|
+
if ((o = t[ge])) {
|
|
2439
|
+
const t = Object.keys(o);
|
|
2070
2440
|
for (let n = 0, r = t.length; n < r; n++) {
|
|
2071
2441
|
const r = t[n];
|
|
2072
|
-
setSignal(
|
|
2442
|
+
setSignal(o[r], r in e);
|
|
2073
2443
|
}
|
|
2074
2444
|
}
|
|
2075
2445
|
}
|
|
@@ -2083,13 +2453,13 @@ function reconcile(e, t) {
|
|
|
2083
2453
|
applyState(e, n, r);
|
|
2084
2454
|
};
|
|
2085
2455
|
}
|
|
2086
|
-
function createProjectionInternal(e, t
|
|
2456
|
+
function createProjectionInternal(e, t, n) {
|
|
2087
2457
|
let r;
|
|
2088
2458
|
const i = new WeakMap();
|
|
2089
2459
|
const wrapper = e => {
|
|
2090
|
-
e[
|
|
2091
|
-
e[
|
|
2092
|
-
Object.defineProperty(e,
|
|
2460
|
+
e[ye] = wrapProjection;
|
|
2461
|
+
e[we] = i;
|
|
2462
|
+
Object.defineProperty(e, me, {
|
|
2093
2463
|
get() {
|
|
2094
2464
|
return r;
|
|
2095
2465
|
},
|
|
@@ -2098,35 +2468,42 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
2098
2468
|
};
|
|
2099
2469
|
const wrapProjection = e => {
|
|
2100
2470
|
if (i.has(e)) return i.get(e);
|
|
2101
|
-
if (e[
|
|
2102
|
-
const t = createStoreProxy(e,
|
|
2471
|
+
if (e[le]?.[ye] === wrapProjection) return e;
|
|
2472
|
+
const t = createStoreProxy(e, Pe, wrapper);
|
|
2103
2473
|
i.set(e, t);
|
|
2104
2474
|
return t;
|
|
2105
2475
|
};
|
|
2106
2476
|
const s = wrapProjection(t);
|
|
2107
2477
|
r = computed(() => {
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
s,
|
|
2113
|
-
createWriteTraps(() => !r || t.Ce === i)
|
|
2114
|
-
);
|
|
2115
|
-
storeSetter(o, o => {
|
|
2116
|
-
i = e(o);
|
|
2117
|
-
r = true;
|
|
2118
|
-
const u = handleAsync(t, i, e => {
|
|
2119
|
-
e !== o && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id"));
|
|
2120
|
-
});
|
|
2121
|
-
u !== o && u !== undefined && reconcile(u, n?.key || "id")(s);
|
|
2122
|
-
});
|
|
2123
|
-
});
|
|
2124
|
-
r.ve = true;
|
|
2478
|
+
if (!r) r = getOwner();
|
|
2479
|
+
runProjectionComputed(s, e, n?.key || "id");
|
|
2480
|
+
}, undefined);
|
|
2481
|
+
r.ye &= ~y;
|
|
2125
2482
|
return { store: s, node: r };
|
|
2126
2483
|
}
|
|
2127
|
-
function createProjection(e, t
|
|
2484
|
+
function createProjection(e, t, n) {
|
|
2128
2485
|
return createProjectionInternal(e, t, n).store;
|
|
2129
2486
|
}
|
|
2487
|
+
function runProjectionComputed(e, t, n, r) {
|
|
2488
|
+
const i = getOwner();
|
|
2489
|
+
let s = false;
|
|
2490
|
+
let o;
|
|
2491
|
+
const u = new Proxy(
|
|
2492
|
+
e,
|
|
2493
|
+
createWriteTraps(() => !s || i.ke === o)
|
|
2494
|
+
);
|
|
2495
|
+
storeSetter(u, u => {
|
|
2496
|
+
o = t(u);
|
|
2497
|
+
s = true;
|
|
2498
|
+
const commit = t => {
|
|
2499
|
+
if (t === u || t === undefined) return;
|
|
2500
|
+
const write = () => storeSetter(e, reconcile(t, n));
|
|
2501
|
+
r ? r(write) : write();
|
|
2502
|
+
};
|
|
2503
|
+
commit(handleAsync(i, o, commit));
|
|
2504
|
+
});
|
|
2505
|
+
return i;
|
|
2506
|
+
}
|
|
2130
2507
|
function createWriteTraps(e) {
|
|
2131
2508
|
const t = {
|
|
2132
2509
|
get(e, n) {
|
|
@@ -2180,49 +2557,65 @@ function createWriteTraps(e) {
|
|
|
2180
2557
|
};
|
|
2181
2558
|
return t;
|
|
2182
2559
|
}
|
|
2183
|
-
const
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
const
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2560
|
+
const ue = Symbol(0),
|
|
2561
|
+
le = Symbol(0),
|
|
2562
|
+
fe = Symbol(0),
|
|
2563
|
+
ce = Symbol(0);
|
|
2564
|
+
const ae = "v",
|
|
2565
|
+
de = "o",
|
|
2566
|
+
pe = "x",
|
|
2567
|
+
he = "n",
|
|
2568
|
+
ge = "h",
|
|
2569
|
+
Se = "c",
|
|
2570
|
+
ye = "w",
|
|
2571
|
+
we = "l",
|
|
2572
|
+
me = "f",
|
|
2573
|
+
_e = "p";
|
|
2574
|
+
function createStoreProxy(e, t = Pe, n) {
|
|
2197
2575
|
let r;
|
|
2198
2576
|
if (Array.isArray(e)) {
|
|
2199
2577
|
r = [];
|
|
2200
2578
|
r.v = e;
|
|
2201
|
-
} else
|
|
2579
|
+
} else {
|
|
2580
|
+
r = { v: e };
|
|
2581
|
+
const t = e?.[le]?.[ae] ?? e;
|
|
2582
|
+
const n = Object.getPrototypeOf(t);
|
|
2583
|
+
if (n !== null && n !== Object.prototype) {
|
|
2584
|
+
r[Se] = true;
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2202
2587
|
n && n(r);
|
|
2203
|
-
return (r[
|
|
2588
|
+
return (r[fe] = new Proxy(r, t));
|
|
2204
2589
|
}
|
|
2205
|
-
const
|
|
2590
|
+
const be = new WeakMap();
|
|
2206
2591
|
function wrap(e, t) {
|
|
2207
|
-
if (t?.[
|
|
2208
|
-
let n = e[
|
|
2209
|
-
if (!n)
|
|
2592
|
+
if (t?.[ye]) return t[ye](e, t);
|
|
2593
|
+
let n = e[fe] || be.get(e);
|
|
2594
|
+
if (!n) be.set(e, (n = createStoreProxy(e)));
|
|
2210
2595
|
return n;
|
|
2211
2596
|
}
|
|
2212
2597
|
function isWrappable(e) {
|
|
2213
|
-
return
|
|
2214
|
-
|
|
2215
|
-
typeof e === "object" &&
|
|
2216
|
-
!Object.isFrozen(e) &&
|
|
2217
|
-
!(typeof Node !== "undefined" && e instanceof Node)
|
|
2218
|
-
);
|
|
2598
|
+
if (e == null || typeof e !== "object" || Object.isFrozen(e)) return false;
|
|
2599
|
+
return typeof Node === "undefined" || !(e instanceof Node);
|
|
2219
2600
|
}
|
|
2220
|
-
let
|
|
2601
|
+
let Oe = false;
|
|
2221
2602
|
function setWriteOverride(e) {
|
|
2222
|
-
|
|
2603
|
+
Oe = e;
|
|
2223
2604
|
}
|
|
2224
2605
|
function writeOnly(e) {
|
|
2225
|
-
return
|
|
2606
|
+
return Oe || !!ve?.has(e);
|
|
2607
|
+
}
|
|
2608
|
+
function unwrapStoreValue(e) {
|
|
2609
|
+
return e?.[le]?.[ae] ?? e;
|
|
2610
|
+
}
|
|
2611
|
+
function hasInheritedAccessor(e, t) {
|
|
2612
|
+
let n = Object.getPrototypeOf(e);
|
|
2613
|
+
while (n && n !== Object.prototype) {
|
|
2614
|
+
const e = Reflect.getOwnPropertyDescriptor(n, t);
|
|
2615
|
+
if (e) return !!e.get;
|
|
2616
|
+
n = Object.getPrototypeOf(n);
|
|
2617
|
+
}
|
|
2618
|
+
return false;
|
|
2226
2619
|
}
|
|
2227
2620
|
function getNodes(e, t) {
|
|
2228
2621
|
let n = e[t];
|
|
@@ -2236,23 +2629,23 @@ function getNode(e, t, n, r, i = isEqual, s, o) {
|
|
|
2236
2629
|
{
|
|
2237
2630
|
equals: i,
|
|
2238
2631
|
unobserved() {
|
|
2239
|
-
delete e[t];
|
|
2632
|
+
if (e[t] === u) delete e[t];
|
|
2240
2633
|
}
|
|
2241
2634
|
},
|
|
2242
2635
|
r
|
|
2243
2636
|
);
|
|
2244
2637
|
if (s) {
|
|
2245
|
-
u.
|
|
2638
|
+
u.G = x;
|
|
2246
2639
|
}
|
|
2247
2640
|
if (o && t in o) {
|
|
2248
2641
|
const e = o[t];
|
|
2249
|
-
u.
|
|
2250
|
-
|
|
2642
|
+
u._e = e === undefined ? C : e;
|
|
2643
|
+
se?.add(u);
|
|
2251
2644
|
}
|
|
2252
2645
|
return (e[t] = u);
|
|
2253
2646
|
}
|
|
2254
|
-
function trackSelf(e, t =
|
|
2255
|
-
getObserver() && read(getNode(getNodes(e,
|
|
2647
|
+
function trackSelf(e, t = ue) {
|
|
2648
|
+
getObserver() && read(getNode(getNodes(e, he), t, undefined, e[me], false, e[_e]));
|
|
2256
2649
|
}
|
|
2257
2650
|
function getKeys(e, t, n = true) {
|
|
2258
2651
|
const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
|
|
@@ -2260,137 +2653,197 @@ function getKeys(e, t, n = true) {
|
|
|
2260
2653
|
const i = new Set(r);
|
|
2261
2654
|
const s = Reflect.ownKeys(t);
|
|
2262
2655
|
for (const e of s) {
|
|
2263
|
-
if (t[e] !==
|
|
2656
|
+
if (t[e] !== ce) i.add(e);
|
|
2264
2657
|
else i.delete(e);
|
|
2265
2658
|
}
|
|
2266
2659
|
return Array.from(i);
|
|
2267
2660
|
}
|
|
2268
2661
|
function getPropertyDescriptor(e, t, n) {
|
|
2269
2662
|
if (t && n in t) {
|
|
2270
|
-
if (t[n] ===
|
|
2663
|
+
if (t[n] === ce) return void 0;
|
|
2271
2664
|
const r = Reflect.getOwnPropertyDescriptor(t, n);
|
|
2272
2665
|
if (r?.get || r?.set || !(n in e)) return r;
|
|
2273
2666
|
}
|
|
2274
2667
|
return Reflect.getOwnPropertyDescriptor(e, n);
|
|
2275
2668
|
}
|
|
2276
2669
|
function prepareStoreWrite(e, t, n) {
|
|
2277
|
-
if (e[
|
|
2278
|
-
const t = e[
|
|
2279
|
-
if (t?.
|
|
2280
|
-
|
|
2670
|
+
if (e[_e]) {
|
|
2671
|
+
const t = e[me];
|
|
2672
|
+
if (t?.V) {
|
|
2673
|
+
z.initTransition(t.V);
|
|
2281
2674
|
}
|
|
2282
2675
|
}
|
|
2283
|
-
const r = e[
|
|
2676
|
+
const r = e[ae];
|
|
2284
2677
|
const i = r[n];
|
|
2285
|
-
if (
|
|
2286
|
-
if (!e[
|
|
2287
|
-
e[
|
|
2288
|
-
|
|
2678
|
+
if (ie && typeof n !== "symbol" && !((e[me]?.be ?? 0) & m)) {
|
|
2679
|
+
if (!e[N]) {
|
|
2680
|
+
e[N] = Object.create(null);
|
|
2681
|
+
se?.add(e);
|
|
2289
2682
|
}
|
|
2290
|
-
if (!(n in e[
|
|
2291
|
-
e[
|
|
2683
|
+
if (!(n in e[N])) {
|
|
2684
|
+
e[N][n] = i;
|
|
2292
2685
|
}
|
|
2293
2686
|
}
|
|
2294
|
-
const s = e[
|
|
2295
|
-
const o = s ?
|
|
2687
|
+
const s = e[_e] && !K;
|
|
2688
|
+
const o = s ? pe : de;
|
|
2296
2689
|
if (s) trackOptimisticStore(t);
|
|
2297
2690
|
return { base: i, overrideKey: o, state: r };
|
|
2298
2691
|
}
|
|
2299
|
-
function
|
|
2300
|
-
if (
|
|
2301
|
-
const
|
|
2692
|
+
function upsertStoreNode(e, t, n, r, i) {
|
|
2693
|
+
if (t[n]) return t[n];
|
|
2694
|
+
const s = isWrappable(r) ? wrap(r, e) : r;
|
|
2695
|
+
const o = getNode(t, n, s, e[me], isEqual, e[_e], i);
|
|
2696
|
+
registerTransientStoreNode(o);
|
|
2697
|
+
return o;
|
|
2698
|
+
}
|
|
2699
|
+
function notifyStoreProperty(e, t, n, r, i, s) {
|
|
2700
|
+
const o = K || e[_e];
|
|
2701
|
+
const u = n !== "delete";
|
|
2702
|
+
const l = e[ge]?.[t];
|
|
2703
|
+
if (l) {
|
|
2704
|
+
setSignal(l, u);
|
|
2705
|
+
} else if (!o && n !== "invalidate" && s !== u) {
|
|
2706
|
+
const n = upsertStoreNode(e, getNodes(e, ge), t, s);
|
|
2707
|
+
setSignal(n, u);
|
|
2708
|
+
}
|
|
2709
|
+
const f = getNodes(e, he);
|
|
2302
2710
|
if (n === "set") {
|
|
2303
|
-
|
|
2711
|
+
if (f[t]) {
|
|
2712
|
+
setSignal(f[t], () => (isWrappable(r) ? wrap(r, e) : r));
|
|
2713
|
+
} else if (!o) {
|
|
2714
|
+
const n = upsertStoreNode(e, f, t, i, e[N]);
|
|
2715
|
+
setSignal(n, () => (isWrappable(r) ? wrap(r, e) : r));
|
|
2716
|
+
}
|
|
2304
2717
|
} else if (n === "invalidate") {
|
|
2305
|
-
if (
|
|
2306
|
-
setSignal(
|
|
2307
|
-
delete
|
|
2718
|
+
if (f[t]) {
|
|
2719
|
+
setSignal(f[t], {});
|
|
2720
|
+
delete f[t];
|
|
2308
2721
|
}
|
|
2309
2722
|
} else {
|
|
2310
|
-
|
|
2723
|
+
if (f[t]) {
|
|
2724
|
+
setSignal(f[t], undefined);
|
|
2725
|
+
} else if (!o) {
|
|
2726
|
+
const n = upsertStoreNode(e, f, t, i, e[N]);
|
|
2727
|
+
setSignal(n, undefined);
|
|
2728
|
+
}
|
|
2311
2729
|
}
|
|
2312
|
-
|
|
2730
|
+
f[ue] && setSignal(f[ue], undefined);
|
|
2313
2731
|
}
|
|
2314
|
-
let
|
|
2315
|
-
const
|
|
2732
|
+
let ve = null;
|
|
2733
|
+
const Pe = {
|
|
2316
2734
|
get(e, t, n) {
|
|
2317
|
-
if (t ===
|
|
2318
|
-
if (t ===
|
|
2319
|
-
if (t ===
|
|
2320
|
-
if (t ===
|
|
2735
|
+
if (t === le) return e;
|
|
2736
|
+
if (t === fe) return n;
|
|
2737
|
+
if (t === j) return e[me];
|
|
2738
|
+
if (t === ue) {
|
|
2321
2739
|
trackSelf(e);
|
|
2322
2740
|
return n;
|
|
2323
2741
|
}
|
|
2324
|
-
const r = getNodes(e,
|
|
2742
|
+
const r = getNodes(e, he);
|
|
2325
2743
|
const i = r[t];
|
|
2326
|
-
const s = e[
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2744
|
+
const s = e[ae];
|
|
2745
|
+
if (
|
|
2746
|
+
!i &&
|
|
2747
|
+
!e[de] &&
|
|
2748
|
+
!e[pe] &&
|
|
2749
|
+
!e[Se] &&
|
|
2750
|
+
!e[_e] &&
|
|
2751
|
+
!e[N] &&
|
|
2752
|
+
!s[le] &&
|
|
2753
|
+
!(t in s) &&
|
|
2754
|
+
getObserver() &&
|
|
2755
|
+
!writeOnly(n)
|
|
2756
|
+
) {
|
|
2757
|
+
return read(getNode(r, t, undefined, e[me]));
|
|
2758
|
+
}
|
|
2759
|
+
const o = e[pe] && t in e[pe];
|
|
2760
|
+
const u = o || (e[de] && t in e[de]);
|
|
2761
|
+
const l = !!e[ae][le];
|
|
2762
|
+
const f = o ? e[pe] : e[de] && t in e[de] ? e[de] : e[ae];
|
|
2330
2763
|
if (!i) {
|
|
2331
|
-
const
|
|
2332
|
-
if (
|
|
2764
|
+
const r = Object.getOwnPropertyDescriptor(f, t);
|
|
2765
|
+
if (r && r.get) return r.get.call(n);
|
|
2766
|
+
if (!r && !u && e[Se]) {
|
|
2767
|
+
const e = unwrapStoreValue(f);
|
|
2768
|
+
if (hasInheritedAccessor(e, t)) {
|
|
2769
|
+
return Reflect.get(f, t, n);
|
|
2770
|
+
}
|
|
2771
|
+
}
|
|
2333
2772
|
}
|
|
2334
2773
|
if (writeOnly(n)) {
|
|
2335
2774
|
let n =
|
|
2336
|
-
i && (
|
|
2337
|
-
n ===
|
|
2775
|
+
i && (u || !l) ? (i.G !== undefined && i.G !== x ? i.G : i.Y !== x ? i.Y : i.ue) : f[t];
|
|
2776
|
+
n === ce && (n = undefined);
|
|
2338
2777
|
if (!isWrappable(n)) return n;
|
|
2339
2778
|
const r = wrap(n, e);
|
|
2340
|
-
|
|
2779
|
+
ve?.add(r);
|
|
2341
2780
|
return r;
|
|
2342
2781
|
}
|
|
2343
|
-
let
|
|
2344
|
-
|
|
2782
|
+
let c = i ? (u || !l ? read(r[t]) : (read(r[t]), f[t])) : f[t];
|
|
2783
|
+
c === ce && (c = undefined);
|
|
2345
2784
|
if (!i) {
|
|
2346
|
-
if (!
|
|
2785
|
+
if (!u && typeof c === "function" && !f.hasOwnProperty(t)) {
|
|
2347
2786
|
let t;
|
|
2348
|
-
return !Array.isArray(e[
|
|
2349
|
-
?
|
|
2350
|
-
:
|
|
2787
|
+
return !Array.isArray(e[ae]) && (t = Object.getPrototypeOf(e[ae])) && t !== Object.prototype
|
|
2788
|
+
? c.bind(f)
|
|
2789
|
+
: c;
|
|
2351
2790
|
} else if (getObserver()) {
|
|
2352
|
-
return read(getNode(r, t, isWrappable(
|
|
2791
|
+
return read(getNode(r, t, isWrappable(c) ? wrap(c, e) : c, e[me], isEqual, e[_e], e[N]));
|
|
2353
2792
|
}
|
|
2354
2793
|
}
|
|
2355
|
-
return isWrappable(
|
|
2794
|
+
return isWrappable(c) ? wrap(c, e) : c;
|
|
2356
2795
|
},
|
|
2357
2796
|
has(e, t) {
|
|
2358
|
-
if (t ===
|
|
2359
|
-
const n =
|
|
2360
|
-
|
|
2361
|
-
|
|
2797
|
+
if (t === fe || t === ue || t === "__proto__") return true;
|
|
2798
|
+
const n =
|
|
2799
|
+
e[pe] && t in e[pe] ? e[pe][t] !== ce : e[de] && t in e[de] ? e[de][t] !== ce : t in e[ae];
|
|
2800
|
+
if (writeOnly(e[fe])) return n;
|
|
2801
|
+
const r = getNodes(e, ge);
|
|
2802
|
+
if (r[t]) return read(r[t]);
|
|
2803
|
+
if (getObserver()) {
|
|
2804
|
+
return read(getNode(r, t, n, e[me], isEqual, e[_e]));
|
|
2362
2805
|
}
|
|
2363
2806
|
return n;
|
|
2364
2807
|
},
|
|
2365
2808
|
set(e, t, n) {
|
|
2366
|
-
const r = e[
|
|
2809
|
+
const r = e[fe];
|
|
2367
2810
|
if (writeOnly(r)) {
|
|
2368
2811
|
untrack(() => {
|
|
2369
2812
|
const { base: i, overrideKey: s, state: o } = prepareStoreWrite(e, r, t);
|
|
2370
|
-
const u = e[
|
|
2371
|
-
const
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2813
|
+
const u = e[pe] && t in e[pe] ? e[pe][t] : e[de] && t in e[de] ? e[de][t] : i;
|
|
2814
|
+
const l =
|
|
2815
|
+
e[pe] && t in e[pe]
|
|
2816
|
+
? e[pe][t] !== ce
|
|
2817
|
+
: e[de] && t in e[de]
|
|
2818
|
+
? e[de][t] !== ce
|
|
2819
|
+
: t in e[ae];
|
|
2820
|
+
const f = unwrapStoreValue(n);
|
|
2821
|
+
const c = Array.isArray(o) && t !== "length";
|
|
2822
|
+
const a = c ? parseInt(t) + 1 : 0;
|
|
2823
|
+
const d =
|
|
2824
|
+
c &&
|
|
2825
|
+
(e[pe] && "length" in e[pe]
|
|
2826
|
+
? e[pe].length
|
|
2827
|
+
: e[de] && "length" in e[de]
|
|
2828
|
+
? e[de].length
|
|
2380
2829
|
: o.length);
|
|
2381
|
-
const
|
|
2382
|
-
if (u === f &&
|
|
2383
|
-
if (f !== undefined && f === i &&
|
|
2830
|
+
const p = c && a > d ? a : undefined;
|
|
2831
|
+
if (u === f && p === undefined) return true;
|
|
2832
|
+
if (f !== undefined && f === i && p === undefined) delete e[s]?.[t];
|
|
2384
2833
|
else {
|
|
2385
2834
|
const n = e[s] || (e[s] = Object.create(null));
|
|
2386
2835
|
n[t] = f;
|
|
2387
|
-
if (
|
|
2836
|
+
if (p !== undefined) n.length = p;
|
|
2388
2837
|
}
|
|
2389
|
-
notifyStoreProperty(e, t, "set", f);
|
|
2390
|
-
if (Array.isArray(o)) {
|
|
2391
|
-
const
|
|
2392
|
-
|
|
2393
|
-
|
|
2838
|
+
notifyStoreProperty(e, t, "set", f, u, l);
|
|
2839
|
+
if (Array.isArray(o) && t !== "length" && p !== undefined) {
|
|
2840
|
+
const t = getNodes(e, he);
|
|
2841
|
+
if (t.length) {
|
|
2842
|
+
setSignal(t.length, p);
|
|
2843
|
+
} else if (!K && !e[_e]) {
|
|
2844
|
+
const n = upsertStoreNode(e, t, "length", d, e[N]);
|
|
2845
|
+
setSignal(n, p);
|
|
2846
|
+
}
|
|
2394
2847
|
}
|
|
2395
2848
|
if (false);
|
|
2396
2849
|
});
|
|
@@ -2398,11 +2851,11 @@ const le = {
|
|
|
2398
2851
|
return true;
|
|
2399
2852
|
},
|
|
2400
2853
|
defineProperty(e, t, n) {
|
|
2401
|
-
const r = e[
|
|
2854
|
+
const r = e[fe];
|
|
2402
2855
|
if (writeOnly(r)) {
|
|
2403
2856
|
untrack(() => {
|
|
2404
2857
|
const { base: i, overrideKey: s } = prepareStoreWrite(e, r, t);
|
|
2405
|
-
const o = "value" in n ? { ...n, value: n.value
|
|
2858
|
+
const o = "value" in n ? { ...n, value: unwrapStoreValue(n.value) } : n;
|
|
2406
2859
|
Object.defineProperty(e[s] || (e[s] = Object.create(null)), t, o);
|
|
2407
2860
|
notifyStoreProperty(e, t, "invalidate");
|
|
2408
2861
|
if (false);
|
|
@@ -2411,31 +2864,31 @@ const le = {
|
|
|
2411
2864
|
return true;
|
|
2412
2865
|
},
|
|
2413
2866
|
deleteProperty(e, t) {
|
|
2414
|
-
const n = e[
|
|
2415
|
-
const r = e[
|
|
2416
|
-
if (writeOnly(e[
|
|
2867
|
+
const n = e[pe]?.[t] === ce;
|
|
2868
|
+
const r = e[de]?.[t] === ce;
|
|
2869
|
+
if (writeOnly(e[fe]) && !n && !r) {
|
|
2417
2870
|
untrack(() => {
|
|
2418
|
-
const n = e[
|
|
2419
|
-
const r = n ?
|
|
2420
|
-
if (n) trackOptimisticStore(e[
|
|
2421
|
-
const i = e[
|
|
2422
|
-
if (t in e[
|
|
2423
|
-
(e[r] || (e[r] = Object.create(null)))[t] =
|
|
2871
|
+
const n = e[_e] && !K;
|
|
2872
|
+
const r = n ? pe : de;
|
|
2873
|
+
if (n) trackOptimisticStore(e[fe]);
|
|
2874
|
+
const i = e[pe] && t in e[pe] ? e[pe][t] : e[de] && t in e[de] ? e[de][t] : e[ae][t];
|
|
2875
|
+
if (t in e[ae] || (e[de] && t in e[de])) {
|
|
2876
|
+
(e[r] || (e[r] = Object.create(null)))[t] = ce;
|
|
2424
2877
|
} else if (e[r] && t in e[r]) {
|
|
2425
2878
|
delete e[r][t];
|
|
2426
2879
|
} else return true;
|
|
2427
|
-
notifyStoreProperty(e, t, "delete");
|
|
2880
|
+
notifyStoreProperty(e, t, "delete", undefined, i, true);
|
|
2428
2881
|
});
|
|
2429
2882
|
}
|
|
2430
2883
|
return true;
|
|
2431
2884
|
},
|
|
2432
2885
|
ownKeys(e) {
|
|
2433
2886
|
trackSelf(e);
|
|
2434
|
-
let t = getKeys(e[
|
|
2435
|
-
if (e[
|
|
2887
|
+
let t = getKeys(e[ae], e[de], false);
|
|
2888
|
+
if (e[pe]) {
|
|
2436
2889
|
const n = new Set(t);
|
|
2437
|
-
for (const t of Reflect.ownKeys(e[
|
|
2438
|
-
if (e[
|
|
2890
|
+
for (const t of Reflect.ownKeys(e[pe])) {
|
|
2891
|
+
if (e[pe][t] !== ce) n.add(t);
|
|
2439
2892
|
else n.delete(t);
|
|
2440
2893
|
}
|
|
2441
2894
|
t = Array.from(n);
|
|
@@ -2443,27 +2896,27 @@ const le = {
|
|
|
2443
2896
|
return t;
|
|
2444
2897
|
},
|
|
2445
2898
|
getOwnPropertyDescriptor(e, t) {
|
|
2446
|
-
if (t ===
|
|
2447
|
-
if (e[
|
|
2448
|
-
if (e[
|
|
2449
|
-
const n = Reflect.getOwnPropertyDescriptor(e[
|
|
2450
|
-
if (n?.get || n?.set || !(t in e[
|
|
2451
|
-
const r = getPropertyDescriptor(e[
|
|
2899
|
+
if (t === fe) return { value: e[fe], writable: true, configurable: true };
|
|
2900
|
+
if (e[pe] && t in e[pe]) {
|
|
2901
|
+
if (e[pe][t] === ce) return undefined;
|
|
2902
|
+
const n = Reflect.getOwnPropertyDescriptor(e[pe], t);
|
|
2903
|
+
if (n?.get || n?.set || !(t in e[ae])) return n;
|
|
2904
|
+
const r = getPropertyDescriptor(e[ae], e[de], t);
|
|
2452
2905
|
if (r) {
|
|
2453
|
-
return { ...r, value: e[
|
|
2906
|
+
return { ...r, value: e[pe][t] };
|
|
2454
2907
|
}
|
|
2455
|
-
return { value: e[
|
|
2908
|
+
return { value: e[pe][t], writable: true, enumerable: true, configurable: true };
|
|
2456
2909
|
}
|
|
2457
|
-
return getPropertyDescriptor(e[
|
|
2910
|
+
return getPropertyDescriptor(e[ae], e[de], t);
|
|
2458
2911
|
},
|
|
2459
2912
|
getPrototypeOf(e) {
|
|
2460
|
-
return Object.getPrototypeOf(e[
|
|
2913
|
+
return Object.getPrototypeOf(e[ae]);
|
|
2461
2914
|
}
|
|
2462
2915
|
};
|
|
2463
2916
|
function storeSetter(e, t) {
|
|
2464
|
-
const n =
|
|
2465
|
-
|
|
2466
|
-
|
|
2917
|
+
const n = ve;
|
|
2918
|
+
ve = new Set();
|
|
2919
|
+
ve.add(e);
|
|
2467
2920
|
try {
|
|
2468
2921
|
const n = t(e);
|
|
2469
2922
|
if (n !== e && n !== undefined) {
|
|
@@ -2479,57 +2932,60 @@ function storeSetter(e, t) {
|
|
|
2479
2932
|
}
|
|
2480
2933
|
}
|
|
2481
2934
|
} finally {
|
|
2482
|
-
|
|
2483
|
-
|
|
2935
|
+
ve.clear();
|
|
2936
|
+
ve = n;
|
|
2484
2937
|
}
|
|
2485
2938
|
}
|
|
2486
2939
|
function createStore(e, t, n) {
|
|
2487
2940
|
const r = typeof e === "function",
|
|
2488
2941
|
i = r ? createProjectionInternal(e, t, n).store : wrap(e);
|
|
2489
|
-
return [
|
|
2942
|
+
return [
|
|
2943
|
+
i,
|
|
2944
|
+
r ? e => (storeSetter(i, e), suppressComputedRecompute(i[j])) : e => storeSetter(i, e)
|
|
2945
|
+
];
|
|
2490
2946
|
}
|
|
2491
2947
|
function createOptimisticStore(e, t, n) {
|
|
2492
|
-
GlobalQueue.
|
|
2948
|
+
GlobalQueue.ge ||= clearOptimisticStore;
|
|
2493
2949
|
const r = typeof e === "function";
|
|
2494
|
-
const i =
|
|
2950
|
+
const i = r ? t : e;
|
|
2495
2951
|
const s = r ? e : undefined;
|
|
2496
2952
|
const { store: o } = createOptimisticProjectionInternal(s, i, n);
|
|
2497
2953
|
return [o, e => storeSetter(o, e)];
|
|
2498
2954
|
}
|
|
2499
2955
|
function clearOptimisticStore(e) {
|
|
2500
|
-
const t = e[
|
|
2501
|
-
if (!t || !t[
|
|
2502
|
-
const n = t[
|
|
2503
|
-
const r = t[
|
|
2956
|
+
const t = e[le];
|
|
2957
|
+
if (!t || !t[pe]) return;
|
|
2958
|
+
const n = t[pe];
|
|
2959
|
+
const r = t[he];
|
|
2504
2960
|
setProjectionWriteActive(true);
|
|
2505
2961
|
try {
|
|
2506
2962
|
if (r) {
|
|
2507
2963
|
for (const e of Reflect.ownKeys(n)) {
|
|
2508
2964
|
if (r[e]) {
|
|
2509
|
-
r[e].
|
|
2510
|
-
const n = t[
|
|
2511
|
-
const i = n ===
|
|
2965
|
+
r[e].H = undefined;
|
|
2966
|
+
const n = t[de] && e in t[de] ? t[de][e] : t[ae][e];
|
|
2967
|
+
const i = n === ce ? undefined : n;
|
|
2512
2968
|
setSignal(r[e], isWrappable(i) ? wrap(i, t) : i);
|
|
2513
2969
|
}
|
|
2514
2970
|
}
|
|
2515
|
-
if (r[
|
|
2516
|
-
r[
|
|
2517
|
-
setSignal(r[
|
|
2971
|
+
if (r[ue]) {
|
|
2972
|
+
r[ue].H = undefined;
|
|
2973
|
+
setSignal(r[ue], undefined);
|
|
2518
2974
|
}
|
|
2519
2975
|
}
|
|
2520
2976
|
} finally {
|
|
2521
2977
|
setProjectionWriteActive(false);
|
|
2522
2978
|
}
|
|
2523
|
-
delete t[
|
|
2979
|
+
delete t[pe];
|
|
2524
2980
|
}
|
|
2525
|
-
function createOptimisticProjectionInternal(e, t
|
|
2981
|
+
function createOptimisticProjectionInternal(e, t, n) {
|
|
2526
2982
|
let r;
|
|
2527
2983
|
const i = new WeakMap();
|
|
2528
2984
|
const wrapper = e => {
|
|
2529
|
-
e[
|
|
2530
|
-
e[
|
|
2531
|
-
e[
|
|
2532
|
-
Object.defineProperty(e,
|
|
2985
|
+
e[ye] = wrapProjection;
|
|
2986
|
+
e[we] = i;
|
|
2987
|
+
e[_e] = true;
|
|
2988
|
+
Object.defineProperty(e, me, {
|
|
2533
2989
|
get() {
|
|
2534
2990
|
return r;
|
|
2535
2991
|
},
|
|
@@ -2538,45 +2994,37 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
|
|
|
2538
2994
|
};
|
|
2539
2995
|
const wrapProjection = e => {
|
|
2540
2996
|
if (i.has(e)) return i.get(e);
|
|
2541
|
-
if (e[
|
|
2542
|
-
const t = createStoreProxy(e,
|
|
2997
|
+
if (e[le]?.[ye] === wrapProjection) return e;
|
|
2998
|
+
const t = createStoreProxy(e, Pe, wrapper);
|
|
2543
2999
|
i.set(e, t);
|
|
2544
3000
|
return t;
|
|
2545
3001
|
};
|
|
2546
3002
|
const s = wrapProjection(t);
|
|
2547
3003
|
if (e) {
|
|
3004
|
+
const wrapCommit = e => {
|
|
3005
|
+
setProjectionWriteActive(true);
|
|
3006
|
+
try {
|
|
3007
|
+
e();
|
|
3008
|
+
} finally {
|
|
3009
|
+
setProjectionWriteActive(false);
|
|
3010
|
+
}
|
|
3011
|
+
};
|
|
2548
3012
|
r = computed(() => {
|
|
2549
|
-
const t = getOwner();
|
|
2550
|
-
let r = false;
|
|
2551
|
-
let i;
|
|
2552
|
-
const o = new Proxy(
|
|
2553
|
-
s,
|
|
2554
|
-
createWriteTraps(() => !r || t.Ce === i)
|
|
2555
|
-
);
|
|
2556
3013
|
setProjectionWriteActive(true);
|
|
2557
3014
|
try {
|
|
2558
|
-
|
|
2559
|
-
i = e(o);
|
|
2560
|
-
r = true;
|
|
2561
|
-
const u = handleAsync(t, i, e => {
|
|
2562
|
-
setProjectionWriteActive(true);
|
|
2563
|
-
try {
|
|
2564
|
-
e !== o && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id"));
|
|
2565
|
-
} finally {
|
|
2566
|
-
setProjectionWriteActive(false);
|
|
2567
|
-
}
|
|
2568
|
-
});
|
|
2569
|
-
u !== o && u !== undefined && reconcile(u, n?.key || "id")(s);
|
|
2570
|
-
});
|
|
3015
|
+
runProjectionComputed(s, e, n?.key || "id", wrapCommit);
|
|
2571
3016
|
} finally {
|
|
2572
3017
|
setProjectionWriteActive(false);
|
|
2573
3018
|
}
|
|
2574
|
-
});
|
|
2575
|
-
r.
|
|
3019
|
+
}, undefined);
|
|
3020
|
+
r.ye &= ~y;
|
|
2576
3021
|
}
|
|
2577
3022
|
return { store: s, node: r };
|
|
2578
3023
|
}
|
|
2579
|
-
const
|
|
3024
|
+
const xe = Symbol(0);
|
|
3025
|
+
function isPrototypePollutionKey(e) {
|
|
3026
|
+
return e === "__proto__" || e === "constructor" || e === "prototype";
|
|
3027
|
+
}
|
|
2580
3028
|
function updatePath(e, t, n = 0) {
|
|
2581
3029
|
let r,
|
|
2582
3030
|
i = e;
|
|
@@ -2584,6 +3032,7 @@ function updatePath(e, t, n = 0) {
|
|
|
2584
3032
|
r = t[n];
|
|
2585
3033
|
const s = typeof r;
|
|
2586
3034
|
const o = Array.isArray(e);
|
|
3035
|
+
if (s === "string" && isPrototypePollutionKey(r)) return;
|
|
2587
3036
|
if (Array.isArray(r)) {
|
|
2588
3037
|
for (let i = 0; i < r.length; i++) {
|
|
2589
3038
|
t[n] = r[i];
|
|
@@ -2620,13 +3069,14 @@ function updatePath(e, t, n = 0) {
|
|
|
2620
3069
|
if (s === i) return;
|
|
2621
3070
|
}
|
|
2622
3071
|
if (r === undefined && s == undefined) return;
|
|
2623
|
-
if (s ===
|
|
3072
|
+
if (s === xe) {
|
|
2624
3073
|
delete e[r];
|
|
2625
3074
|
} else if (r === undefined || (isWrappable(i) && isWrappable(s) && !Array.isArray(s))) {
|
|
2626
3075
|
const t = r !== undefined ? e[r] : e;
|
|
2627
3076
|
const n = Object.keys(s);
|
|
2628
3077
|
for (let e = 0; e < n.length; e++) {
|
|
2629
3078
|
const r = n[e];
|
|
3079
|
+
if (isPrototypePollutionKey(r)) continue;
|
|
2630
3080
|
const i = Object.getOwnPropertyDescriptor(s, r);
|
|
2631
3081
|
if (i.get || i.set) Object.defineProperty(t, r, i);
|
|
2632
3082
|
else t[r] = i.value;
|
|
@@ -2635,26 +3085,26 @@ function updatePath(e, t, n = 0) {
|
|
|
2635
3085
|
e[r] = s;
|
|
2636
3086
|
}
|
|
2637
3087
|
}
|
|
2638
|
-
const
|
|
3088
|
+
const Ce = Object.assign(
|
|
2639
3089
|
function storePath(...e) {
|
|
2640
3090
|
return t => {
|
|
2641
3091
|
updatePath(t, e);
|
|
2642
3092
|
};
|
|
2643
3093
|
},
|
|
2644
|
-
{ DELETE:
|
|
3094
|
+
{ DELETE: xe }
|
|
2645
3095
|
);
|
|
2646
3096
|
function snapshotImpl(e, t, n, r) {
|
|
2647
|
-
let i, s, o, u,
|
|
3097
|
+
let i, s, o, u, l, f;
|
|
2648
3098
|
if (!isWrappable(e)) return e;
|
|
2649
3099
|
if (n && n.has(e)) return n.get(e);
|
|
2650
3100
|
if (!n) n = new Map();
|
|
2651
|
-
if ((i = e[
|
|
2652
|
-
if (t) trackSelf(i,
|
|
2653
|
-
o = i[
|
|
2654
|
-
s = Array.isArray(i[
|
|
2655
|
-
n.set(e, o ? (u = s ? [] : Object.create(Object.getPrototypeOf(i[
|
|
2656
|
-
e = i[
|
|
2657
|
-
r =
|
|
3101
|
+
if ((i = e[le] || r?.get(e)?.[le])) {
|
|
3102
|
+
if (t) trackSelf(i, ue);
|
|
3103
|
+
o = i[de];
|
|
3104
|
+
s = Array.isArray(i[ae]);
|
|
3105
|
+
n.set(e, o ? (u = s ? [] : Object.create(Object.getPrototypeOf(i[ae]))) : i[ae]);
|
|
3106
|
+
e = i[ae];
|
|
3107
|
+
r = be;
|
|
2658
3108
|
} else {
|
|
2659
3109
|
s = Array.isArray(e);
|
|
2660
3110
|
n.set(e, e);
|
|
@@ -2662,12 +3112,12 @@ function snapshotImpl(e, t, n, r) {
|
|
|
2662
3112
|
if (s) {
|
|
2663
3113
|
const s = o?.length || e.length;
|
|
2664
3114
|
for (let c = 0; c < s; c++) {
|
|
2665
|
-
|
|
2666
|
-
if (
|
|
2667
|
-
if (t && isWrappable(
|
|
2668
|
-
if ((
|
|
3115
|
+
f = o && c in o ? o[c] : e[c];
|
|
3116
|
+
if (f === ce) continue;
|
|
3117
|
+
if (t && isWrappable(f)) wrap(f, i);
|
|
3118
|
+
if ((l = snapshotImpl(f, t, n, r)) !== f || u) {
|
|
2669
3119
|
if (!u) n.set(e, (u = [...e]));
|
|
2670
|
-
u[c] =
|
|
3120
|
+
u[c] = l;
|
|
2671
3121
|
}
|
|
2672
3122
|
}
|
|
2673
3123
|
} else {
|
|
@@ -2676,14 +3126,14 @@ function snapshotImpl(e, t, n, r) {
|
|
|
2676
3126
|
let a = s[c];
|
|
2677
3127
|
const d = getPropertyDescriptor(e, o, a);
|
|
2678
3128
|
if (d.get) continue;
|
|
2679
|
-
|
|
2680
|
-
if (t && isWrappable(
|
|
2681
|
-
if ((
|
|
3129
|
+
f = o && a in o ? o[a] : e[a];
|
|
3130
|
+
if (t && isWrappable(f)) wrap(f, i);
|
|
3131
|
+
if ((l = snapshotImpl(f, t, n, r)) !== e[a] || u) {
|
|
2682
3132
|
if (!u) {
|
|
2683
3133
|
u = Object.create(Object.getPrototypeOf(e));
|
|
2684
3134
|
Object.assign(u, e);
|
|
2685
3135
|
}
|
|
2686
|
-
u[a] =
|
|
3136
|
+
u[a] = l;
|
|
2687
3137
|
}
|
|
2688
3138
|
}
|
|
2689
3139
|
}
|
|
@@ -2698,13 +3148,13 @@ function deep(e) {
|
|
|
2698
3148
|
function trueFn() {
|
|
2699
3149
|
return true;
|
|
2700
3150
|
}
|
|
2701
|
-
const
|
|
3151
|
+
const Ne = {
|
|
2702
3152
|
get(e, t, n) {
|
|
2703
|
-
if (t ===
|
|
3153
|
+
if (t === fe) return n;
|
|
2704
3154
|
return e.get(t);
|
|
2705
3155
|
},
|
|
2706
3156
|
has(e, t) {
|
|
2707
|
-
if (t ===
|
|
3157
|
+
if (t === fe) return true;
|
|
2708
3158
|
return e.has(t);
|
|
2709
3159
|
},
|
|
2710
3160
|
set: trueFn,
|
|
@@ -2727,23 +3177,24 @@ const de = {
|
|
|
2727
3177
|
function resolveSource(e) {
|
|
2728
3178
|
return !(e = typeof e === "function" ? e() : e) ? {} : e;
|
|
2729
3179
|
}
|
|
2730
|
-
const
|
|
3180
|
+
const Ee = Symbol(0);
|
|
2731
3181
|
function merge(...e) {
|
|
2732
3182
|
if (e.length === 1 && typeof e[0] !== "function") return e[0];
|
|
2733
3183
|
let t = false;
|
|
2734
3184
|
const n = [];
|
|
2735
3185
|
for (let r = 0; r < e.length; r++) {
|
|
2736
3186
|
const i = e[r];
|
|
2737
|
-
t = t || (!!i &&
|
|
2738
|
-
const s = !!i && i[
|
|
2739
|
-
if (s)
|
|
2740
|
-
|
|
3187
|
+
t = t || (!!i && fe in i);
|
|
3188
|
+
const s = !!i && i[Ee];
|
|
3189
|
+
if (s) {
|
|
3190
|
+
for (let e = 0; e < s.length; e++) n.push(s[e]);
|
|
3191
|
+
} else n.push(typeof i === "function" ? ((t = true), createMemo(i)) : i);
|
|
2741
3192
|
}
|
|
2742
|
-
if (
|
|
3193
|
+
if (E && t) {
|
|
2743
3194
|
return new Proxy(
|
|
2744
3195
|
{
|
|
2745
3196
|
get(e) {
|
|
2746
|
-
if (e ===
|
|
3197
|
+
if (e === Ee) return n;
|
|
2747
3198
|
for (let t = n.length - 1; t >= 0; t--) {
|
|
2748
3199
|
const r = resolveSource(n[t]);
|
|
2749
3200
|
if (e in r) return r[e];
|
|
@@ -2756,12 +3207,15 @@ function merge(...e) {
|
|
|
2756
3207
|
return false;
|
|
2757
3208
|
},
|
|
2758
3209
|
keys() {
|
|
2759
|
-
const e =
|
|
2760
|
-
for (let t = 0; t < n.length; t++)
|
|
2761
|
-
|
|
3210
|
+
const e = new Set();
|
|
3211
|
+
for (let t = 0; t < n.length; t++) {
|
|
3212
|
+
const r = Object.keys(resolveSource(n[t]));
|
|
3213
|
+
for (let t = 0; t < r.length; t++) e.add(r[t]);
|
|
3214
|
+
}
|
|
3215
|
+
return [...e];
|
|
2762
3216
|
}
|
|
2763
3217
|
},
|
|
2764
|
-
|
|
3218
|
+
Ne
|
|
2765
3219
|
);
|
|
2766
3220
|
}
|
|
2767
3221
|
const r = Object.create(null);
|
|
@@ -2793,300 +3247,312 @@ function merge(...e) {
|
|
|
2793
3247
|
if (n.get) Object.defineProperty(o, t, n);
|
|
2794
3248
|
else o[t] = n.value;
|
|
2795
3249
|
}
|
|
2796
|
-
o[
|
|
3250
|
+
o[Ee] = n;
|
|
2797
3251
|
return o;
|
|
2798
3252
|
}
|
|
2799
3253
|
function omit(e, ...t) {
|
|
2800
|
-
|
|
2801
|
-
if (b && J in e) {
|
|
3254
|
+
if (E && fe in e) {
|
|
2802
3255
|
return new Proxy(
|
|
2803
3256
|
{
|
|
2804
|
-
get(
|
|
2805
|
-
return
|
|
3257
|
+
get(n) {
|
|
3258
|
+
return t.includes(n) ? undefined : e[n];
|
|
2806
3259
|
},
|
|
2807
|
-
has(
|
|
2808
|
-
return !
|
|
3260
|
+
has(n) {
|
|
3261
|
+
return !t.includes(n) && n in e;
|
|
2809
3262
|
},
|
|
2810
3263
|
keys() {
|
|
2811
|
-
return Object.keys(e).filter(e => !
|
|
3264
|
+
return Object.keys(e).filter(e => !t.includes(e));
|
|
2812
3265
|
}
|
|
2813
3266
|
},
|
|
2814
|
-
|
|
3267
|
+
Ne
|
|
2815
3268
|
);
|
|
2816
3269
|
}
|
|
2817
|
-
const
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
3270
|
+
const n = {};
|
|
3271
|
+
const r = Object.getOwnPropertyNames(e);
|
|
3272
|
+
const i = t.length > 4 && r.length > t.length ? new Set(t) : undefined;
|
|
3273
|
+
for (const s of r) {
|
|
3274
|
+
if (i ? !i.has(s) : !t.includes(s)) {
|
|
3275
|
+
const t = Object.getOwnPropertyDescriptor(e, s);
|
|
3276
|
+
!t.get && !t.set && t.enumerable && t.writable && t.configurable
|
|
3277
|
+
? (n[s] = t.value)
|
|
3278
|
+
: Object.defineProperty(n, s, t);
|
|
2824
3279
|
}
|
|
2825
3280
|
}
|
|
2826
|
-
return
|
|
3281
|
+
return n;
|
|
2827
3282
|
}
|
|
2828
3283
|
function mapArray(e, t, n) {
|
|
2829
3284
|
const r = typeof n?.keyed === "function" ? n.keyed : undefined;
|
|
2830
3285
|
const i = t.length > 1;
|
|
2831
3286
|
const s = t;
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
3287
|
+
const o = {
|
|
3288
|
+
Ue: createOwner(),
|
|
3289
|
+
Je: 0,
|
|
3290
|
+
Xe: e,
|
|
3291
|
+
Ye: [],
|
|
3292
|
+
Ze: s,
|
|
3293
|
+
$e: [],
|
|
3294
|
+
et: [],
|
|
3295
|
+
tt: r,
|
|
3296
|
+
nt: r || n?.keyed === false ? [] : undefined,
|
|
3297
|
+
rt: i ? [] : undefined,
|
|
3298
|
+
it: n?.fallback
|
|
3299
|
+
};
|
|
3300
|
+
const u = computed(updateKeyedMap.bind(o));
|
|
3301
|
+
o.Ue.u = u;
|
|
3302
|
+
u.ye &= ~y;
|
|
3303
|
+
return accessor(u);
|
|
2847
3304
|
}
|
|
2848
|
-
const
|
|
3305
|
+
const ke = { ownedWrite: true };
|
|
2849
3306
|
function updateKeyedMap() {
|
|
2850
|
-
const e = this.
|
|
3307
|
+
const e = this.Xe() || [],
|
|
2851
3308
|
t = e.length;
|
|
2852
|
-
e[
|
|
2853
|
-
runWithOwner(this.
|
|
3309
|
+
e[ue];
|
|
3310
|
+
runWithOwner(this.Ue, () => {
|
|
2854
3311
|
let n,
|
|
2855
3312
|
r,
|
|
2856
|
-
i = this.
|
|
3313
|
+
i = this.nt
|
|
2857
3314
|
? () => {
|
|
2858
|
-
this.
|
|
2859
|
-
this.
|
|
2860
|
-
return this.
|
|
3315
|
+
this.nt[r] = signal(e[r], ke);
|
|
3316
|
+
this.rt && (this.rt[r] = signal(r, ke));
|
|
3317
|
+
return this.Ze(accessor(this.nt[r]), this.rt ? accessor(this.rt[r]) : undefined);
|
|
2861
3318
|
}
|
|
2862
|
-
: this.
|
|
3319
|
+
: this.rt
|
|
2863
3320
|
? () => {
|
|
2864
3321
|
const t = e[r];
|
|
2865
|
-
this.
|
|
2866
|
-
return this.
|
|
3322
|
+
this.rt[r] = signal(r, ke);
|
|
3323
|
+
return this.Ze(() => t, accessor(this.rt[r]));
|
|
2867
3324
|
}
|
|
2868
3325
|
: () => {
|
|
2869
3326
|
const t = e[r];
|
|
2870
|
-
return this.
|
|
3327
|
+
return this.Ze(() => t);
|
|
2871
3328
|
};
|
|
2872
3329
|
if (t === 0) {
|
|
2873
|
-
if (this.
|
|
2874
|
-
this.
|
|
3330
|
+
if (this.Je !== 0) {
|
|
3331
|
+
this.Ue.dispose(false);
|
|
3332
|
+
this.et = [];
|
|
3333
|
+
this.Ye = [];
|
|
2875
3334
|
this.$e = [];
|
|
2876
|
-
this.
|
|
2877
|
-
this.Ze = [];
|
|
2878
|
-
this.Ue = 0;
|
|
2879
|
-
this.tt && (this.tt = []);
|
|
3335
|
+
this.Je = 0;
|
|
2880
3336
|
this.nt && (this.nt = []);
|
|
3337
|
+
this.rt && (this.rt = []);
|
|
2881
3338
|
}
|
|
2882
|
-
if (this.
|
|
2883
|
-
this
|
|
3339
|
+
if (this.it && !this.$e[0]) {
|
|
3340
|
+
this.$e[0] = runWithOwner((this.et[0] = createOwner()), this.it);
|
|
2884
3341
|
}
|
|
2885
|
-
} else if (this.
|
|
2886
|
-
if (this
|
|
2887
|
-
this
|
|
3342
|
+
} else if (this.Je === 0) {
|
|
3343
|
+
if (this.et[0]) this.et[0].dispose();
|
|
3344
|
+
this.$e = new Array(t);
|
|
2888
3345
|
for (r = 0; r < t; r++) {
|
|
2889
|
-
this.
|
|
2890
|
-
this
|
|
3346
|
+
this.Ye[r] = e[r];
|
|
3347
|
+
this.$e[r] = runWithOwner((this.et[r] = createOwner()), i);
|
|
2891
3348
|
}
|
|
2892
|
-
this.
|
|
3349
|
+
this.Je = t;
|
|
2893
3350
|
} else {
|
|
2894
3351
|
let s,
|
|
2895
3352
|
o,
|
|
2896
3353
|
u,
|
|
2897
|
-
f,
|
|
2898
3354
|
l,
|
|
3355
|
+
f,
|
|
2899
3356
|
c,
|
|
2900
3357
|
a,
|
|
2901
3358
|
d = new Array(t),
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
3359
|
+
p = new Array(t),
|
|
3360
|
+
h = this.nt ? new Array(t) : undefined,
|
|
3361
|
+
g = this.rt ? new Array(t) : undefined;
|
|
2905
3362
|
for (
|
|
2906
|
-
s = 0, o = Math.min(this.
|
|
2907
|
-
s < o && (this.
|
|
3363
|
+
s = 0, o = Math.min(this.Je, t);
|
|
3364
|
+
s < o && (this.Ye[s] === e[s] || (this.nt && compare(this.tt, this.Ye[s], e[s])));
|
|
2908
3365
|
s++
|
|
2909
3366
|
) {
|
|
2910
|
-
if (this.
|
|
3367
|
+
if (this.nt) setSignal(this.nt[s], e[s]);
|
|
2911
3368
|
}
|
|
2912
3369
|
for (
|
|
2913
|
-
o = this.
|
|
3370
|
+
o = this.Je - 1, u = t - 1;
|
|
2914
3371
|
o >= s &&
|
|
2915
3372
|
u >= s &&
|
|
2916
|
-
(this.
|
|
3373
|
+
(this.Ye[o] === e[u] || (this.nt && compare(this.tt, this.Ye[o], e[u])));
|
|
2917
3374
|
o--, u--
|
|
2918
3375
|
) {
|
|
2919
|
-
d[u] = this
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
3376
|
+
d[u] = this.$e[o];
|
|
3377
|
+
p[u] = this.et[o];
|
|
3378
|
+
h && (h[u] = this.nt[o]);
|
|
3379
|
+
g && (g[u] = this.rt[o]);
|
|
2923
3380
|
}
|
|
2924
3381
|
c = new Map();
|
|
2925
3382
|
a = new Array(u + 1);
|
|
2926
3383
|
for (r = u; r >= s; r--) {
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
n = c.get(
|
|
3384
|
+
l = e[r];
|
|
3385
|
+
f = this.tt ? this.tt(l) : l;
|
|
3386
|
+
n = c.get(f);
|
|
2930
3387
|
a[r] = n === undefined ? -1 : n;
|
|
2931
|
-
c.set(
|
|
3388
|
+
c.set(f, r);
|
|
2932
3389
|
}
|
|
2933
3390
|
for (n = s; n <= o; n++) {
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
r = c.get(
|
|
3391
|
+
l = this.Ye[n];
|
|
3392
|
+
f = this.tt ? this.tt(l) : l;
|
|
3393
|
+
r = c.get(f);
|
|
2937
3394
|
if (r !== undefined && r !== -1) {
|
|
2938
|
-
d[r] = this
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
3395
|
+
d[r] = this.$e[n];
|
|
3396
|
+
p[r] = this.et[n];
|
|
3397
|
+
h && (h[r] = this.nt[n]);
|
|
3398
|
+
g && (g[r] = this.rt[n]);
|
|
2942
3399
|
r = a[r];
|
|
2943
|
-
c.set(
|
|
2944
|
-
} else this
|
|
3400
|
+
c.set(f, r);
|
|
3401
|
+
} else this.et[n].dispose();
|
|
2945
3402
|
}
|
|
2946
3403
|
for (r = s; r < t; r++) {
|
|
2947
3404
|
if (r in d) {
|
|
2948
|
-
this
|
|
2949
|
-
this
|
|
2950
|
-
if (
|
|
2951
|
-
this.
|
|
2952
|
-
setSignal(this.
|
|
3405
|
+
this.$e[r] = d[r];
|
|
3406
|
+
this.et[r] = p[r];
|
|
3407
|
+
if (h) {
|
|
3408
|
+
this.nt[r] = h[r];
|
|
3409
|
+
setSignal(this.nt[r], e[r]);
|
|
2953
3410
|
}
|
|
2954
|
-
if (
|
|
2955
|
-
this.
|
|
2956
|
-
setSignal(this.
|
|
3411
|
+
if (g) {
|
|
3412
|
+
this.rt[r] = g[r];
|
|
3413
|
+
setSignal(this.rt[r], r);
|
|
2957
3414
|
}
|
|
2958
3415
|
} else {
|
|
2959
|
-
this
|
|
3416
|
+
this.$e[r] = runWithOwner((this.et[r] = createOwner()), i);
|
|
2960
3417
|
}
|
|
2961
3418
|
}
|
|
2962
|
-
this
|
|
2963
|
-
this.
|
|
3419
|
+
this.$e = this.$e.slice(0, (this.Je = t));
|
|
3420
|
+
this.Ye = e.slice(0);
|
|
2964
3421
|
}
|
|
2965
3422
|
});
|
|
2966
|
-
return this
|
|
3423
|
+
return this.$e;
|
|
2967
3424
|
}
|
|
2968
3425
|
function repeat(e, t, n) {
|
|
2969
3426
|
const r = t;
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
3427
|
+
const i = computed(
|
|
3428
|
+
updateRepeat.bind({
|
|
3429
|
+
Ue: createOwner(),
|
|
3430
|
+
Je: 0,
|
|
3431
|
+
st: 0,
|
|
3432
|
+
ot: e,
|
|
3433
|
+
Ze: r,
|
|
3434
|
+
et: [],
|
|
3435
|
+
$e: [],
|
|
3436
|
+
ut: n?.from,
|
|
3437
|
+
it: n?.fallback
|
|
3438
|
+
})
|
|
3439
|
+
);
|
|
3440
|
+
i.ye &= ~y;
|
|
3441
|
+
return accessor(i);
|
|
2981
3442
|
}
|
|
2982
3443
|
function updateRepeat() {
|
|
2983
|
-
const e = this.
|
|
2984
|
-
const t = this.
|
|
2985
|
-
runWithOwner(this.
|
|
3444
|
+
const e = this.ot();
|
|
3445
|
+
const t = this.ut?.() || 0;
|
|
3446
|
+
runWithOwner(this.Ue, () => {
|
|
2986
3447
|
if (e === 0) {
|
|
2987
|
-
if (this.
|
|
2988
|
-
this.
|
|
3448
|
+
if (this.Je !== 0) {
|
|
3449
|
+
this.Ue.dispose(false);
|
|
3450
|
+
this.et = [];
|
|
2989
3451
|
this.$e = [];
|
|
2990
|
-
this.
|
|
2991
|
-
this.Ue = 0;
|
|
3452
|
+
this.Je = 0;
|
|
2992
3453
|
}
|
|
2993
|
-
if (this.
|
|
2994
|
-
this
|
|
3454
|
+
if (this.it && !this.$e[0]) {
|
|
3455
|
+
this.$e[0] = runWithOwner((this.et[0] = createOwner()), this.it);
|
|
2995
3456
|
}
|
|
2996
3457
|
return;
|
|
2997
3458
|
}
|
|
2998
3459
|
const n = t + e;
|
|
2999
|
-
const r = this.
|
|
3000
|
-
if (this.
|
|
3001
|
-
for (let e = n; e < r; e++) this
|
|
3002
|
-
if (this.
|
|
3003
|
-
let e = this.
|
|
3004
|
-
while (e < t && e < this.
|
|
3005
|
-
this
|
|
3006
|
-
this.
|
|
3007
|
-
} else if (this.
|
|
3008
|
-
let n = r - this.
|
|
3009
|
-
let i = this.
|
|
3010
|
-
this
|
|
3460
|
+
const r = this.st + this.Je;
|
|
3461
|
+
if (this.Je === 0 && this.et[0]) this.et[0].dispose();
|
|
3462
|
+
for (let e = n; e < r; e++) this.et[e - this.st].dispose();
|
|
3463
|
+
if (this.st < t) {
|
|
3464
|
+
let e = this.st;
|
|
3465
|
+
while (e < t && e < this.Je) this.et[e++].dispose();
|
|
3466
|
+
this.et.splice(0, t - this.st);
|
|
3467
|
+
this.$e.splice(0, t - this.st);
|
|
3468
|
+
} else if (this.st > t) {
|
|
3469
|
+
let n = r - this.st - 1;
|
|
3470
|
+
let i = this.st - t;
|
|
3471
|
+
this.et.length = this.$e.length = e;
|
|
3011
3472
|
while (n >= i) {
|
|
3473
|
+
this.et[n] = this.et[n - i];
|
|
3012
3474
|
this.$e[n] = this.$e[n - i];
|
|
3013
|
-
this.Ze[n] = this.Ze[n - i];
|
|
3014
3475
|
n--;
|
|
3015
3476
|
}
|
|
3016
3477
|
for (let e = 0; e < i; e++) {
|
|
3017
|
-
this
|
|
3478
|
+
this.$e[e] = runWithOwner((this.et[e] = createOwner()), () => this.Ze(e + t));
|
|
3018
3479
|
}
|
|
3019
3480
|
}
|
|
3020
3481
|
for (let e = r; e < n; e++) {
|
|
3021
|
-
this
|
|
3482
|
+
this.$e[e - t] = runWithOwner((this.et[e - t] = createOwner()), () => this.Ze(e));
|
|
3022
3483
|
}
|
|
3023
|
-
this
|
|
3024
|
-
this.
|
|
3025
|
-
this.
|
|
3484
|
+
this.$e = this.$e.slice(0, e);
|
|
3485
|
+
this.st = t;
|
|
3486
|
+
this.Je = e;
|
|
3026
3487
|
});
|
|
3027
|
-
return this
|
|
3488
|
+
return this.$e;
|
|
3028
3489
|
}
|
|
3029
3490
|
function compare(e, t, n) {
|
|
3030
3491
|
return e ? e(t) === e(n) : true;
|
|
3031
3492
|
}
|
|
3032
3493
|
function boundaryComputed(e, t) {
|
|
3033
|
-
const n = computed(e,
|
|
3034
|
-
n.
|
|
3035
|
-
const r = e !== undefined ? e : n.
|
|
3036
|
-
const i = t !== undefined ? t : n.
|
|
3037
|
-
n.
|
|
3038
|
-
n.
|
|
3494
|
+
const n = computed(e, { lazy: true });
|
|
3495
|
+
n.Fe = (e, t) => {
|
|
3496
|
+
const r = e !== undefined ? e : n.be;
|
|
3497
|
+
const i = t !== undefined ? t : n.we;
|
|
3498
|
+
n.be &= ~n.lt;
|
|
3499
|
+
n.te.notify(n, n.lt, r, i);
|
|
3039
3500
|
};
|
|
3040
|
-
n.
|
|
3041
|
-
n.
|
|
3501
|
+
n.lt = t;
|
|
3502
|
+
n.ye &= ~y;
|
|
3042
3503
|
recompute(n, true);
|
|
3043
3504
|
return n;
|
|
3044
3505
|
}
|
|
3045
3506
|
function createBoundChildren(e, t, n, r) {
|
|
3046
|
-
const i = e.
|
|
3047
|
-
i.addChild((e.
|
|
3048
|
-
cleanup(() => i.removeChild(e.
|
|
3507
|
+
const i = e.te;
|
|
3508
|
+
i.addChild((e.te = n));
|
|
3509
|
+
cleanup(() => i.removeChild(e.te));
|
|
3049
3510
|
return runWithOwner(e, () => {
|
|
3050
3511
|
const e = computed(t);
|
|
3051
3512
|
return boundaryComputed(() => staleValues(() => flatten(read(e))), r);
|
|
3052
3513
|
});
|
|
3053
3514
|
}
|
|
3054
|
-
const
|
|
3055
|
-
const
|
|
3056
|
-
let
|
|
3515
|
+
const je = Symbol();
|
|
3516
|
+
const We = createContext(null);
|
|
3517
|
+
let Re = false;
|
|
3057
3518
|
const FALSE_ACCESSOR = () => false;
|
|
3519
|
+
const SEQUENTIAL_ACCESSOR = () => "sequential";
|
|
3058
3520
|
function isRevealController(e) {
|
|
3059
3521
|
return e instanceof RevealController;
|
|
3060
3522
|
}
|
|
3061
3523
|
function isSlotReady(e) {
|
|
3062
|
-
return isRevealController(e) ? e.isReady() : e.ft.size === 0 && !e.
|
|
3524
|
+
return isRevealController(e) ? e.isReady() : e.ft.size === 0 && !e.ct;
|
|
3525
|
+
}
|
|
3526
|
+
function isSlotMinimallyReady(e) {
|
|
3527
|
+
return isRevealController(e) ? e.isMinimallyReady() : isSlotReady(e);
|
|
3063
3528
|
}
|
|
3064
3529
|
function setSlotState(e, t, n, r) {
|
|
3065
|
-
setSignal(e.
|
|
3066
|
-
setSignal(e.
|
|
3530
|
+
setSignal(e.dt, n);
|
|
3531
|
+
setSignal(e.ht, r);
|
|
3067
3532
|
if (isRevealController(e)) {
|
|
3068
|
-
if (!n && e.
|
|
3533
|
+
if (!n && e.gt === t) e.gt = undefined;
|
|
3069
3534
|
return e.evaluate(n, r);
|
|
3070
3535
|
}
|
|
3071
|
-
if (!n && e.
|
|
3536
|
+
if (!n && e.St === t && e.yt) e.St = undefined;
|
|
3072
3537
|
}
|
|
3073
3538
|
class RevealController {
|
|
3074
|
-
St;
|
|
3075
3539
|
wt;
|
|
3540
|
+
_t;
|
|
3076
3541
|
bt = [];
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3542
|
+
gt;
|
|
3543
|
+
dt = signal(false, { ownedWrite: true, ze: true });
|
|
3544
|
+
ht = signal(false, { ownedWrite: true, ze: true });
|
|
3545
|
+
Ot = true;
|
|
3546
|
+
vt = true;
|
|
3547
|
+
Pt = false;
|
|
3082
3548
|
constructor(e, t) {
|
|
3083
|
-
this.
|
|
3084
|
-
this.
|
|
3549
|
+
this.wt = e;
|
|
3550
|
+
this._t = t;
|
|
3085
3551
|
}
|
|
3086
3552
|
xt(e) {
|
|
3087
3553
|
for (let t = 0; t < this.bt.length; t++) {
|
|
3088
3554
|
const n = this.bt[t];
|
|
3089
|
-
if ((isRevealController(n) ? n.
|
|
3555
|
+
if ((isRevealController(n) ? n.gt : n.St) !== this) continue;
|
|
3090
3556
|
if (e(n) === false) return false;
|
|
3091
3557
|
}
|
|
3092
3558
|
return true;
|
|
@@ -3094,11 +3560,33 @@ class RevealController {
|
|
|
3094
3560
|
isReady() {
|
|
3095
3561
|
return this.xt(isSlotReady);
|
|
3096
3562
|
}
|
|
3563
|
+
isMinimallyReady() {
|
|
3564
|
+
const e = untrack(this.wt);
|
|
3565
|
+
if (e === "together") return this.isReady();
|
|
3566
|
+
if (e === "natural") {
|
|
3567
|
+
let e = false;
|
|
3568
|
+
let t = false;
|
|
3569
|
+
this.xt(n => {
|
|
3570
|
+
e = true;
|
|
3571
|
+
if (isSlotMinimallyReady(n)) {
|
|
3572
|
+
t = true;
|
|
3573
|
+
return false;
|
|
3574
|
+
}
|
|
3575
|
+
});
|
|
3576
|
+
return !e || t;
|
|
3577
|
+
}
|
|
3578
|
+
let t = true;
|
|
3579
|
+
this.xt(e => {
|
|
3580
|
+
t = isSlotMinimallyReady(e);
|
|
3581
|
+
return false;
|
|
3582
|
+
});
|
|
3583
|
+
return t;
|
|
3584
|
+
}
|
|
3097
3585
|
register(e) {
|
|
3098
3586
|
if (this.bt.includes(e)) return;
|
|
3099
3587
|
this.bt.push(e);
|
|
3100
|
-
const t =
|
|
3101
|
-
setSignal(e.
|
|
3588
|
+
const t = untrack(this.wt);
|
|
3589
|
+
(setSignal(e.dt, true), setSignal(e.ht, t === "sequential" ? !!untrack(this._t) : false));
|
|
3102
3590
|
untrack(() => this.evaluate());
|
|
3103
3591
|
}
|
|
3104
3592
|
unregister(e) {
|
|
@@ -3107,112 +3595,132 @@ class RevealController {
|
|
|
3107
3595
|
untrack(() => this.evaluate());
|
|
3108
3596
|
}
|
|
3109
3597
|
evaluate(e, t) {
|
|
3110
|
-
if (this.
|
|
3111
|
-
this.
|
|
3112
|
-
const n = this.
|
|
3598
|
+
if (this.Pt) return;
|
|
3599
|
+
this.Pt = true;
|
|
3600
|
+
const n = this.Ot;
|
|
3601
|
+
const r = this.vt;
|
|
3113
3602
|
try {
|
|
3114
|
-
const n = e ?? read(this.
|
|
3115
|
-
r =
|
|
3116
|
-
i =
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3603
|
+
const n = e ?? read(this.dt),
|
|
3604
|
+
r = untrack(this.wt),
|
|
3605
|
+
i = r === "sequential" && !!untrack(this._t),
|
|
3606
|
+
s = t ?? i;
|
|
3607
|
+
if (n) {
|
|
3608
|
+
this.xt(e => setSlotState(e, this, true, s));
|
|
3609
|
+
} else if (r === "natural") {
|
|
3610
|
+
this.xt(e => {
|
|
3611
|
+
if (isRevealController(e)) {
|
|
3612
|
+
setSignal(e.ht, false);
|
|
3613
|
+
setSignal(e.dt, false);
|
|
3614
|
+
e.evaluate(false, false);
|
|
3615
|
+
} else {
|
|
3616
|
+
setSlotState(e, this, !isSlotReady(e), false);
|
|
3617
|
+
}
|
|
3618
|
+
});
|
|
3619
|
+
} else if (r === "together") {
|
|
3620
|
+
const e = this.xt(isSlotMinimallyReady);
|
|
3120
3621
|
this.xt(t => setSlotState(t, this, !e, false));
|
|
3121
3622
|
} else {
|
|
3122
3623
|
let e = false;
|
|
3123
3624
|
this.xt(t => {
|
|
3124
|
-
if (e) return setSlotState(t, this, true,
|
|
3625
|
+
if (e) return setSlotState(t, this, true, i);
|
|
3125
3626
|
if (isSlotReady(t)) return setSlotState(t, this, false, false);
|
|
3126
3627
|
e = true;
|
|
3127
|
-
|
|
3628
|
+
if (isRevealController(t)) {
|
|
3629
|
+
setSignal(t.ht, false);
|
|
3630
|
+
setSignal(t.dt, false);
|
|
3631
|
+
t.evaluate(false, false);
|
|
3632
|
+
} else {
|
|
3633
|
+
setSlotState(t, this, true, false);
|
|
3634
|
+
}
|
|
3128
3635
|
});
|
|
3129
3636
|
}
|
|
3130
3637
|
} finally {
|
|
3131
|
-
this.
|
|
3132
|
-
this.
|
|
3638
|
+
this.Ot = this.isReady();
|
|
3639
|
+
this.vt = this.isMinimallyReady();
|
|
3640
|
+
this.Pt = false;
|
|
3133
3641
|
}
|
|
3134
|
-
if (this.
|
|
3642
|
+
if (this.gt && (n !== this.Ot || r !== this.vt)) this.gt.evaluate();
|
|
3135
3643
|
}
|
|
3136
3644
|
}
|
|
3137
3645
|
class CollectionQueue extends Queue {
|
|
3138
|
-
|
|
3646
|
+
Ct;
|
|
3139
3647
|
ft = new Set();
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3648
|
+
Nt;
|
|
3649
|
+
ct = true;
|
|
3650
|
+
dt = signal(false, { ownedWrite: true, ze: true });
|
|
3651
|
+
ht = signal(false, { ownedWrite: true, ze: true });
|
|
3652
|
+
St;
|
|
3653
|
+
yt = false;
|
|
3654
|
+
Et;
|
|
3655
|
+
kt = je;
|
|
3148
3656
|
constructor(e) {
|
|
3149
3657
|
super();
|
|
3150
|
-
this.
|
|
3658
|
+
this.Ct = e;
|
|
3151
3659
|
}
|
|
3152
3660
|
run(e) {
|
|
3153
|
-
if (!e || (read(this.
|
|
3661
|
+
if (!e || (read(this.dt) && (!Re || read(this.ht)))) return;
|
|
3154
3662
|
return super.run(e);
|
|
3155
3663
|
}
|
|
3156
3664
|
notify(e, t, n, r) {
|
|
3157
|
-
if (!(t & this.
|
|
3158
|
-
if (this.
|
|
3665
|
+
if (!(t & this.Ct)) return super.notify(e, t, n, r);
|
|
3666
|
+
if (this.yt && this.Et) {
|
|
3159
3667
|
const e = untrack(() => {
|
|
3160
3668
|
try {
|
|
3161
|
-
return this.
|
|
3669
|
+
return this.Et();
|
|
3162
3670
|
} catch {
|
|
3163
|
-
return
|
|
3671
|
+
return je;
|
|
3164
3672
|
}
|
|
3165
3673
|
});
|
|
3166
|
-
if (e !== this.
|
|
3167
|
-
this.
|
|
3168
|
-
this.
|
|
3674
|
+
if (e !== this.kt) {
|
|
3675
|
+
this.kt = e;
|
|
3676
|
+
this.yt = false;
|
|
3169
3677
|
this.ft.clear();
|
|
3170
3678
|
}
|
|
3171
3679
|
}
|
|
3172
|
-
if (this.
|
|
3173
|
-
if (this.
|
|
3174
|
-
return super.notify(e,
|
|
3680
|
+
if (this.Ct & m && this.yt) return super.notify(e, t, n, r);
|
|
3681
|
+
if (this.Ct & m && n & _) {
|
|
3682
|
+
return super.notify(e, _, n, r);
|
|
3175
3683
|
}
|
|
3176
|
-
if (n & this.
|
|
3177
|
-
this.
|
|
3178
|
-
const t = r?.source || e.
|
|
3684
|
+
if (n & this.Ct) {
|
|
3685
|
+
this.ct = true;
|
|
3686
|
+
const t = r?.source || e.we?.source;
|
|
3179
3687
|
if (t) {
|
|
3180
3688
|
const e = this.ft.size === 0;
|
|
3181
3689
|
this.ft.add(t);
|
|
3182
|
-
if (e) setSignal(this.
|
|
3690
|
+
if (e) setSignal(this.dt, true);
|
|
3183
3691
|
}
|
|
3184
3692
|
}
|
|
3185
|
-
t &= ~this.
|
|
3693
|
+
t &= ~this.Ct;
|
|
3186
3694
|
return t ? super.notify(e, t, n, r) : true;
|
|
3187
3695
|
}
|
|
3188
3696
|
checkSources() {
|
|
3189
3697
|
for (const e of this.ft) {
|
|
3190
|
-
if (e.m & u || (!(e.
|
|
3698
|
+
if (e.m & u || (!(e.be & this.Ct) && !(this.Ct & _ && e.be & m))) this.ft.delete(e);
|
|
3191
3699
|
}
|
|
3192
3700
|
if (!this.ft.size) {
|
|
3193
|
-
if (this.
|
|
3194
|
-
this.
|
|
3701
|
+
if (this.Ct & m && this.ct && !this.yt && this.Nt) {
|
|
3702
|
+
this.ct = !!(this.Nt.be & this.Ct);
|
|
3195
3703
|
} else {
|
|
3196
|
-
this.
|
|
3704
|
+
this.ct = false;
|
|
3197
3705
|
}
|
|
3198
|
-
if (!this.
|
|
3199
|
-
setSignal(this.
|
|
3200
|
-
if (this.
|
|
3706
|
+
if (!this.ct) {
|
|
3707
|
+
setSignal(this.dt, false);
|
|
3708
|
+
if (this.Et) {
|
|
3201
3709
|
try {
|
|
3202
|
-
this.
|
|
3710
|
+
this.kt = untrack(() => this.Et());
|
|
3203
3711
|
} catch {}
|
|
3204
3712
|
}
|
|
3205
3713
|
}
|
|
3206
3714
|
}
|
|
3207
|
-
if (
|
|
3715
|
+
if (Re) this.St?.evaluate();
|
|
3208
3716
|
}
|
|
3209
3717
|
}
|
|
3210
3718
|
function createCollectionBoundary(e, t, n, r) {
|
|
3211
3719
|
const i = createOwner();
|
|
3212
|
-
if (
|
|
3720
|
+
if (Re) setContext(We, null, i);
|
|
3213
3721
|
const s = new CollectionQueue(e);
|
|
3214
|
-
if (r) s.
|
|
3215
|
-
const o = (s.
|
|
3722
|
+
if (r) s.Et = r;
|
|
3723
|
+
const o = (s.Nt = createBoundChildren(i, t, s, e));
|
|
3216
3724
|
untrack(() => {
|
|
3217
3725
|
let t = false;
|
|
3218
3726
|
try {
|
|
@@ -3221,31 +3729,32 @@ function createCollectionBoundary(e, t, n, r) {
|
|
|
3221
3729
|
if (e instanceof NotReadyError) t = true;
|
|
3222
3730
|
else throw e;
|
|
3223
3731
|
}
|
|
3224
|
-
s.
|
|
3732
|
+
s.ct = t || !!(o.be & e) || o.we instanceof NotReadyError;
|
|
3225
3733
|
});
|
|
3226
|
-
const u =
|
|
3734
|
+
const u = Re && e === m ? getContext(We) : null;
|
|
3227
3735
|
if (u) {
|
|
3228
|
-
s.
|
|
3736
|
+
s.St = u;
|
|
3229
3737
|
u.register(s);
|
|
3230
3738
|
cleanup(() => u.unregister(s));
|
|
3231
3739
|
}
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3740
|
+
return accessor(
|
|
3741
|
+
computed(() => {
|
|
3742
|
+
if (!read(s.dt)) {
|
|
3743
|
+
const e = read(o);
|
|
3744
|
+
if (!untrack(() => read(s.dt))) return ((s.yt = true), e);
|
|
3745
|
+
}
|
|
3746
|
+
if (Re && read(s.ht)) return undefined;
|
|
3747
|
+
return n(s);
|
|
3748
|
+
})
|
|
3749
|
+
);
|
|
3241
3750
|
}
|
|
3242
3751
|
function createLoadingBoundary(e, t, n) {
|
|
3243
|
-
return createCollectionBoundary(
|
|
3752
|
+
return createCollectionBoundary(m, e, () => t(), n?.on);
|
|
3244
3753
|
}
|
|
3245
3754
|
function createErrorBoundary(e, t) {
|
|
3246
|
-
return createCollectionBoundary(
|
|
3755
|
+
return createCollectionBoundary(_, e, e => {
|
|
3247
3756
|
let n = e.ft.values().next().value;
|
|
3248
|
-
const r = n.
|
|
3757
|
+
const r = n.we?.cause ?? n.we;
|
|
3249
3758
|
return t(r, () => {
|
|
3250
3759
|
for (const t of e.ft) recompute(t);
|
|
3251
3760
|
schedule();
|
|
@@ -3253,13 +3762,13 @@ function createErrorBoundary(e, t) {
|
|
|
3253
3762
|
});
|
|
3254
3763
|
}
|
|
3255
3764
|
function createRevealOrder(e, t) {
|
|
3256
|
-
|
|
3765
|
+
Re = true;
|
|
3257
3766
|
const n = createOwner();
|
|
3258
|
-
const r = getContext(
|
|
3259
|
-
const i = t?.
|
|
3767
|
+
const r = getContext(We);
|
|
3768
|
+
const i = t?.order || SEQUENTIAL_ACCESSOR,
|
|
3260
3769
|
s = t?.collapsed || FALSE_ACCESSOR;
|
|
3261
3770
|
const o = new RevealController(i, s);
|
|
3262
|
-
setContext(
|
|
3771
|
+
setContext(We, o, n);
|
|
3263
3772
|
return runWithOwner(n, () => {
|
|
3264
3773
|
const t = e();
|
|
3265
3774
|
computed(() => {
|
|
@@ -3268,7 +3777,7 @@ function createRevealOrder(e, t) {
|
|
|
3268
3777
|
o.evaluate();
|
|
3269
3778
|
});
|
|
3270
3779
|
if (r) {
|
|
3271
|
-
o.
|
|
3780
|
+
o.gt = r;
|
|
3272
3781
|
r.register(o);
|
|
3273
3782
|
cleanup(() => r.unregister(o));
|
|
3274
3783
|
}
|
|
@@ -3324,16 +3833,16 @@ function flattenArray(e, t = [], n) {
|
|
|
3324
3833
|
if (r) throw r;
|
|
3325
3834
|
return i;
|
|
3326
3835
|
}
|
|
3327
|
-
const
|
|
3328
|
-
exports.$PROXY =
|
|
3329
|
-
exports.$REFRESH =
|
|
3330
|
-
exports.$TARGET =
|
|
3331
|
-
exports.$TRACK =
|
|
3836
|
+
const Ae = undefined;
|
|
3837
|
+
exports.$PROXY = fe;
|
|
3838
|
+
exports.$REFRESH = j;
|
|
3839
|
+
exports.$TARGET = le;
|
|
3840
|
+
exports.$TRACK = ue;
|
|
3332
3841
|
exports.ContextNotFoundError = ContextNotFoundError;
|
|
3333
|
-
exports.DEV =
|
|
3842
|
+
exports.DEV = Ae;
|
|
3334
3843
|
exports.NoOwnerError = NoOwnerError;
|
|
3335
3844
|
exports.NotReadyError = NotReadyError;
|
|
3336
|
-
exports.SUPPORTS_PROXY =
|
|
3845
|
+
exports.SUPPORTS_PROXY = E;
|
|
3337
3846
|
exports.action = action;
|
|
3338
3847
|
exports.clearSnapshots = clearSnapshots;
|
|
3339
3848
|
exports.createContext = createContext;
|
|
@@ -3383,5 +3892,5 @@ exports.runWithOwner = runWithOwner;
|
|
|
3383
3892
|
exports.setContext = setContext;
|
|
3384
3893
|
exports.setSnapshotCapture = setSnapshotCapture;
|
|
3385
3894
|
exports.snapshot = snapshot;
|
|
3386
|
-
exports.storePath =
|
|
3895
|
+
exports.storePath = Ce;
|
|
3387
3896
|
exports.untrack = untrack;
|