@jasonshimmy/custom-elements-runtime 3.7.2 → 3.7.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/dist/custom-elements-runtime.cjs.js +1 -1
- package/dist/custom-elements-runtime.es.js +3 -3
- package/dist/custom-elements-runtime.jit-css.cjs.js +1 -1
- package/dist/custom-elements-runtime.jit-css.es.js +2 -2
- package/dist/custom-elements-runtime.router.cjs.js +1 -1
- package/dist/custom-elements-runtime.router.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.router.es.js +3 -3
- package/dist/custom-elements-runtime.router.es.js.map +1 -1
- package/dist/custom-elements-runtime.ssr-middleware.cjs.js +1 -1
- package/dist/custom-elements-runtime.ssr-middleware.es.js +1 -1
- package/dist/custom-elements-runtime.ssr.cjs.js +1 -1
- package/dist/custom-elements-runtime.ssr.es.js +2 -2
- package/dist/custom-elements-runtime.vite-plugin.cjs.js +1 -1
- package/dist/custom-elements-runtime.vite-plugin.es.js +1 -1
- package/dist/helpers-BQ37xfhc.cjs +5 -0
- package/dist/helpers-BQ37xfhc.cjs.map +1 -0
- package/dist/{helpers-BiGdX-3A.js → helpers-llht6g11.js} +5 -2
- package/dist/helpers-llht6g11.js.map +1 -0
- package/dist/{hooks-yP009oF9.js → hooks-BZwRvrjJ.js} +146 -131
- package/dist/hooks-BZwRvrjJ.js.map +1 -0
- package/dist/hooks-DTyLoDNI.cjs +2 -0
- package/dist/hooks-DTyLoDNI.cjs.map +1 -0
- package/dist/runtime/hooks.d.ts +0 -13
- package/dist/runtime/reactive.d.ts +1 -0
- package/dist/{ssr-CUT0FqUz.cjs → ssr-DkMl-vjb.cjs} +2 -2
- package/dist/{ssr-CUT0FqUz.cjs.map → ssr-DkMl-vjb.cjs.map} +1 -1
- package/dist/{ssr-COmrqY64.js → ssr-WD-KTNsB.js} +3 -3
- package/dist/{ssr-COmrqY64.js.map → ssr-WD-KTNsB.js.map} +1 -1
- package/dist/{tag-utils-CMy95A4Z.cjs → tag-utils-BiaxgxbY.cjs} +2 -2
- package/dist/{tag-utils-CMy95A4Z.cjs.map → tag-utils-BiaxgxbY.cjs.map} +1 -1
- package/dist/{tag-utils-DVutXfzj.js → tag-utils-DMHsC8t3.js} +2 -2
- package/dist/{tag-utils-DVutXfzj.js.map → tag-utils-DMHsC8t3.js.map} +1 -1
- package/dist/{template-compiler-BkR0G45f.js → template-compiler-BpHiWIRk.js} +262 -252
- package/dist/template-compiler-BpHiWIRk.js.map +1 -0
- package/dist/template-compiler-CeeH0904.cjs +19 -0
- package/dist/template-compiler-CeeH0904.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/helpers-BiGdX-3A.js.map +0 -1
- package/dist/helpers-hGU9czPG.cjs +0 -5
- package/dist/helpers-hGU9czPG.cjs.map +0 -1
- package/dist/hooks-CACte2Ir.cjs +0 -2
- package/dist/hooks-CACte2Ir.cjs.map +0 -1
- package/dist/hooks-yP009oF9.js.map +0 -1
- package/dist/template-compiler-BkR0G45f.js.map +0 -1
- package/dist/template-compiler-EdgxOr6e.cjs +0 -19
- package/dist/template-compiler-EdgxOr6e.cjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as e, t } from "./logger-DIJ0UH3R.js";
|
|
2
2
|
import { a as n, i as r, n as i, o as a, r as o } from "./namespace-helpers-CIUkG8Mn.js";
|
|
3
|
-
import { C as s, O as c, S as l, T as u, _ as d, a as f, d as p, f as m, i as h, l as g, n as _, o as v, p as y, u as b, v as x, w as S } from "./helpers-
|
|
3
|
+
import { C as s, O as c, S as l, T as u, _ as d, a as f, d as p, f as m, i as h, l as g, n as _, o as v, p as y, u as b, v as x, w as S } from "./helpers-llht6g11.js";
|
|
4
4
|
import { a as C, d as w, f as T, i as E, n as ee, r as D, u as O } from "./css-utils-Bn-dO44e.js";
|
|
5
5
|
import { resetWhenCounter as te } from "./custom-elements-runtime.directives.es.js";
|
|
6
6
|
import { getTransitionStyleSheet as ne } from "./custom-elements-runtime.transitions.es.js";
|
|
7
|
-
import { t as
|
|
8
|
-
import { c as
|
|
7
|
+
import { t as k } from "./tag-utils-DMHsC8t3.js";
|
|
8
|
+
import { c as re, t as A } from "./hooks-BZwRvrjJ.js";
|
|
9
9
|
//#region src/lib/runtime/watchers.ts
|
|
10
|
-
function
|
|
10
|
+
function ie(e, n, r) {
|
|
11
11
|
if (r) for (let [i, a] of Object.entries(r)) {
|
|
12
12
|
let r, o = {};
|
|
13
13
|
if (Array.isArray(a) ? (r = a[0], o = a[1] || {}) : r = a, n.set(i, {
|
|
@@ -22,7 +22,7 @@ function ae(e, n, r) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function ae(e, n, r, i) {
|
|
26
26
|
let a = (e, t) => {
|
|
27
27
|
if (e === t) return !0;
|
|
28
28
|
if (typeof e != typeof t || typeof e != "object" || !e || t === null) return !1;
|
|
@@ -44,29 +44,38 @@ function oe(e, n, r, i) {
|
|
|
44
44
|
}
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region src/lib/runtime/props.ts
|
|
47
|
-
function
|
|
47
|
+
function oe(e, t) {
|
|
48
48
|
return t === Boolean ? e === "" || e === "true" : t === Number ? Number(e) : e;
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
var se = Symbol.for("@cer/usePropsState");
|
|
51
|
+
function ce(e) {
|
|
52
|
+
if (!e) return;
|
|
53
|
+
let t = e[se];
|
|
54
|
+
if (t) for (let [n, r] of t.entries()) try {
|
|
55
|
+
let t = e[n];
|
|
56
|
+
Object.is(r.peek(), t) || (r.value = t);
|
|
57
|
+
} catch {}
|
|
58
|
+
}
|
|
59
|
+
function le(e, t, n) {
|
|
51
60
|
if (t) for (let r in t) {
|
|
52
61
|
let i = t[r], a = y(r), o = e.getAttribute(a);
|
|
53
62
|
if (i.type === Function && typeof e[r] == "function") n[r] = e[r];
|
|
54
|
-
else if (o !== null) n[r] =
|
|
63
|
+
else if (o !== null) n[r] = oe(o, i.type);
|
|
55
64
|
else if (e[r] !== void 0) try {
|
|
56
65
|
let t = e[r];
|
|
57
66
|
if (i.type === String && t && typeof t == "object") try {
|
|
58
|
-
n[r] =
|
|
67
|
+
n[r] = oe(String(t), i.type);
|
|
59
68
|
} catch {
|
|
60
69
|
n[r] = t;
|
|
61
70
|
}
|
|
62
|
-
else i.type === Boolean && typeof t == "boolean" || i.type === Number && typeof t == "number" || i.type === Function && typeof t == "function" ? n[r] = t : n[r] =
|
|
71
|
+
else i.type === Boolean && typeof t == "boolean" || i.type === Number && typeof t == "number" || i.type === Function && typeof t == "function" ? n[r] = t : n[r] = oe(String(t), i.type);
|
|
63
72
|
} catch {
|
|
64
73
|
n[r] = e[r];
|
|
65
74
|
}
|
|
66
75
|
else "default" in i && i.default !== void 0 && (n[r] = i.default);
|
|
67
76
|
}
|
|
68
77
|
}
|
|
69
|
-
function
|
|
78
|
+
function ue(e, t, n) {
|
|
70
79
|
if (!t.props) {
|
|
71
80
|
try {
|
|
72
81
|
let t = n?._hookCallbacks?.props || {}, r = Array.from(new Set([...Object.keys(e || {}), ...Object.keys(t || {})]));
|
|
@@ -91,24 +100,25 @@ function le(e, t, n) {
|
|
|
91
100
|
} catch {}
|
|
92
101
|
}
|
|
93
102
|
} catch {}
|
|
103
|
+
ce(n);
|
|
94
104
|
return;
|
|
95
105
|
}
|
|
96
|
-
|
|
106
|
+
le(e, t.props, n), ce(n);
|
|
97
107
|
}
|
|
98
108
|
//#endregion
|
|
99
109
|
//#region src/lib/runtime/lifecycle.ts
|
|
100
|
-
function
|
|
110
|
+
function de(e, t, n, r) {
|
|
101
111
|
e.onConnected && !n && (e.onConnected(t), r(!0));
|
|
102
112
|
}
|
|
103
|
-
function
|
|
113
|
+
function fe(e, t, n, r, i, a, o, s) {
|
|
104
114
|
e.onDisconnected && e.onDisconnected(t), n.forEach((e) => e()), r(), i(), a(!1), o(null), s(!1);
|
|
105
115
|
}
|
|
106
|
-
function
|
|
116
|
+
function pe(e, t, n, r, i) {
|
|
107
117
|
e.onAttributeChanged && e.onAttributeChanged(t, n, r, i);
|
|
108
118
|
}
|
|
109
119
|
//#endregion
|
|
110
120
|
//#region src/lib/runtime/event-manager.ts
|
|
111
|
-
var
|
|
121
|
+
var j = class {
|
|
112
122
|
static cleanupFunctions = /* @__PURE__ */ new WeakMap();
|
|
113
123
|
static addListener(e, t, n, r) {
|
|
114
124
|
e.addEventListener(t, n, r);
|
|
@@ -161,7 +171,7 @@ var A = class {
|
|
|
161
171
|
options: e.options
|
|
162
172
|
})) : [];
|
|
163
173
|
}
|
|
164
|
-
},
|
|
174
|
+
}, me = class {
|
|
165
175
|
map = /* @__PURE__ */ new Map();
|
|
166
176
|
maxSize;
|
|
167
177
|
constructor(e) {
|
|
@@ -186,7 +196,7 @@ var A = class {
|
|
|
186
196
|
get size() {
|
|
187
197
|
return this.map.size;
|
|
188
198
|
}
|
|
189
|
-
},
|
|
199
|
+
}, he = new me((() => {
|
|
190
200
|
if (typeof navigator < "u" && "deviceMemory" in navigator) {
|
|
191
201
|
let e = navigator.deviceMemory;
|
|
192
202
|
if (e) return Math.min(1e3, Math.max(200, e * 100));
|
|
@@ -198,8 +208,8 @@ var A = class {
|
|
|
198
208
|
return !1;
|
|
199
209
|
}
|
|
200
210
|
})() ? 100 : 500;
|
|
201
|
-
})()),
|
|
202
|
-
static cache = new
|
|
211
|
+
})()), ge = new Set(/* @__PURE__ */ "true.false.null.undefined.typeof.instanceof.in.of.new.delete.void.throw.return.this.class.extends.import.export.from.as.async.await.yield.if.else.for.while.do.switch.case.break.continue.try.catch.finally.let.const.var.function.NaN.Infinity".split(".")), _e = class {
|
|
212
|
+
static cache = new me(1e3);
|
|
203
213
|
static dangerousPatterns = [
|
|
204
214
|
/constructor/i,
|
|
205
215
|
/prototype/i,
|
|
@@ -337,7 +347,7 @@ var A = class {
|
|
|
337
347
|
let o = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g, s, c = /* @__PURE__ */ new Set();
|
|
338
348
|
for (; (s = o.exec(n)) !== null;) {
|
|
339
349
|
let e = s[1];
|
|
340
|
-
if (
|
|
350
|
+
if (ge.has(e) || /^[0-9]+$/.test(e) || e === "ctx" || c.has(e)) continue;
|
|
341
351
|
c.add(e);
|
|
342
352
|
let i = h(t, e);
|
|
343
353
|
if (i === void 0) return;
|
|
@@ -594,10 +604,10 @@ var A = class {
|
|
|
594
604
|
};
|
|
595
605
|
//#endregion
|
|
596
606
|
//#region src/lib/runtime/vdom-model-helpers.ts
|
|
597
|
-
function
|
|
607
|
+
function M(e, t) {
|
|
598
608
|
return Array.isArray(e) && Array.isArray(t) ? JSON.stringify([...e].sort()) !== JSON.stringify([...t].sort()) : e !== t;
|
|
599
609
|
}
|
|
600
|
-
function
|
|
610
|
+
function ve(e, t, n, r, i) {
|
|
601
611
|
if (e) {
|
|
602
612
|
let e = t.value;
|
|
603
613
|
if (i && typeof e == "object" && e) {
|
|
@@ -606,13 +616,13 @@ function _e(e, t, n, r, i) {
|
|
|
606
616
|
} else t.value = n;
|
|
607
617
|
} else p(r._state || r, t, n);
|
|
608
618
|
}
|
|
609
|
-
function
|
|
619
|
+
function N(e, t, n, r) {
|
|
610
620
|
if (typeof e._requestRender == "function" && e._requestRender(), typeof e._triggerWatchers == "function") {
|
|
611
621
|
let i = t ? "reactiveState" : n;
|
|
612
622
|
e._triggerWatchers(i, r);
|
|
613
623
|
}
|
|
614
624
|
}
|
|
615
|
-
function
|
|
625
|
+
function ye(e, t, n) {
|
|
616
626
|
let r = `update:${y(t)}`, i = `update:${t}`, a = new CustomEvent(r, {
|
|
617
627
|
detail: n,
|
|
618
628
|
bubbles: !0,
|
|
@@ -624,7 +634,7 @@ function ve(e, t, n) {
|
|
|
624
634
|
});
|
|
625
635
|
e.dispatchEvent(a), e.dispatchEvent(o);
|
|
626
636
|
}
|
|
627
|
-
function
|
|
637
|
+
function be(e, t, n, i) {
|
|
628
638
|
let a = n;
|
|
629
639
|
if (g(() => {
|
|
630
640
|
if (typeof e.setAttribute == "function") try {
|
|
@@ -640,7 +650,7 @@ function ye(e, t, n, i) {
|
|
|
640
650
|
});
|
|
641
651
|
}
|
|
642
652
|
}
|
|
643
|
-
function
|
|
653
|
+
function xe(e, t, n, r) {
|
|
644
654
|
if (e) {
|
|
645
655
|
let e = t.value;
|
|
646
656
|
return r && typeof e == "object" && e ? e[r] : e;
|
|
@@ -648,33 +658,33 @@ function be(e, t, n, r) {
|
|
|
648
658
|
}
|
|
649
659
|
//#endregion
|
|
650
660
|
//#region src/lib/runtime/vdom-helpers.ts
|
|
651
|
-
function
|
|
661
|
+
function P(e) {
|
|
652
662
|
return typeof e == "object" && !!e && "value" in e;
|
|
653
663
|
}
|
|
654
|
-
function
|
|
664
|
+
function Se(e) {
|
|
655
665
|
return typeof e == "object" && e && "value" in e ? e.value : e;
|
|
656
666
|
}
|
|
657
|
-
function
|
|
667
|
+
function F(e, t, n) {
|
|
658
668
|
if (!e) return;
|
|
659
669
|
e.attrs ||= {};
|
|
660
670
|
let r = e.attrs;
|
|
661
671
|
r[t] = n;
|
|
662
672
|
}
|
|
663
|
-
function
|
|
673
|
+
function I(e) {
|
|
664
674
|
return e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement;
|
|
665
675
|
}
|
|
666
|
-
function
|
|
667
|
-
return typeof e == "object" && e && "value" in e ?
|
|
676
|
+
function L(e) {
|
|
677
|
+
return typeof e == "object" && e && "value" in e ? L(e.value) : !(typeof e == "object" && e || e === !1 || e === "false" || e == null || e === 0);
|
|
668
678
|
}
|
|
669
|
-
function
|
|
679
|
+
function Ce(e) {
|
|
670
680
|
return e.substring(2, 3).toLowerCase() + e.substring(3);
|
|
671
681
|
}
|
|
672
|
-
function
|
|
682
|
+
function we(e) {
|
|
673
683
|
return typeof e == "boolean" || e === "true" || e === "false";
|
|
674
684
|
}
|
|
675
685
|
//#endregion
|
|
676
686
|
//#region src/lib/runtime/vdom-directives.ts
|
|
677
|
-
function
|
|
687
|
+
function Te(e, t, n, r, i, a, o, s) {
|
|
678
688
|
if (!a) return;
|
|
679
689
|
let c = t.includes("lazy"), l = t.includes("trim"), u = t.includes("number"), f = () => {
|
|
680
690
|
if (d(e)) {
|
|
@@ -731,10 +741,10 @@ function we(e, t, n, r, i, a, o, s) {
|
|
|
731
741
|
isNaN(e) || (c = e);
|
|
732
742
|
}
|
|
733
743
|
let p = f();
|
|
734
|
-
if (
|
|
744
|
+
if (M(c, p)) {
|
|
735
745
|
o._modelUpdating = !0;
|
|
736
746
|
try {
|
|
737
|
-
|
|
747
|
+
ve(d(e), e, c, a, s), N(a, d(e), e, c), o && ye(o, v, c);
|
|
738
748
|
} finally {
|
|
739
749
|
queueMicrotask(() => o._modelUpdating = !1);
|
|
740
750
|
}
|
|
@@ -743,18 +753,18 @@ function we(e, t, n, r, i, a, o, s) {
|
|
|
743
753
|
if (_) {
|
|
744
754
|
if (i[b]) {
|
|
745
755
|
let e = i[b];
|
|
746
|
-
o &&
|
|
756
|
+
o && j.removeListener(o, b, e);
|
|
747
757
|
}
|
|
748
758
|
i[b] = x;
|
|
749
759
|
} else {
|
|
750
760
|
let t = `update:${y(v)}`, n = `update:${v}`;
|
|
751
761
|
if (i[t]) {
|
|
752
762
|
let e = i[t];
|
|
753
|
-
o &&
|
|
763
|
+
o && j.removeListener(o, t, e);
|
|
754
764
|
}
|
|
755
765
|
if (i[n]) {
|
|
756
766
|
let e = i[n];
|
|
757
|
-
o &&
|
|
767
|
+
o && j.removeListener(o, n, e);
|
|
758
768
|
}
|
|
759
769
|
if (i[t] = (t) => {
|
|
760
770
|
let n = t.detail, r = n === void 0 ? void 0 : n;
|
|
@@ -766,11 +776,11 @@ function we(e, t, n, r, i, a, o, s) {
|
|
|
766
776
|
r = void 0;
|
|
767
777
|
}
|
|
768
778
|
}
|
|
769
|
-
let i =
|
|
770
|
-
if (
|
|
771
|
-
|
|
779
|
+
let i = xe(d(e), e, a, s);
|
|
780
|
+
if (M(r, i)) {
|
|
781
|
+
ve(d(e), e, r, a, s), N(a, d(e), e, r);
|
|
772
782
|
let n = t.target;
|
|
773
|
-
n &&
|
|
783
|
+
n && be(n, v, d(e) ? e : r, d(e));
|
|
774
784
|
}
|
|
775
785
|
}, d(e) && typeof e.value == "object" && e.value !== null) {
|
|
776
786
|
let r;
|
|
@@ -780,19 +790,19 @@ function we(e, t, n, r, i, a, o, s) {
|
|
|
780
790
|
r = Object.keys(e.value);
|
|
781
791
|
}
|
|
782
792
|
let s = r.filter((e) => typeof e == "string" && !String(e).startsWith("_") && e !== "constructor"), c = new Set(s.map((e) => `update:${y(e)}`));
|
|
783
|
-
for (let e of Object.keys(i)) e.startsWith("update:") && e !== t && e !== n && !c.has(e) && (o &&
|
|
793
|
+
for (let e of Object.keys(i)) e.startsWith("update:") && e !== t && e !== n && !c.has(e) && (o && j.removeListener(o, e, i[e]), delete i[e]);
|
|
784
794
|
for (let n of s) {
|
|
785
795
|
let r = String(n), s = `update:${y(r)}`, c = `update:${r}`;
|
|
786
|
-
s !== t && (i[s] && o && (
|
|
796
|
+
s !== t && (i[s] && o && (j.removeListener(o, s, i[s]), delete i[s]), i[s] = (t) => {
|
|
787
797
|
let n = t.detail === void 0 ? t.target?.value : t.detail;
|
|
788
|
-
if (!
|
|
798
|
+
if (!M(n, d(e) ? e.value[r] : h(a?._state || a, e))) return;
|
|
789
799
|
if (d(e)) {
|
|
790
800
|
let t = { ...e.value };
|
|
791
801
|
t[r] = n, e.value = t;
|
|
792
802
|
} else p(a?._state || a, e, n);
|
|
793
|
-
|
|
803
|
+
N(a, d(e), e, n);
|
|
794
804
|
let i = t.currentTarget || o || t.target;
|
|
795
|
-
i &&
|
|
805
|
+
i && be(i, v, d(e) ? e : n, d(e));
|
|
796
806
|
}, i[c] = i[s]);
|
|
797
807
|
}
|
|
798
808
|
}
|
|
@@ -807,10 +817,10 @@ function we(e, t, n, r, i, a, o, s) {
|
|
|
807
817
|
let e = Number(o);
|
|
808
818
|
isNaN(e) || (o = e);
|
|
809
819
|
}
|
|
810
|
-
if (
|
|
820
|
+
if (M(o, i)) {
|
|
811
821
|
n._modelUpdating = !0;
|
|
812
822
|
try {
|
|
813
|
-
p(r, e, o),
|
|
823
|
+
p(r, e, o), N(a, d(e), e, o);
|
|
814
824
|
} finally {
|
|
815
825
|
queueMicrotask(() => n._modelUpdating = !1);
|
|
816
826
|
}
|
|
@@ -818,9 +828,9 @@ function we(e, t, n, r, i, a, o, s) {
|
|
|
818
828
|
});
|
|
819
829
|
});
|
|
820
830
|
}
|
|
821
|
-
function
|
|
831
|
+
function Ee(e, t, n, r, i) {
|
|
822
832
|
if (typeof e == "object" && e) for (let [r, a] of Object.entries(e)) if (r.startsWith("data-") || r.startsWith("aria-") || r === "class") n[r] = a;
|
|
823
|
-
else if (r === "disabled" && i &&
|
|
833
|
+
else if (r === "disabled" && i && I(i)) {
|
|
824
834
|
let e = a && typeof a == "object" && "value" in a;
|
|
825
835
|
(() => {
|
|
826
836
|
try {
|
|
@@ -833,10 +843,10 @@ function Te(e, t, n, r, i) {
|
|
|
833
843
|
else if (typeof e == "string") {
|
|
834
844
|
if (!r) return;
|
|
835
845
|
try {
|
|
836
|
-
let a =
|
|
846
|
+
let a = R(e, r);
|
|
837
847
|
if (typeof a == "object" && a) {
|
|
838
848
|
for (let [e, r] of Object.entries(a)) if (e.startsWith("data-") || e.startsWith("aria-") || e === "class") n[e] = r;
|
|
839
|
-
else if (e === "disabled" && i &&
|
|
849
|
+
else if (e === "disabled" && i && I(i)) {
|
|
840
850
|
let i = r && typeof r == "object" && "value" in r;
|
|
841
851
|
(() => {
|
|
842
852
|
try {
|
|
@@ -856,11 +866,11 @@ function Te(e, t, n, r, i) {
|
|
|
856
866
|
}
|
|
857
867
|
}
|
|
858
868
|
}
|
|
859
|
-
function
|
|
869
|
+
function De(e, t, n) {
|
|
860
870
|
let r;
|
|
861
871
|
if (typeof e == "string") {
|
|
862
872
|
if (!n) return;
|
|
863
|
-
r =
|
|
873
|
+
r = R(e, n);
|
|
864
874
|
} else r = e;
|
|
865
875
|
let i = String(t.style || ""), a = i;
|
|
866
876
|
if (!r) if (i) {
|
|
@@ -873,14 +883,14 @@ function Ee(e, t, n) {
|
|
|
873
883
|
}
|
|
874
884
|
a !== i && (a ? t.style = a : t.style = void 0);
|
|
875
885
|
}
|
|
876
|
-
function
|
|
877
|
-
return
|
|
886
|
+
function R(e, t) {
|
|
887
|
+
return _e.evaluate(e, t);
|
|
878
888
|
}
|
|
879
|
-
function
|
|
889
|
+
function Oe(e, t, n, r) {
|
|
880
890
|
let i;
|
|
881
891
|
if (typeof e == "string") {
|
|
882
892
|
if (!n) return;
|
|
883
|
-
i =
|
|
893
|
+
i = R(e, n);
|
|
884
894
|
} else i = e;
|
|
885
895
|
try {
|
|
886
896
|
if (i && typeof i == "object") {
|
|
@@ -898,11 +908,11 @@ function De(e, t, n, r) {
|
|
|
898
908
|
let o = a.join(" "), s = r && r.class || t.class || "", c = s ? `${s} ${o}`.trim() : o.trim();
|
|
899
909
|
c ? t.class = c : t.class = void 0;
|
|
900
910
|
}
|
|
901
|
-
function
|
|
911
|
+
function ke(e, t, n) {
|
|
902
912
|
let r;
|
|
903
913
|
if (typeof e == "string") {
|
|
904
914
|
if (!n) return;
|
|
905
|
-
r =
|
|
915
|
+
r = R(e, n);
|
|
906
916
|
} else r = e;
|
|
907
917
|
let i = "";
|
|
908
918
|
if (typeof r == "string") i = r;
|
|
@@ -942,40 +952,40 @@ function Oe(e, t, n) {
|
|
|
942
952
|
let a = String(t.style || "");
|
|
943
953
|
t.style = a + (a && !a.endsWith(";") ? "; " : "") + i;
|
|
944
954
|
}
|
|
945
|
-
function
|
|
955
|
+
function Ae(e, t, n) {
|
|
946
956
|
let r = e;
|
|
947
|
-
typeof e == "string" && n && (r =
|
|
957
|
+
typeof e == "string" && n && (r = R(e, n)), d(r) ? t.reactiveRef = r : t.ref = r;
|
|
948
958
|
}
|
|
949
|
-
function
|
|
959
|
+
function je(e, t, n, r) {
|
|
950
960
|
let i = {}, a = { ...r || {} }, o = {};
|
|
951
961
|
for (let [s, c] of Object.entries(e)) {
|
|
952
962
|
let { value: e, modifiers: l, arg: u } = c;
|
|
953
963
|
if (s === "model" || s.startsWith("model:")) {
|
|
954
964
|
let r = s.split(":");
|
|
955
|
-
|
|
965
|
+
Te(e, l, i, a, o, t, n, r.length > 1 ? r[1] : u);
|
|
956
966
|
continue;
|
|
957
967
|
}
|
|
958
968
|
switch (s) {
|
|
959
969
|
case "bind":
|
|
960
|
-
|
|
970
|
+
Ee(e, i, a, t, n);
|
|
961
971
|
break;
|
|
962
972
|
case "show":
|
|
963
|
-
|
|
973
|
+
De(e, a, t);
|
|
964
974
|
break;
|
|
965
975
|
case "class":
|
|
966
|
-
|
|
976
|
+
Oe(e, a, t, r);
|
|
967
977
|
break;
|
|
968
978
|
case "style":
|
|
969
|
-
|
|
979
|
+
ke(e, a, t);
|
|
970
980
|
break;
|
|
971
981
|
case "ref":
|
|
972
|
-
|
|
982
|
+
Ae(e, i, t);
|
|
973
983
|
break;
|
|
974
984
|
case "when": break;
|
|
975
985
|
}
|
|
976
986
|
}
|
|
977
987
|
try {
|
|
978
|
-
if (Object.prototype.hasOwnProperty.call(i, "disabled") && n &&
|
|
988
|
+
if (Object.prototype.hasOwnProperty.call(i, "disabled") && n && I(n)) {
|
|
979
989
|
let e = i.disabled, t = e && typeof e == "object" && "value" in e, n = !1;
|
|
980
990
|
try {
|
|
981
991
|
n = d(e);
|
|
@@ -993,29 +1003,29 @@ function Ae(e, t, n, r) {
|
|
|
993
1003
|
}
|
|
994
1004
|
//#endregion
|
|
995
1005
|
//#region src/lib/runtime/transition-utils.ts
|
|
996
|
-
function
|
|
1006
|
+
function z(e) {
|
|
997
1007
|
return e ? e.split(/\s+/).filter(Boolean) : [];
|
|
998
1008
|
}
|
|
999
|
-
function
|
|
1009
|
+
function B(e, t) {
|
|
1000
1010
|
if (t.length === 0) return;
|
|
1001
1011
|
let n = t.filter((t) => t && !e.classList.contains(t));
|
|
1002
1012
|
n.length > 0 && e.classList.add(...n);
|
|
1003
1013
|
}
|
|
1004
|
-
function
|
|
1014
|
+
function V(e, t) {
|
|
1005
1015
|
if (t.length === 0) return;
|
|
1006
1016
|
let n = t.filter(Boolean);
|
|
1007
1017
|
n.length > 0 && e.classList.remove(...n);
|
|
1008
1018
|
}
|
|
1009
|
-
function
|
|
1019
|
+
function Me(e) {
|
|
1010
1020
|
let t = window.getComputedStyle(e), n = t.transitionDuration || "0s", r = t.transitionDelay || "0s", i = (e) => {
|
|
1011
1021
|
let t = parseFloat(e);
|
|
1012
1022
|
return e.includes("ms") ? t : t * 1e3;
|
|
1013
1023
|
};
|
|
1014
1024
|
return i(n) + i(r);
|
|
1015
1025
|
}
|
|
1016
|
-
function
|
|
1026
|
+
function Ne(e, t) {
|
|
1017
1027
|
return new Promise((n) => {
|
|
1018
|
-
let r = t ??
|
|
1028
|
+
let r = t ?? Me(e);
|
|
1019
1029
|
if (r <= 0) {
|
|
1020
1030
|
n();
|
|
1021
1031
|
return;
|
|
@@ -1026,7 +1036,7 @@ function Me(e, t) {
|
|
|
1026
1036
|
e.addEventListener("transitionend", o), e.addEventListener("transitioncancel", o), setTimeout(a, r + 50);
|
|
1027
1037
|
});
|
|
1028
1038
|
}
|
|
1029
|
-
async function
|
|
1039
|
+
async function H(e, n) {
|
|
1030
1040
|
let { classes: r, hooks: i, css: a, duration: o } = n;
|
|
1031
1041
|
if (i?.onBeforeEnter) try {
|
|
1032
1042
|
i.onBeforeEnter(e);
|
|
@@ -1044,8 +1054,8 @@ async function V(e, n) {
|
|
|
1044
1054
|
n();
|
|
1045
1055
|
}) : n();
|
|
1046
1056
|
}) : void 0;
|
|
1047
|
-
let s =
|
|
1048
|
-
|
|
1057
|
+
let s = z(r?.enterFrom), c = z(r?.enterActive), l = z(r?.enterTo);
|
|
1058
|
+
B(e, s), e.offsetHeight, B(e, c), e.offsetHeight;
|
|
1049
1059
|
let u;
|
|
1050
1060
|
if (i?.onEnter) {
|
|
1051
1061
|
let n = new Promise((e) => {
|
|
@@ -1061,15 +1071,15 @@ async function V(e, n) {
|
|
|
1061
1071
|
}
|
|
1062
1072
|
u && await n;
|
|
1063
1073
|
}
|
|
1064
|
-
await new Promise((e) => requestAnimationFrame(() => e())), e.offsetHeight,
|
|
1074
|
+
await new Promise((e) => requestAnimationFrame(() => e())), e.offsetHeight, V(e, s), B(e, l), e.offsetHeight, await new Promise((e) => requestAnimationFrame(() => e()));
|
|
1065
1075
|
let d;
|
|
1066
|
-
if (typeof o == "number" ? d = o : o && typeof o == "object" && "enter" in o && (d = o.enter), await
|
|
1076
|
+
if (typeof o == "number" ? d = o : o && typeof o == "object" && "enter" in o && (d = o.enter), await Ne(e, d), V(e, c), i?.onAfterEnter) try {
|
|
1067
1077
|
i.onAfterEnter(e);
|
|
1068
1078
|
} catch (e) {
|
|
1069
1079
|
t("Transition onAfterEnter error:", e);
|
|
1070
1080
|
}
|
|
1071
1081
|
}
|
|
1072
|
-
async function
|
|
1082
|
+
async function Pe(e, n) {
|
|
1073
1083
|
let { classes: r, hooks: i, css: a, duration: o } = n;
|
|
1074
1084
|
if (i?.onBeforeLeave) try {
|
|
1075
1085
|
i.onBeforeLeave(e);
|
|
@@ -1087,8 +1097,8 @@ async function Ne(e, n) {
|
|
|
1087
1097
|
n();
|
|
1088
1098
|
}) : n();
|
|
1089
1099
|
}) : void 0;
|
|
1090
|
-
let s =
|
|
1091
|
-
|
|
1100
|
+
let s = z(r?.leaveFrom), c = z(r?.leaveActive), l = z(r?.leaveTo);
|
|
1101
|
+
B(e, s), e.offsetHeight, B(e, c);
|
|
1092
1102
|
let u;
|
|
1093
1103
|
if (i?.onLeave) {
|
|
1094
1104
|
let n = new Promise((e) => {
|
|
@@ -1104,9 +1114,9 @@ async function Ne(e, n) {
|
|
|
1104
1114
|
}
|
|
1105
1115
|
u && await n;
|
|
1106
1116
|
}
|
|
1107
|
-
await new Promise((e) => requestAnimationFrame(() => e())),
|
|
1117
|
+
await new Promise((e) => requestAnimationFrame(() => e())), V(e, s), B(e, l);
|
|
1108
1118
|
let d;
|
|
1109
|
-
if (typeof o == "number" ? d = o : o && typeof o == "object" && "leave" in o && (d = o.leave), await
|
|
1119
|
+
if (typeof o == "number" ? d = o : o && typeof o == "object" && "leave" in o && (d = o.leave), await Ne(e, d), V(e, c), V(e, l), V(e, s), i?.onAfterLeave) try {
|
|
1110
1120
|
i.onAfterLeave(e);
|
|
1111
1121
|
} catch (e) {
|
|
1112
1122
|
t("Transition onAfterLeave error:", e);
|
|
@@ -1114,10 +1124,10 @@ async function Ne(e, n) {
|
|
|
1114
1124
|
}
|
|
1115
1125
|
//#endregion
|
|
1116
1126
|
//#region src/lib/runtime/node-metadata.ts
|
|
1117
|
-
var
|
|
1118
|
-
function
|
|
1127
|
+
var Fe = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap();
|
|
1128
|
+
function U(e) {
|
|
1119
1129
|
if (!e) return;
|
|
1120
|
-
let t =
|
|
1130
|
+
let t = Fe.get(e);
|
|
1121
1131
|
if (t !== void 0) return t;
|
|
1122
1132
|
try {
|
|
1123
1133
|
let t = e;
|
|
@@ -1128,9 +1138,9 @@ function H(e) {
|
|
|
1128
1138
|
if (t) return t;
|
|
1129
1139
|
}
|
|
1130
1140
|
}
|
|
1131
|
-
function
|
|
1141
|
+
function W(e, t) {
|
|
1132
1142
|
try {
|
|
1133
|
-
|
|
1143
|
+
Fe.set(e, t);
|
|
1134
1144
|
} catch {}
|
|
1135
1145
|
try {
|
|
1136
1146
|
e.key = t;
|
|
@@ -1142,18 +1152,18 @@ function U(e, t) {
|
|
|
1142
1152
|
}
|
|
1143
1153
|
} catch {}
|
|
1144
1154
|
}
|
|
1145
|
-
function
|
|
1155
|
+
function Le(e) {
|
|
1146
1156
|
if (!e) return;
|
|
1147
|
-
let t =
|
|
1157
|
+
let t = Ie.get(e);
|
|
1148
1158
|
if (t !== void 0) return t;
|
|
1149
1159
|
try {
|
|
1150
1160
|
let t = e;
|
|
1151
1161
|
if (t && t._transitionGroup != null) return t._transitionGroup;
|
|
1152
1162
|
} catch {}
|
|
1153
1163
|
}
|
|
1154
|
-
function
|
|
1164
|
+
function Re(e, t) {
|
|
1155
1165
|
try {
|
|
1156
|
-
|
|
1166
|
+
Ie.set(e, t);
|
|
1157
1167
|
} catch {}
|
|
1158
1168
|
try {
|
|
1159
1169
|
e._transitionGroup = t;
|
|
@@ -1161,11 +1171,11 @@ function Le(e, t) {
|
|
|
1161
1171
|
}
|
|
1162
1172
|
//#endregion
|
|
1163
1173
|
//#region src/lib/runtime/vdom-patch.ts
|
|
1164
|
-
var
|
|
1174
|
+
var ze = /* @__PURE__ */ new WeakMap();
|
|
1165
1175
|
function G(e, t) {
|
|
1166
1176
|
if (t) {
|
|
1167
1177
|
if (e instanceof Element) {
|
|
1168
|
-
|
|
1178
|
+
j.cleanup(e);
|
|
1169
1179
|
let n = [];
|
|
1170
1180
|
for (let r in t) t[r] === e && n.push(r);
|
|
1171
1181
|
for (let e of n) delete t[e];
|
|
@@ -1192,7 +1202,7 @@ function K(e, t, n) {
|
|
|
1192
1202
|
n[e] = t;
|
|
1193
1203
|
} catch {}
|
|
1194
1204
|
}
|
|
1195
|
-
function
|
|
1205
|
+
function Be(e, t) {
|
|
1196
1206
|
if (Array.isArray(e)) {
|
|
1197
1207
|
let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
|
|
1198
1208
|
return e.map((e) => {
|
|
@@ -1217,7 +1227,7 @@ function Re(e, t) {
|
|
|
1217
1227
|
}
|
|
1218
1228
|
r.set(i, (r.get(i) ?? 0) + 1), n.add(a);
|
|
1219
1229
|
let o = e.children;
|
|
1220
|
-
return Array.isArray(o) && (o =
|
|
1230
|
+
return Array.isArray(o) && (o = Be(o, a)), {
|
|
1221
1231
|
...e,
|
|
1222
1232
|
key: a,
|
|
1223
1233
|
children: o
|
|
@@ -1225,14 +1235,14 @@ function Re(e, t) {
|
|
|
1225
1235
|
});
|
|
1226
1236
|
}
|
|
1227
1237
|
let n = e, r = n.props?.key ?? n.key ?? t, i = n.children;
|
|
1228
|
-
return Array.isArray(i) && (i =
|
|
1238
|
+
return Array.isArray(i) && (i = Be(i, r)), {
|
|
1229
1239
|
...n,
|
|
1230
1240
|
key: r,
|
|
1231
1241
|
children: i
|
|
1232
1242
|
};
|
|
1233
1243
|
}
|
|
1234
|
-
function
|
|
1235
|
-
let a = n.directives ?? {}, s = n.attrs ? { ...n.attrs } : {}, c =
|
|
1244
|
+
function Ve(e, t, n, i) {
|
|
1245
|
+
let a = n.directives ?? {}, s = n.attrs ? { ...n.attrs } : {}, c = je(a, i, e, s), l = {
|
|
1236
1246
|
...t.props || {},
|
|
1237
1247
|
...n.props || {},
|
|
1238
1248
|
...c.props || {}
|
|
@@ -1245,16 +1255,16 @@ function ze(e, t, n, i) {
|
|
|
1245
1255
|
for (let r of y) {
|
|
1246
1256
|
let i = p[r], a = h[r], s = i, c = a;
|
|
1247
1257
|
if (g(() => {
|
|
1248
|
-
d(i) ? s = i.peek() :
|
|
1258
|
+
d(i) ? s = i.peek() : P(i) && (s = i.value);
|
|
1249
1259
|
}), g(() => {
|
|
1250
|
-
d(a) ? c = a.peek() :
|
|
1260
|
+
d(a) ? c = a.peek() : P(a) && (c = a.value);
|
|
1251
1261
|
}), !(i === a && s === c)) if (v = !0, r === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement)) {
|
|
1252
|
-
let t =
|
|
1262
|
+
let t = Se(a), n = t == null ? "" : String(t);
|
|
1253
1263
|
e.value !== n && (e.value = n);
|
|
1254
|
-
} else if (r === "checked" && e instanceof HTMLInputElement) e.checked = !!
|
|
1264
|
+
} else if (r === "checked" && e instanceof HTMLInputElement) e.checked = !!Se(a);
|
|
1255
1265
|
else if (r.startsWith("on") && typeof a == "function") {
|
|
1256
|
-
let t =
|
|
1257
|
-
typeof i == "function" &&
|
|
1266
|
+
let t = Ce(r);
|
|
1267
|
+
typeof i == "function" && j.removeListener(e, t, i), typeof a == "function" && j.addListener(e, t, a);
|
|
1258
1268
|
try {
|
|
1259
1269
|
if (t && t.startsWith("update:")) {
|
|
1260
1270
|
let n = t.split(":", 2)[1], r = h[n], i = [];
|
|
@@ -1278,7 +1288,7 @@ function ze(e, t, n, i) {
|
|
|
1278
1288
|
} catch {}
|
|
1279
1289
|
};
|
|
1280
1290
|
g(() => {
|
|
1281
|
-
|
|
1291
|
+
j.addListener(e, i, o);
|
|
1282
1292
|
});
|
|
1283
1293
|
}
|
|
1284
1294
|
}
|
|
@@ -1287,15 +1297,15 @@ function ze(e, t, n, i) {
|
|
|
1287
1297
|
else {
|
|
1288
1298
|
let i = n?.isCustomElement ?? t?.isCustomElement ?? !1;
|
|
1289
1299
|
if (i || r in e) try {
|
|
1290
|
-
e[r] = a, r === "disabled" && a === !1 && !i &&
|
|
1300
|
+
e[r] = a, r === "disabled" && a === !1 && !i && I(e) && o(e, "disabled");
|
|
1291
1301
|
} catch {}
|
|
1292
1302
|
else a === !1 && o(e, r);
|
|
1293
1303
|
}
|
|
1294
1304
|
}
|
|
1295
|
-
let x = c.listeners ?? {}, S =
|
|
1296
|
-
for (let [t, n] of Object.entries(S))
|
|
1297
|
-
for (let [t, n] of Object.entries(x))
|
|
1298
|
-
Object.keys(x).length > 0 ?
|
|
1305
|
+
let x = c.listeners ?? {}, S = ze.get(e) ?? {};
|
|
1306
|
+
for (let [t, n] of Object.entries(S)) j.removeListener(e, t, n);
|
|
1307
|
+
for (let [t, n] of Object.entries(x)) j.addListener(e, t, n);
|
|
1308
|
+
Object.keys(x).length > 0 ? ze.set(e, x) : ze.delete(e);
|
|
1299
1309
|
let C = { ...t.attrs ?? {} }, w = u, T = c && c.attrs || {};
|
|
1300
1310
|
if (Object.prototype.hasOwnProperty.call(T, "class") && typeof e.getAttribute == "function") {
|
|
1301
1311
|
let t = e.getAttribute("class");
|
|
@@ -1330,13 +1340,13 @@ function ze(e, t, n, i) {
|
|
|
1330
1340
|
let i = C[n], a = w[n], s = i, c = a;
|
|
1331
1341
|
if (d(i) && (s = i.peek()), d(a) && (c = a.peek()), s !== c) if (v = !0, c == null || c === !1) g(() => {
|
|
1332
1342
|
o(e, n);
|
|
1333
|
-
}),
|
|
1343
|
+
}), F(t, n, void 0), n === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? g(() => {
|
|
1334
1344
|
e.value = "";
|
|
1335
1345
|
}) : e instanceof HTMLProgressElement && g(() => {
|
|
1336
1346
|
e.value = 0;
|
|
1337
1347
|
})), n === "checked" && e instanceof HTMLInputElement && g(() => {
|
|
1338
1348
|
e.checked = !1;
|
|
1339
|
-
}), n === "disabled" &&
|
|
1349
|
+
}), n === "disabled" && I(e) && g(() => {
|
|
1340
1350
|
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = !1);
|
|
1341
1351
|
});
|
|
1342
1352
|
else {
|
|
@@ -1366,19 +1376,19 @@ function ze(e, t, n, i) {
|
|
|
1366
1376
|
}
|
|
1367
1377
|
if (n === "style") {
|
|
1368
1378
|
let i = b(c);
|
|
1369
|
-
i !== null && r(e, n, String(i)),
|
|
1379
|
+
i !== null && r(e, n, String(i)), F(t, n, c);
|
|
1370
1380
|
continue;
|
|
1371
1381
|
}
|
|
1372
1382
|
if (n === "class") {
|
|
1373
1383
|
let i = b(c);
|
|
1374
|
-
i !== null && r(e, n, String(i)),
|
|
1384
|
+
i !== null && r(e, n, String(i)), F(t, n, c);
|
|
1375
1385
|
continue;
|
|
1376
1386
|
}
|
|
1377
|
-
if (n === "disabled" &&
|
|
1387
|
+
if (n === "disabled" && I(e)) {
|
|
1378
1388
|
g(() => {
|
|
1379
|
-
let t =
|
|
1389
|
+
let t = L(c);
|
|
1380
1390
|
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = t);
|
|
1381
|
-
}),
|
|
1391
|
+
}), L(c) ? g(() => {
|
|
1382
1392
|
r(e, n, "");
|
|
1383
1393
|
}) : g(() => {
|
|
1384
1394
|
o(e, n);
|
|
@@ -1392,13 +1402,13 @@ function ze(e, t, n, i) {
|
|
|
1392
1402
|
try {
|
|
1393
1403
|
r(e, n, String(i));
|
|
1394
1404
|
} catch {}
|
|
1395
|
-
|
|
1405
|
+
F(t, n, c);
|
|
1396
1406
|
}
|
|
1397
1407
|
} else {
|
|
1398
1408
|
let i = m(n);
|
|
1399
1409
|
try {
|
|
1400
1410
|
let r = e;
|
|
1401
|
-
r[i] = d(a) ? a : c,
|
|
1411
|
+
r[i] = d(a) ? a : c, F(t, n, c);
|
|
1402
1412
|
} catch {
|
|
1403
1413
|
let t = b(a ?? c);
|
|
1404
1414
|
t !== null && r(e, n, String(t));
|
|
@@ -1406,31 +1416,31 @@ function ze(e, t, n, i) {
|
|
|
1406
1416
|
}
|
|
1407
1417
|
else if (!i && n in e) try {
|
|
1408
1418
|
let r = e;
|
|
1409
|
-
r[n] = d(a) ? a : c,
|
|
1419
|
+
r[n] = d(a) ? a : c, F(t, n, c);
|
|
1410
1420
|
} catch {
|
|
1411
1421
|
let i = b(c);
|
|
1412
|
-
i !== null && (r(e, n, String(i)),
|
|
1422
|
+
i !== null && (r(e, n, String(i)), F(t, n, c));
|
|
1413
1423
|
}
|
|
1414
1424
|
else {
|
|
1415
1425
|
let i = b(c);
|
|
1416
|
-
i !== null && (r(e, n, String(i)),
|
|
1426
|
+
i !== null && (r(e, n, String(i)), F(t, n, c));
|
|
1417
1427
|
}
|
|
1418
1428
|
}
|
|
1419
1429
|
}
|
|
1420
1430
|
try {
|
|
1421
|
-
if (
|
|
1431
|
+
if (I(e)) {
|
|
1422
1432
|
let t = l.disabled, n;
|
|
1423
1433
|
try {
|
|
1424
1434
|
let e = Object.prototype.hasOwnProperty.call(c.props || {}, "disabled"), r = t && typeof t == "object" && "value" in t, i = !1;
|
|
1425
1435
|
g(() => {
|
|
1426
1436
|
i = !!d(t);
|
|
1427
1437
|
});
|
|
1428
|
-
let a =
|
|
1438
|
+
let a = we(t);
|
|
1429
1439
|
n = i || r || e || a ? t : u.disabled;
|
|
1430
1440
|
} catch {
|
|
1431
1441
|
n = u.disabled;
|
|
1432
1442
|
}
|
|
1433
|
-
let i =
|
|
1443
|
+
let i = L(n);
|
|
1434
1444
|
g(() => {
|
|
1435
1445
|
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = i);
|
|
1436
1446
|
}), g(i ? () => {
|
|
@@ -1453,7 +1463,7 @@ function q(t, n, a, s = null) {
|
|
|
1453
1463
|
if (typeof t == "string") return document.createTextNode(t);
|
|
1454
1464
|
if (t.tag === "#text") {
|
|
1455
1465
|
let e = document.createTextNode(typeof t.children == "string" ? t.children : "");
|
|
1456
|
-
return t.key != null &&
|
|
1466
|
+
return t.key != null && W(e, t.key), e;
|
|
1457
1467
|
}
|
|
1458
1468
|
if (t.tag === "#raw") {
|
|
1459
1469
|
let n = typeof t.children == "string" ? t.children : "";
|
|
@@ -1461,22 +1471,22 @@ function q(t, n, a, s = null) {
|
|
|
1461
1471
|
}
|
|
1462
1472
|
if (t.tag === "#anchor") {
|
|
1463
1473
|
let e = t, r = Array.isArray(e.children) ? e.children : [], i = document.createTextNode(""), o = document.createTextNode("");
|
|
1464
|
-
e.key != null && (
|
|
1474
|
+
e.key != null && (W(i, `${e.key}:start`), W(o, `${e.key}:end`)), e._startNode = i, e._endNode = o;
|
|
1465
1475
|
let c = document.createDocumentFragment();
|
|
1466
1476
|
c.appendChild(i);
|
|
1467
1477
|
for (let t of r) {
|
|
1468
1478
|
let r = q(t, n, a, s);
|
|
1469
1479
|
if (e.key != null && r instanceof Element && !r.hasAttribute("data-anchor-key")) {
|
|
1470
1480
|
let n = t;
|
|
1471
|
-
n && typeof n == "object" && n.key != null ||
|
|
1481
|
+
n && typeof n == "object" && n.key != null || W(r, String(e.key));
|
|
1472
1482
|
}
|
|
1473
1483
|
c.appendChild(r);
|
|
1474
1484
|
}
|
|
1475
1485
|
return c.appendChild(o), c;
|
|
1476
1486
|
}
|
|
1477
1487
|
let c = t && typeof t == "object" && t.props && t.props.attrs ? t.props.attrs : void 0, l = (c && typeof c.xmlns == "string" ? String(c.xmlns) : void 0) ?? s ?? i[t.tag] ?? null, u = l ? document.createElementNS(l, t.tag) : document.createElement(t.tag);
|
|
1478
|
-
t.key != null &&
|
|
1479
|
-
let { props: f = {}, attrs: p = {}, directives: h = {} } = t.props ?? {}, _ =
|
|
1488
|
+
t.key != null && W(u, t.key), t.props && t.props?._transitionGroup && Re(u, t.props?._transitionGroup);
|
|
1489
|
+
let { props: f = {}, attrs: p = {}, directives: h = {} } = t.props ?? {}, _ = je(h, n, u instanceof HTMLElement ? u : void 0, p), v = {
|
|
1480
1490
|
...f,
|
|
1481
1491
|
..._.props
|
|
1482
1492
|
}, y = {
|
|
@@ -1491,7 +1501,7 @@ function q(t, n, a, s = null) {
|
|
|
1491
1501
|
}
|
|
1492
1502
|
} catch {}
|
|
1493
1503
|
try {
|
|
1494
|
-
if (v.disabled !== void 0 && u &&
|
|
1504
|
+
if (v.disabled !== void 0 && u && I(u)) {
|
|
1495
1505
|
let e = v.disabled, t = e && typeof e == "object" && "value" in e, n = !1;
|
|
1496
1506
|
try {
|
|
1497
1507
|
n = d(e);
|
|
@@ -1507,13 +1517,13 @@ function q(t, n, a, s = null) {
|
|
|
1507
1517
|
for (let e in y) {
|
|
1508
1518
|
let n = y[e];
|
|
1509
1519
|
if (typeof e != "string" || /\[object Object\]/.test(e)) continue;
|
|
1510
|
-
let i =
|
|
1520
|
+
let i = Se(n);
|
|
1511
1521
|
if (typeof i == "boolean") i ? r(u, e, "") : g(() => {
|
|
1512
1522
|
o(u, e);
|
|
1513
1523
|
});
|
|
1514
1524
|
else if (i != null) {
|
|
1515
|
-
if (e === "disabled" &&
|
|
1516
|
-
let t = v.disabled, n =
|
|
1525
|
+
if (e === "disabled" && I(u)) {
|
|
1526
|
+
let t = v.disabled, n = L(we(t) ? t : i);
|
|
1517
1527
|
g(() => {
|
|
1518
1528
|
u.disabled = n;
|
|
1519
1529
|
}), g(n ? () => {
|
|
@@ -1536,7 +1546,7 @@ function q(t, n, a, s = null) {
|
|
|
1536
1546
|
t !== null && r(u, e, String(t));
|
|
1537
1547
|
}
|
|
1538
1548
|
else if (!x && e in u) try {
|
|
1539
|
-
u[e] = i, e === "disabled" && i === !1 &&
|
|
1549
|
+
u[e] = i, e === "disabled" && i === !1 && I(u) && o(u, "disabled"), F(t.props, e, i);
|
|
1540
1550
|
} catch {
|
|
1541
1551
|
let t = b(i);
|
|
1542
1552
|
t !== null && r(u, e, String(t));
|
|
@@ -1558,12 +1568,12 @@ function q(t, n, a, s = null) {
|
|
|
1558
1568
|
for (let e in v) {
|
|
1559
1569
|
let n = v[e];
|
|
1560
1570
|
if (!(typeof e != "string" || /\[object Object\]/.test(e))) if (e === "value" && (u instanceof HTMLInputElement || u instanceof HTMLTextAreaElement || u instanceof HTMLSelectElement)) {
|
|
1561
|
-
let e = typeof n == "object" && n &&
|
|
1571
|
+
let e = typeof n == "object" && n && P(n) ? n.value : n;
|
|
1562
1572
|
g(() => {
|
|
1563
1573
|
u.value = String(e ?? "");
|
|
1564
1574
|
});
|
|
1565
1575
|
} else if (e.startsWith("on") && typeof n == "function") {
|
|
1566
|
-
let t =
|
|
1576
|
+
let t = Ce(e), r = t.includes(":") ? (() => {
|
|
1567
1577
|
let e = t.split(":"), n = e[1];
|
|
1568
1578
|
if (n.includes("-")) {
|
|
1569
1579
|
let t = n.split("-").map((e, t) => t === 0 ? e : e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
@@ -1573,11 +1583,11 @@ function q(t, n, a, s = null) {
|
|
|
1573
1583
|
return `${e[0]}:${t}`;
|
|
1574
1584
|
}
|
|
1575
1585
|
})() : t;
|
|
1576
|
-
_.listeners && (_.listeners[t] || _.listeners[r]) ||
|
|
1586
|
+
_.listeners && (_.listeners[t] || _.listeners[r]) || j.addListener(u, t, n);
|
|
1577
1587
|
} else if (e.startsWith("on") && n === void 0) continue;
|
|
1578
1588
|
else if (n == null || n === !1) o(u, e);
|
|
1579
1589
|
else {
|
|
1580
|
-
let i = t.props?.isCustomElement ?? !1, a = typeof n == "object" && n && d(n) ? n :
|
|
1590
|
+
let i = t.props?.isCustomElement ?? !1, a = typeof n == "object" && n && d(n) ? n : P(n) && n.value !== void 0 ? n.value : n;
|
|
1581
1591
|
if (e === "class" || e === "style") {
|
|
1582
1592
|
try {
|
|
1583
1593
|
let t = b(a);
|
|
@@ -1586,9 +1596,9 @@ function q(t, n, a, s = null) {
|
|
|
1586
1596
|
continue;
|
|
1587
1597
|
}
|
|
1588
1598
|
if (i || e in u) try {
|
|
1589
|
-
let t = typeof n == "object" && n && d(n) ? n :
|
|
1590
|
-
if (e === "disabled" &&
|
|
1591
|
-
let n =
|
|
1599
|
+
let t = typeof n == "object" && n && d(n) ? n : P(n) ? n.value : n;
|
|
1600
|
+
if (e === "disabled" && I(u)) {
|
|
1601
|
+
let n = L(v.disabled === void 0 ? t : v.disabled);
|
|
1592
1602
|
g(() => {
|
|
1593
1603
|
u.disabled = n;
|
|
1594
1604
|
}), g(n ? () => {
|
|
@@ -1610,8 +1620,8 @@ function q(t, n, a, s = null) {
|
|
|
1610
1620
|
}
|
|
1611
1621
|
}
|
|
1612
1622
|
let S = _.listeners ?? {};
|
|
1613
|
-
for (let [e, t] of Object.entries(S))
|
|
1614
|
-
Object.keys(S).length > 0 &&
|
|
1623
|
+
for (let [e, t] of Object.entries(S)) j.addListener(u, e, t);
|
|
1624
|
+
Object.keys(S).length > 0 && ze.set(u, S), K({
|
|
1615
1625
|
...t,
|
|
1616
1626
|
props: {
|
|
1617
1627
|
...t.props,
|
|
@@ -1635,14 +1645,14 @@ function q(t, n, a, s = null) {
|
|
|
1635
1645
|
} catch {}
|
|
1636
1646
|
} catch {}
|
|
1637
1647
|
try {
|
|
1638
|
-
if (
|
|
1648
|
+
if (I(u)) {
|
|
1639
1649
|
let e = v.disabled, t = y.disabled, n = e && typeof e == "object" && "value" in e, i = !1;
|
|
1640
1650
|
try {
|
|
1641
1651
|
i = !!d(e);
|
|
1642
1652
|
} catch {
|
|
1643
1653
|
i = !1;
|
|
1644
1654
|
}
|
|
1645
|
-
let a =
|
|
1655
|
+
let a = L(i || n || we(e) ? e : t);
|
|
1646
1656
|
g(() => {
|
|
1647
1657
|
u.disabled = a;
|
|
1648
1658
|
}), g(a ? () => {
|
|
@@ -1654,7 +1664,7 @@ function q(t, n, a, s = null) {
|
|
|
1654
1664
|
} catch {}
|
|
1655
1665
|
return u;
|
|
1656
1666
|
}
|
|
1657
|
-
function
|
|
1667
|
+
function He(e, n, r, i, a) {
|
|
1658
1668
|
if (typeof r == "string") {
|
|
1659
1669
|
e.textContent !== r && (e.textContent = r);
|
|
1660
1670
|
return;
|
|
@@ -1662,7 +1672,7 @@ function Be(e, n, r, i, a) {
|
|
|
1662
1672
|
if (!Array.isArray(r)) return;
|
|
1663
1673
|
let o = e.childNodes, s = [];
|
|
1664
1674
|
for (let e = 0; e < o.length; e++) s.push(o[e]);
|
|
1665
|
-
let c = Array.isArray(n) ? n : [], l =
|
|
1675
|
+
let c = Array.isArray(n) ? n : [], l = Le(e);
|
|
1666
1676
|
if (l) {
|
|
1667
1677
|
let n = (e) => {
|
|
1668
1678
|
if (typeof e == "string") return e.startsWith("each-") ? e.substring(5) : e;
|
|
@@ -1701,7 +1711,7 @@ function Be(e, n, r, i, a) {
|
|
|
1701
1711
|
r.set(t, e);
|
|
1702
1712
|
}
|
|
1703
1713
|
for (let e = 0; e < s.length; e++) {
|
|
1704
|
-
let t = s[e], r =
|
|
1714
|
+
let t = s[e], r = U(t);
|
|
1705
1715
|
if (r = n(r), r != null && t instanceof Element && t.nodeType === Node.ELEMENT_NODE) {
|
|
1706
1716
|
let e = typeof r == "string" && r.includes(":") ? r.substring(0, r.lastIndexOf(":")) : r;
|
|
1707
1717
|
e = String(e), c.set(e, t);
|
|
@@ -1723,7 +1733,7 @@ function Be(e, n, r, i, a) {
|
|
|
1723
1733
|
let o = r.get(a), s = c.get(a);
|
|
1724
1734
|
if (s && o) {
|
|
1725
1735
|
let e = J(s, o, n, i);
|
|
1726
|
-
u.add(s),
|
|
1736
|
+
u.add(s), W(e, String(a)), p.push({
|
|
1727
1737
|
node: e,
|
|
1728
1738
|
key: a,
|
|
1729
1739
|
newVNode: n,
|
|
@@ -1731,9 +1741,9 @@ function Be(e, n, r, i, a) {
|
|
|
1731
1741
|
isNew: !1
|
|
1732
1742
|
});
|
|
1733
1743
|
} else {
|
|
1734
|
-
s = q(n, i, void 0, e instanceof Element ? e.namespaceURI ?? null : null),
|
|
1744
|
+
s = q(n, i, void 0, e instanceof Element ? e.namespaceURI ?? null : null), W(s, String(a)), e.appendChild(s);
|
|
1735
1745
|
let r = f || l.appear === !0;
|
|
1736
|
-
s instanceof HTMLElement && r &&
|
|
1746
|
+
s instanceof HTMLElement && r && H(s, l).catch((e) => {
|
|
1737
1747
|
t("Enter transition error:", e);
|
|
1738
1748
|
}), p.push({
|
|
1739
1749
|
node: s,
|
|
@@ -1745,9 +1755,9 @@ function Be(e, n, r, i, a) {
|
|
|
1745
1755
|
}
|
|
1746
1756
|
let m = [];
|
|
1747
1757
|
for (let n = 0; n < s.length; n++) {
|
|
1748
|
-
let r = s[n], i =
|
|
1758
|
+
let r = s[n], i = U(r);
|
|
1749
1759
|
if (!u.has(r) && i != null && r instanceof HTMLElement) {
|
|
1750
|
-
let n =
|
|
1760
|
+
let n = Pe(r, l).then(() => {
|
|
1751
1761
|
e.contains(r) && e.removeChild(r);
|
|
1752
1762
|
}).catch((n) => {
|
|
1753
1763
|
t("Leave transition error:", n), e.contains(r) && e.removeChild(r);
|
|
@@ -1806,7 +1816,7 @@ function Be(e, n, r, i, a) {
|
|
|
1806
1816
|
for (let e of c) e && e.key != null && u.set(e.key, e);
|
|
1807
1817
|
let d = /* @__PURE__ */ new Map();
|
|
1808
1818
|
for (let e = 0; e < s.length; e++) {
|
|
1809
|
-
let t = s[e], n =
|
|
1819
|
+
let t = s[e], n = U(t);
|
|
1810
1820
|
n != null && d.set(n, t);
|
|
1811
1821
|
}
|
|
1812
1822
|
let f = /* @__PURE__ */ new Set(), p = e.firstChild;
|
|
@@ -1822,7 +1832,7 @@ function Be(e, n, r, i, a) {
|
|
|
1822
1832
|
let r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
1823
1833
|
for (let e of d) e && e.key != null && r.set(e.key, e);
|
|
1824
1834
|
for (let e of l) {
|
|
1825
|
-
let t =
|
|
1835
|
+
let t = U(e);
|
|
1826
1836
|
t != null && a.set(t, e);
|
|
1827
1837
|
}
|
|
1828
1838
|
let u = s && s.state === "visible" && d.length === 0 && o.length > 0, f = /* @__PURE__ */ new Set(), p = n.nextSibling;
|
|
@@ -1831,7 +1841,7 @@ function Be(e, n, r, i, a) {
|
|
|
1831
1841
|
let t = n.key, o = `${t}:start`, s = `${t}:end`, c = a.get(o), l = a.get(s), u = Array.isArray(n.children) ? n.children : [], d = r.get(t), m, g;
|
|
1832
1842
|
if (c && l && e.contains(c)) m = c, g = l, h(m, g, d?.children, u);
|
|
1833
1843
|
else {
|
|
1834
|
-
m = document.createTextNode(""), g = document.createTextNode(""),
|
|
1844
|
+
m = document.createTextNode(""), g = document.createTextNode(""), W(m, o), W(g, s), e.insertBefore(m, p);
|
|
1835
1845
|
for (let t of u) {
|
|
1836
1846
|
let n = q(t, i, void 0, e instanceof Element ? e.namespaceURI ?? null : null);
|
|
1837
1847
|
e.insertBefore(n, p), f.add(n);
|
|
@@ -1846,15 +1856,15 @@ function Be(e, n, r, i, a) {
|
|
|
1846
1856
|
let o;
|
|
1847
1857
|
if (n.key != null && a.has(n.key)) {
|
|
1848
1858
|
let c = r.get(n.key);
|
|
1849
|
-
o = J(a.get(n.key), c, n, i), f.add(o), s && o instanceof HTMLElement && u && s.appear &&
|
|
1859
|
+
o = J(a.get(n.key), c, n, i), f.add(o), s && o instanceof HTMLElement && u && s.appear && H(o, s).catch((e) => {
|
|
1850
1860
|
t("Transition enter error (appear):", e);
|
|
1851
1861
|
}), o !== p && e.contains(o) && e.insertBefore(o, p);
|
|
1852
|
-
} else o = q(n, i, void 0, e instanceof Element ? e.namespaceURI ?? null : null), e.insertBefore(o, p), f.add(o), s && o instanceof HTMLElement && c &&
|
|
1862
|
+
} else o = q(n, i, void 0, e instanceof Element ? e.namespaceURI ?? null : null), e.insertBefore(o, p), f.add(o), s && o instanceof HTMLElement && c && H(o, s).catch((e) => {
|
|
1853
1863
|
t("Transition enter error:", e);
|
|
1854
1864
|
});
|
|
1855
1865
|
p = o.nextSibling;
|
|
1856
1866
|
}
|
|
1857
|
-
for (let n of l) !f.has(n) && e.contains(n) && (s && n instanceof HTMLElement && c ?
|
|
1867
|
+
for (let n of l) !f.has(n) && e.contains(n) && (s && n instanceof HTMLElement && c ? Pe(n, s).then(() => {
|
|
1858
1868
|
e.contains(n) && e.removeChild(n);
|
|
1859
1869
|
}).catch((r) => {
|
|
1860
1870
|
t("Transition leave error:", r), e.contains(n) && e.removeChild(n);
|
|
@@ -1867,13 +1877,13 @@ function Be(e, n, r, i, a) {
|
|
|
1867
1877
|
}
|
|
1868
1878
|
for (let a = n; a < o.length; a++) {
|
|
1869
1879
|
let n = q(o[a], i, void 0, e instanceof Element ? e.namespaceURI ?? null : null);
|
|
1870
|
-
e.insertBefore(n, r), s && n instanceof HTMLElement && c &&
|
|
1880
|
+
e.insertBefore(n, r), s && n instanceof HTMLElement && c && H(n, s).catch((e) => {
|
|
1871
1881
|
t("Transition enter error:", e);
|
|
1872
1882
|
});
|
|
1873
1883
|
}
|
|
1874
1884
|
for (let r = n; r < l.length; r++) {
|
|
1875
1885
|
let n = l[r];
|
|
1876
|
-
s && n instanceof HTMLElement && c ?
|
|
1886
|
+
s && n instanceof HTMLElement && c ? Pe(n, s).then(() => {
|
|
1877
1887
|
e.contains(n) && e.removeChild(n);
|
|
1878
1888
|
}).catch((r) => {
|
|
1879
1889
|
t("Transition leave error:", r), e.contains(n) && e.removeChild(n);
|
|
@@ -1885,12 +1895,12 @@ function Be(e, n, r, i, a) {
|
|
|
1885
1895
|
let r;
|
|
1886
1896
|
if (n.tag === "#anchor") {
|
|
1887
1897
|
let r = n.key, o = `${r}:start`, s = `${r}:end`, c = d.get(o), l = d.get(s), f = Array.isArray(n.children) ? n.children : [];
|
|
1888
|
-
if (c || (c = document.createTextNode(""),
|
|
1898
|
+
if (c || (c = document.createTextNode(""), W(c, o)), l || (l = document.createTextNode(""), W(l, s)), n._startNode = c, n._endNode = l, !e.contains(c) || !e.contains(l)) {
|
|
1889
1899
|
e.insertBefore(c, p);
|
|
1890
1900
|
let r = n._transition, o = !(r && r.state === "visible" && f.length > 0) || r.appear;
|
|
1891
1901
|
for (let n of f) {
|
|
1892
1902
|
let s = q(n, i, a, e instanceof Element ? e.namespaceURI ?? null : null);
|
|
1893
|
-
e.insertBefore(s, p), r && s instanceof HTMLElement && o &&
|
|
1903
|
+
e.insertBefore(s, p), r && s instanceof HTMLElement && o && H(s, r).catch((e) => {
|
|
1894
1904
|
t("Transition enter error:", e);
|
|
1895
1905
|
});
|
|
1896
1906
|
}
|
|
@@ -1924,7 +1934,7 @@ function J(e, t, n, r, i) {
|
|
|
1924
1934
|
}
|
|
1925
1935
|
if (n && typeof n != "string" && n.tag === "#anchor") {
|
|
1926
1936
|
let t = n, a = Array.isArray(t.children) ? t.children : [], o = t._startNode ?? document.createTextNode(""), s = t._endNode ?? document.createTextNode("");
|
|
1927
|
-
t.key != null && (
|
|
1937
|
+
t.key != null && (W(o, `${t.key}:start`), W(s, `${t.key}:end`)), t._startNode = o, t._endNode = s;
|
|
1928
1938
|
let c = document.createDocumentFragment();
|
|
1929
1939
|
c.appendChild(o);
|
|
1930
1940
|
for (let t of a) {
|
|
@@ -1945,7 +1955,7 @@ function J(e, t, n, r, i) {
|
|
|
1945
1955
|
}
|
|
1946
1956
|
if (n.tag === "#anchor") {
|
|
1947
1957
|
let t = Array.isArray(n.children) ? n.children : [], a = n._startNode ?? document.createTextNode(""), o = n._endNode ?? document.createTextNode("");
|
|
1948
|
-
n.key != null && (
|
|
1958
|
+
n.key != null && (W(a, `${n.key}:start`), W(o, `${n.key}:end`)), n._startNode = a, n._endNode = o;
|
|
1949
1959
|
let s = document.createDocumentFragment();
|
|
1950
1960
|
s.appendChild(a);
|
|
1951
1961
|
for (let n of t) s.appendChild(q(n, r, i, e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null));
|
|
@@ -1953,17 +1963,17 @@ function J(e, t, n, r, i) {
|
|
|
1953
1963
|
}
|
|
1954
1964
|
if (typeof t != "string" && typeof n != "string" && t.tag === n.tag && t.key === n.key) {
|
|
1955
1965
|
let a = e;
|
|
1956
|
-
return
|
|
1966
|
+
return Ve(a, t.props || {}, n.props || {}, r), He(a, t.children, n.children, r, i), K(n, a, i), a;
|
|
1957
1967
|
}
|
|
1958
1968
|
if (typeof t != "string" && typeof n != "string" && t.tag === n.tag && (t.tag && String(t.tag).includes("-") || n.props && n.props.isCustomElement || t.props && t.props.isCustomElement)) try {
|
|
1959
1969
|
let a = e;
|
|
1960
|
-
return
|
|
1970
|
+
return Ve(a, t.props || {}, n.props || {}, r), K(n, a, i), a;
|
|
1961
1971
|
} catch {}
|
|
1962
1972
|
G(e, i);
|
|
1963
1973
|
let a = q(n, r, i, e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null);
|
|
1964
1974
|
return K(n, a, i), e.parentNode?.replaceChild(a, e), a;
|
|
1965
1975
|
}
|
|
1966
|
-
function
|
|
1976
|
+
function Ue(e, t, n, r) {
|
|
1967
1977
|
let i;
|
|
1968
1978
|
Array.isArray(t) ? t.length === 1 ? (i = t[0], i && typeof i == "object" && i.key == null && (i = {
|
|
1969
1979
|
...i,
|
|
@@ -1983,7 +1993,7 @@ function Ve(e, t, n, r) {
|
|
|
1983
1993
|
key: "__anchor_root__"
|
|
1984
1994
|
} },
|
|
1985
1995
|
children: [i]
|
|
1986
|
-
}), i =
|
|
1996
|
+
}), i = Be(i, String(i.key ?? "root"));
|
|
1987
1997
|
let a = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null, s;
|
|
1988
1998
|
a && o ? typeof a != "string" && typeof i != "string" && a.tag === i.tag && a.key === i.key ? s = J(o, a, i, n, r) : (s = q(i, n, r, e.host instanceof Element ? e.host.namespaceURI ?? null : null), e.replaceChild(s, o)) : (s = q(i, n, r, e.host instanceof Element ? e.host.namespaceURI ?? null : null), e.firstChild ? e.replaceChild(s, e.firstChild) : e.appendChild(s));
|
|
1989
1999
|
let c = [];
|
|
@@ -2002,26 +2012,26 @@ function Ve(e, t, n, r) {
|
|
|
2002
2012
|
}
|
|
2003
2013
|
//#endregion
|
|
2004
2014
|
//#region src/lib/runtime/render.ts
|
|
2005
|
-
var Y = [],
|
|
2006
|
-
function
|
|
2015
|
+
var Y = [], We = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new Map();
|
|
2016
|
+
function Ke(e) {
|
|
2007
2017
|
if (typeof CSSStyleSheet > "u" || !("replaceSync" in CSSStyleSheet.prototype)) return null;
|
|
2008
|
-
let t =
|
|
2018
|
+
let t = Ge.get(e);
|
|
2009
2019
|
if (t) return t;
|
|
2010
2020
|
try {
|
|
2011
2021
|
let t = new CSSStyleSheet();
|
|
2012
|
-
return t.replaceSync(e),
|
|
2022
|
+
return t.replaceSync(e), Ge.set(e, t), t;
|
|
2013
2023
|
} catch {
|
|
2014
2024
|
return null;
|
|
2015
2025
|
}
|
|
2016
2026
|
}
|
|
2017
|
-
function
|
|
2027
|
+
function qe(e, t) {
|
|
2018
2028
|
X.has(e) || X.set(e, /* @__PURE__ */ new Set()), X.get(e).add(t);
|
|
2019
2029
|
}
|
|
2020
|
-
function
|
|
2030
|
+
function Je(e, t) {
|
|
2021
2031
|
let n = X.get(e);
|
|
2022
2032
|
n && (n.delete(t), n.size === 0 && X.delete(e));
|
|
2023
2033
|
}
|
|
2024
|
-
function
|
|
2034
|
+
function Ye(e, n, r, i, a, o, s, c) {
|
|
2025
2035
|
if (e) {
|
|
2026
2036
|
Y.push(r);
|
|
2027
2037
|
try {
|
|
@@ -2030,7 +2040,7 @@ function qe(e, n, r, i, a, o, s, c) {
|
|
|
2030
2040
|
o(!0);
|
|
2031
2041
|
let n = e.host.isConnected, u = e, d = u._asyncRenderToken = (u._asyncRenderToken ?? 0) + 1;
|
|
2032
2042
|
l.then((t) => {
|
|
2033
|
-
n && !e.host.isConnected || u._asyncRenderToken === d && (o(!1), s(null),
|
|
2043
|
+
n && !e.host.isConnected || u._asyncRenderToken === d && (o(!1), s(null), Xe(e, t, r, i, a), c(e.innerHTML));
|
|
2034
2044
|
}).catch((r) => {
|
|
2035
2045
|
if (n && !e.host.isConnected || u._asyncRenderToken !== d) return;
|
|
2036
2046
|
o(!1);
|
|
@@ -2039,7 +2049,7 @@ function qe(e, n, r, i, a, o, s, c) {
|
|
|
2039
2049
|
});
|
|
2040
2050
|
return;
|
|
2041
2051
|
}
|
|
2042
|
-
|
|
2052
|
+
Xe(e, l, r, i, a), c(e.innerHTML);
|
|
2043
2053
|
} catch (n) {
|
|
2044
2054
|
let r = n instanceof Error ? n : Error(String(n));
|
|
2045
2055
|
t(`[${e.host.tagName.toLowerCase()}] Render error:`, r), s(r);
|
|
@@ -2048,10 +2058,10 @@ function qe(e, n, r, i, a, o, s, c) {
|
|
|
2048
2058
|
}
|
|
2049
2059
|
}
|
|
2050
2060
|
}
|
|
2051
|
-
function
|
|
2052
|
-
e && (
|
|
2061
|
+
function Xe(e, t, n, r, i) {
|
|
2062
|
+
e && (Ue(e, Array.isArray(t) ? t : [t], n, r), i(e.innerHTML));
|
|
2053
2063
|
}
|
|
2054
|
-
function
|
|
2064
|
+
function Ze(n, r, i, a, o, s, c) {
|
|
2055
2065
|
s !== null && clearTimeout(s);
|
|
2056
2066
|
let l = Date.now() - r < 16, { isVitest: d, isCypress: f, isTest: p } = u(), m = (d || p) && !f;
|
|
2057
2067
|
if (l) {
|
|
@@ -2079,7 +2089,7 @@ function Ye(n, r, i, a, o, s, c) {
|
|
|
2079
2089
|
};
|
|
2080
2090
|
h > 0 ? c(setTimeout(g, h)) : p ? g() : (c({}), queueMicrotask(g));
|
|
2081
2091
|
}
|
|
2082
|
-
function
|
|
2092
|
+
function Qe(e, t) {
|
|
2083
2093
|
let n = t;
|
|
2084
2094
|
try {
|
|
2085
2095
|
let t = X.get(e);
|
|
@@ -2097,22 +2107,22 @@ function Xe(e, t) {
|
|
|
2097
2107
|
} catch {}
|
|
2098
2108
|
return n;
|
|
2099
2109
|
}
|
|
2100
|
-
function
|
|
2110
|
+
function $e(e) {
|
|
2101
2111
|
return "adoptedStyleSheets" in e && typeof CSSStyleSheet < "u" && "replaceSync" in CSSStyleSheet.prototype;
|
|
2102
2112
|
}
|
|
2103
|
-
function
|
|
2113
|
+
function et(e, t) {
|
|
2104
2114
|
let n = e.querySelector("style[data-cer-runtime]");
|
|
2105
2115
|
n || (n = document.createElement("style"), r(n, "data-cer-runtime", "true"), e.appendChild(n));
|
|
2106
2116
|
try {
|
|
2107
2117
|
n.textContent = t;
|
|
2108
2118
|
} catch {}
|
|
2109
2119
|
}
|
|
2110
|
-
function
|
|
2120
|
+
function tt(e, t, n, r, i) {
|
|
2111
2121
|
if (!e) return;
|
|
2112
|
-
let a =
|
|
2113
|
-
if (
|
|
2114
|
-
|
|
2115
|
-
let o = D(e) ? E(a) : "", s = ee(), c = t._computedStyle, l =
|
|
2122
|
+
let a = Qe(e, n);
|
|
2123
|
+
if (We.get(e) === a) return;
|
|
2124
|
+
We.set(e, a);
|
|
2125
|
+
let o = D(e) ? E(a) : "", s = ee(), c = t._computedStyle, l = $e(e), u = ne(), d = "";
|
|
2116
2126
|
if (!l) try {
|
|
2117
2127
|
u?.cssRules && (d = Array.from(u.cssRules).map((e) => e.cssText).join("\n"));
|
|
2118
2128
|
} catch {
|
|
@@ -2121,7 +2131,7 @@ function $e(e, t, n, r, i) {
|
|
|
2121
2131
|
if (!o?.trim() && !c && !s) {
|
|
2122
2132
|
if (i(null), l) e.adoptedStyleSheets = [O(), u];
|
|
2123
2133
|
else {
|
|
2124
|
-
|
|
2134
|
+
et(e, w(`${w(C)}\n${d}`));
|
|
2125
2135
|
try {
|
|
2126
2136
|
e.adoptedStyleSheets = [O(), u];
|
|
2127
2137
|
} catch {}
|
|
@@ -2131,7 +2141,7 @@ function $e(e, t, n, r, i) {
|
|
|
2131
2141
|
let f = "";
|
|
2132
2142
|
if (c && (f += c + "\n"), o && (f += o + "\n"), f = T(f), f = w(f), l) {
|
|
2133
2143
|
let t = !o?.trim() && !!c, n;
|
|
2134
|
-
t ? (n =
|
|
2144
|
+
t ? (n = Ke(f), n ||= new CSSStyleSheet()) : (n = r, n ||= new CSSStyleSheet());
|
|
2135
2145
|
try {
|
|
2136
2146
|
t || n.replaceSync(f);
|
|
2137
2147
|
let r = [O(), u];
|
|
@@ -2139,7 +2149,7 @@ function $e(e, t, n, r, i) {
|
|
|
2139
2149
|
return;
|
|
2140
2150
|
} catch {}
|
|
2141
2151
|
}
|
|
2142
|
-
|
|
2152
|
+
et(e, w(`${w(C)}\n${d}\n${f}`));
|
|
2143
2153
|
try {
|
|
2144
2154
|
let t = [O(), u];
|
|
2145
2155
|
if (s && t.push(s), typeof CSSStyleSheet < "u") try {
|
|
@@ -2157,7 +2167,7 @@ function $e(e, t, n, r, i) {
|
|
|
2157
2167
|
}
|
|
2158
2168
|
//#endregion
|
|
2159
2169
|
//#region src/lib/runtime/component/element-class.ts
|
|
2160
|
-
function
|
|
2170
|
+
function nt(n, r) {
|
|
2161
2171
|
if (!r.render) throw Error("Component must have a render function");
|
|
2162
2172
|
return typeof window > "u" ? class {
|
|
2163
2173
|
constructor() {}
|
|
@@ -2243,7 +2253,7 @@ function et(n, r) {
|
|
|
2243
2253
|
connectedCallback() {
|
|
2244
2254
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
2245
2255
|
let e = this.getRootNode();
|
|
2246
|
-
e && e !== document && "host" in e &&
|
|
2256
|
+
e && e !== document && "host" in e && qe(e, this);
|
|
2247
2257
|
let t = this.getAttribute("data-cer-hydrate");
|
|
2248
2258
|
if (t !== "none") {
|
|
2249
2259
|
if (t === "idle") {
|
|
@@ -2260,7 +2270,7 @@ function et(n, r) {
|
|
|
2260
2270
|
}).observe(this);
|
|
2261
2271
|
return;
|
|
2262
2272
|
}
|
|
2263
|
-
this._applyProps(r), this._requestRender(),
|
|
2273
|
+
this._applyProps(r), this._requestRender(), de(r, this.context, this._mounted, (e) => {
|
|
2264
2274
|
this._mounted = e;
|
|
2265
2275
|
});
|
|
2266
2276
|
}
|
|
@@ -2268,7 +2278,7 @@ function et(n, r) {
|
|
|
2268
2278
|
}
|
|
2269
2279
|
_hydrateNow(e) {
|
|
2270
2280
|
this._runLogicWithinErrorBoundary(e, () => {
|
|
2271
|
-
this._applyProps(e), this._requestRender(),
|
|
2281
|
+
this._applyProps(e), this._requestRender(), de(e, this.context, this._mounted, (e) => {
|
|
2272
2282
|
this._mounted = e;
|
|
2273
2283
|
});
|
|
2274
2284
|
});
|
|
@@ -2276,7 +2286,7 @@ function et(n, r) {
|
|
|
2276
2286
|
disconnectedCallback() {
|
|
2277
2287
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
2278
2288
|
let e = this.getRootNode();
|
|
2279
|
-
e && e !== document && "host" in e &&
|
|
2289
|
+
e && e !== document && "host" in e && Je(e, this), fe(r, this.context, this._listeners, () => {
|
|
2280
2290
|
this._listeners = [];
|
|
2281
2291
|
}, () => {
|
|
2282
2292
|
this._watchers.clear();
|
|
@@ -2291,7 +2301,7 @@ function et(n, r) {
|
|
|
2291
2301
|
}
|
|
2292
2302
|
attributeChangedCallback(e, t, n) {
|
|
2293
2303
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
2294
|
-
this._applyProps(r), t !== n && this._requestRender(),
|
|
2304
|
+
this._applyProps(r), t !== n && this._requestRender(), pe(r, e, t, n, this.context);
|
|
2295
2305
|
});
|
|
2296
2306
|
}
|
|
2297
2307
|
static get observedAttributes() {
|
|
@@ -2299,7 +2309,7 @@ function et(n, r) {
|
|
|
2299
2309
|
}
|
|
2300
2310
|
_render(e) {
|
|
2301
2311
|
this._runLogicWithinErrorBoundary(e, () => {
|
|
2302
|
-
|
|
2312
|
+
Ye(this.shadowRoot, e, this.context, this._refs, (e) => {
|
|
2303
2313
|
this._lastHtmlStringForJitCSS = e, typeof this.onHtmlStringUpdate == "function" && this?.onHtmlStringUpdate?.(e);
|
|
2304
2314
|
}, (e) => {
|
|
2305
2315
|
this._templateLoading = e, this?.onLoadingStateChange?.(e);
|
|
@@ -2314,7 +2324,7 @@ function et(n, r) {
|
|
|
2314
2324
|
_requestRender() {
|
|
2315
2325
|
this._runLogicWithinErrorBoundary(this._cfg, () => {
|
|
2316
2326
|
c(() => {
|
|
2317
|
-
|
|
2327
|
+
Ze(() => this._render(this._cfg), this._lastRenderTime, this._renderCount, (e) => {
|
|
2318
2328
|
this._lastRenderTime = e;
|
|
2319
2329
|
}, (e) => {
|
|
2320
2330
|
this._renderCount = e;
|
|
@@ -2326,7 +2336,7 @@ function et(n, r) {
|
|
|
2326
2336
|
}
|
|
2327
2337
|
_applyStyle(e, t) {
|
|
2328
2338
|
this._runLogicWithinErrorBoundary(e, () => {
|
|
2329
|
-
|
|
2339
|
+
tt(this.shadowRoot, this.context, t, this._styleSheet, (e) => {
|
|
2330
2340
|
this._styleSheet = e;
|
|
2331
2341
|
});
|
|
2332
2342
|
});
|
|
@@ -2431,31 +2441,31 @@ function et(n, r) {
|
|
|
2431
2441
|
}
|
|
2432
2442
|
_initWatchers(e) {
|
|
2433
2443
|
this._runLogicWithinErrorBoundary(e, () => {
|
|
2434
|
-
|
|
2444
|
+
ie(this.context, this._watchers, {});
|
|
2435
2445
|
});
|
|
2436
2446
|
}
|
|
2437
2447
|
_triggerWatchers(e, t) {
|
|
2438
|
-
|
|
2448
|
+
ae(this.context, this._watchers, e, t);
|
|
2439
2449
|
}
|
|
2440
2450
|
_applyProps(e) {
|
|
2441
2451
|
this._runLogicWithinErrorBoundary(e, () => {
|
|
2442
|
-
|
|
2452
|
+
ue(this, e, this.context);
|
|
2443
2453
|
});
|
|
2444
2454
|
}
|
|
2445
2455
|
};
|
|
2446
2456
|
}
|
|
2447
2457
|
//#endregion
|
|
2448
2458
|
//#region src/lib/runtime/component/factory.ts
|
|
2449
|
-
function
|
|
2459
|
+
function rt(e, n, r, i) {
|
|
2450
2460
|
for (let a of r) try {
|
|
2451
2461
|
a(...i);
|
|
2452
2462
|
} catch (r) {
|
|
2453
2463
|
t(`[${e}] Error in ${n} lifecycle hook:`, r);
|
|
2454
2464
|
}
|
|
2455
2465
|
}
|
|
2456
|
-
function
|
|
2466
|
+
function it(r, i, o) {
|
|
2457
2467
|
n();
|
|
2458
|
-
let c =
|
|
2468
|
+
let c = k(r), u = {}, d = {
|
|
2459
2469
|
props: {},
|
|
2460
2470
|
hydrate: o?.hydrate,
|
|
2461
2471
|
onConnected: (e) => {
|
|
@@ -2502,7 +2512,7 @@ function nt(r, i, o) {
|
|
|
2502
2512
|
writable: !0,
|
|
2503
2513
|
enumerable: !1,
|
|
2504
2514
|
configurable: !0
|
|
2505
|
-
}),
|
|
2515
|
+
}), re(e), te();
|
|
2506
2516
|
let n;
|
|
2507
2517
|
try {
|
|
2508
2518
|
n = i();
|
|
@@ -2542,19 +2552,19 @@ function nt(r, i, o) {
|
|
|
2542
2552
|
if (e.onConnected) {
|
|
2543
2553
|
let t = e.onConnected;
|
|
2544
2554
|
u.onConnected = (e) => {
|
|
2545
|
-
|
|
2555
|
+
rt(c, "useOnConnected", t, [e]);
|
|
2546
2556
|
};
|
|
2547
2557
|
}
|
|
2548
2558
|
if (e.onDisconnected) {
|
|
2549
2559
|
let t = e.onDisconnected;
|
|
2550
2560
|
u.onDisconnected = (e) => {
|
|
2551
|
-
|
|
2561
|
+
rt(c, "useOnDisconnected", t, [e]);
|
|
2552
2562
|
};
|
|
2553
2563
|
}
|
|
2554
2564
|
if (e.onAttributeChanged) {
|
|
2555
2565
|
let t = e.onAttributeChanged;
|
|
2556
2566
|
u.onAttributeChanged = (e, n, r, i) => {
|
|
2557
|
-
|
|
2567
|
+
rt(c, "useOnAttributeChanged", t, [
|
|
2558
2568
|
e,
|
|
2559
2569
|
n,
|
|
2560
2570
|
r,
|
|
@@ -2565,7 +2575,7 @@ function nt(r, i, o) {
|
|
|
2565
2575
|
if (e.onError) {
|
|
2566
2576
|
let t = e.onError;
|
|
2567
2577
|
u.onError = (e) => {
|
|
2568
|
-
|
|
2578
|
+
rt(c, "useOnError", t, [e]);
|
|
2569
2579
|
};
|
|
2570
2580
|
}
|
|
2571
2581
|
if (e.props && !Object.keys(d.props ?? {}).length) {
|
|
@@ -2578,7 +2588,7 @@ function nt(r, i, o) {
|
|
|
2578
2588
|
}
|
|
2579
2589
|
return n;
|
|
2580
2590
|
} finally {
|
|
2581
|
-
|
|
2591
|
+
A(), x.clearCurrentComponent();
|
|
2582
2592
|
}
|
|
2583
2593
|
}
|
|
2584
2594
|
};
|
|
@@ -2589,7 +2599,7 @@ function nt(r, i, o) {
|
|
|
2589
2599
|
requestRender: () => {},
|
|
2590
2600
|
emit: () => !0
|
|
2591
2601
|
};
|
|
2592
|
-
|
|
2602
|
+
re(n), l(), te();
|
|
2593
2603
|
try {
|
|
2594
2604
|
i();
|
|
2595
2605
|
} catch (r) {
|
|
@@ -2605,7 +2615,7 @@ function nt(r, i, o) {
|
|
|
2605
2615
|
} catch {}
|
|
2606
2616
|
throw r;
|
|
2607
2617
|
} finally {
|
|
2608
|
-
s(),
|
|
2618
|
+
s(), A();
|
|
2609
2619
|
}
|
|
2610
2620
|
if (n._hookCallbacks?.props) {
|
|
2611
2621
|
let e = n._hookCallbacks.props;
|
|
@@ -2617,7 +2627,7 @@ function nt(r, i, o) {
|
|
|
2617
2627
|
} catch (t) {
|
|
2618
2628
|
e(`[${c}] Failed to register component. Check your component definition for errors.`, t);
|
|
2619
2629
|
}
|
|
2620
|
-
typeof customElements < "u" && !customElements.get(c) && customElements.define(c,
|
|
2630
|
+
typeof customElements < "u" && !customElements.get(c) && customElements.define(c, nt(c, d));
|
|
2621
2631
|
}
|
|
2622
2632
|
}
|
|
2623
2633
|
//#endregion
|
|
@@ -2636,7 +2646,7 @@ function Q(e) {
|
|
|
2636
2646
|
function $(e) {
|
|
2637
2647
|
return typeof e == "object" && !!e && "tag" in e && !Q(e);
|
|
2638
2648
|
}
|
|
2639
|
-
function
|
|
2649
|
+
function at(e, t) {
|
|
2640
2650
|
return e.key == null ? {
|
|
2641
2651
|
...e,
|
|
2642
2652
|
key: t
|
|
@@ -2644,14 +2654,14 @@ function rt(e, t) {
|
|
|
2644
2654
|
}
|
|
2645
2655
|
//#endregion
|
|
2646
2656
|
//#region src/lib/runtime/template-compiler/props-parser.ts
|
|
2647
|
-
function
|
|
2657
|
+
function ot(t, n) {
|
|
2648
2658
|
if (t == null) {
|
|
2649
2659
|
e(`⚠️ Event handler for '@${n}' is ${t}. This will prevent the event from working. Use a function reference instead: @${n}="\${functionName}"`);
|
|
2650
2660
|
return;
|
|
2651
2661
|
}
|
|
2652
2662
|
typeof t != "function" && e(`🚨 Potential infinite loop detected! Event handler for '@${n}' appears to be the result of a function call (${typeof t}) instead of a function reference. Change @${n}="\${functionName()}" to @${n}="\${functionName}" to pass the function reference instead of calling it immediately.`), t === void 0 && typeof t != "function" && e(`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${n}="\${fn}" not @${n}="\${fn()}"`);
|
|
2653
2663
|
}
|
|
2654
|
-
function
|
|
2664
|
+
function st(e, t = [], n = {}) {
|
|
2655
2665
|
let r = {}, i = {}, a = {}, o = [], s = /([:@#]?)([a-zA-Z0-9-:.]+)(?:\s*=\s*("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|([^\s>]+)))?/g, c;
|
|
2656
2666
|
for (; c = s.exec(e);) {
|
|
2657
2667
|
let e = c[1], s = c[2], l = "";
|
|
@@ -2696,7 +2706,7 @@ function at(e, t = [], n = {}) {
|
|
|
2696
2706
|
}
|
|
2697
2707
|
} else if (e === "@") {
|
|
2698
2708
|
let [e, ...t] = s.split("."), i = t;
|
|
2699
|
-
|
|
2709
|
+
ot(m, e);
|
|
2700
2710
|
let a = typeof m == "function" ? m : typeof n[m] == "function" ? n[m] : void 0;
|
|
2701
2711
|
if (a) {
|
|
2702
2712
|
let t = (n) => {
|
|
@@ -2715,7 +2725,7 @@ function at(e, t = [], n = {}) {
|
|
|
2715
2725
|
}
|
|
2716
2726
|
//#endregion
|
|
2717
2727
|
//#region src/lib/runtime/template-compiler/impl.ts
|
|
2718
|
-
function
|
|
2728
|
+
function ct(e) {
|
|
2719
2729
|
if (!$(e) || Q(e)) return e;
|
|
2720
2730
|
let t = e.props?.directives;
|
|
2721
2731
|
if (t && t.when) {
|
|
@@ -2727,14 +2737,14 @@ function ot(e) {
|
|
|
2727
2737
|
...e,
|
|
2728
2738
|
props: a
|
|
2729
2739
|
};
|
|
2730
|
-
return Array.isArray(o.children) && (o.children = o.children.map((e) => typeof e == "object" && e ?
|
|
2740
|
+
return Array.isArray(o.children) && (o.children = o.children.map((e) => typeof e == "object" && e ? ct(e) : e)), {
|
|
2731
2741
|
tag: "#anchor",
|
|
2732
2742
|
key: e.key == null ? `when-${e.tag}` : `when-${e.key}`,
|
|
2733
2743
|
children: r ? [o] : []
|
|
2734
2744
|
};
|
|
2735
2745
|
}
|
|
2736
2746
|
if (Array.isArray(e.children)) {
|
|
2737
|
-
let t = e.children.map((e) => typeof e == "object" && e ?
|
|
2747
|
+
let t = e.children.map((e) => typeof e == "object" && e ? ct(e) : e);
|
|
2738
2748
|
return {
|
|
2739
2749
|
...e,
|
|
2740
2750
|
children: t
|
|
@@ -2742,10 +2752,10 @@ function ot(e) {
|
|
|
2742
2752
|
}
|
|
2743
2753
|
return e;
|
|
2744
2754
|
}
|
|
2745
|
-
function
|
|
2755
|
+
function lt(e, t, n) {
|
|
2746
2756
|
let r = Y.length > 0 ? Y[Y.length - 1] : void 0, i = n ?? r, a = !n && t.length === 0, o = a ? e.join("<!--TEMPLATE_DELIM-->") : null;
|
|
2747
2757
|
if (a && o) {
|
|
2748
|
-
let e =
|
|
2758
|
+
let e = he.get(o);
|
|
2749
2759
|
if (e) return e;
|
|
2750
2760
|
}
|
|
2751
2761
|
function s(e, t) {
|
|
@@ -2785,7 +2795,7 @@ function st(e, t, n) {
|
|
|
2785
2795
|
}));
|
|
2786
2796
|
} else n.props ||= {}, Object.assign(n.props, t);
|
|
2787
2797
|
}
|
|
2788
|
-
function
|
|
2798
|
+
function k(e, t) {
|
|
2789
2799
|
let n = w ? C : D;
|
|
2790
2800
|
if (Q(e)) {
|
|
2791
2801
|
let r = e.key ?? t, i = e.children;
|
|
@@ -2797,14 +2807,14 @@ function st(e, t, n) {
|
|
|
2797
2807
|
return;
|
|
2798
2808
|
}
|
|
2799
2809
|
if ($(e)) {
|
|
2800
|
-
n.push(
|
|
2810
|
+
n.push(at(e, void 0));
|
|
2801
2811
|
return;
|
|
2802
2812
|
}
|
|
2803
2813
|
if (Array.isArray(e)) {
|
|
2804
2814
|
if (e.length === 0) return;
|
|
2805
2815
|
for (let r = 0; r < e.length; r++) {
|
|
2806
2816
|
let i = e[r];
|
|
2807
|
-
Q(i) || $(i) || Array.isArray(i) ?
|
|
2817
|
+
Q(i) || $(i) || Array.isArray(i) ? k(i, `${t}-${r}`) : typeof i == "object" && i ? v(i) ? n.push(Z("#raw", {}, i.__rawHTML, `${t}-${r}`)) : ne(i) : n.push(s(String(i), `${t}-${r}`));
|
|
2808
2818
|
}
|
|
2809
2819
|
return;
|
|
2810
2820
|
}
|
|
@@ -2819,7 +2829,7 @@ function st(e, t, n) {
|
|
|
2819
2829
|
}
|
|
2820
2830
|
n.push(s(String(e), t));
|
|
2821
2831
|
}
|
|
2822
|
-
let
|
|
2832
|
+
let re = new Set([
|
|
2823
2833
|
"area",
|
|
2824
2834
|
"base",
|
|
2825
2835
|
"br",
|
|
@@ -2837,7 +2847,7 @@ function st(e, t, n) {
|
|
|
2837
2847
|
]);
|
|
2838
2848
|
for (; S = u.exec(l);) if (!(S[0].startsWith("<!--") && S[0].endsWith("-->"))) {
|
|
2839
2849
|
if (S[1]) {
|
|
2840
|
-
let e = S[1], n = S[0][1] === "/", r = S[0][S[0].length - 2] === "/" ||
|
|
2850
|
+
let e = S[1], n = S[0][1] === "/", r = S[0][S[0].length - 2] === "/" || re.has(e), { props: a, attrs: o, directives: s, bound: c } = st(S[2] || "", t, i ?? {}), l = {
|
|
2841
2851
|
props: {},
|
|
2842
2852
|
attrs: {}
|
|
2843
2853
|
};
|
|
@@ -3016,7 +3026,7 @@ function st(e, t, n) {
|
|
|
3016
3026
|
}), w = e, T = l, C = []);
|
|
3017
3027
|
} else if (S[3] !== void 0) {
|
|
3018
3028
|
let e = Number(S[3]), n = t[e];
|
|
3019
|
-
|
|
3029
|
+
k(n, `interp-${e}`);
|
|
3020
3030
|
} else if (S[4]) {
|
|
3021
3031
|
let e = S[4], n = w ? C : D, r = e.split(/({{\d+}})/);
|
|
3022
3032
|
for (let e of r) {
|
|
@@ -3024,7 +3034,7 @@ function st(e, t, n) {
|
|
|
3024
3034
|
let r = e.match(/^{{(\d+)}}$/);
|
|
3025
3035
|
if (r) {
|
|
3026
3036
|
let e = Number(r[1]), n = t[e];
|
|
3027
|
-
|
|
3037
|
+
k(n, `interp-${e}`);
|
|
3028
3038
|
} else {
|
|
3029
3039
|
let t = `text-${ee++}`, r = te();
|
|
3030
3040
|
n.push(c(e, t, r));
|
|
@@ -3032,24 +3042,24 @@ function st(e, t, n) {
|
|
|
3032
3042
|
}
|
|
3033
3043
|
}
|
|
3034
3044
|
}
|
|
3035
|
-
let
|
|
3036
|
-
if (
|
|
3037
|
-
let e =
|
|
3038
|
-
return a && o &&
|
|
3039
|
-
} else if (
|
|
3040
|
-
let e =
|
|
3041
|
-
return a && o &&
|
|
3045
|
+
let A = D.filter((e) => $(e) && e.tag === "#text" ? typeof e.children == "string" && e.children.trim() !== "" : !0).map((e) => ct(e));
|
|
3046
|
+
if (A.length === 1) {
|
|
3047
|
+
let e = A[0];
|
|
3048
|
+
return a && o && he.set(o, e), e;
|
|
3049
|
+
} else if (A.length > 1) {
|
|
3050
|
+
let e = A;
|
|
3051
|
+
return a && o && he.set(o, e), e;
|
|
3042
3052
|
}
|
|
3043
3053
|
return Z("div", {}, "", "fallback-root");
|
|
3044
3054
|
}
|
|
3045
3055
|
//#endregion
|
|
3046
3056
|
//#region src/lib/runtime/template-compiler.ts
|
|
3047
|
-
function
|
|
3057
|
+
function ut(e, ...t) {
|
|
3048
3058
|
if (S()) return [];
|
|
3049
3059
|
let n = t[t.length - 1];
|
|
3050
|
-
return
|
|
3060
|
+
return lt(e, t, typeof n == "object" && n && !Array.isArray(n) ? n : void 0);
|
|
3051
3061
|
}
|
|
3052
3062
|
//#endregion
|
|
3053
|
-
export {
|
|
3063
|
+
export { it as n, Ue as r, ut as t };
|
|
3054
3064
|
|
|
3055
|
-
//# sourceMappingURL=template-compiler-
|
|
3065
|
+
//# sourceMappingURL=template-compiler-BpHiWIRk.js.map
|