@solidjs/signals 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/prod.js CHANGED
@@ -24,21 +24,21 @@ var SUPPORTS_PROXY = typeof Proxy === "function";
24
24
 
25
25
  // src/core/heap.ts
26
26
  function actualInsertIntoHeap(n, heap) {
27
- const parentHeight = (n.s?.Z ? n.s._?.e : n.s?.e) ?? -1;
28
- if (parentHeight >= n.e)
29
- n.e = parentHeight + 1;
30
- const height = n.e;
31
- const heapAtHeight = heap.o[height];
27
+ const parentHeight = (n.w?._ ? n.w.$?.c : n.w?.c) ?? -1;
28
+ if (parentHeight >= n.c)
29
+ n.c = parentHeight + 1;
30
+ const height = n.c;
31
+ const heapAtHeight = heap.r[height];
32
32
  if (heapAtHeight === void 0) {
33
- heap.o[height] = n;
33
+ heap.r[height] = n;
34
34
  } else {
35
- const tail = heapAtHeight.x;
36
- tail.O = n;
37
- n.x = tail;
38
- heapAtHeight.x = n;
35
+ const tail = heapAtHeight.z;
36
+ tail.Q = n;
37
+ n.z = tail;
38
+ heapAtHeight.z = n;
39
39
  }
40
- if (height > heap.J) {
41
- heap.J = height;
40
+ if (height > heap.L) {
41
+ heap.L = height;
42
42
  }
43
43
  }
44
44
  function insertIntoHeap(n, heap) {
@@ -65,29 +65,29 @@ function deleteFromHeap(n, heap) {
65
65
  if (!(flags & (8 /* InHeap */ | 16 /* InHeapHeight */)))
66
66
  return;
67
67
  n.b = flags & ~(8 /* InHeap */ | 16 /* InHeapHeight */);
68
- const height = n.e;
69
- if (n.x === n) {
70
- heap.o[height] = void 0;
68
+ const height = n.c;
69
+ if (n.z === n) {
70
+ heap.r[height] = void 0;
71
71
  } else {
72
- const next = n.O;
73
- const dhh = heap.o[height];
72
+ const next = n.Q;
73
+ const dhh = heap.r[height];
74
74
  const end = next ?? dhh;
75
75
  if (n === dhh) {
76
- heap.o[height] = next;
76
+ heap.r[height] = next;
77
77
  } else {
78
- n.x.O = next;
78
+ n.z.Q = next;
79
79
  }
80
- end.x = n.x;
80
+ end.z = n.z;
81
81
  }
82
- n.x = n;
83
- n.O = void 0;
82
+ n.z = n;
83
+ n.Q = void 0;
84
84
  }
85
85
  function markHeap(heap) {
86
- if (heap.$)
86
+ if (heap.aa)
87
87
  return;
88
- heap.$ = true;
89
- for (let i = 0; i <= heap.J; i++) {
90
- for (let el = heap.o[i]; el !== void 0; el = el.O) {
88
+ heap.aa = true;
89
+ for (let i = 0; i <= heap.L; i++) {
90
+ for (let el = heap.r[i]; el !== void 0; el = el.Q) {
91
91
  if (el.b & 8 /* InHeap */)
92
92
  markNode(el);
93
93
  }
@@ -98,48 +98,48 @@ function markNode(el, newState = 2 /* Dirty */) {
98
98
  if ((flags & (1 /* Check */ | 2 /* Dirty */)) >= newState)
99
99
  return;
100
100
  el.b = flags & ~(1 /* Check */ | 2 /* Dirty */) | newState;
101
- for (let link2 = el.p; link2 !== null; link2 = link2.y) {
102
- markNode(link2.m, 1 /* Check */);
101
+ for (let link2 = el.s; link2 !== null; link2 = link2.A) {
102
+ markNode(link2.j, 1 /* Check */);
103
103
  }
104
- if (el.aa !== null) {
105
- for (let child = el.aa; child !== null; child = child.qa) {
106
- for (let link2 = child.p; link2 !== null; link2 = link2.y) {
107
- markNode(link2.m, 1 /* Check */);
104
+ if (el.ba !== null) {
105
+ for (let child = el.ba; child !== null; child = child.ra) {
106
+ for (let link2 = child.s; link2 !== null; link2 = link2.A) {
107
+ markNode(link2.j, 1 /* Check */);
108
108
  }
109
109
  }
110
110
  }
111
111
  }
112
112
  function runHeap(heap, recompute2) {
113
- heap.$ = false;
114
- for (heap.t = 0; heap.t <= heap.J; heap.t++) {
115
- let el = heap.o[heap.t];
113
+ heap.aa = false;
114
+ for (heap.p = 0; heap.p <= heap.L; heap.p++) {
115
+ let el = heap.r[heap.p];
116
116
  while (el !== void 0) {
117
117
  if (el.b & 8 /* InHeap */)
118
118
  recompute2(el);
119
119
  else {
120
120
  adjustHeight(el, heap);
121
121
  }
122
- el = heap.o[heap.t];
122
+ el = heap.r[heap.p];
123
123
  }
124
124
  }
125
- heap.J = 0;
125
+ heap.L = 0;
126
126
  }
127
127
  function adjustHeight(el, heap) {
128
128
  deleteFromHeap(el, heap);
129
- let newHeight = el.e;
130
- for (let d = el.u; d; d = d.E) {
131
- const dep1 = d.P;
132
- const dep = "_owner" in dep1 ? dep1.z : dep1;
129
+ let newHeight = el.c;
130
+ for (let d = el.x; d; d = d.F) {
131
+ const dep1 = d.R;
132
+ const dep = "_owner" in dep1 ? dep1.B : dep1;
133
133
  if ("_fn" in dep) {
134
- if (dep.e >= newHeight) {
135
- newHeight = dep.e + 1;
134
+ if (dep.c >= newHeight) {
135
+ newHeight = dep.c + 1;
136
136
  }
137
137
  }
138
138
  }
139
- if (el.e !== newHeight) {
140
- el.e = newHeight;
141
- for (let s = el.p; s !== null; s = s.y) {
142
- insertIntoHeapHeight(s.m, heap);
139
+ if (el.c !== newHeight) {
140
+ el.c = newHeight;
141
+ for (let s = el.s; s !== null; s = s.A) {
142
+ insertIntoHeapHeight(s.j, heap);
143
143
  }
144
144
  }
145
145
  }
@@ -154,76 +154,98 @@ function schedule() {
154
154
  if (scheduled)
155
155
  return;
156
156
  scheduled = true;
157
- if (!globalQueue.ba)
157
+ if (!globalQueue.ca)
158
158
  queueMicrotask(flush);
159
159
  }
160
160
  var dirtyQueue = {
161
- o: new Array(2e3).fill(void 0),
162
- $: false,
163
- t: 0,
164
- J: 0
161
+ r: new Array(2e3).fill(void 0),
162
+ aa: false,
163
+ p: 0,
164
+ L: 0
165
165
  };
166
166
  var zombieQueue = {
167
- o: new Array(2e3).fill(void 0),
168
- $: false,
169
- t: 0,
170
- J: 0
167
+ r: new Array(2e3).fill(void 0),
168
+ aa: false,
169
+ p: 0,
170
+ L: 0
171
171
  };
172
172
  var Queue = class {
173
- s = null;
174
- A = [[], []];
175
- Q = [];
173
+ w = null;
174
+ k = [[], []];
175
+ l = [];
176
176
  created = clock;
177
177
  addChild(child) {
178
- this.Q.push(child);
179
- child.s = this;
178
+ this.l.push(child);
179
+ child.w = this;
180
180
  }
181
181
  removeChild(child) {
182
- const index = this.Q.indexOf(child);
182
+ const index = this.l.indexOf(child);
183
183
  if (index >= 0) {
184
- this.Q.splice(index, 1);
185
- child.s = null;
184
+ this.l.splice(index, 1);
185
+ child.w = null;
186
186
  }
187
187
  }
188
188
  notify(node, mask, flags) {
189
- if (this.s)
190
- return this.s.notify(node, mask, flags);
189
+ if (this.w)
190
+ return this.w.notify(node, mask, flags);
191
191
  return false;
192
192
  }
193
193
  run(type) {
194
- if (this.A[type - 1].length) {
195
- const effects = this.A[type - 1];
196
- this.A[type - 1] = [];
194
+ if (this.k[type - 1].length) {
195
+ const effects = this.k[type - 1];
196
+ this.k[type - 1] = [];
197
197
  runQueue(effects, type);
198
198
  }
199
- for (let i = 0; i < this.Q.length; i++) {
200
- this.Q[i].run(type);
199
+ for (let i = 0; i < this.l.length; i++) {
200
+ this.l[i].run(type);
201
201
  }
202
202
  }
203
203
  enqueue(type, fn) {
204
204
  if (type)
205
- this.A[type - 1].push(fn);
205
+ this.k[type - 1].push(fn);
206
206
  schedule();
207
207
  }
208
+ stashQueues(stub) {
209
+ stub.k[0].push(...this.k[0]);
210
+ stub.k[1].push(...this.k[1]);
211
+ this.k = [[], []];
212
+ for (let i = 0; i < this.l.length; i++) {
213
+ let child = this.l[i];
214
+ let childStub = stub.l[i];
215
+ if (!childStub) {
216
+ childStub = { k: [[], []], l: [] };
217
+ stub.l[i] = childStub;
218
+ }
219
+ child.stashQueues(childStub);
220
+ }
221
+ }
222
+ restoreQueues(stub) {
223
+ this.k[0].push(...stub.k[0]);
224
+ this.k[1].push(...stub.k[1]);
225
+ for (let i = 0; i < stub.l.length; i++) {
226
+ const childStub = stub.l[i];
227
+ let child = this.l[i];
228
+ if (child)
229
+ child.restoreQueues(childStub);
230
+ }
231
+ }
208
232
  };
209
233
  var GlobalQueue = class _GlobalQueue extends Queue {
210
- ba = false;
234
+ ca = false;
211
235
  h = [];
212
- static R;
236
+ static S;
213
237
  static ka;
214
238
  flush() {
215
- if (this.ba)
239
+ if (this.ca)
216
240
  return;
217
- this.ba = true;
241
+ this.ca = true;
218
242
  try {
219
- runHeap(dirtyQueue, _GlobalQueue.R);
243
+ runHeap(dirtyQueue, _GlobalQueue.S);
220
244
  if (activeTransition) {
221
245
  if (!transitionComplete(activeTransition)) {
222
- runHeap(zombieQueue, _GlobalQueue.R);
246
+ runHeap(zombieQueue, _GlobalQueue.S);
223
247
  globalQueue.h = [];
224
- activeTransition.queues[0].push(...globalQueue.A[0]);
225
- activeTransition.queues[1].push(...globalQueue.A[1]);
226
- globalQueue.A = [[], []];
248
+ globalQueue.stashQueues(activeTransition.queueStash);
227
249
  clock++;
228
250
  scheduled = false;
229
251
  runPending(activeTransition.pendingNodes, true);
@@ -231,19 +253,18 @@ var GlobalQueue = class _GlobalQueue extends Queue {
231
253
  return;
232
254
  }
233
255
  globalQueue.h.push(...activeTransition.pendingNodes);
234
- globalQueue.A[0].push(...activeTransition.queues[0]);
235
- globalQueue.A[1].push(...activeTransition.queues[1]);
256
+ globalQueue.restoreQueues(activeTransition.queueStash);
236
257
  transitions.delete(activeTransition);
237
258
  activeTransition = null;
238
259
  if (runPending(globalQueue.h, false))
239
- runHeap(dirtyQueue, _GlobalQueue.R);
260
+ runHeap(dirtyQueue, _GlobalQueue.S);
240
261
  } else if (transitions.size)
241
- runHeap(zombieQueue, _GlobalQueue.R);
262
+ runHeap(zombieQueue, _GlobalQueue.S);
242
263
  for (let i = 0; i < globalQueue.h.length; i++) {
243
264
  const n = globalQueue.h[i];
244
- if (n.d !== NOT_PENDING) {
245
- n.g = n.d;
246
- n.d = NOT_PENDING;
265
+ if (n.e !== NOT_PENDING) {
266
+ n.g = n.e;
267
+ n.e = NOT_PENDING;
247
268
  }
248
269
  if (n.ha)
249
270
  _GlobalQueue.ka(n, false, true);
@@ -254,15 +275,15 @@ var GlobalQueue = class _GlobalQueue extends Queue {
254
275
  this.run(1 /* Render */);
255
276
  this.run(2 /* User */);
256
277
  } finally {
257
- this.ba = false;
278
+ this.ca = false;
258
279
  unobserved.length && notifyUnobserved();
259
280
  }
260
281
  }
261
282
  notify(node, mask, flags) {
262
283
  if (mask & 1 /* Pending */) {
263
284
  if (flags & 1 /* Pending */) {
264
- if (activeTransition && !activeTransition.asyncNodes.includes(node.B.cause))
265
- activeTransition.asyncNodes.push(node.B.cause);
285
+ if (activeTransition && !activeTransition.asyncNodes.includes(node.C.cause))
286
+ activeTransition.asyncNodes.push(node.C.cause);
266
287
  }
267
288
  return true;
268
289
  }
@@ -272,18 +293,18 @@ var GlobalQueue = class _GlobalQueue extends Queue {
272
293
  if (activeTransition && activeTransition.time === clock)
273
294
  return;
274
295
  if (!activeTransition) {
275
- activeTransition = node.S ?? {
296
+ activeTransition = node.T ?? {
276
297
  time: clock,
277
298
  pendingNodes: [],
278
299
  asyncNodes: [],
279
- queues: [[], []]
300
+ queueStash: { k: [[], []], l: [] }
280
301
  };
281
302
  }
282
303
  transitions.add(activeTransition);
283
304
  activeTransition.time = clock;
284
305
  for (let i = 0; i < globalQueue.h.length; i++) {
285
306
  const n = globalQueue.h[i];
286
- n.S = activeTransition;
307
+ n.T = activeTransition;
287
308
  activeTransition.pendingNodes.push(n);
288
309
  }
289
310
  globalQueue.h = activeTransition.pendingNodes;
@@ -294,9 +315,9 @@ function runPending(pendingNodes, value) {
294
315
  const p = pendingNodes.slice();
295
316
  for (let i = 0; i < p.length; i++) {
296
317
  const n = p[i];
297
- n.S = activeTransition;
298
- if (n.G) {
299
- n.G.ca(value);
318
+ n.T = activeTransition;
319
+ if (n.H) {
320
+ n.H.da(value);
300
321
  needsReset = true;
301
322
  }
302
323
  }
@@ -325,14 +346,14 @@ function transitionComplete(transition) {
325
346
  function notifyUnobserved() {
326
347
  for (let i = 0; i < unobserved.length; i++) {
327
348
  const source = unobserved[i];
328
- if (!source.p)
329
- unobserved[i].ra?.();
349
+ if (!source.s)
350
+ unobserved[i].sa?.();
330
351
  }
331
352
  unobserved = [];
332
353
  }
333
354
 
334
355
  // src/core/core.ts
335
- GlobalQueue.R = recompute;
356
+ GlobalQueue.S = recompute;
336
357
  GlobalQueue.ka = disposeChildren;
337
358
  var tracking = false;
338
359
  var stale = false;
@@ -340,27 +361,35 @@ var pendingValueCheck = false;
340
361
  var pendingCheck = null;
341
362
  var context = null;
342
363
  var defaultContext = {};
364
+ function notifySubs(node) {
365
+ for (let s = node.s; s !== null; s = s.A) {
366
+ const queue = s.j.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue;
367
+ if (queue.p > s.j.c)
368
+ queue.p = s.j.c;
369
+ insertIntoHeap(s.j, queue);
370
+ }
371
+ }
343
372
  function recompute(el, create = false) {
344
373
  deleteFromHeap(el, el.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue);
345
- if (el.d !== NOT_PENDING || el.T || el.U)
374
+ if (el.e !== NOT_PENDING || el.U || el.V)
346
375
  disposeChildren(el);
347
376
  else {
348
377
  markDisposal(el);
349
378
  globalQueue.h.push(el);
379
+ el.V = el.t;
350
380
  el.U = el.q;
351
- el.T = el.n;
381
+ el.t = null;
352
382
  el.q = null;
353
- el.n = null;
354
383
  }
355
384
  const oldcontext = context;
356
385
  context = el;
357
- el.H = null;
386
+ el.I = null;
358
387
  el.b = 4 /* RecomputingDeps */;
359
- el.V = clock;
360
- let value = el.d === NOT_PENDING ? el.g : el.d;
361
- let oldHeight = el.e;
388
+ el.J = clock;
389
+ let value = el.e === NOT_PENDING ? el.g : el.e;
390
+ let oldHeight = el.c;
362
391
  let prevStatusFlags = el.f;
363
- let prevError = el.B;
392
+ let prevError = el.C;
364
393
  let prevTracking = tracking;
365
394
  clearStatusFlags(el);
366
395
  tracking = true;
@@ -379,50 +408,50 @@ function recompute(el, create = false) {
379
408
  }
380
409
  el.b = 0 /* None */;
381
410
  context = oldcontext;
382
- const depsTail = el.H;
383
- let toRemove = depsTail !== null ? depsTail.E : el.u;
411
+ const depsTail = el.I;
412
+ let toRemove = depsTail !== null ? depsTail.F : el.x;
384
413
  if (toRemove !== null) {
385
414
  do {
386
415
  toRemove = unlinkSubs(toRemove);
387
416
  } while (toRemove !== null);
388
417
  if (depsTail !== null) {
389
- depsTail.E = null;
418
+ depsTail.F = null;
390
419
  } else {
391
- el.u = null;
420
+ el.x = null;
392
421
  }
393
422
  }
394
- const valueChanged = !el.da || !el.da(el.d === NOT_PENDING ? el.g : el.d, value);
395
- const statusFlagsChanged = el.f !== prevStatusFlags || el.B !== prevError;
423
+ const valueChanged = !el.ea || !el.ea(el.e === NOT_PENDING ? el.g : el.e, value);
424
+ const statusFlagsChanged = el.f !== prevStatusFlags || el.C !== prevError;
396
425
  el.la?.(statusFlagsChanged, prevStatusFlags);
397
426
  if (valueChanged || statusFlagsChanged) {
398
427
  if (valueChanged) {
399
- if (create || el.ia || el.I)
428
+ if (create || el.ia || el.K)
400
429
  el.g = value;
401
430
  else {
402
- if (el.d === NOT_PENDING)
431
+ if (el.e === NOT_PENDING)
403
432
  globalQueue.h.push(el);
404
- el.d = value;
433
+ el.e = value;
405
434
  }
406
- if (el.C)
407
- el.C.ca(value);
435
+ if (el.D)
436
+ el.D.da(value);
408
437
  }
409
- for (let s = el.p; s !== null; s = s.y) {
410
- const queue = s.m.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue;
411
- if (s.m.e < el.e && queue.t > s.m.e)
412
- queue.t = s.m.e;
413
- insertIntoHeap(s.m, queue);
438
+ for (let s = el.s; s !== null; s = s.A) {
439
+ const queue = s.j.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue;
440
+ if (s.j.c < el.c && queue.p > s.j.c)
441
+ queue.p = s.j.c;
442
+ insertIntoHeap(s.j, queue);
414
443
  }
415
- } else if (el.e != oldHeight) {
416
- for (let s = el.p; s !== null; s = s.y) {
417
- insertIntoHeapHeight(s.m, s.m.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue);
444
+ } else if (el.c != oldHeight) {
445
+ for (let s = el.s; s !== null; s = s.A) {
446
+ insertIntoHeapHeight(s.j, s.j.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue);
418
447
  }
419
448
  }
420
449
  }
421
450
  function updateIfNecessary(el) {
422
451
  if (el.b & 1 /* Check */) {
423
- for (let d = el.u; d; d = d.E) {
424
- const dep1 = d.P;
425
- const dep = "_owner" in dep1 ? dep1.z : dep1;
452
+ for (let d = el.x; d; d = d.F) {
453
+ const dep1 = d.R;
454
+ const dep = "_owner" in dep1 ? dep1.B : dep1;
426
455
  if ("_fn" in dep) {
427
456
  updateIfNecessary(dep);
428
457
  }
@@ -437,9 +466,9 @@ function updateIfNecessary(el) {
437
466
  el.b = 0 /* None */;
438
467
  }
439
468
  function unlinkSubs(link2) {
440
- const dep = link2.P;
441
- const nextDep = link2.E;
442
- const nextSub = link2.y;
469
+ const dep = link2.R;
470
+ const nextDep = link2.F;
471
+ const nextSub = link2.A;
443
472
  const prevSub = link2.ma;
444
473
  if (nextSub !== null) {
445
474
  nextSub.ma = prevSub;
@@ -447,52 +476,52 @@ function unlinkSubs(link2) {
447
476
  dep.W = prevSub;
448
477
  }
449
478
  if (prevSub !== null) {
450
- prevSub.y = nextSub;
479
+ prevSub.A = nextSub;
451
480
  } else {
452
- dep.p = nextSub;
481
+ dep.s = nextSub;
453
482
  }
454
483
  return nextDep;
455
484
  }
456
485
  function link(dep, sub) {
457
- const prevDep = sub.H;
458
- if (prevDep !== null && prevDep.P === dep) {
486
+ const prevDep = sub.I;
487
+ if (prevDep !== null && prevDep.R === dep) {
459
488
  return;
460
489
  }
461
490
  let nextDep = null;
462
491
  const isRecomputing = sub.b & 4 /* RecomputingDeps */;
463
492
  if (isRecomputing) {
464
- nextDep = prevDep !== null ? prevDep.E : sub.u;
465
- if (nextDep !== null && nextDep.P === dep) {
466
- sub.H = nextDep;
493
+ nextDep = prevDep !== null ? prevDep.F : sub.x;
494
+ if (nextDep !== null && nextDep.R === dep) {
495
+ sub.I = nextDep;
467
496
  return;
468
497
  }
469
498
  }
470
499
  const prevSub = dep.W;
471
- if (prevSub !== null && prevSub.m === sub && (!isRecomputing || isValidLink(prevSub, sub))) {
500
+ if (prevSub !== null && prevSub.j === sub && (!isRecomputing || isValidLink(prevSub, sub))) {
472
501
  return;
473
502
  }
474
- const newLink = sub.H = dep.W = {
475
- P: dep,
476
- m: sub,
477
- E: nextDep,
503
+ const newLink = sub.I = dep.W = {
504
+ R: dep,
505
+ j: sub,
506
+ F: nextDep,
478
507
  ma: prevSub,
479
- y: null
508
+ A: null
480
509
  };
481
510
  if (prevDep !== null) {
482
- prevDep.E = newLink;
511
+ prevDep.F = newLink;
483
512
  } else {
484
- sub.u = newLink;
513
+ sub.x = newLink;
485
514
  }
486
515
  if (prevSub !== null) {
487
- prevSub.y = newLink;
516
+ prevSub.A = newLink;
488
517
  } else {
489
- dep.p = newLink;
518
+ dep.s = newLink;
490
519
  }
491
520
  }
492
521
  function isValidLink(checkLink, sub) {
493
- const depsTail = sub.H;
522
+ const depsTail = sub.I;
494
523
  if (depsTail !== null) {
495
- let link2 = sub.u;
524
+ let link2 = sub.x;
496
525
  do {
497
526
  if (link2 === checkLink) {
498
527
  return true;
@@ -500,23 +529,23 @@ function isValidLink(checkLink, sub) {
500
529
  if (link2 === depsTail) {
501
530
  break;
502
531
  }
503
- link2 = link2.E;
532
+ link2 = link2.F;
504
533
  } while (link2 !== null);
505
534
  }
506
535
  return false;
507
536
  }
508
537
  function setStatusFlags(signal2, flags, error = null) {
509
538
  signal2.f = flags;
510
- signal2.B = error;
539
+ signal2.C = error;
511
540
  }
512
541
  function setError(signal2, error) {
513
- setStatusFlags(signal2, 2 /* Error */ | 4 /* Uninitialized */, error);
542
+ setStatusFlags(signal2, 2 /* Error */, error);
514
543
  }
515
544
  function clearStatusFlags(signal2) {
516
545
  setStatusFlags(signal2, 0 /* None */);
517
546
  }
518
547
  function markDisposal(el) {
519
- let child = el.n;
548
+ let child = el.q;
520
549
  while (child) {
521
550
  child.b |= 32 /* Zombie */;
522
551
  const inHeap = child.b & 8 /* InHeap */;
@@ -525,7 +554,7 @@ function markDisposal(el) {
525
554
  insertIntoHeap(child, zombieQueue);
526
555
  }
527
556
  markDisposal(child);
528
- child = child.K;
557
+ child = child.M;
529
558
  }
530
559
  }
531
560
  function disposeChildren(node, self = false, zombie) {
@@ -533,32 +562,32 @@ function disposeChildren(node, self = false, zombie) {
533
562
  return;
534
563
  if (self)
535
564
  node.b = 64 /* Disposed */;
536
- let child = zombie ? node.T : node.n;
565
+ let child = zombie ? node.U : node.q;
537
566
  while (child) {
538
- const nextChild = child.K;
539
- if (child.u) {
567
+ const nextChild = child.M;
568
+ if (child.x) {
540
569
  const n = child;
541
570
  deleteFromHeap(n, n.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue);
542
- let toRemove = n.u;
571
+ let toRemove = n.x;
543
572
  do {
544
573
  toRemove = unlinkSubs(toRemove);
545
574
  } while (toRemove !== null);
546
- n.u = null;
547
- n.H = null;
575
+ n.x = null;
576
+ n.I = null;
548
577
  }
549
578
  disposeChildren(child, true);
550
579
  child = nextChild;
551
580
  }
552
581
  if (zombie) {
553
- node.T = null;
582
+ node.U = null;
554
583
  } else {
555
- node.n = null;
556
- node.K = null;
584
+ node.q = null;
585
+ node.M = null;
557
586
  }
558
587
  runDisposal(node, zombie);
559
588
  }
560
589
  function runDisposal(node, zombie) {
561
- let disposal = zombie ? node.U : node.q;
590
+ let disposal = zombie ? node.V : node.t;
562
591
  if (!disposal)
563
592
  return;
564
593
  if (Array.isArray(disposal)) {
@@ -569,13 +598,13 @@ function runDisposal(node, zombie) {
569
598
  } else {
570
599
  disposal.call(disposal);
571
600
  }
572
- zombie ? node.U = null : node.q = null;
601
+ zombie ? node.V = null : node.t = null;
573
602
  }
574
603
  function withOptions(obj, options) {
575
604
  obj.id = options?.id ?? (context?.id != null ? getNextChildId(context) : void 0);
576
- obj.da = options?.equals != null ? options.equals : isEqual;
577
- obj.xa = !!options?.pureWrite;
578
- obj.ra = options?.unobserved;
605
+ obj.ea = options?.equals != null ? options.equals : isEqual;
606
+ obj.ya = !!options?.pureWrite;
607
+ obj.sa = options?.unobserved;
579
608
  if (options?.ja)
580
609
  Object.assign(obj, options.ja);
581
610
  return obj;
@@ -592,47 +621,47 @@ function formatId(prefix, id) {
592
621
  function computed(fn, initialValue, options) {
593
622
  const self = withOptions(
594
623
  {
595
- q: null,
624
+ t: null,
596
625
  i: globalQueue,
597
- D: defaultContext,
626
+ E: defaultContext,
598
627
  na: 0,
599
628
  ha: fn,
600
629
  g: initialValue,
601
- e: 0,
602
- aa: null,
603
- O: void 0,
630
+ c: 0,
631
+ ba: null,
632
+ Q: void 0,
633
+ z: null,
604
634
  x: null,
605
- u: null,
606
- H: null,
607
- p: null,
635
+ I: null,
636
+ s: null,
608
637
  W: null,
609
- s: context,
610
- K: null,
611
- n: null,
638
+ w: context,
639
+ M: null,
640
+ q: null,
612
641
  b: 0 /* None */,
613
642
  f: 4 /* Uninitialized */,
614
- V: clock,
615
- d: NOT_PENDING,
616
- U: null,
617
- T: null
643
+ J: clock,
644
+ e: NOT_PENDING,
645
+ V: null,
646
+ U: null
618
647
  },
619
648
  options
620
649
  );
621
- self.x = self;
622
- const parent = context?.Z ? context._ : context;
650
+ self.z = self;
651
+ const parent = context?._ ? context.$ : context;
623
652
  if (context) {
624
653
  context.i && (self.i = context.i);
625
- context.D && (self.D = context.D);
626
- const lastChild = context.n;
654
+ context.E && (self.E = context.E);
655
+ const lastChild = context.q;
627
656
  if (lastChild === null) {
628
- context.n = self;
657
+ context.q = self;
629
658
  } else {
630
- self.K = lastChild;
631
- context.n = self;
659
+ self.M = lastChild;
660
+ context.q = self;
632
661
  }
633
662
  }
634
663
  if (parent)
635
- self.e = parent.e + 1;
664
+ self.c = parent.c + 1;
636
665
  recompute(self, true);
637
666
  return self;
638
667
  }
@@ -660,6 +689,9 @@ function asyncComputed(asyncFn, initialValue, options) {
660
689
  return;
661
690
  globalQueue.initTransition(self);
662
691
  setError(self, e);
692
+ self.J = clock;
693
+ notifySubs(self);
694
+ schedule();
663
695
  flush();
664
696
  });
665
697
  } else {
@@ -677,6 +709,9 @@ function asyncComputed(asyncFn, initialValue, options) {
677
709
  return;
678
710
  globalQueue.initTransition(self);
679
711
  setError(self, error);
712
+ self.J = clock;
713
+ notifySubs(self);
714
+ schedule();
680
715
  flush();
681
716
  }
682
717
  })();
@@ -685,7 +720,7 @@ function asyncComputed(asyncFn, initialValue, options) {
685
720
  throw new NotReadyError(context);
686
721
  };
687
722
  const self = computed(fn, initialValue, options);
688
- self.sa = () => {
723
+ self.ta = () => {
689
724
  refreshing = true;
690
725
  recompute(self);
691
726
  flush();
@@ -694,16 +729,16 @@ function asyncComputed(asyncFn, initialValue, options) {
694
729
  }
695
730
  function signal(v, options, firewall = null) {
696
731
  if (firewall !== null) {
697
- return firewall.aa = withOptions(
732
+ return firewall.ba = withOptions(
698
733
  {
699
734
  g: v,
700
- p: null,
735
+ s: null,
701
736
  W: null,
702
- z: firewall,
703
- qa: firewall.aa,
737
+ B: firewall,
738
+ ra: firewall.ba,
704
739
  f: 0 /* None */,
705
- V: clock,
706
- d: NOT_PENDING
740
+ J: clock,
741
+ e: NOT_PENDING
707
742
  },
708
743
  options
709
744
  );
@@ -711,11 +746,11 @@ function signal(v, options, firewall = null) {
711
746
  return withOptions(
712
747
  {
713
748
  g: v,
714
- p: null,
749
+ s: null,
715
750
  W: null,
716
751
  f: 0 /* None */,
717
- V: clock,
718
- d: NOT_PENDING
752
+ J: clock,
753
+ e: NOT_PENDING
719
754
  },
720
755
  options
721
756
  );
@@ -736,98 +771,96 @@ function untrack(fn) {
736
771
  }
737
772
  function read(el) {
738
773
  let c = context;
739
- if (c?.Z)
740
- c = c._;
774
+ if (c?._)
775
+ c = c.$;
741
776
  if (c && tracking) {
742
777
  link(el, c);
743
- const owner = "_owner" in el ? el.z : el;
778
+ const owner = "_owner" in el ? el.B : el;
744
779
  if ("_fn" in owner) {
745
780
  const isZombie = el.b & 32 /* Zombie */;
746
- if (owner.e >= (isZombie ? zombieQueue.t : dirtyQueue.t)) {
781
+ if (owner.c >= (isZombie ? zombieQueue.p : dirtyQueue.p)) {
747
782
  markNode(c);
748
783
  markHeap(isZombie ? zombieQueue : dirtyQueue);
749
784
  updateIfNecessary(owner);
750
785
  }
751
- const height = owner.e;
752
- if (height >= c.e && el.s !== c) {
753
- c.e = height + 1;
786
+ const height = owner.c;
787
+ if (height >= c.c && el.w !== c) {
788
+ c.c = height + 1;
754
789
  }
755
790
  }
756
791
  }
757
792
  if (pendingCheck) {
758
- const pendingResult = (el.f & 1 /* Pending */) !== 0 || !!el.S || false;
759
- if (!el.G) {
760
- el.G = signal(pendingResult);
761
- el.G.ia = true;
762
- el.G.ca = (v) => setSignal(el.G, v);
793
+ const pendingResult = (el.f & 1 /* Pending */) !== 0 || !!el.T || false;
794
+ if (!el.H) {
795
+ el.H = signal(pendingResult);
796
+ el.H.ia = true;
797
+ el.H.da = (v) => setSignal(el.H, v);
763
798
  }
764
799
  const prev = pendingCheck;
765
800
  pendingCheck = null;
766
- read(el.G);
801
+ read(el.H);
767
802
  pendingCheck = prev;
768
803
  prev.g = pendingResult || prev.g;
769
804
  }
770
805
  if (pendingValueCheck) {
771
- if (!el.C) {
772
- el.C = signal(
773
- el.d === NOT_PENDING ? el.g : el.d
806
+ if (!el.D) {
807
+ el.D = signal(
808
+ el.e === NOT_PENDING ? el.g : el.e
774
809
  );
775
- el.C.ia = true;
776
- el.C.ca = (v) => queueMicrotask(() => queueMicrotask(() => setSignal(el.C, v)));
810
+ el.D.ia = true;
811
+ el.D.da = (v) => queueMicrotask(() => queueMicrotask(() => setSignal(el.D, v)));
777
812
  }
778
813
  pendingValueCheck = false;
779
814
  try {
780
- return read(el.C);
815
+ return read(el.D);
781
816
  } finally {
782
817
  pendingValueCheck = true;
783
818
  }
784
819
  }
785
820
  if (el.f & 1 /* Pending */) {
786
821
  if (c && !stale || el.f & 4 /* Uninitialized */)
787
- throw el.B;
822
+ throw el.C;
788
823
  else if (c && stale && !pendingCheck) {
789
824
  setStatusFlags(
790
825
  c,
791
826
  c.f | 1,
792
- el.B
827
+ el.C
793
828
  );
794
829
  }
795
830
  }
796
831
  if (el.f & 2 /* Error */) {
797
- if (el.V < clock) {
832
+ if (el.J < clock) {
798
833
  recompute(el, true);
799
834
  return read(el);
800
835
  } else {
801
- throw el.B;
836
+ throw el.C;
802
837
  }
803
838
  }
804
- return !c || el.d === NOT_PENDING || stale && !pendingCheck && el.S && activeTransition !== el.S ? el.g : el.d;
839
+ return !c || el.e === NOT_PENDING || stale && !pendingCheck && el.T && activeTransition !== el.T ? el.g : el.e;
805
840
  }
806
841
  function setSignal(el, v) {
807
842
  if (typeof v === "function") {
808
843
  v = v(
809
- el.d === NOT_PENDING ? el.g : el.d
844
+ el.e === NOT_PENDING ? el.g : el.e
810
845
  );
811
846
  }
812
- const valueChanged = !el.da || !el.da(el.d === NOT_PENDING ? el.g : el.d, v);
847
+ const valueChanged = !el.ea || !el.ea(el.e === NOT_PENDING ? el.g : el.e, v);
813
848
  if (!valueChanged && !el.f)
814
849
  return v;
815
850
  if (valueChanged) {
816
851
  if (el.ia)
817
852
  el.g = v;
818
853
  else {
819
- if (el.d === NOT_PENDING)
854
+ if (el.e === NOT_PENDING)
820
855
  globalQueue.h.push(el);
821
- el.d = v;
856
+ el.e = v;
822
857
  }
823
- if (el.C)
824
- el.C.ca(v);
858
+ if (el.D)
859
+ el.D.da(v);
825
860
  }
826
861
  clearStatusFlags(el);
827
- el.V = clock;
828
- for (let link2 = el.p; link2 !== null; link2 = link2.y) {
829
- insertIntoHeap(link2.m, link2.m.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue);
830
- }
862
+ el.J = clock;
863
+ notifySubs(el);
831
864
  schedule();
832
865
  return v;
833
866
  }
@@ -841,41 +874,41 @@ function onCleanup(fn) {
841
874
  if (!context)
842
875
  return fn;
843
876
  const node = context;
844
- if (!node.q) {
845
- node.q = fn;
846
- } else if (Array.isArray(node.q)) {
847
- node.q.push(fn);
877
+ if (!node.t) {
878
+ node.t = fn;
879
+ } else if (Array.isArray(node.t)) {
880
+ node.t.push(fn);
848
881
  } else {
849
- node.q = [node.q, fn];
882
+ node.t = [node.t, fn];
850
883
  }
851
884
  return fn;
852
885
  }
853
886
  function createOwner(options) {
854
887
  const parent = context;
855
888
  const owner = {
856
- Z: true,
857
- _: parent?.Z ? parent._ : parent,
858
- n: null,
859
- K: null,
889
+ _: true,
890
+ $: parent?._ ? parent.$ : parent,
860
891
  q: null,
892
+ M: null,
893
+ t: null,
861
894
  id: options?.id ?? (parent?.id != null ? getNextChildId(parent) : void 0),
862
895
  i: parent?.i ?? globalQueue,
863
- D: parent?.D || defaultContext,
896
+ E: parent?.E || defaultContext,
864
897
  na: 0,
898
+ V: null,
865
899
  U: null,
866
- T: null,
867
- s: parent,
900
+ w: parent,
868
901
  dispose(self = true) {
869
902
  disposeChildren(owner, self);
870
903
  }
871
904
  };
872
905
  if (parent) {
873
- const lastChild = parent.n;
906
+ const lastChild = parent.q;
874
907
  if (lastChild === null) {
875
- parent.n = owner;
908
+ parent.q = owner;
876
909
  } else {
877
- owner.K = lastChild;
878
- parent.n = owner;
910
+ owner.M = lastChild;
911
+ parent.q = owner;
879
912
  }
880
913
  }
881
914
  return owner;
@@ -936,7 +969,7 @@ function getContext(context2, owner = getOwner()) {
936
969
  if (!owner) {
937
970
  throw new NoOwnerError();
938
971
  }
939
- const value = hasContext(context2, owner) ? owner.D[context2.id] : context2.defaultValue;
972
+ const value = hasContext(context2, owner) ? owner.E[context2.id] : context2.defaultValue;
940
973
  if (isUndefined(value)) {
941
974
  throw new ContextNotFoundError();
942
975
  }
@@ -946,13 +979,13 @@ function setContext(context2, value, owner = getOwner()) {
946
979
  if (!owner) {
947
980
  throw new NoOwnerError();
948
981
  }
949
- owner.D = {
950
- ...owner.D,
982
+ owner.E = {
983
+ ...owner.E,
951
984
  [context2.id]: isUndefined(value) ? context2.defaultValue : value
952
985
  };
953
986
  }
954
987
  function hasContext(context2, owner) {
955
- return !isUndefined(owner?.D[context2.id]);
988
+ return !isUndefined(owner?.E[context2.id]);
956
989
  }
957
990
  function isUndefined(value) {
958
991
  return typeof value === "undefined";
@@ -964,28 +997,28 @@ function effect(compute, effect2, error, initialValue, options) {
964
997
  const node = computed(compute, initialValue, {
965
998
  ...options,
966
999
  ja: {
967
- ea: true,
1000
+ fa: true,
968
1001
  oa: initialValue,
969
- ta: effect2,
1002
+ ua: effect2,
970
1003
  pa: error,
971
- L: void 0,
1004
+ N: void 0,
972
1005
  i: getOwner()?.i ?? globalQueue,
973
- I: options?.render ? 1 /* Render */ : 2 /* User */,
1006
+ K: options?.render ? 1 /* Render */ : 2 /* User */,
974
1007
  la(statusFlagsChanged, prevStatusFlags) {
975
1008
  if (initialized) {
976
1009
  const errorChanged = this.f && this.f === prevStatusFlags && statusFlagsChanged;
977
- this.ea = !(this.f & 2 /* Error */) && !(this.f & 1 /* Pending */ & ~prevStatusFlags) && !errorChanged;
978
- if (this.ea)
979
- this.i.enqueue(this.I, runEffect.bind(this));
1010
+ this.fa = !(this.f & 2 /* Error */) && !(this.f & 1 /* Pending */ & ~prevStatusFlags) && !errorChanged;
1011
+ if (this.fa)
1012
+ this.i.enqueue(this.K, runEffect.bind(this));
980
1013
  }
981
1014
  if (this.f & 2 /* Error */) {
982
- let error2 = this.B;
1015
+ let error2 = this.C;
983
1016
  this.i.notify(this, 1 /* Pending */, 0);
984
- if (this.I === 2 /* User */) {
1017
+ if (this.K === 2 /* User */) {
985
1018
  try {
986
1019
  return this.pa ? this.pa(error2, () => {
987
- this.L?.();
988
- this.L = void 0;
1020
+ this.N?.();
1021
+ this.N = void 0;
989
1022
  }) : console.error(error2);
990
1023
  } catch (e) {
991
1024
  error2 = e;
@@ -993,7 +1026,7 @@ function effect(compute, effect2, error, initialValue, options) {
993
1026
  }
994
1027
  if (!this.i.notify(this, 2 /* Error */, 2 /* Error */))
995
1028
  throw error2;
996
- } else if (this.I === 1 /* Render */) {
1029
+ } else if (this.K === 1 /* Render */) {
997
1030
  this.i.notify(
998
1031
  this,
999
1032
  1 /* Pending */ | 2 /* Error */,
@@ -1004,25 +1037,24 @@ function effect(compute, effect2, error, initialValue, options) {
1004
1037
  }
1005
1038
  });
1006
1039
  initialized = true;
1007
- if (node.I === 1 /* Render */) {
1008
- node.ha = (p) => !(node.f & 2 /* Error */) ? staleValues(() => compute(p)) : compute(p);
1009
- }
1010
- !options?.defer && !(node.f & (2 /* Error */ | 1 /* Pending */)) && (node.I === 2 /* User */ ? node.i.enqueue(node.I, runEffect.bind(node)) : runEffect.call(node));
1011
- onCleanup(() => node.L?.());
1040
+ if (node.K === 1 /* Render */)
1041
+ node.ha = (p) => staleValues(() => compute(p));
1042
+ !options?.defer && !(node.f & (2 /* Error */ | 1 /* Pending */)) && (node.K === 2 /* User */ ? node.i.enqueue(node.K, runEffect.bind(node)) : runEffect.call(node));
1043
+ onCleanup(() => node.N?.());
1012
1044
  }
1013
1045
  function runEffect() {
1014
- if (!this.ea || this.b & 64 /* Disposed */)
1046
+ if (!this.fa || this.b & 64 /* Disposed */)
1015
1047
  return;
1016
- this.L?.();
1017
- this.L = void 0;
1048
+ this.N?.();
1049
+ this.N = void 0;
1018
1050
  try {
1019
- this.L = this.ta(this.g, this.oa);
1051
+ this.N = this.ua(this.g, this.oa);
1020
1052
  } catch (error) {
1021
1053
  if (!this.i.notify(this, 2 /* Error */, 2 /* Error */))
1022
1054
  throw error;
1023
1055
  } finally {
1024
1056
  this.oa = this.g;
1025
- this.ea = false;
1057
+ this.fa = false;
1026
1058
  }
1027
1059
  }
1028
1060
 
@@ -1053,7 +1085,7 @@ function createMemo(compute, value, options) {
1053
1085
  function createAsync(compute, value, options) {
1054
1086
  const node = asyncComputed(compute, value, options);
1055
1087
  const ret = read.bind(null, node);
1056
- ret.refresh = node.sa;
1088
+ ret.refresh = node.ta;
1057
1089
  return ret;
1058
1090
  }
1059
1091
  function createEffect(compute, effectFn, value, options) {
@@ -1366,7 +1398,7 @@ var storeTraps = {
1366
1398
  return desc.get.call(receiver);
1367
1399
  }
1368
1400
  if (Writing?.has(receiver)) {
1369
- let value2 = tracked && (overridden || !proxySource) ? tracked.d !== NOT_PENDING ? tracked.d : tracked.g : storeValue[property];
1401
+ let value2 = tracked && (overridden || !proxySource) ? tracked.e !== NOT_PENDING ? tracked.e : tracked.g : storeValue[property];
1370
1402
  value2 === $DELETED && (value2 = void 0);
1371
1403
  if (!isWrappable(value2))
1372
1404
  return value2;
@@ -1765,98 +1797,98 @@ function mapArray(list, map, options) {
1765
1797
  const keyFn = typeof options?.keyed === "function" ? options.keyed : void 0;
1766
1798
  return createMemo(
1767
1799
  updateKeyedMap.bind({
1768
- z: createOwner(),
1769
- j: 0,
1770
- ua: list,
1771
- F: [],
1772
- M: map,
1773
- c: [],
1800
+ B: createOwner(),
1801
+ m: 0,
1802
+ va: list,
1803
+ G: [],
1804
+ O: map,
1805
+ d: [],
1774
1806
  a: [],
1775
- N: keyFn,
1776
- k: keyFn || options?.keyed === false ? [] : void 0,
1777
- l: map.length > 1 ? [] : void 0,
1807
+ P: keyFn,
1808
+ n: keyFn || options?.keyed === false ? [] : void 0,
1809
+ o: map.length > 1 ? [] : void 0,
1778
1810
  X: options?.fallback
1779
1811
  })
1780
1812
  );
1781
1813
  }
1782
1814
  var pureOptions = { pureWrite: true };
1783
1815
  function updateKeyedMap() {
1784
- const newItems = this.ua() || [], newLen = newItems.length;
1816
+ const newItems = this.va() || [], newLen = newItems.length;
1785
1817
  newItems[$TRACK];
1786
- runWithOwner(this.z, () => {
1787
- let i, j, mapper = this.k ? () => {
1788
- this.k[j] = signal(newItems[j], pureOptions);
1789
- this.l && (this.l[j] = signal(j, pureOptions));
1790
- return this.M(
1791
- read.bind(null, this.k[j]),
1792
- this.l ? read.bind(null, this.l[j]) : void 0
1818
+ runWithOwner(this.B, () => {
1819
+ let i, j, mapper = this.n ? () => {
1820
+ this.n[j] = signal(newItems[j], pureOptions);
1821
+ this.o && (this.o[j] = signal(j, pureOptions));
1822
+ return this.O(
1823
+ read.bind(null, this.n[j]),
1824
+ this.o ? read.bind(null, this.o[j]) : void 0
1793
1825
  );
1794
- } : this.l ? () => {
1826
+ } : this.o ? () => {
1795
1827
  const item = newItems[j];
1796
- this.l[j] = signal(j, pureOptions);
1797
- return this.M(
1828
+ this.o[j] = signal(j, pureOptions);
1829
+ return this.O(
1798
1830
  () => item,
1799
- read.bind(null, this.l[j])
1831
+ read.bind(null, this.o[j])
1800
1832
  );
1801
1833
  } : () => {
1802
1834
  const item = newItems[j];
1803
- return this.M(() => item);
1835
+ return this.O(() => item);
1804
1836
  };
1805
1837
  if (newLen === 0) {
1806
- if (this.j !== 0) {
1807
- this.z.dispose(false);
1838
+ if (this.m !== 0) {
1839
+ this.B.dispose(false);
1808
1840
  this.a = [];
1809
- this.F = [];
1810
- this.c = [];
1811
- this.j = 0;
1812
- this.k && (this.k = []);
1813
- this.l && (this.l = []);
1841
+ this.G = [];
1842
+ this.d = [];
1843
+ this.m = 0;
1844
+ this.n && (this.n = []);
1845
+ this.o && (this.o = []);
1814
1846
  }
1815
- if (this.X && !this.c[0]) {
1816
- this.c[0] = runWithOwner(
1847
+ if (this.X && !this.d[0]) {
1848
+ this.d[0] = runWithOwner(
1817
1849
  this.a[0] = createOwner(),
1818
1850
  this.X
1819
1851
  );
1820
1852
  }
1821
- } else if (this.j === 0) {
1853
+ } else if (this.m === 0) {
1822
1854
  if (this.a[0])
1823
1855
  this.a[0].dispose();
1824
- this.c = new Array(newLen);
1856
+ this.d = new Array(newLen);
1825
1857
  for (j = 0; j < newLen; j++) {
1826
- this.F[j] = newItems[j];
1827
- this.c[j] = runWithOwner(this.a[j] = createOwner(), mapper);
1858
+ this.G[j] = newItems[j];
1859
+ this.d[j] = runWithOwner(this.a[j] = createOwner(), mapper);
1828
1860
  }
1829
- this.j = newLen;
1861
+ this.m = newLen;
1830
1862
  } else {
1831
- let start, end, newEnd, item, key, newIndices, newIndicesNext, temp = new Array(newLen), tempNodes = new Array(newLen), tempRows = this.k ? new Array(newLen) : void 0, tempIndexes = this.l ? new Array(newLen) : void 0;
1832
- for (start = 0, end = Math.min(this.j, newLen); start < end && (this.F[start] === newItems[start] || this.k && compare(this.N, this.F[start], newItems[start])); start++) {
1833
- if (this.k)
1834
- setSignal(this.k[start], newItems[start]);
1863
+ let start, end, newEnd, item, key, newIndices, newIndicesNext, temp = new Array(newLen), tempNodes = new Array(newLen), tempRows = this.n ? new Array(newLen) : void 0, tempIndexes = this.o ? new Array(newLen) : void 0;
1864
+ for (start = 0, end = Math.min(this.m, newLen); start < end && (this.G[start] === newItems[start] || this.n && compare(this.P, this.G[start], newItems[start])); start++) {
1865
+ if (this.n)
1866
+ setSignal(this.n[start], newItems[start]);
1835
1867
  }
1836
- for (end = this.j - 1, newEnd = newLen - 1; end >= start && newEnd >= start && (this.F[end] === newItems[newEnd] || this.k && compare(this.N, this.F[end], newItems[newEnd])); end--, newEnd--) {
1837
- temp[newEnd] = this.c[end];
1868
+ for (end = this.m - 1, newEnd = newLen - 1; end >= start && newEnd >= start && (this.G[end] === newItems[newEnd] || this.n && compare(this.P, this.G[end], newItems[newEnd])); end--, newEnd--) {
1869
+ temp[newEnd] = this.d[end];
1838
1870
  tempNodes[newEnd] = this.a[end];
1839
- tempRows && (tempRows[newEnd] = this.k[end]);
1840
- tempIndexes && (tempIndexes[newEnd] = this.l[end]);
1871
+ tempRows && (tempRows[newEnd] = this.n[end]);
1872
+ tempIndexes && (tempIndexes[newEnd] = this.o[end]);
1841
1873
  }
1842
1874
  newIndices = /* @__PURE__ */ new Map();
1843
1875
  newIndicesNext = new Array(newEnd + 1);
1844
1876
  for (j = newEnd; j >= start; j--) {
1845
1877
  item = newItems[j];
1846
- key = this.N ? this.N(item) : item;
1878
+ key = this.P ? this.P(item) : item;
1847
1879
  i = newIndices.get(key);
1848
1880
  newIndicesNext[j] = i === void 0 ? -1 : i;
1849
1881
  newIndices.set(key, j);
1850
1882
  }
1851
1883
  for (i = start; i <= end; i++) {
1852
- item = this.F[i];
1853
- key = this.N ? this.N(item) : item;
1884
+ item = this.G[i];
1885
+ key = this.P ? this.P(item) : item;
1854
1886
  j = newIndices.get(key);
1855
1887
  if (j !== void 0 && j !== -1) {
1856
- temp[j] = this.c[i];
1888
+ temp[j] = this.d[i];
1857
1889
  tempNodes[j] = this.a[i];
1858
- tempRows && (tempRows[j] = this.k[i]);
1859
- tempIndexes && (tempIndexes[j] = this.l[i]);
1890
+ tempRows && (tempRows[j] = this.n[i]);
1891
+ tempIndexes && (tempIndexes[j] = this.o[i]);
1860
1892
  j = newIndicesNext[j];
1861
1893
  newIndices.set(key, j);
1862
1894
  } else
@@ -1864,52 +1896,52 @@ function updateKeyedMap() {
1864
1896
  }
1865
1897
  for (j = start; j < newLen; j++) {
1866
1898
  if (j in temp) {
1867
- this.c[j] = temp[j];
1899
+ this.d[j] = temp[j];
1868
1900
  this.a[j] = tempNodes[j];
1869
1901
  if (tempRows) {
1870
- this.k[j] = tempRows[j];
1871
- setSignal(this.k[j], newItems[j]);
1902
+ this.n[j] = tempRows[j];
1903
+ setSignal(this.n[j], newItems[j]);
1872
1904
  }
1873
1905
  if (tempIndexes) {
1874
- this.l[j] = tempIndexes[j];
1875
- setSignal(this.l[j], j);
1906
+ this.o[j] = tempIndexes[j];
1907
+ setSignal(this.o[j], j);
1876
1908
  }
1877
1909
  } else {
1878
- this.c[j] = runWithOwner(this.a[j] = createOwner(), mapper);
1910
+ this.d[j] = runWithOwner(this.a[j] = createOwner(), mapper);
1879
1911
  }
1880
1912
  }
1881
- this.c = this.c.slice(0, this.j = newLen);
1882
- this.F = newItems.slice(0);
1913
+ this.d = this.d.slice(0, this.m = newLen);
1914
+ this.G = newItems.slice(0);
1883
1915
  }
1884
1916
  });
1885
- return this.c;
1917
+ return this.d;
1886
1918
  }
1887
1919
  function repeat(count, map, options) {
1888
1920
  return updateRepeat.bind({
1889
- z: createOwner(),
1890
- j: 0,
1891
- w: 0,
1892
- va: count,
1893
- M: map,
1921
+ B: createOwner(),
1922
+ m: 0,
1923
+ y: 0,
1924
+ wa: count,
1925
+ O: map,
1894
1926
  a: [],
1895
- c: [],
1896
- wa: options?.from,
1927
+ d: [],
1928
+ xa: options?.from,
1897
1929
  X: options?.fallback
1898
1930
  });
1899
1931
  }
1900
1932
  function updateRepeat() {
1901
- const newLen = this.va();
1902
- const from = this.wa?.() || 0;
1903
- runWithOwner(this.z, () => {
1933
+ const newLen = this.wa();
1934
+ const from = this.xa?.() || 0;
1935
+ runWithOwner(this.B, () => {
1904
1936
  if (newLen === 0) {
1905
- if (this.j !== 0) {
1906
- this.z.dispose(false);
1937
+ if (this.m !== 0) {
1938
+ this.B.dispose(false);
1907
1939
  this.a = [];
1908
- this.c = [];
1909
- this.j = 0;
1940
+ this.d = [];
1941
+ this.m = 0;
1910
1942
  }
1911
- if (this.X && !this.c[0]) {
1912
- this.c[0] = runWithOwner(
1943
+ if (this.X && !this.d[0]) {
1944
+ this.d[0] = runWithOwner(
1913
1945
  this.a[0] = createOwner(),
1914
1946
  this.X
1915
1947
  );
@@ -1917,44 +1949,44 @@ function updateRepeat() {
1917
1949
  return;
1918
1950
  }
1919
1951
  const to = from + newLen;
1920
- const prevTo = this.w + this.j;
1921
- if (this.j === 0 && this.a[0])
1952
+ const prevTo = this.y + this.m;
1953
+ if (this.m === 0 && this.a[0])
1922
1954
  this.a[0].dispose();
1923
1955
  for (let i = to; i < prevTo; i++)
1924
- this.a[i - this.w].dispose();
1925
- if (this.w < from) {
1926
- let i = this.w;
1927
- while (i < from && i < this.j)
1956
+ this.a[i - this.y].dispose();
1957
+ if (this.y < from) {
1958
+ let i = this.y;
1959
+ while (i < from && i < this.m)
1928
1960
  this.a[i++].dispose();
1929
- this.a.splice(0, from - this.w);
1930
- this.c.splice(0, from - this.w);
1931
- } else if (this.w > from) {
1932
- let i = prevTo - this.w - 1;
1933
- let difference = this.w - from;
1934
- this.a.length = this.c.length = newLen;
1961
+ this.a.splice(0, from - this.y);
1962
+ this.d.splice(0, from - this.y);
1963
+ } else if (this.y > from) {
1964
+ let i = prevTo - this.y - 1;
1965
+ let difference = this.y - from;
1966
+ this.a.length = this.d.length = newLen;
1935
1967
  while (i >= difference) {
1936
1968
  this.a[i] = this.a[i - difference];
1937
- this.c[i] = this.c[i - difference];
1969
+ this.d[i] = this.d[i - difference];
1938
1970
  i--;
1939
1971
  }
1940
1972
  for (let i2 = 0; i2 < difference; i2++) {
1941
- this.c[i2] = runWithOwner(
1973
+ this.d[i2] = runWithOwner(
1942
1974
  this.a[i2] = createOwner(),
1943
- () => this.M(i2 + from)
1975
+ () => this.O(i2 + from)
1944
1976
  );
1945
1977
  }
1946
1978
  }
1947
1979
  for (let i = prevTo; i < to; i++) {
1948
- this.c[i - from] = runWithOwner(
1980
+ this.d[i - from] = runWithOwner(
1949
1981
  this.a[i - from] = createOwner(),
1950
- () => this.M(i)
1982
+ () => this.O(i)
1951
1983
  );
1952
1984
  }
1953
- this.c = this.c.slice(0, newLen);
1954
- this.w = from;
1955
- this.j = newLen;
1985
+ this.d = this.d.slice(0, newLen);
1986
+ this.y = from;
1987
+ this.m = newLen;
1956
1988
  });
1957
- return this.c;
1989
+ return this.d;
1958
1990
  }
1959
1991
  function compare(key, a, b) {
1960
1992
  return key ? key(a) === key(b) : true;
@@ -1988,20 +2020,20 @@ function createBoundChildren(owner, fn, queue, mask) {
1988
2020
  });
1989
2021
  }
1990
2022
  var ConditionalQueue = class extends Queue {
1991
- r;
1992
- fa = /* @__PURE__ */ new Set();
2023
+ u;
2024
+ ga = /* @__PURE__ */ new Set();
1993
2025
  h = /* @__PURE__ */ new Set();
1994
2026
  constructor(disabled) {
1995
2027
  super();
1996
- this.r = disabled;
2028
+ this.u = disabled;
1997
2029
  }
1998
2030
  run(type) {
1999
- if (!type || read(this.r))
2031
+ if (!type || read(this.u))
2000
2032
  return;
2001
2033
  return super.run(type);
2002
2034
  }
2003
2035
  notify(node, type, flags) {
2004
- if (read(this.r)) {
2036
+ if (read(this.u)) {
2005
2037
  if (type & 1 /* Pending */) {
2006
2038
  if (flags & 1 /* Pending */) {
2007
2039
  this.h.add(node);
@@ -2011,9 +2043,9 @@ var ConditionalQueue = class extends Queue {
2011
2043
  }
2012
2044
  if (type & 2 /* Error */) {
2013
2045
  if (flags & 2 /* Error */) {
2014
- this.fa.add(node);
2046
+ this.ga.add(node);
2015
2047
  type &= ~2 /* Error */;
2016
- } else if (this.fa.delete(node))
2048
+ } else if (this.ga.delete(node))
2017
2049
  type &= ~2 /* Error */;
2018
2050
  }
2019
2051
  }
@@ -2021,31 +2053,32 @@ var ConditionalQueue = class extends Queue {
2021
2053
  }
2022
2054
  };
2023
2055
  var CollectionQueue = class extends Queue {
2024
- ga;
2056
+ Z;
2025
2057
  a = /* @__PURE__ */ new Set();
2026
- r = signal(false, { pureWrite: true });
2058
+ u = signal(false, { pureWrite: true });
2059
+ qa = false;
2027
2060
  constructor(type) {
2028
2061
  super();
2029
- this.ga = type;
2062
+ this.Z = type;
2030
2063
  }
2031
2064
  run(type) {
2032
- if (!type || read(this.r))
2065
+ if (!type || read(this.u))
2033
2066
  return;
2034
2067
  return super.run(type);
2035
2068
  }
2036
2069
  notify(node, type, flags) {
2037
- if (!(type & this.ga))
2070
+ if (!(type & this.Z) || this.Z & 1 /* Pending */ && this.qa)
2038
2071
  return super.notify(node, type, flags);
2039
- if (flags & this.ga) {
2072
+ if (flags & this.Z) {
2040
2073
  this.a.add(node);
2041
2074
  if (this.a.size === 1)
2042
- setSignal(this.r, true);
2075
+ setSignal(this.u, true);
2043
2076
  } else if (this.a.size > 0) {
2044
2077
  this.a.delete(node);
2045
2078
  if (this.a.size === 0)
2046
- setSignal(this.r, false);
2079
+ setSignal(this.u, false);
2047
2080
  }
2048
- type &= ~this.ga;
2081
+ type &= ~this.Z;
2049
2082
  return type ? super.notify(node, type, flags) : true;
2050
2083
  }
2051
2084
  };
@@ -2054,28 +2087,29 @@ function createBoundary(fn, condition) {
2054
2087
  const queue = new ConditionalQueue(computed(() => condition() === "hidden" /* HIDDEN */));
2055
2088
  const tree = createBoundChildren(owner, fn, queue, 0);
2056
2089
  computed(() => {
2057
- const disabled = read(queue.r);
2090
+ const disabled = read(queue.u);
2058
2091
  tree.Y = disabled ? 2 /* Error */ | 1 /* Pending */ : 0;
2059
2092
  if (!disabled) {
2060
2093
  queue.h.forEach(
2061
2094
  (node) => queue.notify(node, 1 /* Pending */, 1 /* Pending */)
2062
2095
  );
2063
- queue.fa.forEach((node) => queue.notify(node, 2 /* Error */, 2 /* Error */));
2096
+ queue.ga.forEach((node) => queue.notify(node, 2 /* Error */, 2 /* Error */));
2064
2097
  queue.h.clear();
2065
- queue.fa.clear();
2098
+ queue.ga.clear();
2066
2099
  }
2067
2100
  });
2068
- return () => read(queue.r) ? void 0 : read(tree);
2101
+ return () => read(queue.u) ? void 0 : read(tree);
2069
2102
  }
2070
2103
  function createCollectionBoundary(type, fn, fallback) {
2071
2104
  const owner = createOwner();
2072
2105
  const queue = new CollectionQueue(type);
2073
2106
  const tree = createBoundChildren(owner, fn, queue, type);
2074
2107
  const decision = computed(() => {
2075
- if (!read(queue.r)) {
2108
+ if (!read(queue.u)) {
2076
2109
  const resolved = read(tree);
2077
- if (!untrack(() => read(queue.r)))
2078
- return resolved;
2110
+ if (!untrack(() => read(queue.u)))
2111
+ queue.qa = true;
2112
+ return resolved;
2079
2113
  }
2080
2114
  return fallback(queue);
2081
2115
  });
@@ -2087,7 +2121,7 @@ function createLoadBoundary(fn, fallback) {
2087
2121
  function createErrorBoundary(fn, fallback) {
2088
2122
  return createCollectionBoundary(2 /* Error */, fn, (queue) => {
2089
2123
  let node = queue.a.values().next().value;
2090
- return fallback(node.B, () => {
2124
+ return fallback(node.C, () => {
2091
2125
  for (let node2 of queue.a) {
2092
2126
  recompute(node2, true);
2093
2127
  }