webim-adapter 1.1.0 → 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.
@@ -252,32 +252,32 @@ function A(e) {
252
252
  delete t.filters, delete t.backdropFilters, delete t.filterBlur, delete t.filterGrayscale, delete t.filterBrightness, delete t.filterContrast, delete t.filterSaturate;
253
253
  let U = F(I);
254
254
  R !== void 0 && U.push(`blur(${O(R)})`), z !== void 0 && U.push(`grayscale(${z}%)`), B !== void 0 && U.push(`brightness(${B}%)`), V !== void 0 && U.push(`contrast(${V}%)`), H !== void 0 && U.push(`saturate(${H}%)`), U.length && (t.filter = U.join(" "));
255
- let W = F(L);
256
- W.length && (t.backdropFilter = W.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
257
- let { textStrokeWidth: ee, textStrokeColor: te } = t;
258
- delete t.textStrokeWidth, delete t.textStrokeColor, (ee !== void 0 || te !== void 0) && (t.WebkitTextStroke = `${O(ee ?? 1)} ${te || "currentColor"}`);
255
+ let ee = F(L);
256
+ ee.length && (t.backdropFilter = ee.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
257
+ let { textStrokeWidth: W, textStrokeColor: te } = t;
258
+ delete t.textStrokeWidth, delete t.textStrokeColor, (W !== void 0 || te !== void 0) && (t.WebkitTextStroke = `${O(W ?? 1)} ${te || "currentColor"}`);
259
259
  let { clipText: ne } = t;
260
260
  delete t.clipText, ne && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
261
- let { transitions: re, transitionDuration: ie, transitionEasing: G, transitionProperty: ae } = t, oe = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
261
+ let { transitions: re, transitionDuration: ie, transitionEasing: ae, transitionProperty: G } = t, oe = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
262
262
  delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
263
- let K = (Array.isArray(re) ? re : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${oe(e.duration ?? 200)} ${e.easing || "ease"}`);
264
- if (ie !== void 0 && K.push(`${ae || "all"} ${oe(ie)} ${G || "ease"}`), K.length && (t.transition = K.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
263
+ let se = (Array.isArray(re) ? re : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${oe(e.duration ?? 200)} ${e.easing || "ease"}`);
264
+ 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) {
265
265
  let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
266
266
  t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
267
267
  }
268
268
  delete t.backgroundVideo;
269
- let { overlayColor: se, overlayOpacity: ce } = t;
270
- if (delete t.overlayColor, delete t.overlayOpacity, se) {
271
- let e = `color-mix(in srgb, ${se} ${ce ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
269
+ let { overlayColor: ce, overlayOpacity: le } = t;
270
+ if (delete t.overlayColor, delete t.overlayOpacity, ce) {
271
+ let e = `color-mix(in srgb, ${ce} ${le ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
272
272
  t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
273
273
  }
274
274
  t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
275
- let { backgroundLayers: le } = t;
275
+ let { backgroundLayers: ue } = t;
276
276
  delete t.backgroundLayers;
277
- let ue = (Array.isArray(le) ? le : []).filter((e) => e && e.on !== !1);
278
- if (ue.length) {
277
+ let K = (Array.isArray(ue) ? ue : []).filter((e) => e && e.on !== !1);
278
+ if (K.length) {
279
279
  let e = [], n = [], r = [], i = [], a = [];
280
- 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");
280
+ 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");
281
281
  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");
282
282
  else {
283
283
  if (!t.src) continue;
@@ -374,10 +374,10 @@ function U(e, t, n, r = !1) {
374
374
  let i = Object.entries(A(t)).map(([e, t]) => `${H(e)}: ${t} !important;`).join(" ");
375
375
  return i ? `[data-wb="${e}"]${r ? "" : n} { ${i} }` : "";
376
376
  }
377
- function W(e, t, n) {
377
+ function ee(e, t, n) {
378
378
  return Object.entries(j).map(([r, i]) => U(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
379
379
  }
380
- var ee = [
380
+ var W = [
381
381
  {
382
382
  key: "tablet",
383
383
  max: 991
@@ -392,7 +392,7 @@ var ee = [
392
392
  }
393
393
  ], te = (e) => Object.entries(A(e)).map(([e, t]) => `${H(e)}: ${t} !important;`).join(" ");
394
394
  function ne(e, t) {
395
- return ee.map(({ key: n, max: r }) => {
395
+ return W.map(({ key: n, max: r }) => {
396
396
  let i = t?.[n] ? te(t[n]) : "";
397
397
  return i ? `@media (max-width: ${r}px) { [data-wb="${e}"] { ${i} } }` : "";
398
398
  }).filter(Boolean).join("\n");
@@ -411,7 +411,7 @@ function re(e, t) {
411
411
  function ie(e, t) {
412
412
  let n = [], r = (e) => {
413
413
  for (let [t, r] of Object.entries(e || {})) {
414
- let e = W(t, r.props);
414
+ let e = ee(t, r.props);
415
415
  e && n.push(e);
416
416
  }
417
417
  };
@@ -419,7 +419,7 @@ function ie(e, t) {
419
419
  for (let e of Object.values(t || {})) r(e.template?.nodes);
420
420
  return n.join("\n");
421
421
  }
422
- var G = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", ae = {
422
+ var ae = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", G = {
423
423
  light: {
424
424
  background: "#f2f2f2",
425
425
  surface: "#f2f2f2",
@@ -463,20 +463,20 @@ var G = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
463
463
  }, oe = {
464
464
  font: "system",
465
465
  headingFont: "inherit",
466
- light: ae.light,
467
- dark: ae.dark
468
- }, K = {
466
+ light: G.light,
467
+ dark: G.dark
468
+ }, se = {
469
469
  system: {
470
470
  label: "System",
471
- value: G
471
+ value: ae
472
472
  },
473
473
  inter: {
474
474
  label: "Inter",
475
- value: `"Inter", ${G}`
475
+ value: `"Inter", ${ae}`
476
476
  },
477
477
  outfit: {
478
478
  label: "Outfit",
479
- value: `"Outfit", ${G}`
479
+ value: `"Outfit", ${ae}`
480
480
  },
481
481
  serif: {
482
482
  label: "Serif",
@@ -486,7 +486,7 @@ var G = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
486
486
  label: "Mono",
487
487
  value: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
488
488
  }
489
- }, se = (e, t) => K[e]?.value ?? v(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), ce = (e, ...t) => {
489
+ }, ce = (e, t) => se[e]?.value ?? v(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), le = (e, ...t) => {
490
490
  let n = Object.assign({}, e, ...t);
491
491
  return n.primary = {
492
492
  ...e.primary,
@@ -502,20 +502,20 @@ var G = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
502
502
  }), {})
503
503
  }, n;
504
504
  };
505
- function le(e) {
505
+ function ue(e) {
506
506
  let { light: t, dark: n, font: r, headingFont: i, ...a } = e ?? {};
507
507
  return {
508
508
  font: r ?? oe.font,
509
509
  headingFont: i ?? oe.headingFont,
510
- light: ce(ae.light, a, t),
511
- dark: ce(ae.dark, n)
510
+ light: le(G.light, a, t),
511
+ dark: le(G.dark, n)
512
512
  };
513
513
  }
514
- function ue(e) {
514
+ function K(e) {
515
515
  return {
516
516
  "--page-bg": e.background,
517
517
  "--page-surface": e.surface ?? e.background,
518
- "--page-border": e.border ?? ae.light.border,
518
+ "--page-border": e.border ?? G.light.border,
519
519
  "--page-text": e.text,
520
520
  "--page-accent": e.accent,
521
521
  "--page-accent-text": e.accentText,
@@ -530,19 +530,19 @@ function ue(e) {
530
530
  };
531
531
  }
532
532
  function de(e) {
533
- let t = le(e);
533
+ let t = ue(e);
534
534
  return {
535
535
  backgroundColor: "var(--page-bg)",
536
536
  color: "var(--page-text)",
537
- fontFamily: se(t.font, G),
538
- "--page-heading-font": t.headingFont === "inherit" ? "inherit" : se(t.headingFont, "inherit")
537
+ fontFamily: ce(t.font, ae),
538
+ "--page-heading-font": t.headingFont === "inherit" ? "inherit" : ce(t.headingFont, "inherit")
539
539
  };
540
540
  }
541
541
  function fe(e, t = "light") {
542
- let n = le(e);
542
+ let n = ue(e);
543
543
  return {
544
544
  ...de(e),
545
- ...ue(n[t] ?? n.light)
545
+ ...K(n[t] ?? n.light)
546
546
  };
547
547
  }
548
548
  function pe(e, t) {
@@ -646,17 +646,17 @@ var ve = /* @__PURE__ */ new Set([
646
646
  return new URLSearchParams(window.location.search).forEach((t, n) => {
647
647
  n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
648
648
  }), e;
649
- }, J = (e) => {
649
+ }, we = (e) => {
650
650
  let t = {
651
651
  ...e && typeof e == "object" && !Array.isArray(e) ? e : {},
652
652
  ...Ce()
653
653
  };
654
654
  return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
655
- }, Y = t(null), X = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
656
- function we(e, t) {
655
+ }, J = t(null), Y = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
656
+ function Te(e, t) {
657
657
  if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
658
658
  }
659
- var Te = (e) => {
659
+ var X = (e) => {
660
660
  let t = [];
661
661
  for (let [n, r] of Object.entries(e ?? {})) {
662
662
  if (!/^[\w-]+$/.test(n)) continue;
@@ -670,9 +670,9 @@ function Z(e) {
670
670
  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(" ") : "";
671
671
  }
672
672
  function Ee(e, t) {
673
- let n = t?.data ?? {}, r = Te(n);
673
+ let n = t?.data ?? {}, r = X(n);
674
674
  if (!r.length) return e;
675
- let i = RegExp(`:(${r.map(X).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => Z(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;
675
+ let i = RegExp(`:(${r.map(Y).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => Z(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;
676
676
  return a(e);
677
677
  }
678
678
  var De = {
@@ -771,7 +771,7 @@ function Le({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a
771
771
  });
772
772
  }
773
773
  var Re = {
774
- fontFamily: K.mono.value,
774
+ fontFamily: se.mono.value,
775
775
  background: "rgba(148, 163, 184, 0.18)",
776
776
  padding: "1px 5px",
777
777
  borderRadius: 4,
@@ -782,11 +782,17 @@ function ze(e, t = [], n, r) {
782
782
  return t.includes("sup") ? i = /* @__PURE__ */ u("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ u("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ u("code", {
783
783
  style: Re,
784
784
  children: i
785
- })), t.includes("strike") && (i = /* @__PURE__ */ u("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ u("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ u("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ u("strong", { children: i })), n && (i = /* @__PURE__ */ u("a", {
785
+ })), t.includes("strike") && (i = /* @__PURE__ */ u("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ u("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ u("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ u("strong", { children: i })), n ? i = /* @__PURE__ */ u("a", {
786
786
  href: n,
787
787
  target: r || void 0,
788
788
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
789
- style: { color: "inherit" },
789
+ style: {
790
+ color: "inherit",
791
+ ...t.includes("nounderline") && { textDecoration: "none" }
792
+ },
793
+ children: i
794
+ }) : t.includes("nounderline") && (i = /* @__PURE__ */ u("span", {
795
+ style: { textDecoration: "none" },
790
796
  children: i
791
797
  })), i;
792
798
  }
@@ -804,11 +810,17 @@ function Be(t, n, r) {
804
810
  ...t.background && { backgroundColor: t.background }
805
811
  },
806
812
  children: i
807
- })), t.href && (i = /* @__PURE__ */ u("a", {
813
+ })), t.href ? i = /* @__PURE__ */ u("a", {
808
814
  href: t.href,
809
815
  target: t.target || void 0,
810
816
  rel: t.target === "_blank" ? "noopener noreferrer" : void 0,
811
- style: { color: t.color ?? "inherit" },
817
+ style: {
818
+ color: t.color ?? "inherit",
819
+ ...t.nounderline && { textDecoration: "none" }
820
+ },
821
+ children: i
822
+ }) : t.nounderline && (i = /* @__PURE__ */ u("span", {
823
+ style: { textDecoration: "none" },
812
824
  children: i
813
825
  })), /* @__PURE__ */ u(e, { children: i }, n);
814
826
  }) : n;
@@ -1769,7 +1781,7 @@ function xt({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i
1769
1781
  function St(e, t = {}, n = 0) {
1770
1782
  let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" : Z(e), a = Math.max(0, Number(n) || 0), o = [];
1771
1783
  for (let e of r) {
1772
- 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)) : "";
1784
+ 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)) : "";
1773
1785
  for (let e of s) if (o.push({
1774
1786
  src: e,
1775
1787
  name: c,
@@ -2329,55 +2341,79 @@ function Ot({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
2329
2341
  }, e.key))]
2330
2342
  }) : null;
2331
2343
  }
2332
- function kt({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
2333
- let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
2344
+ function kt({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i, padY: a, headerBg: o, headerColor: s, openBg: l, openColor: f, borderColor: p, style: m, nodeRef: h }) {
2345
+ let [g, _] = c(() => new Set(e.length ? [e[0].key] : []));
2334
2346
  if (!e.length) return null;
2335
- let s = (e) => o((t) => {
2347
+ let v = (e, t) => typeof e == "string" && e ? e : t, y = (e, t) => {
2348
+ let n = Number(e);
2349
+ return e === "" || e == null || !Number.isFinite(n) ? t : n;
2350
+ }, b = bt[r], x = (e) => _((t) => {
2336
2351
  let r = new Set(n ? t : []);
2337
2352
  return t.has(e) ? r.delete(e) : r.add(e), r;
2338
2353
  });
2339
2354
  return /* @__PURE__ */ u("div", {
2340
- ref: i,
2355
+ ref: h,
2341
2356
  style: {
2342
2357
  width: "100%",
2343
- ...A(r)
2358
+ ...A(m)
2344
2359
  },
2345
2360
  children: e.map((n, r) => {
2346
- let i = a.has(n.key);
2361
+ let c = g.has(n.key);
2347
2362
  return /* @__PURE__ */ d("div", {
2348
- style: { borderBottom: r < e.length - 1 ? "1px solid rgba(148, 163, 184, 0.35)" : "none" },
2363
+ style: { borderBottom: r < e.length - 1 ? `1px solid ${v(p, "rgba(148, 163, 184, 0.35)")}` : "none" },
2349
2364
  children: [/* @__PURE__ */ d("button", {
2350
2365
  type: "button",
2351
- onClick: () => s(n.key),
2366
+ onClick: () => x(n.key),
2352
2367
  style: {
2353
2368
  width: "100%",
2354
2369
  display: "flex",
2355
2370
  alignItems: "center",
2356
2371
  justifyContent: "space-between",
2357
2372
  gap: 12,
2358
- background: "transparent",
2373
+ background: c ? v(l, v(o, "transparent")) : v(o, "transparent"),
2359
2374
  border: 0,
2360
- padding: "14px 4px",
2375
+ padding: `${y(a, 14)}px ${y(i, 4)}px`,
2361
2376
  fontSize: 15,
2362
2377
  fontWeight: 600,
2363
2378
  fontFamily: "inherit",
2364
- color: "inherit",
2379
+ color: c ? v(f, v(s, "inherit")) : v(s, "inherit"),
2365
2380
  textAlign: "left",
2366
- cursor: "pointer"
2381
+ cursor: "pointer",
2382
+ transition: "background 180ms, color 180ms"
2367
2383
  },
2368
- children: [n.title || `Item ${r + 1}`, /* @__PURE__ */ u("span", {
2384
+ children: [/* @__PURE__ */ d("span", {
2385
+ style: {
2386
+ display: "flex",
2387
+ alignItems: "center",
2388
+ gap: 10,
2389
+ minWidth: 0
2390
+ },
2391
+ children: [b ? /* @__PURE__ */ u("svg", {
2392
+ viewBox: "0 0 24 24",
2393
+ width: 16,
2394
+ height: 16,
2395
+ fill: "none",
2396
+ stroke: "currentColor",
2397
+ strokeWidth: 2,
2398
+ strokeLinecap: "round",
2399
+ strokeLinejoin: "round",
2400
+ "aria-hidden": "true",
2401
+ style: { flexShrink: 0 },
2402
+ children: /* @__PURE__ */ u("path", { d: b })
2403
+ }) : null, n.title || `Item ${r + 1}`]
2404
+ }), /* @__PURE__ */ u("span", {
2369
2405
  "aria-hidden": !0,
2370
2406
  style: {
2371
2407
  fontSize: 12,
2372
2408
  opacity: .6,
2373
- transform: i ? "rotate(180deg)" : "none",
2409
+ transform: c ? "rotate(180deg)" : "none",
2374
2410
  transition: "transform 180ms"
2375
2411
  },
2376
2412
  children: "▼"
2377
2413
  })]
2378
2414
  }), /* @__PURE__ */ u("div", {
2379
2415
  style: {
2380
- display: i ? "flex" : "none",
2416
+ display: c ? "flex" : "none",
2381
2417
  flexDirection: "column"
2382
2418
  },
2383
2419
  children: t?.[n.key] ?? null
@@ -3005,7 +3041,7 @@ function en({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
3005
3041
  });
3006
3042
  }
3007
3043
  function tn({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
3008
- let { tenant: v, apiUrl: y, locale: b } = r(q), x = r(Y), S = r(xe), [, C] = c(0);
3044
+ let { tenant: v, apiUrl: y, locale: b } = r(q), x = r(J), S = r(xe), [, C] = c(0);
3009
3045
  i(() => {
3010
3046
  if (typeof window > "u") return;
3011
3047
  let e = () => C((e) => e + 1);
@@ -3013,7 +3049,7 @@ function tn({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
3013
3049
  window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
3014
3050
  };
3015
3051
  }, []);
3016
- let w = J(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : S?.[e], O = m ? Se(S) : 1, [k, j] = c(null);
3052
+ let w = we(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : S?.[e], O = m ? Se(S) : 1, [k, j] = c(null);
3017
3053
  if (i(() => {
3018
3054
  if (!e || D) return;
3019
3055
  let n = !0, r = new URLSearchParams();
@@ -3068,7 +3104,7 @@ function tn({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
3068
3104
  ...A(g)
3069
3105
  },
3070
3106
  children: N.map((e) => {
3071
- let t = o ? we(e?.data, o) : null, r = s ? Z(we(e?.data, s)) : null, i = l ? we(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : Z(i), f = n === "list";
3107
+ let t = o ? Te(e?.data, o) : null, r = s ? Z(Te(e?.data, s)) : null, i = l ? Te(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : Z(i), f = n === "list";
3072
3108
  return /* @__PURE__ */ d("div", {
3073
3109
  style: {
3074
3110
  display: "flex",
@@ -4255,87 +4291,87 @@ var kn = 360, An = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;
4255
4291
  children: t
4256
4292
  }) : t;
4257
4293
  };
4258
- function Nn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], colKeys: o = [], heights: f = [], 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, maxHeight: k, style: j, nodeRef: M, edit: N }) {
4259
- let P = s(null), F = s(null), [I, L] = c(null), [R, z] = c(null), B = (e, t) => () => L({
4294
+ function Nn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], colKeys: o = [], heights: f = [], 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: j, style: M, nodeRef: N, edit: P }) {
4295
+ let F = s(null), I = s(null), [L, R] = c(null), [z, B] = c(null), V = (e, t) => () => R({
4260
4296
  r: e,
4261
4297
  c: t
4262
4298
  });
4263
4299
  i(() => {
4264
- if (!N) return;
4265
- let e = F.current, t = I && e?.querySelector(`[data-cell="${I.r}-${I.c}"]`);
4300
+ if (!P) return;
4301
+ let e = I.current, t = L && e?.querySelector(`[data-cell="${L.r}-${L.c}"]`);
4266
4302
  if (!t) {
4267
- R && z(null);
4303
+ z && B(null);
4268
4304
  return;
4269
4305
  }
4270
4306
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
4271
4307
  top: r.bottom - n.top + 4,
4272
4308
  left: Math.max(0, Math.min(r.left - n.left, n.width - kn))
4273
4309
  };
4274
- (R?.top !== i.top || R?.left !== i.left) && z(i);
4310
+ (z?.top !== i.top || z?.left !== i.left) && B(i);
4275
4311
  }), i(() => {
4276
- if (!N || !I) return;
4312
+ if (!P || !L) return;
4277
4313
  let e = (e) => {
4278
- F.current?.contains(e.target) || L(null);
4314
+ I.current?.contains(e.target) || R(null);
4279
4315
  };
4280
4316
  return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
4281
- }, [N, I]);
4282
- let { tenant: V, apiUrl: H } = r(q), U = r(xe), W = U?.[h], ee = C ? Se(U) : 1, [te, ne] = c(null);
4317
+ }, [P, L]);
4318
+ let { tenant: H, apiUrl: U } = r(q), ee = r(xe), W = ee?.[h], te = C ? Se(ee) : 1, [ne, re] = c(null);
4283
4319
  if (i(() => {
4284
4320
  if (!h || W) return;
4285
- let e = !0, t = Math.max(1, Number(g) || 10), n = C && !h.startsWith("api:") ? `?offset=${(ee - 1) * t}&limit=${t}` : "", r = h.startsWith("api:") ? `${H}/data/${encodeURIComponent(h.slice(4))}` : `${H}/dynamic/${encodeURIComponent(h)}${n}`;
4286
- return fetch(r, { headers: V ? { "x-tenant": V } : {} }).then((e) => e.json()).then((t) => {
4321
+ let e = !0, t = Math.max(1, Number(g) || 10), n = C && !h.startsWith("api:") ? `?offset=${(te - 1) * t}&limit=${t}` : "", r = h.startsWith("api:") ? `${U}/data/${encodeURIComponent(h.slice(4))}` : `${U}/dynamic/${encodeURIComponent(h)}${n}`;
4322
+ return fetch(r, { headers: H ? { "x-tenant": H } : {} }).then((e) => e.json()).then((t) => {
4287
4323
  let n = Array.isArray(t?.payload) ? t.payload : Array.isArray(t?.payload?.data) ? t.payload.data : [];
4288
- return e && ne(n);
4289
- }).catch(() => e && ne([])), () => {
4324
+ return e && re(n);
4325
+ }).catch(() => e && re([])), () => {
4290
4326
  e = !1;
4291
4327
  };
4292
4328
  }, [
4293
4329
  h,
4294
- V,
4295
4330
  H,
4331
+ U,
4296
4332
  W,
4297
4333
  C,
4298
- ee,
4334
+ te,
4299
4335
  g
4300
4336
  ]), !e.length) return null;
4301
- let re = Math.max(1, Number(g) || 10), ie = h ? C ? W || h.startsWith("api:") ? (W ?? te ?? []).slice((ee - 1) * re, ee * re) : (te ?? []).slice(0, re) : (W ?? te ?? []).slice(0, re) : null, G = ie ? ie.map((t) => e.map((e) => Z(we(t?.data, e.field)))) : t, ae = !!h && !(h && !W && te === null) && G.length === 0, oe = b ? {
4337
+ let ie = Math.max(1, Number(g) || 10), ae = h ? C ? W || h.startsWith("api:") ? (W ?? ne ?? []).slice((te - 1) * ie, te * ie) : (ne ?? []).slice(0, ie) : (W ?? ne ?? []).slice(0, ie) : null, G = ae ? ae.map((t) => e.map((e) => Z(Te(t?.data, e.field)))) : t, oe = !!h && !(h && !W && ne === null) && G.length === 0, se = b ? {
4302
4338
  y: 6,
4303
4339
  x: 10
4304
4340
  } : {
4305
4341
  y: 10,
4306
4342
  x: 14
4307
- }, K = `${Number.isFinite(Number(S)) && S !== "" ? Number(S) : oe.y}px ${Number.isFinite(Number(x)) && x !== "" ? Number(x) : oe.x}px`, se = "1px solid rgba(148, 163, 184, 0.35)", ce = y ? { border: se } : { borderBottom: se }, le = Array.isArray(n) && n.length === e.length && n.every((e) => Number.isFinite(e) && e > 0), ue = [
4343
+ }, ce = `${Number.isFinite(Number(S)) && S !== "" ? Number(S) : se.y}px ${Number.isFinite(Number(x)) && x !== "" ? Number(x) : se.x}px`, le = `1px solid ${typeof k == "string" && k ? k : "rgba(148, 163, 184, 0.35)"}`, ue = y ? { border: le } : { borderBottom: le }, K = Array.isArray(n) && n.length === e.length && n.every((e) => Number.isFinite(e) && e > 0), de = [
4308
4344
  "left",
4309
4345
  "center",
4310
4346
  "right"
4311
- ], de = (t) => ue.includes(e[t]?.align) ? e[t].align : "", fe = (e) => de(e) || (ue.includes(O) ? O : "left"), pe = Number.isFinite(Number(k)) && Number(k) > 0 ? Number(k) : 0, me = A(j), he = !pe && me && me.maxHeight !== void 0 ? me.maxHeight : 0, ge = pe || he, _e = he ? {
4312
- ...me,
4347
+ ], fe = (t) => de.includes(e[t]?.align) ? e[t].align : "", pe = (e) => fe(e) || (de.includes(O) ? O : "left"), me = Number.isFinite(Number(j)) && Number(j) > 0 ? Number(j) : 0, he = A(M), ge = !me && he && he.maxHeight !== void 0 ? he.maxHeight : 0, _e = me || ge, ve = ge ? {
4348
+ ...he,
4313
4349
  maxHeight: void 0
4314
- } : me, ve = !!N && N.rows !== !1, ye = (t) => (r) => {
4315
- if (!N?.resize || t >= e.length - 1) return;
4350
+ } : he, ye = !!P && P.rows !== !1, be = (t) => (r) => {
4351
+ if (!P?.resize || t >= e.length - 1) return;
4316
4352
  r.preventDefault(), r.stopPropagation();
4317
- let i = P.current, a = i ? i.clientWidth : 0;
4353
+ let i = F.current, a = i ? i.clientWidth : 0;
4318
4354
  if (!a) return;
4319
- let o = le ? [...n] : e.map(() => 100 / e.length), s = r.clientX, c = o[t] + o[t + 1], l = (e) => {
4355
+ let o = K ? [...n] : e.map(() => 100 / e.length), s = r.clientX, c = o[t] + o[t + 1], l = (e) => {
4320
4356
  let n = (e.clientX - s) / a * 100, r = Math.min(c - 5, Math.max(5, o[t] + n)), i = [...o];
4321
- i[t] = Math.round(r * 10) / 10, i[t + 1] = Math.round((c - r) * 10) / 10, N.resize(i);
4357
+ i[t] = Math.round(r * 10) / 10, i[t + 1] = Math.round((c - r) * 10) / 10, P.resize(i);
4322
4358
  }, u = () => {
4323
4359
  window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", u);
4324
4360
  };
4325
4361
  window.addEventListener("pointermove", l), window.addEventListener("pointerup", u);
4326
- }, be = /* @__PURE__ */ new Set();
4362
+ }, Ce = /* @__PURE__ */ new Set();
4327
4363
  p && G.forEach((t, n) => e.forEach((e, t) => {
4328
4364
  let r = p[jn(a[n], o[t])];
4329
4365
  if (!r) return;
4330
4366
  let i = Math.max(1, Number(r.c) || 1), s = Math.max(1, Number(r.r) || 1);
4331
- for (let e = 0; e < s; e++) for (let r = 0; r < i; r++) (e || r) && be.add(`${n + e},${t + r}`);
4367
+ for (let e = 0; e < s; e++) for (let r = 0; r < i; r++) (e || r) && Ce.add(`${n + e},${t + r}`);
4332
4368
  }));
4333
- let Ce = (e) => (t) => {
4334
- if (!N?.resizeRow) return;
4369
+ let we = (e) => (t) => {
4370
+ if (!P?.resizeRow) return;
4335
4371
  t.preventDefault(), t.stopPropagation();
4336
4372
  let n = t.currentTarget.closest("tr");
4337
4373
  if (!n) return;
4338
- let r = t.clientY, i = n.offsetHeight, a = (t) => N.resizeRow(e, Math.max(20, Math.round(i + (t.clientY - r)))), o = () => {
4374
+ let r = t.clientY, i = n.offsetHeight, a = (t) => P.resizeRow(e, Math.max(20, Math.round(i + (t.clientY - r)))), o = () => {
4339
4375
  window.removeEventListener("pointermove", a), window.removeEventListener("pointerup", o);
4340
4376
  };
4341
4377
  window.addEventListener("pointermove", a), window.addEventListener("pointerup", o);
@@ -4348,23 +4384,23 @@ function Nn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4348
4384
  },
4349
4385
  onClick: n,
4350
4386
  children: e
4351
- }, t), Y = I && I.r < G.length && I.c < e.length ? I : null, X = (e, t) => N?.labels?.[e] ?? t, Te = Y ? p?.[jn(a[Y.r], o[Y.c])] : null, Ee = Math.max(1, Number(Te?.c) || 1), De = Math.max(1, Number(Te?.r) || 1);
4387
+ }, t), Y = L && L.r < G.length && L.c < e.length ? L : null, X = (e, t) => P?.labels?.[e] ?? t, Ee = Y ? p?.[jn(a[Y.r], o[Y.c])] : null, De = Math.max(1, Number(Ee?.c) || 1), Oe = Math.max(1, Number(Ee?.r) || 1);
4352
4388
  return /* @__PURE__ */ d("div", {
4353
4389
  ref: (e) => {
4354
- F.current = e, typeof M == "function" && M(e);
4390
+ I.current = e, typeof N == "function" && N(e);
4355
4391
  },
4356
4392
  style: {
4357
4393
  width: "100%",
4358
- ...N ? { position: "relative" } : null,
4359
- ..._e
4394
+ ...P ? { position: "relative" } : null,
4395
+ ...ve
4360
4396
  },
4361
4397
  children: [
4362
- N && /* @__PURE__ */ u("style", { children: An }),
4363
- N && Y && R && /* @__PURE__ */ d("div", {
4398
+ P && /* @__PURE__ */ u("style", { children: An }),
4399
+ P && Y && z && /* @__PURE__ */ d("div", {
4364
4400
  className: "wb-tedit-bar",
4365
4401
  style: {
4366
- top: R.top,
4367
- left: R.left
4402
+ top: z.top,
4403
+ left: z.left
4368
4404
  },
4369
4405
  onMouseDown: (e) => e.stopPropagation(),
4370
4406
  children: [
@@ -4372,105 +4408,105 @@ function Nn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4372
4408
  className: "wb-tedit-at",
4373
4409
  children: `R${Y.r + 1}·C${Y.c + 1}`
4374
4410
  }),
4375
- J("+↑", X("rowAbove", "Insert row above"), () => N.addRow(Y.r - 1)),
4376
- J("+↓", X("rowBelow", "Insert row below"), () => N.addRow(Y.r)),
4377
- J("↑", X("rowUp", "Move row up"), () => N.moveRow(Y.r, -1), Y.r === 0),
4378
- J("↓", X("rowDown", "Move row down"), () => N.moveRow(Y.r, 1), Y.r >= G.length - 1),
4379
- J("✕ row", X("rowDelete", "Delete row"), () => N.dropRow(Y.r), G.length <= 1),
4411
+ J("+↑", X("rowAbove", "Insert row above"), () => P.addRow(Y.r - 1)),
4412
+ J("+↓", X("rowBelow", "Insert row below"), () => P.addRow(Y.r)),
4413
+ J("↑", X("rowUp", "Move row up"), () => P.moveRow(Y.r, -1), Y.r === 0),
4414
+ J("↓", X("rowDown", "Move row down"), () => P.moveRow(Y.r, 1), Y.r >= G.length - 1),
4415
+ J("✕ row", X("rowDelete", "Delete row"), () => P.dropRow(Y.r), G.length <= 1),
4380
4416
  /* @__PURE__ */ u("span", { className: "wb-tedit-sep" }),
4381
- J("+←", X("colLeft", "Insert column left"), () => N.addColumn(Y.c - 1)),
4382
- J("+→", X("colRight", "Insert column right"), () => N.addColumn(Y.c)),
4383
- J("←", X("colMoveLeft", "Move column left"), () => N.moveColumn(Y.c, -1), Y.c === 0),
4384
- J("→", X("colMoveRight", "Move column right"), () => N.moveColumn(Y.c, 1), Y.c >= e.length - 1),
4385
- J("✕ col", X("colDelete", "Delete column"), () => N.dropColumn(Y.c), e.length <= 1),
4417
+ J("+←", X("colLeft", "Insert column left"), () => P.addColumn(Y.c - 1)),
4418
+ J("+→", X("colRight", "Insert column right"), () => P.addColumn(Y.c)),
4419
+ J("←", X("colMoveLeft", "Move column left"), () => P.moveColumn(Y.c, -1), Y.c === 0),
4420
+ J("→", X("colMoveRight", "Move column right"), () => P.moveColumn(Y.c, 1), Y.c >= e.length - 1),
4421
+ J("✕ col", X("colDelete", "Delete column"), () => P.dropColumn(Y.c), e.length <= 1),
4386
4422
  /* @__PURE__ */ u("span", { className: "wb-tedit-sep" }),
4387
- J("↔", X("mergeRight", "Merge with the cell on the right"), () => N.merge(Y.r, Y.c, "right"), Y.c + Ee >= e.length),
4388
- J("↕", X("mergeDown", "Merge with the cell below"), () => N.merge(Y.r, Y.c, "down"), Y.r + De >= G.length),
4389
- J("⤫", X("split", "Split this cell"), () => N.split(Y.r, Y.c), Ee === 1 && De === 1)
4423
+ J("↔", X("mergeRight", "Merge with the cell on the right"), () => P.merge(Y.r, Y.c, "right"), Y.c + De >= e.length),
4424
+ J("↕", X("mergeDown", "Merge with the cell below"), () => P.merge(Y.r, Y.c, "down"), Y.r + Oe >= G.length),
4425
+ J("⤫", X("split", "Split this cell"), () => P.split(Y.r, Y.c), De === 1 && Oe === 1)
4390
4426
  ]
4391
4427
  }),
4392
4428
  /* @__PURE__ */ u("div", {
4393
4429
  style: {
4394
4430
  width: "100%",
4395
4431
  overflowX: "auto",
4396
- ...ge ? {
4397
- maxHeight: ge,
4432
+ ..._e ? {
4433
+ maxHeight: _e,
4398
4434
  overflowY: "auto"
4399
4435
  } : null
4400
4436
  },
4401
4437
  children: /* @__PURE__ */ d("table", {
4402
- ref: P,
4438
+ ref: F,
4403
4439
  style: {
4404
4440
  width: "100%",
4405
4441
  borderCollapse: T && _ !== !1 ? "separate" : "collapse",
4406
4442
  borderSpacing: 0,
4407
4443
  fontSize: 14,
4408
- ...le ? { tableLayout: "fixed" } : null,
4409
- ...y ? { border: se } : {}
4444
+ ...K ? { tableLayout: "fixed" } : null,
4445
+ ...y ? { border: le } : {}
4410
4446
  },
4411
4447
  children: [
4412
- le && /* @__PURE__ */ u("colgroup", { children: n.map((e, t) => /* @__PURE__ */ u("col", { style: { width: `${e}%` } }, t)) }),
4448
+ K && /* @__PURE__ */ u("colgroup", { children: n.map((e, t) => /* @__PURE__ */ u("col", { style: { width: `${e}%` } }, t)) }),
4413
4449
  _ === !1 ? null : /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: e.map((t, n) => /* @__PURE__ */ u("th", {
4414
- className: N ? "wb-tedit-head" : void 0,
4450
+ className: P ? "wb-tedit-head" : void 0,
4415
4451
  style: {
4416
- textAlign: fe(n),
4452
+ textAlign: pe(n),
4417
4453
  fontWeight: 600,
4418
- padding: K,
4454
+ padding: ce,
4419
4455
  ...typeof D == "string" && D ? { color: D } : null,
4420
4456
  background: typeof E == "string" && E ? E : T ? "var(--page-surface, #f2f2f2)" : "rgba(148, 163, 184, 0.12)",
4421
4457
  ...T ? {
4422
4458
  position: "sticky",
4423
4459
  top: 0,
4424
4460
  zIndex: 2
4425
- } : N ? { position: "relative" } : null,
4426
- ...ce
4461
+ } : P ? { position: "relative" } : null,
4462
+ ...ue
4427
4463
  },
4428
- children: N ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(On, {
4464
+ children: P ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(On, {
4429
4465
  value: t.label ?? t,
4430
- onCommit: (e) => N.header(n, e),
4466
+ onCommit: (e) => P.header(n, e),
4431
4467
  hint: X("editCell", "Double-click to edit"),
4432
4468
  style: { paddingRight: 6 }
4433
4469
  }), n < e.length - 1 && /* @__PURE__ */ u("span", {
4434
4470
  className: "wb-tedit-grip",
4435
4471
  title: X("colWidth", "Drag to resize the column"),
4436
- onPointerDown: ye(n)
4472
+ onPointerDown: be(n)
4437
4473
  })] }) : t.label ?? t
4438
4474
  }, n)) }) }),
4439
- /* @__PURE__ */ d("tbody", { children: [ae && /* @__PURE__ */ u("tr", { children: /* @__PURE__ */ u("td", {
4475
+ /* @__PURE__ */ d("tbody", { children: [oe && /* @__PURE__ */ u("tr", { children: /* @__PURE__ */ u("td", {
4440
4476
  colSpan: e.length,
4441
4477
  style: {
4442
- padding: K,
4478
+ padding: ce,
4443
4479
  textAlign: "center",
4444
4480
  opacity: .6,
4445
- ...ce
4481
+ ...ue
4446
4482
  },
4447
4483
  children: w || "No data yet"
4448
4484
  }) }), G.map((t, n) => /* @__PURE__ */ u("tr", {
4449
- className: N ? "wb-tedit-row" : void 0,
4485
+ className: P ? "wb-tedit-row" : void 0,
4450
4486
  style: {
4451
4487
  ...v && n % 2 == 1 ? { background: "rgba(148, 163, 184, 0.07)" } : null,
4452
4488
  ...Number.isFinite(Number(f?.[n])) && f[n] > 0 ? { height: f[n] } : null
4453
4489
  },
4454
4490
  children: e.map((e, r) => {
4455
- if (be.has(`${n},${r}`)) return null;
4491
+ if (Ce.has(`${n},${r}`)) return null;
4456
4492
  let i = jn(a[n], o[r]), s = m?.[i], c = p?.[i], l = Math.max(1, Number(c?.c) || 1), f = Math.max(1, Number(c?.r) || 1);
4457
4493
  return /* @__PURE__ */ d("td", {
4458
- className: N ? `wb-tedit-cell${I?.r === n && I?.c === r ? " wb-tedit-cellon" : ""}` : void 0,
4459
- onMouseDownCapture: ve ? B(n, r) : void 0,
4460
- "data-cell": N ? `${n}-${r}` : void 0,
4494
+ className: P ? `wb-tedit-cell${L?.r === n && L?.c === r ? " wb-tedit-cellon" : ""}` : void 0,
4495
+ onMouseDownCapture: ye ? V(n, r) : void 0,
4496
+ "data-cell": P ? `${n}-${r}` : void 0,
4461
4497
  colSpan: l > 1 ? l : void 0,
4462
4498
  rowSpan: f > 1 ? f : void 0,
4463
4499
  style: {
4464
- padding: K,
4465
- ...de(r) ? { textAlign: de(r) } : null,
4466
- ...N ? { position: "relative" } : null,
4467
- ...ce
4500
+ padding: ce,
4501
+ ...fe(r) ? { textAlign: fe(r) } : null,
4502
+ ...P ? { position: "relative" } : null,
4503
+ ...ue
4468
4504
  },
4469
- children: [s ?? Mn(t?.[r]), N && ve && /* @__PURE__ */ u("span", {
4505
+ children: [s ?? Mn(t?.[r]), P && ye && /* @__PURE__ */ u("span", {
4470
4506
  className: "wb-tedit-rowgrip",
4471
4507
  title: X("rowHeight", "Drag to set the row height — double-click to fit the content"),
4472
- onPointerDown: Ce(n),
4473
- onDoubleClick: () => N.resizeRow(n, 0)
4508
+ onPointerDown: we(n),
4509
+ onDoubleClick: () => P.resizeRow(n, 0)
4474
4510
  })]
4475
4511
  }, r);
4476
4512
  })
@@ -4621,16 +4657,16 @@ function Vn({ events: e = [], source: t = "", titleField: n = "", startField: a
4621
4657
  }, U = new Intl.DateTimeFormat(V, {
4622
4658
  month: "long",
4623
4659
  year: "numeric"
4624
- }).format(new Date(M.year, M.month, 1)), W = (e) => N((t) => {
4660
+ }).format(new Date(M.year, M.month, 1)), ee = (e) => N((t) => {
4625
4661
  let n = new Date(t.year, t.month + e, 1);
4626
4662
  return {
4627
4663
  year: n.getFullYear(),
4628
4664
  month: n.getMonth()
4629
4665
  };
4630
- }), ee = (e, t) => /* @__PURE__ */ u("button", {
4666
+ }), W = (e, t) => /* @__PURE__ */ u("button", {
4631
4667
  type: "button",
4632
4668
  "aria-label": e,
4633
- onClick: () => W(t),
4669
+ onClick: () => ee(t),
4634
4670
  style: {
4635
4671
  background: "transparent",
4636
4672
  border: `1px solid ${I}`,
@@ -4659,8 +4695,8 @@ function Vn({ events: e = [], source: t = "", titleField: n = "", startField: a
4659
4695
  },
4660
4696
  children: U
4661
4697
  }),
4662
- ee("Previous month", -1),
4663
- ee("Next month", 1)
4698
+ W("Previous month", -1),
4699
+ W("Next month", 1)
4664
4700
  ]
4665
4701
  });
4666
4702
  if (p === "list") {
@@ -4712,10 +4748,10 @@ function Vn({ events: e = [], source: t = "", titleField: n = "", startField: a
4712
4748
  })]
4713
4749
  });
4714
4750
  }
4715
- let ne = new Date(M.year, M.month, 1), re = y === "sunday" ? 0 : 1, ie = (ne.getDay() - re + 7) % 7, G = new Date(M.year, M.month + 1, 0).getDate(), ae = Math.ceil((ie + G) / 7), oe = Fn(/* @__PURE__ */ new Date()), K = new Intl.DateTimeFormat(V, { weekday: "short" }), se = [];
4716
- for (let e = 0; e < ae * 7; e += 1) {
4717
- let t = e - ie + 1, n = t >= 1 && t <= G, r = Fn(new Date(M.year, M.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === oe;
4718
- se.push(/* @__PURE__ */ d("div", {
4751
+ let ne = new Date(M.year, M.month, 1), re = y === "sunday" ? 0 : 1, ie = (ne.getDay() - re + 7) % 7, ae = new Date(M.year, M.month + 1, 0).getDate(), G = Math.ceil((ie + ae) / 7), oe = Fn(/* @__PURE__ */ new Date()), se = new Intl.DateTimeFormat(V, { weekday: "short" }), ce = [];
4752
+ for (let e = 0; e < G * 7; e += 1) {
4753
+ let t = e - ie + 1, n = t >= 1 && t <= ae, r = Fn(new Date(M.year, M.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === oe;
4754
+ ce.push(/* @__PURE__ */ d("div", {
4719
4755
  style: {
4720
4756
  minHeight: P.cell,
4721
4757
  borderTop: `1px solid ${I}`,
@@ -4772,8 +4808,8 @@ function Vn({ events: e = [], source: t = "", titleField: n = "", startField: a
4772
4808
  textAlign: "center",
4773
4809
  padding: `0 0 ${P.pad}px`
4774
4810
  },
4775
- children: K.format(new Date(2024, 0, 7 + re + t))
4776
- }, `head-${t}`)), se]
4811
+ children: se.format(new Date(2024, 0, 7 + re + t))
4812
+ }, `head-${t}`)), ce]
4777
4813
  }),
4778
4814
  /* @__PURE__ */ u("div", { style: { borderTop: `1px solid ${I}` } })
4779
4815
  ]
@@ -5915,8 +5951,8 @@ function Er(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
5915
5951
  }
5916
5952
  //#endregion
5917
5953
  //#region ../ui/src/components/builder/PageRenderer.jsx
5918
- var Dr = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Or = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(ue(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
5919
- .webim-page[data-webim-mode="dark"] { ${Object.entries(ue(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
5954
+ var Dr = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Or = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(K(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
5955
+ .webim-page[data-webim-mode="dark"] { ${Object.entries(K(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
5920
5956
  function kr({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: s, animations: c, tenant: l, apiUrl: f, datasets: p, locale: m, direction: h, settings: _, siteUser: v }) {
5921
5957
  let b = s?.js?.trim();
5922
5958
  if (i(() => {
@@ -5931,7 +5967,7 @@ function kr({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
5931
5967
  minHeight: "100%",
5932
5968
  display: "flex",
5933
5969
  flexDirection: "column"
5934
- }, w = Er("ROOT", e, n), T = o(() => ({ render: (t, r) => Er(t, e, n, void 0, { mapProps: r }) }), [e, n]), D = ie(e, n), O = re(e, n), k = s?.css?.trim(), A = E(c), j = le(t), M = [j.font, j.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !K[e]), N = [.../* @__PURE__ */ new Set([...y(e, n), ...M])].map((e) => /* @__PURE__ */ u("link", {
5970
+ }, w = Er("ROOT", e, n), T = o(() => ({ render: (t, r) => Er(t, e, n, void 0, { mapProps: r }) }), [e, n]), D = ie(e, n), O = re(e, n), k = s?.css?.trim(), A = E(c), j = ue(t), M = [j.font, j.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !se[e]), N = [.../* @__PURE__ */ new Set([...y(e, n), ...M])].map((e) => /* @__PURE__ */ u("link", {
5935
5971
  rel: "stylesheet",
5936
5972
  precedence: "default",
5937
5973
  href: g(e)
@@ -5947,7 +5983,7 @@ function kr({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
5947
5983
  initialUser: v,
5948
5984
  children: /* @__PURE__ */ u(xe.Provider, {
5949
5985
  value: p ?? null,
5950
- children: /* @__PURE__ */ u(Y.Provider, {
5986
+ children: /* @__PURE__ */ u(J.Provider, {
5951
5987
  value: T,
5952
5988
  children: /* @__PURE__ */ d("div", {
5953
5989
  ...x,
@@ -5958,8 +5994,8 @@ function kr({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
5958
5994
  ...a
5959
5995
  },
5960
5996
  children: [
5961
- /* @__PURE__ */ u("style", { children: `.webim-page { ${Dr(ue(j.light))} }
5962
- @media (prefers-color-scheme: dark) { .webim-page { ${Dr(ue(j.dark))} } }` }),
5997
+ /* @__PURE__ */ u("style", { children: `.webim-page { ${Dr(K(j.light))} }
5998
+ @media (prefers-color-scheme: dark) { .webim-page { ${Dr(K(j.dark))} } }` }),
5963
5999
  /* @__PURE__ */ u("style", { children: P }),
5964
6000
  N,
5965
6001
  /* @__PURE__ */ u("style", { children: S }),
@@ -5983,7 +6019,7 @@ function kr({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
5983
6019
  initialUser: v,
5984
6020
  children: /* @__PURE__ */ u(xe.Provider, {
5985
6021
  value: p ?? null,
5986
- children: /* @__PURE__ */ u(Y.Provider, {
6022
+ children: /* @__PURE__ */ u(J.Provider, {
5987
6023
  value: T,
5988
6024
  children: /* @__PURE__ */ d("div", {
5989
6025
  ...x,