@tanstack/solid-query-devtools 6.0.0-beta.3 → 6.0.0-beta.4

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/dev.cjs CHANGED
@@ -13,1224 +13,15 @@ var __export = (target, all) => {
13
13
  for (var name in all)
14
14
  __defProp(target, name, { get: all[name], enumerable: true });
15
15
  };
16
-
17
- // ../../node_modules/.pnpm/@solidjs+signals@0.13.9/node_modules/@solidjs/signals/dist/dev.js
18
- function actualInsertIntoHeap(n, heap) {
19
- const parentHeight = (n._parent?._root ? n._parent._parentComputed?._height : n._parent?._height) ?? -1;
20
- if (parentHeight >= n._height) n._height = parentHeight + 1;
21
- const height = n._height;
22
- const heapAtHeight = heap._heap[height];
23
- if (heapAtHeight === void 0) heap._heap[height] = n;
24
- else {
25
- const tail = heapAtHeight._prevHeap;
26
- tail._nextHeap = n;
27
- n._prevHeap = tail;
28
- heapAtHeight._prevHeap = n;
29
- }
30
- if (height > heap._max) heap._max = height;
31
- }
32
- function insertIntoHeap(n, heap) {
33
- let flags = n._flags;
34
- if (flags & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS)) return;
35
- if (flags & REACTIVE_CHECK) {
36
- n._flags = flags & -4 | REACTIVE_DIRTY | REACTIVE_IN_HEAP;
37
- } else n._flags = flags | REACTIVE_IN_HEAP;
38
- if (!(flags & REACTIVE_IN_HEAP_HEIGHT)) actualInsertIntoHeap(n, heap);
39
- }
40
- function insertIntoHeapHeight(n, heap) {
41
- let flags = n._flags;
42
- if (flags & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS | REACTIVE_IN_HEAP_HEIGHT)) return;
43
- n._flags = flags | REACTIVE_IN_HEAP_HEIGHT;
44
- actualInsertIntoHeap(n, heap);
45
- }
46
- function deleteFromHeap(n, heap) {
47
- const flags = n._flags;
48
- if (!(flags & (REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT))) return;
49
- n._flags = flags & -25;
50
- const height = n._height;
51
- if (n._prevHeap === n) heap._heap[height] = void 0;
52
- else {
53
- const next = n._nextHeap;
54
- const dhh = heap._heap[height];
55
- const end = next ?? dhh;
56
- if (n === dhh) heap._heap[height] = next;
57
- else n._prevHeap._nextHeap = next;
58
- end._prevHeap = n._prevHeap;
59
- }
60
- n._prevHeap = n;
61
- n._nextHeap = void 0;
62
- }
63
- function runHeap(heap, recompute2) {
64
- heap._marked = false;
65
- for (heap._min = 0; heap._min <= heap._max; heap._min++) {
66
- let el = heap._heap[heap._min];
67
- while (el !== void 0) {
68
- if (el._flags & REACTIVE_IN_HEAP) recompute2(el);
69
- else adjustHeight(el, heap);
70
- el = heap._heap[heap._min];
71
- }
72
- }
73
- heap._max = 0;
74
- }
75
- function adjustHeight(el, heap) {
76
- deleteFromHeap(el, heap);
77
- let newHeight = el._height;
78
- for (let d = el._deps; d; d = d._nextDep) {
79
- const dep1 = d._dep;
80
- const dep = dep1._firewall || dep1;
81
- if (dep._fn && dep._height >= newHeight) newHeight = dep._height + 1;
82
- }
83
- if (el._height !== newHeight) {
84
- el._height = newHeight;
85
- for (let s = el._subs; s !== null; s = s._nextSub) {
86
- insertIntoHeapHeight(s._sub, heap);
87
- }
88
- }
89
- }
90
- function runLaneEffects(type) {
91
- for (const lane of activeLanes) {
92
- if (lane._mergedInto || lane._pendingAsync.size > 0) continue;
93
- const effects = lane._effectQueues[type - 1];
94
- if (effects.length) {
95
- lane._effectQueues[type - 1] = [];
96
- runQueue(effects, type);
97
- }
98
- }
99
- }
100
- function queueStashedOptimisticEffects(node) {
101
- for (let s = node._subs; s !== null; s = s._nextSub) {
102
- const sub = s._sub;
103
- if (!sub._type) continue;
104
- if (sub._type === EFFECT_TRACKED) {
105
- if (!sub._modified) {
106
- sub._modified = true;
107
- sub._queue.enqueue(EFFECT_USER, sub._run);
108
- }
109
- continue;
110
- }
111
- const queue = sub._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
112
- if (queue._min > sub._height) queue._min = sub._height;
113
- insertIntoHeap(sub, queue);
114
- }
115
- }
116
- function mergeTransitionState(target, outgoing) {
117
- outgoing._done = target;
118
- target._actions.push(...outgoing._actions);
119
- for (const lane of activeLanes) {
120
- if (lane._transition === outgoing) lane._transition = target;
121
- }
122
- target._optimisticNodes.push(...outgoing._optimisticNodes);
123
- for (const store of outgoing._optimisticStores) target._optimisticStores.add(store);
124
- for (const node of outgoing._asyncNodes) {
125
- if (!target._asyncNodes.includes(node)) target._asyncNodes.push(node);
126
- }
127
- }
128
- function resolveOptimisticNodes(nodes) {
129
- for (let i = 0; i < nodes.length; i++) {
130
- const node = nodes[i];
131
- node._optimisticLane = void 0;
132
- if (node._pendingValue !== NOT_PENDING) {
133
- node._value = node._pendingValue;
134
- node._pendingValue = NOT_PENDING;
135
- }
136
- const prevOverride = node._overrideValue;
137
- node._overrideValue = NOT_PENDING;
138
- if (prevOverride !== NOT_PENDING && node._value !== prevOverride) insertSubs(node, true);
139
- node._transition = null;
140
- }
141
- nodes.length = 0;
142
- }
143
- function cleanupCompletedLanes(completingTransition) {
144
- for (const lane of activeLanes) {
145
- const owned = completingTransition ? lane._transition === completingTransition : !lane._transition;
146
- if (!owned) continue;
147
- if (!lane._mergedInto) {
148
- if (lane._effectQueues[0].length) runQueue(lane._effectQueues[0], EFFECT_RENDER);
149
- if (lane._effectQueues[1].length) runQueue(lane._effectQueues[1], EFFECT_USER);
150
- }
151
- if (lane._source._optimisticLane === lane) lane._source._optimisticLane = void 0;
152
- lane._pendingAsync.clear();
153
- lane._effectQueues[0].length = 0;
154
- lane._effectQueues[1].length = 0;
155
- activeLanes.delete(lane);
156
- signalLanes.delete(lane._source);
157
- }
158
- }
159
- function schedule() {
160
- if (scheduled) return;
161
- scheduled = true;
162
- if (!globalQueue._running && !projectionWriteActive) queueMicrotask(flush);
163
- }
164
- function insertSubs(node, optimistic = false) {
165
- const sourceLane = node._optimisticLane || currentOptimisticLane;
166
- const hasSnapshot = node._snapshotValue !== void 0;
167
- for (let s = node._subs; s !== null; s = s._nextSub) {
168
- if (hasSnapshot && s._sub._inSnapshotScope) {
169
- s._sub._flags |= REACTIVE_SNAPSHOT_STALE;
170
- continue;
171
- }
172
- if (optimistic && sourceLane) {
173
- s._sub._flags |= REACTIVE_OPTIMISTIC_DIRTY;
174
- assignOrMergeLane(s._sub, sourceLane);
175
- } else if (optimistic) {
176
- s._sub._flags |= REACTIVE_OPTIMISTIC_DIRTY;
177
- s._sub._optimisticLane = void 0;
178
- }
179
- const sub = s._sub;
180
- if (sub._type === EFFECT_TRACKED) {
181
- if (!sub._modified) {
182
- sub._modified = true;
183
- sub._queue.enqueue(EFFECT_USER, sub._run);
184
- }
185
- continue;
186
- }
187
- const queue = s._sub._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
188
- if (queue._min > s._sub._height) queue._min = s._sub._height;
189
- insertIntoHeap(s._sub, queue);
190
- }
191
- }
192
- function commitPendingNodes() {
193
- const pendingNodes = globalQueue._pendingNodes;
194
- for (let i = 0; i < pendingNodes.length; i++) {
195
- const n = pendingNodes[i];
196
- if (n._pendingValue !== NOT_PENDING) {
197
- n._value = n._pendingValue;
198
- n._pendingValue = NOT_PENDING;
199
- if (n._type && n._type !== EFFECT_TRACKED) n._modified = true;
200
- }
201
- if (!(n._statusFlags & STATUS_PENDING)) n._statusFlags &= ~STATUS_UNINITIALIZED;
202
- if (n._fn) GlobalQueue._dispose(n, false, true);
203
- }
204
- pendingNodes.length = 0;
205
- }
206
- function finalizePureQueue(completingTransition = null, incomplete = false) {
207
- const resolvePending = !incomplete;
208
- if (resolvePending) commitPendingNodes();
209
- if (!incomplete) checkBoundaryChildren(globalQueue);
210
- if (dirtyQueue._max >= dirtyQueue._min) runHeap(dirtyQueue, GlobalQueue._update);
211
- if (resolvePending) {
212
- commitPendingNodes();
213
- resolveOptimisticNodes(
214
- completingTransition ? completingTransition._optimisticNodes : globalQueue._optimisticNodes
215
- );
216
- const optimisticStores = completingTransition ? completingTransition._optimisticStores : globalQueue._optimisticStores;
217
- if (GlobalQueue._clearOptimisticStore && optimisticStores.size) {
218
- for (const store of optimisticStores) {
219
- GlobalQueue._clearOptimisticStore(store);
220
- }
221
- optimisticStores.clear();
222
- schedule();
223
- }
224
- cleanupCompletedLanes(completingTransition);
225
- }
226
- }
227
- function checkBoundaryChildren(queue) {
228
- for (const child of queue._children) {
229
- child.checkSources?.();
230
- checkBoundaryChildren(child);
231
- }
232
- }
233
- function reassignPendingTransition(pendingNodes) {
234
- for (let i = 0; i < pendingNodes.length; i++) {
235
- pendingNodes[i]._transition = activeTransition;
236
- }
237
- }
238
- function flush() {
239
- if (globalQueue._running) {
240
- if (inTrackedQueueCallback) {
241
- throw new Error(
242
- "Cannot call flush() from inside onSettled or createTrackedEffect. flush() is not reentrant there."
243
- );
244
- }
245
- return;
246
- }
247
- let count = 0;
248
- while (scheduled || activeTransition) {
249
- if (++count === 1e5) throw new Error("Potential Infinite Loop Detected.");
250
- globalQueue.flush();
251
- }
252
- }
253
- function runQueue(queue, type) {
254
- for (let i = 0; i < queue.length; i++) queue[i](type);
255
- }
256
- function transitionComplete(transition) {
257
- if (transition._done) return true;
258
- if (transition._actions.length) return false;
259
- let done = true;
260
- for (let i = 0; i < transition._asyncNodes.length; i++) {
261
- const node = transition._asyncNodes[i];
262
- if (node._statusFlags & STATUS_PENDING && node._error?.source === node) {
263
- done = false;
264
- break;
265
- }
266
- }
267
- if (done) {
268
- for (let i = 0; i < transition._optimisticNodes.length; i++) {
269
- const node = transition._optimisticNodes[i];
270
- if (hasActiveOverride(node) && "_statusFlags" in node && node._statusFlags & STATUS_PENDING && node._error instanceof NotReadyError && node._error.source !== node) {
271
- done = false;
272
- break;
273
- }
274
- }
275
- }
276
- done && (transition._done = true);
277
- return done;
278
- }
279
- function currentTransition(transition) {
280
- while (transition._done && typeof transition._done === "object") transition = transition._done;
281
- return transition;
282
- }
283
- function runInTransition(transition, fn) {
284
- const prevTransition = activeTransition;
285
- try {
286
- activeTransition = currentTransition(transition);
287
- return fn();
288
- } finally {
289
- activeTransition = prevTransition;
290
- }
291
- }
292
- function getOrCreateLane(signal) {
293
- let lane = signalLanes.get(signal);
294
- if (lane) {
295
- return findLane(lane);
296
- }
297
- const parentSource = signal._parentSource;
298
- const parentLane = parentSource?._optimisticLane ? findLane(parentSource._optimisticLane) : null;
299
- lane = {
300
- _source: signal,
301
- _pendingAsync: /* @__PURE__ */ new Set(),
302
- _effectQueues: [[], []],
303
- _mergedInto: null,
304
- _transition: activeTransition,
305
- _parentLane: parentLane
306
- };
307
- signalLanes.set(signal, lane);
308
- activeLanes.add(lane);
309
- signal._overrideSinceLane = false;
310
- return lane;
311
- }
312
- function findLane(lane) {
313
- while (lane._mergedInto) lane = lane._mergedInto;
314
- return lane;
315
- }
316
- function mergeLanes(lane1, lane2) {
317
- lane1 = findLane(lane1);
318
- lane2 = findLane(lane2);
319
- if (lane1 === lane2) return lane1;
320
- lane2._mergedInto = lane1;
321
- for (const node of lane2._pendingAsync) lane1._pendingAsync.add(node);
322
- lane1._effectQueues[0].push(...lane2._effectQueues[0]);
323
- lane1._effectQueues[1].push(...lane2._effectQueues[1]);
324
- return lane1;
325
- }
326
- function resolveLane(el) {
327
- const lane = el._optimisticLane;
328
- if (!lane) return void 0;
329
- const root = findLane(lane);
330
- if (activeLanes.has(root)) return root;
331
- el._optimisticLane = void 0;
332
- return void 0;
333
- }
334
- function resolveTransition(el) {
335
- return resolveLane(el)?._transition ?? el._transition;
16
+ function create(html, bypassGuard, flag) {
17
+ if (isHydrating() && !bypassGuard) throw new Error("Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration.");
18
+ const t = document.createElement("template");
19
+ t.innerHTML = html;
20
+ return flag === 2 ? t.content.firstChild.firstChild : t.content.firstChild;
336
21
  }
337
- function hasActiveOverride(el) {
338
- return !!(el._overrideValue !== void 0 && el._overrideValue !== NOT_PENDING);
339
- }
340
- function assignOrMergeLane(el, sourceLane) {
341
- const sourceRoot = findLane(sourceLane);
342
- const existing = el._optimisticLane;
343
- if (existing) {
344
- if (existing._mergedInto) {
345
- el._optimisticLane = sourceLane;
346
- return;
347
- }
348
- const existingRoot = findLane(existing);
349
- if (activeLanes.has(existingRoot)) {
350
- if (existingRoot !== sourceRoot && !hasActiveOverride(el)) {
351
- if (sourceRoot._parentLane && findLane(sourceRoot._parentLane) === existingRoot) {
352
- el._optimisticLane = sourceLane;
353
- } else if (existingRoot._parentLane && findLane(existingRoot._parentLane) === sourceRoot) ;
354
- else mergeLanes(sourceRoot, existingRoot);
355
- }
356
- return;
357
- }
358
- }
359
- el._optimisticLane = sourceLane;
360
- }
361
- function unlinkSubs(link) {
362
- const dep = link._dep;
363
- const nextDep = link._nextDep;
364
- const nextSub = link._nextSub;
365
- const prevSub = link._prevSub;
366
- if (nextSub !== null) nextSub._prevSub = prevSub;
367
- else dep._subsTail = prevSub;
368
- if (prevSub !== null) prevSub._nextSub = nextSub;
369
- else {
370
- dep._subs = nextSub;
371
- if (nextSub === null) {
372
- dep._unobserved?.();
373
- dep._fn && !dep._preventAutoDisposal && !(dep._flags & REACTIVE_ZOMBIE) && unobserved(dep);
374
- }
375
- }
376
- return nextDep;
377
- }
378
- function unobserved(el) {
379
- deleteFromHeap(el, el._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
380
- let dep = el._deps;
381
- while (dep !== null) {
382
- dep = unlinkSubs(dep);
383
- }
384
- el._deps = null;
385
- disposeChildren(el, true);
386
- }
387
- function markDisposal(el) {
388
- let child = el._firstChild;
389
- while (child) {
390
- child._flags |= REACTIVE_ZOMBIE;
391
- if (child._flags & REACTIVE_IN_HEAP) {
392
- deleteFromHeap(child, dirtyQueue);
393
- insertIntoHeap(child, zombieQueue);
394
- }
395
- markDisposal(child);
396
- child = child._nextSibling;
397
- }
398
- }
399
- function disposeChildren(node, self = false, zombie) {
400
- if (node._flags & REACTIVE_DISPOSED) return;
401
- if (self) node._flags = REACTIVE_DISPOSED;
402
- if (self && node._fn) node._inFlight = null;
403
- let child = zombie ? node._pendingFirstChild : node._firstChild;
404
- while (child) {
405
- const nextChild = child._nextSibling;
406
- if (child._deps) {
407
- const n = child;
408
- deleteFromHeap(n, n._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
409
- let toRemove = n._deps;
410
- do {
411
- toRemove = unlinkSubs(toRemove);
412
- } while (toRemove !== null);
413
- n._deps = null;
414
- n._depsTail = null;
415
- }
416
- disposeChildren(child, true);
417
- child = nextChild;
418
- }
419
- if (zombie) {
420
- node._pendingFirstChild = null;
421
- } else {
422
- node._firstChild = null;
423
- node._childCount = 0;
424
- }
425
- runDisposal(node, zombie);
426
- }
427
- function runDisposal(node, zombie) {
428
- let disposal = zombie ? node._pendingDisposal : node._disposal;
429
- if (!disposal) return;
430
- if (Array.isArray(disposal)) {
431
- for (let i = 0; i < disposal.length; i++) {
432
- const callable = disposal[i];
433
- callable.call(callable);
434
- }
435
- } else {
436
- disposal.call(disposal);
437
- }
438
- zombie ? node._pendingDisposal = null : node._disposal = null;
439
- }
440
- function cleanup(fn) {
441
- if (!context) return fn;
442
- if (!context._disposal) context._disposal = fn;
443
- else if (Array.isArray(context._disposal)) context._disposal.push(fn);
444
- else context._disposal = [context._disposal, fn];
445
- return fn;
446
- }
447
- function addPendingSource(el, source) {
448
- if (el._pendingSource === source || el._pendingSources?.has(source)) return false;
449
- if (!el._pendingSource) {
450
- el._pendingSource = source;
451
- return true;
452
- }
453
- if (!el._pendingSources) {
454
- el._pendingSources = /* @__PURE__ */ new Set([el._pendingSource, source]);
455
- } else {
456
- el._pendingSources.add(source);
457
- }
458
- el._pendingSource = void 0;
459
- return true;
460
- }
461
- function removePendingSource(el, source) {
462
- if (el._pendingSource) {
463
- if (el._pendingSource !== source) return false;
464
- el._pendingSource = void 0;
465
- return true;
466
- }
467
- if (!el._pendingSources?.delete(source)) return false;
468
- if (el._pendingSources.size === 1) {
469
- el._pendingSource = el._pendingSources.values().next().value;
470
- el._pendingSources = void 0;
471
- } else if (el._pendingSources.size === 0) {
472
- el._pendingSources = void 0;
473
- }
474
- return true;
475
- }
476
- function clearPendingSources(el) {
477
- el._pendingSource = void 0;
478
- el._pendingSources?.clear();
479
- el._pendingSources = void 0;
480
- }
481
- function setPendingError(el, source, error) {
482
- if (!source) {
483
- el._error = null;
484
- return;
485
- }
486
- if (error instanceof NotReadyError && error.source === source) {
487
- el._error = error;
488
- return;
489
- }
490
- const current = el._error;
491
- if (!(current instanceof NotReadyError) || current.source !== source) {
492
- el._error = new NotReadyError(source);
493
- }
494
- }
495
- function forEachDependent(el, fn) {
496
- for (let s = el._subs; s !== null; s = s._nextSub) fn(s._sub);
497
- for (let child = el._child; child !== null; child = child._nextChild) {
498
- for (let s = child._subs; s !== null; s = s._nextSub) fn(s._sub);
499
- }
500
- }
501
- function settlePendingSource(el) {
502
- let scheduled2 = false;
503
- const visited = /* @__PURE__ */ new Set();
504
- const settle = (node) => {
505
- if (visited.has(node) || !removePendingSource(node, el)) return;
506
- visited.add(node);
507
- node._time = clock;
508
- const source = node._pendingSource ?? node._pendingSources?.values().next().value;
509
- if (source) {
510
- setPendingError(node, source);
511
- updatePendingSignal(node);
512
- } else {
513
- node._statusFlags &= ~STATUS_PENDING;
514
- setPendingError(node);
515
- updatePendingSignal(node);
516
- if (node._blocked) {
517
- if (node._type === EFFECT_TRACKED) {
518
- const tracked = node;
519
- if (!tracked._modified) {
520
- tracked._modified = true;
521
- tracked._queue.enqueue(EFFECT_USER, tracked._run);
522
- }
523
- } else {
524
- const queue = node._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
525
- if (queue._min > node._height) queue._min = node._height;
526
- insertIntoHeap(node, queue);
527
- }
528
- scheduled2 = true;
529
- }
530
- node._blocked = false;
531
- }
532
- forEachDependent(node, settle);
533
- };
534
- forEachDependent(el, settle);
535
- if (scheduled2) schedule();
536
- }
537
- function handleAsync(el, result, setter) {
538
- const isObject = typeof result === "object" && result !== null;
539
- const iterator = isObject && untrack(() => result[Symbol.asyncIterator]);
540
- const isThenable = !iterator && isObject && untrack(() => typeof result.then === "function");
541
- if (!isThenable && !iterator) {
542
- el._inFlight = null;
543
- return result;
544
- }
545
- el._inFlight = result;
546
- let syncValue;
547
- const handleError = (error) => {
548
- if (el._inFlight !== result) return;
549
- globalQueue.initTransition(resolveTransition(el));
550
- notifyStatus(el, error instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, error);
551
- el._time = clock;
552
- };
553
- const asyncWrite = (value, then) => {
554
- if (el._inFlight !== result) return;
555
- if (el._flags & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
556
- globalQueue.initTransition(resolveTransition(el));
557
- clearStatus(el);
558
- const lane = resolveLane(el);
559
- if (lane) lane._pendingAsync.delete(el);
560
- if (el._overrideValue !== void 0) {
561
- if (el._overrideValue !== void 0 && el._overrideValue !== NOT_PENDING)
562
- el._pendingValue = value;
563
- else {
564
- el._value = value;
565
- insertSubs(el);
566
- }
567
- el._time = clock;
568
- } else if (lane) {
569
- const prevValue = el._value;
570
- const equals = el._equals;
571
- if (!equals || !equals(value, prevValue)) {
572
- el._value = value;
573
- el._time = clock;
574
- if (el._latestValueComputed) {
575
- setSignal(el._latestValueComputed, value);
576
- }
577
- insertSubs(el, true);
578
- }
579
- } else {
580
- setSignal(el, () => value);
581
- }
582
- settlePendingSource(el);
583
- schedule();
584
- flush();
585
- then?.();
586
- };
587
- if (isThenable) {
588
- let resolved = false, isSync = true;
589
- result.then(
590
- (v) => {
591
- if (isSync) {
592
- syncValue = v;
593
- resolved = true;
594
- } else asyncWrite(v);
595
- },
596
- (e) => {
597
- if (!isSync) handleError(e);
598
- }
599
- );
600
- isSync = false;
601
- if (!resolved) {
602
- globalQueue.initTransition(resolveTransition(el));
603
- throw new NotReadyError(context);
604
- }
605
- }
606
- if (iterator) {
607
- const it = result[Symbol.asyncIterator]();
608
- let hadSyncValue = false;
609
- let completed = false;
610
- cleanup(() => {
611
- if (completed) return;
612
- completed = true;
613
- try {
614
- const returned = it.return?.();
615
- if (returned && typeof returned.then === "function") {
616
- returned.then(void 0, () => {
617
- });
618
- }
619
- } catch {
620
- }
621
- });
622
- const iterate = () => {
623
- let syncResult, resolved = false, isSync = true;
624
- it.next().then(
625
- (r) => {
626
- if (isSync) {
627
- syncResult = r;
628
- resolved = true;
629
- if (r.done) completed = true;
630
- } else if (el._inFlight !== result) {
631
- return;
632
- } else if (!r.done) asyncWrite(r.value, iterate);
633
- else {
634
- completed = true;
635
- schedule();
636
- flush();
637
- }
638
- },
639
- (e) => {
640
- if (!isSync && el._inFlight === result) {
641
- completed = true;
642
- handleError(e);
643
- }
644
- }
645
- );
646
- isSync = false;
647
- if (resolved && !syncResult.done) {
648
- syncValue = syncResult.value;
649
- hadSyncValue = true;
650
- return iterate();
651
- }
652
- return resolved && syncResult.done;
653
- };
654
- const immediatelyDone = iterate();
655
- if (!hadSyncValue && !immediatelyDone) {
656
- globalQueue.initTransition(resolveTransition(el));
657
- throw new NotReadyError(context);
658
- }
659
- }
660
- return syncValue;
661
- }
662
- function clearStatus(el, clearUninitialized = false) {
663
- clearPendingSources(el);
664
- el._blocked = false;
665
- el._statusFlags = clearUninitialized ? 0 : el._statusFlags & STATUS_UNINITIALIZED;
666
- setPendingError(el);
667
- updatePendingSignal(el);
668
- el._notifyStatus?.();
669
- }
670
- function notifyStatus(el, status, error, blockStatus, lane) {
671
- if (status === STATUS_ERROR && !(error instanceof StatusError) && !(error instanceof NotReadyError))
672
- error = new StatusError(el, error);
673
- const pendingSource = status === STATUS_PENDING && error instanceof NotReadyError ? error.source : void 0;
674
- const isSource = pendingSource === el;
675
- const isOptimisticBoundary = status === STATUS_PENDING && el._overrideValue !== void 0 && !isSource;
676
- const startsBlocking = isOptimisticBoundary && hasActiveOverride(el);
677
- if (!blockStatus) {
678
- if (status === STATUS_PENDING && pendingSource) {
679
- addPendingSource(el, pendingSource);
680
- el._statusFlags = STATUS_PENDING | el._statusFlags & STATUS_UNINITIALIZED;
681
- setPendingError(el, pendingSource, error);
682
- } else {
683
- clearPendingSources(el);
684
- el._statusFlags = status | (status !== STATUS_ERROR ? el._statusFlags & STATUS_UNINITIALIZED : 0);
685
- el._error = error;
686
- }
687
- updatePendingSignal(el);
688
- }
689
- if (lane && !blockStatus) {
690
- assignOrMergeLane(el, lane);
691
- }
692
- const downstreamBlockStatus = blockStatus || startsBlocking;
693
- const downstreamLane = blockStatus || isOptimisticBoundary ? void 0 : lane;
694
- if (el._notifyStatus) {
695
- if (blockStatus && status === STATUS_PENDING) {
696
- return;
697
- }
698
- if (downstreamBlockStatus) {
699
- el._notifyStatus(status, error);
700
- } else {
701
- el._notifyStatus();
702
- }
703
- return;
704
- }
705
- forEachDependent(el, (sub) => {
706
- sub._time = clock;
707
- if (status === STATUS_PENDING && pendingSource && sub._pendingSource !== pendingSource && !sub._pendingSources?.has(pendingSource) || status !== STATUS_PENDING && (sub._error !== error || sub._pendingSource || sub._pendingSources)) {
708
- if (!downstreamBlockStatus && !sub._transition) globalQueue._pendingNodes.push(sub);
709
- notifyStatus(sub, status, error, downstreamBlockStatus, downstreamLane);
710
- }
711
- });
712
- }
713
- function recompute(el, create = false) {
714
- const isEffect = el._type;
715
- if (!create) {
716
- if (el._transition && (!isEffect || activeTransition) && activeTransition !== el._transition)
717
- globalQueue.initTransition(el._transition);
718
- deleteFromHeap(el, el._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
719
- el._inFlight = null;
720
- if (el._transition || isEffect === EFFECT_TRACKED) disposeChildren(el);
721
- else {
722
- markDisposal(el);
723
- el._pendingDisposal = el._disposal;
724
- el._pendingFirstChild = el._firstChild;
725
- el._disposal = null;
726
- el._firstChild = null;
727
- el._childCount = 0;
728
- }
729
- }
730
- const isOptimisticDirty = !!(el._flags & REACTIVE_OPTIMISTIC_DIRTY);
731
- const hasOverride = el._overrideValue !== void 0 && el._overrideValue !== NOT_PENDING;
732
- const wasPending = !!(el._statusFlags & STATUS_PENDING);
733
- const oldcontext = context;
734
- context = el;
735
- el._depsTail = null;
736
- el._flags = REACTIVE_RECOMPUTING_DEPS;
737
- el._time = clock;
738
- let value = el._pendingValue === NOT_PENDING ? el._value : el._pendingValue;
739
- let oldHeight = el._height;
740
- let prevTracking = tracking;
741
- let prevLane = currentOptimisticLane;
742
- let prevStrictRead = false;
743
- {
744
- prevStrictRead = strictRead;
745
- strictRead = false;
746
- }
747
- tracking = true;
748
- if (isOptimisticDirty) {
749
- const lane = resolveLane(el);
750
- if (lane) currentOptimisticLane = lane;
751
- }
752
- try {
753
- value = handleAsync(el, el._fn(value));
754
- clearStatus(el, create);
755
- const resolvedLane = resolveLane(el);
756
- if (resolvedLane) {
757
- resolvedLane._pendingAsync.delete(el);
758
- updatePendingSignal(resolvedLane._source);
759
- }
760
- } catch (e) {
761
- if (e instanceof NotReadyError && currentOptimisticLane) {
762
- const lane = findLane(currentOptimisticLane);
763
- if (lane._source !== el) {
764
- lane._pendingAsync.add(el);
765
- el._optimisticLane = lane;
766
- updatePendingSignal(lane._source);
767
- }
768
- }
769
- if (e instanceof NotReadyError) el._blocked = true;
770
- notifyStatus(
771
- el,
772
- e instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR,
773
- e,
774
- void 0,
775
- e instanceof NotReadyError ? el._optimisticLane : void 0
776
- );
777
- } finally {
778
- tracking = prevTracking;
779
- strictRead = prevStrictRead;
780
- el._flags = REACTIVE_NONE | (create ? el._flags & REACTIVE_SNAPSHOT_STALE : 0);
781
- context = oldcontext;
782
- }
783
- if (!el._error) {
784
- const depsTail = el._depsTail;
785
- let toRemove = depsTail !== null ? depsTail._nextDep : el._deps;
786
- if (toRemove !== null) {
787
- do {
788
- toRemove = unlinkSubs(toRemove);
789
- } while (toRemove !== null);
790
- if (depsTail !== null) depsTail._nextDep = null;
791
- else el._deps = null;
792
- }
793
- const compareValue = hasOverride ? el._overrideValue : el._pendingValue === NOT_PENDING ? el._value : el._pendingValue;
794
- const valueChanged = !el._equals || !el._equals(compareValue, value);
795
- if (valueChanged) {
796
- const prevVisible = hasOverride ? el._overrideValue : void 0;
797
- if (create || isEffect && activeTransition !== el._transition || isOptimisticDirty) {
798
- el._value = value;
799
- if (hasOverride && isOptimisticDirty) {
800
- el._overrideValue = value;
801
- el._pendingValue = value;
802
- }
803
- } else el._pendingValue = value;
804
- if (hasOverride && !isOptimisticDirty && wasPending && !el._overrideSinceLane)
805
- el._overrideValue = value;
806
- if (!hasOverride || isOptimisticDirty || el._overrideValue !== prevVisible)
807
- insertSubs(el, isOptimisticDirty || hasOverride);
808
- } else if (hasOverride) {
809
- el._pendingValue = value;
810
- } else if (el._height != oldHeight) {
811
- for (let s = el._subs; s !== null; s = s._nextSub) {
812
- insertIntoHeapHeight(s._sub, s._sub._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
813
- }
814
- }
815
- }
816
- currentOptimisticLane = prevLane;
817
- (!create || el._statusFlags & STATUS_PENDING) && !el._transition && !(activeTransition && hasOverride) && globalQueue._pendingNodes.push(el);
818
- el._transition && isEffect && activeTransition !== el._transition && runInTransition(el._transition, () => recompute(el));
819
- }
820
- function untrack(fn, strictReadLabel) {
821
- if (!externalSourceConfig && !tracking && !strictRead && true) return fn();
822
- const prevTracking = tracking;
823
- const prevStrictRead = strictRead;
824
- tracking = false;
825
- strictRead = false;
826
- try {
827
- if (externalSourceConfig) return externalSourceConfig.untrack(fn);
828
- return fn();
829
- } finally {
830
- tracking = prevTracking;
831
- strictRead = prevStrictRead;
832
- }
833
- }
834
- function setSignal(el, v) {
835
- if (!el._pureWrite && !context?._childrenForbidden && context && el._firewall !== context)
836
- console.warn("A Signal was written to in an owned scope.");
837
- if (el._transition && activeTransition !== el._transition)
838
- globalQueue.initTransition(el._transition);
839
- const isOptimistic = el._overrideValue !== void 0 && !projectionWriteActive;
840
- const hasOverride = el._overrideValue !== void 0 && el._overrideValue !== NOT_PENDING;
841
- const currentValue = isOptimistic ? hasOverride ? el._overrideValue : el._value : el._pendingValue === NOT_PENDING ? el._value : el._pendingValue;
842
- if (typeof v === "function") v = v(currentValue);
843
- const valueChanged = !el._equals || !el._equals(currentValue, v) || !!(el._statusFlags & STATUS_UNINITIALIZED);
844
- if (!valueChanged) {
845
- if (isOptimistic && hasOverride && el._fn) {
846
- insertSubs(el, true);
847
- schedule();
848
- }
849
- return v;
850
- }
851
- if (isOptimistic) {
852
- const firstOverride = el._overrideValue === NOT_PENDING;
853
- if (!firstOverride) globalQueue.initTransition(resolveTransition(el));
854
- if (firstOverride) {
855
- el._pendingValue = el._value;
856
- globalQueue._optimisticNodes.push(el);
857
- }
858
- el._overrideSinceLane = true;
859
- const lane = getOrCreateLane(el);
860
- el._optimisticLane = lane;
861
- el._overrideValue = v;
862
- } else {
863
- if (el._pendingValue === NOT_PENDING) globalQueue._pendingNodes.push(el);
864
- el._pendingValue = v;
865
- }
866
- updatePendingSignal(el);
867
- if (el._latestValueComputed) {
868
- setSignal(el._latestValueComputed, v);
869
- }
870
- el._time = clock;
871
- insertSubs(el, isOptimistic);
872
- schedule();
873
- return v;
874
- }
875
- function computePendingState(el) {
876
- const comp = el;
877
- const firewall = el._firewall;
878
- if (firewall && el._pendingValue !== NOT_PENDING) {
879
- return !firewall._inFlight && !(firewall._statusFlags & STATUS_PENDING);
880
- }
881
- if (el._overrideValue !== void 0 && el._overrideValue !== NOT_PENDING) {
882
- if (comp._statusFlags & STATUS_PENDING && !(comp._statusFlags & STATUS_UNINITIALIZED))
883
- return true;
884
- if (el._parentSource) {
885
- const lane = el._optimisticLane ? findLane(el._optimisticLane) : null;
886
- return !!(lane && lane._pendingAsync.size > 0);
887
- }
888
- return true;
889
- }
890
- if (el._overrideValue !== void 0 && el._overrideValue === NOT_PENDING && !el._parentSource) {
891
- return false;
892
- }
893
- if (el._pendingValue !== NOT_PENDING && !(comp._statusFlags & STATUS_UNINITIALIZED)) return true;
894
- return !!(comp._statusFlags & STATUS_PENDING && !(comp._statusFlags & STATUS_UNINITIALIZED));
895
- }
896
- function updatePendingSignal(el) {
897
- if (el._pendingSignal) {
898
- const pending = computePendingState(el);
899
- const sig = el._pendingSignal;
900
- setSignal(sig, pending);
901
- if (!pending && sig._optimisticLane) {
902
- const sourceLane = resolveLane(el);
903
- if (sourceLane && sourceLane._pendingAsync.size > 0) {
904
- const sigLane = findLane(sig._optimisticLane);
905
- if (sigLane !== sourceLane) {
906
- mergeLanes(sourceLane, sigLane);
907
- }
908
- }
909
- signalLanes.delete(sig);
910
- sig._optimisticLane = void 0;
911
- }
912
- }
913
- }
914
- function isWrappable(obj) {
915
- return obj != null && typeof obj === "object" && !Object.isFrozen(obj) && !(typeof Node !== "undefined" && obj instanceof Node);
916
- }
917
- function updatePath(current, args, i = 0) {
918
- let part, prev = current;
919
- if (i < args.length - 1) {
920
- part = args[i];
921
- const partType = typeof part;
922
- const isArray = Array.isArray(current);
923
- if (Array.isArray(part)) {
924
- for (let j = 0; j < part.length; j++) {
925
- args[i] = part[j];
926
- updatePath(current, args, i);
927
- }
928
- args[i] = part;
929
- return;
930
- } else if (isArray && partType === "function") {
931
- for (let j = 0; j < current.length; j++) {
932
- if (part(current[j], j)) {
933
- args[i] = j;
934
- updatePath(current, args, i);
935
- }
936
- }
937
- args[i] = part;
938
- return;
939
- } else if (isArray && partType === "object") {
940
- const { from = 0, to = current.length - 1, by = 1 } = part;
941
- for (let j = from; j <= to; j += by) {
942
- args[i] = j;
943
- updatePath(current, args, i);
944
- }
945
- args[i] = part;
946
- return;
947
- } else if (i < args.length - 2) {
948
- updatePath(current[part], args, i + 1);
949
- return;
950
- }
951
- prev = current[part];
952
- }
953
- let value = args[args.length - 1];
954
- if (typeof value === "function") {
955
- value = value(prev);
956
- if (value === prev) return;
957
- }
958
- if (part === void 0 && value == void 0) return;
959
- if (value === DELETE) {
960
- delete current[part];
961
- } else if (part === void 0 || isWrappable(prev) && isWrappable(value) && !Array.isArray(value)) {
962
- const target = part !== void 0 ? current[part] : current;
963
- const keys = Object.keys(value);
964
- for (let i2 = 0; i2 < keys.length; i2++) target[keys[i2]] = value[keys[i2]];
965
- } else {
966
- current[part] = value;
967
- }
968
- }
969
- 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, inTrackedQueueCallback, stashedOptimisticReads, Queue, GlobalQueue, globalQueue, signalLanes, activeLanes, externalSourceConfig, tracking, context, currentOptimisticLane, strictRead, DELETE;
970
- var init_dev = __esm({
971
- "../../node_modules/.pnpm/@solidjs+signals@0.13.9/node_modules/@solidjs/signals/dist/dev.js"() {
972
- NotReadyError = class extends Error {
973
- source;
974
- constructor(source) {
975
- super();
976
- this.source = source;
977
- }
978
- };
979
- StatusError = class extends Error {
980
- source;
981
- constructor(source, original) {
982
- super(original instanceof Error ? original.message : String(original), { cause: original });
983
- this.source = source;
984
- }
985
- };
986
- REACTIVE_NONE = 0;
987
- REACTIVE_CHECK = 1 << 0;
988
- REACTIVE_DIRTY = 1 << 1;
989
- REACTIVE_RECOMPUTING_DEPS = 1 << 2;
990
- REACTIVE_IN_HEAP = 1 << 3;
991
- REACTIVE_IN_HEAP_HEIGHT = 1 << 4;
992
- REACTIVE_ZOMBIE = 1 << 5;
993
- REACTIVE_DISPOSED = 1 << 6;
994
- REACTIVE_OPTIMISTIC_DIRTY = 1 << 7;
995
- REACTIVE_SNAPSHOT_STALE = 1 << 8;
996
- STATUS_PENDING = 1 << 0;
997
- STATUS_ERROR = 1 << 1;
998
- STATUS_UNINITIALIZED = 1 << 2;
999
- EFFECT_RENDER = 1;
1000
- EFFECT_USER = 2;
1001
- EFFECT_TRACKED = 3;
1002
- NOT_PENDING = {};
1003
- transitions = /* @__PURE__ */ new Set();
1004
- dirtyQueue = { _heap: new Array(2e3).fill(void 0), _marked: false, _min: 0, _max: 0 };
1005
- zombieQueue = { _heap: new Array(2e3).fill(void 0), _marked: false, _min: 0, _max: 0 };
1006
- clock = 0;
1007
- activeTransition = null;
1008
- scheduled = false;
1009
- projectionWriteActive = false;
1010
- inTrackedQueueCallback = false;
1011
- stashedOptimisticReads = null;
1012
- Queue = class {
1013
- _parent = null;
1014
- _queues = [[], []];
1015
- _children = [];
1016
- created = clock;
1017
- addChild(child) {
1018
- this._children.push(child);
1019
- child._parent = this;
1020
- }
1021
- removeChild(child) {
1022
- const index = this._children.indexOf(child);
1023
- if (index >= 0) {
1024
- this._children.splice(index, 1);
1025
- child._parent = null;
1026
- }
1027
- }
1028
- notify(node, mask, flags, error) {
1029
- if (this._parent) return this._parent.notify(node, mask, flags, error);
1030
- return false;
1031
- }
1032
- run(type) {
1033
- if (this._queues[type - 1].length) {
1034
- const effects = this._queues[type - 1];
1035
- this._queues[type - 1] = [];
1036
- runQueue(effects, type);
1037
- }
1038
- for (let i = 0; i < this._children.length; i++) this._children[i].run?.(type);
1039
- }
1040
- enqueue(type, fn) {
1041
- if (type) {
1042
- if (currentOptimisticLane) {
1043
- const lane = findLane(currentOptimisticLane);
1044
- lane._effectQueues[type - 1].push(fn);
1045
- } else {
1046
- this._queues[type - 1].push(fn);
1047
- }
1048
- }
1049
- schedule();
1050
- }
1051
- stashQueues(stub) {
1052
- stub._queues[0].push(...this._queues[0]);
1053
- stub._queues[1].push(...this._queues[1]);
1054
- this._queues = [[], []];
1055
- for (let i = 0; i < this._children.length; i++) {
1056
- let child = this._children[i];
1057
- let childStub = stub._children[i];
1058
- if (!childStub) {
1059
- childStub = { _queues: [[], []], _children: [] };
1060
- stub._children[i] = childStub;
1061
- }
1062
- child.stashQueues(childStub);
1063
- }
1064
- }
1065
- restoreQueues(stub) {
1066
- this._queues[0].push(...stub._queues[0]);
1067
- this._queues[1].push(...stub._queues[1]);
1068
- for (let i = 0; i < stub._children.length; i++) {
1069
- const childStub = stub._children[i];
1070
- let child = this._children[i];
1071
- if (child) child.restoreQueues(childStub);
1072
- }
1073
- }
1074
- };
1075
- GlobalQueue = class _GlobalQueue extends Queue {
1076
- _running = false;
1077
- _pendingNodes = [];
1078
- _optimisticNodes = [];
1079
- _optimisticStores = /* @__PURE__ */ new Set();
1080
- static _update;
1081
- static _dispose;
1082
- static _clearOptimisticStore = null;
1083
- flush() {
1084
- if (this._running) return;
1085
- this._running = true;
1086
- try {
1087
- runHeap(dirtyQueue, _GlobalQueue._update);
1088
- if (activeTransition) {
1089
- const isComplete = transitionComplete(activeTransition);
1090
- if (!isComplete) {
1091
- const stashedTransition = activeTransition;
1092
- runHeap(zombieQueue, _GlobalQueue._update);
1093
- this._pendingNodes = [];
1094
- this._optimisticNodes = [];
1095
- this._optimisticStores = /* @__PURE__ */ new Set();
1096
- runLaneEffects(EFFECT_RENDER);
1097
- runLaneEffects(EFFECT_USER);
1098
- this.stashQueues(stashedTransition._queueStash);
1099
- clock++;
1100
- scheduled = dirtyQueue._max >= dirtyQueue._min;
1101
- reassignPendingTransition(stashedTransition._pendingNodes);
1102
- activeTransition = null;
1103
- if (!stashedTransition._actions.length && stashedTransition._optimisticNodes.length) {
1104
- stashedOptimisticReads = /* @__PURE__ */ new Set();
1105
- for (let i = 0; i < stashedTransition._optimisticNodes.length; i++) {
1106
- const node = stashedTransition._optimisticNodes[i];
1107
- if (node._fn || node._pureWrite) continue;
1108
- stashedOptimisticReads.add(node);
1109
- queueStashedOptimisticEffects(node);
1110
- }
1111
- }
1112
- try {
1113
- finalizePureQueue(null, true);
1114
- } finally {
1115
- stashedOptimisticReads = null;
1116
- }
1117
- return;
1118
- }
1119
- this._pendingNodes !== activeTransition._pendingNodes && this._pendingNodes.push(...activeTransition._pendingNodes);
1120
- this.restoreQueues(activeTransition._queueStash);
1121
- transitions.delete(activeTransition);
1122
- const completingTransition = activeTransition;
1123
- activeTransition = null;
1124
- reassignPendingTransition(this._pendingNodes);
1125
- finalizePureQueue(completingTransition);
1126
- } else {
1127
- if (transitions.size) runHeap(zombieQueue, _GlobalQueue._update);
1128
- finalizePureQueue();
1129
- }
1130
- clock++;
1131
- scheduled = dirtyQueue._max >= dirtyQueue._min;
1132
- runLaneEffects(EFFECT_RENDER);
1133
- this.run(EFFECT_RENDER);
1134
- runLaneEffects(EFFECT_USER);
1135
- this.run(EFFECT_USER);
1136
- } finally {
1137
- this._running = false;
1138
- }
1139
- }
1140
- notify(node, mask, flags, error) {
1141
- if (mask & STATUS_PENDING) {
1142
- if (flags & STATUS_PENDING) {
1143
- const actualError = error !== void 0 ? error : node._error;
1144
- if (activeTransition && actualError) {
1145
- const source = actualError.source;
1146
- if (!activeTransition._asyncNodes.includes(source)) {
1147
- activeTransition._asyncNodes.push(source);
1148
- schedule();
1149
- }
1150
- }
1151
- }
1152
- return true;
1153
- }
1154
- return false;
1155
- }
1156
- initTransition(transition) {
1157
- if (transition) transition = currentTransition(transition);
1158
- if (transition && transition === activeTransition) return;
1159
- if (!transition && activeTransition && activeTransition._time === clock) return;
1160
- if (!activeTransition) {
1161
- activeTransition = transition ?? {
1162
- _time: clock,
1163
- _pendingNodes: [],
1164
- _asyncNodes: [],
1165
- _optimisticNodes: [],
1166
- _optimisticStores: /* @__PURE__ */ new Set(),
1167
- _actions: [],
1168
- _queueStash: { _queues: [[], []], _children: [] },
1169
- _done: false
1170
- };
1171
- } else if (transition) {
1172
- const outgoing = activeTransition;
1173
- mergeTransitionState(transition, outgoing);
1174
- transitions.delete(outgoing);
1175
- activeTransition = transition;
1176
- }
1177
- transitions.add(activeTransition);
1178
- activeTransition._time = clock;
1179
- if (this._pendingNodes !== activeTransition._pendingNodes) {
1180
- for (let i = 0; i < this._pendingNodes.length; i++) {
1181
- const node = this._pendingNodes[i];
1182
- node._transition = activeTransition;
1183
- activeTransition._pendingNodes.push(node);
1184
- }
1185
- this._pendingNodes = activeTransition._pendingNodes;
1186
- }
1187
- if (this._optimisticNodes !== activeTransition._optimisticNodes) {
1188
- for (let i = 0; i < this._optimisticNodes.length; i++) {
1189
- const node = this._optimisticNodes[i];
1190
- node._transition = activeTransition;
1191
- activeTransition._optimisticNodes.push(node);
1192
- }
1193
- this._optimisticNodes = activeTransition._optimisticNodes;
1194
- }
1195
- for (const lane of activeLanes) {
1196
- if (!lane._transition) lane._transition = activeTransition;
1197
- }
1198
- if (this._optimisticStores !== activeTransition._optimisticStores) {
1199
- for (const store of this._optimisticStores) activeTransition._optimisticStores.add(store);
1200
- this._optimisticStores = activeTransition._optimisticStores;
1201
- }
1202
- }
1203
- };
1204
- globalQueue = new GlobalQueue();
1205
- signalLanes = /* @__PURE__ */ new WeakMap();
1206
- activeLanes = /* @__PURE__ */ new Set();
1207
- externalSourceConfig = null;
1208
- GlobalQueue._update = recompute;
1209
- GlobalQueue._dispose = disposeChildren;
1210
- tracking = false;
1211
- context = null;
1212
- currentOptimisticLane = null;
1213
- strictRead = false;
1214
- DELETE = /* @__PURE__ */ Symbol("STORE_PATH_DELETE");
1215
- Object.assign(
1216
- function storePath2(...args) {
1217
- return (state) => {
1218
- updatePath(state, args);
1219
- };
1220
- },
1221
- { DELETE }
1222
- );
1223
- }
1224
- });
1225
- function template(html, isImportNode, isSVG, isMathML) {
22
+ function template(html, flag) {
1226
23
  let node;
1227
- const create = (bypassGuard) => {
1228
- if (isHydrating() && !bypassGuard) throw new Error("Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration.");
1229
- const t = document.createElement("template");
1230
- t.innerHTML = html;
1231
- return t.content.firstChild;
1232
- };
1233
- const fn = isImportNode ? (bypassGuard) => solidJs.untrack(() => document.importNode(node || (node = create(bypassGuard)), true)) : (bypassGuard) => (node || (node = create(bypassGuard))).cloneNode(true);
24
+ const fn = flag === 1 ? (bypassGuard) => document.importNode(node || (node = create(html, bypassGuard, flag)), true) : (bypassGuard) => (node || (node = create(html, bypassGuard, flag))).cloneNode(true);
1234
25
  fn._html = html;
1235
26
  return fn;
1236
27
  }
@@ -1267,10 +58,9 @@ function isHydrating(node) {
1267
58
  return solidJs.sharedConfig.hydrating && (!node || node.isConnected);
1268
59
  }
1269
60
  var effect, isServer, isDev;
1270
- var init_dev2 = __esm({
1271
- "../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.4_@solidjs+signals@0.13.9_solid-js@2.0.0-beta.5/node_modules/@solidjs/web/dist/dev.js"() {
1272
- init_dev();
1273
- effect = (fn, effectFn, initial) => solidJs.createRenderEffect(fn, effectFn, initial, {
61
+ var init_dev = __esm({
62
+ "../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.7_@solidjs+signals@2.0.0-beta.7_solid-js@2.0.0-beta.7/node_modules/@solidjs/web/dist/dev.js"() {
63
+ effect = (fn, effectFn) => solidJs.createRenderEffect(fn, effectFn, {
1274
64
  transparent: true
1275
65
  });
1276
66
  isServer = false;
@@ -1346,8 +136,8 @@ function SolidQueryDevtools(props) {
1346
136
  var _tmpl$;
1347
137
  var init_devtools = __esm({
1348
138
  "src/devtools.tsx"() {
1349
- init_dev2();
1350
- init_dev2();
139
+ init_dev();
140
+ init_dev();
1351
141
  _tmpl$ = /* @__PURE__ */ template(`<div class=tsqd-parent-container>`);
1352
142
  }
1353
143
  });
@@ -1423,19 +213,19 @@ function SolidQueryDevtoolsPanel(props) {
1423
213
  var _tmpl$2;
1424
214
  var init_devtoolsPanel = __esm({
1425
215
  "src/devtoolsPanel.tsx"() {
1426
- init_dev2();
1427
- init_dev2();
1428
- init_dev2();
1429
- init_dev2();
216
+ init_dev();
217
+ init_dev();
218
+ init_dev();
219
+ init_dev();
1430
220
  _tmpl$2 = /* @__PURE__ */ template(`<div class=tsqd-parent-container style=height:500px>`);
1431
221
  }
1432
222
  });
1433
223
 
1434
224
  // src/index.tsx
1435
- init_dev2();
225
+ init_dev();
1436
226
 
1437
227
  // src/clientOnly.tsx
1438
- init_dev2();
228
+ init_dev();
1439
229
  function clientOnly(fn) {
1440
230
  if (isServer) return (props) => props.fallback;
1441
231
  const [comp, setComp] = solidJs.createSignal();