webim-adapter 0.23.0 → 0.25.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 +302 -289
- package/build/webim-embed.js +7 -7
- package/build/webim-ssr.js +309 -296
- 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);
|
|
@@ -3121,7 +3130,9 @@ function Wt({ node: e, onClose: t }) {
|
|
|
3121
3130
|
position: "fixed",
|
|
3122
3131
|
inset: 0,
|
|
3123
3132
|
zIndex: 1e3,
|
|
3124
|
-
background: "rgba(
|
|
3133
|
+
background: "rgba(2, 6, 23, 0.6)",
|
|
3134
|
+
backdropFilter: "blur(4px)",
|
|
3135
|
+
WebkitBackdropFilter: "blur(4px)",
|
|
3125
3136
|
display: "flex",
|
|
3126
3137
|
alignItems: "center",
|
|
3127
3138
|
justifyContent: "center",
|
|
@@ -3130,8 +3141,9 @@ function Wt({ node: e, onClose: t }) {
|
|
|
3130
3141
|
children: /* @__PURE__ */ f("div", {
|
|
3131
3142
|
onClick: (e) => e.stopPropagation(),
|
|
3132
3143
|
style: {
|
|
3133
|
-
background: "var(--page-
|
|
3144
|
+
background: "var(--page-surface, #f2f2f2)",
|
|
3134
3145
|
color: "var(--page-text, #111827)",
|
|
3146
|
+
border: "1px solid rgba(148, 163, 184, 0.35)",
|
|
3135
3147
|
borderRadius: 14,
|
|
3136
3148
|
maxWidth: 420,
|
|
3137
3149
|
width: "100%",
|
|
@@ -3139,7 +3151,7 @@ function Wt({ node: e, onClose: t }) {
|
|
|
3139
3151
|
overflowY: "auto",
|
|
3140
3152
|
padding: 24,
|
|
3141
3153
|
position: "relative",
|
|
3142
|
-
boxShadow: "0 24px 64px rgba(
|
|
3154
|
+
boxShadow: "0 24px 64px rgba(2, 6, 23, 0.5)"
|
|
3143
3155
|
},
|
|
3144
3156
|
children: [
|
|
3145
3157
|
/* @__PURE__ */ d("button", {
|
|
@@ -3226,7 +3238,7 @@ function Wt({ node: e, onClose: t }) {
|
|
|
3226
3238
|
})
|
|
3227
3239
|
});
|
|
3228
3240
|
}
|
|
3229
|
-
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 }) {
|
|
3230
3242
|
let b = o(), [x, S] = l(null), { tenant: C, apiUrl: w } = i(V), T = i(H)?.[t], [E, O] = l(null);
|
|
3231
3243
|
a(() => {
|
|
3232
3244
|
if (!t || T) return;
|
|
@@ -3243,14 +3255,14 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3243
3255
|
w,
|
|
3244
3256
|
T
|
|
3245
3257
|
]);
|
|
3246
|
-
let k = t ?
|
|
3258
|
+
let k = t ? Ut(T ?? E ?? [], {
|
|
3247
3259
|
nameField: n,
|
|
3248
3260
|
titleField: r,
|
|
3249
3261
|
photoField: s,
|
|
3250
3262
|
parentField: c,
|
|
3251
3263
|
cvField: p,
|
|
3252
3264
|
hrefField: m
|
|
3253
|
-
}) : e, A =
|
|
3265
|
+
}) : e, A = Rt(h), { boxes: j, links: M, width: N, height: P } = zt(k, {
|
|
3254
3266
|
size: h,
|
|
3255
3267
|
horizontal: g
|
|
3256
3268
|
});
|
|
@@ -3296,7 +3308,7 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3296
3308
|
stroke: "rgba(148, 163, 184, 0.7)",
|
|
3297
3309
|
strokeWidth: "1.5"
|
|
3298
3310
|
}, t)), j.map(({ node: e, x: t, y: n }) => {
|
|
3299
|
-
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);
|
|
3300
3312
|
return /* @__PURE__ */ f("g", {
|
|
3301
3313
|
onClick: l ? p : void 0,
|
|
3302
3314
|
style: l ? { cursor: "pointer" } : void 0,
|
|
@@ -3360,13 +3372,13 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3360
3372
|
e.photo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
|
|
3361
3373
|
id: `${b}-${e.id}`,
|
|
3362
3374
|
children: /* @__PURE__ */ d("circle", {
|
|
3363
|
-
cx: t +
|
|
3375
|
+
cx: t + Wt.pad + A.avatar / 2,
|
|
3364
3376
|
cy: n + A.h / 2,
|
|
3365
3377
|
r: A.avatar / 2
|
|
3366
3378
|
})
|
|
3367
3379
|
}), /* @__PURE__ */ d("image", {
|
|
3368
3380
|
href: e.photo,
|
|
3369
|
-
x: t +
|
|
3381
|
+
x: t + Wt.pad,
|
|
3370
3382
|
y: n + (A.h - A.avatar) / 2,
|
|
3371
3383
|
width: A.avatar,
|
|
3372
3384
|
height: A.avatar,
|
|
@@ -3380,7 +3392,7 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3380
3392
|
fontSize: A.title,
|
|
3381
3393
|
fontWeight: "600",
|
|
3382
3394
|
fill: s,
|
|
3383
|
-
children:
|
|
3395
|
+
children: Bt(e.title, g + 4)
|
|
3384
3396
|
}), e.name && /* @__PURE__ */ d("text", {
|
|
3385
3397
|
x: m,
|
|
3386
3398
|
y: n + _ + _ / 2 + A.name * .35,
|
|
@@ -3388,7 +3400,7 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3388
3400
|
fontSize: A.name,
|
|
3389
3401
|
fontWeight: "600",
|
|
3390
3402
|
fill: c,
|
|
3391
|
-
children:
|
|
3403
|
+
children: Bt(e.name, g)
|
|
3392
3404
|
})] }) : /* @__PURE__ */ f(u, { children: [v[0] && /* @__PURE__ */ d("text", {
|
|
3393
3405
|
x: m,
|
|
3394
3406
|
y: n + (v[1] ? A.h * .43 : A.h * .57),
|
|
@@ -3396,7 +3408,7 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3396
3408
|
fontSize: A.name,
|
|
3397
3409
|
fontWeight: "600",
|
|
3398
3410
|
fill: s,
|
|
3399
|
-
children:
|
|
3411
|
+
children: Bt(v[0], g)
|
|
3400
3412
|
}), v[1] && /* @__PURE__ */ d("text", {
|
|
3401
3413
|
x: m,
|
|
3402
3414
|
y: n + A.h * .73,
|
|
@@ -3404,18 +3416,18 @@ function Gt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3404
3416
|
fontSize: A.title,
|
|
3405
3417
|
opacity: "0.7",
|
|
3406
3418
|
fill: s,
|
|
3407
|
-
children:
|
|
3419
|
+
children: Bt(v[1], g + 4)
|
|
3408
3420
|
})] })
|
|
3409
3421
|
]
|
|
3410
3422
|
}, e.id);
|
|
3411
3423
|
})]
|
|
3412
|
-
}), x && /* @__PURE__ */ d(
|
|
3424
|
+
}), x && /* @__PURE__ */ d(Gt, {
|
|
3413
3425
|
node: x,
|
|
3414
3426
|
onClose: () => S(null)
|
|
3415
3427
|
})]
|
|
3416
3428
|
});
|
|
3417
3429
|
}
|
|
3418
|
-
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 }) {
|
|
3419
3431
|
let { tenant: g, apiUrl: _ } = i(V), v = i(H), y = v?.[n], b = u ? U(v) : 1, [x, S] = l(null);
|
|
3420
3432
|
if (a(() => {
|
|
3421
3433
|
if (!n || y) return;
|
|
@@ -3481,78 +3493,78 @@ function Kt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped:
|
|
|
3481
3493
|
})
|
|
3482
3494
|
});
|
|
3483
3495
|
}
|
|
3484
|
-
var
|
|
3485
|
-
PageRoot:
|
|
3486
|
-
Section:
|
|
3487
|
-
Container:
|
|
3488
|
-
Heading:
|
|
3489
|
-
TextBlock:
|
|
3490
|
-
ButtonBlock:
|
|
3491
|
-
ImageBlock:
|
|
3492
|
-
Spacer:
|
|
3493
|
-
Divider:
|
|
3494
|
-
SliderBlock:
|
|
3495
|
-
CanvasSlider:
|
|
3496
|
-
TabsBlock:
|
|
3497
|
-
QuickStack:
|
|
3498
|
-
CollectionList:
|
|
3499
|
-
CollectionSearch:
|
|
3500
|
-
BreadcrumbsBlock:
|
|
3501
|
-
PaginationBlock:
|
|
3502
|
-
StepperBlock:
|
|
3503
|
-
SocialLinksBlock:
|
|
3504
|
-
ThemeModeBlock:
|
|
3505
|
-
OrgChartBlock:
|
|
3506
|
-
TableBlock:
|
|
3507
|
-
MasonryBlock:
|
|
3508
|
-
AccordionBlock:
|
|
3509
|
-
NavbarBlock:
|
|
3510
|
-
ListBlock:
|
|
3511
|
-
TextSpan:
|
|
3512
|
-
QuoteBlock:
|
|
3513
|
-
TextLink:
|
|
3514
|
-
RichTextBlock:
|
|
3515
|
-
RichContentBlock:
|
|
3516
|
-
VideoBlock:
|
|
3517
|
-
YouTubeBlock:
|
|
3518
|
-
IframeBlock:
|
|
3519
|
-
EmbedBlock:
|
|
3520
|
-
FormBlock:
|
|
3521
|
-
FormLabel:
|
|
3522
|
-
FormInput:
|
|
3523
|
-
FormTextarea:
|
|
3524
|
-
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, {
|
|
3525
3537
|
kind: "checkbox",
|
|
3526
3538
|
...e
|
|
3527
3539
|
}),
|
|
3528
|
-
FormRadio: (e) => /* @__PURE__ */ d(
|
|
3540
|
+
FormRadio: (e) => /* @__PURE__ */ d(xt, {
|
|
3529
3541
|
kind: "radio",
|
|
3530
3542
|
...e
|
|
3531
3543
|
}),
|
|
3532
|
-
FormSelect:
|
|
3533
|
-
FormFile:
|
|
3534
|
-
FormRecaptcha:
|
|
3535
|
-
FormSubmit:
|
|
3536
|
-
},
|
|
3544
|
+
FormSelect: St,
|
|
3545
|
+
FormFile: Ct,
|
|
3546
|
+
FormRecaptcha: _t,
|
|
3547
|
+
FormSubmit: wt
|
|
3548
|
+
}, Yt = {
|
|
3537
3549
|
id: "auth",
|
|
3538
3550
|
label: "Accounts",
|
|
3539
3551
|
category: "Apps",
|
|
3540
3552
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
3541
3553
|
ssr: "shell",
|
|
3542
3554
|
settings: ["site.authRedirect"]
|
|
3543
|
-
},
|
|
3555
|
+
}, Xt = n({
|
|
3544
3556
|
user: null,
|
|
3545
3557
|
status: "idle",
|
|
3546
3558
|
ensure: () => {},
|
|
3547
3559
|
refresh: () => {},
|
|
3548
3560
|
signOut: () => {}
|
|
3549
|
-
}),
|
|
3550
|
-
let e = i(
|
|
3561
|
+
}), Zt = () => {
|
|
3562
|
+
let e = i(Xt);
|
|
3551
3563
|
return a(() => {
|
|
3552
3564
|
e.ensure();
|
|
3553
3565
|
}, [e]), e;
|
|
3554
3566
|
};
|
|
3555
|
-
function
|
|
3567
|
+
function Qt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o }) {
|
|
3556
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}`, {
|
|
3557
3569
|
...t,
|
|
3558
3570
|
credentials: "include",
|
|
@@ -3585,18 +3597,18 @@ function Zt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o })
|
|
|
3585
3597
|
b,
|
|
3586
3598
|
x
|
|
3587
3599
|
]);
|
|
3588
|
-
return /* @__PURE__ */ d(
|
|
3600
|
+
return /* @__PURE__ */ d(Xt.Provider, {
|
|
3589
3601
|
value: C,
|
|
3590
3602
|
children: e
|
|
3591
3603
|
});
|
|
3592
3604
|
}
|
|
3593
|
-
function
|
|
3594
|
-
let { status: n } =
|
|
3605
|
+
function $t({ when: e, children: t }) {
|
|
3606
|
+
let { status: n } = Zt();
|
|
3595
3607
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
3596
3608
|
}
|
|
3597
3609
|
//#endregion
|
|
3598
3610
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
3599
|
-
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 }) {
|
|
3600
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) => {
|
|
3601
3613
|
if (e.preventDefault(), u) return;
|
|
3602
3614
|
let n = new FormData(e.currentTarget);
|
|
@@ -3720,8 +3732,8 @@ function $t({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3720
3732
|
]
|
|
3721
3733
|
});
|
|
3722
3734
|
}
|
|
3723
|
-
function
|
|
3724
|
-
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 ? {
|
|
3725
3737
|
name: "Ada Lovelace",
|
|
3726
3738
|
email: "ada@example.com"
|
|
3727
3739
|
} : c;
|
|
@@ -3786,42 +3798,42 @@ function en({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3786
3798
|
}
|
|
3787
3799
|
//#endregion
|
|
3788
3800
|
//#region ../ui/src/components/builder/apps/index.js
|
|
3789
|
-
var
|
|
3790
|
-
SiteLoginForm:
|
|
3791
|
-
SiteAccountMenu:
|
|
3801
|
+
var nn = [Yt], rn = {
|
|
3802
|
+
SiteLoginForm: en,
|
|
3803
|
+
SiteAccountMenu: tn
|
|
3792
3804
|
};
|
|
3793
|
-
new Set(
|
|
3805
|
+
new Set(nn.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
3794
3806
|
//#endregion
|
|
3795
3807
|
//#region ../ui/src/components/builder/plugins/runtime.js
|
|
3796
|
-
var
|
|
3797
|
-
function
|
|
3798
|
-
if (
|
|
3808
|
+
var an = /* @__PURE__ */ new Map();
|
|
3809
|
+
function on(e) {
|
|
3810
|
+
if (an.has(e)) return an.get(e);
|
|
3799
3811
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
3800
3812
|
/* @vite-ignore */
|
|
3801
3813
|
/* webpackIgnore: true */
|
|
3802
3814
|
t
|
|
3803
3815
|
).finally(() => URL.revokeObjectURL(t));
|
|
3804
|
-
return
|
|
3816
|
+
return an.set(e, n), n;
|
|
3805
3817
|
}
|
|
3806
|
-
function
|
|
3818
|
+
function sn(e) {
|
|
3807
3819
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
3808
3820
|
return n && typeof n == "object" ? n : {};
|
|
3809
3821
|
}
|
|
3810
3822
|
//#endregion
|
|
3811
3823
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
3812
|
-
async function
|
|
3813
|
-
let n = await
|
|
3824
|
+
async function cn(e, t) {
|
|
3825
|
+
let n = await on(e);
|
|
3814
3826
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
3815
3827
|
}
|
|
3816
|
-
var
|
|
3828
|
+
var ln = {
|
|
3817
3829
|
padding: "10px 12px",
|
|
3818
3830
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
3819
3831
|
borderRadius: 8,
|
|
3820
3832
|
fontSize: 12,
|
|
3821
3833
|
opacity: .6
|
|
3822
3834
|
};
|
|
3823
|
-
function
|
|
3824
|
-
let s = i(V), l =
|
|
3835
|
+
function un({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
3836
|
+
let s = i(V), l = sn(s?.settings)[e], u = c(null), p = c(null), m = {
|
|
3825
3837
|
tenant: s?.tenant ?? "",
|
|
3826
3838
|
apiUrl: s?.apiUrl ?? "/api",
|
|
3827
3839
|
locale: s?.locale ?? "",
|
|
@@ -3833,7 +3845,7 @@ function ln({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
3833
3845
|
let e = u.current;
|
|
3834
3846
|
if (!l?.code || !e) return;
|
|
3835
3847
|
let n = !0;
|
|
3836
|
-
return
|
|
3848
|
+
return cn(l.code, t).then((e) => {
|
|
3837
3849
|
if (!(!n || !e || !u.current)) {
|
|
3838
3850
|
p.current = e;
|
|
3839
3851
|
try {
|
|
@@ -3863,7 +3875,7 @@ function ln({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
3863
3875
|
}) : /* @__PURE__ */ f("div", {
|
|
3864
3876
|
ref: o,
|
|
3865
3877
|
style: {
|
|
3866
|
-
...
|
|
3878
|
+
...ln,
|
|
3867
3879
|
...D(r)
|
|
3868
3880
|
},
|
|
3869
3881
|
children: [
|
|
@@ -3875,12 +3887,12 @@ function ln({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
3875
3887
|
}
|
|
3876
3888
|
//#endregion
|
|
3877
3889
|
//#region ../ui/src/components/builder/render.jsx
|
|
3878
|
-
var
|
|
3879
|
-
...
|
|
3880
|
-
...
|
|
3881
|
-
PluginBlock:
|
|
3890
|
+
var dn = {
|
|
3891
|
+
...Jt,
|
|
3892
|
+
...rn,
|
|
3893
|
+
PluginBlock: un
|
|
3882
3894
|
};
|
|
3883
|
-
function
|
|
3895
|
+
function fn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
3884
3896
|
let o = n[e];
|
|
3885
3897
|
if (!o || o.hidden) return null;
|
|
3886
3898
|
let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
|
|
@@ -3888,11 +3900,11 @@ function dn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
3888
3900
|
let n = o.props?.componentId, s = r?.[n];
|
|
3889
3901
|
if (!s?.template || i.has(n)) return null;
|
|
3890
3902
|
let c = new Set(i).add(n);
|
|
3891
|
-
return /* @__PURE__ */ d(t, { children:
|
|
3903
|
+
return /* @__PURE__ */ d(t, { children: fn(s.template.rootId, s.template.nodes, r, c, a) }, e);
|
|
3892
3904
|
}
|
|
3893
|
-
let l =
|
|
3905
|
+
let l = dn[s];
|
|
3894
3906
|
if (!l) return null;
|
|
3895
|
-
let u = (o.nodes ?? []).map((e) =>
|
|
3907
|
+
let u = (o.nodes ?? []).map((e) => fn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, fn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ d(l, {
|
|
3896
3908
|
...c,
|
|
3897
3909
|
...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
|
|
3898
3910
|
linked: p,
|
|
@@ -3901,16 +3913,16 @@ function dn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
3901
3913
|
},
|
|
3902
3914
|
children: u.length ? u : void 0
|
|
3903
3915
|
}, e);
|
|
3904
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ d(
|
|
3916
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ d($t, {
|
|
3905
3917
|
when: c.when,
|
|
3906
3918
|
children: m
|
|
3907
3919
|
}, e) : m;
|
|
3908
3920
|
}
|
|
3909
3921
|
//#endregion
|
|
3910
3922
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
3911
|
-
var
|
|
3923
|
+
var pn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), mn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(B(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
3912
3924
|
.webim-page[data-webim-mode="dark"] { ${Object.entries(B(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
3913
|
-
function
|
|
3925
|
+
function hn({ 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: _ }) {
|
|
3914
3926
|
let v = o?.js?.trim();
|
|
3915
3927
|
if (a(() => {
|
|
3916
3928
|
if (!v) return;
|
|
@@ -3924,11 +3936,11 @@ function mn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
3924
3936
|
minHeight: "100%",
|
|
3925
3937
|
display: "flex",
|
|
3926
3938
|
flexDirection: "column"
|
|
3927
|
-
}, w =
|
|
3939
|
+
}, w = fn("ROOT", e, n), T = s(() => ({ render: (t, r) => fn(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", {
|
|
3928
3940
|
rel: "stylesheet",
|
|
3929
3941
|
precedence: "default",
|
|
3930
3942
|
href: b(e)
|
|
3931
|
-
}, e)), M =
|
|
3943
|
+
}, e)), M = mn(k);
|
|
3932
3944
|
return r === "auto" ? /* @__PURE__ */ d(V.Provider, {
|
|
3933
3945
|
value: {
|
|
3934
3946
|
tenant: c || "",
|
|
@@ -3936,7 +3948,7 @@ function mn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
3936
3948
|
locale: p || "",
|
|
3937
3949
|
settings: g ?? null
|
|
3938
3950
|
},
|
|
3939
|
-
children: /* @__PURE__ */ d(
|
|
3951
|
+
children: /* @__PURE__ */ d(Qt, {
|
|
3940
3952
|
initialUser: _,
|
|
3941
3953
|
children: /* @__PURE__ */ d(H.Provider, {
|
|
3942
3954
|
value: u ?? null,
|
|
@@ -3951,8 +3963,8 @@ function mn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
3951
3963
|
...i
|
|
3952
3964
|
},
|
|
3953
3965
|
children: [
|
|
3954
|
-
/* @__PURE__ */ d("style", { children: `.webim-page { ${
|
|
3955
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
3966
|
+
/* @__PURE__ */ d("style", { children: `.webim-page { ${pn(B(k.light))} }
|
|
3967
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${pn(B(k.dark))} } }` }),
|
|
3956
3968
|
/* @__PURE__ */ d("style", { children: M }),
|
|
3957
3969
|
j,
|
|
3958
3970
|
/* @__PURE__ */ d("style", { children: x }),
|
|
@@ -3972,7 +3984,7 @@ function mn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
3972
3984
|
locale: p || "",
|
|
3973
3985
|
settings: g ?? null
|
|
3974
3986
|
},
|
|
3975
|
-
children: /* @__PURE__ */ d(
|
|
3987
|
+
children: /* @__PURE__ */ d(Qt, {
|
|
3976
3988
|
initialUser: _,
|
|
3977
3989
|
children: /* @__PURE__ */ d(H.Provider, {
|
|
3978
3990
|
value: u ?? null,
|
|
@@ -4003,8 +4015,8 @@ function mn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
4003
4015
|
}
|
|
4004
4016
|
//#endregion
|
|
4005
4017
|
//#region src/WebimContent.jsx
|
|
4006
|
-
function
|
|
4007
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ d(
|
|
4018
|
+
function gn({ bundle: e, mode: t = "auto", style: n }) {
|
|
4019
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ d(hn, {
|
|
4008
4020
|
blocks: e.blocks,
|
|
4009
4021
|
theme: e.theme,
|
|
4010
4022
|
components: e.components,
|
|
@@ -4015,13 +4027,13 @@ function hn({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
4015
4027
|
locale: e.locale,
|
|
4016
4028
|
direction: e.direction,
|
|
4017
4029
|
settings: e.settings,
|
|
4018
|
-
mode: t,
|
|
4030
|
+
mode: ue(t, e.scheme),
|
|
4019
4031
|
style: n
|
|
4020
4032
|
}) : null;
|
|
4021
4033
|
}
|
|
4022
4034
|
//#endregion
|
|
4023
4035
|
//#region src/bundle.js
|
|
4024
|
-
function
|
|
4036
|
+
function _n({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
4025
4037
|
let a = {
|
|
4026
4038
|
...t?.global ?? {},
|
|
4027
4039
|
...t?.tenant ?? {}
|
|
@@ -4036,6 +4048,7 @@ function gn({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
4036
4048
|
custom: o.custom,
|
|
4037
4049
|
seo: o.seo,
|
|
4038
4050
|
direction: o.direction,
|
|
4051
|
+
scheme: o.scheme,
|
|
4039
4052
|
locale: i || a.locales?.default,
|
|
4040
4053
|
locales: a.locales,
|
|
4041
4054
|
tenant: n ?? "",
|
|
@@ -4045,18 +4058,18 @@ function gn({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
4045
4058
|
}
|
|
4046
4059
|
//#endregion
|
|
4047
4060
|
//#region src/fetchPage.js
|
|
4048
|
-
var
|
|
4061
|
+
var vn = async (e) => {
|
|
4049
4062
|
let t = await e.json().catch(() => null);
|
|
4050
4063
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
4051
4064
|
return t?.payload ?? t;
|
|
4052
4065
|
};
|
|
4053
|
-
async function
|
|
4066
|
+
async function yn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
4054
4067
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
4055
4068
|
if (!n) throw Error("fetchPage: slug is required");
|
|
4056
4069
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
4057
4070
|
...t ? { "x-tenant": t } : {},
|
|
4058
4071
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
4059
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
4072
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(vn), c(`${l}/settings/public`, { headers: u }).then(vn)]), p = _n({
|
|
4060
4073
|
page: d,
|
|
4061
4074
|
settings: f,
|
|
4062
4075
|
tenant: t,
|
|
@@ -4064,7 +4077,7 @@ async function vn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
4064
4077
|
locale: r
|
|
4065
4078
|
}), 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))];
|
|
4066
4079
|
if (m.length) {
|
|
4067
|
-
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(
|
|
4080
|
+
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(vn).then((e) => {
|
|
4068
4081
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
4069
4082
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
4070
4083
|
}).catch(() => [[t, []]])));
|
|
@@ -4078,40 +4091,40 @@ async function vn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
4078
4091
|
}
|
|
4079
4092
|
//#endregion
|
|
4080
4093
|
//#region src/ssr.jsx
|
|
4081
|
-
var
|
|
4094
|
+
var bn = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
|
|
4082
4095
|
"&": "&",
|
|
4083
4096
|
"<": "<",
|
|
4084
4097
|
">": ">",
|
|
4085
4098
|
"\"": """
|
|
4086
4099
|
})[e]);
|
|
4087
|
-
function
|
|
4088
|
-
return e(/* @__PURE__ */ d(
|
|
4100
|
+
function xn(t, { mode: n = "auto", style: r } = {}) {
|
|
4101
|
+
return e(/* @__PURE__ */ d(gn, {
|
|
4089
4102
|
bundle: t,
|
|
4090
4103
|
mode: n,
|
|
4091
4104
|
style: r
|
|
4092
4105
|
}));
|
|
4093
4106
|
}
|
|
4094
|
-
function
|
|
4107
|
+
function Sn(e, { mode: t = "auto", lang: n } = {}) {
|
|
4095
4108
|
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 = [
|
|
4096
4109
|
"<meta charset=\"utf-8\"/>",
|
|
4097
4110
|
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
|
|
4098
|
-
`<title>${
|
|
4099
|
-
r.description && `<meta name="description" content="${
|
|
4100
|
-
`<meta property="og:title" content="${
|
|
4101
|
-
r.image && `<meta property="og:image" content="${
|
|
4111
|
+
`<title>${bn(o)}</title>`,
|
|
4112
|
+
r.description && `<meta name="description" content="${bn(r.description)}"/>`,
|
|
4113
|
+
`<meta property="og:title" content="${bn(o)}"/>`,
|
|
4114
|
+
r.image && `<meta property="og:image" content="${bn(r.image)}"/>`,
|
|
4102
4115
|
r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
|
|
4103
4116
|
"<style>html,body{margin:0;height:100%}</style>"
|
|
4104
4117
|
].filter(Boolean).join("\n");
|
|
4105
4118
|
return `<!doctype html>
|
|
4106
|
-
<html lang="${
|
|
4119
|
+
<html lang="${bn(i)}"${a ? ` dir="${a}"` : ""}>
|
|
4107
4120
|
<head>
|
|
4108
4121
|
${c}
|
|
4109
4122
|
</head>
|
|
4110
4123
|
<body>
|
|
4111
|
-
${
|
|
4124
|
+
${xn(e, { mode: t })}
|
|
4112
4125
|
${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
|
|
4113
4126
|
</body>
|
|
4114
4127
|
</html>`;
|
|
4115
4128
|
}
|
|
4116
4129
|
//#endregion
|
|
4117
|
-
export {
|
|
4130
|
+
export { _n as assembleBundle, yn as fetchPage, xn as renderBundleHtml, Sn as renderPageDocument };
|