@tanstack/solid-query-devtools 6.0.0-alpha.0 → 6.0.0-alpha.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/build/index.cjs CHANGED
@@ -14,7 +14,7 @@ var __export = (target, all) => {
14
14
  __defProp(target, name, { get: all[name], enumerable: true });
15
15
  };
16
16
 
17
- // ../../node_modules/.pnpm/@solidjs+signals@0.12.0/node_modules/@solidjs/signals/dist/prod.js
17
+ // ../../node_modules/.pnpm/@solidjs+signals@0.13.6/node_modules/@solidjs/signals/dist/prod.js
18
18
  function actualInsertIntoHeap(e, t) {
19
19
  const n = (e.i?.t ? e.i.u?.o : e.i?.o) ?? -1;
20
20
  if (n >= e.o) e.o = n + 1;
@@ -62,12 +62,12 @@ function deleteFromHeap(e, t) {
62
62
  }
63
63
  function runHeap(e, t) {
64
64
  e._ = false;
65
- for (e.N = 0; e.N <= e.R; e.N++) {
66
- let n = e.l[e.N];
65
+ for (e.P = 0; e.P <= e.R; e.P++) {
66
+ let n = e.l[e.P];
67
67
  while (n !== void 0) {
68
68
  if (n.O & REACTIVE_IN_HEAP) t(n);
69
69
  else adjustHeight(n, e);
70
- n = e.l[e.N];
70
+ n = e.l[e.P];
71
71
  }
72
72
  }
73
73
  e.R = 0;
@@ -76,8 +76,8 @@ function adjustHeight(e, t) {
76
76
  deleteFromHeap(e, t);
77
77
  let n = e.o;
78
78
  for (let t2 = e.C; t2; t2 = t2.D) {
79
- const e2 = t2.V;
80
- const i = e2.m || e2;
79
+ const e2 = t2.m;
80
+ const i = e2.V || e2;
81
81
  if (i.L && i.o >= n) n = i.o + 1;
82
82
  }
83
83
  if (e.o !== n) {
@@ -89,24 +89,83 @@ function adjustHeight(e, t) {
89
89
  }
90
90
  function runLaneEffects(e) {
91
91
  for (const t of activeLanes) {
92
- if (t.k || t.U.size > 0) continue;
93
- const n = t.W[e - 1];
92
+ if (t.U || t.k.size > 0) continue;
93
+ const n = t.G[e - 1];
94
94
  if (n.length) {
95
- t.W[e - 1] = [];
95
+ t.G[e - 1] = [];
96
96
  runQueue(n, e);
97
97
  }
98
98
  }
99
99
  }
100
+ function queueStashedOptimisticEffects(e) {
101
+ for (let t = e.I; t !== null; t = t.p) {
102
+ const e2 = t.h;
103
+ if (!e2.W) continue;
104
+ if (e2.W === EFFECT_TRACKED) {
105
+ if (!e2.H) {
106
+ e2.H = true;
107
+ e2.F.enqueue(EFFECT_USER, e2.M);
108
+ }
109
+ continue;
110
+ }
111
+ const n = e2.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
112
+ if (n.P > e2.o) n.P = e2.o;
113
+ insertIntoHeap(e2, n);
114
+ }
115
+ }
116
+ function mergeTransitionState(e, t) {
117
+ t.$ = e;
118
+ e.j.push(...t.j);
119
+ for (const n of activeLanes) {
120
+ if (n.K === t) n.K = e;
121
+ }
122
+ e.Y.push(...t.Y);
123
+ for (const n of t.Z) e.Z.add(n);
124
+ for (const n of t.B) {
125
+ if (!e.B.includes(n)) e.B.push(n);
126
+ }
127
+ }
128
+ function resolveOptimisticNodes(e) {
129
+ for (let t = 0; t < e.length; t++) {
130
+ const n = e[t];
131
+ n.q = void 0;
132
+ if (n.X !== NOT_PENDING) {
133
+ n.J = n.X;
134
+ n.X = NOT_PENDING;
135
+ }
136
+ const i = n.ee;
137
+ n.ee = NOT_PENDING;
138
+ if (i !== NOT_PENDING && n.J !== i) insertSubs(n, true);
139
+ n.K = null;
140
+ }
141
+ e.length = 0;
142
+ }
143
+ function cleanupCompletedLanes(e) {
144
+ for (const t of activeLanes) {
145
+ const n = e ? t.K === e : !t.K;
146
+ if (!n) continue;
147
+ if (!t.U) {
148
+ if (t.G[0].length) runQueue(t.G[0], EFFECT_RENDER);
149
+ if (t.G[1].length) runQueue(t.G[1], EFFECT_USER);
150
+ }
151
+ if (t.te.q === t) t.te.q = void 0;
152
+ t.k.clear();
153
+ t.G[0].length = 0;
154
+ t.G[1].length = 0;
155
+ activeLanes.delete(t);
156
+ signalLanes.delete(t.te);
157
+ }
158
+ }
100
159
  function schedule() {
101
160
  if (scheduled) return;
102
161
  scheduled = true;
103
- if (!globalQueue.H && !projectionWriteActive) queueMicrotask(flush);
162
+ if (!globalQueue.ne && !projectionWriteActive) queueMicrotask(flush);
104
163
  }
105
164
  function insertSubs(e, t = false) {
106
- const n = e.ie || currentOptimisticLane;
107
- const i = e.re !== void 0;
165
+ const n = e.q || currentOptimisticLane;
166
+ const i = e.Te !== void 0;
108
167
  for (let r = e.I; r !== null; r = r.p) {
109
- if (i && r.h.se) {
168
+ if (i && r.h.de) {
110
169
  r.h.O |= REACTIVE_SNAPSHOT_STALE;
111
170
  continue;
112
171
  }
@@ -115,88 +174,70 @@ function insertSubs(e, t = false) {
115
174
  assignOrMergeLane(r.h, n);
116
175
  } else if (t) {
117
176
  r.h.O |= REACTIVE_OPTIMISTIC_DIRTY;
118
- r.h.ie = void 0;
177
+ r.h.q = void 0;
119
178
  }
120
179
  const e2 = r.h;
121
- if (e2.oe === EFFECT_TRACKED) {
122
- if (!e2.ue) {
123
- e2.ue = true;
124
- e2.ce.enqueue(EFFECT_USER, e2.le);
180
+ if (e2.W === EFFECT_TRACKED) {
181
+ if (!e2.H) {
182
+ e2.H = true;
183
+ e2.F.enqueue(EFFECT_USER, e2.M);
125
184
  }
126
185
  continue;
127
186
  }
128
187
  const s = r.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
129
- if (s.N > r.h.o) s.N = r.h.o;
188
+ if (s.P > r.h.o) s.P = r.h.o;
130
189
  insertIntoHeap(r.h, s);
131
190
  }
132
191
  }
192
+ function commitPendingNodes() {
193
+ const e = globalQueue.se;
194
+ for (let t = 0; t < e.length; t++) {
195
+ const n = e[t];
196
+ if (n.X !== NOT_PENDING) {
197
+ n.J = n.X;
198
+ n.X = NOT_PENDING;
199
+ if (n.W && n.W !== EFFECT_TRACKED) n.H = true;
200
+ }
201
+ if (!(n.Se & STATUS_PENDING)) n.Se &= ~STATUS_UNINITIALIZED;
202
+ if (n.L) GlobalQueue.ue(n, false, true);
203
+ }
204
+ e.length = 0;
205
+ }
133
206
  function finalizePureQueue(e = null, t = false) {
134
- let n = !t;
207
+ const n = !t;
208
+ if (n) commitPendingNodes();
135
209
  if (!t) checkBoundaryChildren(globalQueue);
136
- if (dirtyQueue.R >= dirtyQueue.N) runHeap(dirtyQueue, GlobalQueue.K);
210
+ if (dirtyQueue.R >= dirtyQueue.P) runHeap(dirtyQueue, GlobalQueue.oe);
137
211
  if (n) {
138
- const t2 = globalQueue.F;
139
- for (let e2 = 0; e2 < t2.length; e2++) {
140
- const n3 = t2[e2];
141
- if (n3.ae !== NOT_PENDING) {
142
- n3.fe = n3.ae;
143
- n3.ae = NOT_PENDING;
144
- if (n3.oe && n3.oe !== EFFECT_TRACKED) n3.ue = true;
145
- }
146
- if (!(n3.Ee & STATUS_PENDING)) n3.Ee &= ~STATUS_UNINITIALIZED;
147
- if (n3.L) GlobalQueue.Y(n3, false, true);
148
- }
149
- t2.length = 0;
150
- const n2 = e ? e.$ : globalQueue.$;
151
- for (let e2 = 0; e2 < n2.length; e2++) {
152
- const t3 = n2[e2];
153
- const i2 = t3.ae;
154
- t3.ie = void 0;
155
- if (i2 !== NOT_PENDING && t3.fe !== i2) {
156
- t3.fe = i2;
157
- insertSubs(t3, true);
158
- }
159
- t3.ae = NOT_PENDING;
160
- t3.ne = null;
161
- }
162
- n2.length = 0;
163
- const i = e ? e.j : globalQueue.j;
164
- if (GlobalQueue.Z && i.size) {
165
- for (const e2 of i) {
166
- GlobalQueue.Z(e2);
212
+ commitPendingNodes();
213
+ resolveOptimisticNodes(e ? e.Y : globalQueue.Y);
214
+ const t2 = e ? e.Z : globalQueue.Z;
215
+ if (GlobalQueue.ce && t2.size) {
216
+ for (const e2 of t2) {
217
+ GlobalQueue.ce(e2);
167
218
  }
168
- i.clear();
219
+ t2.clear();
169
220
  schedule();
170
221
  }
171
- for (const t3 of activeLanes) {
172
- const n3 = e ? t3.ne === e : !t3.ne;
173
- if (!n3) continue;
174
- if (!t3.k) {
175
- if (t3.W[0].length) runQueue(t3.W[0], EFFECT_RENDER);
176
- if (t3.W[1].length) runQueue(t3.W[1], EFFECT_USER);
177
- }
178
- if (t3.Te.ie === t3) t3.Te.ie = void 0;
179
- t3.U.clear();
180
- t3.W[0].length = 0;
181
- t3.W[1].length = 0;
182
- activeLanes.delete(t3);
183
- signalLanes.delete(t3.Te);
184
- }
222
+ cleanupCompletedLanes(e);
185
223
  }
186
224
  }
187
225
  function checkBoundaryChildren(e) {
188
- for (const t of e.M) {
226
+ for (const t of e.re) {
189
227
  t.checkSources?.();
190
228
  checkBoundaryChildren(t);
191
229
  }
192
230
  }
193
231
  function reassignPendingTransition(e) {
194
232
  for (let t = 0; t < e.length; t++) {
195
- e[t].ne = activeTransition;
233
+ e[t].K = activeTransition;
196
234
  }
197
235
  }
198
236
  function flush() {
199
- while (scheduled) {
237
+ if (globalQueue.ne) {
238
+ return;
239
+ }
240
+ while (scheduled || activeTransition) {
200
241
  globalQueue.flush();
201
242
  }
202
243
  }
@@ -204,21 +245,30 @@ function runQueue(e, t) {
204
245
  for (let n = 0; n < e.length; n++) e[n](t);
205
246
  }
206
247
  function transitionComplete(e) {
207
- if (e.te) return true;
208
- if (e.ee.length) return false;
248
+ if (e.$) return true;
249
+ if (e.j.length) return false;
209
250
  let t = true;
210
- for (let n = 0; n < e.q.length; n++) {
211
- const i = e.q[n];
212
- if (i.Ee & STATUS_PENDING && i.X?.source === i) {
251
+ for (let n = 0; n < e.B.length; n++) {
252
+ const i = e.B[n];
253
+ if (i.Se & STATUS_PENDING && i.le?.source === i) {
213
254
  t = false;
214
255
  break;
215
256
  }
216
257
  }
217
- t && (e.te = true);
258
+ if (t) {
259
+ for (let n = 0; n < e.Y.length; n++) {
260
+ const i = e.Y[n];
261
+ if (hasActiveOverride(i) && "Se" in i && i.Se & STATUS_PENDING && i.le instanceof NotReadyError && i.le.source !== i) {
262
+ t = false;
263
+ break;
264
+ }
265
+ }
266
+ }
267
+ t && (e.$ = true);
218
268
  return t;
219
269
  }
220
270
  function currentTransition(e) {
221
- while (e.te && typeof e.te === "object") e = e.te;
271
+ while (e.$ && typeof e.$ === "object") e = e.$;
222
272
  return e;
223
273
  }
224
274
  function runInTransition(e, t) {
@@ -235,105 +285,198 @@ function getOrCreateLane(e) {
235
285
  if (t) {
236
286
  return findLane(t);
237
287
  }
238
- const n = e.de;
239
- const i = n?.ie ? findLane(n.ie) : null;
240
- t = { Te: e, U: /* @__PURE__ */ new Set(), W: [[], []], k: null, ne: activeTransition, Se: i };
288
+ const n = e.Re;
289
+ const i = n?.q ? findLane(n.q) : null;
290
+ t = { te: e, k: /* @__PURE__ */ new Set(), G: [[], []], U: null, K: activeTransition, Oe: i };
241
291
  signalLanes.set(e, t);
242
292
  activeLanes.add(t);
243
- e.Re = e.Oe || 0;
293
+ e._e = false;
244
294
  return t;
245
295
  }
246
296
  function findLane(e) {
247
- while (e.k) e = e.k;
297
+ while (e.U) e = e.U;
248
298
  return e;
249
299
  }
250
300
  function mergeLanes(e, t) {
251
301
  e = findLane(e);
252
302
  t = findLane(t);
253
303
  if (e === t) return e;
254
- t.k = e;
255
- for (const n of t.U) e.U.add(n);
256
- e.W[0].push(...t.W[0]);
257
- e.W[1].push(...t.W[1]);
304
+ t.U = e;
305
+ for (const n of t.k) e.k.add(n);
306
+ e.G[0].push(...t.G[0]);
307
+ e.G[1].push(...t.G[1]);
258
308
  return e;
259
309
  }
260
310
  function resolveLane(e) {
261
- const t = e.ie;
311
+ const t = e.q;
262
312
  if (!t) return void 0;
263
313
  const n = findLane(t);
264
314
  if (activeLanes.has(n)) return n;
265
- e.ie = void 0;
315
+ e.q = void 0;
266
316
  return void 0;
267
317
  }
318
+ function resolveTransition(e) {
319
+ return resolveLane(e)?.K ?? e.K;
320
+ }
268
321
  function hasActiveOverride(e) {
269
- return !!(e._e && e.ae !== NOT_PENDING);
322
+ return !!(e.ee !== void 0 && e.ee !== NOT_PENDING);
270
323
  }
271
324
  function assignOrMergeLane(e, t) {
272
325
  const n = findLane(t);
273
- const i = e.ie;
326
+ const i = e.q;
274
327
  if (i) {
275
- if (i.k) {
276
- e.ie = t;
328
+ if (i.U) {
329
+ e.q = t;
277
330
  return;
278
331
  }
279
332
  const r = findLane(i);
280
333
  if (activeLanes.has(r)) {
281
334
  if (r !== n && !hasActiveOverride(e)) {
282
- if (n.Se && findLane(n.Se) === r) {
283
- e.ie = t;
284
- } else if (r.Se && findLane(r.Se) === n) ;
335
+ if (n.Oe && findLane(n.Oe) === r) {
336
+ e.q = t;
337
+ } else if (r.Oe && findLane(r.Oe) === n) ;
285
338
  else mergeLanes(n, r);
286
339
  }
287
340
  return;
288
341
  }
289
342
  }
290
- e.ie = t;
343
+ e.q = t;
344
+ }
345
+ function addPendingSource(e, t) {
346
+ if (e.Ie === t || e.pe?.has(t)) return false;
347
+ if (!e.Ie) {
348
+ e.Ie = t;
349
+ return true;
350
+ }
351
+ if (!e.pe) {
352
+ e.pe = /* @__PURE__ */ new Set([e.Ie, t]);
353
+ } else {
354
+ e.pe.add(t);
355
+ }
356
+ e.Ie = void 0;
357
+ return true;
358
+ }
359
+ function removePendingSource(e, t) {
360
+ if (e.Ie) {
361
+ if (e.Ie !== t) return false;
362
+ e.Ie = void 0;
363
+ return true;
364
+ }
365
+ if (!e.pe?.delete(t)) return false;
366
+ if (e.pe.size === 1) {
367
+ e.Ie = e.pe.values().next().value;
368
+ e.pe = void 0;
369
+ } else if (e.pe.size === 0) {
370
+ e.pe = void 0;
371
+ }
372
+ return true;
373
+ }
374
+ function clearPendingSources(e) {
375
+ e.Ie = void 0;
376
+ e.pe?.clear();
377
+ e.pe = void 0;
378
+ }
379
+ function setPendingError(e, t, n) {
380
+ if (!t) {
381
+ e.le = null;
382
+ return;
383
+ }
384
+ if (n instanceof NotReadyError && n.source === t) {
385
+ e.le = n;
386
+ return;
387
+ }
388
+ const i = e.le;
389
+ if (!(i instanceof NotReadyError) || i.source !== t) {
390
+ e.le = new NotReadyError(t);
391
+ }
392
+ }
393
+ function forEachDependent(e, t) {
394
+ for (let n = e.I; n !== null; n = n.p) t(n.h);
395
+ for (let n = e.A; n !== null; n = n.N) {
396
+ for (let e2 = n.I; e2 !== null; e2 = e2.p) t(e2.h);
397
+ }
398
+ }
399
+ function settlePendingSource(e) {
400
+ let t = false;
401
+ const n = /* @__PURE__ */ new Set();
402
+ const settle = (i) => {
403
+ if (n.has(i) || !removePendingSource(i, e)) return;
404
+ n.add(i);
405
+ i.Ee = clock;
406
+ const r = i.Ie ?? i.pe?.values().next().value;
407
+ if (r) {
408
+ setPendingError(i, r);
409
+ updatePendingSignal(i);
410
+ } else {
411
+ i.Se &= ~STATUS_PENDING;
412
+ setPendingError(i);
413
+ updatePendingSignal(i);
414
+ if (i.he) {
415
+ if (i.W === EFFECT_TRACKED) {
416
+ const e2 = i;
417
+ if (!e2.H) {
418
+ e2.H = true;
419
+ e2.F.enqueue(EFFECT_USER, e2.M);
420
+ }
421
+ } else {
422
+ const e2 = i.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
423
+ if (e2.P > i.o) e2.P = i.o;
424
+ insertIntoHeap(i, e2);
425
+ }
426
+ t = true;
427
+ }
428
+ i.he = false;
429
+ }
430
+ forEachDependent(i, settle);
431
+ };
432
+ forEachDependent(e, settle);
433
+ if (t) schedule();
291
434
  }
292
435
  function handleAsync(e, t, n) {
293
436
  const i = typeof t === "object" && t !== null;
294
437
  const r = i && untrack(() => t[Symbol.asyncIterator]);
295
438
  const s = !r && i && untrack(() => typeof t.then === "function");
296
439
  if (!s && !r) {
297
- e.Ie = null;
440
+ e.Ae = null;
298
441
  return t;
299
442
  }
300
- e.Ie = t;
443
+ e.Ae = t;
301
444
  let o;
302
445
  const handleError = (n2) => {
303
- if (e.Ie !== t) return;
304
- globalQueue.initTransition(e.ne);
446
+ if (e.Ae !== t) return;
447
+ globalQueue.initTransition(resolveTransition(e));
305
448
  notifyStatus(e, n2 instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, n2);
306
- e.J = clock;
449
+ e.Ee = clock;
307
450
  };
308
451
  const asyncWrite = (i2, r2) => {
309
- if (e.Ie !== t) return;
452
+ if (e.Ae !== t) return;
310
453
  if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
311
- globalQueue.initTransition(e.ne);
454
+ globalQueue.initTransition(resolveTransition(e));
312
455
  clearStatus(e);
313
456
  const s2 = resolveLane(e);
314
- if (s2) s2.U.delete(e);
315
- if (e._e) {
316
- const t2 = e.ae !== NOT_PENDING;
317
- if (e.L) e.ae = i2;
318
- if (!t2) {
319
- e.fe = i2;
457
+ if (s2) s2.k.delete(e);
458
+ if (e.ee !== void 0) {
459
+ if (e.ee !== void 0 && e.ee !== NOT_PENDING) e.X = i2;
460
+ else {
461
+ e.J = i2;
320
462
  insertSubs(e);
321
463
  }
322
- e.J = clock;
464
+ e.Ee = clock;
323
465
  } else if (s2) {
324
- const t2 = e.fe;
325
- const n2 = e.pe;
466
+ const t2 = e.J;
467
+ const n2 = e.Ne;
326
468
  if (!n2 || !n2(i2, t2)) {
327
- e.fe = i2;
328
- e.J = clock;
329
- if (e.he) {
330
- setSignal(e.he, i2);
469
+ e.J = i2;
470
+ e.Ee = clock;
471
+ if (e.Pe) {
472
+ setSignal(e.Pe, i2);
331
473
  }
332
474
  insertSubs(e, true);
333
475
  }
334
476
  } else {
335
477
  setSignal(e, () => i2);
336
478
  }
479
+ settlePendingSource(e);
337
480
  schedule();
338
481
  flush();
339
482
  r2?.();
@@ -353,7 +496,7 @@ function handleAsync(e, t, n) {
353
496
  );
354
497
  i2 = false;
355
498
  if (!n2) {
356
- globalQueue.initTransition(e.ne);
499
+ globalQueue.initTransition(resolveTransition(e));
357
500
  throw new NotReadyError(context);
358
501
  }
359
502
  }
@@ -387,93 +530,65 @@ function handleAsync(e, t, n) {
387
530
  };
388
531
  const r2 = iterate();
389
532
  if (!i2 && !r2) {
390
- globalQueue.initTransition(e.ne);
533
+ globalQueue.initTransition(resolveTransition(e));
391
534
  throw new NotReadyError(context);
392
535
  }
393
536
  }
394
537
  return o;
395
538
  }
396
- function clearStatus(e) {
397
- e.Ee = e.Ee & STATUS_UNINITIALIZED;
398
- e.X = null;
539
+ function clearStatus(e, t = false) {
540
+ clearPendingSources(e);
541
+ e.he = false;
542
+ e.Se = t ? 0 : e.Se & STATUS_UNINITIALIZED;
543
+ setPendingError(e);
399
544
  updatePendingSignal(e);
400
- e.Ae?.();
545
+ e.ge?.();
401
546
  }
402
547
  function notifyStatus(e, t, n, i, r) {
403
548
  if (t === STATUS_ERROR && !(n instanceof StatusError) && !(n instanceof NotReadyError))
404
549
  n = new StatusError(e, n);
405
- const s = n instanceof NotReadyError && n.source === e;
406
- const o = t === STATUS_PENDING && e._e && !s;
407
- const u = o && hasActiveOverride(e);
550
+ const s = t === STATUS_PENDING && n instanceof NotReadyError ? n.source : void 0;
551
+ const o = s === e;
552
+ const u = t === STATUS_PENDING && e.ee !== void 0 && !o;
553
+ const c = u && hasActiveOverride(e);
408
554
  if (!i) {
409
- e.Ee = t | (t !== STATUS_ERROR ? e.Ee & STATUS_UNINITIALIZED : 0);
410
- e.X = n;
555
+ if (t === STATUS_PENDING && s) {
556
+ addPendingSource(e, s);
557
+ e.Se = STATUS_PENDING | e.Se & STATUS_UNINITIALIZED;
558
+ setPendingError(e, s, n);
559
+ } else {
560
+ clearPendingSources(e);
561
+ e.Se = t | (t !== STATUS_ERROR ? e.Se & STATUS_UNINITIALIZED : 0);
562
+ e.le = n;
563
+ }
411
564
  updatePendingSignal(e);
412
565
  }
413
566
  if (r && !i) {
414
567
  assignOrMergeLane(e, r);
415
568
  }
416
- if (u && activeTransition && n instanceof NotReadyError) {
417
- const e2 = n.source;
418
- if (!activeTransition.q.includes(e2)) {
419
- activeTransition.q.push(e2);
569
+ const a = i || c;
570
+ const f = i || u ? void 0 : r;
571
+ if (e.ge) {
572
+ if (i && t === STATUS_PENDING) {
573
+ return;
420
574
  }
421
- }
422
- const c = i || u;
423
- const l = i || o ? void 0 : r;
424
- if (e.Ae) {
425
- if (c) {
426
- e.Ae(t, n);
575
+ if (a) {
576
+ e.ge(t, n);
427
577
  } else {
428
- e.Ae();
578
+ e.ge();
429
579
  }
430
580
  return;
431
581
  }
432
- for (let i2 = e.I; i2 !== null; i2 = i2.p) {
433
- i2.h.J = clock;
434
- if (i2.h.X !== n) {
435
- !i2.h.ne && globalQueue.F.push(i2.h);
436
- notifyStatus(i2.h, t, n, c, l);
582
+ forEachDependent(e, (e2) => {
583
+ e2.Ee = clock;
584
+ if (t === STATUS_PENDING && s && e2.Ie !== s && !e2.pe?.has(s) || t !== STATUS_PENDING && (e2.le !== n || e2.Ie || e2.pe)) {
585
+ if (!a && !e2.K) globalQueue.se.push(e2);
586
+ notifyStatus(e2, t, n, a, f);
437
587
  }
438
- }
439
- for (let i2 = e.A; i2 !== null; i2 = i2.P) {
440
- for (let e2 = i2.I; e2 !== null; e2 = e2.p) {
441
- e2.h.J = clock;
442
- if (e2.h.X !== n) {
443
- !e2.h.ne && globalQueue.F.push(e2.h);
444
- notifyStatus(e2.h, t, n, c, l);
445
- }
446
- }
447
- }
448
- }
449
- function unlinkSubs(e) {
450
- const t = e.V;
451
- const n = e.D;
452
- const i = e.p;
453
- const r = e.Pe;
454
- if (i !== null) i.Pe = r;
455
- else t.Ne = r;
456
- if (r !== null) r.p = i;
457
- else {
458
- t.I = i;
459
- if (i === null) {
460
- t.ge?.();
461
- t.L && !t.Ce && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
462
- }
463
- }
464
- return n;
465
- }
466
- function unobserved(e) {
467
- deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
468
- let t = e.C;
469
- while (t !== null) {
470
- t = unlinkSubs(t);
471
- }
472
- e.C = null;
473
- disposeChildren(e, true);
588
+ });
474
589
  }
475
590
  function markDisposal(e) {
476
- let t = e.De;
591
+ let t = e.Ce;
477
592
  while (t) {
478
593
  t.O |= REACTIVE_ZOMBIE;
479
594
  if (t.O & REACTIVE_IN_HEAP) {
@@ -481,15 +596,15 @@ function markDisposal(e) {
481
596
  insertIntoHeap(t, zombieQueue);
482
597
  }
483
598
  markDisposal(t);
484
- t = t.ve;
599
+ t = t.De;
485
600
  }
486
601
  }
487
602
  function disposeChildren(e, t = false, n) {
488
603
  if (e.O & REACTIVE_DISPOSED) return;
489
604
  if (t) e.O = REACTIVE_DISPOSED;
490
- let i = n ? e.be : e.De;
605
+ let i = n ? e.me : e.Ce;
491
606
  while (i) {
492
- const e2 = i.ve;
607
+ const e2 = i.De;
493
608
  if (i.C) {
494
609
  const e3 = i;
495
610
  deleteFromHeap(e3, e3.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
@@ -504,16 +619,15 @@ function disposeChildren(e, t = false, n) {
504
619
  i = e2;
505
620
  }
506
621
  if (n) {
507
- e.be = null;
622
+ e.me = null;
508
623
  } else {
509
- e.De = null;
510
- e.ve = null;
511
- e.we = 0;
624
+ e.Ce = null;
625
+ e.ve = 0;
512
626
  }
513
627
  runDisposal(e, n);
514
628
  }
515
629
  function runDisposal(e, t) {
516
- let n = t ? e.Ve : e.me;
630
+ let n = t ? e.we : e.be;
517
631
  if (!n) return;
518
632
  if (Array.isArray(n)) {
519
633
  for (let e2 = 0; e2 < n.length; e2++) {
@@ -523,36 +637,62 @@ function runDisposal(e, t) {
523
637
  } else {
524
638
  n.call(n);
525
639
  }
526
- t ? e.Ve = null : e.me = null;
640
+ t ? e.we = null : e.be = null;
641
+ }
642
+ function unlinkSubs(e) {
643
+ const t = e.m;
644
+ const n = e.D;
645
+ const i = e.p;
646
+ const r = e.Ue;
647
+ if (i !== null) i.Ue = r;
648
+ else t.ke = r;
649
+ if (r !== null) r.p = i;
650
+ else {
651
+ t.I = i;
652
+ if (i === null) {
653
+ t.Ge?.();
654
+ t.L && !t.xe && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
655
+ }
656
+ }
657
+ return n;
658
+ }
659
+ function unobserved(e) {
660
+ deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
661
+ let t = e.C;
662
+ while (t !== null) {
663
+ t = unlinkSubs(t);
664
+ }
665
+ e.C = null;
666
+ disposeChildren(e, true);
527
667
  }
528
668
  function recompute(e, t = false) {
529
- const n = e.oe;
669
+ const n = e.W;
530
670
  if (!t) {
531
- if (e.ne && (!n || activeTransition) && activeTransition !== e.ne)
532
- globalQueue.initTransition(e.ne);
671
+ if (e.K && (!n || activeTransition) && activeTransition !== e.K)
672
+ globalQueue.initTransition(e.K);
533
673
  deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
534
- if (e.ne || n === EFFECT_TRACKED) disposeChildren(e);
674
+ if (e.K || n === EFFECT_TRACKED) disposeChildren(e);
535
675
  else {
536
676
  markDisposal(e);
537
- e.Ve = e.me;
538
- e.be = e.De;
539
- e.me = null;
540
- e.De = null;
541
- e.we = 0;
677
+ e.we = e.be;
678
+ e.me = e.Ce;
679
+ e.be = null;
680
+ e.Ce = null;
681
+ e.ve = 0;
542
682
  }
543
683
  }
544
684
  const i = !!(e.O & REACTIVE_OPTIMISTIC_DIRTY);
545
- const r = hasActiveOverride(e);
546
- const s = !!(e.Ee & STATUS_PENDING);
685
+ const r = e.ee !== void 0 && e.ee !== NOT_PENDING;
686
+ const s = !!(e.Se & STATUS_PENDING);
547
687
  const o = context;
548
688
  context = e;
549
689
  e.ye = null;
550
690
  e.O = REACTIVE_RECOMPUTING_DEPS;
551
- e.J = clock;
552
- let u = e.ae === NOT_PENDING ? e.fe : e.ae;
691
+ e.Ee = clock;
692
+ let u = e.X === NOT_PENDING ? e.J : e.X;
553
693
  let c = e.o;
554
- let l = tracking;
555
- let a = currentOptimisticLane;
694
+ let a = tracking;
695
+ let f = currentOptimisticLane;
556
696
  tracking = true;
557
697
  if (i) {
558
698
  const t2 = resolveLane(e);
@@ -560,148 +700,153 @@ function recompute(e, t = false) {
560
700
  }
561
701
  try {
562
702
  u = handleAsync(e, e.L(u));
563
- clearStatus(e);
564
- const t2 = resolveLane(e);
565
- if (t2) {
566
- t2.U.delete(e);
567
- updatePendingSignal(t2.Te);
703
+ clearStatus(e, t);
704
+ const n2 = resolveLane(e);
705
+ if (n2) {
706
+ n2.k.delete(e);
707
+ updatePendingSignal(n2.te);
568
708
  }
569
709
  } catch (t2) {
570
710
  if (t2 instanceof NotReadyError && currentOptimisticLane) {
571
711
  const t3 = findLane(currentOptimisticLane);
572
- if (t3.Te !== e) {
573
- t3.U.add(e);
574
- e.ie = t3;
575
- updatePendingSignal(t3.Te);
712
+ if (t3.te !== e) {
713
+ t3.k.add(e);
714
+ e.q = t3;
715
+ updatePendingSignal(t3.te);
576
716
  }
577
717
  }
718
+ if (t2 instanceof NotReadyError) e.he = true;
578
719
  notifyStatus(
579
720
  e,
580
721
  t2 instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR,
581
722
  t2,
582
723
  void 0,
583
- t2 instanceof NotReadyError ? e.ie : void 0
724
+ t2 instanceof NotReadyError ? e.q : void 0
584
725
  );
585
726
  } finally {
586
- tracking = l;
727
+ tracking = a;
587
728
  e.O = REACTIVE_NONE | (t ? e.O & REACTIVE_SNAPSHOT_STALE : 0);
588
729
  context = o;
589
730
  }
590
- if (!e.X) {
731
+ if (!e.le) {
591
732
  const o2 = e.ye;
592
- let l2 = o2 !== null ? o2.D : e.C;
593
- if (l2 !== null) {
733
+ let a2 = o2 !== null ? o2.D : e.C;
734
+ if (a2 !== null) {
594
735
  do {
595
- l2 = unlinkSubs(l2);
596
- } while (l2 !== null);
736
+ a2 = unlinkSubs(a2);
737
+ } while (a2 !== null);
597
738
  if (o2 !== null) o2.D = null;
598
739
  else e.C = null;
599
740
  }
600
- const a2 = r ? e.fe : e.ae === NOT_PENDING ? e.fe : e.ae;
601
- const f = !e.pe || !e.pe(a2, u);
602
- if (f) {
603
- const o3 = r ? e.fe : void 0;
604
- if (t || n && activeTransition !== e.ne || i) e.fe = u;
605
- else e.ae = u;
606
- if (r && !i && s) {
607
- const t2 = e.Oe || 0;
608
- const n2 = e.Re || 0;
609
- if (t2 <= n2) e.fe = u;
610
- }
611
- if (!r || i || e.fe !== o3) {
612
- insertSubs(e, i || r);
613
- }
741
+ const f2 = r ? e.ee : e.X === NOT_PENDING ? e.J : e.X;
742
+ const l = !e.Ne || !e.Ne(f2, u);
743
+ if (l) {
744
+ const o3 = r ? e.ee : void 0;
745
+ if (t || n && activeTransition !== e.K || i) {
746
+ e.J = u;
747
+ if (r && i) {
748
+ e.ee = u;
749
+ e.X = u;
750
+ }
751
+ } else e.X = u;
752
+ if (r && !i && s && !e._e) e.ee = u;
753
+ if (!r || i || e.ee !== o3) insertSubs(e, i || r);
614
754
  } else if (r) {
615
- e.ae = u;
755
+ e.X = u;
616
756
  } else if (e.o != c) {
617
757
  for (let t2 = e.I; t2 !== null; t2 = t2.p) {
618
758
  insertIntoHeapHeight(t2.h, t2.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
619
759
  }
620
760
  }
621
761
  }
622
- currentOptimisticLane = a;
623
- (!t || e.Ee & STATUS_PENDING) && !e.ne && !(activeTransition && e._e) && globalQueue.F.push(e);
624
- e.ne && n && activeTransition !== e.ne && runInTransition(e.ne, () => recompute(e));
762
+ currentOptimisticLane = f;
763
+ (!t || e.Se & STATUS_PENDING) && !e.K && !(activeTransition && r) && globalQueue.se.push(e);
764
+ e.K && n && activeTransition !== e.K && runInTransition(e.K, () => recompute(e));
625
765
  }
626
766
  function untrack(e, t) {
627
- if (!tracking && true) return e();
767
+ if (!externalSourceConfig && !tracking && true) return e();
628
768
  const n = tracking;
629
769
  tracking = false;
630
770
  try {
771
+ if (externalSourceConfig) return externalSourceConfig.untrack(e);
631
772
  return e();
632
773
  } finally {
633
774
  tracking = n;
634
775
  }
635
776
  }
636
777
  function setSignal(e, t) {
637
- if (e.ne && activeTransition !== e.ne) globalQueue.initTransition(e.ne);
638
- const n = e._e && !projectionWriteActive;
639
- const i = n ? e.fe : e.ae === NOT_PENDING ? e.fe : e.ae;
640
- if (typeof t === "function") t = t(i);
641
- const r = !e.pe || !e.pe(i, t) || !!(e.Ee & STATUS_UNINITIALIZED);
642
- if (!r) {
643
- if (n && e.ae !== NOT_PENDING && e.L) {
778
+ if (e.K && activeTransition !== e.K) globalQueue.initTransition(e.K);
779
+ const n = e.ee !== void 0 && !projectionWriteActive;
780
+ const i = e.ee !== void 0 && e.ee !== NOT_PENDING;
781
+ const r = n ? i ? e.ee : e.J : e.X === NOT_PENDING ? e.J : e.X;
782
+ if (typeof t === "function") t = t(r);
783
+ const s = !e.Ne || !e.Ne(r, t) || !!(e.Se & STATUS_UNINITIALIZED);
784
+ if (!s) {
785
+ if (n && i && e.L) {
644
786
  insertSubs(e, true);
645
787
  schedule();
646
788
  }
647
789
  return t;
648
790
  }
649
791
  if (n) {
650
- const n2 = globalQueue.$.includes(e);
651
- if (e.ne && n2) {
652
- globalQueue.initTransition(e.ne);
653
- }
654
- if (e.ae === NOT_PENDING) {
655
- e.ae = e.fe;
656
- }
657
- if (!n2) {
658
- globalQueue.$.push(e);
792
+ const n2 = e.ee === NOT_PENDING;
793
+ if (!n2) globalQueue.initTransition(resolveTransition(e));
794
+ if (n2) {
795
+ e.X = e.J;
796
+ globalQueue.Y.push(e);
659
797
  }
660
- e.Oe = (e.Oe || 0) + 1;
798
+ e._e = true;
661
799
  const i2 = getOrCreateLane(e);
662
- e.ie = i2;
663
- e.fe = t;
800
+ e.q = i2;
801
+ e.ee = t;
664
802
  } else {
665
- if (e.ae === NOT_PENDING) globalQueue.F.push(e);
666
- e.ae = t;
803
+ if (e.X === NOT_PENDING) globalQueue.se.push(e);
804
+ e.X = t;
667
805
  }
668
806
  updatePendingSignal(e);
669
- if (e.he) {
670
- setSignal(e.he, t);
807
+ if (e.Pe) {
808
+ setSignal(e.Pe, t);
671
809
  }
672
- e.J = clock;
810
+ e.Ee = clock;
673
811
  insertSubs(e, n);
674
812
  schedule();
675
813
  return t;
676
814
  }
677
815
  function computePendingState(e) {
678
816
  const t = e;
679
- if (e._e && e.ae !== NOT_PENDING) {
680
- if (t.Ee & STATUS_PENDING && !(t.Ee & STATUS_UNINITIALIZED)) return true;
681
- if (e.de) {
682
- const t2 = e.ie ? findLane(e.ie) : null;
683
- return !!(t2 && t2.U.size > 0);
817
+ const n = e.V;
818
+ if (n && e.X !== NOT_PENDING) {
819
+ return !n.Ae && !(n.Se & STATUS_PENDING);
820
+ }
821
+ if (e.ee !== void 0 && e.ee !== NOT_PENDING) {
822
+ if (t.Se & STATUS_PENDING && !(t.Se & STATUS_UNINITIALIZED)) return true;
823
+ if (e.Re) {
824
+ const t2 = e.q ? findLane(e.q) : null;
825
+ return !!(t2 && t2.k.size > 0);
684
826
  }
685
827
  return true;
686
828
  }
687
- if (e.ae !== NOT_PENDING && !(t.Ee & STATUS_UNINITIALIZED)) return true;
688
- return !!(t.Ee & STATUS_PENDING && !(t.Ee & STATUS_UNINITIALIZED));
829
+ if (e.ee !== void 0 && e.ee === NOT_PENDING && !e.Re) {
830
+ return false;
831
+ }
832
+ if (e.X !== NOT_PENDING && !(t.Se & STATUS_UNINITIALIZED)) return true;
833
+ return !!(t.Se & STATUS_PENDING && !(t.Se & STATUS_UNINITIALIZED));
689
834
  }
690
835
  function updatePendingSignal(e) {
691
- if (e.Me) {
836
+ if (e.Qe) {
692
837
  const t = computePendingState(e);
693
- const n = e.Me;
838
+ const n = e.Qe;
694
839
  setSignal(n, t);
695
- if (!t && n.ie) {
840
+ if (!t && n.q) {
696
841
  const t2 = resolveLane(e);
697
- if (t2 && t2.U.size > 0) {
698
- const e2 = findLane(n.ie);
842
+ if (t2 && t2.k.size > 0) {
843
+ const e2 = findLane(n.q);
699
844
  if (e2 !== t2) {
700
845
  mergeLanes(t2, e2);
701
846
  }
702
847
  }
703
848
  signalLanes.delete(n);
704
- n.ie = void 0;
849
+ n.q = void 0;
705
850
  }
706
851
  }
707
852
  }
@@ -760,9 +905,9 @@ function updatePath(e, t, n = 0) {
760
905
  e[i] = s;
761
906
  }
762
907
  }
763
- var NotReadyError, StatusError, REACTIVE_NONE, REACTIVE_CHECK, REACTIVE_DIRTY, REACTIVE_RECOMPUTING_DEPS, REACTIVE_IN_HEAP, REACTIVE_IN_HEAP_HEIGHT, REACTIVE_ZOMBIE, REACTIVE_DISPOSED, REACTIVE_OPTIMISTIC_DIRTY, REACTIVE_SNAPSHOT_STALE, STATUS_PENDING, STATUS_ERROR, STATUS_UNINITIALIZED, EFFECT_RENDER, EFFECT_USER, EFFECT_TRACKED, NOT_PENDING, transitions, dirtyQueue, zombieQueue, clock, activeTransition, scheduled, projectionWriteActive, Queue, GlobalQueue, globalQueue, signalLanes, activeLanes, tracking, context, currentOptimisticLane, DELETE;
908
+ var NotReadyError, StatusError, REACTIVE_NONE, REACTIVE_CHECK, REACTIVE_DIRTY, REACTIVE_RECOMPUTING_DEPS, REACTIVE_IN_HEAP, REACTIVE_IN_HEAP_HEIGHT, REACTIVE_ZOMBIE, REACTIVE_DISPOSED, REACTIVE_OPTIMISTIC_DIRTY, REACTIVE_SNAPSHOT_STALE, STATUS_PENDING, STATUS_ERROR, STATUS_UNINITIALIZED, EFFECT_RENDER, EFFECT_USER, EFFECT_TRACKED, NOT_PENDING, transitions, dirtyQueue, zombieQueue, clock, activeTransition, scheduled, projectionWriteActive, stashedOptimisticReads, Queue, GlobalQueue, globalQueue, signalLanes, activeLanes, externalSourceConfig, tracking, context, currentOptimisticLane, DELETE;
764
909
  var init_prod = __esm({
765
- "../../node_modules/.pnpm/@solidjs+signals@0.12.0/node_modules/@solidjs/signals/dist/prod.js"() {
910
+ "../../node_modules/.pnpm/@solidjs+signals@0.13.6/node_modules/@solidjs/signals/dist/prod.js"() {
766
911
  NotReadyError = class extends Error {
767
912
  source;
768
913
  constructor(e) {
@@ -795,25 +940,26 @@ var init_prod = __esm({
795
940
  EFFECT_TRACKED = 3;
796
941
  NOT_PENDING = {};
797
942
  transitions = /* @__PURE__ */ new Set();
798
- dirtyQueue = { l: new Array(2e3).fill(void 0), _: false, N: 0, R: 0 };
799
- zombieQueue = { l: new Array(2e3).fill(void 0), _: false, N: 0, R: 0 };
943
+ dirtyQueue = { l: new Array(2e3).fill(void 0), _: false, P: 0, R: 0 };
944
+ zombieQueue = { l: new Array(2e3).fill(void 0), _: false, P: 0, R: 0 };
800
945
  clock = 0;
801
946
  activeTransition = null;
802
947
  scheduled = false;
803
948
  projectionWriteActive = false;
949
+ stashedOptimisticReads = null;
804
950
  Queue = class {
805
951
  i = null;
806
- G = [[], []];
807
- M = [];
952
+ ie = [[], []];
953
+ re = [];
808
954
  created = clock;
809
955
  addChild(e) {
810
- this.M.push(e);
956
+ this.re.push(e);
811
957
  e.i = this;
812
958
  }
813
959
  removeChild(e) {
814
- const t = this.M.indexOf(e);
960
+ const t = this.re.indexOf(e);
815
961
  if (t >= 0) {
816
- this.M.splice(t, 1);
962
+ this.re.splice(t, 1);
817
963
  e.i = null;
818
964
  }
819
965
  }
@@ -822,107 +968,123 @@ var init_prod = __esm({
822
968
  return false;
823
969
  }
824
970
  run(e) {
825
- if (this.G[e - 1].length) {
826
- const t = this.G[e - 1];
827
- this.G[e - 1] = [];
971
+ if (this.ie[e - 1].length) {
972
+ const t = this.ie[e - 1];
973
+ this.ie[e - 1] = [];
828
974
  runQueue(t, e);
829
975
  }
830
- for (let t = 0; t < this.M.length; t++) this.M[t].run?.(e);
976
+ for (let t = 0; t < this.re.length; t++) this.re[t].run?.(e);
831
977
  }
832
978
  enqueue(e, t) {
833
979
  if (e) {
834
980
  if (currentOptimisticLane) {
835
981
  const n = findLane(currentOptimisticLane);
836
- n.W[e - 1].push(t);
982
+ n.G[e - 1].push(t);
837
983
  } else {
838
- this.G[e - 1].push(t);
984
+ this.ie[e - 1].push(t);
839
985
  }
840
986
  }
841
987
  schedule();
842
988
  }
843
989
  stashQueues(e) {
844
- e.G[0].push(...this.G[0]);
845
- e.G[1].push(...this.G[1]);
846
- this.G = [[], []];
847
- for (let t = 0; t < this.M.length; t++) {
848
- let n = this.M[t];
849
- let i = e.M[t];
990
+ e.ie[0].push(...this.ie[0]);
991
+ e.ie[1].push(...this.ie[1]);
992
+ this.ie = [[], []];
993
+ for (let t = 0; t < this.re.length; t++) {
994
+ let n = this.re[t];
995
+ let i = e.re[t];
850
996
  if (!i) {
851
- i = { G: [[], []], M: [] };
852
- e.M[t] = i;
997
+ i = { ie: [[], []], re: [] };
998
+ e.re[t] = i;
853
999
  }
854
1000
  n.stashQueues(i);
855
1001
  }
856
1002
  }
857
1003
  restoreQueues(e) {
858
- this.G[0].push(...e.G[0]);
859
- this.G[1].push(...e.G[1]);
860
- for (let t = 0; t < e.M.length; t++) {
861
- const n = e.M[t];
862
- let i = this.M[t];
1004
+ this.ie[0].push(...e.ie[0]);
1005
+ this.ie[1].push(...e.ie[1]);
1006
+ for (let t = 0; t < e.re.length; t++) {
1007
+ const n = e.re[t];
1008
+ let i = this.re[t];
863
1009
  if (i) i.restoreQueues(n);
864
1010
  }
865
1011
  }
866
1012
  };
867
1013
  GlobalQueue = class _GlobalQueue extends Queue {
868
- H = false;
869
- F = [];
870
- $ = [];
871
- j = /* @__PURE__ */ new Set();
872
- static K;
873
- static Y;
874
- static Z = null;
1014
+ ne = false;
1015
+ se = [];
1016
+ Y = [];
1017
+ Z = /* @__PURE__ */ new Set();
1018
+ static oe;
1019
+ static ue;
1020
+ static ce = null;
875
1021
  flush() {
876
- if (this.H) return;
877
- this.H = true;
1022
+ if (this.ne) return;
1023
+ this.ne = true;
878
1024
  try {
879
- runHeap(dirtyQueue, _GlobalQueue.K);
1025
+ runHeap(dirtyQueue, _GlobalQueue.oe);
880
1026
  if (activeTransition) {
881
1027
  const e = transitionComplete(activeTransition);
882
1028
  if (!e) {
883
- let e2 = activeTransition;
884
- runHeap(zombieQueue, _GlobalQueue.K);
885
- this.F = [];
886
- this.$ = [];
887
- this.j = /* @__PURE__ */ new Set();
1029
+ const e2 = activeTransition;
1030
+ runHeap(zombieQueue, _GlobalQueue.oe);
1031
+ this.se = [];
1032
+ this.Y = [];
1033
+ this.Z = /* @__PURE__ */ new Set();
888
1034
  runLaneEffects(EFFECT_RENDER);
889
1035
  runLaneEffects(EFFECT_USER);
890
- this.stashQueues(activeTransition.B);
1036
+ this.stashQueues(e2.ae);
891
1037
  clock++;
892
- scheduled = dirtyQueue.R >= dirtyQueue.N;
893
- reassignPendingTransition(activeTransition.F);
1038
+ scheduled = dirtyQueue.R >= dirtyQueue.P;
1039
+ reassignPendingTransition(e2.se);
894
1040
  activeTransition = null;
895
- finalizePureQueue(null, true);
1041
+ if (!e2.j.length && e2.Y.length) {
1042
+ stashedOptimisticReads = /* @__PURE__ */ new Set();
1043
+ for (let t2 = 0; t2 < e2.Y.length; t2++) {
1044
+ const n = e2.Y[t2];
1045
+ if (n.L || n.fe) continue;
1046
+ stashedOptimisticReads.add(n);
1047
+ queueStashedOptimisticEffects(n);
1048
+ }
1049
+ }
1050
+ try {
1051
+ finalizePureQueue(null, true);
1052
+ } finally {
1053
+ stashedOptimisticReads = null;
1054
+ }
896
1055
  return;
897
1056
  }
898
- this.F !== activeTransition.F && this.F.push(...activeTransition.F);
899
- this.restoreQueues(activeTransition.B);
1057
+ this.se !== activeTransition.se && this.se.push(...activeTransition.se);
1058
+ this.restoreQueues(activeTransition.ae);
900
1059
  transitions.delete(activeTransition);
901
1060
  const t = activeTransition;
902
1061
  activeTransition = null;
903
- reassignPendingTransition(this.F);
1062
+ reassignPendingTransition(this.se);
904
1063
  finalizePureQueue(t);
905
1064
  } else {
906
- if (transitions.size) runHeap(zombieQueue, _GlobalQueue.K);
1065
+ if (transitions.size) runHeap(zombieQueue, _GlobalQueue.oe);
907
1066
  finalizePureQueue();
908
1067
  }
909
1068
  clock++;
910
- scheduled = dirtyQueue.R >= dirtyQueue.N;
1069
+ scheduled = dirtyQueue.R >= dirtyQueue.P;
911
1070
  runLaneEffects(EFFECT_RENDER);
912
1071
  this.run(EFFECT_RENDER);
913
1072
  runLaneEffects(EFFECT_USER);
914
1073
  this.run(EFFECT_USER);
915
1074
  } finally {
916
- this.H = false;
1075
+ this.ne = false;
917
1076
  }
918
1077
  }
919
1078
  notify(e, t, n, i) {
920
1079
  if (t & STATUS_PENDING) {
921
1080
  if (n & STATUS_PENDING) {
922
- const t2 = i !== void 0 ? i : e.X;
923
- if (activeTransition && t2 && !activeTransition.q.includes(t2.source)) {
924
- activeTransition.q.push(t2.source);
925
- schedule();
1081
+ const t2 = i !== void 0 ? i : e.le;
1082
+ if (activeTransition && t2) {
1083
+ const e2 = t2.source;
1084
+ if (!activeTransition.B.includes(e2)) {
1085
+ activeTransition.B.push(e2);
1086
+ schedule();
1087
+ }
926
1088
  }
927
1089
  }
928
1090
  return true;
@@ -932,58 +1094,57 @@ var init_prod = __esm({
932
1094
  initTransition(e) {
933
1095
  if (e) e = currentTransition(e);
934
1096
  if (e && e === activeTransition) return;
935
- if (!e && activeTransition && activeTransition.J === clock) return;
1097
+ if (!e && activeTransition && activeTransition.Ee === clock) return;
936
1098
  if (!activeTransition) {
937
1099
  activeTransition = e ?? {
938
- J: clock,
939
- F: [],
940
- q: [],
941
- $: [],
942
- j: /* @__PURE__ */ new Set(),
943
- ee: [],
944
- B: { G: [[], []], M: [] },
945
- te: false
1100
+ Ee: clock,
1101
+ se: [],
1102
+ B: [],
1103
+ Y: [],
1104
+ Z: /* @__PURE__ */ new Set(),
1105
+ j: [],
1106
+ ae: { ie: [[], []], re: [] },
1107
+ $: false
946
1108
  };
947
1109
  } else if (e) {
948
1110
  const t = activeTransition;
949
- t.te = e;
950
- e.ee.push(...t.ee);
951
- for (const n of activeLanes) {
952
- if (n.ne === t) n.ne = e;
953
- }
954
- e.$.push(...t.$);
955
- for (const n of t.j) {
956
- e.j.add(n);
957
- }
1111
+ mergeTransitionState(e, t);
958
1112
  transitions.delete(t);
959
1113
  activeTransition = e;
960
1114
  }
961
1115
  transitions.add(activeTransition);
962
- activeTransition.J = clock;
963
- for (let e2 = 0; e2 < this.F.length; e2++) {
964
- const t = this.F[e2];
965
- t.ne = activeTransition;
966
- activeTransition.F.push(t);
1116
+ activeTransition.Ee = clock;
1117
+ if (this.se !== activeTransition.se) {
1118
+ for (let e2 = 0; e2 < this.se.length; e2++) {
1119
+ const t = this.se[e2];
1120
+ t.K = activeTransition;
1121
+ activeTransition.se.push(t);
1122
+ }
1123
+ this.se = activeTransition.se;
967
1124
  }
968
- this.F = activeTransition.F;
969
- for (let e2 = 0; e2 < this.$.length; e2++) {
970
- const t = this.$[e2];
971
- t.ne = activeTransition;
972
- activeTransition.$.push(t);
1125
+ if (this.Y !== activeTransition.Y) {
1126
+ for (let e2 = 0; e2 < this.Y.length; e2++) {
1127
+ const t = this.Y[e2];
1128
+ t.K = activeTransition;
1129
+ activeTransition.Y.push(t);
1130
+ }
1131
+ this.Y = activeTransition.Y;
973
1132
  }
974
- this.$ = activeTransition.$;
975
1133
  for (const e2 of activeLanes) {
976
- if (!e2.ne) e2.ne = activeTransition;
1134
+ if (!e2.K) e2.K = activeTransition;
1135
+ }
1136
+ if (this.Z !== activeTransition.Z) {
1137
+ for (const e2 of this.Z) activeTransition.Z.add(e2);
1138
+ this.Z = activeTransition.Z;
977
1139
  }
978
- for (const e2 of this.j) activeTransition.j.add(e2);
979
- this.j = activeTransition.j;
980
1140
  }
981
1141
  };
982
1142
  globalQueue = new GlobalQueue();
983
1143
  signalLanes = /* @__PURE__ */ new WeakMap();
984
1144
  activeLanes = /* @__PURE__ */ new Set();
985
- GlobalQueue.K = recompute;
986
- GlobalQueue.Y = disposeChildren;
1145
+ externalSourceConfig = null;
1146
+ GlobalQueue.oe = recompute;
1147
+ GlobalQueue.ue = disposeChildren;
987
1148
  tracking = false;
988
1149
  context = null;
989
1150
  currentOptimisticLane = null;
@@ -1042,7 +1203,7 @@ function isHydrating(node) {
1042
1203
  }
1043
1204
  var effect, isServer, isDev;
1044
1205
  var init_web = __esm({
1045
- "../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.2_@solidjs+signals@0.12.0_solid-js@2.0.0-beta.2/node_modules/@solidjs/web/dist/web.js"() {
1206
+ "../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.4_@solidjs+signals@0.13.6_solid-js@2.0.0-beta.4/node_modules/@solidjs/web/dist/web.js"() {
1046
1207
  init_prod();
1047
1208
  effect = (fn, effectFn, initial) => solidJs.createRenderEffect(fn, effectFn, initial, {
1048
1209
  transparent: true
@@ -1097,9 +1258,18 @@ function SolidQueryDevtools(props) {
1097
1258
  solidJs.createEffect(() => props.theme, (theme) => {
1098
1259
  devtools.setTheme(theme || "system");
1099
1260
  });
1100
- solidJs.onSettled(() => {
1261
+ let isMounted = false;
1262
+ let isDisposed = false;
1263
+ queueMicrotask(() => {
1264
+ if (isDisposed) return;
1101
1265
  devtools.mount(ref2);
1102
- solidJs.onCleanup(() => devtools.unmount());
1266
+ isMounted = true;
1267
+ });
1268
+ solidJs.onCleanup(() => {
1269
+ isDisposed = true;
1270
+ if (isMounted) {
1271
+ devtools.unmount();
1272
+ }
1103
1273
  });
1104
1274
  return (() => {
1105
1275
  var _el$ = _tmpl$();
@@ -1160,9 +1330,18 @@ function SolidQueryDevtoolsPanel(props) {
1160
1330
  solidJs.createEffect(() => props.theme, (theme) => {
1161
1331
  devtools.setTheme(theme || "system");
1162
1332
  });
1163
- solidJs.onSettled(() => {
1333
+ let isMounted = false;
1334
+ let isDisposed = false;
1335
+ queueMicrotask(() => {
1336
+ if (isDisposed) return;
1164
1337
  devtools.mount(ref2);
1165
- solidJs.onCleanup(() => devtools.unmount());
1338
+ isMounted = true;
1339
+ });
1340
+ solidJs.onCleanup(() => {
1341
+ isDisposed = true;
1342
+ if (isMounted) {
1343
+ devtools.unmount();
1344
+ }
1166
1345
  });
1167
1346
  return (() => {
1168
1347
  var _el$ = _tmpl$2();