@tanstack/query-devtools 5.67.2 → 5.71.3
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/DevtoolsComponent/{J3FDRF32.js → CPIOZS5X.js} +3 -4
- package/build/DevtoolsComponent/{VONRGPZ6.js → SUXNJKMM.js} +3 -4
- package/build/DevtoolsPanelComponent/{2QQPFIXG.js → LDUQ2GE4.js} +3 -4
- package/build/DevtoolsPanelComponent/{3VW64HDT.js → OKF6E45R.js} +3 -4
- package/build/chunk/{67EVQ76A.js → DZBXNQB4.js} +73 -102
- package/build/chunk/{4F76KWFD.js → HR7YXZ5H.js} +237 -418
- package/build/chunk/{YIUCDINQ.js → V5T5VJKG.js} +237 -418
- package/build/chunk/{TBLV65XX.js → WXAWMS3D.js} +72 -103
- package/build/dev.cjs +362 -575
- package/build/dev.js +3 -3
- package/build/index.cjs +362 -575
- package/build/index.d.cts +9 -5
- package/build/index.d.ts +9 -5
- package/build/index.js +3 -3
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/solid-js@1.9.
|
|
1
|
+
// ../../node_modules/.pnpm/solid-js@1.9.5/node_modules/solid-js/dist/solid.js
|
|
2
2
|
var sharedConfig = {
|
|
3
3
|
context: void 0,
|
|
4
4
|
registry: void 0,
|
|
@@ -25,6 +25,7 @@ function nextHydrateContext() {
|
|
|
25
25
|
count: 0
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
+
var IS_DEV = false;
|
|
28
29
|
var equalFn = (a, b) => a === b;
|
|
29
30
|
var $PROXY = Symbol("solid-proxy");
|
|
30
31
|
var SUPPORTS_PROXY = typeof Proxy === "function";
|
|
@@ -77,10 +78,8 @@ function createSignal(value, options) {
|
|
|
77
78
|
};
|
|
78
79
|
const setter = (value2) => {
|
|
79
80
|
if (typeof value2 === "function") {
|
|
80
|
-
if (Transition && Transition.running && Transition.sources.has(s))
|
|
81
|
-
|
|
82
|
-
else
|
|
83
|
-
value2 = value2(s.value);
|
|
81
|
+
if (Transition && Transition.running && Transition.sources.has(s)) value2 = value2(s.tValue);
|
|
82
|
+
else value2 = value2(s.value);
|
|
84
83
|
}
|
|
85
84
|
return writeSignal(s, value2);
|
|
86
85
|
};
|
|
@@ -88,25 +87,19 @@ function createSignal(value, options) {
|
|
|
88
87
|
}
|
|
89
88
|
function createComputed(fn, value, options) {
|
|
90
89
|
const c = createComputation(fn, value, true, STALE);
|
|
91
|
-
if (Scheduler && Transition && Transition.running)
|
|
92
|
-
|
|
93
|
-
else
|
|
94
|
-
updateComputation(c);
|
|
90
|
+
if (Scheduler && Transition && Transition.running) Updates.push(c);
|
|
91
|
+
else updateComputation(c);
|
|
95
92
|
}
|
|
96
93
|
function createRenderEffect(fn, value, options) {
|
|
97
94
|
const c = createComputation(fn, value, false, STALE);
|
|
98
|
-
if (Scheduler && Transition && Transition.running)
|
|
99
|
-
|
|
100
|
-
else
|
|
101
|
-
updateComputation(c);
|
|
95
|
+
if (Scheduler && Transition && Transition.running) Updates.push(c);
|
|
96
|
+
else updateComputation(c);
|
|
102
97
|
}
|
|
103
98
|
function createEffect(fn, value, options) {
|
|
104
99
|
runEffects = runUserEffects;
|
|
105
100
|
const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
|
|
106
|
-
if (s)
|
|
107
|
-
|
|
108
|
-
if (!options || !options.render)
|
|
109
|
-
c.user = true;
|
|
101
|
+
if (s) c.suspense = s;
|
|
102
|
+
if (!options || !options.render) c.user = true;
|
|
110
103
|
Effects ? Effects.push(c) : updateComputation(c);
|
|
111
104
|
}
|
|
112
105
|
function createMemo(fn, value, options) {
|
|
@@ -118,8 +111,7 @@ function createMemo(fn, value, options) {
|
|
|
118
111
|
if (Scheduler && Transition && Transition.running) {
|
|
119
112
|
c.tState = STALE;
|
|
120
113
|
Updates.push(c);
|
|
121
|
-
} else
|
|
122
|
-
updateComputation(c);
|
|
114
|
+
} else updateComputation(c);
|
|
123
115
|
return readSignal.bind(c);
|
|
124
116
|
}
|
|
125
117
|
function isPromise(v) {
|
|
@@ -140,10 +132,8 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
140
132
|
}), [state, setState] = createSignal(resolved ? "ready" : "unresolved");
|
|
141
133
|
if (sharedConfig.context) {
|
|
142
134
|
id = sharedConfig.getNextContextId();
|
|
143
|
-
if (options.ssrLoadFrom === "initial")
|
|
144
|
-
|
|
145
|
-
else if (sharedConfig.load && sharedConfig.has(id))
|
|
146
|
-
initP = sharedConfig.load(id);
|
|
135
|
+
if (options.ssrLoadFrom === "initial") initP = options.initialValue;
|
|
136
|
+
else if (sharedConfig.load && sharedConfig.has(id)) initP = sharedConfig.load(id);
|
|
147
137
|
}
|
|
148
138
|
function loadEnd(p, v, error2, key) {
|
|
149
139
|
if (pr === p) {
|
|
@@ -163,32 +153,27 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
163
153
|
Transition.running = true;
|
|
164
154
|
completeLoad(v, error2);
|
|
165
155
|
}, false);
|
|
166
|
-
} else
|
|
167
|
-
completeLoad(v, error2);
|
|
156
|
+
} else completeLoad(v, error2);
|
|
168
157
|
}
|
|
169
158
|
return v;
|
|
170
159
|
}
|
|
171
160
|
function completeLoad(v, err) {
|
|
172
161
|
runUpdates(() => {
|
|
173
|
-
if (err === void 0)
|
|
174
|
-
setValue(() => v);
|
|
162
|
+
if (err === void 0) setValue(() => v);
|
|
175
163
|
setState(err !== void 0 ? "errored" : resolved ? "ready" : "unresolved");
|
|
176
164
|
setError(err);
|
|
177
|
-
for (const c of contexts.keys())
|
|
178
|
-
c.decrement();
|
|
165
|
+
for (const c of contexts.keys()) c.decrement();
|
|
179
166
|
contexts.clear();
|
|
180
167
|
}, false);
|
|
181
168
|
}
|
|
182
169
|
function read() {
|
|
183
170
|
const c = SuspenseContext && useContext(SuspenseContext), v = value(), err = error();
|
|
184
|
-
if (err !== void 0 && !pr)
|
|
185
|
-
throw err;
|
|
171
|
+
if (err !== void 0 && !pr) throw err;
|
|
186
172
|
if (Listener && !Listener.user && c) {
|
|
187
173
|
createComputed(() => {
|
|
188
174
|
track();
|
|
189
175
|
if (pr) {
|
|
190
|
-
if (c.resolved && Transition && loadedUnderTransition)
|
|
191
|
-
Transition.promises.add(pr);
|
|
176
|
+
if (c.resolved && Transition && loadedUnderTransition) Transition.promises.add(pr);
|
|
192
177
|
else if (!contexts.has(c)) {
|
|
193
178
|
c.increment();
|
|
194
179
|
contexts.add(c);
|
|
@@ -199,8 +184,7 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
199
184
|
return v;
|
|
200
185
|
}
|
|
201
186
|
function load(refetching = true) {
|
|
202
|
-
if (refetching !== false && scheduled)
|
|
203
|
-
return;
|
|
187
|
+
if (refetching !== false && scheduled) return;
|
|
204
188
|
scheduled = false;
|
|
205
189
|
const lookup = dynamic ? dynamic() : source;
|
|
206
190
|
loadedUnderTransition = Transition && Transition.running;
|
|
@@ -208,8 +192,7 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
208
192
|
loadEnd(pr, untrack(value));
|
|
209
193
|
return;
|
|
210
194
|
}
|
|
211
|
-
if (Transition && pr)
|
|
212
|
-
Transition.promises.delete(pr);
|
|
195
|
+
if (Transition && pr) Transition.promises.delete(pr);
|
|
213
196
|
const p = initP !== NO_INIT ? initP : untrack(
|
|
214
197
|
() => fetcher(lookup, {
|
|
215
198
|
value: value(),
|
|
@@ -222,10 +205,8 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
222
205
|
}
|
|
223
206
|
pr = p;
|
|
224
207
|
if ("value" in p) {
|
|
225
|
-
if (p.status === "success")
|
|
226
|
-
|
|
227
|
-
else
|
|
228
|
-
loadEnd(pr, void 0, castError(p.value), lookup);
|
|
208
|
+
if (p.status === "success") loadEnd(pr, p.value, void 0, lookup);
|
|
209
|
+
else loadEnd(pr, void 0, castError(p.value), lookup);
|
|
229
210
|
return p;
|
|
230
211
|
}
|
|
231
212
|
scheduled = true;
|
|
@@ -254,19 +235,15 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
254
235
|
},
|
|
255
236
|
latest: {
|
|
256
237
|
get() {
|
|
257
|
-
if (!resolved)
|
|
258
|
-
return read();
|
|
238
|
+
if (!resolved) return read();
|
|
259
239
|
const err = error();
|
|
260
|
-
if (err && !pr)
|
|
261
|
-
throw err;
|
|
240
|
+
if (err && !pr) throw err;
|
|
262
241
|
return value();
|
|
263
242
|
}
|
|
264
243
|
}
|
|
265
244
|
});
|
|
266
|
-
if (dynamic)
|
|
267
|
-
|
|
268
|
-
else
|
|
269
|
-
load(false);
|
|
245
|
+
if (dynamic) createComputed(() => load(false));
|
|
246
|
+
else load(false);
|
|
270
247
|
return [
|
|
271
248
|
read,
|
|
272
249
|
{
|
|
@@ -279,13 +256,11 @@ function batch(fn) {
|
|
|
279
256
|
return runUpdates(fn, false);
|
|
280
257
|
}
|
|
281
258
|
function untrack(fn) {
|
|
282
|
-
if (!ExternalSourceConfig && Listener === null)
|
|
283
|
-
return fn();
|
|
259
|
+
if (!ExternalSourceConfig && Listener === null) return fn();
|
|
284
260
|
const listener = Listener;
|
|
285
261
|
Listener = null;
|
|
286
262
|
try {
|
|
287
|
-
if (ExternalSourceConfig)
|
|
288
|
-
return ExternalSourceConfig.untrack(fn);
|
|
263
|
+
if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);
|
|
289
264
|
return fn();
|
|
290
265
|
} finally {
|
|
291
266
|
Listener = listener;
|
|
@@ -299,10 +274,8 @@ function on(deps, fn, options) {
|
|
|
299
274
|
let input;
|
|
300
275
|
if (isArray3) {
|
|
301
276
|
input = Array(deps.length);
|
|
302
|
-
for (let i = 0; i < deps.length; i++)
|
|
303
|
-
|
|
304
|
-
} else
|
|
305
|
-
input = deps();
|
|
277
|
+
for (let i = 0; i < deps.length; i++) input[i] = deps[i]();
|
|
278
|
+
} else input = deps();
|
|
306
279
|
if (defer) {
|
|
307
280
|
defer = false;
|
|
308
281
|
return prevValue;
|
|
@@ -316,12 +289,9 @@ function onMount(fn) {
|
|
|
316
289
|
createEffect(() => untrack(fn));
|
|
317
290
|
}
|
|
318
291
|
function onCleanup(fn) {
|
|
319
|
-
if (Owner === null)
|
|
320
|
-
|
|
321
|
-
else
|
|
322
|
-
Owner.cleanups = [fn];
|
|
323
|
-
else
|
|
324
|
-
Owner.cleanups.push(fn);
|
|
292
|
+
if (Owner === null) ;
|
|
293
|
+
else if (Owner.cleanups === null) Owner.cleanups = [fn];
|
|
294
|
+
else Owner.cleanups.push(fn);
|
|
325
295
|
return fn;
|
|
326
296
|
}
|
|
327
297
|
function getOwner() {
|
|
@@ -398,8 +368,7 @@ var SuspenseContext;
|
|
|
398
368
|
function readSignal() {
|
|
399
369
|
const runningTransition = Transition && Transition.running;
|
|
400
370
|
if (this.sources && (runningTransition ? this.tState : this.state)) {
|
|
401
|
-
if ((runningTransition ? this.tState : this.state) === STALE)
|
|
402
|
-
updateComputation(this);
|
|
371
|
+
if ((runningTransition ? this.tState : this.state) === STALE) updateComputation(this);
|
|
403
372
|
else {
|
|
404
373
|
const updates = Updates;
|
|
405
374
|
Updates = null;
|
|
@@ -424,8 +393,7 @@ function readSignal() {
|
|
|
424
393
|
this.observerSlots.push(Listener.sources.length - 1);
|
|
425
394
|
}
|
|
426
395
|
}
|
|
427
|
-
if (runningTransition && Transition.sources.has(this))
|
|
428
|
-
return this.tValue;
|
|
396
|
+
if (runningTransition && Transition.sources.has(this)) return this.tValue;
|
|
429
397
|
return this.value;
|
|
430
398
|
}
|
|
431
399
|
function writeSignal(node, value, isComp) {
|
|
@@ -437,34 +405,25 @@ function writeSignal(node, value, isComp) {
|
|
|
437
405
|
Transition.sources.add(node);
|
|
438
406
|
node.tValue = value;
|
|
439
407
|
}
|
|
440
|
-
if (!TransitionRunning)
|
|
441
|
-
|
|
442
|
-
} else
|
|
443
|
-
node.value = value;
|
|
408
|
+
if (!TransitionRunning) node.value = value;
|
|
409
|
+
} else node.value = value;
|
|
444
410
|
if (node.observers && node.observers.length) {
|
|
445
411
|
runUpdates(() => {
|
|
446
412
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
447
413
|
const o = node.observers[i];
|
|
448
414
|
const TransitionRunning = Transition && Transition.running;
|
|
449
|
-
if (TransitionRunning && Transition.disposed.has(o))
|
|
450
|
-
continue;
|
|
415
|
+
if (TransitionRunning && Transition.disposed.has(o)) continue;
|
|
451
416
|
if (TransitionRunning ? !o.tState : !o.state) {
|
|
452
|
-
if (o.pure)
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
Effects.push(o);
|
|
456
|
-
if (o.observers)
|
|
457
|
-
markDownstream(o);
|
|
417
|
+
if (o.pure) Updates.push(o);
|
|
418
|
+
else Effects.push(o);
|
|
419
|
+
if (o.observers) markDownstream(o);
|
|
458
420
|
}
|
|
459
|
-
if (!TransitionRunning)
|
|
460
|
-
|
|
461
|
-
else
|
|
462
|
-
o.tState = STALE;
|
|
421
|
+
if (!TransitionRunning) o.state = STALE;
|
|
422
|
+
else o.tState = STALE;
|
|
463
423
|
}
|
|
464
424
|
if (Updates.length > 1e6) {
|
|
465
425
|
Updates = [];
|
|
466
|
-
if (
|
|
467
|
-
;
|
|
426
|
+
if (IS_DEV) ;
|
|
468
427
|
throw new Error();
|
|
469
428
|
}
|
|
470
429
|
}, false);
|
|
@@ -473,8 +432,7 @@ function writeSignal(node, value, isComp) {
|
|
|
473
432
|
return value;
|
|
474
433
|
}
|
|
475
434
|
function updateComputation(node) {
|
|
476
|
-
if (!node.fn)
|
|
477
|
-
return;
|
|
435
|
+
if (!node.fn) return;
|
|
478
436
|
cleanNode(node);
|
|
479
437
|
const time = ExecCount;
|
|
480
438
|
runComputation(
|
|
@@ -523,8 +481,7 @@ function runComputation(node, value, time) {
|
|
|
523
481
|
} else if (Transition && Transition.running && node.pure) {
|
|
524
482
|
Transition.sources.add(node);
|
|
525
483
|
node.tValue = nextValue;
|
|
526
|
-
} else
|
|
527
|
-
node.value = nextValue;
|
|
484
|
+
} else node.value = nextValue;
|
|
528
485
|
node.updatedAt = time;
|
|
529
486
|
}
|
|
530
487
|
}
|
|
@@ -546,19 +503,14 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
546
503
|
c.state = 0;
|
|
547
504
|
c.tState = state;
|
|
548
505
|
}
|
|
549
|
-
if (Owner === null)
|
|
550
|
-
;
|
|
506
|
+
if (Owner === null) ;
|
|
551
507
|
else if (Owner !== UNOWNED) {
|
|
552
508
|
if (Transition && Transition.running && Owner.pure) {
|
|
553
|
-
if (!Owner.tOwned)
|
|
554
|
-
|
|
555
|
-
else
|
|
556
|
-
Owner.tOwned.push(c);
|
|
509
|
+
if (!Owner.tOwned) Owner.tOwned = [c];
|
|
510
|
+
else Owner.tOwned.push(c);
|
|
557
511
|
} else {
|
|
558
|
-
if (!Owner.owned)
|
|
559
|
-
|
|
560
|
-
else
|
|
561
|
-
Owner.owned.push(c);
|
|
512
|
+
if (!Owner.owned) Owner.owned = [c];
|
|
513
|
+
else Owner.owned.push(c);
|
|
562
514
|
}
|
|
563
515
|
}
|
|
564
516
|
if (ExternalSourceConfig && c.fn) {
|
|
@@ -578,26 +530,20 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
578
530
|
}
|
|
579
531
|
function runTop(node) {
|
|
580
532
|
const runningTransition = Transition && Transition.running;
|
|
581
|
-
if ((runningTransition ? node.tState : node.state) === 0)
|
|
582
|
-
|
|
583
|
-
if (
|
|
584
|
-
return lookUpstream(node);
|
|
585
|
-
if (node.suspense && untrack(node.suspense.inFallback))
|
|
586
|
-
return node.suspense.effects.push(node);
|
|
533
|
+
if ((runningTransition ? node.tState : node.state) === 0) return;
|
|
534
|
+
if ((runningTransition ? node.tState : node.state) === PENDING) return lookUpstream(node);
|
|
535
|
+
if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
|
|
587
536
|
const ancestors = [node];
|
|
588
537
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
589
|
-
if (runningTransition && Transition.disposed.has(node))
|
|
590
|
-
|
|
591
|
-
if (runningTransition ? node.tState : node.state)
|
|
592
|
-
ancestors.push(node);
|
|
538
|
+
if (runningTransition && Transition.disposed.has(node)) return;
|
|
539
|
+
if (runningTransition ? node.tState : node.state) ancestors.push(node);
|
|
593
540
|
}
|
|
594
541
|
for (let i = ancestors.length - 1; i >= 0; i--) {
|
|
595
542
|
node = ancestors[i];
|
|
596
543
|
if (runningTransition) {
|
|
597
544
|
let top = node, prev = ancestors[i + 1];
|
|
598
545
|
while ((top = top.owner) && top !== prev) {
|
|
599
|
-
if (Transition.disposed.has(top))
|
|
600
|
-
return;
|
|
546
|
+
if (Transition.disposed.has(top)) return;
|
|
601
547
|
}
|
|
602
548
|
}
|
|
603
549
|
if ((runningTransition ? node.tState : node.state) === STALE) {
|
|
@@ -611,37 +557,29 @@ function runTop(node) {
|
|
|
611
557
|
}
|
|
612
558
|
}
|
|
613
559
|
function runUpdates(fn, init) {
|
|
614
|
-
if (Updates)
|
|
615
|
-
return fn();
|
|
560
|
+
if (Updates) return fn();
|
|
616
561
|
let wait = false;
|
|
617
|
-
if (!init)
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
wait = true;
|
|
621
|
-
else
|
|
622
|
-
Effects = [];
|
|
562
|
+
if (!init) Updates = [];
|
|
563
|
+
if (Effects) wait = true;
|
|
564
|
+
else Effects = [];
|
|
623
565
|
ExecCount++;
|
|
624
566
|
try {
|
|
625
567
|
const res = fn();
|
|
626
568
|
completeUpdates(wait);
|
|
627
569
|
return res;
|
|
628
570
|
} catch (err) {
|
|
629
|
-
if (!wait)
|
|
630
|
-
Effects = null;
|
|
571
|
+
if (!wait) Effects = null;
|
|
631
572
|
Updates = null;
|
|
632
573
|
handleError(err);
|
|
633
574
|
}
|
|
634
575
|
}
|
|
635
576
|
function completeUpdates(wait) {
|
|
636
577
|
if (Updates) {
|
|
637
|
-
if (Scheduler && Transition && Transition.running)
|
|
638
|
-
|
|
639
|
-
else
|
|
640
|
-
runQueue(Updates);
|
|
578
|
+
if (Scheduler && Transition && Transition.running) scheduleQueue(Updates);
|
|
579
|
+
else runQueue(Updates);
|
|
641
580
|
Updates = null;
|
|
642
581
|
}
|
|
643
|
-
if (wait)
|
|
644
|
-
return;
|
|
582
|
+
if (wait) return;
|
|
645
583
|
let res;
|
|
646
584
|
if (Transition) {
|
|
647
585
|
if (!Transition.promises.size && !Transition.queue.size) {
|
|
@@ -655,16 +593,13 @@ function completeUpdates(wait) {
|
|
|
655
593
|
}
|
|
656
594
|
Transition = null;
|
|
657
595
|
runUpdates(() => {
|
|
658
|
-
for (const d of disposed)
|
|
659
|
-
cleanNode(d);
|
|
596
|
+
for (const d of disposed) cleanNode(d);
|
|
660
597
|
for (const v of sources) {
|
|
661
598
|
v.value = v.tValue;
|
|
662
599
|
if (v.owned) {
|
|
663
|
-
for (let i = 0, len = v.owned.length; i < len; i++)
|
|
664
|
-
cleanNode(v.owned[i]);
|
|
600
|
+
for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);
|
|
665
601
|
}
|
|
666
|
-
if (v.tOwned)
|
|
667
|
-
v.owned = v.tOwned;
|
|
602
|
+
if (v.tOwned) v.owned = v.tOwned;
|
|
668
603
|
delete v.tValue;
|
|
669
604
|
delete v.tOwned;
|
|
670
605
|
v.tState = 0;
|
|
@@ -681,14 +616,11 @@ function completeUpdates(wait) {
|
|
|
681
616
|
}
|
|
682
617
|
const e = Effects;
|
|
683
618
|
Effects = null;
|
|
684
|
-
if (e.length)
|
|
685
|
-
|
|
686
|
-
if (res)
|
|
687
|
-
res();
|
|
619
|
+
if (e.length) runUpdates(() => runEffects(e), false);
|
|
620
|
+
if (res) res();
|
|
688
621
|
}
|
|
689
622
|
function runQueue(queue) {
|
|
690
|
-
for (let i = 0; i < queue.length; i++)
|
|
691
|
-
runTop(queue[i]);
|
|
623
|
+
for (let i = 0; i < queue.length; i++) runTop(queue[i]);
|
|
692
624
|
}
|
|
693
625
|
function scheduleQueue(queue) {
|
|
694
626
|
for (let i = 0; i < queue.length; i++) {
|
|
@@ -711,10 +643,8 @@ function runUserEffects(queue) {
|
|
|
711
643
|
let i, userLength = 0;
|
|
712
644
|
for (i = 0; i < queue.length; i++) {
|
|
713
645
|
const e = queue[i];
|
|
714
|
-
if (!e.user)
|
|
715
|
-
|
|
716
|
-
else
|
|
717
|
-
queue[userLength++] = e;
|
|
646
|
+
if (!e.user) runTop(e);
|
|
647
|
+
else queue[userLength++] = e;
|
|
718
648
|
}
|
|
719
649
|
if (sharedConfig.context) {
|
|
720
650
|
if (sharedConfig.count) {
|
|
@@ -729,15 +659,12 @@ function runUserEffects(queue) {
|
|
|
729
659
|
userLength += sharedConfig.effects.length;
|
|
730
660
|
delete sharedConfig.effects;
|
|
731
661
|
}
|
|
732
|
-
for (i = 0; i < userLength; i++)
|
|
733
|
-
runTop(queue[i]);
|
|
662
|
+
for (i = 0; i < userLength; i++) runTop(queue[i]);
|
|
734
663
|
}
|
|
735
664
|
function lookUpstream(node, ignore) {
|
|
736
665
|
const runningTransition = Transition && Transition.running;
|
|
737
|
-
if (runningTransition)
|
|
738
|
-
|
|
739
|
-
else
|
|
740
|
-
node.state = 0;
|
|
666
|
+
if (runningTransition) node.tState = 0;
|
|
667
|
+
else node.state = 0;
|
|
741
668
|
for (let i = 0; i < node.sources.length; i += 1) {
|
|
742
669
|
const source = node.sources[i];
|
|
743
670
|
if (source.sources) {
|
|
@@ -745,8 +672,7 @@ function lookUpstream(node, ignore) {
|
|
|
745
672
|
if (state === STALE) {
|
|
746
673
|
if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount))
|
|
747
674
|
runTop(source);
|
|
748
|
-
} else if (state === PENDING)
|
|
749
|
-
lookUpstream(source, ignore);
|
|
675
|
+
} else if (state === PENDING) lookUpstream(source, ignore);
|
|
750
676
|
}
|
|
751
677
|
}
|
|
752
678
|
}
|
|
@@ -755,14 +681,10 @@ function markDownstream(node) {
|
|
|
755
681
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
756
682
|
const o = node.observers[i];
|
|
757
683
|
if (runningTransition ? !o.tState : !o.state) {
|
|
758
|
-
if (runningTransition)
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
if (o.pure)
|
|
763
|
-
Updates.push(o);
|
|
764
|
-
else
|
|
765
|
-
Effects.push(o);
|
|
684
|
+
if (runningTransition) o.tState = PENDING;
|
|
685
|
+
else o.state = PENDING;
|
|
686
|
+
if (o.pure) Updates.push(o);
|
|
687
|
+
else Effects.push(o);
|
|
766
688
|
o.observers && markDownstream(o);
|
|
767
689
|
}
|
|
768
690
|
}
|
|
@@ -783,26 +705,21 @@ function cleanNode(node) {
|
|
|
783
705
|
}
|
|
784
706
|
}
|
|
785
707
|
if (node.tOwned) {
|
|
786
|
-
for (i = node.tOwned.length - 1; i >= 0; i--)
|
|
787
|
-
cleanNode(node.tOwned[i]);
|
|
708
|
+
for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]);
|
|
788
709
|
delete node.tOwned;
|
|
789
710
|
}
|
|
790
711
|
if (Transition && Transition.running && node.pure) {
|
|
791
712
|
reset(node, true);
|
|
792
713
|
} else if (node.owned) {
|
|
793
|
-
for (i = node.owned.length - 1; i >= 0; i--)
|
|
794
|
-
cleanNode(node.owned[i]);
|
|
714
|
+
for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]);
|
|
795
715
|
node.owned = null;
|
|
796
716
|
}
|
|
797
717
|
if (node.cleanups) {
|
|
798
|
-
for (i = node.cleanups.length - 1; i >= 0; i--)
|
|
799
|
-
node.cleanups[i]();
|
|
718
|
+
for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i]();
|
|
800
719
|
node.cleanups = null;
|
|
801
720
|
}
|
|
802
|
-
if (Transition && Transition.running)
|
|
803
|
-
|
|
804
|
-
else
|
|
805
|
-
node.state = 0;
|
|
721
|
+
if (Transition && Transition.running) node.tState = 0;
|
|
722
|
+
else node.state = 0;
|
|
806
723
|
}
|
|
807
724
|
function reset(node, top) {
|
|
808
725
|
if (!top) {
|
|
@@ -810,21 +727,18 @@ function reset(node, top) {
|
|
|
810
727
|
Transition.disposed.add(node);
|
|
811
728
|
}
|
|
812
729
|
if (node.owned) {
|
|
813
|
-
for (let i = 0; i < node.owned.length; i++)
|
|
814
|
-
reset(node.owned[i]);
|
|
730
|
+
for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);
|
|
815
731
|
}
|
|
816
732
|
}
|
|
817
733
|
function castError(err) {
|
|
818
|
-
if (err instanceof Error)
|
|
819
|
-
return err;
|
|
734
|
+
if (err instanceof Error) return err;
|
|
820
735
|
return new Error(typeof err === "string" ? err : "Unknown error", {
|
|
821
736
|
cause: err
|
|
822
737
|
});
|
|
823
738
|
}
|
|
824
739
|
function runErrors(err, fns, owner) {
|
|
825
740
|
try {
|
|
826
|
-
for (const f of fns)
|
|
827
|
-
f(err);
|
|
741
|
+
for (const f of fns) f(err);
|
|
828
742
|
} catch (e) {
|
|
829
743
|
handleError(e, owner && owner.owner || null);
|
|
830
744
|
}
|
|
@@ -832,8 +746,7 @@ function runErrors(err, fns, owner) {
|
|
|
832
746
|
function handleError(err, owner = Owner) {
|
|
833
747
|
const fns = ERROR && owner && owner.context && owner.context[ERROR];
|
|
834
748
|
const error = castError(err);
|
|
835
|
-
if (!fns)
|
|
836
|
-
throw error;
|
|
749
|
+
if (!fns) throw error;
|
|
837
750
|
if (Effects)
|
|
838
751
|
Effects.push({
|
|
839
752
|
fn() {
|
|
@@ -841,12 +754,10 @@ function handleError(err, owner = Owner) {
|
|
|
841
754
|
},
|
|
842
755
|
state: STALE
|
|
843
756
|
});
|
|
844
|
-
else
|
|
845
|
-
runErrors(error, fns, owner);
|
|
757
|
+
else runErrors(error, fns, owner);
|
|
846
758
|
}
|
|
847
759
|
function resolveChildren(children2) {
|
|
848
|
-
if (typeof children2 === "function" && !children2.length)
|
|
849
|
-
return resolveChildren(children2());
|
|
760
|
+
if (typeof children2 === "function" && !children2.length) return resolveChildren(children2());
|
|
850
761
|
if (Array.isArray(children2)) {
|
|
851
762
|
const results = [];
|
|
852
763
|
for (let i = 0; i < children2.length; i++) {
|
|
@@ -875,8 +786,7 @@ function createProvider(id, options) {
|
|
|
875
786
|
}
|
|
876
787
|
var FALLBACK = Symbol("fallback");
|
|
877
788
|
function dispose(d) {
|
|
878
|
-
for (let i = 0; i < d.length; i++)
|
|
879
|
-
d[i]();
|
|
789
|
+
for (let i = 0; i < d.length; i++) d[i]();
|
|
880
790
|
}
|
|
881
791
|
function mapArray(list, mapFn, options = {}) {
|
|
882
792
|
let items = [], mapped = [], disposers = [], len = 0, indexes = mapFn.length > 1 ? [] : null;
|
|
@@ -914,8 +824,7 @@ function mapArray(list, mapFn, options = {}) {
|
|
|
914
824
|
temp = new Array(newLen);
|
|
915
825
|
tempdisposers = new Array(newLen);
|
|
916
826
|
indexes && (tempIndexes = new Array(newLen));
|
|
917
|
-
for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++)
|
|
918
|
-
;
|
|
827
|
+
for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++) ;
|
|
919
828
|
for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {
|
|
920
829
|
temp[newEnd] = mapped[end];
|
|
921
830
|
tempdisposers[newEnd] = disposers[end];
|
|
@@ -938,8 +847,7 @@ function mapArray(list, mapFn, options = {}) {
|
|
|
938
847
|
indexes && (tempIndexes[j] = indexes[i]);
|
|
939
848
|
j = newIndicesNext[j];
|
|
940
849
|
newIndices.set(item, j);
|
|
941
|
-
} else
|
|
942
|
-
disposers[i]();
|
|
850
|
+
} else disposers[i]();
|
|
943
851
|
}
|
|
944
852
|
for (j = start; j < newLen; j++) {
|
|
945
853
|
if (j in temp) {
|
|
@@ -949,8 +857,7 @@ function mapArray(list, mapFn, options = {}) {
|
|
|
949
857
|
indexes[j] = tempIndexes[j];
|
|
950
858
|
indexes[j](j);
|
|
951
859
|
}
|
|
952
|
-
} else
|
|
953
|
-
mapped[j] = createRoot(mapper);
|
|
860
|
+
} else mapped[j] = createRoot(mapper);
|
|
954
861
|
}
|
|
955
862
|
mapped = mapped.slice(0, len = newLen);
|
|
956
863
|
items = newItems.slice(0);
|
|
@@ -1041,13 +948,11 @@ function trueFn() {
|
|
|
1041
948
|
}
|
|
1042
949
|
var propTraps = {
|
|
1043
950
|
get(_, property, receiver) {
|
|
1044
|
-
if (property === $PROXY)
|
|
1045
|
-
return receiver;
|
|
951
|
+
if (property === $PROXY) return receiver;
|
|
1046
952
|
return _.get(property);
|
|
1047
953
|
},
|
|
1048
954
|
has(_, property) {
|
|
1049
|
-
if (property === $PROXY)
|
|
1050
|
-
return true;
|
|
955
|
+
if (property === $PROXY) return true;
|
|
1051
956
|
return _.has(property);
|
|
1052
957
|
},
|
|
1053
958
|
set: trueFn,
|
|
@@ -1073,8 +978,7 @@ function resolveSource(s) {
|
|
|
1073
978
|
function resolveSources() {
|
|
1074
979
|
for (let i = 0, length = this.length; i < length; ++i) {
|
|
1075
980
|
const v = this[i]();
|
|
1076
|
-
if (v !== void 0)
|
|
1077
|
-
return v;
|
|
981
|
+
if (v !== void 0) return v;
|
|
1078
982
|
}
|
|
1079
983
|
}
|
|
1080
984
|
function mergeProps(...sources) {
|
|
@@ -1090,14 +994,12 @@ function mergeProps(...sources) {
|
|
|
1090
994
|
get(property) {
|
|
1091
995
|
for (let i = sources.length - 1; i >= 0; i--) {
|
|
1092
996
|
const v = resolveSource(sources[i])[property];
|
|
1093
|
-
if (v !== void 0)
|
|
1094
|
-
return v;
|
|
997
|
+
if (v !== void 0) return v;
|
|
1095
998
|
}
|
|
1096
999
|
},
|
|
1097
1000
|
has(property) {
|
|
1098
1001
|
for (let i = sources.length - 1; i >= 0; i--) {
|
|
1099
|
-
if (property in resolveSource(sources[i]))
|
|
1100
|
-
return true;
|
|
1002
|
+
if (property in resolveSource(sources[i])) return true;
|
|
1101
1003
|
}
|
|
1102
1004
|
return false;
|
|
1103
1005
|
},
|
|
@@ -1115,13 +1017,11 @@ function mergeProps(...sources) {
|
|
|
1115
1017
|
const defined = /* @__PURE__ */ Object.create(null);
|
|
1116
1018
|
for (let i = sources.length - 1; i >= 0; i--) {
|
|
1117
1019
|
const source = sources[i];
|
|
1118
|
-
if (!source)
|
|
1119
|
-
continue;
|
|
1020
|
+
if (!source) continue;
|
|
1120
1021
|
const sourceKeys = Object.getOwnPropertyNames(source);
|
|
1121
1022
|
for (let i2 = sourceKeys.length - 1; i2 >= 0; i2--) {
|
|
1122
1023
|
const key = sourceKeys[i2];
|
|
1123
|
-
if (key === "__proto__" || key === "constructor")
|
|
1124
|
-
continue;
|
|
1024
|
+
if (key === "__proto__" || key === "constructor") continue;
|
|
1125
1025
|
const desc = Object.getOwnPropertyDescriptor(source, key);
|
|
1126
1026
|
if (!defined[key]) {
|
|
1127
1027
|
defined[key] = desc.get ? {
|
|
@@ -1132,10 +1032,8 @@ function mergeProps(...sources) {
|
|
|
1132
1032
|
} else {
|
|
1133
1033
|
const sources2 = sourcesMap[key];
|
|
1134
1034
|
if (sources2) {
|
|
1135
|
-
if (desc.get)
|
|
1136
|
-
|
|
1137
|
-
else if (desc.value !== void 0)
|
|
1138
|
-
sources2.push(() => desc.value);
|
|
1035
|
+
if (desc.get) sources2.push(desc.get.bind(source));
|
|
1036
|
+
else if (desc.value !== void 0) sources2.push(() => desc.value);
|
|
1139
1037
|
}
|
|
1140
1038
|
}
|
|
1141
1039
|
}
|
|
@@ -1144,10 +1042,8 @@ function mergeProps(...sources) {
|
|
|
1144
1042
|
const definedKeys = Object.keys(defined);
|
|
1145
1043
|
for (let i = definedKeys.length - 1; i >= 0; i--) {
|
|
1146
1044
|
const key = definedKeys[i], desc = defined[key];
|
|
1147
|
-
if (desc && desc.get)
|
|
1148
|
-
|
|
1149
|
-
else
|
|
1150
|
-
target[key] = desc ? desc.value : void 0;
|
|
1045
|
+
if (desc && desc.get) Object.defineProperty(target, key, desc);
|
|
1046
|
+
else target[key] = desc ? desc.value : void 0;
|
|
1151
1047
|
}
|
|
1152
1048
|
return target;
|
|
1153
1049
|
}
|
|
@@ -1231,10 +1127,8 @@ function lazy(fn) {
|
|
|
1231
1127
|
let Comp;
|
|
1232
1128
|
return createMemo(
|
|
1233
1129
|
() => (Comp = comp()) ? untrack(() => {
|
|
1234
|
-
if (
|
|
1235
|
-
|
|
1236
|
-
if (!ctx || sharedConfig.done)
|
|
1237
|
-
return Comp(props);
|
|
1130
|
+
if (IS_DEV) ;
|
|
1131
|
+
if (!ctx || sharedConfig.done) return Comp(props);
|
|
1238
1132
|
const c = sharedConfig.context;
|
|
1239
1133
|
setHydrateContext(ctx);
|
|
1240
1134
|
const r = Comp(props);
|
|
@@ -1266,8 +1160,9 @@ function Index(props) {
|
|
|
1266
1160
|
}
|
|
1267
1161
|
function Show(props) {
|
|
1268
1162
|
const keyed = props.keyed;
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1163
|
+
const conditionValue = createMemo(() => props.when, void 0, void 0);
|
|
1164
|
+
const condition = keyed ? conditionValue : createMemo(conditionValue, void 0, {
|
|
1165
|
+
equals: (a, b) => !a === !b
|
|
1271
1166
|
});
|
|
1272
1167
|
return createMemo(
|
|
1273
1168
|
() => {
|
|
@@ -1278,9 +1173,8 @@ function Show(props) {
|
|
|
1278
1173
|
return fn ? untrack(
|
|
1279
1174
|
() => child(
|
|
1280
1175
|
keyed ? c : () => {
|
|
1281
|
-
if (!untrack(condition))
|
|
1282
|
-
|
|
1283
|
-
return props.when;
|
|
1176
|
+
if (!untrack(condition)) throw narrowedError("Show");
|
|
1177
|
+
return conditionValue();
|
|
1284
1178
|
}
|
|
1285
1179
|
)
|
|
1286
1180
|
) : child;
|
|
@@ -1292,43 +1186,42 @@ function Show(props) {
|
|
|
1292
1186
|
);
|
|
1293
1187
|
}
|
|
1294
1188
|
function Switch(props) {
|
|
1295
|
-
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1298
|
-
()
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
equals
|
|
1189
|
+
const chs = children(() => props.children);
|
|
1190
|
+
const switchFunc = createMemo(() => {
|
|
1191
|
+
const ch = chs();
|
|
1192
|
+
const mps = Array.isArray(ch) ? ch : [ch];
|
|
1193
|
+
let func = () => void 0;
|
|
1194
|
+
for (let i = 0; i < mps.length; i++) {
|
|
1195
|
+
const index = i;
|
|
1196
|
+
const mp = mps[i];
|
|
1197
|
+
const prevFunc = func;
|
|
1198
|
+
const conditionValue = createMemo(
|
|
1199
|
+
() => prevFunc() ? void 0 : mp.when,
|
|
1200
|
+
void 0,
|
|
1201
|
+
void 0
|
|
1202
|
+
);
|
|
1203
|
+
const condition = mp.keyed ? conditionValue : createMemo(conditionValue, void 0, {
|
|
1204
|
+
equals: (a, b) => !a === !b
|
|
1205
|
+
});
|
|
1206
|
+
func = () => prevFunc() || (condition() ? [index, conditionValue, mp] : void 0);
|
|
1314
1207
|
}
|
|
1315
|
-
|
|
1208
|
+
return func;
|
|
1209
|
+
});
|
|
1316
1210
|
return createMemo(
|
|
1317
1211
|
() => {
|
|
1318
|
-
const
|
|
1319
|
-
if (
|
|
1320
|
-
|
|
1321
|
-
const
|
|
1322
|
-
const fn = typeof
|
|
1212
|
+
const sel = switchFunc()();
|
|
1213
|
+
if (!sel) return props.fallback;
|
|
1214
|
+
const [index, conditionValue, mp] = sel;
|
|
1215
|
+
const child = mp.children;
|
|
1216
|
+
const fn = typeof child === "function" && child.length > 0;
|
|
1323
1217
|
return fn ? untrack(
|
|
1324
|
-
() =>
|
|
1325
|
-
keyed ?
|
|
1326
|
-
if (untrack(
|
|
1327
|
-
|
|
1328
|
-
return cond.when;
|
|
1218
|
+
() => child(
|
|
1219
|
+
mp.keyed ? conditionValue() : () => {
|
|
1220
|
+
if (untrack(switchFunc)()?.[0] !== index) throw narrowedError("Match");
|
|
1221
|
+
return conditionValue();
|
|
1329
1222
|
}
|
|
1330
1223
|
)
|
|
1331
|
-
) :
|
|
1224
|
+
) : child;
|
|
1332
1225
|
},
|
|
1333
1226
|
void 0,
|
|
1334
1227
|
void 0
|
|
@@ -1339,7 +1232,7 @@ function Match(props) {
|
|
|
1339
1232
|
}
|
|
1340
1233
|
var DEV = void 0;
|
|
1341
1234
|
|
|
1342
|
-
// ../../node_modules/.pnpm/solid-js@1.9.
|
|
1235
|
+
// ../../node_modules/.pnpm/solid-js@1.9.5/node_modules/solid-js/web/dist/web.js
|
|
1343
1236
|
var booleans = [
|
|
1344
1237
|
"allowfullscreen",
|
|
1345
1238
|
"async",
|
|
@@ -1537,12 +1430,10 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
1537
1430
|
}
|
|
1538
1431
|
if (aEnd === aStart) {
|
|
1539
1432
|
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
|
|
1540
|
-
while (bStart < bEnd)
|
|
1541
|
-
parentNode.insertBefore(b[bStart++], node);
|
|
1433
|
+
while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
|
|
1542
1434
|
} else if (bEnd === bStart) {
|
|
1543
1435
|
while (aStart < aEnd) {
|
|
1544
|
-
if (!map || !map.has(a[aStart]))
|
|
1545
|
-
a[aStart].remove();
|
|
1436
|
+
if (!map || !map.has(a[aStart])) a[aStart].remove();
|
|
1546
1437
|
aStart++;
|
|
1547
1438
|
}
|
|
1548
1439
|
} else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
|
|
@@ -1554,28 +1445,22 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
1554
1445
|
if (!map) {
|
|
1555
1446
|
map = /* @__PURE__ */ new Map();
|
|
1556
1447
|
let i = bStart;
|
|
1557
|
-
while (i < bEnd)
|
|
1558
|
-
map.set(b[i], i++);
|
|
1448
|
+
while (i < bEnd) map.set(b[i], i++);
|
|
1559
1449
|
}
|
|
1560
1450
|
const index = map.get(a[aStart]);
|
|
1561
1451
|
if (index != null) {
|
|
1562
1452
|
if (bStart < index && index < bEnd) {
|
|
1563
1453
|
let i = aStart, sequence = 1, t;
|
|
1564
1454
|
while (++i < aEnd && i < bEnd) {
|
|
1565
|
-
if ((t = map.get(a[i])) == null || t !== index + sequence)
|
|
1566
|
-
break;
|
|
1455
|
+
if ((t = map.get(a[i])) == null || t !== index + sequence) break;
|
|
1567
1456
|
sequence++;
|
|
1568
1457
|
}
|
|
1569
1458
|
if (sequence > index - bStart) {
|
|
1570
1459
|
const node = a[aStart];
|
|
1571
|
-
while (bStart < index)
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
} else
|
|
1576
|
-
aStart++;
|
|
1577
|
-
} else
|
|
1578
|
-
a[aStart++].remove();
|
|
1460
|
+
while (bStart < index) parentNode.insertBefore(b[bStart++], node);
|
|
1461
|
+
} else parentNode.replaceChild(b[bStart++], a[aStart++]);
|
|
1462
|
+
} else aStart++;
|
|
1463
|
+
} else a[aStart++].remove();
|
|
1579
1464
|
}
|
|
1580
1465
|
}
|
|
1581
1466
|
}
|
|
@@ -1591,12 +1476,12 @@ function render(code, element, init, options = {}) {
|
|
|
1591
1476
|
element.textContent = "";
|
|
1592
1477
|
};
|
|
1593
1478
|
}
|
|
1594
|
-
function template(html, isImportNode, isSVG) {
|
|
1479
|
+
function template(html, isImportNode, isSVG, isMathML) {
|
|
1595
1480
|
let node;
|
|
1596
1481
|
const create = () => {
|
|
1597
|
-
const t = document.createElement("template");
|
|
1482
|
+
const t = isMathML ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
|
|
1598
1483
|
t.innerHTML = html;
|
|
1599
|
-
return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
|
|
1484
|
+
return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;
|
|
1600
1485
|
};
|
|
1601
1486
|
const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
1602
1487
|
fn.cloneNode = fn;
|
|
@@ -1614,78 +1499,61 @@ function delegateEvents(eventNames, document2 = window.document) {
|
|
|
1614
1499
|
}
|
|
1615
1500
|
function clearDelegatedEvents(document2 = window.document) {
|
|
1616
1501
|
if (document2[$$EVENTS]) {
|
|
1617
|
-
for (let name of document2[$$EVENTS].keys())
|
|
1618
|
-
document2.removeEventListener(name, eventHandler);
|
|
1502
|
+
for (let name of document2[$$EVENTS].keys()) document2.removeEventListener(name, eventHandler);
|
|
1619
1503
|
delete document2[$$EVENTS];
|
|
1620
1504
|
}
|
|
1621
1505
|
}
|
|
1622
1506
|
function setAttribute(node, name, value) {
|
|
1623
|
-
if (isHydrating(node))
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
node.removeAttribute(name);
|
|
1627
|
-
else
|
|
1628
|
-
node.setAttribute(name, value);
|
|
1507
|
+
if (isHydrating(node)) return;
|
|
1508
|
+
if (value == null) node.removeAttribute(name);
|
|
1509
|
+
else node.setAttribute(name, value);
|
|
1629
1510
|
}
|
|
1630
1511
|
function setAttributeNS(node, namespace, name, value) {
|
|
1631
|
-
if (isHydrating(node))
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
node.removeAttributeNS(namespace, name);
|
|
1635
|
-
else
|
|
1636
|
-
node.setAttributeNS(namespace, name, value);
|
|
1512
|
+
if (isHydrating(node)) return;
|
|
1513
|
+
if (value == null) node.removeAttributeNS(namespace, name);
|
|
1514
|
+
else node.setAttributeNS(namespace, name, value);
|
|
1637
1515
|
}
|
|
1638
1516
|
function setBoolAttribute(node, name, value) {
|
|
1639
|
-
if (isHydrating(node))
|
|
1640
|
-
return;
|
|
1517
|
+
if (isHydrating(node)) return;
|
|
1641
1518
|
value ? node.setAttribute(name, "") : node.removeAttribute(name);
|
|
1642
1519
|
}
|
|
1643
1520
|
function className(node, value) {
|
|
1644
|
-
if (isHydrating(node))
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
node.removeAttribute("class");
|
|
1648
|
-
else
|
|
1649
|
-
node.className = value;
|
|
1521
|
+
if (isHydrating(node)) return;
|
|
1522
|
+
if (value == null) node.removeAttribute("class");
|
|
1523
|
+
else node.className = value;
|
|
1650
1524
|
}
|
|
1651
1525
|
function addEventListener(node, name, handler, delegate) {
|
|
1652
1526
|
if (delegate) {
|
|
1653
1527
|
if (Array.isArray(handler)) {
|
|
1654
1528
|
node[`$$${name}`] = handler[0];
|
|
1655
1529
|
node[`$$${name}Data`] = handler[1];
|
|
1656
|
-
} else
|
|
1657
|
-
node[`$$${name}`] = handler;
|
|
1530
|
+
} else node[`$$${name}`] = handler;
|
|
1658
1531
|
} else if (Array.isArray(handler)) {
|
|
1659
1532
|
const handlerFn = handler[0];
|
|
1660
1533
|
node.addEventListener(name, handler[0] = (e) => handlerFn.call(node, handler[1], e));
|
|
1661
|
-
} else
|
|
1662
|
-
node.addEventListener(name, handler, typeof handler !== "function" && handler);
|
|
1534
|
+
} else node.addEventListener(name, handler, typeof handler !== "function" && handler);
|
|
1663
1535
|
}
|
|
1664
1536
|
function classList(node, value, prev = {}) {
|
|
1665
1537
|
const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev);
|
|
1666
1538
|
let i, len;
|
|
1667
1539
|
for (i = 0, len = prevKeys.length; i < len; i++) {
|
|
1668
1540
|
const key = prevKeys[i];
|
|
1669
|
-
if (!key || key === "undefined" || value[key])
|
|
1670
|
-
continue;
|
|
1541
|
+
if (!key || key === "undefined" || value[key]) continue;
|
|
1671
1542
|
toggleClassKey(node, key, false);
|
|
1672
1543
|
delete prev[key];
|
|
1673
1544
|
}
|
|
1674
1545
|
for (i = 0, len = classKeys.length; i < len; i++) {
|
|
1675
1546
|
const key = classKeys[i], classValue = !!value[key];
|
|
1676
|
-
if (!key || key === "undefined" || prev[key] === classValue || !classValue)
|
|
1677
|
-
continue;
|
|
1547
|
+
if (!key || key === "undefined" || prev[key] === classValue || !classValue) continue;
|
|
1678
1548
|
toggleClassKey(node, key, true);
|
|
1679
1549
|
prev[key] = classValue;
|
|
1680
1550
|
}
|
|
1681
1551
|
return prev;
|
|
1682
1552
|
}
|
|
1683
1553
|
function style(node, value, prev) {
|
|
1684
|
-
if (!value)
|
|
1685
|
-
return prev ? setAttribute(node, "style") : value;
|
|
1554
|
+
if (!value) return prev ? setAttribute(node, "style") : value;
|
|
1686
1555
|
const nodeStyle = node.style;
|
|
1687
|
-
if (typeof value === "string")
|
|
1688
|
-
return nodeStyle.cssText = value;
|
|
1556
|
+
if (typeof value === "string") return nodeStyle.cssText = value;
|
|
1689
1557
|
typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
|
|
1690
1558
|
prev || (prev = {});
|
|
1691
1559
|
value || (value = {});
|
|
@@ -1718,18 +1586,15 @@ function use(fn, element, arg) {
|
|
|
1718
1586
|
return untrack(() => fn(element, arg));
|
|
1719
1587
|
}
|
|
1720
1588
|
function insert(parent, accessor, marker, initial) {
|
|
1721
|
-
if (marker !== void 0 && !initial)
|
|
1722
|
-
|
|
1723
|
-
if (typeof accessor !== "function")
|
|
1724
|
-
return insertExpression(parent, accessor, initial, marker);
|
|
1589
|
+
if (marker !== void 0 && !initial) initial = [];
|
|
1590
|
+
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
1725
1591
|
createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial);
|
|
1726
1592
|
}
|
|
1727
1593
|
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
1728
1594
|
props || (props = {});
|
|
1729
1595
|
for (const prop in prevProps) {
|
|
1730
1596
|
if (!(prop in props)) {
|
|
1731
|
-
if (prop === "children")
|
|
1732
|
-
continue;
|
|
1597
|
+
if (prop === "children") continue;
|
|
1733
1598
|
prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef, props);
|
|
1734
1599
|
}
|
|
1735
1600
|
}
|
|
@@ -1746,8 +1611,7 @@ function getNextElement(template2) {
|
|
|
1746
1611
|
if (!hydrating || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
|
|
1747
1612
|
return template2();
|
|
1748
1613
|
}
|
|
1749
|
-
if (sharedConfig.completed)
|
|
1750
|
-
sharedConfig.completed.add(node);
|
|
1614
|
+
if (sharedConfig.completed) sharedConfig.completed.add(node);
|
|
1751
1615
|
sharedConfig.registry.delete(key);
|
|
1752
1616
|
return node;
|
|
1753
1617
|
}
|
|
@@ -1764,15 +1628,11 @@ function toggleClassKey(node, key, value) {
|
|
|
1764
1628
|
}
|
|
1765
1629
|
function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
|
|
1766
1630
|
let isCE, isProp, isChildProp, propAlias, forceProp;
|
|
1767
|
-
if (prop === "style")
|
|
1768
|
-
|
|
1769
|
-
if (
|
|
1770
|
-
return classList(node, value, prev);
|
|
1771
|
-
if (value === prev)
|
|
1772
|
-
return prev;
|
|
1631
|
+
if (prop === "style") return style(node, value, prev);
|
|
1632
|
+
if (prop === "classList") return classList(node, value, prev);
|
|
1633
|
+
if (value === prev) return prev;
|
|
1773
1634
|
if (prop === "ref") {
|
|
1774
|
-
if (!skipRef)
|
|
1775
|
-
value(node);
|
|
1635
|
+
if (!skipRef) value(node);
|
|
1776
1636
|
} else if (prop.slice(0, 3) === "on:") {
|
|
1777
1637
|
const e = prop.slice(3);
|
|
1778
1638
|
prev && node.removeEventListener(e, prev, typeof prev !== "function" && prev);
|
|
@@ -1800,27 +1660,20 @@ function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
|
|
|
1800
1660
|
if (forceProp) {
|
|
1801
1661
|
prop = prop.slice(5);
|
|
1802
1662
|
isProp = true;
|
|
1803
|
-
} else if (isHydrating(node))
|
|
1804
|
-
|
|
1805
|
-
if (
|
|
1806
|
-
|
|
1807
|
-
else if (isCE && !isProp && !isChildProp)
|
|
1808
|
-
node[toPropertyName(prop)] = value;
|
|
1809
|
-
else
|
|
1810
|
-
node[propAlias || prop] = value;
|
|
1663
|
+
} else if (isHydrating(node)) return value;
|
|
1664
|
+
if (prop === "class" || prop === "className") className(node, value);
|
|
1665
|
+
else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
|
|
1666
|
+
else node[propAlias || prop] = value;
|
|
1811
1667
|
} else {
|
|
1812
1668
|
const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
|
|
1813
|
-
if (ns)
|
|
1814
|
-
|
|
1815
|
-
else
|
|
1816
|
-
setAttribute(node, Aliases[prop] || prop, value);
|
|
1669
|
+
if (ns) setAttributeNS(node, ns, prop, value);
|
|
1670
|
+
else setAttribute(node, Aliases[prop] || prop, value);
|
|
1817
1671
|
}
|
|
1818
1672
|
return value;
|
|
1819
1673
|
}
|
|
1820
1674
|
function eventHandler(e) {
|
|
1821
1675
|
if (sharedConfig.registry && sharedConfig.events) {
|
|
1822
|
-
if (sharedConfig.events.find(([el, ev]) => ev === e))
|
|
1823
|
-
return;
|
|
1676
|
+
if (sharedConfig.events.find(([el, ev]) => ev === e)) return;
|
|
1824
1677
|
}
|
|
1825
1678
|
let node = e.target;
|
|
1826
1679
|
const key = `$$${e.type}`;
|
|
@@ -1835,15 +1688,13 @@ function eventHandler(e) {
|
|
|
1835
1688
|
if (handler && !node.disabled) {
|
|
1836
1689
|
const data = node[`${key}Data`];
|
|
1837
1690
|
data !== void 0 ? handler.call(node, data, e) : handler.call(node, e);
|
|
1838
|
-
if (e.cancelBubble)
|
|
1839
|
-
return;
|
|
1691
|
+
if (e.cancelBubble) return;
|
|
1840
1692
|
}
|
|
1841
1693
|
node.host && typeof node.host !== "string" && !node.host._$host && node.contains(e.target) && retarget(node.host);
|
|
1842
1694
|
return true;
|
|
1843
1695
|
};
|
|
1844
1696
|
const walkUpTree = () => {
|
|
1845
|
-
while (handleNode() && (node = node._$host || node.parentNode || node.host))
|
|
1846
|
-
;
|
|
1697
|
+
while (handleNode() && (node = node._$host || node.parentNode || node.host)) ;
|
|
1847
1698
|
};
|
|
1848
1699
|
Object.defineProperty(e, "currentTarget", {
|
|
1849
1700
|
configurable: true,
|
|
@@ -1851,15 +1702,13 @@ function eventHandler(e) {
|
|
|
1851
1702
|
return node || document;
|
|
1852
1703
|
}
|
|
1853
1704
|
});
|
|
1854
|
-
if (sharedConfig.registry && !sharedConfig.done)
|
|
1855
|
-
sharedConfig.done = _$HY.done = true;
|
|
1705
|
+
if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;
|
|
1856
1706
|
if (e.composedPath) {
|
|
1857
1707
|
const path = e.composedPath();
|
|
1858
1708
|
retarget(path[0]);
|
|
1859
1709
|
for (let i = 0; i < path.length - 2; i++) {
|
|
1860
1710
|
node = path[i];
|
|
1861
|
-
if (!handleNode())
|
|
1862
|
-
break;
|
|
1711
|
+
if (!handleNode()) break;
|
|
1863
1712
|
if (node._$host) {
|
|
1864
1713
|
node = node._$host;
|
|
1865
1714
|
walkUpTree();
|
|
@@ -1869,8 +1718,7 @@ function eventHandler(e) {
|
|
|
1869
1718
|
break;
|
|
1870
1719
|
}
|
|
1871
1720
|
}
|
|
1872
|
-
} else
|
|
1873
|
-
walkUpTree();
|
|
1721
|
+
} else walkUpTree();
|
|
1874
1722
|
retarget(oriTarget);
|
|
1875
1723
|
}
|
|
1876
1724
|
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
@@ -1880,49 +1728,39 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
1880
1728
|
let cleaned = [];
|
|
1881
1729
|
for (let i = 0; i < current.length; i++) {
|
|
1882
1730
|
const node = current[i];
|
|
1883
|
-
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$")
|
|
1884
|
-
|
|
1885
|
-
else
|
|
1886
|
-
cleaned.push(node);
|
|
1731
|
+
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();
|
|
1732
|
+
else cleaned.push(node);
|
|
1887
1733
|
}
|
|
1888
1734
|
current = cleaned;
|
|
1889
1735
|
}
|
|
1890
|
-
while (typeof current === "function")
|
|
1891
|
-
|
|
1892
|
-
if (value === current)
|
|
1893
|
-
return current;
|
|
1736
|
+
while (typeof current === "function") current = current();
|
|
1737
|
+
if (value === current) return current;
|
|
1894
1738
|
const t = typeof value, multi = marker !== void 0;
|
|
1895
1739
|
parent = multi && current[0] && current[0].parentNode || parent;
|
|
1896
1740
|
if (t === "string" || t === "number") {
|
|
1897
|
-
if (hydrating)
|
|
1898
|
-
return current;
|
|
1741
|
+
if (hydrating) return current;
|
|
1899
1742
|
if (t === "number") {
|
|
1900
1743
|
value = value.toString();
|
|
1901
|
-
if (value === current)
|
|
1902
|
-
return current;
|
|
1744
|
+
if (value === current) return current;
|
|
1903
1745
|
}
|
|
1904
1746
|
if (multi) {
|
|
1905
1747
|
let node = current[0];
|
|
1906
1748
|
if (node && node.nodeType === 3) {
|
|
1907
1749
|
node.data !== value && (node.data = value);
|
|
1908
|
-
} else
|
|
1909
|
-
node = document.createTextNode(value);
|
|
1750
|
+
} else node = document.createTextNode(value);
|
|
1910
1751
|
current = cleanChildren(parent, current, marker, node);
|
|
1911
1752
|
} else {
|
|
1912
1753
|
if (current !== "" && typeof current === "string") {
|
|
1913
1754
|
current = parent.firstChild.data = value;
|
|
1914
|
-
} else
|
|
1915
|
-
current = parent.textContent = value;
|
|
1755
|
+
} else current = parent.textContent = value;
|
|
1916
1756
|
}
|
|
1917
1757
|
} else if (value == null || t === "boolean") {
|
|
1918
|
-
if (hydrating)
|
|
1919
|
-
return current;
|
|
1758
|
+
if (hydrating) return current;
|
|
1920
1759
|
current = cleanChildren(parent, current, marker);
|
|
1921
1760
|
} else if (t === "function") {
|
|
1922
1761
|
createRenderEffect(() => {
|
|
1923
1762
|
let v = value();
|
|
1924
|
-
while (typeof v === "function")
|
|
1925
|
-
v = v();
|
|
1763
|
+
while (typeof v === "function") v = v();
|
|
1926
1764
|
current = insertExpression(parent, v, current, marker);
|
|
1927
1765
|
});
|
|
1928
1766
|
return () => current;
|
|
@@ -1934,62 +1772,50 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
1934
1772
|
return () => current;
|
|
1935
1773
|
}
|
|
1936
1774
|
if (hydrating) {
|
|
1937
|
-
if (!array.length)
|
|
1938
|
-
|
|
1939
|
-
if (marker === void 0)
|
|
1940
|
-
return current = [...parent.childNodes];
|
|
1775
|
+
if (!array.length) return current;
|
|
1776
|
+
if (marker === void 0) return current = [...parent.childNodes];
|
|
1941
1777
|
let node = array[0];
|
|
1942
|
-
if (node.parentNode !== parent)
|
|
1943
|
-
return current;
|
|
1778
|
+
if (node.parentNode !== parent) return current;
|
|
1944
1779
|
const nodes = [node];
|
|
1945
|
-
while ((node = node.nextSibling) !== marker)
|
|
1946
|
-
nodes.push(node);
|
|
1780
|
+
while ((node = node.nextSibling) !== marker) nodes.push(node);
|
|
1947
1781
|
return current = nodes;
|
|
1948
1782
|
}
|
|
1949
1783
|
if (array.length === 0) {
|
|
1950
1784
|
current = cleanChildren(parent, current, marker);
|
|
1951
|
-
if (multi)
|
|
1952
|
-
return current;
|
|
1785
|
+
if (multi) return current;
|
|
1953
1786
|
} else if (currentArray) {
|
|
1954
1787
|
if (current.length === 0) {
|
|
1955
1788
|
appendNodes(parent, array, marker);
|
|
1956
|
-
} else
|
|
1957
|
-
reconcileArrays(parent, current, array);
|
|
1789
|
+
} else reconcileArrays(parent, current, array);
|
|
1958
1790
|
} else {
|
|
1959
1791
|
current && cleanChildren(parent);
|
|
1960
1792
|
appendNodes(parent, array);
|
|
1961
1793
|
}
|
|
1962
1794
|
current = array;
|
|
1963
1795
|
} else if (value.nodeType) {
|
|
1964
|
-
if (hydrating && value.parentNode)
|
|
1965
|
-
return current = multi ? [value] : value;
|
|
1796
|
+
if (hydrating && value.parentNode) return current = multi ? [value] : value;
|
|
1966
1797
|
if (Array.isArray(current)) {
|
|
1967
|
-
if (multi)
|
|
1968
|
-
return current = cleanChildren(parent, current, marker, value);
|
|
1798
|
+
if (multi) return current = cleanChildren(parent, current, marker, value);
|
|
1969
1799
|
cleanChildren(parent, current, null, value);
|
|
1970
1800
|
} else if (current == null || current === "" || !parent.firstChild) {
|
|
1971
1801
|
parent.appendChild(value);
|
|
1972
|
-
} else
|
|
1973
|
-
parent.replaceChild(value, parent.firstChild);
|
|
1802
|
+
} else parent.replaceChild(value, parent.firstChild);
|
|
1974
1803
|
current = value;
|
|
1975
|
-
} else
|
|
1976
|
-
;
|
|
1804
|
+
} else ;
|
|
1977
1805
|
return current;
|
|
1978
1806
|
}
|
|
1979
1807
|
function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
1980
1808
|
let dynamic = false;
|
|
1981
1809
|
for (let i = 0, len = array.length; i < len; i++) {
|
|
1982
1810
|
let item = array[i], prev = current && current[normalized.length], t;
|
|
1983
|
-
if (item == null || item === true || item === false)
|
|
1984
|
-
;
|
|
1811
|
+
if (item == null || item === true || item === false) ;
|
|
1985
1812
|
else if ((t = typeof item) === "object" && item.nodeType) {
|
|
1986
1813
|
normalized.push(item);
|
|
1987
1814
|
} else if (Array.isArray(item)) {
|
|
1988
1815
|
dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
|
|
1989
1816
|
} else if (t === "function") {
|
|
1990
1817
|
if (unwrap) {
|
|
1991
|
-
while (typeof item === "function")
|
|
1992
|
-
item = item();
|
|
1818
|
+
while (typeof item === "function") item = item();
|
|
1993
1819
|
dynamic = normalizeIncomingArray(
|
|
1994
1820
|
normalized,
|
|
1995
1821
|
Array.isArray(item) ? item : [item],
|
|
@@ -2001,21 +1827,17 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
|
2001
1827
|
}
|
|
2002
1828
|
} else {
|
|
2003
1829
|
const value = String(item);
|
|
2004
|
-
if (prev && prev.nodeType === 3 && prev.data === value)
|
|
2005
|
-
|
|
2006
|
-
else
|
|
2007
|
-
normalized.push(document.createTextNode(value));
|
|
1830
|
+
if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);
|
|
1831
|
+
else normalized.push(document.createTextNode(value));
|
|
2008
1832
|
}
|
|
2009
1833
|
}
|
|
2010
1834
|
return dynamic;
|
|
2011
1835
|
}
|
|
2012
1836
|
function appendNodes(parent, array, marker = null) {
|
|
2013
|
-
for (let i = 0, len = array.length; i < len; i++)
|
|
2014
|
-
parent.insertBefore(array[i], marker);
|
|
1837
|
+
for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
|
|
2015
1838
|
}
|
|
2016
1839
|
function cleanChildren(parent, current, marker, replacement) {
|
|
2017
|
-
if (marker === void 0)
|
|
2018
|
-
return parent.textContent = "";
|
|
1840
|
+
if (marker === void 0) return parent.textContent = "";
|
|
2019
1841
|
const node = replacement || document.createTextNode("");
|
|
2020
1842
|
if (current.length) {
|
|
2021
1843
|
let inserted = false;
|
|
@@ -2025,13 +1847,10 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
2025
1847
|
const isParent = el.parentNode === parent;
|
|
2026
1848
|
if (!inserted && !i)
|
|
2027
1849
|
isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
|
|
2028
|
-
else
|
|
2029
|
-
|
|
2030
|
-
} else
|
|
2031
|
-
inserted = true;
|
|
1850
|
+
else isParent && el.remove();
|
|
1851
|
+
} else inserted = true;
|
|
2032
1852
|
}
|
|
2033
|
-
} else
|
|
2034
|
-
parent.insertBefore(node, marker);
|
|
1853
|
+
} else parent.insertBefore(node, marker);
|
|
2035
1854
|
return [node];
|
|
2036
1855
|
}
|
|
2037
1856
|
function getHydrationKey() {
|
|
@@ -2048,8 +1867,7 @@ function Portal(props) {
|
|
|
2048
1867
|
let hydrating = !!sharedConfig.context;
|
|
2049
1868
|
createEffect(
|
|
2050
1869
|
() => {
|
|
2051
|
-
if (hydrating)
|
|
2052
|
-
getOwner().user = hydrating = false;
|
|
1870
|
+
if (hydrating) getOwner().user = hydrating = false;
|
|
2053
1871
|
content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
|
|
2054
1872
|
const el = mount();
|
|
2055
1873
|
if (el instanceof HTMLHeadElement) {
|
|
@@ -2080,22 +1898,25 @@ function Portal(props) {
|
|
|
2080
1898
|
);
|
|
2081
1899
|
return marker;
|
|
2082
1900
|
}
|
|
2083
|
-
function
|
|
2084
|
-
const
|
|
2085
|
-
const cached = createMemo(() => p.component);
|
|
1901
|
+
function createDynamic(component, props) {
|
|
1902
|
+
const cached = createMemo(component);
|
|
2086
1903
|
return createMemo(() => {
|
|
2087
|
-
const
|
|
2088
|
-
switch (typeof
|
|
1904
|
+
const component2 = cached();
|
|
1905
|
+
switch (typeof component2) {
|
|
2089
1906
|
case "function":
|
|
2090
|
-
return untrack(() =>
|
|
1907
|
+
return untrack(() => component2(props));
|
|
2091
1908
|
case "string":
|
|
2092
|
-
const isSvg = SVGElements.has(
|
|
2093
|
-
const el = sharedConfig.context ? getNextElement() : createElement(
|
|
2094
|
-
spread(el,
|
|
1909
|
+
const isSvg = SVGElements.has(component2);
|
|
1910
|
+
const el = sharedConfig.context ? getNextElement() : createElement(component2, isSvg);
|
|
1911
|
+
spread(el, props, isSvg);
|
|
2095
1912
|
return el;
|
|
2096
1913
|
}
|
|
2097
1914
|
});
|
|
2098
1915
|
}
|
|
1916
|
+
function Dynamic(props) {
|
|
1917
|
+
const [, others] = splitProps(props, ["component"]);
|
|
1918
|
+
return createDynamic(() => props.component, others);
|
|
1919
|
+
}
|
|
2099
1920
|
|
|
2100
1921
|
// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/double-indexed-kv.js
|
|
2101
1922
|
var DoubleIndexedKV = class {
|
|
@@ -3018,11 +2839,9 @@ var deleteNestedDataByPath = (oldData, deletePath) => {
|
|
|
3018
2839
|
return oldData;
|
|
3019
2840
|
};
|
|
3020
2841
|
var setupStyleSheet = (nonce, target) => {
|
|
3021
|
-
if (!nonce)
|
|
3022
|
-
return;
|
|
2842
|
+
if (!nonce) return;
|
|
3023
2843
|
const styleExists = document.querySelector("#_goober") || target?.querySelector("#_goober");
|
|
3024
|
-
if (styleExists)
|
|
3025
|
-
return;
|
|
2844
|
+
if (styleExists) return;
|
|
3026
2845
|
const styleTag = document.createElement("style");
|
|
3027
2846
|
const textNode = document.createTextNode("");
|
|
3028
2847
|
styleTag.appendChild(textNode);
|