@builder.io/sdk-react 0.9.0 → 0.10.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
  "use client";
2
2
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
3
  import { createContext, useState, useContext, createElement, useRef, useEffect } from "react";
4
- import { i as isEditing, j as isBrowser, k as getUserAttributes, l as fastClone, m as logger, n as checkIsDefined, T as TARGET, r as register, o as getDefaultCanTrack, p as _track, a as isPreviewing, c as createRegisterComponentMessage, b as fetchOneEntry, q as fetch$1, u as components, v as serializeComponentInfo, w as handleABTestingSync } from "./server-entry-e4cd1e05.js";
5
- import { _ as U, h as H, f as K, g as z, e as q, d as Y, s as G, t as J } from "./server-entry-e4cd1e05.js";
4
+ import { i as isEditing, j as isBrowser, k as getUserAttributes, l as fastClone, m as logger, n as checkIsDefined, T as TARGET, r as register, o as getDefaultCanTrack, p as _track, a as isPreviewing, c as createRegisterComponentMessage, b as fetchOneEntry, q as fetch$1, u as components, v as serializeComponentInfo, w as handleABTestingSync } from "./server-entry-46908b1b.js";
5
+ import { _ as U, h as H, f as K, g as z, e as q, d as Y, s as G, t as J } from "./server-entry-46908b1b.js";
6
6
  import { createRequire } from "node:module";
7
7
  function Button(e) {
8
8
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -82,13 +82,13 @@ const getFunctionArguments = ({
82
82
  rootSetState: a,
83
83
  rootState: r
84
84
  }) => {
85
- const l = getFunctionArguments({
85
+ const c = getFunctionArguments({
86
86
  builder: t,
87
87
  context: n,
88
88
  event: i,
89
89
  state: flattenState(r, o, a)
90
90
  });
91
- return new Function(...l.map(([c]) => c), e)(...l.map(([, c]) => c));
91
+ return new Function(...c.map(([l]) => l), e)(...c.map(([, l]) => l));
92
92
  };
93
93
  function flattenState(e, t, n) {
94
94
  if (e === t)
@@ -175,20 +175,20 @@ output;
175
175
  rootSetState: a,
176
176
  rootState: r
177
177
  }) => {
178
- const l = fastClone({
178
+ const c = fastClone({
179
179
  ...r,
180
180
  ...o
181
- }), c = getFunctionArguments({
181
+ }), l = getFunctionArguments({
182
182
  builder: t,
183
183
  context: n,
184
184
  event: i,
185
- state: l
185
+ state: c
186
186
  }), s = getIsolateContext(), d = s.global;
187
187
  d.setSync("global", d.derefInto()), d.setSync("log", function(...S) {
188
188
  console.log(...S);
189
189
  }), d.setSync(BUILDER_SET_STATE_NAME, function(S, f) {
190
190
  set(r, S, f), a == null || a(r);
191
- }), c.forEach(([S, f]) => {
191
+ }), l.forEach(([S, f]) => {
192
192
  const p = typeof f == "object" ? new ivm.Reference(
193
193
  // workaround: methods with default values for arguments is not being cloned over
194
194
  S === "builder" ? {
@@ -200,7 +200,7 @@ output;
200
200
  }), d.setSync(INJECTED_IVM_GLOBAL, ivm);
201
201
  const g = processCode({
202
202
  code: e,
203
- args: c
203
+ args: l
204
204
  }), x = s.evalSync(g);
205
205
  try {
206
206
  return JSON.parse(x);
@@ -221,7 +221,7 @@ function evaluate({
221
221
  logger.warn("Skipping evaluation of empty code block.");
222
222
  return;
223
223
  }
224
- const l = {
224
+ const c = {
225
225
  code: parseCode(e, {
226
226
  isExpression: r
227
227
  }),
@@ -233,9 +233,9 @@ function evaluate({
233
233
  localState: n
234
234
  };
235
235
  try {
236
- return chooseBrowserOrServerEval(l);
237
- } catch (c) {
238
- logger.error("Failed code evaluation: " + c.message, {
236
+ return chooseBrowserOrServerEval(c);
237
+ } catch (l) {
238
+ logger.error("Failed code evaluation: " + l.message, {
239
239
  code: e
240
240
  });
241
241
  return;
@@ -262,15 +262,15 @@ const evaluateBindings = ({
262
262
  ...a.actions
263
263
  }
264
264
  };
265
- for (const l in e.bindings) {
266
- const c = e.bindings[l], s = evaluate({
267
- code: c,
265
+ for (const c in e.bindings) {
266
+ const l = e.bindings[c], s = evaluate({
267
+ code: l,
268
268
  localState: n,
269
269
  rootState: i,
270
270
  rootSetState: o,
271
271
  context: t
272
272
  });
273
- set(r, l, s);
273
+ set(r, c, s);
274
274
  }
275
275
  return r;
276
276
  };
@@ -333,14 +333,14 @@ const EMPTY_HTML_ELEMENTS = ["area", "base", "br", "col", "embed", "hr", "img",
333
333
  if (!Array.isArray(o))
334
334
  return;
335
335
  const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
336
- return o.map((c, s) => ({
336
+ return o.map((l, s) => ({
337
337
  context: {
338
338
  ...t,
339
339
  localState: {
340
340
  ...t.localState,
341
341
  $index: s,
342
- $item: c,
343
- [r]: c,
342
+ $item: l,
343
+ [r]: l,
344
344
  [`$${r}Index`]: s
345
345
  }
346
346
  },
@@ -430,15 +430,15 @@ function BlockStyles(e) {
430
430
  shouldEvaluateBindings: !0
431
431
  }), o = i.responsiveStyles, a = e.context.content, r = getSizesForBreakpoints(
432
432
  ((f = a == null ? void 0 : a.meta) == null ? void 0 : f.breakpoints) || {}
433
- ), l = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, s = o == null ? void 0 : o.small, d = i.id;
433
+ ), c = o == null ? void 0 : o.large, l = o == null ? void 0 : o.medium, s = o == null ? void 0 : o.small, d = i.id;
434
434
  if (!d)
435
435
  return "";
436
- const g = l ? createCssClass({
436
+ const g = c ? createCssClass({
437
437
  className: d,
438
- styles: l
439
- }) : "", x = c ? createCssClass({
438
+ styles: c
439
+ }) : "", x = l ? createCssClass({
440
440
  className: d,
441
- styles: c,
441
+ styles: l,
442
442
  mediaQuery: getMaxWidthQueryForSize(
443
443
  "medium",
444
444
  r
@@ -468,23 +468,24 @@ const getEventHandlerName = (e) => `on${capitalizeFirstLetter(e)}`, createEventH
468
468
  isExpression: !1
469
469
  });
470
470
  function getBlockActions(e) {
471
- const t = {}, n = e.block.actions ?? {};
472
- for (const i in n) {
473
- if (!n.hasOwnProperty(i))
471
+ var i;
472
+ const t = {}, n = (i = e.block.actions) != null ? i : {};
473
+ for (const o in n) {
474
+ if (!n.hasOwnProperty(o))
474
475
  continue;
475
- const o = n[i];
476
- let a = getEventHandlerName(i);
476
+ const a = n[o];
477
+ let r = getEventHandlerName(o);
477
478
  if (e.stripPrefix)
478
479
  switch (TARGET) {
479
480
  case "vue2":
480
481
  case "vue3":
481
- a = a.replace("v-on:", "");
482
+ r = r.replace("v-on:", "");
482
483
  break;
483
484
  case "svelte":
484
- a = a.replace("on:", "");
485
+ r = r.replace("on:", "");
485
486
  break;
486
487
  }
487
- t[a] = createEventHandler(o, e);
488
+ t[r] = createEventHandler(a, e);
488
489
  }
489
490
  return t;
490
491
  }
@@ -700,47 +701,47 @@ function Block(e) {
700
701
  return e.block.tagName || "div";
701
702
  }
702
703
  function a() {
703
- var C, E;
704
- if ((C = e.block.repeat) != null && C.collection)
704
+ var k, E;
705
+ if ((k = e.block.repeat) != null && k.collection)
705
706
  return !!((E = n == null ? void 0 : n()) != null && E.length);
706
707
  const f = "hide" in i() ? i().hide : !1;
707
708
  return ("show" in i() ? i().show : !0) && !f;
708
709
  }
709
710
  function r() {
710
- var p;
711
- return !((p = t == null ? void 0 : t()) != null && p.component) && !n() ? i().children ?? [] : [];
711
+ var p, k;
712
+ return !((p = t == null ? void 0 : t()) != null && p.component) && !n() ? (k = i().children) != null ? k : [] : [];
712
713
  }
713
- function l() {
714
- var f, p, C, E, v;
714
+ function c() {
715
+ var f, p, k, E, C, y;
715
716
  return {
716
- blockChildren: i().children ?? [],
717
- componentRef: (f = t == null ? void 0 : t()) == null ? void 0 : f.component,
717
+ blockChildren: (f = i().children) != null ? f : [],
718
+ componentRef: (p = t == null ? void 0 : t()) == null ? void 0 : p.component,
718
719
  componentOptions: {
719
720
  ...getBlockComponentOptions(i()),
720
721
  builderContext: e.context,
721
- ...((p = t == null ? void 0 : t()) == null ? void 0 : p.name) === "Symbol" || ((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Columns" ? {
722
+ ...((k = t == null ? void 0 : t()) == null ? void 0 : k.name) === "Symbol" || ((E = t == null ? void 0 : t()) == null ? void 0 : E.name) === "Columns" ? {
722
723
  builderComponents: e.registeredComponents
723
724
  } : {}
724
725
  },
725
- context: c,
726
+ context: l,
726
727
  registeredComponents: e.registeredComponents,
727
728
  builderBlock: i(),
728
- includeBlockProps: ((E = t == null ? void 0 : t()) == null ? void 0 : E.noWrap) === !0,
729
- isInteractive: !((v = t == null ? void 0 : t()) != null && v.isRSC)
729
+ includeBlockProps: ((C = t == null ? void 0 : t()) == null ? void 0 : C.noWrap) === !0,
730
+ isInteractive: !((y = t == null ? void 0 : t()) != null && y.isRSC)
730
731
  };
731
732
  }
732
- const [c, s] = useState(() => e.context);
733
+ const [l, s] = useState(() => e.context);
733
734
  return /* @__PURE__ */ jsx(Fragment, { children: a() ? /* @__PURE__ */ jsx(Fragment, { children: (d = t == null ? void 0 : t()) != null && d.noWrap ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
734
735
  ComponentRef,
735
736
  {
736
- componentRef: l().componentRef,
737
- componentOptions: l().componentOptions,
738
- blockChildren: l().blockChildren,
739
- context: l().context,
740
- registeredComponents: l().registeredComponents,
741
- builderBlock: l().builderBlock,
742
- includeBlockProps: l().includeBlockProps,
743
- isInteractive: l().isInteractive
737
+ componentRef: c().componentRef,
738
+ componentOptions: c().componentOptions,
739
+ blockChildren: c().blockChildren,
740
+ context: c().context,
741
+ registeredComponents: c().registeredComponents,
742
+ builderBlock: c().builderBlock,
743
+ includeBlockProps: c().includeBlockProps,
744
+ isInteractive: c().isInteractive
744
745
  }
745
746
  ) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
746
747
  isEmptyHtmlElement(o()) ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
@@ -772,21 +773,21 @@ function Block(e) {
772
773
  /* @__PURE__ */ jsx(
773
774
  ComponentRef,
774
775
  {
775
- componentRef: l().componentRef,
776
- componentOptions: l().componentOptions,
777
- blockChildren: l().blockChildren,
778
- context: l().context,
779
- registeredComponents: l().registeredComponents,
780
- builderBlock: l().builderBlock,
781
- includeBlockProps: l().includeBlockProps,
782
- isInteractive: l().isInteractive
776
+ componentRef: c().componentRef,
777
+ componentOptions: c().componentOptions,
778
+ blockChildren: c().blockChildren,
779
+ context: c().context,
780
+ registeredComponents: c().registeredComponents,
781
+ builderBlock: c().builderBlock,
782
+ includeBlockProps: c().includeBlockProps,
783
+ isInteractive: c().isInteractive
783
784
  }
784
785
  ),
785
786
  (x = r()) == null ? void 0 : x.map((f) => /* @__PURE__ */ jsx(
786
787
  Block,
787
788
  {
788
789
  block: f,
789
- context: c,
790
+ context: l,
790
791
  registeredComponents: e.registeredComponents
791
792
  },
792
793
  "block-" + f.id
@@ -795,7 +796,7 @@ function Block(e) {
795
796
  BlockStyles,
796
797
  {
797
798
  block: f,
798
- context: c
799
+ context: l
799
800
  },
800
801
  "block-style-" + f.id
801
802
  ))
@@ -870,22 +871,22 @@ function Blocks(e) {
870
871
  BlocksWrapper: (i = e.context) == null ? void 0 : i.BlocksWrapper,
871
872
  BlocksWrapperProps: (o = e.context) == null ? void 0 : o.BlocksWrapperProps,
872
873
  children: [
873
- e.blocks ? /* @__PURE__ */ jsx(Fragment, { children: (a = e.blocks) == null ? void 0 : a.map((l) => /* @__PURE__ */ jsx(
874
+ e.blocks ? /* @__PURE__ */ jsx(Fragment, { children: (a = e.blocks) == null ? void 0 : a.map((c) => /* @__PURE__ */ jsx(
874
875
  Block,
875
876
  {
876
- block: l,
877
+ block: c,
877
878
  context: e.context || t,
878
879
  registeredComponents: e.registeredComponents || n.registeredComponents
879
880
  },
880
- "render-block-" + l.id
881
+ "render-block-" + c.id
881
882
  )) }) : null,
882
- e.blocks ? /* @__PURE__ */ jsx(Fragment, { children: (r = e.blocks) == null ? void 0 : r.map((l) => /* @__PURE__ */ jsx(
883
+ e.blocks ? /* @__PURE__ */ jsx(Fragment, { children: (r = e.blocks) == null ? void 0 : r.map((c) => /* @__PURE__ */ jsx(
883
884
  BlockStyles,
884
885
  {
885
- block: l,
886
+ block: c,
886
887
  context: e.context || t
887
888
  },
888
- "block-style-" + l.id
889
+ "block-style-" + c.id
889
890
  )) }) : null
890
891
  ]
891
892
  }
@@ -898,25 +899,25 @@ function Columns(e) {
898
899
  ), [i, o] = useState(() => e.columns || []), [a, r] = useState(
899
900
  () => e.stackColumnsAt || "tablet"
900
901
  );
901
- function l(v) {
902
- var k;
903
- return ((k = i[v]) == null ? void 0 : k.width) || 100 / i.length;
902
+ function c(C) {
903
+ var y;
904
+ return ((y = i[C]) == null ? void 0 : y.width) || 100 / i.length;
904
905
  }
905
- function c(v) {
906
- const k = t * (i.length - 1) / i.length;
907
- return `calc(${l(v)}% - ${k}px)`;
906
+ function l(C) {
907
+ const y = t * (i.length - 1) / i.length;
908
+ return `calc(${c(C)}% - ${y}px)`;
908
909
  }
909
910
  function s({
910
- stackedStyle: v,
911
- desktopStyle: k
911
+ stackedStyle: C,
912
+ desktopStyle: y
912
913
  }) {
913
- return a === "tablet" ? v : k;
914
+ return a === "tablet" ? C : y;
914
915
  }
915
916
  function d({
916
- stackedStyle: v,
917
- desktopStyle: k
917
+ stackedStyle: C,
918
+ desktopStyle: y
918
919
  }) {
919
- return a === "never" ? k : v;
920
+ return a === "never" ? y : C;
920
921
  }
921
922
  const [g, x] = useState(
922
923
  () => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
@@ -930,8 +931,8 @@ function Columns(e) {
930
931
  })
931
932
  };
932
933
  }
933
- function f(v) {
934
- const k = v === 0 ? 0 : t, T = c(v), w = `${k}px`, R = "100%", j = 0;
934
+ function f(C) {
935
+ const y = C === 0 ? 0 : t, T = l(C), w = `${y}px`, R = "100%", j = 0;
935
936
  return {
936
937
  width: T,
937
938
  ["marginLeft"]: w,
@@ -953,13 +954,13 @@ function Columns(e) {
953
954
  })
954
955
  };
955
956
  }
956
- function p(v) {
957
+ function p(C) {
957
958
  var T, w;
958
959
  return getSizesForBreakpoints(
959
960
  ((w = (T = e.builderContext.content) == null ? void 0 : T.meta) == null ? void 0 : w.breakpoints) || {}
960
- )[v].max;
961
+ )[C].max;
961
962
  }
962
- function C() {
963
+ function k() {
963
964
  return `
964
965
  @media (max-width: ${p("medium")}px) {
965
966
  .${e.builderBlock.id}-breakpoints {
@@ -993,25 +994,25 @@ function Columns(e) {
993
994
  className: `builder-columns ${e.builderBlock.id}-breakpoints div-53636e90`,
994
995
  style: S(),
995
996
  children: [
996
- /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: C() }) }),
997
- (E = e.columns) == null ? void 0 : E.map((v, k) => /* @__PURE__ */ createElement(
997
+ /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: k() }) }),
998
+ (E = e.columns) == null ? void 0 : E.map((C, y) => /* @__PURE__ */ createElement(
998
999
  "div",
999
1000
  {
1000
1001
  className: "builder-column div-53636e90-2",
1001
- style: f(k),
1002
- key: k
1002
+ style: f(y),
1003
+ key: y
1003
1004
  },
1004
1005
  /* @__PURE__ */ jsx(
1005
1006
  Blocks,
1006
1007
  {
1007
- path: `component.options.columns.${k}.blocks`,
1008
+ path: `component.options.columns.${y}.blocks`,
1008
1009
  parent: e.builderBlock.id,
1009
1010
  styleProp: {
1010
1011
  flexGrow: "1"
1011
1012
  },
1012
1013
  context: e.builderContext,
1013
1014
  registeredComponents: e.builderComponents,
1014
- blocks: v.blocks
1015
+ blocks: C.blocks
1015
1016
  }
1016
1017
  )
1017
1018
  ))
@@ -1062,7 +1063,7 @@ function getSrcSet(e) {
1062
1063
  return e.match(/cdn\.shopify\.com/) ? t.map((n) => [getShopifyImageUrl(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
1063
1064
  }
1064
1065
  function Image(e) {
1065
- var o, a, r, l;
1066
+ var o, a, r, c;
1066
1067
  function t() {
1067
1068
  var d;
1068
1069
  const s = e.image || e.src;
@@ -1078,18 +1079,18 @@ function Image(e) {
1078
1079
  return getSrcSet(s);
1079
1080
  }
1080
1081
  function n() {
1081
- var c;
1082
- return (c = t == null ? void 0 : t()) != null && c.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
1082
+ var l;
1083
+ return (l = t == null ? void 0 : t()) != null && l.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
1083
1084
  }
1084
1085
  function i() {
1085
- const c = {
1086
+ const l = {
1086
1087
  position: "absolute",
1087
1088
  height: "100%",
1088
1089
  width: "100%",
1089
1090
  left: "0px",
1090
1091
  top: "0px"
1091
1092
  };
1092
- return e.aspectRatio ? c : void 0;
1093
+ return e.aspectRatio ? l : void 0;
1093
1094
  }
1094
1095
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1095
1096
  /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1122,7 +1123,7 @@ function Image(e) {
1122
1123
  }
1123
1124
  }
1124
1125
  ) }) : null,
1125
- (l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ jsx(Fragment, { children: e.children }) : null,
1126
+ (c = (r = e.builderBlock) == null ? void 0 : r.children) != null && c.length && e.fitContent ? /* @__PURE__ */ jsx(Fragment, { children: e.children }) : null,
1126
1127
  !e.fitContent && e.children ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: "div-dbab4030-2", children: e.children }) }) : null
1127
1128
  ] }),
1128
1129
  /* @__PURE__ */ jsx("style", { children: `.img-dbab4030 {
@@ -1377,7 +1378,7 @@ const componentInfo$a = {
1377
1378
  });
1378
1379
  }
1379
1380
  const n = e.get("columns");
1380
- Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((l, c) => l + c.get("width"), 0) !== 100) && t();
1381
+ Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((c, l) => c + l.get("width"), 0) !== 100) && t();
1381
1382
  }
1382
1383
  }, {
1383
1384
  name: "space",
@@ -1425,12 +1426,12 @@ const componentInfo$a = {
1425
1426
  function CustomCode(e) {
1426
1427
  const t = useRef(null), [n, i] = useState(() => []), [o, a] = useState(() => []);
1427
1428
  return useEffect(() => {
1428
- var l;
1429
- if (!((l = t.current) != null && l.getElementsByTagName) || typeof window > "u")
1429
+ var c;
1430
+ if (!((c = t.current) != null && c.getElementsByTagName) || typeof window == "undefined")
1430
1431
  return;
1431
1432
  const r = t.current.getElementsByTagName("script");
1432
- for (let c = 0; c < r.length; c++) {
1433
- const s = r[c];
1433
+ for (let l = 0; l < r.length; l++) {
1434
+ const s = r[l];
1434
1435
  if (s.src) {
1435
1436
  if (n.includes(s.src))
1436
1437
  continue;
@@ -1487,8 +1488,8 @@ const componentInfo$7 = {
1487
1488
  }]
1488
1489
  }, SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"], isJsScript = (e) => SCRIPT_MIME_TYPES.includes(e.type);
1489
1490
  function Embed(e) {
1490
- const t = useRef(null), [n, i] = useState(() => []), [o, a] = useState(() => []), [r, l] = useState(() => !1);
1491
- function c() {
1491
+ const t = useRef(null), [n, i] = useState(() => []), [o, a] = useState(() => []), [r, c] = useState(() => !1);
1492
+ function l() {
1492
1493
  if (!t.current || !t.current.getElementsByTagName)
1493
1494
  return;
1494
1495
  const s = t.current.getElementsByTagName("script");
@@ -1507,7 +1508,7 @@ function Embed(e) {
1507
1508
  }
1508
1509
  }
1509
1510
  return useEffect(() => {
1510
- t.current && !r && (l(!0), c());
1511
+ t.current && !r && (c(!0), l());
1511
1512
  }, [t.current, r]), /* @__PURE__ */ jsx(
1512
1513
  "div",
1513
1514
  {
@@ -1543,17 +1544,17 @@ const componentInfo$6 = {
1543
1544
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1544
1545
  onChange: (e) => {
1545
1546
  e.delete("srcset"), e.delete("noWebp");
1546
- function n(r, l = 6e4) {
1547
- return new Promise((c, s) => {
1547
+ function n(r, c = 6e4) {
1548
+ return new Promise((l, s) => {
1548
1549
  const d = document.createElement("img");
1549
1550
  let g = !1;
1550
1551
  d.onload = () => {
1551
- g = !0, c(d);
1552
+ g = !0, l(d);
1552
1553
  }, d.addEventListener("error", (x) => {
1553
1554
  console.warn("Image load failed", x.error), s(x.error);
1554
1555
  }), d.src = r, setTimeout(() => {
1555
1556
  g || s(new Error("Image load timed out"));
1556
- }, l);
1557
+ }, c);
1557
1558
  });
1558
1559
  }
1559
1560
  function i(r) {
@@ -1564,8 +1565,8 @@ const componentInfo$6 = {
1564
1565
  r.type.includes("svg") && e.set("noWebp", !0);
1565
1566
  }), o && (!a || a === 0.7041))
1566
1567
  return n(o).then((r) => {
1567
- const l = e.get("aspectRatio");
1568
- e.get("image") === o && (!l || l === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
1568
+ const c = e.get("aspectRatio");
1569
+ e.get("image") === o && (!c || c === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
1569
1570
  });
1570
1571
  }
1571
1572
  }, {
@@ -1840,7 +1841,7 @@ const componentInfo = {
1840
1841
  }]
1841
1842
  };
1842
1843
  function Video(e) {
1843
- var i, o, a, r, l, c, s;
1844
+ var i, o, a, r, c, l, s;
1844
1845
  function t() {
1845
1846
  return {
1846
1847
  ...e.autoPlay === !0 ? {
@@ -1908,7 +1909,7 @@ function Video(e) {
1908
1909
  }
1909
1910
  }
1910
1911
  ) }) : null,
1911
- (l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
1912
+ (c = (r = e.builderBlock) == null ? void 0 : r.children) != null && c.length && e.fitContent ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
1912
1913
  "div",
1913
1914
  {
1914
1915
  style: {
@@ -1919,7 +1920,7 @@ function Video(e) {
1919
1920
  children: e.children
1920
1921
  }
1921
1922
  ) }) : null,
1922
- (s = (c = e.builderBlock) == null ? void 0 : c.children) != null && s.length && !e.fitContent ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
1923
+ (s = (l = e.builderBlock) == null ? void 0 : l.children) != null && s.length && !e.fitContent ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
1923
1924
  "div",
1924
1925
  {
1925
1926
  style: {
@@ -2133,7 +2134,7 @@ const findParentElement = (e, t, n = !0) => {
2133
2134
  builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
2134
2135
  }
2135
2136
  };
2136
- }, SDK_VERSION = "0.9.0", registerInsertMenu = () => {
2137
+ }, SDK_VERSION = "0.10.0", registerInsertMenu = () => {
2137
2138
  register("insertMenu", {
2138
2139
  name: "_default",
2139
2140
  default: !0,
@@ -2182,17 +2183,17 @@ const setupBrowserForEditing = (e = {}) => {
2182
2183
  if (i != null && i.type)
2183
2184
  switch (i.type) {
2184
2185
  case "builder.evaluate": {
2185
- const r = i.data.text, l = i.data.arguments || [], c = i.data.id, s = new Function(r);
2186
+ const r = i.data.text, c = i.data.arguments || [], l = i.data.id, s = new Function(r);
2186
2187
  let d, g = null;
2187
2188
  try {
2188
- d = s.apply(null, l);
2189
+ d = s.apply(null, c);
2189
2190
  } catch (x) {
2190
2191
  g = x;
2191
2192
  }
2192
2193
  g ? (o = window.parent) == null || o.postMessage({
2193
2194
  type: "builder.evaluateError",
2194
2195
  data: {
2195
- id: c,
2196
+ id: l,
2196
2197
  error: g.message
2197
2198
  }
2198
2199
  }, "*") : d && typeof d.then == "function" ? d.then((x) => {
@@ -2200,7 +2201,7 @@ const setupBrowserForEditing = (e = {}) => {
2200
2201
  (S = window.parent) == null || S.postMessage({
2201
2202
  type: "builder.evaluateResult",
2202
2203
  data: {
2203
- id: c,
2204
+ id: l,
2204
2205
  result: x
2205
2206
  }
2206
2207
  }, "*");
@@ -2208,7 +2209,7 @@ const setupBrowserForEditing = (e = {}) => {
2208
2209
  type: "builder.evaluateResult",
2209
2210
  data: {
2210
2211
  result: d,
2211
- id: c
2212
+ id: l
2212
2213
  }
2213
2214
  }, "*");
2214
2215
  break;
@@ -2217,10 +2218,10 @@ const setupBrowserForEditing = (e = {}) => {
2217
2218
  })));
2218
2219
  };
2219
2220
  function EnableEditor(e) {
2220
- var R, j, B, P, A, F, _;
2221
+ var R, j, P, A, F, _, V;
2221
2222
  const t = useRef(null), [n, i] = useState(() => 0);
2222
2223
  function o(u) {
2223
- var h, b, y, I, V;
2224
+ var h, b, v, I, B;
2224
2225
  const m = {
2225
2226
  ...e.builderContextSignal.content,
2226
2227
  ...u,
@@ -2231,7 +2232,7 @@ function EnableEditor(e) {
2231
2232
  meta: {
2232
2233
  ...(b = e.builderContextSignal.content) == null ? void 0 : b.meta,
2233
2234
  ...u == null ? void 0 : u.meta,
2234
- breakpoints: ((y = u == null ? void 0 : u.meta) == null ? void 0 : y.breakpoints) || ((V = (I = e.builderContextSignal.content) == null ? void 0 : I.meta) == null ? void 0 : V.breakpoints)
2235
+ breakpoints: ((v = u == null ? void 0 : u.meta) == null ? void 0 : v.breakpoints) || ((B = (I = e.builderContextSignal.content) == null ? void 0 : I.meta) == null ? void 0 : B.breakpoints)
2235
2236
  }
2236
2237
  };
2237
2238
  e.setBuilderContextSignal((W) => ({
@@ -2242,7 +2243,7 @@ function EnableEditor(e) {
2242
2243
  useState(() => 0);
2243
2244
  const [a, r] = useState(
2244
2245
  () => !1
2245
- ), [l, c] = useState(
2246
+ ), [c, l] = useState(
2246
2247
  () => e.contentWrapper || "div"
2247
2248
  );
2248
2249
  function s(u) {
@@ -2251,19 +2252,19 @@ function EnableEditor(e) {
2251
2252
  if (m)
2252
2253
  switch (m.type) {
2253
2254
  case "builder.configureSdk": {
2254
- const b = m.data, { breakpoints: y, contentId: I } = b;
2255
+ const b = m.data, { breakpoints: v, contentId: I } = b;
2255
2256
  if (!I || I !== ((h = e.builderContextSignal.content) == null ? void 0 : h.id))
2256
2257
  return;
2257
- y && o({
2258
+ v && o({
2258
2259
  meta: {
2259
- breakpoints: y
2260
+ breakpoints: v
2260
2261
  }
2261
2262
  }), i(n + 1);
2262
2263
  break;
2263
2264
  }
2264
2265
  case "builder.contentUpdate": {
2265
- const b = m.data, y = b.key || b.alias || b.entry || b.modelName, I = b.data;
2266
- y === e.model && (o(I), i(n + 1));
2266
+ const b = m.data, v = b.key || b.alias || b.entry || b.modelName, I = b.data;
2267
+ v === e.model && (o(I), i(n + 1));
2267
2268
  break;
2268
2269
  }
2269
2270
  }
@@ -2283,20 +2284,20 @@ function EnableEditor(e) {
2283
2284
  function p(u) {
2284
2285
  var m, h;
2285
2286
  if (e.builderContextSignal.content) {
2286
- const b = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, y = (h = e.builderContextSignal.content) == null ? void 0 : h.id;
2287
+ const b = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, v = (h = e.builderContextSignal.content) == null ? void 0 : h.id;
2287
2288
  _track({
2288
2289
  type: "click",
2289
2290
  canTrack: getDefaultCanTrack(e.canTrack),
2290
- contentId: y,
2291
+ contentId: v,
2291
2292
  apiKey: e.apiKey,
2292
- variationId: b !== y ? b : void 0,
2293
+ variationId: b !== v ? b : void 0,
2293
2294
  ...getInteractionPropertiesForEvent(u),
2294
2295
  unique: !S
2295
2296
  });
2296
2297
  }
2297
2298
  S || f(!0);
2298
2299
  }
2299
- function C(u) {
2300
+ function k(u) {
2300
2301
  return u.replace(
2301
2302
  /{{([^}]+)}}/g,
2302
2303
  (m, h) => evaluate({
@@ -2310,30 +2311,30 @@ function EnableEditor(e) {
2310
2311
  }
2311
2312
  function E({ url: u, key: m }) {
2312
2313
  fetch$1(u).then((h) => h.json()).then((h) => {
2313
- var y, I;
2314
+ var v, I;
2314
2315
  const b = {
2315
2316
  ...e.builderContextSignal.rootState,
2316
2317
  [m]: h
2317
2318
  };
2318
- (I = (y = e.builderContextSignal).rootSetState) == null || I.call(y, b), g[m] = !0;
2319
+ (I = (v = e.builderContextSignal).rootSetState) == null || I.call(v, b), g[m] = !0;
2319
2320
  }).catch((h) => {
2320
2321
  console.error("error fetching dynamic data", u, h);
2321
2322
  });
2322
2323
  }
2323
- function v() {
2324
- var m, h;
2325
- const u = ((h = (m = e.builderContextSignal.content) == null ? void 0 : m.data) == null ? void 0 : h.httpRequests) ?? {};
2326
- Object.entries(u).forEach(([b, y]) => {
2327
- if (y && (!g[b] || isEditing())) {
2328
- const I = C(y);
2324
+ function C() {
2325
+ var m, h, b;
2326
+ const u = (b = (h = (m = e.builderContextSignal.content) == null ? void 0 : m.data) == null ? void 0 : h.httpRequests) != null ? b : {};
2327
+ Object.entries(u).forEach(([v, I]) => {
2328
+ if (I && (!g[v] || isEditing())) {
2329
+ const B = k(I);
2329
2330
  E({
2330
- url: I,
2331
- key: b
2331
+ url: B,
2332
+ key: v
2332
2333
  });
2333
2334
  }
2334
2335
  });
2335
2336
  }
2336
- function k() {
2337
+ function y() {
2337
2338
  isEditing() && window.dispatchEvent(
2338
2339
  new CustomEvent(
2339
2340
  "builder:component:stateChange",
@@ -2367,14 +2368,14 @@ function EnableEditor(e) {
2367
2368
  (b = window.parent) == null || b.postMessage(h, "*");
2368
2369
  }), window.addEventListener(
2369
2370
  "builder:component:stateChangeListenerActivated",
2370
- k
2371
+ y
2371
2372
  );
2372
2373
  }
2373
2374
  function w(u) {
2374
2375
  const m = new URL(location.href).searchParams, h = m.get("builder.preview"), b = m.get(
2375
2376
  `builder.preview.${h}`
2376
- ), y = m.get("apiKey") || m.get("builder.space");
2377
- h === e.model && y === e.apiKey && (!e.content || b === e.content.id) && fetchOneEntry({
2377
+ ), v = m.get("apiKey") || m.get("builder.space");
2378
+ h === e.model && v === e.apiKey && (!e.content || b === e.content.id) && fetchOneEntry({
2378
2379
  model: e.model,
2379
2380
  apiKey: e.apiKey,
2380
2381
  apiVersion: e.builderContextSignal.apiVersion
@@ -2410,13 +2411,13 @@ function EnableEditor(e) {
2410
2411
  var u, m;
2411
2412
  if (isBrowser()) {
2412
2413
  if (isEditing() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && getDefaultCanTrack(e.canTrack)) {
2413
- const b = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, y = (m = e.builderContextSignal.content) == null ? void 0 : m.id, I = e.apiKey;
2414
+ const b = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, v = (m = e.builderContextSignal.content) == null ? void 0 : m.id, I = e.apiKey;
2414
2415
  _track({
2415
2416
  type: "impression",
2416
2417
  canTrack: !0,
2417
- contentId: y,
2418
+ contentId: v,
2418
2419
  apiKey: I,
2419
- variationId: b !== y ? b : void 0
2420
+ variationId: b !== v ? b : void 0
2420
2421
  });
2421
2422
  }
2422
2423
  isPreviewing() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
@@ -2424,7 +2425,7 @@ function EnableEditor(e) {
2424
2425
  }, []), useEffect(() => {
2425
2426
  e.apiKey || logger.error(
2426
2427
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2427
- ), d(), v(), k();
2428
+ ), d(), C(), y();
2428
2429
  }, []), useEffect(() => {
2429
2430
  e.content && o(e.content);
2430
2431
  }, [e.content]), useEffect(() => {
@@ -2434,35 +2435,35 @@ function EnableEditor(e) {
2434
2435
  (j = (R = e.builderContextSignal.content) == null ? void 0 : R.data) == null ? void 0 : j.jsCode,
2435
2436
  e.builderContextSignal.rootState
2436
2437
  ]), useEffect(() => {
2437
- v();
2438
- }, [(P = (B = e.builderContextSignal.content) == null ? void 0 : B.data) == null ? void 0 : P.httpRequests]), useEffect(() => {
2439
- k();
2438
+ C();
2439
+ }, [(A = (P = e.builderContextSignal.content) == null ? void 0 : P.data) == null ? void 0 : A.httpRequests]), useEffect(() => {
2440
+ y();
2440
2441
  }, [e.builderContextSignal.rootState]), useEffect(() => () => {
2441
2442
  isBrowser() && (window.removeEventListener("message", s), window.removeEventListener(
2442
2443
  "builder:component:stateChangeListenerActivated",
2443
- k
2444
+ y
2444
2445
  ));
2445
2446
  }, []), /* @__PURE__ */ jsx(builderContext.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ createElement(
2446
- l,
2447
+ c,
2447
2448
  {
2448
2449
  key: n,
2449
2450
  ref: t,
2450
2451
  onClick: (u) => p(u),
2451
- "builder-content-id": (A = e.builderContextSignal.content) == null ? void 0 : A.id,
2452
+ "builder-content-id": (F = e.builderContextSignal.content) == null ? void 0 : F.id,
2452
2453
  "builder-model": e.model,
2453
2454
  ...e.showContent ? {} : {
2454
2455
  hidden: !0,
2455
2456
  "aria-hidden": !0
2456
2457
  },
2457
2458
  ...e.contentWrapperProps,
2458
- className: `variant-${((F = e.content) == null ? void 0 : F.testVariationId) || ((_ = e.content) == null ? void 0 : _.id)}`
2459
+ className: `variant-${((_ = e.content) == null ? void 0 : _.testVariationId) || ((V = e.content) == null ? void 0 : V.id)}`
2459
2460
  },
2460
2461
  e.children
2461
2462
  ) }) : null });
2462
2463
  }
2463
2464
  const getCssFromFont = (e) => {
2464
- var a;
2465
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = e.fileUrl ?? ((a = e == null ? void 0 : e.files) == null ? void 0 : a.regular);
2465
+ var a, r;
2466
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (r = e.fileUrl) != null ? r : (a = e == null ? void 0 : e.files) == null ? void 0 : a.regular;
2466
2467
  let o = "";
2467
2468
  if (i && t && n && (o += `
2468
2469
  @font-face {
@@ -2472,16 +2473,16 @@ font-display: fallback;
2472
2473
  font-weight: 400;
2473
2474
  }
2474
2475
  `.trim()), e.files)
2475
- for (const r in e.files) {
2476
- if (!(String(Number(r)) === r))
2476
+ for (const c in e.files) {
2477
+ if (!(String(Number(c)) === c))
2477
2478
  continue;
2478
- const c = e.files[r];
2479
- c && c !== i && (o += `
2479
+ const s = e.files[c];
2480
+ s && s !== i && (o += `
2480
2481
  @font-face {
2481
2482
  font-family: "${t}";
2482
- src: url('${c}') format('woff2');
2483
+ src: url('${s}') format('woff2');
2483
2484
  font-display: fallback;
2484
- font-weight: ${r};
2485
+ font-weight: ${c};
2485
2486
  }
2486
2487
  `.trim());
2487
2488
  }
@@ -2527,10 +2528,10 @@ const getContextStateInitialValue = ({
2527
2528
  data: t,
2528
2529
  locale: n
2529
2530
  }) => {
2530
- var a, r, l;
2531
+ var a, r, c;
2531
2532
  const i = {}, o = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
2532
- return (l = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || l.forEach((c) => {
2533
- c.name && c.defaultValue !== void 0 && (i[c.name] = c.defaultValue);
2533
+ return (c = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || c.forEach((l) => {
2534
+ l.name && l.defaultValue !== void 0 && (i[l.name] = l.defaultValue);
2534
2535
  }), {
2535
2536
  ...i,
2536
2537
  ...o,
@@ -2551,21 +2552,21 @@ const getContextStateInitialValue = ({
2551
2552
  meta: e == null ? void 0 : e.meta
2552
2553
  } : void 0;
2553
2554
  function ContentComponent(e) {
2554
- var c, s, d, g, x, S, f;
2555
+ var l, s, d, g, x, S, f;
2555
2556
  const [t, n] = useState(
2556
2557
  () => {
2557
- var p, C;
2558
+ var p, k;
2558
2559
  return getUpdateVariantVisibilityScript({
2559
2560
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2560
2561
  variationId: (p = e.content) == null ? void 0 : p.testVariationId,
2561
2562
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2562
- contentId: (C = e.content) == null ? void 0 : C.id
2563
+ contentId: (k = e.content) == null ? void 0 : k.id
2563
2564
  });
2564
2565
  }
2565
2566
  );
2566
2567
  function i(p) {
2567
- l((C) => ({
2568
- ...C,
2568
+ c((k) => ({
2569
+ ...k,
2569
2570
  rootState: p
2570
2571
  }));
2571
2572
  }
@@ -2580,16 +2581,16 @@ function ContentComponent(e) {
2580
2581
  ...components,
2581
2582
  ...e.customComponents || []
2582
2583
  ].reduce(
2583
- (p, { component: C, ...E }) => ({
2584
+ (p, { component: k, ...E }) => ({
2584
2585
  ...p,
2585
2586
  [E.name]: {
2586
- component: C,
2587
+ component: k,
2587
2588
  ...serializeComponentInfo(E)
2588
2589
  }
2589
2590
  }),
2590
2591
  {}
2591
2592
  )
2592
- ), [r, l] = useState(() => ({
2593
+ ), [r, c] = useState(() => ({
2593
2594
  content: getContentInitialValue({
2594
2595
  content: e.content,
2595
2596
  data: e.data
@@ -2614,7 +2615,7 @@ function ContentComponent(e) {
2614
2615
  ...components,
2615
2616
  ...e.customComponents || []
2616
2617
  ].reduce(
2617
- (p, { component: C, ...E }) => ({
2618
+ (p, { component: k, ...E }) => ({
2618
2619
  ...p,
2619
2620
  [E.name]: serializeComponentInfo(E)
2620
2621
  }),
@@ -2645,13 +2646,13 @@ function ContentComponent(e) {
2645
2646
  builderContextSignal: r,
2646
2647
  contentWrapper: e.contentWrapper,
2647
2648
  contentWrapperProps: e.contentWrapperProps,
2648
- setBuilderContextSignal: l,
2649
+ setBuilderContextSignal: c,
2649
2650
  children: [
2650
2651
  e.isSsrAbTest ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedScript, { scriptStr: t }) }) : null,
2651
2652
  /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
2652
2653
  ContentStyles,
2653
2654
  {
2654
- contentId: (c = r.content) == null ? void 0 : c.id,
2655
+ contentId: (l = r.content) == null ? void 0 : l.id,
2655
2656
  cssCode: (d = (s = r.content) == null ? void 0 : s.data) == null ? void 0 : d.cssCode,
2656
2657
  customFonts: (x = (g = r.content) == null ? void 0 : g.data) == null ? void 0 : x.customFonts
2657
2658
  }
@@ -2671,7 +2672,7 @@ function ContentComponent(e) {
2671
2672
  );
2672
2673
  }
2673
2674
  function ContentVariants(e) {
2674
- var r, l;
2675
+ var r, c;
2675
2676
  const [t, n] = useState(
2676
2677
  () => checkShouldRenderVariants({
2677
2678
  canTrack: getDefaultCanTrack(e.canTrack),
@@ -2679,23 +2680,23 @@ function ContentVariants(e) {
2679
2680
  })
2680
2681
  );
2681
2682
  function i() {
2682
- var c;
2683
+ var l;
2683
2684
  return getUpdateCookieAndStylesScript(
2684
2685
  getVariants(e.content).map((s) => ({
2685
2686
  id: s.testVariationId,
2686
2687
  testRatio: s.testRatio
2687
2688
  })),
2688
- ((c = e.content) == null ? void 0 : c.id) || ""
2689
+ ((l = e.content) == null ? void 0 : l.id) || ""
2689
2690
  );
2690
2691
  }
2691
2692
  function o() {
2692
- return getVariants(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
2693
+ return getVariants(e.content).map((l) => `.variant-${l.testVariationId} { display: none; } `).join("");
2693
2694
  }
2694
2695
  function a() {
2695
- var c;
2696
+ var l;
2696
2697
  return t ? {
2697
2698
  ...e.content,
2698
- testVariationId: (c = e.content) == null ? void 0 : c.id
2699
+ testVariationId: (l = e.content) == null ? void 0 : l.id
2699
2700
  } : handleABTestingSync({
2700
2701
  item: e.content,
2701
2702
  canTrack: getDefaultCanTrack(e.canTrack)
@@ -2713,10 +2714,10 @@ function ContentVariants(e) {
2713
2714
  }
2714
2715
  ),
2715
2716
  /* @__PURE__ */ jsx(InlinedScript, { scriptStr: i() }),
2716
- (l = getVariants(e.content)) == null ? void 0 : l.map((c) => /* @__PURE__ */ jsx(
2717
+ (c = getVariants(e.content)) == null ? void 0 : c.map((l) => /* @__PURE__ */ jsx(
2717
2718
  ContentComponent,
2718
2719
  {
2719
- content: c,
2720
+ content: l,
2720
2721
  showContent: !1,
2721
2722
  model: e.model,
2722
2723
  data: e.data,
@@ -2734,7 +2735,7 @@ function ContentVariants(e) {
2734
2735
  contentWrapper: e.contentWrapper,
2735
2736
  contentWrapperProps: e.contentWrapperProps
2736
2737
  },
2737
- c.testVariationId
2738
+ l.testVariationId
2738
2739
  ))
2739
2740
  ] }) : null,
2740
2741
  /* @__PURE__ */ jsx(
@@ -2781,26 +2782,26 @@ const fetchSymbolContent = async ({
2781
2782
  });
2782
2783
  };
2783
2784
  function Symbol$1(e) {
2784
- var a, r, l;
2785
+ var a, r, c;
2785
2786
  function t() {
2786
- var c, s;
2787
+ var l, s;
2787
2788
  return [
2788
2789
  e.attributes.className,
2789
2790
  "builder-symbol",
2790
- (c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
2791
+ (l = e.symbol) != null && l.inline ? "builder-inline-symbol" : void 0,
2791
2792
  (s = e.symbol) != null && s.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2792
2793
  ].filter(Boolean).join(" ");
2793
2794
  }
2794
2795
  const [n, i] = useState(() => {
2795
- var c;
2796
- return (c = e.symbol) == null ? void 0 : c.content;
2796
+ var l;
2797
+ return (l = e.symbol) == null ? void 0 : l.content;
2797
2798
  });
2798
2799
  function o() {
2799
2800
  n || fetchSymbolContent({
2800
2801
  symbol: e.symbol,
2801
2802
  builderContextValue: e.builderContext
2802
- }).then((c) => {
2803
- c && i(c);
2803
+ }).then((l) => {
2804
+ l && i(l);
2804
2805
  });
2805
2806
  }
2806
2807
  return useEffect(() => {
@@ -2819,7 +2820,7 @@ function Symbol$1(e) {
2819
2820
  ...e.builderContext.localState,
2820
2821
  ...(r = n == null ? void 0 : n.data) == null ? void 0 : r.state
2821
2822
  },
2822
- model: (l = e.symbol) == null ? void 0 : l.model,
2823
+ model: (c = e.symbol) == null ? void 0 : c.model,
2823
2824
  content: n
2824
2825
  }
2825
2826
  ) });