@bravostudioai/react 0.1.41 → 0.1.45

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,21 +1,21 @@
1
- import { jsx as d, jsxs as it, Fragment as ut } from "react/jsx-runtime";
2
- import v, { useContext as N, useMemo as Ht, useState as Nt, useCallback as Mt } from "react";
3
- import _ from "./contexts/EncoreBindingContext.js";
1
+ import { jsx as d, jsxs as it, Fragment as pt } from "react/jsx-runtime";
2
+ import v, { useContext as M, useMemo as Ht, useState as Mt, useCallback as Nt } from "react";
3
+ import q from "./contexts/EncoreBindingContext.js";
4
4
  import $ from "./stores/useEncoreState.js";
5
5
  import lt from "./contexts/EncoreComponentIdContext.js";
6
6
  import Ot from "axios";
7
- import ft from "./contexts/EncoreActionContext.js";
8
- import jt from "./contexts/EncoreRepeatingContainerContext.js";
7
+ import ht from "./contexts/EncoreActionContext.js";
8
+ import Gt from "./contexts/EncoreRepeatingContainerContext.js";
9
9
  const ct = v.createContext({}), H = v.createContext(
10
10
  {}
11
- ), st = (t) => t.replace(/#(\w{2})(\w{6})/, "#$2$1"), Gt = (t) => t.slice(1, 3) === "00", Ut = (t) => {
11
+ ), st = (t) => t.replace(/#(\w{2})(\w{6})/, "#$2$1"), jt = (t) => t.slice(1, 3) === "00", Ut = (t) => {
12
12
  if (!Array.isArray(t)) return null;
13
13
  const r = t.find((n) => n.startsWith("input-group:"));
14
14
  if (!r) return null;
15
15
  const e = r.split(":");
16
16
  return e.length >= 3 ? { type: e[1], groupName: e[2] } : null;
17
17
  }, rt = () => {
18
- const [t, r] = Nt({ width: 0, height: 0 }), e = v.useRef(null);
18
+ const [t, r] = Mt({ width: 0, height: 0 }), e = v.useRef(null);
19
19
  return v.useEffect(() => {
20
20
  if (!e.current) return;
21
21
  const n = e.current, i = () => {
@@ -33,32 +33,38 @@ const ct = v.createContext({}), H = v.createContext(
33
33
  });
34
34
  return s.observe(n), () => s.disconnect();
35
35
  }, []), { dimensions: t, ref: e };
36
- }, R = (t, r = {}) => {
37
- const e = N(ct), n = N(H), i = {
36
+ }, W = (t, r = {}) => {
37
+ const e = M(ct), n = M(H), i = {
38
38
  width: window.innerWidth,
39
39
  height: window.innerHeight
40
- }, s = Mt(
40
+ }, s = Nt(
41
41
  (l) => (n.dimensions?.width ?? 0) * 0.01 * l,
42
42
  [n.dimensions?.width]
43
43
  ), o = {};
44
44
  r = { debug: !1, ...r };
45
45
  const p = $((l) => l.fontsById || {});
46
46
  if ($((l) => l.fontsByIdFull || {}), !t || !t) return;
47
- const a = n.dimensions?.width ?? i.width, h = n.dimensions?.height ?? i.height;
48
- if (t.layout?.layoutSizingHorizontal || t.layout?.layoutSizingVertical || (t.width && a > 0 && (o.width = t.width * a * 0.01), t.aspectRatio && t.width ? a > 0 && (o.height = t.width * a * 0.01 / t.aspectRatio) : t.height && h > 0 && (o.height = t.height * h * 0.01)), !(n?.isFlex ?? !1) && t.positioning) {
49
- const l = t.layout?.layoutSizingHorizontal === "FIXED" || t.layout?.layoutSizingVertical === "FIXED", I = l && t.positioning.top < 0 ? 0 : t.positioning.top, E = l && t.positioning.left < 0 ? 0 : t.positioning.left;
47
+ const a = n.dimensions?.width ?? i.width, g = n.dimensions?.height ?? i.height;
48
+ t.layout?.mode === "GRID" && console.log("[DEBUG] GRID MODE DETECTED", {
49
+ id: "unknown",
50
+ // style object doesn't have ID context here easily without prop drill
51
+ layout: t.layout
52
+ }), t.layout?.layoutSizingHorizontal || t.layout?.layoutSizingVertical || (t.width && a > 0 && (o.width = t.width * a * 0.01), t.aspectRatio && t.width ? a > 0 && (o.height = t.width * a * 0.01 / t.aspectRatio) : t.height && g > 0 && (o.height = t.height * g * 0.01));
53
+ const f = n?.isFlex ?? !1;
54
+ if (!f && t.positioning) {
55
+ const l = t.layout?.layoutSizingHorizontal === "FIXED" || t.layout?.layoutSizingVertical === "FIXED", I = l && t.positioning.top < 0 ? 0 : t.positioning.top, F = l && t.positioning.left < 0 ? 0 : t.positioning.left;
50
56
  let w = !1;
51
57
  t.horizontalPosition === "center" && (w = !0), o.top = `${I}%`;
52
58
  const k = !!t.inset;
53
59
  if (w) {
54
60
  if (k) {
55
- const P = String(t.inset).split(/\s+/);
56
- P.length === 3 ? o.inset = `${P[0]} 50% ${P[2]} auto` : P.length === 4 && (o.inset = `${P[0]} 50% ${P[2]} auto`), delete o.left, delete o.right;
61
+ const T = String(t.inset).split(/\s+/);
62
+ T.length === 3 ? o.inset = `${T[0]} 50% ${T[2]} auto` : T.length === 4 && (o.inset = `${T[0]} 50% ${T[2]} auto`), delete o.left, delete o.right;
57
63
  } else
58
64
  o.left = "50%", o.right = "auto";
59
65
  o.transform = "translateX(-50%)";
60
66
  } else
61
- k ? o.inset = t.inset : o.left = `${E}%`;
67
+ k ? o.inset = t.inset : o.left = `${F}%`;
62
68
  l ? (o.right = "auto", o.bottom = "auto") : (t.positioning.bottom !== void 0 && (o.bottom = `${t.positioning.bottom}%`), t.positioning.right !== void 0 && (o.right = `${t.positioning.right}%`)), o.position = "absolute";
63
69
  }
64
70
  if (t.layout?.padding) {
@@ -67,20 +73,20 @@ const ct = v.createContext({}), H = v.createContext(
67
73
  }
68
74
  if (t.layout?.mode) {
69
75
  o.display = "flex";
70
- const l = (P) => P ? {
76
+ const l = (T) => T ? {
71
77
  MIN: "flex-start",
72
78
  MAX: "flex-end",
73
79
  CENTER: "center",
74
80
  SPACE_BETWEEN: "space-between",
75
81
  SPACE_AROUND: "space-around",
76
82
  SPACE_EVENLY: "space-evenly"
77
- }[P] || P.toLowerCase().replace(/_/g, "-") : void 0;
78
- t.layout.mode == "HORIZONTAL" ? (o.flexDirection = "row", t.layout.flexWrap && (o.flexWrap = t.layout.flexWrap), o.justifyContent = l(
83
+ }[T] || T.toLowerCase().replace(/_/g, "-") : void 0;
84
+ t.layout.mode == "HORIZONTAL" || t.layout.mode == "GRID" ? (o.flexDirection = "row", t.layout.flexWrap && (o.flexWrap = t.layout.flexWrap), o.justifyContent = l(
79
85
  t.layout.primaryAxisAlignItems
80
86
  ), o.alignItems = t.layout.counterAxisAlignItems) : (o.flexDirection = "column", o.justifyContent = l(
81
87
  t.layout.primaryAxisAlignItems
82
- ), o.alignItems = t.layout.counterAxisAlignItems), o.flexGrow = t.layout.grow, t.layout.wrap === "WRAP" || t.layout.flexWrap === "wrap" ? o.flexWrap = "wrap" : t.layout.flexWrap ? o.flexWrap = t.layout.flexWrap : o.flexWrap = "nowrap";
83
- const I = t.layout.itemSpacing, E = e.scaleFactor ?? 1, k = t.layout.primaryAxisAlignItems === "SPACE_BETWEEN" ? 0 : (I !== void 0 ? I : 0) * E;
88
+ ), o.alignItems = t.layout.counterAxisAlignItems), o.flexGrow = t.layout.grow, t.layout.wrap === "WRAP" || t.layout.flexWrap === "wrap" || t.layout.mode === "GRID" ? o.flexWrap = "wrap" : t.layout.flexWrap ? o.flexWrap = t.layout.flexWrap : o.flexWrap = "nowrap";
89
+ const I = t.layout.itemSpacing, F = e.scaleFactor ?? 1, k = t.layout.primaryAxisAlignItems === "SPACE_BETWEEN" ? 0 : (I !== void 0 ? I : 0) * F;
84
90
  o.gap = k === 0 ? "0px" : `${k}px`, o.rowGap = k === 0 ? "0px" : `${k}px`, o.columnGap = k === 0 ? "0px" : `${k}px`, (o.flexWrap === "wrap" || o.flexWrap === "wrap-reverse") && (o.alignContent = "flex-start"), r.debug || t.layout?.mode === "HORIZONTAL" && I === 0 ? console.log("[useEncoreStyle] Setting gap properties:", {
85
91
  itemSpacing: I,
86
92
  spacing: k,
@@ -96,7 +102,7 @@ const ct = v.createContext({}), H = v.createContext(
96
102
  I
97
103
  );
98
104
  }
99
- if (t.layout?.layoutSizingHorizontal === "FILL" && (o.width = "100%"), t.layout?.layoutSizingHorizontal === "FIXED") {
105
+ if (t.layout?.layoutSizingHorizontal === "FILL" && (f || (o.width = "100%")), t.layout?.layoutSizingHorizontal === "FIXED") {
100
106
  const l = e.scaleFactor ?? 1;
101
107
  o.width = t.layout.size.x * l;
102
108
  }
@@ -110,7 +116,7 @@ const ct = v.createContext({}), H = v.createContext(
110
116
  o.height = `${w}%`;
111
117
  } else
112
118
  o.height = "100%";
113
- t.layout?.layoutSizingVertical, t.backgroundColor && !Gt(t.backgroundColor) && (o.backgroundColor = st(t.backgroundColor)), t.color && (o.color = st(t.color)), t.lineHeightPx && (o.lineHeight = (t.lineHeightPx * (e.scaleFactor ?? 1)).toString() + "px"), t.fontSize && (o.fontSize = t.fontSize * (e.scaleFactor ?? 1)), t.fontWeight && (o.fontWeight = `${t.fontWeight}`), t.opacity && (o.opacity = t.opacity * 0.01);
119
+ t.layout?.layoutSizingVertical, t.backgroundColor && !jt(t.backgroundColor) && (o.backgroundColor = st(t.backgroundColor)), t.color && (o.color = st(t.color)), t.lineHeightPx && (o.lineHeight = (t.lineHeightPx * (e.scaleFactor ?? 1)).toString() + "px"), t.fontSize && (o.fontSize = t.fontSize * (e.scaleFactor ?? 1)), t.fontWeight && (o.fontWeight = `${t.fontWeight}`), t.opacity && (o.opacity = t.opacity * 0.01);
114
120
  const y = (t.fontId ? p[t.fontId] : void 0) || t.fontFamily || void 0;
115
121
  if (y ? ([
116
122
  "sans-serif",
@@ -133,8 +139,8 @@ const ct = v.createContext({}), H = v.createContext(
133
139
  o.borderTopLeftRadius = l[0], o.borderTopRightRadius = l[1], o.borderBottomRightRadius = l[2], o.borderBottomLeftRadius = l[3], delete o.borderRadius;
134
140
  }
135
141
  return t.borderWidth && (t.borderWidth > 5 ? o.borderWidth = t.borderWidth * 0.5 : o.borderWidth = t.borderWidth * 1.5), t.borderColor && (o.borderColor = st(t.borderColor)), (t.borderWidth || t.borderColor) && (o.borderStyle = "solid"), t.rotation && (o.transform = `rotate(${t.rotation}deg)`), t.textCase === "upper" && (o.textTransform = "uppercase"), t.textCase === "lower" && (o.textTransform = "lowercase"), t.letterSpacing && (o.letterSpacing = t.letterSpacing), t.textAlign && (o.textAlign = t.textAlign), r.debug && (o.borderWidth = 1, o.borderColor = "#FF0000FF", o.borderStyle = "solid"), o;
136
- }, q = ({ id: t, nodeData: r }) => {
137
- const e = N(_), n = e?.nodeData?.[t], { patch: i, list: s } = n ?? { list: null, patch: null }, p = Array.isArray(r?.tags) && (r.tags.includes("encore:data:array") || r.tags.includes("bravo:data:array")) && e?.arrayDataById && e.arrayDataById[t] && Array.isArray(e.arrayDataById[t]) ? e.arrayDataById[t] : null;
142
+ }, J = ({ id: t, nodeData: r }) => {
143
+ const e = M(q), n = e?.nodeData?.[t], { patch: i, list: s } = n ?? { list: null, patch: null }, p = Array.isArray(r?.tags) && (r.tags.includes("encore:data:array") || r.tags.includes("bravo:data:array")) && e?.arrayDataById && e.arrayDataById[t] && Array.isArray(e.arrayDataById[t]) ? e.arrayDataById[t] : null;
138
144
  let a = i ? {
139
145
  ...r,
140
146
  ...i || {},
@@ -142,45 +148,45 @@ const ct = v.createContext({}), H = v.createContext(
142
148
  // Preserve original actions if patch has empty or missing actions
143
149
  actions: i.actions && Array.isArray(i.actions) && i.actions.length > 0 ? i.actions : r.actions || i.actions || []
144
150
  } : r;
145
- const h = e?.textOverridesById && e.textOverridesById[t] !== void 0 ? e.textOverridesById[t] : void 0;
146
- h !== void 0 && Array.isArray(r?.tags) && r.tags.includes("PROP:TEXT_VAR") && (a = {
151
+ const g = e?.textOverridesById && e.textOverridesById[t] !== void 0 ? e.textOverridesById[t] : void 0;
152
+ g !== void 0 && Array.isArray(r?.tags) && r.tags.includes("PROP:TEXT_VAR") && (a = {
147
153
  ...a,
148
- data: { ...a?.data || {}, text: String(h) }
154
+ data: { ...a?.data || {}, text: String(g) }
149
155
  });
150
- const F = Array.isArray(r?.tags) && (r.tags.includes("encore:data") || r.tags.includes("bravo:data")), g = e?.rootData;
151
- g && g[t] && typeof g[t] == "object" && (a = {
156
+ const E = Array.isArray(r?.tags) && (r.tags.includes("encore:data") || r.tags.includes("bravo:data")), f = e?.rootData;
157
+ f && f[t] && typeof f[t] == "object" && (a = {
152
158
  ...a,
153
159
  data: {
154
160
  ...a.data || {},
155
- ...g[t]
161
+ ...f[t]
156
162
  }
157
163
  });
158
164
  const y = e?.nodeData && typeof e.nodeData == "object";
159
- if (F || y) {
165
+ if (E || y) {
160
166
  const l = e?.nodeData;
161
167
  if (l && typeof l == "object") {
162
168
  if (l[t] !== void 0) {
163
- const E = l[t];
164
- E && typeof E == "object" && a.data && (a = {
169
+ const F = l[t];
170
+ F && typeof F == "object" && a.data && (a = {
165
171
  ...a,
166
172
  data: {
167
173
  ...a.data,
168
- ...E
174
+ ...F
169
175
  }
170
176
  });
171
- } else if (F && l.description && a.data && (a = {
177
+ } else if (E && l.description && a.data && (a = {
172
178
  ...a,
173
179
  data: {
174
180
  ...a.data,
175
181
  text: l.description
176
182
  }
177
183
  }), l.image && a.data) {
178
- const E = l.image.startsWith("//") ? `https:${l.image}` : l.image;
184
+ const F = l.image.startsWith("//") ? `https:${l.image}` : l.image;
179
185
  a = {
180
186
  ...a,
181
187
  data: {
182
188
  ...a.data,
183
- imageUrl: E
189
+ imageUrl: F
184
190
  }
185
191
  };
186
192
  }
@@ -195,7 +201,7 @@ const ct = v.createContext({}), H = v.createContext(
195
201
  arrayData: p
196
202
  // Also return separately for components that need it
197
203
  };
198
- }, D = ({
204
+ }, Q = ({
199
205
  id: t,
200
206
  nodeData: r,
201
207
  children: e,
@@ -203,37 +209,37 @@ const ct = v.createContext({}), H = v.createContext(
203
209
  _parentInputGroupInfo: i,
204
210
  _parentName: s
205
211
  }) => {
206
- const o = $((f) => f.baseURL), p = $((f) => f.appId);
207
- $((f) => f.pageId);
208
- const { onAction: a } = v.useContext(ft), { statefulSetId: h } = v.useContext(
212
+ const o = $((h) => h.baseURL), p = $((h) => h.appId);
213
+ $((h) => h.pageId);
214
+ const { onAction: a } = v.useContext(ht), { statefulSetId: g } = v.useContext(
209
215
  lt
210
- ), F = n || h, { patchedNodeData: g } = q({ id: t, nodeData: r }), y = $(
211
- (f) => f.setStatefulSetVariant
216
+ ), E = n || g, { patchedNodeData: f } = J({ id: t, nodeData: r }), y = $(
217
+ (h) => h.setStatefulSetVariant
212
218
  ), l = $(
213
- (f) => f.setInputGroupValue
214
- ), I = $((f) => f.setAccessToken), { app: E } = $((f) => f.app);
215
- E.data?.app?.startPageId, E.data?.app?.PageId;
216
- const w = R(
219
+ (h) => h.setInputGroupValue
220
+ ), I = $((h) => h.setAccessToken), { app: F } = $((h) => h.app);
221
+ F.data?.app?.startPageId, F.data?.app?.PageId;
222
+ const w = W(
217
223
  {
218
224
  positioning: r.style?.positioning
219
225
  },
220
226
  { debug: !1 }
221
227
  );
222
228
  w.zIndex = 99999, w.backgroundColor = "transparent", w.position = "absolute", w.top = "0", w.left = "0", w.right = "0", w.bottom = "0", w.width = "100%", w.height = "100%", w.pointerEvents = "auto", w.isolation = "isolate";
223
- const k = async (f) => {
229
+ const k = async (h) => {
224
230
  let S = !1;
225
- const j = () => {
231
+ const G = () => {
226
232
  S = !1;
227
233
  };
228
234
  if (typeof a == "function")
229
235
  try {
230
- await a({ bravo: { cancel: j, action: f, componentId: t } }), S = !0;
236
+ await a({ bravo: { cancel: G, action: h, componentId: t } }), S = !0;
231
237
  } catch {
232
238
  }
233
239
  else
234
240
  S = !0;
235
241
  if (S)
236
- switch (f.action) {
242
+ switch (h.action) {
237
243
  case "login":
238
244
  // TODO firebase
239
245
  // TODO oauth
@@ -243,7 +249,7 @@ const ct = v.createContext({}), H = v.createContext(
243
249
  case "submit":
244
250
  break;
245
251
  case "email":
246
- window.location.href = `mailto:${f.params.email}`;
252
+ window.location.href = `mailto:${h.params.email}`;
247
253
  break;
248
254
  case "goback":
249
255
  break;
@@ -257,17 +263,17 @@ const ct = v.createContext({}), H = v.createContext(
257
263
  case "none":
258
264
  break;
259
265
  case "openurl":
260
- window.open(f.params.url, "_blank");
266
+ window.open(h.params.url, "_blank");
261
267
  break;
262
268
  case "phone":
263
- window.location.href = `tel:${f.params.phone}`;
269
+ window.location.href = `tel:${h.params.phone}`;
264
270
  break;
265
271
  case "remote":
266
- const M = btoa(JSON.stringify(f.params?.data || {})), G = `${o}/devices/apps/${p}/node/${t}/trigger/${f.event}?params=${M}`, K = await Ot.post(G);
267
- K.data?.action && await k(K.data);
272
+ const N = btoa(JSON.stringify(h.params?.data || {})), j = `${o}/devices/apps/${p}/node/${t}/trigger/${h.event}?params=${N}`, D = await Ot.post(j);
273
+ D.data?.action && await k(D.data);
268
274
  break;
269
275
  case "set-access-token":
270
- I(f.params);
276
+ I(h.params);
271
277
  break;
272
278
  case "set-state":
273
279
  if (i && s)
@@ -299,27 +305,27 @@ const ct = v.createContext({}), H = v.createContext(
299
305
  else
300
306
  console.warn("⚠️ No onAction callback provided");
301
307
  else {
302
- let A = F || f.params?.stateSetId || g.data?.stateSetId;
308
+ let A = E || h.params?.stateSetId || f.data?.stateSetId;
303
309
  if (!A) {
304
310
  console.error("❌ No stateSetId found in action or nodeData!", {
305
- actionParams: f.params,
306
- nodeDataStateSetId: g.data?.stateSetId,
307
- parentStatefulSetId: F
311
+ actionParams: h.params,
312
+ nodeDataStateSetId: f.data?.stateSetId,
313
+ parentStatefulSetId: E
308
314
  });
309
315
  break;
310
316
  }
311
- y(A, f.params.state);
317
+ y(A, h.params.state);
312
318
  }
313
319
  break;
314
320
  case "showalert":
315
- alert(f.params.message);
321
+ alert(h.params.message);
316
322
  break;
317
323
  default:
318
- console.log(f), alert(f.action);
324
+ console.log(h), alert(h.action);
319
325
  }
320
326
  };
321
327
  if (r.href)
322
- return /* @__PURE__ */ it(ut, { children: [
328
+ return /* @__PURE__ */ it(pt, { children: [
323
329
  /* @__PURE__ */ d(
324
330
  "button",
325
331
  {
@@ -341,17 +347,17 @@ const ct = v.createContext({}), H = v.createContext(
341
347
  ),
342
348
  e
343
349
  ] });
344
- let P = g.actions && g.actions.length > 0 ? g.actions : r.actions || [];
345
- if (F && P.length > 0 && (P = P.map((f) => f.action === "set-state" ? (f.params?.stateSetId, {
346
- ...f,
350
+ let T = f.actions && f.actions.length > 0 ? f.actions : r.actions || [];
351
+ if (E && T.length > 0 && (T = T.map((h) => h.action === "set-state" ? (h.params?.stateSetId, {
352
+ ...h,
347
353
  params: {
348
- ...f.params,
349
- stateSetId: F
354
+ ...h.params,
355
+ stateSetId: E
350
356
  // Always use parent's id
351
357
  }
352
- }) : f)), P.length === 0 && (g.data?.stateSetId || F))
358
+ }) : h)), T.length === 0 && (f.data?.stateSetId || E))
353
359
  if (i && s)
354
- P = [
360
+ T = [
355
361
  {
356
362
  action: "set-state",
357
363
  params: {
@@ -362,13 +368,13 @@ const ct = v.createContext({}), H = v.createContext(
362
368
  }
363
369
  ];
364
370
  else {
365
- const f = F || g.data.stateSetId;
366
- f ? P = [
371
+ const h = E || f.data.stateSetId;
372
+ h ? T = [
367
373
  {
368
374
  action: "set-state",
369
375
  params: {
370
- state: $.getState().statefulSetVariants[f] === "active" ? "default" : "active",
371
- stateSetId: f
376
+ state: $.getState().statefulSetVariants[h] === "active" ? "default" : "active",
377
+ stateSetId: h
372
378
  // Use parent's id or button's stateSetId
373
379
  },
374
380
  event: "tap"
@@ -378,15 +384,15 @@ const ct = v.createContext({}), H = v.createContext(
378
384
  { id: t, name: r.name }
379
385
  );
380
386
  }
381
- if (P && P.length > 0) {
382
- const f = P[0];
383
- return f.event !== "tap" ? e : /* @__PURE__ */ it(ut, { children: [
387
+ if (T && T.length > 0) {
388
+ const h = T[0];
389
+ return h.event !== "tap" ? e : /* @__PURE__ */ it(pt, { children: [
384
390
  e,
385
391
  /* @__PURE__ */ d(
386
392
  "div",
387
393
  {
388
394
  onClick: (S) => {
389
- S.stopPropagation(), k(f);
395
+ S.stopPropagation(), k(h);
390
396
  },
391
397
  onMouseDown: (S) => S.stopPropagation(),
392
398
  onMouseUp: (S) => S.stopPropagation(),
@@ -396,8 +402,8 @@ const ct = v.createContext({}), H = v.createContext(
396
402
  ] });
397
403
  }
398
404
  return e;
399
- }, ht = ({ id: t, name: r, nodeData: e }) => {
400
- const { patchedNodeData: n } = q({ id: t, nodeData: e }), i = R(n.style, {
405
+ }, dt = ({ id: t, name: r, nodeData: e }) => {
406
+ const { patchedNodeData: n } = J({ id: t, nodeData: e }), i = W(n.style, {
401
407
  debug: !1
402
408
  });
403
409
  return /* @__PURE__ */ d(
@@ -411,9 +417,9 @@ const ct = v.createContext({}), H = v.createContext(
411
417
  }
412
418
  );
413
419
  }, Xt = ({ id: t, name: r, nodeData: e }) => {
414
- const { patchedNodeData: n } = q({ id: t, nodeData: e });
420
+ const { patchedNodeData: n } = J({ id: t, nodeData: e });
415
421
  e = n;
416
- const i = R(e.style, {
422
+ const i = W(e.style, {
417
423
  debug: !1
418
424
  }), s = $((a) => a.assetsById), o = e.style?.scaleMode || "fill";
419
425
  o === "fill" ? i.objectFit = "cover" : o === "fit" && (i.objectFit = "contain"), i.objectPosition = "center";
@@ -431,23 +437,23 @@ const ct = v.createContext({}), H = v.createContext(
431
437
  }
432
438
  );
433
439
  }, gt = ({ id: t, name: r, nodeData: e }) => {
434
- const n = R(e.style, {
440
+ const n = W(e.style, {
435
441
  debug: !1
436
442
  });
437
443
  if (!n.backgroundColor && !n.borderColor)
438
444
  return null;
439
445
  if (n.borderColor && !n.backgroundColor && (n.backgroundColor = "transparent"), n.borderColor && n.borderWidth) {
440
- const F = Math.max(n.borderWidth || 0, 1);
441
- (!n.width || typeof n.width == "number" && n.width === 0) && (n.width = F), (!n.height || typeof n.height == "number" && n.height === 0) && (n.height = F), n.boxSizing = "border-box";
446
+ const E = Math.max(n.borderWidth || 0, 1);
447
+ (!n.width || typeof n.width == "number" && n.width === 0) && (n.width = E), (!n.height || typeof n.height == "number" && n.height === 0) && (n.height = E), n.boxSizing = "border-box";
442
448
  }
443
- const i = Array.isArray(e.tags) && e.tags.includes("bravo:layer"), s = N(H)?.isFlex ?? !1, o = e.style?.positioning, p = o && typeof o.top == "number" && typeof o.left == "number" && typeof o.right == "number" && typeof o.bottom == "number" && o.top === 0 && o.left === 0 && o.right === 0 && o.bottom === 0, a = i && (s || p), h = r && r.toLowerCase().startsWith("clip");
444
- return a && (n.position = "absolute", n.top = 0, n.left = 0, n.right = 0, n.bottom = 0, n.zIndex = -1, n.width && typeof n.width == "string" && n.width.includes("%") && delete n.width, n.height && typeof n.height == "string" && n.height.includes("%") && delete n.height), h && (n.backgroundColor = "transparent"), /* @__PURE__ */ d(D, { id: t, nodeData: e, children: /* @__PURE__ */ d("div", { "data-name": r, "data-type": "ColorComponent", style: n }) });
449
+ const i = Array.isArray(e.tags) && e.tags.includes("bravo:layer"), s = M(H)?.isFlex ?? !1, o = e.style?.positioning, p = o && typeof o.top == "number" && typeof o.left == "number" && typeof o.right == "number" && typeof o.bottom == "number" && o.top === 0 && o.left === 0 && o.right === 0 && o.bottom === 0, a = i && (s || p), g = r && r.toLowerCase().startsWith("clip");
450
+ return a && (n.position = "absolute", n.top = 0, n.left = 0, n.right = 0, n.bottom = 0, n.zIndex = -1, n.width && typeof n.width == "string" && n.width.includes("%") && delete n.width, n.height && typeof n.height == "string" && n.height.includes("%") && delete n.height), g && (n.backgroundColor = "transparent"), /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: /* @__PURE__ */ d("div", { "data-name": r, "data-type": "ColorComponent", style: n }) });
445
451
  }, mt = ({
446
452
  id: t,
447
453
  name: r,
448
454
  nodeData: e
449
455
  }) => {
450
- const n = R(e.style, {
456
+ const n = W(e.style, {
451
457
  debug: !1
452
458
  }), i = e.style, s = Array.isArray(i?.gradientColorStops) ? i.gradientColorStops.map((o) => {
453
459
  if (!o?.color) return null;
@@ -462,34 +468,34 @@ const ct = v.createContext({}), H = v.createContext(
462
468
  const o = i?.gradientType || "linear";
463
469
  n.backgroundImage = o === "radial" ? `radial-gradient(${s})` : `linear-gradient(${s})`, delete n.backgroundColor;
464
470
  }
465
- return /* @__PURE__ */ d(D, { id: t, nodeData: e, children: /* @__PURE__ */ d("div", { "data-name": r, "data-type": "GradientComponent", style: n }) });
471
+ return /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: /* @__PURE__ */ d("div", { "data-name": r, "data-type": "GradientComponent", style: n }) });
466
472
  }, yt = ({ id: t, name: r, nodeData: e }) => {
467
- const { patchedNodeData: n } = q({ id: t, nodeData: e });
473
+ const { patchedNodeData: n } = J({ id: t, nodeData: e });
468
474
  e = n;
469
- const i = R(e.style, {
475
+ const i = W(e.style, {
470
476
  debug: !1
471
- }), s = N(H), o = $((l) => l.assetsById), p = e.style?.scaleMode || "fill";
477
+ }), s = M(H), o = $((l) => l.assetsById), p = e.style?.scaleMode || "fill";
472
478
  p === "fill" ? i.objectFit = "cover" : p === "fit" && (i.objectFit = "contain"), i.objectPosition = "center";
473
479
  let a = e.data?.imageUrl;
474
480
  !a && e.encoreData?.image && (a = e.encoreData.image.startsWith("//") ? `https:${e.encoreData.image}` : e.encoreData.image), a || (a = o[e.assetId]?.url);
475
- const h = e.style?.positioning, F = e.style?.aspectRatio, g = s.dimensions?.width || 0, y = s.dimensions?.height || 0;
476
- if (h && F && g > 0) {
477
- const l = typeof h.left == "number" && typeof h.right == "number", I = typeof h.top == "number" && typeof h.bottom == "number";
481
+ const g = e.style?.positioning, E = e.style?.aspectRatio, f = s.dimensions?.width || 0, y = s.dimensions?.height || 0;
482
+ if (g && E && f > 0) {
483
+ const l = typeof g.left == "number" && typeof g.right == "number", I = typeof g.top == "number" && typeof g.bottom == "number";
478
484
  if (l) {
479
- const E = 100 - h.left - h.right;
480
- if (E > 0) {
481
- const w = E * g / 100;
482
- i.width = w, i.height = w / F, i.left = `${Math.max(0, h.left)}%`, i.top = `${Math.max(0, h.top)}%`, delete i.right, delete i.bottom;
485
+ const F = 100 - g.left - g.right;
486
+ if (F > 0) {
487
+ const w = F * f / 100;
488
+ i.width = w, i.height = w / E, i.left = `${Math.max(0, g.left)}%`, i.top = `${Math.max(0, g.top)}%`, delete i.right, delete i.bottom;
483
489
  }
484
490
  } else if (I && y > 0) {
485
- const E = 100 - h.top - h.bottom;
486
- if (E > 0) {
487
- const w = E * y / 100;
488
- i.height = w, i.width = w * F, i.left = `${Math.max(0, h.left)}%`, i.top = `${Math.max(0, h.top)}%`, delete i.right, delete i.bottom;
491
+ const F = 100 - g.top - g.bottom;
492
+ if (F > 0) {
493
+ const w = F * y / 100;
494
+ i.height = w, i.width = w * E, i.left = `${Math.max(0, g.left)}%`, i.top = `${Math.max(0, g.top)}%`, delete i.right, delete i.bottom;
489
495
  }
490
496
  }
491
497
  }
492
- return /* @__PURE__ */ d(D, { id: t, nodeData: e, children: /* @__PURE__ */ d(
498
+ return /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: /* @__PURE__ */ d(
493
499
  "img",
494
500
  {
495
501
  "data-id": t,
@@ -505,7 +511,7 @@ const ct = v.createContext({}), H = v.createContext(
505
511
  name: r,
506
512
  nodeData: e
507
513
  }) => {
508
- const n = $((s) => s.setFormInputValue), i = R(e.style, { debug: !1 });
514
+ const n = $((s) => s.setFormInputValue), i = W(e.style, { debug: !1 });
509
515
  return /* @__PURE__ */ d(
510
516
  "input",
511
517
  {
@@ -523,7 +529,7 @@ const ct = v.createContext({}), H = v.createContext(
523
529
  name: r,
524
530
  nodeData: e
525
531
  }) => {
526
- const n = R(e.style);
532
+ const n = W(e.style);
527
533
  return n.visibility = "hidden", /* @__PURE__ */ d(
528
534
  "input",
529
535
  {
@@ -539,8 +545,8 @@ const ct = v.createContext({}), H = v.createContext(
539
545
  name: r,
540
546
  nodeData: e
541
547
  }) => {
542
- const n = $((o) => o.setFormInputValue), i = R(e.style, { debug: !1 }), s = $((o) => o.assetsById);
543
- return /* @__PURE__ */ it(ut, { children: [
548
+ const n = $((o) => o.setFormInputValue), i = W(e.style, { debug: !1 }), s = $((o) => o.assetsById);
549
+ return /* @__PURE__ */ it(pt, { children: [
544
550
  /* @__PURE__ */ d(
545
551
  "div",
546
552
  {
@@ -566,7 +572,7 @@ const ct = v.createContext({}), H = v.createContext(
566
572
  name: r,
567
573
  nodeData: e
568
574
  }) => {
569
- const n = $((s) => s.setFormInputValue), i = R(e.style, { debug: !1 });
575
+ const n = $((s) => s.setFormInputValue), i = W(e.style, { debug: !1 });
570
576
  return /* @__PURE__ */ d(
571
577
  "input",
572
578
  {
@@ -584,9 +590,9 @@ const ct = v.createContext({}), H = v.createContext(
584
590
  name: r,
585
591
  nodeData: e
586
592
  }) => {
587
- const n = $((g) => g.setFormInputValue), { onAction: i } = v.useContext(ft), { patchedNodeData: s } = q({ id: t, nodeData: e }), o = R(s.style, { debug: !1 });
593
+ const n = $((f) => f.setFormInputValue), { onAction: i } = v.useContext(ht), { patchedNodeData: s } = J({ id: t, nodeData: e }), o = W(s.style, { debug: !1 });
588
594
  o.width = "100%", o.flex = "1", o.minWidth = "0", o.boxSizing = "border-box", o.borderColor = o.borderColor ?? "transparent";
589
- const p = s.data?.value, a = s.data?.options, h = v.useMemo(() => !a || !Array.isArray(a) ? [] : a.map((g) => typeof g == "string" ? { value: g, label: g } : g), [a]);
595
+ const p = s.data?.value, a = s.data?.options, g = v.useMemo(() => !a || !Array.isArray(a) ? [] : a.map((f) => typeof f == "string" ? { value: f, label: f } : f), [a]);
590
596
  return /* @__PURE__ */ it(
591
597
  "select",
592
598
  {
@@ -595,8 +601,8 @@ const ct = v.createContext({}), H = v.createContext(
595
601
  "data-type": "SelectInputComponent",
596
602
  value: p ?? "",
597
603
  style: o,
598
- onChange: async (g) => {
599
- const y = g.target.value;
604
+ onChange: async (f) => {
605
+ const y = f.target.value;
600
606
  if (n(t, y), console.log(`Select changed: ${y}`), typeof i == "function")
601
607
  try {
602
608
  await i({
@@ -615,8 +621,8 @@ const ct = v.createContext({}), H = v.createContext(
615
621
  }
616
622
  },
617
623
  children: [
618
- h.length === 0 && /* @__PURE__ */ d("option", { value: "", disabled: !0, children: "Select an option..." }),
619
- h.map((g) => /* @__PURE__ */ d("option", { value: g.value, children: g.label }, g.value))
624
+ g.length === 0 && /* @__PURE__ */ d("option", { value: "", disabled: !0, children: "Select an option..." }),
625
+ g.map((f) => /* @__PURE__ */ d("option", { value: f.value, children: f.label }, f.value))
620
626
  ]
621
627
  }
622
628
  );
@@ -625,7 +631,7 @@ const ct = v.createContext({}), H = v.createContext(
625
631
  name: r,
626
632
  nodeData: e
627
633
  }) => {
628
- const n = $((s) => s.setFormInputValue), i = R(e.style, {
634
+ const n = $((s) => s.setFormInputValue), i = W(e.style, {
629
635
  debug: !1
630
636
  });
631
637
  return /* @__PURE__ */ d(
@@ -647,8 +653,8 @@ const ct = v.createContext({}), H = v.createContext(
647
653
  nodeData: e,
648
654
  children: n
649
655
  }) => {
650
- const i = R(e.style);
651
- return /* @__PURE__ */ d(D, { id: t, nodeData: e, children: /* @__PURE__ */ d(
656
+ const i = W(e.style);
657
+ return /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: /* @__PURE__ */ d(
652
658
  "div",
653
659
  {
654
660
  "data-id": t,
@@ -659,7 +665,7 @@ const ct = v.createContext({}), H = v.createContext(
659
665
  }
660
666
  ) });
661
667
  }, At = ({ id: t, name: r, nodeData: e }) => {
662
- const n = R(e.style, {
668
+ const n = W(e.style, {
663
669
  debug: !1
664
670
  }), i = $((o) => o.assetsById), s = e.style?.positioning;
665
671
  if (s) {
@@ -673,7 +679,7 @@ const ct = v.createContext({}), H = v.createContext(
673
679
  n.height = `${a}%`, n.top = `${s.top}%`, delete n.bottom;
674
680
  }
675
681
  }
676
- return n.objectFit || (n.objectFit = "fill"), /* @__PURE__ */ d(D, { id: t, nodeData: e, children: /* @__PURE__ */ d(
682
+ return n.objectFit || (n.objectFit = "fill"), /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: /* @__PURE__ */ d(
677
683
  "img",
678
684
  {
679
685
  "data-id": t,
@@ -684,8 +690,8 @@ const ct = v.createContext({}), H = v.createContext(
684
690
  alt: r
685
691
  }
686
692
  ) });
687
- }, Ft = ({ id: t, name: r, nodeData: e }) => {
688
- const { patchedNodeData: n } = q({ id: t, nodeData: e });
693
+ }, Et = ({ id: t, name: r, nodeData: e }) => {
694
+ const { patchedNodeData: n } = J({ id: t, nodeData: e });
689
695
  e = n;
690
696
  const i = e.data?.text;
691
697
  r && r.includes("Purpose") && console.log("TextComponent Debug:", {
@@ -695,7 +701,7 @@ const ct = v.createContext({}), H = v.createContext(
695
701
  style: e.style,
696
702
  color: e.style?.color
697
703
  });
698
- const s = e.style, o = e.fontId ? { ...s, fontId: e.fontId } : s, p = R(o, {
704
+ const s = e.style, o = e.fontId ? { ...s, fontId: e.fontId } : s, p = W(o, {
699
705
  debug: !1
700
706
  });
701
707
  p.display = "flex", p.flexDirection = "column", s.verticalPosition && (p.justifyContent = {
@@ -705,42 +711,42 @@ const ct = v.createContext({}), H = v.createContext(
705
711
  }[s.verticalPosition]);
706
712
  const a = i && (i.includes(`
707
713
  `) || i.includes("\r"));
708
- let h;
709
- return a && p.flexDirection === "column" ? h = i.split(/\r?\n/).filter((g) => g.length > 0).map((g, y) => /* @__PURE__ */ d("div", { style: { lineHeight: "inherit" }, children: g }, y)) : h = i, /* @__PURE__ */ d(D, { id: t, nodeData: e, children: /* @__PURE__ */ d(
714
+ let g;
715
+ return a && p.flexDirection === "column" ? g = i.split(/\r?\n/).filter((f) => f.length > 0).map((f, y) => /* @__PURE__ */ d("div", { style: { lineHeight: "inherit" }, children: f }, y)) : g = i, /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: /* @__PURE__ */ d(
710
716
  "div",
711
717
  {
712
718
  "data-id": t,
713
719
  "data-name": r,
714
720
  "data-type": "TextComponent",
715
721
  style: p,
716
- children: h
722
+ children: g
717
723
  }
718
724
  ) });
719
- }, dt = ({
725
+ }, ut = ({
720
726
  id: t,
721
727
  name: r,
722
728
  nodeData: e,
723
729
  children: n
724
730
  }) => {
725
- const i = N(_), { patchedNodeData: s } = q({ id: t, nodeData: e });
731
+ const i = M(q), { patchedNodeData: s } = J({ id: t, nodeData: e });
726
732
  e = s;
727
- const o = Ut(e.tags), p = o ? $((E) => E.inputGroups[o.groupName]) : null, a = $((E) => E.statefulSetVariants[t]), h = R(e.style, {
733
+ const o = Ut(e.tags), p = o ? $((F) => F.inputGroups[o.groupName]) : null, a = $((F) => F.statefulSetVariants[t]), g = W(e.style, {
728
734
  debug: !1
729
735
  });
730
- let F;
731
- o && p !== null ? F = p === r ? "active" : "default" : F = a || e.data.initialState || "default";
732
- const g = v.Children.toArray(n).find((E) => v.isValidElement(E) ? E.props?.nodeData?.data?.state === F : !1), y = v.isValidElement(g) ? v.cloneElement(g, {
736
+ let E;
737
+ o && p !== null ? E = p === r ? "active" : "default" : E = a || e.data.initialState || "default";
738
+ const f = v.Children.toArray(n).find((F) => v.isValidElement(F) ? F.props?.nodeData?.data?.state === E : !1), y = v.isValidElement(f) ? v.cloneElement(f, {
733
739
  _parentStatefulSetId: t,
734
740
  _parentInputGroupInfo: o,
735
741
  _parentName: r
736
742
  // Pass the name so we can identify which element is active
737
- }) : g, l = /* @__PURE__ */ d(
743
+ }) : f, l = /* @__PURE__ */ d(
738
744
  "div",
739
745
  {
740
746
  "data-id": t,
741
747
  "data-name": r,
742
748
  "data-type": "StatefulSetComponent",
743
- style: h,
749
+ style: g,
744
750
  children: y
745
751
  }
746
752
  );
@@ -748,7 +754,7 @@ const ct = v.createContext({}), H = v.createContext(
748
754
  return l;
749
755
  const I = v.useContext(lt);
750
756
  return /* @__PURE__ */ d(
751
- _.Provider,
757
+ q.Provider,
752
758
  {
753
759
  value: { nodeData: i?.nodeData?.[t] || {} },
754
760
  children: /* @__PURE__ */ d(
@@ -760,7 +766,7 @@ const ct = v.createContext({}), H = v.createContext(
760
766
  )
761
767
  }
762
768
  );
763
- }, Et = ({
769
+ }, Ft = ({
764
770
  id: t,
765
771
  name: r,
766
772
  nodeData: e,
@@ -769,7 +775,7 @@ const ct = v.createContext({}), H = v.createContext(
769
775
  _parentInputGroupInfo: s,
770
776
  _parentName: o
771
777
  }) => {
772
- const p = R(e.style, {
778
+ const p = W(e.style, {
773
779
  debug: !1
774
780
  }), a = {
775
781
  ...p,
@@ -783,7 +789,7 @@ const ct = v.createContext({}), H = v.createContext(
783
789
  "data-type": "StatefulCompoundComponent",
784
790
  style: a,
785
791
  children: /* @__PURE__ */ d(
786
- D,
792
+ Q,
787
793
  {
788
794
  id: t,
789
795
  nodeData: e,
@@ -795,8 +801,8 @@ const ct = v.createContext({}), H = v.createContext(
795
801
  )
796
802
  }
797
803
  );
798
- }, Pt = ({ id: t, name: r, children: e }) => {
799
- N(H);
804
+ }, Tt = ({ id: t, name: r, children: e }) => {
805
+ M(H);
800
806
  const { dimensions: n, ref: i } = rt(), s = {
801
807
  zIndex: 0,
802
808
  flex: 1,
@@ -817,7 +823,7 @@ const ct = v.createContext({}), H = v.createContext(
817
823
  children: e
818
824
  }
819
825
  ) });
820
- }, pt = ({
826
+ }, ft = ({
821
827
  id: t,
822
828
  name: r,
823
829
  nodeData: e,
@@ -829,44 +835,52 @@ const ct = v.createContext({}), H = v.createContext(
829
835
  `[DEBUG] ContainerComponent ${t} (Hero) FULL nodeData:`,
830
836
  JSON.stringify(e, null, 2)
831
837
  );
832
- const o = N(_), { patchedNodeData: p, list: a, arrayData: h } = q({
838
+ const o = M(q), { patchedNodeData: p, list: a, arrayData: g } = J({
833
839
  id: t,
834
840
  nodeData: e
835
841
  });
836
842
  e = p;
837
- const { dimensions: F, ref: g } = rt(), y = R(e.style, {
843
+ const { dimensions: E, ref: f } = rt(), y = W(e.style, {
838
844
  debug: !1
839
- }), l = !!e.style.layout?.mode, I = e.style.layout?.mode === "HORIZONTAL" ? "row" : "column", E = y.width !== void 0, w = y.height !== void 0, k = N(H), P = k?.isFlex ?? !1, f = k?.flexDirection, S = P && f === "row", j = !P && e.style.positioning, M = e.style.layout?.layoutSizingHorizontal === "FIXED" || e.style.layout?.layoutSizingVertical === "FIXED", G = e.style.layout?.layoutSizingHorizontal === "HUG" || e.style.layout?.layoutSizingVertical === "HUG";
840
- if (!E && !S && !(j && (M || G)) && (y.width = "100%"), !w) {
841
- const W = !P && e.style.positioning, Z = e.style.layout?.layoutSizingVertical === "FILL";
845
+ });
846
+ t === "01KF5PAFET1VY5E81B68GQ9BFQ" && console.log("[DEBUG] Embed Container Render", {
847
+ id: t,
848
+ style: y,
849
+ computedStyle: y,
850
+ layout: e.style.layout,
851
+ hasPositioning: !!e.style.positioning
852
+ });
853
+ const l = !!e.style.layout?.mode, I = e.style.layout?.mode === "HORIZONTAL" || e.style.layout?.mode === "GRID" ? "row" : "column", F = y.width !== void 0, w = y.height !== void 0, k = M(H), T = k?.isFlex ?? !1, h = k?.flexDirection, S = T && h === "row", G = !T && e.style.positioning, N = e.style.layout?.layoutSizingHorizontal === "FIXED" || e.style.layout?.layoutSizingVertical === "FIXED", j = e.style.layout?.layoutSizingHorizontal === "HUG" || e.style.layout?.layoutSizingVertical === "HUG";
854
+ if (!F && !S && !(G && (N || j)) && (y.width = "100%"), !w) {
855
+ const L = !T && e.style.positioning, Z = e.style.layout?.layoutSizingVertical === "FILL";
842
856
  if (!(e.style.layout?.layoutSizingVertical === "HUG")) {
843
- if (!l) if (W && Z && e.style.positioning?.top !== void 0) {
857
+ if (!l) if (L && Z && e.style.positioning?.top !== void 0) {
844
858
  const tt = 100 - e.style.positioning.top;
845
859
  y.height = `${tt}%`;
846
860
  } else
847
861
  y.height = "100%";
848
862
  }
849
863
  }
850
- const K = e.style.layout?.layoutSizingHorizontal || e.style.layout?.layoutSizingVertical, V = e.style.positioning && !l && (K || !0) ? { ...y, position: "absolute" } : y.position === "absolute" ? y : { ...y, position: y.position || "relative" }, U = (W) => typeof W == "number" ? W : typeof W == "string" && W.endsWith("px") && parseFloat(W) || 0, O = U(y.paddingLeft), m = U(y.paddingRight), Y = U(y.paddingTop), X = U(y.paddingBottom), L = M && typeof y.width == "number" && typeof y.height == "number" ? {
864
+ const D = e.style.layout?.layoutSizingHorizontal || e.style.layout?.layoutSizingVertical, V = e.style.positioning && !l && (D || !0) ? { ...y, position: "absolute" } : y.position === "absolute" ? y : { ...y, position: y.position || "relative" }, U = (L) => typeof L == "number" ? L : typeof L == "string" && L.endsWith("px") && parseFloat(L) || 0, O = U(y.paddingLeft), m = U(y.paddingRight), Y = U(y.paddingTop), X = U(y.paddingBottom), R = N && typeof y.width == "number" && typeof y.height == "number" ? {
851
865
  width: y.width - O - m,
852
866
  height: y.height - Y - X
853
867
  } : {
854
- width: F.width - O - m,
855
- height: F.height - Y - X
868
+ width: E.width - O - m,
869
+ height: E.height - Y - X
856
870
  };
857
871
  if (i != null && a) {
858
- const W = a[i];
859
- if (W !== void 0) {
860
- const Z = typeof W == "object" && W !== null ? {
861
- nodeData: W,
872
+ const L = a[i];
873
+ if (L !== void 0) {
874
+ const Z = typeof L == "object" && L !== null ? {
875
+ nodeData: L,
862
876
  arrayDataById: o?.arrayDataById,
863
877
  textOverridesById: o?.textOverridesById,
864
878
  rootData: o?.rootData
865
- } : { nodeData: W };
866
- return /* @__PURE__ */ d(_.Provider, { value: Z, children: /* @__PURE__ */ d(
879
+ } : { nodeData: L };
880
+ return /* @__PURE__ */ d(q.Provider, { value: Z, children: /* @__PURE__ */ d(
867
881
  H.Provider,
868
882
  {
869
- value: { dimensions: L, isFlex: l, flexDirection: I },
883
+ value: { dimensions: R, isFlex: l, flexDirection: I },
870
884
  children: /* @__PURE__ */ d(
871
885
  "div",
872
886
  {
@@ -882,22 +896,22 @@ const ct = v.createContext({}), H = v.createContext(
882
896
  }
883
897
  }
884
898
  if (a) {
885
- const W = h || a;
886
- return Ht(() => W.map((J, ot) => {
887
- const tt = typeof J == "object" && J !== null ? {
888
- nodeData: J,
899
+ const L = g || a;
900
+ return Ht(() => L.map((K, ot) => {
901
+ const tt = typeof K == "object" && K !== null ? {
902
+ nodeData: K,
889
903
  arrayDataById: o?.arrayDataById,
890
904
  textOverridesById: o?.textOverridesById,
891
905
  rootData: o?.rootData
892
- } : { nodeData: J };
906
+ } : { nodeData: K };
893
907
  return /* @__PURE__ */ d(
894
- _.Provider,
908
+ q.Provider,
895
909
  {
896
910
  value: tt,
897
911
  children: /* @__PURE__ */ d(
898
912
  H.Provider,
899
913
  {
900
- value: { dimensions: L, isFlex: l, flexDirection: I },
914
+ value: { dimensions: R, isFlex: l, flexDirection: I },
901
915
  children: /* @__PURE__ */ d(
902
916
  "div",
903
917
  {
@@ -913,37 +927,37 @@ const ct = v.createContext({}), H = v.createContext(
913
927
  },
914
928
  `${t}:${ot}`
915
929
  );
916
- }), [W, t]);
930
+ }), [L, t]);
917
931
  }
918
- let T = e.actions || [];
919
- !Array.isArray(T) && typeof T == "object" && T !== null && (T = Object.entries(T).map(
920
- ([W, Z]) => ({
921
- event: W,
932
+ let P = e.actions || [];
933
+ !Array.isArray(P) && typeof P == "object" && P !== null && (P = Object.entries(P).map(
934
+ ([L, Z]) => ({
935
+ event: L,
922
936
  ...typeof Z == "object" && Z !== null ? Z : {}
923
937
  })
924
938
  ));
925
- const z = Array.isArray(T) && T.length > 0;
939
+ const z = Array.isArray(P) && P.length > 0;
926
940
  return /* @__PURE__ */ d(
927
941
  H.Provider,
928
942
  {
929
- value: { dimensions: L, isFlex: l, flexDirection: I },
943
+ value: { dimensions: R, isFlex: l, flexDirection: I },
930
944
  children: /* @__PURE__ */ d(
931
945
  "div",
932
946
  {
933
947
  "data-id": t,
934
948
  "data-name": r,
935
949
  "data-type": "ContainerComponent",
936
- ref: g,
950
+ ref: f,
937
951
  style: V,
938
- children: z ? /* @__PURE__ */ d(D, { id: t, nodeData: e, children: n }) : n
952
+ children: z ? /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: n }) : n
939
953
  }
940
954
  )
941
955
  }
942
956
  );
943
- }, Tt = pt, Bt = ({ id: t, name: r, nodeData: e, children: n }) => {
944
- const { dimensions: i, ref: s } = rt(), o = R(e.style, {
957
+ }, Pt = ft, Bt = ({ id: t, name: r, nodeData: e, children: n }) => {
958
+ const { dimensions: i, ref: s } = rt(), o = W(e.style, {
945
959
  debug: !1
946
- }), p = !!e.style.layout?.mode, a = e.style.layout?.mode === "HORIZONTAL" ? "row" : "column", h = o.position ? o : { ...o, position: "relative" };
960
+ }), p = !!e.style.layout?.mode, a = e.style.layout?.mode === "HORIZONTAL" ? "row" : "column", g = o.position ? o : { ...o, position: "relative" };
947
961
  return /* @__PURE__ */ d(
948
962
  H.Provider,
949
963
  {
@@ -955,14 +969,14 @@ const ct = v.createContext({}), H = v.createContext(
955
969
  "data-name": r,
956
970
  "data-type": "TopBarContainerComponent",
957
971
  ref: s,
958
- style: h,
972
+ style: g,
959
973
  children: n
960
974
  }
961
975
  )
962
976
  }
963
977
  );
964
978
  }, Zt = ({ id: t, name: r, nodeData: e, children: n }) => {
965
- const i = R(e.style, { debug: !1 });
979
+ const i = W(e.style, { debug: !1 });
966
980
  return /* @__PURE__ */ d(
967
981
  "div",
968
982
  {
@@ -973,17 +987,17 @@ const ct = v.createContext({}), H = v.createContext(
973
987
  children: n
974
988
  }
975
989
  );
976
- }, Lt = ({ id: t, name: r, nodeData: e, children: n }) => /* @__PURE__ */ d(
990
+ }, Rt = ({ id: t, name: r, nodeData: e, children: n }) => /* @__PURE__ */ d(
977
991
  "div",
978
992
  {
979
993
  "data-id": t,
980
994
  "data-name": r,
981
995
  "data-type": "TabsMenuComponent",
982
- style: R(e.style),
996
+ style: W(e.style),
983
997
  children: n
984
998
  }
985
- ), Wt = ({ id: t, name: r, nodeData: e, children: n }) => {
986
- const i = R(e.style, {
999
+ ), Lt = ({ id: t, name: r, nodeData: e, children: n }) => {
1000
+ const i = W(e.style, {
987
1001
  debug: !1
988
1002
  });
989
1003
  return /* @__PURE__ */ d(
@@ -1001,22 +1015,22 @@ const ct = v.createContext({}), H = v.createContext(
1001
1015
  `[DEBUG] SliderComponent ${t} FULL nodeData:`,
1002
1016
  JSON.stringify(e, null, 2)
1003
1017
  );
1004
- const { dimensions: i, ref: s } = rt(), o = v.useRef(null), p = v.useRef(null), a = v.useRef(!1), h = v.useRef(null), F = N(ct), g = N(jt), { onAction: y } = N(ft), [l, I] = v.useState({
1018
+ const { dimensions: i, ref: s } = rt(), o = v.useRef(null), p = v.useRef(null), a = v.useRef(!1), g = v.useRef(null), E = M(ct), f = M(Gt), { onAction: y } = M(ht), [l, I] = v.useState({
1005
1019
  currentIndex: void 0,
1006
1020
  onIndexChange: void 0
1007
- }), [E, w] = v.useState(0), k = v.useRef(null), { patchedNodeData: P } = q({ id: t, nodeData: e });
1008
- e = P;
1009
- const f = e.data?.params || {}, S = f.infinite === !0, j = f.automatic === !0;
1010
- let G = Array.isArray(e.tags) && e.tags.some((c) => c.includes("container:slider:vertical")) || e.name && e.name.includes("container:slider:vertical");
1011
- if (!G && f.animation === "default") {
1021
+ }), [F, w] = v.useState(0), k = v.useRef(null), { patchedNodeData: T } = J({ id: t, nodeData: e });
1022
+ e = T;
1023
+ const h = e.data?.params || {}, S = h.infinite === !0, G = h.automatic === !0;
1024
+ let j = Array.isArray(e.tags) && e.tags.some((c) => c.includes("container:slider:vertical")) || e.name && e.name.includes("container:slider:vertical");
1025
+ if (!j && h.animation === "default") {
1012
1026
  const c = e.style?.width, u = e.style?.height;
1013
- typeof c == "number" && typeof u == "number" && u > c && (G = !0);
1027
+ typeof c == "number" && typeof u == "number" && u > c && (j = !0);
1014
1028
  }
1015
- const K = G ? "vertical" : f.animation === "default" ? "horizontal" : f.animation || "horizontal", A = R(e.style, {
1029
+ const D = j ? "vertical" : h.animation === "default" ? "horizontal" : h.animation || "horizontal", A = W(e.style, {
1016
1030
  debug: !1
1017
1031
  }), V = A.width !== void 0, U = A.height !== void 0;
1018
1032
  V || (A.width = "100%"), U || (A.height = "100%"), A.position || (A.position = "relative");
1019
- const O = N(_), m = v.useMemo(() => {
1033
+ const O = M(q), m = v.useMemo(() => {
1020
1034
  const c = [];
1021
1035
  return v.Children.forEach(n, (u) => {
1022
1036
  if (u == null) return;
@@ -1051,76 +1065,76 @@ const ct = v.createContext({}), H = v.createContext(
1051
1065
  ];
1052
1066
  }, [m, S]), X = v.useMemo(() => {
1053
1067
  if (m.length === 0) return { width: 0, height: 0 };
1054
- const u = m[0]?.props?.nodeData?.style, x = F.scaleFactor || 1;
1068
+ const u = m[0]?.props?.nodeData?.style, x = E.scaleFactor || 1;
1055
1069
  let C = 0, b = 0;
1056
1070
  return u?.layout?.layoutSizingHorizontal === "FIXED" && u?.layout?.size?.x ? C = u.layout.size.x * x : C = i.width || 0, u?.layout?.layoutSizingVertical === "FIXED" && u?.layout?.size?.y ? b = u.layout.size.y * x : b = i.height || 0, { width: C, height: b };
1057
- }, [m, i.width, i.height, F.scaleFactor]), L = X.width, T = X.height, z = K === "vertical", Q = v.useCallback(() => {
1071
+ }, [m, i.width, i.height, E.scaleFactor]), R = X.width, P = X.height, z = D === "vertical", _ = v.useCallback(() => {
1058
1072
  if (!o.current || m.length === 0)
1059
1073
  return 0;
1060
1074
  const c = o.current;
1061
1075
  if (z) {
1062
- if (T === 0) return 0;
1076
+ if (P === 0) return 0;
1063
1077
  const u = c.scrollTop;
1064
1078
  if (S) {
1065
- const C = u - T;
1066
- let b = Math.round(C / T);
1079
+ const C = u - P;
1080
+ let b = Math.round(C / P);
1067
1081
  return b < 0 && (b = 0), b >= m.length && (b = m.length - 1), b;
1068
1082
  } else {
1069
- const x = Math.round(u / T);
1083
+ const x = Math.round(u / P);
1070
1084
  return x < 0 ? 0 : x >= m.length ? m.length - 1 : x;
1071
1085
  }
1072
1086
  } else {
1073
- if (L === 0) return 0;
1087
+ if (R === 0) return 0;
1074
1088
  const u = c.scrollLeft;
1075
1089
  if (S) {
1076
- const C = u - L;
1077
- let b = Math.round(C / L);
1090
+ const C = u - R;
1091
+ let b = Math.round(C / R);
1078
1092
  return b < 0 && (b = 0), b >= m.length && (b = m.length - 1), b;
1079
1093
  } else {
1080
- const x = Math.round(u / L);
1094
+ const x = Math.round(u / R);
1081
1095
  return x < 0 ? 0 : x >= m.length ? m.length - 1 : x;
1082
1096
  }
1083
1097
  }
1084
- }, [S, m.length, L, T, z]), W = v.useCallback(
1098
+ }, [S, m.length, R, P, z]), L = v.useCallback(
1085
1099
  (c, u = !0) => {
1086
1100
  if (!o.current || m.length === 0) return;
1087
1101
  const x = o.current;
1088
1102
  if (z) {
1089
1103
  let C;
1090
- S ? C = T + c * T : C = c * T, x.scrollTo({
1104
+ S ? C = P + c * P : C = c * P, x.scrollTo({
1091
1105
  top: C,
1092
1106
  behavior: u ? "smooth" : "auto"
1093
1107
  });
1094
1108
  } else {
1095
1109
  let C;
1096
- S ? C = L + c * L : C = c * L, x.scrollTo({
1110
+ S ? C = R + c * R : C = c * R, x.scrollTo({
1097
1111
  left: C,
1098
1112
  behavior: u ? "smooth" : "auto"
1099
1113
  });
1100
1114
  }
1101
1115
  },
1102
- [L, T, S, m.length, z]
1116
+ [R, P, S, m.length, z]
1103
1117
  ), Z = v.useCallback(() => {
1104
1118
  if (!S || !o.current || m.length === 0) return;
1105
1119
  const c = o.current, u = 1;
1106
1120
  if (z) {
1107
- if (T === 0) return;
1108
- const x = c.scrollTop, C = T, b = C, B = b + m.length * C;
1121
+ if (P === 0) return;
1122
+ const x = c.scrollTop, C = P, b = C, B = b + m.length * C;
1109
1123
  x >= B - u ? c.scrollTop = b : x <= u && (c.scrollTop = B - C);
1110
1124
  } else {
1111
- if (L === 0) return;
1112
- const x = c.scrollLeft, C = L, b = C, B = b + m.length * C;
1125
+ if (R === 0) return;
1126
+ const x = c.scrollLeft, C = R, b = C, B = b + m.length * C;
1113
1127
  x >= B - u ? c.scrollLeft = b : x <= u && (c.scrollLeft = B - C);
1114
1128
  }
1115
- }, [S, m.length, L, T, z]);
1129
+ }, [S, m.length, R, P, z]);
1116
1130
  v.useEffect(() => {
1117
- if (!j || m.length <= 1 || L === 0) return;
1131
+ if (!G || m.length <= 1 || R === 0) return;
1118
1132
  const c = () => {
1119
1133
  if (a.current || !o.current) return;
1120
1134
  const u = o.current;
1121
1135
  if (z) {
1122
- if (T === 0) return;
1123
- const x = u.scrollTop, C = T;
1136
+ if (P === 0) return;
1137
+ const x = u.scrollTop, C = P;
1124
1138
  let b;
1125
1139
  if (S) {
1126
1140
  const nt = x - C;
@@ -1136,10 +1150,10 @@ const ct = v.createContext({}), H = v.createContext(
1136
1150
  behavior: "smooth"
1137
1151
  });
1138
1152
  } else
1139
- B >= m.length && (B = 0), W(B);
1153
+ B >= m.length && (B = 0), L(B);
1140
1154
  } else {
1141
- if (L === 0) return;
1142
- const x = u.scrollLeft, C = L;
1155
+ if (R === 0) return;
1156
+ const x = u.scrollLeft, C = R;
1143
1157
  let b;
1144
1158
  if (S) {
1145
1159
  const nt = x - C;
@@ -1155,23 +1169,23 @@ const ct = v.createContext({}), H = v.createContext(
1155
1169
  behavior: "smooth"
1156
1170
  });
1157
1171
  } else
1158
- B >= m.length && (B = 0), W(B);
1172
+ B >= m.length && (B = 0), L(B);
1159
1173
  }
1160
1174
  };
1161
1175
  return p.current = setInterval(c, 4e3), () => {
1162
1176
  p.current && (clearInterval(p.current), p.current = null);
1163
1177
  };
1164
1178
  }, [
1165
- j,
1179
+ G,
1166
1180
  m.length,
1167
1181
  S,
1168
- L,
1169
- T,
1182
+ R,
1183
+ P,
1170
1184
  z,
1171
- W
1185
+ L
1172
1186
  ]);
1173
- const J = v.useCallback(() => {
1174
- a.current = !0, h.current && clearTimeout(h.current), h.current = setTimeout(() => {
1187
+ const K = v.useCallback(() => {
1188
+ a.current = !0, g.current && clearTimeout(g.current), g.current = setTimeout(() => {
1175
1189
  a.current = !1;
1176
1190
  }, 3e3);
1177
1191
  }, []), ot = v.useRef(l);
@@ -1207,67 +1221,67 @@ const ct = v.createContext({}), H = v.createContext(
1207
1221
  if (!c) return;
1208
1222
  let u = null;
1209
1223
  const x = () => {
1210
- J(), S ? (u !== null && cancelAnimationFrame(u), u = requestAnimationFrame(() => {
1224
+ K(), S ? (u !== null && cancelAnimationFrame(u), u = requestAnimationFrame(() => {
1211
1225
  Z();
1212
- const B = Q();
1226
+ const B = _();
1213
1227
  tt(B);
1214
1228
  })) : (u !== null && cancelAnimationFrame(u), u = requestAnimationFrame(() => {
1215
- const B = Q();
1229
+ const B = _();
1216
1230
  tt(B);
1217
1231
  }));
1218
- }, C = () => J(), b = () => J();
1232
+ }, C = () => K(), b = () => K();
1219
1233
  return c.addEventListener("scroll", x, { passive: !0 }), c.addEventListener("touchstart", C, {
1220
1234
  passive: !0
1221
1235
  }), c.addEventListener("mousedown", b), () => {
1222
- c.removeEventListener("scroll", x), c.removeEventListener("touchstart", C), c.removeEventListener("mousedown", b), h.current && clearTimeout(h.current), u !== null && cancelAnimationFrame(u);
1236
+ c.removeEventListener("scroll", x), c.removeEventListener("touchstart", C), c.removeEventListener("mousedown", b), g.current && clearTimeout(g.current), u !== null && cancelAnimationFrame(u);
1223
1237
  };
1224
1238
  }, [
1225
1239
  S,
1226
- J,
1240
+ K,
1227
1241
  Z,
1228
- Q,
1242
+ _,
1229
1243
  tt
1230
1244
  ]), v.useEffect(() => {
1231
- if (g) {
1232
- const c = g.getControlProps(t);
1245
+ if (f) {
1246
+ const c = f.getControlProps(t);
1233
1247
  c && c !== l && I(c);
1234
1248
  }
1235
- }, [t, g, l]), v.useEffect(() => {
1236
- if (l.currentIndex !== void 0 && o.current && m.length > 0 && L > 0) {
1249
+ }, [t, f, l]), v.useEffect(() => {
1250
+ if (l.currentIndex !== void 0 && o.current && m.length > 0 && R > 0) {
1237
1251
  const c = Math.max(
1238
1252
  0,
1239
1253
  Math.min(l.currentIndex, m.length - 1)
1240
- ), u = Q();
1241
- c !== u && W(c, !0);
1254
+ ), u = _();
1255
+ c !== u && L(c, !0);
1242
1256
  }
1243
1257
  }, [
1244
1258
  l.currentIndex,
1245
1259
  m.length,
1246
1260
  m.length,
1247
- L,
1248
- T,
1261
+ R,
1262
+ P,
1249
1263
  z,
1250
- W,
1251
- Q
1264
+ L,
1265
+ _
1252
1266
  ]), v.useEffect(() => {
1253
- if (S && o.current && m.length > 0 && m.length > 0 && (z ? T > 0 : L > 0)) {
1254
- const c = z ? T : L;
1267
+ if (S && o.current && m.length > 0 && m.length > 0 && (z ? P > 0 : R > 0)) {
1268
+ const c = z ? P : R;
1255
1269
  setTimeout(() => {
1256
1270
  o.current && (z ? o.current.scrollTop = c : o.current.scrollLeft = c);
1257
1271
  }, 0);
1258
1272
  }
1259
- }, [S, m.length, L, T, z]), v.useEffect(() => {
1260
- if (!g) return;
1261
- const { registerContainer: c, unregisterContainer: u } = g;
1273
+ }, [S, m.length, R, P, z]), v.useEffect(() => {
1274
+ if (!f) return;
1275
+ const { registerContainer: c, unregisterContainer: u } = f;
1262
1276
  return () => {
1263
1277
  };
1264
1278
  }, [
1265
1279
  t,
1266
- g?.registerContainer,
1267
- g?.unregisterContainer,
1280
+ f?.registerContainer,
1281
+ f?.unregisterContainer,
1268
1282
  // controlProps, // REMOVED to break infinite loop
1269
- W,
1270
- Q
1283
+ L,
1284
+ _
1271
1285
  ]);
1272
1286
  const zt = {
1273
1287
  display: "flex",
@@ -1323,22 +1337,22 @@ const ct = v.createContext({}), H = v.createContext(
1323
1337
  }
1324
1338
  }
1325
1339
  return null;
1326
- }, Rt = ({ id: t, name: r, nodeData: e, children: n }) => {
1327
- const { dimensions: i, ref: s } = rt(), { componentId: o } = N(lt), p = N(H), a = e.style.originalSize?.[0] || 375;
1340
+ }, Wt = ({ id: t, name: r, nodeData: e, children: n }) => {
1341
+ const { dimensions: i, ref: s } = rt(), { componentId: o } = M(lt), p = M(H), a = e.style.originalSize?.[0] || 375;
1328
1342
  e.style.originalSize?.[1];
1329
- const h = p?.dimensions?.width, F = p?.dimensions?.height, g = window.innerWidth, y = h && h > 0 && h < g * 0.8;
1343
+ const g = p?.dimensions?.width, E = p?.dimensions?.height, f = window.innerWidth, y = g && g > 0 && g < f * 0.8;
1330
1344
  let l;
1331
- i.width > 0 && i.height > 0 ? (l = i.width, i.height) : y && h && F || h && F && h > 0 && F > 0 ? l = h : l = g;
1345
+ i.width > 0 && i.height > 0 ? (l = i.width, i.height) : y && g && E || g && E && g > 0 && E > 0 ? l = g : l = f;
1332
1346
  const I = a < 768;
1333
- let E = l, w = "100%";
1347
+ let F = l, w = "100%";
1334
1348
  if (I && l > a * 1.5) {
1335
1349
  const A = Math.round(a * 1.5);
1336
- E = A, w = A;
1350
+ F = A, w = A;
1337
1351
  }
1338
- const P = { scaleFactor: E / a || 1 };
1352
+ const T = { scaleFactor: F / a || 1 };
1339
1353
  if (o) {
1340
1354
  const A = $t(n, o);
1341
- return A ? /* @__PURE__ */ d(ct.Provider, { value: P, children: /* @__PURE__ */ d(
1355
+ return A ? /* @__PURE__ */ d(ct.Provider, { value: T, children: /* @__PURE__ */ d(
1342
1356
  H.Provider,
1343
1357
  {
1344
1358
  value: {
@@ -1351,7 +1365,7 @@ const ct = v.createContext({}), H = v.createContext(
1351
1365
  }
1352
1366
  ) }) : (console.warn(`Child with id "${o}" not found`), null);
1353
1367
  }
1354
- const f = Array.isArray(n) ? n : [n], { scrollableChildren: S, nonScrollableChildren: j } = f.reduce(
1368
+ const h = Array.isArray(n) ? n : [n], { scrollableChildren: S, nonScrollableChildren: G } = h.reduce(
1355
1369
  (A, V) => {
1356
1370
  const O = V.props.nodeData.type === "container:top-bar" ? "nonScrollableChildren" : "scrollableChildren";
1357
1371
  return A[O].push(V), A;
@@ -1361,8 +1375,8 @@ const ct = v.createContext({}), H = v.createContext(
1361
1375
  nonScrollableChildren: []
1362
1376
  }
1363
1377
  );
1364
- let M = e.style?.layout?.mode;
1365
- if (!M && t === "01KASW494V02Y8P5JVWV5XK62X" && (console.log("🔧 PATCHING missing layout for page", t), M = "HORIZONTAL"), !M && n) {
1378
+ let N = e.style?.layout?.mode;
1379
+ if (!N && t === "01KASW494V02Y8P5JVWV5XK62X" && (console.log("🔧 PATCHING missing layout for page", t), N = "HORIZONTAL"), !N && n) {
1366
1380
  const A = Array.isArray(n) ? n : [n];
1367
1381
  let V = 0, U = 0;
1368
1382
  A.forEach((m) => {
@@ -1370,12 +1384,12 @@ const ct = v.createContext({}), H = v.createContext(
1370
1384
  Y && (V += Y, Y < 99 && U++);
1371
1385
  }), U > 0 && V >= 99 && (console.log(
1372
1386
  `[PATCH] Detected HORIZONTAL WRAP layout for page ${t} (Partial width children: ${U}, Total width: ${V})`
1373
- ), M = "HORIZONTAL", e.style || (e.style = {}), e.style.layout || (e.style.layout = {}), e.style.layout.mode = "HORIZONTAL", e.style.layout.flexWrap = "wrap", e.style.layout.primaryAxisAlignItems = "flex-start", e.style.layout.counterAxisAlignItems = "flex-start");
1387
+ ), N = "HORIZONTAL", e.style || (e.style = {}), e.style.layout || (e.style.layout = {}), e.style.layout.mode = "HORIZONTAL", e.style.layout.flexWrap = "wrap", e.style.layout.primaryAxisAlignItems = "flex-start", e.style.layout.counterAxisAlignItems = "flex-start");
1374
1388
  }
1375
- const G = M === "HORIZONTAL" ? "row" : "column", K = j.some(
1389
+ const j = N === "HORIZONTAL" ? "row" : "column", D = G.some(
1376
1390
  (A) => A?.props?.nodeData?.type !== "container:background"
1377
1391
  );
1378
- return /* @__PURE__ */ d(ct.Provider, { value: P, children: /* @__PURE__ */ it(
1392
+ return /* @__PURE__ */ d(ct.Provider, { value: T, children: /* @__PURE__ */ it(
1379
1393
  "div",
1380
1394
  {
1381
1395
  style: {
@@ -1386,9 +1400,9 @@ const ct = v.createContext({}), H = v.createContext(
1386
1400
  position: "relative",
1387
1401
  overflow: "hidden",
1388
1402
  // Only use flex if we have non-background nonScrollableChildren (like top-bar)
1389
- ...K ? {
1403
+ ...D ? {
1390
1404
  display: "flex",
1391
- flexDirection: G,
1405
+ flexDirection: j,
1392
1406
  gap: 0,
1393
1407
  rowGap: 0,
1394
1408
  columnGap: 0
@@ -1396,7 +1410,7 @@ const ct = v.createContext({}), H = v.createContext(
1396
1410
  },
1397
1411
  ref: s,
1398
1412
  children: [
1399
- j.filter(
1413
+ G.filter(
1400
1414
  (A) => A?.props?.nodeData?.type === "container:background"
1401
1415
  ).map((A, V) => /* @__PURE__ */ d(
1402
1416
  H.Provider,
@@ -1411,7 +1425,7 @@ const ct = v.createContext({}), H = v.createContext(
1411
1425
  },
1412
1426
  `bg-${V}`
1413
1427
  )),
1414
- K && j.filter(
1428
+ D && G.filter(
1415
1429
  (A) => A?.props?.nodeData?.type !== "container:background"
1416
1430
  ).map((A, V) => /* @__PURE__ */ d(
1417
1431
  H.Provider,
@@ -1434,17 +1448,17 @@ const ct = v.createContext({}), H = v.createContext(
1434
1448
  "data-type": "PageComponent",
1435
1449
  style: {
1436
1450
  position: "relative",
1437
- ...K ? {
1451
+ ...D ? {
1438
1452
  flex: 1,
1439
- ...G === "row" ? { alignSelf: "stretch" } : {}
1453
+ ...j === "row" ? { alignSelf: "stretch" } : {}
1440
1454
  // Removed height: "100%" to allow HUG containers to size based on content
1441
1455
  } : {
1442
1456
  width: "100%"
1443
1457
  // Removed height: "100%" to allow HUG containers to size based on content
1444
1458
  },
1445
1459
  // Remove overflow: auto in horizontal mode as it causes height collapse
1446
- ...G === "column" && { overflow: "auto" },
1447
- ...R(e.style, {
1460
+ ...j === "column" && { overflow: "auto" },
1461
+ ...W(e.style, {
1448
1462
  debug: !1
1449
1463
  })
1450
1464
  },
@@ -1459,7 +1473,7 @@ const ct = v.createContext({}), H = v.createContext(
1459
1473
  nodeData: r,
1460
1474
  children: e
1461
1475
  }) => {
1462
- const i = N(_)?.embedsById?.[t], s = R(r.style, { debug: !1 });
1476
+ const i = M(q)?.embedsById?.[t], s = W(r.style, { debug: !1 });
1463
1477
  return i ? /* @__PURE__ */ d(
1464
1478
  "div",
1465
1479
  {
@@ -1468,7 +1482,8 @@ const ct = v.createContext({}), H = v.createContext(
1468
1482
  display: "flex",
1469
1483
  flexDirection: "column",
1470
1484
  // Reset positioning if provided by wrapper
1471
- position: "absolute"
1485
+ position: "absolute",
1486
+ zIndex: 10
1472
1487
  },
1473
1488
  "data-type": "EmbedComponent",
1474
1489
  "data-id": t,
@@ -1477,7 +1492,7 @@ const ct = v.createContext({}), H = v.createContext(
1477
1492
  ) : /* @__PURE__ */ d("div", { style: s, "data-type": "EmbedComponent-Empty", "data-id": t, children: e });
1478
1493
  }, ee = {
1479
1494
  EmbedComponent: kt,
1480
- WebViewComponent: ht,
1495
+ WebViewComponent: dt,
1481
1496
  ColorComponent: gt,
1482
1497
  GradientComponent: mt,
1483
1498
  ImageComponent: yt,
@@ -1489,36 +1504,37 @@ const ct = v.createContext({}), H = v.createContext(
1489
1504
  TextInputComponent: It,
1490
1505
  LottieComponent: wt,
1491
1506
  SvgComponent: At,
1492
- TextComponent: Ft,
1493
- StatefulSetComponent: dt,
1494
- StatefulCompoundComponent: Et,
1495
- BackgroundContainerComponent: Pt,
1496
- ContainerComponent: pt,
1497
- CompoundComponent: Tt,
1507
+ TextComponent: Et,
1508
+ StatefulSetComponent: ut,
1509
+ StatefulCompoundComponent: Ft,
1510
+ BackgroundContainerComponent: Tt,
1511
+ ContainerComponent: ft,
1512
+ CompoundComponent: Pt,
1498
1513
  TopBarContainerComponent: Bt,
1499
1514
  DefaultLayerComponent: Zt,
1500
- TabsMenuComponent: Lt,
1501
- MenuSideComponent: Wt,
1515
+ TabsMenuComponent: Rt,
1516
+ MenuSideComponent: Lt,
1502
1517
  SliderComponent: at,
1503
- PageComponent: Rt,
1518
+ PageComponent: Wt,
1504
1519
  // Type string mappings for dynamically loaded components
1505
- "menu:side": Wt,
1506
- "page:default": Rt,
1507
- "container:background": Pt,
1508
- "container:default": pt,
1520
+ "menu:side": Lt,
1521
+ "page:default": Wt,
1522
+ "container:background": Tt,
1523
+ "container:default": ft,
1509
1524
  "container:top-bar": Bt,
1510
1525
  "container:slider": at,
1511
- "component:text": Ft,
1526
+ "component:text": Et,
1512
1527
  "component:color": gt,
1513
1528
  "component:gradient": mt,
1514
1529
  "component:image": yt,
1515
1530
  "component:svg": At,
1516
- "component:compound": Tt,
1517
- "component:input-stateful-set": dt,
1518
- "component:stateful-set": dt,
1519
- "component:stateful-compound": Et,
1531
+ "component:compound": Pt,
1532
+ "component:input-stateful-set": ut,
1533
+ "component:stateful-set": ut,
1534
+ "component:stateful-compound": Ft,
1520
1535
  "component:slider": at,
1521
- "component:webview": ht,
1536
+ "component:webview": dt,
1537
+ "component:web-view": dt,
1522
1538
  "component:video": Xt,
1523
1539
  "component:lottie": wt,
1524
1540
  "component:email-input": bt,
@@ -1527,7 +1543,7 @@ const ct = v.createContext({}), H = v.createContext(
1527
1543
  "component:select-input": St,
1528
1544
  "component:image-input": vt,
1529
1545
  "component:hidden-input": Ct,
1530
- "component:tabs-menu": Lt,
1546
+ "component:tabs-menu": Rt,
1531
1547
  "component:embed": kt,
1532
1548
  ContainerSliderComponent: at
1533
1549
  };