@solidjs/signals 0.9.9 → 0.9.10

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
@@ -102,8 +102,8 @@ function markNode(e, t = REACTIVE_DIRTY) {
102
102
  for (let t = e.p; t !== null; t = t.h) {
103
103
  markNode(t.A, REACTIVE_CHECK);
104
104
  }
105
- if (e.P !== null) {
106
- for (let t = e.P; t !== null; t = t.C) {
105
+ if (e.N !== null) {
106
+ for (let t = e.N; t !== null; t = t.P) {
107
107
  for (let e = t.p; e !== null; e = e.h) {
108
108
  markNode(e.A, REACTIVE_CHECK);
109
109
  }
@@ -112,12 +112,12 @@ function markNode(e, t = REACTIVE_DIRTY) {
112
112
  }
113
113
  function runHeap(e, t) {
114
114
  e.I = false;
115
- for (e.N = 0; e.N <= e.S; e.N++) {
116
- let n = e.T[e.N];
115
+ for (e.C = 0; e.C <= e.S; e.C++) {
116
+ let n = e.T[e.C];
117
117
  while (n !== undefined) {
118
118
  if (n._ & REACTIVE_IN_HEAP) t(n);
119
119
  else adjustHeight(n, e);
120
- n = e.T[e.N];
120
+ n = e.T[e.C];
121
121
  }
122
122
  }
123
123
  e.S = 0;
@@ -138,8 +138,8 @@ function adjustHeight(e, t) {
138
138
  }
139
139
  }
140
140
  const transitions = new Set();
141
- const dirtyQueue = { T: new Array(2e3).fill(undefined), I: false, N: 0, S: 0 };
142
- const zombieQueue = { T: new Array(2e3).fill(undefined), I: false, N: 0, S: 0 };
141
+ const dirtyQueue = { T: new Array(2e3).fill(undefined), I: false, C: 0, S: 0 };
142
+ const zombieQueue = { T: new Array(2e3).fill(undefined), I: false, C: 0, S: 0 };
143
143
  let clock = 0;
144
144
  let activeTransition = null;
145
145
  let scheduled = false;
@@ -155,64 +155,71 @@ function getOrCreateLane(e) {
155
155
  if (t) {
156
156
  return findLane(t);
157
157
  }
158
- t = { t: e, k: new Set(), W: [[], []], G: null, M: activeTransition };
158
+ const n = e.k;
159
+ const i = n?.W ? findLane(n.W) : null;
160
+ t = { t: e, G: new Set(), M: [[], []], F: null, $: activeTransition, H: i };
159
161
  signalLanes.set(e, t);
160
162
  activeLanes.add(t);
161
- e.F = e.$ || 0;
163
+ e.j = e.K || 0;
162
164
  return t;
163
165
  }
164
166
  function findLane(e) {
165
- while (e.G) e = e.G;
167
+ while (e.F) e = e.F;
166
168
  return e;
167
169
  }
168
170
  function mergeLanes(e, t) {
169
171
  e = findLane(e);
170
172
  t = findLane(t);
171
173
  if (e === t) return e;
172
- t.G = e;
173
- for (const n of t.k) e.k.add(n);
174
- e.W[0].push(...t.W[0]);
175
- e.W[1].push(...t.W[1]);
174
+ t.F = e;
175
+ for (const n of t.G) e.G.add(n);
176
+ e.M[0].push(...t.M[0]);
177
+ e.M[1].push(...t.M[1]);
176
178
  return e;
177
179
  }
178
180
  function clearLaneEntry(e) {
179
181
  signalLanes.delete(e);
180
182
  }
181
183
  function resolveLane(e) {
182
- const t = e.H;
184
+ const t = e.W;
183
185
  if (!t) return undefined;
184
186
  const n = findLane(t);
185
187
  if (activeLanes.has(n)) return n;
186
- e.H = undefined;
188
+ e.W = undefined;
187
189
  return undefined;
188
190
  }
189
191
  function hasActiveOverride(e) {
190
- return !!(e.j && e.K !== NOT_PENDING);
192
+ return !!(e.Y && e.B !== NOT_PENDING);
191
193
  }
192
194
  function assignOrMergeLane(e, t) {
193
195
  const n = findLane(t);
194
- const i = e.H;
196
+ const i = e.W;
195
197
  if (i) {
196
- if (i.G) {
197
- e.H = t;
198
+ if (i.F) {
199
+ e.W = t;
198
200
  return;
199
201
  }
200
202
  const r = findLane(i);
201
203
  if (activeLanes.has(r)) {
202
204
  if (r !== n && !hasActiveOverride(e)) {
203
- mergeLanes(n, r);
205
+ if (n.H && findLane(n.H) === r) {
206
+ e.W = t;
207
+ } else if (r.H && findLane(r.H) === n);
208
+ else {
209
+ mergeLanes(n, r);
210
+ }
204
211
  }
205
212
  return;
206
213
  }
207
214
  }
208
- e.H = t;
215
+ e.W = t;
209
216
  }
210
217
  function runLaneEffects(e) {
211
218
  for (const t of activeLanes) {
212
- if (t.G || t.k.size > 0) continue;
213
- const n = t.W[e - 1];
219
+ if (t.F || t.G.size > 0) continue;
220
+ const n = t.M[e - 1];
214
221
  if (n.length) {
215
- t.W[e - 1] = [];
222
+ t.M[e - 1] = [];
216
223
  runQueue(n, e);
217
224
  }
218
225
  }
@@ -223,21 +230,21 @@ function setProjectionWriteActive(e) {
223
230
  function schedule() {
224
231
  if (scheduled) return;
225
232
  scheduled = true;
226
- if (!globalQueue.Y) queueMicrotask(flush);
233
+ if (!globalQueue.X) queueMicrotask(flush);
227
234
  }
228
235
  class Queue {
229
236
  o = null;
230
- B = [[], []];
231
- X = [];
237
+ q = [[], []];
238
+ Z = [];
232
239
  created = clock;
233
240
  addChild(e) {
234
- this.X.push(e);
241
+ this.Z.push(e);
235
242
  e.o = this;
236
243
  }
237
244
  removeChild(e) {
238
- const t = this.X.indexOf(e);
245
+ const t = this.Z.indexOf(e);
239
246
  if (t >= 0) {
240
- this.X.splice(t, 1);
247
+ this.Z.splice(t, 1);
241
248
  e.o = null;
242
249
  }
243
250
  }
@@ -246,106 +253,106 @@ class Queue {
246
253
  return false;
247
254
  }
248
255
  run(e) {
249
- if (this.B[e - 1].length) {
250
- const t = this.B[e - 1];
251
- this.B[e - 1] = [];
256
+ if (this.q[e - 1].length) {
257
+ const t = this.q[e - 1];
258
+ this.q[e - 1] = [];
252
259
  runQueue(t, e);
253
260
  }
254
- for (let t = 0; t < this.X.length; t++) this.X[t].run?.(e);
261
+ for (let t = 0; t < this.Z.length; t++) this.Z[t].run?.(e);
255
262
  }
256
263
  enqueue(e, t) {
257
264
  if (e) {
258
265
  if (currentOptimisticLane) {
259
266
  const n = findLane(currentOptimisticLane);
260
- n.W[e - 1].push(t);
267
+ n.M[e - 1].push(t);
261
268
  } else {
262
- this.B[e - 1].push(t);
269
+ this.q[e - 1].push(t);
263
270
  }
264
271
  }
265
272
  schedule();
266
273
  }
267
274
  stashQueues(e) {
268
- e.B[0].push(...this.B[0]);
269
- e.B[1].push(...this.B[1]);
270
- this.B = [[], []];
271
- for (let t = 0; t < this.X.length; t++) {
272
- let n = this.X[t];
273
- let i = e.X[t];
275
+ e.q[0].push(...this.q[0]);
276
+ e.q[1].push(...this.q[1]);
277
+ this.q = [[], []];
278
+ for (let t = 0; t < this.Z.length; t++) {
279
+ let n = this.Z[t];
280
+ let i = e.Z[t];
274
281
  if (!i) {
275
- i = { B: [[], []], X: [] };
276
- e.X[t] = i;
282
+ i = { q: [[], []], Z: [] };
283
+ e.Z[t] = i;
277
284
  }
278
285
  n.stashQueues(i);
279
286
  }
280
287
  }
281
288
  restoreQueues(e) {
282
- this.B[0].push(...e.B[0]);
283
- this.B[1].push(...e.B[1]);
284
- for (let t = 0; t < e.X.length; t++) {
285
- const n = e.X[t];
286
- let i = this.X[t];
289
+ this.q[0].push(...e.q[0]);
290
+ this.q[1].push(...e.q[1]);
291
+ for (let t = 0; t < e.Z.length; t++) {
292
+ const n = e.Z[t];
293
+ let i = this.Z[t];
287
294
  if (i) i.restoreQueues(n);
288
295
  }
289
296
  }
290
297
  }
291
298
  class GlobalQueue extends Queue {
292
- Y = false;
293
- q = [];
294
- Z = [];
295
- J = new Set();
296
- static ee;
297
- static te;
298
- static ne = null;
299
+ X = false;
300
+ J = [];
301
+ ee = [];
302
+ te = new Set();
303
+ static ne;
304
+ static ie;
305
+ static re = null;
299
306
  flush() {
300
- if (this.Y) return;
301
- this.Y = true;
307
+ if (this.X) return;
308
+ this.X = true;
302
309
  try {
303
- runHeap(dirtyQueue, GlobalQueue.ee);
310
+ runHeap(dirtyQueue, GlobalQueue.ne);
304
311
  if (activeTransition) {
305
312
  const e = transitionComplete(activeTransition);
306
313
  if (!e) {
307
314
  let e = activeTransition;
308
- runHeap(zombieQueue, GlobalQueue.ee);
309
- this.q = [];
310
- this.Z = [];
311
- this.J = new Set();
315
+ runHeap(zombieQueue, GlobalQueue.ne);
316
+ this.J = [];
317
+ this.ee = [];
318
+ this.te = new Set();
312
319
  runLaneEffects(EFFECT_RENDER);
313
320
  runLaneEffects(EFFECT_USER);
314
- this.stashQueues(activeTransition.ie);
321
+ this.stashQueues(activeTransition.oe);
315
322
  clock++;
316
- scheduled = dirtyQueue.S >= dirtyQueue.N;
317
- reassignPendingTransition(activeTransition.q);
323
+ scheduled = dirtyQueue.S >= dirtyQueue.C;
324
+ reassignPendingTransition(activeTransition.J);
318
325
  activeTransition = null;
319
326
  finalizePureQueue(null, true);
320
327
  return;
321
328
  }
322
- this.q !== activeTransition.q && this.q.push(...activeTransition.q);
323
- this.restoreQueues(activeTransition.ie);
329
+ this.J !== activeTransition.J && this.J.push(...activeTransition.J);
330
+ this.restoreQueues(activeTransition.oe);
324
331
  transitions.delete(activeTransition);
325
332
  const t = activeTransition;
326
333
  activeTransition = null;
327
- reassignPendingTransition(this.q);
334
+ reassignPendingTransition(this.J);
328
335
  finalizePureQueue(t);
329
336
  } else {
330
- if (transitions.size) runHeap(zombieQueue, GlobalQueue.ee);
337
+ if (transitions.size) runHeap(zombieQueue, GlobalQueue.ne);
331
338
  finalizePureQueue();
332
339
  }
333
340
  clock++;
334
- scheduled = dirtyQueue.S >= dirtyQueue.N;
341
+ scheduled = dirtyQueue.S >= dirtyQueue.C;
335
342
  runLaneEffects(EFFECT_RENDER);
336
343
  this.run(EFFECT_RENDER);
337
344
  runLaneEffects(EFFECT_USER);
338
345
  this.run(EFFECT_USER);
339
346
  } finally {
340
- this.Y = false;
347
+ this.X = false;
341
348
  }
342
349
  }
343
350
  notify(e, t, n, i) {
344
351
  if (t & STATUS_PENDING) {
345
352
  if (n & STATUS_PENDING) {
346
- const t = i !== undefined ? i : e.re;
347
- if (activeTransition && t && !activeTransition.oe.includes(t.t)) {
348
- activeTransition.oe.push(t.t);
353
+ const t = i !== undefined ? i : e.se;
354
+ if (activeTransition && t && !activeTransition.ue.includes(t.t)) {
355
+ activeTransition.ue.push(t.t);
349
356
  schedule();
350
357
  }
351
358
  }
@@ -356,143 +363,143 @@ class GlobalQueue extends Queue {
356
363
  initTransition(e) {
357
364
  if (e) e = currentTransition(e);
358
365
  if (e && e === activeTransition) return;
359
- if (!e && activeTransition && activeTransition.se === clock) return;
366
+ if (!e && activeTransition && activeTransition.ce === clock) return;
360
367
  if (!activeTransition) {
361
368
  activeTransition = e ?? {
362
- se: clock,
363
- q: [],
364
- oe: [],
365
- Z: [],
366
- J: new Set(),
369
+ ce: clock,
370
+ J: [],
367
371
  ue: [],
368
- ie: { B: [[], []], X: [] },
369
- ce: false
372
+ ee: [],
373
+ te: new Set(),
374
+ le: [],
375
+ oe: { q: [[], []], Z: [] },
376
+ ae: false
370
377
  };
371
378
  } else if (e) {
372
379
  const t = activeTransition;
373
- t.ce = e;
374
- e.ue.push(...t.ue);
380
+ t.ae = e;
381
+ e.le.push(...t.le);
375
382
  for (const n of activeLanes) {
376
- if (n.M === t) n.M = e;
383
+ if (n.$ === t) n.$ = e;
377
384
  }
378
- e.Z.push(...t.Z);
379
- for (const n of t.J) {
380
- e.J.add(n);
385
+ e.ee.push(...t.ee);
386
+ for (const n of t.te) {
387
+ e.te.add(n);
381
388
  }
382
389
  transitions.delete(t);
383
390
  activeTransition = e;
384
391
  }
385
392
  transitions.add(activeTransition);
386
- activeTransition.se = clock;
387
- for (let e = 0; e < this.q.length; e++) {
388
- const t = this.q[e];
389
- t.M = activeTransition;
390
- activeTransition.q.push(t);
391
- }
392
- this.q = activeTransition.q;
393
- for (let e = 0; e < this.Z.length; e++) {
394
- const t = this.Z[e];
395
- t.M = activeTransition;
396
- activeTransition.Z.push(t);
397
- }
398
- this.Z = activeTransition.Z;
399
- for (const e of activeLanes) {
400
- if (!e.M) e.M = activeTransition;
393
+ activeTransition.ce = clock;
394
+ for (let e = 0; e < this.J.length; e++) {
395
+ const t = this.J[e];
396
+ t.$ = activeTransition;
397
+ activeTransition.J.push(t);
401
398
  }
402
- for (const e of this.J) activeTransition.J.add(e);
403
399
  this.J = activeTransition.J;
400
+ for (let e = 0; e < this.ee.length; e++) {
401
+ const t = this.ee[e];
402
+ t.$ = activeTransition;
403
+ activeTransition.ee.push(t);
404
+ }
405
+ this.ee = activeTransition.ee;
406
+ for (const e of activeLanes) {
407
+ if (!e.$) e.$ = activeTransition;
408
+ }
409
+ for (const e of this.te) activeTransition.te.add(e);
410
+ this.te = activeTransition.te;
404
411
  }
405
412
  }
406
413
  function insertSubs(e, t = false) {
407
- const n = e.H || currentOptimisticLane;
414
+ const n = e.W || currentOptimisticLane;
408
415
  for (let i = e.p; i !== null; i = i.h) {
409
416
  if (t && n) {
410
417
  i.A._ |= REACTIVE_OPTIMISTIC_DIRTY;
411
418
  assignOrMergeLane(i.A, n);
412
419
  } else if (t) {
413
420
  i.A._ |= REACTIVE_OPTIMISTIC_DIRTY;
414
- i.A.H = undefined;
421
+ i.A.W = undefined;
415
422
  }
416
423
  const e = i.A;
417
- if (e.le === EFFECT_TRACKED) {
418
- if (!e.ae) {
419
- e.ae = true;
420
- e.fe.enqueue(EFFECT_USER, e.Ee);
424
+ if (e.fe === EFFECT_TRACKED) {
425
+ if (!e.Ee) {
426
+ e.Ee = true;
427
+ e.Te.enqueue(EFFECT_USER, e.de);
421
428
  }
422
429
  continue;
423
430
  }
424
431
  const r = i.A._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
425
- if (r.N > i.A.u) r.N = i.A.u;
432
+ if (r.C > i.A.u) r.C = i.A.u;
426
433
  insertIntoHeap(i.A, r);
427
434
  }
428
435
  }
429
436
  function finalizePureQueue(e = null, t = false) {
430
437
  let n = !t;
431
438
  if (!t) checkBoundaryChildren(globalQueue);
432
- if (dirtyQueue.S >= dirtyQueue.N) runHeap(dirtyQueue, GlobalQueue.ee);
439
+ if (dirtyQueue.S >= dirtyQueue.C) runHeap(dirtyQueue, GlobalQueue.ne);
433
440
  if (n) {
434
- const t = globalQueue.q;
441
+ const t = globalQueue.J;
435
442
  for (let e = 0; e < t.length; e++) {
436
443
  const n = t[e];
437
- if (n.K !== NOT_PENDING) {
438
- n.Te = n.K;
439
- n.K = NOT_PENDING;
440
- if (n.le && n.le !== EFFECT_TRACKED) n.ae = true;
444
+ if (n.B !== NOT_PENDING) {
445
+ n.Re = n.B;
446
+ n.B = NOT_PENDING;
447
+ if (n.fe && n.fe !== EFFECT_TRACKED) n.Ee = true;
441
448
  }
442
- n.de &= ~STATUS_UNINITIALIZED;
443
- if (n.U) GlobalQueue.te(n, false, true);
449
+ n.Oe &= ~STATUS_UNINITIALIZED;
450
+ if (n.U) GlobalQueue.ie(n, false, true);
444
451
  }
445
452
  t.length = 0;
446
- const n = e ? e.Z : globalQueue.Z;
453
+ const n = e ? e.ee : globalQueue.ee;
447
454
  for (let e = 0; e < n.length; e++) {
448
455
  const t = n[e];
449
- const i = t.K;
450
- t.H = undefined;
451
- if (i !== NOT_PENDING && t.Te !== i) {
452
- t.Te = i;
456
+ const i = t.B;
457
+ t.W = undefined;
458
+ if (i !== NOT_PENDING && t.Re !== i) {
459
+ t.Re = i;
453
460
  insertSubs(t, true);
454
461
  }
455
- t.K = NOT_PENDING;
456
- t.M = null;
462
+ t.B = NOT_PENDING;
463
+ t.$ = null;
457
464
  }
458
465
  n.length = 0;
459
- const i = e ? e.J : globalQueue.J;
460
- if (GlobalQueue.ne && i.size) {
466
+ const i = e ? e.te : globalQueue.te;
467
+ if (GlobalQueue.re && i.size) {
461
468
  for (const e of i) {
462
- GlobalQueue.ne(e);
469
+ GlobalQueue.re(e);
463
470
  }
464
471
  i.clear();
465
472
  schedule();
466
473
  }
467
474
  for (const t of activeLanes) {
468
- const n = e ? t.M === e : !t.M;
475
+ const n = e ? t.$ === e : !t.$;
469
476
  if (!n) continue;
470
- if (!t.G) {
471
- if (t.W[0].length) runQueue(t.W[0], EFFECT_RENDER);
472
- if (t.W[1].length) runQueue(t.W[1], EFFECT_USER);
473
- }
474
- if (t.t.H === t) t.t.H = undefined;
475
- t.k.clear();
476
- t.W[0].length = 0;
477
- t.W[1].length = 0;
477
+ if (!t.F) {
478
+ if (t.M[0].length) runQueue(t.M[0], EFFECT_RENDER);
479
+ if (t.M[1].length) runQueue(t.M[1], EFFECT_USER);
480
+ }
481
+ if (t.t.W === t) t.t.W = undefined;
482
+ t.G.clear();
483
+ t.M[0].length = 0;
484
+ t.M[1].length = 0;
478
485
  activeLanes.delete(t);
479
486
  signalLanes.delete(t.t);
480
487
  }
481
488
  }
482
489
  }
483
490
  function checkBoundaryChildren(e) {
484
- for (const t of e.X) {
491
+ for (const t of e.Z) {
485
492
  t.checkSources?.();
486
493
  checkBoundaryChildren(t);
487
494
  }
488
495
  }
489
496
  function trackOptimisticStore(e) {
490
- globalQueue.J.add(e);
497
+ globalQueue.te.add(e);
491
498
  schedule();
492
499
  }
493
500
  function reassignPendingTransition(e) {
494
501
  for (let t = 0; t < e.length; t++) {
495
- e[t].M = activeTransition;
502
+ e[t].$ = activeTransition;
496
503
  }
497
504
  }
498
505
  const globalQueue = new GlobalQueue();
@@ -505,20 +512,21 @@ function runQueue(e, t) {
505
512
  for (let n = 0; n < e.length; n++) e[n](t);
506
513
  }
507
514
  function transitionComplete(e) {
508
- if (e.ce) return true;
509
- if (e.ue.length) return false;
515
+ if (e.ae) return true;
516
+ if (e.le.length) return false;
510
517
  let t = true;
511
- for (let n = 0; n < e.oe.length; n++) {
512
- if (e.oe[n].de & STATUS_PENDING) {
518
+ for (let n = 0; n < e.ue.length; n++) {
519
+ const i = e.ue[n];
520
+ if (i.Oe & STATUS_PENDING && i.se?.t === i) {
513
521
  t = false;
514
522
  break;
515
523
  }
516
524
  }
517
- t && (e.ce = true);
525
+ t && (e.ae = true);
518
526
  return t;
519
527
  }
520
528
  function currentTransition(e) {
521
- while (e.ce && typeof e.ce === "object") e = e.ce;
529
+ while (e.ae && typeof e.ae === "object") e = e.ae;
522
530
  return e;
523
531
  }
524
532
  function runInTransition(e, t) {
@@ -542,11 +550,11 @@ function action(e) {
542
550
  const r = e(...t);
543
551
  globalQueue.initTransition();
544
552
  let o = activeTransition;
545
- o.ue.push(r);
553
+ o.le.push(r);
546
554
  const done = (e, t) => {
547
555
  o = currentTransition(o);
548
- const s = o.ue.indexOf(r);
549
- if (s >= 0) o.ue.splice(s, 1);
556
+ const s = o.le.indexOf(r);
557
+ if (s >= 0) o.le.splice(s, 1);
550
558
  activeTransition = o;
551
559
  schedule();
552
560
  t ? i(t) : n(e);
@@ -574,8 +582,8 @@ function action(e) {
574
582
  step();
575
583
  });
576
584
  }
577
- GlobalQueue.ee = recompute;
578
- GlobalQueue.te = disposeChildren;
585
+ GlobalQueue.ne = recompute;
586
+ GlobalQueue.ie = disposeChildren;
579
587
  let tracking = false;
580
588
  let stale = false;
581
589
  let refreshing = false;
@@ -584,29 +592,29 @@ let foundPending = false;
584
592
  let pendingReadActive = false;
585
593
  let context = null;
586
594
  function recompute(e, t = false) {
587
- const n = e.le;
595
+ const n = e.fe;
588
596
  if (!t) {
589
- if (e.M && (!n || activeTransition) && activeTransition !== e.M)
590
- globalQueue.initTransition(e.M);
597
+ if (e.$ && (!n || activeTransition) && activeTransition !== e.$)
598
+ globalQueue.initTransition(e.$);
591
599
  deleteFromHeap(e, e._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
592
- if (e.M || n === EFFECT_TRACKED) disposeChildren(e);
600
+ if (e.$ || n === EFFECT_TRACKED) disposeChildren(e);
593
601
  else {
594
602
  markDisposal(e);
595
- e.Re = e.Oe;
596
603
  e.Se = e._e;
597
- e.Oe = null;
604
+ e.Ie = e.pe;
598
605
  e._e = null;
606
+ e.pe = null;
599
607
  }
600
608
  }
601
609
  const i = !!(e._ & REACTIVE_OPTIMISTIC_DIRTY);
602
610
  const r = hasActiveOverride(e);
603
- const o = !!(e.de & STATUS_PENDING);
611
+ const o = !!(e.Oe & STATUS_PENDING);
604
612
  const s = context;
605
613
  context = e;
606
- e.Ie = null;
614
+ e.he = null;
607
615
  e._ = REACTIVE_RECOMPUTING_DEPS;
608
- e.se = clock;
609
- let u = e.K === NOT_PENDING ? e.Te : e.K;
616
+ e.ce = clock;
617
+ let u = e.B === NOT_PENDING ? e.Re : e.B;
610
618
  let c = e.u;
611
619
  let l = tracking;
612
620
  let a = currentOptimisticLane;
@@ -619,13 +627,17 @@ function recompute(e, t = false) {
619
627
  u = handleAsync(e, e.U(u));
620
628
  clearStatus(e);
621
629
  const t = resolveLane(e);
622
- if (t) t.k.delete(e);
630
+ if (t) {
631
+ t.G.delete(e);
632
+ updatePendingSignal(t.t);
633
+ }
623
634
  } catch (t) {
624
635
  if (t instanceof NotReadyError && currentOptimisticLane) {
625
636
  const t = findLane(currentOptimisticLane);
626
637
  if (t.t !== e) {
627
- t.k.add(e);
628
- e.H = t;
638
+ t.G.add(e);
639
+ e.W = t;
640
+ updatePendingSignal(t.t);
629
641
  }
630
642
  }
631
643
  notifyStatus(
@@ -633,15 +645,15 @@ function recompute(e, t = false) {
633
645
  t instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR,
634
646
  t,
635
647
  undefined,
636
- t instanceof NotReadyError ? e.H : undefined
648
+ t instanceof NotReadyError ? e.W : undefined
637
649
  );
638
650
  } finally {
639
651
  tracking = l;
640
652
  e._ = REACTIVE_NONE;
641
653
  context = s;
642
654
  }
643
- if (!e.re) {
644
- const s = e.Ie;
655
+ if (!e.se) {
656
+ const s = e.he;
645
657
  let l = s !== null ? s.m : e.D;
646
658
  if (l !== null) {
647
659
  do {
@@ -650,22 +662,22 @@ function recompute(e, t = false) {
650
662
  if (s !== null) s.m = null;
651
663
  else e.D = null;
652
664
  }
653
- const a = r ? e.Te : e.K === NOT_PENDING ? e.Te : e.K;
654
- const f = !e.pe || !e.pe(a, u);
665
+ const a = r ? e.Re : e.B === NOT_PENDING ? e.Re : e.B;
666
+ const f = !e.Ae || !e.Ae(a, u);
655
667
  if (f) {
656
- const s = r ? e.Te : undefined;
657
- if (t || (n && activeTransition !== e.M) || i) e.Te = u;
658
- else e.K = u;
668
+ const s = r ? e.Re : undefined;
669
+ if (t || (n && activeTransition !== e.$) || i) e.Re = u;
670
+ else e.B = u;
659
671
  if (r && !i && o) {
660
- const t = e.$ || 0;
661
- const n = e.F || 0;
662
- if (t <= n) e.Te = u;
672
+ const t = e.K || 0;
673
+ const n = e.j || 0;
674
+ if (t <= n) e.Re = u;
663
675
  }
664
- if (!r || i || e.Te !== s) {
676
+ if (!r || i || e.Re !== s) {
665
677
  insertSubs(e, i || r);
666
678
  }
667
679
  } else if (r) {
668
- e.K = u;
680
+ e.B = u;
669
681
  } else if (e.u != c) {
670
682
  for (let t = e.p; t !== null; t = t.h) {
671
683
  insertIntoHeapHeight(t.A, t.A._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
@@ -673,49 +685,49 @@ function recompute(e, t = false) {
673
685
  }
674
686
  }
675
687
  setCurrentOptimisticLane(a);
676
- (!t || e.de & STATUS_PENDING) && !e.M && !(activeTransition && e.j) && globalQueue.q.push(e);
677
- e.M && n && activeTransition !== e.M && runInTransition(e.M, () => recompute(e));
688
+ (!t || e.Oe & STATUS_PENDING) && !e.$ && !(activeTransition && e.Y) && globalQueue.J.push(e);
689
+ e.$ && n && activeTransition !== e.$ && runInTransition(e.$, () => recompute(e));
678
690
  }
679
691
  function handleAsync(e, t, n) {
680
692
  const i = typeof t === "object" && t !== null;
681
693
  const r = i && untrack(() => t[Symbol.asyncIterator]);
682
694
  const o = !r && i && untrack(() => typeof t.then === "function");
683
695
  if (!o && !r) {
684
- e.he = null;
696
+ e.ge = null;
685
697
  return t;
686
698
  }
687
- e.he = t;
699
+ e.ge = t;
688
700
  let s;
689
701
  const handleError = n => {
690
- if (e.he !== t) return;
691
- globalQueue.initTransition(e.M);
702
+ if (e.ge !== t) return;
703
+ globalQueue.initTransition(e.$);
692
704
  notifyStatus(e, n instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, n);
693
- e.se = clock;
705
+ e.ce = clock;
694
706
  };
695
707
  const asyncWrite = (i, r) => {
696
- if (e.he !== t) return;
708
+ if (e.ge !== t) return;
697
709
  if (e._ & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
698
- globalQueue.initTransition(e.M);
710
+ globalQueue.initTransition(e.$);
699
711
  clearStatus(e);
700
712
  const o = resolveLane(e);
701
- if (o) o.k.delete(e);
713
+ if (o) o.G.delete(e);
702
714
  if (n) n(i);
703
- else if (e.j) {
704
- const t = e.K !== NOT_PENDING;
705
- if (e.U) e.K = i;
715
+ else if (e.Y) {
716
+ const t = e.B !== NOT_PENDING;
717
+ if (e.U) e.B = i;
706
718
  if (!t) {
707
- e.Te = i;
719
+ e.Re = i;
708
720
  insertSubs(e);
709
721
  }
710
- e.se = clock;
722
+ e.ce = clock;
711
723
  } else if (o) {
712
- const t = e.Te;
713
- const n = e.pe;
724
+ const t = e.Re;
725
+ const n = e.Ae;
714
726
  if (!n || !n(i, t)) {
715
- e.Te = i;
716
- e.se = clock;
717
- if (e.Ae) {
718
- setSignal(e.Ae, i);
727
+ e.Re = i;
728
+ e.ce = clock;
729
+ if (e.Ne) {
730
+ setSignal(e.Ne, i);
719
731
  }
720
732
  insertSubs(e, true);
721
733
  }
@@ -742,7 +754,7 @@ function handleAsync(e, t, n) {
742
754
  );
743
755
  i = false;
744
756
  if (!n) {
745
- globalQueue.initTransition(e.M);
757
+ globalQueue.initTransition(e.$);
746
758
  throw new NotReadyError(context);
747
759
  }
748
760
  }
@@ -774,27 +786,27 @@ function handleAsync(e, t, n) {
774
786
  };
775
787
  const r = iterate();
776
788
  if (!i && !r) {
777
- globalQueue.initTransition(e.M);
789
+ globalQueue.initTransition(e.$);
778
790
  throw new NotReadyError(context);
779
791
  }
780
792
  }
781
793
  return s;
782
794
  }
783
795
  function clearStatus(e) {
784
- e.de = e.de & STATUS_UNINITIALIZED;
785
- e.re = null;
796
+ e.Oe = e.Oe & STATUS_UNINITIALIZED;
797
+ e.se = null;
786
798
  updatePendingSignal(e);
787
- e.ge?.();
799
+ e.Pe?.();
788
800
  }
789
801
  function notifyStatus(e, t, n, i, r) {
790
802
  if (t === STATUS_ERROR && !(n instanceof StatusError) && !(n instanceof NotReadyError))
791
803
  n = new StatusError(e, n);
792
804
  const o = n instanceof NotReadyError && n.t === e;
793
- const s = t === STATUS_PENDING && e.j && !o;
805
+ const s = t === STATUS_PENDING && e.Y && !o;
794
806
  const u = s && hasActiveOverride(e);
795
807
  if (!i) {
796
- e.de = t | (t !== STATUS_ERROR ? e.de & STATUS_UNINITIALIZED : 0);
797
- e.re = n;
808
+ e.Oe = t | (t !== STATUS_ERROR ? e.Oe & STATUS_UNINITIALIZED : 0);
809
+ e.se = n;
798
810
  updatePendingSignal(e);
799
811
  }
800
812
  if (r && !i) {
@@ -802,32 +814,32 @@ function notifyStatus(e, t, n, i, r) {
802
814
  }
803
815
  if (u && activeTransition && n instanceof NotReadyError) {
804
816
  const e = n.t;
805
- if (!activeTransition.oe.includes(e)) {
806
- activeTransition.oe.push(e);
817
+ if (!activeTransition.ue.includes(e)) {
818
+ activeTransition.ue.push(e);
807
819
  }
808
820
  }
809
821
  const c = i || u;
810
822
  const l = i || s ? undefined : r;
811
- if (e.ge) {
823
+ if (e.Pe) {
812
824
  if (c) {
813
- e.ge(t, n);
825
+ e.Pe(t, n);
814
826
  } else {
815
- e.ge();
827
+ e.Pe();
816
828
  }
817
829
  return;
818
830
  }
819
831
  for (let i = e.p; i !== null; i = i.h) {
820
- i.A.se = clock;
821
- if (i.A.re !== n) {
822
- !i.A.M && globalQueue.q.push(i.A);
832
+ i.A.ce = clock;
833
+ if (i.A.se !== n) {
834
+ !i.A.$ && globalQueue.J.push(i.A);
823
835
  notifyStatus(i.A, t, n, c, l);
824
836
  }
825
837
  }
826
- for (let i = e.P; i !== null; i = i.C) {
838
+ for (let i = e.N; i !== null; i = i.P) {
827
839
  for (let e = i.p; e !== null; e = e.h) {
828
- e.A.se = clock;
829
- if (e.A.re !== n) {
830
- !e.A.M && globalQueue.q.push(e.A);
840
+ e.A.ce = clock;
841
+ if (e.A.se !== n) {
842
+ !e.A.$ && globalQueue.J.push(e.A);
831
843
  notifyStatus(e.A, t, n, c, l);
832
844
  }
833
845
  }
@@ -846,7 +858,7 @@ function updateIfNecessary(e) {
846
858
  }
847
859
  }
848
860
  }
849
- if (e._ & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY) || (e.re && e.se < clock)) {
861
+ if (e._ & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY) || (e.se && e.ce < clock)) {
850
862
  recompute(e);
851
863
  }
852
864
  e._ = REACTIVE_NONE;
@@ -855,15 +867,15 @@ function unlinkSubs(e) {
855
867
  const t = e.V;
856
868
  const n = e.m;
857
869
  const i = e.h;
858
- const r = e.Pe;
859
- if (i !== null) i.Pe = r;
860
- else t.Ce = r;
870
+ const r = e.Ce;
871
+ if (i !== null) i.Ce = r;
872
+ else t.ye = r;
861
873
  if (r !== null) r.h = i;
862
874
  else {
863
875
  t.p = i;
864
876
  if (i === null) {
865
- t.Ne?.();
866
- t.U && !t.ye && unobserved(t);
877
+ t.De?.();
878
+ t.U && !t.ve && unobserved(t);
867
879
  }
868
880
  }
869
881
  return n;
@@ -878,27 +890,27 @@ function unobserved(e) {
878
890
  disposeChildren(e, true);
879
891
  }
880
892
  function link(e, t) {
881
- const n = t.Ie;
893
+ const n = t.he;
882
894
  if (n !== null && n.V === e) return;
883
895
  let i = null;
884
896
  const r = t._ & REACTIVE_RECOMPUTING_DEPS;
885
897
  if (r) {
886
898
  i = n !== null ? n.m : t.D;
887
899
  if (i !== null && i.V === e) {
888
- t.Ie = i;
900
+ t.he = i;
889
901
  return;
890
902
  }
891
903
  }
892
- const o = e.Ce;
904
+ const o = e.ye;
893
905
  if (o !== null && o.A === t && (!r || isValidLink(o, t))) return;
894
- const s = (t.Ie = e.Ce = { V: e, A: t, m: i, Pe: o, h: null });
906
+ const s = (t.he = e.ye = { V: e, A: t, m: i, Ce: o, h: null });
895
907
  if (n !== null) n.m = s;
896
908
  else t.D = s;
897
909
  if (o !== null) o.h = s;
898
910
  else e.p = s;
899
911
  }
900
912
  function isValidLink(e, t) {
901
- const n = t.Ie;
913
+ const n = t.he;
902
914
  if (n !== null) {
903
915
  let i = t.D;
904
916
  do {
@@ -910,7 +922,7 @@ function isValidLink(e, t) {
910
922
  return false;
911
923
  }
912
924
  function markDisposal(e) {
913
- let t = e._e;
925
+ let t = e.pe;
914
926
  while (t) {
915
927
  t._ |= REACTIVE_ZOMBIE;
916
928
  if (t._ & REACTIVE_IN_HEAP) {
@@ -918,7 +930,7 @@ function markDisposal(e) {
918
930
  insertIntoHeap(t, zombieQueue);
919
931
  }
920
932
  markDisposal(t);
921
- t = t.De;
933
+ t = t.we;
922
934
  }
923
935
  }
924
936
  function dispose(e) {
@@ -927,15 +939,15 @@ function dispose(e) {
927
939
  t = unlinkSubs(t);
928
940
  } while (t !== null);
929
941
  e.D = null;
930
- e.Ie = null;
942
+ e.he = null;
931
943
  disposeChildren(e, true);
932
944
  }
933
945
  function disposeChildren(e, t = false, n) {
934
946
  if (e._ & REACTIVE_DISPOSED) return;
935
947
  if (t) e._ = REACTIVE_DISPOSED;
936
- let i = n ? e.Se : e._e;
948
+ let i = n ? e.Ie : e.pe;
937
949
  while (i) {
938
- const e = i.De;
950
+ const e = i.we;
939
951
  if (i.D) {
940
952
  const e = i;
941
953
  deleteFromHeap(e, e._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
@@ -944,21 +956,21 @@ function disposeChildren(e, t = false, n) {
944
956
  t = unlinkSubs(t);
945
957
  } while (t !== null);
946
958
  e.D = null;
947
- e.Ie = null;
959
+ e.he = null;
948
960
  }
949
961
  disposeChildren(i, true);
950
962
  i = e;
951
963
  }
952
964
  if (n) {
953
- e.Se = null;
965
+ e.Ie = null;
954
966
  } else {
955
- e._e = null;
956
- e.De = null;
967
+ e.pe = null;
968
+ e.we = null;
957
969
  }
958
970
  runDisposal(e, n);
959
971
  }
960
972
  function runDisposal(e, t) {
961
- let n = t ? e.Re : e.Oe;
973
+ let n = t ? e.Se : e._e;
962
974
  if (!n) return;
963
975
  if (Array.isArray(n)) {
964
976
  for (let e = 0; e < n.length; e++) {
@@ -968,10 +980,10 @@ function runDisposal(e, t) {
968
980
  } else {
969
981
  n.call(n);
970
982
  }
971
- t ? (e.Re = null) : (e.Oe = null);
983
+ t ? (e.Se = null) : (e._e = null);
972
984
  }
973
985
  function getNextChildId(e) {
974
- if (e.id != null) return formatId(e.id, e.ve++);
986
+ if (e.id != null) return formatId(e.id, e.be++);
975
987
  throw new Error("Cannot get child id from owner without an id");
976
988
  }
977
989
  function formatId(e, t) {
@@ -982,44 +994,44 @@ function formatId(e, t) {
982
994
  function computed(e, t, n) {
983
995
  const i = {
984
996
  id: n?.id ?? (context?.id != null ? getNextChildId(context) : undefined),
985
- pe: n?.equals != null ? n.equals : isEqual,
986
- we: !!n?.pureWrite,
987
- Ne: n?.unobserved,
988
- Oe: null,
989
- fe: context?.fe ?? globalQueue,
990
- be: context?.be ?? defaultContext,
991
- ve: 0,
997
+ Ae: n?.equals != null ? n.equals : isEqual,
998
+ me: !!n?.pureWrite,
999
+ De: n?.unobserved,
1000
+ _e: null,
1001
+ Te: context?.Te ?? globalQueue,
1002
+ Ve: context?.Ve ?? defaultContext,
1003
+ be: 0,
992
1004
  U: e,
993
- Te: t,
1005
+ Re: t,
994
1006
  u: 0,
995
- P: null,
1007
+ N: null,
996
1008
  O: undefined,
997
1009
  R: null,
998
1010
  D: null,
999
- Ie: null,
1011
+ he: null,
1000
1012
  p: null,
1001
- Ce: null,
1013
+ ye: null,
1002
1014
  o: context,
1003
- De: null,
1004
- _e: null,
1015
+ we: null,
1016
+ pe: null,
1005
1017
  _: REACTIVE_NONE,
1006
- de: STATUS_UNINITIALIZED,
1007
- se: clock,
1008
- K: NOT_PENDING,
1009
- Re: null,
1018
+ Oe: STATUS_UNINITIALIZED,
1019
+ ce: clock,
1020
+ B: NOT_PENDING,
1010
1021
  Se: null,
1011
- he: null,
1012
- M: null
1022
+ Ie: null,
1023
+ ge: null,
1024
+ $: null
1013
1025
  };
1014
1026
  i.R = i;
1015
1027
  const r = context?.i ? context.l : context;
1016
1028
  if (context) {
1017
- const e = context._e;
1029
+ const e = context.pe;
1018
1030
  if (e === null) {
1019
- context._e = i;
1031
+ context.pe = i;
1020
1032
  } else {
1021
- i.De = e;
1022
- context._e = i;
1033
+ i.we = e;
1034
+ context.pe = i;
1023
1035
  }
1024
1036
  }
1025
1037
  if (r) i.u = r.u + 1;
@@ -1028,69 +1040,84 @@ function computed(e, t, n) {
1028
1040
  }
1029
1041
  function signal(e, t, n = null) {
1030
1042
  const i = {
1031
- pe: t?.equals != null ? t.equals : isEqual,
1032
- we: !!t?.pureWrite,
1033
- Ne: t?.unobserved,
1034
- Te: e,
1043
+ Ae: t?.equals != null ? t.equals : isEqual,
1044
+ me: !!t?.pureWrite,
1045
+ De: t?.unobserved,
1046
+ Re: e,
1035
1047
  p: null,
1036
- Ce: null,
1037
- se: clock,
1048
+ ye: null,
1049
+ ce: clock,
1038
1050
  L: n,
1039
- C: n?.P || null,
1040
- K: NOT_PENDING
1051
+ P: n?.N || null,
1052
+ B: NOT_PENDING
1041
1053
  };
1042
- n && (n.P = i);
1054
+ n && (n.N = i);
1043
1055
  return i;
1044
1056
  }
1045
1057
  function optimisticSignal(e, t) {
1046
1058
  const n = signal(e, t);
1047
- n.j = true;
1059
+ n.Y = true;
1048
1060
  return n;
1049
1061
  }
1050
1062
  function optimisticComputed(e, t, n) {
1051
1063
  const i = computed(e, t, n);
1052
- i.j = true;
1064
+ i.Y = true;
1053
1065
  return i;
1054
1066
  }
1055
1067
  function getPendingSignal(e) {
1056
- if (!e.me) {
1057
- e.me = optimisticSignal(false, { pureWrite: true });
1058
- if (computePendingState(e)) setSignal(e.me, true);
1068
+ if (!e.Le) {
1069
+ e.Le = optimisticSignal(false, { pureWrite: true });
1070
+ if (e.k) {
1071
+ e.Le.k = e;
1072
+ }
1073
+ if (computePendingState(e)) setSignal(e.Le, true);
1059
1074
  }
1060
- return e.me;
1075
+ return e.Le;
1061
1076
  }
1062
1077
  function computePendingState(e) {
1063
1078
  const t = e;
1064
- if (e.K !== NOT_PENDING && !(t.de & STATUS_UNINITIALIZED)) return true;
1065
- return !!(t.de & STATUS_PENDING && !(t.de & STATUS_UNINITIALIZED));
1079
+ if (e.Y && e.B !== NOT_PENDING) {
1080
+ if (t.Oe & STATUS_PENDING && !(t.Oe & STATUS_UNINITIALIZED)) return true;
1081
+ if (e.k) {
1082
+ const t = e.W ? findLane(e.W) : null;
1083
+ return !!(t && t.G.size > 0);
1084
+ }
1085
+ return true;
1086
+ }
1087
+ if (e.B !== NOT_PENDING && !(t.Oe & STATUS_UNINITIALIZED)) return true;
1088
+ return !!(t.Oe & STATUS_PENDING && !(t.Oe & STATUS_UNINITIALIZED));
1066
1089
  }
1067
1090
  function getPendingValueComputed(e) {
1068
- if (!e.Ae) {
1091
+ if (!e.Ne) {
1069
1092
  const t = pendingReadActive;
1070
1093
  pendingReadActive = false;
1071
- const n = context;
1094
+ const n = pendingCheckActive;
1095
+ pendingCheckActive = false;
1096
+ const i = context;
1072
1097
  context = null;
1073
- e.Ae = optimisticComputed(() => read(e));
1074
- context = n;
1098
+ e.Ne = optimisticComputed(() => read(e));
1099
+ e.Ne.k = e;
1100
+ context = i;
1101
+ pendingCheckActive = n;
1075
1102
  pendingReadActive = t;
1076
1103
  }
1077
- return e.Ae;
1104
+ return e.Ne;
1078
1105
  }
1079
1106
  function updatePendingSignal(e) {
1080
- if (e.me) {
1107
+ if (e.Le) {
1081
1108
  const t = computePendingState(e);
1082
- const n = e.me;
1109
+ const n = e.Le;
1083
1110
  setSignal(n, t);
1084
- if (!t && n.H) {
1111
+ if (!t && n.W) {
1085
1112
  const t = resolveLane(e);
1086
- if (t && t.k.size > 0) {
1087
- const e = findLane(n.H);
1113
+ if (t && t.G.size > 0) {
1114
+ const e = findLane(n.W);
1088
1115
  if (e !== t) {
1089
1116
  mergeLanes(t, e);
1090
1117
  }
1091
1118
  }
1092
1119
  clearLaneEntry(n);
1093
- n.H = undefined;
1120
+ n.W = undefined;
1094
1121
  }
1095
1122
  }
1096
1123
  }
@@ -1107,6 +1134,22 @@ function untrack(e) {
1107
1134
  }
1108
1135
  }
1109
1136
  function read(e) {
1137
+ if (pendingReadActive) {
1138
+ const t = getPendingValueComputed(e);
1139
+ const n = pendingReadActive;
1140
+ pendingReadActive = false;
1141
+ const i = read(t);
1142
+ pendingReadActive = n;
1143
+ if (t.Oe & STATUS_PENDING) return e.Re;
1144
+ if (stale && currentOptimisticLane && t.W) {
1145
+ const n = findLane(t.W);
1146
+ const i = findLane(currentOptimisticLane);
1147
+ if (n !== i && n.G.size > 0) {
1148
+ return e.Re;
1149
+ }
1150
+ }
1151
+ return i;
1152
+ }
1110
1153
  if (pendingCheckActive) {
1111
1154
  const t = e.L || e;
1112
1155
  const n = getPendingSignal(t);
@@ -1116,16 +1159,7 @@ function read(e) {
1116
1159
  foundPending = true;
1117
1160
  }
1118
1161
  pendingCheckActive = i;
1119
- return e.Te;
1120
- }
1121
- if (pendingReadActive) {
1122
- const t = getPendingValueComputed(e);
1123
- const n = pendingReadActive;
1124
- pendingReadActive = false;
1125
- const i = read(t);
1126
- pendingReadActive = n;
1127
- if (t.de & STATUS_PENDING) return e.Te;
1128
- return i;
1162
+ return e.Re;
1129
1163
  }
1130
1164
  let t = context;
1131
1165
  if (t?.i) t = t.l;
@@ -1136,7 +1170,7 @@ function read(e) {
1136
1170
  const n = e.L || e;
1137
1171
  if (n.U) {
1138
1172
  const i = e._ & REACTIVE_ZOMBIE;
1139
- if (n.u >= (i ? zombieQueue.N : dirtyQueue.N)) {
1173
+ if (n.u >= (i ? zombieQueue.C : dirtyQueue.C)) {
1140
1174
  markNode(t);
1141
1175
  markHeap(i ? zombieQueue : dirtyQueue);
1142
1176
  updateIfNecessary(n);
@@ -1148,69 +1182,69 @@ function read(e) {
1148
1182
  }
1149
1183
  }
1150
1184
  const n = e.L || e;
1151
- if (t && n.de & STATUS_PENDING && !(stale && n.M && activeTransition !== n.M)) {
1185
+ if (t && n.Oe & STATUS_PENDING && !(stale && n.$ && activeTransition !== n.$)) {
1152
1186
  if (currentOptimisticLane) {
1153
- const i = n.H;
1187
+ const i = n.W;
1154
1188
  const r = findLane(currentOptimisticLane);
1155
1189
  if (i && findLane(i) === r && !hasActiveOverride(n)) {
1156
1190
  if (!tracking) link(e, t);
1157
- throw n.re;
1191
+ throw n.se;
1158
1192
  }
1159
1193
  } else {
1160
1194
  if (!tracking) link(e, t);
1161
- throw n.re;
1195
+ throw n.se;
1162
1196
  }
1163
1197
  }
1164
- if (e.U && e.de & STATUS_ERROR) {
1165
- if (e.se < clock) {
1198
+ if (e.U && e.Oe & STATUS_ERROR) {
1199
+ if (e.ce < clock) {
1166
1200
  recompute(e, true);
1167
1201
  return read(e);
1168
- } else throw e.re;
1202
+ } else throw e.se;
1169
1203
  }
1170
1204
  return !t ||
1171
1205
  currentOptimisticLane !== null ||
1172
- e.K === NOT_PENDING ||
1173
- (stale && e.M && activeTransition !== e.M)
1174
- ? e.Te
1175
- : e.K;
1206
+ e.B === NOT_PENDING ||
1207
+ (stale && e.$ && activeTransition !== e.$)
1208
+ ? e.Re
1209
+ : e.B;
1176
1210
  }
1177
1211
  function setSignal(e, t) {
1178
- if (e.M && activeTransition !== e.M) globalQueue.initTransition(e.M);
1179
- const n = e.j && !projectionWriteActive;
1180
- const i = n ? e.Te : e.K === NOT_PENDING ? e.Te : e.K;
1212
+ if (e.$ && activeTransition !== e.$) globalQueue.initTransition(e.$);
1213
+ const n = e.Y && !projectionWriteActive;
1214
+ const i = n ? e.Re : e.B === NOT_PENDING ? e.Re : e.B;
1181
1215
  if (typeof t === "function") t = t(i);
1182
- const r = !e.pe || !e.pe(i, t);
1216
+ const r = !e.Ae || !e.Ae(i, t);
1183
1217
  if (!r) {
1184
- if (n && e.K !== NOT_PENDING && e.U) {
1218
+ if (n && e.B !== NOT_PENDING && e.U) {
1185
1219
  insertSubs(e, true);
1186
1220
  schedule();
1187
1221
  }
1188
1222
  return t;
1189
1223
  }
1190
1224
  if (n) {
1191
- const n = globalQueue.Z.includes(e);
1192
- if (e.M && n) {
1193
- globalQueue.initTransition(e.M);
1225
+ const n = globalQueue.ee.includes(e);
1226
+ if (e.$ && n) {
1227
+ globalQueue.initTransition(e.$);
1194
1228
  }
1195
- if (e.K === NOT_PENDING) {
1196
- e.K = e.Te;
1229
+ if (e.B === NOT_PENDING) {
1230
+ e.B = e.Re;
1197
1231
  }
1198
1232
  if (!n) {
1199
- globalQueue.Z.push(e);
1233
+ globalQueue.ee.push(e);
1200
1234
  }
1201
- e.$ = (e.$ || 0) + 1;
1235
+ e.K = (e.K || 0) + 1;
1202
1236
  const i = getOrCreateLane(e);
1203
- e.H = i;
1204
- e.Te = t;
1237
+ e.W = i;
1238
+ e.Re = t;
1205
1239
  } else {
1206
- if (e.K === NOT_PENDING) globalQueue.q.push(e);
1207
- e.K = t;
1240
+ if (e.B === NOT_PENDING) globalQueue.J.push(e);
1241
+ e.B = t;
1208
1242
  }
1209
1243
  updatePendingSignal(e);
1210
- if (e.Ae) {
1211
- setSignal(e.Ae, t);
1244
+ if (e.Ne) {
1245
+ setSignal(e.Ne, t);
1212
1246
  }
1213
- e.se = clock;
1247
+ e.ce = clock;
1214
1248
  insertSubs(e, n);
1215
1249
  schedule();
1216
1250
  return t;
@@ -1225,9 +1259,9 @@ function getOwner() {
1225
1259
  }
1226
1260
  function onCleanup(e) {
1227
1261
  if (!context) return e;
1228
- if (!context.Oe) context.Oe = e;
1229
- else if (Array.isArray(context.Oe)) context.Oe.push(e);
1230
- else context.Oe = [context.Oe, e];
1262
+ if (!context._e) context._e = e;
1263
+ else if (Array.isArray(context._e)) context._e.push(e);
1264
+ else context._e = [context._e, e];
1231
1265
  return e;
1232
1266
  }
1233
1267
  function createOwner(e) {
@@ -1236,26 +1270,26 @@ function createOwner(e) {
1236
1270
  id: e?.id ?? (t?.id != null ? getNextChildId(t) : undefined),
1237
1271
  i: true,
1238
1272
  l: t?.i ? t.l : t,
1273
+ pe: null,
1274
+ we: null,
1239
1275
  _e: null,
1240
- De: null,
1241
- Oe: null,
1242
- fe: t?.fe ?? globalQueue,
1243
- be: t?.be || defaultContext,
1244
- ve: 0,
1245
- Re: null,
1276
+ Te: t?.Te ?? globalQueue,
1277
+ Ve: t?.Ve || defaultContext,
1278
+ be: 0,
1246
1279
  Se: null,
1280
+ Ie: null,
1247
1281
  o: t,
1248
1282
  dispose(e = true) {
1249
1283
  disposeChildren(n, e);
1250
1284
  }
1251
1285
  };
1252
1286
  if (t) {
1253
- const e = t._e;
1287
+ const e = t.pe;
1254
1288
  if (e === null) {
1255
- t._e = n;
1289
+ t.pe = n;
1256
1290
  } else {
1257
- n.De = e;
1258
- t._e = n;
1291
+ n.we = e;
1292
+ t.pe = n;
1259
1293
  }
1260
1294
  }
1261
1295
  return n;
@@ -1335,7 +1369,7 @@ function getContext(e, t = getOwner()) {
1335
1369
  if (!t) {
1336
1370
  throw new NoOwnerError();
1337
1371
  }
1338
- const n = hasContext(e, t) ? t.be[e.id] : e.defaultValue;
1372
+ const n = hasContext(e, t) ? t.Ve[e.id] : e.defaultValue;
1339
1373
  if (isUndefined(n)) {
1340
1374
  throw new ContextNotFoundError();
1341
1375
  }
@@ -1345,10 +1379,10 @@ function setContext(e, t, n = getOwner()) {
1345
1379
  if (!n) {
1346
1380
  throw new NoOwnerError();
1347
1381
  }
1348
- n.be = { ...n.be, [e.id]: isUndefined(t) ? e.defaultValue : t };
1382
+ n.Ve = { ...n.Ve, [e.id]: isUndefined(t) ? e.defaultValue : t };
1349
1383
  }
1350
1384
  function hasContext(e, t) {
1351
- return !isUndefined(t?.be[e.id]);
1385
+ return !isUndefined(t?.Ve[e.id]);
1352
1386
  }
1353
1387
  function isUndefined(e) {
1354
1388
  return typeof e === "undefined";
@@ -1358,80 +1392,80 @@ function effect(e, t, n, i, r) {
1358
1392
  const s = computed(r?.render ? t => staleValues(() => e(t)) : e, i, {
1359
1393
  ...r,
1360
1394
  equals: () => {
1361
- s.ae = !s.re;
1362
- if (o) s.fe.enqueue(s.le, runEffect.bind(s));
1395
+ s.Ee = !s.se;
1396
+ if (o) s.Te.enqueue(s.fe, runEffect.bind(s));
1363
1397
  return false;
1364
1398
  },
1365
1399
  lazy: true
1366
1400
  });
1367
- s.Ve = i;
1368
- s.Le = t;
1369
- s.Ue = n;
1370
- s.ke = undefined;
1371
- s.le = r?.render ? EFFECT_RENDER : EFFECT_USER;
1372
- s.ge = (e, t) => {
1373
- const n = e !== undefined ? e : s.de;
1374
- const i = t !== undefined ? t : s.re;
1401
+ s.Ue = i;
1402
+ s.ke = t;
1403
+ s.We = n;
1404
+ s.Qe = undefined;
1405
+ s.fe = r?.render ? EFFECT_RENDER : EFFECT_USER;
1406
+ s.Pe = (e, t) => {
1407
+ const n = e !== undefined ? e : s.Oe;
1408
+ const i = t !== undefined ? t : s.se;
1375
1409
  if (n & STATUS_ERROR) {
1376
1410
  let e = i;
1377
- s.fe.notify(s, STATUS_PENDING, 0);
1378
- if (s.le === EFFECT_USER) {
1411
+ s.Te.notify(s, STATUS_PENDING, 0);
1412
+ if (s.fe === EFFECT_USER) {
1379
1413
  try {
1380
- return s.Ue
1381
- ? s.Ue(e, () => {
1382
- s.ke?.();
1383
- s.ke = undefined;
1414
+ return s.We
1415
+ ? s.We(e, () => {
1416
+ s.Qe?.();
1417
+ s.Qe = undefined;
1384
1418
  })
1385
1419
  : console.error(e);
1386
1420
  } catch (t) {
1387
1421
  e = t;
1388
1422
  }
1389
1423
  }
1390
- if (!s.fe.notify(s, STATUS_ERROR, STATUS_ERROR)) throw e;
1391
- } else if (s.le === EFFECT_RENDER) s.fe.notify(s, STATUS_PENDING | STATUS_ERROR, n, i);
1424
+ if (!s.Te.notify(s, STATUS_ERROR, STATUS_ERROR)) throw e;
1425
+ } else if (s.fe === EFFECT_RENDER) s.Te.notify(s, STATUS_PENDING | STATUS_ERROR, n, i);
1392
1426
  };
1393
1427
  recompute(s, true);
1394
- !r?.defer && (s.le === EFFECT_USER ? s.fe.enqueue(s.le, runEffect.bind(s)) : runEffect.call(s));
1428
+ !r?.defer && (s.fe === EFFECT_USER ? s.Te.enqueue(s.fe, runEffect.bind(s)) : runEffect.call(s));
1395
1429
  o = true;
1396
- onCleanup(() => s.ke?.());
1430
+ onCleanup(() => s.Qe?.());
1397
1431
  }
1398
1432
  function runEffect() {
1399
- if (!this.ae || this._ & REACTIVE_DISPOSED) return;
1400
- this.ke?.();
1401
- this.ke = undefined;
1433
+ if (!this.Ee || this._ & REACTIVE_DISPOSED) return;
1434
+ this.Qe?.();
1435
+ this.Qe = undefined;
1402
1436
  try {
1403
- this.ke = this.Le(this.Te, this.Ve);
1437
+ this.Qe = this.ke(this.Re, this.Ue);
1404
1438
  } catch (e) {
1405
- if (!this.fe.notify(this, STATUS_ERROR, STATUS_ERROR)) throw e;
1439
+ if (!this.Te.notify(this, STATUS_ERROR, STATUS_ERROR)) throw e;
1406
1440
  } finally {
1407
- this.Ve = this.Te;
1408
- this.ae = false;
1441
+ this.Ue = this.Re;
1442
+ this.Ee = false;
1409
1443
  }
1410
1444
  }
1411
1445
  function trackedEffect(e, t) {
1412
1446
  const run = () => {
1413
- if (!n.ae || n._ & REACTIVE_DISPOSED) return;
1414
- n.ae = false;
1447
+ if (!n.Ee || n._ & REACTIVE_DISPOSED) return;
1448
+ n.Ee = false;
1415
1449
  recompute(n);
1416
1450
  };
1417
1451
  const n = computed(
1418
1452
  () => {
1419
1453
  try {
1420
- n.ke?.();
1421
- n.ke = undefined;
1422
- n.ke = staleValues(e) || undefined;
1454
+ n.Qe?.();
1455
+ n.Qe = undefined;
1456
+ n.Qe = staleValues(e) || undefined;
1423
1457
  } finally {
1424
1458
  }
1425
1459
  },
1426
1460
  undefined,
1427
1461
  { ...t, lazy: true, pureWrite: true }
1428
1462
  );
1429
- n.ke = undefined;
1430
- n.ae = true;
1431
- n.le = EFFECT_TRACKED;
1432
- n.Ee = run;
1433
- n.fe.enqueue(EFFECT_USER, run);
1434
- onCleanup(() => n.ke?.());
1463
+ n.Qe = undefined;
1464
+ n.Ee = true;
1465
+ n.fe = EFFECT_TRACKED;
1466
+ n.de = run;
1467
+ n.Te.enqueue(EFFECT_USER, run);
1468
+ onCleanup(() => n.Qe?.());
1435
1469
  }
1436
1470
  function createSignal(e, t, n) {
1437
1471
  if (typeof e === "function") {
@@ -1665,7 +1699,7 @@ function createProjectionInternal(e, t = {}, n) {
1665
1699
  r !== i && r !== undefined && reconcile(r, n?.key || "id", n?.all)(o);
1666
1700
  });
1667
1701
  });
1668
- i.ye = true;
1702
+ i.ve = true;
1669
1703
  return { store: o, node: i };
1670
1704
  }
1671
1705
  function createProjection(e, t = {}, n) {
@@ -1765,7 +1799,7 @@ function getNode(e, t, n, i, r = isEqual, o) {
1765
1799
  },
1766
1800
  i
1767
1801
  );
1768
- if (o) s.j = true;
1802
+ if (o) s.Y = true;
1769
1803
  return (e[t] = s);
1770
1804
  }
1771
1805
  function trackSelf(e, t = $TRACK) {
@@ -1818,7 +1852,7 @@ const storeTraps = {
1818
1852
  if (e && e.get) return e.get.call(n);
1819
1853
  }
1820
1854
  if (writeOnly(n)) {
1821
- let n = r && (s || !u) ? (r.K !== NOT_PENDING ? (r.j ? r.Te : r.K) : r.Te) : c[t];
1855
+ let n = r && (s || !u) ? (r.B !== NOT_PENDING ? (r.Y ? r.Re : r.B) : r.Re) : c[t];
1822
1856
  n === $DELETED && (n = undefined);
1823
1857
  if (!isWrappable(n)) return n;
1824
1858
  const i = wrap(n, e);
@@ -1867,8 +1901,8 @@ const storeTraps = {
1867
1901
  if (writeOnly(i)) {
1868
1902
  if (e[STORE_OPTIMISTIC]) {
1869
1903
  const t = e[STORE_FIREWALL];
1870
- if (t?.M) {
1871
- globalQueue.initTransition(t.M);
1904
+ if (t?.$) {
1905
+ globalQueue.initTransition(t.$);
1872
1906
  }
1873
1907
  }
1874
1908
  untrack(() => {
@@ -2057,7 +2091,7 @@ function deep(e) {
2057
2091
  return e[$DEEP];
2058
2092
  }
2059
2093
  function createOptimisticStore(e, t, n) {
2060
- GlobalQueue.ne ||= clearOptimisticStore;
2094
+ GlobalQueue.re ||= clearOptimisticStore;
2061
2095
  const i = typeof e === "function";
2062
2096
  const r = (i ? t : e) ?? {};
2063
2097
  const o = i ? e : undefined;
@@ -2074,7 +2108,7 @@ function clearOptimisticStore(e) {
2074
2108
  if (i) {
2075
2109
  for (const e of Reflect.ownKeys(n)) {
2076
2110
  if (i[e]) {
2077
- i[e].H = undefined;
2111
+ i[e].W = undefined;
2078
2112
  const n =
2079
2113
  t[STORE_OVERRIDE] && e in t[STORE_OVERRIDE] ? t[STORE_OVERRIDE][e] : t[STORE_VALUE][e];
2080
2114
  const r = n === $DELETED ? undefined : n;
@@ -2082,7 +2116,7 @@ function clearOptimisticStore(e) {
2082
2116
  }
2083
2117
  }
2084
2118
  if (i[$TRACK]) {
2085
- i[$TRACK].H = undefined;
2119
+ i[$TRACK].W = undefined;
2086
2120
  setSignal(i[$TRACK], undefined);
2087
2121
  }
2088
2122
  }
@@ -2133,7 +2167,7 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
2133
2167
  setProjectionWriteActive(false);
2134
2168
  }
2135
2169
  });
2136
- i.ye = true;
2170
+ i.ve = true;
2137
2171
  }
2138
2172
  return { store: o, node: i };
2139
2173
  }
@@ -2317,68 +2351,68 @@ function mapArray(e, t, n) {
2317
2351
  const i = typeof n?.keyed === "function" ? n.keyed : undefined;
2318
2352
  return createMemo(
2319
2353
  updateKeyedMap.bind({
2320
- We: createOwner(),
2321
- Qe: 0,
2322
- xe: e,
2323
- Ge: [],
2324
- Me: t,
2354
+ xe: createOwner(),
2355
+ Ge: 0,
2356
+ Me: e,
2325
2357
  Fe: [],
2326
- $e: [],
2327
- He: i,
2328
- je: i || n?.keyed === false ? [] : undefined,
2329
- Ke: t.length > 1 ? [] : undefined,
2330
- Ye: n?.fallback
2358
+ $e: t,
2359
+ He: [],
2360
+ je: [],
2361
+ Ke: i,
2362
+ Ye: i || n?.keyed === false ? [] : undefined,
2363
+ Be: t.length > 1 ? [] : undefined,
2364
+ Xe: n?.fallback
2331
2365
  })
2332
2366
  );
2333
2367
  }
2334
2368
  const pureOptions = { pureWrite: true };
2335
2369
  function updateKeyedMap() {
2336
- const e = this.xe() || [],
2370
+ const e = this.Me() || [],
2337
2371
  t = e.length;
2338
2372
  e[$TRACK];
2339
- runWithOwner(this.We, () => {
2373
+ runWithOwner(this.xe, () => {
2340
2374
  let n,
2341
2375
  i,
2342
- r = this.je
2376
+ r = this.Ye
2343
2377
  ? () => {
2344
- this.je[i] = signal(e[i], pureOptions);
2345
- this.Ke && (this.Ke[i] = signal(i, pureOptions));
2346
- return this.Me(
2347
- read.bind(null, this.je[i]),
2348
- this.Ke ? read.bind(null, this.Ke[i]) : undefined
2378
+ this.Ye[i] = signal(e[i], pureOptions);
2379
+ this.Be && (this.Be[i] = signal(i, pureOptions));
2380
+ return this.$e(
2381
+ read.bind(null, this.Ye[i]),
2382
+ this.Be ? read.bind(null, this.Be[i]) : undefined
2349
2383
  );
2350
2384
  }
2351
- : this.Ke
2385
+ : this.Be
2352
2386
  ? () => {
2353
2387
  const t = e[i];
2354
- this.Ke[i] = signal(i, pureOptions);
2355
- return this.Me(() => t, read.bind(null, this.Ke[i]));
2388
+ this.Be[i] = signal(i, pureOptions);
2389
+ return this.$e(() => t, read.bind(null, this.Be[i]));
2356
2390
  }
2357
2391
  : () => {
2358
2392
  const t = e[i];
2359
- return this.Me(() => t);
2393
+ return this.$e(() => t);
2360
2394
  };
2361
2395
  if (t === 0) {
2362
- if (this.Qe !== 0) {
2363
- this.We.dispose(false);
2364
- this.$e = [];
2365
- this.Ge = [];
2396
+ if (this.Ge !== 0) {
2397
+ this.xe.dispose(false);
2398
+ this.je = [];
2366
2399
  this.Fe = [];
2367
- this.Qe = 0;
2368
- this.je && (this.je = []);
2369
- this.Ke && (this.Ke = []);
2400
+ this.He = [];
2401
+ this.Ge = 0;
2402
+ this.Ye && (this.Ye = []);
2403
+ this.Be && (this.Be = []);
2370
2404
  }
2371
- if (this.Ye && !this.Fe[0]) {
2372
- this.Fe[0] = runWithOwner((this.$e[0] = createOwner()), this.Ye);
2405
+ if (this.Xe && !this.He[0]) {
2406
+ this.He[0] = runWithOwner((this.je[0] = createOwner()), this.Xe);
2373
2407
  }
2374
- } else if (this.Qe === 0) {
2375
- if (this.$e[0]) this.$e[0].dispose();
2376
- this.Fe = new Array(t);
2408
+ } else if (this.Ge === 0) {
2409
+ if (this.je[0]) this.je[0].dispose();
2410
+ this.He = new Array(t);
2377
2411
  for (i = 0; i < t; i++) {
2378
- this.Ge[i] = e[i];
2379
- this.Fe[i] = runWithOwner((this.$e[i] = createOwner()), r);
2412
+ this.Fe[i] = e[i];
2413
+ this.He[i] = runWithOwner((this.je[i] = createOwner()), r);
2380
2414
  }
2381
- this.Qe = t;
2415
+ this.Ge = t;
2382
2416
  } else {
2383
2417
  let o,
2384
2418
  s,
@@ -2389,217 +2423,217 @@ function updateKeyedMap() {
2389
2423
  f,
2390
2424
  E = new Array(t),
2391
2425
  T = new Array(t),
2392
- d = this.je ? new Array(t) : undefined,
2393
- R = this.Ke ? new Array(t) : undefined;
2426
+ d = this.Ye ? new Array(t) : undefined,
2427
+ R = this.Be ? new Array(t) : undefined;
2394
2428
  for (
2395
- o = 0, s = Math.min(this.Qe, t);
2396
- o < s && (this.Ge[o] === e[o] || (this.je && compare(this.He, this.Ge[o], e[o])));
2429
+ o = 0, s = Math.min(this.Ge, t);
2430
+ o < s && (this.Fe[o] === e[o] || (this.Ye && compare(this.Ke, this.Fe[o], e[o])));
2397
2431
  o++
2398
2432
  ) {
2399
- if (this.je) setSignal(this.je[o], e[o]);
2433
+ if (this.Ye) setSignal(this.Ye[o], e[o]);
2400
2434
  }
2401
2435
  for (
2402
- s = this.Qe - 1, u = t - 1;
2436
+ s = this.Ge - 1, u = t - 1;
2403
2437
  s >= o &&
2404
2438
  u >= o &&
2405
- (this.Ge[s] === e[u] || (this.je && compare(this.He, this.Ge[s], e[u])));
2439
+ (this.Fe[s] === e[u] || (this.Ye && compare(this.Ke, this.Fe[s], e[u])));
2406
2440
  s--, u--
2407
2441
  ) {
2408
- E[u] = this.Fe[s];
2409
- T[u] = this.$e[s];
2410
- d && (d[u] = this.je[s]);
2411
- R && (R[u] = this.Ke[s]);
2442
+ E[u] = this.He[s];
2443
+ T[u] = this.je[s];
2444
+ d && (d[u] = this.Ye[s]);
2445
+ R && (R[u] = this.Be[s]);
2412
2446
  }
2413
2447
  a = new Map();
2414
2448
  f = new Array(u + 1);
2415
2449
  for (i = u; i >= o; i--) {
2416
2450
  c = e[i];
2417
- l = this.He ? this.He(c) : c;
2451
+ l = this.Ke ? this.Ke(c) : c;
2418
2452
  n = a.get(l);
2419
2453
  f[i] = n === undefined ? -1 : n;
2420
2454
  a.set(l, i);
2421
2455
  }
2422
2456
  for (n = o; n <= s; n++) {
2423
- c = this.Ge[n];
2424
- l = this.He ? this.He(c) : c;
2457
+ c = this.Fe[n];
2458
+ l = this.Ke ? this.Ke(c) : c;
2425
2459
  i = a.get(l);
2426
2460
  if (i !== undefined && i !== -1) {
2427
- E[i] = this.Fe[n];
2428
- T[i] = this.$e[n];
2429
- d && (d[i] = this.je[n]);
2430
- R && (R[i] = this.Ke[n]);
2461
+ E[i] = this.He[n];
2462
+ T[i] = this.je[n];
2463
+ d && (d[i] = this.Ye[n]);
2464
+ R && (R[i] = this.Be[n]);
2431
2465
  i = f[i];
2432
2466
  a.set(l, i);
2433
- } else this.$e[n].dispose();
2467
+ } else this.je[n].dispose();
2434
2468
  }
2435
2469
  for (i = o; i < t; i++) {
2436
2470
  if (i in E) {
2437
- this.Fe[i] = E[i];
2438
- this.$e[i] = T[i];
2471
+ this.He[i] = E[i];
2472
+ this.je[i] = T[i];
2439
2473
  if (d) {
2440
- this.je[i] = d[i];
2441
- setSignal(this.je[i], e[i]);
2474
+ this.Ye[i] = d[i];
2475
+ setSignal(this.Ye[i], e[i]);
2442
2476
  }
2443
2477
  if (R) {
2444
- this.Ke[i] = R[i];
2445
- setSignal(this.Ke[i], i);
2478
+ this.Be[i] = R[i];
2479
+ setSignal(this.Be[i], i);
2446
2480
  }
2447
2481
  } else {
2448
- this.Fe[i] = runWithOwner((this.$e[i] = createOwner()), r);
2482
+ this.He[i] = runWithOwner((this.je[i] = createOwner()), r);
2449
2483
  }
2450
2484
  }
2451
- this.Fe = this.Fe.slice(0, (this.Qe = t));
2452
- this.Ge = e.slice(0);
2485
+ this.He = this.He.slice(0, (this.Ge = t));
2486
+ this.Fe = e.slice(0);
2453
2487
  }
2454
2488
  });
2455
- return this.Fe;
2489
+ return this.He;
2456
2490
  }
2457
2491
  function repeat(e, t, n) {
2458
2492
  return updateRepeat.bind({
2459
- We: createOwner(),
2460
- Qe: 0,
2461
- Be: 0,
2462
- Xe: e,
2463
- Me: t,
2464
- $e: [],
2465
- Fe: [],
2466
- qe: n?.from,
2467
- Ye: n?.fallback
2493
+ xe: createOwner(),
2494
+ Ge: 0,
2495
+ qe: 0,
2496
+ ze: e,
2497
+ $e: t,
2498
+ je: [],
2499
+ He: [],
2500
+ Ze: n?.from,
2501
+ Xe: n?.fallback
2468
2502
  });
2469
2503
  }
2470
2504
  function updateRepeat() {
2471
- const e = this.Xe();
2472
- const t = this.qe?.() || 0;
2473
- runWithOwner(this.We, () => {
2505
+ const e = this.ze();
2506
+ const t = this.Ze?.() || 0;
2507
+ runWithOwner(this.xe, () => {
2474
2508
  if (e === 0) {
2475
- if (this.Qe !== 0) {
2476
- this.We.dispose(false);
2477
- this.$e = [];
2478
- this.Fe = [];
2479
- this.Qe = 0;
2509
+ if (this.Ge !== 0) {
2510
+ this.xe.dispose(false);
2511
+ this.je = [];
2512
+ this.He = [];
2513
+ this.Ge = 0;
2480
2514
  }
2481
- if (this.Ye && !this.Fe[0]) {
2482
- this.Fe[0] = runWithOwner((this.$e[0] = createOwner()), this.Ye);
2515
+ if (this.Xe && !this.He[0]) {
2516
+ this.He[0] = runWithOwner((this.je[0] = createOwner()), this.Xe);
2483
2517
  }
2484
2518
  return;
2485
2519
  }
2486
2520
  const n = t + e;
2487
- const i = this.Be + this.Qe;
2488
- if (this.Qe === 0 && this.$e[0]) this.$e[0].dispose();
2489
- for (let e = n; e < i; e++) this.$e[e - this.Be].dispose();
2490
- if (this.Be < t) {
2491
- let e = this.Be;
2492
- while (e < t && e < this.Qe) this.$e[e++].dispose();
2493
- this.$e.splice(0, t - this.Be);
2494
- this.Fe.splice(0, t - this.Be);
2495
- } else if (this.Be > t) {
2496
- let n = i - this.Be - 1;
2497
- let r = this.Be - t;
2498
- this.$e.length = this.Fe.length = e;
2521
+ const i = this.qe + this.Ge;
2522
+ if (this.Ge === 0 && this.je[0]) this.je[0].dispose();
2523
+ for (let e = n; e < i; e++) this.je[e - this.qe].dispose();
2524
+ if (this.qe < t) {
2525
+ let e = this.qe;
2526
+ while (e < t && e < this.Ge) this.je[e++].dispose();
2527
+ this.je.splice(0, t - this.qe);
2528
+ this.He.splice(0, t - this.qe);
2529
+ } else if (this.qe > t) {
2530
+ let n = i - this.qe - 1;
2531
+ let r = this.qe - t;
2532
+ this.je.length = this.He.length = e;
2499
2533
  while (n >= r) {
2500
- this.$e[n] = this.$e[n - r];
2501
- this.Fe[n] = this.Fe[n - r];
2534
+ this.je[n] = this.je[n - r];
2535
+ this.He[n] = this.He[n - r];
2502
2536
  n--;
2503
2537
  }
2504
2538
  for (let e = 0; e < r; e++) {
2505
- this.Fe[e] = runWithOwner((this.$e[e] = createOwner()), () => this.Me(e + t));
2539
+ this.He[e] = runWithOwner((this.je[e] = createOwner()), () => this.$e(e + t));
2506
2540
  }
2507
2541
  }
2508
2542
  for (let e = i; e < n; e++) {
2509
- this.Fe[e - t] = runWithOwner((this.$e[e - t] = createOwner()), () => this.Me(e));
2543
+ this.He[e - t] = runWithOwner((this.je[e - t] = createOwner()), () => this.$e(e));
2510
2544
  }
2511
- this.Fe = this.Fe.slice(0, e);
2512
- this.Be = t;
2513
- this.Qe = e;
2545
+ this.He = this.He.slice(0, e);
2546
+ this.qe = t;
2547
+ this.Ge = e;
2514
2548
  });
2515
- return this.Fe;
2549
+ return this.He;
2516
2550
  }
2517
2551
  function compare(e, t, n) {
2518
2552
  return e ? e(t) === e(n) : true;
2519
2553
  }
2520
2554
  function boundaryComputed(e, t) {
2521
2555
  const n = computed(e, undefined, { lazy: true });
2522
- n.ge = (e, t) => {
2523
- const i = e !== undefined ? e : n.de;
2524
- const r = t !== undefined ? t : n.re;
2525
- n.de &= ~n.ze;
2526
- n.fe.notify(n, n.ze, i, r);
2556
+ n.Pe = (e, t) => {
2557
+ const i = e !== undefined ? e : n.Oe;
2558
+ const r = t !== undefined ? t : n.se;
2559
+ n.Oe &= ~n.Je;
2560
+ n.Te.notify(n, n.Je, i, r);
2527
2561
  };
2528
- n.ze = t;
2529
- n.ye = true;
2562
+ n.Je = t;
2563
+ n.ve = true;
2530
2564
  recompute(n, true);
2531
2565
  return n;
2532
2566
  }
2533
2567
  function createBoundChildren(e, t, n, i) {
2534
- const r = e.fe;
2535
- r.addChild((e.fe = n));
2536
- onCleanup(() => r.removeChild(e.fe));
2568
+ const r = e.Te;
2569
+ r.addChild((e.Te = n));
2570
+ onCleanup(() => r.removeChild(e.Te));
2537
2571
  return runWithOwner(e, () => {
2538
2572
  const e = computed(t);
2539
2573
  return boundaryComputed(() => staleValues(() => flatten(read(e))), i);
2540
2574
  });
2541
2575
  }
2542
2576
  class ConditionalQueue extends Queue {
2543
- Ze;
2544
- Je = new Set();
2545
- q = new Set();
2577
+ et;
2578
+ tt = new Set();
2579
+ J = new Set();
2546
2580
  constructor(e) {
2547
2581
  super();
2548
- this.Ze = e;
2582
+ this.et = e;
2549
2583
  }
2550
2584
  run(e) {
2551
- if (!e || read(this.Ze)) return;
2585
+ if (!e || read(this.et)) return;
2552
2586
  return super.run(e);
2553
2587
  }
2554
2588
  notify(e, t, n, i) {
2555
- if (read(this.Ze)) {
2589
+ if (read(this.et)) {
2556
2590
  if (t & STATUS_PENDING) {
2557
2591
  if (n & STATUS_PENDING) {
2558
- this.q.add(e);
2592
+ this.J.add(e);
2559
2593
  t &= ~STATUS_PENDING;
2560
- } else if (this.q.delete(e)) t &= ~STATUS_PENDING;
2594
+ } else if (this.J.delete(e)) t &= ~STATUS_PENDING;
2561
2595
  }
2562
2596
  if (t & STATUS_ERROR) {
2563
2597
  if (n & STATUS_ERROR) {
2564
- this.Je.add(e);
2598
+ this.tt.add(e);
2565
2599
  t &= ~STATUS_ERROR;
2566
- } else if (this.Je.delete(e)) t &= ~STATUS_ERROR;
2600
+ } else if (this.tt.delete(e)) t &= ~STATUS_ERROR;
2567
2601
  }
2568
2602
  }
2569
- return t ? super.notify(e, t, n, i ?? e.re) : true;
2603
+ return t ? super.notify(e, t, n, i ?? e.se) : true;
2570
2604
  }
2571
2605
  }
2572
2606
  class CollectionQueue extends Queue {
2573
- et;
2574
- tt = new Set();
2575
- Ze = signal(false, { pureWrite: true });
2576
- nt = false;
2607
+ nt;
2608
+ it = new Set();
2609
+ et = signal(false, { pureWrite: true });
2610
+ rt = false;
2577
2611
  constructor(e) {
2578
2612
  super();
2579
- this.et = e;
2613
+ this.nt = e;
2580
2614
  }
2581
2615
  run(e) {
2582
- if (!e || read(this.Ze)) return;
2616
+ if (!e || read(this.et)) return;
2583
2617
  return super.run(e);
2584
2618
  }
2585
2619
  notify(e, t, n, i) {
2586
- if (!(t & this.et) || (this.et & STATUS_PENDING && this.nt)) return super.notify(e, t, n, i);
2587
- if (n & this.et) {
2588
- const t = i?.t || e.re?.t;
2620
+ if (!(t & this.nt) || (this.nt & STATUS_PENDING && this.rt)) return super.notify(e, t, n, i);
2621
+ if (n & this.nt) {
2622
+ const t = i?.t || e.se?.t;
2589
2623
  if (t) {
2590
- const e = this.tt.size === 0;
2591
- this.tt.add(t);
2592
- if (e) setSignal(this.Ze, true);
2624
+ const e = this.it.size === 0;
2625
+ this.it.add(t);
2626
+ if (e) setSignal(this.et, true);
2593
2627
  }
2594
2628
  }
2595
- t &= ~this.et;
2629
+ t &= ~this.nt;
2596
2630
  return t ? super.notify(e, t, n, i) : true;
2597
2631
  }
2598
2632
  checkSources() {
2599
- for (const e of this.tt) {
2600
- if (!(e.de & this.et)) this.tt.delete(e);
2633
+ for (const e of this.it) {
2634
+ if (!(e.Oe & this.nt)) this.it.delete(e);
2601
2635
  }
2602
- if (!this.tt.size) setSignal(this.Ze, false);
2636
+ if (!this.it.size) setSignal(this.et, false);
2603
2637
  }
2604
2638
  }
2605
2639
  var BoundaryMode;
@@ -2612,26 +2646,26 @@ function createBoundary(e, t) {
2612
2646
  const i = new ConditionalQueue(computed(() => t() === BoundaryMode.HIDDEN));
2613
2647
  const r = createBoundChildren(n, e, i, 0);
2614
2648
  computed(() => {
2615
- const e = read(i.Ze);
2616
- r.ze = e ? STATUS_ERROR | STATUS_PENDING : 0;
2649
+ const e = read(i.et);
2650
+ r.Je = e ? STATUS_ERROR | STATUS_PENDING : 0;
2617
2651
  if (!e) {
2618
- i.q.forEach(e => i.notify(e, STATUS_PENDING, STATUS_PENDING, e.re));
2619
- i.Je.forEach(e => i.notify(e, STATUS_ERROR, STATUS_ERROR, e.re));
2620
- i.q.clear();
2621
- i.Je.clear();
2652
+ i.J.forEach(e => i.notify(e, STATUS_PENDING, STATUS_PENDING, e.se));
2653
+ i.tt.forEach(e => i.notify(e, STATUS_ERROR, STATUS_ERROR, e.se));
2654
+ i.J.clear();
2655
+ i.tt.clear();
2622
2656
  }
2623
2657
  });
2624
- return () => (read(i.Ze) ? undefined : read(r));
2658
+ return () => (read(i.et) ? undefined : read(r));
2625
2659
  }
2626
2660
  function createCollectionBoundary(e, t, n) {
2627
2661
  const i = createOwner();
2628
2662
  const r = new CollectionQueue(e);
2629
2663
  const o = createBoundChildren(i, t, r, e);
2630
2664
  const s = computed(() => {
2631
- if (!read(r.Ze)) {
2665
+ if (!read(r.et)) {
2632
2666
  const e = read(o);
2633
- if (!untrack(() => read(r.Ze))) {
2634
- r.nt = true;
2667
+ if (!untrack(() => read(r.et))) {
2668
+ r.rt = true;
2635
2669
  return e;
2636
2670
  }
2637
2671
  }
@@ -2644,10 +2678,10 @@ function createLoadBoundary(e, t) {
2644
2678
  }
2645
2679
  function createErrorBoundary(e, t) {
2646
2680
  return createCollectionBoundary(STATUS_ERROR, e, e => {
2647
- let n = e.tt.values().next().value;
2648
- const i = n.re?.cause ?? n.re;
2681
+ let n = e.it.values().next().value;
2682
+ const i = n.se?.cause ?? n.se;
2649
2683
  return t(i, () => {
2650
- for (const t of e.tt) recompute(t);
2684
+ for (const t of e.it) recompute(t);
2651
2685
  schedule();
2652
2686
  });
2653
2687
  });