webim-adapter 0.19.0 → 0.21.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.
@@ -216,12 +216,12 @@ function C(e) {
216
216
  t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
217
217
  }
218
218
  t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
219
- let { backgroundLayers: le } = t;
219
+ let { backgroundLayers: q } = t;
220
220
  delete t.backgroundLayers;
221
- let ue = (Array.isArray(le) ? le : []).filter((e) => e && e.on !== !1);
222
- if (ue.length) {
221
+ let le = (Array.isArray(q) ? q : []).filter((e) => e && e.on !== !1);
222
+ if (le.length) {
223
223
  let e = [], n = [], r = [], i = [], a = [];
224
- for (let t of ue) 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");
224
+ for (let t of le) 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");
225
225
  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");
226
226
  else {
227
227
  if (!t.src) continue;
@@ -439,11 +439,23 @@ var H = n({
439
439
  if (typeof window > "u") return 1;
440
440
  let n = Number(new URLSearchParams(window.location.search).get("page"));
441
441
  return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
442
- }, ae = n(null), oe = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
443
- function G(e, t) {
442
+ }, ae = () => {
443
+ if (typeof window > "u") return {};
444
+ let e = {};
445
+ return new URLSearchParams(window.location.search).forEach((t, n) => {
446
+ n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
447
+ }), e;
448
+ }, oe = (e) => {
449
+ let t = {
450
+ ...e && typeof e == "object" && !Array.isArray(e) ? e : {},
451
+ ...ae()
452
+ };
453
+ return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
454
+ }, G = n(null), se = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
455
+ function K(e, t) {
444
456
  if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
445
457
  }
446
- var se = (e) => {
458
+ var ce = (e) => {
447
459
  let t = [];
448
460
  for (let [n, r] of Object.entries(e ?? {})) {
449
461
  if (!/^[\w-]+$/.test(n)) continue;
@@ -453,36 +465,36 @@ var se = (e) => {
453
465
  }
454
466
  return t;
455
467
  };
456
- function K(e) {
457
- 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 ?? "") : 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(" ") : "";
468
+ function q(e) {
469
+ 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(" ") : "";
458
470
  }
459
- function ce(e, t) {
460
- let n = t?.data ?? {}, r = se(n);
471
+ function le(e, t) {
472
+ let n = t?.data ?? {}, r = ce(n);
461
473
  if (!r.length) return e;
462
- let i = RegExp(`:(${r.map(oe).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;
474
+ let i = RegExp(`:(${r.map(se).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => q(K(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
463
475
  return a(e);
464
476
  }
465
- var le = {
477
+ var ue = {
466
478
  margin: 0,
467
479
  fontWeight: 700,
468
480
  lineHeight: 1.2,
469
481
  fontFamily: "var(--page-heading-font, inherit)"
470
- }, ue = { margin: 0 }, q = {
482
+ }, de = { margin: 0 }, J = {
471
483
  display: "inline-block",
472
484
  textDecoration: "none",
473
485
  cursor: "pointer",
474
486
  backgroundColor: "var(--page-accent, #111827)",
475
487
  color: "var(--page-accent-text, #ffffff)"
476
- }, de = {
488
+ }, fe = {
477
489
  flexGrow: 1,
478
490
  display: "flex",
479
491
  flexDirection: "column",
480
492
  position: "relative"
481
- }, fe = {
493
+ }, pe = {
482
494
  display: "flex",
483
495
  flexDirection: "column"
484
496
  };
485
- function pe({ style: e }) {
497
+ function me({ style: e }) {
486
498
  let t = e?.backgroundVideo;
487
499
  if (!t) return null;
488
500
  let n = {
@@ -508,7 +520,7 @@ function pe({ style: e }) {
508
520
  background: r
509
521
  } })] });
510
522
  }
511
- var me = (e, t) => e?.backgroundVideo ? {
523
+ var he = (e, t) => e?.backgroundVideo ? {
512
524
  position: "relative",
513
525
  ...t,
514
526
  ...C(e)
@@ -516,24 +528,24 @@ var me = (e, t) => e?.backgroundVideo ? {
516
528
  ...t,
517
529
  ...C(e)
518
530
  };
519
- function he({ style: e, nodeRef: t, children: n }) {
531
+ function ge({ style: e, nodeRef: t, children: n }) {
520
532
  return /* @__PURE__ */ f("div", {
521
533
  ref: t,
522
534
  style: {
523
- ...de,
535
+ ...fe,
524
536
  ...C(e)
525
537
  },
526
- children: [/* @__PURE__ */ d(pe, { style: e }), n]
538
+ children: [/* @__PURE__ */ d(me, { style: e }), n]
527
539
  });
528
540
  }
529
- function ge({ style: e, nodeRef: t, children: n }) {
541
+ function _e({ style: e, nodeRef: t, children: n }) {
530
542
  return /* @__PURE__ */ f("section", {
531
543
  ref: t,
532
- style: me(e, fe),
533
- children: [/* @__PURE__ */ d(pe, { style: e }), n]
544
+ style: he(e, pe),
545
+ children: [/* @__PURE__ */ d(me, { style: e }), n]
534
546
  });
535
547
  }
536
- function _e({ style: e, freeLayout: t, nodeRef: n, children: r }) {
548
+ function ve({ style: e, freeLayout: t, nodeRef: n, children: r }) {
537
549
  let i = t ? {
538
550
  position: "relative",
539
551
  minHeight: 240
@@ -542,32 +554,32 @@ function _e({ style: e, freeLayout: t, nodeRef: n, children: r }) {
542
554
  ref: n,
543
555
  style: i ? {
544
556
  ...i,
545
- ...me(e)
546
- } : me(e),
547
- children: [/* @__PURE__ */ d(pe, { style: e }), r]
557
+ ...he(e)
558
+ } : he(e),
559
+ children: [/* @__PURE__ */ d(me, { style: e }), r]
548
560
  });
549
561
  }
550
- function ve({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
562
+ function ye({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
551
563
  return /* @__PURE__ */ d(n, {
552
564
  ref: a,
553
565
  style: {
554
- ...le,
566
+ ...ue,
555
567
  ...C(r)
556
568
  },
557
- children: J(t, e, i)
569
+ children: Y(t, e, i)
558
570
  });
559
571
  }
560
- var ye = {
572
+ var be = {
561
573
  fontFamily: z.mono.value,
562
574
  background: "rgba(148, 163, 184, 0.18)",
563
575
  padding: "1px 5px",
564
576
  borderRadius: 4,
565
577
  fontSize: "0.9em"
566
578
  };
567
- function be(e, t = [], n, r) {
579
+ function xe(e, t = [], n, r) {
568
580
  let i = e;
569
581
  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", {
570
- style: ye,
582
+ style: be,
571
583
  children: i
572
584
  })), 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", {
573
585
  href: n,
@@ -577,13 +589,13 @@ function be(e, t = [], n, r) {
577
589
  children: i
578
590
  })), i;
579
591
  }
580
- function J(e, n, r) {
592
+ function Y(e, n, r) {
581
593
  return e?.length ? e.map((e, n) => {
582
594
  if (e.slot) return /* @__PURE__ */ d(t, { children: r?.[e.slot] ?? null }, n);
583
- if (e.parts) return /* @__PURE__ */ d(t, { children: J(e.parts, "", r) }, n);
595
+ if (e.parts) return /* @__PURE__ */ d(t, { children: Y(e.parts, "", r) }, n);
584
596
  let i = e.text;
585
597
  return e.sup ? i = /* @__PURE__ */ d("sup", { children: i }) : e.sub && (i = /* @__PURE__ */ d("sub", { children: i })), e.code && (i = /* @__PURE__ */ d("code", {
586
- style: ye,
598
+ style: be,
587
599
  children: i
588
600
  })), 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", {
589
601
  style: {
@@ -600,13 +612,13 @@ function J(e, n, r) {
600
612
  })), /* @__PURE__ */ d(t, { children: i }, n);
601
613
  }) : n;
602
614
  }
603
- function xe({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
615
+ function Se({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
604
616
  return /* @__PURE__ */ d("span", {
605
617
  style: C(a),
606
- children: e?.length ? J(e, t) : be(t, n, r, i)
618
+ children: e?.length ? Y(e, t) : xe(t, n, r, i)
607
619
  });
608
620
  }
609
- var Se = {
621
+ var Ce = {
610
622
  h1: 40,
611
623
  h2: 32,
612
624
  h3: 26,
@@ -614,7 +626,7 @@ var Se = {
614
626
  h5: 19,
615
627
  h6: 16
616
628
  };
617
- function Ce({ align: e = "center", width: t, wrap: n } = {}) {
629
+ function we({ align: e = "center", width: t, wrap: n } = {}) {
618
630
  let r = t ? `${t}%` : void 0;
619
631
  if (e === "full") return { width: "100%" };
620
632
  let i = e === "left" || e === "right";
@@ -648,8 +660,8 @@ function Ce({ align: e = "center", width: t, wrap: n } = {}) {
648
660
  marginRight: "auto"
649
661
  };
650
662
  }
651
- function we(e = [], t, n) {
652
- let r = n ?? ((e, n) => J(e, n, t));
663
+ function Te(e = [], t, n) {
664
+ let r = n ?? ((e, n) => Y(e, n, t));
653
665
  return e.map((t, n) => {
654
666
  let i = {
655
667
  marginTop: 0,
@@ -671,7 +683,7 @@ function we(e = [], t, n) {
671
683
  marginLeft: 0,
672
684
  marginRight: 0,
673
685
  ...i,
674
- ...Ce(t)
686
+ ...we(t)
675
687
  },
676
688
  children: [t.href ? /* @__PURE__ */ d("a", {
677
689
  href: t.href,
@@ -690,16 +702,16 @@ function we(e = [], t, n) {
690
702
  })]
691
703
  }, n);
692
704
  }
693
- if (t.type === "video") return Fe(t.url) ? /* @__PURE__ */ d("div", {
705
+ if (t.type === "video") return Ie(t.url) ? /* @__PURE__ */ d("div", {
694
706
  style: {
695
707
  ...i,
696
- ...Ce({
708
+ ...we({
697
709
  align: t.align,
698
710
  wrap: t.wrap,
699
711
  width: t.width ?? 100
700
712
  })
701
713
  },
702
- children: /* @__PURE__ */ d(Ie, {
714
+ children: /* @__PURE__ */ d(Le, {
703
715
  url: t.url,
704
716
  autoplay: t.autoplay,
705
717
  muted: t.muted,
@@ -761,17 +773,17 @@ function we(e = [], t, n) {
761
773
  }
762
774
  if (t.type === "quote") return /* @__PURE__ */ d("blockquote", {
763
775
  style: {
764
- ...Ee,
776
+ ...De,
765
777
  ...i
766
778
  },
767
779
  children: r(t.parts, t.text)
768
780
  }, n);
769
- if (Se[t.type]) {
781
+ if (Ce[t.type]) {
770
782
  let e = t.type;
771
783
  return /* @__PURE__ */ d(e, {
772
784
  style: {
773
- ...le,
774
- fontSize: Se[t.type],
785
+ ...ue,
786
+ fontSize: Ce[t.type],
775
787
  ...i
776
788
  },
777
789
  children: r(t.parts, t.text)
@@ -779,39 +791,39 @@ function we(e = [], t, n) {
779
791
  }
780
792
  return /* @__PURE__ */ d("p", {
781
793
  style: {
782
- ...ue,
794
+ ...de,
783
795
  ...i
784
796
  },
785
797
  children: r(t.parts, t.text)
786
798
  }, n);
787
799
  });
788
800
  }
789
- function Te({ content: e, style: t, linked: n, nodeRef: r }) {
801
+ function Ee({ content: e, style: t, linked: n, nodeRef: r }) {
790
802
  return /* @__PURE__ */ d("div", {
791
803
  ref: r,
792
804
  style: {
793
805
  display: "flow-root",
794
806
  ...C(t)
795
807
  },
796
- children: we(e, n)
808
+ children: Te(e, n)
797
809
  });
798
810
  }
799
- var Ee = {
811
+ var De = {
800
812
  margin: 0,
801
813
  padding: "8px 0 8px 20px",
802
814
  borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
803
815
  };
804
- function De({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
816
+ function Oe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
805
817
  return /* @__PURE__ */ d("blockquote", {
806
818
  ref: i,
807
819
  style: {
808
- ...Ee,
820
+ ...De,
809
821
  ...C(n)
810
822
  },
811
- children: J(t, e, r)
823
+ children: Y(t, e, r)
812
824
  });
813
825
  }
814
- function Oe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
826
+ function ke({ ordered: e, items: t = [], style: n, nodeRef: r }) {
815
827
  return /* @__PURE__ */ d(e ? "ol" : "ul", {
816
828
  ref: r,
817
829
  style: {
@@ -821,53 +833,53 @@ function Oe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
821
833
  },
822
834
  children: t.map((e, t) => /* @__PURE__ */ d("li", {
823
835
  style: { marginBottom: 4 },
824
- children: J(e.parts, e.text)
836
+ children: Y(e.parts, e.text)
825
837
  }, t))
826
838
  });
827
839
  }
828
- function ke({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
840
+ function Ae({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
829
841
  return /* @__PURE__ */ d("p", {
830
842
  ref: i,
831
843
  style: {
832
- ...ue,
844
+ ...de,
833
845
  ...C(n)
834
846
  },
835
- children: J(t, e, r)
847
+ children: Y(t, e, r)
836
848
  });
837
849
  }
838
- var Ae = {
850
+ var je = {
839
851
  color: "var(--page-accent, inherit)",
840
852
  textDecoration: "underline",
841
853
  textUnderlineOffset: 3,
842
854
  cursor: "pointer"
843
855
  };
844
- function je({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
856
+ function Me({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
845
857
  return /* @__PURE__ */ d("a", {
846
858
  ref: o,
847
859
  href: n || "#",
848
860
  target: r || void 0,
849
861
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
850
862
  style: {
851
- ...Ae,
863
+ ...je,
852
864
  ...C(i)
853
865
  },
854
- children: J(t, e, a)
866
+ children: Y(t, e, a)
855
867
  });
856
868
  }
857
- function Me({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
869
+ function Ne({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
858
870
  return /* @__PURE__ */ d("a", {
859
871
  ref: o,
860
872
  href: n || "#",
861
873
  target: r || void 0,
862
874
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
863
875
  style: {
864
- ...q,
876
+ ...J,
865
877
  ...C(i)
866
878
  },
867
- children: J(t, e, a)
879
+ children: Y(t, e, a)
868
880
  });
869
881
  }
870
- function Ne({ src: e, alt: t, style: n, nodeRef: r }) {
882
+ function Pe({ src: e, alt: t, style: n, nodeRef: r }) {
871
883
  return e ? /* @__PURE__ */ d("img", {
872
884
  ref: r,
873
885
  src: e,
@@ -879,7 +891,7 @@ function Ne({ src: e, alt: t, style: n, nodeRef: r }) {
879
891
  }
880
892
  }) : null;
881
893
  }
882
- function Pe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
894
+ function Fe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
883
895
  return e ? /* @__PURE__ */ d("video", {
884
896
  ref: s,
885
897
  src: e,
@@ -897,9 +909,9 @@ function Pe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
897
909
  }
898
910
  }) : null;
899
911
  }
900
- var Fe = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
901
- function Ie({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
902
- let c = Fe(e);
912
+ var Ie = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
913
+ function Le({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
914
+ let c = Ie(e);
903
915
  if (!c) return null;
904
916
  let l = new URLSearchParams({ rel: "0" });
905
917
  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", {
@@ -925,7 +937,7 @@ function Ie({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
925
937
  })
926
938
  });
927
939
  }
928
- function Le({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
940
+ function Re({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
929
941
  return e ? /* @__PURE__ */ d("iframe", {
930
942
  ref: i,
931
943
  src: e,
@@ -941,7 +953,7 @@ function Le({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
941
953
  }
942
954
  }) : null;
943
955
  }
944
- function Re({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
956
+ function ze({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
945
957
  let [i, o] = l(null);
946
958
  return a(() => {
947
959
  i && (i.innerHTML = e || "", t && i.querySelectorAll("script").forEach((e) => {
@@ -960,7 +972,7 @@ function Re({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
960
972
  style: C(n)
961
973
  });
962
974
  }
963
- function ze({ height: e, nodeRef: t }) {
975
+ function Be({ height: e, nodeRef: t }) {
964
976
  return /* @__PURE__ */ d("div", {
965
977
  ref: t,
966
978
  style: {
@@ -970,7 +982,7 @@ function ze({ height: e, nodeRef: t }) {
970
982
  }
971
983
  });
972
984
  }
973
- function Be({ style: e, nodeRef: t }) {
985
+ function Ve({ style: e, nodeRef: t }) {
974
986
  return /* @__PURE__ */ d("div", {
975
987
  ref: t,
976
988
  style: {
@@ -981,7 +993,7 @@ function Be({ style: e, nodeRef: t }) {
981
993
  }
982
994
  });
983
995
  }
984
- var Ve = {
996
+ var He = {
985
997
  position: "absolute",
986
998
  top: "50%",
987
999
  transform: "translateY(-50%)",
@@ -998,7 +1010,7 @@ var Ve = {
998
1010
  alignItems: "center",
999
1011
  justifyContent: "center",
1000
1012
  padding: 0
1001
- }, He = {
1013
+ }, Ue = {
1002
1014
  bottom: {
1003
1015
  inset: "auto 0 0 0",
1004
1016
  padding: "40px 24px 20px",
@@ -1017,8 +1029,8 @@ var Ve = {
1017
1029
  padding: 24,
1018
1030
  textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
1019
1031
  }
1020
- }, Ue = 48;
1021
- function We({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
1032
+ }, We = 48;
1033
+ function Ge({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
1022
1034
  let [p, m] = l(0), [h, g] = l(!1), [_, v] = l(null), y = e ? Math.min(p, e - 1) : 0;
1023
1035
  if (a(() => {
1024
1036
  if (!n || h || _ || e < 2) return;
@@ -1034,7 +1046,7 @@ function We({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1034
1046
  let b = (t) => m((t + e) % e), x = () => {
1035
1047
  if (!_) return;
1036
1048
  let { dx: e } = _;
1037
- v(null), e < -48 ? b(y + 1) : e > Ue && b(y - 1);
1049
+ v(null), e < -48 ? b(y + 1) : e > We && b(y - 1);
1038
1050
  };
1039
1051
  return /* @__PURE__ */ f("div", {
1040
1052
  ref: c,
@@ -1082,7 +1094,7 @@ function We({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1082
1094
  type: "button",
1083
1095
  "aria-label": "Previous slide",
1084
1096
  style: {
1085
- ...Ve,
1097
+ ...He,
1086
1098
  left: 12
1087
1099
  },
1088
1100
  onClick: () => b(y - 1),
@@ -1092,7 +1104,7 @@ function We({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1092
1104
  type: "button",
1093
1105
  "aria-label": "Next slide",
1094
1106
  style: {
1095
- ...Ve,
1107
+ ...He,
1096
1108
  right: 12
1097
1109
  },
1098
1110
  onClick: () => b(y + 1),
@@ -1126,7 +1138,7 @@ function We({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1126
1138
  ] })]
1127
1139
  });
1128
1140
  }
1129
- var Ge = (e, t) => ({
1141
+ var Ke = (e, t) => ({
1130
1142
  position: "absolute",
1131
1143
  inset: 0,
1132
1144
  backgroundImage: e ? `url(${e})` : "none",
@@ -1134,18 +1146,18 @@ var Ge = (e, t) => ({
1134
1146
  backgroundSize: "cover",
1135
1147
  backgroundPosition: "center"
1136
1148
  });
1137
- function Ke({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1138
- return e.length ? /* @__PURE__ */ d(We, {
1149
+ function qe({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1150
+ return e.length ? /* @__PURE__ */ d(Ge, {
1139
1151
  ...r,
1140
1152
  count: e.length,
1141
1153
  renderSlide: (r) => {
1142
1154
  let i = e[r];
1143
- return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: Ge(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
1155
+ return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: Ke(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
1144
1156
  style: {
1145
1157
  position: "absolute",
1146
1158
  color: "#fff",
1147
1159
  textAlign: n,
1148
- ...He[t] ?? He.bottom
1160
+ ...Ue[t] ?? Ue.bottom
1149
1161
  },
1150
1162
  children: [i.title && /* @__PURE__ */ d("div", {
1151
1163
  style: {
@@ -1165,13 +1177,13 @@ function Ke({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
1165
1177
  }
1166
1178
  }) : null;
1167
1179
  }
1168
- function qe({ slides: e = [], linked: t, ...n }) {
1169
- return e.length ? /* @__PURE__ */ d(We, {
1180
+ function Je({ slides: e = [], linked: t, ...n }) {
1181
+ return e.length ? /* @__PURE__ */ d(Ge, {
1170
1182
  ...n,
1171
1183
  count: e.length,
1172
1184
  renderSlide: (n) => {
1173
1185
  let r = e[n];
1174
- return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: Ge(r.image, r.color) }), /* @__PURE__ */ d("div", {
1186
+ return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: Ke(r.image, r.color) }), /* @__PURE__ */ d("div", {
1175
1187
  style: {
1176
1188
  position: "absolute",
1177
1189
  inset: 0,
@@ -1183,7 +1195,7 @@ function qe({ slides: e = [], linked: t, ...n }) {
1183
1195
  }
1184
1196
  }) : null;
1185
1197
  }
1186
- function Je({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: i = !0, style: o, nodeRef: s, inert: c }) {
1198
+ function Ye({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: i = !0, style: o, nodeRef: s, inert: c }) {
1187
1199
  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];
1188
1200
  a(() => {
1189
1201
  if (!v) return;
@@ -1382,19 +1394,19 @@ function Je({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
1382
1394
  ]
1383
1395
  });
1384
1396
  }
1385
- var Ye = {
1397
+ var Xe = {
1386
1398
  color: "inherit",
1387
1399
  textDecoration: "none",
1388
1400
  fontSize: 14,
1389
1401
  opacity: .85
1390
- }, Xe = {
1402
+ }, Ze = {
1391
1403
  background: "var(--page-bg, #ffffff)",
1392
1404
  color: "var(--page-text, #111827)",
1393
1405
  border: "1px solid rgba(148, 163, 184, 0.25)",
1394
1406
  boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
1395
1407
  zIndex: 60
1396
1408
  };
1397
- function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], style: s, nodeRef: c, menu: p = "auto", breakpoint: m = 768 }) {
1409
+ function Qe({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], style: s, nodeRef: c, menu: p = "auto", breakpoint: m = 768 }) {
1398
1410
  let [h, g] = l(null), [_, v] = l(!1), [y, b] = l(!1), [x, S] = l(null);
1399
1411
  a(() => {
1400
1412
  if (!h) return;
@@ -1404,7 +1416,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1404
1416
  let w = p === "hamburger" || p === "auto" && _, T = (e, t) => /* @__PURE__ */ f("a", {
1405
1417
  href: e.href || "#",
1406
1418
  style: {
1407
- ...Ye,
1419
+ ...Xe,
1408
1420
  display: "block",
1409
1421
  ...t
1410
1422
  },
@@ -1492,7 +1504,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1492
1504
  let t = e.children ?? [];
1493
1505
  if (!t.length) return /* @__PURE__ */ d("a", {
1494
1506
  href: e.href || "#",
1495
- style: Ye,
1507
+ style: Xe,
1496
1508
  children: e.label
1497
1509
  }, e.key);
1498
1510
  let n = e.type === "mega";
@@ -1506,7 +1518,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1506
1518
  children: [/* @__PURE__ */ f("a", {
1507
1519
  href: e.href || "#",
1508
1520
  style: {
1509
- ...Ye,
1521
+ ...Xe,
1510
1522
  cursor: "pointer"
1511
1523
  },
1512
1524
  children: [
@@ -1522,7 +1534,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1522
1534
  ]
1523
1535
  }), x === e.key && (n ? /* @__PURE__ */ d("div", {
1524
1536
  style: {
1525
- ...Xe,
1537
+ ...Ze,
1526
1538
  position: "absolute",
1527
1539
  left: 0,
1528
1540
  right: 0,
@@ -1538,7 +1550,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1538
1550
  }))
1539
1551
  }) : /* @__PURE__ */ d("div", {
1540
1552
  style: {
1541
- ...Xe,
1553
+ ...Ze,
1542
1554
  position: "absolute",
1543
1555
  top: "100%",
1544
1556
  left: 0,
@@ -1567,7 +1579,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1567
1579
  children: o.map((e) => /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d("a", {
1568
1580
  href: e.href || "#",
1569
1581
  style: {
1570
- ...Ye,
1582
+ ...Xe,
1571
1583
  padding: "10px 4px",
1572
1584
  fontWeight: (e.children ?? []).length ? 600 : 400,
1573
1585
  opacity: 1
@@ -1578,7 +1590,7 @@ function Ze({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
1578
1590
  ]
1579
1591
  });
1580
1592
  }
1581
- function Qe({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1593
+ function $e({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1582
1594
  let [i, a] = l(0), o = e.length ? Math.min(i, e.length - 1) : 0;
1583
1595
  return e.length ? /* @__PURE__ */ f("div", {
1584
1596
  ref: r,
@@ -1618,7 +1630,7 @@ function Qe({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1618
1630
  }, e.key))]
1619
1631
  }) : null;
1620
1632
  }
1621
- function $e({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1633
+ function et({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1622
1634
  let [a, o] = l(() => new Set(e.length ? [e[0].key] : []));
1623
1635
  if (!e.length) return null;
1624
1636
  let s = (e) => o((t) => {
@@ -1675,15 +1687,15 @@ function $e({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
1675
1687
  })
1676
1688
  });
1677
1689
  }
1678
- var et = {
1690
+ var tt = {
1679
1691
  display: "flex",
1680
1692
  flexDirection: "column",
1681
1693
  gap: "12px"
1682
- }, Y = {
1694
+ }, X = {
1683
1695
  fontSize: "14px",
1684
1696
  fontWeight: 500,
1685
1697
  color: "var(--page-text, #111827)"
1686
- }, X = {
1698
+ }, Z = {
1687
1699
  padding: "10px 12px",
1688
1700
  border: "1px solid #d1d5db",
1689
1701
  borderRadius: "6px",
@@ -1693,18 +1705,18 @@ var et = {
1693
1705
  boxSizing: "border-box",
1694
1706
  backgroundColor: "#ffffff",
1695
1707
  color: "#111827"
1696
- }, tt = {
1708
+ }, nt = {
1697
1709
  display: "flex",
1698
1710
  alignItems: "center",
1699
1711
  gap: "8px",
1700
1712
  fontSize: "14px",
1701
1713
  color: "var(--page-text, #111827)"
1702
- }, Z = (e) => e ? {
1714
+ }, Q = (e) => e ? {
1703
1715
  readOnly: !0,
1704
1716
  tabIndex: -1,
1705
1717
  onMouseDown: (e) => e.preventDefault()
1706
1718
  } : {};
1707
- function nt(e, t) {
1719
+ function rt(e, t) {
1708
1720
  if (!e) return !0;
1709
1721
  let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
1710
1722
  switch (e.op) {
@@ -1718,11 +1730,11 @@ function nt(e, t) {
1718
1730
  default: return !1;
1719
1731
  }
1720
1732
  }
1721
- var rt = {
1733
+ var it = {
1722
1734
  display: "flex",
1723
1735
  flexDirection: "column",
1724
1736
  gap: 6
1725
- }, it = {
1737
+ }, at = {
1726
1738
  font: "inherit",
1727
1739
  fontSize: 15,
1728
1740
  padding: "10px 12px",
@@ -1733,16 +1745,16 @@ var rt = {
1733
1745
  width: "100%",
1734
1746
  boxSizing: "border-box"
1735
1747
  };
1736
- function at(e, t) {
1748
+ function ot(e, t) {
1737
1749
  let n = Array.isArray(e?.options) ? e.options : [];
1738
1750
  if (!e?.parentField) return n;
1739
1751
  let r = t?.[e.parentField];
1740
1752
  return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
1741
1753
  }
1742
- function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1754
+ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
1743
1755
  let a = /* @__PURE__ */ f("span", {
1744
1756
  style: {
1745
- ...Y,
1757
+ ...X,
1746
1758
  fontSize: 14
1747
1759
  },
1748
1760
  children: [e.label, e.required ? " *" : ""]
@@ -1751,7 +1763,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1751
1763
  required: e.required || void 0,
1752
1764
  placeholder: e.placeholder || void 0,
1753
1765
  disabled: r || void 0,
1754
- style: it,
1766
+ style: at,
1755
1767
  value: t ?? "",
1756
1768
  onChange: (t) => n(e.name, t.target.value)
1757
1769
  };
@@ -1780,7 +1792,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1780
1792
  borderRadius: 8,
1781
1793
  display: "block"
1782
1794
  }
1783
- }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(Ie, {
1795
+ }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(Le, {
1784
1796
  url: e.src,
1785
1797
  style: { width: "100%" }
1786
1798
  }) : /* @__PURE__ */ d("video", {
@@ -1792,14 +1804,14 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1792
1804
  display: "block"
1793
1805
  }
1794
1806
  }) : null : /* @__PURE__ */ f("label", {
1795
- style: rt,
1807
+ style: it,
1796
1808
  children: [
1797
1809
  a,
1798
1810
  e.type === "textarea" || e.multiline ? /* @__PURE__ */ d("textarea", {
1799
1811
  ...o,
1800
1812
  rows: 4,
1801
1813
  style: {
1802
- ...it,
1814
+ ...at,
1803
1815
  resize: "vertical"
1804
1816
  }
1805
1817
  }) : e.type === "select" ? /* @__PURE__ */ f("select", {
@@ -1808,7 +1820,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1808
1820
  children: [/* @__PURE__ */ d("option", {
1809
1821
  value: "",
1810
1822
  children: e.placeholder || "—"
1811
- }), at(e, i).map((e, t) => /* @__PURE__ */ d("option", {
1823
+ }), ot(e, i).map((e, t) => /* @__PURE__ */ d("option", {
1812
1824
  value: typeof e == "string" ? e : e.value,
1813
1825
  children: typeof e == "string" ? e : e.label ?? e.value
1814
1826
  }, t))]
@@ -1855,7 +1867,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1855
1867
  ]
1856
1868
  });
1857
1869
  }
1858
- function st({ 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 }) {
1870
+ function ct({ 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 }) {
1859
1871
  let { tenant: y, apiUrl: b } = i(H), [x, S] = l("form"), [w, T] = l(null), [E, D] = l({}), [O, k] = l(0), A = h ? v || "form" : x;
1860
1872
  a(() => {
1861
1873
  if (!c || !s) return;
@@ -1877,9 +1889,9 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
1877
1889
  section: e,
1878
1890
  fields: []
1879
1891
  }) : j[j.length - 1].fields.push(e);
1880
- let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || nt(e.section.condition, E)).map((e) => ({
1892
+ let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || rt(e.section.condition, E)).map((e) => ({
1881
1893
  ...e,
1882
- fields: e.fields.filter((e) => nt(e.condition, E))
1894
+ fields: e.fields.filter((e) => rt(e.condition, E))
1883
1895
  })), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), I = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), L = I.filter((e) => {
1884
1896
  let t = E[e.name];
1885
1897
  return e.required && (t == null || t === "" || t === !1);
@@ -1937,11 +1949,11 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
1937
1949
  }
1938
1950
  },
1939
1951
  style: {
1940
- ...et,
1952
+ ...tt,
1941
1953
  display: A === "success" ? "none" : "flex"
1942
1954
  },
1943
1955
  children: c && s ? /* @__PURE__ */ f(u, { children: [
1944
- P && /* @__PURE__ */ d(St, {
1956
+ P && /* @__PURE__ */ d(jt, {
1945
1957
  steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
1946
1958
  active: F + 1,
1947
1959
  style: { marginBottom: 8 }
@@ -1954,7 +1966,7 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
1954
1966
  },
1955
1967
  children: N[F].section.help
1956
1968
  }),
1957
- I.map((e) => /* @__PURE__ */ d(ot, {
1969
+ I.map((e) => /* @__PURE__ */ d(st, {
1958
1970
  field: e,
1959
1971
  value: E[e.name],
1960
1972
  values: E,
@@ -1973,7 +1985,7 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
1973
1985
  disabled: h || void 0,
1974
1986
  onClick: () => k(F - 1),
1975
1987
  style: {
1976
- ...q,
1988
+ ...J,
1977
1989
  background: "transparent",
1978
1990
  color: "inherit",
1979
1991
  border: 0,
@@ -1986,7 +1998,7 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
1986
1998
  disabled: h || L.length > 0,
1987
1999
  onClick: () => k(F + 1),
1988
2000
  style: {
1989
- ...q,
2001
+ ...J,
1990
2002
  border: 0,
1991
2003
  padding: "10px 22px",
1992
2004
  borderRadius: 8,
@@ -2000,7 +2012,7 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
2000
2012
  type: "submit",
2001
2013
  disabled: h || void 0,
2002
2014
  style: {
2003
- ...q,
2015
+ ...J,
2004
2016
  border: 0,
2005
2017
  padding: "10px 22px",
2006
2018
  borderRadius: 8,
@@ -2027,10 +2039,10 @@ function st({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
2027
2039
  ]
2028
2040
  });
2029
2041
  }
2030
- var Q = null, ct = null, lt = (e) => {
2042
+ var $ = null, lt = null, ut = (e) => {
2031
2043
  let t = typeof e == "string" && e.trim() ? e.trim() : "";
2032
- if (Q && ct === t) return Q;
2033
- if (Q && typeof window < "u") {
2044
+ if ($ && lt === t) return $;
2045
+ if ($ && typeof window < "u") {
2034
2046
  for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
2035
2047
  delete window[e];
2036
2048
  } catch {
@@ -2038,27 +2050,32 @@ var Q = null, ct = null, lt = (e) => {
2038
2050
  }
2039
2051
  document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
2040
2052
  }
2041
- return ct = t, Q = new Promise((e) => {
2053
+ return lt = t, $ = new Promise((e) => {
2042
2054
  if (typeof window > "u") return;
2043
2055
  if (window.grecaptcha?.render) return e(window.grecaptcha);
2044
2056
  window.__webimRecaptchaReady = () => e(window.grecaptcha);
2045
2057
  let n = document.createElement("script");
2046
2058
  n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
2047
- }), Q;
2059
+ }), $;
2048
2060
  };
2049
- function ut({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l }) {
2050
- let u = i(H), p = u?.settings && typeof u.settings == "object" ? u.settings["google.recaptchaKey"] : "", m = typeof e == "string" && e.trim() || (typeof p == "string" ? p.trim() : ""), h = c(null);
2051
- if (a(() => {
2052
- if (l || !m || !h.current) return;
2053
- let e = !0;
2054
- return lt(r).then((r) => {
2055
- if (!(!e || !h.current || !r?.render)) {
2056
- h.current.innerHTML = "";
2061
+ function dt({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l, onChange: u }) {
2062
+ let p = i(H), 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);
2063
+ if (_.current = u, a(() => {
2064
+ if (l || !h || !g.current) return;
2065
+ let e = !0, i = (t) => {
2066
+ e && typeof _.current == "function" && _.current(t);
2067
+ };
2068
+ return ut(r).then((r) => {
2069
+ if (!(!e || !g.current || !r?.render)) {
2070
+ g.current.innerHTML = "", i("");
2057
2071
  try {
2058
- r.render(h.current, {
2059
- sitekey: m,
2072
+ r.render(g.current, {
2073
+ sitekey: h,
2060
2074
  theme: t === "dark" ? "dark" : "light",
2061
- size: n === "compact" ? "compact" : "normal"
2075
+ size: n === "compact" ? "compact" : "normal",
2076
+ callback: (e) => i(typeof e == "string" ? e : ""),
2077
+ "expired-callback": () => i(""),
2078
+ "error-callback": () => i("")
2062
2079
  });
2063
2080
  } catch {}
2064
2081
  }
@@ -2067,7 +2084,7 @@ function ut({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
2067
2084
  };
2068
2085
  }, [
2069
2086
  l,
2070
- m,
2087
+ h,
2071
2088
  t,
2072
2089
  n,
2073
2090
  r
@@ -2114,7 +2131,7 @@ function ut({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
2114
2131
  children: "reCAPTCHA"
2115
2132
  })
2116
2133
  ]
2117
- }), !m && /* @__PURE__ */ d("div", {
2134
+ }), !h && /* @__PURE__ */ d("div", {
2118
2135
  style: {
2119
2136
  marginTop: 6,
2120
2137
  fontSize: 11,
@@ -2124,23 +2141,23 @@ function ut({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
2124
2141
  })]
2125
2142
  });
2126
2143
  }
2127
- return m ? /* @__PURE__ */ d("div", {
2144
+ return h ? /* @__PURE__ */ d("div", {
2128
2145
  ref: s,
2129
2146
  style: C(o),
2130
- children: /* @__PURE__ */ d("div", { ref: h })
2147
+ children: /* @__PURE__ */ d("div", { ref: g })
2131
2148
  }) : null;
2132
2149
  }
2133
- function dt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2150
+ function ft({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2134
2151
  return /* @__PURE__ */ d("label", {
2135
2152
  ref: r,
2136
2153
  style: {
2137
- ...Y,
2154
+ ...X,
2138
2155
  ...C(n)
2139
2156
  },
2140
- children: J(t, e, i)
2157
+ children: Y(t, e, i)
2141
2158
  });
2142
2159
  }
2143
- function ft({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2160
+ function pt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2144
2161
  return /* @__PURE__ */ d("input", {
2145
2162
  ref: a,
2146
2163
  type: e,
@@ -2148,13 +2165,13 @@ function ft({ type: e = "text", name: t, placeholder: n, required: r, style: i,
2148
2165
  placeholder: n,
2149
2166
  required: !o && !!r,
2150
2167
  style: {
2151
- ...X,
2168
+ ...Z,
2152
2169
  ...C(i)
2153
2170
  },
2154
- ...Z(o)
2171
+ ...Q(o)
2155
2172
  });
2156
2173
  }
2157
- function pt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2174
+ function mt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2158
2175
  return /* @__PURE__ */ d("textarea", {
2159
2176
  ref: a,
2160
2177
  name: e || void 0,
@@ -2162,18 +2179,18 @@ function pt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
2162
2179
  rows: n,
2163
2180
  required: !o && !!r,
2164
2181
  style: {
2165
- ...X,
2182
+ ...Z,
2166
2183
  resize: "vertical",
2167
2184
  ...C(i)
2168
2185
  },
2169
- ...Z(o)
2186
+ ...Q(o)
2170
2187
  });
2171
2188
  }
2172
- function mt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2189
+ function ht({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2173
2190
  return /* @__PURE__ */ f("label", {
2174
2191
  ref: o,
2175
2192
  style: {
2176
- ...tt,
2193
+ ...nt,
2177
2194
  ...C(a)
2178
2195
  },
2179
2196
  children: [/* @__PURE__ */ d("input", {
@@ -2190,7 +2207,7 @@ function mt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
2190
2207
  }), t]
2191
2208
  });
2192
2209
  }
2193
- function ht({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2210
+ function gt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2194
2211
  return /* @__PURE__ */ f("select", {
2195
2212
  ref: a,
2196
2213
  name: e || void 0,
@@ -2199,7 +2216,7 @@ function ht({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2199
2216
  onMouseDown: o ? (e) => e.preventDefault() : void 0,
2200
2217
  tabIndex: o ? -1 : void 0,
2201
2218
  style: {
2202
- ...X,
2219
+ ...Z,
2203
2220
  appearance: "auto",
2204
2221
  ...C(i)
2205
2222
  },
@@ -2213,12 +2230,12 @@ function ht({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2213
2230
  }, t))]
2214
2231
  });
2215
2232
  }
2216
- function gt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2233
+ function _t({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2217
2234
  let [s, c] = l(null);
2218
2235
  return /* @__PURE__ */ f("label", {
2219
2236
  ref: a,
2220
2237
  style: {
2221
- ...X,
2238
+ ...Z,
2222
2239
  display: "flex",
2223
2240
  alignItems: "center",
2224
2241
  gap: "8px",
@@ -2245,12 +2262,12 @@ function gt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
2245
2262
  ]
2246
2263
  });
2247
2264
  }
2248
- function _t({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2265
+ function vt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2249
2266
  return /* @__PURE__ */ d("button", {
2250
2267
  ref: n,
2251
2268
  type: r ? "button" : "submit",
2252
2269
  style: {
2253
- ...q,
2270
+ ...J,
2254
2271
  border: 0,
2255
2272
  cursor: "pointer",
2256
2273
  alignSelf: "flex-start",
@@ -2265,7 +2282,7 @@ function _t({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2265
2282
  children: e
2266
2283
  });
2267
2284
  }
2268
- function vt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2285
+ function yt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2269
2286
  let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
2270
2287
  return /* @__PURE__ */ d("div", {
2271
2288
  ref: r,
@@ -2282,61 +2299,63 @@ function vt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2282
2299
  }, t))
2283
2300
  });
2284
2301
  }
2285
- function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, imageField: o, titleField: s = "name", textField: c, custom: u, templateId: p, paged: m, style: h, nodeRef: g }) {
2286
- let { tenant: _, apiUrl: v, locale: y } = i(H), b = i(ae), x = i(U), S = x?.[e], w = m ? W(x) : 1, [T, E] = l(null);
2302
+ function bt({ 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: _ }) {
2303
+ let { tenant: v, apiUrl: y, locale: b } = i(H), x = i(G), S = i(U), w = oe(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : S?.[e], O = m ? W(S) : 1, [k, A] = l(null);
2287
2304
  if (a(() => {
2288
- if (!e || S) return;
2305
+ if (!e || D) return;
2289
2306
  let n = !0, r = new URLSearchParams();
2290
- if (y && r.set("locale", y), m && !e.startsWith("api:")) {
2307
+ if (b && r.set("locale", b), E && r.set("data_filter", T), m && !e.startsWith("api:")) {
2291
2308
  let e = Math.max(1, Number(t) || 6);
2292
- r.set("offset", String((w - 1) * e)), r.set("limit", String(e));
2309
+ r.set("offset", String((O - 1) * e)), r.set("limit", String(e));
2293
2310
  }
2294
- let i = r.toString(), a = e.startsWith("api:") ? `${v}/data/${encodeURIComponent(e.slice(4))}` : `${v}/dynamic/${encodeURIComponent(e)}${i ? `?${i}` : ""}`;
2295
- return fetch(a, { headers: _ ? { "x-tenant": _ } : {} }).then((e) => e.json()).then((e) => {
2311
+ let i = r.toString(), a = e.startsWith("api:") ? `${y}/data/${encodeURIComponent(e.slice(4))}` : `${y}/dynamic/${encodeURIComponent(e)}${i ? `?${i}` : ""}`;
2312
+ return fetch(a, { headers: v ? { "x-tenant": v } : {} }).then((e) => e.json()).then((e) => {
2296
2313
  let t = Array.isArray(e?.payload) ? e.payload : Array.isArray(e?.payload?.data) ? e.payload.data : [];
2297
- return n && E(t.filter((e) => e && typeof e == "object"));
2298
- }).catch(() => n && E([])), () => {
2314
+ return n && A(t.filter((e) => e && typeof e == "object"));
2315
+ }).catch(() => n && A([])), () => {
2299
2316
  n = !1;
2300
2317
  };
2301
2318
  }, [
2302
2319
  e,
2303
- _,
2304
2320
  v,
2305
2321
  y,
2306
- S,
2322
+ b,
2323
+ D,
2307
2324
  m,
2308
- w,
2309
- t
2325
+ O,
2326
+ t,
2327
+ E,
2328
+ T
2310
2329
  ]), !e) return null;
2311
- let D = Math.max(1, Number(t) || 6), O = m ? S || e.startsWith("api:") ? (S ?? T ?? []).slice((w - 1) * D, w * D) : (T ?? []).slice(0, D) : (S ?? T ?? []).slice(0, D), k = Math.min(Math.max(Number(r) || 3, 1), 6), A = n === "list" ? {
2330
+ let j = Math.max(1, Number(t) || 6), M = m ? D || e.startsWith("api:") ? (D ?? k ?? []).slice((O - 1) * j, O * j) : (k ?? []).slice(0, j) : (D ?? k ?? []).slice(0, j), N = Math.min(Math.max(Number(r) || 3, 1), 6), P = n === "list" ? {
2312
2331
  display: "flex",
2313
2332
  flexDirection: "column",
2314
2333
  gap: 20
2315
2334
  } : {
2316
2335
  display: "grid",
2317
- gridTemplateColumns: `repeat(${k}, minmax(0, 1fr))`,
2336
+ gridTemplateColumns: `repeat(${N}, minmax(0, 1fr))`,
2318
2337
  gap: 24
2319
2338
  };
2320
- return u && p && b?.render ? /* @__PURE__ */ d("div", {
2321
- ref: g,
2339
+ return u && p && x?.render ? /* @__PURE__ */ d("div", {
2340
+ ref: _,
2322
2341
  style: {
2323
2342
  width: "100%",
2324
- ...A,
2325
- ...C(h)
2343
+ ...P,
2344
+ ...C(g)
2326
2345
  },
2327
- children: O.map((e) => /* @__PURE__ */ d("div", {
2346
+ children: M.map((e) => /* @__PURE__ */ d("div", {
2328
2347
  style: { minWidth: 0 },
2329
- children: b.render(p, (t) => ce(t, e))
2348
+ children: x.render(p, (t) => le(t, e))
2330
2349
  }, e.id ?? e?.data?.slug))
2331
2350
  }) : /* @__PURE__ */ d("div", {
2332
- ref: g,
2351
+ ref: _,
2333
2352
  style: {
2334
2353
  width: "100%",
2335
- ...A,
2336
- ...C(h)
2354
+ ...P,
2355
+ ...C(g)
2337
2356
  },
2338
- children: O.map((e) => {
2339
- let t = o ? G(e?.data, o) : null, r = s ? K(G(e?.data, s)) : null, i = c ? G(e?.data, c) : null, a = Array.isArray(i) ? i : null, l = a || i == null ? null : K(i), u = n === "list";
2357
+ children: M.map((e) => {
2358
+ let t = o ? K(e?.data, o) : null, r = s ? q(K(e?.data, s)) : null, i = c ? K(e?.data, c) : null, a = Array.isArray(i) ? i : null, l = a || i == null ? null : q(i), u = n === "list";
2340
2359
  return /* @__PURE__ */ f("div", {
2341
2360
  style: {
2342
2361
  display: "flex",
@@ -2383,7 +2402,7 @@ function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
2383
2402
  lineHeight: 1.55,
2384
2403
  opacity: .85
2385
2404
  },
2386
- children: we(a)
2405
+ children: Te(a)
2387
2406
  })
2388
2407
  ]
2389
2408
  })]
@@ -2391,7 +2410,91 @@ function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
2391
2410
  })
2392
2411
  });
2393
2412
  }
2394
- function bt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2413
+ function xt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
2414
+ let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : ae(), s = {
2415
+ display: "flex",
2416
+ flexDirection: "column",
2417
+ gap: 4,
2418
+ fontSize: 12,
2419
+ fontWeight: 600,
2420
+ color: "var(--page-text, #111827)",
2421
+ minWidth: 140,
2422
+ flex: "1 1 140px"
2423
+ }, c = (e) => {
2424
+ let t = e && typeof e == "object" ? e.value : e, n = e && typeof e == "object" ? e.label ?? e.value : e;
2425
+ return {
2426
+ value: String(t ?? ""),
2427
+ label: String(n ?? "")
2428
+ };
2429
+ };
2430
+ return /* @__PURE__ */ f("form", {
2431
+ ref: r,
2432
+ method: "get",
2433
+ onSubmit: i ? (e) => e.preventDefault() : void 0,
2434
+ style: {
2435
+ display: "flex",
2436
+ flexWrap: "wrap",
2437
+ alignItems: "flex-end",
2438
+ gap: 12,
2439
+ width: "100%",
2440
+ ...C(n)
2441
+ },
2442
+ children: [a.map((e) => /* @__PURE__ */ f("label", {
2443
+ style: s,
2444
+ children: [/* @__PURE__ */ d("span", { children: e.label || e.name }), e.type === "option" || e.type === "select" ? /* @__PURE__ */ f("select", {
2445
+ name: `f_${e.name}`,
2446
+ defaultValue: o[e.name] ?? "",
2447
+ style: Z,
2448
+ ...Q(i),
2449
+ children: [/* @__PURE__ */ d("option", {
2450
+ value: "",
2451
+ children: "—"
2452
+ }), (Array.isArray(e.options) ? e.options : []).map((e) => {
2453
+ let t = c(e);
2454
+ return /* @__PURE__ */ d("option", {
2455
+ value: t.value,
2456
+ children: t.label
2457
+ }, t.value);
2458
+ })]
2459
+ }) : e.type === "switch" ? /* @__PURE__ */ f("select", {
2460
+ name: `f_${e.name}`,
2461
+ defaultValue: o[e.name] ?? "",
2462
+ style: Z,
2463
+ ...Q(i),
2464
+ children: [
2465
+ /* @__PURE__ */ d("option", {
2466
+ value: "",
2467
+ children: "—"
2468
+ }),
2469
+ /* @__PURE__ */ d("option", {
2470
+ value: "true",
2471
+ children: "Yes"
2472
+ }),
2473
+ /* @__PURE__ */ d("option", {
2474
+ value: "false",
2475
+ children: "No"
2476
+ })
2477
+ ]
2478
+ }) : /* @__PURE__ */ d("input", {
2479
+ type: "text",
2480
+ name: `f_${e.name}`,
2481
+ defaultValue: o[e.name] ?? "",
2482
+ placeholder: e.label || e.name,
2483
+ style: Z,
2484
+ ...Q(i)
2485
+ })]
2486
+ }, e.name)), /* @__PURE__ */ d("button", {
2487
+ type: "submit",
2488
+ style: {
2489
+ ...J,
2490
+ flex: "0 0 auto"
2491
+ },
2492
+ ...Q(i),
2493
+ children: t
2494
+ })]
2495
+ });
2496
+ }
2497
+ function St({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2395
2498
  return e.length ? /* @__PURE__ */ d("nav", {
2396
2499
  ref: r,
2397
2500
  "aria-label": "Breadcrumb",
@@ -2441,7 +2544,7 @@ function bt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2441
2544
  })
2442
2545
  }) : null;
2443
2546
  }
2444
- function xt({ 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 }) {
2547
+ function Ct({ 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 }) {
2445
2548
  let { tenant: g, apiUrl: _ } = i(H), v = i(U), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
2446
2549
  a(() => {
2447
2550
  if (!o || Number.isFinite(x)) return;
@@ -2526,7 +2629,243 @@ function xt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
2526
2629
  ]
2527
2630
  });
2528
2631
  }
2529
- function St({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
2632
+ var wt = "webim.page_mode", Tt = () => {
2633
+ if (typeof window > "u") return "auto";
2634
+ try {
2635
+ let e = window.localStorage.getItem(wt);
2636
+ return e === "light" || e === "dark" ? e : "auto";
2637
+ } catch {
2638
+ return "auto";
2639
+ }
2640
+ }, Et = (e) => {
2641
+ let t = {
2642
+ width: 16,
2643
+ height: 16,
2644
+ viewBox: "0 0 24 24",
2645
+ fill: "none",
2646
+ stroke: "currentColor",
2647
+ strokeWidth: 2,
2648
+ strokeLinecap: "round",
2649
+ strokeLinejoin: "round",
2650
+ "aria-hidden": !0
2651
+ };
2652
+ return e === "light" ? /* @__PURE__ */ f("svg", {
2653
+ ...t,
2654
+ children: [/* @__PURE__ */ d("circle", {
2655
+ cx: "12",
2656
+ cy: "12",
2657
+ r: "4"
2658
+ }), /* @__PURE__ */ d("path", { d: "M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" })]
2659
+ }) : e === "dark" ? /* @__PURE__ */ d("svg", {
2660
+ ...t,
2661
+ children: /* @__PURE__ */ d("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
2662
+ }) : /* @__PURE__ */ f("svg", {
2663
+ ...t,
2664
+ children: [/* @__PURE__ */ d("rect", {
2665
+ x: "2",
2666
+ y: "3",
2667
+ width: "20",
2668
+ height: "14",
2669
+ rx: "2"
2670
+ }), /* @__PURE__ */ d("path", { d: "M8 21h8M12 17v4" })]
2671
+ });
2672
+ }, Dt = {
2673
+ light: "Light theme",
2674
+ dark: "Dark theme",
2675
+ auto: "Follow the device theme"
2676
+ };
2677
+ function Ot({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2678
+ let [o, s] = l(i ? "auto" : Tt), u = c(null), f = (e) => {
2679
+ u.current = e, typeof r == "function" && r(e);
2680
+ };
2681
+ a(() => {
2682
+ if (i) return;
2683
+ let e = u.current?.closest?.(".webim-page");
2684
+ e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
2685
+ try {
2686
+ o === "auto" ? window.localStorage.removeItem(wt) : window.localStorage.setItem(wt, o);
2687
+ } catch {}
2688
+ }, [o, i]);
2689
+ let p = t === !1 ? ["light", "dark"] : [
2690
+ "light",
2691
+ "dark",
2692
+ "auto"
2693
+ ], m = p.includes(o) ? o : p[0], h = {
2694
+ appearance: "none",
2695
+ border: 0,
2696
+ margin: 0,
2697
+ display: "inline-flex",
2698
+ alignItems: "center",
2699
+ justifyContent: "center",
2700
+ background: "transparent",
2701
+ color: "inherit",
2702
+ font: "inherit",
2703
+ cursor: i ? "default" : "pointer",
2704
+ borderRadius: 999
2705
+ };
2706
+ if (e === "buttons") return /* @__PURE__ */ d("div", {
2707
+ ref: f,
2708
+ role: "group",
2709
+ "aria-label": "Theme",
2710
+ style: {
2711
+ display: "inline-flex",
2712
+ alignItems: "center",
2713
+ gap: 2,
2714
+ padding: 3,
2715
+ borderRadius: 999,
2716
+ border: "1px solid rgba(148, 163, 184, 0.4)",
2717
+ ...C(n)
2718
+ },
2719
+ children: p.map((e) => /* @__PURE__ */ d("button", {
2720
+ type: "button",
2721
+ title: Dt[e],
2722
+ "aria-label": Dt[e],
2723
+ "aria-pressed": e === m,
2724
+ onClick: i ? void 0 : () => s(e),
2725
+ style: {
2726
+ ...h,
2727
+ width: 28,
2728
+ height: 28,
2729
+ color: e === m ? "var(--page-accent-text, #ffffff)" : "inherit",
2730
+ background: e === m ? "var(--page-accent, #111827)" : "transparent",
2731
+ opacity: e === m ? 1 : .7
2732
+ },
2733
+ children: Et(e)
2734
+ }, e))
2735
+ });
2736
+ let g = p[(p.indexOf(m) + 1) % p.length];
2737
+ return /* @__PURE__ */ d("button", {
2738
+ ref: f,
2739
+ type: "button",
2740
+ title: Dt[m],
2741
+ "aria-label": `Theme: ${Dt[m]} — switch to ${Dt[g]}`,
2742
+ onClick: i ? void 0 : () => s(g),
2743
+ style: {
2744
+ ...h,
2745
+ width: 36,
2746
+ height: 36,
2747
+ border: "1px solid rgba(148, 163, 184, 0.4)",
2748
+ ...C(n)
2749
+ },
2750
+ children: Et(m)
2751
+ });
2752
+ }
2753
+ var kt = {
2754
+ facebook: {
2755
+ label: "Facebook",
2756
+ color: "#1877f2",
2757
+ d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"
2758
+ },
2759
+ instagram: {
2760
+ label: "Instagram",
2761
+ color: "#e4405f",
2762
+ d: "M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06zm0 5.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"
2763
+ },
2764
+ x: {
2765
+ label: "X (Twitter)",
2766
+ color: "#000000",
2767
+ d: "M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"
2768
+ },
2769
+ linkedin: {
2770
+ label: "LinkedIn",
2771
+ color: "#0a66c2",
2772
+ d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
2773
+ },
2774
+ youtube: {
2775
+ label: "YouTube",
2776
+ color: "#ff0000",
2777
+ d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
2778
+ },
2779
+ tiktok: {
2780
+ label: "TikTok",
2781
+ color: "#000000",
2782
+ d: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"
2783
+ },
2784
+ whatsapp: {
2785
+ label: "WhatsApp",
2786
+ color: "#25d366",
2787
+ d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"
2788
+ },
2789
+ telegram: {
2790
+ label: "Telegram",
2791
+ color: "#26a5e4",
2792
+ d: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"
2793
+ },
2794
+ pinterest: {
2795
+ label: "Pinterest",
2796
+ color: "#bd081c",
2797
+ d: "M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.03-.655 2.569-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12 0-6.628-5.373-12-12-12z"
2798
+ },
2799
+ github: {
2800
+ label: "GitHub",
2801
+ color: "#181717",
2802
+ d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
2803
+ },
2804
+ discord: {
2805
+ label: "Discord",
2806
+ color: "#5865f2",
2807
+ d: "M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.058a.082.082 0 00.031.056 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.873-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.009c.12.099.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.331c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"
2808
+ },
2809
+ email: {
2810
+ label: "E-mail",
2811
+ color: "#64748b",
2812
+ d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z"
2813
+ },
2814
+ website: {
2815
+ label: "Website",
2816
+ color: "#64748b",
2817
+ 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"
2818
+ }
2819
+ };
2820
+ function At({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
2821
+ let l = Array.isArray(e) ? e.filter((e) => e && kt[e.network]) : [];
2822
+ if (!l.length) return null;
2823
+ 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;
2824
+ return /* @__PURE__ */ d("div", {
2825
+ ref: s,
2826
+ style: {
2827
+ display: "flex",
2828
+ flexWrap: "wrap",
2829
+ alignItems: "center",
2830
+ gap: p,
2831
+ ...C(o)
2832
+ },
2833
+ children: l.map((e, r) => {
2834
+ let i = kt[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);
2835
+ return /* @__PURE__ */ d("a", {
2836
+ href: e.url || "#",
2837
+ onClick: h,
2838
+ "aria-label": e.label || i.label,
2839
+ title: e.label || i.label,
2840
+ ...a !== !1 && !c ? {
2841
+ target: "_blank",
2842
+ rel: "noopener noreferrer"
2843
+ } : {},
2844
+ style: {
2845
+ display: "inline-flex",
2846
+ alignItems: "center",
2847
+ justifyContent: "center",
2848
+ width: t === "plain" ? u : f,
2849
+ height: t === "plain" ? u : f,
2850
+ borderRadius: "50%",
2851
+ background: o ? m(i) : "transparent",
2852
+ border: t === "outline" ? `1px solid ${m(i)}` : "none",
2853
+ color: "inherit",
2854
+ textDecoration: "none"
2855
+ },
2856
+ children: /* @__PURE__ */ d("svg", {
2857
+ width: u,
2858
+ height: u,
2859
+ viewBox: "0 0 24 24",
2860
+ fill: s,
2861
+ "aria-hidden": !0,
2862
+ children: /* @__PURE__ */ d("path", { d: i.d })
2863
+ })
2864
+ }, `${e.network}-${r}`);
2865
+ })
2866
+ });
2867
+ }
2868
+ function jt({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
2530
2869
  if (!e.length) return null;
2531
2870
  let o = Math.min(Math.max(Number(n) || 1, 1), e.length), s = (e) => ({
2532
2871
  width: 32,
@@ -2604,7 +2943,7 @@ function St({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
2604
2943
  })
2605
2944
  });
2606
2945
  }
2607
- var Ct = {
2946
+ var Mt = {
2608
2947
  small: {
2609
2948
  w: 132,
2610
2949
  h: 46,
@@ -2626,10 +2965,10 @@ var Ct = {
2626
2965
  title: 12.5,
2627
2966
  avatar: 46
2628
2967
  }
2629
- }, wt = (e) => Ct[e] ?? Ct.medium;
2630
- Ct.medium.w, Ct.medium.h;
2631
- function Tt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2632
- let r = wt(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 = [];
2968
+ }, Nt = (e) => Mt[e] ?? Mt.medium;
2969
+ Mt.medium.w, Mt.medium.h;
2970
+ function Pt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2971
+ let r = Nt(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 = [];
2633
2972
  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);
2634
2973
  let d = /* @__PURE__ */ new Map(), f = (e, t) => {
2635
2974
  if (t.has(e.id)) return 0;
@@ -2681,19 +3020,19 @@ function Tt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2681
3020
  horizontal: n
2682
3021
  };
2683
3022
  }
2684
- var Et = (e, t) => {
3023
+ var Ft = (e, t) => {
2685
3024
  let n = String(e ?? "");
2686
3025
  return n.length > t ? `${n.slice(0, t - 1)}…` : n;
2687
- }, Dt = (e) => {
3026
+ }, It = (e) => {
2688
3027
  let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
2689
3028
  if (!t) return "#ffffff";
2690
3029
  let n = t[1];
2691
3030
  n.length === 3 && (n = [...n].map((e) => e + e).join(""));
2692
3031
  let r = parseInt(n, 16);
2693
3032
  return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
2694
- }, Ot = (e) => !!(e?.cv?.trim?.() || e?.photo);
2695
- function kt(e, t = {}) {
2696
- 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);
3033
+ }, Lt = (e) => !!(e?.cv?.trim?.() || e?.photo);
3034
+ function Rt(e, t = {}) {
3035
+ 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 ? "" : q(e);
2697
3036
  return n.map((e) => {
2698
3037
  let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
2699
3038
  return {
@@ -2707,11 +3046,11 @@ function kt(e, t = {}) {
2707
3046
  };
2708
3047
  });
2709
3048
  }
2710
- var At = {
3049
+ var zt = {
2711
3050
  size: 36,
2712
3051
  pad: 10
2713
3052
  };
2714
- function jt({ node: e, onClose: t }) {
3053
+ function Bt({ node: e, onClose: t }) {
2715
3054
  return a(() => {
2716
3055
  let e = (e) => e.key === "Escape" && t();
2717
3056
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
@@ -2829,7 +3168,7 @@ function jt({ node: e, onClose: t }) {
2829
3168
  })
2830
3169
  });
2831
3170
  }
2832
- function Mt({ 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 }) {
3171
+ function Vt({ 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 }) {
2833
3172
  let b = o(), [x, S] = l(null), { tenant: w, apiUrl: T } = i(H), E = i(U)?.[t], [D, O] = l(null);
2834
3173
  a(() => {
2835
3174
  if (!t || E) return;
@@ -2846,14 +3185,14 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
2846
3185
  T,
2847
3186
  E
2848
3187
  ]);
2849
- let k = t ? kt(E ?? D ?? [], {
3188
+ let k = t ? Rt(E ?? D ?? [], {
2850
3189
  nameField: n,
2851
3190
  titleField: r,
2852
3191
  photoField: s,
2853
3192
  parentField: c,
2854
3193
  cvField: p,
2855
3194
  hrefField: m
2856
- }) : e, A = wt(h), { boxes: j, links: M, width: N, height: P } = Tt(k, {
3195
+ }) : e, A = Nt(h), { boxes: j, links: M, width: N, height: P } = Pt(k, {
2857
3196
  size: h,
2858
3197
  horizontal: g
2859
3198
  });
@@ -2899,7 +3238,7 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
2899
3238
  stroke: "rgba(148, 163, 184, 0.7)",
2900
3239
  strokeWidth: "1.5"
2901
3240
  }, t)), j.map(({ node: e, x: t, y: n }) => {
2902
- 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 ? Dt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Dt(e.color2) : s, l = y && (Ot(e) || e.href), p = () => Ot(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + At.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);
3241
+ 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 ? It(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? It(e.color2) : s, l = y && (Lt(e) || e.href), p = () => Lt(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + zt.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);
2903
3242
  return /* @__PURE__ */ f("g", {
2904
3243
  onClick: l ? p : void 0,
2905
3244
  style: l ? { cursor: "pointer" } : void 0,
@@ -2963,13 +3302,13 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
2963
3302
  e.photo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
2964
3303
  id: `${b}-${e.id}`,
2965
3304
  children: /* @__PURE__ */ d("circle", {
2966
- cx: t + At.pad + A.avatar / 2,
3305
+ cx: t + zt.pad + A.avatar / 2,
2967
3306
  cy: n + A.h / 2,
2968
3307
  r: A.avatar / 2
2969
3308
  })
2970
3309
  }), /* @__PURE__ */ d("image", {
2971
3310
  href: e.photo,
2972
- x: t + At.pad,
3311
+ x: t + zt.pad,
2973
3312
  y: n + (A.h - A.avatar) / 2,
2974
3313
  width: A.avatar,
2975
3314
  height: A.avatar,
@@ -2983,7 +3322,7 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
2983
3322
  fontSize: A.title,
2984
3323
  fontWeight: "600",
2985
3324
  fill: s,
2986
- children: Et(e.title, g + 4)
3325
+ children: Ft(e.title, g + 4)
2987
3326
  }), e.name && /* @__PURE__ */ d("text", {
2988
3327
  x: m,
2989
3328
  y: n + _ + _ / 2 + A.name * .35,
@@ -2991,7 +3330,7 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
2991
3330
  fontSize: A.name,
2992
3331
  fontWeight: "600",
2993
3332
  fill: c,
2994
- children: Et(e.name, g)
3333
+ children: Ft(e.name, g)
2995
3334
  })] }) : /* @__PURE__ */ f(u, { children: [v[0] && /* @__PURE__ */ d("text", {
2996
3335
  x: m,
2997
3336
  y: n + (v[1] ? A.h * .43 : A.h * .57),
@@ -2999,7 +3338,7 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
2999
3338
  fontSize: A.name,
3000
3339
  fontWeight: "600",
3001
3340
  fill: s,
3002
- children: Et(v[0], g)
3341
+ children: Ft(v[0], g)
3003
3342
  }), v[1] && /* @__PURE__ */ d("text", {
3004
3343
  x: m,
3005
3344
  y: n + A.h * .73,
@@ -3007,18 +3346,18 @@ function Mt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3007
3346
  fontSize: A.title,
3008
3347
  opacity: "0.7",
3009
3348
  fill: s,
3010
- children: Et(v[1], g + 4)
3349
+ children: Ft(v[1], g + 4)
3011
3350
  })] })
3012
3351
  ]
3013
3352
  }, e.id);
3014
3353
  })]
3015
- }), x && /* @__PURE__ */ d(jt, {
3354
+ }), x && /* @__PURE__ */ d(Bt, {
3016
3355
  node: x,
3017
3356
  onClose: () => S(null)
3018
3357
  })]
3019
3358
  });
3020
3359
  }
3021
- function Nt({ 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 }) {
3360
+ function Ht({ 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 }) {
3022
3361
  let { tenant: g, apiUrl: _ } = i(H), v = i(U), y = v?.[n], b = u ? W(v) : 1, [x, S] = l(null);
3023
3362
  if (a(() => {
3024
3363
  if (!n || y) return;
@@ -3038,7 +3377,7 @@ function Nt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped:
3038
3377
  b,
3039
3378
  r
3040
3379
  ]), !e.length) return null;
3041
- let w = Math.max(1, Number(r) || 10), T = n ? u ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => K(G(t?.data, e.field)))) : t, D = !!n && !(n && !y && x === null) && E.length === 0, O = c ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
3380
+ let w = Math.max(1, Number(r) || 10), T = n ? u ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => q(K(t?.data, e.field)))) : t, D = !!n && !(n && !y && x === null) && E.length === 0, O = c ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
3042
3381
  return /* @__PURE__ */ d("div", {
3043
3382
  ref: h,
3044
3383
  style: {
@@ -3084,75 +3423,78 @@ function Nt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped:
3084
3423
  })
3085
3424
  });
3086
3425
  }
3087
- var Pt = {
3088
- PageRoot: he,
3089
- Section: ge,
3090
- Container: _e,
3091
- Heading: ve,
3092
- TextBlock: ke,
3093
- ButtonBlock: Me,
3094
- ImageBlock: Ne,
3095
- Spacer: ze,
3096
- Divider: Be,
3097
- SliderBlock: Ke,
3098
- CanvasSlider: qe,
3099
- TabsBlock: Qe,
3100
- QuickStack: vt,
3101
- CollectionList: yt,
3102
- BreadcrumbsBlock: bt,
3103
- PaginationBlock: xt,
3104
- StepperBlock: St,
3105
- OrgChartBlock: Mt,
3106
- TableBlock: Nt,
3107
- MasonryBlock: Je,
3108
- AccordionBlock: $e,
3109
- NavbarBlock: Ze,
3110
- ListBlock: Oe,
3111
- TextSpan: xe,
3112
- QuoteBlock: De,
3113
- TextLink: je,
3114
- RichTextBlock: Te,
3115
- RichContentBlock: Te,
3116
- VideoBlock: Pe,
3117
- YouTubeBlock: Ie,
3118
- IframeBlock: Le,
3119
- EmbedBlock: Re,
3120
- FormBlock: st,
3121
- FormLabel: dt,
3122
- FormInput: ft,
3123
- FormTextarea: pt,
3124
- FormCheckbox: (e) => /* @__PURE__ */ d(mt, {
3426
+ var Ut = {
3427
+ PageRoot: ge,
3428
+ Section: _e,
3429
+ Container: ve,
3430
+ Heading: ye,
3431
+ TextBlock: Ae,
3432
+ ButtonBlock: Ne,
3433
+ ImageBlock: Pe,
3434
+ Spacer: Be,
3435
+ Divider: Ve,
3436
+ SliderBlock: qe,
3437
+ CanvasSlider: Je,
3438
+ TabsBlock: $e,
3439
+ QuickStack: yt,
3440
+ CollectionList: bt,
3441
+ CollectionSearch: xt,
3442
+ BreadcrumbsBlock: St,
3443
+ PaginationBlock: Ct,
3444
+ StepperBlock: jt,
3445
+ SocialLinksBlock: At,
3446
+ ThemeModeBlock: Ot,
3447
+ OrgChartBlock: Vt,
3448
+ TableBlock: Ht,
3449
+ MasonryBlock: Ye,
3450
+ AccordionBlock: et,
3451
+ NavbarBlock: Qe,
3452
+ ListBlock: ke,
3453
+ TextSpan: Se,
3454
+ QuoteBlock: Oe,
3455
+ TextLink: Me,
3456
+ RichTextBlock: Ee,
3457
+ RichContentBlock: Ee,
3458
+ VideoBlock: Fe,
3459
+ YouTubeBlock: Le,
3460
+ IframeBlock: Re,
3461
+ EmbedBlock: ze,
3462
+ FormBlock: ct,
3463
+ FormLabel: ft,
3464
+ FormInput: pt,
3465
+ FormTextarea: mt,
3466
+ FormCheckbox: (e) => /* @__PURE__ */ d(ht, {
3125
3467
  kind: "checkbox",
3126
3468
  ...e
3127
3469
  }),
3128
- FormRadio: (e) => /* @__PURE__ */ d(mt, {
3470
+ FormRadio: (e) => /* @__PURE__ */ d(ht, {
3129
3471
  kind: "radio",
3130
3472
  ...e
3131
3473
  }),
3132
- FormSelect: ht,
3133
- FormFile: gt,
3134
- FormRecaptcha: ut,
3135
- FormSubmit: _t
3136
- }, Ft = {
3474
+ FormSelect: gt,
3475
+ FormFile: _t,
3476
+ FormRecaptcha: dt,
3477
+ FormSubmit: vt
3478
+ }, Wt = {
3137
3479
  id: "auth",
3138
3480
  label: "Accounts",
3139
3481
  category: "Apps",
3140
3482
  keys: ["SiteLoginForm", "SiteAccountMenu"],
3141
3483
  ssr: "shell",
3142
3484
  settings: ["site.authRedirect"]
3143
- }, It = n({
3485
+ }, Gt = n({
3144
3486
  user: null,
3145
3487
  status: "idle",
3146
3488
  ensure: () => {},
3147
3489
  refresh: () => {},
3148
3490
  signOut: () => {}
3149
- }), Lt = () => {
3150
- let e = i(It);
3491
+ }), Kt = () => {
3492
+ let e = i(Gt);
3151
3493
  return a(() => {
3152
3494
  e.ensure();
3153
3495
  }, [e]), e;
3154
3496
  };
3155
- function Rt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o }) {
3497
+ function qt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o }) {
3156
3498
  let u = i(H), 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}`, {
3157
3499
  ...t,
3158
3500
  credentials: "include",
@@ -3185,18 +3527,18 @@ function Rt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o })
3185
3527
  b,
3186
3528
  x
3187
3529
  ]);
3188
- return /* @__PURE__ */ d(It.Provider, {
3530
+ return /* @__PURE__ */ d(Gt.Provider, {
3189
3531
  value: C,
3190
3532
  children: e
3191
3533
  });
3192
3534
  }
3193
- function zt({ when: e, children: t }) {
3194
- let { status: n } = Lt();
3535
+ function Jt({ when: e, children: t }) {
3536
+ let { status: n } = Kt();
3195
3537
  return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
3196
3538
  }
3197
3539
  //#endregion
3198
3540
  //#region ../ui/src/components/builder/apps/auth/views.jsx
3199
- function Bt({ 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 }) {
3541
+ function Yt({ 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 }) {
3200
3542
  let { tenant: h, apiUrl: g, settings: _ } = i(H), [v, y] = l("form"), [b, x] = l(""), [S, w] = l(!1), T = e === "register", E = u ? m || "form" : v, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
3201
3543
  if (e.preventDefault(), u) return;
3202
3544
  let n = new FormData(e.currentTarget);
@@ -3245,20 +3587,20 @@ function Bt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3245
3587
  children: [
3246
3588
  T ? /* @__PURE__ */ f("label", {
3247
3589
  style: {
3248
- ...Y,
3590
+ ...X,
3249
3591
  display: "grid",
3250
3592
  gap: 6
3251
3593
  },
3252
3594
  children: [a, /* @__PURE__ */ d("input", {
3253
3595
  name: "name",
3254
3596
  type: "text",
3255
- style: X,
3256
- ...Z(u)
3597
+ style: Z,
3598
+ ...Q(u)
3257
3599
  })]
3258
3600
  }) : null,
3259
3601
  /* @__PURE__ */ f("label", {
3260
3602
  style: {
3261
- ...Y,
3603
+ ...X,
3262
3604
  display: "grid",
3263
3605
  gap: 6
3264
3606
  },
@@ -3266,13 +3608,13 @@ function Bt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3266
3608
  name: "email",
3267
3609
  type: "email",
3268
3610
  required: !u,
3269
- style: X,
3270
- ...Z(u)
3611
+ style: Z,
3612
+ ...Q(u)
3271
3613
  })]
3272
3614
  }),
3273
3615
  /* @__PURE__ */ f("label", {
3274
3616
  style: {
3275
- ...Y,
3617
+ ...X,
3276
3618
  display: "grid",
3277
3619
  gap: 6
3278
3620
  },
@@ -3280,15 +3622,15 @@ function Bt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3280
3622
  name: "password",
3281
3623
  type: "password",
3282
3624
  required: !u,
3283
- style: X,
3284
- ...Z(u)
3625
+ style: Z,
3626
+ ...Q(u)
3285
3627
  })]
3286
3628
  }),
3287
3629
  /* @__PURE__ */ d("button", {
3288
3630
  type: u ? "button" : "submit",
3289
3631
  disabled: S || void 0,
3290
3632
  style: {
3291
- ...q,
3633
+ ...J,
3292
3634
  border: 0,
3293
3635
  padding: "10px 22px",
3294
3636
  borderRadius: 8,
@@ -3320,8 +3662,8 @@ function Bt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3320
3662
  ]
3321
3663
  });
3322
3664
  }
3323
- function Vt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
3324
- let { user: c, status: l, signOut: u } = Lt(), p = a ? s || "user" : l, m = a ? {
3665
+ function Xt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
3666
+ let { user: c, status: l, signOut: u } = Kt(), p = a ? s || "user" : l, m = a ? {
3325
3667
  name: "Ada Lovelace",
3326
3668
  email: "ada@example.com"
3327
3669
  } : c;
@@ -3342,7 +3684,7 @@ function Vt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3342
3684
  children: [
3343
3685
  /* @__PURE__ */ f("span", {
3344
3686
  style: {
3345
- ...Y,
3687
+ ...X,
3346
3688
  fontWeight: 600
3347
3689
  },
3348
3690
  children: [
@@ -3353,7 +3695,7 @@ function Vt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3353
3695
  }),
3354
3696
  n && m?.email ? /* @__PURE__ */ d("span", {
3355
3697
  style: {
3356
- ...Y,
3698
+ ...X,
3357
3699
  opacity: .7
3358
3700
  },
3359
3701
  children: m.email
@@ -3362,14 +3704,14 @@ function Vt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3362
3704
  type: "button",
3363
3705
  onClick: a ? void 0 : u,
3364
3706
  style: {
3365
- ...q,
3707
+ ...J,
3366
3708
  border: 0,
3367
3709
  padding: "8px 16px",
3368
3710
  borderRadius: 8,
3369
3711
  fontSize: 14,
3370
3712
  cursor: a ? "default" : "pointer"
3371
3713
  },
3372
- ...Z(a),
3714
+ ...Q(a),
3373
3715
  children: t
3374
3716
  })
3375
3717
  ]
@@ -3386,42 +3728,42 @@ function Vt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3386
3728
  }
3387
3729
  //#endregion
3388
3730
  //#region ../ui/src/components/builder/apps/index.js
3389
- var Ht = [Ft], Ut = {
3390
- SiteLoginForm: Bt,
3391
- SiteAccountMenu: Vt
3731
+ var Zt = [Wt], Qt = {
3732
+ SiteLoginForm: Yt,
3733
+ SiteAccountMenu: Xt
3392
3734
  };
3393
- new Set(Ht.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3735
+ new Set(Zt.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3394
3736
  //#endregion
3395
3737
  //#region ../ui/src/components/builder/plugins/runtime.js
3396
- var Wt = /* @__PURE__ */ new Map();
3397
- function Gt(e) {
3398
- if (Wt.has(e)) return Wt.get(e);
3738
+ var $t = /* @__PURE__ */ new Map();
3739
+ function en(e) {
3740
+ if ($t.has(e)) return $t.get(e);
3399
3741
  let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
3400
3742
  /* @vite-ignore */
3401
3743
  /* webpackIgnore: true */
3402
3744
  t
3403
3745
  ).finally(() => URL.revokeObjectURL(t));
3404
- return Wt.set(e, n), n;
3746
+ return $t.set(e, n), n;
3405
3747
  }
3406
- function Kt(e) {
3748
+ function tn(e) {
3407
3749
  let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
3408
3750
  return n && typeof n == "object" ? n : {};
3409
3751
  }
3410
3752
  //#endregion
3411
3753
  //#region ../ui/src/components/builder/plugins/view.jsx
3412
- async function qt(e, t) {
3413
- let n = await Gt(e);
3754
+ async function nn(e, t) {
3755
+ let n = await en(e);
3414
3756
  return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
3415
3757
  }
3416
- var Jt = {
3758
+ var rn = {
3417
3759
  padding: "10px 12px",
3418
3760
  border: "1px dashed rgba(148, 163, 184, 0.5)",
3419
3761
  borderRadius: 8,
3420
3762
  fontSize: 12,
3421
3763
  opacity: .6
3422
3764
  };
3423
- function Yt({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3424
- let s = i(H), l = Kt(s?.settings)[e], u = c(null), p = c(null), m = {
3765
+ function an({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3766
+ let s = i(H), l = tn(s?.settings)[e], u = c(null), p = c(null), m = {
3425
3767
  tenant: s?.tenant ?? "",
3426
3768
  apiUrl: s?.apiUrl ?? "/api",
3427
3769
  locale: s?.locale ?? "",
@@ -3433,7 +3775,7 @@ function Yt({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3433
3775
  let e = u.current;
3434
3776
  if (!l?.code || !e) return;
3435
3777
  let n = !0;
3436
- return qt(l.code, t).then((e) => {
3778
+ return nn(l.code, t).then((e) => {
3437
3779
  if (!(!n || !e || !u.current)) {
3438
3780
  p.current = e;
3439
3781
  try {
@@ -3463,7 +3805,7 @@ function Yt({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3463
3805
  }) : /* @__PURE__ */ f("div", {
3464
3806
  ref: o,
3465
3807
  style: {
3466
- ...Jt,
3808
+ ...rn,
3467
3809
  ...C(r)
3468
3810
  },
3469
3811
  children: [
@@ -3475,12 +3817,12 @@ function Yt({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3475
3817
  }
3476
3818
  //#endregion
3477
3819
  //#region ../ui/src/components/builder/render.jsx
3478
- var Xt = {
3479
- ...Pt,
3820
+ var on = {
3480
3821
  ...Ut,
3481
- PluginBlock: Yt
3822
+ ...Qt,
3823
+ PluginBlock: an
3482
3824
  };
3483
- function $(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3825
+ function sn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3484
3826
  let o = n[e];
3485
3827
  if (!o || o.hidden) return null;
3486
3828
  let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
@@ -3488,11 +3830,11 @@ function $(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3488
3830
  let n = o.props?.componentId, s = r?.[n];
3489
3831
  if (!s?.template || i.has(n)) return null;
3490
3832
  let c = new Set(i).add(n);
3491
- return /* @__PURE__ */ d(t, { children: $(s.template.rootId, s.template.nodes, r, c, a) }, e);
3833
+ return /* @__PURE__ */ d(t, { children: sn(s.template.rootId, s.template.nodes, r, c, a) }, e);
3492
3834
  }
3493
- let l = Xt[s];
3835
+ let l = on[s];
3494
3836
  if (!l) return null;
3495
- let u = (o.nodes ?? []).map((e) => $(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, $(t, n, r, i)])) : void 0, m = /* @__PURE__ */ d(l, {
3837
+ let u = (o.nodes ?? []).map((e) => sn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, sn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ d(l, {
3496
3838
  ...c,
3497
3839
  ...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
3498
3840
  linked: p,
@@ -3501,15 +3843,16 @@ function $(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3501
3843
  },
3502
3844
  children: u.length ? u : void 0
3503
3845
  }, e);
3504
- return c.when && c.when !== "always" ? /* @__PURE__ */ d(zt, {
3846
+ return c.when && c.when !== "always" ? /* @__PURE__ */ d(Jt, {
3505
3847
  when: c.when,
3506
3848
  children: m
3507
3849
  }, e) : m;
3508
3850
  }
3509
3851
  //#endregion
3510
3852
  //#region ../ui/src/components/builder/PageRenderer.jsx
3511
- var Zt = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" ");
3512
- function Qt({ 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: v }) {
3853
+ var cn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), ln = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(V(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
3854
+ .webim-page[data-webim-mode="dark"] { ${Object.entries(V(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
3855
+ function un({ 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: v }) {
3513
3856
  let b = o?.js?.trim();
3514
3857
  if (a(() => {
3515
3858
  if (!b) return;
@@ -3523,33 +3866,36 @@ function Qt({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3523
3866
  minHeight: "100%",
3524
3867
  display: "flex",
3525
3868
  flexDirection: "column"
3526
- }, w = $("ROOT", e, n), T = s(() => ({ render: (t, r) => $(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = F(e, n), D = P(e, n), O = o?.css?.trim(), k = y(e, n).map((e) => /* @__PURE__ */ d("link", {
3869
+ }, w = sn("ROOT", e, n), T = s(() => ({ render: (t, r) => sn(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = F(e, n), D = P(e, n), O = o?.css?.trim(), k = y(e, n).map((e) => /* @__PURE__ */ d("link", {
3527
3870
  rel: "stylesheet",
3528
3871
  precedence: "default",
3529
3872
  href: _(e)
3530
- }, e));
3531
- if (r !== "auto") return /* @__PURE__ */ d(H.Provider, {
3873
+ }, e)), A = B(t), j = ln(A);
3874
+ return r === "auto" ? /* @__PURE__ */ d(H.Provider, {
3532
3875
  value: {
3533
3876
  tenant: c || "",
3534
3877
  apiUrl: l || "/api",
3535
3878
  locale: p || "",
3536
3879
  settings: g ?? null
3537
3880
  },
3538
- children: /* @__PURE__ */ d(Rt, {
3881
+ children: /* @__PURE__ */ d(qt, {
3539
3882
  initialUser: v,
3540
3883
  children: /* @__PURE__ */ d(U.Provider, {
3541
3884
  value: u ?? null,
3542
- children: /* @__PURE__ */ d(ae.Provider, {
3885
+ children: /* @__PURE__ */ d(G.Provider, {
3543
3886
  value: T,
3544
3887
  children: /* @__PURE__ */ f("div", {
3545
3888
  ...x,
3546
3889
  className: "webim-page",
3547
3890
  style: {
3548
3891
  ...C,
3549
- ...re(t, r),
3892
+ ...ne(t),
3550
3893
  ...i
3551
3894
  },
3552
3895
  children: [
3896
+ /* @__PURE__ */ d("style", { children: `.webim-page { ${cn(V(A.light))} }
3897
+ @media (prefers-color-scheme: dark) { .webim-page { ${cn(V(A.dark))} } }` }),
3898
+ /* @__PURE__ */ d("style", { children: j }),
3553
3899
  k,
3554
3900
  /* @__PURE__ */ d("style", { children: S }),
3555
3901
  E && /* @__PURE__ */ d("style", { children: E }),
@@ -3561,33 +3907,30 @@ function Qt({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3561
3907
  })
3562
3908
  })
3563
3909
  })
3564
- });
3565
- let A = B(t);
3566
- return /* @__PURE__ */ d(H.Provider, {
3910
+ }) : /* @__PURE__ */ d(H.Provider, {
3567
3911
  value: {
3568
3912
  tenant: c || "",
3569
3913
  apiUrl: l || "/api",
3570
3914
  locale: p || "",
3571
3915
  settings: g ?? null
3572
3916
  },
3573
- children: /* @__PURE__ */ d(Rt, {
3917
+ children: /* @__PURE__ */ d(qt, {
3574
3918
  initialUser: v,
3575
3919
  children: /* @__PURE__ */ d(U.Provider, {
3576
3920
  value: u ?? null,
3577
- children: /* @__PURE__ */ d(ae.Provider, {
3921
+ children: /* @__PURE__ */ d(G.Provider, {
3578
3922
  value: T,
3579
3923
  children: /* @__PURE__ */ f("div", {
3580
3924
  ...x,
3581
3925
  className: "webim-page",
3582
3926
  style: {
3583
3927
  ...C,
3584
- ...ne(t),
3928
+ ...re(t, r),
3585
3929
  ...i
3586
3930
  },
3587
3931
  children: [
3588
- /* @__PURE__ */ d("style", { children: `.webim-page { ${Zt(V(A.light))} }
3589
- @media (prefers-color-scheme: dark) { .webim-page { ${Zt(V(A.dark))} } }` }),
3590
3932
  k,
3933
+ /* @__PURE__ */ d("style", { children: j }),
3591
3934
  /* @__PURE__ */ d("style", { children: S }),
3592
3935
  E && /* @__PURE__ */ d("style", { children: E }),
3593
3936
  D && /* @__PURE__ */ d("style", { children: D }),
@@ -3602,8 +3945,8 @@ function Qt({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3602
3945
  }
3603
3946
  //#endregion
3604
3947
  //#region src/WebimContent.jsx
3605
- function $t({ bundle: e, mode: t = "auto", style: n }) {
3606
- return e?.blocks?.ROOT ? /* @__PURE__ */ d(Qt, {
3948
+ function dn({ bundle: e, mode: t = "auto", style: n }) {
3949
+ return e?.blocks?.ROOT ? /* @__PURE__ */ d(un, {
3607
3950
  blocks: e.blocks,
3608
3951
  theme: e.theme,
3609
3952
  components: e.components,
@@ -3620,7 +3963,7 @@ function $t({ bundle: e, mode: t = "auto", style: n }) {
3620
3963
  }
3621
3964
  //#endregion
3622
3965
  //#region src/bundle.js
3623
- function en({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
3966
+ function fn({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
3624
3967
  let a = {
3625
3968
  ...t?.global ?? {},
3626
3969
  ...t?.tenant ?? {}
@@ -3644,18 +3987,18 @@ function en({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
3644
3987
  }
3645
3988
  //#endregion
3646
3989
  //#region src/fetchPage.js
3647
- var tn = async (e) => {
3990
+ var pn = async (e) => {
3648
3991
  let t = await e.json().catch(() => null);
3649
3992
  if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
3650
3993
  return t?.payload ?? t;
3651
3994
  };
3652
- async function nn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
3995
+ async function mn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
3653
3996
  if (!e) throw Error("fetchPage: apiUrl is required");
3654
3997
  if (!n) throw Error("fetchPage: slug is required");
3655
3998
  let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
3656
3999
  ...t ? { "x-tenant": t } : {},
3657
4000
  ...a ? { authorization: `Bearer ${a}` } : {}
3658
- }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(tn), c(`${l}/settings/public`, { headers: u }).then(tn)]), p = en({
4001
+ }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(pn), c(`${l}/settings/public`, { headers: u }).then(pn)]), p = fn({
3659
4002
  page: d,
3660
4003
  settings: f,
3661
4004
  tenant: t,
@@ -3663,7 +4006,7 @@ async function nn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
3663
4006
  locale: r
3664
4007
  }), 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))];
3665
4008
  if (m.length) {
3666
- 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(tn).then((e) => {
4009
+ 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(pn).then((e) => {
3667
4010
  let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
3668
4011
  return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
3669
4012
  }).catch(() => [[t, []]])));
@@ -3677,40 +4020,40 @@ async function nn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
3677
4020
  }
3678
4021
  //#endregion
3679
4022
  //#region src/ssr.jsx
3680
- var rn = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
4023
+ var hn = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
3681
4024
  "&": "&amp;",
3682
4025
  "<": "&lt;",
3683
4026
  ">": "&gt;",
3684
4027
  "\"": "&quot;"
3685
4028
  })[e]);
3686
- function an(t, { mode: n = "auto", style: r } = {}) {
3687
- return e(/* @__PURE__ */ d($t, {
4029
+ function gn(t, { mode: n = "auto", style: r } = {}) {
4030
+ return e(/* @__PURE__ */ d(dn, {
3688
4031
  bundle: t,
3689
4032
  mode: n,
3690
4033
  style: r
3691
4034
  }));
3692
4035
  }
3693
- function on(e, { mode: t = "auto", lang: n } = {}) {
4036
+ function _n(e, { mode: t = "auto", lang: n } = {}) {
3694
4037
  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 = [
3695
4038
  "<meta charset=\"utf-8\"/>",
3696
4039
  "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
3697
- `<title>${rn(o)}</title>`,
3698
- r.description && `<meta name="description" content="${rn(r.description)}"/>`,
3699
- `<meta property="og:title" content="${rn(o)}"/>`,
3700
- r.image && `<meta property="og:image" content="${rn(r.image)}"/>`,
4040
+ `<title>${hn(o)}</title>`,
4041
+ r.description && `<meta name="description" content="${hn(r.description)}"/>`,
4042
+ `<meta property="og:title" content="${hn(o)}"/>`,
4043
+ r.image && `<meta property="og:image" content="${hn(r.image)}"/>`,
3701
4044
  r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
3702
4045
  "<style>html,body{margin:0;height:100%}</style>"
3703
4046
  ].filter(Boolean).join("\n");
3704
4047
  return `<!doctype html>
3705
- <html lang="${rn(i)}"${a ? ` dir="${a}"` : ""}>
4048
+ <html lang="${hn(i)}"${a ? ` dir="${a}"` : ""}>
3706
4049
  <head>
3707
4050
  ${c}
3708
4051
  </head>
3709
4052
  <body>
3710
- ${an(e, { mode: t })}
4053
+ ${gn(e, { mode: t })}
3711
4054
  ${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
3712
4055
  </body>
3713
4056
  </html>`;
3714
4057
  }
3715
4058
  //#endregion
3716
- export { en as assembleBundle, nn as fetchPage, an as renderBundleHtml, on as renderPageDocument };
4059
+ export { fn as assembleBundle, mn as fetchPage, gn as renderBundleHtml, _n as renderPageDocument };