@builder.io/sdk-vue 0.2.3 → 0.3.2-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.
Files changed (81) hide show
  1. package/package.json +2 -5
  2. package/packages/_vue2/dist/block-styles.22c50e60.js +75 -0
  3. package/packages/_vue2/dist/block-styles.82ffdfab.cjs +1 -0
  4. package/packages/_vue2/dist/css.d1f35fa9.js +74 -0
  5. package/packages/_vue2/dist/css.d67364ee.cjs +6 -0
  6. package/packages/_vue2/dist/{index.6a9eec41.js → index.1955e2ac.js} +506 -470
  7. package/packages/_vue2/dist/index.2eccdb53.cjs +29 -0
  8. package/packages/_vue2/dist/{render-block.4c7d7ca1.js → render-block.11a66585.js} +92 -87
  9. package/packages/_vue2/dist/render-block.742f7d9b.cjs +3 -0
  10. package/packages/_vue2/dist/{render-component.90275cfa.cjs → render-component.8f5204ca.cjs} +1 -1
  11. package/packages/_vue2/dist/{render-component.84d45798.js → render-component.dc53dbd0.js} +3 -3
  12. package/packages/_vue2/dist/{render-inlined-styles.1999f52e.cjs → render-inlined-styles.1887b766.cjs} +1 -1
  13. package/packages/_vue2/dist/{render-inlined-styles.1fa49816.js → render-inlined-styles.955770d4.js} +1 -1
  14. package/packages/_vue2/dist/render-repeated-block.1cb6b42e.cjs +1 -0
  15. package/packages/_vue2/dist/{render-repeated-block.900e2543.js → render-repeated-block.7b83bd13.js} +13 -12
  16. package/packages/_vue2/dist/{render-styles.591ca7be.js → render-styles.37cf66d9.js} +2 -2
  17. package/packages/_vue2/dist/{render-styles.15b8cdf0.cjs → render-styles.fe76b092.cjs} +3 -3
  18. package/packages/_vue2/dist/sdk.cjs +1 -1
  19. package/packages/_vue2/dist/sdk.js +1 -1
  20. package/packages/_vue2/dist/src/components/render-block/render-block.helpers.d.ts +0 -1
  21. package/packages/_vue2/dist/src/components/render-content/render-content.types.d.ts +2 -0
  22. package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +1 -1
  23. package/packages/_vue2/dist/src/components/render-content/wrap-component-ref.d.ts +6 -0
  24. package/packages/_vue2/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
  25. package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -0
  26. package/packages/_vue2/dist/src/context/builder.context.d.ts +3 -2
  27. package/packages/_vue2/dist/src/context/types.d.ts +17 -2
  28. package/packages/_vue2/dist/src/functions/evaluate.d.ts +4 -3
  29. package/packages/_vue2/dist/src/functions/get-block-actions-handler.d.ts +1 -1
  30. package/packages/_vue2/dist/src/functions/get-block-actions.d.ts +1 -1
  31. package/packages/_vue2/dist/src/functions/get-content/types.d.ts +6 -0
  32. package/packages/_vue2/dist/src/functions/get-processed-block.d.ts +2 -2
  33. package/packages/_vue2/dist/src/scripts/init-editing.d.ts +1 -0
  34. package/packages/_vue2/dist/style.css +1 -1
  35. package/packages/_vue3/dist/block-styles.18a1a0e6.cjs +1 -0
  36. package/packages/_vue3/dist/{block-styles.f06f105b.js → block-styles.c0e7bfbe.js} +19 -17
  37. package/packages/_vue3/dist/css.7a6108f3.cjs +6 -0
  38. package/packages/_vue3/dist/css.ee7d0ab8.js +74 -0
  39. package/packages/_vue3/dist/{index.0aed90df.js → index.c3536d81.js} +395 -359
  40. package/packages/_vue3/dist/index.e7a22b43.cjs +29 -0
  41. package/packages/_vue3/dist/render-block.bcafe494.cjs +3 -0
  42. package/packages/_vue3/dist/render-block.d0ed34b4.js +285 -0
  43. package/packages/_vue3/dist/{render-component.b4a311b8.js → render-component.268e7bd8.js} +3 -3
  44. package/packages/_vue3/dist/{render-component.0a7c094b.cjs → render-component.77f33093.cjs} +1 -1
  45. package/packages/_vue3/dist/{render-inlined-styles.454bc38b.js → render-inlined-styles.5aa04bb8.js} +1 -1
  46. package/packages/_vue3/dist/{render-inlined-styles.a596482a.cjs → render-inlined-styles.86c0a89d.cjs} +1 -1
  47. package/packages/_vue3/dist/render-repeated-block.0d46ab69.cjs +1 -0
  48. package/packages/_vue3/dist/{render-repeated-block.12894c71.js → render-repeated-block.b1101852.js} +12 -11
  49. package/packages/_vue3/dist/{render-styles.b6bf070d.cjs → render-styles.5073866f.cjs} +2 -2
  50. package/packages/_vue3/dist/{render-styles.90b25836.js → render-styles.7f31b369.js} +2 -2
  51. package/packages/_vue3/dist/sdk.cjs +1 -1
  52. package/packages/_vue3/dist/sdk.js +1 -1
  53. package/packages/_vue3/dist/src/components/render-block/render-block.helpers.d.ts +0 -1
  54. package/packages/_vue3/dist/src/components/render-content/render-content.types.d.ts +2 -0
  55. package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +4 -1
  56. package/packages/_vue3/dist/src/components/render-content/wrap-component-ref.d.ts +6 -0
  57. package/packages/_vue3/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
  58. package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -0
  59. package/packages/_vue3/dist/src/context/builder.context.d.ts +3 -2
  60. package/packages/_vue3/dist/src/context/types.d.ts +17 -2
  61. package/packages/_vue3/dist/src/functions/evaluate.d.ts +4 -3
  62. package/packages/_vue3/dist/src/functions/get-block-actions-handler.d.ts +1 -1
  63. package/packages/_vue3/dist/src/functions/get-block-actions.d.ts +1 -1
  64. package/packages/_vue3/dist/src/functions/get-content/types.d.ts +6 -0
  65. package/packages/_vue3/dist/src/functions/get-processed-block.d.ts +2 -2
  66. package/packages/_vue3/dist/src/scripts/init-editing.d.ts +1 -0
  67. package/packages/_vue3/dist/style.css +1 -1
  68. package/packages/_vue2/dist/block-styles.5729b057.js +0 -73
  69. package/packages/_vue2/dist/block-styles.cb3c2dd0.cjs +0 -1
  70. package/packages/_vue2/dist/css.2efa95fa.cjs +0 -6
  71. package/packages/_vue2/dist/css.a54ddc90.js +0 -58
  72. package/packages/_vue2/dist/index.8547cce2.cjs +0 -29
  73. package/packages/_vue2/dist/render-block.753d2325.cjs +0 -3
  74. package/packages/_vue2/dist/render-repeated-block.f522a309.cjs +0 -1
  75. package/packages/_vue3/dist/block-styles.56f7b28a.cjs +0 -1
  76. package/packages/_vue3/dist/css.2ff361fc.js +0 -58
  77. package/packages/_vue3/dist/css.f83437ab.cjs +0 -6
  78. package/packages/_vue3/dist/index.d72bde22.cjs +0 -29
  79. package/packages/_vue3/dist/render-block.4e95bb8d.cjs +0 -3
  80. package/packages/_vue3/dist/render-block.905bcce5.js +0 -280
  81. package/packages/_vue3/dist/render-repeated-block.a95715ec.cjs +0 -1
@@ -1,5 +1,5 @@
1
- import { defineComponent as h, openBlock as d, createElementBlock as p, mergeProps as x, toHandlers as T, toDisplayString as H, defineAsyncComponent as S, resolveComponent as w, normalizeClass as V, normalizeStyle as R, createBlock as E, createCommentVNode as v, Fragment as A, renderList as U, createVNode as ee, renderSlot as j, createElementVNode as z } from "vue";
2
- const fe = h({
1
+ import { defineComponent as f, openBlock as d, createElementBlock as p, mergeProps as x, toHandlers as R, toDisplayString as H, defineAsyncComponent as w, resolveComponent as C, normalizeClass as P, normalizeStyle as E, createBlock as _, createCommentVNode as y, Fragment as j, renderList as W, createVNode as ee, renderSlot as V, createElementVNode as K, markRaw as fe } from "vue";
2
+ const ge = f({
3
3
  name: "builder-button",
4
4
  props: ["attributes", "text", "link", "openLinkInNewTab"],
5
5
  methods: {
@@ -29,26 +29,26 @@ const fe = h({
29
29
  }
30
30
  }
31
31
  });
32
- const f = (e, t) => {
32
+ const g = (e, t) => {
33
33
  const n = e.__vccOpts || e;
34
34
  for (const [o, s] of t)
35
35
  n[o] = s;
36
36
  return n;
37
- }, ge = ["href", "target"];
38
- function be(e, t, n, o, s, r) {
37
+ }, be = ["href", "target"];
38
+ function ye(e, t, n, o, s, r) {
39
39
  return e.link ? (d(), p("a", x({
40
40
  key: 0,
41
41
  role: "button",
42
42
  href: e.link,
43
43
  target: e.openLinkInNewTab ? "_blank" : void 0
44
- }, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), H(e.text), 17, ge)) : (d(), p("button", x({
44
+ }, e.filterAttrs(e.attributes, !1), R(e.filterAttrs(e.attributes, !0), !0)), H(e.text), 17, be)) : (d(), p("button", x({
45
45
  key: 1,
46
46
  class: e._classStringToObject(
47
47
  e.attributes.class + " button-1yj9n7yt24z"
48
48
  )
49
- }, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), H(e.text), 17));
49
+ }, e.filterAttrs(e.attributes, !1), R(e.filterAttrs(e.attributes, !0), !0)), H(e.text), 17));
50
50
  }
51
- const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d"]]), L = (e) => JSON.parse(JSON.stringify(e)), te = {
51
+ const ve = /* @__PURE__ */ g(ge, [["render", ye], ["__scopeId", "data-v-3b72112d"]]), N = (e) => JSON.parse(JSON.stringify(e)), te = {
52
52
  small: {
53
53
  min: 320,
54
54
  default: 321,
@@ -64,8 +64,8 @@ const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d
64
64
  default: 991,
65
65
  max: 1200
66
66
  }
67
- }, Vn = (e, t = te) => `@media (max-width: ${t[e].max}px)`, ve = ({ small: e, medium: t }) => {
68
- const n = L(te);
67
+ }, Fn = (e, t = te) => `@media (max-width: ${t[e].max}px)`, ke = ({ small: e, medium: t }) => {
68
+ const n = N(te);
69
69
  if (!e || !t)
70
70
  return n;
71
71
  const o = Math.floor(e / 2);
@@ -86,34 +86,35 @@ const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d
86
86
  min: r,
87
87
  default: r + 1
88
88
  }, n;
89
- }, _ = "vue3", ke = Symbol(), P = {
89
+ }, A = "vue3", Se = Symbol(), O = {
90
90
  Builder: {
91
91
  content: null,
92
92
  context: {},
93
- state: {},
94
- setState() {
93
+ localState: void 0,
94
+ rootSetState() {
95
95
  },
96
+ rootState: {},
96
97
  apiKey: null,
97
98
  apiVersion: void 0,
98
99
  registeredComponents: {},
99
100
  inheritedStyles: {}
100
101
  },
101
- key: ke
102
- }, Se = () => Promise.resolve().then(() => ne).then((e) => e.default).catch((e) => {
102
+ key: Se
103
+ }, we = () => Promise.resolve().then(() => ne).then((e) => e.default).catch((e) => {
103
104
  throw console.error(
104
105
  "Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
105
106
  e
106
107
  ), e;
107
- }), we = () => import("./render-inlined-styles.454bc38b.js").then((e) => e.default).catch((e) => {
108
+ }), Ce = () => import("./render-inlined-styles.5aa04bb8.js").then((e) => e.default).catch((e) => {
108
109
  throw console.error(
109
110
  "Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",
110
111
  e
111
112
  ), e;
112
- }), Ce = h({
113
+ }), Ie = f({
113
114
  name: "builder-columns",
114
115
  components: {
115
- RenderInlinedStyles: S(we),
116
- RenderBlocks: S(Se)
116
+ RenderInlinedStyles: w(Ce),
117
+ RenderBlocks: w(we)
117
118
  },
118
119
  props: [
119
120
  "space",
@@ -128,11 +129,11 @@ const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d
128
129
  cols: this.columns || [],
129
130
  stackAt: this.stackColumnsAt || "tablet",
130
131
  flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
131
- TARGET: _
132
+ TARGET: A
132
133
  };
133
134
  },
134
135
  inject: {
135
- builderContext: P.key
136
+ builderContext: O.key
136
137
  },
137
138
  computed: {
138
139
  columnsCssVars() {
@@ -194,32 +195,31 @@ const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d
194
195
  return this.stackAt === "never" ? t : e;
195
196
  },
196
197
  columnCssVars(e) {
197
- e === 0 || this.gutterSize;
198
- const t = this.getColumnCssWidth(e), n = `${this.gutterSize}px`, o = "100%", s = 0;
198
+ const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, s = "100%", r = 0;
199
199
  return {
200
- width: t,
201
- "margin-left": n,
200
+ width: n,
201
+ "margin-left": o,
202
202
  "--column-width-mobile": this.getMobileStyle({
203
- stackedStyle: o,
204
- desktopStyle: t
205
- }),
206
- "--column-margin-left-mobile": this.getMobileStyle({
207
203
  stackedStyle: s,
208
204
  desktopStyle: n
209
205
  }),
210
- "--column-width-tablet": this.getTabletStyle({
211
- stackedStyle: o,
212
- desktopStyle: t
206
+ "--column-margin-left-mobile": this.getMobileStyle({
207
+ stackedStyle: r,
208
+ desktopStyle: o
213
209
  }),
214
- "--column-margin-left-tablet": this.getTabletStyle({
210
+ "--column-width-tablet": this.getTabletStyle({
215
211
  stackedStyle: s,
216
212
  desktopStyle: n
213
+ }),
214
+ "--column-margin-left-tablet": this.getTabletStyle({
215
+ stackedStyle: r,
216
+ desktopStyle: o
217
217
  })
218
218
  };
219
219
  },
220
220
  getWidthForBreakpointSize(e) {
221
221
  var n, o;
222
- return ve(
222
+ return ke(
223
223
  ((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
224
224
  )[e].max;
225
225
  },
@@ -235,26 +235,26 @@ const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d
235
235
  }
236
236
  });
237
237
  function xe(e, t, n, o, s, r) {
238
- const i = w("render-inlined-styles"), l = w("render-blocks");
238
+ const i = C("render-inlined-styles"), l = C("render-blocks");
239
239
  return d(), p("div", {
240
- class: V(
240
+ class: P(
241
241
  e._classStringToObject(
242
242
  `builder-columns ${e.builderBlock.id}-breakpoints div-361b1o6wv2k`
243
243
  )
244
244
  ),
245
- style: R(e.columnsCssVars),
245
+ style: E(e.columnsCssVars),
246
246
  dataSet: {
247
247
  "builder-block-name": "builder-columns"
248
248
  }
249
249
  }, [
250
- e.TARGET !== "reactNative" ? (d(), E(i, {
250
+ e.TARGET !== "reactNative" ? (d(), _(i, {
251
251
  key: 0,
252
252
  styles: e.columnsStyles
253
- }, null, 8, ["styles"])) : v("", !0),
254
- (d(!0), p(A, null, U(e.columns, (a, c) => (d(), p("div", {
253
+ }, null, 8, ["styles"])) : y("", !0),
254
+ (d(!0), p(j, null, W(e.columns, (a, c) => (d(), p("div", {
255
255
  key: c,
256
256
  class: "builder-column div-361b1o6wv2k-2",
257
- style: R(e.columnCssVars(c)),
257
+ style: E(e.columnCssVars(c)),
258
258
  dataSet: {
259
259
  "builder-block-name": "builder-column"
260
260
  }
@@ -270,34 +270,34 @@ function xe(e, t, n, o, s, r) {
270
270
  ], 4))), 128))
271
271
  ], 6);
272
272
  }
273
- const Ie = /* @__PURE__ */ f(Ce, [["render", xe], ["__scopeId", "data-v-cb4e9d3e"]]), $e = h({
273
+ const $e = /* @__PURE__ */ g(Ie, [["render", xe], ["__scopeId", "data-v-fae985f2"]]), Te = f({
274
274
  name: "builder-fragment-component",
275
275
  props: []
276
276
  });
277
- function Te(e, t, n, o, s, r) {
277
+ function Re(e, t, n, o, s, r) {
278
278
  return d(), p("span", null, [
279
- j(e.$slots, "default")
279
+ V(e.$slots, "default")
280
280
  ]);
281
281
  }
282
- const Re = /* @__PURE__ */ f($e, [["render", Te]]);
283
- function K(e) {
282
+ const Ee = /* @__PURE__ */ g(Te, [["render", Re]]);
283
+ function z(e) {
284
284
  return e.replace(/http(s)?:/, "");
285
285
  }
286
- function Ee(e = "", t, n) {
286
+ function _e(e = "", t, n) {
287
287
  const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), s = e.indexOf("?") !== -1 ? "&" : "?";
288
288
  return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + s + t + "=" + encodeURIComponent(n);
289
289
  }
290
- function _e(e, t) {
290
+ function Ae(e, t) {
291
291
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
292
292
  return e;
293
293
  if (t === "master")
294
- return K(e);
294
+ return z(e);
295
295
  const n = e.match(
296
296
  /(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i
297
297
  );
298
298
  if (n) {
299
299
  const o = e.split(n[0]), s = n[3], r = t.match("x") ? t : `${t}x`;
300
- return K(`${o[0]}_${r}${s}`);
300
+ return z(`${o[0]}_${r}${s}`);
301
301
  }
302
302
  return null;
303
303
  }
@@ -308,11 +308,11 @@ function F(e) {
308
308
  if (e.match(/builder\.io/)) {
309
309
  let n = e;
310
310
  const o = Number(e.split("?width=")[1]);
311
- return isNaN(o) || (n = `${n} ${o}w`), t.filter((s) => s !== o).map((s) => `${Ee(e, "width", s)} ${s}w`).concat([n]).join(", ");
311
+ return isNaN(o) || (n = `${n} ${o}w`), t.filter((s) => s !== o).map((s) => `${_e(e, "width", s)} ${s}w`).concat([n]).join(", ");
312
312
  }
313
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [_e(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
313
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Ae(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
314
314
  }
315
- const Ae = h({
315
+ const je = f({
316
316
  name: "builder-image",
317
317
  props: [
318
318
  "image",
@@ -368,29 +368,29 @@ const Ae = h({
368
368
  }
369
369
  }
370
370
  });
371
- const je = ["srcset"], Ve = ["alt", "role", "src", "srcset", "sizes"], Pe = {
371
+ const Ve = ["srcset"], Pe = ["alt", "role", "src", "srcset", "sizes"], Oe = {
372
372
  key: 2,
373
373
  class: "div-7jvpanrlkn-2"
374
374
  };
375
375
  function Be(e, t, n, o, s, r) {
376
376
  var i, l, a, c;
377
- return d(), p(A, null, [
378
- z("picture", null, [
377
+ return d(), p(j, null, [
378
+ K("picture", null, [
379
379
  e.webpSrcSet ? (d(), p("source", {
380
380
  key: 0,
381
381
  type: "image/webp",
382
382
  srcset: e.webpSrcSet
383
- }, null, 8, je)) : v("", !0),
384
- z("img", {
383
+ }, null, 8, Ve)) : y("", !0),
384
+ K("img", {
385
385
  loading: "lazy",
386
386
  alt: e.altText,
387
387
  role: e.altText ? "presentation" : void 0,
388
- style: R({
388
+ style: E({
389
389
  objectPosition: e.backgroundPosition || "center",
390
390
  objectFit: e.backgroundSize || "cover",
391
391
  ...e.aspectRatioCss
392
392
  }),
393
- class: V(
393
+ class: P(
394
394
  e._classStringToObject(
395
395
  "builder-image" + (e.className ? " " + e.className : "") + " img-7jvpanrlkn"
396
396
  )
@@ -398,50 +398,50 @@ function Be(e, t, n, o, s, r) {
398
398
  src: e.image,
399
399
  srcset: e.srcSetToUse,
400
400
  sizes: e.sizes
401
- }, null, 14, Ve)
401
+ }, null, 14, Pe)
402
402
  ]),
403
403
  e.aspectRatio && !(((l = (i = e.builderBlock) == null ? void 0 : i.children) == null ? void 0 : l.length) && e.fitContent) ? (d(), p("div", {
404
404
  key: 0,
405
405
  class: "builder-image-sizer div-7jvpanrlkn",
406
- style: R({
406
+ style: E({
407
407
  paddingTop: e.aspectRatio * 100 + "%"
408
408
  })
409
- }, null, 4)) : v("", !0),
410
- ((c = (a = e.builderBlock) == null ? void 0 : a.children) == null ? void 0 : c.length) && e.fitContent ? j(e.$slots, "default", { key: 1 }, void 0, !0) : v("", !0),
411
- !e.fitContent && e.children ? (d(), p("div", Pe, [
412
- j(e.$slots, "default", {}, void 0, !0)
413
- ])) : v("", !0)
409
+ }, null, 4)) : y("", !0),
410
+ ((c = (a = e.builderBlock) == null ? void 0 : a.children) == null ? void 0 : c.length) && e.fitContent ? V(e.$slots, "default", { key: 1 }, void 0, !0) : y("", !0),
411
+ !e.fitContent && e.children ? (d(), p("div", Oe, [
412
+ V(e.$slots, "default", {}, void 0, !0)
413
+ ])) : y("", !0)
414
414
  ], 64);
415
415
  }
416
- const Fe = /* @__PURE__ */ f(Ae, [["render", Be], ["__scopeId", "data-v-034e3c7d"]]);
417
- function m() {
416
+ const Fe = /* @__PURE__ */ g(je, [["render", Be], ["__scopeId", "data-v-034e3c7d"]]);
417
+ function h() {
418
418
  return typeof window < "u" && typeof document < "u";
419
419
  }
420
- function Oe() {
421
- return m() && window.self !== window.top;
420
+ function Ue() {
421
+ return h() && window.self !== window.top;
422
422
  }
423
- function k() {
424
- return Oe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
423
+ function v() {
424
+ return Ue() && window.location.search.indexOf("builder.frameEditing=") !== -1;
425
425
  }
426
- const Ue = () => import("./block-styles.f06f105b.js").then((e) => e.default).catch((e) => {
426
+ const We = () => import("./block-styles.c0e7bfbe.js").then((e) => e.default).catch((e) => {
427
427
  throw console.error(
428
428
  "Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
429
429
  e
430
430
  ), e;
431
- }), We = () => import("./render-block.905bcce5.js").then((e) => e.default).catch((e) => {
431
+ }), Me = () => import("./render-block.d0ed34b4.js").then((e) => e.default).catch((e) => {
432
432
  throw console.error(
433
433
  "Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
434
434
  e
435
435
  ), e;
436
- }), Me = h({
436
+ }), Le = f({
437
437
  name: "render-blocks",
438
438
  components: {
439
- RenderBlock: S(We),
440
- BlockStyles: S(Ue)
439
+ RenderBlock: w(Me),
440
+ BlockStyles: w(We)
441
441
  },
442
442
  props: ["blocks", "parent", "path", "styleProp"],
443
443
  inject: {
444
- builderContext: P.key
444
+ builderContext: O.key
445
445
  },
446
446
  computed: {
447
447
  className() {
@@ -452,7 +452,7 @@ const Ue = () => import("./block-styles.f06f105b.js").then((e) => e.default).cat
452
452
  methods: {
453
453
  onClick() {
454
454
  var e, t;
455
- k() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
455
+ v() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
456
456
  {
457
457
  type: "builder.clickEmptyBlocks",
458
458
  data: {
@@ -465,7 +465,7 @@ const Ue = () => import("./block-styles.f06f105b.js").then((e) => e.default).cat
465
465
  },
466
466
  onMouseEnter() {
467
467
  var e, t;
468
- k() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
468
+ v() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
469
469
  {
470
470
  type: "builder.hoverEmptyBlocks",
471
471
  data: {
@@ -487,35 +487,35 @@ const Ue = () => import("./block-styles.f06f105b.js").then((e) => e.default).cat
487
487
  }
488
488
  }
489
489
  });
490
- const Le = ["builder-path", "builder-parent-id", "dataSet"];
491
- function Ne(e, t, n, o, s, r) {
492
- const i = w("render-block"), l = w("block-styles");
490
+ const Ne = ["builder-path", "builder-parent-id", "dataSet"];
491
+ function He(e, t, n, o, s, r) {
492
+ const i = C("render-block"), l = C("block-styles");
493
493
  return d(), p("div", {
494
- class: V(e._classStringToObject(e.className + " div-7fq9d0i380")),
494
+ class: P(e._classStringToObject(e.className + " div-7fq9d0i380")),
495
495
  "builder-path": e.path,
496
496
  "builder-parent-id": e.parent,
497
497
  dataSet: {
498
498
  class: e.className
499
499
  },
500
- style: R(e.styleProp),
500
+ style: E(e.styleProp),
501
501
  onClick: t[0] || (t[0] = (a) => e.onClick()),
502
502
  onMouseenter: t[1] || (t[1] = (a) => e.onMouseEnter())
503
503
  }, [
504
- e.blocks ? (d(!0), p(A, { key: 0 }, U(e.blocks, (a, c) => (d(), E(i, {
504
+ e.blocks ? (d(!0), p(j, { key: 0 }, W(e.blocks, (a, c) => (d(), _(i, {
505
505
  key: "render-block-" + a.id,
506
506
  block: a,
507
507
  context: e.builderContext
508
- }, null, 8, ["block", "context"]))), 128)) : v("", !0),
509
- e.blocks ? (d(!0), p(A, { key: 1 }, U(e.blocks, (a, c) => (d(), E(l, {
508
+ }, null, 8, ["block", "context"]))), 128)) : y("", !0),
509
+ e.blocks ? (d(!0), p(j, { key: 1 }, W(e.blocks, (a, c) => (d(), _(l, {
510
510
  key: "block-style-" + a.id,
511
511
  block: a,
512
512
  context: e.builderContext
513
- }, null, 8, ["block", "context"]))), 128)) : v("", !0)
514
- ], 46, Le);
513
+ }, null, 8, ["block", "context"]))), 128)) : y("", !0)
514
+ ], 46, Ne);
515
515
  }
516
- const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b"]]), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
516
+ const Ke = /* @__PURE__ */ g(Le, [["render", He], ["__scopeId", "data-v-ff3cb99b"]]), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
517
517
  __proto__: null,
518
- default: He
518
+ default: Ke
519
519
  }, Symbol.toStringTag, { value: "Module" })), ze = {
520
520
  name: "Core:Button",
521
521
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
@@ -555,7 +555,7 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
555
555
  }, B = (e) => {
556
556
  const t = e.toString().trim();
557
557
  return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
558
- }, Ke = {
558
+ }, De = {
559
559
  name: "Columns",
560
560
  inputs: [
561
561
  {
@@ -779,13 +779,13 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
779
779
  advanced: !0
780
780
  }
781
781
  ]
782
- }, De = {
782
+ }, qe = {
783
783
  name: "Fragment",
784
784
  static: !0,
785
785
  hidden: !0,
786
786
  canHaveChildren: !0,
787
787
  noWrap: !0
788
- }, qe = {
788
+ }, Ge = {
789
789
  name: "Image",
790
790
  static: !0,
791
791
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
@@ -810,13 +810,13 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
810
810
  function n(i, l = 6e4) {
811
811
  return new Promise((a, c) => {
812
812
  const u = document.createElement("img");
813
- let b = !1;
813
+ let m = !1;
814
814
  u.onload = () => {
815
- b = !0, a(u);
816
- }, u.addEventListener("error", (g) => {
817
- console.warn("Image load failed", g.error), c(g.error);
815
+ m = !0, a(u);
816
+ }, u.addEventListener("error", (b) => {
817
+ console.warn("Image load failed", b.error), c(b.error);
818
818
  }), u.src = i, setTimeout(() => {
819
- b || c(new Error("Image load timed out"));
819
+ m || c(new Error("Image load timed out"));
820
820
  }, l);
821
821
  });
822
822
  }
@@ -912,7 +912,7 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
912
912
  defaultValue: 0.7041
913
913
  }
914
914
  ]
915
- }, Ge = {
915
+ }, Je = {
916
916
  name: "Core:Section",
917
917
  static: !0,
918
918
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -956,7 +956,7 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
956
956
  }
957
957
  }
958
958
  ]
959
- }, Je = h({
959
+ }, Xe = f({
960
960
  name: "builder-section-component",
961
961
  props: ["maxWidth", "attributes"],
962
962
  methods: {
@@ -977,7 +977,7 @@ const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b
977
977
  }
978
978
  }
979
979
  });
980
- function Xe(e, t, n, o, s, r) {
980
+ function Ye(e, t, n, o, s, r) {
981
981
  return d(), p("section", x({
982
982
  style: {
983
983
  width: "100%",
@@ -991,11 +991,11 @@ function Xe(e, t, n, o, s, r) {
991
991
  marginLeft: "auto",
992
992
  marginRight: "auto"
993
993
  }
994
- }, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), [
995
- j(e.$slots, "default")
994
+ }, e.filterAttrs(e.attributes, !1), R(e.filterAttrs(e.attributes, !0), !0)), [
995
+ V(e.$slots, "default")
996
996
  ], 16);
997
997
  }
998
- const Ye = /* @__PURE__ */ f(Je, [["render", Xe]]), Qe = {
998
+ const Qe = /* @__PURE__ */ g(Xe, [["render", Ye]]), Ze = {
999
999
  name: "Symbol",
1000
1000
  noWrap: !0,
1001
1001
  static: !0,
@@ -1033,16 +1033,16 @@ const Ye = /* @__PURE__ */ f(Je, [["render", Xe]]), Qe = {
1033
1033
  type: "boolean"
1034
1034
  }
1035
1035
  ]
1036
- }, O = "[Builder.io]: ", C = {
1037
- log: (...e) => console.log(O, ...e),
1038
- error: (...e) => console.error(O, ...e),
1039
- warn: (...e) => console.warn(O, ...e)
1036
+ }, U = "[Builder.io]: ", I = {
1037
+ log: (...e) => console.log(U, ...e),
1038
+ error: (...e) => console.error(U, ...e),
1039
+ warn: (...e) => console.warn(U, ...e)
1040
1040
  };
1041
- function Ze() {
1041
+ function et() {
1042
1042
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
1043
1043
  }
1044
- function et() {
1045
- const e = Ze().fetch;
1044
+ function tt() {
1045
+ const e = et().fetch;
1046
1046
  if (typeof e > "u")
1047
1047
  throw console.warn(
1048
1048
  `Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
@@ -1050,7 +1050,7 @@ function et() {
1050
1050
  ), new Error("Builder SDK could not find a global `fetch` function");
1051
1051
  return e;
1052
1052
  }
1053
- const oe = et(), I = (e) => e != null, tt = (e) => {
1053
+ const oe = tt(), $ = (e) => e != null, nt = (e) => {
1054
1054
  if (e === "localhost" || e === "127.0.0.1")
1055
1055
  return e;
1056
1056
  const t = e.split(".");
@@ -1066,22 +1066,22 @@ const oe = et(), I = (e) => e != null, tt = (e) => {
1066
1066
  console.debug("[COOKIE] GET error: ", o);
1067
1067
  return;
1068
1068
  }
1069
- }, nt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(I).join("; "), ot = [
1069
+ }, ot = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter($).join("; "), st = [
1070
1070
  ["secure", ""],
1071
1071
  ["SameSite", "None"]
1072
- ], st = ({
1072
+ ], rt = ({
1073
1073
  name: e,
1074
1074
  value: t,
1075
1075
  expires: n
1076
1076
  }) => {
1077
- const s = (m() ? location.protocol === "https:" : !0) ? ot : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [
1077
+ const s = (h() ? location.protocol === "https:" : !0) ? st : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [
1078
1078
  [e, t],
1079
1079
  ...r,
1080
1080
  ["path", "/"],
1081
- ["domain", tt(window.location.hostname)],
1081
+ ["domain", nt(window.location.hostname)],
1082
1082
  ...s
1083
1083
  ];
1084
- return nt(i);
1084
+ return ot(i);
1085
1085
  }, re = async ({
1086
1086
  name: e,
1087
1087
  value: t,
@@ -1091,19 +1091,19 @@ const oe = et(), I = (e) => e != null, tt = (e) => {
1091
1091
  try {
1092
1092
  if (!o)
1093
1093
  return;
1094
- const s = st({ name: e, value: t, expires: n });
1094
+ const s = rt({ name: e, value: t, expires: n });
1095
1095
  document.cookie = s;
1096
1096
  } catch (s) {
1097
1097
  console.warn("[COOKIE] SET error: ", s);
1098
1098
  }
1099
- }, rt = "builderio.variations", ie = (e) => `${rt}.${e}`, it = ({
1099
+ }, it = "builderio.variations", ie = (e) => `${it}.${e}`, at = ({
1100
1100
  contentId: e,
1101
1101
  canTrack: t
1102
- }) => se({ name: ie(e), canTrack: t }), at = ({
1102
+ }) => se({ name: ie(e), canTrack: t }), lt = ({
1103
1103
  contentId: e,
1104
1104
  canTrack: t,
1105
1105
  value: n
1106
- }) => re({ name: ie(e), value: n, canTrack: t }), lt = (e) => I(e.id) && I(e.variations) && Object.keys(e.variations).length > 0, ct = ({
1106
+ }) => re({ name: ie(e), value: n, canTrack: t }), ct = (e) => $(e.id) && $(e.variations) && Object.keys(e.variations).length > 0, dt = ({
1107
1107
  id: e,
1108
1108
  variations: t
1109
1109
  }) => {
@@ -1129,22 +1129,22 @@ const oe = et(), I = (e) => e != null, tt = (e) => {
1129
1129
  testVariationId: n.id,
1130
1130
  testVariationName: n.name || (n.id === e.id ? "Default" : "")
1131
1131
  };
1132
- }, dt = async ({
1132
+ }, ut = async ({
1133
1133
  item: e,
1134
1134
  canTrack: t
1135
1135
  }) => {
1136
- const n = await it({
1136
+ const n = await at({
1137
1137
  canTrack: t,
1138
1138
  contentId: e.id
1139
1139
  }), o = n ? D({ item: e, testGroupId: n }) : void 0;
1140
1140
  if (o)
1141
1141
  return o;
1142
1142
  {
1143
- const s = ct({
1143
+ const s = dt({
1144
1144
  variations: e.variations,
1145
1145
  id: e.id
1146
1146
  });
1147
- return at({
1147
+ return lt({
1148
1148
  contentId: e.id,
1149
1149
  value: s,
1150
1150
  canTrack: t
@@ -1152,46 +1152,46 @@ const oe = et(), I = (e) => e != null, tt = (e) => {
1152
1152
  console.error("could not store A/B test variation: ", r);
1153
1153
  }), D({ item: e, testGroupId: s });
1154
1154
  }
1155
- }, ut = async ({
1155
+ }, pt = async ({
1156
1156
  item: e,
1157
1157
  canTrack: t
1158
1158
  }) => {
1159
- if (!lt(e))
1159
+ if (!ct(e))
1160
1160
  return;
1161
- const n = await dt({ item: e, canTrack: t });
1161
+ const n = await ut({ item: e, canTrack: t });
1162
1162
  Object.assign(e, n);
1163
1163
  };
1164
- function W(e, t = null, n = ".") {
1164
+ function M(e, t = null, n = ".") {
1165
1165
  return Object.keys(e).reduce((o, s) => {
1166
1166
  const r = e[s], i = [t, s].filter(Boolean).join(n);
1167
1167
  return [
1168
1168
  typeof r == "object",
1169
1169
  r !== null,
1170
1170
  !(Array.isArray(r) && r.length === 0)
1171
- ].every(Boolean) ? { ...o, ...W(r, i, n) } : { ...o, [i]: r };
1171
+ ].every(Boolean) ? { ...o, ...M(r, i, n) } : { ...o, [i]: r };
1172
1172
  }, {});
1173
1173
  }
1174
- const q = "builder.", pt = "options.", mt = (e) => {
1174
+ const q = "builder.", mt = "options.", ht = (e) => {
1175
1175
  const t = {};
1176
1176
  return e.forEach((n, o) => {
1177
1177
  t[o] = n;
1178
1178
  }), t;
1179
- }, ht = (e) => {
1179
+ }, ft = (e) => {
1180
1180
  if (!e)
1181
1181
  return {};
1182
1182
  const t = ae(e), n = {};
1183
1183
  return Object.keys(t).forEach((o) => {
1184
1184
  if (o.startsWith(q)) {
1185
- const s = o.replace(q, "").replace(pt, "");
1185
+ const s = o.replace(q, "").replace(mt, "");
1186
1186
  n[s] = t[o];
1187
1187
  }
1188
1188
  }), n;
1189
- }, ft = () => {
1190
- if (!m())
1189
+ }, gt = () => {
1190
+ if (!h())
1191
1191
  return {};
1192
1192
  const e = new URLSearchParams(window.location.search);
1193
- return ht(e);
1194
- }, ae = (e) => e instanceof URLSearchParams ? mt(e) : e, gt = "v3", bt = (e) => {
1193
+ return ft(e);
1194
+ }, ae = (e) => e instanceof URLSearchParams ? ht(e) : e, bt = "v3", yt = (e) => {
1195
1195
  const {
1196
1196
  limit: t = 30,
1197
1197
  userAttributes: n,
@@ -1200,60 +1200,61 @@ const q = "builder.", pt = "options.", mt = (e) => {
1200
1200
  model: r,
1201
1201
  apiKey: i,
1202
1202
  includeRefs: l = !0,
1203
- locale: a,
1204
- apiVersion: c = gt
1203
+ enrich: a,
1204
+ locale: c,
1205
+ apiVersion: u = bt
1205
1206
  } = e;
1206
1207
  if (!i)
1207
1208
  throw new Error("Missing API key");
1208
- if (!["v2", "v3"].includes(c))
1209
+ if (!["v2", "v3"].includes(u))
1209
1210
  throw new Error(
1210
- `Invalid apiVersion: expected 'v2' or 'v3', received '${c}'`
1211
+ `Invalid apiVersion: expected 'v2' or 'v3', received '${u}'`
1211
1212
  );
1212
- const u = new URL(
1213
- `https://cdn.builder.io/api/${c}/content/${r}?apiKey=${i}&limit=${t}&noTraverse=${s}&includeRefs=${l}${a ? `&locale=${a}` : ""}`
1213
+ const m = new URL(
1214
+ `https://cdn.builder.io/api/${u}/content/${r}?apiKey=${i}&limit=${t}&noTraverse=${s}&includeRefs=${l}${c ? `&locale=${c}` : ""}${a ? `&enrich=${a}` : ""}`
1214
1215
  ), b = {
1215
- ...ft(),
1216
+ ...gt(),
1216
1217
  ...ae(e.options || {})
1217
- }, g = W(b);
1218
- for (const y in g)
1219
- u.searchParams.set(y, String(g[y]));
1220
- if (n && u.searchParams.set("userAttributes", JSON.stringify(n)), o) {
1221
- const y = W({ query: o });
1222
- for (const $ in y)
1223
- u.searchParams.set($, JSON.stringify(y[$]));
1218
+ }, k = M(b);
1219
+ for (const S in k)
1220
+ m.searchParams.set(S, String(k[S]));
1221
+ if (n && m.searchParams.set("userAttributes", JSON.stringify(n)), o) {
1222
+ const S = M({ query: o });
1223
+ for (const T in S)
1224
+ m.searchParams.set(T, JSON.stringify(S[T]));
1224
1225
  }
1225
- return u;
1226
+ return m;
1226
1227
  };
1227
1228
  async function le(e) {
1228
- const t = await yt({ ...e, limit: 1 });
1229
+ const t = await vt({ ...e, limit: 1 });
1229
1230
  return t && "results" in t && (t == null ? void 0 : t.results[0]) || null;
1230
1231
  }
1231
- async function yt(e) {
1232
+ async function vt(e) {
1232
1233
  try {
1233
- const t = bt(e), o = await (await oe(t.href)).json();
1234
+ const t = yt(e), o = await (await oe(t.href)).json();
1234
1235
  if ("status" in o && !("results" in o))
1235
- return C.error("Error fetching data. ", { url: t, content: o, options: e }), o;
1236
+ return I.error("Error fetching data. ", { url: t, content: o, options: e }), o;
1236
1237
  const s = e.canTrack !== !1;
1237
1238
  try {
1238
1239
  if (s && Array.isArray(o.results))
1239
1240
  for (const r of o.results)
1240
- await ut({ item: r, canTrack: s });
1241
+ await pt({ item: r, canTrack: s });
1241
1242
  } catch (r) {
1242
- C.error("Could not setup A/B testing. ", r);
1243
+ I.error("Could not setup A/B testing. ", r);
1243
1244
  }
1244
1245
  return o;
1245
1246
  } catch (t) {
1246
- return C.error("Error fetching data. ", t), null;
1247
+ return I.error("Error fetching data. ", t), null;
1247
1248
  }
1248
1249
  }
1249
- const vt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((e) => {
1250
+ const kt = () => Promise.resolve().then(() => On).then((e) => e.default).catch((e) => {
1250
1251
  throw console.error(
1251
1252
  "Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
1252
1253
  e
1253
1254
  ), e;
1254
- }), kt = h({
1255
+ }), St = f({
1255
1256
  name: "builder-symbol",
1256
- components: { RenderContent: S(vt) },
1257
+ components: { RenderContent: w(kt) },
1257
1258
  props: ["attributes", "symbol", "dynamic"],
1258
1259
  data() {
1259
1260
  var e, t, n;
@@ -1268,7 +1269,7 @@ const vt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((
1268
1269
  };
1269
1270
  },
1270
1271
  inject: {
1271
- builderContext: P.key
1272
+ builderContext: O.key
1272
1273
  },
1273
1274
  mounted() {
1274
1275
  this.fetchContent();
@@ -1301,7 +1302,7 @@ const vt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((
1301
1302
  }).then((n) => {
1302
1303
  n && (this.contentToUse = n);
1303
1304
  }).catch((n) => {
1304
- C.error("Could not fetch symbol content: ", n);
1305
+ I.error("Could not fetch symbol content: ", n);
1305
1306
  });
1306
1307
  },
1307
1308
  filterAttrs: function(t = {}, n) {
@@ -1329,16 +1330,16 @@ const vt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((
1329
1330
  return t;
1330
1331
  }
1331
1332
  }
1332
- }), St = ["dataSet"];
1333
- function wt(e, t, n, o, s, r) {
1333
+ }), wt = ["dataSet"];
1334
+ function Ct(e, t, n, o, s, r) {
1334
1335
  var l, a, c, u;
1335
- const i = w("render-content");
1336
+ const i = C("render-content");
1336
1337
  return d(), p("div", x({
1337
1338
  dataSet: {
1338
1339
  class: e.className
1339
1340
  },
1340
1341
  class: e._classStringToObject(e.className)
1341
- }, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), [
1342
+ }, e.filterAttrs(e.attributes, !1), R(e.filterAttrs(e.attributes, !0), !0)), [
1342
1343
  ee(i, {
1343
1344
  apiVersion: e.builderContext.apiVersion,
1344
1345
  apiKey: e.builderContext.apiKey,
@@ -1346,15 +1347,15 @@ function wt(e, t, n, o, s, r) {
1346
1347
  customComponents: Object.values(e.builderContext.registeredComponents),
1347
1348
  data: {
1348
1349
  ...(l = e.symbol) == null ? void 0 : l.data,
1349
- ...e.builderContext.state,
1350
+ ...e.builderContext.localState,
1350
1351
  ...(c = (a = e.contentToUse) == null ? void 0 : a.data) == null ? void 0 : c.state
1351
1352
  },
1352
1353
  model: (u = e.symbol) == null ? void 0 : u.model,
1353
1354
  content: e.contentToUse
1354
1355
  }, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content"])
1355
- ], 16, St);
1356
+ ], 16, wt);
1356
1357
  }
1357
- const Ct = /* @__PURE__ */ f(kt, [["render", wt]]), xt = {
1358
+ const It = /* @__PURE__ */ g(St, [["render", Ct]]), xt = {
1358
1359
  name: "Text",
1359
1360
  static: !0,
1360
1361
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
@@ -1373,20 +1374,20 @@ const Ct = /* @__PURE__ */ f(kt, [["render", wt]]), xt = {
1373
1374
  height: "auto",
1374
1375
  textAlign: "center"
1375
1376
  }
1376
- }, It = h({
1377
+ }, $t = f({
1377
1378
  name: "builder-text",
1378
1379
  props: ["text"]
1379
- }), $t = ["innerHTML"];
1380
- function Tt(e, t, n, o, s, r) {
1380
+ }), Tt = ["innerHTML"];
1381
+ function Rt(e, t, n, o, s, r) {
1381
1382
  return d(), p("span", {
1382
1383
  class: "builder-text",
1383
1384
  innerHTML: e.text,
1384
1385
  style: {
1385
1386
  outline: "none"
1386
1387
  }
1387
- }, null, 8, $t);
1388
+ }, null, 8, Tt);
1388
1389
  }
1389
- const Rt = /* @__PURE__ */ f(It, [["render", Tt]]), Et = {
1390
+ const Et = /* @__PURE__ */ g($t, [["render", Rt]]), _t = {
1390
1391
  name: "Video",
1391
1392
  canHaveChildren: !0,
1392
1393
  defaultStyles: {
@@ -1487,7 +1488,7 @@ const Rt = /* @__PURE__ */ f(It, [["render", Tt]]), Et = {
1487
1488
  advanced: !0
1488
1489
  }
1489
1490
  ]
1490
- }, _t = h({
1491
+ }, At = f({
1491
1492
  name: "builder-video",
1492
1493
  props: [
1493
1494
  "autoPlay",
@@ -1528,8 +1529,8 @@ const Rt = /* @__PURE__ */ f(It, [["render", Tt]]), Et = {
1528
1529
  };
1529
1530
  }
1530
1531
  }
1531
- }), At = ["src", "poster"];
1532
- function jt(e, t, n, o, s, r) {
1532
+ }), jt = ["src", "poster"];
1533
+ function Vt(e, t, n, o, s, r) {
1533
1534
  var i;
1534
1535
  return d(), p("video", x({
1535
1536
  style: {
@@ -1542,9 +1543,9 @@ function jt(e, t, n, o, s, r) {
1542
1543
  },
1543
1544
  src: e.video || "no-src",
1544
1545
  poster: e.posterImage
1545
- }, e.spreadProps), null, 16, At);
1546
+ }, e.spreadProps), null, 16, jt);
1546
1547
  }
1547
- const Vt = /* @__PURE__ */ f(_t, [["render", jt]]), Pt = {
1548
+ const Pt = /* @__PURE__ */ g(At, [["render", Vt]]), Ot = {
1548
1549
  name: "Embed",
1549
1550
  static: !0,
1550
1551
  inputs: [
@@ -1583,7 +1584,7 @@ const Vt = /* @__PURE__ */ f(_t, [["render", jt]]), Pt = {
1583
1584
  "text/javascript",
1584
1585
  "application/javascript",
1585
1586
  "application/ecmascript"
1586
- ], Ft = (e) => Bt.includes(e.type), Ot = h({
1587
+ ], Ft = (e) => Bt.includes(e.type), Ut = f({
1587
1588
  name: "builder-embed",
1588
1589
  props: ["content"],
1589
1590
  data() {
@@ -1625,15 +1626,15 @@ const Vt = /* @__PURE__ */ f(_t, [["render", jt]]), Pt = {
1625
1626
  }
1626
1627
  }
1627
1628
  }
1628
- }), Ut = ["innerHTML"];
1629
- function Wt(e, t, n, o, s, r) {
1629
+ }), Wt = ["innerHTML"];
1630
+ function Mt(e, t, n, o, s, r) {
1630
1631
  return d(), p("div", {
1631
1632
  class: "builder-embed",
1632
1633
  ref: "elem",
1633
1634
  innerHTML: e.content
1634
- }, null, 8, Ut);
1635
+ }, null, 8, Wt);
1635
1636
  }
1636
- const Mt = /* @__PURE__ */ f(Ot, [["render", Wt]]), Lt = h({
1637
+ const Lt = /* @__PURE__ */ g(Ut, [["render", Mt]]), Nt = f({
1637
1638
  name: "builder-img-component",
1638
1639
  props: [
1639
1640
  "backgroundSize",
@@ -1644,7 +1645,7 @@ const Mt = /* @__PURE__ */ f(Ot, [["render", Wt]]), Lt = h({
1644
1645
  "attributes"
1645
1646
  ],
1646
1647
  data() {
1647
- return { isEditing: k };
1648
+ return { isEditing: v };
1648
1649
  },
1649
1650
  methods: {
1650
1651
  filterAttrs: function(t = {}, n) {
@@ -1663,8 +1664,8 @@ const Mt = /* @__PURE__ */ f(Ot, [["render", Wt]]), Lt = h({
1663
1664
  );
1664
1665
  }
1665
1666
  }
1666
- }), Nt = ["alt", "src"];
1667
- function Ht(e, t, n, o, s, r) {
1667
+ }), Ht = ["alt", "src"];
1668
+ function Kt(e, t, n, o, s, r) {
1668
1669
  return d(), p("img", x({
1669
1670
  style: {
1670
1671
  objectFit: e.backgroundSize || "cover",
@@ -1673,9 +1674,9 @@ function Ht(e, t, n, o, s, r) {
1673
1674
  key: e.isEditing() && e.imgSrc || "default-key",
1674
1675
  alt: e.altText,
1675
1676
  src: e.imgSrc || e.image
1676
- }, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), null, 16, Nt);
1677
+ }, e.filterAttrs(e.attributes, !1), R(e.filterAttrs(e.attributes, !0), !0)), null, 16, Ht);
1677
1678
  }
1678
- const zt = /* @__PURE__ */ f(Lt, [["render", Ht]]), Kt = {
1679
+ const zt = /* @__PURE__ */ g(Nt, [["render", Kt]]), Dt = {
1679
1680
  name: "Raw:Img",
1680
1681
  hideFromInsertMenu: !0,
1681
1682
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
@@ -1690,7 +1691,7 @@ const zt = /* @__PURE__ */ f(Lt, [["render", Ht]]), Kt = {
1690
1691
  ],
1691
1692
  noWrap: !0,
1692
1693
  static: !0
1693
- }, Dt = h({
1694
+ }, qt = f({
1694
1695
  name: "builder-custom-code",
1695
1696
  props: ["replaceNodes", "code"],
1696
1697
  data() {
@@ -1737,19 +1738,19 @@ const zt = /* @__PURE__ */ f(Lt, [["render", Ht]]), Kt = {
1737
1738
  return t;
1738
1739
  }
1739
1740
  }
1740
- }), qt = ["innerHTML"];
1741
- function Gt(e, t, n, o, s, r) {
1741
+ }), Gt = ["innerHTML"];
1742
+ function Jt(e, t, n, o, s, r) {
1742
1743
  return d(), p("div", {
1743
1744
  ref: "elem",
1744
- class: V(
1745
+ class: P(
1745
1746
  e._classStringToObject(
1746
1747
  "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
1747
1748
  )
1748
1749
  ),
1749
1750
  innerHTML: e.code
1750
- }, null, 10, qt);
1751
+ }, null, 10, Gt);
1751
1752
  }
1752
- const Jt = /* @__PURE__ */ f(Dt, [["render", Gt]]), Xt = {
1753
+ const Xt = /* @__PURE__ */ g(qt, [["render", Jt]]), Yt = {
1753
1754
  name: "Custom Code",
1754
1755
  static: !0,
1755
1756
  requiredPermissions: ["editCode"],
@@ -1775,35 +1776,37 @@ const Jt = /* @__PURE__ */ f(Dt, [["render", Gt]]), Xt = {
1775
1776
  advanced: !0
1776
1777
  }
1777
1778
  ]
1778
- }, Yt = () => [
1779
- { component: ye, ...ze },
1780
- { component: Ie, ...Ke },
1781
- { component: Jt, ...Xt },
1782
- { component: Mt, ...Pt },
1783
- { component: Re, ...De },
1784
- { component: Fe, ...qe },
1785
- { component: zt, ...Kt },
1786
- { component: Ye, ...Ge },
1787
- { component: Ct, ...Qe },
1788
- { component: Rt, ...xt },
1789
- { component: Vt, ...Et }
1779
+ }, Qt = () => [
1780
+ { component: ve, ...ze },
1781
+ { component: $e, ...De },
1782
+ { component: Xt, ...Yt },
1783
+ { component: Lt, ...Ot },
1784
+ { component: Ee, ...qe },
1785
+ { component: Fe, ...Ge },
1786
+ { component: zt, ...Dt },
1787
+ { component: Qe, ...Je },
1788
+ { component: It, ...Ze },
1789
+ { component: Et, ...xt },
1790
+ { component: Pt, ..._t }
1790
1791
  ];
1791
1792
  function G({
1792
1793
  code: e,
1793
1794
  context: t,
1794
- state: n,
1795
- event: o,
1796
- isExpression: s = !0
1795
+ localState: n,
1796
+ rootState: o,
1797
+ rootSetState: s,
1798
+ event: r,
1799
+ isExpression: i = !0
1797
1800
  }) {
1798
1801
  if (e === "") {
1799
1802
  console.warn("Skipping evaluation of empty code block.");
1800
1803
  return;
1801
1804
  }
1802
- const r = {
1803
- isEditing: k(),
1804
- isBrowser: m(),
1805
- isServer: !m()
1806
- }, l = s && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
1805
+ const l = {
1806
+ isEditing: v(),
1807
+ isBrowser: h(),
1808
+ isServer: !h()
1809
+ }, c = i && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
1807
1810
  try {
1808
1811
  return new Function(
1809
1812
  "builder",
@@ -1811,60 +1814,80 @@ function G({
1811
1814
  "state",
1812
1815
  "context",
1813
1816
  "event",
1814
- l
1815
- )(r, r, n, t, o);
1816
- } catch (a) {
1817
+ c
1818
+ )(
1819
+ l,
1820
+ l,
1821
+ Zt(o, n, s),
1822
+ t,
1823
+ r
1824
+ );
1825
+ } catch (u) {
1817
1826
  console.warn(
1818
1827
  `Builder custom code error:
1819
1828
  While Evaluating:
1820
1829
  `,
1821
- l,
1830
+ c,
1822
1831
  `
1823
1832
  `,
1824
- a
1833
+ u
1825
1834
  );
1826
1835
  }
1827
1836
  }
1828
- function Qt() {
1829
- return !m() || k() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
1837
+ function Zt(e, t, n) {
1838
+ if (e === t)
1839
+ throw new Error("rootState === localState");
1840
+ return new Proxy(e, {
1841
+ get: (o, s) => t && s in t ? t[s] : e[s],
1842
+ set: (o, s, r) => {
1843
+ if (t && s in t)
1844
+ throw new Error(
1845
+ "Writing to local state is not allowed as it is read-only."
1846
+ );
1847
+ return e[s] = r, n == null || n(e), !0;
1848
+ }
1849
+ });
1850
+ }
1851
+ function en() {
1852
+ return !h() || v() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
1830
1853
  }
1831
1854
  const ce = [];
1832
- function Pn(e, t) {
1855
+ function Un(e, t) {
1833
1856
  return ce.push({ component: e, ...t }), console.warn(
1834
1857
  "registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
1835
1858
  ), e;
1836
1859
  }
1837
- const Zt = ({
1860
+ const tn = ({
1838
1861
  component: e,
1839
1862
  ...t
1840
1863
  }) => ({
1841
1864
  type: "builder.registerComponent",
1842
- data: tn(t)
1843
- }), en = (e) => typeof e == "function" ? B(e) : L(e), tn = ({
1865
+ data: on(t)
1866
+ }), nn = (e) => typeof e == "function" ? B(e) : N(e), on = ({
1844
1867
  inputs: e,
1845
1868
  ...t
1846
1869
  }) => ({
1847
- ...L(t),
1870
+ ...N(t),
1848
1871
  inputs: e == null ? void 0 : e.map(
1849
1872
  (n) => Object.entries(n).reduce(
1850
1873
  (o, [s, r]) => ({
1851
1874
  ...o,
1852
- [s]: en(r)
1875
+ [s]: nn(r)
1853
1876
  }),
1854
1877
  {}
1855
1878
  )
1856
1879
  )
1857
1880
  });
1858
- function nn() {
1881
+ function sn() {
1859
1882
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1860
1883
  const t = Math.random() * 16 | 0;
1861
1884
  return (e == "x" ? t : t & 3 | 8).toString(16);
1862
1885
  });
1863
1886
  }
1864
1887
  function de() {
1865
- return nn().replace(/-/g, "");
1888
+ return sn().replace(/-/g, "");
1866
1889
  }
1867
- const ue = "builderSessionId", on = async ({
1890
+ const ue = "builderSessionId", rn = async ({
1868
1891
  canTrack: e
1869
1892
  }) => {
1870
1893
  if (!e)
@@ -1873,16 +1896,16 @@ const ue = "builderSessionId", on = async ({
1873
1896
  name: ue,
1874
1897
  canTrack: e
1875
1898
  });
1876
- if (I(t))
1899
+ if ($(t))
1877
1900
  return t;
1878
1901
  {
1879
- const n = sn();
1880
- return rn({ id: n, canTrack: e }), n;
1902
+ const n = an();
1903
+ return ln({ id: n, canTrack: e }), n;
1881
1904
  }
1882
- }, sn = () => de(), rn = ({
1905
+ }, an = () => de(), ln = ({
1883
1906
  id: e,
1884
1907
  canTrack: t
1885
- }) => re({ name: ue, value: e, canTrack: t }), pe = () => m() && typeof localStorage < "u" ? localStorage : void 0, an = ({
1908
+ }) => re({ name: ue, value: e, canTrack: t }), pe = () => h() && typeof localStorage < "u" ? localStorage : void 0, cn = ({
1886
1909
  key: e,
1887
1910
  canTrack: t
1888
1911
  }) => {
@@ -1893,7 +1916,7 @@ const ue = "builderSessionId", on = async ({
1893
1916
  console.debug("[LocalStorage] GET error: ", o);
1894
1917
  return;
1895
1918
  }
1896
- }, ln = ({
1919
+ }, dn = ({
1897
1920
  key: e,
1898
1921
  canTrack: t,
1899
1922
  value: n
@@ -1904,34 +1927,34 @@ const ue = "builderSessionId", on = async ({
1904
1927
  } catch (s) {
1905
1928
  console.debug("[LocalStorage] SET error: ", s);
1906
1929
  }
1907
- }, me = "builderVisitorId", cn = ({ canTrack: e }) => {
1930
+ }, me = "builderVisitorId", un = ({ canTrack: e }) => {
1908
1931
  if (!e)
1909
1932
  return;
1910
- const t = an({
1933
+ const t = cn({
1911
1934
  key: me,
1912
1935
  canTrack: e
1913
1936
  });
1914
- if (I(t))
1937
+ if ($(t))
1915
1938
  return t;
1916
1939
  {
1917
- const n = dn();
1918
- return un({ id: n, canTrack: e }), n;
1940
+ const n = pn();
1941
+ return mn({ id: n, canTrack: e }), n;
1919
1942
  }
1920
- }, dn = () => de(), un = ({
1943
+ }, pn = () => de(), mn = ({
1921
1944
  id: e,
1922
1945
  canTrack: t
1923
- }) => ln({
1946
+ }) => dn({
1924
1947
  key: me,
1925
1948
  value: e,
1926
1949
  canTrack: t
1927
- }), pn = () => {
1928
- if (m()) {
1950
+ }), hn = () => {
1951
+ if (h()) {
1929
1952
  const e = new URL(location.href);
1930
1953
  return e.pathname === "" && (e.pathname = "/"), e;
1931
1954
  } else
1932
1955
  return console.warn("Cannot get location for tracking in non-browser environment"), null;
1933
- }, mn = () => typeof navigator == "object" && navigator.userAgent || "", hn = () => {
1934
- const e = mn(), t = {
1956
+ }, fn = () => typeof navigator == "object" && navigator.userAgent || "", gn = () => {
1957
+ const e = fn(), t = {
1935
1958
  Android() {
1936
1959
  return e.match(/Android/i);
1937
1960
  },
@@ -1948,25 +1971,25 @@ const ue = "builderSessionId", on = async ({
1948
1971
  return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
1949
1972
  },
1950
1973
  any() {
1951
- return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || _ === "reactNative";
1974
+ return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || A === "reactNative";
1952
1975
  }
1953
- }, n = e.match(/Tablet|iPad/i), o = pn();
1976
+ }, n = e.match(/Tablet|iPad/i), o = hn();
1954
1977
  return {
1955
1978
  urlPath: o == null ? void 0 : o.pathname,
1956
1979
  host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
1957
1980
  device: n ? "tablet" : t.any() ? "mobile" : "desktop"
1958
1981
  };
1959
- }, fn = async ({
1982
+ }, bn = async ({
1960
1983
  canTrack: e
1961
1984
  }) => {
1962
1985
  if (!e)
1963
1986
  return { visitorId: void 0, sessionId: void 0 };
1964
- const t = await on({ canTrack: e }), n = cn({ canTrack: e });
1987
+ const t = await rn({ canTrack: e }), n = un({ canTrack: e });
1965
1988
  return {
1966
1989
  sessionId: t,
1967
1990
  visitorId: n
1968
1991
  };
1969
- }, gn = async ({
1992
+ }, yn = async ({
1970
1993
  type: e,
1971
1994
  canTrack: t,
1972
1995
  apiKey: n,
@@ -1980,23 +2003,23 @@ const ue = "builderSessionId", on = async ({
1980
2003
  url: location.href,
1981
2004
  ...o
1982
2005
  },
1983
- ...await fn({ canTrack: t }),
1984
- userAttributes: hn(),
2006
+ ...await bn({ canTrack: t }),
2007
+ userAttributes: gn(),
1985
2008
  ownerId: n
1986
2009
  }
1987
2010
  });
1988
- async function M(e) {
2011
+ async function L(e) {
1989
2012
  if (!e.apiKey) {
1990
- C.error(
2013
+ I.error(
1991
2014
  "Missing API key for track call. Please provide your API key."
1992
2015
  );
1993
2016
  return;
1994
2017
  }
1995
- if (!!e.canTrack && !k() && !!(m() || _ === "reactNative"))
2018
+ if (!!e.canTrack && !v() && !!(h() || A === "reactNative"))
1996
2019
  return fetch("https://builder.io/api/v1/track", {
1997
2020
  method: "POST",
1998
2021
  body: JSON.stringify({
1999
- events: [await gn(e)]
2022
+ events: [await yn(e)]
2000
2023
  }),
2001
2024
  headers: {
2002
2025
  "content-type": "application/json"
@@ -2006,10 +2029,10 @@ async function M(e) {
2006
2029
  console.error("Failed to track: ", t);
2007
2030
  });
2008
2031
  }
2009
- const Bn = (e) => M({ ...e, canTrack: !0 }), J = {};
2010
- function bn(e, t) {
2032
+ const Wn = (e) => L({ ...e, canTrack: !0 }), vn = "0.3.2-0", J = {};
2033
+ function kn(e, t) {
2011
2034
  let n = J[e];
2012
- if (n || (n = J[e] = []), n.push(t), m()) {
2035
+ if (n || (n = J[e] = []), n.push(t), h()) {
2013
2036
  const o = {
2014
2037
  type: "builder.register",
2015
2038
  data: {
@@ -2024,8 +2047,8 @@ function bn(e, t) {
2024
2047
  }
2025
2048
  }
2026
2049
  }
2027
- const yn = () => {
2028
- bn("insertMenu", {
2050
+ const Sn = () => {
2051
+ kn("insertMenu", {
2029
2052
  name: "_default",
2030
2053
  default: !0,
2031
2054
  items: [
@@ -2041,13 +2064,14 @@ const yn = () => {
2041
2064
  });
2042
2065
  };
2043
2066
  let X = !1;
2044
- const vn = (e = {}) => {
2067
+ const wn = (e = {}) => {
2045
2068
  var t, n;
2046
- X || (X = !0, m() && ((t = window.parent) == null || t.postMessage(
2069
+ X || (X = !0, h() && ((t = window.parent) == null || t.postMessage(
2047
2070
  {
2048
2071
  type: "builder.sdkInfo",
2049
2072
  data: {
2050
- target: _,
2073
+ target: A,
2074
+ version: vn,
2051
2075
  supportsPatchUpdates: !1,
2052
2076
  supportsAddBlockScoping: !0,
2053
2077
  supportsCustomBreakpoints: !0
@@ -2068,24 +2092,24 @@ const vn = (e = {}) => {
2068
2092
  switch (o.type) {
2069
2093
  case "builder.evaluate": {
2070
2094
  const i = o.data.text, l = o.data.arguments || [], a = o.data.id, c = new Function(i);
2071
- let u, b = null;
2095
+ let u, m = null;
2072
2096
  try {
2073
2097
  u = c.apply(null, l);
2074
- } catch (g) {
2075
- b = g;
2098
+ } catch (b) {
2099
+ m = b;
2076
2100
  }
2077
- b ? (s = window.parent) == null || s.postMessage(
2101
+ m ? (s = window.parent) == null || s.postMessage(
2078
2102
  {
2079
2103
  type: "builder.evaluateError",
2080
- data: { id: a, error: b.message }
2104
+ data: { id: a, error: m.message }
2081
2105
  },
2082
2106
  "*"
2083
- ) : u && typeof u.then == "function" ? u.then((g) => {
2084
- var y;
2085
- (y = window.parent) == null || y.postMessage(
2107
+ ) : u && typeof u.then == "function" ? u.then((b) => {
2108
+ var k;
2109
+ (k = window.parent) == null || k.postMessage(
2086
2110
  {
2087
2111
  type: "builder.evaluateResult",
2088
- data: { id: a, result: g }
2112
+ data: { id: a, result: b }
2089
2113
  },
2090
2114
  "*"
2091
2115
  );
@@ -2104,7 +2128,7 @@ const vn = (e = {}) => {
2104
2128
  function Y(e) {
2105
2129
  return Math.round(e * 1e3) / 1e3;
2106
2130
  }
2107
- const kn = (e, t, n = !0) => {
2131
+ const Cn = (e, t, n = !0) => {
2108
2132
  if (!(e instanceof HTMLElement))
2109
2133
  return null;
2110
2134
  let o = n ? e : e.parentElement;
@@ -2115,7 +2139,7 @@ const kn = (e, t, n = !0) => {
2115
2139
  return o;
2116
2140
  } while (o = o.parentElement);
2117
2141
  return null;
2118
- }, Sn = (e) => kn(e, (t) => {
2142
+ }, In = (e) => Cn(e, (t) => {
2119
2143
  const n = t.getAttribute("builder-id") || t.id;
2120
2144
  return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
2121
2145
  }), Q = ({
@@ -2127,8 +2151,8 @@ const kn = (e, t, n = !0) => {
2127
2151
  x: r,
2128
2152
  y: i
2129
2153
  };
2130
- }, wn = (e) => {
2131
- const t = e.target, n = t && Sn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2154
+ }, xn = (e) => {
2155
+ const t = e.target, n = t && In(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2132
2156
  return {
2133
2157
  targetBuilderElement: o || void 0,
2134
2158
  metadata: {
@@ -2137,7 +2161,7 @@ const kn = (e, t, n = !0) => {
2137
2161
  builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
2138
2162
  }
2139
2163
  };
2140
- }, Cn = ({
2164
+ }, $n = ({
2141
2165
  content: e,
2142
2166
  data: t,
2143
2167
  locale: n
@@ -2154,7 +2178,7 @@ const kn = (e, t, n = !0) => {
2154
2178
  ...n ? { locale: n } : {}
2155
2179
  };
2156
2180
  return { ...o, ...s };
2157
- }, xn = ({
2181
+ }, Tn = ({
2158
2182
  content: e,
2159
2183
  data: t
2160
2184
  }) => e ? {
@@ -2164,21 +2188,21 @@ const kn = (e, t, n = !0) => {
2164
2188
  ...t
2165
2189
  },
2166
2190
  meta: e == null ? void 0 : e.meta
2167
- } : void 0, In = () => Promise.resolve().then(() => ne).then((e) => e.default).catch((e) => {
2191
+ } : void 0, Rn = fe, En = () => Promise.resolve().then(() => ne).then((e) => e.default).catch((e) => {
2168
2192
  throw console.error(
2169
2193
  "Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
2170
2194
  e
2171
2195
  ), e;
2172
- }), $n = () => import("./render-styles.90b25836.js").then((e) => e.default).catch((e) => {
2196
+ }), _n = () => import("./render-styles.7f31b369.js").then((e) => e.default).catch((e) => {
2173
2197
  throw console.error(
2174
2198
  "Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
2175
2199
  e
2176
2200
  ), e;
2177
- }), Tn = h({
2201
+ }), An = f({
2178
2202
  name: "render-content",
2179
2203
  components: {
2180
- RenderContentStyles: S($n),
2181
- RenderBlocks: S(In)
2204
+ RenderContentStyles: w(_n),
2205
+ RenderBlocks: w(En)
2182
2206
  },
2183
2207
  props: [
2184
2208
  "content",
@@ -2190,46 +2214,51 @@ const kn = (e, t, n = !0) => {
2190
2214
  "context",
2191
2215
  "apiKey",
2192
2216
  "includeRefs",
2217
+ "enrich",
2193
2218
  "apiVersion"
2194
2219
  ],
2195
2220
  data() {
2196
2221
  return {
2197
2222
  forceReRenderCount: 0,
2198
2223
  overrideContent: null,
2199
- useContent: xn({
2224
+ useContent: Tn({
2200
2225
  content: this.content,
2201
2226
  data: this.data
2202
2227
  }),
2203
2228
  update: 0,
2204
- canTrackToUse: I(this.canTrack) ? this.canTrack : !0,
2205
- contentState: Cn({
2229
+ canTrackToUse: $(this.canTrack) ? this.canTrack : !0,
2230
+ contentState: $n({
2206
2231
  content: this.content,
2207
2232
  data: this.data,
2208
2233
  locale: this.locale
2209
2234
  }),
2210
2235
  allRegisteredComponents: [
2211
- ...Yt(),
2236
+ ...Qt(),
2212
2237
  ...ce,
2213
2238
  ...this.customComponents || []
2214
2239
  ].reduce(
2215
- (e, t) => ({
2240
+ (e, { component: t, ...n }) => ({
2216
2241
  ...e,
2217
- [t.name]: t
2242
+ [n.name]: {
2243
+ component: Rn(t),
2244
+ ...n
2245
+ }
2218
2246
  }),
2219
2247
  {}
2220
2248
  ),
2221
2249
  httpReqsData: {},
2222
2250
  clicked: !1,
2223
- TARGET: _
2251
+ TARGET: A
2224
2252
  };
2225
2253
  },
2226
2254
  provide() {
2227
2255
  const e = this;
2228
2256
  return {
2229
- [P.key]: {
2257
+ [O.key]: {
2230
2258
  content: e.useContent,
2231
- state: e.contentState,
2232
- setState: e.setContextState,
2259
+ localState: void 0,
2260
+ rootState: e.contentState,
2261
+ rootSetState: e.contentSetState,
2233
2262
  context: e.context || {},
2234
2263
  apiKey: e.apiKey,
2235
2264
  apiVersion: e.apiVersion,
@@ -2240,28 +2269,31 @@ const kn = (e, t, n = !0) => {
2240
2269
  },
2241
2270
  mounted() {
2242
2271
  var e, t;
2243
- if (this.apiKey || C.error(
2272
+ if (this.apiKey || I.error(
2244
2273
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2245
- ), m()) {
2246
- if (k() && (this.forceReRenderCount = this.forceReRenderCount + 1, yn(), vn({
2274
+ ), h()) {
2275
+ if (v() && (this.forceReRenderCount = this.forceReRenderCount + 1, Sn(), wn({
2247
2276
  ...this.locale ? {
2248
2277
  locale: this.locale
2249
2278
  } : {},
2250
2279
  ...this.includeRefs ? {
2251
2280
  includeRefs: this.includeRefs
2281
+ } : {},
2282
+ ...this.enrich ? {
2283
+ enrich: this.enrich
2252
2284
  } : {}
2253
2285
  }), Object.values(
2254
2286
  this.allRegisteredComponents
2255
2287
  ).forEach((n) => {
2256
2288
  var s;
2257
- const o = Zt(n);
2289
+ const o = tn(n);
2258
2290
  (s = window.parent) == null || s.postMessage(o, "*");
2259
2291
  }), window.addEventListener("message", this.processMessage), window.addEventListener(
2260
2292
  "builder:component:stateChangeListenerActivated",
2261
2293
  this.emitStateUpdate
2262
2294
  )), this.useContent) {
2263
2295
  const n = (e = this.useContent) == null ? void 0 : e.testVariationId, o = (t = this.useContent) == null ? void 0 : t.id;
2264
- M({
2296
+ L({
2265
2297
  type: "impression",
2266
2298
  canTrack: this.canTrackToUse,
2267
2299
  contentId: o,
@@ -2269,7 +2301,7 @@ const kn = (e, t, n = !0) => {
2269
2301
  variationId: n !== o ? n : void 0
2270
2302
  });
2271
2303
  }
2272
- if (Qt()) {
2304
+ if (en()) {
2273
2305
  const n = new URL(location.href).searchParams, o = n.get("builder.preview"), s = n.get(
2274
2306
  `builder.preview.${o}`
2275
2307
  ), r = n.get("apiKey") || n.get("builder.space");
@@ -2311,7 +2343,7 @@ const kn = (e, t, n = !0) => {
2311
2343
  }
2312
2344
  },
2313
2345
  unmounted() {
2314
- m() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
2346
+ h() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
2315
2347
  "builder:component:stateChangeListenerActivated",
2316
2348
  this.emitStateUpdate
2317
2349
  ));
@@ -2368,7 +2400,7 @@ const kn = (e, t, n = !0) => {
2368
2400
  }
2369
2401
  };
2370
2402
  },
2371
- setContextState(e) {
2403
+ contentSetState(e) {
2372
2404
  this.contentState = e;
2373
2405
  },
2374
2406
  processMessage(e) {
@@ -2396,20 +2428,22 @@ const kn = (e, t, n = !0) => {
2396
2428
  e && G({
2397
2429
  code: e,
2398
2430
  context: this.context || {},
2399
- state: this.contentState
2431
+ localState: void 0,
2432
+ rootState: this.contentState,
2433
+ rootSetState: this.contentSetState
2400
2434
  });
2401
2435
  },
2402
2436
  onClick(e) {
2403
2437
  var t, n;
2404
2438
  if (this.useContent) {
2405
2439
  const o = (t = this.useContent) == null ? void 0 : t.testVariationId, s = (n = this.useContent) == null ? void 0 : n.id;
2406
- M({
2440
+ L({
2407
2441
  type: "click",
2408
2442
  canTrack: this.canTrackToUse,
2409
2443
  contentId: s,
2410
2444
  apiKey: this.apiKey,
2411
2445
  variationId: o !== s ? o : void 0,
2412
- ...wn(e),
2446
+ ...xn(e),
2413
2447
  unique: !this.clicked
2414
2448
  });
2415
2449
  }
@@ -2421,7 +2455,9 @@ const kn = (e, t, n = !0) => {
2421
2455
  (t, n) => G({
2422
2456
  code: n,
2423
2457
  context: this.context || {},
2424
- state: this.contentState
2458
+ localState: void 0,
2459
+ rootState: this.contentState,
2460
+ rootSetState: this.contentSetState
2425
2461
  })
2426
2462
  );
2427
2463
  },
@@ -2431,7 +2467,7 @@ const kn = (e, t, n = !0) => {
2431
2467
  ...this.contentState,
2432
2468
  [t]: n
2433
2469
  };
2434
- this.setContextState(o);
2470
+ this.contentSetState(o);
2435
2471
  }).catch((n) => {
2436
2472
  console.error("error fetching dynamic data", e, n);
2437
2473
  });
@@ -2440,7 +2476,7 @@ const kn = (e, t, n = !0) => {
2440
2476
  var t, n, o;
2441
2477
  const e = (o = (n = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) != null ? o : {};
2442
2478
  Object.entries(e).forEach(([s, r]) => {
2443
- if (r && (!this.httpReqsData[s] || k())) {
2479
+ if (r && (!this.httpReqsData[s] || v())) {
2444
2480
  const i = this.evalExpression(r);
2445
2481
  this.handleRequest({
2446
2482
  url: i,
@@ -2450,7 +2486,7 @@ const kn = (e, t, n = !0) => {
2450
2486
  });
2451
2487
  },
2452
2488
  emitStateUpdate() {
2453
- k() && window.dispatchEvent(
2489
+ v() && window.dispatchEvent(
2454
2490
  new CustomEvent(
2455
2491
  "builder:component:stateChange",
2456
2492
  {
@@ -2465,10 +2501,10 @@ const kn = (e, t, n = !0) => {
2465
2501
  );
2466
2502
  }
2467
2503
  }
2468
- }), Rn = ["builder-content-id", "builder-model"];
2469
- function En(e, t, n, o, s, r) {
2470
- var a, c, u, b, g, y, $, N;
2471
- const i = w("render-content-styles"), l = w("render-blocks");
2504
+ }), jn = ["builder-content-id", "builder-model"];
2505
+ function Vn(e, t, n, o, s, r) {
2506
+ var a, c, u, m, b, k, S, T;
2507
+ const i = C("render-content-styles"), l = C("render-blocks");
2472
2508
  return e.useContent ? (d(), p("div", {
2473
2509
  key: 0,
2474
2510
  ref: "elementRef",
@@ -2476,24 +2512,24 @@ function En(e, t, n, o, s, r) {
2476
2512
  "builder-content-id": (a = e.useContent) == null ? void 0 : a.id,
2477
2513
  "builder-model": e.model
2478
2514
  }, [
2479
- e.TARGET !== "reactNative" ? (d(), E(i, {
2515
+ e.TARGET !== "reactNative" ? (d(), _(i, {
2480
2516
  key: 0,
2481
2517
  contentId: (c = e.useContent) == null ? void 0 : c.id,
2482
- cssCode: (b = (u = e.useContent) == null ? void 0 : u.data) == null ? void 0 : b.cssCode,
2483
- customFonts: (y = (g = e.useContent) == null ? void 0 : g.data) == null ? void 0 : y.customFonts
2484
- }, null, 8, ["contentId", "cssCode", "customFonts"])) : v("", !0),
2485
- (d(), E(l, {
2486
- blocks: (N = ($ = e.useContent) == null ? void 0 : $.data) == null ? void 0 : N.blocks,
2518
+ cssCode: (m = (u = e.useContent) == null ? void 0 : u.data) == null ? void 0 : m.cssCode,
2519
+ customFonts: (k = (b = e.useContent) == null ? void 0 : b.data) == null ? void 0 : k.customFonts
2520
+ }, null, 8, ["contentId", "cssCode", "customFonts"])) : y("", !0),
2521
+ (d(), _(l, {
2522
+ blocks: (T = (S = e.useContent) == null ? void 0 : S.data) == null ? void 0 : T.blocks,
2487
2523
  key: e.forceReRenderCount
2488
2524
  }, null, 8, ["blocks"]))
2489
- ], 8, Rn)) : v("", !0);
2525
+ ], 8, jn)) : y("", !0);
2490
2526
  }
2491
- const _n = /* @__PURE__ */ f(Tn, [["render", En]]), An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2527
+ const Pn = /* @__PURE__ */ g(An, [["render", Vn]]), On = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2492
2528
  __proto__: null,
2493
- default: _n
2529
+ default: Pn
2494
2530
  }, Symbol.toStringTag, { value: "Module" })), Z = {};
2495
- function Fn(e) {
2496
- if (m()) {
2531
+ function Mn(e) {
2532
+ if (h()) {
2497
2533
  Object.assign(Z, e);
2498
2534
  const t = {
2499
2535
  type: "builder.settingsChange",
@@ -2503,36 +2539,36 @@ function Fn(e) {
2503
2539
  }
2504
2540
  }
2505
2541
  export {
2506
- P as B,
2507
- Ie as C,
2508
- Re as F,
2542
+ O as B,
2543
+ $e as C,
2544
+ Ee as F,
2509
2545
  Fe as I,
2510
- Ye as S,
2511
- _ as T,
2512
- Vt as V,
2513
- f as _,
2514
- Vn as a,
2515
- ye as b,
2516
- I as c,
2517
- _n as d,
2546
+ Qe as S,
2547
+ A as T,
2548
+ Pt as V,
2549
+ g as _,
2550
+ Fn as a,
2551
+ ve as b,
2552
+ $ as c,
2553
+ Pn as d,
2518
2554
  G as e,
2519
- L as f,
2520
- ve as g,
2521
- Ct as h,
2522
- Rt as i,
2523
- k as j,
2524
- Qt as k,
2555
+ N as f,
2556
+ ke as g,
2557
+ It as h,
2558
+ Et as i,
2559
+ v as j,
2560
+ en as k,
2525
2561
  ce as l,
2526
- Pn as m,
2527
- Zt as n,
2528
- bn as o,
2562
+ Un as m,
2563
+ tn as n,
2564
+ kn as o,
2529
2565
  le as p,
2530
- yt as q,
2531
- He as r,
2532
- Fn as s,
2533
- Bn as t,
2534
- mt as u,
2535
- ht as v,
2536
- ft as w,
2566
+ vt as q,
2567
+ Ke as r,
2568
+ Mn as s,
2569
+ Wn as t,
2570
+ ht as u,
2571
+ ft as v,
2572
+ gt as w,
2537
2573
  ae as x
2538
2574
  };