webim-adapter 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import { renderToStaticMarkup as e } from "react-dom/server";
2
- import { Fragment as t, createContext as n, useContext as r, useEffect as i, useId as a, useMemo as o, useState as s } from "react";
3
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
2
+ import { Fragment as t, createContext as n, useCallback as r, useContext as i, useEffect as a, useId as o, useMemo as s, useState as c } from "react";
3
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
4
4
  //#region ../ui/src/components/builder/locale.js
5
- var d = /* @__PURE__ */ new Set([
5
+ var f = /* @__PURE__ */ new Set([
6
6
  "ar",
7
7
  "he",
8
8
  "fa",
@@ -13,7 +13,7 @@ var d = /* @__PURE__ */ new Set([
13
13
  "yi",
14
14
  "dv",
15
15
  "ckb"
16
- ]), f = (e) => d.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", p = (e, t) => e === "ltr" || e === "rtl" ? e : t ? f(t) : void 0;
16
+ ]), p = (e) => f.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", m = (e, t) => e === "ltr" || e === "rtl" ? e : t ? p(t) : void 0;
17
17
  new Map([
18
18
  {
19
19
  family: "Bebas Neue",
@@ -120,14 +120,14 @@ new Map([
120
120
  fallback: "sans-serif"
121
121
  }
122
122
  ].map((e) => [e.family, e]));
123
- function m(e) {
123
+ function h(e) {
124
124
  return e.length ? `https://fonts.googleapis.com/css2?${e.map((e) => `family=${e.replace(/ /g, "+")}:wght@100..900`).join("&")}&display=swap` : null;
125
125
  }
126
- var h = (e) => m([e]), g = (e) => {
126
+ var g = (e) => h([e]), _ = (e) => {
127
127
  let t = typeof e == "string" && e.match(/^"([^"]+)"/);
128
128
  return t ? t[1] : null;
129
129
  };
130
- function _(e, t) {
130
+ function v(e, t) {
131
131
  let n = /* @__PURE__ */ new Set(), r = (e) => {
132
132
  for (let t of Object.values(e || {})) for (let e of [
133
133
  "style",
@@ -135,7 +135,7 @@ function _(e, t) {
135
135
  "pressed",
136
136
  "focused"
137
137
  ]) {
138
- let r = g(t.props?.[e]?.fontFamily);
138
+ let r = _(t.props?.[e]?.fontFamily);
139
139
  r && n.add(r);
140
140
  }
141
141
  };
@@ -145,36 +145,36 @@ function _(e, t) {
145
145
  }
146
146
  //#endregion
147
147
  //#region ../ui/src/components/builder/styles.js
148
- var v = /* @__PURE__ */ new Set(/* @__PURE__ */ "marginTop.marginRight.marginBottom.marginLeft.paddingTop.paddingRight.paddingBottom.paddingLeft.gap.rowGap.columnGap.flexBasis.fontSize.borderRadius.borderTopLeftRadius.borderTopRightRadius.borderBottomRightRadius.borderBottomLeftRadius.borderWidth.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.letterSpacing.textDecorationThickness.textUnderlineOffset.top.right.bottom.left".split(".")), y = (e) => typeof e == "number" || typeof e == "string" && e.trim() !== "" && !Number.isNaN(Number(e)) ? `${Number(e)}px` : e, b = [
148
+ var y = /* @__PURE__ */ new Set(/* @__PURE__ */ "marginTop.marginRight.marginBottom.marginLeft.paddingTop.paddingRight.paddingBottom.paddingLeft.gap.rowGap.columnGap.flexBasis.fontSize.borderRadius.borderTopLeftRadius.borderTopRightRadius.borderBottomRightRadius.borderBottomLeftRadius.borderWidth.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.letterSpacing.textDecorationThickness.textUnderlineOffset.top.right.bottom.left".split(".")), b = (e) => typeof e == "number" || typeof e == "string" && e.trim() !== "" && !Number.isNaN(Number(e)) ? `${Number(e)}px` : e, x = [
149
149
  "borderWidth",
150
150
  "borderStyle",
151
151
  "borderColor",
152
152
  "borderRadius",
153
153
  "gap"
154
154
  ];
155
- function x(e) {
155
+ function S(e) {
156
156
  let t = {};
157
- for (let n of b) {
157
+ for (let n of x) {
158
158
  let r = e?.[n];
159
- r != null && r !== "" && (t[n] = v.has(n) ? y(r) : r);
159
+ r != null && r !== "" && (t[n] = y.has(n) ? b(r) : r);
160
160
  }
161
- for (let [n, r] of Object.entries(e || {})) r == null || r === "" || b.includes(n) || (t[n] = v.has(n) ? y(r) : r);
161
+ for (let [n, r] of Object.entries(e || {})) r == null || r === "" || x.includes(n) || (t[n] = y.has(n) ? b(r) : r);
162
162
  let { gradientType: n, gradientAngle: r, gradientFrom: i, gradientTo: a } = t;
163
163
  delete t.gradientType, delete t.gradientAngle, delete t.gradientFrom, delete t.gradientTo;
164
164
  let { textShadows: o, textShadowX: s, textShadowY: c, textShadowBlur: l, textShadowColor: u } = t;
165
165
  delete t.textShadows, delete t.textShadowX, delete t.textShadowY, delete t.textShadowBlur, delete t.textShadowColor;
166
- let d = (Array.isArray(o) ? o : []).filter((e) => e && e.on !== !1).map((e) => `${y(e.x ?? 0)} ${y(e.y ?? 0)} ${y(e.blur ?? 0)} ${e.color || "rgba(0, 0, 0, 0.35)"}`);
166
+ let d = (Array.isArray(o) ? o : []).filter((e) => e && e.on !== !1).map((e) => `${b(e.x ?? 0)} ${b(e.y ?? 0)} ${b(e.blur ?? 0)} ${e.color || "rgba(0, 0, 0, 0.35)"}`);
167
167
  [
168
168
  s,
169
169
  c,
170
170
  l,
171
171
  u
172
- ].some((e) => e !== void 0) && d.push(`${y(s ?? 0)} ${y(c ?? 0)} ${y(l ?? 0)} ${u || "rgba(0, 0, 0, 0.35)"}`), d.length && (t.textShadow = d.join(", "));
173
- let f = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}deg` : e, p = (e) => e.type === "move" ? `translate(${y(e.x ?? 0)}, ${y(e.y ?? 0)})` : e.type === "scale" ? `scale(${e.v ?? 1})` : e.type === "rotate" ? `rotate(${f(e.a ?? 0)})` : e.type === "skew" ? `skew(${f(e.x ?? 0)}, ${f(e.y ?? 0)})` : null, { transforms: m, translateX: h, translateY: g, scale: _, rotate: x, skewX: S, skewY: C } = t;
172
+ ].some((e) => e !== void 0) && d.push(`${b(s ?? 0)} ${b(c ?? 0)} ${b(l ?? 0)} ${u || "rgba(0, 0, 0, 0.35)"}`), d.length && (t.textShadow = d.join(", "));
173
+ let f = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}deg` : e, p = (e) => e.type === "move" ? `translate(${b(e.x ?? 0)}, ${b(e.y ?? 0)})` : e.type === "scale" ? `scale(${e.v ?? 1})` : e.type === "rotate" ? `rotate(${f(e.a ?? 0)})` : e.type === "skew" ? `skew(${f(e.x ?? 0)}, ${f(e.y ?? 0)})` : null, { transforms: m, translateX: h, translateY: g, scale: _, rotate: v, skewX: S, skewY: C } = t;
174
174
  delete t.transforms, delete t.translateX, delete t.translateY, delete t.scale, delete t.rotate, delete t.skewX, delete t.skewY;
175
175
  let w = (Array.isArray(m) ? m : []).filter((e) => e && e.on !== !1).map(p).filter(Boolean);
176
- (h !== void 0 || g !== void 0) && w.push(`translate(${y(h ?? 0)}, ${y(g ?? 0)})`), _ !== void 0 && w.push(`scale(${_})`), x !== void 0 && w.push(`rotate(${f(x)})`), (S !== void 0 || C !== void 0) && w.push(`skew(${f(S ?? 0)}, ${f(C ?? 0)})`), w.length && (t.transform = w.join(" "));
177
- let T = (e) => `${e.inset ? "inset " : ""}${y(e.x ?? 0)} ${y(e.y ?? 0)} ${y(e.blur ?? 0)} ${y(e.spread ?? 0)} ${e.color || "rgba(15, 23, 42, 0.2)"}`, { shadows: E, boxShadowX: D, boxShadowY: O, boxShadowBlur: k, boxShadowSpread: A, boxShadowColor: j, boxShadowInset: M } = t;
176
+ (h !== void 0 || g !== void 0) && w.push(`translate(${b(h ?? 0)}, ${b(g ?? 0)})`), _ !== void 0 && w.push(`scale(${_})`), v !== void 0 && w.push(`rotate(${f(v)})`), (S !== void 0 || C !== void 0) && w.push(`skew(${f(S ?? 0)}, ${f(C ?? 0)})`), w.length && (t.transform = w.join(" "));
177
+ let T = (e) => `${e.inset ? "inset " : ""}${b(e.x ?? 0)} ${b(e.y ?? 0)} ${b(e.blur ?? 0)} ${b(e.spread ?? 0)} ${e.color || "rgba(15, 23, 42, 0.2)"}`, { shadows: E, boxShadowX: D, boxShadowY: O, boxShadowBlur: k, boxShadowSpread: A, boxShadowColor: j, boxShadowInset: M } = t;
178
178
  delete t.shadows, delete t.boxShadowX, delete t.boxShadowY, delete t.boxShadowBlur, delete t.boxShadowSpread, delete t.boxShadowColor, delete t.boxShadowInset;
179
179
  let N = (Array.isArray(E) ? E : []).filter((e) => e && e.on !== !1).map(T);
180
180
  [
@@ -192,76 +192,76 @@ function x(e) {
192
192
  color: j,
193
193
  inset: M
194
194
  })), N.length && (t.boxShadow = N.join(", "));
195
- let P = (e) => e.type === "blur" ? `blur(${y(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${f(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: I, backdropFilters: L, filterBlur: R, filterGrayscale: z, filterBrightness: B, filterContrast: V, filterSaturate: ee } = t;
195
+ let P = (e) => e.type === "blur" ? `blur(${b(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${f(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: I, backdropFilters: L, filterBlur: R, filterGrayscale: z, filterBrightness: ee, filterContrast: B, filterSaturate: V } = t;
196
196
  delete t.filters, delete t.backdropFilters, delete t.filterBlur, delete t.filterGrayscale, delete t.filterBrightness, delete t.filterContrast, delete t.filterSaturate;
197
197
  let H = F(I);
198
- R !== void 0 && H.push(`blur(${y(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(" "));
198
+ R !== void 0 && H.push(`blur(${b(R)})`), z !== void 0 && H.push(`grayscale(${z}%)`), ee !== void 0 && H.push(`brightness(${ee}%)`), B !== void 0 && H.push(`contrast(${B}%)`), V !== void 0 && H.push(`saturate(${V}%)`), H.length && (t.filter = H.join(" "));
199
199
  let te = F(L);
200
200
  te.length && (t.backdropFilter = te.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
201
- let { textStrokeWidth: U, textStrokeColor: W } = t;
202
- delete t.textStrokeWidth, delete t.textStrokeColor, (U !== void 0 || W !== void 0) && (t.WebkitTextStroke = `${y(U ?? 1)} ${W || "currentColor"}`);
203
- let { clipText: G } = t;
204
- delete t.clipText, G && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
205
- let { transitions: ne, transitionDuration: K, transitionEasing: re, transitionProperty: q } = t, ie = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
201
+ let { textStrokeWidth: ne, textStrokeColor: U } = t;
202
+ delete t.textStrokeWidth, delete t.textStrokeColor, (ne !== void 0 || U !== void 0) && (t.WebkitTextStroke = `${b(ne ?? 1)} ${U || "currentColor"}`);
203
+ let { clipText: W } = t;
204
+ delete t.clipText, W && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
205
+ let { transitions: G, transitionDuration: re, transitionEasing: K, transitionProperty: ie } = t, q = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
206
206
  delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
207
- let J = (Array.isArray(ne) ? ne : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${ie(e.duration ?? 200)} ${e.easing || "ease"}`);
208
- if (K !== void 0 && J.push(`${q || "all"} ${ie(K)} ${re || "ease"}`), J.length && (t.transition = J.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
207
+ let ae = (Array.isArray(G) ? G : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${q(e.duration ?? 200)} ${e.easing || "ease"}`);
208
+ if (re !== void 0 && ae.push(`${ie || "all"} ${q(re)} ${K || "ease"}`), ae.length && (t.transition = ae.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
209
209
  let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
210
210
  t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
211
211
  }
212
212
  delete t.backgroundVideo;
213
- let { overlayColor: Y, overlayOpacity: X } = t;
214
- if (delete t.overlayColor, delete t.overlayOpacity, Y) {
215
- let e = `color-mix(in srgb, ${Y} ${X ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
213
+ let { overlayColor: oe, overlayOpacity: se } = t;
214
+ if (delete t.overlayColor, delete t.overlayOpacity, oe) {
215
+ let e = `color-mix(in srgb, ${oe} ${se ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
216
216
  t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
217
217
  }
218
218
  t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
219
- let { backgroundLayers: ae } = t;
219
+ let { backgroundLayers: J } = t;
220
220
  delete t.backgroundLayers;
221
- let oe = (Array.isArray(ae) ? ae : []).filter((e) => e && e.on !== !1);
222
- if (oe.length) {
221
+ let ce = (Array.isArray(J) ? J : []).filter((e) => e && e.on !== !1);
222
+ if (ce.length) {
223
223
  let e = [], n = [], r = [], i = [], a = [];
224
- for (let t of oe) if (t.kind === "linear") e.push(`linear-gradient(${t.angle ?? 180}deg, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
224
+ for (let t of ce) if (t.kind === "linear") e.push(`linear-gradient(${t.angle ?? 180}deg, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
225
225
  else if (t.kind === "radial") e.push(`radial-gradient(circle, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
226
226
  else {
227
227
  if (!t.src) continue;
228
- e.push(`url("${t.src}")`), n.push(t.size === "custom" ? `${y(t.w ?? "auto")} ${y(t.h ?? "auto")}` : t.size || "cover"), r.push(`${y(t.posX ?? 0)} ${y(t.posY ?? 0)}`), i.push(t.repeat || "no-repeat"), a.push(t.fixed ? "fixed" : "scroll");
228
+ e.push(`url("${t.src}")`), n.push(t.size === "custom" ? `${b(t.w ?? "auto")} ${b(t.h ?? "auto")}` : t.size || "cover"), r.push(`${b(t.posX ?? 0)} ${b(t.posY ?? 0)}`), i.push(t.repeat || "no-repeat"), a.push(t.fixed ? "fixed" : "scroll");
229
229
  }
230
230
  e.length && (t.backgroundImage && (e.push(t.backgroundImage), n.push(t.backgroundSize || "cover"), r.push(t.backgroundPosition || "center"), i.push(t.backgroundRepeat || "no-repeat"), a.push("scroll")), t.backgroundImage = e.join(", "), t.backgroundSize = n.join(", "), t.backgroundPosition = r.join(", "), t.backgroundRepeat = i.join(", "), t.backgroundAttachment = a.join(", "));
231
231
  }
232
232
  return t;
233
233
  }
234
- var S = {
234
+ var C = {
235
235
  hover: ":hover",
236
236
  pressed: ":active",
237
237
  focused: ":focus"
238
- }, C = /* @__PURE__ */ new Set([
238
+ }, w = /* @__PURE__ */ new Set([
239
239
  "style",
240
240
  "class",
241
241
  "id",
242
242
  "data-wb",
243
243
  "data-wb-class",
244
244
  "data-slot"
245
- ]), w = (e) => /^[a-zA-Z_][\w-]*$/.test(e) && !/^on/i.test(e) && !C.has(e.toLowerCase());
246
- function T(e, t, n = []) {
245
+ ]), T = (e) => /^[a-zA-Z_][\w-]*$/.test(e) && !/^on/i.test(e) && !w.has(e.toLowerCase());
246
+ function E(e, t, n = []) {
247
247
  t.htmlId ? e.id = t.htmlId : e.removeAttribute("id");
248
248
  for (let t of n) e.removeAttribute(t);
249
249
  let r = [];
250
250
  for (let n of t.attributes ?? []) {
251
251
  let t = String(n?.name ?? "").trim();
252
- w(t) && (e.setAttribute(t, n.value ?? ""), r.push(t));
252
+ T(t) && (e.setAttribute(t, n.value ?? ""), r.push(t));
253
253
  }
254
254
  return r;
255
255
  }
256
- var E = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
257
- function D(e, t, n, r = !1) {
258
- let i = Object.entries(x(t)).map(([e, t]) => `${E(e)}: ${t} !important;`).join(" ");
256
+ var D = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
257
+ function O(e, t, n, r = !1) {
258
+ let i = Object.entries(S(t)).map(([e, t]) => `${D(e)}: ${t} !important;`).join(" ");
259
259
  return i ? `[data-wb="${e}"]${r ? "" : n} { ${i} }` : "";
260
260
  }
261
- function O(e, t, n) {
262
- return Object.entries(S).map(([r, i]) => D(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
261
+ function k(e, t, n) {
262
+ return Object.entries(C).map(([r, i]) => O(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
263
263
  }
264
- var k = [
264
+ var A = [
265
265
  {
266
266
  key: "tablet",
267
267
  max: 991
@@ -274,17 +274,17 @@ var k = [
274
274
  key: "mobile",
275
275
  max: 478
276
276
  }
277
- ], A = (e) => Object.entries(x(e)).map(([e, t]) => `${E(e)}: ${t} !important;`).join(" ");
278
- function j(e, t) {
279
- return k.map(({ key: n, max: r }) => {
280
- let i = t?.[n] ? A(t[n]) : "";
277
+ ], j = (e) => Object.entries(S(e)).map(([e, t]) => `${D(e)}: ${t} !important;`).join(" ");
278
+ function M(e, t) {
279
+ return A.map(({ key: n, max: r }) => {
280
+ let i = t?.[n] ? j(t[n]) : "";
281
281
  return i ? `@media (max-width: ${r}px) { [data-wb="${e}"] { ${i} } }` : "";
282
282
  }).filter(Boolean).join("\n");
283
283
  }
284
- function M(e, t) {
284
+ function N(e, t) {
285
285
  let n = [], r = (e) => {
286
286
  for (let [t, r] of Object.entries(e || {})) {
287
- let e = j(t, r.props);
287
+ let e = M(t, r.props);
288
288
  e && n.push(e);
289
289
  }
290
290
  };
@@ -292,10 +292,10 @@ function M(e, t) {
292
292
  for (let e of Object.values(t || {})) r(e.template?.nodes);
293
293
  return n.join("\n");
294
294
  }
295
- function N(e, t) {
295
+ function P(e, t) {
296
296
  let n = [], r = (e) => {
297
297
  for (let [t, r] of Object.entries(e || {})) {
298
- let e = O(t, r.props);
298
+ let e = k(t, r.props);
299
299
  e && n.push(e);
300
300
  }
301
301
  };
@@ -303,7 +303,7 @@ function N(e, t) {
303
303
  for (let e of Object.values(t || {})) r(e.template?.nodes);
304
304
  return n.join("\n");
305
305
  }
306
- var P = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", F = {
306
+ var F = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", I = {
307
307
  light: {
308
308
  background: "#ffffff",
309
309
  text: "#111827",
@@ -340,23 +340,23 @@ var P = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
340
340
  contrastText: "#052e2b"
341
341
  }
342
342
  }
343
- }, I = {
343
+ }, L = {
344
344
  font: "system",
345
345
  headingFont: "inherit",
346
- light: F.light,
347
- dark: F.dark
348
- }, L = {
346
+ light: I.light,
347
+ dark: I.dark
348
+ }, R = {
349
349
  system: {
350
350
  label: "System",
351
- value: P
351
+ value: F
352
352
  },
353
353
  inter: {
354
354
  label: "Inter",
355
- value: `"Inter", ${P}`
355
+ value: `"Inter", ${F}`
356
356
  },
357
357
  outfit: {
358
358
  label: "Outfit",
359
- value: `"Outfit", ${P}`
359
+ value: `"Outfit", ${F}`
360
360
  },
361
361
  serif: {
362
362
  label: "Serif",
@@ -366,7 +366,7 @@ var P = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
366
366
  label: "Mono",
367
367
  value: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
368
368
  }
369
- }, R = (e, t) => L[e]?.value ?? t, z = (e, ...t) => {
369
+ }, z = (e, t) => R[e]?.value ?? t, ee = (e, ...t) => {
370
370
  let n = Object.assign({}, e, ...t);
371
371
  return n.primary = {
372
372
  ...e.primary,
@@ -385,10 +385,10 @@ var P = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
385
385
  function B(e) {
386
386
  let { light: t, dark: n, font: r, headingFont: i, ...a } = e ?? {};
387
387
  return {
388
- font: r ?? I.font,
389
- headingFont: i ?? I.headingFont,
390
- light: z(F.light, a, t),
391
- dark: z(F.dark, n)
388
+ font: r ?? L.font,
389
+ headingFont: i ?? L.headingFont,
390
+ light: ee(I.light, a, t),
391
+ dark: ee(I.dark, n)
392
392
  };
393
393
  }
394
394
  function V(e) {
@@ -407,23 +407,23 @@ function V(e) {
407
407
  "--page-secondary-contrast": e.secondary.contrastText
408
408
  };
409
409
  }
410
- function ee(e) {
410
+ function H(e) {
411
411
  let t = B(e);
412
412
  return {
413
413
  backgroundColor: "var(--page-bg)",
414
414
  color: "var(--page-text)",
415
- fontFamily: R(t.font, P),
416
- "--page-heading-font": t.headingFont === "inherit" ? "inherit" : R(t.headingFont, "inherit")
415
+ fontFamily: z(t.font, F),
416
+ "--page-heading-font": t.headingFont === "inherit" ? "inherit" : z(t.headingFont, "inherit")
417
417
  };
418
418
  }
419
- function H(e, t = "light") {
419
+ function te(e, t = "light") {
420
420
  let n = B(e);
421
421
  return {
422
- ...ee(e),
422
+ ...H(e),
423
423
  ...V(n[t] ?? n.light)
424
424
  };
425
425
  }
426
- function te(e, t) {
426
+ function ne(e, t) {
427
427
  return e?.themeRef && t?.[e.themeRef] || e?.theme;
428
428
  }
429
429
  //#endregion
@@ -431,12 +431,13 @@ function te(e, t) {
431
431
  var U = n({
432
432
  tenant: "",
433
433
  apiUrl: "/api",
434
- locale: ""
435
- }), W = n(null), G = n(null), ne = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
434
+ locale: "",
435
+ settings: null
436
+ }), W = n(null), G = n(null), re = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
436
437
  function K(e, t) {
437
438
  if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
438
439
  }
439
- var re = (e) => {
440
+ var ie = (e) => {
440
441
  let t = [];
441
442
  for (let [n, r] of Object.entries(e ?? {})) {
442
443
  if (!/^[\w-]+$/.test(n)) continue;
@@ -449,33 +450,33 @@ var re = (e) => {
449
450
  function q(e) {
450
451
  return e == null ? "" : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "object" && !Array.isArray(e) && ("label" in e || "name" in e || "slug" in e) ? String(e.label ?? e.name ?? e.slug ?? "") : Array.isArray(e) ? e.map((e) => typeof e == "string" ? e : Array.isArray(e?.parts) ? e.parts.map((e) => e?.text ?? "").join("") : Array.isArray(e?.items) ? e.items.map((e) => e?.text ?? "").join(" ") : e && (e.label != null || e.name != null || e.slug != null) ? String(e.label ?? e.name ?? e.slug) : "").filter(Boolean).join(" ") : "";
451
452
  }
452
- function ie(e, t) {
453
- let n = t?.data ?? {}, r = re(n);
453
+ function ae(e, t) {
454
+ let n = t?.data ?? {}, r = ie(n);
454
455
  if (!r.length) return e;
455
- let i = RegExp(`:(${r.map(ne).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => q(K(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
456
+ let i = RegExp(`:(${r.map(re).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => q(K(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
456
457
  return a(e);
457
458
  }
458
- var J = {
459
+ var oe = {
459
460
  margin: 0,
460
461
  fontWeight: 700,
461
462
  lineHeight: 1.2,
462
463
  fontFamily: "var(--page-heading-font, inherit)"
463
- }, Y = { margin: 0 }, X = {
464
+ }, se = { margin: 0 }, J = {
464
465
  display: "inline-block",
465
466
  textDecoration: "none",
466
467
  cursor: "pointer",
467
468
  backgroundColor: "var(--page-accent, #111827)",
468
469
  color: "var(--page-accent-text, #ffffff)"
469
- }, ae = {
470
+ }, ce = {
470
471
  flexGrow: 1,
471
472
  display: "flex",
472
473
  flexDirection: "column",
473
474
  position: "relative"
474
- }, oe = {
475
+ }, le = {
475
476
  display: "flex",
476
477
  flexDirection: "column"
477
478
  };
478
- function se({ style: e }) {
479
+ function ue({ style: e }) {
479
480
  let t = e?.backgroundVideo;
480
481
  if (!t) return null;
481
482
  let n = {
@@ -486,7 +487,7 @@ function se({ style: e }) {
486
487
  zIndex: -1,
487
488
  pointerEvents: "none"
488
489
  }, r = e?.overlayColor ? `color-mix(in srgb, ${e.overlayColor} ${e.overlayOpacity ?? 50}%, transparent)` : null;
489
- return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("video", {
490
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("video", {
490
491
  src: t,
491
492
  autoPlay: !0,
492
493
  muted: !0,
@@ -496,73 +497,73 @@ function se({ style: e }) {
496
497
  ...n,
497
498
  objectFit: "cover"
498
499
  }
499
- }), r && /* @__PURE__ */ l("div", { style: {
500
+ }), r && /* @__PURE__ */ u("div", { style: {
500
501
  ...n,
501
502
  background: r
502
503
  } })] });
503
504
  }
504
- var ce = (e, t) => e?.backgroundVideo ? {
505
+ var de = (e, t) => e?.backgroundVideo ? {
505
506
  position: "relative",
506
507
  ...t,
507
- ...x(e)
508
+ ...S(e)
508
509
  } : {
509
510
  ...t,
510
- ...x(e)
511
+ ...S(e)
511
512
  };
512
- function le({ style: e, nodeRef: t, children: n }) {
513
- return /* @__PURE__ */ u("div", {
513
+ function fe({ style: e, nodeRef: t, children: n }) {
514
+ return /* @__PURE__ */ d("div", {
514
515
  ref: t,
515
516
  style: {
516
- ...ae,
517
- ...x(e)
517
+ ...ce,
518
+ ...S(e)
518
519
  },
519
- children: [/* @__PURE__ */ l(se, { style: e }), n]
520
+ children: [/* @__PURE__ */ u(ue, { style: e }), n]
520
521
  });
521
522
  }
522
- function ue({ style: e, nodeRef: t, children: n }) {
523
- return /* @__PURE__ */ u("section", {
523
+ function pe({ style: e, nodeRef: t, children: n }) {
524
+ return /* @__PURE__ */ d("section", {
524
525
  ref: t,
525
- style: ce(e, oe),
526
- children: [/* @__PURE__ */ l(se, { style: e }), n]
526
+ style: de(e, le),
527
+ children: [/* @__PURE__ */ u(ue, { style: e }), n]
527
528
  });
528
529
  }
529
- function de({ style: e, freeLayout: t, nodeRef: n, children: r }) {
530
+ function me({ style: e, freeLayout: t, nodeRef: n, children: r }) {
530
531
  let i = t ? {
531
532
  position: "relative",
532
533
  minHeight: 240
533
534
  } : null;
534
- return /* @__PURE__ */ u("div", {
535
+ return /* @__PURE__ */ d("div", {
535
536
  ref: n,
536
537
  style: i ? {
537
538
  ...i,
538
- ...ce(e)
539
- } : ce(e),
540
- children: [/* @__PURE__ */ l(se, { style: e }), r]
539
+ ...de(e)
540
+ } : de(e),
541
+ children: [/* @__PURE__ */ u(ue, { style: e }), r]
541
542
  });
542
543
  }
543
- function fe({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
544
- return /* @__PURE__ */ l(n, {
544
+ function he({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
545
+ return /* @__PURE__ */ u(n, {
545
546
  ref: a,
546
547
  style: {
547
- ...J,
548
- ...x(r)
548
+ ...oe,
549
+ ...S(r)
549
550
  },
550
- children: Z(t, e, i)
551
+ children: Y(t, e, i)
551
552
  });
552
553
  }
553
- var pe = {
554
- fontFamily: L.mono.value,
554
+ var ge = {
555
+ fontFamily: R.mono.value,
555
556
  background: "rgba(148, 163, 184, 0.18)",
556
557
  padding: "1px 5px",
557
558
  borderRadius: 4,
558
559
  fontSize: "0.9em"
559
560
  };
560
- function me(e, t = [], n, r) {
561
+ function _e(e, t = [], n, r) {
561
562
  let i = e;
562
- return t.includes("sup") ? i = /* @__PURE__ */ l("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ l("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ l("code", {
563
- style: pe,
563
+ 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", {
564
+ style: ge,
564
565
  children: i
565
- })), t.includes("strike") && (i = /* @__PURE__ */ l("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ l("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ l("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ l("strong", { children: i })), n && (i = /* @__PURE__ */ l("a", {
566
+ })), 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", {
566
567
  href: n,
567
568
  target: r || void 0,
568
569
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
@@ -570,36 +571,36 @@ function me(e, t = [], n, r) {
570
571
  children: i
571
572
  })), i;
572
573
  }
573
- function Z(e, n, r) {
574
+ function Y(e, n, r) {
574
575
  return e?.length ? e.map((e, n) => {
575
- if (e.slot) return /* @__PURE__ */ l(t, { children: r?.[e.slot] ?? null }, n);
576
- if (e.parts) return /* @__PURE__ */ l(t, { children: Z(e.parts, "", r) }, n);
576
+ if (e.slot) return /* @__PURE__ */ u(t, { children: r?.[e.slot] ?? null }, n);
577
+ if (e.parts) return /* @__PURE__ */ u(t, { children: Y(e.parts, "", r) }, n);
577
578
  let i = e.text;
578
- return e.sup ? i = /* @__PURE__ */ l("sup", { children: i }) : e.sub && (i = /* @__PURE__ */ l("sub", { children: i })), e.code && (i = /* @__PURE__ */ l("code", {
579
- style: pe,
579
+ return e.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : e.sub && (i = /* @__PURE__ */ u("sub", { children: i })), e.code && (i = /* @__PURE__ */ u("code", {
580
+ style: ge,
580
581
  children: i
581
- })), e.strike && (i = /* @__PURE__ */ l("s", { children: i })), e.underline && (i = /* @__PURE__ */ l("u", { children: i })), e.italic && (i = /* @__PURE__ */ l("em", { children: i })), e.bold && (i = /* @__PURE__ */ l("strong", { children: i })), (e.color || e.background) && (i = /* @__PURE__ */ l("span", {
582
+ })), e.strike && (i = /* @__PURE__ */ u("s", { children: i })), e.underline && (i = /* @__PURE__ */ u("u", { children: i })), e.italic && (i = /* @__PURE__ */ u("em", { children: i })), e.bold && (i = /* @__PURE__ */ u("strong", { children: i })), (e.color || e.background) && (i = /* @__PURE__ */ u("span", {
582
583
  style: {
583
584
  ...e.color && { color: e.color },
584
585
  ...e.background && { backgroundColor: e.background }
585
586
  },
586
587
  children: i
587
- })), e.href && (i = /* @__PURE__ */ l("a", {
588
+ })), e.href && (i = /* @__PURE__ */ u("a", {
588
589
  href: e.href,
589
590
  target: e.target || void 0,
590
591
  rel: e.target === "_blank" ? "noopener noreferrer" : void 0,
591
592
  style: { color: e.color ?? "inherit" },
592
593
  children: i
593
- })), /* @__PURE__ */ l(t, { children: i }, n);
594
+ })), /* @__PURE__ */ u(t, { children: i }, n);
594
595
  }) : n;
595
596
  }
596
- function he({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
597
- return /* @__PURE__ */ l("span", {
598
- style: x(a),
599
- children: e?.length ? Z(e, t) : me(t, n, r, i)
597
+ function ve({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
598
+ return /* @__PURE__ */ u("span", {
599
+ style: S(a),
600
+ children: e?.length ? Y(e, t) : _e(t, n, r, i)
600
601
  });
601
602
  }
602
- var ge = {
603
+ var ye = {
603
604
  h1: 40,
604
605
  h2: 32,
605
606
  h3: 26,
@@ -607,7 +608,7 @@ var ge = {
607
608
  h5: 19,
608
609
  h6: 16
609
610
  };
610
- function _e({ align: e = "center", width: t, wrap: n } = {}) {
611
+ function be({ align: e = "center", width: t, wrap: n } = {}) {
611
612
  let r = t ? `${t}%` : void 0;
612
613
  if (e === "full") return { width: "100%" };
613
614
  let i = e === "left" || e === "right";
@@ -641,8 +642,8 @@ function _e({ align: e = "center", width: t, wrap: n } = {}) {
641
642
  marginRight: "auto"
642
643
  };
643
644
  }
644
- function ve(e = [], t, n) {
645
- let r = n ?? ((e, n) => Z(e, n, t));
645
+ function xe(e = [], t, n) {
646
+ let r = n ?? ((e, n) => Y(e, n, t));
646
647
  return e.map((t, n) => {
647
648
  let i = {
648
649
  marginTop: 0,
@@ -650,7 +651,7 @@ function ve(e = [], t, n) {
650
651
  };
651
652
  if (t.type === "image") {
652
653
  if (!t.src) return null;
653
- let e = /* @__PURE__ */ l("img", {
654
+ let e = /* @__PURE__ */ u("img", {
654
655
  src: t.src,
655
656
  alt: t.alt || "",
656
657
  style: {
@@ -659,20 +660,20 @@ function ve(e = [], t, n) {
659
660
  borderRadius: 6
660
661
  }
661
662
  });
662
- return /* @__PURE__ */ u("figure", {
663
+ return /* @__PURE__ */ d("figure", {
663
664
  style: {
664
665
  marginLeft: 0,
665
666
  marginRight: 0,
666
667
  ...i,
667
- ..._e(t)
668
+ ...be(t)
668
669
  },
669
- children: [t.href ? /* @__PURE__ */ l("a", {
670
+ children: [t.href ? /* @__PURE__ */ u("a", {
670
671
  href: t.href,
671
672
  target: t.target || void 0,
672
673
  rel: t.target === "_blank" ? "noopener noreferrer" : void 0,
673
674
  style: { display: "block" },
674
675
  children: e
675
- }) : e, t.caption && /* @__PURE__ */ l("figcaption", {
676
+ }) : e, t.caption && /* @__PURE__ */ u("figcaption", {
676
677
  style: {
677
678
  fontSize: 13,
678
679
  opacity: .65,
@@ -683,16 +684,16 @@ function ve(e = [], t, n) {
683
684
  })]
684
685
  }, n);
685
686
  }
686
- if (t.type === "video") return ke(t.url) ? /* @__PURE__ */ l("div", {
687
+ if (t.type === "video") return Me(t.url) ? /* @__PURE__ */ u("div", {
687
688
  style: {
688
689
  ...i,
689
- ..._e({
690
+ ...be({
690
691
  align: t.align,
691
692
  wrap: t.wrap,
692
693
  width: t.width ?? 100
693
694
  })
694
695
  },
695
- children: /* @__PURE__ */ l(Ae, {
696
+ children: /* @__PURE__ */ u(Ne, {
696
697
  url: t.url,
697
698
  autoplay: t.autoplay,
698
699
  muted: t.muted,
@@ -701,146 +702,146 @@ function ve(e = [], t, n) {
701
702
  start: t.start
702
703
  })
703
704
  }, n) : null;
704
- if (t.type === "divider") return /* @__PURE__ */ l("hr", { style: {
705
+ if (t.type === "divider") return /* @__PURE__ */ u("hr", { style: {
705
706
  ...i,
706
707
  border: 0,
707
708
  borderTop: "1px solid rgba(148, 163, 184, 0.4)"
708
709
  } }, n);
709
710
  if (t.type === "ul" || t.type === "ol") {
710
711
  let e = t.type;
711
- return /* @__PURE__ */ l(e, {
712
+ return /* @__PURE__ */ u(e, {
712
713
  style: {
713
714
  ...i,
714
715
  paddingLeft: 24
715
716
  },
716
- children: (t.items ?? []).map((e, t) => /* @__PURE__ */ l("li", {
717
+ children: (t.items ?? []).map((e, t) => /* @__PURE__ */ u("li", {
717
718
  style: { marginBottom: 4 },
718
719
  children: r(e.parts, e.text)
719
720
  }, t))
720
721
  }, n);
721
722
  }
722
- if (t.type === "quote") return /* @__PURE__ */ l("blockquote", {
723
+ if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
723
724
  style: {
724
- ...be,
725
+ ...Ce,
725
726
  ...i
726
727
  },
727
728
  children: r(t.parts, t.text)
728
729
  }, n);
729
- if (ge[t.type]) {
730
+ if (ye[t.type]) {
730
731
  let e = t.type;
731
- return /* @__PURE__ */ l(e, {
732
+ return /* @__PURE__ */ u(e, {
732
733
  style: {
733
- ...J,
734
- fontSize: ge[t.type],
734
+ ...oe,
735
+ fontSize: ye[t.type],
735
736
  ...i
736
737
  },
737
738
  children: r(t.parts, t.text)
738
739
  }, n);
739
740
  }
740
- return /* @__PURE__ */ l("p", {
741
+ return /* @__PURE__ */ u("p", {
741
742
  style: {
742
- ...Y,
743
+ ...se,
743
744
  ...i
744
745
  },
745
746
  children: r(t.parts, t.text)
746
747
  }, n);
747
748
  });
748
749
  }
749
- function ye({ content: e, style: t, linked: n, nodeRef: r }) {
750
- return /* @__PURE__ */ l("div", {
750
+ function Se({ content: e, style: t, linked: n, nodeRef: r }) {
751
+ return /* @__PURE__ */ u("div", {
751
752
  ref: r,
752
753
  style: {
753
754
  display: "flow-root",
754
- ...x(t)
755
+ ...S(t)
755
756
  },
756
- children: ve(e, n)
757
+ children: xe(e, n)
757
758
  });
758
759
  }
759
- var be = {
760
+ var Ce = {
760
761
  margin: 0,
761
762
  padding: "8px 0 8px 20px",
762
763
  borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
763
764
  };
764
- function xe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
765
- return /* @__PURE__ */ l("blockquote", {
765
+ function we({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
766
+ return /* @__PURE__ */ u("blockquote", {
766
767
  ref: i,
767
768
  style: {
768
- ...be,
769
- ...x(n)
769
+ ...Ce,
770
+ ...S(n)
770
771
  },
771
- children: Z(t, e, r)
772
+ children: Y(t, e, r)
772
773
  });
773
774
  }
774
- function Se({ ordered: e, items: t = [], style: n, nodeRef: r }) {
775
- return /* @__PURE__ */ l(e ? "ol" : "ul", {
775
+ function Te({ ordered: e, items: t = [], style: n, nodeRef: r }) {
776
+ return /* @__PURE__ */ u(e ? "ol" : "ul", {
776
777
  ref: r,
777
778
  style: {
778
779
  margin: 0,
779
780
  paddingLeft: 24,
780
- ...x(n)
781
+ ...S(n)
781
782
  },
782
- children: t.map((e, t) => /* @__PURE__ */ l("li", {
783
+ children: t.map((e, t) => /* @__PURE__ */ u("li", {
783
784
  style: { marginBottom: 4 },
784
- children: Z(e.parts, e.text)
785
+ children: Y(e.parts, e.text)
785
786
  }, t))
786
787
  });
787
788
  }
788
- function Ce({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
789
- return /* @__PURE__ */ l("p", {
789
+ function Ee({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
790
+ return /* @__PURE__ */ u("p", {
790
791
  ref: i,
791
792
  style: {
792
- ...Y,
793
- ...x(n)
793
+ ...se,
794
+ ...S(n)
794
795
  },
795
- children: Z(t, e, r)
796
+ children: Y(t, e, r)
796
797
  });
797
798
  }
798
- var we = {
799
+ var De = {
799
800
  color: "var(--page-accent, inherit)",
800
801
  textDecoration: "underline",
801
802
  textUnderlineOffset: 3,
802
803
  cursor: "pointer"
803
804
  };
804
- function Te({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
805
- return /* @__PURE__ */ l("a", {
805
+ function Oe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
806
+ return /* @__PURE__ */ u("a", {
806
807
  ref: o,
807
808
  href: n || "#",
808
809
  target: r || void 0,
809
810
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
810
811
  style: {
811
- ...we,
812
- ...x(i)
812
+ ...De,
813
+ ...S(i)
813
814
  },
814
- children: Z(t, e, a)
815
+ children: Y(t, e, a)
815
816
  });
816
817
  }
817
- function Ee({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
818
- return /* @__PURE__ */ l("a", {
818
+ function ke({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
819
+ return /* @__PURE__ */ u("a", {
819
820
  ref: o,
820
821
  href: n || "#",
821
822
  target: r || void 0,
822
823
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
823
824
  style: {
824
- ...X,
825
- ...x(i)
825
+ ...J,
826
+ ...S(i)
826
827
  },
827
- children: Z(t, e, a)
828
+ children: Y(t, e, a)
828
829
  });
829
830
  }
830
- function De({ src: e, alt: t, style: n, nodeRef: r }) {
831
- return e ? /* @__PURE__ */ l("img", {
831
+ function Ae({ src: e, alt: t, style: n, nodeRef: r }) {
832
+ return e ? /* @__PURE__ */ u("img", {
832
833
  ref: r,
833
834
  src: e,
834
835
  alt: t || "",
835
836
  style: {
836
837
  display: "block",
837
838
  maxWidth: "100%",
838
- ...x(n)
839
+ ...S(n)
839
840
  }
840
841
  }) : null;
841
842
  }
842
- function Oe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
843
- return e ? /* @__PURE__ */ l("video", {
843
+ function je({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
844
+ return e ? /* @__PURE__ */ u("video", {
844
845
  ref: s,
845
846
  src: e,
846
847
  poster: t || void 0,
@@ -853,25 +854,25 @@ function Oe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
853
854
  display: "block",
854
855
  width: "100%",
855
856
  maxWidth: "100%",
856
- ...x(o)
857
+ ...S(o)
857
858
  }
858
859
  }) : null;
859
860
  }
860
- var ke = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
861
- function Ae({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
862
- let c = ke(e);
861
+ var Me = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
862
+ function Ne({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
863
+ let c = Me(e);
863
864
  if (!c) return null;
864
- let u = new URLSearchParams({ rel: "0" });
865
- return t && u.set("autoplay", "1"), (n || t) && u.set("mute", "1"), i || u.set("controls", "0"), r && (u.set("loop", "1"), u.set("playlist", c)), Number(a) > 0 && u.set("start", String(Math.floor(Number(a)))), /* @__PURE__ */ l("div", {
865
+ let l = new URLSearchParams({ rel: "0" });
866
+ 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__ */ u("div", {
866
867
  ref: s,
867
868
  style: {
868
869
  position: "relative",
869
870
  width: "100%",
870
871
  paddingTop: "56.25%",
871
- ...x(o)
872
+ ...S(o)
872
873
  },
873
- children: /* @__PURE__ */ l("iframe", {
874
- src: `https://www.youtube-nocookie.com/embed/${c}?${u}`,
874
+ children: /* @__PURE__ */ u("iframe", {
875
+ src: `https://www.youtube-nocookie.com/embed/${c}?${l}`,
875
876
  title: "YouTube video",
876
877
  allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
877
878
  allowFullScreen: !0,
@@ -885,8 +886,8 @@ function Ae({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
885
886
  })
886
887
  });
887
888
  }
888
- function je({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
889
- return e ? /* @__PURE__ */ l("iframe", {
889
+ function Pe({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
890
+ return e ? /* @__PURE__ */ u("iframe", {
890
891
  ref: i,
891
892
  src: e,
892
893
  title: t || "Embedded frame",
@@ -897,31 +898,31 @@ function je({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
897
898
  width: "100%",
898
899
  height: 300,
899
900
  border: 0,
900
- ...x(r)
901
+ ...S(r)
901
902
  }
902
903
  }) : null;
903
904
  }
904
- function Me({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
905
- let [a, o] = s(null);
906
- return i(() => {
907
- a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
905
+ function Fe({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
906
+ let [i, o] = c(null);
907
+ return a(() => {
908
+ i && (i.innerHTML = e || "", t && i.querySelectorAll("script").forEach((e) => {
908
909
  let t = document.createElement("script");
909
910
  for (let { name: n, value: r } of e.attributes) t.setAttribute(n, r);
910
911
  t.text = e.textContent, e.replaceWith(t);
911
912
  }));
912
913
  }, [
913
- a,
914
+ i,
914
915
  e,
915
916
  t
916
- ]), /* @__PURE__ */ l("div", {
917
+ ]), /* @__PURE__ */ u("div", {
917
918
  ref: (e) => {
918
919
  o(e), r && r(e);
919
920
  },
920
- style: x(n)
921
+ style: S(n)
921
922
  });
922
923
  }
923
- function Ne({ height: e, nodeRef: t }) {
924
- return /* @__PURE__ */ l("div", {
924
+ function Ie({ height: e, nodeRef: t }) {
925
+ return /* @__PURE__ */ u("div", {
925
926
  ref: t,
926
927
  style: {
927
928
  height: e || 32,
@@ -930,18 +931,18 @@ function Ne({ height: e, nodeRef: t }) {
930
931
  }
931
932
  });
932
933
  }
933
- function Pe({ style: e, nodeRef: t }) {
934
- return /* @__PURE__ */ l("div", {
934
+ function Le({ style: e, nodeRef: t }) {
935
+ return /* @__PURE__ */ u("div", {
935
936
  ref: t,
936
937
  style: {
937
938
  height: 1,
938
939
  alignSelf: "stretch",
939
940
  flexShrink: 0,
940
- ...x(e)
941
+ ...S(e)
941
942
  }
942
943
  });
943
944
  }
944
- var Fe = {
945
+ var Re = {
945
946
  position: "absolute",
946
947
  top: "50%",
947
948
  transform: "translateY(-50%)",
@@ -958,7 +959,7 @@ var Fe = {
958
959
  alignItems: "center",
959
960
  justifyContent: "center",
960
961
  padding: 0
961
- }, Ie = {
962
+ }, ze = {
962
963
  bottom: {
963
964
  inset: "auto 0 0 0",
964
965
  padding: "40px 24px 20px",
@@ -977,10 +978,10 @@ var Fe = {
977
978
  padding: 24,
978
979
  textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
979
980
  }
980
- }, Le = 48;
981
- function Re({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: d, nodeRef: f }) {
982
- let [p, m] = s(0), [h, g] = s(!1), [_, v] = s(null), y = e ? Math.min(p, e - 1) : 0;
983
- if (i(() => {
981
+ }, Be = 48;
982
+ function Ve({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: f }) {
983
+ let [p, m] = c(0), [h, g] = c(!1), [_, v] = c(null), y = e ? Math.min(p, e - 1) : 0;
984
+ if (a(() => {
984
985
  if (!n || h || _ || e < 2) return;
985
986
  let t = setInterval(() => m((t) => (t + 1) % e), Math.max(2, Number(r) || 5) * 1e3);
986
987
  return () => clearInterval(t);
@@ -991,12 +992,12 @@ function Re({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
991
992
  r,
992
993
  e
993
994
  ]), !e) return null;
994
- let b = (t) => m((t + e) % e), S = () => {
995
+ let b = (t) => m((t + e) % e), x = () => {
995
996
  if (!_) return;
996
997
  let { dx: e } = _;
997
- v(null), e < -48 ? b(y + 1) : e > Le && b(y - 1);
998
+ v(null), e < -48 ? b(y + 1) : e > Be && b(y - 1);
998
999
  };
999
- return /* @__PURE__ */ u("div", {
1000
+ return /* @__PURE__ */ d("div", {
1000
1001
  ref: f,
1001
1002
  onMouseEnter: () => g(!0),
1002
1003
  onMouseLeave: () => g(!1),
@@ -1010,8 +1011,8 @@ function Re({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1010
1011
  ...t,
1011
1012
  dx: e.clientX - t.startX
1012
1013
  }) : void 0,
1013
- onPointerUp: S,
1014
- onPointerCancel: S,
1014
+ onPointerUp: x,
1015
+ onPointerCancel: x,
1015
1016
  style: {
1016
1017
  position: "relative",
1017
1018
  overflow: "hidden",
@@ -1019,16 +1020,16 @@ function Re({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1019
1020
  touchAction: "pan-y",
1020
1021
  userSelect: _ ? "none" : void 0,
1021
1022
  cursor: _ ? "grabbing" : void 0,
1022
- ...x(d)
1023
+ ...S(s)
1023
1024
  },
1024
- children: [/* @__PURE__ */ l("div", {
1025
+ children: [/* @__PURE__ */ u("div", {
1025
1026
  style: {
1026
1027
  display: "flex",
1027
- height: a,
1028
+ height: i,
1028
1029
  transform: `translateX(calc(${-y * 100}% + ${_?.dx ?? 0}px))`,
1029
1030
  transition: _ ? "none" : "transform 450ms ease"
1030
1031
  },
1031
- children: Array.from({ length: e }, (e, n) => /* @__PURE__ */ l("div", {
1032
+ children: Array.from({ length: e }, (e, n) => /* @__PURE__ */ u("div", {
1032
1033
  style: {
1033
1034
  position: "relative",
1034
1035
  width: "100%",
@@ -1037,28 +1038,28 @@ function Re({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1037
1038
  },
1038
1039
  children: t(n)
1039
1040
  }, n))
1040
- }), e > 1 && /* @__PURE__ */ u(c, { children: [
1041
- /* @__PURE__ */ l("button", {
1041
+ }), e > 1 && /* @__PURE__ */ d(l, { children: [
1042
+ /* @__PURE__ */ u("button", {
1042
1043
  type: "button",
1043
1044
  "aria-label": "Previous slide",
1044
1045
  style: {
1045
- ...Fe,
1046
+ ...Re,
1046
1047
  left: 12
1047
1048
  },
1048
1049
  onClick: () => b(y - 1),
1049
1050
  children: "‹"
1050
1051
  }),
1051
- /* @__PURE__ */ l("button", {
1052
+ /* @__PURE__ */ u("button", {
1052
1053
  type: "button",
1053
1054
  "aria-label": "Next slide",
1054
1055
  style: {
1055
- ...Fe,
1056
+ ...Re,
1056
1057
  right: 12
1057
1058
  },
1058
1059
  onClick: () => b(y + 1),
1059
1060
  children: "›"
1060
1061
  }),
1061
- /* @__PURE__ */ l("div", {
1062
+ /* @__PURE__ */ u("div", {
1062
1063
  style: {
1063
1064
  position: "absolute",
1064
1065
  bottom: 10,
@@ -1068,7 +1069,7 @@ function Re({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1068
1069
  justifyContent: "center",
1069
1070
  gap: 6
1070
1071
  },
1071
- children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ l("button", {
1072
+ children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ u("button", {
1072
1073
  type: "button",
1073
1074
  "aria-label": `Go to slide ${t + 1}`,
1074
1075
  onClick: () => b(t),
@@ -1086,7 +1087,7 @@ function Re({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1086
1087
  ] })]
1087
1088
  });
1088
1089
  }
1089
- var ze = (e, t) => ({
1090
+ var He = (e, t) => ({
1090
1091
  position: "absolute",
1091
1092
  inset: 0,
1092
1093
  backgroundImage: e ? `url(${e})` : "none",
@@ -1094,26 +1095,26 @@ var ze = (e, t) => ({
1094
1095
  backgroundSize: "cover",
1095
1096
  backgroundPosition: "center"
1096
1097
  });
1097
- function Be({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1098
- return e.length ? /* @__PURE__ */ l(Re, {
1098
+ function Ue({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1099
+ return e.length ? /* @__PURE__ */ u(Ve, {
1099
1100
  ...r,
1100
1101
  count: e.length,
1101
1102
  renderSlide: (r) => {
1102
1103
  let i = e[r];
1103
- return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", { style: ze(i.image) }), (i.title || i.text) && /* @__PURE__ */ u("div", {
1104
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: He(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1104
1105
  style: {
1105
1106
  position: "absolute",
1106
1107
  color: "#fff",
1107
1108
  textAlign: n,
1108
- ...Ie[t] ?? Ie.bottom
1109
+ ...ze[t] ?? ze.bottom
1109
1110
  },
1110
- children: [i.title && /* @__PURE__ */ l("div", {
1111
+ children: [i.title && /* @__PURE__ */ u("div", {
1111
1112
  style: {
1112
1113
  fontSize: 22,
1113
1114
  fontWeight: 700
1114
1115
  },
1115
1116
  children: i.title
1116
- }), i.text && /* @__PURE__ */ l("div", {
1117
+ }), i.text && /* @__PURE__ */ u("div", {
1117
1118
  style: {
1118
1119
  fontSize: 14,
1119
1120
  opacity: .9,
@@ -1125,13 +1126,13 @@ function Be({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
1125
1126
  }
1126
1127
  }) : null;
1127
1128
  }
1128
- function Ve({ slides: e = [], linked: t, ...n }) {
1129
- return e.length ? /* @__PURE__ */ l(Re, {
1129
+ function We({ slides: e = [], linked: t, ...n }) {
1130
+ return e.length ? /* @__PURE__ */ u(Ve, {
1130
1131
  ...n,
1131
1132
  count: e.length,
1132
1133
  renderSlide: (n) => {
1133
1134
  let r = e[n];
1134
- return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", { style: ze(r.image, r.color) }), /* @__PURE__ */ l("div", {
1135
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: He(r.image, r.color) }), /* @__PURE__ */ u("div", {
1135
1136
  style: {
1136
1137
  position: "absolute",
1137
1138
  inset: 0,
@@ -1143,33 +1144,33 @@ function Ve({ slides: e = [], linked: t, ...n }) {
1143
1144
  }
1144
1145
  }) : null;
1145
1146
  }
1146
- var He = {
1147
+ var Ge = {
1147
1148
  color: "inherit",
1148
1149
  textDecoration: "none",
1149
1150
  fontSize: 14,
1150
1151
  opacity: .85
1151
- }, Ue = {
1152
+ }, Ke = {
1152
1153
  background: "var(--page-bg, #ffffff)",
1153
1154
  color: "var(--page-text, #111827)",
1154
1155
  border: "1px solid rgba(148, 163, 184, 0.25)",
1155
1156
  boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
1156
1157
  zIndex: 60
1157
1158
  };
1158
- function We({ brand: e, logo: n, links: r = [], style: a, nodeRef: o, menu: c = "auto", breakpoint: d = 768 }) {
1159
- let [f, p] = s(null), [m, h] = s(!1), [g, _] = s(!1), [v, y] = s(null);
1160
- i(() => {
1159
+ function qe({ brand: e, logo: n, links: r = [], style: i, nodeRef: o, menu: s = "auto", breakpoint: l = 768 }) {
1160
+ let [f, p] = c(null), [m, h] = c(!1), [g, _] = c(!1), [v, y] = c(null);
1161
+ a(() => {
1161
1162
  if (!f) return;
1162
- let e = new ResizeObserver(() => h(f.offsetWidth < d));
1163
+ let e = new ResizeObserver(() => h(f.offsetWidth < l));
1163
1164
  return e.observe(f), () => e.disconnect();
1164
- }, [f, d]);
1165
- let b = c === "hamburger" || c === "auto" && m, S = (e, t) => /* @__PURE__ */ u("a", {
1165
+ }, [f, l]);
1166
+ let b = s === "hamburger" || s === "auto" && m, x = (e, t) => /* @__PURE__ */ d("a", {
1166
1167
  href: e.href || "#",
1167
1168
  style: {
1168
- ...He,
1169
+ ...Ge,
1169
1170
  display: "block",
1170
1171
  ...t
1171
1172
  },
1172
- children: [e.label, e.desc && /* @__PURE__ */ l("span", {
1173
+ children: [e.label, e.desc && /* @__PURE__ */ u("span", {
1173
1174
  style: {
1174
1175
  display: "block",
1175
1176
  fontSize: 12,
@@ -1179,7 +1180,7 @@ function We({ brand: e, logo: n, links: r = [], style: a, nodeRef: o, menu: c =
1179
1180
  children: e.desc
1180
1181
  })]
1181
1182
  }, e.key);
1182
- return /* @__PURE__ */ u("nav", {
1183
+ return /* @__PURE__ */ d("nav", {
1183
1184
  ref: (e) => {
1184
1185
  p(e), o && o(e);
1185
1186
  },
@@ -1191,10 +1192,10 @@ function We({ brand: e, logo: n, links: r = [], style: a, nodeRef: o, menu: c =
1191
1192
  padding: "14px 24px",
1192
1193
  width: "100%",
1193
1194
  position: "relative",
1194
- ...x(a)
1195
+ ...S(i)
1195
1196
  },
1196
1197
  children: [
1197
- n && /* @__PURE__ */ l("img", {
1198
+ n && /* @__PURE__ */ u("img", {
1198
1199
  src: n,
1199
1200
  alt: e || "Logo",
1200
1201
  style: {
@@ -1202,7 +1203,7 @@ function We({ brand: e, logo: n, links: r = [], style: a, nodeRef: o, menu: c =
1202
1203
  display: "block"
1203
1204
  }
1204
1205
  }),
1205
- e && /* @__PURE__ */ l("div", {
1206
+ e && /* @__PURE__ */ u("div", {
1206
1207
  style: {
1207
1208
  fontWeight: 700,
1208
1209
  fontSize: 18,
@@ -1210,8 +1211,8 @@ function We({ brand: e, logo: n, links: r = [], style: a, nodeRef: o, menu: c =
1210
1211
  },
1211
1212
  children: e
1212
1213
  }),
1213
- /* @__PURE__ */ l("div", { style: { flexGrow: 1 } }),
1214
- b ? /* @__PURE__ */ l("button", {
1214
+ /* @__PURE__ */ u("div", { style: { flexGrow: 1 } }),
1215
+ b ? /* @__PURE__ */ u("button", {
1215
1216
  type: "button",
1216
1217
  "aria-label": g ? "Close menu" : "Open menu",
1217
1218
  onClick: () => _(!g),
@@ -1225,7 +1226,7 @@ function We({ brand: e, logo: n, links: r = [], style: a, nodeRef: o, menu: c =
1225
1226
  padding: 4
1226
1227
  },
1227
1228
  children: g ? "✕" : "☰"
1228
- }) : /* @__PURE__ */ l("div", {
1229
+ }) : /* @__PURE__ */ u("div", {
1229
1230
  style: {
1230
1231
  display: "flex",
1231
1232
  gap: 20,
@@ -1234,29 +1235,29 @@ function We({ brand: e, logo: n, links: r = [], style: a, nodeRef: o, menu: c =
1234
1235
  },
1235
1236
  children: r.map((e) => {
1236
1237
  let t = e.children ?? [];
1237
- if (!t.length) return /* @__PURE__ */ l("a", {
1238
+ if (!t.length) return /* @__PURE__ */ u("a", {
1238
1239
  href: e.href || "#",
1239
- style: He,
1240
+ style: Ge,
1240
1241
  children: e.label
1241
1242
  }, e.key);
1242
1243
  let n = e.type === "mega";
1243
- return /* @__PURE__ */ u("span", {
1244
+ return /* @__PURE__ */ d("span", {
1244
1245
  style: {
1245
1246
  position: n ? "static" : "relative",
1246
1247
  display: "inline-flex"
1247
1248
  },
1248
1249
  onMouseEnter: () => y(e.key),
1249
1250
  onMouseLeave: () => y(null),
1250
- children: [/* @__PURE__ */ u("a", {
1251
+ children: [/* @__PURE__ */ d("a", {
1251
1252
  href: e.href || "#",
1252
1253
  style: {
1253
- ...He,
1254
+ ...Ge,
1254
1255
  cursor: "pointer"
1255
1256
  },
1256
1257
  children: [
1257
1258
  e.label,
1258
1259
  " ",
1259
- /* @__PURE__ */ l("span", {
1260
+ /* @__PURE__ */ u("span", {
1260
1261
  style: {
1261
1262
  fontSize: 9,
1262
1263
  opacity: .6
@@ -1264,9 +1265,9 @@ function We({ brand: e, logo: n, links: r = [], style: a, nodeRef: o, menu: c =
1264
1265
  children: "▼"
1265
1266
  })
1266
1267
  ]
1267
- }), v === e.key && (n ? /* @__PURE__ */ l("div", {
1268
+ }), v === e.key && (n ? /* @__PURE__ */ u("div", {
1268
1269
  style: {
1269
- ...Ue,
1270
+ ...Ke,
1270
1271
  position: "absolute",
1271
1272
  left: 0,
1272
1273
  right: 0,
@@ -1276,13 +1277,13 @@ function We({ brand: e, logo: n, links: r = [], style: a, nodeRef: o, menu: c =
1276
1277
  gridTemplateColumns: "repeat(auto-fit, minmax(170px, 1fr))",
1277
1278
  gap: 16
1278
1279
  },
1279
- children: t.map((e) => S(e, {
1280
+ children: t.map((e) => x(e, {
1280
1281
  padding: "6px 8px",
1281
1282
  borderRadius: 6
1282
1283
  }))
1283
- }) : /* @__PURE__ */ l("div", {
1284
+ }) : /* @__PURE__ */ u("div", {
1284
1285
  style: {
1285
- ...Ue,
1286
+ ...Ke,
1286
1287
  position: "absolute",
1287
1288
  top: "100%",
1288
1289
  left: 0,
@@ -1292,7 +1293,7 @@ function We({ brand: e, logo: n, links: r = [], style: a, nodeRef: o, menu: c =
1292
1293
  display: "flex",
1293
1294
  flexDirection: "column"
1294
1295
  },
1295
- children: t.map((e) => S(e, {
1296
+ children: t.map((e) => x(e, {
1296
1297
  padding: "8px 12px",
1297
1298
  borderRadius: 6
1298
1299
  }))
@@ -1300,7 +1301,7 @@ function We({ brand: e, logo: n, links: r = [], style: a, nodeRef: o, menu: c =
1300
1301
  }, e.key);
1301
1302
  })
1302
1303
  }),
1303
- b && g && /* @__PURE__ */ l("div", {
1304
+ b && g && /* @__PURE__ */ u("div", {
1304
1305
  style: {
1305
1306
  flexBasis: "100%",
1306
1307
  width: "100%",
@@ -1308,35 +1309,35 @@ function We({ brand: e, logo: n, links: r = [], style: a, nodeRef: o, menu: c =
1308
1309
  flexDirection: "column",
1309
1310
  paddingTop: 10
1310
1311
  },
1311
- children: r.map((e) => /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ l("a", {
1312
+ children: r.map((e) => /* @__PURE__ */ d(t, { children: [/* @__PURE__ */ u("a", {
1312
1313
  href: e.href || "#",
1313
1314
  style: {
1314
- ...He,
1315
+ ...Ge,
1315
1316
  padding: "10px 4px",
1316
1317
  fontWeight: (e.children ?? []).length ? 600 : 400,
1317
1318
  opacity: 1
1318
1319
  },
1319
1320
  children: e.label
1320
- }), (e.children ?? []).map((e) => S(e, { padding: "8px 4px 8px 22px" }))] }, e.key))
1321
+ }), (e.children ?? []).map((e) => x(e, { padding: "8px 4px 8px 22px" }))] }, e.key))
1321
1322
  })
1322
1323
  ]
1323
1324
  });
1324
1325
  }
1325
- function Ge({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1326
- let [i, a] = s(0), o = e.length ? Math.min(i, e.length - 1) : 0;
1327
- return e.length ? /* @__PURE__ */ u("div", {
1326
+ function Je({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1327
+ let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
1328
+ return e.length ? /* @__PURE__ */ d("div", {
1328
1329
  ref: r,
1329
1330
  style: {
1330
1331
  width: "100%",
1331
- ...x(n)
1332
+ ...S(n)
1332
1333
  },
1333
- children: [/* @__PURE__ */ l("div", {
1334
+ children: [/* @__PURE__ */ u("div", {
1334
1335
  style: {
1335
1336
  display: "flex",
1336
1337
  gap: 4,
1337
1338
  borderBottom: "1px solid rgba(148, 163, 184, 0.35)"
1338
1339
  },
1339
- children: e.map((e, t) => /* @__PURE__ */ l("button", {
1340
+ children: e.map((e, t) => /* @__PURE__ */ u("button", {
1340
1341
  type: "button",
1341
1342
  onClick: () => a(t),
1342
1343
  style: {
@@ -1353,7 +1354,7 @@ function Ge({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1353
1354
  },
1354
1355
  children: e.label || `Tab ${t + 1}`
1355
1356
  }, e.key))
1356
- }), e.map((e, n) => /* @__PURE__ */ l("div", {
1357
+ }), e.map((e, n) => /* @__PURE__ */ u("div", {
1357
1358
  style: {
1358
1359
  display: n === o ? "flex" : "none",
1359
1360
  flexDirection: "column"
@@ -1362,26 +1363,26 @@ function Ge({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1362
1363
  }, e.key))]
1363
1364
  }) : null;
1364
1365
  }
1365
- function Ke({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1366
- let [a, o] = s(() => new Set(e.length ? [e[0].key] : []));
1366
+ function Ye({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1367
+ let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
1367
1368
  if (!e.length) return null;
1368
- let c = (e) => o((t) => {
1369
+ let s = (e) => o((t) => {
1369
1370
  let r = new Set(n ? t : []);
1370
1371
  return t.has(e) ? r.delete(e) : r.add(e), r;
1371
1372
  });
1372
- return /* @__PURE__ */ l("div", {
1373
+ return /* @__PURE__ */ u("div", {
1373
1374
  ref: i,
1374
1375
  style: {
1375
1376
  width: "100%",
1376
- ...x(r)
1377
+ ...S(r)
1377
1378
  },
1378
1379
  children: e.map((n, r) => {
1379
1380
  let i = a.has(n.key);
1380
- return /* @__PURE__ */ u("div", {
1381
+ return /* @__PURE__ */ d("div", {
1381
1382
  style: { borderBottom: r < e.length - 1 ? "1px solid rgba(148, 163, 184, 0.35)" : "none" },
1382
- children: [/* @__PURE__ */ u("button", {
1383
+ children: [/* @__PURE__ */ d("button", {
1383
1384
  type: "button",
1384
- onClick: () => c(n.key),
1385
+ onClick: () => s(n.key),
1385
1386
  style: {
1386
1387
  width: "100%",
1387
1388
  display: "flex",
@@ -1398,7 +1399,7 @@ function Ke({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
1398
1399
  textAlign: "left",
1399
1400
  cursor: "pointer"
1400
1401
  },
1401
- children: [n.title || `Item ${r + 1}`, /* @__PURE__ */ l("span", {
1402
+ children: [n.title || `Item ${r + 1}`, /* @__PURE__ */ u("span", {
1402
1403
  "aria-hidden": !0,
1403
1404
  style: {
1404
1405
  fontSize: 12,
@@ -1408,7 +1409,7 @@ function Ke({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
1408
1409
  },
1409
1410
  children: "▼"
1410
1411
  })]
1411
- }), /* @__PURE__ */ l("div", {
1412
+ }), /* @__PURE__ */ u("div", {
1412
1413
  style: {
1413
1414
  display: i ? "flex" : "none",
1414
1415
  flexDirection: "column"
@@ -1419,15 +1420,15 @@ function Ke({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
1419
1420
  })
1420
1421
  });
1421
1422
  }
1422
- var qe = {
1423
+ var Xe = {
1423
1424
  display: "flex",
1424
1425
  flexDirection: "column",
1425
1426
  gap: "12px"
1426
- }, Je = {
1427
+ }, X = {
1427
1428
  fontSize: "14px",
1428
1429
  fontWeight: 500,
1429
1430
  color: "var(--page-text, #111827)"
1430
- }, Ye = {
1431
+ }, Z = {
1431
1432
  padding: "10px 12px",
1432
1433
  border: "1px solid #d1d5db",
1433
1434
  borderRadius: "6px",
@@ -1437,13 +1438,13 @@ var qe = {
1437
1438
  boxSizing: "border-box",
1438
1439
  backgroundColor: "#ffffff",
1439
1440
  color: "#111827"
1440
- }, Xe = {
1441
+ }, Ze = {
1441
1442
  display: "flex",
1442
1443
  alignItems: "center",
1443
1444
  gap: "8px",
1444
1445
  fontSize: "14px",
1445
1446
  color: "var(--page-text, #111827)"
1446
- }, Ze = (e) => e ? {
1447
+ }, Q = (e) => e ? {
1447
1448
  readOnly: !0,
1448
1449
  tabIndex: -1,
1449
1450
  onMouseDown: (e) => e.preventDefault()
@@ -1484,9 +1485,9 @@ function tt(e, t) {
1484
1485
  return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
1485
1486
  }
1486
1487
  function nt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1487
- let a = /* @__PURE__ */ u("span", {
1488
+ let a = /* @__PURE__ */ d("span", {
1488
1489
  style: {
1489
- ...Je,
1490
+ ...X,
1490
1491
  fontSize: 14
1491
1492
  },
1492
1493
  children: [e.label, e.required ? " *" : ""]
@@ -1499,7 +1500,7 @@ function nt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1499
1500
  value: t ?? "",
1500
1501
  onChange: (t) => n(e.name, t.target.value)
1501
1502
  };
1502
- return e.type === "display" ? /* @__PURE__ */ l(e.variant && e.variant !== "p" ? e.variant : "p", {
1503
+ return e.type === "display" ? /* @__PURE__ */ u(e.variant && e.variant !== "p" ? e.variant : "p", {
1503
1504
  style: {
1504
1505
  margin: 0,
1505
1506
  color: e.color || "inherit",
@@ -1516,7 +1517,7 @@ function nt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1516
1517
  lineHeight: 1.35
1517
1518
  },
1518
1519
  children: e.label
1519
- }) : e.type === "image" ? e.src ? /* @__PURE__ */ l("img", {
1520
+ }) : e.type === "image" ? e.src ? /* @__PURE__ */ u("img", {
1520
1521
  src: e.src,
1521
1522
  alt: e.label ?? "",
1522
1523
  style: {
@@ -1524,10 +1525,10 @@ function nt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1524
1525
  borderRadius: 8,
1525
1526
  display: "block"
1526
1527
  }
1527
- }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ l(Ae, {
1528
+ }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(Ne, {
1528
1529
  url: e.src,
1529
1530
  style: { width: "100%" }
1530
- }) : /* @__PURE__ */ l("video", {
1531
+ }) : /* @__PURE__ */ u("video", {
1531
1532
  src: e.src,
1532
1533
  controls: !0,
1533
1534
  style: {
@@ -1535,28 +1536,28 @@ function nt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1535
1536
  borderRadius: 8,
1536
1537
  display: "block"
1537
1538
  }
1538
- }) : null : /* @__PURE__ */ u("label", {
1539
+ }) : null : /* @__PURE__ */ d("label", {
1539
1540
  style: $e,
1540
1541
  children: [
1541
1542
  a,
1542
- e.type === "textarea" || e.multiline ? /* @__PURE__ */ l("textarea", {
1543
+ e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
1543
1544
  ...o,
1544
1545
  rows: 4,
1545
1546
  style: {
1546
1547
  ...et,
1547
1548
  resize: "vertical"
1548
1549
  }
1549
- }) : e.type === "select" ? /* @__PURE__ */ u("select", {
1550
+ }) : e.type === "select" ? /* @__PURE__ */ d("select", {
1550
1551
  ...o,
1551
1552
  disabled: o.disabled || !!e.parentField && !i?.[e.parentField],
1552
- children: [/* @__PURE__ */ l("option", {
1553
+ children: [/* @__PURE__ */ u("option", {
1553
1554
  value: "",
1554
1555
  children: e.placeholder || "—"
1555
- }), tt(e, i).map((e, t) => /* @__PURE__ */ l("option", {
1556
+ }), tt(e, i).map((e, t) => /* @__PURE__ */ u("option", {
1556
1557
  value: typeof e == "string" ? e : e.value,
1557
1558
  children: typeof e == "string" ? e : e.label ?? e.value
1558
1559
  }, t))]
1559
- }) : e.type === "checkbox" ? /* @__PURE__ */ l("input", {
1560
+ }) : e.type === "checkbox" ? /* @__PURE__ */ u("input", {
1560
1561
  type: "checkbox",
1561
1562
  name: e.name,
1562
1563
  required: e.required || void 0,
@@ -1567,7 +1568,7 @@ function nt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1567
1568
  width: 18,
1568
1569
  height: 18
1569
1570
  }
1570
- }) : e.type === "upload" ? /* @__PURE__ */ l("input", {
1571
+ }) : e.type === "upload" ? /* @__PURE__ */ u("input", {
1571
1572
  type: "file",
1572
1573
  name: e.name,
1573
1574
  accept: e.accept || void 0,
@@ -1578,7 +1579,7 @@ function nt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1578
1579
  font: "inherit",
1579
1580
  fontSize: 14
1580
1581
  }
1581
- }) : /* @__PURE__ */ l("input", {
1582
+ }) : /* @__PURE__ */ u("input", {
1582
1583
  ...o,
1583
1584
  type: {
1584
1585
  email: "email",
@@ -1589,7 +1590,7 @@ function nt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1589
1590
  link: "url"
1590
1591
  }[e.type] ?? "text"
1591
1592
  }),
1592
- e.help && /* @__PURE__ */ l("span", {
1593
+ e.help && /* @__PURE__ */ u("span", {
1593
1594
  style: {
1594
1595
  fontSize: 12,
1595
1596
  opacity: .65
@@ -1599,17 +1600,17 @@ function nt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1599
1600
  ]
1600
1601
  });
1601
1602
  }
1602
- function rt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: d, auto: f, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
1603
- let { tenant: y, apiUrl: b } = r(U), [S, C] = s("form"), [w, T] = s(null), [E, D] = s({}), [O, k] = s(0), A = h ? v || "form" : S;
1604
- i(() => {
1605
- if (!f || !d) return;
1603
+ function rt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
1604
+ let { tenant: y, apiUrl: b } = i(U), [x, C] = c("form"), [w, T] = c(null), [E, D] = c({}), [O, k] = c(0), A = h ? v || "form" : x;
1605
+ a(() => {
1606
+ if (!f || !s) return;
1606
1607
  let e = !0;
1607
- return fetch(`${b || "/api"}/forms/${encodeURIComponent(d)}`, { headers: y ? { "x-tenant": y } : {} }).then((e) => e.json()).then((t) => e && T(t?.payload && typeof t.payload == "object" ? t.payload : null)).catch(() => e && T(null)), () => {
1608
+ return fetch(`${b || "/api"}/forms/${encodeURIComponent(s)}`, { headers: y ? { "x-tenant": y } : {} }).then((e) => e.json()).then((t) => e && T(t?.payload && typeof t.payload == "object" ? t.payload : null)).catch(() => e && T(null)), () => {
1608
1609
  e = !1;
1609
1610
  };
1610
1611
  }, [
1611
1612
  f,
1612
- d,
1613
+ s,
1613
1614
  y,
1614
1615
  b
1615
1616
  ]);
@@ -1635,23 +1636,23 @@ function rt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: d,
1635
1636
  for (let t of Array.isArray(w?.fields) ? w.fields : []) t?.parentField === e && delete r[t.name];
1636
1637
  return r;
1637
1638
  });
1638
- return /* @__PURE__ */ u("div", {
1639
+ return /* @__PURE__ */ d("div", {
1639
1640
  ref: m,
1640
- style: x(e),
1641
+ style: S(e),
1641
1642
  children: [
1642
- /* @__PURE__ */ l("form", {
1643
+ /* @__PURE__ */ u("form", {
1643
1644
  action: t || void 0,
1644
1645
  method: n || "post",
1645
- name: a || void 0,
1646
+ name: r || void 0,
1646
1647
  encType: o || void 0,
1647
1648
  onSubmit: async (e) => {
1648
1649
  if (e.preventDefault(), !h) {
1649
- if (d) {
1650
+ if (s) {
1650
1651
  let t = {};
1651
1652
  if (f) for (let [e, n] of Object.entries(E)) n != null && n !== "" && (t[e] = n);
1652
1653
  else for (let [n, r] of new FormData(e.currentTarget).entries()) typeof r == "string" && (t[n] = r === "on" || r);
1653
1654
  try {
1654
- let e = await fetch(`${b || "/api"}/forms/${d}/submit`, {
1655
+ let e = await fetch(`${b || "/api"}/forms/${s}/submit`, {
1655
1656
  method: "post",
1656
1657
  headers: {
1657
1658
  "content-type": "application/json",
@@ -1681,16 +1682,16 @@ function rt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: d,
1681
1682
  }
1682
1683
  },
1683
1684
  style: {
1684
- ...qe,
1685
+ ...Xe,
1685
1686
  display: A === "success" ? "none" : "flex"
1686
1687
  },
1687
- children: f && d ? /* @__PURE__ */ u(c, { children: [
1688
- P && /* @__PURE__ */ l(ht, {
1688
+ children: f && s ? /* @__PURE__ */ d(l, { children: [
1689
+ P && /* @__PURE__ */ u(ht, {
1689
1690
  steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
1690
1691
  active: F + 1,
1691
1692
  style: { marginBottom: 8 }
1692
1693
  }),
1693
- P && N[F]?.section?.help && /* @__PURE__ */ l("p", {
1694
+ P && N[F]?.section?.help && /* @__PURE__ */ u("p", {
1694
1695
  style: {
1695
1696
  margin: 0,
1696
1697
  fontSize: 14,
@@ -1698,26 +1699,26 @@ function rt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: d,
1698
1699
  },
1699
1700
  children: N[F].section.help
1700
1701
  }),
1701
- I.map((e) => /* @__PURE__ */ l(nt, {
1702
+ I.map((e) => /* @__PURE__ */ u(nt, {
1702
1703
  field: e,
1703
1704
  value: E[e.name],
1704
1705
  values: E,
1705
1706
  onChange: z,
1706
1707
  inert: h
1707
1708
  }, e.name)),
1708
- /* @__PURE__ */ u("div", {
1709
+ /* @__PURE__ */ d("div", {
1709
1710
  style: {
1710
1711
  display: "flex",
1711
1712
  gap: 10,
1712
1713
  alignItems: "center",
1713
1714
  marginTop: 4
1714
1715
  },
1715
- children: [P && F > 0 && /* @__PURE__ */ l("button", {
1716
+ children: [P && F > 0 && /* @__PURE__ */ u("button", {
1716
1717
  type: "button",
1717
1718
  disabled: h || void 0,
1718
1719
  onClick: () => k(F - 1),
1719
1720
  style: {
1720
- ...X,
1721
+ ...J,
1721
1722
  background: "transparent",
1722
1723
  color: "inherit",
1723
1724
  border: 0,
@@ -1725,12 +1726,12 @@ function rt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: d,
1725
1726
  cursor: "pointer"
1726
1727
  },
1727
1728
  children: "Back"
1728
- }), P && !R ? /* @__PURE__ */ l("button", {
1729
+ }), P && !R ? /* @__PURE__ */ u("button", {
1729
1730
  type: "button",
1730
1731
  disabled: h || L.length > 0,
1731
1732
  onClick: () => k(F + 1),
1732
1733
  style: {
1733
- ...X,
1734
+ ...J,
1734
1735
  border: 0,
1735
1736
  padding: "10px 22px",
1736
1737
  borderRadius: 8,
@@ -1740,11 +1741,11 @@ function rt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: d,
1740
1741
  opacity: L.length ? .5 : 1
1741
1742
  },
1742
1743
  children: "Next"
1743
- }) : /* @__PURE__ */ l("button", {
1744
+ }) : /* @__PURE__ */ u("button", {
1744
1745
  type: "submit",
1745
1746
  disabled: h || void 0,
1746
1747
  style: {
1747
- ...X,
1748
+ ...J,
1748
1749
  border: 0,
1749
1750
  padding: "10px 22px",
1750
1751
  borderRadius: 8,
@@ -1757,11 +1758,11 @@ function rt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: d,
1757
1758
  })
1758
1759
  ] }) : g
1759
1760
  }),
1760
- /* @__PURE__ */ l("div", {
1761
+ /* @__PURE__ */ u("div", {
1761
1762
  style: { display: A === "success" ? "block" : "none" },
1762
1763
  children: _?.success ?? null
1763
1764
  }),
1764
- /* @__PURE__ */ l("div", {
1765
+ /* @__PURE__ */ u("div", {
1765
1766
  style: {
1766
1767
  display: A === "error" ? "block" : "none",
1767
1768
  marginTop: 12
@@ -1772,52 +1773,52 @@ function rt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: d,
1772
1773
  });
1773
1774
  }
1774
1775
  function it({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
1775
- return /* @__PURE__ */ l("label", {
1776
+ return /* @__PURE__ */ u("label", {
1776
1777
  ref: r,
1777
1778
  style: {
1778
- ...Je,
1779
- ...x(n)
1779
+ ...X,
1780
+ ...S(n)
1780
1781
  },
1781
- children: Z(t, e, i)
1782
+ children: Y(t, e, i)
1782
1783
  });
1783
1784
  }
1784
1785
  function at({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
1785
- return /* @__PURE__ */ l("input", {
1786
+ return /* @__PURE__ */ u("input", {
1786
1787
  ref: a,
1787
1788
  type: e,
1788
1789
  name: t || void 0,
1789
1790
  placeholder: n,
1790
1791
  required: !o && !!r,
1791
1792
  style: {
1792
- ...Ye,
1793
- ...x(i)
1793
+ ...Z,
1794
+ ...S(i)
1794
1795
  },
1795
- ...Ze(o)
1796
+ ...Q(o)
1796
1797
  });
1797
1798
  }
1798
1799
  function ot({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
1799
- return /* @__PURE__ */ l("textarea", {
1800
+ return /* @__PURE__ */ u("textarea", {
1800
1801
  ref: a,
1801
1802
  name: e || void 0,
1802
1803
  placeholder: t,
1803
1804
  rows: n,
1804
1805
  required: !o && !!r,
1805
1806
  style: {
1806
- ...Ye,
1807
+ ...Z,
1807
1808
  resize: "vertical",
1808
- ...x(i)
1809
+ ...S(i)
1809
1810
  },
1810
- ...Ze(o)
1811
+ ...Q(o)
1811
1812
  });
1812
1813
  }
1813
1814
  function st({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
1814
- return /* @__PURE__ */ u("label", {
1815
+ return /* @__PURE__ */ d("label", {
1815
1816
  ref: o,
1816
1817
  style: {
1817
- ...Xe,
1818
- ...x(a)
1818
+ ...Ze,
1819
+ ...S(a)
1819
1820
  },
1820
- children: [/* @__PURE__ */ l("input", {
1821
+ children: [/* @__PURE__ */ u("input", {
1821
1822
  type: e,
1822
1823
  name: n || void 0,
1823
1824
  value: r || void 0,
@@ -1832,7 +1833,7 @@ function st({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
1832
1833
  });
1833
1834
  }
1834
1835
  function ct({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
1835
- return /* @__PURE__ */ u("select", {
1836
+ return /* @__PURE__ */ d("select", {
1836
1837
  ref: a,
1837
1838
  name: e || void 0,
1838
1839
  required: !o && !!r,
@@ -1840,58 +1841,58 @@ function ct({ name: e, placeholder: t, options: n = [], required: r, style: i, n
1840
1841
  onMouseDown: o ? (e) => e.preventDefault() : void 0,
1841
1842
  tabIndex: o ? -1 : void 0,
1842
1843
  style: {
1843
- ...Ye,
1844
+ ...Z,
1844
1845
  appearance: "auto",
1845
- ...x(i)
1846
+ ...S(i)
1846
1847
  },
1847
- children: [t !== "" && /* @__PURE__ */ l("option", {
1848
+ children: [t !== "" && /* @__PURE__ */ u("option", {
1848
1849
  value: "",
1849
1850
  disabled: !0,
1850
1851
  children: t ?? "Select…"
1851
- }), n.map((e, t) => /* @__PURE__ */ l("option", {
1852
+ }), n.map((e, t) => /* @__PURE__ */ u("option", {
1852
1853
  value: e,
1853
1854
  children: e
1854
1855
  }, t))]
1855
1856
  });
1856
1857
  }
1857
1858
  function lt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
1858
- let [c, d] = s(null);
1859
- return /* @__PURE__ */ u("label", {
1859
+ let [s, l] = c(null);
1860
+ return /* @__PURE__ */ d("label", {
1860
1861
  ref: a,
1861
1862
  style: {
1862
- ...Ye,
1863
+ ...Z,
1863
1864
  display: "flex",
1864
1865
  alignItems: "center",
1865
1866
  gap: "8px",
1866
1867
  cursor: o ? "default" : "pointer",
1867
1868
  borderStyle: "dashed",
1868
- color: c ? "#111827" : "#6b7280",
1869
- ...x(i)
1869
+ color: s ? "#111827" : "#6b7280",
1870
+ ...S(i)
1870
1871
  },
1871
1872
  children: [
1872
- /* @__PURE__ */ l("input", {
1873
+ /* @__PURE__ */ u("input", {
1873
1874
  type: "file",
1874
1875
  name: e || void 0,
1875
1876
  accept: t || void 0,
1876
1877
  required: !o && !!n,
1877
1878
  disabled: !!o,
1878
- onChange: (e) => d(e.target.files?.[0]?.name ?? null),
1879
+ onChange: (e) => l(e.target.files?.[0]?.name ?? null),
1879
1880
  style: { display: "none" }
1880
1881
  }),
1881
- /* @__PURE__ */ l("span", {
1882
+ /* @__PURE__ */ u("span", {
1882
1883
  "aria-hidden": !0,
1883
1884
  children: "📎"
1884
1885
  }),
1885
- c ?? r
1886
+ s ?? r
1886
1887
  ]
1887
1888
  });
1888
1889
  }
1889
1890
  function ut({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
1890
- return /* @__PURE__ */ l("button", {
1891
+ return /* @__PURE__ */ u("button", {
1891
1892
  ref: n,
1892
1893
  type: r ? "button" : "submit",
1893
1894
  style: {
1894
- ...X,
1895
+ ...J,
1895
1896
  border: 0,
1896
1897
  cursor: "pointer",
1897
1898
  alignSelf: "flex-start",
@@ -1901,31 +1902,31 @@ function ut({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
1901
1902
  fontWeight: 600,
1902
1903
  lineHeight: 1.4,
1903
1904
  fontFamily: "inherit",
1904
- ...x(t)
1905
+ ...S(t)
1905
1906
  },
1906
1907
  children: e
1907
1908
  });
1908
1909
  }
1909
1910
  function dt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
1910
1911
  let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
1911
- return /* @__PURE__ */ l("div", {
1912
+ return /* @__PURE__ */ u("div", {
1912
1913
  ref: r,
1913
1914
  style: {
1914
1915
  display: "grid",
1915
1916
  gridTemplateColumns: `repeat(${Math.max(1, Number(e) || 1)}, minmax(0, 1fr))`,
1916
1917
  gap: 16,
1917
1918
  width: "100%",
1918
- ...x(n)
1919
+ ...S(n)
1919
1920
  },
1920
- children: Array.from({ length: a }, (e, t) => /* @__PURE__ */ l("div", {
1921
+ children: Array.from({ length: a }, (e, t) => /* @__PURE__ */ u("div", {
1921
1922
  style: { minWidth: 0 },
1922
1923
  children: i?.[`cell-${t}`] ?? null
1923
1924
  }, t))
1924
1925
  });
1925
1926
  }
1926
- function ft({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: c = "name", textField: d, custom: f, templateId: p, style: m, nodeRef: h }) {
1927
- let { tenant: g, apiUrl: _, locale: v } = r(U), y = r(G), b = r(W)?.[e], [S, C] = s(null);
1928
- if (i(() => {
1927
+ function ft({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, style: m, nodeRef: h }) {
1928
+ let { tenant: g, apiUrl: _, locale: v } = i(U), y = i(G), b = i(W)?.[e], [x, C] = c(null);
1929
+ if (a(() => {
1929
1930
  if (!e || b) return;
1930
1931
  let t = !0, n = e.startsWith("api:") ? `${_}/data/${encodeURIComponent(e.slice(4))}` : `${_}/dynamic/${encodeURIComponent(e)}${v ? `?locale=${encodeURIComponent(v)}` : ""}`;
1931
1932
  return fetch(n, { headers: g ? { "x-tenant": g } : {} }).then((e) => e.json()).then((e) => {
@@ -1941,7 +1942,7 @@ function ft({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
1941
1942
  v,
1942
1943
  b
1943
1944
  ]), !e) return null;
1944
- let w = (b ?? S ?? []).slice(0, Math.max(1, Number(t) || 6)), T = Math.min(Math.max(Number(a) || 3, 1), 6), E = n === "list" ? {
1945
+ let w = (b ?? x ?? []).slice(0, Math.max(1, Number(t) || 6)), T = Math.min(Math.max(Number(r) || 3, 1), 6), E = n === "list" ? {
1945
1946
  display: "flex",
1946
1947
  flexDirection: "column",
1947
1948
  gap: 20
@@ -1950,27 +1951,27 @@ function ft({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
1950
1951
  gridTemplateColumns: `repeat(${T}, minmax(0, 1fr))`,
1951
1952
  gap: 24
1952
1953
  };
1953
- return f && p && y?.render ? /* @__PURE__ */ l("div", {
1954
+ return f && p && y?.render ? /* @__PURE__ */ u("div", {
1954
1955
  ref: h,
1955
1956
  style: {
1956
1957
  width: "100%",
1957
1958
  ...E,
1958
- ...x(m)
1959
+ ...S(m)
1959
1960
  },
1960
- children: w.map((e) => /* @__PURE__ */ l("div", {
1961
+ children: w.map((e) => /* @__PURE__ */ u("div", {
1961
1962
  style: { minWidth: 0 },
1962
- children: y.render(p, (t) => ie(t, e))
1963
+ children: y.render(p, (t) => ae(t, e))
1963
1964
  }, e.id ?? e?.data?.slug))
1964
- }) : /* @__PURE__ */ l("div", {
1965
+ }) : /* @__PURE__ */ u("div", {
1965
1966
  ref: h,
1966
1967
  style: {
1967
1968
  width: "100%",
1968
1969
  ...E,
1969
- ...x(m)
1970
+ ...S(m)
1970
1971
  },
1971
1972
  children: w.map((e) => {
1972
- let t = o ? K(e?.data, o) : null, r = c ? q(K(e?.data, c)) : null, i = d ? K(e?.data, d) : null, a = Array.isArray(i) ? i : null, s = a || i == null ? null : q(i), f = n === "list";
1973
- return /* @__PURE__ */ u("div", {
1973
+ let t = o ? K(e?.data, o) : null, r = s ? q(K(e?.data, s)) : null, i = l ? K(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : q(i), f = n === "list";
1974
+ return /* @__PURE__ */ d("div", {
1974
1975
  style: {
1975
1976
  display: "flex",
1976
1977
  flexDirection: f ? "row" : "column",
@@ -1978,7 +1979,7 @@ function ft({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
1978
1979
  alignItems: f ? "center" : "stretch",
1979
1980
  minWidth: 0
1980
1981
  },
1981
- children: [t && /* @__PURE__ */ l("img", {
1982
+ children: [t && /* @__PURE__ */ u("img", {
1982
1983
  src: t,
1983
1984
  alt: r ?? "",
1984
1985
  style: {
@@ -1989,10 +1990,10 @@ function ft({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
1989
1990
  flexShrink: 0,
1990
1991
  display: "block"
1991
1992
  }
1992
- }), /* @__PURE__ */ u("div", {
1993
+ }), /* @__PURE__ */ d("div", {
1993
1994
  style: { minWidth: 0 },
1994
1995
  children: [
1995
- r && /* @__PURE__ */ l("h3", {
1996
+ r && /* @__PURE__ */ u("h3", {
1996
1997
  style: {
1997
1998
  margin: 0,
1998
1999
  fontSize: 18,
@@ -2000,23 +2001,23 @@ function ft({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2000
2001
  },
2001
2002
  children: r
2002
2003
  }),
2003
- s && /* @__PURE__ */ l("p", {
2004
+ c && /* @__PURE__ */ u("p", {
2004
2005
  style: {
2005
2006
  margin: "6px 0 0",
2006
2007
  fontSize: 14,
2007
2008
  lineHeight: 1.55,
2008
2009
  opacity: .75
2009
2010
  },
2010
- children: s
2011
+ children: c
2011
2012
  }),
2012
- a && /* @__PURE__ */ l("div", {
2013
+ a && /* @__PURE__ */ u("div", {
2013
2014
  style: {
2014
2015
  marginTop: 6,
2015
2016
  fontSize: 14,
2016
2017
  lineHeight: 1.55,
2017
2018
  opacity: .85
2018
2019
  },
2019
- children: ve(a)
2020
+ children: xe(a)
2020
2021
  })
2021
2022
  ]
2022
2023
  })]
@@ -2025,11 +2026,11 @@ function ft({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2025
2026
  });
2026
2027
  }
2027
2028
  function pt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2028
- return e.length ? /* @__PURE__ */ l("nav", {
2029
+ return e.length ? /* @__PURE__ */ u("nav", {
2029
2030
  ref: r,
2030
2031
  "aria-label": "Breadcrumb",
2031
- style: { ...x(n) },
2032
- children: /* @__PURE__ */ l("ol", {
2032
+ style: { ...S(n) },
2033
+ children: /* @__PURE__ */ u("ol", {
2033
2034
  style: {
2034
2035
  display: "flex",
2035
2036
  flexWrap: "wrap",
@@ -2042,25 +2043,25 @@ function pt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2042
2043
  },
2043
2044
  children: e.map((n, r) => {
2044
2045
  let i = r === e.length - 1;
2045
- return /* @__PURE__ */ u("li", {
2046
+ return /* @__PURE__ */ d("li", {
2046
2047
  style: {
2047
2048
  display: "flex",
2048
2049
  alignItems: "center",
2049
2050
  gap: 8,
2050
2051
  minWidth: 0
2051
2052
  },
2052
- children: [r > 0 && /* @__PURE__ */ l("span", {
2053
+ children: [r > 0 && /* @__PURE__ */ u("span", {
2053
2054
  style: { opacity: .4 },
2054
2055
  "aria-hidden": !0,
2055
2056
  children: t
2056
- }), i || !n.href ? /* @__PURE__ */ l("span", {
2057
+ }), i || !n.href ? /* @__PURE__ */ u("span", {
2057
2058
  style: {
2058
2059
  fontWeight: i ? 600 : 400,
2059
2060
  opacity: i ? 1 : .7
2060
2061
  },
2061
2062
  "aria-current": i ? "page" : void 0,
2062
2063
  children: n.label
2063
- }) : /* @__PURE__ */ l("a", {
2064
+ }) : /* @__PURE__ */ u("a", {
2064
2065
  href: n.href,
2065
2066
  style: {
2066
2067
  color: "inherit",
@@ -2075,7 +2076,7 @@ function pt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2075
2076
  }) : null;
2076
2077
  }
2077
2078
  function mt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", style: i, nodeRef: a }) {
2078
- let o = Math.min(Math.max(Number(e) || 1, 1), 50), s = Math.min(Math.max(Number(t) || 1, 1), o), c = (e) => r && r !== "#" ? r.replace("{page}", String(e)) : "#", d = (e) => ({
2079
+ let o = Math.min(Math.max(Number(e) || 1, 1), 50), s = Math.min(Math.max(Number(t) || 1, 1), o), c = (e) => r && r !== "#" ? r.replace("{page}", String(e)) : "#", l = (e) => ({
2079
2080
  display: "inline-flex",
2080
2081
  alignItems: "center",
2081
2082
  justifyContent: "center",
@@ -2089,7 +2090,7 @@ function mt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sty
2089
2090
  background: e ? "var(--page-accent, #111827)" : "transparent",
2090
2091
  border: e ? "1px solid transparent" : "1px solid rgba(148, 163, 184, 0.4)"
2091
2092
  });
2092
- return /* @__PURE__ */ u("nav", {
2093
+ return /* @__PURE__ */ d("nav", {
2093
2094
  ref: a,
2094
2095
  "aria-label": "Pagination",
2095
2096
  style: {
@@ -2097,29 +2098,29 @@ function mt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sty
2097
2098
  flexWrap: "wrap",
2098
2099
  gap: 8,
2099
2100
  alignItems: "center",
2100
- ...x(i)
2101
+ ...S(i)
2101
2102
  },
2102
2103
  children: [
2103
- n && /* @__PURE__ */ l("a", {
2104
+ n && /* @__PURE__ */ u("a", {
2104
2105
  href: s > 1 ? c(s - 1) : "#",
2105
2106
  "aria-label": "Previous",
2106
2107
  style: {
2107
- ...d(!1),
2108
+ ...l(!1),
2108
2109
  opacity: s > 1 ? 1 : .4
2109
2110
  },
2110
2111
  children: "‹"
2111
2112
  }),
2112
- Array.from({ length: o }, (e, t) => t + 1).map((e) => /* @__PURE__ */ l("a", {
2113
+ Array.from({ length: o }, (e, t) => t + 1).map((e) => /* @__PURE__ */ u("a", {
2113
2114
  href: c(e),
2114
2115
  "aria-current": e === s ? "page" : void 0,
2115
- style: d(e === s),
2116
+ style: l(e === s),
2116
2117
  children: e
2117
2118
  }, e)),
2118
- n && /* @__PURE__ */ l("a", {
2119
+ n && /* @__PURE__ */ u("a", {
2119
2120
  href: s < o ? c(s + 1) : "#",
2120
2121
  "aria-label": "Next",
2121
2122
  style: {
2122
- ...d(!1),
2123
+ ...l(!1),
2123
2124
  opacity: s < o ? 1 : .4
2124
2125
  },
2125
2126
  children: "›"
@@ -2158,21 +2159,21 @@ function ht({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
2158
2159
  minWidth: 24
2159
2160
  }
2160
2161
  });
2161
- return /* @__PURE__ */ l("div", {
2162
+ return /* @__PURE__ */ u("div", {
2162
2163
  ref: a,
2163
2164
  style: {
2164
2165
  display: "flex",
2165
2166
  flexDirection: r ? "column" : "row",
2166
2167
  alignItems: r ? "stretch" : "flex-start",
2167
2168
  gap: r ? 4 : 8,
2168
- ...x(i)
2169
+ ...S(i)
2169
2170
  },
2170
2171
  children: e.map((e, n) => {
2171
2172
  let i = n + 1, a = i < o ? "done" : i === o ? "active" : "todo";
2172
- return /* @__PURE__ */ u(t, { children: [n > 0 && /* @__PURE__ */ l("div", {
2173
+ return /* @__PURE__ */ d(t, { children: [n > 0 && /* @__PURE__ */ u("div", {
2173
2174
  style: c(i <= o),
2174
2175
  "aria-hidden": !0
2175
- }), /* @__PURE__ */ u("div", {
2176
+ }), /* @__PURE__ */ d("div", {
2176
2177
  style: {
2177
2178
  display: "flex",
2178
2179
  flexDirection: r ? "row" : "column",
@@ -2181,19 +2182,19 @@ function ht({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
2181
2182
  minWidth: 0,
2182
2183
  textAlign: r ? "left" : "center"
2183
2184
  },
2184
- children: [/* @__PURE__ */ l("div", {
2185
+ children: [/* @__PURE__ */ u("div", {
2185
2186
  style: s(a),
2186
2187
  children: a === "done" ? "✓" : i
2187
- }), /* @__PURE__ */ u("div", {
2188
+ }), /* @__PURE__ */ d("div", {
2188
2189
  style: { minWidth: 0 },
2189
- children: [/* @__PURE__ */ l("div", {
2190
+ children: [/* @__PURE__ */ u("div", {
2190
2191
  style: {
2191
2192
  fontSize: 13,
2192
2193
  fontWeight: a === "active" ? 700 : 500,
2193
2194
  opacity: a === "todo" ? .6 : 1
2194
2195
  },
2195
2196
  children: e.label
2196
- }), e.description && /* @__PURE__ */ l("div", {
2197
+ }), e.description && /* @__PURE__ */ u("div", {
2197
2198
  style: {
2198
2199
  fontSize: 12,
2199
2200
  opacity: .6
@@ -2313,10 +2314,10 @@ var Ct = {
2313
2314
  pad: 10
2314
2315
  };
2315
2316
  function wt({ node: e, onClose: t }) {
2316
- return i(() => {
2317
+ return a(() => {
2317
2318
  let e = (e) => e.key === "Escape" && t();
2318
2319
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
2319
- }, [t]), /* @__PURE__ */ l("div", {
2320
+ }, [t]), /* @__PURE__ */ u("div", {
2320
2321
  onClick: t,
2321
2322
  role: "dialog",
2322
2323
  "aria-modal": "true",
@@ -2331,7 +2332,7 @@ function wt({ node: e, onClose: t }) {
2331
2332
  justifyContent: "center",
2332
2333
  padding: 16
2333
2334
  },
2334
- children: /* @__PURE__ */ u("div", {
2335
+ children: /* @__PURE__ */ d("div", {
2335
2336
  onClick: (e) => e.stopPropagation(),
2336
2337
  style: {
2337
2338
  background: "var(--page-bg, #ffffff)",
@@ -2346,7 +2347,7 @@ function wt({ node: e, onClose: t }) {
2346
2347
  boxShadow: "0 24px 64px rgba(15, 23, 42, 0.35)"
2347
2348
  },
2348
2349
  children: [
2349
- /* @__PURE__ */ l("button", {
2350
+ /* @__PURE__ */ u("button", {
2350
2351
  type: "button",
2351
2352
  "aria-label": "Close",
2352
2353
  onClick: t,
@@ -2367,14 +2368,14 @@ function wt({ node: e, onClose: t }) {
2367
2368
  },
2368
2369
  children: "×"
2369
2370
  }),
2370
- /* @__PURE__ */ u("div", {
2371
+ /* @__PURE__ */ d("div", {
2371
2372
  style: {
2372
2373
  display: "flex",
2373
2374
  alignItems: "center",
2374
2375
  gap: 14,
2375
2376
  marginBottom: e.cv ? 14 : 0
2376
2377
  },
2377
- children: [e.photo && /* @__PURE__ */ l("img", {
2378
+ children: [e.photo && /* @__PURE__ */ u("img", {
2378
2379
  src: e.photo,
2379
2380
  alt: "",
2380
2381
  style: {
@@ -2384,15 +2385,15 @@ function wt({ node: e, onClose: t }) {
2384
2385
  objectFit: "cover",
2385
2386
  flexShrink: 0
2386
2387
  }
2387
- }), /* @__PURE__ */ u("div", {
2388
+ }), /* @__PURE__ */ d("div", {
2388
2389
  style: { minWidth: 0 },
2389
- children: [/* @__PURE__ */ l("div", {
2390
+ children: [/* @__PURE__ */ u("div", {
2390
2391
  style: {
2391
2392
  fontSize: 18,
2392
2393
  fontWeight: 700
2393
2394
  },
2394
2395
  children: e.name
2395
- }), e.title && /* @__PURE__ */ l("div", {
2396
+ }), e.title && /* @__PURE__ */ u("div", {
2396
2397
  style: {
2397
2398
  fontSize: 13,
2398
2399
  opacity: .65
@@ -2401,7 +2402,7 @@ function wt({ node: e, onClose: t }) {
2401
2402
  })]
2402
2403
  })]
2403
2404
  }),
2404
- e.cv && String(e.cv).split(/\n+/).map((e, t) => /* @__PURE__ */ l("p", {
2405
+ e.cv && String(e.cv).split(/\n+/).map((e, t) => /* @__PURE__ */ u("p", {
2405
2406
  style: {
2406
2407
  fontSize: 14,
2407
2408
  lineHeight: 1.6,
@@ -2409,7 +2410,7 @@ function wt({ node: e, onClose: t }) {
2409
2410
  },
2410
2411
  children: e
2411
2412
  }, t)),
2412
- e.href && /* @__PURE__ */ l("a", {
2413
+ e.href && /* @__PURE__ */ u("a", {
2413
2414
  href: e.href,
2414
2415
  target: "_blank",
2415
2416
  rel: "noopener noreferrer",
@@ -2430,9 +2431,9 @@ function wt({ node: e, onClose: t }) {
2430
2431
  })
2431
2432
  });
2432
2433
  }
2433
- function Tt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: d, parentField: f, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
2434
- let b = a(), [S, C] = s(null), { tenant: w, apiUrl: T } = r(U), E = r(W)?.[t], [D, O] = s(null);
2435
- i(() => {
2434
+ function Tt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField: s, parentField: f, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
2435
+ let b = o(), [x, C] = c(null), { tenant: w, apiUrl: T } = i(U), E = i(W)?.[t], [D, O] = c(null);
2436
+ a(() => {
2436
2437
  if (!t || E) return;
2437
2438
  let e = !0;
2438
2439
  return fetch(`${T}/dynamic/${encodeURIComponent(t)}`, { headers: w ? { "x-tenant": w } : {} }).then((e) => e.json()).then((t) => {
@@ -2449,8 +2450,8 @@ function Tt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2449
2450
  ]);
2450
2451
  let k = t ? St(E ?? D ?? [], {
2451
2452
  nameField: n,
2452
- titleField: o,
2453
- photoField: d,
2453
+ titleField: r,
2454
+ photoField: s,
2454
2455
  parentField: f,
2455
2456
  cvField: p,
2456
2457
  hrefField: m
@@ -2458,7 +2459,7 @@ function Tt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2458
2459
  size: h,
2459
2460
  horizontal: g
2460
2461
  });
2461
- if (!j.length) return !y && t ? /* @__PURE__ */ u("div", {
2462
+ if (!j.length) return !y && t ? /* @__PURE__ */ d("div", {
2462
2463
  ref: v,
2463
2464
  style: {
2464
2465
  padding: 18,
@@ -2467,7 +2468,7 @@ function Tt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2467
2468
  fontSize: 13,
2468
2469
  opacity: .7,
2469
2470
  textAlign: "center",
2470
- ...x(_)
2471
+ ...S(_)
2471
2472
  },
2472
2473
  children: [
2473
2474
  "Org Chart — no published entries in “",
@@ -2476,14 +2477,14 @@ function Tt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2476
2477
  ]
2477
2478
  }) : null;
2478
2479
  let F = new Set(j.filter((e) => e.node.parent == null || e.node.parent === "").map((e) => e.node.id));
2479
- return /* @__PURE__ */ u("div", {
2480
+ return /* @__PURE__ */ d("div", {
2480
2481
  ref: v,
2481
2482
  style: {
2482
2483
  maxWidth: "100%",
2483
2484
  overflowX: "auto",
2484
- ...x(_)
2485
+ ...S(_)
2485
2486
  },
2486
- children: [/* @__PURE__ */ u("svg", {
2487
+ children: [/* @__PURE__ */ d("svg", {
2487
2488
  viewBox: `0 0 ${N} ${P}`,
2488
2489
  role: "img",
2489
2490
  "aria-label": "Organization chart",
@@ -2494,64 +2495,64 @@ function Tt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2494
2495
  height: "auto",
2495
2496
  margin: "0 auto"
2496
2497
  },
2497
- children: [M.map((e, t) => /* @__PURE__ */ l("path", {
2498
+ children: [M.map((e, t) => /* @__PURE__ */ u("path", {
2498
2499
  d: g ? `M ${e.from.x} ${e.from.y} H ${(e.from.x + e.to.x) / 2} V ${e.to.y} H ${e.to.x}` : `M ${e.from.x} ${e.from.y} V ${(e.from.y + e.to.y) / 2} H ${e.to.x} V ${e.to.y}`,
2499
2500
  fill: "none",
2500
2501
  stroke: "rgba(148, 163, 184, 0.7)",
2501
2502
  strokeWidth: "1.5"
2502
2503
  }, t)), j.map(({ node: e, x: t, y: n }) => {
2503
- let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ? bt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", d = i ? bt(e.color2) : s, f = y && (xt(e) || e.href), p = () => xt(e) ? C(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Ct.pad + A.avatar + 8 : t + A.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((A.w - A.avatar - 26) / 7) : Math.floor(A.w / 7.6), _ = A.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
2504
- return /* @__PURE__ */ u("g", {
2504
+ let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ? bt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? bt(e.color2) : s, f = y && (xt(e) || e.href), p = () => xt(e) ? C(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Ct.pad + A.avatar + 8 : t + A.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((A.w - A.avatar - 26) / 7) : Math.floor(A.w / 7.6), _ = A.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
2505
+ return /* @__PURE__ */ d("g", {
2505
2506
  onClick: f ? p : void 0,
2506
2507
  style: f ? { cursor: "pointer" } : void 0,
2507
2508
  role: f ? "button" : void 0,
2508
2509
  "aria-label": f ? `Open ${e.name || e.title}'s profile` : void 0,
2509
2510
  children: [
2510
- i && e.gradient ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ u("linearGradient", {
2511
+ i && e.gradient ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d("linearGradient", {
2511
2512
  id: `${b}-${e.id}-grad`,
2512
2513
  x1: "0",
2513
2514
  y1: "0",
2514
2515
  x2: "0",
2515
2516
  y2: "1",
2516
- children: [/* @__PURE__ */ l("stop", {
2517
+ children: [/* @__PURE__ */ u("stop", {
2517
2518
  offset: "0%",
2518
2519
  stopColor: e.color || "var(--page-accent, #4f46e5)"
2519
- }), /* @__PURE__ */ l("stop", {
2520
+ }), /* @__PURE__ */ u("stop", {
2520
2521
  offset: "100%",
2521
2522
  stopColor: e.color2
2522
2523
  })]
2523
- }), /* @__PURE__ */ l("rect", {
2524
+ }), /* @__PURE__ */ u("rect", {
2524
2525
  x: t,
2525
2526
  y: n,
2526
2527
  width: A.w,
2527
2528
  height: A.h,
2528
2529
  rx: "10",
2529
2530
  fill: `url(#${b}-${e.id}-grad)`
2530
- })] }) : i ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("clipPath", {
2531
+ })] }) : i ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("clipPath", {
2531
2532
  id: `${b}-${e.id}-box`,
2532
- children: /* @__PURE__ */ l("rect", {
2533
+ children: /* @__PURE__ */ u("rect", {
2533
2534
  x: t,
2534
2535
  y: n,
2535
2536
  width: A.w,
2536
2537
  height: A.h,
2537
2538
  rx: "10"
2538
2539
  })
2539
- }), /* @__PURE__ */ u("g", {
2540
+ }), /* @__PURE__ */ d("g", {
2540
2541
  clipPath: `url(#${b}-${e.id}-box)`,
2541
- children: [/* @__PURE__ */ l("rect", {
2542
+ children: [/* @__PURE__ */ u("rect", {
2542
2543
  x: t,
2543
2544
  y: n,
2544
2545
  width: A.w,
2545
2546
  height: _,
2546
2547
  fill: o
2547
- }), /* @__PURE__ */ l("rect", {
2548
+ }), /* @__PURE__ */ u("rect", {
2548
2549
  x: t,
2549
2550
  y: n + _,
2550
2551
  width: A.w,
2551
2552
  height: A.h - _,
2552
2553
  fill: e.color2
2553
2554
  })]
2554
- })] }) : /* @__PURE__ */ l("rect", {
2555
+ })] }) : /* @__PURE__ */ u("rect", {
2555
2556
  x: t,
2556
2557
  y: n,
2557
2558
  width: A.w,
@@ -2561,14 +2562,14 @@ function Tt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2561
2562
  stroke: a ? "none" : "var(--page-accent, #4f46e5)",
2562
2563
  strokeWidth: a ? 0 : 1.5
2563
2564
  }),
2564
- e.photo && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("clipPath", {
2565
+ e.photo && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("clipPath", {
2565
2566
  id: `${b}-${e.id}`,
2566
- children: /* @__PURE__ */ l("circle", {
2567
+ children: /* @__PURE__ */ u("circle", {
2567
2568
  cx: t + Ct.pad + A.avatar / 2,
2568
2569
  cy: n + A.h / 2,
2569
2570
  r: A.avatar / 2
2570
2571
  })
2571
- }), /* @__PURE__ */ l("image", {
2572
+ }), /* @__PURE__ */ u("image", {
2572
2573
  href: e.photo,
2573
2574
  x: t + Ct.pad,
2574
2575
  y: n + (A.h - A.avatar) / 2,
@@ -2577,7 +2578,7 @@ function Tt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2577
2578
  preserveAspectRatio: "xMidYMid slice",
2578
2579
  clipPath: `url(#${b}-${e.id})`
2579
2580
  })] }),
2580
- i && !e.gradient ? /* @__PURE__ */ u(c, { children: [e.title && /* @__PURE__ */ l("text", {
2581
+ i && !e.gradient ? /* @__PURE__ */ d(l, { children: [e.title && /* @__PURE__ */ u("text", {
2581
2582
  x: m,
2582
2583
  y: n + _ / 2 + A.title * .35,
2583
2584
  textAnchor: h,
@@ -2585,15 +2586,15 @@ function Tt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2585
2586
  fontWeight: "600",
2586
2587
  fill: s,
2587
2588
  children: yt(e.title, g + 4)
2588
- }), e.name && /* @__PURE__ */ l("text", {
2589
+ }), e.name && /* @__PURE__ */ u("text", {
2589
2590
  x: m,
2590
2591
  y: n + _ + _ / 2 + A.name * .35,
2591
2592
  textAnchor: h,
2592
2593
  fontSize: A.name,
2593
2594
  fontWeight: "600",
2594
- fill: d,
2595
+ fill: c,
2595
2596
  children: yt(e.name, g)
2596
- })] }) : /* @__PURE__ */ u(c, { children: [v[0] && /* @__PURE__ */ l("text", {
2597
+ })] }) : /* @__PURE__ */ d(l, { children: [v[0] && /* @__PURE__ */ u("text", {
2597
2598
  x: m,
2598
2599
  y: n + (v[1] ? A.h * .43 : A.h * .57),
2599
2600
  textAnchor: h,
@@ -2601,7 +2602,7 @@ function Tt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2601
2602
  fontWeight: "600",
2602
2603
  fill: s,
2603
2604
  children: yt(v[0], g)
2604
- }), v[1] && /* @__PURE__ */ l("text", {
2605
+ }), v[1] && /* @__PURE__ */ u("text", {
2605
2606
  x: m,
2606
2607
  y: n + A.h * .73,
2607
2608
  textAnchor: h,
@@ -2613,15 +2614,15 @@ function Tt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
2613
2614
  ]
2614
2615
  }, e.id);
2615
2616
  })]
2616
- }), S && /* @__PURE__ */ l(wt, {
2617
- node: S,
2617
+ }), x && /* @__PURE__ */ u(wt, {
2618
+ node: x,
2618
2619
  onClose: () => C(null)
2619
2620
  })]
2620
2621
  });
2621
2622
  }
2622
- function Et({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped: o = !0, bordered: c = !1, compact: d = !1, style: f, nodeRef: p }) {
2623
- let { tenant: m, apiUrl: h } = r(U), g = r(W)?.[n], [_, v] = s(null);
2624
- if (i(() => {
2623
+ function Et({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped: o = !0, bordered: s = !1, compact: l = !1, style: f, nodeRef: p }) {
2624
+ let { tenant: m, apiUrl: h } = i(U), g = i(W)?.[n], [_, v] = c(null);
2625
+ if (a(() => {
2625
2626
  if (!n || g) return;
2626
2627
  let e = !0, t = n.startsWith("api:") ? `${h}/data/${encodeURIComponent(n.slice(4))}` : `${h}/dynamic/${encodeURIComponent(n)}`;
2627
2628
  return fetch(t, { headers: m ? { "x-tenant": m } : {} }).then((e) => e.json()).then((t) => e && v(Array.isArray(t?.payload) ? t.payload : [])).catch(() => e && v([])), () => {
@@ -2633,35 +2634,35 @@ function Et({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
2633
2634
  h,
2634
2635
  g
2635
2636
  ]), !e.length) return null;
2636
- let y = n ? (g ?? _ ?? []).slice(0, Math.max(1, Number(a) || 10)) : null, b = y ? y.map((t) => e.map((e) => q(K(t?.data, e.field)))) : t, S = d ? "6px 10px" : "10px 14px", C = "1px solid rgba(148, 163, 184, 0.35)", w = c ? { border: C } : { borderBottom: C };
2637
- return /* @__PURE__ */ l("div", {
2637
+ let y = n ? (g ?? _ ?? []).slice(0, Math.max(1, Number(r) || 10)) : null, b = y ? y.map((t) => e.map((e) => q(K(t?.data, e.field)))) : t, x = l ? "6px 10px" : "10px 14px", C = "1px solid rgba(148, 163, 184, 0.35)", w = s ? { border: C } : { borderBottom: C };
2638
+ return /* @__PURE__ */ u("div", {
2638
2639
  ref: p,
2639
2640
  style: {
2640
2641
  width: "100%",
2641
2642
  overflowX: "auto",
2642
- ...x(f)
2643
+ ...S(f)
2643
2644
  },
2644
- children: /* @__PURE__ */ u("table", {
2645
+ children: /* @__PURE__ */ d("table", {
2645
2646
  style: {
2646
2647
  width: "100%",
2647
2648
  borderCollapse: "collapse",
2648
2649
  fontSize: 14,
2649
- ...c ? { border: C } : {}
2650
+ ...s ? { border: C } : {}
2650
2651
  },
2651
- children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", { children: e.map((e, t) => /* @__PURE__ */ l("th", {
2652
+ children: [/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: e.map((e, t) => /* @__PURE__ */ u("th", {
2652
2653
  style: {
2653
2654
  textAlign: "left",
2654
2655
  fontWeight: 600,
2655
- padding: S,
2656
+ padding: x,
2656
2657
  background: "rgba(148, 163, 184, 0.12)",
2657
2658
  ...w
2658
2659
  },
2659
2660
  children: e.label ?? e
2660
- }, t)) }) }), /* @__PURE__ */ l("tbody", { children: b.map((t, n) => /* @__PURE__ */ l("tr", {
2661
+ }, t)) }) }), /* @__PURE__ */ u("tbody", { children: b.map((t, n) => /* @__PURE__ */ u("tr", {
2661
2662
  style: o && n % 2 == 1 ? { background: "rgba(148, 163, 184, 0.07)" } : void 0,
2662
- children: e.map((e, n) => /* @__PURE__ */ l("td", {
2663
+ children: e.map((e, n) => /* @__PURE__ */ u("td", {
2663
2664
  style: {
2664
- padding: S,
2665
+ padding: x,
2665
2666
  ...w
2666
2667
  },
2667
2668
  children: t?.[n] ?? ""
@@ -2671,18 +2672,18 @@ function Et({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
2671
2672
  });
2672
2673
  }
2673
2674
  var Dt = {
2674
- PageRoot: le,
2675
- Section: ue,
2676
- Container: de,
2677
- Heading: fe,
2678
- TextBlock: Ce,
2679
- ButtonBlock: Ee,
2680
- ImageBlock: De,
2681
- Spacer: Ne,
2682
- Divider: Pe,
2683
- SliderBlock: Be,
2684
- CanvasSlider: Ve,
2685
- TabsBlock: Ge,
2675
+ PageRoot: fe,
2676
+ Section: pe,
2677
+ Container: me,
2678
+ Heading: he,
2679
+ TextBlock: Ee,
2680
+ ButtonBlock: ke,
2681
+ ImageBlock: Ae,
2682
+ Spacer: Ie,
2683
+ Divider: Le,
2684
+ SliderBlock: Ue,
2685
+ CanvasSlider: We,
2686
+ TabsBlock: Je,
2686
2687
  QuickStack: dt,
2687
2688
  CollectionList: ft,
2688
2689
  BreadcrumbsBlock: pt,
@@ -2690,37 +2691,292 @@ var Dt = {
2690
2691
  StepperBlock: ht,
2691
2692
  OrgChartBlock: Tt,
2692
2693
  TableBlock: Et,
2693
- AccordionBlock: Ke,
2694
- NavbarBlock: We,
2695
- ListBlock: Se,
2696
- TextSpan: he,
2697
- QuoteBlock: xe,
2698
- TextLink: Te,
2699
- RichTextBlock: ye,
2700
- RichContentBlock: ye,
2701
- VideoBlock: Oe,
2702
- YouTubeBlock: Ae,
2703
- IframeBlock: je,
2704
- EmbedBlock: Me,
2694
+ AccordionBlock: Ye,
2695
+ NavbarBlock: qe,
2696
+ ListBlock: Te,
2697
+ TextSpan: ve,
2698
+ QuoteBlock: we,
2699
+ TextLink: Oe,
2700
+ RichTextBlock: Se,
2701
+ RichContentBlock: Se,
2702
+ VideoBlock: je,
2703
+ YouTubeBlock: Ne,
2704
+ IframeBlock: Pe,
2705
+ EmbedBlock: Fe,
2705
2706
  FormBlock: rt,
2706
2707
  FormLabel: it,
2707
2708
  FormInput: at,
2708
2709
  FormTextarea: ot,
2709
- FormCheckbox: (e) => /* @__PURE__ */ l(st, {
2710
+ FormCheckbox: (e) => /* @__PURE__ */ u(st, {
2710
2711
  kind: "checkbox",
2711
2712
  ...e
2712
2713
  }),
2713
- FormRadio: (e) => /* @__PURE__ */ l(st, {
2714
+ FormRadio: (e) => /* @__PURE__ */ u(st, {
2714
2715
  kind: "radio",
2715
2716
  ...e
2716
2717
  }),
2717
2718
  FormSelect: ct,
2718
2719
  FormFile: lt,
2719
2720
  FormSubmit: ut
2721
+ }, Ot = {
2722
+ id: "auth",
2723
+ label: "Accounts",
2724
+ category: "Apps",
2725
+ keys: ["SiteLoginForm", "SiteAccountMenu"],
2726
+ ssr: "shell",
2727
+ settings: ["apps.auth.redirect"]
2728
+ }, kt = n({
2729
+ user: null,
2730
+ status: "loading",
2731
+ refresh: () => {},
2732
+ signOut: () => {}
2733
+ }), At = () => i(kt);
2734
+ function jt({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: l }) {
2735
+ let d = i(U), f = o || d?.apiUrl || "/api", p = l || d?.tenant || "", [m, h] = c(t ?? null), [g, _] = c(t ? "user" : n ? "guest" : "loading"), v = r((e, t) => fetch(`${f}${e}`, {
2736
+ ...t,
2737
+ credentials: "include",
2738
+ headers: {
2739
+ "content-type": "application/json",
2740
+ ...p ? { "x-tenant": p } : {},
2741
+ ...t?.headers
2742
+ }
2743
+ }), [f, p]), y = r(() => n ? Promise.resolve(null) : v("/site/me").then((e) => e.ok ? e.json() : null).then((e) => {
2744
+ let t = e?.payload ?? null;
2745
+ return h(t), _(t ? "user" : "guest"), t;
2746
+ }).catch(() => (h(null), _("guest"), null)), [v, n]), b = r(() => v("/site/logout", { method: "post" }).catch(() => {}).then(() => {
2747
+ h(null), _("guest");
2748
+ }), [v]);
2749
+ a(() => {
2750
+ n || t || y();
2751
+ }, [
2752
+ n,
2753
+ t,
2754
+ y
2755
+ ]);
2756
+ let x = s(() => ({
2757
+ user: m,
2758
+ status: g,
2759
+ refresh: y,
2760
+ signOut: b
2761
+ }), [
2762
+ m,
2763
+ g,
2764
+ y,
2765
+ b
2766
+ ]);
2767
+ return /* @__PURE__ */ u(kt.Provider, {
2768
+ value: x,
2769
+ children: e
2770
+ });
2771
+ }
2772
+ function Mt({ when: e, children: t }) {
2773
+ let { status: n } = At();
2774
+ return !e || e === "always" ? t : n === "loading" ? null : e === "user" == (n === "user") ? t : null;
2775
+ }
2776
+ //#endregion
2777
+ //#region ../ui/src/components/builder/apps/auth/views.jsx
2778
+ function Nt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: r = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: l, inert: f, linked: p, show: m }) {
2779
+ let { tenant: h, apiUrl: g, settings: _ } = i(U), [v, y] = c("form"), [b, x] = c(""), [C, w] = c(!1), T = e === "register", E = f ? m || "form" : v, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
2780
+ if (e.preventDefault(), f) return;
2781
+ let n = new FormData(e.currentTarget);
2782
+ w(!0), x("");
2783
+ try {
2784
+ let e = await fetch(`${g || "/api"}/site/${T ? "register" : "login"}`, {
2785
+ method: "post",
2786
+ headers: {
2787
+ "content-type": "application/json",
2788
+ ...h ? { "x-tenant": h } : {}
2789
+ },
2790
+ credentials: "same-origin",
2791
+ body: JSON.stringify({
2792
+ email: n.get("email"),
2793
+ password: n.get("password"),
2794
+ ...T ? { name: n.get("name") || "" } : {}
2795
+ })
2796
+ }), r = await e.json().catch(() => null);
2797
+ if (!e.ok || r?.success === !1) {
2798
+ x(r?.error?.message || "Sign-in failed"), y("error"), w(!1);
2799
+ return;
2800
+ }
2801
+ if (y("success"), typeof window < "u") {
2802
+ let e = D(t) || D(new URLSearchParams(window.location.search).get("next")) || D(_?.["apps.auth.redirect"]) || "/";
2803
+ window.location.assign(e);
2804
+ }
2805
+ } catch {
2806
+ x("Sign-in failed"), y("error"), w(!1);
2807
+ }
2808
+ };
2809
+ return /* @__PURE__ */ d("div", {
2810
+ ref: l,
2811
+ style: {
2812
+ display: "grid",
2813
+ gap: 12,
2814
+ maxWidth: 360,
2815
+ ...S(s)
2816
+ },
2817
+ children: [
2818
+ /* @__PURE__ */ d("form", {
2819
+ onSubmit: O,
2820
+ style: {
2821
+ display: E === "form" ? "grid" : "none",
2822
+ gap: 10
2823
+ },
2824
+ children: [
2825
+ T ? /* @__PURE__ */ d("label", {
2826
+ style: {
2827
+ ...X,
2828
+ display: "grid",
2829
+ gap: 6
2830
+ },
2831
+ children: [a, /* @__PURE__ */ u("input", {
2832
+ name: "name",
2833
+ type: "text",
2834
+ style: Z,
2835
+ ...Q(f)
2836
+ })]
2837
+ }) : null,
2838
+ /* @__PURE__ */ d("label", {
2839
+ style: {
2840
+ ...X,
2841
+ display: "grid",
2842
+ gap: 6
2843
+ },
2844
+ children: [n, /* @__PURE__ */ u("input", {
2845
+ name: "email",
2846
+ type: "email",
2847
+ required: !f,
2848
+ style: Z,
2849
+ ...Q(f)
2850
+ })]
2851
+ }),
2852
+ /* @__PURE__ */ d("label", {
2853
+ style: {
2854
+ ...X,
2855
+ display: "grid",
2856
+ gap: 6
2857
+ },
2858
+ children: [r, /* @__PURE__ */ u("input", {
2859
+ name: "password",
2860
+ type: "password",
2861
+ required: !f,
2862
+ style: Z,
2863
+ ...Q(f)
2864
+ })]
2865
+ }),
2866
+ /* @__PURE__ */ u("button", {
2867
+ type: f ? "button" : "submit",
2868
+ disabled: C || void 0,
2869
+ style: {
2870
+ ...J,
2871
+ border: 0,
2872
+ padding: "10px 22px",
2873
+ borderRadius: 8,
2874
+ fontSize: 15,
2875
+ fontWeight: 600,
2876
+ cursor: "pointer",
2877
+ opacity: C ? .6 : 1
2878
+ },
2879
+ children: o || (T ? "Create account" : "Sign in")
2880
+ }),
2881
+ b ? /* @__PURE__ */ u("p", {
2882
+ style: {
2883
+ margin: 0,
2884
+ fontSize: 14,
2885
+ color: "#dc2626"
2886
+ },
2887
+ children: b
2888
+ }) : null
2889
+ ]
2890
+ }),
2891
+ /* @__PURE__ */ u("div", {
2892
+ style: { display: E === "success" ? "block" : "none" },
2893
+ children: p?.success ?? null
2894
+ }),
2895
+ /* @__PURE__ */ u("div", {
2896
+ style: { display: E === "error" ? "block" : "none" },
2897
+ children: p?.error ?? null
2898
+ })
2899
+ ]
2900
+ });
2901
+ }
2902
+ function Pt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
2903
+ let { user: c, status: l, signOut: f } = At(), p = a ? s || "user" : l, m = a ? {
2904
+ name: "Ada Lovelace",
2905
+ email: "ada@example.com"
2906
+ } : c;
2907
+ return p === "loading" ? /* @__PURE__ */ u("div", {
2908
+ ref: i,
2909
+ style: {
2910
+ minHeight: 24,
2911
+ ...S(r)
2912
+ }
2913
+ }) : p === "user" ? /* @__PURE__ */ d("div", {
2914
+ ref: i,
2915
+ style: {
2916
+ display: "flex",
2917
+ alignItems: "center",
2918
+ gap: 10,
2919
+ ...S(r)
2920
+ },
2921
+ children: [
2922
+ /* @__PURE__ */ d("span", {
2923
+ style: {
2924
+ ...X,
2925
+ fontWeight: 600
2926
+ },
2927
+ children: [
2928
+ e,
2929
+ " ",
2930
+ m?.name || m?.email || ""
2931
+ ]
2932
+ }),
2933
+ n && m?.email ? /* @__PURE__ */ u("span", {
2934
+ style: {
2935
+ ...X,
2936
+ opacity: .7
2937
+ },
2938
+ children: m.email
2939
+ }) : null,
2940
+ /* @__PURE__ */ u("button", {
2941
+ type: "button",
2942
+ onClick: a ? void 0 : f,
2943
+ style: {
2944
+ ...J,
2945
+ border: 0,
2946
+ padding: "8px 16px",
2947
+ borderRadius: 8,
2948
+ fontSize: 14,
2949
+ cursor: a ? "default" : "pointer"
2950
+ },
2951
+ ...Q(a),
2952
+ children: t
2953
+ })
2954
+ ]
2955
+ }) : /* @__PURE__ */ u("div", {
2956
+ ref: i,
2957
+ style: {
2958
+ display: "flex",
2959
+ alignItems: "center",
2960
+ gap: 10,
2961
+ ...S(r)
2962
+ },
2963
+ children: o?.signedOut ?? null
2964
+ });
2965
+ }
2966
+ //#endregion
2967
+ //#region ../ui/src/components/builder/apps/index.js
2968
+ var Ft = [Ot], It = {
2969
+ SiteLoginForm: Nt,
2970
+ SiteAccountMenu: Pt
2720
2971
  };
2972
+ new Set(Ft.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
2721
2973
  //#endregion
2722
2974
  //#region ../ui/src/components/builder/render.jsx
2723
- function Q(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
2975
+ var Lt = {
2976
+ ...Dt,
2977
+ ...It
2978
+ };
2979
+ function $(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
2724
2980
  let o = n[e];
2725
2981
  if (!o || o.hidden) return null;
2726
2982
  let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
@@ -2728,99 +2984,110 @@ function Q(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
2728
2984
  let n = o.props?.componentId, s = r?.[n];
2729
2985
  if (!s?.template || i.has(n)) return null;
2730
2986
  let c = new Set(i).add(n);
2731
- return /* @__PURE__ */ l(t, { children: Q(s.template.rootId, s.template.nodes, r, c, a) }, e);
2987
+ return /* @__PURE__ */ u(t, { children: $(s.template.rootId, s.template.nodes, r, c, a) }, e);
2732
2988
  }
2733
- let u = Dt[s];
2734
- if (!u) return null;
2735
- let d = (o.nodes ?? []).map((e) => Q(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, Q(t, n, r, i)])) : void 0;
2736
- return /* @__PURE__ */ l(u, {
2989
+ let l = Lt[s];
2990
+ if (!l) return null;
2991
+ let d = (o.nodes ?? []).map((e) => $(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, $(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
2737
2992
  ...c,
2738
2993
  ...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
2739
2994
  linked: p,
2740
2995
  nodeRef: (t) => {
2741
- t && (t.setAttribute("data-wb", e), T(t, c));
2996
+ t && (t.setAttribute("data-wb", e), E(t, c));
2742
2997
  },
2743
2998
  children: d.length ? d : void 0
2744
2999
  }, e);
3000
+ return c.when && c.when !== "always" ? /* @__PURE__ */ u(Mt, {
3001
+ when: c.when,
3002
+ children: m
3003
+ }, e) : m;
2745
3004
  }
2746
3005
  //#endregion
2747
3006
  //#region ../ui/src/components/builder/PageRenderer.jsx
2748
- var Ot = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" ");
2749
- function kt({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: s, tenant: c, apiUrl: d, datasets: f, locale: m, direction: g }) {
2750
- let v = s?.js?.trim();
2751
- if (i(() => {
2752
- if (!v) return;
3007
+ var Rt = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" ");
3008
+ function zt({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, custom: o, tenant: c, apiUrl: l, datasets: f, locale: p, direction: h, settings: _, siteUser: y }) {
3009
+ let b = o?.js?.trim();
3010
+ if (a(() => {
3011
+ if (!b) return;
2753
3012
  let e = document.createElement("script");
2754
- return e.text = v, document.body.appendChild(e), () => e.remove();
2755
- }, [v]), !e?.ROOT) return null;
2756
- let y = {
2757
- lang: m || void 0,
2758
- dir: p(g, m)
2759
- }, b = {
3013
+ return e.text = b, document.body.appendChild(e), () => e.remove();
3014
+ }, [b]), !e?.ROOT) return null;
3015
+ let x = {
3016
+ lang: p || void 0,
3017
+ dir: m(h, p)
3018
+ }, S = {
2760
3019
  minHeight: "100%",
2761
3020
  display: "flex",
2762
3021
  flexDirection: "column"
2763
- }, x = Q("ROOT", e, n), S = o(() => ({ render: (t, r) => Q(t, e, n, void 0, { mapProps: r }) }), [e, n]), C = N(e, n), w = M(e, n), T = s?.css?.trim(), E = _(e, n).map((e) => /* @__PURE__ */ l("link", {
3022
+ }, C = $("ROOT", e, n), w = s(() => ({ render: (t, r) => $(t, e, n, void 0, { mapProps: r }) }), [e, n]), T = P(e, n), E = N(e, n), D = o?.css?.trim(), O = v(e, n).map((e) => /* @__PURE__ */ u("link", {
2764
3023
  rel: "stylesheet",
2765
3024
  precedence: "default",
2766
- href: h(e)
3025
+ href: g(e)
2767
3026
  }, e));
2768
- if (r !== "auto") return /* @__PURE__ */ l(U.Provider, {
3027
+ if (r !== "auto") return /* @__PURE__ */ u(U.Provider, {
2769
3028
  value: {
2770
3029
  tenant: c || "",
2771
- apiUrl: d || "/api",
2772
- locale: m || ""
3030
+ apiUrl: l || "/api",
3031
+ locale: p || "",
3032
+ settings: _ ?? null
2773
3033
  },
2774
- children: /* @__PURE__ */ l(W.Provider, {
2775
- value: f ?? null,
2776
- children: /* @__PURE__ */ l(G.Provider, {
2777
- value: S,
2778
- children: /* @__PURE__ */ u("div", {
2779
- ...y,
2780
- style: {
2781
- ...b,
2782
- ...H(t, r),
2783
- ...a
2784
- },
2785
- children: [
2786
- E,
2787
- C && /* @__PURE__ */ l("style", { children: C }),
2788
- w && /* @__PURE__ */ l("style", { children: w }),
2789
- T && /* @__PURE__ */ l("style", { children: T }),
2790
- x
2791
- ]
3034
+ children: /* @__PURE__ */ u(jt, {
3035
+ initialUser: y,
3036
+ children: /* @__PURE__ */ u(W.Provider, {
3037
+ value: f ?? null,
3038
+ children: /* @__PURE__ */ u(G.Provider, {
3039
+ value: w,
3040
+ children: /* @__PURE__ */ d("div", {
3041
+ ...x,
3042
+ style: {
3043
+ ...S,
3044
+ ...te(t, r),
3045
+ ...i
3046
+ },
3047
+ children: [
3048
+ O,
3049
+ T && /* @__PURE__ */ u("style", { children: T }),
3050
+ E && /* @__PURE__ */ u("style", { children: E }),
3051
+ D && /* @__PURE__ */ u("style", { children: D }),
3052
+ C
3053
+ ]
3054
+ })
2792
3055
  })
2793
3056
  })
2794
3057
  })
2795
3058
  });
2796
- let D = B(t);
2797
- return /* @__PURE__ */ l(U.Provider, {
3059
+ let k = B(t);
3060
+ return /* @__PURE__ */ u(U.Provider, {
2798
3061
  value: {
2799
3062
  tenant: c || "",
2800
- apiUrl: d || "/api",
2801
- locale: m || ""
3063
+ apiUrl: l || "/api",
3064
+ locale: p || "",
3065
+ settings: _ ?? null
2802
3066
  },
2803
- children: /* @__PURE__ */ l(W.Provider, {
2804
- value: f ?? null,
2805
- children: /* @__PURE__ */ l(G.Provider, {
2806
- value: S,
2807
- children: /* @__PURE__ */ u("div", {
2808
- ...y,
2809
- className: "webim-page",
2810
- style: {
2811
- ...b,
2812
- ...ee(t),
2813
- ...a
2814
- },
2815
- children: [
2816
- /* @__PURE__ */ l("style", { children: `.webim-page { ${Ot(V(D.light))} }
2817
- @media (prefers-color-scheme: dark) { .webim-page { ${Ot(V(D.dark))} } }` }),
2818
- E,
2819
- C && /* @__PURE__ */ l("style", { children: C }),
2820
- w && /* @__PURE__ */ l("style", { children: w }),
2821
- T && /* @__PURE__ */ l("style", { children: T }),
2822
- x
2823
- ]
3067
+ children: /* @__PURE__ */ u(jt, {
3068
+ initialUser: y,
3069
+ children: /* @__PURE__ */ u(W.Provider, {
3070
+ value: f ?? null,
3071
+ children: /* @__PURE__ */ u(G.Provider, {
3072
+ value: w,
3073
+ children: /* @__PURE__ */ d("div", {
3074
+ ...x,
3075
+ className: "webim-page",
3076
+ style: {
3077
+ ...S,
3078
+ ...H(t),
3079
+ ...i
3080
+ },
3081
+ children: [
3082
+ /* @__PURE__ */ u("style", { children: `.webim-page { ${Rt(V(k.light))} }
3083
+ @media (prefers-color-scheme: dark) { .webim-page { ${Rt(V(k.dark))} } }` }),
3084
+ O,
3085
+ T && /* @__PURE__ */ u("style", { children: T }),
3086
+ E && /* @__PURE__ */ u("style", { children: E }),
3087
+ D && /* @__PURE__ */ u("style", { children: D }),
3088
+ C
3089
+ ]
3090
+ })
2824
3091
  })
2825
3092
  })
2826
3093
  })
@@ -2828,8 +3095,8 @@ function kt({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
2828
3095
  }
2829
3096
  //#endregion
2830
3097
  //#region src/WebimContent.jsx
2831
- function At({ bundle: e, mode: t = "auto", style: n }) {
2832
- return e?.blocks?.ROOT ? /* @__PURE__ */ l(kt, {
3098
+ function Bt({ bundle: e, mode: t = "auto", style: n }) {
3099
+ return e?.blocks?.ROOT ? /* @__PURE__ */ u(zt, {
2833
3100
  blocks: e.blocks,
2834
3101
  theme: e.theme,
2835
3102
  components: e.components,
@@ -2839,13 +3106,14 @@ function At({ bundle: e, mode: t = "auto", style: n }) {
2839
3106
  datasets: e.datasets,
2840
3107
  locale: e.locale,
2841
3108
  direction: e.direction,
3109
+ settings: e.settings,
2842
3110
  mode: t,
2843
3111
  style: n
2844
3112
  }) : null;
2845
3113
  }
2846
3114
  //#endregion
2847
3115
  //#region src/bundle.js
2848
- function jt({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
3116
+ function Vt({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
2849
3117
  let a = {
2850
3118
  ...t?.global ?? {},
2851
3119
  ...t?.tenant ?? {}
@@ -2855,7 +3123,7 @@ function jt({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
2855
3123
  title: e.title,
2856
3124
  slug: e.slug,
2857
3125
  blocks: i && o.i18n?.[i]?.blocks || e.blocks,
2858
- theme: te(o, a.builder_themes?.themes),
3126
+ theme: ne(o, a.builder_themes?.themes),
2859
3127
  components: a.builder_components?.components ?? {},
2860
3128
  custom: o.custom,
2861
3129
  seo: o.seo,
@@ -2863,23 +3131,24 @@ function jt({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
2863
3131
  locale: i || a.locales?.default,
2864
3132
  locales: a.locales,
2865
3133
  tenant: n ?? "",
2866
- apiUrl: r ?? ""
3134
+ apiUrl: r ?? "",
3135
+ settings: a
2867
3136
  };
2868
3137
  }
2869
3138
  //#endregion
2870
3139
  //#region src/fetchPage.js
2871
- var Mt = async (e) => {
3140
+ var Ht = async (e) => {
2872
3141
  let t = await e.json().catch(() => null);
2873
3142
  if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
2874
3143
  return t?.payload ?? t;
2875
3144
  };
2876
- async function Nt({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, fetch: o }) {
3145
+ async function Ut({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, fetch: o }) {
2877
3146
  if (!e) throw Error("fetchPage: apiUrl is required");
2878
3147
  if (!n) throw Error("fetchPage: slug is required");
2879
3148
  let s = o ?? fetch, c = e.replace(/\/$/, ""), l = {
2880
3149
  ...t ? { "x-tenant": t } : {},
2881
3150
  ...a ? { authorization: `Bearer ${a}` } : {}
2882
- }, [u, d] = await Promise.all([s(`${c}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: l }).then(Mt), s(`${c}/settings/public`, { headers: l }).then(Mt)]), f = jt({
3151
+ }, [u, d] = await Promise.all([s(`${c}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: l }).then(Ht), s(`${c}/settings/public`, { headers: l }).then(Ht)]), f = Vt({
2883
3152
  page: u,
2884
3153
  settings: d,
2885
3154
  tenant: t,
@@ -2887,47 +3156,47 @@ async function Nt({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
2887
3156
  locale: r
2888
3157
  }), p = [...new Set(Object.values(f.blocks ?? {}).map((e) => e?.type?.resolvedName === "CollectionList" ? e.props?.collection : e?.type?.resolvedName === "TableBlock" || e?.type?.resolvedName === "OrgChartBlock" ? e.props?.source : null).filter(Boolean))];
2889
3158
  if (p.length) {
2890
- let e = (e) => e.startsWith("api:") ? `${c}/data/${encodeURIComponent(e.slice(4))}` : `${c}/dynamic/${encodeURIComponent(e)}${r ? `?locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(p.map((t) => s(e(t), { headers: l }).then(Mt).then((e) => [t, Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : []]).catch(() => [t, []])));
3159
+ let e = (e) => e.startsWith("api:") ? `${c}/data/${encodeURIComponent(e.slice(4))}` : `${c}/dynamic/${encodeURIComponent(e)}${r ? `?locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(p.map((t) => s(e(t), { headers: l }).then(Ht).then((e) => [t, Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : []]).catch(() => [t, []])));
2891
3160
  f.datasets = Object.fromEntries(t);
2892
3161
  }
2893
3162
  return f;
2894
3163
  }
2895
3164
  //#endregion
2896
3165
  //#region src/ssr.jsx
2897
- var $ = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
3166
+ var Wt = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
2898
3167
  "&": "&amp;",
2899
3168
  "<": "&lt;",
2900
3169
  ">": "&gt;",
2901
3170
  "\"": "&quot;"
2902
3171
  })[e]);
2903
- function Pt(t, { mode: n = "auto", style: r } = {}) {
2904
- return e(/* @__PURE__ */ l(At, {
3172
+ function Gt(t, { mode: n = "auto", style: r } = {}) {
3173
+ return e(/* @__PURE__ */ u(Bt, {
2905
3174
  bundle: t,
2906
3175
  mode: n,
2907
3176
  style: r
2908
3177
  }));
2909
3178
  }
2910
- function Ft(e, { mode: t = "auto", lang: n } = {}) {
2911
- let r = e.seo ?? {}, i = n || e.locale || "en", a = p(e.direction, i), o = r.title || e.title || e.slug || "Page", s = e.custom?.js?.trim(), c = [
3179
+ function Kt(e, { mode: t = "auto", lang: n } = {}) {
3180
+ let r = e.seo ?? {}, i = n || e.locale || "en", a = m(e.direction, i), o = r.title || e.title || e.slug || "Page", s = e.custom?.js?.trim(), c = [
2912
3181
  "<meta charset=\"utf-8\"/>",
2913
3182
  "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
2914
- `<title>${$(o)}</title>`,
2915
- r.description && `<meta name="description" content="${$(r.description)}"/>`,
2916
- `<meta property="og:title" content="${$(o)}"/>`,
2917
- r.image && `<meta property="og:image" content="${$(r.image)}"/>`,
3183
+ `<title>${Wt(o)}</title>`,
3184
+ r.description && `<meta name="description" content="${Wt(r.description)}"/>`,
3185
+ `<meta property="og:title" content="${Wt(o)}"/>`,
3186
+ r.image && `<meta property="og:image" content="${Wt(r.image)}"/>`,
2918
3187
  r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
2919
3188
  "<style>html,body{margin:0;height:100%}</style>"
2920
3189
  ].filter(Boolean).join("\n");
2921
3190
  return `<!doctype html>
2922
- <html lang="${$(i)}"${a ? ` dir="${a}"` : ""}>
3191
+ <html lang="${Wt(i)}"${a ? ` dir="${a}"` : ""}>
2923
3192
  <head>
2924
3193
  ${c}
2925
3194
  </head>
2926
3195
  <body>
2927
- ${Pt(e, { mode: t })}
3196
+ ${Gt(e, { mode: t })}
2928
3197
  ${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
2929
3198
  </body>
2930
3199
  </html>`;
2931
3200
  }
2932
3201
  //#endregion
2933
- export { jt as assembleBundle, Nt as fetchPage, Pt as renderBundleHtml, Ft as renderPageDocument };
3202
+ export { Vt as assembleBundle, Ut as fetchPage, Gt as renderBundleHtml, Kt as renderPageDocument };