webim-adapter 0.24.0 → 0.26.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/build/webim-adapter.js +248 -125
- package/build/webim-embed.js +8 -8
- package/build/webim-ssr.js +417 -294
- package/package.json +1 -1
package/build/webim-ssr.js
CHANGED
|
@@ -233,26 +233,26 @@ function D(e) {
|
|
|
233
233
|
delete t.textStrokeWidth, delete t.textStrokeColor, (oe !== void 0 || z !== void 0) && (t.WebkitTextStroke = `${T(oe ?? 1)} ${z || "currentColor"}`);
|
|
234
234
|
let { clipText: B } = t;
|
|
235
235
|
delete t.clipText, B && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
|
|
236
|
-
let { transitions: se, transitionDuration: ce, transitionEasing: le, transitionProperty:
|
|
236
|
+
let { transitions: se, transitionDuration: ce, transitionEasing: le, transitionProperty: ue } = t, V = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
|
|
237
237
|
delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
|
|
238
|
-
let
|
|
239
|
-
if (ce !== void 0 &&
|
|
238
|
+
let H = (Array.isArray(se) ? se : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${V(e.duration ?? 200)} ${e.easing || "ease"}`);
|
|
239
|
+
if (ce !== void 0 && H.push(`${ue || "all"} ${V(ce)} ${le || "ease"}`), H.length && (t.transition = H.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
|
|
240
240
|
let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
|
|
241
241
|
t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
|
|
242
242
|
}
|
|
243
243
|
delete t.backgroundVideo;
|
|
244
|
-
let { overlayColor:
|
|
245
|
-
if (delete t.overlayColor, delete t.overlayOpacity,
|
|
246
|
-
let e = `color-mix(in srgb, ${
|
|
244
|
+
let { overlayColor: U, overlayOpacity: de } = t;
|
|
245
|
+
if (delete t.overlayColor, delete t.overlayOpacity, U) {
|
|
246
|
+
let e = `color-mix(in srgb, ${U} ${de ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
|
|
247
247
|
t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
|
|
248
248
|
}
|
|
249
249
|
t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
|
|
250
|
-
let { backgroundLayers:
|
|
250
|
+
let { backgroundLayers: fe } = t;
|
|
251
251
|
delete t.backgroundLayers;
|
|
252
|
-
let
|
|
253
|
-
if (
|
|
252
|
+
let W = (Array.isArray(fe) ? fe : []).filter((e) => e && e.on !== !1);
|
|
253
|
+
if (W.length) {
|
|
254
254
|
let e = [], n = [], r = [], i = [], a = [];
|
|
255
|
-
for (let t of
|
|
255
|
+
for (let t of W) if (t.kind === "linear") e.push(`linear-gradient(${t.angle ?? 180}deg, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
256
256
|
else if (t.kind === "radial") e.push(`radial-gradient(circle, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
257
257
|
else {
|
|
258
258
|
if (!t.src) continue;
|
|
@@ -336,7 +336,9 @@ function re(e, t) {
|
|
|
336
336
|
}
|
|
337
337
|
var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", L = {
|
|
338
338
|
light: {
|
|
339
|
-
background: "#
|
|
339
|
+
background: "#f2f2f2",
|
|
340
|
+
surface: "#f2f2f2",
|
|
341
|
+
border: "#d1d5db",
|
|
340
342
|
text: "#111827",
|
|
341
343
|
accent: "#111827",
|
|
342
344
|
accentText: "#ffffff",
|
|
@@ -355,6 +357,8 @@ var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
355
357
|
},
|
|
356
358
|
dark: {
|
|
357
359
|
background: "#0f172a",
|
|
360
|
+
surface: "#1e293b",
|
|
361
|
+
border: "rgba(226, 232, 240, 0.18)",
|
|
358
362
|
text: "#e2e8f0",
|
|
359
363
|
accent: "#6366f1",
|
|
360
364
|
accentText: "#ffffff",
|
|
@@ -425,6 +429,8 @@ function z(e) {
|
|
|
425
429
|
function B(e) {
|
|
426
430
|
return {
|
|
427
431
|
"--page-bg": e.background,
|
|
432
|
+
"--page-surface": e.surface ?? e.background,
|
|
433
|
+
"--page-border": e.border ?? L.light.border,
|
|
428
434
|
"--page-text": e.text,
|
|
429
435
|
"--page-accent": e.accent,
|
|
430
436
|
"--page-accent-text": e.accentText,
|
|
@@ -457,6 +463,9 @@ function ce(e, t = "light") {
|
|
|
457
463
|
function le(e, t) {
|
|
458
464
|
return e?.themeRef && t?.[e.themeRef] || e?.theme;
|
|
459
465
|
}
|
|
466
|
+
function ue(e, t) {
|
|
467
|
+
return e === "light" || e === "dark" ? e : t === "light" || t === "dark" ? t : "auto";
|
|
468
|
+
}
|
|
460
469
|
//#endregion
|
|
461
470
|
//#region ../ui/src/components/builder/views.jsx
|
|
462
471
|
var V = n({
|
|
@@ -470,23 +479,23 @@ var V = n({
|
|
|
470
479
|
if (typeof window > "u") return 1;
|
|
471
480
|
let n = Number(new URLSearchParams(window.location.search).get("page"));
|
|
472
481
|
return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
|
|
473
|
-
},
|
|
482
|
+
}, de = () => {
|
|
474
483
|
if (typeof window > "u") return {};
|
|
475
484
|
let e = {};
|
|
476
485
|
return new URLSearchParams(window.location.search).forEach((t, n) => {
|
|
477
486
|
n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
|
|
478
487
|
}), e;
|
|
479
|
-
},
|
|
488
|
+
}, fe = (e) => {
|
|
480
489
|
let t = {
|
|
481
490
|
...e && typeof e == "object" && !Array.isArray(e) ? e : {},
|
|
482
|
-
...
|
|
491
|
+
...de()
|
|
483
492
|
};
|
|
484
493
|
return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
|
|
485
|
-
}, W = n(null),
|
|
494
|
+
}, W = n(null), pe = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
486
495
|
function G(e, t) {
|
|
487
496
|
if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
|
|
488
497
|
}
|
|
489
|
-
var
|
|
498
|
+
var me = (e) => {
|
|
490
499
|
let t = [];
|
|
491
500
|
for (let [n, r] of Object.entries(e ?? {})) {
|
|
492
501
|
if (!/^[\w-]+$/.test(n)) continue;
|
|
@@ -499,33 +508,33 @@ var pe = (e) => {
|
|
|
499
508
|
function K(e) {
|
|
500
509
|
return e == null ? "" : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "object" && !Array.isArray(e) && ("label" in e || "name" in e || "slug" in e) ? String(e.label ?? e.name ?? e.slug ?? "") : typeof e == "object" && !Array.isArray(e) && Number.isFinite(Number(e.lat)) && Number.isFinite(Number(e.lng)) ? `${e.lat}, ${e.lng}` : Array.isArray(e) ? e.map((e) => typeof e == "string" ? e : Array.isArray(e?.parts) ? e.parts.map((e) => e?.text ?? "").join("") : Array.isArray(e?.items) ? e.items.map((e) => e?.text ?? "").join(" ") : e && (e.label != null || e.name != null || e.slug != null) ? String(e.label ?? e.name ?? e.slug) : "").filter(Boolean).join(" ") : "";
|
|
501
510
|
}
|
|
502
|
-
function
|
|
503
|
-
let n = t?.data ?? {}, r =
|
|
511
|
+
function he(e, t) {
|
|
512
|
+
let n = t?.data ?? {}, r = me(n);
|
|
504
513
|
if (!r.length) return e;
|
|
505
|
-
let i = RegExp(`:(${r.map(
|
|
514
|
+
let i = RegExp(`:(${r.map(pe).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => K(G(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
|
|
506
515
|
return a(e);
|
|
507
516
|
}
|
|
508
|
-
var
|
|
517
|
+
var ge = {
|
|
509
518
|
margin: 0,
|
|
510
519
|
fontWeight: 700,
|
|
511
520
|
lineHeight: 1.2,
|
|
512
521
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
513
|
-
},
|
|
522
|
+
}, _e = { margin: 0 }, q = {
|
|
514
523
|
display: "inline-block",
|
|
515
524
|
textDecoration: "none",
|
|
516
525
|
cursor: "pointer",
|
|
517
526
|
backgroundColor: "var(--page-accent, #111827)",
|
|
518
527
|
color: "var(--page-accent-text, #ffffff)"
|
|
519
|
-
},
|
|
528
|
+
}, ve = {
|
|
520
529
|
flexGrow: 1,
|
|
521
530
|
display: "flex",
|
|
522
531
|
flexDirection: "column",
|
|
523
532
|
position: "relative"
|
|
524
|
-
},
|
|
533
|
+
}, ye = {
|
|
525
534
|
display: "flex",
|
|
526
535
|
flexDirection: "column"
|
|
527
536
|
};
|
|
528
|
-
function
|
|
537
|
+
function be({ style: e }) {
|
|
529
538
|
let t = e?.backgroundVideo;
|
|
530
539
|
if (!t) return null;
|
|
531
540
|
let n = {
|
|
@@ -551,7 +560,7 @@ function ye({ style: e }) {
|
|
|
551
560
|
background: r
|
|
552
561
|
} })] });
|
|
553
562
|
}
|
|
554
|
-
var
|
|
563
|
+
var xe = (e, t) => e?.backgroundVideo ? {
|
|
555
564
|
position: "relative",
|
|
556
565
|
...t,
|
|
557
566
|
...D(e)
|
|
@@ -559,24 +568,24 @@ var be = (e, t) => e?.backgroundVideo ? {
|
|
|
559
568
|
...t,
|
|
560
569
|
...D(e)
|
|
561
570
|
};
|
|
562
|
-
function
|
|
571
|
+
function Se({ style: e, nodeRef: t, children: n }) {
|
|
563
572
|
return /* @__PURE__ */ f("div", {
|
|
564
573
|
ref: t,
|
|
565
574
|
style: {
|
|
566
|
-
...
|
|
575
|
+
...ve,
|
|
567
576
|
...D(e)
|
|
568
577
|
},
|
|
569
|
-
children: [/* @__PURE__ */ d(
|
|
578
|
+
children: [/* @__PURE__ */ d(be, { style: e }), n]
|
|
570
579
|
});
|
|
571
580
|
}
|
|
572
|
-
function
|
|
581
|
+
function Ce({ style: e, nodeRef: t, children: n }) {
|
|
573
582
|
return /* @__PURE__ */ f("section", {
|
|
574
583
|
ref: t,
|
|
575
|
-
style:
|
|
576
|
-
children: [/* @__PURE__ */ d(
|
|
584
|
+
style: xe(e, ye),
|
|
585
|
+
children: [/* @__PURE__ */ d(be, { style: e }), n]
|
|
577
586
|
});
|
|
578
587
|
}
|
|
579
|
-
function
|
|
588
|
+
function we({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
580
589
|
let i = t ? {
|
|
581
590
|
position: "relative",
|
|
582
591
|
minHeight: 240
|
|
@@ -585,32 +594,32 @@ function Ce({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
|
585
594
|
ref: n,
|
|
586
595
|
style: i ? {
|
|
587
596
|
...i,
|
|
588
|
-
...
|
|
589
|
-
} :
|
|
590
|
-
children: [/* @__PURE__ */ d(
|
|
597
|
+
...xe(e)
|
|
598
|
+
} : xe(e),
|
|
599
|
+
children: [/* @__PURE__ */ d(be, { style: e }), r]
|
|
591
600
|
});
|
|
592
601
|
}
|
|
593
|
-
function
|
|
602
|
+
function Te({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
|
|
594
603
|
return /* @__PURE__ */ d(n, {
|
|
595
604
|
ref: a,
|
|
596
605
|
style: {
|
|
597
|
-
...
|
|
606
|
+
...ge,
|
|
598
607
|
...D(r)
|
|
599
608
|
},
|
|
600
609
|
children: J(t, e, i)
|
|
601
610
|
});
|
|
602
611
|
}
|
|
603
|
-
var
|
|
612
|
+
var Ee = {
|
|
604
613
|
fontFamily: R.mono.value,
|
|
605
614
|
background: "rgba(148, 163, 184, 0.18)",
|
|
606
615
|
padding: "1px 5px",
|
|
607
616
|
borderRadius: 4,
|
|
608
617
|
fontSize: "0.9em"
|
|
609
618
|
};
|
|
610
|
-
function
|
|
619
|
+
function De(e, t = [], n, r) {
|
|
611
620
|
let i = e;
|
|
612
621
|
return t.includes("sup") ? i = /* @__PURE__ */ d("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ d("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ d("code", {
|
|
613
|
-
style:
|
|
622
|
+
style: Ee,
|
|
614
623
|
children: i
|
|
615
624
|
})), t.includes("strike") && (i = /* @__PURE__ */ d("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ d("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ d("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ d("strong", { children: i })), n && (i = /* @__PURE__ */ d("a", {
|
|
616
625
|
href: n,
|
|
@@ -626,7 +635,7 @@ function J(e, n, r) {
|
|
|
626
635
|
if (e.parts) return /* @__PURE__ */ d(t, { children: J(e.parts, "", r) }, n);
|
|
627
636
|
let i = e.text;
|
|
628
637
|
return e.sup ? i = /* @__PURE__ */ d("sup", { children: i }) : e.sub && (i = /* @__PURE__ */ d("sub", { children: i })), e.code && (i = /* @__PURE__ */ d("code", {
|
|
629
|
-
style:
|
|
638
|
+
style: Ee,
|
|
630
639
|
children: i
|
|
631
640
|
})), e.strike && (i = /* @__PURE__ */ d("s", { children: i })), e.underline && (i = /* @__PURE__ */ d("u", { children: i })), e.italic && (i = /* @__PURE__ */ d("em", { children: i })), e.bold && (i = /* @__PURE__ */ d("strong", { children: i })), (e.color || e.background) && (i = /* @__PURE__ */ d("span", {
|
|
632
641
|
style: {
|
|
@@ -643,13 +652,13 @@ function J(e, n, r) {
|
|
|
643
652
|
})), /* @__PURE__ */ d(t, { children: i }, n);
|
|
644
653
|
}) : n;
|
|
645
654
|
}
|
|
646
|
-
function
|
|
655
|
+
function Oe({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
|
|
647
656
|
return /* @__PURE__ */ d("span", {
|
|
648
657
|
style: D(a),
|
|
649
|
-
children: e?.length ? J(e, t) :
|
|
658
|
+
children: e?.length ? J(e, t) : De(t, n, r, i)
|
|
650
659
|
});
|
|
651
660
|
}
|
|
652
|
-
var
|
|
661
|
+
var ke = {
|
|
653
662
|
h1: 40,
|
|
654
663
|
h2: 32,
|
|
655
664
|
h3: 26,
|
|
@@ -657,7 +666,7 @@ var Oe = {
|
|
|
657
666
|
h5: 19,
|
|
658
667
|
h6: 16
|
|
659
668
|
};
|
|
660
|
-
function
|
|
669
|
+
function Ae({ align: e = "center", width: t, wrap: n } = {}) {
|
|
661
670
|
let r = t ? `${t}%` : void 0;
|
|
662
671
|
if (e === "full") return { width: "100%" };
|
|
663
672
|
let i = e === "left" || e === "right";
|
|
@@ -691,7 +700,7 @@ function ke({ align: e = "center", width: t, wrap: n } = {}) {
|
|
|
691
700
|
marginRight: "auto"
|
|
692
701
|
};
|
|
693
702
|
}
|
|
694
|
-
function
|
|
703
|
+
function je(e = [], t, n) {
|
|
695
704
|
let r = n ?? ((e, n) => J(e, n, t));
|
|
696
705
|
return e.map((t, n) => {
|
|
697
706
|
let i = {
|
|
@@ -714,7 +723,7 @@ function Ae(e = [], t, n) {
|
|
|
714
723
|
marginLeft: 0,
|
|
715
724
|
marginRight: 0,
|
|
716
725
|
...i,
|
|
717
|
-
...
|
|
726
|
+
...Ae(t)
|
|
718
727
|
},
|
|
719
728
|
children: [t.href ? /* @__PURE__ */ d("a", {
|
|
720
729
|
href: t.href,
|
|
@@ -733,16 +742,16 @@ function Ae(e = [], t, n) {
|
|
|
733
742
|
})]
|
|
734
743
|
}, n);
|
|
735
744
|
}
|
|
736
|
-
if (t.type === "video") return
|
|
745
|
+
if (t.type === "video") return He(t.url) ? /* @__PURE__ */ d("div", {
|
|
737
746
|
style: {
|
|
738
747
|
...i,
|
|
739
|
-
...
|
|
748
|
+
...Ae({
|
|
740
749
|
align: t.align,
|
|
741
750
|
wrap: t.wrap,
|
|
742
751
|
width: t.width ?? 100
|
|
743
752
|
})
|
|
744
753
|
},
|
|
745
|
-
children: /* @__PURE__ */ d(
|
|
754
|
+
children: /* @__PURE__ */ d(Ue, {
|
|
746
755
|
url: t.url,
|
|
747
756
|
autoplay: t.autoplay,
|
|
748
757
|
muted: t.muted,
|
|
@@ -804,17 +813,17 @@ function Ae(e = [], t, n) {
|
|
|
804
813
|
}
|
|
805
814
|
if (t.type === "quote") return /* @__PURE__ */ d("blockquote", {
|
|
806
815
|
style: {
|
|
807
|
-
...
|
|
816
|
+
...Ne,
|
|
808
817
|
...i
|
|
809
818
|
},
|
|
810
819
|
children: r(t.parts, t.text)
|
|
811
820
|
}, n);
|
|
812
|
-
if (
|
|
821
|
+
if (ke[t.type]) {
|
|
813
822
|
let e = t.type;
|
|
814
823
|
return /* @__PURE__ */ d(e, {
|
|
815
824
|
style: {
|
|
816
|
-
...
|
|
817
|
-
fontSize:
|
|
825
|
+
...ge,
|
|
826
|
+
fontSize: ke[t.type],
|
|
818
827
|
...i
|
|
819
828
|
},
|
|
820
829
|
children: r(t.parts, t.text)
|
|
@@ -822,39 +831,39 @@ function Ae(e = [], t, n) {
|
|
|
822
831
|
}
|
|
823
832
|
return /* @__PURE__ */ d("p", {
|
|
824
833
|
style: {
|
|
825
|
-
...
|
|
834
|
+
..._e,
|
|
826
835
|
...i
|
|
827
836
|
},
|
|
828
837
|
children: r(t.parts, t.text)
|
|
829
838
|
}, n);
|
|
830
839
|
});
|
|
831
840
|
}
|
|
832
|
-
function
|
|
841
|
+
function Me({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
833
842
|
return /* @__PURE__ */ d("div", {
|
|
834
843
|
ref: r,
|
|
835
844
|
style: {
|
|
836
845
|
display: "flow-root",
|
|
837
846
|
...D(t)
|
|
838
847
|
},
|
|
839
|
-
children:
|
|
848
|
+
children: je(e, n)
|
|
840
849
|
});
|
|
841
850
|
}
|
|
842
|
-
var
|
|
851
|
+
var Ne = {
|
|
843
852
|
margin: 0,
|
|
844
853
|
padding: "8px 0 8px 20px",
|
|
845
854
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
846
855
|
};
|
|
847
|
-
function
|
|
856
|
+
function Pe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
848
857
|
return /* @__PURE__ */ d("blockquote", {
|
|
849
858
|
ref: i,
|
|
850
859
|
style: {
|
|
851
|
-
...
|
|
860
|
+
...Ne,
|
|
852
861
|
...D(n)
|
|
853
862
|
},
|
|
854
863
|
children: J(t, e, r)
|
|
855
864
|
});
|
|
856
865
|
}
|
|
857
|
-
function
|
|
866
|
+
function Fe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
858
867
|
return /* @__PURE__ */ d(e ? "ol" : "ul", {
|
|
859
868
|
ref: r,
|
|
860
869
|
style: {
|
|
@@ -868,36 +877,36 @@ function Pe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
|
868
877
|
}, t))
|
|
869
878
|
});
|
|
870
879
|
}
|
|
871
|
-
function
|
|
880
|
+
function Ie({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
872
881
|
return /* @__PURE__ */ d("p", {
|
|
873
882
|
ref: i,
|
|
874
883
|
style: {
|
|
875
|
-
...
|
|
884
|
+
..._e,
|
|
876
885
|
...D(n)
|
|
877
886
|
},
|
|
878
887
|
children: J(t, e, r)
|
|
879
888
|
});
|
|
880
889
|
}
|
|
881
|
-
var
|
|
890
|
+
var Le = {
|
|
882
891
|
color: "var(--page-accent, inherit)",
|
|
883
892
|
textDecoration: "underline",
|
|
884
893
|
textUnderlineOffset: 3,
|
|
885
894
|
cursor: "pointer"
|
|
886
895
|
};
|
|
887
|
-
function
|
|
896
|
+
function Re({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
888
897
|
return /* @__PURE__ */ d("a", {
|
|
889
898
|
ref: o,
|
|
890
899
|
href: n || "#",
|
|
891
900
|
target: r || void 0,
|
|
892
901
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
893
902
|
style: {
|
|
894
|
-
...
|
|
903
|
+
...Le,
|
|
895
904
|
...D(i)
|
|
896
905
|
},
|
|
897
906
|
children: J(t, e, a)
|
|
898
907
|
});
|
|
899
908
|
}
|
|
900
|
-
function
|
|
909
|
+
function ze({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
901
910
|
return /* @__PURE__ */ d("a", {
|
|
902
911
|
ref: o,
|
|
903
912
|
href: n || "#",
|
|
@@ -910,7 +919,7 @@ function Re({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRe
|
|
|
910
919
|
children: J(t, e, a)
|
|
911
920
|
});
|
|
912
921
|
}
|
|
913
|
-
function
|
|
922
|
+
function Be({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
914
923
|
return e ? /* @__PURE__ */ d("img", {
|
|
915
924
|
ref: r,
|
|
916
925
|
src: e,
|
|
@@ -922,7 +931,7 @@ function ze({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
922
931
|
}
|
|
923
932
|
}) : null;
|
|
924
933
|
}
|
|
925
|
-
function
|
|
934
|
+
function Ve({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
|
|
926
935
|
return e ? /* @__PURE__ */ d("video", {
|
|
927
936
|
ref: s,
|
|
928
937
|
src: e,
|
|
@@ -940,9 +949,9 @@ function Be({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
940
949
|
}
|
|
941
950
|
}) : null;
|
|
942
951
|
}
|
|
943
|
-
var
|
|
944
|
-
function
|
|
945
|
-
let c =
|
|
952
|
+
var He = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
|
|
953
|
+
function Ue({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
|
|
954
|
+
let c = He(e);
|
|
946
955
|
if (!c) return null;
|
|
947
956
|
let l = new URLSearchParams({ rel: "0" });
|
|
948
957
|
return t && l.set("autoplay", "1"), (n || t) && l.set("mute", "1"), i || l.set("controls", "0"), r && (l.set("loop", "1"), l.set("playlist", c)), Number(a) > 0 && l.set("start", String(Math.floor(Number(a)))), /* @__PURE__ */ d("div", {
|
|
@@ -968,7 +977,7 @@ function He({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
968
977
|
})
|
|
969
978
|
});
|
|
970
979
|
}
|
|
971
|
-
function
|
|
980
|
+
function We({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
972
981
|
return e ? /* @__PURE__ */ d("iframe", {
|
|
973
982
|
ref: i,
|
|
974
983
|
src: e,
|
|
@@ -984,7 +993,7 @@ function Ue({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
984
993
|
}
|
|
985
994
|
}) : null;
|
|
986
995
|
}
|
|
987
|
-
function
|
|
996
|
+
function Ge({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
988
997
|
let [i, o] = l(null);
|
|
989
998
|
return a(() => {
|
|
990
999
|
i && (i.innerHTML = e || "", t && i.querySelectorAll("script").forEach((e) => {
|
|
@@ -1003,7 +1012,7 @@ function We({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
1003
1012
|
style: D(n)
|
|
1004
1013
|
});
|
|
1005
1014
|
}
|
|
1006
|
-
function
|
|
1015
|
+
function Ke({ height: e, nodeRef: t }) {
|
|
1007
1016
|
return /* @__PURE__ */ d("div", {
|
|
1008
1017
|
ref: t,
|
|
1009
1018
|
style: {
|
|
@@ -1013,7 +1022,7 @@ function Ge({ height: e, nodeRef: t }) {
|
|
|
1013
1022
|
}
|
|
1014
1023
|
});
|
|
1015
1024
|
}
|
|
1016
|
-
function
|
|
1025
|
+
function qe({ style: e, nodeRef: t }) {
|
|
1017
1026
|
return /* @__PURE__ */ d("div", {
|
|
1018
1027
|
ref: t,
|
|
1019
1028
|
style: {
|
|
@@ -1024,7 +1033,7 @@ function Ke({ style: e, nodeRef: t }) {
|
|
|
1024
1033
|
}
|
|
1025
1034
|
});
|
|
1026
1035
|
}
|
|
1027
|
-
var
|
|
1036
|
+
var Je = {
|
|
1028
1037
|
position: "absolute",
|
|
1029
1038
|
top: "50%",
|
|
1030
1039
|
transform: "translateY(-50%)",
|
|
@@ -1041,7 +1050,7 @@ var qe = {
|
|
|
1041
1050
|
alignItems: "center",
|
|
1042
1051
|
justifyContent: "center",
|
|
1043
1052
|
padding: 0
|
|
1044
|
-
},
|
|
1053
|
+
}, Ye = {
|
|
1045
1054
|
bottom: {
|
|
1046
1055
|
inset: "auto 0 0 0",
|
|
1047
1056
|
padding: "40px 24px 20px",
|
|
@@ -1060,8 +1069,8 @@ var qe = {
|
|
|
1060
1069
|
padding: 24,
|
|
1061
1070
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1062
1071
|
}
|
|
1063
|
-
},
|
|
1064
|
-
function
|
|
1072
|
+
}, Xe = 48;
|
|
1073
|
+
function Ze({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
|
|
1065
1074
|
let [p, m] = l(0), [h, g] = l(!1), [_, v] = l(null), y = e ? Math.min(p, e - 1) : 0;
|
|
1066
1075
|
if (a(() => {
|
|
1067
1076
|
if (!n || h || _ || e < 2) return;
|
|
@@ -1077,7 +1086,7 @@ function Xe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1077
1086
|
let b = (t) => m((t + e) % e), x = () => {
|
|
1078
1087
|
if (!_) return;
|
|
1079
1088
|
let { dx: e } = _;
|
|
1080
|
-
v(null), e < -48 ? b(y + 1) : e >
|
|
1089
|
+
v(null), e < -48 ? b(y + 1) : e > Xe && b(y - 1);
|
|
1081
1090
|
};
|
|
1082
1091
|
return /* @__PURE__ */ f("div", {
|
|
1083
1092
|
ref: c,
|
|
@@ -1125,7 +1134,7 @@ function Xe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1125
1134
|
type: "button",
|
|
1126
1135
|
"aria-label": "Previous slide",
|
|
1127
1136
|
style: {
|
|
1128
|
-
...
|
|
1137
|
+
...Je,
|
|
1129
1138
|
left: 12
|
|
1130
1139
|
},
|
|
1131
1140
|
onClick: () => b(y - 1),
|
|
@@ -1135,7 +1144,7 @@ function Xe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1135
1144
|
type: "button",
|
|
1136
1145
|
"aria-label": "Next slide",
|
|
1137
1146
|
style: {
|
|
1138
|
-
...
|
|
1147
|
+
...Je,
|
|
1139
1148
|
right: 12
|
|
1140
1149
|
},
|
|
1141
1150
|
onClick: () => b(y + 1),
|
|
@@ -1169,7 +1178,7 @@ function Xe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1169
1178
|
] })]
|
|
1170
1179
|
});
|
|
1171
1180
|
}
|
|
1172
|
-
var
|
|
1181
|
+
var Qe = (e, t) => ({
|
|
1173
1182
|
position: "absolute",
|
|
1174
1183
|
inset: 0,
|
|
1175
1184
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1177,18 +1186,18 @@ var Ze = (e, t) => ({
|
|
|
1177
1186
|
backgroundSize: "cover",
|
|
1178
1187
|
backgroundPosition: "center"
|
|
1179
1188
|
});
|
|
1180
|
-
function
|
|
1181
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1189
|
+
function $e({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1190
|
+
return e.length ? /* @__PURE__ */ d(Ze, {
|
|
1182
1191
|
...r,
|
|
1183
1192
|
count: e.length,
|
|
1184
1193
|
renderSlide: (r) => {
|
|
1185
1194
|
let i = e[r];
|
|
1186
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1195
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: Qe(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
|
|
1187
1196
|
style: {
|
|
1188
1197
|
position: "absolute",
|
|
1189
1198
|
color: "#fff",
|
|
1190
1199
|
textAlign: n,
|
|
1191
|
-
...
|
|
1200
|
+
...Ye[t] ?? Ye.bottom
|
|
1192
1201
|
},
|
|
1193
1202
|
children: [i.title && /* @__PURE__ */ d("div", {
|
|
1194
1203
|
style: {
|
|
@@ -1208,13 +1217,13 @@ function Qe({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1208
1217
|
}
|
|
1209
1218
|
}) : null;
|
|
1210
1219
|
}
|
|
1211
|
-
function
|
|
1212
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1220
|
+
function et({ slides: e = [], linked: t, ...n }) {
|
|
1221
|
+
return e.length ? /* @__PURE__ */ d(Ze, {
|
|
1213
1222
|
...n,
|
|
1214
1223
|
count: e.length,
|
|
1215
1224
|
renderSlide: (n) => {
|
|
1216
1225
|
let r = e[n];
|
|
1217
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1226
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: Qe(r.image, r.color) }), /* @__PURE__ */ d("div", {
|
|
1218
1227
|
style: {
|
|
1219
1228
|
position: "absolute",
|
|
1220
1229
|
inset: 0,
|
|
@@ -1226,7 +1235,7 @@ function $e({ slides: e = [], linked: t, ...n }) {
|
|
|
1226
1235
|
}
|
|
1227
1236
|
}) : null;
|
|
1228
1237
|
}
|
|
1229
|
-
function
|
|
1238
|
+
function tt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: i = !0, style: o, nodeRef: s, inert: c }) {
|
|
1230
1239
|
let p = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], m = Math.max(0, Number(n) || 0), h = c ? (e) => e.preventDefault() : void 0, [g, _] = l(null), v = i && !c && g !== null && p[g];
|
|
1231
1240
|
a(() => {
|
|
1232
1241
|
if (!v) return;
|
|
@@ -1425,19 +1434,19 @@ function et({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
|
|
|
1425
1434
|
]
|
|
1426
1435
|
});
|
|
1427
1436
|
}
|
|
1428
|
-
var
|
|
1437
|
+
var nt = {
|
|
1429
1438
|
color: "inherit",
|
|
1430
1439
|
textDecoration: "none",
|
|
1431
1440
|
fontSize: 14,
|
|
1432
1441
|
opacity: .85
|
|
1433
|
-
},
|
|
1434
|
-
background: "var(--page-
|
|
1442
|
+
}, rt = {
|
|
1443
|
+
background: "var(--page-surface, #f2f2f2)",
|
|
1435
1444
|
color: "var(--page-text, #111827)",
|
|
1436
1445
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1437
1446
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1438
1447
|
zIndex: 60
|
|
1439
1448
|
};
|
|
1440
|
-
function
|
|
1449
|
+
function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], style: s, nodeRef: c, menu: p = "auto", breakpoint: m = 768 }) {
|
|
1441
1450
|
let [h, g] = l(null), [_, v] = l(!1), [y, b] = l(!1), [x, S] = l(null);
|
|
1442
1451
|
a(() => {
|
|
1443
1452
|
if (!h) return;
|
|
@@ -1447,7 +1456,7 @@ function rt({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1447
1456
|
let C = p === "hamburger" || p === "auto" && _, w = (e, t) => /* @__PURE__ */ f("a", {
|
|
1448
1457
|
href: e.href || "#",
|
|
1449
1458
|
style: {
|
|
1450
|
-
...
|
|
1459
|
+
...nt,
|
|
1451
1460
|
display: "block",
|
|
1452
1461
|
...t
|
|
1453
1462
|
},
|
|
@@ -1535,7 +1544,7 @@ function rt({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1535
1544
|
let t = e.children ?? [];
|
|
1536
1545
|
if (!t.length) return /* @__PURE__ */ d("a", {
|
|
1537
1546
|
href: e.href || "#",
|
|
1538
|
-
style:
|
|
1547
|
+
style: nt,
|
|
1539
1548
|
children: e.label
|
|
1540
1549
|
}, e.key);
|
|
1541
1550
|
let n = e.type === "mega";
|
|
@@ -1549,7 +1558,7 @@ function rt({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1549
1558
|
children: [/* @__PURE__ */ f("a", {
|
|
1550
1559
|
href: e.href || "#",
|
|
1551
1560
|
style: {
|
|
1552
|
-
...
|
|
1561
|
+
...nt,
|
|
1553
1562
|
cursor: "pointer"
|
|
1554
1563
|
},
|
|
1555
1564
|
children: [
|
|
@@ -1565,7 +1574,7 @@ function rt({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1565
1574
|
]
|
|
1566
1575
|
}), x === e.key && (n ? /* @__PURE__ */ d("div", {
|
|
1567
1576
|
style: {
|
|
1568
|
-
...
|
|
1577
|
+
...rt,
|
|
1569
1578
|
position: "absolute",
|
|
1570
1579
|
left: 0,
|
|
1571
1580
|
right: 0,
|
|
@@ -1581,7 +1590,7 @@ function rt({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1581
1590
|
}))
|
|
1582
1591
|
}) : /* @__PURE__ */ d("div", {
|
|
1583
1592
|
style: {
|
|
1584
|
-
...
|
|
1593
|
+
...rt,
|
|
1585
1594
|
position: "absolute",
|
|
1586
1595
|
top: "100%",
|
|
1587
1596
|
left: 0,
|
|
@@ -1610,7 +1619,7 @@ function rt({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1610
1619
|
children: o.map((e) => /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d("a", {
|
|
1611
1620
|
href: e.href || "#",
|
|
1612
1621
|
style: {
|
|
1613
|
-
...
|
|
1622
|
+
...nt,
|
|
1614
1623
|
padding: "10px 4px",
|
|
1615
1624
|
fontWeight: (e.children ?? []).length ? 600 : 400,
|
|
1616
1625
|
opacity: 1
|
|
@@ -1621,7 +1630,7 @@ function rt({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1621
1630
|
]
|
|
1622
1631
|
});
|
|
1623
1632
|
}
|
|
1624
|
-
function
|
|
1633
|
+
function at({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
1625
1634
|
let [i, a] = l(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
1626
1635
|
return e.length ? /* @__PURE__ */ f("div", {
|
|
1627
1636
|
ref: r,
|
|
@@ -1661,7 +1670,7 @@ function it({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
1661
1670
|
}, e.key))]
|
|
1662
1671
|
}) : null;
|
|
1663
1672
|
}
|
|
1664
|
-
function
|
|
1673
|
+
function ot({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
|
|
1665
1674
|
let [a, o] = l(() => new Set(e.length ? [e[0].key] : []));
|
|
1666
1675
|
if (!e.length) return null;
|
|
1667
1676
|
let s = (e) => o((t) => {
|
|
@@ -1718,7 +1727,7 @@ function at({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
|
|
|
1718
1727
|
})
|
|
1719
1728
|
});
|
|
1720
1729
|
}
|
|
1721
|
-
var
|
|
1730
|
+
var st = {
|
|
1722
1731
|
display: "flex",
|
|
1723
1732
|
flexDirection: "column",
|
|
1724
1733
|
gap: "12px"
|
|
@@ -1728,15 +1737,15 @@ var ot = {
|
|
|
1728
1737
|
color: "var(--page-text, #111827)"
|
|
1729
1738
|
}, X = {
|
|
1730
1739
|
padding: "10px 12px",
|
|
1731
|
-
border: "1px solid #d1d5db",
|
|
1740
|
+
border: "1px solid var(--page-border, #d1d5db)",
|
|
1732
1741
|
borderRadius: "6px",
|
|
1733
1742
|
fontSize: "14px",
|
|
1734
1743
|
fontFamily: "inherit",
|
|
1735
1744
|
width: "100%",
|
|
1736
1745
|
boxSizing: "border-box",
|
|
1737
|
-
backgroundColor: "#
|
|
1738
|
-
color: "#111827"
|
|
1739
|
-
},
|
|
1746
|
+
backgroundColor: "var(--page-surface, #f2f2f2)",
|
|
1747
|
+
color: "var(--page-text, #111827)"
|
|
1748
|
+
}, ct = {
|
|
1740
1749
|
display: "flex",
|
|
1741
1750
|
alignItems: "center",
|
|
1742
1751
|
gap: "8px",
|
|
@@ -1747,7 +1756,7 @@ var ot = {
|
|
|
1747
1756
|
tabIndex: -1,
|
|
1748
1757
|
onMouseDown: (e) => e.preventDefault()
|
|
1749
1758
|
} : {};
|
|
1750
|
-
function
|
|
1759
|
+
function lt(e, t) {
|
|
1751
1760
|
if (!e) return !0;
|
|
1752
1761
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
1753
1762
|
switch (e.op) {
|
|
@@ -1761,11 +1770,11 @@ function ct(e, t) {
|
|
|
1761
1770
|
default: return !1;
|
|
1762
1771
|
}
|
|
1763
1772
|
}
|
|
1764
|
-
var
|
|
1773
|
+
var ut = {
|
|
1765
1774
|
display: "flex",
|
|
1766
1775
|
flexDirection: "column",
|
|
1767
1776
|
gap: 6
|
|
1768
|
-
},
|
|
1777
|
+
}, dt = {
|
|
1769
1778
|
font: "inherit",
|
|
1770
1779
|
fontSize: 15,
|
|
1771
1780
|
padding: "10px 12px",
|
|
@@ -1776,13 +1785,13 @@ var lt = {
|
|
|
1776
1785
|
width: "100%",
|
|
1777
1786
|
boxSizing: "border-box"
|
|
1778
1787
|
};
|
|
1779
|
-
function
|
|
1788
|
+
function ft(e, t) {
|
|
1780
1789
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
1781
1790
|
if (!e?.parentField) return n;
|
|
1782
1791
|
let r = t?.[e.parentField];
|
|
1783
1792
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
1784
1793
|
}
|
|
1785
|
-
function
|
|
1794
|
+
function pt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
1786
1795
|
let a = /* @__PURE__ */ f("span", {
|
|
1787
1796
|
style: {
|
|
1788
1797
|
...Y,
|
|
@@ -1794,7 +1803,7 @@ function ft({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1794
1803
|
required: e.required || void 0,
|
|
1795
1804
|
placeholder: e.placeholder || void 0,
|
|
1796
1805
|
disabled: r || void 0,
|
|
1797
|
-
style:
|
|
1806
|
+
style: dt,
|
|
1798
1807
|
value: t ?? "",
|
|
1799
1808
|
onChange: (t) => n(e.name, t.target.value)
|
|
1800
1809
|
};
|
|
@@ -1823,7 +1832,7 @@ function ft({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1823
1832
|
borderRadius: 8,
|
|
1824
1833
|
display: "block"
|
|
1825
1834
|
}
|
|
1826
|
-
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(
|
|
1835
|
+
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(Ue, {
|
|
1827
1836
|
url: e.src,
|
|
1828
1837
|
style: { width: "100%" }
|
|
1829
1838
|
}) : /* @__PURE__ */ d("video", {
|
|
@@ -1835,14 +1844,14 @@ function ft({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1835
1844
|
display: "block"
|
|
1836
1845
|
}
|
|
1837
1846
|
}) : null : /* @__PURE__ */ f("label", {
|
|
1838
|
-
style:
|
|
1847
|
+
style: ut,
|
|
1839
1848
|
children: [
|
|
1840
1849
|
a,
|
|
1841
1850
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ d("textarea", {
|
|
1842
1851
|
...o,
|
|
1843
1852
|
rows: 4,
|
|
1844
1853
|
style: {
|
|
1845
|
-
...
|
|
1854
|
+
...dt,
|
|
1846
1855
|
resize: "vertical"
|
|
1847
1856
|
}
|
|
1848
1857
|
}) : e.type === "select" ? /* @__PURE__ */ f("select", {
|
|
@@ -1851,7 +1860,7 @@ function ft({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1851
1860
|
children: [/* @__PURE__ */ d("option", {
|
|
1852
1861
|
value: "",
|
|
1853
1862
|
children: e.placeholder || "—"
|
|
1854
|
-
}),
|
|
1863
|
+
}), ft(e, i).map((e, t) => /* @__PURE__ */ d("option", {
|
|
1855
1864
|
value: typeof e == "string" ? e : e.value,
|
|
1856
1865
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
1857
1866
|
}, t))]
|
|
@@ -1898,7 +1907,7 @@ function ft({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1898
1907
|
]
|
|
1899
1908
|
});
|
|
1900
1909
|
}
|
|
1901
|
-
function
|
|
1910
|
+
function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s, auto: c, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
|
|
1902
1911
|
let { tenant: y, apiUrl: b } = i(V), [x, S] = l("form"), [C, w] = l(null), [T, E] = l({}), [O, k] = l(0), A = h ? v || "form" : x;
|
|
1903
1912
|
a(() => {
|
|
1904
1913
|
if (!c || !s) return;
|
|
@@ -1920,9 +1929,9 @@ function pt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
1920
1929
|
section: e,
|
|
1921
1930
|
fields: []
|
|
1922
1931
|
}) : j[j.length - 1].fields.push(e);
|
|
1923
|
-
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section ||
|
|
1932
|
+
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || lt(e.section.condition, T)).map((e) => ({
|
|
1924
1933
|
...e,
|
|
1925
|
-
fields: e.fields.filter((e) =>
|
|
1934
|
+
fields: e.fields.filter((e) => lt(e.condition, T))
|
|
1926
1935
|
})), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), ee = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), te = ee.filter((e) => {
|
|
1927
1936
|
let t = T[e.name];
|
|
1928
1937
|
return e.required && (t == null || t === "" || t === !1);
|
|
@@ -1980,11 +1989,11 @@ function pt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
1980
1989
|
}
|
|
1981
1990
|
},
|
|
1982
1991
|
style: {
|
|
1983
|
-
...
|
|
1992
|
+
...st,
|
|
1984
1993
|
display: A === "success" ? "none" : "flex"
|
|
1985
1994
|
},
|
|
1986
1995
|
children: c && s ? /* @__PURE__ */ f(u, { children: [
|
|
1987
|
-
P && /* @__PURE__ */ d(
|
|
1996
|
+
P && /* @__PURE__ */ d(It, {
|
|
1988
1997
|
steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
1989
1998
|
active: F + 1,
|
|
1990
1999
|
style: { marginBottom: 8 }
|
|
@@ -1997,7 +2006,7 @@ function pt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
1997
2006
|
},
|
|
1998
2007
|
children: N[F].section.help
|
|
1999
2008
|
}),
|
|
2000
|
-
ee.map((e) => /* @__PURE__ */ d(
|
|
2009
|
+
ee.map((e) => /* @__PURE__ */ d(pt, {
|
|
2001
2010
|
field: e,
|
|
2002
2011
|
value: T[e.name],
|
|
2003
2012
|
values: T,
|
|
@@ -2070,9 +2079,9 @@ function pt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2070
2079
|
]
|
|
2071
2080
|
});
|
|
2072
2081
|
}
|
|
2073
|
-
var Q = null,
|
|
2082
|
+
var Q = null, ht = null, gt = (e) => {
|
|
2074
2083
|
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
2075
|
-
if (Q &&
|
|
2084
|
+
if (Q && ht === t) return Q;
|
|
2076
2085
|
if (Q && typeof window < "u") {
|
|
2077
2086
|
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
2078
2087
|
delete window[e];
|
|
@@ -2081,7 +2090,7 @@ var Q = null, mt = null, ht = (e) => {
|
|
|
2081
2090
|
}
|
|
2082
2091
|
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
2083
2092
|
}
|
|
2084
|
-
return
|
|
2093
|
+
return ht = t, Q = new Promise((e) => {
|
|
2085
2094
|
if (typeof window > "u") return;
|
|
2086
2095
|
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
2087
2096
|
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
@@ -2089,14 +2098,14 @@ var Q = null, mt = null, ht = (e) => {
|
|
|
2089
2098
|
n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
|
|
2090
2099
|
}), Q;
|
|
2091
2100
|
};
|
|
2092
|
-
function
|
|
2101
|
+
function _t({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l, onChange: u }) {
|
|
2093
2102
|
let p = i(V), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = c(null), _ = c(u);
|
|
2094
2103
|
if (_.current = u, a(() => {
|
|
2095
2104
|
if (l || !h || !g.current) return;
|
|
2096
2105
|
let e = !0, i = (t) => {
|
|
2097
2106
|
e && typeof _.current == "function" && _.current(t);
|
|
2098
2107
|
};
|
|
2099
|
-
return
|
|
2108
|
+
return gt(r).then((r) => {
|
|
2100
2109
|
if (!(!e || !g.current || !r?.render)) {
|
|
2101
2110
|
g.current.innerHTML = "", i("");
|
|
2102
2111
|
try {
|
|
@@ -2178,7 +2187,7 @@ function gt({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
|
|
|
2178
2187
|
children: /* @__PURE__ */ d("div", { ref: g })
|
|
2179
2188
|
}) : null;
|
|
2180
2189
|
}
|
|
2181
|
-
function
|
|
2190
|
+
function vt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2182
2191
|
return /* @__PURE__ */ d("label", {
|
|
2183
2192
|
ref: r,
|
|
2184
2193
|
style: {
|
|
@@ -2188,7 +2197,7 @@ function _t({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
|
2188
2197
|
children: J(t, e, i)
|
|
2189
2198
|
});
|
|
2190
2199
|
}
|
|
2191
|
-
function
|
|
2200
|
+
function yt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2192
2201
|
return /* @__PURE__ */ d("input", {
|
|
2193
2202
|
ref: a,
|
|
2194
2203
|
type: e,
|
|
@@ -2202,7 +2211,7 @@ function vt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2202
2211
|
...Z(o)
|
|
2203
2212
|
});
|
|
2204
2213
|
}
|
|
2205
|
-
function
|
|
2214
|
+
function bt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2206
2215
|
return /* @__PURE__ */ d("textarea", {
|
|
2207
2216
|
ref: a,
|
|
2208
2217
|
name: e || void 0,
|
|
@@ -2217,11 +2226,11 @@ function yt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2217
2226
|
...Z(o)
|
|
2218
2227
|
});
|
|
2219
2228
|
}
|
|
2220
|
-
function
|
|
2229
|
+
function xt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2221
2230
|
return /* @__PURE__ */ f("label", {
|
|
2222
2231
|
ref: o,
|
|
2223
2232
|
style: {
|
|
2224
|
-
...
|
|
2233
|
+
...ct,
|
|
2225
2234
|
...D(a)
|
|
2226
2235
|
},
|
|
2227
2236
|
children: [/* @__PURE__ */ d("input", {
|
|
@@ -2238,7 +2247,7 @@ function bt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2238
2247
|
}), t]
|
|
2239
2248
|
});
|
|
2240
2249
|
}
|
|
2241
|
-
function
|
|
2250
|
+
function St({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2242
2251
|
return /* @__PURE__ */ f("select", {
|
|
2243
2252
|
ref: a,
|
|
2244
2253
|
name: e || void 0,
|
|
@@ -2261,7 +2270,7 @@ function xt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2261
2270
|
}, t))]
|
|
2262
2271
|
});
|
|
2263
2272
|
}
|
|
2264
|
-
function
|
|
2273
|
+
function Ct({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2265
2274
|
let [s, c] = l(null);
|
|
2266
2275
|
return /* @__PURE__ */ f("label", {
|
|
2267
2276
|
ref: a,
|
|
@@ -2293,7 +2302,7 @@ function St({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2293
2302
|
]
|
|
2294
2303
|
});
|
|
2295
2304
|
}
|
|
2296
|
-
function
|
|
2305
|
+
function wt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2297
2306
|
return /* @__PURE__ */ d("button", {
|
|
2298
2307
|
ref: n,
|
|
2299
2308
|
type: r ? "button" : "submit",
|
|
@@ -2313,7 +2322,7 @@ function Ct({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2313
2322
|
children: e
|
|
2314
2323
|
});
|
|
2315
2324
|
}
|
|
2316
|
-
function
|
|
2325
|
+
function Tt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2317
2326
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2318
2327
|
return /* @__PURE__ */ d("div", {
|
|
2319
2328
|
ref: r,
|
|
@@ -2330,7 +2339,7 @@ function wt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
2330
2339
|
}, t))
|
|
2331
2340
|
});
|
|
2332
2341
|
}
|
|
2333
|
-
function
|
|
2342
|
+
function Et({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, imageField: o, titleField: s = "name", textField: c, custom: u, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
|
|
2334
2343
|
let { tenant: v, apiUrl: y, locale: b } = i(V), x = i(W), S = i(H), [, C] = l(0);
|
|
2335
2344
|
a(() => {
|
|
2336
2345
|
if (typeof window > "u") return;
|
|
@@ -2339,7 +2348,7 @@ function Tt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2339
2348
|
window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
|
|
2340
2349
|
};
|
|
2341
2350
|
}, []);
|
|
2342
|
-
let w =
|
|
2351
|
+
let w = fe(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), O = E ? null : S?.[e], k = m ? U(S) : 1, [A, j] = l(null);
|
|
2343
2352
|
if (a(() => {
|
|
2344
2353
|
if (!e || O) return;
|
|
2345
2354
|
let n = !0, r = new URLSearchParams();
|
|
@@ -2384,7 +2393,7 @@ function Tt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2384
2393
|
},
|
|
2385
2394
|
children: N.map((e) => /* @__PURE__ */ d("div", {
|
|
2386
2395
|
style: { minWidth: 0 },
|
|
2387
|
-
children: x.render(p, (t) =>
|
|
2396
|
+
children: x.render(p, (t) => he(t, e))
|
|
2388
2397
|
}, e.id ?? e?.data?.slug))
|
|
2389
2398
|
}) : /* @__PURE__ */ d("div", {
|
|
2390
2399
|
ref: _,
|
|
@@ -2441,7 +2450,7 @@ function Tt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2441
2450
|
lineHeight: 1.55,
|
|
2442
2451
|
opacity: .85
|
|
2443
2452
|
},
|
|
2444
|
-
children:
|
|
2453
|
+
children: je(a)
|
|
2445
2454
|
})
|
|
2446
2455
|
]
|
|
2447
2456
|
})]
|
|
@@ -2449,13 +2458,13 @@ function Tt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2449
2458
|
})
|
|
2450
2459
|
});
|
|
2451
2460
|
}
|
|
2452
|
-
function
|
|
2453
|
-
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} :
|
|
2461
|
+
function Dt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
2462
|
+
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : de(), s = {
|
|
2454
2463
|
height: 34,
|
|
2455
2464
|
padding: "0 12px",
|
|
2456
2465
|
borderRadius: 8,
|
|
2457
2466
|
border: "1px solid var(--page-border, rgba(100, 116, 139, 0.4))",
|
|
2458
|
-
background: "var(--page-
|
|
2467
|
+
background: "var(--page-surface, #f2f2f2)",
|
|
2459
2468
|
color: "var(--page-text, #111827)",
|
|
2460
2469
|
fontSize: 13,
|
|
2461
2470
|
fontFamily: "inherit",
|
|
@@ -2552,7 +2561,7 @@ function Et({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2552
2561
|
})]
|
|
2553
2562
|
});
|
|
2554
2563
|
}
|
|
2555
|
-
function
|
|
2564
|
+
function Ot({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
2556
2565
|
return e.length ? /* @__PURE__ */ d("nav", {
|
|
2557
2566
|
ref: r,
|
|
2558
2567
|
"aria-label": "Breadcrumb",
|
|
@@ -2602,7 +2611,7 @@ function Dt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
2602
2611
|
})
|
|
2603
2612
|
}) : null;
|
|
2604
2613
|
}
|
|
2605
|
-
function
|
|
2614
|
+
function kt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", source: o, pageSize: s = 6, align: c, hideEmpty: u, inert: p, style: m, nodeRef: h }) {
|
|
2606
2615
|
let { tenant: g, apiUrl: _ } = i(V), v = i(H), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
|
|
2607
2616
|
a(() => {
|
|
2608
2617
|
if (!o || Number.isFinite(x)) return;
|
|
@@ -2687,15 +2696,15 @@ function Ot({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
2687
2696
|
]
|
|
2688
2697
|
});
|
|
2689
2698
|
}
|
|
2690
|
-
var
|
|
2699
|
+
var At = "webim.page_mode", jt = () => {
|
|
2691
2700
|
if (typeof window > "u") return "auto";
|
|
2692
2701
|
try {
|
|
2693
|
-
let e = window.localStorage.getItem(
|
|
2702
|
+
let e = window.localStorage.getItem(At);
|
|
2694
2703
|
return e === "light" || e === "dark" ? e : "auto";
|
|
2695
2704
|
} catch {
|
|
2696
2705
|
return "auto";
|
|
2697
2706
|
}
|
|
2698
|
-
},
|
|
2707
|
+
}, Mt = (e) => {
|
|
2699
2708
|
let t = {
|
|
2700
2709
|
width: 16,
|
|
2701
2710
|
height: 16,
|
|
@@ -2732,8 +2741,8 @@ var kt = "webim.page_mode", At = () => {
|
|
|
2732
2741
|
dark: "Dark theme",
|
|
2733
2742
|
auto: "Follow the device theme"
|
|
2734
2743
|
};
|
|
2735
|
-
function
|
|
2736
|
-
let [o, s] = l(i ? "auto" :
|
|
2744
|
+
function Nt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
2745
|
+
let [o, s] = l(i ? "auto" : jt), u = c(null), f = (e) => {
|
|
2737
2746
|
u.current = e, typeof r == "function" && r(e);
|
|
2738
2747
|
};
|
|
2739
2748
|
a(() => {
|
|
@@ -2741,7 +2750,7 @@ function Mt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
2741
2750
|
let e = u.current?.closest?.(".webim-page");
|
|
2742
2751
|
e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
|
|
2743
2752
|
try {
|
|
2744
|
-
o === "auto" ? window.localStorage.removeItem(
|
|
2753
|
+
o === "auto" ? window.localStorage.removeItem(At) : window.localStorage.setItem(At, o);
|
|
2745
2754
|
} catch {}
|
|
2746
2755
|
}, [o, i]);
|
|
2747
2756
|
let p = t === !1 ? ["light", "dark"] : [
|
|
@@ -2788,7 +2797,7 @@ function Mt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
2788
2797
|
background: e === m ? "var(--page-accent, #111827)" : "transparent",
|
|
2789
2798
|
opacity: e === m ? 1 : .7
|
|
2790
2799
|
},
|
|
2791
|
-
children:
|
|
2800
|
+
children: Mt(e)
|
|
2792
2801
|
}, e))
|
|
2793
2802
|
});
|
|
2794
2803
|
let g = p[(p.indexOf(m) + 1) % p.length];
|
|
@@ -2805,10 +2814,10 @@ function Mt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
2805
2814
|
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
2806
2815
|
...D(n)
|
|
2807
2816
|
},
|
|
2808
|
-
children:
|
|
2817
|
+
children: Mt(m)
|
|
2809
2818
|
});
|
|
2810
2819
|
}
|
|
2811
|
-
var
|
|
2820
|
+
var Pt = {
|
|
2812
2821
|
facebook: {
|
|
2813
2822
|
label: "Facebook",
|
|
2814
2823
|
color: "#1877f2",
|
|
@@ -2875,8 +2884,8 @@ var Nt = {
|
|
|
2875
2884
|
d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"
|
|
2876
2885
|
}
|
|
2877
2886
|
};
|
|
2878
|
-
function
|
|
2879
|
-
let l = Array.isArray(e) ? e.filter((e) => e &&
|
|
2887
|
+
function Ft({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
|
|
2888
|
+
let l = Array.isArray(e) ? e.filter((e) => e && Pt[e.network]) : [];
|
|
2880
2889
|
if (!l.length) return null;
|
|
2881
2890
|
let u = Math.min(Math.max(Number(r) || 18, 10), 64), f = Math.round(u * 1.9), p = Number.isFinite(Number(i)) ? Number(i) : 10, m = (e) => n === "accent" ? "var(--page-accent, #111827)" : n === "inherit" ? "currentColor" : e.color, h = c ? (e) => e.preventDefault() : void 0;
|
|
2882
2891
|
return /* @__PURE__ */ d("div", {
|
|
@@ -2889,7 +2898,7 @@ function Pt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
2889
2898
|
...D(o)
|
|
2890
2899
|
},
|
|
2891
2900
|
children: l.map((e, r) => {
|
|
2892
|
-
let i =
|
|
2901
|
+
let i = Pt[e.network], o = t !== "outline" && t !== "plain", s = o ? n === "accent" ? "var(--page-accent-text, #ffffff)" : n === "inherit" ? "var(--page-bg, #ffffff)" : "#ffffff" : m(i);
|
|
2893
2902
|
return /* @__PURE__ */ d("a", {
|
|
2894
2903
|
href: e.url || "#",
|
|
2895
2904
|
onClick: h,
|
|
@@ -2923,7 +2932,7 @@ function Pt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
2923
2932
|
})
|
|
2924
2933
|
});
|
|
2925
2934
|
}
|
|
2926
|
-
function
|
|
2935
|
+
function It({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
2927
2936
|
if (!e.length) return null;
|
|
2928
2937
|
let o = Math.min(Math.max(Number(n) || 1, 1), e.length), s = (e) => ({
|
|
2929
2938
|
width: 32,
|
|
@@ -3001,7 +3010,7 @@ function Ft({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
3001
3010
|
})
|
|
3002
3011
|
});
|
|
3003
3012
|
}
|
|
3004
|
-
var
|
|
3013
|
+
var Lt = {
|
|
3005
3014
|
small: {
|
|
3006
3015
|
w: 132,
|
|
3007
3016
|
h: 46,
|
|
@@ -3023,10 +3032,10 @@ var It = {
|
|
|
3023
3032
|
title: 12.5,
|
|
3024
3033
|
avatar: 46
|
|
3025
3034
|
}
|
|
3026
|
-
},
|
|
3027
|
-
|
|
3028
|
-
function
|
|
3029
|
-
let r =
|
|
3035
|
+
}, Rt = (e) => Lt[e] ?? Lt.medium;
|
|
3036
|
+
Lt.medium.w, Lt.medium.h;
|
|
3037
|
+
function zt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
3038
|
+
let r = Rt(t), i = n ? r.h : r.w, a = n ? 16 : 20, o = (n ? r.w : r.h) + (n ? 56 : 48), s = Array.isArray(e) ? e.filter((e) => e && e.id) : [], c = new Set(s.map((e) => e.id)), l = /* @__PURE__ */ new Map(), u = [];
|
|
3030
3039
|
for (let e of s) e.parent && c.has(e.parent) && e.parent !== e.id ? (l.has(e.parent) || l.set(e.parent, []), l.get(e.parent).push(e)) : u.push(e);
|
|
3031
3040
|
let d = /* @__PURE__ */ new Map(), f = (e, t) => {
|
|
3032
3041
|
if (t.has(e.id)) return 0;
|
|
@@ -3078,18 +3087,18 @@ function Rt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
|
3078
3087
|
horizontal: n
|
|
3079
3088
|
};
|
|
3080
3089
|
}
|
|
3081
|
-
var
|
|
3090
|
+
var Bt = (e, t) => {
|
|
3082
3091
|
let n = String(e ?? "");
|
|
3083
3092
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
3084
|
-
},
|
|
3093
|
+
}, Vt = (e) => {
|
|
3085
3094
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
3086
3095
|
if (!t) return "#ffffff";
|
|
3087
3096
|
let n = t[1];
|
|
3088
3097
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
3089
3098
|
let r = parseInt(n, 16);
|
|
3090
3099
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
3091
|
-
},
|
|
3092
|
-
function
|
|
3100
|
+
}, Ht = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
3101
|
+
function Ut(e, t = {}) {
|
|
3093
3102
|
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" : K(e);
|
|
3094
3103
|
return n.map((e) => {
|
|
3095
3104
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
@@ -3104,11 +3113,11 @@ function Ht(e, t = {}) {
|
|
|
3104
3113
|
};
|
|
3105
3114
|
});
|
|
3106
3115
|
}
|
|
3107
|
-
var
|
|
3116
|
+
var Wt = {
|
|
3108
3117
|
size: 36,
|
|
3109
3118
|
pad: 10
|
|
3110
3119
|
};
|
|
3111
|
-
function
|
|
3120
|
+
function Gt({ node: e, onClose: t }) {
|
|
3112
3121
|
return a(() => {
|
|
3113
3122
|
let e = (e) => e.key === "Escape" && t();
|
|
3114
3123
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -3132,7 +3141,7 @@ function Wt({ node: e, onClose: t }) {
|
|
|
3132
3141
|
children: /* @__PURE__ */ f("div", {
|
|
3133
3142
|
onClick: (e) => e.stopPropagation(),
|
|
3134
3143
|
style: {
|
|
3135
|
-
background: "var(--page-
|
|
3144
|
+
background: "var(--page-surface, #f2f2f2)",
|
|
3136
3145
|
color: "var(--page-text, #111827)",
|
|
3137
3146
|
border: "1px solid rgba(148, 163, 184, 0.35)",
|
|
3138
3147
|
borderRadius: 14,
|
|
@@ -3229,7 +3238,7 @@ function Wt({ node: e, onClose: t }) {
|
|
|
3229
3238
|
})
|
|
3230
3239
|
});
|
|
3231
3240
|
}
|
|
3232
|
-
function
|
|
3241
|
+
function Kt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField: s, parentField: c, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
|
|
3233
3242
|
let b = o(), [x, S] = l(null), { tenant: C, apiUrl: w } = i(V), T = i(H)?.[t], [E, O] = l(null);
|
|
3234
3243
|
a(() => {
|
|
3235
3244
|
if (!t || T) return;
|
|
@@ -3246,14 +3255,14 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3246
3255
|
w,
|
|
3247
3256
|
T
|
|
3248
3257
|
]);
|
|
3249
|
-
let k = t ?
|
|
3258
|
+
let k = t ? Ut(T ?? E ?? [], {
|
|
3250
3259
|
nameField: n,
|
|
3251
3260
|
titleField: r,
|
|
3252
3261
|
photoField: s,
|
|
3253
3262
|
parentField: c,
|
|
3254
3263
|
cvField: p,
|
|
3255
3264
|
hrefField: m
|
|
3256
|
-
}) : e, A =
|
|
3265
|
+
}) : e, A = Rt(h), { boxes: j, links: M, width: N, height: P } = zt(k, {
|
|
3257
3266
|
size: h,
|
|
3258
3267
|
horizontal: g
|
|
3259
3268
|
});
|
|
@@ -3299,7 +3308,7 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3299
3308
|
stroke: "rgba(148, 163, 184, 0.7)",
|
|
3300
3309
|
strokeWidth: "1.5"
|
|
3301
3310
|
}, t)), j.map(({ node: e, x: t, y: n }) => {
|
|
3302
|
-
let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ?
|
|
3311
|
+
let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ? Vt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Vt(e.color2) : s, l = y && (Ht(e) || e.href), p = () => Ht(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Wt.pad + A.avatar + 8 : t + A.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((A.w - A.avatar - 26) / 7) : Math.floor(A.w / 7.6), _ = A.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
|
|
3303
3312
|
return /* @__PURE__ */ f("g", {
|
|
3304
3313
|
onClick: l ? p : void 0,
|
|
3305
3314
|
style: l ? { cursor: "pointer" } : void 0,
|
|
@@ -3363,13 +3372,13 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3363
3372
|
e.photo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
|
|
3364
3373
|
id: `${b}-${e.id}`,
|
|
3365
3374
|
children: /* @__PURE__ */ d("circle", {
|
|
3366
|
-
cx: t +
|
|
3375
|
+
cx: t + Wt.pad + A.avatar / 2,
|
|
3367
3376
|
cy: n + A.h / 2,
|
|
3368
3377
|
r: A.avatar / 2
|
|
3369
3378
|
})
|
|
3370
3379
|
}), /* @__PURE__ */ d("image", {
|
|
3371
3380
|
href: e.photo,
|
|
3372
|
-
x: t +
|
|
3381
|
+
x: t + Wt.pad,
|
|
3373
3382
|
y: n + (A.h - A.avatar) / 2,
|
|
3374
3383
|
width: A.avatar,
|
|
3375
3384
|
height: A.avatar,
|
|
@@ -3383,7 +3392,7 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3383
3392
|
fontSize: A.title,
|
|
3384
3393
|
fontWeight: "600",
|
|
3385
3394
|
fill: s,
|
|
3386
|
-
children:
|
|
3395
|
+
children: Bt(e.title, g + 4)
|
|
3387
3396
|
}), e.name && /* @__PURE__ */ d("text", {
|
|
3388
3397
|
x: m,
|
|
3389
3398
|
y: n + _ + _ / 2 + A.name * .35,
|
|
@@ -3391,7 +3400,7 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3391
3400
|
fontSize: A.name,
|
|
3392
3401
|
fontWeight: "600",
|
|
3393
3402
|
fill: c,
|
|
3394
|
-
children:
|
|
3403
|
+
children: Bt(e.name, g)
|
|
3395
3404
|
})] }) : /* @__PURE__ */ f(u, { children: [v[0] && /* @__PURE__ */ d("text", {
|
|
3396
3405
|
x: m,
|
|
3397
3406
|
y: n + (v[1] ? A.h * .43 : A.h * .57),
|
|
@@ -3399,7 +3408,7 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3399
3408
|
fontSize: A.name,
|
|
3400
3409
|
fontWeight: "600",
|
|
3401
3410
|
fill: s,
|
|
3402
|
-
children:
|
|
3411
|
+
children: Bt(v[0], g)
|
|
3403
3412
|
}), v[1] && /* @__PURE__ */ d("text", {
|
|
3404
3413
|
x: m,
|
|
3405
3414
|
y: n + A.h * .73,
|
|
@@ -3407,18 +3416,18 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3407
3416
|
fontSize: A.title,
|
|
3408
3417
|
opacity: "0.7",
|
|
3409
3418
|
fill: s,
|
|
3410
|
-
children:
|
|
3419
|
+
children: Bt(v[1], g + 4)
|
|
3411
3420
|
})] })
|
|
3412
3421
|
]
|
|
3413
3422
|
}, e.id);
|
|
3414
3423
|
})]
|
|
3415
|
-
}), x && /* @__PURE__ */ d(
|
|
3424
|
+
}), x && /* @__PURE__ */ d(Gt, {
|
|
3416
3425
|
node: x,
|
|
3417
3426
|
onClose: () => S(null)
|
|
3418
3427
|
})]
|
|
3419
3428
|
});
|
|
3420
3429
|
}
|
|
3421
|
-
function
|
|
3430
|
+
function qt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped: o = !0, bordered: s = !1, compact: c = !1, paged: u, emptyText: p, style: m, nodeRef: h }) {
|
|
3422
3431
|
let { tenant: g, apiUrl: _ } = i(V), v = i(H), y = v?.[n], b = u ? U(v) : 1, [x, S] = l(null);
|
|
3423
3432
|
if (a(() => {
|
|
3424
3433
|
if (!n || y) return;
|
|
@@ -3484,78 +3493,78 @@ function Kt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped:
|
|
|
3484
3493
|
})
|
|
3485
3494
|
});
|
|
3486
3495
|
}
|
|
3487
|
-
var
|
|
3488
|
-
PageRoot:
|
|
3489
|
-
Section:
|
|
3490
|
-
Container:
|
|
3491
|
-
Heading:
|
|
3492
|
-
TextBlock:
|
|
3493
|
-
ButtonBlock:
|
|
3494
|
-
ImageBlock:
|
|
3495
|
-
Spacer:
|
|
3496
|
-
Divider:
|
|
3497
|
-
SliderBlock:
|
|
3498
|
-
CanvasSlider:
|
|
3499
|
-
TabsBlock:
|
|
3500
|
-
QuickStack:
|
|
3501
|
-
CollectionList:
|
|
3502
|
-
CollectionSearch:
|
|
3503
|
-
BreadcrumbsBlock:
|
|
3504
|
-
PaginationBlock:
|
|
3505
|
-
StepperBlock:
|
|
3506
|
-
SocialLinksBlock:
|
|
3507
|
-
ThemeModeBlock:
|
|
3508
|
-
OrgChartBlock:
|
|
3509
|
-
TableBlock:
|
|
3510
|
-
MasonryBlock:
|
|
3511
|
-
AccordionBlock:
|
|
3512
|
-
NavbarBlock:
|
|
3513
|
-
ListBlock:
|
|
3514
|
-
TextSpan:
|
|
3515
|
-
QuoteBlock:
|
|
3516
|
-
TextLink:
|
|
3517
|
-
RichTextBlock:
|
|
3518
|
-
RichContentBlock:
|
|
3519
|
-
VideoBlock:
|
|
3520
|
-
YouTubeBlock:
|
|
3521
|
-
IframeBlock:
|
|
3522
|
-
EmbedBlock:
|
|
3523
|
-
FormBlock:
|
|
3524
|
-
FormLabel:
|
|
3525
|
-
FormInput:
|
|
3526
|
-
FormTextarea:
|
|
3527
|
-
FormCheckbox: (e) => /* @__PURE__ */ d(
|
|
3496
|
+
var Jt = {
|
|
3497
|
+
PageRoot: Se,
|
|
3498
|
+
Section: Ce,
|
|
3499
|
+
Container: we,
|
|
3500
|
+
Heading: Te,
|
|
3501
|
+
TextBlock: Ie,
|
|
3502
|
+
ButtonBlock: ze,
|
|
3503
|
+
ImageBlock: Be,
|
|
3504
|
+
Spacer: Ke,
|
|
3505
|
+
Divider: qe,
|
|
3506
|
+
SliderBlock: $e,
|
|
3507
|
+
CanvasSlider: et,
|
|
3508
|
+
TabsBlock: at,
|
|
3509
|
+
QuickStack: Tt,
|
|
3510
|
+
CollectionList: Et,
|
|
3511
|
+
CollectionSearch: Dt,
|
|
3512
|
+
BreadcrumbsBlock: Ot,
|
|
3513
|
+
PaginationBlock: kt,
|
|
3514
|
+
StepperBlock: It,
|
|
3515
|
+
SocialLinksBlock: Ft,
|
|
3516
|
+
ThemeModeBlock: Nt,
|
|
3517
|
+
OrgChartBlock: Kt,
|
|
3518
|
+
TableBlock: qt,
|
|
3519
|
+
MasonryBlock: tt,
|
|
3520
|
+
AccordionBlock: ot,
|
|
3521
|
+
NavbarBlock: it,
|
|
3522
|
+
ListBlock: Fe,
|
|
3523
|
+
TextSpan: Oe,
|
|
3524
|
+
QuoteBlock: Pe,
|
|
3525
|
+
TextLink: Re,
|
|
3526
|
+
RichTextBlock: Me,
|
|
3527
|
+
RichContentBlock: Me,
|
|
3528
|
+
VideoBlock: Ve,
|
|
3529
|
+
YouTubeBlock: Ue,
|
|
3530
|
+
IframeBlock: We,
|
|
3531
|
+
EmbedBlock: Ge,
|
|
3532
|
+
FormBlock: mt,
|
|
3533
|
+
FormLabel: vt,
|
|
3534
|
+
FormInput: yt,
|
|
3535
|
+
FormTextarea: bt,
|
|
3536
|
+
FormCheckbox: (e) => /* @__PURE__ */ d(xt, {
|
|
3528
3537
|
kind: "checkbox",
|
|
3529
3538
|
...e
|
|
3530
3539
|
}),
|
|
3531
|
-
FormRadio: (e) => /* @__PURE__ */ d(
|
|
3540
|
+
FormRadio: (e) => /* @__PURE__ */ d(xt, {
|
|
3532
3541
|
kind: "radio",
|
|
3533
3542
|
...e
|
|
3534
3543
|
}),
|
|
3535
|
-
FormSelect:
|
|
3536
|
-
FormFile:
|
|
3537
|
-
FormRecaptcha:
|
|
3538
|
-
FormSubmit:
|
|
3539
|
-
},
|
|
3544
|
+
FormSelect: St,
|
|
3545
|
+
FormFile: Ct,
|
|
3546
|
+
FormRecaptcha: _t,
|
|
3547
|
+
FormSubmit: wt
|
|
3548
|
+
}, Yt = {
|
|
3540
3549
|
id: "auth",
|
|
3541
3550
|
label: "Accounts",
|
|
3542
3551
|
category: "Apps",
|
|
3543
3552
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
3544
3553
|
ssr: "shell",
|
|
3545
3554
|
settings: ["site.authRedirect"]
|
|
3546
|
-
},
|
|
3555
|
+
}, Xt = n({
|
|
3547
3556
|
user: null,
|
|
3548
3557
|
status: "idle",
|
|
3549
3558
|
ensure: () => {},
|
|
3550
3559
|
refresh: () => {},
|
|
3551
3560
|
signOut: () => {}
|
|
3552
|
-
}),
|
|
3553
|
-
let e = i(
|
|
3561
|
+
}), Zt = () => {
|
|
3562
|
+
let e = i(Xt);
|
|
3554
3563
|
return a(() => {
|
|
3555
3564
|
e.ensure();
|
|
3556
3565
|
}, [e]), e;
|
|
3557
3566
|
};
|
|
3558
|
-
function
|
|
3567
|
+
function Qt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o }) {
|
|
3559
3568
|
let u = i(V), f = a || u?.apiUrl || "/api", p = o || u?.tenant || "", [m, h] = l(t ?? null), [g, _] = l(t ? "user" : n ? "guest" : "idle"), v = c(!1), y = r((e, t) => fetch(`${f}${e}`, {
|
|
3560
3569
|
...t,
|
|
3561
3570
|
credentials: "include",
|
|
@@ -3588,18 +3597,18 @@ function Zt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o })
|
|
|
3588
3597
|
b,
|
|
3589
3598
|
x
|
|
3590
3599
|
]);
|
|
3591
|
-
return /* @__PURE__ */ d(
|
|
3600
|
+
return /* @__PURE__ */ d(Xt.Provider, {
|
|
3592
3601
|
value: C,
|
|
3593
3602
|
children: e
|
|
3594
3603
|
});
|
|
3595
3604
|
}
|
|
3596
|
-
function
|
|
3597
|
-
let { status: n } =
|
|
3605
|
+
function $t({ when: e, children: t }) {
|
|
3606
|
+
let { status: n } = Zt();
|
|
3598
3607
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
3599
3608
|
}
|
|
3600
3609
|
//#endregion
|
|
3601
3610
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
3602
|
-
function
|
|
3611
|
+
function en({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: r = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: c, inert: u, linked: p, show: m }) {
|
|
3603
3612
|
let { tenant: h, apiUrl: g, settings: _ } = i(V), [v, y] = l("form"), [b, x] = l(""), [S, C] = l(!1), w = e === "register", T = u ? m || "form" : v, E = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
|
|
3604
3613
|
if (e.preventDefault(), u) return;
|
|
3605
3614
|
let n = new FormData(e.currentTarget);
|
|
@@ -3723,8 +3732,8 @@ function $t({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3723
3732
|
]
|
|
3724
3733
|
});
|
|
3725
3734
|
}
|
|
3726
|
-
function
|
|
3727
|
-
let { user: c, status: l, signOut: u } =
|
|
3735
|
+
function tn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
|
|
3736
|
+
let { user: c, status: l, signOut: u } = Zt(), p = a ? s || "user" : l, m = a ? {
|
|
3728
3737
|
name: "Ada Lovelace",
|
|
3729
3738
|
email: "ada@example.com"
|
|
3730
3739
|
} : c;
|
|
@@ -3788,43 +3797,156 @@ function en({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3788
3797
|
});
|
|
3789
3798
|
}
|
|
3790
3799
|
//#endregion
|
|
3800
|
+
//#region ../ui/src/components/builder/apps/language/manifest.js
|
|
3801
|
+
var nn = {
|
|
3802
|
+
id: "language",
|
|
3803
|
+
label: "Language",
|
|
3804
|
+
category: "Apps",
|
|
3805
|
+
keys: ["SiteLanguagePicker"],
|
|
3806
|
+
ssr: "prefetch",
|
|
3807
|
+
settings: ["locales"]
|
|
3808
|
+
};
|
|
3809
|
+
//#endregion
|
|
3810
|
+
//#region ../ui/src/components/builder/apps/language/views.jsx
|
|
3811
|
+
function rn(e) {
|
|
3812
|
+
let t = e?.locales, n = [typeof t?.default == "string" && t.default.trim() ? t.default.trim() : "", ...Array.isArray(t?.enabled) ? t.enabled : []].filter((e) => typeof e == "string" && e.trim());
|
|
3813
|
+
return [...new Set(n.map((e) => e.trim()))];
|
|
3814
|
+
}
|
|
3815
|
+
var an = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
3816
|
+
function on(e, t) {
|
|
3817
|
+
let n = String(e ?? "").toUpperCase();
|
|
3818
|
+
if (t === "code") return n;
|
|
3819
|
+
let r = "";
|
|
3820
|
+
try {
|
|
3821
|
+
r = an(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
|
|
3822
|
+
} catch {}
|
|
3823
|
+
return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
|
|
3824
|
+
}
|
|
3825
|
+
function sn(e, t) {
|
|
3826
|
+
let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
|
|
3827
|
+
if (typeof window > "u") return n || "?";
|
|
3828
|
+
try {
|
|
3829
|
+
let n = new URL(window.location.href);
|
|
3830
|
+
return t ? n.searchParams.delete("locale") : n.searchParams.set("locale", e), n.searchParams.delete("page"), `${n.pathname}${n.search}${n.hash}`;
|
|
3831
|
+
} catch {
|
|
3832
|
+
return n || "/";
|
|
3833
|
+
}
|
|
3834
|
+
}
|
|
3835
|
+
function cn({ variant: e, display: t, separator: n, label: r, style: a, nodeRef: o, inert: s }) {
|
|
3836
|
+
let c = i(V), l = rn(c?.settings), u = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : u, m = {
|
|
3837
|
+
display: "inline-flex",
|
|
3838
|
+
alignItems: "center",
|
|
3839
|
+
gap: 8,
|
|
3840
|
+
...D(a)
|
|
3841
|
+
};
|
|
3842
|
+
if (l.length < 2) return s ? /* @__PURE__ */ d("div", {
|
|
3843
|
+
ref: o,
|
|
3844
|
+
style: {
|
|
3845
|
+
...m,
|
|
3846
|
+
padding: "8px 12px",
|
|
3847
|
+
border: "1px dashed rgba(100, 116, 139, 0.45)",
|
|
3848
|
+
borderRadius: 6,
|
|
3849
|
+
color: "rgba(100, 116, 139, 0.8)",
|
|
3850
|
+
fontSize: 12
|
|
3851
|
+
},
|
|
3852
|
+
children: "Add site languages in Settings → Languages"
|
|
3853
|
+
}) : null;
|
|
3854
|
+
let h = r ? /* @__PURE__ */ d("span", {
|
|
3855
|
+
style: { opacity: .7 },
|
|
3856
|
+
children: r
|
|
3857
|
+
}) : null;
|
|
3858
|
+
return e === "inline" ? /* @__PURE__ */ f("div", {
|
|
3859
|
+
ref: o,
|
|
3860
|
+
style: m,
|
|
3861
|
+
children: [h, l.map((e, r) => /* @__PURE__ */ f("span", {
|
|
3862
|
+
style: {
|
|
3863
|
+
display: "inline-flex",
|
|
3864
|
+
alignItems: "center",
|
|
3865
|
+
gap: 8
|
|
3866
|
+
},
|
|
3867
|
+
children: [r > 0 && /* @__PURE__ */ d("span", {
|
|
3868
|
+
style: { opacity: .4 },
|
|
3869
|
+
children: n ?? "·"
|
|
3870
|
+
}), /* @__PURE__ */ d("a", {
|
|
3871
|
+
href: sn(e, e === u),
|
|
3872
|
+
hrefLang: e,
|
|
3873
|
+
"aria-current": e === p ? "true" : void 0,
|
|
3874
|
+
onClick: s ? (e) => e.preventDefault() : void 0,
|
|
3875
|
+
style: {
|
|
3876
|
+
color: e === p ? "var(--page-accent, inherit)" : "inherit",
|
|
3877
|
+
fontWeight: e === p ? 600 : 400,
|
|
3878
|
+
textDecoration: "none",
|
|
3879
|
+
cursor: s ? "default" : "pointer"
|
|
3880
|
+
},
|
|
3881
|
+
children: on(e, t)
|
|
3882
|
+
})]
|
|
3883
|
+
}, e))]
|
|
3884
|
+
}) : /* @__PURE__ */ f("div", {
|
|
3885
|
+
ref: o,
|
|
3886
|
+
style: m,
|
|
3887
|
+
children: [h, /* @__PURE__ */ d("select", {
|
|
3888
|
+
"aria-label": r || "Language",
|
|
3889
|
+
value: p,
|
|
3890
|
+
onChange: s ? void 0 : (e) => {
|
|
3891
|
+
let t = e.target.value;
|
|
3892
|
+
window.location.assign(sn(t, t === u));
|
|
3893
|
+
},
|
|
3894
|
+
onKeyDown: s ? (e) => e.preventDefault() : void 0,
|
|
3895
|
+
style: {
|
|
3896
|
+
font: "inherit",
|
|
3897
|
+
color: "inherit",
|
|
3898
|
+
background: "var(--page-surface, transparent)",
|
|
3899
|
+
border: "1px solid var(--page-border, rgba(148, 163, 184, 0.4))",
|
|
3900
|
+
borderRadius: 6,
|
|
3901
|
+
padding: "4px 8px",
|
|
3902
|
+
cursor: s ? "default" : "pointer"
|
|
3903
|
+
},
|
|
3904
|
+
children: l.map((e) => /* @__PURE__ */ d("option", {
|
|
3905
|
+
value: e,
|
|
3906
|
+
children: on(e, t)
|
|
3907
|
+
}, e))
|
|
3908
|
+
})]
|
|
3909
|
+
});
|
|
3910
|
+
}
|
|
3911
|
+
//#endregion
|
|
3791
3912
|
//#region ../ui/src/components/builder/apps/index.js
|
|
3792
|
-
var
|
|
3793
|
-
SiteLoginForm:
|
|
3794
|
-
SiteAccountMenu:
|
|
3913
|
+
var ln = [Yt, nn], un = {
|
|
3914
|
+
SiteLoginForm: en,
|
|
3915
|
+
SiteAccountMenu: tn,
|
|
3916
|
+
SiteLanguagePicker: cn
|
|
3795
3917
|
};
|
|
3796
|
-
new Set(
|
|
3918
|
+
new Set(ln.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
3797
3919
|
//#endregion
|
|
3798
3920
|
//#region ../ui/src/components/builder/plugins/runtime.js
|
|
3799
|
-
var
|
|
3800
|
-
function
|
|
3801
|
-
if (
|
|
3921
|
+
var dn = /* @__PURE__ */ new Map();
|
|
3922
|
+
function fn(e) {
|
|
3923
|
+
if (dn.has(e)) return dn.get(e);
|
|
3802
3924
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
3803
3925
|
/* @vite-ignore */
|
|
3804
3926
|
/* webpackIgnore: true */
|
|
3805
3927
|
t
|
|
3806
3928
|
).finally(() => URL.revokeObjectURL(t));
|
|
3807
|
-
return
|
|
3929
|
+
return dn.set(e, n), n;
|
|
3808
3930
|
}
|
|
3809
|
-
function
|
|
3931
|
+
function pn(e) {
|
|
3810
3932
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
3811
3933
|
return n && typeof n == "object" ? n : {};
|
|
3812
3934
|
}
|
|
3813
3935
|
//#endregion
|
|
3814
3936
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
3815
|
-
async function
|
|
3816
|
-
let n = await
|
|
3937
|
+
async function mn(e, t) {
|
|
3938
|
+
let n = await fn(e);
|
|
3817
3939
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
3818
3940
|
}
|
|
3819
|
-
var
|
|
3941
|
+
var hn = {
|
|
3820
3942
|
padding: "10px 12px",
|
|
3821
3943
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
3822
3944
|
borderRadius: 8,
|
|
3823
3945
|
fontSize: 12,
|
|
3824
3946
|
opacity: .6
|
|
3825
3947
|
};
|
|
3826
|
-
function
|
|
3827
|
-
let s = i(V), l =
|
|
3948
|
+
function gn({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
3949
|
+
let s = i(V), l = pn(s?.settings)[e], u = c(null), p = c(null), m = {
|
|
3828
3950
|
tenant: s?.tenant ?? "",
|
|
3829
3951
|
apiUrl: s?.apiUrl ?? "/api",
|
|
3830
3952
|
locale: s?.locale ?? "",
|
|
@@ -3836,7 +3958,7 @@ function ln({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
3836
3958
|
let e = u.current;
|
|
3837
3959
|
if (!l?.code || !e) return;
|
|
3838
3960
|
let n = !0;
|
|
3839
|
-
return
|
|
3961
|
+
return mn(l.code, t).then((e) => {
|
|
3840
3962
|
if (!(!n || !e || !u.current)) {
|
|
3841
3963
|
p.current = e;
|
|
3842
3964
|
try {
|
|
@@ -3866,7 +3988,7 @@ function ln({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
3866
3988
|
}) : /* @__PURE__ */ f("div", {
|
|
3867
3989
|
ref: o,
|
|
3868
3990
|
style: {
|
|
3869
|
-
...
|
|
3991
|
+
...hn,
|
|
3870
3992
|
...D(r)
|
|
3871
3993
|
},
|
|
3872
3994
|
children: [
|
|
@@ -3878,12 +4000,12 @@ function ln({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
3878
4000
|
}
|
|
3879
4001
|
//#endregion
|
|
3880
4002
|
//#region ../ui/src/components/builder/render.jsx
|
|
3881
|
-
var
|
|
3882
|
-
...
|
|
3883
|
-
...
|
|
3884
|
-
PluginBlock:
|
|
4003
|
+
var _n = {
|
|
4004
|
+
...Jt,
|
|
4005
|
+
...un,
|
|
4006
|
+
PluginBlock: gn
|
|
3885
4007
|
};
|
|
3886
|
-
function
|
|
4008
|
+
function vn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
3887
4009
|
let o = n[e];
|
|
3888
4010
|
if (!o || o.hidden) return null;
|
|
3889
4011
|
let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
|
|
@@ -3891,11 +4013,11 @@ function dn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
3891
4013
|
let n = o.props?.componentId, s = r?.[n];
|
|
3892
4014
|
if (!s?.template || i.has(n)) return null;
|
|
3893
4015
|
let c = new Set(i).add(n);
|
|
3894
|
-
return /* @__PURE__ */ d(t, { children:
|
|
4016
|
+
return /* @__PURE__ */ d(t, { children: vn(s.template.rootId, s.template.nodes, r, c, a) }, e);
|
|
3895
4017
|
}
|
|
3896
|
-
let l =
|
|
4018
|
+
let l = _n[s];
|
|
3897
4019
|
if (!l) return null;
|
|
3898
|
-
let u = (o.nodes ?? []).map((e) =>
|
|
4020
|
+
let u = (o.nodes ?? []).map((e) => vn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, vn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ d(l, {
|
|
3899
4021
|
...c,
|
|
3900
4022
|
...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
|
|
3901
4023
|
linked: p,
|
|
@@ -3904,16 +4026,16 @@ function dn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
3904
4026
|
},
|
|
3905
4027
|
children: u.length ? u : void 0
|
|
3906
4028
|
}, e);
|
|
3907
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ d(
|
|
4029
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ d($t, {
|
|
3908
4030
|
when: c.when,
|
|
3909
4031
|
children: m
|
|
3910
4032
|
}, e) : m;
|
|
3911
4033
|
}
|
|
3912
4034
|
//#endregion
|
|
3913
4035
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
3914
|
-
var
|
|
4036
|
+
var yn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), bn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(B(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
3915
4037
|
.webim-page[data-webim-mode="dark"] { ${Object.entries(B(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
3916
|
-
function
|
|
4038
|
+
function xn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, custom: o, tenant: c, apiUrl: l, datasets: u, locale: p, direction: m, settings: g, siteUser: _ }) {
|
|
3917
4039
|
let v = o?.js?.trim();
|
|
3918
4040
|
if (a(() => {
|
|
3919
4041
|
if (!v) return;
|
|
@@ -3927,11 +4049,11 @@ function mn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
3927
4049
|
minHeight: "100%",
|
|
3928
4050
|
display: "flex",
|
|
3929
4051
|
flexDirection: "column"
|
|
3930
|
-
}, w =
|
|
4052
|
+
}, w = vn("ROOT", e, n), T = s(() => ({ render: (t, r) => vn(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = re(e, n), D = ne(e, n), O = o?.css?.trim(), k = z(t), A = [k.font, k.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !R[e]), j = [.../* @__PURE__ */ new Set([...C(e, n), ...A])].map((e) => /* @__PURE__ */ d("link", {
|
|
3931
4053
|
rel: "stylesheet",
|
|
3932
4054
|
precedence: "default",
|
|
3933
4055
|
href: b(e)
|
|
3934
|
-
}, e)), M =
|
|
4056
|
+
}, e)), M = bn(k);
|
|
3935
4057
|
return r === "auto" ? /* @__PURE__ */ d(V.Provider, {
|
|
3936
4058
|
value: {
|
|
3937
4059
|
tenant: c || "",
|
|
@@ -3939,7 +4061,7 @@ function mn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
3939
4061
|
locale: p || "",
|
|
3940
4062
|
settings: g ?? null
|
|
3941
4063
|
},
|
|
3942
|
-
children: /* @__PURE__ */ d(
|
|
4064
|
+
children: /* @__PURE__ */ d(Qt, {
|
|
3943
4065
|
initialUser: _,
|
|
3944
4066
|
children: /* @__PURE__ */ d(H.Provider, {
|
|
3945
4067
|
value: u ?? null,
|
|
@@ -3954,8 +4076,8 @@ function mn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
3954
4076
|
...i
|
|
3955
4077
|
},
|
|
3956
4078
|
children: [
|
|
3957
|
-
/* @__PURE__ */ d("style", { children: `.webim-page { ${
|
|
3958
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
4079
|
+
/* @__PURE__ */ d("style", { children: `.webim-page { ${yn(B(k.light))} }
|
|
4080
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${yn(B(k.dark))} } }` }),
|
|
3959
4081
|
/* @__PURE__ */ d("style", { children: M }),
|
|
3960
4082
|
j,
|
|
3961
4083
|
/* @__PURE__ */ d("style", { children: x }),
|
|
@@ -3975,7 +4097,7 @@ function mn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
3975
4097
|
locale: p || "",
|
|
3976
4098
|
settings: g ?? null
|
|
3977
4099
|
},
|
|
3978
|
-
children: /* @__PURE__ */ d(
|
|
4100
|
+
children: /* @__PURE__ */ d(Qt, {
|
|
3979
4101
|
initialUser: _,
|
|
3980
4102
|
children: /* @__PURE__ */ d(H.Provider, {
|
|
3981
4103
|
value: u ?? null,
|
|
@@ -4006,8 +4128,8 @@ function mn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
4006
4128
|
}
|
|
4007
4129
|
//#endregion
|
|
4008
4130
|
//#region src/WebimContent.jsx
|
|
4009
|
-
function
|
|
4010
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ d(
|
|
4131
|
+
function Sn({ bundle: e, mode: t = "auto", style: n }) {
|
|
4132
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ d(xn, {
|
|
4011
4133
|
blocks: e.blocks,
|
|
4012
4134
|
theme: e.theme,
|
|
4013
4135
|
components: e.components,
|
|
@@ -4018,13 +4140,13 @@ function hn({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
4018
4140
|
locale: e.locale,
|
|
4019
4141
|
direction: e.direction,
|
|
4020
4142
|
settings: e.settings,
|
|
4021
|
-
mode: t,
|
|
4143
|
+
mode: ue(t, e.scheme),
|
|
4022
4144
|
style: n
|
|
4023
4145
|
}) : null;
|
|
4024
4146
|
}
|
|
4025
4147
|
//#endregion
|
|
4026
4148
|
//#region src/bundle.js
|
|
4027
|
-
function
|
|
4149
|
+
function Cn({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
4028
4150
|
let a = {
|
|
4029
4151
|
...t?.global ?? {},
|
|
4030
4152
|
...t?.tenant ?? {}
|
|
@@ -4039,6 +4161,7 @@ function gn({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
4039
4161
|
custom: o.custom,
|
|
4040
4162
|
seo: o.seo,
|
|
4041
4163
|
direction: o.direction,
|
|
4164
|
+
scheme: o.scheme,
|
|
4042
4165
|
locale: i || a.locales?.default,
|
|
4043
4166
|
locales: a.locales,
|
|
4044
4167
|
tenant: n ?? "",
|
|
@@ -4048,18 +4171,18 @@ function gn({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
4048
4171
|
}
|
|
4049
4172
|
//#endregion
|
|
4050
4173
|
//#region src/fetchPage.js
|
|
4051
|
-
var
|
|
4174
|
+
var wn = async (e) => {
|
|
4052
4175
|
let t = await e.json().catch(() => null);
|
|
4053
4176
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
4054
4177
|
return t?.payload ?? t;
|
|
4055
4178
|
};
|
|
4056
|
-
async function
|
|
4179
|
+
async function Tn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
4057
4180
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
4058
4181
|
if (!n) throw Error("fetchPage: slug is required");
|
|
4059
4182
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
4060
4183
|
...t ? { "x-tenant": t } : {},
|
|
4061
4184
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
4062
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
4185
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(wn), c(`${l}/settings/public`, { headers: u }).then(wn)]), p = Cn({
|
|
4063
4186
|
page: d,
|
|
4064
4187
|
settings: f,
|
|
4065
4188
|
tenant: t,
|
|
@@ -4067,7 +4190,7 @@ async function vn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
4067
4190
|
locale: r
|
|
4068
4191
|
}), m = [...new Set(Object.values(p.blocks ?? {}).map((e) => e?.type?.resolvedName === "CollectionList" ? e.props?.collection : e?.type?.resolvedName === "TableBlock" || e?.type?.resolvedName === "OrgChartBlock" ? e.props?.source : null).filter(Boolean))];
|
|
4069
4192
|
if (m.length) {
|
|
4070
|
-
let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(
|
|
4193
|
+
let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(wn).then((e) => {
|
|
4071
4194
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
4072
4195
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
4073
4196
|
}).catch(() => [[t, []]])));
|
|
@@ -4081,40 +4204,40 @@ async function vn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
4081
4204
|
}
|
|
4082
4205
|
//#endregion
|
|
4083
4206
|
//#region src/ssr.jsx
|
|
4084
|
-
var
|
|
4207
|
+
var En = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
|
|
4085
4208
|
"&": "&",
|
|
4086
4209
|
"<": "<",
|
|
4087
4210
|
">": ">",
|
|
4088
4211
|
"\"": """
|
|
4089
4212
|
})[e]);
|
|
4090
|
-
function
|
|
4091
|
-
return e(/* @__PURE__ */ d(
|
|
4213
|
+
function Dn(t, { mode: n = "auto", style: r } = {}) {
|
|
4214
|
+
return e(/* @__PURE__ */ d(Sn, {
|
|
4092
4215
|
bundle: t,
|
|
4093
4216
|
mode: n,
|
|
4094
4217
|
style: r
|
|
4095
4218
|
}));
|
|
4096
4219
|
}
|
|
4097
|
-
function
|
|
4220
|
+
function On(e, { mode: t = "auto", lang: n } = {}) {
|
|
4098
4221
|
let r = e.seo ?? {}, i = n || e.locale || "en", a = h(e.direction, i), o = r.title || e.title || e.slug || "Page", s = e.custom?.js?.trim(), c = [
|
|
4099
4222
|
"<meta charset=\"utf-8\"/>",
|
|
4100
4223
|
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
|
|
4101
|
-
`<title>${
|
|
4102
|
-
r.description && `<meta name="description" content="${
|
|
4103
|
-
`<meta property="og:title" content="${
|
|
4104
|
-
r.image && `<meta property="og:image" content="${
|
|
4224
|
+
`<title>${En(o)}</title>`,
|
|
4225
|
+
r.description && `<meta name="description" content="${En(r.description)}"/>`,
|
|
4226
|
+
`<meta property="og:title" content="${En(o)}"/>`,
|
|
4227
|
+
r.image && `<meta property="og:image" content="${En(r.image)}"/>`,
|
|
4105
4228
|
r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
|
|
4106
4229
|
"<style>html,body{margin:0;height:100%}</style>"
|
|
4107
4230
|
].filter(Boolean).join("\n");
|
|
4108
4231
|
return `<!doctype html>
|
|
4109
|
-
<html lang="${
|
|
4232
|
+
<html lang="${En(i)}"${a ? ` dir="${a}"` : ""}>
|
|
4110
4233
|
<head>
|
|
4111
4234
|
${c}
|
|
4112
4235
|
</head>
|
|
4113
4236
|
<body>
|
|
4114
|
-
${
|
|
4237
|
+
${Dn(e, { mode: t })}
|
|
4115
4238
|
${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
|
|
4116
4239
|
</body>
|
|
4117
4240
|
</html>`;
|
|
4118
4241
|
}
|
|
4119
4242
|
//#endregion
|
|
4120
|
-
export {
|
|
4243
|
+
export { Cn as assembleBundle, Tn as fetchPage, Dn as renderBundleHtml, On as renderPageDocument };
|