@solidjs/signals 0.13.5 → 0.13.6

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/node.cjs CHANGED
@@ -133,7 +133,7 @@ function adjustHeight(e, t) {
133
133
  for (let t = e.A; t; t = t.N) {
134
134
  const e = t.L;
135
135
  const r = e.I || e;
136
- if (r.T && r.o >= n) n = r.o + 1;
136
+ if (r.R && r.o >= n) n = r.o + 1;
137
137
  }
138
138
  if (e.o !== n) {
139
139
  e.o = n;
@@ -156,7 +156,7 @@ function shouldReadStashedOptimisticValue(e) {
156
156
  }
157
157
  function runLaneEffects(e) {
158
158
  for (const t of L) {
159
- if (t.R || t.H.size > 0) continue;
159
+ if (t.T || t.H.size > 0) continue;
160
160
  const n = t.q[e - 1];
161
161
  if (n.length) {
162
162
  t.q[e - 1] = [];
@@ -169,9 +169,9 @@ function queueStashedOptimisticEffects(e) {
169
169
  const e = t.k;
170
170
  if (!e.D) continue;
171
171
  if (e.D === y) {
172
- if (!e.V) {
173
- e.V = true;
174
- e.B.enqueue(g, e.F);
172
+ if (!e.F) {
173
+ e.F = true;
174
+ e.V.enqueue(g, e.M);
175
175
  }
176
176
  continue;
177
177
  }
@@ -184,7 +184,7 @@ function setProjectionWriteActive(e) {
184
184
  W = e;
185
185
  }
186
186
  function mergeTransitionState(e, t) {
187
- t.M = e;
187
+ t.B = e;
188
188
  e.G.push(...t.G);
189
189
  for (const n of L) {
190
190
  if (n.K === t) n.K = e;
@@ -214,7 +214,7 @@ function cleanupCompletedLanes(e) {
214
214
  for (const t of L) {
215
215
  const n = e ? t.K === e : !t.K;
216
216
  if (!n) continue;
217
- if (!t.R) {
217
+ if (!t.T) {
218
218
  if (t.q[0].length) runQueue(t.q[0], h);
219
219
  if (t.q[1].length) runQueue(t.q[1], g);
220
220
  }
@@ -231,20 +231,6 @@ function schedule() {
231
231
  C = true;
232
232
  if (!A.ne && !W) queueMicrotask(flush);
233
233
  }
234
- function addTransitionBlocker(e) {
235
- if (k && !k.X.includes(e)) {
236
- k.X.push(e);
237
- }
238
- }
239
- function removeTransitionBlocker(e) {
240
- const remove = t => {
241
- if (!t) return;
242
- const n = t.indexOf(e);
243
- if (n >= 0) t.splice(n, 1);
244
- };
245
- remove(e.K?.X);
246
- remove(k?.X);
247
- }
248
234
  class Queue {
249
235
  i = null;
250
236
  re = [[], []];
@@ -275,8 +261,8 @@ class Queue {
275
261
  }
276
262
  enqueue(e, t) {
277
263
  if (e) {
278
- if (F) {
279
- const n = findLane(F);
264
+ if (M) {
265
+ const n = findLane(M);
280
266
  n.q[e - 1].push(t);
281
267
  } else {
282
268
  this.re[e - 1].push(t);
@@ -340,7 +326,7 @@ class GlobalQueue extends Queue {
340
326
  j = new Set();
341
327
  for (let t = 0; t < e.U.length; t++) {
342
328
  const n = e.U[t];
343
- if (n.T || n.le) continue;
329
+ if (n.R || n.le) continue;
344
330
  j.add(n);
345
331
  queueStashedOptimisticEffects(n);
346
332
  }
@@ -402,7 +388,7 @@ class GlobalQueue extends Queue {
402
388
  J: new Set(),
403
389
  G: [],
404
390
  ce: { re: [[], []], ie: [] },
405
- M: false
391
+ B: false
406
392
  };
407
393
  } else if (e) {
408
394
  const t = k;
@@ -438,7 +424,7 @@ class GlobalQueue extends Queue {
438
424
  }
439
425
  }
440
426
  function insertSubs(e, t = false) {
441
- const n = e.Y || F;
427
+ const n = e.Y || M;
442
428
  const r = e.pe !== undefined;
443
429
  for (let i = e.O; i !== null; i = i.P) {
444
430
  if (r && i.k.he) {
@@ -454,9 +440,9 @@ function insertSubs(e, t = false) {
454
440
  }
455
441
  const e = i.k;
456
442
  if (e.D === y) {
457
- if (!e.V) {
458
- e.V = true;
459
- e.B.enqueue(g, e.F);
443
+ if (!e.F) {
444
+ e.F = true;
445
+ e.V.enqueue(g, e.M);
460
446
  }
461
447
  continue;
462
448
  }
@@ -472,10 +458,10 @@ function commitPendingNodes() {
472
458
  if (n.Z !== S) {
473
459
  n.$ = n.Z;
474
460
  n.Z = S;
475
- if (n.D && n.D !== y) n.V = true;
461
+ if (n.D && n.D !== y) n.F = true;
476
462
  }
477
463
  if (!(n.ge & a)) n.ge &= ~p;
478
- if (n.T) GlobalQueue.ue(n, false, true);
464
+ if (n.R) GlobalQueue.ue(n, false, true);
479
465
  }
480
466
  e.length = 0;
481
467
  }
@@ -515,6 +501,9 @@ function reassignPendingTransition(e) {
515
501
  }
516
502
  const A = new GlobalQueue();
517
503
  function flush() {
504
+ if (A.ne) {
505
+ return;
506
+ }
518
507
  while (C || k) {
519
508
  A.flush();
520
509
  }
@@ -523,7 +512,7 @@ function runQueue(e, t) {
523
512
  for (let n = 0; n < e.length; n++) e[n](t);
524
513
  }
525
514
  function transitionComplete(e) {
526
- if (e.M) return true;
515
+ if (e.B) return true;
527
516
  if (e.G.length) return false;
528
517
  let t = true;
529
518
  for (let n = 0; n < e.X.length; n++) {
@@ -533,11 +522,26 @@ function transitionComplete(e) {
533
522
  break;
534
523
  }
535
524
  }
536
- t && (e.M = true);
525
+ if (t) {
526
+ for (let n = 0; n < e.U.length; n++) {
527
+ const r = e.U[n];
528
+ if (
529
+ hasActiveOverride(r) &&
530
+ "ge" in r &&
531
+ r.ge & a &&
532
+ r.ae instanceof NotReadyError &&
533
+ r.ae.source !== r
534
+ ) {
535
+ t = false;
536
+ break;
537
+ }
538
+ }
539
+ }
540
+ t && (e.B = true);
537
541
  return t;
538
542
  }
539
543
  function currentTransition(e) {
540
- while (e.M && typeof e.M === "object") e = e.M;
544
+ while (e.B && typeof e.B === "object") e = e.B;
541
545
  return e;
542
546
  }
543
547
  function setActiveTransition(e) {
@@ -561,21 +565,21 @@ function getOrCreateLane(e) {
561
565
  }
562
566
  const n = e.ye;
563
567
  const r = n?.Y ? findLane(n.Y) : null;
564
- t = { te: e, H: new Set(), q: [[], []], R: null, K: k, Se: r };
568
+ t = { te: e, H: new Set(), q: [[], []], T: null, K: k, Se: r };
565
569
  N.set(e, t);
566
570
  L.add(t);
567
571
  e.we = false;
568
572
  return t;
569
573
  }
570
574
  function findLane(e) {
571
- while (e.R) e = e.R;
575
+ while (e.T) e = e.T;
572
576
  return e;
573
577
  }
574
578
  function mergeLanes(e, t) {
575
579
  e = findLane(e);
576
580
  t = findLane(t);
577
581
  if (e === t) return e;
578
- t.R = e;
582
+ t.T = e;
579
583
  for (const n of t.H) e.H.add(n);
580
584
  e.q[0].push(...t.q[0]);
581
585
  e.q[1].push(...t.q[1]);
@@ -599,7 +603,7 @@ function assignOrMergeLane(e, t) {
599
603
  const n = findLane(t);
600
604
  const r = e.Y;
601
605
  if (r) {
602
- if (r.R) {
606
+ if (r.T) {
603
607
  e.Y = t;
604
608
  return;
605
609
  }
@@ -688,9 +692,9 @@ function settlePendingSource(e) {
688
692
  if (r._e) {
689
693
  if (r.D === y) {
690
694
  const e = r;
691
- if (!e.V) {
692
- e.V = true;
693
- e.B.enqueue(g, e.F);
695
+ if (!e.F) {
696
+ e.F = true;
697
+ e.V.enqueue(g, e.M);
694
698
  }
695
699
  } else {
696
700
  const e = r.m & o ? v : P;
@@ -773,7 +777,7 @@ function handleAsync(e, t, r) {
773
777
  r = false;
774
778
  if (!n) {
775
779
  A.initTransition(resolveTransition(e));
776
- throw new NotReadyError(B);
780
+ throw new NotReadyError(V);
777
781
  }
778
782
  }
779
783
  if (s) {
@@ -809,14 +813,13 @@ function handleAsync(e, t, r) {
809
813
  const i = iterate();
810
814
  if (!r && !i) {
811
815
  A.initTransition(resolveTransition(e));
812
- throw new NotReadyError(B);
816
+ throw new NotReadyError(V);
813
817
  }
814
818
  }
815
819
  return u;
816
820
  }
817
821
  function clearStatus(e, t = false) {
818
822
  clearPendingSources(e);
819
- removeTransitionBlocker(e);
820
823
  e._e = false;
821
824
  e.ge = t ? 0 : e.ge & p;
822
825
  setPendingError(e);
@@ -834,11 +837,9 @@ function notifyStatus(e, t, n, r, i) {
834
837
  if (t === a && s) {
835
838
  addPendingSource(e, s);
836
839
  e.ge = a | (e.ge & p);
837
- setPendingError(e, e.me ?? e.be?.values().next().value, n);
838
- if (s === e) addTransitionBlocker(e);
840
+ setPendingError(e, s, n);
839
841
  } else {
840
842
  clearPendingSources(e);
841
- removeTransitionBlocker(e);
842
843
  e.ge = t | (t !== d ? e.ge & p : 0);
843
844
  e.ae = n;
844
845
  }
@@ -850,6 +851,9 @@ function notifyStatus(e, t, n, r, i) {
850
851
  const c = r || f;
851
852
  const l = r || u ? undefined : i;
852
853
  if (e.ve) {
854
+ if (r && t === a) {
855
+ return;
856
+ }
853
857
  if (c) {
854
858
  e.ve(t, n);
855
859
  } else {
@@ -863,7 +867,7 @@ function notifyStatus(e, t, n, r, i) {
863
867
  (t === a && s && e.me !== s && !e.be?.has(s)) ||
864
868
  (t !== a && (e.ae !== n || e.me || e.be))
865
869
  ) {
866
- !e.K && A.se.push(e);
870
+ if (!c && !e.K) A.se.push(e);
867
871
  notifyStatus(e, t, n, c, l);
868
872
  }
869
873
  });
@@ -891,7 +895,7 @@ function enableExternalSource(e) {
891
895
  I = { factory: t, untrack: n };
892
896
  }
893
897
  }
894
- const T = {};
898
+ const R = {};
895
899
  function markDisposal(e) {
896
900
  let t = e.Ee;
897
901
  while (t) {
@@ -971,24 +975,24 @@ function formatId(e, t) {
971
975
  return e + (r ? String.fromCharCode(64 + r) : "") + n;
972
976
  }
973
977
  function getObserver() {
974
- if (q || V) return T;
975
- return R ? B : null;
978
+ if (q || F) return R;
979
+ return T ? V : null;
976
980
  }
977
981
  function getOwner() {
978
- return B;
982
+ return V;
979
983
  }
980
984
  function cleanup(e) {
981
- if (!B) return e;
982
- if (!B.Ne) B.Ne = e;
983
- else if (Array.isArray(B.Ne)) B.Ne.push(e);
984
- else B.Ne = [B.Ne, e];
985
+ if (!V) return e;
986
+ if (!V.Ne) V.Ne = e;
987
+ else if (Array.isArray(V.Ne)) V.Ne.push(e);
988
+ else V.Ne = [V.Ne, e];
985
989
  return e;
986
990
  }
987
991
  function isDisposed(e) {
988
992
  return !!(e.m & (u | o));
989
993
  }
990
994
  function createOwner(e) {
991
- const t = B;
995
+ const t = V;
992
996
  const n = e?.transparent ?? false;
993
997
  const r = {
994
998
  id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
@@ -998,7 +1002,7 @@ function createOwner(e) {
998
1002
  Ee: null,
999
1003
  ke: null,
1000
1004
  Ne: null,
1001
- B: t?.B ?? A,
1005
+ V: t?.V ?? A,
1002
1006
  Ie: t?.Ie || _,
1003
1007
  je: 0,
1004
1008
  Ae: null,
@@ -1027,15 +1031,15 @@ function unlinkSubs(e) {
1027
1031
  const t = e.L;
1028
1032
  const n = e.N;
1029
1033
  const r = e.P;
1030
- const i = e.Te;
1031
- if (r !== null) r.Te = i;
1032
- else t.Re = i;
1034
+ const i = e.Re;
1035
+ if (r !== null) r.Re = i;
1036
+ else t.Te = i;
1033
1037
  if (i !== null) i.P = r;
1034
1038
  else {
1035
1039
  t.O = r;
1036
1040
  if (r === null) {
1037
1041
  t.He?.();
1038
- t.T && !t.Qe && !(t.m & o) && unobserved(t);
1042
+ t.R && !t.Qe && !(t.m & o) && unobserved(t);
1039
1043
  }
1040
1044
  }
1041
1045
  return n;
@@ -1061,9 +1065,9 @@ function link(e, t) {
1061
1065
  return;
1062
1066
  }
1063
1067
  }
1064
- const o = e.Re;
1068
+ const o = e.Te;
1065
1069
  if (o !== null && o.k === t && (!s || isValidLink(o, t))) return;
1066
- const u = (t.Ce = e.Re = { L: e, k: t, N: i, Te: o, P: null });
1070
+ const u = (t.Ce = e.Te = { L: e, k: t, N: i, Re: o, P: null });
1067
1071
  if (n !== null) n.N = u;
1068
1072
  else t.A = u;
1069
1073
  if (o !== null) o.P = u;
@@ -1083,15 +1087,15 @@ function isValidLink(e, t) {
1083
1087
  }
1084
1088
  GlobalQueue.oe = recompute;
1085
1089
  GlobalQueue.ue = disposeChildren;
1086
- let R = false;
1090
+ let T = false;
1087
1091
  let H = false;
1088
1092
  let Q = false;
1089
1093
  let q = false;
1090
1094
  let D = false;
1091
- let V = false;
1092
- let B = null;
1093
- let F = null;
1094
- let M = false;
1095
+ let F = false;
1096
+ let V = null;
1097
+ let M = null;
1098
+ let B = false;
1095
1099
  let G = null;
1096
1100
  function ownerInSnapshotScope(e) {
1097
1101
  while (e) {
@@ -1101,7 +1105,7 @@ function ownerInSnapshotScope(e) {
1101
1105
  return false;
1102
1106
  }
1103
1107
  function setSnapshotCapture(e) {
1104
- M = e;
1108
+ B = e;
1105
1109
  if (e && !G) G = new Set();
1106
1110
  }
1107
1111
  function markSnapshotScope(e) {
@@ -1119,7 +1123,7 @@ function releaseSubtree(e) {
1119
1123
  t = t.ke;
1120
1124
  continue;
1121
1125
  }
1122
- if (t.T) {
1126
+ if (t.R) {
1123
1127
  const e = t;
1124
1128
  e.he = false;
1125
1129
  if (e.m & c) {
@@ -1141,7 +1145,7 @@ function clearSnapshots() {
1141
1145
  }
1142
1146
  G = null;
1143
1147
  }
1144
- M = false;
1148
+ B = false;
1145
1149
  }
1146
1150
  function recompute(t, n = false) {
1147
1151
  const i = t.D;
@@ -1161,22 +1165,22 @@ function recompute(t, n = false) {
1161
1165
  const s = !!(t.m & f);
1162
1166
  const u = t.ee !== undefined && t.ee !== S;
1163
1167
  const l = !!(t.ge & a);
1164
- const p = B;
1165
- B = t;
1168
+ const p = V;
1169
+ V = t;
1166
1170
  t.Ce = null;
1167
1171
  t.m = r;
1168
1172
  t.de = E;
1169
1173
  let h = t.Z === S ? t.$ : t.Z;
1170
1174
  let g = t.o;
1171
- let w = R;
1172
- let m = F;
1173
- R = true;
1175
+ let w = T;
1176
+ let m = M;
1177
+ T = true;
1174
1178
  if (s) {
1175
1179
  const e = resolveLane(t);
1176
- if (e) F = e;
1180
+ if (e) M = e;
1177
1181
  }
1178
1182
  try {
1179
- h = handleAsync(t, t.T(h));
1183
+ h = handleAsync(t, t.R(h));
1180
1184
  clearStatus(t, n);
1181
1185
  const e = resolveLane(t);
1182
1186
  if (e) {
@@ -1184,8 +1188,8 @@ function recompute(t, n = false) {
1184
1188
  updatePendingSignal(e.te);
1185
1189
  }
1186
1190
  } catch (e) {
1187
- if (e instanceof NotReadyError && F) {
1188
- const e = findLane(F);
1191
+ if (e instanceof NotReadyError && M) {
1192
+ const e = findLane(M);
1189
1193
  if (e.te !== t) {
1190
1194
  e.H.add(t);
1191
1195
  t.Y = e;
@@ -1201,9 +1205,9 @@ function recompute(t, n = false) {
1201
1205
  e instanceof NotReadyError ? t.Y : undefined
1202
1206
  );
1203
1207
  } finally {
1204
- R = w;
1208
+ T = w;
1205
1209
  t.m = e | (n ? t.m & c : 0);
1206
- B = p;
1210
+ V = p;
1207
1211
  }
1208
1212
  if (!t.ae) {
1209
1213
  const e = t.Ce;
@@ -1236,7 +1240,7 @@ function recompute(t, n = false) {
1236
1240
  }
1237
1241
  }
1238
1242
  }
1239
- F = m;
1243
+ M = m;
1240
1244
  (!n || t.ge & a) && !t.K && !(k && u) && A.se.push(t);
1241
1245
  t.K && i && k !== t.K && runInTransition(t.K, () => recompute(t));
1242
1246
  }
@@ -1245,7 +1249,7 @@ function updateIfNecessary(r) {
1245
1249
  for (let e = r.A; e; e = e.N) {
1246
1250
  const t = e.L;
1247
1251
  const i = t.I || t;
1248
- if (i.T) {
1252
+ if (i.R) {
1249
1253
  updateIfNecessary(i);
1250
1254
  }
1251
1255
  if (r.m & n) {
@@ -1261,16 +1265,16 @@ function updateIfNecessary(r) {
1261
1265
  function computed(t, n, r) {
1262
1266
  const i = r?.transparent ?? false;
1263
1267
  const s = {
1264
- id: r?.id ?? (i ? B?.id : B?.id != null ? getNextChildId(B) : undefined),
1268
+ id: r?.id ?? (i ? V?.id : V?.id != null ? getNextChildId(V) : undefined),
1265
1269
  Le: i || undefined,
1266
1270
  xe: r?.equals != null ? r.equals : isEqual,
1267
1271
  le: !!r?.pureWrite,
1268
1272
  He: r?.unobserved,
1269
1273
  Ne: null,
1270
- B: B?.B ?? A,
1271
- Ie: B?.Ie ?? _,
1274
+ V: V?.V ?? A,
1275
+ Ie: V?.Ie ?? _,
1272
1276
  je: 0,
1273
- T: t,
1277
+ R: t,
1274
1278
  $: n,
1275
1279
  o: 0,
1276
1280
  C: null,
@@ -1279,8 +1283,8 @@ function computed(t, n, r) {
1279
1283
  A: null,
1280
1284
  Ce: null,
1281
1285
  O: null,
1282
- Re: null,
1283
- i: B,
1286
+ Te: null,
1287
+ i: V,
1284
1288
  ke: null,
1285
1289
  Ee: null,
1286
1290
  m: r?.lazy ? l : e,
@@ -1293,31 +1297,31 @@ function computed(t, n, r) {
1293
1297
  K: null
1294
1298
  };
1295
1299
  s.p = s;
1296
- const o = B?.t ? B.u : B;
1297
- if (B) {
1298
- const e = B.Ee;
1300
+ const o = V?.t ? V.u : V;
1301
+ if (V) {
1302
+ const e = V.Ee;
1299
1303
  if (e === null) {
1300
- B.Ee = s;
1304
+ V.Ee = s;
1301
1305
  } else {
1302
1306
  s.ke = e;
1303
- B.Ee = s;
1307
+ V.Ee = s;
1304
1308
  }
1305
1309
  }
1306
1310
  if (o) s.o = o.o + 1;
1307
- if (M && ownerInSnapshotScope(B)) s.he = true;
1311
+ if (B && ownerInSnapshotScope(V)) s.he = true;
1308
1312
  if (I) {
1309
1313
  const e = signal(undefined, { equals: false, pureWrite: true });
1310
- const t = I.factory(s.T, () => {
1314
+ const t = I.factory(s.R, () => {
1311
1315
  setSignal(e, undefined);
1312
1316
  });
1313
1317
  cleanup(() => t.dispose());
1314
- s.T = n => {
1318
+ s.R = n => {
1315
1319
  read(e);
1316
1320
  return t.track(n);
1317
1321
  };
1318
1322
  }
1319
1323
  !r?.lazy && recompute(s, true);
1320
- if (M && !r?.lazy) {
1324
+ if (B && !r?.lazy) {
1321
1325
  if (!(s.ge & a)) {
1322
1326
  s.pe = s.$ === undefined ? w : s.$;
1323
1327
  G.add(s);
@@ -1333,14 +1337,14 @@ function signal(e, t, n = null) {
1333
1337
  He: t?.unobserved,
1334
1338
  $: e,
1335
1339
  O: null,
1336
- Re: null,
1340
+ Te: null,
1337
1341
  de: E,
1338
1342
  I: n,
1339
1343
  W: n?.C || null,
1340
1344
  Z: S
1341
1345
  };
1342
1346
  n && (n.C = r);
1343
- if (M && !r.De && !((n?.ge ?? 0) & a)) {
1347
+ if (B && !r.De && !((n?.ge ?? 0) & a)) {
1344
1348
  r.pe = e === undefined ? w : e;
1345
1349
  G.add(r);
1346
1350
  }
@@ -1360,35 +1364,35 @@ function isEqual(e, t) {
1360
1364
  return e === t;
1361
1365
  }
1362
1366
  function untrack(e, t) {
1363
- if (!I && !R && true) return e();
1364
- const n = R;
1365
- R = false;
1367
+ if (!I && !T && true) return e();
1368
+ const n = T;
1369
+ T = false;
1366
1370
  try {
1367
1371
  if (I) return I.untrack(e);
1368
1372
  return e();
1369
1373
  } finally {
1370
- R = n;
1374
+ T = n;
1371
1375
  }
1372
1376
  }
1373
1377
  function read(e) {
1374
- if (V) {
1378
+ if (F) {
1375
1379
  const t = getLatestValueComputed(e);
1376
- const n = V;
1377
- V = false;
1380
+ const n = F;
1381
+ F = false;
1378
1382
  const r = e.ee !== undefined && e.ee !== S ? e.ee : e.$;
1379
1383
  let i;
1380
1384
  try {
1381
1385
  i = read(t);
1382
1386
  } catch (e) {
1383
- if (!B && e instanceof NotReadyError) return r;
1387
+ if (!V && e instanceof NotReadyError) return r;
1384
1388
  throw e;
1385
1389
  } finally {
1386
- V = n;
1390
+ F = n;
1387
1391
  }
1388
1392
  if (t.ge & a) return r;
1389
- if (H && F && t.Y) {
1393
+ if (H && M && t.Y) {
1390
1394
  const e = findLane(t.Y);
1391
- const n = findLane(F);
1395
+ const n = findLane(M);
1392
1396
  if (e !== n && e.H.size > 0) {
1393
1397
  return r;
1394
1398
  }
@@ -1410,18 +1414,18 @@ function read(e) {
1410
1414
  q = n;
1411
1415
  return e.$;
1412
1416
  }
1413
- let t = B;
1417
+ let t = V;
1414
1418
  if (t?.t) t = t.u;
1415
- if (Q && e.T) recompute(e);
1419
+ if (Q && e.R) recompute(e);
1416
1420
  if (e.m & l) {
1417
1421
  e.m &= ~l;
1418
1422
  recompute(e, true);
1419
1423
  }
1420
1424
  const n = e.I || e;
1421
- if (t && R) {
1422
- if (e.T && e.m & u) recompute(e);
1425
+ if (t && T) {
1426
+ if (e.R && e.m & u) recompute(e);
1423
1427
  link(e, t);
1424
- if (n.T) {
1428
+ if (n.R) {
1425
1429
  const r = e.m & o;
1426
1430
  if (n.o >= (r ? v.j : P.j)) {
1427
1431
  markNode(t);
@@ -1436,28 +1440,31 @@ function read(e) {
1436
1440
  }
1437
1441
  if (n.ge & a) {
1438
1442
  if (t && !(H && n.K && k !== n.K)) {
1439
- if (F) {
1443
+ if (M) {
1440
1444
  const r = n.Y;
1441
- const i = findLane(F);
1445
+ const i = findLane(M);
1442
1446
  if (r && findLane(r) === i && !hasActiveOverride(n)) {
1443
- if (!R && e !== t) link(e, t);
1447
+ if (!T && e !== t) link(e, t);
1444
1448
  throw n.ae;
1445
1449
  }
1446
1450
  } else {
1447
- if (!R && e !== t) link(e, t);
1451
+ if (!T && e !== t) link(e, t);
1448
1452
  throw n.ae;
1449
1453
  }
1454
+ } else if (t && n !== e && n.ge & p) {
1455
+ if (!T && e !== t) link(e, t);
1456
+ throw n.ae;
1450
1457
  } else if (!t && n.ge & p) {
1451
1458
  throw n.ae;
1452
1459
  }
1453
1460
  }
1454
- if (e.T && e.ge & d) {
1461
+ if (e.R && e.ge & d) {
1455
1462
  if (e.de < E) {
1456
1463
  recompute(e, true);
1457
1464
  return read(e);
1458
1465
  } else throw e.ae;
1459
1466
  }
1460
- if (M && t && t.he) {
1467
+ if (B && t && t.he) {
1461
1468
  const n = e.pe;
1462
1469
  if (n !== undefined) {
1463
1470
  const r = n === w ? undefined : n;
@@ -1471,7 +1478,7 @@ function read(e) {
1471
1478
  return e.ee;
1472
1479
  }
1473
1480
  return !t ||
1474
- (F !== null && (e.ee !== undefined || e.Y || (n === e && H) || !!(n.ge & a))) ||
1481
+ (M !== null && (e.ee !== undefined || e.Y || (n === e && H) || !!(n.ge & a))) ||
1475
1482
  e.Z === S ||
1476
1483
  (H && e.K && k !== e.K)
1477
1484
  ? e.$
@@ -1485,7 +1492,7 @@ function setSignal(e, t) {
1485
1492
  if (typeof t === "function") t = t(i);
1486
1493
  const s = !e.xe || !e.xe(i, t) || !!(e.ge & p);
1487
1494
  if (!s) {
1488
- if (n && r && e.T) {
1495
+ if (n && r && e.R) {
1489
1496
  insertSubs(e, true);
1490
1497
  schedule();
1491
1498
  }
@@ -1516,26 +1523,26 @@ function setSignal(e, t) {
1516
1523
  return t;
1517
1524
  }
1518
1525
  function runWithOwner(e, t) {
1519
- const n = B;
1520
- const r = R;
1521
- B = e;
1522
- R = false;
1526
+ const n = V;
1527
+ const r = T;
1528
+ V = e;
1529
+ T = false;
1523
1530
  try {
1524
1531
  return t();
1525
1532
  } finally {
1526
- B = n;
1527
- R = r;
1533
+ V = n;
1534
+ T = r;
1528
1535
  }
1529
1536
  }
1530
1537
  function getPendingSignal(e) {
1531
- if (!e.Ve) {
1532
- e.Ve = optimisticSignal(false, { pureWrite: true });
1538
+ if (!e.Fe) {
1539
+ e.Fe = optimisticSignal(false, { pureWrite: true });
1533
1540
  if (e.ye) {
1534
- e.Ve.ye = e;
1541
+ e.Fe.ye = e;
1535
1542
  }
1536
- if (computePendingState(e)) setSignal(e.Ve, true);
1543
+ if (computePendingState(e)) setSignal(e.Fe, true);
1537
1544
  }
1538
- return e.Ve;
1545
+ return e.Fe;
1539
1546
  }
1540
1547
  function computePendingState(e) {
1541
1548
  const t = e;
@@ -1558,9 +1565,9 @@ function computePendingState(e) {
1558
1565
  return !!(t.ge & a && !(t.ge & p));
1559
1566
  }
1560
1567
  function updatePendingSignal(e) {
1561
- if (e.Ve) {
1568
+ if (e.Fe) {
1562
1569
  const t = computePendingState(e);
1563
- const n = e.Ve;
1570
+ const n = e.Fe;
1564
1571
  setSignal(n, t);
1565
1572
  if (!t && n.Y) {
1566
1573
  const t = resolveLane(e);
@@ -1577,17 +1584,17 @@ function updatePendingSignal(e) {
1577
1584
  }
1578
1585
  function getLatestValueComputed(e) {
1579
1586
  if (!e.Pe) {
1580
- const t = V;
1581
- V = false;
1587
+ const t = F;
1588
+ F = false;
1582
1589
  const n = q;
1583
1590
  q = false;
1584
- const r = B;
1585
- B = null;
1591
+ const r = V;
1592
+ V = null;
1586
1593
  e.Pe = optimisticComputed(() => read(e));
1587
1594
  e.Pe.ye = e;
1588
- B = r;
1595
+ V = r;
1589
1596
  q = n;
1590
- V = t;
1597
+ F = t;
1591
1598
  }
1592
1599
  return e.Pe;
1593
1600
  }
@@ -1601,12 +1608,12 @@ function staleValues(e, t = true) {
1601
1608
  }
1602
1609
  }
1603
1610
  function latest(e) {
1604
- const t = V;
1605
- V = true;
1611
+ const t = F;
1612
+ F = true;
1606
1613
  try {
1607
1614
  return e();
1608
1615
  } finally {
1609
- V = t;
1616
+ F = t;
1610
1617
  }
1611
1618
  }
1612
1619
  function isPending(e) {
@@ -1673,15 +1680,15 @@ function effect(e, t, n, r, i) {
1673
1680
  const o = computed(i?.render ? t => staleValues(() => e(t)) : e, r, {
1674
1681
  ...i,
1675
1682
  equals: () => {
1676
- o.V = !o.ae;
1677
- if (s) o.B.enqueue(o.D, runEffect.bind(o));
1683
+ o.F = !o.ae;
1684
+ if (s) o.V.enqueue(o.D, runEffect.bind(o));
1678
1685
  return false;
1679
1686
  },
1680
1687
  lazy: true
1681
1688
  });
1682
- o.Be = r;
1683
- o.Fe = t;
1684
- o.Me = n;
1689
+ o.Ve = r;
1690
+ o.Me = t;
1691
+ o.Be = n;
1685
1692
  o.Ge = undefined;
1686
1693
  o.D = i?.render ? h : g;
1687
1694
  o.ve = (e, t) => {
@@ -1689,11 +1696,11 @@ function effect(e, t, n, r, i) {
1689
1696
  const r = t !== undefined ? t : o.ae;
1690
1697
  if (n & d) {
1691
1698
  let e = r;
1692
- o.B.notify(o, a, 0);
1699
+ o.V.notify(o, a, 0);
1693
1700
  if (o.D === g) {
1694
1701
  try {
1695
- return o.Me
1696
- ? o.Me(e, () => {
1702
+ return o.Be
1703
+ ? o.Be(e, () => {
1697
1704
  o.Ge?.();
1698
1705
  o.Ge = undefined;
1699
1706
  })
@@ -1702,36 +1709,39 @@ function effect(e, t, n, r, i) {
1702
1709
  e = t;
1703
1710
  }
1704
1711
  }
1705
- if (!o.B.notify(o, d, d)) throw e;
1712
+ if (!o.V.notify(o, d, d)) throw e;
1706
1713
  } else if (o.D === h) {
1707
- o.B.notify(o, a | d, n, r);
1714
+ o.V.notify(o, a | d, n, r);
1708
1715
  }
1709
1716
  };
1710
1717
  recompute(o, true);
1711
- !i?.defer && (o.D === g ? o.B.enqueue(o.D, runEffect.bind(o)) : runEffect.call(o));
1718
+ !i?.defer && (o.D === g ? o.V.enqueue(o.D, runEffect.bind(o)) : runEffect.call(o));
1712
1719
  s = true;
1713
1720
  cleanup(() => o.Ge?.());
1714
1721
  }
1715
1722
  function runEffect() {
1716
- if (!this.V || this.m & u) return;
1723
+ if (!this.F || this.m & u) return;
1717
1724
  this.Ge?.();
1718
1725
  this.Ge = undefined;
1719
1726
  try {
1720
- this.Ge = this.Fe(this.$, this.Be);
1727
+ this.Ge = this.Me(this.$, this.Ve);
1721
1728
  } catch (e) {
1722
1729
  this.ae = new StatusError(this, e);
1723
1730
  this.ge |= d;
1724
- if (!this.B.notify(this, d, d)) throw e;
1731
+ if (!this.V.notify(this, d, d)) throw e;
1725
1732
  } finally {
1726
- this.Be = this.$;
1727
- this.V = false;
1733
+ this.Ve = this.$;
1734
+ this.F = false;
1728
1735
  }
1729
1736
  }
1730
1737
  function trackedEffect(e, t) {
1731
1738
  const run = () => {
1732
- if (!n.V || n.m & u) return;
1733
- n.V = false;
1734
- recompute(n);
1739
+ if (!n.F || n.m & u) return;
1740
+ try {
1741
+ n.F = false;
1742
+ recompute(n);
1743
+ } finally {
1744
+ }
1735
1745
  };
1736
1746
  const n = computed(
1737
1747
  () => {
@@ -1744,18 +1754,18 @@ function trackedEffect(e, t) {
1744
1754
  );
1745
1755
  n.Ge = undefined;
1746
1756
  n.Ke = true;
1747
- n.V = true;
1757
+ n.F = true;
1748
1758
  n.D = y;
1749
1759
  n.ve = (e, t) => {
1750
1760
  const r = e !== undefined ? e : n.ge;
1751
1761
  if (r & d) {
1752
- n.B.notify(n, a, 0);
1762
+ n.V.notify(n, a, 0);
1753
1763
  const e = t !== undefined ? t : n.ae;
1754
- if (!n.B.notify(n, d, d)) throw e;
1764
+ if (!n.V.notify(n, d, d)) throw e;
1755
1765
  }
1756
1766
  };
1757
- n.F = run;
1758
- n.B.enqueue(g, run);
1767
+ n.M = run;
1768
+ n.V.enqueue(g, run);
1759
1769
  cleanup(() => n.Ge?.());
1760
1770
  }
1761
1771
  function restoreTransition(e, t) {
@@ -2247,7 +2257,7 @@ const fe = {
2247
2257
  untrack(() => {
2248
2258
  const i = e[X];
2249
2259
  const s = i[t];
2250
- if (M && typeof t !== "symbol" && !((e[re]?.ge ?? 0) & a)) {
2260
+ if (B && typeof t !== "symbol" && !((e[re]?.ge ?? 0) & a)) {
2251
2261
  if (!e[m]) {
2252
2262
  e[m] = Object.create(null);
2253
2263
  G?.add(e);
@@ -2903,7 +2913,7 @@ function boundaryComputed(e, t) {
2903
2913
  const r = e !== undefined ? e : n.ge;
2904
2914
  const i = t !== undefined ? t : n.ae;
2905
2915
  n.ge &= ~n.ut;
2906
- n.B.notify(n, n.ut, r, i);
2916
+ n.V.notify(n, n.ut, r, i);
2907
2917
  };
2908
2918
  n.ut = t;
2909
2919
  n.Qe = true;
@@ -2911,9 +2921,9 @@ function boundaryComputed(e, t) {
2911
2921
  return n;
2912
2922
  }
2913
2923
  function createBoundChildren(e, t, n, r) {
2914
- const i = e.B;
2915
- i.addChild((e.B = n));
2916
- cleanup(() => i.removeChild(e.B));
2924
+ const i = e.V;
2925
+ i.addChild((e.V = n));
2926
+ cleanup(() => i.removeChild(e.V));
2917
2927
  return runWithOwner(e, () => {
2918
2928
  const e = computed(t);
2919
2929
  return boundaryComputed(() => staleValues(() => flatten(read(e))), r);