@jasonshimmy/custom-elements-runtime 3.1.3 → 3.2.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/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 +14 -14
- package/dist/custom-elements-runtime.router.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.router.es.js +469 -468
- package/dist/custom-elements-runtime.router.es.js.map +1 -1
- package/dist/custom-elements-runtime.ssr-middleware.cjs.js +3 -1
- package/dist/custom-elements-runtime.ssr-middleware.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.ssr-middleware.es.js +44 -42
- package/dist/custom-elements-runtime.ssr-middleware.es.js.map +1 -1
- package/dist/custom-elements-runtime.ssr.cjs.js +2 -2
- package/dist/custom-elements-runtime.ssr.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.ssr.es.js +5 -4
- package/dist/custom-elements-runtime.ssr.es.js.map +1 -1
- package/dist/{hooks-xWZhQHco.js → hooks-BH-CpUun.js} +223 -214
- package/dist/hooks-BH-CpUun.js.map +1 -0
- package/dist/hooks-NOFG9QRQ.cjs +6 -0
- package/dist/hooks-NOFG9QRQ.cjs.map +1 -0
- package/dist/runtime/ssr-context.d.ts +1 -13
- package/dist/runtime/vdom-ssr-dsd.d.ts +14 -0
- package/dist/ssr-middleware.d.ts +18 -2
- package/dist/ssr.d.ts +3 -4
- package/dist/template-compiler-CDvhsHia.cjs +22 -0
- package/dist/template-compiler-CDvhsHia.cjs.map +1 -0
- package/dist/{template-compiler-ZhSg1yPh.js → template-compiler-DiE69FLO.js} +4 -4
- package/dist/template-compiler-DiE69FLO.js.map +1 -0
- package/package.json +1 -1
- package/dist/hooks-x8M4knLc.cjs +0 -6
- package/dist/hooks-x8M4knLc.cjs.map +0 -1
- package/dist/hooks-xWZhQHco.js.map +0 -1
- package/dist/template-compiler-CTUhEHr8.cjs +0 -22
- package/dist/template-compiler-CTUhEHr8.cjs.map +0 -1
- package/dist/template-compiler-ZhSg1yPh.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as m, d as
|
|
1
|
+
import { a as m, d as N } from "./logger-BvkEbVM4.js";
|
|
2
2
|
import { m as G, s as X } from "./css-utils-Cg4o1MqY.js";
|
|
3
3
|
function K() {
|
|
4
4
|
const r = (() => {
|
|
@@ -70,7 +70,7 @@ class Z {
|
|
|
70
70
|
try {
|
|
71
71
|
n();
|
|
72
72
|
} catch (t) {
|
|
73
|
-
|
|
73
|
+
N("Error in batched update:", t);
|
|
74
74
|
}
|
|
75
75
|
} finally {
|
|
76
76
|
this.isFlushing = !1;
|
|
@@ -155,7 +155,7 @@ class Z {
|
|
|
155
155
|
try {
|
|
156
156
|
e();
|
|
157
157
|
} catch (o) {
|
|
158
|
-
|
|
158
|
+
N("Error in immediate update:", o);
|
|
159
159
|
}
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
@@ -216,32 +216,32 @@ class Z {
|
|
|
216
216
|
try {
|
|
217
217
|
n[t][1]();
|
|
218
218
|
} catch (s) {
|
|
219
|
-
|
|
219
|
+
N("Error in idle update:", s);
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
const
|
|
224
|
+
const k = new Z();
|
|
225
225
|
function B(r, e) {
|
|
226
|
-
|
|
226
|
+
k.schedule(r, e);
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
function ce() {
|
|
232
|
-
S.flushImmediately();
|
|
228
|
+
function ce(r, e = "normal", n) {
|
|
229
|
+
k.scheduleWithPriority(r, e, n);
|
|
233
230
|
}
|
|
234
231
|
function ue() {
|
|
232
|
+
k.flushImmediately();
|
|
233
|
+
}
|
|
234
|
+
function le() {
|
|
235
235
|
return new Promise((r) => {
|
|
236
236
|
let n = 0;
|
|
237
|
-
for (;
|
|
238
|
-
|
|
237
|
+
for (; k.hasPendingUpdates && n < 100; )
|
|
238
|
+
k.flushImmediately(), n++;
|
|
239
239
|
n >= 100 && m(
|
|
240
240
|
"[nextTick] Maximum flush iterations reached — possible circular update loop. Check for watchers or computed values that unconditionally mutate reactive state."
|
|
241
241
|
), queueMicrotask(r);
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
|
-
const
|
|
244
|
+
const H = /* @__PURE__ */ new WeakSet();
|
|
245
245
|
class Y {
|
|
246
246
|
static cache = /* @__PURE__ */ new WeakMap();
|
|
247
247
|
static arrayHandlerCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -279,8 +279,8 @@ class Y {
|
|
|
279
279
|
"fill",
|
|
280
280
|
"copyWithin"
|
|
281
281
|
].includes(s) ? function(...l) {
|
|
282
|
-
const
|
|
283
|
-
return e.triggerUpdate(),
|
|
282
|
+
const c = i.apply(t, l);
|
|
283
|
+
return e.triggerUpdate(), c;
|
|
284
284
|
} : i !== null && typeof i == "object" && typeof s == "string" ? e.makeReactiveValue(i) : i;
|
|
285
285
|
},
|
|
286
286
|
set: (t, s, o) => (t[s] = e.makeReactiveValue(o), e.triggerUpdate(), !0),
|
|
@@ -340,7 +340,7 @@ class $ {
|
|
|
340
340
|
*/
|
|
341
341
|
static createReactiveProxy(e, n, t) {
|
|
342
342
|
try {
|
|
343
|
-
if (
|
|
343
|
+
if (H.has(e)) return e;
|
|
344
344
|
} catch {
|
|
345
345
|
}
|
|
346
346
|
const s = Array.isArray(e);
|
|
@@ -358,22 +358,22 @@ class $ {
|
|
|
358
358
|
static markAsProxy(e) {
|
|
359
359
|
if (e)
|
|
360
360
|
try {
|
|
361
|
-
|
|
361
|
+
H.add(e);
|
|
362
362
|
} catch {
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
let
|
|
367
|
-
function
|
|
368
|
-
return
|
|
366
|
+
let T = !1;
|
|
367
|
+
function g() {
|
|
368
|
+
return T;
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
|
|
370
|
+
function de() {
|
|
371
|
+
T && m(
|
|
372
372
|
"[CER] beginDiscoveryRender() called while a discovery render is already active. This usually means a component was registered inside another component's render function. Ensure component() calls are at module top-level."
|
|
373
|
-
),
|
|
373
|
+
), T = !0;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
|
|
375
|
+
function fe() {
|
|
376
|
+
T = !1;
|
|
377
377
|
}
|
|
378
378
|
let J = 0;
|
|
379
379
|
function A(r) {
|
|
@@ -600,19 +600,19 @@ class x {
|
|
|
600
600
|
return this.dependents;
|
|
601
601
|
}
|
|
602
602
|
makeReactive(e) {
|
|
603
|
-
return e === null || typeof e != "object" || e instanceof Node || e instanceof Element || e instanceof HTMLElement ? e : $.createReactiveProxy(
|
|
603
|
+
return e === null || typeof e != "object" || typeof Node < "u" && e instanceof Node || typeof Element < "u" && e instanceof Element || typeof HTMLElement < "u" && e instanceof HTMLElement ? e : $.createReactiveProxy(
|
|
604
604
|
e,
|
|
605
605
|
() => d.triggerUpdate(this),
|
|
606
606
|
(n) => this.makeReactive(n)
|
|
607
607
|
);
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function he(r) {
|
|
611
611
|
return d.getOrCreateState(
|
|
612
612
|
r === void 0 ? null : r
|
|
613
613
|
);
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function b(r) {
|
|
616
616
|
if (!r || typeof r != "object") return !1;
|
|
617
617
|
try {
|
|
618
618
|
const e = /* @__PURE__ */ Symbol.for("@cer/ReactiveState");
|
|
@@ -621,7 +621,7 @@ function C(r) {
|
|
|
621
621
|
return !1;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
|
-
function
|
|
624
|
+
function pe(r) {
|
|
625
625
|
let e, n = !0;
|
|
626
626
|
const t = A("computed"), s = () => {
|
|
627
627
|
n = !0;
|
|
@@ -637,8 +637,8 @@ function he(r) {
|
|
|
637
637
|
}
|
|
638
638
|
};
|
|
639
639
|
}
|
|
640
|
-
function
|
|
641
|
-
if (
|
|
640
|
+
function ge(r) {
|
|
641
|
+
if (g()) return () => {
|
|
642
642
|
};
|
|
643
643
|
const e = A("effect");
|
|
644
644
|
try {
|
|
@@ -658,14 +658,14 @@ function pe(r) {
|
|
|
658
658
|
d.cleanup(e);
|
|
659
659
|
};
|
|
660
660
|
}
|
|
661
|
-
const
|
|
662
|
-
function
|
|
661
|
+
const I = 50;
|
|
662
|
+
function D(r, e = /* @__PURE__ */ new WeakMap(), n = 0) {
|
|
663
663
|
if (r === null || typeof r != "object") return r;
|
|
664
664
|
const t = r;
|
|
665
665
|
if (e.has(t)) return e.get(t);
|
|
666
|
-
if (n >
|
|
666
|
+
if (n > I)
|
|
667
667
|
return m(
|
|
668
|
-
`[watch] Deep clone exceeded ${
|
|
668
|
+
`[watch] Deep clone exceeded ${I} nesting levels. Returning a reference at this depth instead of cloning further. Consider restructuring your state or switching to a shallow watch.`
|
|
669
669
|
), r;
|
|
670
670
|
if (typeof Node < "u" && t instanceof Node) return r;
|
|
671
671
|
if (t instanceof Date) return new Date(t.getTime());
|
|
@@ -673,14 +673,14 @@ function N(r, e = /* @__PURE__ */ new WeakMap(), n = 0) {
|
|
|
673
673
|
const o = [];
|
|
674
674
|
e.set(t, o);
|
|
675
675
|
for (let i = 0; i < t.length; i++)
|
|
676
|
-
o.push(
|
|
676
|
+
o.push(D(t[i], e, n + 1));
|
|
677
677
|
return o;
|
|
678
678
|
}
|
|
679
679
|
const s = {};
|
|
680
680
|
e.set(t, s);
|
|
681
681
|
for (const o of Object.keys(t))
|
|
682
682
|
try {
|
|
683
|
-
s[o] =
|
|
683
|
+
s[o] = D(
|
|
684
684
|
t[o],
|
|
685
685
|
e,
|
|
686
686
|
n + 1
|
|
@@ -689,37 +689,37 @@ function N(r, e = /* @__PURE__ */ new WeakMap(), n = 0) {
|
|
|
689
689
|
}
|
|
690
690
|
return s;
|
|
691
691
|
}
|
|
692
|
-
function
|
|
693
|
-
if (
|
|
692
|
+
function me(r, e, n) {
|
|
693
|
+
if (g()) return () => {
|
|
694
694
|
};
|
|
695
695
|
let t;
|
|
696
|
-
const s =
|
|
696
|
+
const s = b(r) ? () => r.value : r, o = A("watch");
|
|
697
697
|
try {
|
|
698
|
-
const
|
|
699
|
-
|
|
698
|
+
const a = d.getCurrentComponentId();
|
|
699
|
+
a && d.registerWatcher(a, o);
|
|
700
700
|
} catch {
|
|
701
701
|
}
|
|
702
702
|
const i = () => {
|
|
703
703
|
d.setCurrentComponent(o, i);
|
|
704
|
-
const
|
|
704
|
+
const a = s();
|
|
705
705
|
if (d.clearCurrentComponent(), n?.deep) {
|
|
706
706
|
const l = d.withoutTracking(
|
|
707
|
-
() =>
|
|
707
|
+
() => D(a)
|
|
708
708
|
);
|
|
709
709
|
e(l, t), t = l;
|
|
710
|
-
} else
|
|
710
|
+
} else a !== t && (e(a, t), t = a);
|
|
711
711
|
};
|
|
712
|
-
return d.setCurrentComponent(o, i), t = s(), d.clearCurrentComponent(), n?.deep && (t = d.withoutTracking(() =>
|
|
712
|
+
return d.setCurrentComponent(o, i), t = s(), d.clearCurrentComponent(), n?.deep && (t = d.withoutTracking(() => D(t))), n && n.immediate && e(t, void 0), () => {
|
|
713
713
|
d.cleanup(o);
|
|
714
714
|
};
|
|
715
715
|
}
|
|
716
|
-
const
|
|
716
|
+
const ye = (r) => {
|
|
717
717
|
try {
|
|
718
718
|
r();
|
|
719
719
|
} catch {
|
|
720
720
|
}
|
|
721
721
|
}, _ = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), O = 500;
|
|
722
|
-
let E, V, j = !1,
|
|
722
|
+
let E, V, j = !1, L = !1, U;
|
|
723
723
|
const ee = !!globalThis.process?.versions?.node;
|
|
724
724
|
function te(r) {
|
|
725
725
|
if (_.has(r))
|
|
@@ -733,7 +733,7 @@ function F(r) {
|
|
|
733
733
|
const e = r.replace(/-([a-z])/g, (n, t) => t.toUpperCase());
|
|
734
734
|
return v.size < O && v.set(r, e), e;
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function be(r) {
|
|
737
737
|
if (typeof r == "string") {
|
|
738
738
|
if (M.has(r))
|
|
739
739
|
return M.get(r);
|
|
@@ -755,12 +755,12 @@ function y(r) {
|
|
|
755
755
|
if (!r) return "";
|
|
756
756
|
const e = String(r);
|
|
757
757
|
if (typeof document < "u" && typeof document.createElement == "function") {
|
|
758
|
-
const
|
|
758
|
+
const a = e.replace(/</g, "").replace(/>/g, ""), l = U || (U = document.createElement("div"));
|
|
759
759
|
try {
|
|
760
760
|
y._el = l;
|
|
761
761
|
} catch {
|
|
762
762
|
}
|
|
763
|
-
return l.innerHTML =
|
|
763
|
+
return l.innerHTML = a, (l.textContent || "").replace(new RegExp("", "g"), "<").replace(new RegExp("", "g"), ">");
|
|
764
764
|
}
|
|
765
765
|
const n = {
|
|
766
766
|
lt: "<",
|
|
@@ -785,9 +785,9 @@ function y(r) {
|
|
|
785
785
|
"../entities.json",
|
|
786
786
|
"./entities.json"
|
|
787
787
|
];
|
|
788
|
-
for (const
|
|
788
|
+
for (const a of i)
|
|
789
789
|
try {
|
|
790
|
-
const l = o(
|
|
790
|
+
const l = o(a);
|
|
791
791
|
if (l && typeof l == "object") {
|
|
792
792
|
s = l;
|
|
793
793
|
break;
|
|
@@ -813,8 +813,8 @@ function y(r) {
|
|
|
813
813
|
}).catch(() => {
|
|
814
814
|
});
|
|
815
815
|
}
|
|
816
|
-
if ((j || y._usedFallback) && !(
|
|
817
|
-
|
|
816
|
+
if ((j || y._usedFallback) && !(L || y._warnedFallback)) {
|
|
817
|
+
L = !0;
|
|
818
818
|
try {
|
|
819
819
|
y._warnedFallback = !0;
|
|
820
820
|
} catch {
|
|
@@ -828,11 +828,11 @@ function y(r) {
|
|
|
828
828
|
}
|
|
829
829
|
return e.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g, (o, i) => {
|
|
830
830
|
if (i.charCodeAt(0) === 35) {
|
|
831
|
-
const
|
|
832
|
-
return Number.isNaN(
|
|
831
|
+
const c = (i.charAt(1) || "").toLowerCase() === "x" ? parseInt(i.slice(2), 16) : parseInt(i.slice(1), 10);
|
|
832
|
+
return Number.isNaN(c) ? `&${i};` : String.fromCodePoint(c);
|
|
833
833
|
}
|
|
834
|
-
const
|
|
835
|
-
return
|
|
834
|
+
const a = s[i] ?? (t && t[i]);
|
|
835
|
+
return a !== void 0 ? a : `&${i};`;
|
|
836
836
|
});
|
|
837
837
|
}
|
|
838
838
|
async function z() {
|
|
@@ -891,17 +891,17 @@ y._namedMapLoader = z;
|
|
|
891
891
|
function Ce(r, e) {
|
|
892
892
|
!r || typeof r != "object" || E && !e?.overwrite || (E = r);
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function we() {
|
|
895
895
|
E = void 0;
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function Se(r) {
|
|
898
898
|
const e = String(r);
|
|
899
899
|
return { __unsafeHTML: e, __rawHTML: e };
|
|
900
900
|
}
|
|
901
901
|
function ke(r) {
|
|
902
902
|
return !!r && (typeof r.__unsafeHTML == "string" || typeof r.__rawHTML == "string");
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function Ee(r, e) {
|
|
905
905
|
if (typeof e == "string") {
|
|
906
906
|
if (e === "") return;
|
|
907
907
|
const n = e.split(".");
|
|
@@ -913,23 +913,23 @@ function Se(r, e) {
|
|
|
913
913
|
}
|
|
914
914
|
t = t[s];
|
|
915
915
|
}
|
|
916
|
-
return
|
|
916
|
+
return b(t) ? t.value : t;
|
|
917
917
|
}
|
|
918
918
|
return e;
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function _e(r, e, n) {
|
|
921
921
|
const t = String(e).split("."), s = t.pop();
|
|
922
922
|
if (!s) return;
|
|
923
923
|
const o = t.reduce(
|
|
924
|
-
(i,
|
|
924
|
+
(i, a) => (i[a] == null && (i[a] = {}), i[a]),
|
|
925
925
|
r
|
|
926
926
|
);
|
|
927
|
-
|
|
927
|
+
b(o[s]) ? o[s].value = n : o[s] = n;
|
|
928
928
|
}
|
|
929
929
|
function ne(r) {
|
|
930
930
|
try {
|
|
931
931
|
if (r && typeof r == "object") {
|
|
932
|
-
if (
|
|
932
|
+
if (b(r)) return r.value;
|
|
933
933
|
if ("value" in r) {
|
|
934
934
|
const e = r.value;
|
|
935
935
|
return e == null || typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? e : r;
|
|
@@ -939,13 +939,13 @@ function ne(r) {
|
|
|
939
939
|
}
|
|
940
940
|
return r;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function ve(r) {
|
|
943
943
|
const e = ne(r);
|
|
944
944
|
if (e == null) return null;
|
|
945
945
|
const n = typeof e;
|
|
946
946
|
return n === "string" || n === "number" || n === "boolean" ? String(e) : null;
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function Me(r) {
|
|
949
949
|
if (!r || typeof r != "string") return !1;
|
|
950
950
|
if (r === "class" || r.endsWith("Class")) return !0;
|
|
951
951
|
if (r.includes("-"))
|
|
@@ -955,44 +955,48 @@ function ve(r) {
|
|
|
955
955
|
}
|
|
956
956
|
return !1;
|
|
957
957
|
}
|
|
958
|
-
let
|
|
959
|
-
function
|
|
960
|
-
if (
|
|
958
|
+
let C = null;
|
|
959
|
+
function Ne() {
|
|
960
|
+
if (C !== null)
|
|
961
961
|
throw new Error(
|
|
962
962
|
"[CER] Concurrent SSR render detected: beginSSRGlobalStyleCollection() called while a collection is already active. For concurrent request handling, use worker threads or multiple Node.js processes."
|
|
963
963
|
);
|
|
964
|
-
|
|
964
|
+
C = [];
|
|
965
965
|
}
|
|
966
966
|
function Te() {
|
|
967
|
-
const r =
|
|
968
|
-
return
|
|
967
|
+
const r = C ?? [];
|
|
968
|
+
return C = null, r;
|
|
969
969
|
}
|
|
970
970
|
function re(r) {
|
|
971
|
-
return
|
|
971
|
+
return C !== null ? (r && !C.includes(r) && C.push(r), !0) : !1;
|
|
972
972
|
}
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
973
|
+
let se = 0;
|
|
974
|
+
function De(r, e, n = "unknown", t) {
|
|
975
|
+
const s = {};
|
|
976
|
+
for (const [h, p] of Object.entries(e ?? {}))
|
|
977
|
+
s[F(h)] = p;
|
|
978
|
+
const o = {
|
|
979
|
+
getAttribute(h) {
|
|
980
|
+
const p = F(h);
|
|
981
|
+
if (s[p] !== void 0 && s[p] !== null)
|
|
982
|
+
return String(s[p]);
|
|
983
|
+
const f = (e ?? {})[h];
|
|
984
|
+
return f != null ? String(f) : null;
|
|
984
985
|
},
|
|
985
|
-
hasAttribute(
|
|
986
|
-
return this.getAttribute(
|
|
986
|
+
hasAttribute(h) {
|
|
987
|
+
return this.getAttribute(h) !== null;
|
|
987
988
|
},
|
|
988
989
|
// shadowRoot must be null so useJITCSS() doesn't try to registerJITCSSComponent
|
|
989
990
|
shadowRoot: null,
|
|
990
991
|
tagName: "",
|
|
991
992
|
parentElement: null
|
|
992
|
-
},
|
|
993
|
-
...
|
|
994
|
-
//
|
|
995
|
-
|
|
993
|
+
}, i = {
|
|
994
|
+
...s,
|
|
995
|
+
// Unique ID per SSR render prevents the reactive system's stateStorage from
|
|
996
|
+
// returning cached ref/computed values from a previous request. Using a
|
|
997
|
+
// monotonic counter is cheaper than crypto.randomUUID() and avoids the
|
|
998
|
+
// Node.js version compatibility concern noted in the original comment.
|
|
999
|
+
_componentId: `cer-ssr-${Object.keys(s).join("-") || "root"}-${++se}`,
|
|
996
1000
|
requestRender: () => {
|
|
997
1001
|
},
|
|
998
1002
|
_requestRender: () => {
|
|
@@ -1000,49 +1004,54 @@ function De(r, e, n = "unknown") {
|
|
|
1000
1004
|
emit: () => !0,
|
|
1001
1005
|
refs: {}
|
|
1002
1006
|
};
|
|
1003
|
-
Object.defineProperty(
|
|
1004
|
-
value:
|
|
1007
|
+
Object.defineProperty(i, "_host", {
|
|
1008
|
+
value: o,
|
|
1005
1009
|
writable: !0,
|
|
1006
1010
|
enumerable: !1,
|
|
1007
1011
|
configurable: !0
|
|
1008
|
-
}),
|
|
1009
|
-
|
|
1012
|
+
}), t !== void 0 && Object.defineProperty(i, "_router", {
|
|
1013
|
+
value: t,
|
|
1014
|
+
writable: !1,
|
|
1015
|
+
enumerable: !1,
|
|
1016
|
+
configurable: !0
|
|
1017
|
+
}), R(i);
|
|
1018
|
+
let a = null, l;
|
|
1010
1019
|
try {
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1020
|
+
const h = r.render(
|
|
1021
|
+
i
|
|
1013
1022
|
);
|
|
1014
|
-
|
|
1015
|
-
} catch (
|
|
1023
|
+
h instanceof Promise ? l = h : a = h;
|
|
1024
|
+
} catch (h) {
|
|
1016
1025
|
m(
|
|
1017
1026
|
`[SSR] Component "${n}" threw during SSR render. The shadow DOM will be empty. Error:`,
|
|
1018
|
-
|
|
1027
|
+
h
|
|
1019
1028
|
);
|
|
1020
1029
|
} finally {
|
|
1021
1030
|
q();
|
|
1022
1031
|
}
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1032
|
+
const c = String(
|
|
1033
|
+
i._computedStyle ?? ""
|
|
1025
1034
|
);
|
|
1026
|
-
return { shadowVNode:
|
|
1035
|
+
return { shadowVNode: a, useStyleCSS: c, asyncPromise: l };
|
|
1027
1036
|
}
|
|
1028
|
-
function
|
|
1029
|
-
return
|
|
1037
|
+
function xe() {
|
|
1038
|
+
return g();
|
|
1030
1039
|
}
|
|
1031
1040
|
let u = null;
|
|
1032
|
-
const
|
|
1041
|
+
const S = /* @__PURE__ */ Symbol("cer:provides");
|
|
1033
1042
|
function R(r) {
|
|
1034
1043
|
u = r;
|
|
1035
1044
|
}
|
|
1036
1045
|
function q() {
|
|
1037
1046
|
u = null;
|
|
1038
1047
|
}
|
|
1039
|
-
function
|
|
1048
|
+
function Re() {
|
|
1040
1049
|
return u;
|
|
1041
1050
|
}
|
|
1042
|
-
function
|
|
1051
|
+
function Ae() {
|
|
1043
1052
|
if (!u)
|
|
1044
1053
|
throw new Error("useEmit must be called during component render");
|
|
1045
|
-
if (
|
|
1054
|
+
if (g())
|
|
1046
1055
|
return () => !1;
|
|
1047
1056
|
const r = u.emit;
|
|
1048
1057
|
if (typeof r != "function")
|
|
@@ -1060,28 +1069,28 @@ function w(r) {
|
|
|
1060
1069
|
configurable: !0
|
|
1061
1070
|
});
|
|
1062
1071
|
}
|
|
1063
|
-
function
|
|
1072
|
+
function Oe(r) {
|
|
1064
1073
|
if (!u)
|
|
1065
1074
|
throw new Error("useOnConnected must be called during component render");
|
|
1066
|
-
if (
|
|
1075
|
+
if (g()) return;
|
|
1067
1076
|
w(u);
|
|
1068
1077
|
const e = u._hookCallbacks;
|
|
1069
1078
|
e.onConnected || (e.onConnected = []), e.onConnected.push(r);
|
|
1070
1079
|
}
|
|
1071
|
-
function
|
|
1080
|
+
function Pe(r) {
|
|
1072
1081
|
if (!u)
|
|
1073
1082
|
throw new Error("useOnDisconnected must be called during component render");
|
|
1074
|
-
if (
|
|
1083
|
+
if (g()) return;
|
|
1075
1084
|
w(u);
|
|
1076
1085
|
const e = u._hookCallbacks;
|
|
1077
1086
|
e.onDisconnected || (e.onDisconnected = []), e.onDisconnected.push(r);
|
|
1078
1087
|
}
|
|
1079
|
-
function
|
|
1088
|
+
function He(r) {
|
|
1080
1089
|
if (!u)
|
|
1081
1090
|
throw new Error(
|
|
1082
1091
|
"useOnAttributeChanged must be called during component render"
|
|
1083
1092
|
);
|
|
1084
|
-
if (
|
|
1093
|
+
if (g()) return;
|
|
1085
1094
|
w(u);
|
|
1086
1095
|
const e = u._hookCallbacks;
|
|
1087
1096
|
e.onAttributeChanged || (e.onAttributeChanged = []), e.onAttributeChanged.push(r);
|
|
@@ -1089,18 +1098,18 @@ function Pe(r) {
|
|
|
1089
1098
|
function Ie(r) {
|
|
1090
1099
|
if (!u)
|
|
1091
1100
|
throw new Error("useOnError must be called during component render");
|
|
1092
|
-
if (
|
|
1101
|
+
if (g()) return;
|
|
1093
1102
|
w(u);
|
|
1094
1103
|
const e = u._hookCallbacks;
|
|
1095
1104
|
e.onError || (e.onError = []), e.onError.push((n) => {
|
|
1096
1105
|
try {
|
|
1097
1106
|
n instanceof Error ? r(n) : r(new Error(String(n)));
|
|
1098
1107
|
} catch (t) {
|
|
1099
|
-
|
|
1108
|
+
N("[useOnError] The error handler itself threw an exception:", t);
|
|
1100
1109
|
}
|
|
1101
1110
|
});
|
|
1102
1111
|
}
|
|
1103
|
-
function
|
|
1112
|
+
function oe(r) {
|
|
1104
1113
|
if (!u)
|
|
1105
1114
|
throw new Error("useProps must be called during component render");
|
|
1106
1115
|
w(u);
|
|
@@ -1123,16 +1132,16 @@ function se(r) {
|
|
|
1123
1132
|
enumerable: !0,
|
|
1124
1133
|
get() {
|
|
1125
1134
|
try {
|
|
1126
|
-
const
|
|
1127
|
-
if (
|
|
1128
|
-
const
|
|
1129
|
-
if (
|
|
1135
|
+
const c = n && n._host;
|
|
1136
|
+
if (c) {
|
|
1137
|
+
const h = te(o), p = c.getAttribute(h);
|
|
1138
|
+
if (p !== null) {
|
|
1130
1139
|
const f = typeof r[o];
|
|
1131
|
-
return f === "boolean" ?
|
|
1140
|
+
return f === "boolean" ? p === "" || p === "true" : f === "number" ? Number(p) : p;
|
|
1132
1141
|
}
|
|
1133
|
-
if (typeof
|
|
1134
|
-
const f =
|
|
1135
|
-
if (
|
|
1142
|
+
if (typeof c[o] < "u") {
|
|
1143
|
+
const f = c[o];
|
|
1144
|
+
if (b(f) || f && typeof f == "object" && "value" in f && !(typeof Node < "u" && f instanceof Node))
|
|
1136
1145
|
return f.value;
|
|
1137
1146
|
const P = typeof r[o];
|
|
1138
1147
|
if (!(P === "string" && f && typeof f == "object"))
|
|
@@ -1143,8 +1152,8 @@ function se(r) {
|
|
|
1143
1152
|
}
|
|
1144
1153
|
return l;
|
|
1145
1154
|
},
|
|
1146
|
-
set(
|
|
1147
|
-
l =
|
|
1155
|
+
set(c) {
|
|
1156
|
+
l = c;
|
|
1148
1157
|
}
|
|
1149
1158
|
});
|
|
1150
1159
|
} catch {
|
|
@@ -1159,22 +1168,22 @@ function se(r) {
|
|
|
1159
1168
|
try {
|
|
1160
1169
|
const l = n && n._host;
|
|
1161
1170
|
if (l) {
|
|
1162
|
-
if (l instanceof HTMLElement || typeof l.getAttribute == "function" && typeof l.hasAttribute == "function") {
|
|
1163
|
-
const
|
|
1164
|
-
if (
|
|
1165
|
-
return typeof i == "boolean" ?
|
|
1171
|
+
if (typeof HTMLElement < "u" && l instanceof HTMLElement || typeof l.getAttribute == "function" && typeof l.hasAttribute == "function") {
|
|
1172
|
+
const h = o.replace(/([A-Z])/g, "-$1").toLowerCase(), p = l.getAttribute(h);
|
|
1173
|
+
if (p !== null)
|
|
1174
|
+
return typeof i == "boolean" ? p === "" || p === "true" : typeof i == "number" ? Number(p) : p;
|
|
1166
1175
|
}
|
|
1167
|
-
const
|
|
1168
|
-
if (typeof
|
|
1169
|
-
const
|
|
1170
|
-
if (!(typeof i == "string" &&
|
|
1171
|
-
return typeof i == "boolean" && i === !1 &&
|
|
1176
|
+
const c = l[o];
|
|
1177
|
+
if (typeof c < "u" && c !== "") {
|
|
1178
|
+
const h = c && typeof c == "object" && "value" in c && !(typeof Node < "u" && c instanceof Node);
|
|
1179
|
+
if (!(typeof i == "string" && c && typeof c == "object" && !h && !b(c)))
|
|
1180
|
+
return typeof i == "boolean" && i === !1 && c === "" ? i : b(c) || h ? c.value : typeof i == "boolean" && typeof c == "string" ? c === "" || c === "true" : typeof i == "number" && typeof c == "string" && !Number.isNaN(Number(c)) ? Number(c) : c;
|
|
1172
1181
|
}
|
|
1173
1182
|
}
|
|
1174
1183
|
} catch {
|
|
1175
1184
|
}
|
|
1176
|
-
const
|
|
1177
|
-
return typeof i == "boolean" &&
|
|
1185
|
+
const a = n[o];
|
|
1186
|
+
return typeof i == "boolean" && a === "" ? i === !1 ? i : !0 : b(a) || a && typeof a == "object" && "value" in a && !(typeof Node < "u" && a instanceof Node) ? a.value : a != null && a !== "" ? typeof i == "boolean" && typeof a == "string" ? a === "true" : typeof i == "number" && typeof a == "string" && !Number.isNaN(Number(a)) ? Number(a) : a : i;
|
|
1178
1187
|
},
|
|
1179
1188
|
has(s, o) {
|
|
1180
1189
|
return typeof o == "string" && (o in n || o in r);
|
|
@@ -1189,10 +1198,10 @@ function se(r) {
|
|
|
1189
1198
|
}
|
|
1190
1199
|
});
|
|
1191
1200
|
}
|
|
1192
|
-
function
|
|
1201
|
+
function je(r) {
|
|
1193
1202
|
if (!u)
|
|
1194
1203
|
throw new Error("useStyle must be called during component render");
|
|
1195
|
-
if (!
|
|
1204
|
+
if (!g()) {
|
|
1196
1205
|
w(u);
|
|
1197
1206
|
try {
|
|
1198
1207
|
const e = r();
|
|
@@ -1213,7 +1222,7 @@ function He(r) {
|
|
|
1213
1222
|
}
|
|
1214
1223
|
}
|
|
1215
1224
|
const W = /* @__PURE__ */ new Map();
|
|
1216
|
-
function
|
|
1225
|
+
function Le(r) {
|
|
1217
1226
|
let e;
|
|
1218
1227
|
try {
|
|
1219
1228
|
e = r();
|
|
@@ -1238,7 +1247,7 @@ function je(r) {
|
|
|
1238
1247
|
function Ue(r) {
|
|
1239
1248
|
if (!u)
|
|
1240
1249
|
throw new Error("useDesignTokens must be called during component render");
|
|
1241
|
-
if (
|
|
1250
|
+
if (g()) return;
|
|
1242
1251
|
const e = [], n = {
|
|
1243
1252
|
primary: "--cer-color-primary-500",
|
|
1244
1253
|
secondary: "--cer-color-secondary-500",
|
|
@@ -1252,34 +1261,34 @@ function Ue(r) {
|
|
|
1252
1261
|
fontSerif: "--cer-font-serif",
|
|
1253
1262
|
fontMono: "--cer-font-mono"
|
|
1254
1263
|
};
|
|
1255
|
-
for (const [l,
|
|
1256
|
-
|
|
1264
|
+
for (const [l, c] of Object.entries(r))
|
|
1265
|
+
c !== void 0 && (l in n ? e.push(`${n[l]}:${c}`) : l in t ? e.push(`${t[l]}:${c}`) : l.startsWith("--") && e.push(`${l}:${c}`));
|
|
1257
1266
|
if (e.length === 0) return;
|
|
1258
|
-
const s = `:host{${e.join(";")}}`, i = u._computedStyle ?? "",
|
|
1267
|
+
const s = `:host{${e.join(";")}}`, i = u._computedStyle ?? "", a = i ? `${i}
|
|
1259
1268
|
${s}` : s;
|
|
1260
1269
|
Object.defineProperty(u, "_computedStyle", {
|
|
1261
|
-
value:
|
|
1270
|
+
value: a,
|
|
1262
1271
|
writable: !0,
|
|
1263
1272
|
enumerable: !1,
|
|
1264
1273
|
configurable: !0
|
|
1265
1274
|
});
|
|
1266
1275
|
}
|
|
1267
|
-
function
|
|
1276
|
+
function Fe(r, e) {
|
|
1268
1277
|
if (!u)
|
|
1269
1278
|
throw new Error("provide must be called during component render");
|
|
1270
|
-
if (
|
|
1279
|
+
if (g()) return;
|
|
1271
1280
|
const n = u;
|
|
1272
|
-
n[
|
|
1281
|
+
n[S] || Object.defineProperty(n, S, {
|
|
1273
1282
|
value: /* @__PURE__ */ new Map(),
|
|
1274
1283
|
writable: !1,
|
|
1275
1284
|
enumerable: !1,
|
|
1276
1285
|
configurable: !0
|
|
1277
|
-
}), n[
|
|
1286
|
+
}), n[S].set(r, e);
|
|
1278
1287
|
}
|
|
1279
|
-
function
|
|
1288
|
+
function We(r, e) {
|
|
1280
1289
|
if (!u)
|
|
1281
1290
|
throw new Error("inject must be called during component render");
|
|
1282
|
-
if (
|
|
1291
|
+
if (g()) return e;
|
|
1283
1292
|
try {
|
|
1284
1293
|
const n = u._host;
|
|
1285
1294
|
if (n) {
|
|
@@ -1288,21 +1297,21 @@ function Fe(r, e) {
|
|
|
1288
1297
|
let s = 0;
|
|
1289
1298
|
const o = 50;
|
|
1290
1299
|
for (; t && s < o; )
|
|
1291
|
-
if (s++, t instanceof ShadowRoot) {
|
|
1292
|
-
const i = t.host,
|
|
1293
|
-
if (
|
|
1294
|
-
const
|
|
1295
|
-
if (
|
|
1296
|
-
return
|
|
1300
|
+
if (s++, typeof ShadowRoot < "u" && t instanceof ShadowRoot) {
|
|
1301
|
+
const i = t.host, a = i.context;
|
|
1302
|
+
if (a) {
|
|
1303
|
+
const c = a[S];
|
|
1304
|
+
if (c?.has(r))
|
|
1305
|
+
return c.get(r);
|
|
1297
1306
|
}
|
|
1298
1307
|
if (t = i.parentNode ?? i.getRootNode(), t === document || t === i) break;
|
|
1299
1308
|
} else {
|
|
1300
|
-
if (t instanceof Element) {
|
|
1309
|
+
if (typeof Element < "u" && t instanceof Element) {
|
|
1301
1310
|
const l = t.context;
|
|
1302
1311
|
if (l) {
|
|
1303
|
-
const
|
|
1304
|
-
if (
|
|
1305
|
-
return
|
|
1312
|
+
const c = l[S];
|
|
1313
|
+
if (c?.has(r))
|
|
1314
|
+
return c.get(r);
|
|
1306
1315
|
}
|
|
1307
1316
|
}
|
|
1308
1317
|
const i = t;
|
|
@@ -1313,7 +1322,7 @@ function Fe(r, e) {
|
|
|
1313
1322
|
}
|
|
1314
1323
|
return e;
|
|
1315
1324
|
}
|
|
1316
|
-
function
|
|
1325
|
+
function $e(r) {
|
|
1317
1326
|
return (e) => {
|
|
1318
1327
|
const n = e ?? u;
|
|
1319
1328
|
if (!n)
|
|
@@ -1329,10 +1338,10 @@ function We(r) {
|
|
|
1329
1338
|
}
|
|
1330
1339
|
};
|
|
1331
1340
|
}
|
|
1332
|
-
function
|
|
1341
|
+
function Ve(r) {
|
|
1333
1342
|
if (!u)
|
|
1334
1343
|
throw new Error("useExpose must be called during component render");
|
|
1335
|
-
if (
|
|
1344
|
+
if (g()) return;
|
|
1336
1345
|
w(u);
|
|
1337
1346
|
const e = u._hookCallbacks;
|
|
1338
1347
|
e.expose = { ...e.expose ?? {}, ...r };
|
|
@@ -1344,10 +1353,10 @@ function $e(r) {
|
|
|
1344
1353
|
} catch {
|
|
1345
1354
|
}
|
|
1346
1355
|
}
|
|
1347
|
-
function
|
|
1356
|
+
function ze() {
|
|
1348
1357
|
if (!u)
|
|
1349
1358
|
throw new Error("useSlots must be called during component render");
|
|
1350
|
-
if (
|
|
1359
|
+
if (g())
|
|
1351
1360
|
return { has: () => !1, getNodes: () => [], names: () => [] };
|
|
1352
1361
|
const r = u._host, e = () => {
|
|
1353
1362
|
const n = /* @__PURE__ */ new Map();
|
|
@@ -1383,20 +1392,20 @@ function Ve() {
|
|
|
1383
1392
|
}
|
|
1384
1393
|
};
|
|
1385
1394
|
}
|
|
1386
|
-
function
|
|
1395
|
+
function qe(...r) {
|
|
1387
1396
|
if (!u)
|
|
1388
1397
|
throw new Error("defineModel must be called during component render");
|
|
1389
|
-
const e = r.length === 2 ? r[0] : "modelValue", n = r.length === 2 ? r[1] : r.length === 1 ? r[0] : void 0, t =
|
|
1398
|
+
const e = r.length === 2 ? r[0] : "modelValue", n = r.length === 2 ? r[1] : r.length === 1 ? r[0] : void 0, t = oe({
|
|
1390
1399
|
[e]: n
|
|
1391
|
-
}), o =
|
|
1392
|
-
const
|
|
1393
|
-
return typeof
|
|
1400
|
+
}), o = g() ? null : (() => {
|
|
1401
|
+
const a = u.emit;
|
|
1402
|
+
return typeof a != "function" ? null : a;
|
|
1394
1403
|
})(), i = {
|
|
1395
1404
|
get value() {
|
|
1396
1405
|
return t[e];
|
|
1397
1406
|
},
|
|
1398
|
-
set value(
|
|
1399
|
-
o && o(`update:${e}`,
|
|
1407
|
+
set value(a) {
|
|
1408
|
+
o && o(`update:${e}`, a);
|
|
1400
1409
|
}
|
|
1401
1410
|
};
|
|
1402
1411
|
try {
|
|
@@ -1410,56 +1419,56 @@ function ze(...r) {
|
|
|
1410
1419
|
return i;
|
|
1411
1420
|
}
|
|
1412
1421
|
export {
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1422
|
+
me as A,
|
|
1423
|
+
ge as B,
|
|
1424
|
+
Ee as C,
|
|
1416
1425
|
te as D,
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1426
|
+
_e as E,
|
|
1427
|
+
ye as F,
|
|
1428
|
+
ve as G,
|
|
1420
1429
|
F as H,
|
|
1421
|
-
|
|
1430
|
+
Me as I,
|
|
1422
1431
|
K as J,
|
|
1423
1432
|
B as K,
|
|
1424
1433
|
R as L,
|
|
1425
|
-
|
|
1426
|
-
|
|
1434
|
+
de as M,
|
|
1435
|
+
fe as N,
|
|
1427
1436
|
q as O,
|
|
1428
1437
|
ke as P,
|
|
1429
|
-
|
|
1438
|
+
g as Q,
|
|
1430
1439
|
x as R,
|
|
1431
|
-
|
|
1440
|
+
be as S,
|
|
1432
1441
|
De as T,
|
|
1433
|
-
|
|
1442
|
+
Ne as U,
|
|
1434
1443
|
Te as V,
|
|
1435
|
-
|
|
1444
|
+
we as W,
|
|
1436
1445
|
z as X,
|
|
1437
1446
|
Ce as Y,
|
|
1438
|
-
|
|
1439
|
-
|
|
1447
|
+
Ve as a,
|
|
1448
|
+
oe as b,
|
|
1440
1449
|
d as c,
|
|
1441
|
-
|
|
1442
|
-
|
|
1450
|
+
pe as d,
|
|
1451
|
+
$e as e,
|
|
1443
1452
|
y as f,
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1453
|
+
Re as g,
|
|
1454
|
+
qe as h,
|
|
1455
|
+
xe as i,
|
|
1456
|
+
ue as j,
|
|
1457
|
+
We as k,
|
|
1458
|
+
b as l,
|
|
1459
|
+
Se as m,
|
|
1460
|
+
le as n,
|
|
1452
1461
|
Ue as o,
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1462
|
+
Fe as p,
|
|
1463
|
+
Ae as q,
|
|
1464
|
+
he as r,
|
|
1465
|
+
ce as s,
|
|
1466
|
+
Le as t,
|
|
1458
1467
|
Ie as u,
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1468
|
+
He as v,
|
|
1469
|
+
Oe as w,
|
|
1470
|
+
Pe as x,
|
|
1471
|
+
ze as y,
|
|
1472
|
+
je as z
|
|
1464
1473
|
};
|
|
1465
|
-
//# sourceMappingURL=hooks-
|
|
1474
|
+
//# sourceMappingURL=hooks-BH-CpUun.js.map
|