webim-adapter 1.0.3 → 1.1.1

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.
@@ -265,30 +265,30 @@ function P(e) {
265
265
  R !== void 0 && H.push(`blur(${M(R)})`), z !== void 0 && H.push(`grayscale(${z}%)`), B !== void 0 && H.push(`brightness(${B}%)`), V !== void 0 && H.push(`contrast(${V}%)`), ee !== void 0 && H.push(`saturate(${ee}%)`), H.length && (t.filter = H.join(" "));
266
266
  let te = F(L);
267
267
  te.length && (t.backdropFilter = te.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
268
- let { textStrokeWidth: U, textStrokeColor: ne } = t;
269
- delete t.textStrokeWidth, delete t.textStrokeColor, (U !== void 0 || ne !== void 0) && (t.WebkitTextStroke = `${M(U ?? 1)} ${ne || "currentColor"}`);
270
- let { clipText: re } = t;
271
- delete t.clipText, re && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
272
- let { transitions: ie, transitionDuration: ae, transitionEasing: oe, transitionProperty: se } = t, ce = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
268
+ let { textStrokeWidth: U, textStrokeColor: W } = t;
269
+ delete t.textStrokeWidth, delete t.textStrokeColor, (U !== void 0 || W !== void 0) && (t.WebkitTextStroke = `${M(U ?? 1)} ${W || "currentColor"}`);
270
+ let { clipText: ne } = t;
271
+ delete t.clipText, ne && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
272
+ let { transitions: re, transitionDuration: ie, transitionEasing: ae, transitionProperty: G } = t, oe = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
273
273
  delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
274
- let le = (Array.isArray(ie) ? ie : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${ce(e.duration ?? 200)} ${e.easing || "ease"}`);
275
- if (ae !== void 0 && le.push(`${se || "all"} ${ce(ae)} ${oe || "ease"}`), le.length && (t.transition = le.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
274
+ let se = (Array.isArray(re) ? re : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${oe(e.duration ?? 200)} ${e.easing || "ease"}`);
275
+ if (ie !== void 0 && se.push(`${G || "all"} ${oe(ie)} ${ae || "ease"}`), se.length && (t.transition = se.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
276
276
  let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
277
277
  t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
278
278
  }
279
279
  delete t.backgroundVideo;
280
- let { overlayColor: W, overlayOpacity: ue } = t;
281
- if (delete t.overlayColor, delete t.overlayOpacity, W) {
282
- let e = `color-mix(in srgb, ${W} ${ue ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
280
+ let { overlayColor: K, overlayOpacity: ce } = t;
281
+ if (delete t.overlayColor, delete t.overlayOpacity, K) {
282
+ let e = `color-mix(in srgb, ${K} ${ce ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
283
283
  t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
284
284
  }
285
285
  t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
286
- let { backgroundLayers: G } = t;
286
+ let { backgroundLayers: le } = t;
287
287
  delete t.backgroundLayers;
288
- let K = (Array.isArray(G) ? G : []).filter((e) => e && e.on !== !1);
289
- if (K.length) {
288
+ let ue = (Array.isArray(le) ? le : []).filter((e) => e && e.on !== !1);
289
+ if (ue.length) {
290
290
  let e = [], n = [], r = [], i = [], a = [];
291
- for (let t of K) 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");
291
+ 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");
292
292
  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");
293
293
  else {
294
294
  if (!t.src) continue;
@@ -380,15 +380,15 @@ function U(e, t, n = []) {
380
380
  }
381
381
  return a;
382
382
  }
383
- var ne = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
384
- function re(e, t, n, r = !1) {
385
- let i = Object.entries(P(t)).map(([e, t]) => `${ne(e)}: ${t} !important;`).join(" ");
383
+ var W = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
384
+ function ne(e, t, n, r = !1) {
385
+ let i = Object.entries(P(t)).map(([e, t]) => `${W(e)}: ${t} !important;`).join(" ");
386
386
  return i ? `[data-wb="${e}"]${r ? "" : n} { ${i} }` : "";
387
387
  }
388
- function ie(e, t, n) {
389
- return Object.entries(F).map(([r, i]) => re(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
388
+ function re(e, t, n) {
389
+ return Object.entries(F).map(([r, i]) => ne(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
390
390
  }
391
- var ae = [
391
+ var ie = [
392
392
  {
393
393
  key: "tablet",
394
394
  max: 991
@@ -401,17 +401,17 @@ var ae = [
401
401
  key: "mobile",
402
402
  max: 478
403
403
  }
404
- ], oe = (e) => Object.entries(P(e)).map(([e, t]) => `${ne(e)}: ${t} !important;`).join(" ");
405
- function se(e, t) {
406
- return ae.map(({ key: n, max: r }) => {
407
- let i = t?.[n] ? oe(t[n]) : "";
404
+ ], ae = (e) => Object.entries(P(e)).map(([e, t]) => `${W(e)}: ${t} !important;`).join(" ");
405
+ function G(e, t) {
406
+ return ie.map(({ key: n, max: r }) => {
407
+ let i = t?.[n] ? ae(t[n]) : "";
408
408
  return i ? `@media (max-width: ${r}px) { [data-wb="${e}"] { ${i} } }` : "";
409
409
  }).filter(Boolean).join("\n");
410
410
  }
411
- function ce(e, t) {
411
+ function oe(e, t) {
412
412
  let n = [], r = (e) => {
413
413
  for (let [t, r] of Object.entries(e || {})) {
414
- let e = se(t, r.props);
414
+ let e = G(t, r.props);
415
415
  e && n.push(e);
416
416
  }
417
417
  };
@@ -419,10 +419,10 @@ function ce(e, t) {
419
419
  for (let e of Object.values(t || {})) r(e.template?.nodes);
420
420
  return n.join("\n");
421
421
  }
422
- function le(e, t) {
422
+ function se(e, t) {
423
423
  let n = [], r = (e) => {
424
424
  for (let [t, r] of Object.entries(e || {})) {
425
- let e = ie(t, r.props);
425
+ let e = re(t, r.props);
426
426
  e && n.push(e);
427
427
  }
428
428
  };
@@ -430,7 +430,7 @@ function le(e, t) {
430
430
  for (let e of Object.values(t || {})) r(e.template?.nodes);
431
431
  return n.join("\n");
432
432
  }
433
- var W = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", ue = {
433
+ var K = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", ce = {
434
434
  light: {
435
435
  background: "#f2f2f2",
436
436
  surface: "#f2f2f2",
@@ -471,23 +471,23 @@ var W = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
471
471
  contrastText: "#052e2b"
472
472
  }
473
473
  }
474
- }, G = {
474
+ }, le = {
475
475
  font: "system",
476
476
  headingFont: "inherit",
477
- light: ue.light,
478
- dark: ue.dark
479
- }, K = {
477
+ light: ce.light,
478
+ dark: ce.dark
479
+ }, ue = {
480
480
  system: {
481
481
  label: "System",
482
- value: W
482
+ value: K
483
483
  },
484
484
  inter: {
485
485
  label: "Inter",
486
- value: `"Inter", ${W}`
486
+ value: `"Inter", ${K}`
487
487
  },
488
488
  outfit: {
489
489
  label: "Outfit",
490
- value: `"Outfit", ${W}`
490
+ value: `"Outfit", ${K}`
491
491
  },
492
492
  serif: {
493
493
  label: "Serif",
@@ -497,7 +497,7 @@ var W = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
497
497
  label: "Mono",
498
498
  value: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
499
499
  }
500
- }, q = (e, t) => K[e]?.value ?? k(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), de = (e, ...t) => {
500
+ }, de = (e, t) => ue[e]?.value ?? k(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), fe = (e, ...t) => {
501
501
  let n = Object.assign({}, e, ...t);
502
502
  return n.primary = {
503
503
  ...e.primary,
@@ -513,20 +513,20 @@ var W = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
513
513
  }), {})
514
514
  }, n;
515
515
  };
516
- function fe(e) {
516
+ function pe(e) {
517
517
  let { light: t, dark: n, font: r, headingFont: i, ...a } = e ?? {};
518
518
  return {
519
- font: r ?? G.font,
520
- headingFont: i ?? G.headingFont,
521
- light: de(ue.light, a, t),
522
- dark: de(ue.dark, n)
519
+ font: r ?? le.font,
520
+ headingFont: i ?? le.headingFont,
521
+ light: fe(ce.light, a, t),
522
+ dark: fe(ce.dark, n)
523
523
  };
524
524
  }
525
- function pe(e) {
525
+ function me(e) {
526
526
  return {
527
527
  "--page-bg": e.background,
528
528
  "--page-surface": e.surface ?? e.background,
529
- "--page-border": e.border ?? ue.light.border,
529
+ "--page-border": e.border ?? ce.light.border,
530
530
  "--page-text": e.text,
531
531
  "--page-accent": e.accent,
532
532
  "--page-accent-text": e.accentText,
@@ -540,58 +540,58 @@ function pe(e) {
540
540
  "--page-secondary-contrast": e.secondary.contrastText
541
541
  };
542
542
  }
543
- function me(e) {
544
- let t = fe(e);
543
+ function he(e) {
544
+ let t = pe(e);
545
545
  return {
546
546
  backgroundColor: "var(--page-bg)",
547
547
  color: "var(--page-text)",
548
- fontFamily: q(t.font, W),
549
- "--page-heading-font": t.headingFont === "inherit" ? "inherit" : q(t.headingFont, "inherit")
548
+ fontFamily: de(t.font, K),
549
+ "--page-heading-font": t.headingFont === "inherit" ? "inherit" : de(t.headingFont, "inherit")
550
550
  };
551
551
  }
552
- function he(e, t = "light") {
553
- let n = fe(e);
552
+ function ge(e, t = "light") {
553
+ let n = pe(e);
554
554
  return {
555
- ...me(e),
556
- ...pe(n[t] ?? n.light)
555
+ ...he(e),
556
+ ...me(n[t] ?? n.light)
557
557
  };
558
558
  }
559
- function ge(e, t) {
559
+ function _e(e, t) {
560
560
  return e?.themeRef && t?.[e.themeRef] || e?.theme;
561
561
  }
562
- function _e(e, t) {
562
+ function ve(e, t) {
563
563
  return e === "light" || e === "dark" ? e : t === "light" || t === "dark" ? t : "auto";
564
564
  }
565
565
  //#endregion
566
566
  //#region ../ui/src/components/builder/views.jsx
567
- var J = n({
567
+ var q = n({
568
568
  tenant: "",
569
569
  apiUrl: "/api",
570
570
  locale: "",
571
571
  settings: null
572
- }), ve = n(null), ye = (e) => {
572
+ }), ye = n(null), be = (e) => {
573
573
  let t = Number(e?.__page);
574
574
  if (Number.isFinite(t) && t >= 1) return Math.floor(t);
575
575
  if (typeof window > "u") return 1;
576
576
  let n = Number(new URLSearchParams(window.location.search).get("page"));
577
577
  return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
578
- }, be = () => {
578
+ }, xe = () => {
579
579
  if (typeof window > "u") return {};
580
580
  let e = {};
581
581
  return new URLSearchParams(window.location.search).forEach((t, n) => {
582
582
  n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
583
583
  }), e;
584
- }, xe = (e) => {
584
+ }, Se = (e) => {
585
585
  let t = {
586
586
  ...e && typeof e == "object" && !Array.isArray(e) ? e : {},
587
- ...be()
587
+ ...xe()
588
588
  };
589
589
  return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
590
- }, Se = n(null), Ce = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
591
- function we(e, t) {
590
+ }, Ce = n(null), we = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
591
+ function Te(e, t) {
592
592
  if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
593
593
  }
594
- var Te = (e) => {
594
+ var J = (e) => {
595
595
  let t = [];
596
596
  for (let [n, r] of Object.entries(e ?? {})) {
597
597
  if (!/^[\w-]+$/.test(n)) continue;
@@ -604,33 +604,33 @@ var Te = (e) => {
604
604
  function Y(e) {
605
605
  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(" ") : "";
606
606
  }
607
- function Ee(e, t) {
608
- let n = t?.data ?? {}, r = Te(n);
607
+ function X(e, t) {
608
+ let n = t?.data ?? {}, r = J(n);
609
609
  if (!r.length) return e;
610
- let i = RegExp(`:(${r.map(Ce).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => Y(we(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
610
+ let i = RegExp(`:(${r.map(we).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => Y(Te(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
611
611
  return a(e);
612
612
  }
613
- var De = {
613
+ var Z = {
614
614
  margin: 0,
615
615
  fontWeight: 700,
616
616
  lineHeight: 1.2,
617
617
  fontFamily: "var(--page-heading-font, inherit)"
618
- }, Oe = { margin: 0 }, ke = {
618
+ }, Ee = { margin: 0 }, De = {
619
619
  display: "inline-block",
620
620
  textDecoration: "none",
621
621
  cursor: "pointer",
622
622
  backgroundColor: "var(--page-accent, #111827)",
623
623
  color: "var(--page-accent-text, #ffffff)"
624
- }, Ae = {
624
+ }, Oe = {
625
625
  flexGrow: 1,
626
626
  display: "flex",
627
627
  flexDirection: "column",
628
628
  position: "relative"
629
- }, je = {
629
+ }, ke = {
630
630
  display: "flex",
631
631
  flexDirection: "column"
632
632
  };
633
- function Me({ style: e }) {
633
+ function Ae({ style: e }) {
634
634
  let t = e?.backgroundVideo;
635
635
  if (!t) return null;
636
636
  let n = {
@@ -656,7 +656,7 @@ function Me({ style: e }) {
656
656
  background: r
657
657
  } })] });
658
658
  }
659
- var Ne = (e, t) => e?.backgroundVideo ? {
659
+ var je = (e, t) => e?.backgroundVideo ? {
660
660
  position: "relative",
661
661
  ...t,
662
662
  ...P(e)
@@ -664,24 +664,24 @@ var Ne = (e, t) => e?.backgroundVideo ? {
664
664
  ...t,
665
665
  ...P(e)
666
666
  };
667
- function Pe({ style: e, nodeRef: t, children: n }) {
667
+ function Me({ style: e, nodeRef: t, children: n }) {
668
668
  return /* @__PURE__ */ f("div", {
669
669
  ref: t,
670
670
  style: {
671
- ...Ae,
671
+ ...Oe,
672
672
  ...P(e)
673
673
  },
674
- children: [/* @__PURE__ */ d(Me, { style: e }), n]
674
+ children: [/* @__PURE__ */ d(Ae, { style: e }), n]
675
675
  });
676
676
  }
677
- function Fe({ style: e, nodeRef: t, children: n }) {
677
+ function Ne({ style: e, nodeRef: t, children: n }) {
678
678
  return /* @__PURE__ */ f("section", {
679
679
  ref: t,
680
- style: Ne(e, je),
681
- children: [/* @__PURE__ */ d(Me, { style: e }), n]
680
+ style: je(e, ke),
681
+ children: [/* @__PURE__ */ d(Ae, { style: e }), n]
682
682
  });
683
683
  }
684
- function Ie({ style: e, freeLayout: t, nodeRef: n, children: r }) {
684
+ function Pe({ style: e, freeLayout: t, nodeRef: n, children: r }) {
685
685
  let i = t ? {
686
686
  position: "relative",
687
687
  minHeight: 240
@@ -690,48 +690,54 @@ function Ie({ style: e, freeLayout: t, nodeRef: n, children: r }) {
690
690
  ref: n,
691
691
  style: i ? {
692
692
  ...i,
693
- ...Ne(e)
694
- } : Ne(e),
695
- children: [/* @__PURE__ */ d(Me, { style: e }), r]
693
+ ...je(e)
694
+ } : je(e),
695
+ children: [/* @__PURE__ */ d(Ae, { style: e }), r]
696
696
  });
697
697
  }
698
- function Le({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
698
+ function Fe({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
699
699
  return /* @__PURE__ */ d(n, {
700
700
  ref: a,
701
701
  style: {
702
- ...De,
702
+ ...Z,
703
703
  ...P(r)
704
704
  },
705
- children: X(t, e, i)
705
+ children: Re(t, e, i)
706
706
  });
707
707
  }
708
- var Re = {
709
- fontFamily: K.mono.value,
708
+ var Ie = {
709
+ fontFamily: ue.mono.value,
710
710
  background: "rgba(148, 163, 184, 0.18)",
711
711
  padding: "1px 5px",
712
712
  borderRadius: 4,
713
713
  fontSize: "0.9em"
714
714
  };
715
- function ze(e, t = [], n, r) {
715
+ function Le(e, t = [], n, r) {
716
716
  let i = e;
717
717
  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", {
718
- style: Re,
718
+ style: Ie,
719
719
  children: i
720
- })), 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", {
720
+ })), 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", {
721
721
  href: n,
722
722
  target: r || void 0,
723
723
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
724
- style: { color: "inherit" },
724
+ style: {
725
+ color: "inherit",
726
+ ...t.includes("nounderline") && { textDecoration: "none" }
727
+ },
728
+ children: i
729
+ }) : t.includes("nounderline") && (i = /* @__PURE__ */ d("span", {
730
+ style: { textDecoration: "none" },
725
731
  children: i
726
732
  })), i;
727
733
  }
728
- function X(e, n, r) {
734
+ function Re(e, n, r) {
729
735
  return e?.length ? e.map((e, n) => {
730
736
  if (e.slot) return /* @__PURE__ */ d(t, { children: r?.[e.slot] ?? null }, n);
731
- if (e.parts) return /* @__PURE__ */ d(t, { children: X(e.parts, "", r) }, n);
737
+ if (e.parts) return /* @__PURE__ */ d(t, { children: Re(e.parts, "", r) }, n);
732
738
  let i = e.text;
733
739
  return e.sup ? i = /* @__PURE__ */ d("sup", { children: i }) : e.sub && (i = /* @__PURE__ */ d("sub", { children: i })), e.code && (i = /* @__PURE__ */ d("code", {
734
- style: Re,
740
+ style: Ie,
735
741
  children: i
736
742
  })), 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", {
737
743
  style: {
@@ -739,22 +745,28 @@ function X(e, n, r) {
739
745
  ...e.background && { backgroundColor: e.background }
740
746
  },
741
747
  children: i
742
- })), e.href && (i = /* @__PURE__ */ d("a", {
748
+ })), e.href ? i = /* @__PURE__ */ d("a", {
743
749
  href: e.href,
744
750
  target: e.target || void 0,
745
751
  rel: e.target === "_blank" ? "noopener noreferrer" : void 0,
746
- style: { color: e.color ?? "inherit" },
752
+ style: {
753
+ color: e.color ?? "inherit",
754
+ ...e.nounderline && { textDecoration: "none" }
755
+ },
756
+ children: i
757
+ }) : e.nounderline && (i = /* @__PURE__ */ d("span", {
758
+ style: { textDecoration: "none" },
747
759
  children: i
748
760
  })), /* @__PURE__ */ d(t, { children: i }, n);
749
761
  }) : n;
750
762
  }
751
- function Be({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
763
+ function ze({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
752
764
  return /* @__PURE__ */ d("span", {
753
765
  style: P(a),
754
- children: e?.length ? X(e, t) : ze(t, n, r, i)
766
+ children: e?.length ? Re(e, t) : Le(t, n, r, i)
755
767
  });
756
768
  }
757
- var Ve = {
769
+ var Be = {
758
770
  h1: 40,
759
771
  h2: 32,
760
772
  h3: 26,
@@ -762,7 +774,7 @@ var Ve = {
762
774
  h5: 19,
763
775
  h6: 16
764
776
  };
765
- function He({ align: e = "center", width: t, wrap: n } = {}) {
777
+ function Ve({ align: e = "center", width: t, wrap: n } = {}) {
766
778
  let r = t ? `${t}%` : void 0;
767
779
  if (e === "full") return { width: "100%" };
768
780
  let i = e === "left" || e === "right";
@@ -796,8 +808,8 @@ function He({ align: e = "center", width: t, wrap: n } = {}) {
796
808
  marginRight: "auto"
797
809
  };
798
810
  }
799
- function Ue(e = [], t, n) {
800
- let r = n ?? ((e, n) => X(e, n, t));
811
+ function He(e = [], t, n) {
812
+ let r = n ?? ((e, n) => Re(e, n, t));
801
813
  return e.map((t, n) => {
802
814
  let i = {
803
815
  marginTop: 0,
@@ -819,7 +831,7 @@ function Ue(e = [], t, n) {
819
831
  marginLeft: 0,
820
832
  marginRight: 0,
821
833
  ...i,
822
- ...He(t)
834
+ ...Ve(t)
823
835
  },
824
836
  children: [t.href ? /* @__PURE__ */ d("a", {
825
837
  href: t.href,
@@ -838,16 +850,16 @@ function Ue(e = [], t, n) {
838
850
  })]
839
851
  }, n);
840
852
  }
841
- if (t.type === "video") return et(t.url) ? /* @__PURE__ */ d("div", {
853
+ if (t.type === "video") return $e(t.url) ? /* @__PURE__ */ d("div", {
842
854
  style: {
843
855
  ...i,
844
- ...He({
856
+ ...Ve({
845
857
  align: t.align,
846
858
  wrap: t.wrap,
847
859
  width: t.width ?? 100
848
860
  })
849
861
  },
850
- children: /* @__PURE__ */ d(tt, {
862
+ children: /* @__PURE__ */ d(et, {
851
863
  url: t.url,
852
864
  autoplay: t.autoplay,
853
865
  muted: t.muted,
@@ -856,6 +868,47 @@ function Ue(e = [], t, n) {
856
868
  start: t.start
857
869
  })
858
870
  }, n) : null;
871
+ if (t.type === "button") {
872
+ if (!(typeof t.label == "string" && t.label.trim())) return null;
873
+ let e = Number.isFinite(Number(t.radius)) ? Number(t.radius) : 8, r = ["center", "right"].includes(t.align) ? t.align : "left";
874
+ return /* @__PURE__ */ d("div", {
875
+ style: {
876
+ ...i,
877
+ textAlign: r
878
+ },
879
+ children: /* @__PURE__ */ d("table", {
880
+ role: "presentation",
881
+ cellPadding: 0,
882
+ cellSpacing: 0,
883
+ style: {
884
+ borderCollapse: "separate",
885
+ display: "inline-table"
886
+ },
887
+ children: /* @__PURE__ */ d("tbody", { children: /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", {
888
+ style: {
889
+ backgroundColor: t.bg || "var(--page-accent, #4f46e5)",
890
+ borderRadius: e
891
+ },
892
+ children: /* @__PURE__ */ d("a", {
893
+ href: t.href || "#",
894
+ target: t.target || void 0,
895
+ rel: t.target === "_blank" ? "noopener noreferrer" : void 0,
896
+ style: {
897
+ display: "inline-block",
898
+ padding: "13px 24px",
899
+ color: t.color || "#ffffff",
900
+ fontSize: 15,
901
+ fontWeight: 600,
902
+ lineHeight: 1.2,
903
+ textDecoration: "none",
904
+ borderRadius: e
905
+ },
906
+ children: t.label
907
+ })
908
+ }) }) })
909
+ })
910
+ }, n);
911
+ }
859
912
  if (t.type === "divider") return /* @__PURE__ */ d("hr", { style: {
860
913
  ...i,
861
914
  border: 0,
@@ -909,17 +962,17 @@ function Ue(e = [], t, n) {
909
962
  }
910
963
  if (t.type === "quote") return /* @__PURE__ */ d("blockquote", {
911
964
  style: {
912
- ...Ge,
965
+ ...We,
913
966
  ...i
914
967
  },
915
968
  children: r(t.parts, t.text)
916
969
  }, n);
917
- if (Ve[t.type]) {
970
+ if (Be[t.type]) {
918
971
  let e = t.type;
919
972
  return /* @__PURE__ */ d(e, {
920
973
  style: {
921
- ...De,
922
- fontSize: Ve[t.type],
974
+ ...Z,
975
+ fontSize: Be[t.type],
923
976
  ...i
924
977
  },
925
978
  children: r(t.parts, t.text)
@@ -927,39 +980,39 @@ function Ue(e = [], t, n) {
927
980
  }
928
981
  return /* @__PURE__ */ d("p", {
929
982
  style: {
930
- ...Oe,
983
+ ...Ee,
931
984
  ...i
932
985
  },
933
986
  children: r(t.parts, t.text)
934
987
  }, n);
935
988
  });
936
989
  }
937
- function We({ content: e, style: t, linked: n, nodeRef: r }) {
990
+ function Ue({ content: e, style: t, linked: n, nodeRef: r }) {
938
991
  return /* @__PURE__ */ d("div", {
939
992
  ref: r,
940
993
  style: {
941
994
  display: "flow-root",
942
995
  ...P(t)
943
996
  },
944
- children: Ue(e, n)
997
+ children: He(e, n)
945
998
  });
946
999
  }
947
- var Ge = {
1000
+ var We = {
948
1001
  margin: 0,
949
1002
  padding: "8px 0 8px 20px",
950
1003
  borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
951
1004
  };
952
- function Ke({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
1005
+ function Ge({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
953
1006
  return /* @__PURE__ */ d("blockquote", {
954
1007
  ref: i,
955
1008
  style: {
956
- ...Ge,
1009
+ ...We,
957
1010
  ...P(n)
958
1011
  },
959
- children: X(t, e, r)
1012
+ children: Re(t, e, r)
960
1013
  });
961
1014
  }
962
- function qe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
1015
+ function Ke({ ordered: e, items: t = [], style: n, nodeRef: r }) {
963
1016
  return /* @__PURE__ */ d(e ? "ol" : "ul", {
964
1017
  ref: r,
965
1018
  style: {
@@ -969,53 +1022,53 @@ function qe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
969
1022
  },
970
1023
  children: t.map((e, t) => /* @__PURE__ */ d("li", {
971
1024
  style: { marginBottom: 4 },
972
- children: X(e.parts, e.text)
1025
+ children: Re(e.parts, e.text)
973
1026
  }, t))
974
1027
  });
975
1028
  }
976
- function Je({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
1029
+ function qe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
977
1030
  return /* @__PURE__ */ d("p", {
978
1031
  ref: i,
979
1032
  style: {
980
- ...Oe,
1033
+ ...Ee,
981
1034
  ...P(n)
982
1035
  },
983
- children: X(t, e, r)
1036
+ children: Re(t, e, r)
984
1037
  });
985
1038
  }
986
- var Ye = {
1039
+ var Je = {
987
1040
  color: "var(--page-accent, inherit)",
988
1041
  textDecoration: "underline",
989
1042
  textUnderlineOffset: 3,
990
1043
  cursor: "pointer"
991
1044
  };
992
- function Xe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
1045
+ function Ye({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
993
1046
  return /* @__PURE__ */ d("a", {
994
1047
  ref: o,
995
1048
  href: n || "#",
996
1049
  target: r || void 0,
997
1050
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
998
1051
  style: {
999
- ...Ye,
1052
+ ...Je,
1000
1053
  ...P(i)
1001
1054
  },
1002
- children: X(t, e, a)
1055
+ children: Re(t, e, a)
1003
1056
  });
1004
1057
  }
1005
- function Ze({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
1058
+ function Xe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
1006
1059
  return /* @__PURE__ */ d("a", {
1007
1060
  ref: o,
1008
1061
  href: n || "#",
1009
1062
  target: r || void 0,
1010
1063
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
1011
1064
  style: {
1012
- ...ke,
1065
+ ...De,
1013
1066
  ...P(i)
1014
1067
  },
1015
- children: X(t, e, a)
1068
+ children: Re(t, e, a)
1016
1069
  });
1017
1070
  }
1018
- function Qe({ src: e, alt: t, style: n, nodeRef: r }) {
1071
+ function Ze({ src: e, alt: t, style: n, nodeRef: r }) {
1019
1072
  return e ? /* @__PURE__ */ d("img", {
1020
1073
  ref: r,
1021
1074
  src: e,
@@ -1027,7 +1080,7 @@ function Qe({ src: e, alt: t, style: n, nodeRef: r }) {
1027
1080
  }
1028
1081
  }) : null;
1029
1082
  }
1030
- function $e({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
1083
+ function Qe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
1031
1084
  return e ? /* @__PURE__ */ d("video", {
1032
1085
  ref: s,
1033
1086
  src: e,
@@ -1045,9 +1098,9 @@ function $e({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
1045
1098
  }
1046
1099
  }) : null;
1047
1100
  }
1048
- var et = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
1049
- function tt({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
1050
- let c = et(e);
1101
+ var $e = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
1102
+ function et({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
1103
+ let c = $e(e);
1051
1104
  if (!c) return null;
1052
1105
  let l = new URLSearchParams({ rel: "0" });
1053
1106
  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", {
@@ -1073,7 +1126,7 @@ function tt({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
1073
1126
  })
1074
1127
  });
1075
1128
  }
1076
- function nt({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
1129
+ function tt({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
1077
1130
  return e ? /* @__PURE__ */ d("iframe", {
1078
1131
  ref: i,
1079
1132
  src: e,
@@ -1089,7 +1142,7 @@ function nt({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
1089
1142
  }
1090
1143
  }) : null;
1091
1144
  }
1092
- function rt({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1145
+ function nt({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1093
1146
  let [i, o] = l(null);
1094
1147
  return a(() => {
1095
1148
  i && (i.innerHTML = e || "", t && i.querySelectorAll("script").forEach((e) => {
@@ -1108,7 +1161,7 @@ function rt({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1108
1161
  style: P(n)
1109
1162
  });
1110
1163
  }
1111
- function it({ height: e, nodeRef: t }) {
1164
+ function rt({ height: e, nodeRef: t }) {
1112
1165
  return /* @__PURE__ */ d("div", {
1113
1166
  ref: t,
1114
1167
  style: {
@@ -1118,7 +1171,7 @@ function it({ height: e, nodeRef: t }) {
1118
1171
  }
1119
1172
  });
1120
1173
  }
1121
- function at({ style: e, nodeRef: t }) {
1174
+ function it({ style: e, nodeRef: t }) {
1122
1175
  return /* @__PURE__ */ d("div", {
1123
1176
  ref: t,
1124
1177
  style: {
@@ -1129,7 +1182,7 @@ function at({ style: e, nodeRef: t }) {
1129
1182
  }
1130
1183
  });
1131
1184
  }
1132
- var ot = {
1185
+ var at = {
1133
1186
  position: "absolute",
1134
1187
  top: "50%",
1135
1188
  transform: "translateY(-50%)",
@@ -1146,7 +1199,7 @@ var ot = {
1146
1199
  alignItems: "center",
1147
1200
  justifyContent: "center",
1148
1201
  padding: 0
1149
- }, st = {
1202
+ }, ot = {
1150
1203
  bottom: {
1151
1204
  inset: "auto 0 0 0",
1152
1205
  padding: "40px 24px 20px",
@@ -1165,8 +1218,8 @@ var ot = {
1165
1218
  padding: 24,
1166
1219
  textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
1167
1220
  }
1168
- }, ct = 48;
1169
- function lt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
1221
+ }, st = 48;
1222
+ function ct({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
1170
1223
  let [p, m] = l(0), [h, g] = l(!1), [_, v] = l(null), y = e ? Math.min(p, e - 1) : 0;
1171
1224
  if (a(() => {
1172
1225
  if (!n || h || _ || e < 2) return;
@@ -1182,7 +1235,7 @@ function lt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1182
1235
  let b = (t) => m((t + e) % e), x = () => {
1183
1236
  if (!_) return;
1184
1237
  let { dx: e } = _;
1185
- v(null), e < -48 ? b(y + 1) : e > ct && b(y - 1);
1238
+ v(null), e < -48 ? b(y + 1) : e > st && b(y - 1);
1186
1239
  };
1187
1240
  return /* @__PURE__ */ f("div", {
1188
1241
  ref: c,
@@ -1230,7 +1283,7 @@ function lt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1230
1283
  type: "button",
1231
1284
  "aria-label": "Previous slide",
1232
1285
  style: {
1233
- ...ot,
1286
+ ...at,
1234
1287
  left: 12
1235
1288
  },
1236
1289
  onClick: () => b(y - 1),
@@ -1240,7 +1293,7 @@ function lt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1240
1293
  type: "button",
1241
1294
  "aria-label": "Next slide",
1242
1295
  style: {
1243
- ...ot,
1296
+ ...at,
1244
1297
  right: 12
1245
1298
  },
1246
1299
  onClick: () => b(y + 1),
@@ -1274,7 +1327,7 @@ function lt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1274
1327
  ] })]
1275
1328
  });
1276
1329
  }
1277
- var ut = (e, t) => ({
1330
+ var lt = (e, t) => ({
1278
1331
  position: "absolute",
1279
1332
  inset: 0,
1280
1333
  backgroundImage: e ? `url(${e})` : "none",
@@ -1282,18 +1335,18 @@ var ut = (e, t) => ({
1282
1335
  backgroundSize: "cover",
1283
1336
  backgroundPosition: "center"
1284
1337
  });
1285
- function dt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1286
- return e.length ? /* @__PURE__ */ d(lt, {
1338
+ function ut({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1339
+ return e.length ? /* @__PURE__ */ d(ct, {
1287
1340
  ...r,
1288
1341
  count: e.length,
1289
1342
  renderSlide: (r) => {
1290
1343
  let i = e[r];
1291
- return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: ut(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
1344
+ return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: lt(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
1292
1345
  style: {
1293
1346
  position: "absolute",
1294
1347
  color: "#fff",
1295
1348
  textAlign: n,
1296
- ...st[t] ?? st.bottom
1349
+ ...ot[t] ?? ot.bottom
1297
1350
  },
1298
1351
  children: [i.title && /* @__PURE__ */ d("div", {
1299
1352
  style: {
@@ -1313,13 +1366,13 @@ function dt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
1313
1366
  }
1314
1367
  }) : null;
1315
1368
  }
1316
- function ft({ slides: e = [], linked: t, ...n }) {
1317
- return e.length ? /* @__PURE__ */ d(lt, {
1369
+ function dt({ slides: e = [], linked: t, ...n }) {
1370
+ return e.length ? /* @__PURE__ */ d(ct, {
1318
1371
  ...n,
1319
1372
  count: e.length,
1320
1373
  renderSlide: (n) => {
1321
1374
  let r = e[n];
1322
- return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: ut(r.image, r.color) }), /* @__PURE__ */ d("div", {
1375
+ return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: lt(r.image, r.color) }), /* @__PURE__ */ d("div", {
1323
1376
  style: {
1324
1377
  position: "absolute",
1325
1378
  inset: 0,
@@ -1331,23 +1384,23 @@ function ft({ slides: e = [], linked: t, ...n }) {
1331
1384
  }
1332
1385
  }) : null;
1333
1386
  }
1334
- var Z = 256, pt = (e) => Math.log(Math.tan(Math.PI / 4 + Math.max(-85, Math.min(85, e)) * Math.PI / 360)), mt = (e, t, n) => {
1335
- let r = Z * 2 ** n;
1387
+ var Q = 256, ft = (e) => Math.log(Math.tan(Math.PI / 4 + Math.max(-85, Math.min(85, e)) * Math.PI / 360)), pt = (e, t, n) => {
1388
+ let r = Q * 2 ** n;
1336
1389
  return {
1337
1390
  x: (Number(t) + 180) / 360 * r,
1338
- y: (.5 - pt(Number(e)) / (2 * Math.PI)) * r
1391
+ y: (.5 - ft(Number(e)) / (2 * Math.PI)) * r
1339
1392
  };
1340
- }, Q = (e, t) => {
1393
+ }, $ = (e, t) => {
1341
1394
  if (e === "" || e == null) return null;
1342
1395
  let n = Number(e);
1343
1396
  return Number.isFinite(n) && Math.abs(n) <= t ? n : null;
1344
- }, ht = (e) => !!e && Q(e.lat, 90) !== null && Q(e.lng, 180) !== null;
1345
- function gt(e, t, n = "directions", r = "") {
1397
+ }, mt = (e) => !!e && $(e.lat, 90) !== null && $(e.lng, 180) !== null;
1398
+ function ht(e, t, n = "directions", r = "") {
1346
1399
  let i = `${e},${t}`;
1347
1400
  return n === "place" ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(i)}${r ? "&query_place_id=" : ""}` : `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(i)}`;
1348
1401
  }
1349
- var _t = (e, t, n = 13) => `https://www.openstreetmap.org/?mlat=${e}&mlon=${t}#map=${Math.round(Number(n) || 13)}/${e}/${t}`;
1350
- function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize: o = 22, pinLink: s = "directions", link: u = !1, label: p = "", style: m, nodeRef: h, inert: g }) {
1402
+ var gt = (e, t, n = 13) => `https://www.openstreetmap.org/?mlat=${e}&mlon=${t}#map=${Math.round(Number(n) || 13)}/${e}/${t}`;
1403
+ function _t({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize: o = 22, pinLink: s = "directions", link: u = !1, label: p = "", style: m, nodeRef: h, inert: g }) {
1351
1404
  let _ = c(null), [v, y] = l(1200);
1352
1405
  a(() => {
1353
1406
  let e = _.current;
@@ -1357,19 +1410,19 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1357
1410
  let n = new ResizeObserver(t);
1358
1411
  return n.observe(e), () => n.disconnect();
1359
1412
  }, []);
1360
- let b = (Array.isArray(e) ? e : []).filter(ht), x = ht({
1413
+ let b = (Array.isArray(e) ? e : []).filter(mt), x = mt({
1361
1414
  lat: t,
1362
1415
  lng: n
1363
1416
  }) ? {
1364
- lat: Q(t, 90),
1365
- lng: Q(n, 180)
1417
+ lat: $(t, 90),
1418
+ lng: $(n, 180)
1366
1419
  } : b.length ? {
1367
- lat: b.reduce((e, t) => e + Q(t.lat, 90), 0) / b.length,
1368
- lng: b.reduce((e, t) => e + Q(t.lng, 180), 0) / b.length
1369
- } : null, S = Math.max(80, Number(i) || 320), C = Q(r, 19) ? Math.min(Math.max(Math.round(Number(r)), 1), 19) : (() => {
1420
+ lat: b.reduce((e, t) => e + $(t.lat, 90), 0) / b.length,
1421
+ lng: b.reduce((e, t) => e + $(t.lng, 180), 0) / b.length
1422
+ } : null, S = Math.max(80, Number(i) || 320), C = $(r, 19) ? Math.min(Math.max(Math.round(Number(r)), 1), 19) : (() => {
1370
1423
  if (b.length < 2) return 13;
1371
1424
  for (let e = 19; e >= 1; e--) {
1372
- let t = b.map((t) => mt(Q(t.lat, 90), Q(t.lng, 180), e)), n = Math.max(...t.map((e) => e.x)) - Math.min(...t.map((e) => e.x)), r = Math.max(...t.map((e) => e.y)) - Math.min(...t.map((e) => e.y));
1425
+ let t = b.map((t) => pt($(t.lat, 90), $(t.lng, 180), e)), n = Math.max(...t.map((e) => e.x)) - Math.min(...t.map((e) => e.x)), r = Math.max(...t.map((e) => e.y)) - Math.min(...t.map((e) => e.y));
1373
1426
  if (n <= v * .8 && r <= S * .7) return e;
1374
1427
  }
1375
1428
  return 1;
@@ -1393,12 +1446,12 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1393
1446
  },
1394
1447
  children: "Set the coordinates in Settings"
1395
1448
  });
1396
- let T = mt(x.lat, x.lng, C), E = {
1449
+ let T = pt(x.lat, x.lng, C), E = {
1397
1450
  x: T.x - v / 2,
1398
1451
  y: T.y - S / 2
1399
1452
  }, D = [], O = [];
1400
- for (let e = Math.floor(E.x / Z); e <= Math.floor((E.x + v) / Z); e++) D.push(e);
1401
- for (let e = Math.floor(E.y / Z); e <= Math.floor((E.y + S) / Z); e++) O.push(e);
1453
+ for (let e = Math.floor(E.x / Q); e <= Math.floor((E.x + v) / Q); e++) D.push(e);
1454
+ for (let e = Math.floor(E.y / Q); e <= Math.floor((E.y + S) / Q); e++) O.push(e);
1402
1455
  let k = 2 ** C;
1403
1456
  return /* @__PURE__ */ f("div", {
1404
1457
  ref: (e) => {
@@ -1421,22 +1474,22 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1421
1474
  return e < 0 || e >= k ? null : /* @__PURE__ */ d("img", {
1422
1475
  src: `https://tile.openstreetmap.org/${C}/${n}/${e}.png`,
1423
1476
  alt: "",
1424
- width: Z,
1425
- height: Z,
1477
+ width: Q,
1478
+ height: Q,
1426
1479
  loading: "lazy",
1427
1480
  style: {
1428
1481
  position: "absolute",
1429
- left: Math.round(t * Z - E.x),
1430
- top: Math.round(e * Z - E.y),
1431
- width: Z,
1432
- height: Z,
1482
+ left: Math.round(t * Q - E.x),
1483
+ top: Math.round(e * Q - E.y),
1484
+ width: Q,
1485
+ height: Q,
1433
1486
  userSelect: "none",
1434
1487
  pointerEvents: "none"
1435
1488
  }
1436
1489
  }, `${t}-${e}`);
1437
1490
  })),
1438
1491
  b.map((e, t) => {
1439
- let n = mt(Q(e.lat, 90), Q(e.lng, 180), C), r = n.x - E.x, i = n.y - E.y, a = e.color || "var(--page-accent, #dc2626)", c = s === "none" || g ? null : gt(Q(e.lat, 90), Q(e.lng, 180), s, e.title);
1492
+ let n = pt($(e.lat, 90), $(e.lng, 180), C), r = n.x - E.x, i = n.y - E.y, a = e.color || "var(--page-accent, #dc2626)", c = s === "none" || g ? null : ht($(e.lat, 90), $(e.lng, 180), s, e.title);
1440
1493
  return /* @__PURE__ */ f(c ? "a" : "span", {
1441
1494
  href: c || void 0,
1442
1495
  target: c ? "_blank" : void 0,
@@ -1475,8 +1528,8 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1475
1528
  viewBox: "0 0 24 24",
1476
1529
  fill: a,
1477
1530
  style: { display: "block" },
1478
- children: [/* @__PURE__ */ d("path", { d: "M12 22s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z" }), yt[e.icon] ? /* @__PURE__ */ d("path", {
1479
- d: yt[e.icon],
1531
+ children: [/* @__PURE__ */ d("path", { d: "M12 22s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z" }), vt[e.icon] ? /* @__PURE__ */ d("path", {
1532
+ d: vt[e.icon],
1480
1533
  transform: "translate(12 10.5) scale(0.46) translate(-12 -12)",
1481
1534
  fill: "none",
1482
1535
  stroke: "#fff",
@@ -1512,7 +1565,7 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1512
1565
  })
1513
1566
  ]
1514
1567
  }), u ? /* @__PURE__ */ d("a", {
1515
- href: _t(x.lat, x.lng, C),
1568
+ href: gt(x.lat, x.lng, C),
1516
1569
  target: "_blank",
1517
1570
  rel: "noopener noreferrer",
1518
1571
  onClick: g ? (e) => e.preventDefault() : void 0,
@@ -1526,7 +1579,7 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1526
1579
  }) : null]
1527
1580
  });
1528
1581
  }
1529
- var yt = {
1582
+ var vt = {
1530
1583
  check: "M4 12l5 5L20 6",
1531
1584
  close: "M6 6l12 12M18 6L6 18",
1532
1585
  plus: "M12 5v14M5 12h14",
@@ -1623,8 +1676,8 @@ var yt = {
1623
1676
  droplet: "M12 3s6 6.4 6 10.5a6 6 0 0 1-12 0C6 9.4 12 3 12 3z",
1624
1677
  leaf: "M4 20c0-8 6-14 16-14 0 10-6 14-12 14H4zM8 16c2-4 5-6 8-7"
1625
1678
  };
1626
- function bt({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i = 2, color: a = "", href: o = "", target: s = "", label: c = "", style: l, nodeRef: u, inert: f }) {
1627
- let p = Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim()) : [], m = n && p.length > 0, h = p.length ? p : [yt[e] ?? yt.star], g = Math.min(Math.max(Number(r) || 24, 8), 240), _ = a === "accent" ? "var(--page-accent, currentColor)" : a || "currentColor", v = /* @__PURE__ */ d("svg", {
1679
+ function yt({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i = 2, color: a = "", href: o = "", target: s = "", label: c = "", style: l, nodeRef: u, inert: f }) {
1680
+ let p = Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim()) : [], m = n && p.length > 0, h = p.length ? p : [vt[e] ?? vt.star], g = Math.min(Math.max(Number(r) || 24, 8), 240), _ = a === "accent" ? "var(--page-accent, currentColor)" : a || "currentColor", v = /* @__PURE__ */ d("svg", {
1628
1681
  viewBox: "0 0 24 24",
1629
1682
  width: g,
1630
1683
  height: g,
@@ -1660,10 +1713,10 @@ function bt({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i
1660
1713
  children: v
1661
1714
  });
1662
1715
  }
1663
- function xt(e, t = {}, n = 0) {
1716
+ function bt(e, t = {}, n = 0) {
1664
1717
  let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" : Y(e), a = Math.max(0, Number(n) || 0), o = [];
1665
1718
  for (let e of r) {
1666
- let n = e.data ?? e, r = we(n, t.imageField), s = (Array.isArray(r) ? r : [r]).map((e) => e && typeof e == "object" ? e.url ?? e.src ?? "" : e).filter((e) => typeof e == "string" && e.trim()), c = t.nameField ? i(we(n, t.nameField)) : i(n.name), l = t.hrefField ? i(we(n, t.hrefField)) : "";
1719
+ let n = e.data ?? e, r = Te(n, t.imageField), s = (Array.isArray(r) ? r : [r]).map((e) => e && typeof e == "object" ? e.url ?? e.src ?? "" : e).filter((e) => typeof e == "string" && e.trim()), c = t.nameField ? i(Te(n, t.nameField)) : i(n.name), l = t.hrefField ? i(Te(n, t.hrefField)) : "";
1667
1720
  for (let e of s) if (o.push({
1668
1721
  src: e,
1669
1722
  name: c,
@@ -1673,8 +1726,8 @@ function xt(e, t = {}, n = 0) {
1673
1726
  }
1674
1727
  return o;
1675
1728
  }
1676
- function St({ images: e = [], source: t = "", entry: n = "", imageField: r = "", nameField: o = "", hrefField: s = "", limit: c = 0, emptyText: p = "", columns: m = 3, gap: h = 8, showNames: g = !1, lightbox: _ = !0, style: v, nodeRef: y, inert: b }) {
1677
- let { tenant: x, apiUrl: S } = i(J), C = i(ve)?.[t], [w, T] = l(null), [E, D] = l(() => /* @__PURE__ */ new Set());
1729
+ function xt({ images: e = [], source: t = "", entry: n = "", imageField: r = "", nameField: o = "", hrefField: s = "", limit: c = 0, emptyText: p = "", columns: m = 3, gap: h = 8, showNames: g = !1, lightbox: _ = !0, style: v, nodeRef: y, inert: b }) {
1730
+ let { tenant: x, apiUrl: S } = i(q), C = i(ye)?.[t], [w, T] = l(null), [E, D] = l(() => /* @__PURE__ */ new Set());
1678
1731
  a(() => {
1679
1732
  if (!t || C) return;
1680
1733
  let e = !0;
@@ -1691,7 +1744,7 @@ function St({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
1691
1744
  C
1692
1745
  ]);
1693
1746
  let O = C ?? w ?? [], k = n ? O.filter((e) => e?.id === n || e?.data?.slug === n || e?.slug === n) : O, A = Math.max(0, Number(c) || 0), j = t ? (() => {
1694
- let e = xt(k, {
1747
+ let e = bt(k, {
1695
1748
  imageField: r,
1696
1749
  nameField: o,
1697
1750
  hrefField: s
@@ -1896,19 +1949,19 @@ function St({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
1896
1949
  ]
1897
1950
  });
1898
1951
  }
1899
- var Ct = {
1952
+ var St = {
1900
1953
  color: "inherit",
1901
1954
  textDecoration: "none",
1902
1955
  fontSize: 14,
1903
1956
  opacity: .85
1904
- }, wt = {
1957
+ }, Ct = {
1905
1958
  background: "var(--page-surface, #f2f2f2)",
1906
1959
  color: "var(--page-text, #111827)",
1907
1960
  border: "1px solid rgba(148, 163, 184, 0.25)",
1908
1961
  boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
1909
1962
  zIndex: 60
1910
1963
  };
1911
- function Tt(e, t = {}, n = "dropdown") {
1964
+ function wt(e, t = {}, n = "dropdown") {
1912
1965
  let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], i = (e) => Array.isArray(e) ? e[0] : e, a = (e) => e == null ? "" : Y(e), o = r.map((e) => {
1913
1966
  let n = e.data ?? {}, r = t.parentField ? i(n[t.parentField]) : null;
1914
1967
  return {
@@ -1950,8 +2003,8 @@ function Tt(e, t = {}, n = "dropdown") {
1950
2003
  type: e.children.length ? n : "link"
1951
2004
  }));
1952
2005
  }
1953
- function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], style: c, nodeRef: p, menu: m = "auto", breakpoint: h = 768, source: g = "", labelField: _ = "", hrefField: v = "", imageField: y = "", descField: b = "", parentField: x = "", submenu: S = "dropdown" }) {
1954
- let [C, w] = l(null), [T, E] = l(!1), [D, O] = l(!1), [k, A] = l(null), { tenant: j, apiUrl: M } = i(J), N = i(ve)?.[g], [F, I] = l(null);
2006
+ function Tt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], style: c, nodeRef: p, menu: m = "auto", breakpoint: h = 768, source: g = "", labelField: _ = "", hrefField: v = "", imageField: y = "", descField: b = "", parentField: x = "", submenu: S = "dropdown" }) {
2007
+ let [C, w] = l(null), [T, E] = l(!1), [D, O] = l(!1), [k, A] = l(null), { tenant: j, apiUrl: M } = i(q), N = i(ye)?.[g], [F, I] = l(null);
1955
2008
  a(() => {
1956
2009
  if (!g || N) return;
1957
2010
  let e = !0;
@@ -1971,7 +2024,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
1971
2024
  let e = new ResizeObserver(() => E(C.offsetWidth < h));
1972
2025
  return e.observe(C), () => e.disconnect();
1973
2026
  }, [C, h]);
1974
- let L = g ? Tt(N ?? F ?? [], {
2027
+ let L = g ? wt(N ?? F ?? [], {
1975
2028
  labelField: _,
1976
2029
  hrefField: v,
1977
2030
  imageField: y,
@@ -2000,7 +2053,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2000
2053
  return /* @__PURE__ */ f("a", {
2001
2054
  href: e.href || "#",
2002
2055
  style: {
2003
- ...Ct,
2056
+ ...St,
2004
2057
  display: n ? "block" : "flex",
2005
2058
  alignItems: n ? void 0 : "center",
2006
2059
  gap: n ? void 0 : 10,
@@ -2097,7 +2150,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2097
2150
  let t = e.children ?? [];
2098
2151
  if (!t.length) return /* @__PURE__ */ d("a", {
2099
2152
  href: e.href || "#",
2100
- style: Ct,
2153
+ style: St,
2101
2154
  children: e.label
2102
2155
  }, e.key);
2103
2156
  let n = e.type === "mega";
@@ -2111,7 +2164,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2111
2164
  children: [/* @__PURE__ */ f("a", {
2112
2165
  href: e.href || "#",
2113
2166
  style: {
2114
- ...Ct,
2167
+ ...St,
2115
2168
  cursor: "pointer"
2116
2169
  },
2117
2170
  children: [
@@ -2127,7 +2180,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2127
2180
  ]
2128
2181
  }), k === e.key && (n ? /* @__PURE__ */ d("div", {
2129
2182
  style: {
2130
- ...wt,
2183
+ ...Ct,
2131
2184
  position: "absolute",
2132
2185
  left: 0,
2133
2186
  right: 0,
@@ -2143,7 +2196,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2143
2196
  }, !0))
2144
2197
  }) : /* @__PURE__ */ d("div", {
2145
2198
  style: {
2146
- ...wt,
2199
+ ...Ct,
2147
2200
  position: "absolute",
2148
2201
  top: "100%",
2149
2202
  left: 0,
@@ -2172,7 +2225,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2172
2225
  children: L.map((e) => /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d("a", {
2173
2226
  href: e.href || "#",
2174
2227
  style: {
2175
- ...Ct,
2228
+ ...St,
2176
2229
  padding: "10px 4px",
2177
2230
  fontWeight: (e.children ?? []).length ? 600 : 400,
2178
2231
  opacity: 1
@@ -2183,7 +2236,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2183
2236
  ]
2184
2237
  });
2185
2238
  }
2186
- function Dt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
2239
+ function Et({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
2187
2240
  let [i, a] = l(0), o = e.length ? Math.min(i, e.length - 1) : 0;
2188
2241
  return e.length ? /* @__PURE__ */ f("div", {
2189
2242
  ref: r,
@@ -2223,55 +2276,79 @@ function Dt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
2223
2276
  }, e.key))]
2224
2277
  }) : null;
2225
2278
  }
2226
- function Ot({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
2227
- let [a, o] = l(() => new Set(e.length ? [e[0].key] : []));
2279
+ function Dt({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i, padY: a, headerBg: o, headerColor: s, openBg: c, openColor: u, borderColor: p, style: m, nodeRef: h }) {
2280
+ let [g, _] = l(() => new Set(e.length ? [e[0].key] : []));
2228
2281
  if (!e.length) return null;
2229
- let s = (e) => o((t) => {
2282
+ let v = (e, t) => typeof e == "string" && e ? e : t, y = (e, t) => {
2283
+ let n = Number(e);
2284
+ return e === "" || e == null || !Number.isFinite(n) ? t : n;
2285
+ }, b = vt[r], x = (e) => _((t) => {
2230
2286
  let r = new Set(n ? t : []);
2231
2287
  return t.has(e) ? r.delete(e) : r.add(e), r;
2232
2288
  });
2233
2289
  return /* @__PURE__ */ d("div", {
2234
- ref: i,
2290
+ ref: h,
2235
2291
  style: {
2236
2292
  width: "100%",
2237
- ...P(r)
2293
+ ...P(m)
2238
2294
  },
2239
2295
  children: e.map((n, r) => {
2240
- let i = a.has(n.key);
2296
+ let l = g.has(n.key);
2241
2297
  return /* @__PURE__ */ f("div", {
2242
- style: { borderBottom: r < e.length - 1 ? "1px solid rgba(148, 163, 184, 0.35)" : "none" },
2298
+ style: { borderBottom: r < e.length - 1 ? `1px solid ${v(p, "rgba(148, 163, 184, 0.35)")}` : "none" },
2243
2299
  children: [/* @__PURE__ */ f("button", {
2244
2300
  type: "button",
2245
- onClick: () => s(n.key),
2301
+ onClick: () => x(n.key),
2246
2302
  style: {
2247
2303
  width: "100%",
2248
2304
  display: "flex",
2249
2305
  alignItems: "center",
2250
2306
  justifyContent: "space-between",
2251
2307
  gap: 12,
2252
- background: "transparent",
2308
+ background: l ? v(c, v(o, "transparent")) : v(o, "transparent"),
2253
2309
  border: 0,
2254
- padding: "14px 4px",
2310
+ padding: `${y(a, 14)}px ${y(i, 4)}px`,
2255
2311
  fontSize: 15,
2256
2312
  fontWeight: 600,
2257
2313
  fontFamily: "inherit",
2258
- color: "inherit",
2314
+ color: l ? v(u, v(s, "inherit")) : v(s, "inherit"),
2259
2315
  textAlign: "left",
2260
- cursor: "pointer"
2316
+ cursor: "pointer",
2317
+ transition: "background 180ms, color 180ms"
2261
2318
  },
2262
- children: [n.title || `Item ${r + 1}`, /* @__PURE__ */ d("span", {
2319
+ children: [/* @__PURE__ */ f("span", {
2320
+ style: {
2321
+ display: "flex",
2322
+ alignItems: "center",
2323
+ gap: 10,
2324
+ minWidth: 0
2325
+ },
2326
+ children: [b ? /* @__PURE__ */ d("svg", {
2327
+ viewBox: "0 0 24 24",
2328
+ width: 16,
2329
+ height: 16,
2330
+ fill: "none",
2331
+ stroke: "currentColor",
2332
+ strokeWidth: 2,
2333
+ strokeLinecap: "round",
2334
+ strokeLinejoin: "round",
2335
+ "aria-hidden": "true",
2336
+ style: { flexShrink: 0 },
2337
+ children: /* @__PURE__ */ d("path", { d: b })
2338
+ }) : null, n.title || `Item ${r + 1}`]
2339
+ }), /* @__PURE__ */ d("span", {
2263
2340
  "aria-hidden": !0,
2264
2341
  style: {
2265
2342
  fontSize: 12,
2266
2343
  opacity: .6,
2267
- transform: i ? "rotate(180deg)" : "none",
2344
+ transform: l ? "rotate(180deg)" : "none",
2268
2345
  transition: "transform 180ms"
2269
2346
  },
2270
2347
  children: "▼"
2271
2348
  })]
2272
2349
  }), /* @__PURE__ */ d("div", {
2273
2350
  style: {
2274
- display: i ? "flex" : "none",
2351
+ display: l ? "flex" : "none",
2275
2352
  flexDirection: "column"
2276
2353
  },
2277
2354
  children: t?.[n.key] ?? null
@@ -2280,15 +2357,15 @@ function Ot({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
2280
2357
  })
2281
2358
  });
2282
2359
  }
2283
- var kt = {
2360
+ var Ot = {
2284
2361
  display: "flex",
2285
2362
  flexDirection: "column",
2286
2363
  gap: "12px"
2287
- }, At = {
2364
+ }, kt = {
2288
2365
  fontSize: "14px",
2289
2366
  fontWeight: 500,
2290
2367
  color: "var(--page-text, #111827)"
2291
- }, jt = {
2368
+ }, At = {
2292
2369
  padding: "10px 12px",
2293
2370
  border: "1px solid var(--page-border, #d1d5db)",
2294
2371
  borderRadius: "6px",
@@ -2298,13 +2375,13 @@ var kt = {
2298
2375
  boxSizing: "border-box",
2299
2376
  backgroundColor: "var(--page-surface, #f2f2f2)",
2300
2377
  color: "var(--page-text, #111827)"
2301
- }, Mt = {
2378
+ }, jt = {
2302
2379
  display: "flex",
2303
2380
  alignItems: "center",
2304
2381
  gap: "8px",
2305
2382
  fontSize: "14px",
2306
2383
  color: "var(--page-text, #111827)"
2307
- }, $ = (e) => e ? {
2384
+ }, Mt = (e) => e ? {
2308
2385
  readOnly: !0,
2309
2386
  tabIndex: -1,
2310
2387
  onMouseDown: (e) => e.preventDefault()
@@ -2348,7 +2425,7 @@ var Lt = "g-recaptcha-response", Rt = (e) => e?.type === "recaptcha" ? Lt : e?.n
2348
2425
  function zt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2349
2426
  let a = /* @__PURE__ */ f("span", {
2350
2427
  style: {
2351
- ...At,
2428
+ ...kt,
2352
2429
  fontSize: 14
2353
2430
  },
2354
2431
  children: [e.label, e.required ? " *" : ""]
@@ -2391,7 +2468,7 @@ function zt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2391
2468
  size: e.captchaSize,
2392
2469
  inert: r,
2393
2470
  onChange: (e) => n(Lt, e)
2394
- }) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(tt, {
2471
+ }) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(et, {
2395
2472
  url: e.src,
2396
2473
  style: { width: "100%" }
2397
2474
  }) : /* @__PURE__ */ d("video", {
@@ -2467,7 +2544,7 @@ function zt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2467
2544
  });
2468
2545
  }
2469
2546
  function Bt({ 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 }) {
2470
- let { tenant: y, apiUrl: b } = i(J), [x, S] = l("form"), [C, w] = l(null), [T, E] = l({}), [D, O] = l(0), k = h ? v || "form" : x;
2547
+ let { tenant: y, apiUrl: b } = i(q), [x, S] = l("form"), [C, w] = l(null), [T, E] = l({}), [D, O] = l(0), k = h ? v || "form" : x;
2471
2548
  a(() => {
2472
2549
  if (!c || !s) return;
2473
2550
  let e = !0;
@@ -2548,7 +2625,7 @@ function Bt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
2548
2625
  }
2549
2626
  },
2550
2627
  style: {
2551
- ...kt,
2628
+ ...Ot,
2552
2629
  display: k === "success" ? "none" : "flex"
2553
2630
  },
2554
2631
  children: c && s ? /* @__PURE__ */ f(u, { children: [
@@ -2584,7 +2661,7 @@ function Bt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
2584
2661
  disabled: h || void 0,
2585
2662
  onClick: () => O(F - 1),
2586
2663
  style: {
2587
- ...ke,
2664
+ ...De,
2588
2665
  background: "transparent",
2589
2666
  color: "inherit",
2590
2667
  border: 0,
@@ -2597,7 +2674,7 @@ function Bt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
2597
2674
  disabled: h || L.length > 0,
2598
2675
  onClick: () => O(F + 1),
2599
2676
  style: {
2600
- ...ke,
2677
+ ...De,
2601
2678
  border: 0,
2602
2679
  padding: "10px 22px",
2603
2680
  borderRadius: 8,
@@ -2611,7 +2688,7 @@ function Bt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
2611
2688
  type: "submit",
2612
2689
  disabled: h || void 0,
2613
2690
  style: {
2614
- ...ke,
2691
+ ...De,
2615
2692
  border: 0,
2616
2693
  padding: "10px 22px",
2617
2694
  borderRadius: 8,
@@ -2658,7 +2735,7 @@ var Vt = null, Ht = null, Ut = (e) => {
2658
2735
  }), Vt;
2659
2736
  };
2660
2737
  function Wt({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l, onChange: u }) {
2661
- let p = i(J), 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);
2738
+ let p = i(q), 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);
2662
2739
  if (_.current = u, a(() => {
2663
2740
  if (l || !h || !g.current) return;
2664
2741
  let e = !0, i = (t) => {
@@ -2750,10 +2827,10 @@ function Gt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2750
2827
  return /* @__PURE__ */ d("label", {
2751
2828
  ref: r,
2752
2829
  style: {
2753
- ...At,
2830
+ ...kt,
2754
2831
  ...P(n)
2755
2832
  },
2756
- children: X(t, e, i)
2833
+ children: Re(t, e, i)
2757
2834
  });
2758
2835
  }
2759
2836
  function Kt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
@@ -2764,10 +2841,10 @@ function Kt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
2764
2841
  placeholder: n,
2765
2842
  required: !o && !!r,
2766
2843
  style: {
2767
- ...jt,
2844
+ ...At,
2768
2845
  ...P(i)
2769
2846
  },
2770
- ...$(o)
2847
+ ...Mt(o)
2771
2848
  });
2772
2849
  }
2773
2850
  function qt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
@@ -2778,18 +2855,18 @@ function qt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
2778
2855
  rows: n,
2779
2856
  required: !o && !!r,
2780
2857
  style: {
2781
- ...jt,
2858
+ ...At,
2782
2859
  resize: "vertical",
2783
2860
  ...P(i)
2784
2861
  },
2785
- ...$(o)
2862
+ ...Mt(o)
2786
2863
  });
2787
2864
  }
2788
2865
  function Jt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2789
2866
  return /* @__PURE__ */ f("label", {
2790
2867
  ref: o,
2791
2868
  style: {
2792
- ...Mt,
2869
+ ...jt,
2793
2870
  ...P(a)
2794
2871
  },
2795
2872
  children: [/* @__PURE__ */ d("input", {
@@ -2815,7 +2892,7 @@ function Yt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2815
2892
  onMouseDown: o ? (e) => e.preventDefault() : void 0,
2816
2893
  tabIndex: o ? -1 : void 0,
2817
2894
  style: {
2818
- ...jt,
2895
+ ...At,
2819
2896
  appearance: "auto",
2820
2897
  ...P(i)
2821
2898
  },
@@ -2834,7 +2911,7 @@ function Xt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
2834
2911
  return /* @__PURE__ */ f("label", {
2835
2912
  ref: a,
2836
2913
  style: {
2837
- ...jt,
2914
+ ...At,
2838
2915
  display: "flex",
2839
2916
  alignItems: "center",
2840
2917
  gap: "8px",
@@ -2866,7 +2943,7 @@ function Zt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2866
2943
  ref: n,
2867
2944
  type: r ? "button" : "submit",
2868
2945
  style: {
2869
- ...ke,
2946
+ ...De,
2870
2947
  border: 0,
2871
2948
  cursor: "pointer",
2872
2949
  alignSelf: "flex-start",
@@ -2899,7 +2976,7 @@ function Qt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2899
2976
  });
2900
2977
  }
2901
2978
  function $t({ 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: _ }) {
2902
- let { tenant: v, apiUrl: y, locale: b } = i(J), x = i(Se), S = i(ve), [, C] = l(0);
2979
+ let { tenant: v, apiUrl: y, locale: b } = i(q), x = i(Ce), S = i(ye), [, C] = l(0);
2903
2980
  a(() => {
2904
2981
  if (typeof window > "u") return;
2905
2982
  let e = () => C((e) => e + 1);
@@ -2907,7 +2984,7 @@ function $t({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
2907
2984
  window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
2908
2985
  };
2909
2986
  }, []);
2910
- let w = xe(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : S?.[e], O = m ? ye(S) : 1, [k, A] = l(null);
2987
+ let w = Se(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : S?.[e], O = m ? be(S) : 1, [k, A] = l(null);
2911
2988
  if (a(() => {
2912
2989
  if (!e || D) return;
2913
2990
  let n = !0, r = new URLSearchParams();
@@ -2952,7 +3029,7 @@ function $t({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
2952
3029
  },
2953
3030
  children: M.map((e) => /* @__PURE__ */ d("div", {
2954
3031
  style: { minWidth: 0 },
2955
- children: x.render(p, (t) => Ee(t, e))
3032
+ children: x.render(p, (t) => X(t, e))
2956
3033
  }, e.id ?? e?.data?.slug))
2957
3034
  }) : /* @__PURE__ */ d("div", {
2958
3035
  ref: _,
@@ -2962,7 +3039,7 @@ function $t({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
2962
3039
  ...P(g)
2963
3040
  },
2964
3041
  children: M.map((e) => {
2965
- let t = o ? we(e?.data, o) : null, r = s ? Y(we(e?.data, s)) : null, i = c ? we(e?.data, c) : null, a = Array.isArray(i) ? i : null, l = a || i == null ? null : Y(i), u = n === "list";
3042
+ let t = o ? Te(e?.data, o) : null, r = s ? Y(Te(e?.data, s)) : null, i = c ? Te(e?.data, c) : null, a = Array.isArray(i) ? i : null, l = a || i == null ? null : Y(i), u = n === "list";
2966
3043
  return /* @__PURE__ */ f("div", {
2967
3044
  style: {
2968
3045
  display: "flex",
@@ -3009,7 +3086,7 @@ function $t({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
3009
3086
  lineHeight: 1.55,
3010
3087
  opacity: .85
3011
3088
  },
3012
- children: Ue(a)
3089
+ children: He(a)
3013
3090
  })
3014
3091
  ]
3015
3092
  })]
@@ -3018,7 +3095,7 @@ function $t({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
3018
3095
  });
3019
3096
  }
3020
3097
  function en({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
3021
- let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : be(), s = {
3098
+ let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : xe(), s = {
3022
3099
  height: 34,
3023
3100
  padding: "0 12px",
3024
3101
  borderRadius: 8,
@@ -3066,7 +3143,7 @@ function en({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
3066
3143
  name: `f_${e.name}`,
3067
3144
  defaultValue: o[e.name] ?? "",
3068
3145
  style: s,
3069
- ...$(i),
3146
+ ...Mt(i),
3070
3147
  children: [/* @__PURE__ */ d("option", {
3071
3148
  value: "",
3072
3149
  children: e.label || e.name
@@ -3081,7 +3158,7 @@ function en({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
3081
3158
  name: `f_${e.name}`,
3082
3159
  defaultValue: o[e.name] ?? "",
3083
3160
  style: s,
3084
- ...$(i),
3161
+ ...Mt(i),
3085
3162
  children: [
3086
3163
  /* @__PURE__ */ d("option", {
3087
3164
  value: "",
@@ -3102,7 +3179,7 @@ function en({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
3102
3179
  defaultValue: o[e.name] ?? "",
3103
3180
  placeholder: e.label || e.name,
3104
3181
  style: s,
3105
- ...$(i)
3182
+ ...Mt(i)
3106
3183
  }, e.name)), /* @__PURE__ */ d("button", {
3107
3184
  type: "submit",
3108
3185
  style: {
@@ -3115,7 +3192,7 @@ function en({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
3115
3192
  fontWeight: 600,
3116
3193
  cursor: i ? "default" : "pointer"
3117
3194
  },
3118
- ...$(i),
3195
+ ...Mt(i),
3119
3196
  children: t
3120
3197
  })]
3121
3198
  });
@@ -3171,7 +3248,7 @@ function tn({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
3171
3248
  }) : null;
3172
3249
  }
3173
3250
  function nn({ 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 }) {
3174
- let { tenant: g, apiUrl: _ } = i(J), v = i(ve), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
3251
+ let { tenant: g, apiUrl: _ } = i(q), v = i(ye), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
3175
3252
  a(() => {
3176
3253
  if (!o || Number.isFinite(x)) return;
3177
3254
  let e = !0, t = o.startsWith("api:") ? `${_}/data/${encodeURIComponent(o.slice(4))}` : `${_}/dynamic/${encodeURIComponent(o)}?limit=1`;
@@ -3190,7 +3267,7 @@ function nn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
3190
3267
  ]);
3191
3268
  let S = Math.max(1, Number(s) || 6), C = Number.isFinite(x) ? x : y;
3192
3269
  if (o && C === null || o && u && !(C > 0)) return null;
3193
- let w = Math.min(Math.max(o ? Math.ceil(C / S) : Number(e) || 1, 1), 50), T = Math.min(Math.max(o ? ye(v) : Number(t) || 1, 1), w), E = (e) => {
3270
+ let w = Math.min(Math.max(o ? Math.ceil(C / S) : Number(e) || 1, 1), 50), T = Math.min(Math.max(o ? be(v) : Number(t) || 1, 1), w), E = (e) => {
3194
3271
  if (o) {
3195
3272
  if (typeof window < "u") {
3196
3273
  let t = new URLSearchParams(window.location.search);
@@ -3920,7 +3997,7 @@ function wn({ node: e, onClose: t }) {
3920
3997
  });
3921
3998
  }
3922
3999
  function Tn({ 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 }) {
3923
- let b = o(), [x, S] = l(null), { tenant: C, apiUrl: w } = i(J), T = i(ve)?.[t], [E, D] = l(null);
4000
+ let b = o(), [x, S] = l(null), { tenant: C, apiUrl: w } = i(q), T = i(ye)?.[t], [E, D] = l(null);
3924
4001
  a(() => {
3925
4002
  if (!t || T) return;
3926
4003
  let e = !0;
@@ -4138,85 +4215,102 @@ function En({ value: e, onCommit: t, style: n, hint: r }) {
4138
4215
  children: e ?? ""
4139
4216
  });
4140
4217
  }
4141
- var Dn = 360, On = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;\n font-size: 11px;\n line-height: 16px;\n min-width: 20px;\n text-align: center;\n padding: 1px 4px;\n user-select: none;\n color: #e2e8f0;\n background: rgba(148, 163, 184, 0.16);\n}\n.wb-tedit-btn:hover { background: #4f46e5; color: #fff; }\n.wb-tedit-btn[data-hint] { position: relative; }\n.wb-tedit-btn[data-hint]:hover::after {\n content: attr(data-hint);\n position: absolute;\n bottom: calc(100% + 6px);\n left: 50%;\n transform: translateX(-50%);\n padding: 3px 6px;\n border-radius: 5px;\n background: #1e293b;\n border: 1px solid rgba(148, 163, 184, 0.35);\n color: #e2e8f0;\n font-size: 10px;\n line-height: 14px;\n white-space: nowrap;\n pointer-events: none;\n z-index: 6;\n}\n.wb-tedit-grip { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; }\n.wb-tedit-grip:hover { background: rgba(99, 102, 241, 0.55); }\n.wb-tedit-rowgrip { position: absolute; left: 0; right: 0; bottom: -3px; height: 6px; cursor: row-resize; }\n.wb-tedit-rowgrip:hover { background: rgba(99, 102, 241, 0.55); }\n.wb-tedit-cellon { outline: 2px solid rgba(99, 102, 241, 0.75); outline-offset: -2px; }\n.wb-tedit-bar {\n position: absolute;\n z-index: 5;\n display: flex;\n align-items: center;\n gap: 3px;\n padding: 4px 5px;\n border-radius: 8px;\n background: #0f172a;\n border: 1px solid rgba(148, 163, 184, 0.35);\n box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);\n white-space: nowrap;\n}\n.wb-tedit-sep { width: 1px; align-self: stretch; margin: 0 2px; background: rgba(148, 163, 184, 0.3); }\n.wb-tedit-at { font-size: 10px; color: #94a3b8; padding-right: 2px; }\n", kn = (e, t) => e && t ? `cell-${e}-${t}` : "";
4142
- function An({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], colKeys: o = [], heights: s = [], spans: p, linked: m, source: h, limit: g = 10, header: _ = !0, striped: v = !0, bordered: y = !1, compact: b = !1, padX: x, padY: S, paged: C, emptyText: w, style: T, nodeRef: E, edit: D }) {
4143
- let O = c(null), k = c(null), [A, j] = l(null), [M, N] = l(null), F = (e, t) => () => j({
4218
+ var Dn = 360, On = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;\n font-size: 11px;\n line-height: 16px;\n min-width: 20px;\n text-align: center;\n padding: 1px 4px;\n user-select: none;\n color: #e2e8f0;\n background: rgba(148, 163, 184, 0.16);\n}\n.wb-tedit-btn:hover { background: #4f46e5; color: #fff; }\n.wb-tedit-btn[data-hint] { position: relative; }\n.wb-tedit-btn[data-hint]:hover::after {\n content: attr(data-hint);\n position: absolute;\n bottom: calc(100% + 6px);\n left: 50%;\n transform: translateX(-50%);\n padding: 3px 6px;\n border-radius: 5px;\n background: #1e293b;\n border: 1px solid rgba(148, 163, 184, 0.35);\n color: #e2e8f0;\n font-size: 10px;\n line-height: 14px;\n white-space: nowrap;\n pointer-events: none;\n z-index: 6;\n}\n.wb-tedit-grip { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; }\n.wb-tedit-grip:hover { background: rgba(99, 102, 241, 0.55); }\n.wb-tedit-rowgrip { position: absolute; left: 0; right: 0; bottom: -3px; height: 6px; cursor: row-resize; }\n.wb-tedit-rowgrip:hover { background: rgba(99, 102, 241, 0.55); }\n.wb-tedit-cellon { outline: 2px solid rgba(99, 102, 241, 0.75); outline-offset: -2px; }\n.wb-tedit-bar {\n position: absolute;\n z-index: 5;\n display: flex;\n align-items: center;\n gap: 3px;\n padding: 4px 5px;\n border-radius: 8px;\n background: #0f172a;\n border: 1px solid rgba(148, 163, 184, 0.35);\n box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);\n white-space: nowrap;\n}\n.wb-tedit-sep { width: 1px; align-self: stretch; margin: 0 2px; background: rgba(148, 163, 184, 0.3); }\n.wb-tedit-at { font-size: 10px; color: #94a3b8; padding-right: 2px; }\n", kn = (e, t) => e && t ? `cell-${e}-${t}` : "", An = (e) => {
4219
+ if (!e || typeof e != "object") return e ?? "";
4220
+ let t = String(e.text ?? "");
4221
+ return typeof e.href == "string" && e.href ? /* @__PURE__ */ d("a", {
4222
+ href: e.href,
4223
+ target: "_blank",
4224
+ rel: "noopener noreferrer",
4225
+ style: { color: "var(--page-accent, #4f46e5)" },
4226
+ children: t
4227
+ }) : t;
4228
+ };
4229
+ function jn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], colKeys: o = [], heights: s = [], spans: p, linked: m, source: h, limit: g = 10, header: _ = !0, striped: v = !0, bordered: y = !1, compact: b = !1, padX: x, padY: S, paged: C, emptyText: w, stickyHeader: T, headerBg: E, headerColor: D, headerAlign: O, borderColor: k, maxHeight: A, style: j, nodeRef: M, edit: N }) {
4230
+ let F = c(null), I = c(null), [L, R] = l(null), [z, B] = l(null), V = (e, t) => () => R({
4144
4231
  r: e,
4145
4232
  c: t
4146
4233
  });
4147
4234
  a(() => {
4148
- if (!D) return;
4149
- let e = k.current, t = A && e?.querySelector(`[data-cell="${A.r}-${A.c}"]`);
4235
+ if (!N) return;
4236
+ let e = I.current, t = L && e?.querySelector(`[data-cell="${L.r}-${L.c}"]`);
4150
4237
  if (!t) {
4151
- M && N(null);
4238
+ z && B(null);
4152
4239
  return;
4153
4240
  }
4154
4241
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
4155
4242
  top: r.bottom - n.top + 4,
4156
4243
  left: Math.max(0, Math.min(r.left - n.left, n.width - Dn))
4157
4244
  };
4158
- (M?.top !== i.top || M?.left !== i.left) && N(i);
4245
+ (z?.top !== i.top || z?.left !== i.left) && B(i);
4159
4246
  }), a(() => {
4160
- if (!D || !A) return;
4247
+ if (!N || !L) return;
4161
4248
  let e = (e) => {
4162
- k.current?.contains(e.target) || j(null);
4249
+ I.current?.contains(e.target) || R(null);
4163
4250
  };
4164
4251
  return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
4165
- }, [D, A]);
4166
- let { tenant: I, apiUrl: L } = i(J), R = i(ve), z = R?.[h], B = C ? ye(R) : 1, [V, ee] = l(null);
4252
+ }, [N, L]);
4253
+ let { tenant: ee, apiUrl: H } = i(q), te = i(ye), U = te?.[h], W = C ? be(te) : 1, [ne, re] = l(null);
4167
4254
  if (a(() => {
4168
- if (!h || z) return;
4169
- let e = !0, t = Math.max(1, Number(g) || 10), n = C && !h.startsWith("api:") ? `?offset=${(B - 1) * t}&limit=${t}` : "", r = h.startsWith("api:") ? `${L}/data/${encodeURIComponent(h.slice(4))}` : `${L}/dynamic/${encodeURIComponent(h)}${n}`;
4170
- return fetch(r, { headers: I ? { "x-tenant": I } : {} }).then((e) => e.json()).then((t) => {
4255
+ if (!h || U) return;
4256
+ let e = !0, t = Math.max(1, Number(g) || 10), n = C && !h.startsWith("api:") ? `?offset=${(W - 1) * t}&limit=${t}` : "", r = h.startsWith("api:") ? `${H}/data/${encodeURIComponent(h.slice(4))}` : `${H}/dynamic/${encodeURIComponent(h)}${n}`;
4257
+ return fetch(r, { headers: ee ? { "x-tenant": ee } : {} }).then((e) => e.json()).then((t) => {
4171
4258
  let n = Array.isArray(t?.payload) ? t.payload : Array.isArray(t?.payload?.data) ? t.payload.data : [];
4172
- return e && ee(n);
4173
- }).catch(() => e && ee([])), () => {
4259
+ return e && re(n);
4260
+ }).catch(() => e && re([])), () => {
4174
4261
  e = !1;
4175
4262
  };
4176
4263
  }, [
4177
4264
  h,
4178
- I,
4179
- L,
4180
- z,
4265
+ ee,
4266
+ H,
4267
+ U,
4181
4268
  C,
4182
- B,
4269
+ W,
4183
4270
  g
4184
4271
  ]), !e.length) return null;
4185
- let H = Math.max(1, Number(g) || 10), te = h ? C ? z || h.startsWith("api:") ? (z ?? V ?? []).slice((B - 1) * H, B * H) : (V ?? []).slice(0, H) : (z ?? V ?? []).slice(0, H) : null, U = te ? te.map((t) => e.map((e) => Y(we(t?.data, e.field)))) : t, ne = !!h && !(h && !z && V === null) && U.length === 0, re = b ? {
4272
+ let ie = Math.max(1, Number(g) || 10), ae = h ? C ? U || h.startsWith("api:") ? (U ?? ne ?? []).slice((W - 1) * ie, W * ie) : (ne ?? []).slice(0, ie) : (U ?? ne ?? []).slice(0, ie) : null, G = ae ? ae.map((t) => e.map((e) => Y(Te(t?.data, e.field)))) : t, oe = !!h && !(h && !U && ne === null) && G.length === 0, se = b ? {
4186
4273
  y: 6,
4187
4274
  x: 10
4188
4275
  } : {
4189
4276
  y: 10,
4190
4277
  x: 14
4191
- }, ie = `${Number.isFinite(Number(S)) && S !== "" ? Number(S) : re.y}px ${Number.isFinite(Number(x)) && x !== "" ? Number(x) : re.x}px`, ae = "1px solid rgba(148, 163, 184, 0.35)", oe = y ? { border: ae } : { borderBottom: ae }, se = Array.isArray(n) && n.length === e.length && n.every((e) => Number.isFinite(e) && e > 0), ce = !!D && D.rows !== !1, le = (t) => (r) => {
4192
- if (!D?.resize || t >= e.length - 1) return;
4278
+ }, K = `${Number.isFinite(Number(S)) && S !== "" ? Number(S) : se.y}px ${Number.isFinite(Number(x)) && x !== "" ? Number(x) : se.x}px`, ce = `1px solid ${typeof k == "string" && k ? k : "rgba(148, 163, 184, 0.35)"}`, le = y ? { border: ce } : { borderBottom: ce }, ue = Array.isArray(n) && n.length === e.length && n.every((e) => Number.isFinite(e) && e > 0), de = [
4279
+ "left",
4280
+ "center",
4281
+ "right"
4282
+ ], fe = (t) => de.includes(e[t]?.align) ? e[t].align : "", pe = (e) => fe(e) || (de.includes(O) ? O : "left"), me = Number.isFinite(Number(A)) && Number(A) > 0 ? Number(A) : 0, he = P(j), ge = !me && he && he.maxHeight !== void 0 ? he.maxHeight : 0, _e = me || ge, ve = ge ? {
4283
+ ...he,
4284
+ maxHeight: void 0
4285
+ } : he, xe = !!N && N.rows !== !1, Se = (t) => (r) => {
4286
+ if (!N?.resize || t >= e.length - 1) return;
4193
4287
  r.preventDefault(), r.stopPropagation();
4194
- let i = O.current, a = i ? i.clientWidth : 0;
4288
+ let i = F.current, a = i ? i.clientWidth : 0;
4195
4289
  if (!a) return;
4196
- let o = se ? [...n] : e.map(() => 100 / e.length), s = r.clientX, c = o[t] + o[t + 1], l = (e) => {
4290
+ let o = ue ? [...n] : e.map(() => 100 / e.length), s = r.clientX, c = o[t] + o[t + 1], l = (e) => {
4197
4291
  let n = (e.clientX - s) / a * 100, r = Math.min(c - 5, Math.max(5, o[t] + n)), i = [...o];
4198
- i[t] = Math.round(r * 10) / 10, i[t + 1] = Math.round((c - r) * 10) / 10, D.resize(i);
4292
+ i[t] = Math.round(r * 10) / 10, i[t + 1] = Math.round((c - r) * 10) / 10, N.resize(i);
4199
4293
  }, u = () => {
4200
4294
  window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", u);
4201
4295
  };
4202
4296
  window.addEventListener("pointermove", l), window.addEventListener("pointerup", u);
4203
- }, W = /* @__PURE__ */ new Set();
4204
- p && U.forEach((t, n) => e.forEach((e, t) => {
4297
+ }, Ce = /* @__PURE__ */ new Set();
4298
+ p && G.forEach((t, n) => e.forEach((e, t) => {
4205
4299
  let i = p[kn(r[n], o[t])];
4206
4300
  if (!i) return;
4207
4301
  let a = Math.max(1, Number(i.c) || 1), s = Math.max(1, Number(i.r) || 1);
4208
- for (let e = 0; e < s; e++) for (let r = 0; r < a; r++) (e || r) && W.add(`${n + e},${t + r}`);
4302
+ for (let e = 0; e < s; e++) for (let r = 0; r < a; r++) (e || r) && Ce.add(`${n + e},${t + r}`);
4209
4303
  }));
4210
- let ue = (e) => (t) => {
4211
- if (!D?.resizeRow) return;
4304
+ let we = (e) => (t) => {
4305
+ if (!N?.resizeRow) return;
4212
4306
  t.preventDefault(), t.stopPropagation();
4213
4307
  let n = t.currentTarget.closest("tr");
4214
4308
  if (!n) return;
4215
- let r = t.clientY, i = n.offsetHeight, a = (t) => D.resizeRow(e, Math.max(20, Math.round(i + (t.clientY - r)))), o = () => {
4309
+ let r = t.clientY, i = n.offsetHeight, a = (t) => N.resizeRow(e, Math.max(20, Math.round(i + (t.clientY - r)))), o = () => {
4216
4310
  window.removeEventListener("pointermove", a), window.removeEventListener("pointerup", o);
4217
4311
  };
4218
4312
  window.addEventListener("pointermove", a), window.addEventListener("pointerup", o);
4219
- }, G = (e, t, n, r) => r ? null : /* @__PURE__ */ d("span", {
4313
+ }, J = (e, t, n, r) => r ? null : /* @__PURE__ */ d("span", {
4220
4314
  className: "wb-tedit-btn",
4221
4315
  role: "button",
4222
4316
  "data-hint": t,
@@ -4225,118 +4319,129 @@ function An({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
4225
4319
  },
4226
4320
  onClick: n,
4227
4321
  children: e
4228
- }, t), K = A && A.r < U.length && A.c < e.length ? A : null, q = (e, t) => D?.labels?.[e] ?? t, de = K ? p?.[kn(r[K.r], o[K.c])] : null, fe = Math.max(1, Number(de?.c) || 1), pe = Math.max(1, Number(de?.r) || 1);
4322
+ }, t), X = L && L.r < G.length && L.c < e.length ? L : null, Z = (e, t) => N?.labels?.[e] ?? t, Ee = X ? p?.[kn(r[X.r], o[X.c])] : null, De = Math.max(1, Number(Ee?.c) || 1), Oe = Math.max(1, Number(Ee?.r) || 1);
4229
4323
  return /* @__PURE__ */ f("div", {
4230
4324
  ref: (e) => {
4231
- k.current = e, typeof E == "function" && E(e);
4325
+ I.current = e, typeof M == "function" && M(e);
4232
4326
  },
4233
4327
  style: {
4234
4328
  width: "100%",
4235
- ...D ? { position: "relative" } : null,
4236
- ...P(T)
4329
+ ...N ? { position: "relative" } : null,
4330
+ ...ve
4237
4331
  },
4238
4332
  children: [
4239
- D && /* @__PURE__ */ d("style", { children: On }),
4240
- D && K && M && /* @__PURE__ */ f("div", {
4333
+ N && /* @__PURE__ */ d("style", { children: On }),
4334
+ N && X && z && /* @__PURE__ */ f("div", {
4241
4335
  className: "wb-tedit-bar",
4242
4336
  style: {
4243
- top: M.top,
4244
- left: M.left
4337
+ top: z.top,
4338
+ left: z.left
4245
4339
  },
4246
4340
  onMouseDown: (e) => e.stopPropagation(),
4247
4341
  children: [
4248
4342
  /* @__PURE__ */ d("span", {
4249
4343
  className: "wb-tedit-at",
4250
- children: `R${K.r + 1}·C${K.c + 1}`
4344
+ children: `R${X.r + 1}·C${X.c + 1}`
4251
4345
  }),
4252
- G("+↑", q("rowAbove", "Insert row above"), () => D.addRow(K.r - 1)),
4253
- G("+↓", q("rowBelow", "Insert row below"), () => D.addRow(K.r)),
4254
- G("↑", q("rowUp", "Move row up"), () => D.moveRow(K.r, -1), K.r === 0),
4255
- G("↓", q("rowDown", "Move row down"), () => D.moveRow(K.r, 1), K.r >= U.length - 1),
4256
- G("✕ row", q("rowDelete", "Delete row"), () => D.dropRow(K.r), U.length <= 1),
4346
+ J("+↑", Z("rowAbove", "Insert row above"), () => N.addRow(X.r - 1)),
4347
+ J("+↓", Z("rowBelow", "Insert row below"), () => N.addRow(X.r)),
4348
+ J("↑", Z("rowUp", "Move row up"), () => N.moveRow(X.r, -1), X.r === 0),
4349
+ J("↓", Z("rowDown", "Move row down"), () => N.moveRow(X.r, 1), X.r >= G.length - 1),
4350
+ J("✕ row", Z("rowDelete", "Delete row"), () => N.dropRow(X.r), G.length <= 1),
4257
4351
  /* @__PURE__ */ d("span", { className: "wb-tedit-sep" }),
4258
- G("+←", q("colLeft", "Insert column left"), () => D.addColumn(K.c - 1)),
4259
- G("+→", q("colRight", "Insert column right"), () => D.addColumn(K.c)),
4260
- G("←", q("colMoveLeft", "Move column left"), () => D.moveColumn(K.c, -1), K.c === 0),
4261
- G("→", q("colMoveRight", "Move column right"), () => D.moveColumn(K.c, 1), K.c >= e.length - 1),
4262
- G("✕ col", q("colDelete", "Delete column"), () => D.dropColumn(K.c), e.length <= 1),
4352
+ J("+←", Z("colLeft", "Insert column left"), () => N.addColumn(X.c - 1)),
4353
+ J("+→", Z("colRight", "Insert column right"), () => N.addColumn(X.c)),
4354
+ J("←", Z("colMoveLeft", "Move column left"), () => N.moveColumn(X.c, -1), X.c === 0),
4355
+ J("→", Z("colMoveRight", "Move column right"), () => N.moveColumn(X.c, 1), X.c >= e.length - 1),
4356
+ J("✕ col", Z("colDelete", "Delete column"), () => N.dropColumn(X.c), e.length <= 1),
4263
4357
  /* @__PURE__ */ d("span", { className: "wb-tedit-sep" }),
4264
- G("↔", q("mergeRight", "Merge with the cell on the right"), () => D.merge(K.r, K.c, "right"), K.c + fe >= e.length),
4265
- G("↕", q("mergeDown", "Merge with the cell below"), () => D.merge(K.r, K.c, "down"), K.r + pe >= U.length),
4266
- G("⤫", q("split", "Split this cell"), () => D.split(K.r, K.c), fe === 1 && pe === 1)
4358
+ J("↔", Z("mergeRight", "Merge with the cell on the right"), () => N.merge(X.r, X.c, "right"), X.c + De >= e.length),
4359
+ J("↕", Z("mergeDown", "Merge with the cell below"), () => N.merge(X.r, X.c, "down"), X.r + Oe >= G.length),
4360
+ J("⤫", Z("split", "Split this cell"), () => N.split(X.r, X.c), De === 1 && Oe === 1)
4267
4361
  ]
4268
4362
  }),
4269
4363
  /* @__PURE__ */ d("div", {
4270
4364
  style: {
4271
4365
  width: "100%",
4272
- overflowX: "auto"
4366
+ overflowX: "auto",
4367
+ ..._e ? {
4368
+ maxHeight: _e,
4369
+ overflowY: "auto"
4370
+ } : null
4273
4371
  },
4274
4372
  children: /* @__PURE__ */ f("table", {
4275
- ref: O,
4373
+ ref: F,
4276
4374
  style: {
4277
4375
  width: "100%",
4278
- borderCollapse: "collapse",
4376
+ borderCollapse: T && _ !== !1 ? "separate" : "collapse",
4377
+ borderSpacing: 0,
4279
4378
  fontSize: 14,
4280
- ...se ? { tableLayout: "fixed" } : null,
4281
- ...y ? { border: ae } : {}
4379
+ ...ue ? { tableLayout: "fixed" } : null,
4380
+ ...y ? { border: ce } : {}
4282
4381
  },
4283
4382
  children: [
4284
- se && /* @__PURE__ */ d("colgroup", { children: n.map((e, t) => /* @__PURE__ */ d("col", { style: { width: `${e}%` } }, t)) }),
4383
+ ue && /* @__PURE__ */ d("colgroup", { children: n.map((e, t) => /* @__PURE__ */ d("col", { style: { width: `${e}%` } }, t)) }),
4285
4384
  _ === !1 ? null : /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: e.map((t, n) => /* @__PURE__ */ d("th", {
4286
- className: D ? "wb-tedit-head" : void 0,
4385
+ className: N ? "wb-tedit-head" : void 0,
4287
4386
  style: {
4288
- textAlign: "left",
4387
+ textAlign: pe(n),
4289
4388
  fontWeight: 600,
4290
- padding: ie,
4291
- background: "rgba(148, 163, 184, 0.12)",
4292
- ...D ? { position: "relative" } : null,
4293
- ...oe
4389
+ padding: K,
4390
+ ...typeof D == "string" && D ? { color: D } : null,
4391
+ background: typeof E == "string" && E ? E : T ? "var(--page-surface, #f2f2f2)" : "rgba(148, 163, 184, 0.12)",
4392
+ ...T ? {
4393
+ position: "sticky",
4394
+ top: 0,
4395
+ zIndex: 2
4396
+ } : N ? { position: "relative" } : null,
4397
+ ...le
4294
4398
  },
4295
- children: D ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(En, {
4399
+ children: N ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(En, {
4296
4400
  value: t.label ?? t,
4297
- onCommit: (e) => D.header(n, e),
4298
- hint: q("editCell", "Double-click to edit"),
4401
+ onCommit: (e) => N.header(n, e),
4402
+ hint: Z("editCell", "Double-click to edit"),
4299
4403
  style: { paddingRight: 6 }
4300
4404
  }), n < e.length - 1 && /* @__PURE__ */ d("span", {
4301
4405
  className: "wb-tedit-grip",
4302
- title: q("colWidth", "Drag to resize the column"),
4303
- onPointerDown: le(n)
4406
+ title: Z("colWidth", "Drag to resize the column"),
4407
+ onPointerDown: Se(n)
4304
4408
  })] }) : t.label ?? t
4305
4409
  }, n)) }) }),
4306
- /* @__PURE__ */ f("tbody", { children: [ne && /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", {
4410
+ /* @__PURE__ */ f("tbody", { children: [oe && /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", {
4307
4411
  colSpan: e.length,
4308
4412
  style: {
4309
- padding: ie,
4413
+ padding: K,
4310
4414
  textAlign: "center",
4311
4415
  opacity: .6,
4312
- ...oe
4416
+ ...le
4313
4417
  },
4314
4418
  children: w || "No data yet"
4315
- }) }), U.map((t, n) => /* @__PURE__ */ d("tr", {
4316
- className: D ? "wb-tedit-row" : void 0,
4419
+ }) }), G.map((t, n) => /* @__PURE__ */ d("tr", {
4420
+ className: N ? "wb-tedit-row" : void 0,
4317
4421
  style: {
4318
4422
  ...v && n % 2 == 1 ? { background: "rgba(148, 163, 184, 0.07)" } : null,
4319
4423
  ...Number.isFinite(Number(s?.[n])) && s[n] > 0 ? { height: s[n] } : null
4320
4424
  },
4321
4425
  children: e.map((e, i) => {
4322
- if (W.has(`${n},${i}`)) return null;
4426
+ if (Ce.has(`${n},${i}`)) return null;
4323
4427
  let a = kn(r[n], o[i]), s = m?.[a], c = p?.[a], l = Math.max(1, Number(c?.c) || 1), u = Math.max(1, Number(c?.r) || 1);
4324
4428
  return /* @__PURE__ */ f("td", {
4325
- className: D ? `wb-tedit-cell${A?.r === n && A?.c === i ? " wb-tedit-cellon" : ""}` : void 0,
4326
- onMouseDownCapture: ce ? F(n, i) : void 0,
4327
- "data-cell": D ? `${n}-${i}` : void 0,
4429
+ className: N ? `wb-tedit-cell${L?.r === n && L?.c === i ? " wb-tedit-cellon" : ""}` : void 0,
4430
+ onMouseDownCapture: xe ? V(n, i) : void 0,
4431
+ "data-cell": N ? `${n}-${i}` : void 0,
4328
4432
  colSpan: l > 1 ? l : void 0,
4329
4433
  rowSpan: u > 1 ? u : void 0,
4330
4434
  style: {
4331
- padding: ie,
4332
- ...D ? { position: "relative" } : null,
4333
- ...oe
4435
+ padding: K,
4436
+ ...fe(i) ? { textAlign: fe(i) } : null,
4437
+ ...N ? { position: "relative" } : null,
4438
+ ...le
4334
4439
  },
4335
- children: [s ?? t?.[i] ?? "", D && ce && /* @__PURE__ */ d("span", {
4440
+ children: [s ?? An(t?.[i]), N && xe && /* @__PURE__ */ d("span", {
4336
4441
  className: "wb-tedit-rowgrip",
4337
- title: q("rowHeight", "Drag to set the row height — double-click to fit the content"),
4338
- onPointerDown: ue(n),
4339
- onDoubleClick: () => D.resizeRow(n, 0)
4442
+ title: Z("rowHeight", "Drag to set the row height — double-click to fit the content"),
4443
+ onPointerDown: we(n),
4444
+ onDoubleClick: () => N.resizeRow(n, 0)
4340
4445
  })]
4341
4446
  }, i);
4342
4447
  })
@@ -4347,7 +4452,7 @@ function An({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
4347
4452
  ]
4348
4453
  });
4349
4454
  }
4350
- var jn = {
4455
+ var Mn = {
4351
4456
  small: {
4352
4457
  cell: 62,
4353
4458
  font: 10.5,
@@ -4372,8 +4477,8 @@ var jn = {
4372
4477
  pad: 8,
4373
4478
  gap: 4
4374
4479
  }
4375
- }, Mn = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, Nn = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Pn = 366;
4376
- function Fn(e, t = {}) {
4480
+ }, Nn = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, Pn = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Fn = 366;
4481
+ function In(e, t = {}) {
4377
4482
  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 ? "" : Y(e), a = (e) => {
4378
4483
  let t = i(r(e)), n = t ? new Date(t) : null;
4379
4484
  return n && !Number.isNaN(n.getTime()) ? n : null;
@@ -4390,7 +4495,7 @@ function Fn(e, t = {}) {
4390
4495
  } : null;
4391
4496
  }).filter(Boolean);
4392
4497
  }
4393
- function In(e) {
4498
+ function Ln(e) {
4394
4499
  return (Array.isArray(e) ? e : []).map((e, t) => {
4395
4500
  let n = e?.start ? new Date(e.start) : null;
4396
4501
  if (!n || Number.isNaN(n.getTime())) return null;
@@ -4405,20 +4510,20 @@ function In(e) {
4405
4510
  };
4406
4511
  }).filter(Boolean);
4407
4512
  }
4408
- function Ln(e) {
4513
+ function Rn(e) {
4409
4514
  let t = /* @__PURE__ */ new Map();
4410
4515
  for (let n of e) {
4411
- let e = Nn(n.start), r = n.end ? Nn(n.end) : e, i = Math.min(Math.max(0, Math.round((r - e) / 864e5)), Pn);
4516
+ let e = Pn(n.start), r = n.end ? Pn(n.end) : e, i = Math.min(Math.max(0, Math.round((r - e) / 864e5)), Fn);
4412
4517
  for (let r = 0; r <= i; r += 1) {
4413
- let i = Mn(new Date(e.getFullYear(), e.getMonth(), e.getDate() + r));
4518
+ let i = Nn(new Date(e.getFullYear(), e.getMonth(), e.getDate() + r));
4414
4519
  t.has(i) || t.set(i, []), t.get(i).push(n);
4415
4520
  }
4416
4521
  }
4417
4522
  for (let e of t.values()) e.sort((e, t) => e.start - t.start);
4418
4523
  return t;
4419
4524
  }
4420
- function Rn({ events: e = [], source: t = "", titleField: n = "", startField: r = "", endField: o = "", hrefField: s = "", colorField: c = "", variant: p = "month", size: m = "medium", accent: h = "", eventBg: g = "", eventText: _ = "", borderColor: v = "", weekStart: y = "monday", max: b = 3, emptyText: x = "No events", style: S, nodeRef: C, interactive: w = !0 }) {
4421
- let { tenant: T, apiUrl: E, locale: D } = i(J), O = i(ve)?.[t], [k, A] = l(null), [j, M] = l(() => {
4525
+ function zn({ events: e = [], source: t = "", titleField: n = "", startField: r = "", endField: o = "", hrefField: s = "", colorField: c = "", variant: p = "month", size: m = "medium", accent: h = "", eventBg: g = "", eventText: _ = "", borderColor: v = "", weekStart: y = "monday", max: b = 3, emptyText: x = "No events", style: S, nodeRef: C, interactive: w = !0 }) {
4526
+ let { tenant: T, apiUrl: E, locale: D } = i(q), O = i(ye)?.[t], [k, A] = l(null), [j, M] = l(() => {
4422
4527
  let e = /* @__PURE__ */ new Date();
4423
4528
  return {
4424
4529
  year: e.getFullYear(),
@@ -4440,13 +4545,13 @@ function Rn({ events: e = [], source: t = "", titleField: n = "", startField: r
4440
4545
  E,
4441
4546
  O
4442
4547
  ]);
4443
- let N = jn[m] ?? jn.medium, F = h || "var(--page-accent, #4f46e5)", I = v || "var(--page-border, rgba(148, 163, 184, 0.35))", L = g || F, R = _ || "var(--page-accent-text, #ffffff)", z = t ? Fn(O ?? k ?? [], {
4548
+ let N = Mn[m] ?? Mn.medium, F = h || "var(--page-accent, #4f46e5)", I = v || "var(--page-border, rgba(148, 163, 184, 0.35))", L = g || F, R = _ || "var(--page-accent-text, #ffffff)", z = t ? In(O ?? k ?? [], {
4444
4549
  titleField: n,
4445
4550
  startField: r,
4446
4551
  endField: o,
4447
4552
  hrefField: s,
4448
4553
  colorField: c
4449
- }) : In(e), B = Ln(z), V = D || void 0, ee = (e, t) => {
4554
+ }) : Ln(e), B = Rn(z), V = D || void 0, ee = (e, t) => {
4450
4555
  let n = /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", { style: {
4451
4556
  width: 6,
4452
4557
  height: 6,
@@ -4508,7 +4613,7 @@ function Rn({ events: e = [], source: t = "", titleField: n = "", startField: r
4508
4613
  padding: "4px 8px"
4509
4614
  },
4510
4615
  children: t < 0 ? "‹" : "›"
4511
- }), ne = /* @__PURE__ */ f("div", {
4616
+ }), W = /* @__PURE__ */ f("div", {
4512
4617
  style: {
4513
4618
  display: "flex",
4514
4619
  alignItems: "center",
@@ -4542,7 +4647,7 @@ function Rn({ events: e = [], source: t = "", titleField: n = "", startField: r
4542
4647
  width: "100%",
4543
4648
  ...P(S)
4544
4649
  },
4545
- children: [ne, e.length ? /* @__PURE__ */ d("div", {
4650
+ children: [W, e.length ? /* @__PURE__ */ d("div", {
4546
4651
  style: {
4547
4652
  display: "flex",
4548
4653
  flexDirection: "column",
@@ -4578,10 +4683,10 @@ function Rn({ events: e = [], source: t = "", titleField: n = "", startField: r
4578
4683
  })]
4579
4684
  });
4580
4685
  }
4581
- let re = new Date(j.year, j.month, 1), ie = y === "sunday" ? 0 : 1, ae = (re.getDay() - ie + 7) % 7, oe = new Date(j.year, j.month + 1, 0).getDate(), se = Math.ceil((ae + oe) / 7), ce = Mn(/* @__PURE__ */ new Date()), le = new Intl.DateTimeFormat(V, { weekday: "short" }), W = [];
4582
- for (let e = 0; e < se * 7; e += 1) {
4583
- let t = e - ae + 1, n = t >= 1 && t <= oe, r = Mn(new Date(j.year, j.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === ce;
4584
- W.push(/* @__PURE__ */ f("div", {
4686
+ let ne = new Date(j.year, j.month, 1), re = y === "sunday" ? 0 : 1, ie = (ne.getDay() - re + 7) % 7, ae = new Date(j.year, j.month + 1, 0).getDate(), G = Math.ceil((ie + ae) / 7), oe = Nn(/* @__PURE__ */ new Date()), se = new Intl.DateTimeFormat(V, { weekday: "short" }), K = [];
4687
+ for (let e = 0; e < G * 7; e += 1) {
4688
+ let t = e - ie + 1, n = t >= 1 && t <= ae, r = Nn(new Date(j.year, j.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === oe;
4689
+ K.push(/* @__PURE__ */ f("div", {
4585
4690
  style: {
4586
4691
  minHeight: N.cell,
4587
4692
  borderTop: `1px solid ${I}`,
@@ -4624,7 +4729,7 @@ function Rn({ events: e = [], source: t = "", titleField: n = "", startField: r
4624
4729
  ...P(S)
4625
4730
  },
4626
4731
  children: [
4627
- ne,
4732
+ W,
4628
4733
  /* @__PURE__ */ f("div", {
4629
4734
  style: {
4630
4735
  display: "grid",
@@ -4638,20 +4743,20 @@ function Rn({ events: e = [], source: t = "", titleField: n = "", startField: r
4638
4743
  textAlign: "center",
4639
4744
  padding: `0 0 ${N.pad}px`
4640
4745
  },
4641
- children: le.format(new Date(2024, 0, 7 + ie + t))
4642
- }, `head-${t}`)), W]
4746
+ children: se.format(new Date(2024, 0, 7 + re + t))
4747
+ }, `head-${t}`)), K]
4643
4748
  }),
4644
4749
  /* @__PURE__ */ d("div", { style: { borderTop: `1px solid ${I}` } })
4645
4750
  ]
4646
4751
  });
4647
4752
  }
4648
- var zn = {
4753
+ var Bn = {
4649
4754
  small: 380,
4650
4755
  medium: 560,
4651
4756
  large: 820,
4652
4757
  full: "100%"
4653
4758
  };
4654
- function Bn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open", openOn: r = "trigger", delay: i = 0, size: o = "medium", title: s = "", showClose: u = !0, backdropClose: p = !0, position: m = "center", actions: h = [], showCloseAction: g = !1, closeLabel: _ = "Close", actionsAlign: v = "right", linked: y, style: b, nodeRef: x, inert: S = !1 }) {
4759
+ function Vn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open", openOn: r = "trigger", delay: i = 0, size: o = "medium", title: s = "", showClose: u = !0, backdropClose: p = !0, position: m = "center", actions: h = [], showCloseAction: g = !1, closeLabel: _ = "Close", actionsAlign: v = "right", linked: y, style: b, nodeRef: x, inert: S = !1 }) {
4655
4760
  let [C, w] = l(!1), T = c(null);
4656
4761
  a(() => {
4657
4762
  if (S || !e) return;
@@ -4676,7 +4781,7 @@ function Bn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
4676
4781
  document.removeEventListener("keydown", e), document.body.style.overflow = t;
4677
4782
  };
4678
4783
  }, [S, C]);
4679
- let E = zn[o] ?? zn.medium, D = (e) => {
4784
+ let E = Bn[o] ?? Bn.medium, D = (e) => {
4680
4785
  let t = {
4681
4786
  padding: "9px 16px",
4682
4787
  borderRadius: 6,
@@ -4845,21 +4950,21 @@ function Bn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
4845
4950
  })]
4846
4951
  });
4847
4952
  }
4848
- var Vn = {
4849
- PageRoot: Pe,
4850
- CalendarBlock: Rn,
4851
- DialogBlock: Bn,
4852
- Section: Fe,
4853
- Container: Ie,
4854
- Heading: Le,
4855
- TextBlock: Je,
4856
- ButtonBlock: Ze,
4857
- ImageBlock: Qe,
4858
- Spacer: it,
4859
- Divider: at,
4860
- SliderBlock: dt,
4861
- CanvasSlider: ft,
4862
- TabsBlock: Dt,
4953
+ var Hn = {
4954
+ PageRoot: Me,
4955
+ CalendarBlock: zn,
4956
+ DialogBlock: Vn,
4957
+ Section: Ne,
4958
+ Container: Pe,
4959
+ Heading: Fe,
4960
+ TextBlock: qe,
4961
+ ButtonBlock: Xe,
4962
+ ImageBlock: Ze,
4963
+ Spacer: rt,
4964
+ Divider: it,
4965
+ SliderBlock: ut,
4966
+ CanvasSlider: dt,
4967
+ TabsBlock: Et,
4863
4968
  QuickStack: Qt,
4864
4969
  CollectionList: $t,
4865
4970
  CollectionSearch: en,
@@ -4870,22 +4975,22 @@ var Vn = {
4870
4975
  ThemeModeBlock: cn,
4871
4976
  ScrollTopBlock: fn,
4872
4977
  OrgChartBlock: Tn,
4873
- TableBlock: An,
4874
- IconBlock: bt,
4875
- MapBlock: vt,
4876
- MasonryBlock: St,
4877
- AccordionBlock: Ot,
4878
- NavbarBlock: Et,
4879
- ListBlock: qe,
4880
- TextSpan: Be,
4881
- QuoteBlock: Ke,
4882
- TextLink: Xe,
4883
- RichTextBlock: We,
4884
- RichContentBlock: We,
4885
- VideoBlock: $e,
4886
- YouTubeBlock: tt,
4887
- IframeBlock: nt,
4888
- EmbedBlock: rt,
4978
+ TableBlock: jn,
4979
+ IconBlock: yt,
4980
+ MapBlock: _t,
4981
+ MasonryBlock: xt,
4982
+ AccordionBlock: Dt,
4983
+ NavbarBlock: Tt,
4984
+ ListBlock: Ke,
4985
+ TextSpan: ze,
4986
+ QuoteBlock: Ge,
4987
+ TextLink: Ye,
4988
+ RichTextBlock: Ue,
4989
+ RichContentBlock: Ue,
4990
+ VideoBlock: Qe,
4991
+ YouTubeBlock: et,
4992
+ IframeBlock: tt,
4993
+ EmbedBlock: nt,
4889
4994
  FormBlock: Bt,
4890
4995
  FormLabel: Gt,
4891
4996
  FormInput: Kt,
@@ -4902,27 +5007,27 @@ var Vn = {
4902
5007
  FormFile: Xt,
4903
5008
  FormRecaptcha: Wt,
4904
5009
  FormSubmit: Zt
4905
- }, Hn = {
5010
+ }, Un = {
4906
5011
  id: "auth",
4907
5012
  label: "Accounts",
4908
5013
  category: "Apps",
4909
5014
  keys: ["SiteLoginForm", "SiteAccountMenu"],
4910
5015
  ssr: "shell",
4911
5016
  settings: ["site.authRedirect"]
4912
- }, Un = n({
5017
+ }, Wn = n({
4913
5018
  user: null,
4914
5019
  status: "idle",
4915
5020
  ensure: () => {},
4916
5021
  refresh: () => {},
4917
5022
  signOut: () => {}
4918
- }), Wn = () => {
4919
- let e = i(Un);
5023
+ }), Gn = () => {
5024
+ let e = i(Wn);
4920
5025
  return a(() => {
4921
5026
  e.ensure();
4922
5027
  }, [e]), e;
4923
5028
  };
4924
- function Gn({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u }) {
4925
- let f = i(J), p = o || f?.apiUrl || "/api", m = u || f?.tenant || "", [h, g] = l(t ?? null), [_, v] = l(t ? "user" : n ? "guest" : "idle"), y = c(!1), b = r((e, t) => fetch(`${p}${e}`, {
5029
+ function Kn({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u }) {
5030
+ let f = i(q), p = o || f?.apiUrl || "/api", m = u || f?.tenant || "", [h, g] = l(t ?? null), [_, v] = l(t ? "user" : n ? "guest" : "idle"), y = c(!1), b = r((e, t) => fetch(`${p}${e}`, {
4926
5031
  ...t,
4927
5032
  credentials: "include",
4928
5033
  headers: {
@@ -4972,19 +5077,19 @@ function Gn({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
4972
5077
  t,
4973
5078
  x,
4974
5079
  S
4975
- ]), /* @__PURE__ */ d(Un.Provider, {
5080
+ ]), /* @__PURE__ */ d(Wn.Provider, {
4976
5081
  value: w,
4977
5082
  children: e
4978
5083
  });
4979
5084
  }
4980
- function Kn({ when: e, children: t }) {
4981
- let { status: n } = Wn();
5085
+ function qn({ when: e, children: t }) {
5086
+ let { status: n } = Gn();
4982
5087
  return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
4983
5088
  }
4984
5089
  //#endregion
4985
5090
  //#region ../ui/src/components/builder/apps/auth/views.jsx
4986
- function qn({ 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 }) {
4987
- let { tenant: h, apiUrl: g, settings: _ } = i(J), [v, y] = l("form"), [b, x] = l(""), [S, C] = l(!1), w = e === "register", T = u ? m || "form" : v, E = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", D = async (e) => {
5091
+ function Jn({ 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 }) {
5092
+ let { tenant: h, apiUrl: g, settings: _ } = i(q), [v, y] = l("form"), [b, x] = l(""), [S, C] = l(!1), w = e === "register", T = u ? m || "form" : v, E = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", D = async (e) => {
4988
5093
  if (e.preventDefault(), u) return;
4989
5094
  let n = new FormData(e.currentTarget);
4990
5095
  C(!0), x("");
@@ -5032,20 +5137,20 @@ function qn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
5032
5137
  children: [
5033
5138
  w ? /* @__PURE__ */ f("label", {
5034
5139
  style: {
5035
- ...At,
5140
+ ...kt,
5036
5141
  display: "grid",
5037
5142
  gap: 6
5038
5143
  },
5039
5144
  children: [a, /* @__PURE__ */ d("input", {
5040
5145
  name: "name",
5041
5146
  type: "text",
5042
- style: jt,
5043
- ...$(u)
5147
+ style: At,
5148
+ ...Mt(u)
5044
5149
  })]
5045
5150
  }) : null,
5046
5151
  /* @__PURE__ */ f("label", {
5047
5152
  style: {
5048
- ...At,
5153
+ ...kt,
5049
5154
  display: "grid",
5050
5155
  gap: 6
5051
5156
  },
@@ -5053,13 +5158,13 @@ function qn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
5053
5158
  name: "email",
5054
5159
  type: "email",
5055
5160
  required: !u,
5056
- style: jt,
5057
- ...$(u)
5161
+ style: At,
5162
+ ...Mt(u)
5058
5163
  })]
5059
5164
  }),
5060
5165
  /* @__PURE__ */ f("label", {
5061
5166
  style: {
5062
- ...At,
5167
+ ...kt,
5063
5168
  display: "grid",
5064
5169
  gap: 6
5065
5170
  },
@@ -5067,15 +5172,15 @@ function qn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
5067
5172
  name: "password",
5068
5173
  type: "password",
5069
5174
  required: !u,
5070
- style: jt,
5071
- ...$(u)
5175
+ style: At,
5176
+ ...Mt(u)
5072
5177
  })]
5073
5178
  }),
5074
5179
  /* @__PURE__ */ d("button", {
5075
5180
  type: u ? "button" : "submit",
5076
5181
  disabled: S || void 0,
5077
5182
  style: {
5078
- ...ke,
5183
+ ...De,
5079
5184
  border: 0,
5080
5185
  padding: "10px 22px",
5081
5186
  borderRadius: 8,
@@ -5107,8 +5212,8 @@ function qn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
5107
5212
  ]
5108
5213
  });
5109
5214
  }
5110
- function Jn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
5111
- let { user: c, status: l, signOut: u } = Wn(), p = a ? s || "user" : l, m = a ? {
5215
+ function Yn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
5216
+ let { user: c, status: l, signOut: u } = Gn(), p = a ? s || "user" : l, m = a ? {
5112
5217
  name: "Ada Lovelace",
5113
5218
  email: "ada@example.com"
5114
5219
  } : c;
@@ -5129,7 +5234,7 @@ function Jn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
5129
5234
  children: [
5130
5235
  /* @__PURE__ */ f("span", {
5131
5236
  style: {
5132
- ...At,
5237
+ ...kt,
5133
5238
  fontWeight: 600
5134
5239
  },
5135
5240
  children: [
@@ -5140,7 +5245,7 @@ function Jn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
5140
5245
  }),
5141
5246
  n && m?.email ? /* @__PURE__ */ d("span", {
5142
5247
  style: {
5143
- ...At,
5248
+ ...kt,
5144
5249
  opacity: .7
5145
5250
  },
5146
5251
  children: m.email
@@ -5149,14 +5254,14 @@ function Jn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
5149
5254
  type: "button",
5150
5255
  onClick: a ? void 0 : u,
5151
5256
  style: {
5152
- ...ke,
5257
+ ...De,
5153
5258
  border: 0,
5154
5259
  padding: "8px 16px",
5155
5260
  borderRadius: 8,
5156
5261
  fontSize: 14,
5157
5262
  cursor: a ? "default" : "pointer"
5158
5263
  },
5159
- ...$(a),
5264
+ ...Mt(a),
5160
5265
  children: t
5161
5266
  })
5162
5267
  ]
@@ -5173,40 +5278,40 @@ function Jn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
5173
5278
  }
5174
5279
  //#endregion
5175
5280
  //#region ../ui/src/components/builder/apps/consent/manifest.js
5176
- var Yn = {
5281
+ var Xn = {
5177
5282
  id: "consent",
5178
5283
  label: "Cookie consent",
5179
5284
  category: "Apps",
5180
5285
  keys: ["CookieConsent"],
5181
5286
  ssr: "shell",
5182
5287
  settings: []
5183
- }, Xn = "webim.cookie_consent";
5184
- function Zn() {
5288
+ }, Zn = "webim.cookie_consent";
5289
+ function Qn() {
5185
5290
  try {
5186
- let e = window.localStorage.getItem(Xn), t = e ? JSON.parse(e) : null;
5291
+ let e = window.localStorage.getItem(Zn), t = e ? JSON.parse(e) : null;
5187
5292
  return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
5188
5293
  } catch {
5189
5294
  return "";
5190
5295
  }
5191
5296
  }
5192
- function Qn(e) {
5297
+ function $n(e) {
5193
5298
  try {
5194
5299
  document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
5195
5300
  } catch {}
5196
5301
  }
5197
- function $n(e) {
5302
+ function er(e) {
5198
5303
  try {
5199
- window.localStorage.setItem(Xn, JSON.stringify({
5304
+ window.localStorage.setItem(Zn, JSON.stringify({
5200
5305
  choice: e,
5201
5306
  at: (/* @__PURE__ */ new Date()).toISOString()
5202
5307
  }));
5203
5308
  } catch {}
5204
- Qn(e);
5309
+ $n(e);
5205
5310
  try {
5206
5311
  window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
5207
5312
  } catch {}
5208
5313
  }
5209
- var er = {
5314
+ var tr = {
5210
5315
  bottom: {
5211
5316
  left: 0,
5212
5317
  right: 0,
@@ -5228,18 +5333,18 @@ var er = {
5228
5333
  maxWidth: 400
5229
5334
  }
5230
5335
  };
5231
- function tr({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: i, linkHref: o, position: s, linked: c, style: p, nodeRef: m, inert: h }) {
5336
+ function nr({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: i, linkHref: o, position: s, linked: c, style: p, nodeRef: m, inert: h }) {
5232
5337
  let [g, _] = l(!!h), [v, y] = l(null), b = (e) => {
5233
5338
  y(e), typeof m == "function" && m(e);
5234
5339
  };
5235
5340
  if (a(() => {
5236
5341
  if (h) return;
5237
- let e = Zn();
5238
- e ? Qn(e) : _(!0);
5342
+ let e = Qn();
5343
+ e ? $n(e) : _(!0);
5239
5344
  }, [h, v]), !g) return null;
5240
5345
  let x = (e) => () => {
5241
- h || ($n(e), _(!1));
5242
- }, S = er[s] ?? er.bottom, C = {
5346
+ h || (er(e), _(!1));
5347
+ }, S = tr[s] ?? tr.bottom, C = {
5243
5348
  appearance: "none",
5244
5349
  font: "inherit",
5245
5350
  fontSize: 14,
@@ -5319,37 +5424,37 @@ function tr({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLab
5319
5424
  }
5320
5425
  //#endregion
5321
5426
  //#region ../ui/src/components/builder/apps/language/manifest.js
5322
- var nr = {
5427
+ var rr = {
5323
5428
  id: "language",
5324
5429
  label: "Language",
5325
5430
  category: "Apps",
5326
5431
  keys: ["SiteLanguagePicker"],
5327
5432
  ssr: "prefetch",
5328
5433
  settings: ["locales"]
5329
- }, rr = {
5434
+ }, ir = {
5330
5435
  id: "search",
5331
5436
  label: "Search",
5332
5437
  category: "Apps",
5333
5438
  keys: ["SiteSearch"],
5334
5439
  ssr: "prefetch",
5335
5440
  settings: []
5336
- }, ir = 50, ar = 2e3;
5337
- function or() {
5441
+ }, ar = 50, or = 2e3;
5442
+ function sr() {
5338
5443
  return typeof window > "u" ? "" : new URLSearchParams(window.location.search).get("q") ?? "";
5339
5444
  }
5340
- function sr(e, t) {
5445
+ function cr(e, t) {
5341
5446
  let n = e?.data ?? {}, r = [];
5342
5447
  for (let e of Object.values(n)) {
5343
5448
  let t = e == null ? "" : Y(e);
5344
- if (t && r.push(t), r.join(" ").length > ar) break;
5449
+ if (t && r.push(t), r.join(" ").length > or) break;
5345
5450
  }
5346
- return r.join(" ").slice(0, ar).toLocaleLowerCase(t || void 0);
5451
+ return r.join(" ").slice(0, or).toLocaleLowerCase(t || void 0);
5347
5452
  }
5348
- function cr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButton: n = !0, live: r = !1, layout: o = "inline", includePages: s = !0, collections: u = [], limit: p = 10, emptyText: m = "Nothing found", hint: h = "", style: g, nodeRef: _, inert: v = !1, sample: y = !1 }) {
5349
- let { tenant: b, apiUrl: x, locale: S } = i(J), [C, w] = l(() => or()), [T, E] = l(() => or()), [D, O] = l(null), [k, A] = l(!1), j = c(null), M = o === "popup";
5453
+ function lr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButton: n = !0, live: r = !1, layout: o = "inline", includePages: s = !0, collections: u = [], limit: p = 10, emptyText: m = "Nothing found", hint: h = "", style: g, nodeRef: _, inert: v = !1, sample: y = !1 }) {
5454
+ let { tenant: b, apiUrl: x, locale: S } = i(q), [C, w] = l(() => sr()), [T, E] = l(() => sr()), [D, O] = l(null), [k, A] = l(!1), j = c(null), M = o === "popup";
5350
5455
  a(() => {
5351
5456
  let e = () => {
5352
- let e = or();
5457
+ let e = sr();
5353
5458
  w(e), E(e);
5354
5459
  };
5355
5460
  return window.addEventListener("popstate", e), window.addEventListener("webim:urlchange", e), () => {
@@ -5400,7 +5505,7 @@ function cr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
5400
5505
  });
5401
5506
  }
5402
5507
  else for (let t of e.rows) {
5403
- if (!sr(t, S).includes(N)) continue;
5508
+ if (!cr(t, S).includes(N)) continue;
5404
5509
  let n = t?.data ?? {}, r = Y(n.name) || "Untitled", i = Y(n.slug);
5405
5510
  F.push({
5406
5511
  key: `entry:${t.id}`,
@@ -5409,7 +5514,7 @@ function cr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
5409
5514
  kind: "entry"
5410
5515
  });
5411
5516
  }
5412
- let I = F.slice(0, Math.min(Math.max(1, p), ir)), L = (e) => {
5517
+ let I = F.slice(0, Math.min(Math.max(1, p), ar)), L = (e) => {
5413
5518
  if (v) {
5414
5519
  e.preventDefault(), w(T), A(!0);
5415
5520
  return;
@@ -5491,7 +5596,7 @@ function cr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
5491
5596
  onChange: (e) => E(e.target.value),
5492
5597
  onFocus: () => N && A(!0),
5493
5598
  style: {
5494
- ...jt,
5599
+ ...At,
5495
5600
  flexGrow: 1,
5496
5601
  minWidth: 0
5497
5602
  }
@@ -5549,21 +5654,21 @@ function cr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
5549
5654
  }
5550
5655
  //#endregion
5551
5656
  //#region ../ui/src/components/builder/apps/language/views.jsx
5552
- function lr(e) {
5657
+ function ur(e) {
5553
5658
  let t = e?.locales, n = [typeof t?.default == "string" && t.default.trim() ? t.default.trim() : "", ...Array.isArray(t?.enabled) ? t.enabled : []].filter((e) => typeof e == "string" && e.trim());
5554
5659
  return [...new Set(n.map((e) => e.trim()))];
5555
5660
  }
5556
- var ur = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
5557
- function dr(e, t) {
5661
+ var dr = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
5662
+ function fr(e, t) {
5558
5663
  let n = String(e ?? "").toUpperCase();
5559
5664
  if (t === "code") return n;
5560
5665
  let r = "";
5561
5666
  try {
5562
- r = ur(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
5667
+ r = dr(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
5563
5668
  } catch {}
5564
5669
  return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
5565
5670
  }
5566
- function fr(e, t) {
5671
+ function pr(e, t) {
5567
5672
  let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
5568
5673
  if (typeof window > "u") return n || "?";
5569
5674
  try {
@@ -5573,8 +5678,8 @@ function fr(e, t) {
5573
5678
  return n || "/";
5574
5679
  }
5575
5680
  }
5576
- function pr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef: o, inert: s }) {
5577
- let c = i(J), l = lr(c?.settings), u = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : u, m = {
5681
+ function mr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef: o, inert: s }) {
5682
+ let c = i(q), l = ur(c?.settings), u = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : u, m = {
5578
5683
  display: "inline-flex",
5579
5684
  alignItems: "center",
5580
5685
  gap: 8,
@@ -5609,7 +5714,7 @@ function pr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
5609
5714
  style: { opacity: .4 },
5610
5715
  children: n ?? "·"
5611
5716
  }), /* @__PURE__ */ d("a", {
5612
- href: fr(e, e === u),
5717
+ href: pr(e, e === u),
5613
5718
  hrefLang: e,
5614
5719
  "aria-current": e === p ? "true" : void 0,
5615
5720
  onClick: s ? (e) => e.preventDefault() : void 0,
@@ -5619,7 +5724,7 @@ function pr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
5619
5724
  textDecoration: "none",
5620
5725
  cursor: s ? "default" : "pointer"
5621
5726
  },
5622
- children: dr(e, t)
5727
+ children: fr(e, t)
5623
5728
  })]
5624
5729
  }, e))]
5625
5730
  }) : /* @__PURE__ */ f("div", {
@@ -5630,7 +5735,7 @@ function pr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
5630
5735
  value: p,
5631
5736
  onChange: s ? void 0 : (e) => {
5632
5737
  let t = e.target.value;
5633
- window.location.assign(fr(t, t === u));
5738
+ window.location.assign(pr(t, t === u));
5634
5739
  },
5635
5740
  onKeyDown: s ? (e) => e.preventDefault() : void 0,
5636
5741
  style: {
@@ -5644,57 +5749,57 @@ function pr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
5644
5749
  },
5645
5750
  children: l.map((e) => /* @__PURE__ */ d("option", {
5646
5751
  value: e,
5647
- children: dr(e, t)
5752
+ children: fr(e, t)
5648
5753
  }, e))
5649
5754
  })]
5650
5755
  });
5651
5756
  }
5652
5757
  //#endregion
5653
5758
  //#region ../ui/src/components/builder/apps/index.js
5654
- var mr = [
5655
- Hn,
5656
- nr,
5657
- Yn,
5658
- rr
5659
- ], hr = {
5660
- SiteLoginForm: qn,
5661
- SiteAccountMenu: Jn,
5662
- SiteLanguagePicker: pr,
5663
- CookieConsent: tr,
5664
- SiteSearch: cr
5759
+ var hr = [
5760
+ Un,
5761
+ rr,
5762
+ Xn,
5763
+ ir
5764
+ ], gr = {
5765
+ SiteLoginForm: Jn,
5766
+ SiteAccountMenu: Yn,
5767
+ SiteLanguagePicker: mr,
5768
+ CookieConsent: nr,
5769
+ SiteSearch: lr
5665
5770
  };
5666
- new Set(mr.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
5771
+ new Set(hr.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
5667
5772
  //#endregion
5668
5773
  //#region ../ui/src/components/builder/plugins/runtime.js
5669
- var gr = /* @__PURE__ */ new Map();
5670
- function _r(e) {
5671
- if (gr.has(e)) return gr.get(e);
5774
+ var _r = /* @__PURE__ */ new Map();
5775
+ function vr(e) {
5776
+ if (_r.has(e)) return _r.get(e);
5672
5777
  let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
5673
5778
  /* @vite-ignore */
5674
5779
  /* webpackIgnore: true */
5675
5780
  t
5676
5781
  ).finally(() => URL.revokeObjectURL(t));
5677
- return gr.set(e, n), n;
5782
+ return _r.set(e, n), n;
5678
5783
  }
5679
- function vr(e) {
5784
+ function yr(e) {
5680
5785
  let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
5681
5786
  return n && typeof n == "object" ? n : {};
5682
5787
  }
5683
5788
  //#endregion
5684
5789
  //#region ../ui/src/components/builder/plugins/view.jsx
5685
- async function yr(e, t) {
5686
- let n = await _r(e);
5790
+ async function br(e, t) {
5791
+ let n = await vr(e);
5687
5792
  return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
5688
5793
  }
5689
- var br = {
5794
+ var xr = {
5690
5795
  padding: "10px 12px",
5691
5796
  border: "1px dashed rgba(148, 163, 184, 0.5)",
5692
5797
  borderRadius: 8,
5693
5798
  fontSize: 12,
5694
5799
  opacity: .6
5695
5800
  };
5696
- function xr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
5697
- let s = i(J), l = vr(s?.settings)[e], u = c(null), p = c(null), m = {
5801
+ function Sr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
5802
+ let s = i(q), l = yr(s?.settings)[e], u = c(null), p = c(null), m = {
5698
5803
  tenant: s?.tenant ?? "",
5699
5804
  apiUrl: s?.apiUrl ?? "/api",
5700
5805
  locale: s?.locale ?? "",
@@ -5706,7 +5811,7 @@ function xr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
5706
5811
  let e = u.current;
5707
5812
  if (!l?.code || !e) return;
5708
5813
  let n = !0;
5709
- return yr(l.code, t).then((e) => {
5814
+ return br(l.code, t).then((e) => {
5710
5815
  if (!(!n || !e || !u.current)) {
5711
5816
  p.current = e;
5712
5817
  try {
@@ -5736,7 +5841,7 @@ function xr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
5736
5841
  }) : /* @__PURE__ */ f("div", {
5737
5842
  ref: o,
5738
5843
  style: {
5739
- ...br,
5844
+ ...xr,
5740
5845
  ...P(r)
5741
5846
  },
5742
5847
  children: [
@@ -5748,12 +5853,12 @@ function xr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
5748
5853
  }
5749
5854
  //#endregion
5750
5855
  //#region ../ui/src/components/builder/render.jsx
5751
- var Sr = {
5752
- ...Vn,
5753
- ...hr,
5754
- PluginBlock: xr
5856
+ var Cr = {
5857
+ ...Hn,
5858
+ ...gr,
5859
+ PluginBlock: Sr
5755
5860
  };
5756
- function Cr(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
5861
+ function wr(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
5757
5862
  let o = n[e];
5758
5863
  if (!o || o.hidden) return null;
5759
5864
  let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
@@ -5761,11 +5866,11 @@ function Cr(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
5761
5866
  let n = o.props?.componentId, s = r?.[n];
5762
5867
  if (!s?.template || i.has(n)) return null;
5763
5868
  let c = new Set(i).add(n);
5764
- return /* @__PURE__ */ d(t, { children: Cr(s.template.rootId, s.template.nodes, r, c, a) }, e);
5869
+ return /* @__PURE__ */ d(t, { children: wr(s.template.rootId, s.template.nodes, r, c, a) }, e);
5765
5870
  }
5766
- let l = Sr[s];
5871
+ let l = Cr[s];
5767
5872
  if (!l) return null;
5768
- let u = (o.nodes ?? []).map((e) => Cr(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, Cr(t, n, r, i, a)])) : void 0, m = /* @__PURE__ */ d(l, {
5873
+ let u = (o.nodes ?? []).map((e) => wr(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, wr(t, n, r, i, a)])) : void 0, m = /* @__PURE__ */ d(l, {
5769
5874
  ...c,
5770
5875
  ...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
5771
5876
  linked: p,
@@ -5774,16 +5879,16 @@ function Cr(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
5774
5879
  },
5775
5880
  children: u.length ? u : void 0
5776
5881
  }, e);
5777
- return c.when && c.when !== "always" ? /* @__PURE__ */ d(Kn, {
5882
+ return c.when && c.when !== "always" ? /* @__PURE__ */ d(qn, {
5778
5883
  when: c.when,
5779
5884
  children: m
5780
5885
  }, e) : m;
5781
5886
  }
5782
5887
  //#endregion
5783
5888
  //#region ../ui/src/components/builder/PageRenderer.jsx
5784
- var wr = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Tr = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(pe(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
5785
- .webim-page[data-webim-mode="dark"] { ${Object.entries(pe(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
5786
- function Er({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, custom: o, animations: c, tenant: l, apiUrl: u, datasets: p, locale: m, direction: g, settings: _, siteUser: v }) {
5889
+ var Tr = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Er = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(me(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
5890
+ .webim-page[data-webim-mode="dark"] { ${Object.entries(me(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
5891
+ function Dr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, custom: o, animations: c, tenant: l, apiUrl: u, datasets: p, locale: m, direction: g, settings: _, siteUser: v }) {
5787
5892
  let y = o?.js?.trim();
5788
5893
  if (a(() => {
5789
5894
  if (!y) return;
@@ -5797,35 +5902,35 @@ function Er({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
5797
5902
  minHeight: "100%",
5798
5903
  display: "flex",
5799
5904
  flexDirection: "column"
5800
- }, w = Cr("ROOT", e, n), T = s(() => ({ render: (t, r) => Cr(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = le(e, n), O = ce(e, n), k = o?.css?.trim(), j = S(c), M = fe(t), N = [M.font, M.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !K[e]), P = [.../* @__PURE__ */ new Set([...A(e, n), ...N])].map((e) => /* @__PURE__ */ d("link", {
5905
+ }, w = wr("ROOT", e, n), T = s(() => ({ render: (t, r) => wr(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = se(e, n), O = oe(e, n), k = o?.css?.trim(), j = S(c), M = pe(t), N = [M.font, M.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !ue[e]), P = [.../* @__PURE__ */ new Set([...A(e, n), ...N])].map((e) => /* @__PURE__ */ d("link", {
5801
5906
  rel: "stylesheet",
5802
5907
  precedence: "default",
5803
5908
  href: D(e)
5804
- }, e)), F = Tr(M);
5805
- return r === "auto" ? /* @__PURE__ */ d(J.Provider, {
5909
+ }, e)), F = Er(M);
5910
+ return r === "auto" ? /* @__PURE__ */ d(q.Provider, {
5806
5911
  value: {
5807
5912
  tenant: l || "",
5808
5913
  apiUrl: u || "/api",
5809
5914
  locale: m || "",
5810
5915
  settings: _ ?? null
5811
5916
  },
5812
- children: /* @__PURE__ */ d(Gn, {
5917
+ children: /* @__PURE__ */ d(Kn, {
5813
5918
  initialUser: v,
5814
- children: /* @__PURE__ */ d(ve.Provider, {
5919
+ children: /* @__PURE__ */ d(ye.Provider, {
5815
5920
  value: p ?? null,
5816
- children: /* @__PURE__ */ d(Se.Provider, {
5921
+ children: /* @__PURE__ */ d(Ce.Provider, {
5817
5922
  value: T,
5818
5923
  children: /* @__PURE__ */ f("div", {
5819
5924
  ...b,
5820
5925
  className: "webim-page",
5821
5926
  style: {
5822
5927
  ...C,
5823
- ...me(t),
5928
+ ...he(t),
5824
5929
  ...i
5825
5930
  },
5826
5931
  children: [
5827
- /* @__PURE__ */ d("style", { children: `.webim-page { ${wr(pe(M.light))} }
5828
- @media (prefers-color-scheme: dark) { .webim-page { ${wr(pe(M.dark))} } }` }),
5932
+ /* @__PURE__ */ d("style", { children: `.webim-page { ${Tr(me(M.light))} }
5933
+ @media (prefers-color-scheme: dark) { .webim-page { ${Tr(me(M.dark))} } }` }),
5829
5934
  /* @__PURE__ */ d("style", { children: F }),
5830
5935
  P,
5831
5936
  /* @__PURE__ */ d("style", { children: x }),
@@ -5838,25 +5943,25 @@ function Er({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
5838
5943
  })
5839
5944
  })
5840
5945
  })
5841
- }) : /* @__PURE__ */ d(J.Provider, {
5946
+ }) : /* @__PURE__ */ d(q.Provider, {
5842
5947
  value: {
5843
5948
  tenant: l || "",
5844
5949
  apiUrl: u || "/api",
5845
5950
  locale: m || "",
5846
5951
  settings: _ ?? null
5847
5952
  },
5848
- children: /* @__PURE__ */ d(Gn, {
5953
+ children: /* @__PURE__ */ d(Kn, {
5849
5954
  initialUser: v,
5850
- children: /* @__PURE__ */ d(ve.Provider, {
5955
+ children: /* @__PURE__ */ d(ye.Provider, {
5851
5956
  value: p ?? null,
5852
- children: /* @__PURE__ */ d(Se.Provider, {
5957
+ children: /* @__PURE__ */ d(Ce.Provider, {
5853
5958
  value: T,
5854
5959
  children: /* @__PURE__ */ f("div", {
5855
5960
  ...b,
5856
5961
  className: "webim-page",
5857
5962
  style: {
5858
5963
  ...C,
5859
- ...he(t, r),
5964
+ ...ge(t, r),
5860
5965
  ...i
5861
5966
  },
5862
5967
  children: [
@@ -5878,8 +5983,8 @@ function Er({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
5878
5983
  }
5879
5984
  //#endregion
5880
5985
  //#region src/WebimContent.jsx
5881
- function Dr({ bundle: e, mode: t = "auto", style: n }) {
5882
- return e?.blocks?.ROOT ? /* @__PURE__ */ d(Er, {
5986
+ function Or({ bundle: e, mode: t = "auto", style: n }) {
5987
+ return e?.blocks?.ROOT ? /* @__PURE__ */ d(Dr, {
5883
5988
  blocks: e.blocks,
5884
5989
  theme: e.theme,
5885
5990
  components: e.components,
@@ -5891,13 +5996,13 @@ function Dr({ bundle: e, mode: t = "auto", style: n }) {
5891
5996
  locale: e.locale,
5892
5997
  direction: e.direction,
5893
5998
  settings: e.settings,
5894
- mode: _e(t, e.scheme),
5999
+ mode: ve(t, e.scheme),
5895
6000
  style: n
5896
6001
  }) : null;
5897
6002
  }
5898
6003
  //#endregion
5899
6004
  //#region src/bundle.js
5900
- function Or({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
6005
+ function kr({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
5901
6006
  let a = {
5902
6007
  ...t?.global ?? {},
5903
6008
  ...t?.tenant ?? {}
@@ -5907,7 +6012,7 @@ function Or({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
5907
6012
  title: e.title,
5908
6013
  slug: e.slug,
5909
6014
  blocks: i && o.i18n?.[i]?.blocks || e.blocks,
5910
- theme: ge(o, a.builder_themes?.themes),
6015
+ theme: _e(o, a.builder_themes?.themes),
5911
6016
  components: a.builder_components?.components ?? {},
5912
6017
  custom: o.custom,
5913
6018
  animations: o.animations,
@@ -5923,18 +6028,18 @@ function Or({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
5923
6028
  }
5924
6029
  //#endregion
5925
6030
  //#region src/fetchPage.js
5926
- var kr = async (e) => {
6031
+ var Ar = async (e) => {
5927
6032
  let t = await e.json().catch(() => null);
5928
6033
  if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
5929
6034
  return t?.payload ?? t;
5930
6035
  };
5931
- async function Ar({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
6036
+ async function jr({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
5932
6037
  if (!e) throw Error("fetchPage: apiUrl is required");
5933
6038
  if (!n) throw Error("fetchPage: slug is required");
5934
6039
  let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
5935
6040
  ...t ? { "x-tenant": t } : {},
5936
6041
  ...a ? { authorization: `Bearer ${a}` } : {}
5937
- }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(kr), c(`${l}/settings/public`, { headers: u }).then(kr)]), p = Or({
6042
+ }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(Ar), c(`${l}/settings/public`, { headers: u }).then(Ar)]), p = kr({
5938
6043
  page: d,
5939
6044
  settings: f,
5940
6045
  tenant: t,
@@ -5948,7 +6053,7 @@ async function Ar({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
5948
6053
  "MasonryBlock"
5949
6054
  ].includes(e?.type?.resolvedName) ? e.props?.source : null).filter(Boolean))];
5950
6055
  if (m.length) {
5951
- 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(kr).then((e) => {
6056
+ 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(Ar).then((e) => {
5952
6057
  let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
5953
6058
  return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
5954
6059
  }).catch(() => [[t, []]])));
@@ -5962,40 +6067,40 @@ async function Ar({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
5962
6067
  }
5963
6068
  //#endregion
5964
6069
  //#region src/ssr.jsx
5965
- var jr = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
6070
+ var Mr = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
5966
6071
  "&": "&amp;",
5967
6072
  "<": "&lt;",
5968
6073
  ">": "&gt;",
5969
6074
  "\"": "&quot;"
5970
6075
  })[e]);
5971
- function Mr(t, { mode: n = "auto", style: r } = {}) {
5972
- return e(/* @__PURE__ */ d(Dr, {
6076
+ function Nr(t, { mode: n = "auto", style: r } = {}) {
6077
+ return e(/* @__PURE__ */ d(Or, {
5973
6078
  bundle: t,
5974
6079
  mode: n,
5975
6080
  style: r
5976
6081
  }));
5977
6082
  }
5978
- function Nr(e, { mode: t = "auto", lang: n } = {}) {
6083
+ function Pr(e, { mode: t = "auto", lang: n } = {}) {
5979
6084
  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 = [
5980
6085
  "<meta charset=\"utf-8\"/>",
5981
6086
  "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
5982
- `<title>${jr(o)}</title>`,
5983
- r.description && `<meta name="description" content="${jr(r.description)}"/>`,
5984
- `<meta property="og:title" content="${jr(o)}"/>`,
5985
- r.image && `<meta property="og:image" content="${jr(r.image)}"/>`,
6087
+ `<title>${Mr(o)}</title>`,
6088
+ r.description && `<meta name="description" content="${Mr(r.description)}"/>`,
6089
+ `<meta property="og:title" content="${Mr(o)}"/>`,
6090
+ r.image && `<meta property="og:image" content="${Mr(r.image)}"/>`,
5986
6091
  r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
5987
6092
  "<style>html,body{margin:0;height:100%}</style>"
5988
6093
  ].filter(Boolean).join("\n");
5989
6094
  return `<!doctype html>
5990
- <html lang="${jr(i)}"${a ? ` dir="${a}"` : ""}>
6095
+ <html lang="${Mr(i)}"${a ? ` dir="${a}"` : ""}>
5991
6096
  <head>
5992
6097
  ${c}
5993
6098
  </head>
5994
6099
  <body>
5995
- ${Mr(e, { mode: t })}
6100
+ ${Nr(e, { mode: t })}
5996
6101
  ${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
5997
6102
  </body>
5998
6103
  </html>`;
5999
6104
  }
6000
6105
  //#endregion
6001
- export { Or as assembleBundle, Ar as fetchPage, Mr as renderBundleHtml, Nr as renderPageDocument };
6106
+ export { kr as assembleBundle, jr as fetchPage, Nr as renderBundleHtml, Pr as renderPageDocument };