@fictjs/runtime 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advanced.cjs +9 -9
- package/dist/advanced.d.cts +4 -4
- package/dist/advanced.d.ts +4 -4
- package/dist/advanced.js +4 -4
- package/dist/{binding-BWchH3Kp.d.cts → binding-DcnhUSQK.d.ts} +5 -3
- package/dist/{binding-BWchH3Kp.d.ts → binding-FRyTeLDn.d.cts} +5 -3
- package/dist/{chunk-FVX77557.js → chunk-2UR2UWE2.js} +3 -3
- package/dist/{chunk-LBE6DC3V.cjs → chunk-44EQF3AR.cjs} +63 -52
- package/dist/chunk-44EQF3AR.cjs.map +1 -0
- package/dist/{chunk-OAM7HABA.cjs → chunk-4QGEN5SJ.cjs} +340 -263
- package/dist/chunk-4QGEN5SJ.cjs.map +1 -0
- package/dist/{chunk-PD6IQY2Y.cjs → chunk-C5IE4WUG.cjs} +8 -8
- package/dist/{chunk-PD6IQY2Y.cjs.map → chunk-C5IE4WUG.cjs.map} +1 -1
- package/dist/{chunk-DXG3TARY.js → chunk-DIK33H5U.js} +202 -30
- package/dist/chunk-DIK33H5U.js.map +1 -0
- package/dist/{chunk-JVYH76ZX.js → chunk-FESAXMHT.js} +7 -6
- package/dist/{chunk-JVYH76ZX.js.map → chunk-FESAXMHT.js.map} +1 -1
- package/dist/chunk-FHQZCAAK.cjs +112 -0
- package/dist/chunk-FHQZCAAK.cjs.map +1 -0
- package/dist/{chunk-UBFDB6OL.cjs → chunk-QNMYVXRL.cjs} +222 -50
- package/dist/chunk-QNMYVXRL.cjs.map +1 -0
- package/dist/{chunk-N6ODUM2Y.js → chunk-S63VBIWN.js} +27 -16
- package/dist/chunk-S63VBIWN.js.map +1 -0
- package/dist/{chunk-T2LNV5Q5.js → chunk-WIHNVN6L.js} +153 -76
- package/dist/chunk-WIHNVN6L.js.map +1 -0
- package/dist/{devtools-BDp76luf.d.ts → devtools-BtIkN77t.d.cts} +14 -2
- package/dist/{devtools-5AipK9CX.d.cts → devtools-D2z4llpA.d.ts} +14 -2
- package/dist/index.cjs +60 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.dev.js +300 -74
- package/dist/index.dev.js.map +1 -1
- package/dist/index.js +13 -11
- package/dist/index.js.map +1 -1
- package/dist/internal-list.cjs +4 -4
- package/dist/internal-list.d.cts +2 -2
- package/dist/internal-list.d.ts +2 -2
- package/dist/internal-list.js +3 -3
- package/dist/internal.cjs +5 -5
- package/dist/internal.d.cts +6 -6
- package/dist/internal.d.ts +6 -6
- package/dist/internal.js +4 -4
- package/dist/jsx-dev-runtime.d.cts +671 -0
- package/dist/jsx-dev-runtime.d.ts +671 -0
- package/dist/jsx-runtime.d.cts +671 -0
- package/dist/jsx-runtime.d.ts +671 -0
- package/dist/{list-DL5DOFcO.d.ts → list-BKM6YOPq.d.ts} +2 -2
- package/dist/{list-hP7hQ9Vk.d.cts → list-Bi8dDF8Q.d.cts} +2 -2
- package/dist/loader.cjs +34 -28
- package/dist/loader.cjs.map +1 -1
- package/dist/loader.d.cts +2 -2
- package/dist/loader.d.ts +2 -2
- package/dist/loader.js +17 -11
- package/dist/loader.js.map +1 -1
- package/dist/{props-BpZz0AOq.d.cts → props-9chMyBGb.d.cts} +2 -2
- package/dist/{props-CjLH0JE-.d.ts → props-D1nj2p_3.d.ts} +2 -2
- package/dist/{resume-BJ4oHLi_.d.cts → resume-C5IKAIdh.d.ts} +2 -2
- package/dist/{resume-CuyJWXP_.d.ts → resume-DPZxmA95.d.cts} +2 -2
- package/dist/{scope-jPt5DHRT.d.ts → scope-BSkhJr0a.d.ts} +1 -1
- package/dist/{scope-BJCtq8hJ.d.cts → scope-Bn3sxem5.d.cts} +1 -1
- package/dist/{signal-C4ISF17w.d.cts → signal-Z4KkDk9h.d.cts} +12 -1
- package/dist/{signal-C4ISF17w.d.ts → signal-Z4KkDk9h.d.ts} +12 -1
- package/package.json +2 -2
- package/src/binding.ts +59 -29
- package/src/context.ts +4 -3
- package/src/devtools.ts +19 -2
- package/src/dom.ts +122 -42
- package/src/effect.ts +5 -5
- package/src/error-boundary.ts +5 -5
- package/src/hooks.ts +13 -5
- package/src/lifecycle.ts +48 -3
- package/src/list-helpers.ts +30 -13
- package/src/loader.ts +20 -12
- package/src/node-ops.ts +8 -5
- package/src/signal.ts +191 -18
- package/src/suspense.ts +5 -4
- package/src/transition.ts +9 -3
- package/dist/chunk-DXG3TARY.js.map +0 -1
- package/dist/chunk-LBE6DC3V.cjs.map +0 -1
- package/dist/chunk-N6ODUM2Y.js.map +0 -1
- package/dist/chunk-OAM7HABA.cjs.map +0 -1
- package/dist/chunk-PG4QX2I2.cjs +0 -111
- package/dist/chunk-PG4QX2I2.cjs.map +0 -1
- package/dist/chunk-T2LNV5Q5.js.map +0 -1
- package/dist/chunk-UBFDB6OL.cjs.map +0 -1
- /package/dist/{chunk-FVX77557.js.map → chunk-2UR2UWE2.js.map} +0 -0
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkQNMYVXRLcjs = require('./chunk-QNMYVXRL.cjs');
|
|
44
44
|
|
|
45
45
|
// src/transition.ts
|
|
46
46
|
function startTransition(fn) {
|
|
47
|
-
const prev =
|
|
47
|
+
const prev = _chunkQNMYVXRLcjs.setTransitionContext.call(void 0, true);
|
|
48
48
|
try {
|
|
49
49
|
fn();
|
|
50
50
|
} finally {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
_chunkQNMYVXRLcjs.setTransitionContext.call(void 0, prev);
|
|
52
|
+
_chunkQNMYVXRLcjs.scheduleFlush.call(void 0, );
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
function useTransition() {
|
|
56
|
-
const pending =
|
|
56
|
+
const pending = _chunkQNMYVXRLcjs.signal.call(void 0, false);
|
|
57
57
|
let pendingCount = 0;
|
|
58
58
|
const beginPending = () => {
|
|
59
59
|
pendingCount += 1;
|
|
@@ -86,7 +86,11 @@ function useTransition() {
|
|
|
86
86
|
throw thrown;
|
|
87
87
|
}
|
|
88
88
|
if (result && typeof result.then === "function") {
|
|
89
|
-
Promise.resolve(result).
|
|
89
|
+
void Promise.resolve(result).catch((error) => {
|
|
90
|
+
if (typeof console !== "undefined" && typeof console.error === "function") {
|
|
91
|
+
console.error("[fict/transition] Async transition failed.", error);
|
|
92
|
+
}
|
|
93
|
+
}).finally(() => {
|
|
90
94
|
endPending();
|
|
91
95
|
});
|
|
92
96
|
return;
|
|
@@ -100,10 +104,10 @@ function useTransition() {
|
|
|
100
104
|
return [() => pending(), start];
|
|
101
105
|
}
|
|
102
106
|
function useDeferredValue(getValue) {
|
|
103
|
-
const deferredValue =
|
|
104
|
-
|
|
107
|
+
const deferredValue = _chunkQNMYVXRLcjs.signal.call(void 0, getValue());
|
|
108
|
+
_chunkQNMYVXRLcjs.createEffect.call(void 0, () => {
|
|
105
109
|
const newValue = getValue();
|
|
106
|
-
const currentDeferred =
|
|
110
|
+
const currentDeferred = _chunkQNMYVXRLcjs.untrack.call(void 0, () => deferredValue());
|
|
107
111
|
if (currentDeferred !== newValue) {
|
|
108
112
|
startTransition(() => {
|
|
109
113
|
deferredValue(newValue);
|
|
@@ -115,17 +119,17 @@ function useDeferredValue(getValue) {
|
|
|
115
119
|
|
|
116
120
|
// src/scheduler.ts
|
|
117
121
|
function batch2(fn) {
|
|
118
|
-
return
|
|
122
|
+
return _chunkQNMYVXRLcjs.batch.call(void 0, fn);
|
|
119
123
|
}
|
|
120
124
|
function untrack2(fn) {
|
|
121
|
-
return
|
|
125
|
+
return _chunkQNMYVXRLcjs.untrack.call(void 0, fn);
|
|
122
126
|
}
|
|
123
127
|
|
|
124
128
|
// src/jsx.ts
|
|
125
129
|
var Fragment = Symbol("Fragment");
|
|
126
130
|
|
|
127
131
|
// src/node-ops.ts
|
|
128
|
-
function toNodeArray(node) {
|
|
132
|
+
function toNodeArray(node, ownerDocument = document) {
|
|
129
133
|
try {
|
|
130
134
|
if (Array.isArray(node)) {
|
|
131
135
|
let allNodes = true;
|
|
@@ -146,7 +150,7 @@ function toNodeArray(node) {
|
|
|
146
150
|
}
|
|
147
151
|
const result = [];
|
|
148
152
|
for (const item of node) {
|
|
149
|
-
result.push(...toNodeArray(item));
|
|
153
|
+
result.push(...toNodeArray(item, ownerDocument));
|
|
150
154
|
}
|
|
151
155
|
return result;
|
|
152
156
|
}
|
|
@@ -173,14 +177,14 @@ function toNodeArray(node) {
|
|
|
173
177
|
}
|
|
174
178
|
try {
|
|
175
179
|
if (typeof node === "object" && node !== null && "marker" in node) {
|
|
176
|
-
return toNodeArray(node.marker);
|
|
180
|
+
return toNodeArray(node.marker, ownerDocument);
|
|
177
181
|
}
|
|
178
182
|
} catch (e6) {
|
|
179
183
|
}
|
|
180
184
|
try {
|
|
181
|
-
return [
|
|
185
|
+
return [ownerDocument.createTextNode(String(node))];
|
|
182
186
|
} catch (e7) {
|
|
183
|
-
return [
|
|
187
|
+
return [ownerDocument.createTextNode("")];
|
|
184
188
|
}
|
|
185
189
|
}
|
|
186
190
|
function insertNodesBefore(parent, nodes, anchor) {
|
|
@@ -421,14 +425,14 @@ function isExplicitReactiveFn(value) {
|
|
|
421
425
|
function isReactive(value) {
|
|
422
426
|
if (typeof value !== "function") return false;
|
|
423
427
|
if (isNonReactiveFn(value)) return false;
|
|
424
|
-
if (
|
|
428
|
+
if (_chunkQNMYVXRLcjs.isSignal.call(void 0, value) || _chunkQNMYVXRLcjs.isComputed.call(void 0, value)) return true;
|
|
425
429
|
if (isExplicitReactiveFn(value)) return true;
|
|
426
|
-
if (
|
|
430
|
+
if (_chunkQNMYVXRLcjs.isEffect.call(void 0, value) || _chunkQNMYVXRLcjs.isEffectScope.call(void 0, value)) return false;
|
|
427
431
|
return value.length === 0;
|
|
428
432
|
}
|
|
429
433
|
function isStrictlyReactive(value) {
|
|
430
434
|
if (typeof value !== "function") return false;
|
|
431
|
-
return
|
|
435
|
+
return _chunkQNMYVXRLcjs.isSignal.call(void 0, value) || _chunkQNMYVXRLcjs.isComputed.call(void 0, value) || isPropGetterFn(value) || isExplicitReactiveFn(value);
|
|
432
436
|
}
|
|
433
437
|
var PROP_GETTER_MARKER = Symbol.for("fict:prop-getter");
|
|
434
438
|
function isPropGetterFn(value) {
|
|
@@ -488,10 +492,11 @@ function callEventHandler(handler, event, node, data) {
|
|
|
488
492
|
};
|
|
489
493
|
invoke(handler);
|
|
490
494
|
}
|
|
491
|
-
function createTextBinding(value) {
|
|
492
|
-
const
|
|
495
|
+
function createTextBinding(value, owner) {
|
|
496
|
+
const textOwnerDocument = owner && "nodeType" in owner ? owner.nodeType === 9 ? owner : _nullishCoalesce(owner.ownerDocument, () => ( document)) : document;
|
|
497
|
+
const text = textOwnerDocument.createTextNode("");
|
|
493
498
|
if (isReactive(value)) {
|
|
494
|
-
|
|
499
|
+
_chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => {
|
|
495
500
|
setText(text, value());
|
|
496
501
|
});
|
|
497
502
|
} else {
|
|
@@ -500,7 +505,7 @@ function createTextBinding(value) {
|
|
|
500
505
|
return text;
|
|
501
506
|
}
|
|
502
507
|
function bindText(textNode, getValue) {
|
|
503
|
-
return
|
|
508
|
+
return _chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => setText(textNode, getValue()));
|
|
504
509
|
}
|
|
505
510
|
function setText(textNode, value) {
|
|
506
511
|
const next = formatTextValue(value);
|
|
@@ -520,7 +525,7 @@ function formatTextValue(value) {
|
|
|
520
525
|
}
|
|
521
526
|
function createAttributeBinding(el, key, value, setter) {
|
|
522
527
|
if (isReactive(value)) {
|
|
523
|
-
|
|
528
|
+
_chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => {
|
|
524
529
|
setter(el, key, value());
|
|
525
530
|
});
|
|
526
531
|
} else {
|
|
@@ -528,7 +533,7 @@ function createAttributeBinding(el, key, value, setter) {
|
|
|
528
533
|
}
|
|
529
534
|
}
|
|
530
535
|
function bindAttribute(el, key, getValue) {
|
|
531
|
-
return
|
|
536
|
+
return _chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => setAttr(el, key, getValue()));
|
|
532
537
|
}
|
|
533
538
|
function setAttr(el, key, value) {
|
|
534
539
|
const cacheTarget = el;
|
|
@@ -544,7 +549,7 @@ function setAttr(el, key, value) {
|
|
|
544
549
|
}
|
|
545
550
|
}
|
|
546
551
|
function bindProperty(el, key, getValue) {
|
|
547
|
-
return
|
|
552
|
+
return _chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => setProp(el, key, getValue()));
|
|
548
553
|
}
|
|
549
554
|
function setProp(el, key, value) {
|
|
550
555
|
const cacheTarget = el;
|
|
@@ -561,7 +566,7 @@ function setProp(el, key, value) {
|
|
|
561
566
|
}
|
|
562
567
|
function createStyleBinding(el, value) {
|
|
563
568
|
if (isReactive(value)) {
|
|
564
|
-
|
|
569
|
+
_chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => {
|
|
565
570
|
setStyle(el, value());
|
|
566
571
|
});
|
|
567
572
|
} else {
|
|
@@ -569,7 +574,7 @@ function createStyleBinding(el, value) {
|
|
|
569
574
|
}
|
|
570
575
|
}
|
|
571
576
|
function bindStyle(el, getValue) {
|
|
572
|
-
return
|
|
577
|
+
return _chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => setStyle(el, getValue()));
|
|
573
578
|
}
|
|
574
579
|
function setStyle(el, value) {
|
|
575
580
|
const target = el;
|
|
@@ -624,7 +629,7 @@ function applyStyle(el, value, prev) {
|
|
|
624
629
|
}
|
|
625
630
|
}
|
|
626
631
|
}
|
|
627
|
-
var isUnitlessStyleProperty = isDev ? (prop2) =>
|
|
632
|
+
var isUnitlessStyleProperty = isDev ? (prop2) => _chunkQNMYVXRLcjs.UnitlessStyles.has(prop2) : (prop2) => prop2 === "opacity" || prop2 === "zIndex";
|
|
628
633
|
function normalizeStyleProperty(prop2) {
|
|
629
634
|
const cached = STYLE_PROP_CACHE.get(prop2);
|
|
630
635
|
if (cached) return cached;
|
|
@@ -634,7 +639,7 @@ function normalizeStyleProperty(prop2) {
|
|
|
634
639
|
}
|
|
635
640
|
function createClassBinding(el, value) {
|
|
636
641
|
if (isReactive(value)) {
|
|
637
|
-
|
|
642
|
+
_chunkQNMYVXRLcjs.createRenderEffect.call(void 0,
|
|
638
643
|
() => setClass(el, value())
|
|
639
644
|
);
|
|
640
645
|
} else {
|
|
@@ -642,7 +647,7 @@ function createClassBinding(el, value) {
|
|
|
642
647
|
}
|
|
643
648
|
}
|
|
644
649
|
function bindClass(el, getValue) {
|
|
645
|
-
return
|
|
650
|
+
return _chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => setClass(el, getValue()));
|
|
646
651
|
}
|
|
647
652
|
function setClass(el, value) {
|
|
648
653
|
const cache = el;
|
|
@@ -703,7 +708,8 @@ function classList(node, value, prev = {}) {
|
|
|
703
708
|
return applyClass(node, value, prev);
|
|
704
709
|
}
|
|
705
710
|
function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
706
|
-
const hostRoot =
|
|
711
|
+
const hostRoot = _chunkQNMYVXRLcjs.getCurrentRoot.call(void 0, );
|
|
712
|
+
const parentOwnerDocument = _nullishCoalesce(parent.ownerDocument, () => ( document));
|
|
707
713
|
let marker;
|
|
708
714
|
let ownsMarker = false;
|
|
709
715
|
let createFn = createElementFn;
|
|
@@ -711,11 +717,12 @@ function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
|
711
717
|
marker = markerOrCreateElement;
|
|
712
718
|
createFn = createElementFn;
|
|
713
719
|
} else {
|
|
714
|
-
marker =
|
|
720
|
+
marker = parentOwnerDocument.createComment("fict:insert");
|
|
715
721
|
parent.appendChild(marker);
|
|
716
722
|
createFn = markerOrCreateElement;
|
|
717
723
|
ownsMarker = true;
|
|
718
724
|
}
|
|
725
|
+
const markerOwnerDocument = _nullishCoalesce(marker.ownerDocument, () => ( parentOwnerDocument));
|
|
719
726
|
let currentNodes = [];
|
|
720
727
|
let currentText = null;
|
|
721
728
|
let currentRoot = null;
|
|
@@ -727,7 +734,7 @@ function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
|
727
734
|
};
|
|
728
735
|
const setTextNode = (textValue, shouldInsert, parentNode) => {
|
|
729
736
|
if (!currentText) {
|
|
730
|
-
currentText =
|
|
737
|
+
currentText = (_nullishCoalesce(parentNode.ownerDocument, () => ( markerOwnerDocument))).createTextNode(textValue);
|
|
731
738
|
} else if (currentText.data !== textValue) {
|
|
732
739
|
currentText.data = textValue;
|
|
733
740
|
}
|
|
@@ -742,13 +749,13 @@ function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
|
742
749
|
insertNodesBefore(parentNode, [currentText], marker);
|
|
743
750
|
currentNodes = [currentText];
|
|
744
751
|
};
|
|
745
|
-
const dispose =
|
|
752
|
+
const dispose = _chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => {
|
|
746
753
|
const value = getValue();
|
|
747
754
|
const parentNode = marker.parentNode;
|
|
748
755
|
const isPrimitive = value == null || value === false || typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
749
756
|
if (isPrimitive) {
|
|
750
757
|
if (currentRoot) {
|
|
751
|
-
|
|
758
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, currentRoot);
|
|
752
759
|
currentRoot = null;
|
|
753
760
|
}
|
|
754
761
|
if (!parentNode) {
|
|
@@ -761,16 +768,17 @@ function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
|
761
768
|
return;
|
|
762
769
|
}
|
|
763
770
|
if (currentRoot) {
|
|
764
|
-
|
|
771
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, currentRoot);
|
|
765
772
|
currentRoot = null;
|
|
766
773
|
}
|
|
767
774
|
clearCurrentNodes();
|
|
768
|
-
const root =
|
|
769
|
-
const prev =
|
|
775
|
+
const root = _chunkQNMYVXRLcjs.createRootContext.call(void 0, hostRoot);
|
|
776
|
+
const prev = _chunkQNMYVXRLcjs.pushRoot.call(void 0, root);
|
|
770
777
|
let nodes = [];
|
|
771
778
|
let handledError = false;
|
|
772
779
|
try {
|
|
773
780
|
let newNode;
|
|
781
|
+
const ownerDocument = _nullishCoalesce(_optionalChain([parentNode, 'optionalAccess', _7 => _7.ownerDocument]), () => ( markerOwnerDocument));
|
|
774
782
|
if (value instanceof Node) {
|
|
775
783
|
newNode = value;
|
|
776
784
|
} else if (Array.isArray(value)) {
|
|
@@ -780,41 +788,41 @@ function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
|
780
788
|
if (createFn) {
|
|
781
789
|
const mapped = [];
|
|
782
790
|
for (const item of value) {
|
|
783
|
-
mapped.push(...toNodeArray(createFn(item)));
|
|
791
|
+
mapped.push(...toNodeArray(createFn(item), ownerDocument));
|
|
784
792
|
}
|
|
785
793
|
newNode = mapped;
|
|
786
794
|
} else {
|
|
787
|
-
newNode =
|
|
795
|
+
newNode = ownerDocument.createTextNode(String(value));
|
|
788
796
|
}
|
|
789
797
|
}
|
|
790
798
|
} else {
|
|
791
|
-
newNode = createFn ? createFn(value) :
|
|
799
|
+
newNode = createFn ? createFn(value) : ownerDocument.createTextNode(String(value));
|
|
792
800
|
}
|
|
793
|
-
nodes = toNodeArray(newNode);
|
|
801
|
+
nodes = toNodeArray(newNode, ownerDocument);
|
|
794
802
|
if (root.suspended) {
|
|
795
803
|
handledError = true;
|
|
796
|
-
|
|
804
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
797
805
|
return;
|
|
798
806
|
}
|
|
799
807
|
if (parentNode) {
|
|
800
808
|
insertNodesBefore(parentNode, nodes, marker);
|
|
801
809
|
}
|
|
802
810
|
} catch (err) {
|
|
803
|
-
if (
|
|
811
|
+
if (_chunkQNMYVXRLcjs.handleSuspend.call(void 0, err, root)) {
|
|
804
812
|
handledError = true;
|
|
805
|
-
|
|
813
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
806
814
|
return;
|
|
807
815
|
}
|
|
808
|
-
if (
|
|
816
|
+
if (_chunkQNMYVXRLcjs.handleError.call(void 0, err, { source: "renderChild" }, root)) {
|
|
809
817
|
handledError = true;
|
|
810
|
-
|
|
818
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
811
819
|
return;
|
|
812
820
|
}
|
|
813
821
|
throw err;
|
|
814
822
|
} finally {
|
|
815
|
-
|
|
823
|
+
_chunkQNMYVXRLcjs.popRoot.call(void 0, prev);
|
|
816
824
|
if (!handledError) {
|
|
817
|
-
|
|
825
|
+
_chunkQNMYVXRLcjs.flushOnMount.call(void 0, root);
|
|
818
826
|
}
|
|
819
827
|
}
|
|
820
828
|
currentRoot = root;
|
|
@@ -823,21 +831,22 @@ function insert(parent, getValue, markerOrCreateElement, createElementFn) {
|
|
|
823
831
|
return () => {
|
|
824
832
|
dispose();
|
|
825
833
|
if (currentRoot) {
|
|
826
|
-
|
|
834
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, currentRoot);
|
|
827
835
|
currentRoot = null;
|
|
828
836
|
}
|
|
829
837
|
clearCurrentNodes();
|
|
830
838
|
if (ownsMarker) {
|
|
831
|
-
_optionalChain([marker, 'access',
|
|
839
|
+
_optionalChain([marker, 'access', _8 => _8.parentNode, 'optionalAccess', _9 => _9.removeChild, 'call', _10 => _10(marker)]);
|
|
832
840
|
}
|
|
833
841
|
};
|
|
834
842
|
}
|
|
835
843
|
function insertBetween(start, end, getValue, createElementFn) {
|
|
836
|
-
const hostRoot =
|
|
844
|
+
const hostRoot = _chunkQNMYVXRLcjs.getCurrentRoot.call(void 0, );
|
|
845
|
+
const markerOwnerDocument = _nullishCoalesce(_nullishCoalesce(start.ownerDocument, () => ( end.ownerDocument)), () => ( document));
|
|
837
846
|
let currentNodes = [];
|
|
838
847
|
let currentText = null;
|
|
839
848
|
let currentRoot = null;
|
|
840
|
-
let initialHydrating =
|
|
849
|
+
let initialHydrating = _chunkQNMYVXRLcjs.__fictIsHydrating.call(void 0, );
|
|
841
850
|
const collectBetween = () => {
|
|
842
851
|
const nodes = [];
|
|
843
852
|
let cursor = start.nextSibling;
|
|
@@ -854,8 +863,9 @@ function insertBetween(start, end, getValue, createElementFn) {
|
|
|
854
863
|
}
|
|
855
864
|
};
|
|
856
865
|
const setTextNode = (textValue, shouldInsert) => {
|
|
866
|
+
const parentNode = start.parentNode;
|
|
857
867
|
if (!currentText) {
|
|
858
|
-
currentText =
|
|
868
|
+
currentText = (_nullishCoalesce(_optionalChain([parentNode, 'optionalAccess', _11 => _11.ownerDocument]), () => ( markerOwnerDocument))).createTextNode(textValue);
|
|
859
869
|
} else if (currentText.data !== textValue) {
|
|
860
870
|
currentText.data = textValue;
|
|
861
871
|
}
|
|
@@ -867,13 +877,12 @@ function insertBetween(start, end, getValue, createElementFn) {
|
|
|
867
877
|
return;
|
|
868
878
|
}
|
|
869
879
|
clearCurrentNodes();
|
|
870
|
-
const parentNode = start.parentNode;
|
|
871
880
|
if (parentNode) {
|
|
872
881
|
insertNodesBefore(parentNode, [currentText], end);
|
|
873
882
|
currentNodes = [currentText];
|
|
874
883
|
}
|
|
875
884
|
};
|
|
876
|
-
const dispose =
|
|
885
|
+
const dispose = _chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => {
|
|
877
886
|
const value = getValue();
|
|
878
887
|
const parentNode = start.parentNode;
|
|
879
888
|
const isPrimitive = value == null || value === false || typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
@@ -887,7 +896,7 @@ function insertBetween(start, end, getValue, createElementFn) {
|
|
|
887
896
|
}
|
|
888
897
|
}
|
|
889
898
|
if (currentRoot) {
|
|
890
|
-
|
|
899
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, currentRoot);
|
|
891
900
|
currentRoot = null;
|
|
892
901
|
}
|
|
893
902
|
if (!parentNode) {
|
|
@@ -901,16 +910,17 @@ function insertBetween(start, end, getValue, createElementFn) {
|
|
|
901
910
|
return;
|
|
902
911
|
}
|
|
903
912
|
if (currentRoot) {
|
|
904
|
-
|
|
913
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, currentRoot);
|
|
905
914
|
currentRoot = null;
|
|
906
915
|
}
|
|
907
916
|
clearCurrentNodes();
|
|
908
|
-
const root =
|
|
909
|
-
const prev =
|
|
917
|
+
const root = _chunkQNMYVXRLcjs.createRootContext.call(void 0, hostRoot);
|
|
918
|
+
const prev = _chunkQNMYVXRLcjs.pushRoot.call(void 0, root);
|
|
910
919
|
let nodes = [];
|
|
911
920
|
let handledError = false;
|
|
912
921
|
try {
|
|
913
922
|
let newNode = void 0;
|
|
923
|
+
const ownerDocument = _nullishCoalesce(_optionalChain([parentNode, 'optionalAccess', _12 => _12.ownerDocument]), () => ( markerOwnerDocument));
|
|
914
924
|
const createValue = () => {
|
|
915
925
|
if (value instanceof Node) {
|
|
916
926
|
return value;
|
|
@@ -922,46 +932,51 @@ function insertBetween(start, end, getValue, createElementFn) {
|
|
|
922
932
|
if (createElementFn) {
|
|
923
933
|
const mapped = [];
|
|
924
934
|
for (const item of value) {
|
|
925
|
-
mapped.push(...toNodeArray(createElementFn(item)));
|
|
935
|
+
mapped.push(...toNodeArray(createElementFn(item), ownerDocument));
|
|
926
936
|
}
|
|
927
937
|
return mapped;
|
|
928
938
|
}
|
|
929
|
-
return
|
|
939
|
+
return ownerDocument.createTextNode(String(value));
|
|
930
940
|
}
|
|
931
|
-
return createElementFn ? createElementFn(value) :
|
|
941
|
+
return createElementFn ? createElementFn(value) : ownerDocument.createTextNode(String(value));
|
|
932
942
|
};
|
|
933
943
|
if (initialHydrating && isHydratingActive() && parentNode) {
|
|
934
|
-
withHydrationRange(
|
|
935
|
-
|
|
936
|
-
|
|
944
|
+
withHydrationRange(
|
|
945
|
+
start.nextSibling,
|
|
946
|
+
end,
|
|
947
|
+
_nullishCoalesce(parentNode.ownerDocument, () => ( markerOwnerDocument)),
|
|
948
|
+
() => {
|
|
949
|
+
newNode = createValue();
|
|
950
|
+
}
|
|
951
|
+
);
|
|
937
952
|
} else {
|
|
938
953
|
newNode = createValue();
|
|
939
954
|
}
|
|
940
|
-
nodes = toNodeArray(newNode);
|
|
955
|
+
nodes = toNodeArray(newNode, ownerDocument);
|
|
941
956
|
if (root.suspended) {
|
|
942
957
|
handledError = true;
|
|
943
|
-
|
|
958
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
944
959
|
return;
|
|
945
960
|
}
|
|
946
961
|
if (parentNode && !initialHydrating) {
|
|
947
962
|
insertNodesBefore(parentNode, nodes, end);
|
|
948
963
|
}
|
|
949
964
|
} catch (err) {
|
|
950
|
-
if (
|
|
965
|
+
if (_chunkQNMYVXRLcjs.handleSuspend.call(void 0, err, root)) {
|
|
951
966
|
handledError = true;
|
|
952
|
-
|
|
967
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
953
968
|
return;
|
|
954
969
|
}
|
|
955
|
-
if (
|
|
970
|
+
if (_chunkQNMYVXRLcjs.handleError.call(void 0, err, { source: "renderChild" }, root)) {
|
|
956
971
|
handledError = true;
|
|
957
|
-
|
|
972
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
958
973
|
return;
|
|
959
974
|
}
|
|
960
975
|
throw err;
|
|
961
976
|
} finally {
|
|
962
|
-
|
|
977
|
+
_chunkQNMYVXRLcjs.popRoot.call(void 0, prev);
|
|
963
978
|
if (!handledError) {
|
|
964
|
-
|
|
979
|
+
_chunkQNMYVXRLcjs.flushOnMount.call(void 0, root);
|
|
965
980
|
}
|
|
966
981
|
}
|
|
967
982
|
currentRoot = root;
|
|
@@ -971,19 +986,19 @@ function insertBetween(start, end, getValue, createElementFn) {
|
|
|
971
986
|
return () => {
|
|
972
987
|
dispose();
|
|
973
988
|
if (currentRoot) {
|
|
974
|
-
|
|
989
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, currentRoot);
|
|
975
990
|
currentRoot = null;
|
|
976
991
|
}
|
|
977
992
|
clearCurrentNodes();
|
|
978
993
|
};
|
|
979
994
|
}
|
|
980
995
|
function createChildBinding(parent, getValue, createElementFn) {
|
|
981
|
-
const marker = document.createComment("fict:child");
|
|
996
|
+
const marker = (_nullishCoalesce(parent.ownerDocument, () => ( document))).createComment("fict:child");
|
|
982
997
|
parent.appendChild(marker);
|
|
983
|
-
const hostRoot =
|
|
984
|
-
const dispose =
|
|
985
|
-
const root =
|
|
986
|
-
const prev =
|
|
998
|
+
const hostRoot = _chunkQNMYVXRLcjs.getCurrentRoot.call(void 0, );
|
|
999
|
+
const dispose = _chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => {
|
|
1000
|
+
const root = _chunkQNMYVXRLcjs.createRootContext.call(void 0, hostRoot);
|
|
1001
|
+
const prev = _chunkQNMYVXRLcjs.pushRoot.call(void 0, root);
|
|
987
1002
|
let nodes = [];
|
|
988
1003
|
let handledError = false;
|
|
989
1004
|
try {
|
|
@@ -992,31 +1007,31 @@ function createChildBinding(parent, getValue, createElementFn) {
|
|
|
992
1007
|
return;
|
|
993
1008
|
}
|
|
994
1009
|
const output = createElementFn(value);
|
|
995
|
-
nodes = toNodeArray(output);
|
|
1010
|
+
nodes = toNodeArray(output, _nullishCoalesce(_nullishCoalesce(marker.ownerDocument, () => ( parent.ownerDocument)), () => ( document)));
|
|
996
1011
|
const parentNode = marker.parentNode;
|
|
997
1012
|
if (parentNode) {
|
|
998
1013
|
insertNodesBefore(parentNode, nodes, marker);
|
|
999
1014
|
}
|
|
1000
1015
|
return () => {
|
|
1001
|
-
|
|
1016
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
1002
1017
|
removeNodes(nodes);
|
|
1003
1018
|
};
|
|
1004
1019
|
} catch (err) {
|
|
1005
|
-
if (
|
|
1020
|
+
if (_chunkQNMYVXRLcjs.handleSuspend.call(void 0, err, root)) {
|
|
1006
1021
|
handledError = true;
|
|
1007
|
-
|
|
1022
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
1008
1023
|
return;
|
|
1009
1024
|
}
|
|
1010
|
-
if (
|
|
1025
|
+
if (_chunkQNMYVXRLcjs.handleError.call(void 0, err, { source: "renderChild" }, root)) {
|
|
1011
1026
|
handledError = true;
|
|
1012
|
-
|
|
1027
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
1013
1028
|
return;
|
|
1014
1029
|
}
|
|
1015
1030
|
throw err;
|
|
1016
1031
|
} finally {
|
|
1017
|
-
|
|
1032
|
+
_chunkQNMYVXRLcjs.popRoot.call(void 0, prev);
|
|
1018
1033
|
if (!handledError) {
|
|
1019
|
-
|
|
1034
|
+
_chunkQNMYVXRLcjs.flushOnMount.call(void 0, root);
|
|
1020
1035
|
}
|
|
1021
1036
|
}
|
|
1022
1037
|
});
|
|
@@ -1024,12 +1039,12 @@ function createChildBinding(parent, getValue, createElementFn) {
|
|
|
1024
1039
|
marker,
|
|
1025
1040
|
dispose: () => {
|
|
1026
1041
|
dispose();
|
|
1027
|
-
_optionalChain([marker, 'access',
|
|
1042
|
+
_optionalChain([marker, 'access', _13 => _13.parentNode, 'optionalAccess', _14 => _14.removeChild, 'call', _15 => _15(marker)]);
|
|
1028
1043
|
}
|
|
1029
1044
|
};
|
|
1030
1045
|
}
|
|
1031
1046
|
function delegateEvents(eventNames, doc = window.document) {
|
|
1032
|
-
const e = doc[
|
|
1047
|
+
const e = doc[_chunkQNMYVXRLcjs.$$EVENTS] || (doc[_chunkQNMYVXRLcjs.$$EVENTS] = /* @__PURE__ */ new Set());
|
|
1033
1048
|
for (let i = 0, l = eventNames.length; i < l; i++) {
|
|
1034
1049
|
const name = eventNames[i];
|
|
1035
1050
|
if (!e.has(name)) {
|
|
@@ -1039,12 +1054,12 @@ function delegateEvents(eventNames, doc = window.document) {
|
|
|
1039
1054
|
}
|
|
1040
1055
|
}
|
|
1041
1056
|
function clearDelegatedEvents(doc = window.document) {
|
|
1042
|
-
const e = doc[
|
|
1057
|
+
const e = doc[_chunkQNMYVXRLcjs.$$EVENTS];
|
|
1043
1058
|
if (e) {
|
|
1044
1059
|
for (const name of e.keys()) {
|
|
1045
1060
|
doc.removeEventListener(name, globalEventHandler);
|
|
1046
1061
|
}
|
|
1047
|
-
delete doc[
|
|
1062
|
+
delete doc[_chunkQNMYVXRLcjs.$$EVENTS];
|
|
1048
1063
|
}
|
|
1049
1064
|
}
|
|
1050
1065
|
function globalEventHandler(e) {
|
|
@@ -1110,7 +1125,7 @@ function globalEventHandler(e) {
|
|
|
1110
1125
|
Object.defineProperty(e, "currentTarget", {
|
|
1111
1126
|
configurable: true,
|
|
1112
1127
|
get() {
|
|
1113
|
-
return node || document;
|
|
1128
|
+
return node || oriCurrentTarget || _optionalChain([asNode, 'call', _16 => _16(oriTarget), 'optionalAccess', _17 => _17.ownerDocument]) || document;
|
|
1114
1129
|
}
|
|
1115
1130
|
});
|
|
1116
1131
|
if (e.composedPath) {
|
|
@@ -1157,8 +1172,8 @@ function addEventListener(node, name, handler, delegate) {
|
|
|
1157
1172
|
function bindEvent(el, eventName, handler, options) {
|
|
1158
1173
|
if (handler == null) return () => {
|
|
1159
1174
|
};
|
|
1160
|
-
const rootRef =
|
|
1161
|
-
const shouldDelegate = options == null &&
|
|
1175
|
+
const rootRef = _chunkQNMYVXRLcjs.getCurrentRoot.call(void 0, );
|
|
1176
|
+
const shouldDelegate = options == null && _chunkQNMYVXRLcjs.DelegatedEvents.has(eventName);
|
|
1162
1177
|
if (shouldDelegate) {
|
|
1163
1178
|
const key = `$$${eventName}`;
|
|
1164
1179
|
delegateEvents([eventName]);
|
|
@@ -1168,7 +1183,7 @@ function bindEvent(el, eventName, handler, options) {
|
|
|
1168
1183
|
const fn = resolveHandler();
|
|
1169
1184
|
callEventHandler(fn, args[0], el);
|
|
1170
1185
|
} catch (err) {
|
|
1171
|
-
if (!
|
|
1186
|
+
if (!_chunkQNMYVXRLcjs.handleError.call(void 0, err, { source: "event", eventName }, rootRef)) {
|
|
1172
1187
|
throw err;
|
|
1173
1188
|
}
|
|
1174
1189
|
}
|
|
@@ -1183,7 +1198,7 @@ function bindEvent(el, eventName, handler, options) {
|
|
|
1183
1198
|
const resolved = getHandler();
|
|
1184
1199
|
callEventHandler(resolved, event, el);
|
|
1185
1200
|
} catch (err) {
|
|
1186
|
-
if (
|
|
1201
|
+
if (_chunkQNMYVXRLcjs.handleError.call(void 0, err, { source: "event", eventName }, rootRef)) {
|
|
1187
1202
|
return;
|
|
1188
1203
|
}
|
|
1189
1204
|
throw err;
|
|
@@ -1191,7 +1206,7 @@ function bindEvent(el, eventName, handler, options) {
|
|
|
1191
1206
|
};
|
|
1192
1207
|
el.addEventListener(eventName, wrapped, options);
|
|
1193
1208
|
const cleanup = () => el.removeEventListener(eventName, wrapped, options);
|
|
1194
|
-
|
|
1209
|
+
_chunkQNMYVXRLcjs.registerRootCleanup.call(void 0, cleanup);
|
|
1195
1210
|
return cleanup;
|
|
1196
1211
|
}
|
|
1197
1212
|
function bindRef(el, ref) {
|
|
@@ -1211,11 +1226,11 @@ function bindRef(el, ref) {
|
|
|
1211
1226
|
const initialRef = getRef();
|
|
1212
1227
|
applyRef2(initialRef);
|
|
1213
1228
|
if (isReactive(ref)) {
|
|
1214
|
-
const cleanup2 =
|
|
1229
|
+
const cleanup2 = _chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => {
|
|
1215
1230
|
const currentRef = getRef();
|
|
1216
1231
|
applyRef2(currentRef);
|
|
1217
1232
|
});
|
|
1218
|
-
|
|
1233
|
+
_chunkQNMYVXRLcjs.registerRootCleanup.call(void 0, cleanup2);
|
|
1219
1234
|
const nullifyCleanup = () => {
|
|
1220
1235
|
const currentRef = getRef();
|
|
1221
1236
|
if (currentRef && typeof currentRef === "object" && "current" in currentRef) {
|
|
@@ -1223,7 +1238,7 @@ function bindRef(el, ref) {
|
|
|
1223
1238
|
currentRef.current = null;
|
|
1224
1239
|
}
|
|
1225
1240
|
};
|
|
1226
|
-
|
|
1241
|
+
_chunkQNMYVXRLcjs.registerRootCleanup.call(void 0, nullifyCleanup);
|
|
1227
1242
|
return () => {
|
|
1228
1243
|
cleanup2();
|
|
1229
1244
|
nullifyCleanup();
|
|
@@ -1236,23 +1251,23 @@ function bindRef(el, ref) {
|
|
|
1236
1251
|
refValue.current = null;
|
|
1237
1252
|
}
|
|
1238
1253
|
};
|
|
1239
|
-
|
|
1254
|
+
_chunkQNMYVXRLcjs.registerRootCleanup.call(void 0, cleanup);
|
|
1240
1255
|
return cleanup;
|
|
1241
1256
|
}
|
|
1242
1257
|
function spread(node, props = {}, isSVG = false, skipChildren = false) {
|
|
1243
1258
|
const prevProps = {};
|
|
1244
1259
|
if (!skipChildren && "children" in props) {
|
|
1245
|
-
|
|
1260
|
+
_chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => {
|
|
1246
1261
|
prevProps.children = props.children;
|
|
1247
1262
|
});
|
|
1248
1263
|
}
|
|
1249
|
-
|
|
1264
|
+
_chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => {
|
|
1250
1265
|
if (typeof props.ref === "function") {
|
|
1251
1266
|
;
|
|
1252
1267
|
props.ref(node);
|
|
1253
1268
|
}
|
|
1254
1269
|
});
|
|
1255
|
-
|
|
1270
|
+
_chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => {
|
|
1256
1271
|
assign(node, props, isSVG, true, prevProps, true);
|
|
1257
1272
|
});
|
|
1258
1273
|
return prevProps;
|
|
@@ -1310,7 +1325,7 @@ function assignProp(node, prop2, value, prev, isSVG, skipRef, props) {
|
|
|
1310
1325
|
}
|
|
1311
1326
|
if (prop2.slice(0, 2) === "on") {
|
|
1312
1327
|
const eventName = prop2.slice(2).toLowerCase();
|
|
1313
|
-
const shouldDelegate =
|
|
1328
|
+
const shouldDelegate = _chunkQNMYVXRLcjs.DelegatedEvents.has(eventName);
|
|
1314
1329
|
if (!shouldDelegate && prev) {
|
|
1315
1330
|
const handler = Array.isArray(prev) ? prev[0] : prev;
|
|
1316
1331
|
node.removeEventListener(eventName, handler);
|
|
@@ -1343,9 +1358,9 @@ function assignProp(node, prop2, value, prev, isSVG, skipRef, props) {
|
|
|
1343
1358
|
}
|
|
1344
1359
|
const isCE = node.nodeName.includes("-") || "is" in props;
|
|
1345
1360
|
if (!isSVG) {
|
|
1346
|
-
const propAlias = isDev ?
|
|
1347
|
-
const isProperty = isDev ?
|
|
1348
|
-
const isChildProp = isDev ?
|
|
1361
|
+
const propAlias = isDev ? _chunkQNMYVXRLcjs.getPropAlias.call(void 0, prop2, node.tagName) : void 0;
|
|
1362
|
+
const isProperty = isDev ? _chunkQNMYVXRLcjs.Properties.has(prop2) : prop2 in node;
|
|
1363
|
+
const isChildProp = isDev ? _chunkQNMYVXRLcjs.ChildProperties.has(prop2) : prop2 === "innerHTML" || prop2 === "textContent" || prop2 === "innerText" || prop2 === "children";
|
|
1349
1364
|
if (propAlias || isProperty || isChildProp || isCE) {
|
|
1350
1365
|
const propName = propAlias || prop2;
|
|
1351
1366
|
if (isCE && !isProperty && !isChildProp && !propAlias) {
|
|
@@ -1360,7 +1375,7 @@ function assignProp(node, prop2, value, prev, isSVG, skipRef, props) {
|
|
|
1360
1375
|
}
|
|
1361
1376
|
if (isSVG && prop2.indexOf(":") > -1) {
|
|
1362
1377
|
const [prefix, name] = prop2.split(":");
|
|
1363
|
-
const ns =
|
|
1378
|
+
const ns = _chunkQNMYVXRLcjs.SVGNamespace[prefix];
|
|
1364
1379
|
if (ns) {
|
|
1365
1380
|
if (value == null) node.removeAttributeNS(ns, name);
|
|
1366
1381
|
else node.setAttributeNS(ns, name, String(value));
|
|
@@ -1376,21 +1391,22 @@ function toPropertyName(name) {
|
|
|
1376
1391
|
return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());
|
|
1377
1392
|
}
|
|
1378
1393
|
function createConditional(condition, renderTrue, createElementFn, renderFalse, startOverride, endOverride, options) {
|
|
1379
|
-
const trackBranchReads = _optionalChain([options, 'optionalAccess',
|
|
1394
|
+
const trackBranchReads = _optionalChain([options, 'optionalAccess', _18 => _18.trackBranchReads]) === true;
|
|
1395
|
+
const hostRoot = _chunkQNMYVXRLcjs.getCurrentRoot.call(void 0, );
|
|
1380
1396
|
const useProvided = !!(startOverride && endOverride);
|
|
1381
|
-
const
|
|
1382
|
-
const
|
|
1383
|
-
const
|
|
1397
|
+
const markerOwnerDocument = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([startOverride, 'optionalAccess', _19 => _19.ownerDocument]), () => ( _optionalChain([endOverride, 'optionalAccess', _20 => _20.ownerDocument]))), () => ( _optionalChain([hostRoot, 'optionalAccess', _21 => _21.ownerDocument]))), () => ( document));
|
|
1398
|
+
const startMarker = useProvided ? startOverride : markerOwnerDocument.createComment("fict:cond:start");
|
|
1399
|
+
const endMarker = useProvided ? endOverride : markerOwnerDocument.createComment("fict:cond:end");
|
|
1400
|
+
const fragment = useProvided ? startMarker : markerOwnerDocument.createDocumentFragment();
|
|
1384
1401
|
if (!useProvided) {
|
|
1385
1402
|
;
|
|
1386
1403
|
fragment.append(startMarker, endMarker);
|
|
1387
1404
|
}
|
|
1388
|
-
const hostRoot = _chunkUBFDB6OLcjs.getCurrentRoot.call(void 0, );
|
|
1389
1405
|
let currentNodes = [];
|
|
1390
1406
|
let currentRoot = null;
|
|
1391
1407
|
let lastCondition = void 0;
|
|
1392
1408
|
let pendingRender = false;
|
|
1393
|
-
let initialHydrating =
|
|
1409
|
+
let initialHydrating = _chunkQNMYVXRLcjs.__fictIsHydrating.call(void 0, );
|
|
1394
1410
|
const collectBetween = () => {
|
|
1395
1411
|
const nodes = [];
|
|
1396
1412
|
let cursor = startMarker.nextSibling;
|
|
@@ -1400,7 +1416,7 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1400
1416
|
}
|
|
1401
1417
|
return nodes;
|
|
1402
1418
|
};
|
|
1403
|
-
const conditionMemo =
|
|
1419
|
+
const conditionMemo = _chunkQNMYVXRLcjs.computed.call(void 0, condition);
|
|
1404
1420
|
const runConditional = () => {
|
|
1405
1421
|
const cond = conditionMemo();
|
|
1406
1422
|
const parent = startMarker.parentNode;
|
|
@@ -1417,16 +1433,16 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1417
1433
|
currentNodes = collectBetween();
|
|
1418
1434
|
return;
|
|
1419
1435
|
}
|
|
1420
|
-
const root2 =
|
|
1421
|
-
const prev2 =
|
|
1436
|
+
const root2 = _chunkQNMYVXRLcjs.createRootContext.call(void 0, hostRoot);
|
|
1437
|
+
const prev2 = _chunkQNMYVXRLcjs.pushRoot.call(void 0, root2);
|
|
1422
1438
|
let handledError2 = false;
|
|
1423
1439
|
try {
|
|
1424
1440
|
withHydrationRange(
|
|
1425
1441
|
startMarker.nextSibling,
|
|
1426
1442
|
endMarker,
|
|
1427
|
-
_nullishCoalesce(parent.ownerDocument, () => (
|
|
1443
|
+
_nullishCoalesce(parent.ownerDocument, () => ( markerOwnerDocument)),
|
|
1428
1444
|
() => {
|
|
1429
|
-
const output = trackBranchReads ? render3() :
|
|
1445
|
+
const output = trackBranchReads ? render3() : _chunkQNMYVXRLcjs.untrack.call(void 0, render3);
|
|
1430
1446
|
if (output == null || output === false) {
|
|
1431
1447
|
return;
|
|
1432
1448
|
}
|
|
@@ -1435,21 +1451,21 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1435
1451
|
);
|
|
1436
1452
|
currentNodes = collectBetween();
|
|
1437
1453
|
} catch (err) {
|
|
1438
|
-
if (
|
|
1454
|
+
if (_chunkQNMYVXRLcjs.handleSuspend.call(void 0, err, root2)) {
|
|
1439
1455
|
handledError2 = true;
|
|
1440
|
-
|
|
1456
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root2);
|
|
1441
1457
|
return;
|
|
1442
1458
|
}
|
|
1443
|
-
if (
|
|
1459
|
+
if (_chunkQNMYVXRLcjs.handleError.call(void 0, err, { source: "renderChild" }, root2)) {
|
|
1444
1460
|
handledError2 = true;
|
|
1445
|
-
|
|
1461
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root2);
|
|
1446
1462
|
return;
|
|
1447
1463
|
}
|
|
1448
1464
|
throw err;
|
|
1449
1465
|
} finally {
|
|
1450
|
-
|
|
1466
|
+
_chunkQNMYVXRLcjs.popRoot.call(void 0, prev2);
|
|
1451
1467
|
if (!handledError2) {
|
|
1452
|
-
|
|
1468
|
+
_chunkQNMYVXRLcjs.flushOnMount.call(void 0, root2);
|
|
1453
1469
|
currentRoot = root2;
|
|
1454
1470
|
} else {
|
|
1455
1471
|
currentRoot = null;
|
|
@@ -1470,8 +1486,8 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1470
1486
|
return;
|
|
1471
1487
|
}
|
|
1472
1488
|
let patched = false;
|
|
1473
|
-
const scratchRoot =
|
|
1474
|
-
const prevScratch =
|
|
1489
|
+
const scratchRoot = _chunkQNMYVXRLcjs.createRootContext.call(void 0, hostRoot);
|
|
1490
|
+
const prevScratch = _chunkQNMYVXRLcjs.pushRoot.call(void 0, scratchRoot);
|
|
1475
1491
|
let handledPatchError = false;
|
|
1476
1492
|
let scratchOutput = null;
|
|
1477
1493
|
try {
|
|
@@ -1485,63 +1501,63 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1485
1501
|
patched = _patchFragmentChildren(currentNodes, output);
|
|
1486
1502
|
}
|
|
1487
1503
|
if (!patched && _isFragmentVNode(output)) {
|
|
1488
|
-
patched = _patchFragmentChildren(currentNodes, _optionalChain([output, 'access',
|
|
1504
|
+
patched = _patchFragmentChildren(currentNodes, _optionalChain([output, 'access', _22 => _22.props, 'optionalAccess', _23 => _23.children]));
|
|
1489
1505
|
}
|
|
1490
1506
|
}
|
|
1491
1507
|
} catch (err) {
|
|
1492
|
-
if (
|
|
1508
|
+
if (_chunkQNMYVXRLcjs.handleSuspend.call(void 0, err, scratchRoot)) {
|
|
1493
1509
|
handledPatchError = true;
|
|
1494
1510
|
return;
|
|
1495
1511
|
}
|
|
1496
|
-
if (
|
|
1512
|
+
if (_chunkQNMYVXRLcjs.handleError.call(void 0, err, { source: "renderChild" }, scratchRoot)) {
|
|
1497
1513
|
handledPatchError = true;
|
|
1498
1514
|
return;
|
|
1499
1515
|
}
|
|
1500
1516
|
throw err;
|
|
1501
1517
|
} finally {
|
|
1502
|
-
|
|
1518
|
+
_chunkQNMYVXRLcjs.popRoot.call(void 0, prevScratch);
|
|
1503
1519
|
}
|
|
1504
1520
|
if (handledPatchError) {
|
|
1505
|
-
|
|
1521
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, scratchRoot);
|
|
1506
1522
|
return;
|
|
1507
1523
|
}
|
|
1508
1524
|
if (patched) {
|
|
1509
|
-
|
|
1525
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, scratchRoot);
|
|
1510
1526
|
return;
|
|
1511
1527
|
}
|
|
1512
1528
|
lastCondition = cond;
|
|
1513
1529
|
if (currentRoot) {
|
|
1514
|
-
|
|
1530
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, currentRoot);
|
|
1515
1531
|
currentRoot = null;
|
|
1516
1532
|
}
|
|
1517
1533
|
removeNodes(currentNodes);
|
|
1518
1534
|
currentNodes = [];
|
|
1519
|
-
const prev2 =
|
|
1535
|
+
const prev2 = _chunkQNMYVXRLcjs.pushRoot.call(void 0, scratchRoot);
|
|
1520
1536
|
let handledError2 = false;
|
|
1521
1537
|
try {
|
|
1522
1538
|
if (scratchOutput == null || scratchOutput === false) {
|
|
1523
1539
|
return;
|
|
1524
1540
|
}
|
|
1525
1541
|
const el = createElementFn(scratchOutput);
|
|
1526
|
-
const nodes = toNodeArray(el);
|
|
1542
|
+
const nodes = toNodeArray(el, _nullishCoalesce(parent.ownerDocument, () => ( markerOwnerDocument)));
|
|
1527
1543
|
insertNodesBefore(parent, nodes, endMarker);
|
|
1528
1544
|
currentNodes = nodes;
|
|
1529
1545
|
} catch (err) {
|
|
1530
|
-
if (
|
|
1546
|
+
if (_chunkQNMYVXRLcjs.handleSuspend.call(void 0, err, scratchRoot)) {
|
|
1531
1547
|
handledError2 = true;
|
|
1532
|
-
|
|
1548
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, scratchRoot);
|
|
1533
1549
|
return;
|
|
1534
1550
|
}
|
|
1535
|
-
if (
|
|
1551
|
+
if (_chunkQNMYVXRLcjs.handleError.call(void 0, err, { source: "renderChild" }, scratchRoot)) {
|
|
1536
1552
|
handledError2 = true;
|
|
1537
|
-
|
|
1553
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, scratchRoot);
|
|
1538
1554
|
return;
|
|
1539
1555
|
}
|
|
1540
1556
|
throw err;
|
|
1541
1557
|
} finally {
|
|
1542
|
-
|
|
1558
|
+
_chunkQNMYVXRLcjs.popRoot.call(void 0, prev2);
|
|
1543
1559
|
if (!handledError2) {
|
|
1544
|
-
|
|
1560
|
+
_chunkQNMYVXRLcjs.flushOnMount.call(void 0, scratchRoot);
|
|
1545
1561
|
currentRoot = scratchRoot;
|
|
1546
1562
|
} else {
|
|
1547
1563
|
currentRoot = null;
|
|
@@ -1551,7 +1567,7 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1551
1567
|
}
|
|
1552
1568
|
lastCondition = cond;
|
|
1553
1569
|
if (currentRoot) {
|
|
1554
|
-
|
|
1570
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, currentRoot);
|
|
1555
1571
|
currentRoot = null;
|
|
1556
1572
|
}
|
|
1557
1573
|
removeNodes(currentNodes);
|
|
@@ -1560,41 +1576,41 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1560
1576
|
if (!render2) {
|
|
1561
1577
|
return;
|
|
1562
1578
|
}
|
|
1563
|
-
const root =
|
|
1564
|
-
const prev =
|
|
1579
|
+
const root = _chunkQNMYVXRLcjs.createRootContext.call(void 0, hostRoot);
|
|
1580
|
+
const prev = _chunkQNMYVXRLcjs.pushRoot.call(void 0, root);
|
|
1565
1581
|
let handledError = false;
|
|
1566
1582
|
try {
|
|
1567
|
-
const output = trackBranchReads ? render2() :
|
|
1583
|
+
const output = trackBranchReads ? render2() : _chunkQNMYVXRLcjs.untrack.call(void 0, render2);
|
|
1568
1584
|
if (output == null || output === false) {
|
|
1569
1585
|
return;
|
|
1570
1586
|
}
|
|
1571
1587
|
const el = createElementFn(output);
|
|
1572
|
-
const nodes = toNodeArray(el);
|
|
1588
|
+
const nodes = toNodeArray(el, _nullishCoalesce(parent.ownerDocument, () => ( markerOwnerDocument)));
|
|
1573
1589
|
insertNodesBefore(parent, nodes, endMarker);
|
|
1574
1590
|
currentNodes = nodes;
|
|
1575
1591
|
} catch (err) {
|
|
1576
|
-
if (
|
|
1592
|
+
if (_chunkQNMYVXRLcjs.handleSuspend.call(void 0, err, root)) {
|
|
1577
1593
|
handledError = true;
|
|
1578
|
-
|
|
1594
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
1579
1595
|
return;
|
|
1580
1596
|
}
|
|
1581
|
-
if (
|
|
1597
|
+
if (_chunkQNMYVXRLcjs.handleError.call(void 0, err, { source: "renderChild" }, root)) {
|
|
1582
1598
|
handledError = true;
|
|
1583
|
-
|
|
1599
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
1584
1600
|
return;
|
|
1585
1601
|
}
|
|
1586
1602
|
throw err;
|
|
1587
1603
|
} finally {
|
|
1588
|
-
|
|
1604
|
+
_chunkQNMYVXRLcjs.popRoot.call(void 0, prev);
|
|
1589
1605
|
if (!handledError) {
|
|
1590
|
-
|
|
1606
|
+
_chunkQNMYVXRLcjs.flushOnMount.call(void 0, root);
|
|
1591
1607
|
currentRoot = root;
|
|
1592
1608
|
} else {
|
|
1593
1609
|
currentRoot = null;
|
|
1594
1610
|
}
|
|
1595
1611
|
}
|
|
1596
1612
|
};
|
|
1597
|
-
const dispose =
|
|
1613
|
+
const dispose = _chunkQNMYVXRLcjs.createRenderEffect.call(void 0, runConditional);
|
|
1598
1614
|
return {
|
|
1599
1615
|
marker: fragment,
|
|
1600
1616
|
flush: () => {
|
|
@@ -1605,67 +1621,69 @@ function createConditional(condition, renderTrue, createElementFn, renderFalse,
|
|
|
1605
1621
|
dispose: () => {
|
|
1606
1622
|
dispose();
|
|
1607
1623
|
if (currentRoot) {
|
|
1608
|
-
|
|
1624
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, currentRoot);
|
|
1609
1625
|
}
|
|
1610
1626
|
removeNodes(currentNodes);
|
|
1611
1627
|
currentNodes = [];
|
|
1612
|
-
_optionalChain([startMarker, 'access',
|
|
1613
|
-
_optionalChain([endMarker, 'access',
|
|
1628
|
+
_optionalChain([startMarker, 'access', _24 => _24.parentNode, 'optionalAccess', _25 => _25.removeChild, 'call', _26 => _26(startMarker)]);
|
|
1629
|
+
_optionalChain([endMarker, 'access', _27 => _27.parentNode, 'optionalAccess', _28 => _28.removeChild, 'call', _29 => _29(endMarker)]);
|
|
1614
1630
|
}
|
|
1615
1631
|
};
|
|
1616
1632
|
}
|
|
1617
1633
|
function createShow(el, condition, displayValue) {
|
|
1618
1634
|
const originalDisplay = _nullishCoalesce(displayValue, () => ( el.style.display));
|
|
1619
|
-
|
|
1635
|
+
_chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => {
|
|
1620
1636
|
el.style.display = condition() ? originalDisplay : "none";
|
|
1621
1637
|
});
|
|
1622
1638
|
}
|
|
1623
1639
|
function createPortal(container, render2, createElementFn) {
|
|
1624
|
-
const parentRoot =
|
|
1625
|
-
const
|
|
1640
|
+
const parentRoot = _chunkQNMYVXRLcjs.getCurrentRoot.call(void 0, );
|
|
1641
|
+
const markerOwnerDocument = _nullishCoalesce(container.ownerDocument, () => ( document));
|
|
1642
|
+
const marker = markerOwnerDocument.createComment("fict:portal");
|
|
1626
1643
|
container.appendChild(marker);
|
|
1627
1644
|
let currentNodes = [];
|
|
1628
1645
|
let currentRoot = null;
|
|
1629
|
-
const dispose =
|
|
1646
|
+
const dispose = _chunkQNMYVXRLcjs.createRenderEffect.call(void 0, () => {
|
|
1630
1647
|
if (currentRoot) {
|
|
1631
|
-
|
|
1648
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, currentRoot);
|
|
1632
1649
|
currentRoot = null;
|
|
1633
1650
|
}
|
|
1634
1651
|
if (currentNodes.length > 0) {
|
|
1635
1652
|
removeNodes(currentNodes);
|
|
1636
1653
|
currentNodes = [];
|
|
1637
1654
|
}
|
|
1638
|
-
const root =
|
|
1639
|
-
|
|
1655
|
+
const root = _chunkQNMYVXRLcjs.createRootContext.call(void 0, parentRoot);
|
|
1656
|
+
root.ownerDocument = _nullishCoalesce(_nullishCoalesce(container.ownerDocument, () => ( _optionalChain([parentRoot, 'optionalAccess', _30 => _30.ownerDocument]))), () => ( document));
|
|
1657
|
+
const prev = _chunkQNMYVXRLcjs.pushRoot.call(void 0, root);
|
|
1640
1658
|
let handledError = false;
|
|
1641
1659
|
try {
|
|
1642
1660
|
const output = render2();
|
|
1643
1661
|
if (output != null && output !== false) {
|
|
1644
1662
|
const el = createElementFn(output);
|
|
1645
|
-
const nodes = toNodeArray(el);
|
|
1663
|
+
const nodes = toNodeArray(el, markerOwnerDocument);
|
|
1646
1664
|
if (marker.parentNode) {
|
|
1647
1665
|
insertNodesBefore(marker.parentNode, nodes, marker);
|
|
1648
1666
|
}
|
|
1649
1667
|
currentNodes = nodes;
|
|
1650
1668
|
}
|
|
1651
1669
|
} catch (err) {
|
|
1652
|
-
if (
|
|
1670
|
+
if (_chunkQNMYVXRLcjs.handleSuspend.call(void 0, err, root)) {
|
|
1653
1671
|
handledError = true;
|
|
1654
|
-
|
|
1672
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
1655
1673
|
currentNodes = [];
|
|
1656
1674
|
return;
|
|
1657
1675
|
}
|
|
1658
|
-
if (
|
|
1676
|
+
if (_chunkQNMYVXRLcjs.handleError.call(void 0, err, { source: "renderChild" }, root)) {
|
|
1659
1677
|
handledError = true;
|
|
1660
|
-
|
|
1678
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
1661
1679
|
currentNodes = [];
|
|
1662
1680
|
return;
|
|
1663
1681
|
}
|
|
1664
1682
|
throw err;
|
|
1665
1683
|
} finally {
|
|
1666
|
-
|
|
1684
|
+
_chunkQNMYVXRLcjs.popRoot.call(void 0, prev);
|
|
1667
1685
|
if (!handledError) {
|
|
1668
|
-
|
|
1686
|
+
_chunkQNMYVXRLcjs.flushOnMount.call(void 0, root);
|
|
1669
1687
|
currentRoot = root;
|
|
1670
1688
|
} else {
|
|
1671
1689
|
currentRoot = null;
|
|
@@ -1675,12 +1693,12 @@ function createPortal(container, render2, createElementFn) {
|
|
|
1675
1693
|
const portalDispose = () => {
|
|
1676
1694
|
dispose();
|
|
1677
1695
|
if (currentRoot) {
|
|
1678
|
-
|
|
1696
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, currentRoot);
|
|
1679
1697
|
}
|
|
1680
1698
|
if (currentNodes.length > 0) {
|
|
1681
1699
|
removeNodes(currentNodes);
|
|
1682
1700
|
}
|
|
1683
|
-
_optionalChain([marker, 'access',
|
|
1701
|
+
_optionalChain([marker, 'access', _31 => _31.parentNode, 'optionalAccess', _32 => _32.removeChild, 'call', _33 => _33(marker)]);
|
|
1684
1702
|
};
|
|
1685
1703
|
if (parentRoot) {
|
|
1686
1704
|
parentRoot.destroyCallbacks.push(portalDispose);
|
|
@@ -1694,7 +1712,7 @@ function patchElement(el, output) {
|
|
|
1694
1712
|
if (output && typeof output === "object" && !(output instanceof Node)) {
|
|
1695
1713
|
const vnode = output;
|
|
1696
1714
|
if (typeof vnode.type === "string" && vnode.type.toLowerCase() === el.tagName.toLowerCase()) {
|
|
1697
|
-
const children = _optionalChain([vnode, 'access',
|
|
1715
|
+
const children = _optionalChain([vnode, 'access', _34 => _34.props, 'optionalAccess', _35 => _35.children]);
|
|
1698
1716
|
const props = _nullishCoalesce(vnode.props, () => ( {}));
|
|
1699
1717
|
for (const [key, value] of Object.entries(props)) {
|
|
1700
1718
|
if (key === "children" || key === "key") continue;
|
|
@@ -1763,7 +1781,7 @@ function normalizeChildren(children, result = []) {
|
|
|
1763
1781
|
return result;
|
|
1764
1782
|
}
|
|
1765
1783
|
if (_isFragmentVNode(children)) {
|
|
1766
|
-
return normalizeChildren(_optionalChain([children, 'access',
|
|
1784
|
+
return normalizeChildren(_optionalChain([children, 'access', _36 => _36.props, 'optionalAccess', _37 => _37.children]), result);
|
|
1767
1785
|
}
|
|
1768
1786
|
result.push(children);
|
|
1769
1787
|
return result;
|
|
@@ -1839,10 +1857,10 @@ function isExplicitReactiveFn2(value) {
|
|
|
1839
1857
|
function normalizePropsFunction(value) {
|
|
1840
1858
|
if (typeof value !== "function") return value;
|
|
1841
1859
|
if (value.length !== 0) return value;
|
|
1842
|
-
if (isPropGetter(value) ||
|
|
1860
|
+
if (isPropGetter(value) || _chunkQNMYVXRLcjs.isSignal.call(void 0, value) || _chunkQNMYVXRLcjs.isComputed.call(void 0, value) || isExplicitReactiveFn2(value)) {
|
|
1843
1861
|
return value;
|
|
1844
1862
|
}
|
|
1845
|
-
if (
|
|
1863
|
+
if (_chunkQNMYVXRLcjs.isEffect.call(void 0, value) || _chunkQNMYVXRLcjs.isEffectScope.call(void 0, value) || isNonReactiveFn2(value)) return value;
|
|
1846
1864
|
return markNonReactiveFn(value);
|
|
1847
1865
|
}
|
|
1848
1866
|
function createPropsProxy(props) {
|
|
@@ -1979,9 +1997,9 @@ function prop(getter, options) {
|
|
|
1979
1997
|
return getter;
|
|
1980
1998
|
}
|
|
1981
1999
|
const fn = getter;
|
|
1982
|
-
const unwrap2 = _optionalChain([options, 'optionalAccess',
|
|
2000
|
+
const unwrap2 = _optionalChain([options, 'optionalAccess', _38 => _38.unwrap]) !== false;
|
|
1983
2001
|
return __fictProp(
|
|
1984
|
-
|
|
2002
|
+
_chunkQNMYVXRLcjs.createMemo.call(void 0, () => {
|
|
1985
2003
|
const value = fn();
|
|
1986
2004
|
if (unwrap2 && isPropGetter(value)) {
|
|
1987
2005
|
return value();
|
|
@@ -1994,15 +2012,42 @@ function prop(getter, options) {
|
|
|
1994
2012
|
// src/dom.ts
|
|
1995
2013
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
1996
2014
|
var MATHML_NS = "http://www.w3.org/1998/Math/MathML";
|
|
1997
|
-
var isDev2 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access',
|
|
2015
|
+
var isDev2 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _39 => _39.env, 'optionalAccess', _40 => _40.NODE_ENV]) !== "production";
|
|
1998
2016
|
var nextComponentId = 1;
|
|
2017
|
+
function collectComponentMountElements(node) {
|
|
2018
|
+
if (node instanceof DocumentFragment) {
|
|
2019
|
+
return Array.from(node.childNodes).filter(
|
|
2020
|
+
(child) => child instanceof HTMLElement
|
|
2021
|
+
);
|
|
2022
|
+
}
|
|
2023
|
+
if (node instanceof HTMLElement) {
|
|
2024
|
+
if (node.hasAttribute("data-fict-host")) {
|
|
2025
|
+
const children = Array.from(node.children).filter(
|
|
2026
|
+
(child) => child instanceof HTMLElement
|
|
2027
|
+
);
|
|
2028
|
+
if (children.length > 0) return children;
|
|
2029
|
+
}
|
|
2030
|
+
return [node];
|
|
2031
|
+
}
|
|
2032
|
+
return [];
|
|
2033
|
+
}
|
|
2034
|
+
function annotateComponentElements(elements, componentId, componentName) {
|
|
2035
|
+
for (const element of elements) {
|
|
2036
|
+
element.setAttribute("data-fict-component", componentName);
|
|
2037
|
+
element.setAttribute("data-fict-component-id", String(componentId));
|
|
2038
|
+
const annotated = element;
|
|
2039
|
+
annotated.__fict_component_id__ = componentId;
|
|
2040
|
+
annotated.__fict_component_name__ = componentName;
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
1999
2043
|
function render(view, container) {
|
|
2000
|
-
const root =
|
|
2001
|
-
|
|
2044
|
+
const root = _chunkQNMYVXRLcjs.createRootContext.call(void 0, );
|
|
2045
|
+
root.ownerDocument = _nullishCoalesce(container.ownerDocument, () => ( document));
|
|
2046
|
+
const prev = _chunkQNMYVXRLcjs.pushRoot.call(void 0, root);
|
|
2002
2047
|
let dom = void 0;
|
|
2003
2048
|
try {
|
|
2004
2049
|
const output = view();
|
|
2005
|
-
if (
|
|
2050
|
+
if (_chunkQNMYVXRLcjs.__fictIsHydrating.call(void 0, )) {
|
|
2006
2051
|
withHydration(container, () => {
|
|
2007
2052
|
dom = createElement(output);
|
|
2008
2053
|
});
|
|
@@ -2010,71 +2055,75 @@ function render(view, container) {
|
|
|
2010
2055
|
dom = createElement(output);
|
|
2011
2056
|
}
|
|
2012
2057
|
} finally {
|
|
2013
|
-
|
|
2058
|
+
_chunkQNMYVXRLcjs.popRoot.call(void 0, prev);
|
|
2014
2059
|
}
|
|
2015
|
-
if (!
|
|
2060
|
+
if (!_chunkQNMYVXRLcjs.__fictIsHydrating.call(void 0, )) {
|
|
2016
2061
|
container.replaceChildren(dom);
|
|
2017
2062
|
}
|
|
2018
2063
|
container.setAttribute("data-fict-fine-grained", "1");
|
|
2019
|
-
|
|
2064
|
+
_chunkQNMYVXRLcjs.flushOnMount.call(void 0, root);
|
|
2020
2065
|
const teardown = () => {
|
|
2021
|
-
|
|
2066
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
2022
2067
|
container.innerHTML = "";
|
|
2023
2068
|
};
|
|
2024
2069
|
return teardown;
|
|
2025
2070
|
}
|
|
2026
2071
|
function hydrateComponent(view, container) {
|
|
2027
|
-
const root =
|
|
2028
|
-
|
|
2029
|
-
|
|
2072
|
+
const root = _chunkQNMYVXRLcjs.createRootContext.call(void 0, );
|
|
2073
|
+
root.ownerDocument = _nullishCoalesce(container.ownerDocument, () => ( document));
|
|
2074
|
+
const prev = _chunkQNMYVXRLcjs.pushRoot.call(void 0, root);
|
|
2075
|
+
_chunkQNMYVXRLcjs.__fictEnterHydration.call(void 0, );
|
|
2030
2076
|
try {
|
|
2031
2077
|
withHydration(container, () => {
|
|
2032
2078
|
view();
|
|
2033
2079
|
});
|
|
2034
2080
|
} finally {
|
|
2035
|
-
|
|
2036
|
-
|
|
2081
|
+
_chunkQNMYVXRLcjs.__fictExitHydration.call(void 0, );
|
|
2082
|
+
_chunkQNMYVXRLcjs.popRoot.call(void 0, prev);
|
|
2037
2083
|
}
|
|
2038
2084
|
container.setAttribute("data-fict-fine-grained", "1");
|
|
2039
|
-
|
|
2085
|
+
_chunkQNMYVXRLcjs.flushOnMount.call(void 0, root);
|
|
2040
2086
|
const teardown = () => {
|
|
2041
|
-
|
|
2087
|
+
_chunkQNMYVXRLcjs.destroyRoot.call(void 0, root);
|
|
2042
2088
|
};
|
|
2043
2089
|
return teardown;
|
|
2044
2090
|
}
|
|
2045
2091
|
function createElement(node) {
|
|
2046
|
-
return createElementWithContext(node, null);
|
|
2092
|
+
return createElementWithContext(node, null, resolveOwnerDocument());
|
|
2047
2093
|
}
|
|
2048
2094
|
function resolveNamespace(tagName, namespace) {
|
|
2049
2095
|
if (tagName === "svg") return "svg";
|
|
2050
2096
|
if (tagName === "math") return "mathml";
|
|
2051
2097
|
if (namespace === "mathml") return "mathml";
|
|
2052
2098
|
if (namespace === "svg") return "svg";
|
|
2053
|
-
if (isDev2 &&
|
|
2099
|
+
if (isDev2 && _chunkQNMYVXRLcjs.SVGElements.has(tagName)) return "svg";
|
|
2054
2100
|
return null;
|
|
2055
2101
|
}
|
|
2056
|
-
function
|
|
2102
|
+
function resolveOwnerDocument(ownerDocument) {
|
|
2103
|
+
return _nullishCoalesce(_nullishCoalesce(ownerDocument, () => ( _optionalChain([_chunkQNMYVXRLcjs.getCurrentRoot.call(void 0, ), 'optionalAccess', _41 => _41.ownerDocument]))), () => ( document));
|
|
2104
|
+
}
|
|
2105
|
+
function createElementWithContext(node, namespace, ownerDocument) {
|
|
2057
2106
|
if (node instanceof Node) {
|
|
2058
2107
|
return node;
|
|
2059
2108
|
}
|
|
2060
2109
|
if (node === null || node === void 0 || node === false) {
|
|
2061
|
-
return
|
|
2110
|
+
return ownerDocument.createTextNode("");
|
|
2062
2111
|
}
|
|
2063
2112
|
if (isReactive(node)) {
|
|
2064
2113
|
const resolved = node();
|
|
2065
2114
|
if (resolved === node) {
|
|
2066
|
-
return
|
|
2115
|
+
return ownerDocument.createTextNode("");
|
|
2067
2116
|
}
|
|
2068
|
-
return createElementWithContext(resolved, namespace);
|
|
2117
|
+
return createElementWithContext(resolved, namespace, ownerDocument);
|
|
2069
2118
|
}
|
|
2070
2119
|
if (typeof node === "function") {
|
|
2071
|
-
return
|
|
2120
|
+
return ownerDocument.createTextNode("");
|
|
2072
2121
|
}
|
|
2073
2122
|
if (typeof node === "object" && node !== null && !(node instanceof Node)) {
|
|
2074
2123
|
if ("marker" in node) {
|
|
2075
2124
|
const handle = node;
|
|
2076
2125
|
if (typeof handle.dispose === "function") {
|
|
2077
|
-
|
|
2126
|
+
_chunkQNMYVXRLcjs.registerRootCleanup.call(void 0, handle.dispose);
|
|
2078
2127
|
}
|
|
2079
2128
|
if (typeof handle.flush === "function") {
|
|
2080
2129
|
const runFlush = () => handle.flush && handle.flush();
|
|
@@ -2084,21 +2133,21 @@ function createElementWithContext(node, namespace) {
|
|
|
2084
2133
|
Promise.resolve().then(runFlush).catch(() => void 0);
|
|
2085
2134
|
}
|
|
2086
2135
|
}
|
|
2087
|
-
return
|
|
2136
|
+
return createElementWithContext(handle.marker, namespace, ownerDocument);
|
|
2088
2137
|
}
|
|
2089
2138
|
}
|
|
2090
2139
|
if (Array.isArray(node)) {
|
|
2091
|
-
const frag =
|
|
2140
|
+
const frag = ownerDocument.createDocumentFragment();
|
|
2092
2141
|
for (const child of node) {
|
|
2093
|
-
appendChildNode(frag, child, namespace);
|
|
2142
|
+
appendChildNode(frag, child, namespace, ownerDocument);
|
|
2094
2143
|
}
|
|
2095
2144
|
return frag;
|
|
2096
2145
|
}
|
|
2097
2146
|
if (typeof node === "string" || typeof node === "number") {
|
|
2098
|
-
return
|
|
2147
|
+
return ownerDocument.createTextNode(String(node));
|
|
2099
2148
|
}
|
|
2100
2149
|
if (typeof node === "boolean") {
|
|
2101
|
-
return
|
|
2150
|
+
return ownerDocument.createTextNode("");
|
|
2102
2151
|
}
|
|
2103
2152
|
const vnode = node;
|
|
2104
2153
|
if (typeof vnode.type === "function") {
|
|
@@ -2125,13 +2174,14 @@ function createElementWithContext(node, namespace) {
|
|
|
2125
2174
|
}
|
|
2126
2175
|
});
|
|
2127
2176
|
const props = createPropsProxy(baseProps);
|
|
2128
|
-
const hook = isDev2 ?
|
|
2129
|
-
const
|
|
2177
|
+
const hook = isDev2 ? _chunkQNMYVXRLcjs.getDevtoolsHook.call(void 0, ) : void 0;
|
|
2178
|
+
const componentName = vnode.type.name || "Anonymous";
|
|
2179
|
+
const parentId = hook ? _chunkQNMYVXRLcjs.__fictGetCurrentComponentId.call(void 0, ) : void 0;
|
|
2130
2180
|
const componentId = hook ? nextComponentId++ : void 0;
|
|
2131
|
-
if (_optionalChain([hook, 'optionalAccess',
|
|
2132
|
-
hook.registerComponent(componentId,
|
|
2181
|
+
if (_optionalChain([hook, 'optionalAccess', _42 => _42.registerComponent]) && componentId !== void 0) {
|
|
2182
|
+
hook.registerComponent(componentId, componentName, parentId);
|
|
2133
2183
|
}
|
|
2134
|
-
const ctx =
|
|
2184
|
+
const ctx = _chunkQNMYVXRLcjs.__fictPushContext.call(void 0, );
|
|
2135
2185
|
if (componentId !== void 0) {
|
|
2136
2186
|
ctx.componentId = componentId;
|
|
2137
2187
|
if (parentId !== void 0) {
|
|
@@ -2140,24 +2190,28 @@ function createElementWithContext(node, namespace) {
|
|
|
2140
2190
|
}
|
|
2141
2191
|
try {
|
|
2142
2192
|
const rendered = vnode.type(props);
|
|
2193
|
+
let mountElements;
|
|
2194
|
+
if (hook && componentId !== void 0) {
|
|
2195
|
+
_optionalChain([hook, 'access', _43 => _43.componentRender, 'optionalCall', _44 => _44(componentId)]);
|
|
2196
|
+
}
|
|
2143
2197
|
if (hook && componentId !== void 0) {
|
|
2144
|
-
|
|
2145
|
-
_optionalChain([hook, 'access',
|
|
2198
|
+
_chunkQNMYVXRLcjs.onMount.call(void 0, () => {
|
|
2199
|
+
_optionalChain([hook, 'access', _45 => _45.componentMount, 'optionalCall', _46 => _46(componentId, mountElements)]);
|
|
2146
2200
|
});
|
|
2147
|
-
|
|
2201
|
+
_chunkQNMYVXRLcjs.onCleanup.call(void 0, () => _optionalChain([hook, 'access', _47 => _47.componentUnmount, 'optionalCall', _48 => _48(componentId)]));
|
|
2148
2202
|
}
|
|
2149
|
-
if (
|
|
2150
|
-
const content = createElementWithContext(rendered, namespace);
|
|
2151
|
-
const host = namespace === "svg" ?
|
|
2203
|
+
if (_chunkQNMYVXRLcjs.__fictIsResumable.call(void 0, ) && !_chunkQNMYVXRLcjs.__fictIsHydrating.call(void 0, )) {
|
|
2204
|
+
const content = createElementWithContext(rendered, namespace, ownerDocument);
|
|
2205
|
+
const host = namespace === "svg" ? ownerDocument.createElementNS(SVG_NS, "fict-host") : namespace === "mathml" ? ownerDocument.createElementNS(MATHML_NS, "fict-host") : ownerDocument.createElement("fict-host");
|
|
2152
2206
|
host.setAttribute("data-fict-host", "");
|
|
2153
2207
|
if (namespace === null && host.style) {
|
|
2154
2208
|
;
|
|
2155
2209
|
host.style.display = "contents";
|
|
2156
2210
|
}
|
|
2157
2211
|
const meta = vnode.type.__fictMeta;
|
|
2158
|
-
const typeKey = (_nullishCoalesce(_optionalChain([meta, 'optionalAccess',
|
|
2159
|
-
|
|
2160
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
2212
|
+
const typeKey = (_nullishCoalesce(_optionalChain([meta, 'optionalAccess', _49 => _49.id]), () => ( vnode.type.name))) || "Anonymous";
|
|
2213
|
+
_chunkQNMYVXRLcjs.__fictRegisterScope.call(void 0, ctx, host, typeKey, rawProps);
|
|
2214
|
+
if (_optionalChain([meta, 'optionalAccess', _50 => _50.resume])) {
|
|
2161
2215
|
host.setAttribute("data-fict-h", meta.resume);
|
|
2162
2216
|
}
|
|
2163
2217
|
if (content instanceof DocumentFragment) {
|
|
@@ -2165,40 +2219,50 @@ function createElementWithContext(node, namespace) {
|
|
|
2165
2219
|
} else {
|
|
2166
2220
|
host.appendChild(content);
|
|
2167
2221
|
}
|
|
2222
|
+
if (hook && componentId !== void 0) {
|
|
2223
|
+
mountElements = collectComponentMountElements(host);
|
|
2224
|
+
annotateComponentElements(mountElements, componentId, componentName);
|
|
2225
|
+
}
|
|
2168
2226
|
return host;
|
|
2169
2227
|
}
|
|
2170
|
-
|
|
2228
|
+
const componentRoot = createElementWithContext(rendered, namespace, ownerDocument);
|
|
2229
|
+
if (hook && componentId !== void 0) {
|
|
2230
|
+
mountElements = collectComponentMountElements(componentRoot);
|
|
2231
|
+
annotateComponentElements(mountElements, componentId, componentName);
|
|
2232
|
+
}
|
|
2233
|
+
return componentRoot;
|
|
2171
2234
|
} catch (err) {
|
|
2172
|
-
if (
|
|
2173
|
-
return
|
|
2235
|
+
if (_chunkQNMYVXRLcjs.handleSuspend.call(void 0, err)) {
|
|
2236
|
+
return ownerDocument.createComment("fict:suspend");
|
|
2174
2237
|
}
|
|
2175
|
-
|
|
2238
|
+
_chunkQNMYVXRLcjs.handleError.call(void 0, err, { source: "render", componentName: vnode.type.name });
|
|
2176
2239
|
throw err;
|
|
2177
2240
|
} finally {
|
|
2178
|
-
|
|
2241
|
+
_chunkQNMYVXRLcjs.__fictPopContext.call(void 0, );
|
|
2179
2242
|
}
|
|
2180
2243
|
}
|
|
2181
2244
|
if (vnode.type === Fragment) {
|
|
2182
|
-
const frag =
|
|
2183
|
-
const children = _optionalChain([vnode, 'access',
|
|
2184
|
-
appendChildren(frag, children, namespace);
|
|
2245
|
+
const frag = ownerDocument.createDocumentFragment();
|
|
2246
|
+
const children = _optionalChain([vnode, 'access', _51 => _51.props, 'optionalAccess', _52 => _52.children]);
|
|
2247
|
+
appendChildren(frag, children, namespace, ownerDocument);
|
|
2185
2248
|
return frag;
|
|
2186
2249
|
}
|
|
2187
2250
|
const tagName = typeof vnode.type === "string" ? vnode.type : "div";
|
|
2188
2251
|
const resolvedNamespace = resolveNamespace(tagName, namespace);
|
|
2189
|
-
const el = resolvedNamespace === "svg" ?
|
|
2252
|
+
const el = resolvedNamespace === "svg" ? ownerDocument.createElementNS(SVG_NS, tagName) : resolvedNamespace === "mathml" ? ownerDocument.createElementNS(MATHML_NS, tagName) : ownerDocument.createElement(tagName);
|
|
2190
2253
|
applyProps(el, _nullishCoalesce(vnode.props, () => ( {})), resolvedNamespace === "svg");
|
|
2191
2254
|
appendChildren(
|
|
2192
2255
|
el,
|
|
2193
|
-
_optionalChain([vnode, 'access',
|
|
2194
|
-
tagName === "foreignObject" ? null : resolvedNamespace
|
|
2256
|
+
_optionalChain([vnode, 'access', _53 => _53.props, 'optionalAccess', _54 => _54.children]),
|
|
2257
|
+
tagName === "foreignObject" ? null : resolvedNamespace,
|
|
2258
|
+
ownerDocument
|
|
2195
2259
|
);
|
|
2196
2260
|
return el;
|
|
2197
2261
|
}
|
|
2198
2262
|
function template(html, isImportNode, isSVG, isMathML) {
|
|
2199
|
-
|
|
2200
|
-
const create = () => {
|
|
2201
|
-
const t =
|
|
2263
|
+
const nodeByDocument = /* @__PURE__ */ new WeakMap();
|
|
2264
|
+
const create = (ownerDocument) => {
|
|
2265
|
+
const t = ownerDocument.createElement("template");
|
|
2202
2266
|
if (isSVG) {
|
|
2203
2267
|
t.innerHTML = `<svg>${html}</svg>`;
|
|
2204
2268
|
const wrapper = t.content.firstChild;
|
|
@@ -2210,7 +2274,7 @@ function template(html, isImportNode, isSVG, isMathML) {
|
|
|
2210
2274
|
if (wrapper.childNodes.length === 1) {
|
|
2211
2275
|
return wrapper.firstChild;
|
|
2212
2276
|
}
|
|
2213
|
-
const fragment =
|
|
2277
|
+
const fragment = ownerDocument.createDocumentFragment();
|
|
2214
2278
|
fragment.append(...Array.from(wrapper.childNodes));
|
|
2215
2279
|
return fragment;
|
|
2216
2280
|
}
|
|
@@ -2225,7 +2289,7 @@ function template(html, isImportNode, isSVG, isMathML) {
|
|
|
2225
2289
|
if (wrapper.childNodes.length === 1) {
|
|
2226
2290
|
return wrapper.firstChild;
|
|
2227
2291
|
}
|
|
2228
|
-
const fragment =
|
|
2292
|
+
const fragment = ownerDocument.createDocumentFragment();
|
|
2229
2293
|
fragment.append(...Array.from(wrapper.childNodes));
|
|
2230
2294
|
return fragment;
|
|
2231
2295
|
}
|
|
@@ -2241,11 +2305,19 @@ function template(html, isImportNode, isSVG, isMathML) {
|
|
|
2241
2305
|
}
|
|
2242
2306
|
return content;
|
|
2243
2307
|
};
|
|
2308
|
+
const getBase = (ownerDocument) => {
|
|
2309
|
+
const cached = nodeByDocument.get(ownerDocument);
|
|
2310
|
+
if (cached) return cached;
|
|
2311
|
+
const created = create(ownerDocument);
|
|
2312
|
+
nodeByDocument.set(ownerDocument, created);
|
|
2313
|
+
return created;
|
|
2314
|
+
};
|
|
2244
2315
|
const fn = isImportNode ? () => untrack2(() => {
|
|
2245
|
-
const
|
|
2246
|
-
|
|
2316
|
+
const ownerDocument = resolveOwnerDocument();
|
|
2317
|
+
const base = getBase(ownerDocument);
|
|
2318
|
+
return isHydratingActive() ? claimNodes(base, () => ownerDocument.importNode(base, true)) : ownerDocument.importNode(base, true);
|
|
2247
2319
|
}) : () => {
|
|
2248
|
-
const base =
|
|
2320
|
+
const base = getBase(resolveOwnerDocument());
|
|
2249
2321
|
return isHydratingActive() ? claimNodes(base, () => base.cloneNode(true)) : base.cloneNode(true);
|
|
2250
2322
|
};
|
|
2251
2323
|
fn.cloneNode = fn;
|
|
@@ -2254,39 +2326,44 @@ function template(html, isImportNode, isSVG, isMathML) {
|
|
|
2254
2326
|
function isBindingHandle(node) {
|
|
2255
2327
|
return node !== null && typeof node === "object" && "marker" in node && "dispose" in node && typeof node.dispose === "function";
|
|
2256
2328
|
}
|
|
2257
|
-
function appendChildNode(parent, child, namespace) {
|
|
2329
|
+
function appendChildNode(parent, child, namespace, ownerDocument) {
|
|
2330
|
+
const parentOwnerDocument = _nullishCoalesce(parent.ownerDocument, () => ( ownerDocument));
|
|
2258
2331
|
if (child === null || child === void 0 || child === false) {
|
|
2259
2332
|
return;
|
|
2260
2333
|
}
|
|
2261
2334
|
if (isBindingHandle(child)) {
|
|
2262
|
-
appendChildNode(parent, child.marker, namespace);
|
|
2263
|
-
_optionalChain([child, 'access',
|
|
2335
|
+
appendChildNode(parent, child.marker, namespace, parentOwnerDocument);
|
|
2336
|
+
_optionalChain([child, 'access', _55 => _55.flush, 'optionalCall', _56 => _56()]);
|
|
2264
2337
|
return;
|
|
2265
2338
|
}
|
|
2266
2339
|
if (typeof child === "function") {
|
|
2267
2340
|
const childGetter = child;
|
|
2268
2341
|
if (isReactive(childGetter)) {
|
|
2269
|
-
createChildBinding(
|
|
2342
|
+
createChildBinding(
|
|
2343
|
+
parent,
|
|
2344
|
+
childGetter,
|
|
2345
|
+
(node) => createElementWithContext(node, namespace, parentOwnerDocument)
|
|
2346
|
+
);
|
|
2270
2347
|
return;
|
|
2271
2348
|
}
|
|
2272
2349
|
return;
|
|
2273
2350
|
}
|
|
2274
2351
|
if (Array.isArray(child)) {
|
|
2275
2352
|
for (const item of child) {
|
|
2276
|
-
appendChildNode(parent, item, namespace);
|
|
2353
|
+
appendChildNode(parent, item, namespace, parentOwnerDocument);
|
|
2277
2354
|
}
|
|
2278
2355
|
return;
|
|
2279
2356
|
}
|
|
2280
2357
|
let domNode;
|
|
2281
2358
|
if (typeof child !== "object" || child === null) {
|
|
2282
|
-
domNode =
|
|
2359
|
+
domNode = parentOwnerDocument.createTextNode(String(_nullishCoalesce(child, () => ( ""))));
|
|
2283
2360
|
} else {
|
|
2284
|
-
domNode = createElementWithContext(child, namespace);
|
|
2361
|
+
domNode = createElementWithContext(child, namespace, parentOwnerDocument);
|
|
2285
2362
|
}
|
|
2286
2363
|
if (domNode.nodeType === 11) {
|
|
2287
2364
|
const children = Array.from(domNode.childNodes);
|
|
2288
2365
|
for (const node of children) {
|
|
2289
|
-
appendChildNode(parent, node, namespace);
|
|
2366
|
+
appendChildNode(parent, node, namespace, parentOwnerDocument);
|
|
2290
2367
|
}
|
|
2291
2368
|
return;
|
|
2292
2369
|
}
|
|
@@ -2304,23 +2381,23 @@ function appendChildNode(parent, child, namespace) {
|
|
|
2304
2381
|
throw e;
|
|
2305
2382
|
}
|
|
2306
2383
|
}
|
|
2307
|
-
function appendChildren(parent, children, namespace) {
|
|
2384
|
+
function appendChildren(parent, children, namespace, ownerDocument) {
|
|
2308
2385
|
if (children === void 0) return;
|
|
2309
2386
|
if (Array.isArray(children)) {
|
|
2310
2387
|
for (const child of children) {
|
|
2311
|
-
appendChildren(parent, child, namespace);
|
|
2388
|
+
appendChildren(parent, child, namespace, ownerDocument);
|
|
2312
2389
|
}
|
|
2313
2390
|
return;
|
|
2314
2391
|
}
|
|
2315
|
-
appendChildNode(parent, children, namespace);
|
|
2392
|
+
appendChildNode(parent, children, namespace, ownerDocument);
|
|
2316
2393
|
}
|
|
2317
2394
|
function applyRef(el, value) {
|
|
2318
2395
|
if (typeof value === "function") {
|
|
2319
2396
|
const refFn = value;
|
|
2320
2397
|
refFn(el);
|
|
2321
|
-
const root =
|
|
2398
|
+
const root = _chunkQNMYVXRLcjs.getCurrentRoot.call(void 0, );
|
|
2322
2399
|
if (root) {
|
|
2323
|
-
|
|
2400
|
+
_chunkQNMYVXRLcjs.registerRootCleanup.call(void 0, () => {
|
|
2324
2401
|
refFn(null);
|
|
2325
2402
|
});
|
|
2326
2403
|
} else if (isDev2) {
|
|
@@ -2331,9 +2408,9 @@ function applyRef(el, value) {
|
|
|
2331
2408
|
} else if (value && typeof value === "object" && "current" in value) {
|
|
2332
2409
|
const refObj = value;
|
|
2333
2410
|
refObj.current = el;
|
|
2334
|
-
const root =
|
|
2411
|
+
const root = _chunkQNMYVXRLcjs.getCurrentRoot.call(void 0, );
|
|
2335
2412
|
if (root) {
|
|
2336
|
-
|
|
2413
|
+
_chunkQNMYVXRLcjs.registerRootCleanup.call(void 0, () => {
|
|
2337
2414
|
refObj.current = null;
|
|
2338
2415
|
});
|
|
2339
2416
|
} else if (isDev2) {
|
|
@@ -2407,7 +2484,7 @@ function applyProps(el, props, isSVG = false) {
|
|
|
2407
2484
|
}
|
|
2408
2485
|
continue;
|
|
2409
2486
|
}
|
|
2410
|
-
if (isDev2 &&
|
|
2487
|
+
if (isDev2 && _chunkQNMYVXRLcjs.ChildProperties.has(key) || key === "innerHTML" || key === "textContent" || key === "innerText" || key === "children") {
|
|
2411
2488
|
createAttributeBinding(el, key, value, setProperty);
|
|
2412
2489
|
continue;
|
|
2413
2490
|
}
|
|
@@ -2423,8 +2500,8 @@ function applyProps(el, props, isSVG = false) {
|
|
|
2423
2500
|
createAttributeBinding(el, key.slice(5), value, setProperty);
|
|
2424
2501
|
continue;
|
|
2425
2502
|
}
|
|
2426
|
-
const propAlias = !isSVG && isDev2 ?
|
|
2427
|
-
const isProperty = !isSVG ? isDev2 ?
|
|
2503
|
+
const propAlias = !isSVG && isDev2 ? _chunkQNMYVXRLcjs.getPropAlias.call(void 0, key, tagName) : void 0;
|
|
2504
|
+
const isProperty = !isSVG ? isDev2 ? _chunkQNMYVXRLcjs.Properties.has(key) : key in el : false;
|
|
2428
2505
|
if (propAlias || isProperty || isCE && !isSVG) {
|
|
2429
2506
|
const propName = propAlias || key;
|
|
2430
2507
|
if (isCE && !isProperty && !propAlias) {
|
|
@@ -2441,7 +2518,7 @@ function applyProps(el, props, isSVG = false) {
|
|
|
2441
2518
|
}
|
|
2442
2519
|
if (isSVG && key.indexOf(":") > -1) {
|
|
2443
2520
|
const [prefix, name] = key.split(":");
|
|
2444
|
-
const ns =
|
|
2521
|
+
const ns = _chunkQNMYVXRLcjs.SVGNamespace[prefix];
|
|
2445
2522
|
if (ns) {
|
|
2446
2523
|
createAttributeBinding(
|
|
2447
2524
|
el,
|
|
@@ -2584,4 +2661,4 @@ function eventNameFromProp(key) {
|
|
|
2584
2661
|
|
|
2585
2662
|
|
|
2586
2663
|
exports.startTransition = startTransition; exports.useTransition = useTransition; exports.useDeferredValue = useDeferredValue; exports.batch = batch2; exports.untrack = untrack2; exports.Fragment = Fragment; exports.withHydrationRange = withHydrationRange; exports.isHydratingActive = isHydratingActive; exports.toNodeArray = toNodeArray; exports.insertNodesBefore = insertNodesBefore; exports.removeNodes = removeNodes; exports.getSlotEnd = getSlotEnd; exports.resolvePath = resolvePath; exports.isReactive = isReactive; exports.nonReactive = nonReactive; exports.reactive = reactive; exports.unwrap = unwrap; exports.callEventHandler = callEventHandler; exports.createTextBinding = createTextBinding; exports.bindText = bindText; exports.setText = setText; exports.createAttributeBinding = createAttributeBinding; exports.bindAttribute = bindAttribute; exports.setAttr = setAttr; exports.bindProperty = bindProperty; exports.setProp = setProp; exports.createStyleBinding = createStyleBinding; exports.bindStyle = bindStyle; exports.setStyle = setStyle; exports.createClassBinding = createClassBinding; exports.bindClass = bindClass; exports.setClass = setClass; exports.classList = classList; exports.insert = insert; exports.insertBetween = insertBetween; exports.createChildBinding = createChildBinding; exports.delegateEvents = delegateEvents; exports.clearDelegatedEvents = clearDelegatedEvents; exports.addEventListener = addEventListener; exports.bindEvent = bindEvent; exports.bindRef = bindRef; exports.spread = spread; exports.assign = assign; exports.createConditional = createConditional; exports.createShow = createShow; exports.createPortal = createPortal; exports.__fictProp = __fictProp; exports.createPropsProxy = createPropsProxy; exports.__fictPropsRest = __fictPropsRest; exports.mergeProps = mergeProps; exports.keyed = keyed; exports.prop = prop; exports.render = render; exports.hydrateComponent = hydrateComponent; exports.createElement = createElement; exports.template = template;
|
|
2587
|
-
//# sourceMappingURL=chunk-
|
|
2664
|
+
//# sourceMappingURL=chunk-4QGEN5SJ.cjs.map
|