webim-adapter 0.20.0 → 0.22.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(Ot, {
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,98 @@ 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
+ height: 34,
2416
+ padding: "0 12px",
2417
+ borderRadius: 8,
2418
+ border: "1px solid var(--page-border, rgba(100, 116, 139, 0.4))",
2419
+ background: "var(--page-bg, #ffffff)",
2420
+ color: "var(--page-text, #111827)",
2421
+ fontSize: 13,
2422
+ fontFamily: "inherit",
2423
+ outline: "none",
2424
+ minWidth: 140,
2425
+ flex: "0 1 auto",
2426
+ boxSizing: "border-box"
2427
+ }, c = (e) => {
2428
+ let t = e && typeof e == "object" ? e.value : e, n = e && typeof e == "object" ? e.label ?? e.value : e;
2429
+ return {
2430
+ value: String(t ?? ""),
2431
+ label: String(n ?? "")
2432
+ };
2433
+ };
2434
+ return /* @__PURE__ */ f("form", {
2435
+ ref: r,
2436
+ method: "get",
2437
+ onSubmit: i ? (e) => e.preventDefault() : void 0,
2438
+ style: {
2439
+ display: "flex",
2440
+ flexWrap: "wrap",
2441
+ alignItems: "center",
2442
+ gap: 8,
2443
+ width: "100%",
2444
+ ...C(n)
2445
+ },
2446
+ children: [a.map((e) => Array.isArray(e.options) && e.options.length > 0 || e.type === "option" || e.type === "select" ? /* @__PURE__ */ f("select", {
2447
+ name: `f_${e.name}`,
2448
+ defaultValue: o[e.name] ?? "",
2449
+ style: s,
2450
+ ...Q(i),
2451
+ children: [/* @__PURE__ */ d("option", {
2452
+ value: "",
2453
+ children: e.label || e.name
2454
+ }), (Array.isArray(e.options) ? e.options : []).map((e) => {
2455
+ let t = c(e);
2456
+ return /* @__PURE__ */ d("option", {
2457
+ value: t.value,
2458
+ children: t.label
2459
+ }, t.value);
2460
+ })]
2461
+ }, e.name) : e.type === "switch" ? /* @__PURE__ */ f("select", {
2462
+ name: `f_${e.name}`,
2463
+ defaultValue: o[e.name] ?? "",
2464
+ style: s,
2465
+ ...Q(i),
2466
+ children: [
2467
+ /* @__PURE__ */ d("option", {
2468
+ value: "",
2469
+ children: e.label || e.name
2470
+ }),
2471
+ /* @__PURE__ */ d("option", {
2472
+ value: "true",
2473
+ children: "Yes"
2474
+ }),
2475
+ /* @__PURE__ */ d("option", {
2476
+ value: "false",
2477
+ children: "No"
2478
+ })
2479
+ ]
2480
+ }, e.name) : /* @__PURE__ */ d("input", {
2481
+ type: "text",
2482
+ name: `f_${e.name}`,
2483
+ defaultValue: o[e.name] ?? "",
2484
+ placeholder: e.label || e.name,
2485
+ style: s,
2486
+ ...Q(i)
2487
+ }, e.name)), /* @__PURE__ */ d("button", {
2488
+ type: "submit",
2489
+ style: {
2490
+ ...s,
2491
+ minWidth: 0,
2492
+ padding: "0 18px",
2493
+ border: "none",
2494
+ background: "var(--page-accent, #111827)",
2495
+ color: "var(--page-accent-text, #ffffff)",
2496
+ fontWeight: 600,
2497
+ cursor: i ? "default" : "pointer"
2498
+ },
2499
+ ...Q(i),
2500
+ children: t
2501
+ })]
2502
+ });
2503
+ }
2504
+ function St({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2395
2505
  return e.length ? /* @__PURE__ */ d("nav", {
2396
2506
  ref: r,
2397
2507
  "aria-label": "Breadcrumb",
@@ -2441,7 +2551,7 @@ function bt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2441
2551
  })
2442
2552
  }) : null;
2443
2553
  }
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 }) {
2554
+ 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
2555
  let { tenant: g, apiUrl: _ } = i(H), v = i(U), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
2446
2556
  a(() => {
2447
2557
  if (!o || Number.isFinite(x)) return;
@@ -2526,15 +2636,15 @@ function xt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
2526
2636
  ]
2527
2637
  });
2528
2638
  }
2529
- var St = "webim.page_mode", Ct = () => {
2639
+ var wt = "webim.page_mode", Tt = () => {
2530
2640
  if (typeof window > "u") return "auto";
2531
2641
  try {
2532
- let e = window.localStorage.getItem(St);
2642
+ let e = window.localStorage.getItem(wt);
2533
2643
  return e === "light" || e === "dark" ? e : "auto";
2534
2644
  } catch {
2535
2645
  return "auto";
2536
2646
  }
2537
- }, wt = (e) => {
2647
+ }, Et = (e) => {
2538
2648
  let t = {
2539
2649
  width: 16,
2540
2650
  height: 16,
@@ -2566,13 +2676,13 @@ var St = "webim.page_mode", Ct = () => {
2566
2676
  rx: "2"
2567
2677
  }), /* @__PURE__ */ d("path", { d: "M8 21h8M12 17v4" })]
2568
2678
  });
2569
- }, $ = {
2679
+ }, Dt = {
2570
2680
  light: "Light theme",
2571
2681
  dark: "Dark theme",
2572
2682
  auto: "Follow the device theme"
2573
2683
  };
2574
- function Tt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2575
- let [o, s] = l(i ? "auto" : Ct), u = c(null), f = (e) => {
2684
+ function Ot({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2685
+ let [o, s] = l(i ? "auto" : Tt), u = c(null), f = (e) => {
2576
2686
  u.current = e, typeof r == "function" && r(e);
2577
2687
  };
2578
2688
  a(() => {
@@ -2580,7 +2690,7 @@ function Tt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2580
2690
  let e = u.current?.closest?.(".webim-page");
2581
2691
  e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
2582
2692
  try {
2583
- o === "auto" ? window.localStorage.removeItem(St) : window.localStorage.setItem(St, o);
2693
+ o === "auto" ? window.localStorage.removeItem(wt) : window.localStorage.setItem(wt, o);
2584
2694
  } catch {}
2585
2695
  }, [o, i]);
2586
2696
  let p = t === !1 ? ["light", "dark"] : [
@@ -2615,8 +2725,8 @@ function Tt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2615
2725
  },
2616
2726
  children: p.map((e) => /* @__PURE__ */ d("button", {
2617
2727
  type: "button",
2618
- title: $[e],
2619
- "aria-label": $[e],
2728
+ title: Dt[e],
2729
+ "aria-label": Dt[e],
2620
2730
  "aria-pressed": e === m,
2621
2731
  onClick: i ? void 0 : () => s(e),
2622
2732
  style: {
@@ -2627,15 +2737,15 @@ function Tt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2627
2737
  background: e === m ? "var(--page-accent, #111827)" : "transparent",
2628
2738
  opacity: e === m ? 1 : .7
2629
2739
  },
2630
- children: wt(e)
2740
+ children: Et(e)
2631
2741
  }, e))
2632
2742
  });
2633
2743
  let g = p[(p.indexOf(m) + 1) % p.length];
2634
2744
  return /* @__PURE__ */ d("button", {
2635
2745
  ref: f,
2636
2746
  type: "button",
2637
- title: $[m],
2638
- "aria-label": `Theme: ${$[m]} — switch to ${$[g]}`,
2747
+ title: Dt[m],
2748
+ "aria-label": `Theme: ${Dt[m]} — switch to ${Dt[g]}`,
2639
2749
  onClick: i ? void 0 : () => s(g),
2640
2750
  style: {
2641
2751
  ...h,
@@ -2644,10 +2754,10 @@ function Tt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
2644
2754
  border: "1px solid rgba(148, 163, 184, 0.4)",
2645
2755
  ...C(n)
2646
2756
  },
2647
- children: wt(m)
2757
+ children: Et(m)
2648
2758
  });
2649
2759
  }
2650
- var Et = {
2760
+ var kt = {
2651
2761
  facebook: {
2652
2762
  label: "Facebook",
2653
2763
  color: "#1877f2",
@@ -2714,8 +2824,8 @@ var Et = {
2714
2824
  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"
2715
2825
  }
2716
2826
  };
2717
- function Dt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
2718
- let l = Array.isArray(e) ? e.filter((e) => e && Et[e.network]) : [];
2827
+ function At({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
2828
+ let l = Array.isArray(e) ? e.filter((e) => e && kt[e.network]) : [];
2719
2829
  if (!l.length) return null;
2720
2830
  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;
2721
2831
  return /* @__PURE__ */ d("div", {
@@ -2728,7 +2838,7 @@ function Dt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
2728
2838
  ...C(o)
2729
2839
  },
2730
2840
  children: l.map((e, r) => {
2731
- let i = Et[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);
2841
+ 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);
2732
2842
  return /* @__PURE__ */ d("a", {
2733
2843
  href: e.url || "#",
2734
2844
  onClick: h,
@@ -2762,7 +2872,7 @@ function Dt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
2762
2872
  })
2763
2873
  });
2764
2874
  }
2765
- function Ot({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
2875
+ function jt({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
2766
2876
  if (!e.length) return null;
2767
2877
  let o = Math.min(Math.max(Number(n) || 1, 1), e.length), s = (e) => ({
2768
2878
  width: 32,
@@ -2840,7 +2950,7 @@ function Ot({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
2840
2950
  })
2841
2951
  });
2842
2952
  }
2843
- var kt = {
2953
+ var Mt = {
2844
2954
  small: {
2845
2955
  w: 132,
2846
2956
  h: 46,
@@ -2862,10 +2972,10 @@ var kt = {
2862
2972
  title: 12.5,
2863
2973
  avatar: 46
2864
2974
  }
2865
- }, At = (e) => kt[e] ?? kt.medium;
2866
- kt.medium.w, kt.medium.h;
2867
- function jt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2868
- let r = At(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 = [];
2975
+ }, Nt = (e) => Mt[e] ?? Mt.medium;
2976
+ Mt.medium.w, Mt.medium.h;
2977
+ function Pt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2978
+ 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 = [];
2869
2979
  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);
2870
2980
  let d = /* @__PURE__ */ new Map(), f = (e, t) => {
2871
2981
  if (t.has(e.id)) return 0;
@@ -2917,19 +3027,19 @@ function jt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
2917
3027
  horizontal: n
2918
3028
  };
2919
3029
  }
2920
- var Mt = (e, t) => {
3030
+ var Ft = (e, t) => {
2921
3031
  let n = String(e ?? "");
2922
3032
  return n.length > t ? `${n.slice(0, t - 1)}…` : n;
2923
- }, Nt = (e) => {
3033
+ }, It = (e) => {
2924
3034
  let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
2925
3035
  if (!t) return "#ffffff";
2926
3036
  let n = t[1];
2927
3037
  n.length === 3 && (n = [...n].map((e) => e + e).join(""));
2928
3038
  let r = parseInt(n, 16);
2929
3039
  return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
2930
- }, Pt = (e) => !!(e?.cv?.trim?.() || e?.photo);
2931
- function Ft(e, t = {}) {
2932
- 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);
3040
+ }, Lt = (e) => !!(e?.cv?.trim?.() || e?.photo);
3041
+ function Rt(e, t = {}) {
3042
+ 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);
2933
3043
  return n.map((e) => {
2934
3044
  let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
2935
3045
  return {
@@ -2943,11 +3053,11 @@ function Ft(e, t = {}) {
2943
3053
  };
2944
3054
  });
2945
3055
  }
2946
- var It = {
3056
+ var zt = {
2947
3057
  size: 36,
2948
3058
  pad: 10
2949
3059
  };
2950
- function Lt({ node: e, onClose: t }) {
3060
+ function Bt({ node: e, onClose: t }) {
2951
3061
  return a(() => {
2952
3062
  let e = (e) => e.key === "Escape" && t();
2953
3063
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
@@ -3065,7 +3175,7 @@ function Lt({ node: e, onClose: t }) {
3065
3175
  })
3066
3176
  });
3067
3177
  }
3068
- function Rt({ 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 }) {
3178
+ 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 }) {
3069
3179
  let b = o(), [x, S] = l(null), { tenant: w, apiUrl: T } = i(H), E = i(U)?.[t], [D, O] = l(null);
3070
3180
  a(() => {
3071
3181
  if (!t || E) return;
@@ -3082,14 +3192,14 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3082
3192
  T,
3083
3193
  E
3084
3194
  ]);
3085
- let k = t ? Ft(E ?? D ?? [], {
3195
+ let k = t ? Rt(E ?? D ?? [], {
3086
3196
  nameField: n,
3087
3197
  titleField: r,
3088
3198
  photoField: s,
3089
3199
  parentField: c,
3090
3200
  cvField: p,
3091
3201
  hrefField: m
3092
- }) : e, A = At(h), { boxes: j, links: M, width: N, height: P } = jt(k, {
3202
+ }) : e, A = Nt(h), { boxes: j, links: M, width: N, height: P } = Pt(k, {
3093
3203
  size: h,
3094
3204
  horizontal: g
3095
3205
  });
@@ -3135,7 +3245,7 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3135
3245
  stroke: "rgba(148, 163, 184, 0.7)",
3136
3246
  strokeWidth: "1.5"
3137
3247
  }, t)), j.map(({ node: e, x: t, y: n }) => {
3138
- 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 ? Nt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Nt(e.color2) : s, l = y && (Pt(e) || e.href), p = () => Pt(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + It.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);
3248
+ 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);
3139
3249
  return /* @__PURE__ */ f("g", {
3140
3250
  onClick: l ? p : void 0,
3141
3251
  style: l ? { cursor: "pointer" } : void 0,
@@ -3199,13 +3309,13 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3199
3309
  e.photo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
3200
3310
  id: `${b}-${e.id}`,
3201
3311
  children: /* @__PURE__ */ d("circle", {
3202
- cx: t + It.pad + A.avatar / 2,
3312
+ cx: t + zt.pad + A.avatar / 2,
3203
3313
  cy: n + A.h / 2,
3204
3314
  r: A.avatar / 2
3205
3315
  })
3206
3316
  }), /* @__PURE__ */ d("image", {
3207
3317
  href: e.photo,
3208
- x: t + It.pad,
3318
+ x: t + zt.pad,
3209
3319
  y: n + (A.h - A.avatar) / 2,
3210
3320
  width: A.avatar,
3211
3321
  height: A.avatar,
@@ -3219,7 +3329,7 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3219
3329
  fontSize: A.title,
3220
3330
  fontWeight: "600",
3221
3331
  fill: s,
3222
- children: Mt(e.title, g + 4)
3332
+ children: Ft(e.title, g + 4)
3223
3333
  }), e.name && /* @__PURE__ */ d("text", {
3224
3334
  x: m,
3225
3335
  y: n + _ + _ / 2 + A.name * .35,
@@ -3227,7 +3337,7 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3227
3337
  fontSize: A.name,
3228
3338
  fontWeight: "600",
3229
3339
  fill: c,
3230
- children: Mt(e.name, g)
3340
+ children: Ft(e.name, g)
3231
3341
  })] }) : /* @__PURE__ */ f(u, { children: [v[0] && /* @__PURE__ */ d("text", {
3232
3342
  x: m,
3233
3343
  y: n + (v[1] ? A.h * .43 : A.h * .57),
@@ -3235,7 +3345,7 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3235
3345
  fontSize: A.name,
3236
3346
  fontWeight: "600",
3237
3347
  fill: s,
3238
- children: Mt(v[0], g)
3348
+ children: Ft(v[0], g)
3239
3349
  }), v[1] && /* @__PURE__ */ d("text", {
3240
3350
  x: m,
3241
3351
  y: n + A.h * .73,
@@ -3243,18 +3353,18 @@ function Rt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
3243
3353
  fontSize: A.title,
3244
3354
  opacity: "0.7",
3245
3355
  fill: s,
3246
- children: Mt(v[1], g + 4)
3356
+ children: Ft(v[1], g + 4)
3247
3357
  })] })
3248
3358
  ]
3249
3359
  }, e.id);
3250
3360
  })]
3251
- }), x && /* @__PURE__ */ d(Lt, {
3361
+ }), x && /* @__PURE__ */ d(Bt, {
3252
3362
  node: x,
3253
3363
  onClose: () => S(null)
3254
3364
  })]
3255
3365
  });
3256
3366
  }
3257
- function zt({ 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 }) {
3367
+ 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 }) {
3258
3368
  let { tenant: g, apiUrl: _ } = i(H), v = i(U), y = v?.[n], b = u ? W(v) : 1, [x, S] = l(null);
3259
3369
  if (a(() => {
3260
3370
  if (!n || y) return;
@@ -3274,7 +3384,7 @@ function zt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped:
3274
3384
  b,
3275
3385
  r
3276
3386
  ]), !e.length) return null;
3277
- 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 };
3387
+ 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 };
3278
3388
  return /* @__PURE__ */ d("div", {
3279
3389
  ref: h,
3280
3390
  style: {
@@ -3320,77 +3430,78 @@ function zt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped:
3320
3430
  })
3321
3431
  });
3322
3432
  }
3323
- var Bt = {
3324
- PageRoot: he,
3325
- Section: ge,
3326
- Container: _e,
3327
- Heading: ve,
3328
- TextBlock: ke,
3329
- ButtonBlock: Me,
3330
- ImageBlock: Ne,
3331
- Spacer: ze,
3332
- Divider: Be,
3333
- SliderBlock: Ke,
3334
- CanvasSlider: qe,
3335
- TabsBlock: Qe,
3336
- QuickStack: vt,
3337
- CollectionList: yt,
3338
- BreadcrumbsBlock: bt,
3339
- PaginationBlock: xt,
3340
- StepperBlock: Ot,
3341
- SocialLinksBlock: Dt,
3342
- ThemeModeBlock: Tt,
3343
- OrgChartBlock: Rt,
3344
- TableBlock: zt,
3345
- MasonryBlock: Je,
3346
- AccordionBlock: $e,
3347
- NavbarBlock: Ze,
3348
- ListBlock: Oe,
3349
- TextSpan: xe,
3350
- QuoteBlock: De,
3351
- TextLink: je,
3352
- RichTextBlock: Te,
3353
- RichContentBlock: Te,
3354
- VideoBlock: Pe,
3355
- YouTubeBlock: Ie,
3356
- IframeBlock: Le,
3357
- EmbedBlock: Re,
3358
- FormBlock: st,
3359
- FormLabel: dt,
3360
- FormInput: ft,
3361
- FormTextarea: pt,
3362
- FormCheckbox: (e) => /* @__PURE__ */ d(mt, {
3433
+ var Ut = {
3434
+ PageRoot: ge,
3435
+ Section: _e,
3436
+ Container: ve,
3437
+ Heading: ye,
3438
+ TextBlock: Ae,
3439
+ ButtonBlock: Ne,
3440
+ ImageBlock: Pe,
3441
+ Spacer: Be,
3442
+ Divider: Ve,
3443
+ SliderBlock: qe,
3444
+ CanvasSlider: Je,
3445
+ TabsBlock: $e,
3446
+ QuickStack: yt,
3447
+ CollectionList: bt,
3448
+ CollectionSearch: xt,
3449
+ BreadcrumbsBlock: St,
3450
+ PaginationBlock: Ct,
3451
+ StepperBlock: jt,
3452
+ SocialLinksBlock: At,
3453
+ ThemeModeBlock: Ot,
3454
+ OrgChartBlock: Vt,
3455
+ TableBlock: Ht,
3456
+ MasonryBlock: Ye,
3457
+ AccordionBlock: et,
3458
+ NavbarBlock: Qe,
3459
+ ListBlock: ke,
3460
+ TextSpan: Se,
3461
+ QuoteBlock: Oe,
3462
+ TextLink: Me,
3463
+ RichTextBlock: Ee,
3464
+ RichContentBlock: Ee,
3465
+ VideoBlock: Fe,
3466
+ YouTubeBlock: Le,
3467
+ IframeBlock: Re,
3468
+ EmbedBlock: ze,
3469
+ FormBlock: ct,
3470
+ FormLabel: ft,
3471
+ FormInput: pt,
3472
+ FormTextarea: mt,
3473
+ FormCheckbox: (e) => /* @__PURE__ */ d(ht, {
3363
3474
  kind: "checkbox",
3364
3475
  ...e
3365
3476
  }),
3366
- FormRadio: (e) => /* @__PURE__ */ d(mt, {
3477
+ FormRadio: (e) => /* @__PURE__ */ d(ht, {
3367
3478
  kind: "radio",
3368
3479
  ...e
3369
3480
  }),
3370
- FormSelect: ht,
3371
- FormFile: gt,
3372
- FormRecaptcha: ut,
3373
- FormSubmit: _t
3374
- }, Vt = {
3481
+ FormSelect: gt,
3482
+ FormFile: _t,
3483
+ FormRecaptcha: dt,
3484
+ FormSubmit: vt
3485
+ }, Wt = {
3375
3486
  id: "auth",
3376
3487
  label: "Accounts",
3377
3488
  category: "Apps",
3378
3489
  keys: ["SiteLoginForm", "SiteAccountMenu"],
3379
3490
  ssr: "shell",
3380
3491
  settings: ["site.authRedirect"]
3381
- }, Ht = n({
3492
+ }, Gt = n({
3382
3493
  user: null,
3383
3494
  status: "idle",
3384
3495
  ensure: () => {},
3385
3496
  refresh: () => {},
3386
3497
  signOut: () => {}
3387
- }), Ut = () => {
3388
- let e = i(Ht);
3498
+ }), Kt = () => {
3499
+ let e = i(Gt);
3389
3500
  return a(() => {
3390
3501
  e.ensure();
3391
3502
  }, [e]), e;
3392
3503
  };
3393
- function Wt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o }) {
3504
+ function qt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o }) {
3394
3505
  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}`, {
3395
3506
  ...t,
3396
3507
  credentials: "include",
@@ -3423,18 +3534,18 @@ function Wt({ children: e, initialUser: t, disabled: n, apiUrl: a, tenant: o })
3423
3534
  b,
3424
3535
  x
3425
3536
  ]);
3426
- return /* @__PURE__ */ d(Ht.Provider, {
3537
+ return /* @__PURE__ */ d(Gt.Provider, {
3427
3538
  value: C,
3428
3539
  children: e
3429
3540
  });
3430
3541
  }
3431
- function Gt({ when: e, children: t }) {
3432
- let { status: n } = Ut();
3542
+ function Jt({ when: e, children: t }) {
3543
+ let { status: n } = Kt();
3433
3544
  return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
3434
3545
  }
3435
3546
  //#endregion
3436
3547
  //#region ../ui/src/components/builder/apps/auth/views.jsx
3437
- function Kt({ 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 }) {
3548
+ 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 }) {
3438
3549
  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) => {
3439
3550
  if (e.preventDefault(), u) return;
3440
3551
  let n = new FormData(e.currentTarget);
@@ -3483,20 +3594,20 @@ function Kt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3483
3594
  children: [
3484
3595
  T ? /* @__PURE__ */ f("label", {
3485
3596
  style: {
3486
- ...Y,
3597
+ ...X,
3487
3598
  display: "grid",
3488
3599
  gap: 6
3489
3600
  },
3490
3601
  children: [a, /* @__PURE__ */ d("input", {
3491
3602
  name: "name",
3492
3603
  type: "text",
3493
- style: X,
3494
- ...Z(u)
3604
+ style: Z,
3605
+ ...Q(u)
3495
3606
  })]
3496
3607
  }) : null,
3497
3608
  /* @__PURE__ */ f("label", {
3498
3609
  style: {
3499
- ...Y,
3610
+ ...X,
3500
3611
  display: "grid",
3501
3612
  gap: 6
3502
3613
  },
@@ -3504,13 +3615,13 @@ function Kt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3504
3615
  name: "email",
3505
3616
  type: "email",
3506
3617
  required: !u,
3507
- style: X,
3508
- ...Z(u)
3618
+ style: Z,
3619
+ ...Q(u)
3509
3620
  })]
3510
3621
  }),
3511
3622
  /* @__PURE__ */ f("label", {
3512
3623
  style: {
3513
- ...Y,
3624
+ ...X,
3514
3625
  display: "grid",
3515
3626
  gap: 6
3516
3627
  },
@@ -3518,15 +3629,15 @@ function Kt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3518
3629
  name: "password",
3519
3630
  type: "password",
3520
3631
  required: !u,
3521
- style: X,
3522
- ...Z(u)
3632
+ style: Z,
3633
+ ...Q(u)
3523
3634
  })]
3524
3635
  }),
3525
3636
  /* @__PURE__ */ d("button", {
3526
3637
  type: u ? "button" : "submit",
3527
3638
  disabled: S || void 0,
3528
3639
  style: {
3529
- ...q,
3640
+ ...J,
3530
3641
  border: 0,
3531
3642
  padding: "10px 22px",
3532
3643
  borderRadius: 8,
@@ -3558,8 +3669,8 @@ function Kt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3558
3669
  ]
3559
3670
  });
3560
3671
  }
3561
- function qt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
3562
- let { user: c, status: l, signOut: u } = Ut(), p = a ? s || "user" : l, m = a ? {
3672
+ function Xt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
3673
+ let { user: c, status: l, signOut: u } = Kt(), p = a ? s || "user" : l, m = a ? {
3563
3674
  name: "Ada Lovelace",
3564
3675
  email: "ada@example.com"
3565
3676
  } : c;
@@ -3580,7 +3691,7 @@ function qt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3580
3691
  children: [
3581
3692
  /* @__PURE__ */ f("span", {
3582
3693
  style: {
3583
- ...Y,
3694
+ ...X,
3584
3695
  fontWeight: 600
3585
3696
  },
3586
3697
  children: [
@@ -3591,7 +3702,7 @@ function qt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3591
3702
  }),
3592
3703
  n && m?.email ? /* @__PURE__ */ d("span", {
3593
3704
  style: {
3594
- ...Y,
3705
+ ...X,
3595
3706
  opacity: .7
3596
3707
  },
3597
3708
  children: m.email
@@ -3600,14 +3711,14 @@ function qt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3600
3711
  type: "button",
3601
3712
  onClick: a ? void 0 : u,
3602
3713
  style: {
3603
- ...q,
3714
+ ...J,
3604
3715
  border: 0,
3605
3716
  padding: "8px 16px",
3606
3717
  borderRadius: 8,
3607
3718
  fontSize: 14,
3608
3719
  cursor: a ? "default" : "pointer"
3609
3720
  },
3610
- ...Z(a),
3721
+ ...Q(a),
3611
3722
  children: t
3612
3723
  })
3613
3724
  ]
@@ -3624,42 +3735,42 @@ function qt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3624
3735
  }
3625
3736
  //#endregion
3626
3737
  //#region ../ui/src/components/builder/apps/index.js
3627
- var Jt = [Vt], Yt = {
3628
- SiteLoginForm: Kt,
3629
- SiteAccountMenu: qt
3738
+ var Zt = [Wt], Qt = {
3739
+ SiteLoginForm: Yt,
3740
+ SiteAccountMenu: Xt
3630
3741
  };
3631
- new Set(Jt.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3742
+ new Set(Zt.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3632
3743
  //#endregion
3633
3744
  //#region ../ui/src/components/builder/plugins/runtime.js
3634
- var Xt = /* @__PURE__ */ new Map();
3635
- function Zt(e) {
3636
- if (Xt.has(e)) return Xt.get(e);
3745
+ var $t = /* @__PURE__ */ new Map();
3746
+ function en(e) {
3747
+ if ($t.has(e)) return $t.get(e);
3637
3748
  let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
3638
3749
  /* @vite-ignore */
3639
3750
  /* webpackIgnore: true */
3640
3751
  t
3641
3752
  ).finally(() => URL.revokeObjectURL(t));
3642
- return Xt.set(e, n), n;
3753
+ return $t.set(e, n), n;
3643
3754
  }
3644
- function Qt(e) {
3755
+ function tn(e) {
3645
3756
  let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
3646
3757
  return n && typeof n == "object" ? n : {};
3647
3758
  }
3648
3759
  //#endregion
3649
3760
  //#region ../ui/src/components/builder/plugins/view.jsx
3650
- async function $t(e, t) {
3651
- let n = await Zt(e);
3761
+ async function nn(e, t) {
3762
+ let n = await en(e);
3652
3763
  return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
3653
3764
  }
3654
- var en = {
3765
+ var rn = {
3655
3766
  padding: "10px 12px",
3656
3767
  border: "1px dashed rgba(148, 163, 184, 0.5)",
3657
3768
  borderRadius: 8,
3658
3769
  fontSize: 12,
3659
3770
  opacity: .6
3660
3771
  };
3661
- function tn({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3662
- let s = i(H), l = Qt(s?.settings)[e], u = c(null), p = c(null), m = {
3772
+ function an({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3773
+ let s = i(H), l = tn(s?.settings)[e], u = c(null), p = c(null), m = {
3663
3774
  tenant: s?.tenant ?? "",
3664
3775
  apiUrl: s?.apiUrl ?? "/api",
3665
3776
  locale: s?.locale ?? "",
@@ -3671,7 +3782,7 @@ function tn({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3671
3782
  let e = u.current;
3672
3783
  if (!l?.code || !e) return;
3673
3784
  let n = !0;
3674
- return $t(l.code, t).then((e) => {
3785
+ return nn(l.code, t).then((e) => {
3675
3786
  if (!(!n || !e || !u.current)) {
3676
3787
  p.current = e;
3677
3788
  try {
@@ -3701,7 +3812,7 @@ function tn({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3701
3812
  }) : /* @__PURE__ */ f("div", {
3702
3813
  ref: o,
3703
3814
  style: {
3704
- ...en,
3815
+ ...rn,
3705
3816
  ...C(r)
3706
3817
  },
3707
3818
  children: [
@@ -3713,12 +3824,12 @@ function tn({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
3713
3824
  }
3714
3825
  //#endregion
3715
3826
  //#region ../ui/src/components/builder/render.jsx
3716
- var nn = {
3717
- ...Bt,
3718
- ...Yt,
3719
- PluginBlock: tn
3827
+ var on = {
3828
+ ...Ut,
3829
+ ...Qt,
3830
+ PluginBlock: an
3720
3831
  };
3721
- function rn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3832
+ function sn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3722
3833
  let o = n[e];
3723
3834
  if (!o || o.hidden) return null;
3724
3835
  let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
@@ -3726,11 +3837,11 @@ function rn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3726
3837
  let n = o.props?.componentId, s = r?.[n];
3727
3838
  if (!s?.template || i.has(n)) return null;
3728
3839
  let c = new Set(i).add(n);
3729
- return /* @__PURE__ */ d(t, { children: rn(s.template.rootId, s.template.nodes, r, c, a) }, e);
3840
+ return /* @__PURE__ */ d(t, { children: sn(s.template.rootId, s.template.nodes, r, c, a) }, e);
3730
3841
  }
3731
- let l = nn[s];
3842
+ let l = on[s];
3732
3843
  if (!l) return null;
3733
- let u = (o.nodes ?? []).map((e) => rn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, rn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ d(l, {
3844
+ 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, {
3734
3845
  ...c,
3735
3846
  ...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
3736
3847
  linked: p,
@@ -3739,16 +3850,16 @@ function rn(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3739
3850
  },
3740
3851
  children: u.length ? u : void 0
3741
3852
  }, e);
3742
- return c.when && c.when !== "always" ? /* @__PURE__ */ d(Gt, {
3853
+ return c.when && c.when !== "always" ? /* @__PURE__ */ d(Jt, {
3743
3854
  when: c.when,
3744
3855
  children: m
3745
3856
  }, e) : m;
3746
3857
  }
3747
3858
  //#endregion
3748
3859
  //#region ../ui/src/components/builder/PageRenderer.jsx
3749
- var an = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), on = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(V(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
3860
+ 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(" ")} }
3750
3861
  .webim-page[data-webim-mode="dark"] { ${Object.entries(V(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
3751
- function sn({ 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 }) {
3862
+ 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 }) {
3752
3863
  let b = o?.js?.trim();
3753
3864
  if (a(() => {
3754
3865
  if (!b) return;
@@ -3762,11 +3873,11 @@ function sn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3762
3873
  minHeight: "100%",
3763
3874
  display: "flex",
3764
3875
  flexDirection: "column"
3765
- }, w = rn("ROOT", e, n), T = s(() => ({ render: (t, r) => rn(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", {
3876
+ }, 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", {
3766
3877
  rel: "stylesheet",
3767
3878
  precedence: "default",
3768
3879
  href: _(e)
3769
- }, e)), A = B(t), j = on(A);
3880
+ }, e)), A = B(t), j = ln(A);
3770
3881
  return r === "auto" ? /* @__PURE__ */ d(H.Provider, {
3771
3882
  value: {
3772
3883
  tenant: c || "",
@@ -3774,11 +3885,11 @@ function sn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3774
3885
  locale: p || "",
3775
3886
  settings: g ?? null
3776
3887
  },
3777
- children: /* @__PURE__ */ d(Wt, {
3888
+ children: /* @__PURE__ */ d(qt, {
3778
3889
  initialUser: v,
3779
3890
  children: /* @__PURE__ */ d(U.Provider, {
3780
3891
  value: u ?? null,
3781
- children: /* @__PURE__ */ d(ae.Provider, {
3892
+ children: /* @__PURE__ */ d(G.Provider, {
3782
3893
  value: T,
3783
3894
  children: /* @__PURE__ */ f("div", {
3784
3895
  ...x,
@@ -3789,8 +3900,8 @@ function sn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3789
3900
  ...i
3790
3901
  },
3791
3902
  children: [
3792
- /* @__PURE__ */ d("style", { children: `.webim-page { ${an(V(A.light))} }
3793
- @media (prefers-color-scheme: dark) { .webim-page { ${an(V(A.dark))} } }` }),
3903
+ /* @__PURE__ */ d("style", { children: `.webim-page { ${cn(V(A.light))} }
3904
+ @media (prefers-color-scheme: dark) { .webim-page { ${cn(V(A.dark))} } }` }),
3794
3905
  /* @__PURE__ */ d("style", { children: j }),
3795
3906
  k,
3796
3907
  /* @__PURE__ */ d("style", { children: S }),
@@ -3810,11 +3921,11 @@ function sn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3810
3921
  locale: p || "",
3811
3922
  settings: g ?? null
3812
3923
  },
3813
- children: /* @__PURE__ */ d(Wt, {
3924
+ children: /* @__PURE__ */ d(qt, {
3814
3925
  initialUser: v,
3815
3926
  children: /* @__PURE__ */ d(U.Provider, {
3816
3927
  value: u ?? null,
3817
- children: /* @__PURE__ */ d(ae.Provider, {
3928
+ children: /* @__PURE__ */ d(G.Provider, {
3818
3929
  value: T,
3819
3930
  children: /* @__PURE__ */ f("div", {
3820
3931
  ...x,
@@ -3841,8 +3952,8 @@ function sn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
3841
3952
  }
3842
3953
  //#endregion
3843
3954
  //#region src/WebimContent.jsx
3844
- function cn({ bundle: e, mode: t = "auto", style: n }) {
3845
- return e?.blocks?.ROOT ? /* @__PURE__ */ d(sn, {
3955
+ function dn({ bundle: e, mode: t = "auto", style: n }) {
3956
+ return e?.blocks?.ROOT ? /* @__PURE__ */ d(un, {
3846
3957
  blocks: e.blocks,
3847
3958
  theme: e.theme,
3848
3959
  components: e.components,
@@ -3859,7 +3970,7 @@ function cn({ bundle: e, mode: t = "auto", style: n }) {
3859
3970
  }
3860
3971
  //#endregion
3861
3972
  //#region src/bundle.js
3862
- function ln({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
3973
+ function fn({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
3863
3974
  let a = {
3864
3975
  ...t?.global ?? {},
3865
3976
  ...t?.tenant ?? {}
@@ -3883,18 +3994,18 @@ function ln({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
3883
3994
  }
3884
3995
  //#endregion
3885
3996
  //#region src/fetchPage.js
3886
- var un = async (e) => {
3997
+ var pn = async (e) => {
3887
3998
  let t = await e.json().catch(() => null);
3888
3999
  if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
3889
4000
  return t?.payload ?? t;
3890
4001
  };
3891
- async function dn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
4002
+ async function mn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
3892
4003
  if (!e) throw Error("fetchPage: apiUrl is required");
3893
4004
  if (!n) throw Error("fetchPage: slug is required");
3894
4005
  let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
3895
4006
  ...t ? { "x-tenant": t } : {},
3896
4007
  ...a ? { authorization: `Bearer ${a}` } : {}
3897
- }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(un), c(`${l}/settings/public`, { headers: u }).then(un)]), p = ln({
4008
+ }, [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({
3898
4009
  page: d,
3899
4010
  settings: f,
3900
4011
  tenant: t,
@@ -3902,7 +4013,7 @@ async function dn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
3902
4013
  locale: r
3903
4014
  }), 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))];
3904
4015
  if (m.length) {
3905
- 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(un).then((e) => {
4016
+ 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) => {
3906
4017
  let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
3907
4018
  return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
3908
4019
  }).catch(() => [[t, []]])));
@@ -3916,40 +4027,40 @@ async function dn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
3916
4027
  }
3917
4028
  //#endregion
3918
4029
  //#region src/ssr.jsx
3919
- var fn = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
4030
+ var hn = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
3920
4031
  "&": "&amp;",
3921
4032
  "<": "&lt;",
3922
4033
  ">": "&gt;",
3923
4034
  "\"": "&quot;"
3924
4035
  })[e]);
3925
- function pn(t, { mode: n = "auto", style: r } = {}) {
3926
- return e(/* @__PURE__ */ d(cn, {
4036
+ function gn(t, { mode: n = "auto", style: r } = {}) {
4037
+ return e(/* @__PURE__ */ d(dn, {
3927
4038
  bundle: t,
3928
4039
  mode: n,
3929
4040
  style: r
3930
4041
  }));
3931
4042
  }
3932
- function mn(e, { mode: t = "auto", lang: n } = {}) {
4043
+ function _n(e, { mode: t = "auto", lang: n } = {}) {
3933
4044
  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 = [
3934
4045
  "<meta charset=\"utf-8\"/>",
3935
4046
  "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
3936
- `<title>${fn(o)}</title>`,
3937
- r.description && `<meta name="description" content="${fn(r.description)}"/>`,
3938
- `<meta property="og:title" content="${fn(o)}"/>`,
3939
- r.image && `<meta property="og:image" content="${fn(r.image)}"/>`,
4047
+ `<title>${hn(o)}</title>`,
4048
+ r.description && `<meta name="description" content="${hn(r.description)}"/>`,
4049
+ `<meta property="og:title" content="${hn(o)}"/>`,
4050
+ r.image && `<meta property="og:image" content="${hn(r.image)}"/>`,
3940
4051
  r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
3941
4052
  "<style>html,body{margin:0;height:100%}</style>"
3942
4053
  ].filter(Boolean).join("\n");
3943
4054
  return `<!doctype html>
3944
- <html lang="${fn(i)}"${a ? ` dir="${a}"` : ""}>
4055
+ <html lang="${hn(i)}"${a ? ` dir="${a}"` : ""}>
3945
4056
  <head>
3946
4057
  ${c}
3947
4058
  </head>
3948
4059
  <body>
3949
- ${pn(e, { mode: t })}
4060
+ ${gn(e, { mode: t })}
3950
4061
  ${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
3951
4062
  </body>
3952
4063
  </html>`;
3953
4064
  }
3954
4065
  //#endregion
3955
- export { ln as assembleBundle, dn as fetchPage, pn as renderBundleHtml, mn as renderPageDocument };
4066
+ export { fn as assembleBundle, mn as fetchPage, gn as renderBundleHtml, _n as renderPageDocument };