@builder.io/sdk-vue 2.0.20 → 2.0.21

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 (66) hide show
  1. package/lib/browser/{awaiter-A9QVJBD9.cjs → awaiter-63wFxDc-.cjs} +1 -1
  2. package/lib/browser/{awaiter-jLgWnSTO.js → awaiter-wFAQUD8u.js} +1 -1
  3. package/lib/browser/{block-styles-McsYN1Hd.js → block-styles-e9UJWxRw.js} +1 -1
  4. package/lib/browser/{block-styles-FLI6qMZg.cjs → block-styles-w3CYR9qS.cjs} +1 -1
  5. package/lib/browser/{block-wrapper-kIbAHG8K.js → block-wrapper-BBK1LMQ8.js} +3 -3
  6. package/lib/browser/{block-wrapper-c1TRGGdm.cjs → block-wrapper-KE-bUIi7.cjs} +1 -1
  7. package/lib/browser/{component-ref-VsUS3j2W.js → component-ref-cecMbUuX.js} +3 -3
  8. package/lib/browser/{component-ref-t_X6BYoD.cjs → component-ref-e6CG1TqL.cjs} +1 -1
  9. package/lib/browser/components/content/components/enable-editor.vue.d.ts +0 -7
  10. package/lib/browser/constants/sdk-version.d.ts +1 -1
  11. package/lib/browser/functions/evaluate/browser-runtime/browser.d.ts +0 -6
  12. package/lib/browser/functions/evaluate/helpers.d.ts +5 -0
  13. package/lib/browser/{get-block-properties-Ub4OGrZU.cjs → get-block-properties-8qBDZMKr.cjs} +1 -1
  14. package/lib/browser/{get-block-properties-pnQ6T89t.js → get-block-properties-JZrAY1r_.js} +1 -1
  15. package/lib/browser/{index-IkCq97zU.js → index-ei0E4zOL.js} +249 -270
  16. package/lib/browser/{index-G94Y3yOE.cjs → index-uR3yr3o2.cjs} +15 -15
  17. package/lib/browser/index.cjs +1 -1
  18. package/lib/browser/index.mjs +1 -1
  19. package/lib/browser/{repeated-block-9kzlJZ0z.js → repeated-block-4KouNbyE.js} +2 -2
  20. package/lib/browser/{repeated-block-phJGhJDz.cjs → repeated-block-5kGcO6DI.cjs} +1 -1
  21. package/lib/edge/{awaiter-qkwHnyG4.cjs → awaiter-aq8paHrs.cjs} +1 -1
  22. package/lib/edge/{awaiter-EaEHpSME.js → awaiter-byTF6qeD.js} +1 -1
  23. package/lib/edge/{block-styles-e5rHDnez.js → block-styles-8MRmenjP.js} +1 -1
  24. package/lib/edge/{block-styles-dBm-UB6s.cjs → block-styles-sHjSbOMY.cjs} +1 -1
  25. package/lib/edge/{block-wrapper-XFAJUGmy.cjs → block-wrapper-ilLh_PHh.cjs} +1 -1
  26. package/lib/edge/{block-wrapper-IsmLQCso.js → block-wrapper-rzB4thH4.js} +3 -3
  27. package/lib/edge/{component-ref-VkKlvDcE.cjs → component-ref-FJL2g6D2.cjs} +1 -1
  28. package/lib/edge/{component-ref-mDQskFmn.js → component-ref-hkYDlUjG.js} +3 -3
  29. package/lib/edge/components/content/components/enable-editor.vue.d.ts +0 -7
  30. package/lib/edge/constants/sdk-version.d.ts +1 -1
  31. package/lib/edge/functions/evaluate/browser-runtime/browser.d.ts +0 -6
  32. package/lib/edge/functions/evaluate/helpers.d.ts +5 -0
  33. package/lib/edge/{get-block-properties-FTpxQBNr.cjs → get-block-properties-aM96dauJ.cjs} +1 -1
  34. package/lib/edge/{get-block-properties-jWWYZFYS.js → get-block-properties-cbYhtG2B.js} +1 -1
  35. package/lib/edge/index-Nw62yGCU.cjs +184 -0
  36. package/lib/edge/{index-a1uEIlXu.js → index-s36DlX8g.js} +1377 -1380
  37. package/lib/edge/index.cjs +1 -1
  38. package/lib/edge/index.mjs +1 -1
  39. package/lib/{node/repeated-block-opGUN59c.cjs → edge/repeated-block-wdJ005G3.cjs} +1 -1
  40. package/lib/edge/{repeated-block-WbUp3X7n.js → repeated-block-zOlg6ACd.js} +2 -2
  41. package/lib/node/{awaiter-nnMnOtUG.cjs → awaiter-Fsn-BZdK.cjs} +1 -1
  42. package/lib/node/{awaiter-bSGzxUtO.js → awaiter-c00-BKl8.js} +1 -1
  43. package/lib/node/{block-styles-nafXA7XU.cjs → block-styles-dNkK6XUk.cjs} +1 -1
  44. package/lib/node/{block-styles-z1hRu_oN.js → block-styles-y32fRgui.js} +2 -2
  45. package/lib/node/{block-wrapper-7Zyz-IHk.cjs → block-wrapper-9SHqyGhh.cjs} +1 -1
  46. package/lib/node/{block-wrapper-VbshFnwD.js → block-wrapper-Gb1-_hO0.js} +3 -3
  47. package/lib/node/{component-ref-0qWwbS8J.js → component-ref-9ri0cWhO.js} +3 -3
  48. package/lib/node/{component-ref-pMpl8Ppd.cjs → component-ref-LAJelZZi.cjs} +1 -1
  49. package/lib/node/components/content/components/enable-editor.vue.d.ts +0 -7
  50. package/lib/node/constants/sdk-version.d.ts +1 -1
  51. package/lib/node/functions/evaluate/browser-runtime/browser.d.ts +0 -6
  52. package/lib/node/functions/evaluate/helpers.d.ts +5 -0
  53. package/lib/node/{get-block-properties-3bo9EXiT.cjs → get-block-properties-XKVJQeGu.cjs} +1 -1
  54. package/lib/node/{get-block-properties-7k5SVVoM.js → get-block-properties-hbwsLjcS.js} +2 -2
  55. package/lib/node/{index-m2Te0zyE.cjs → index-eLulgxIT.cjs} +25 -25
  56. package/lib/node/{index-arpbCDNz.js → index-owOkjqS8.js} +490 -537
  57. package/lib/node/index.cjs +1 -1
  58. package/lib/node/index.mjs +7 -7
  59. package/lib/node/init.cjs +1 -1
  60. package/lib/node/init.mjs +1 -1
  61. package/lib/{edge/repeated-block--9pU5oBU.cjs → node/repeated-block-keRWtfEG.cjs} +1 -1
  62. package/lib/node/{repeated-block-7xPIdLvm.js → repeated-block-xs28_Dw4.js} +2 -2
  63. package/lib/node/{should-force-browser-runtime-in-node-cm1lg4FM.cjs → should-force-browser-runtime-in-node-k58tZzl7.cjs} +2 -2
  64. package/lib/node/{should-force-browser-runtime-in-node-Hy3G5eB4.js → should-force-browser-runtime-in-node-o45oecPI.js} +61 -34
  65. package/package.json +1 -1
  66. package/lib/edge/index-wbH9RC9d.cjs +0 -186
@@ -1,9 +1,9 @@
1
- var pt = Object.defineProperty;
2
- var mt = (e, t, n) => t in e ? pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var oe = (e, t, n) => (mt(e, typeof t != "symbol" ? t + "" : t, n), n);
1
+ var ut = Object.defineProperty;
2
+ var pt = (e, t, n) => t in e ? ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var oe = (e, t, n) => (pt(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  import "./style.css";
5
- import { defineComponent as f, openBlock as c, createElementBlock as m, Fragment as w, createBlock as g, resolveDynamicComponent as K, mergeProps as C, toHandlers as P, withCtx as N, renderSlot as x, resolveComponent as y, createTextVNode as ht, toDisplayString as ne, defineAsyncComponent as j, createVNode as $, renderList as A, createCommentVNode as S, h as Ae, createElementVNode as z, normalizeStyle as D, normalizeClass as J, markRaw as ft } from "vue";
6
- const bt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), gt = (e) => typeof e == "string" && bt.has(e.toLowerCase());
5
+ import { defineComponent as f, openBlock as c, createElementBlock as m, Fragment as w, createBlock as g, resolveDynamicComponent as K, mergeProps as C, toHandlers as P, withCtx as N, renderSlot as x, resolveComponent as y, createTextVNode as mt, toDisplayString as ne, defineAsyncComponent as H, createVNode as $, renderList as A, createCommentVNode as S, h as Ae, createElementVNode as z, normalizeStyle as D, normalizeClass as J, markRaw as ht } from "vue";
6
+ const ft = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), bt = (e) => typeof e == "string" && ft.has(e.toLowerCase());
7
7
  function V(e = {}, t, n) {
8
8
  const o = {};
9
9
  for (const r in e) {
@@ -14,11 +14,11 @@ function V(e = {}, t, n) {
14
14
  }
15
15
  return o;
16
16
  }
17
- const yt = f({
17
+ const gt = f({
18
18
  name: "dynamic-renderer",
19
19
  props: ["TagName", "attributes", "actionAttributes"],
20
20
  data() {
21
- return { isEmptyElement: gt };
21
+ return { isEmptyElement: bt };
22
22
  }
23
23
  }), b = (e, t) => {
24
24
  const n = e.__vccOpts || e;
@@ -26,7 +26,7 @@ const yt = f({
26
26
  n[o] = r;
27
27
  return n;
28
28
  };
29
- function kt(e, t, n, o, r, i) {
29
+ function yt(e, t, n, o, r, i) {
30
30
  return e.isEmptyElement(e.TagName) ? (c(), g(K(e.TagName), C({ key: 1 }, e.attributes, P(e.actionAttributes)), null, 16)) : (c(), m(w, { key: 0 }, [
31
31
  typeof e.TagName == "string" ? (c(), g(K(e.TagName), C({ key: 0 }, e.attributes, P(e.actionAttributes)), {
32
32
  default: N(() => [
@@ -41,7 +41,7 @@ function kt(e, t, n, o, r, i) {
41
41
  }, 16))
42
42
  ], 64));
43
43
  }
44
- const me = /* @__PURE__ */ b(yt, [["render", kt]]), Vi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
44
+ const me = /* @__PURE__ */ b(gt, [["render", yt]]), Vi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45
45
  __proto__: null,
46
46
  default: me
47
47
  }, Symbol.toStringTag, { value: "Module" })), E = "vue", ee = () => {
@@ -57,7 +57,7 @@ const me = /* @__PURE__ */ b(yt, [["render", kt]]), Vi = /* @__PURE__ */ Object.
57
57
  case "angular":
58
58
  return "class";
59
59
  }
60
- }, vt = f({
60
+ }, kt = f({
61
61
  name: "builder-button",
62
62
  components: { DynamicRenderer: me },
63
63
  props: [
@@ -86,7 +86,7 @@ const me = /* @__PURE__ */ b(yt, [["render", kt]]), Vi = /* @__PURE__ */ Object.
86
86
  }
87
87
  }
88
88
  });
89
- function St(e, t, n, o, r, i) {
89
+ function vt(e, t, n, o, r, i) {
90
90
  const s = y("DynamicRenderer");
91
91
  return c(), g(s, {
92
92
  attributes: e.attrs(),
@@ -94,12 +94,12 @@ function St(e, t, n, o, r, i) {
94
94
  actionAttributes: e.filterAttrs(e.attributes, "v-on:", !0)
95
95
  }, {
96
96
  default: N(() => [
97
- ht(ne(e.text), 1)
97
+ mt(ne(e.text), 1)
98
98
  ]),
99
99
  _: 1
100
100
  }, 8, ["attributes", "TagName", "actionAttributes"]);
101
101
  }
102
- const Ct = /* @__PURE__ */ b(vt, [["render", St]]), wt = Symbol(), ce = {
102
+ const St = /* @__PURE__ */ b(kt, [["render", vt]]), Ct = Symbol(), ce = {
103
103
  Builder: {
104
104
  content: null,
105
105
  context: {},
@@ -115,19 +115,19 @@ const Ct = /* @__PURE__ */ b(vt, [["render", St]]), wt = Symbol(), ce = {
115
115
  BlocksWrapperProps: {},
116
116
  nonce: ""
117
117
  },
118
- key: wt
119
- }, Tt = Symbol(), Ve = {
118
+ key: Ct
119
+ }, wt = Symbol(), Ve = {
120
120
  Components: { registeredComponents: {} },
121
- key: Tt
121
+ key: wt
122
122
  };
123
- function It(e) {
123
+ function Tt(e) {
124
124
  var t;
125
125
  return {
126
126
  ...(t = e.component) == null ? void 0 : t.options,
127
127
  ...e.options
128
128
  };
129
129
  }
130
- function $t(e, ...t) {
130
+ function It(e, ...t) {
131
131
  const n = Object.assign({}, e);
132
132
  for (const o of t)
133
133
  delete n[o];
@@ -142,27 +142,27 @@ const Z = "[Builder.io]: ", B = {
142
142
  function I() {
143
143
  return typeof window < "u" && typeof document < "u";
144
144
  }
145
- const Rt = (e) => {
145
+ const $t = (e) => {
146
146
  const t = {};
147
147
  return e.forEach((n, o) => {
148
148
  t[o] = n;
149
149
  }), t;
150
- }, We = (e) => e instanceof URLSearchParams ? Rt(e) : e, Ne = (e) => typeof e == "string" ? e : e instanceof URLSearchParams ? e.toString() : new URLSearchParams(e).toString();
151
- function Bt() {
150
+ }, We = (e) => e instanceof URLSearchParams ? $t(e) : e, Ne = (e) => typeof e == "string" ? e : e instanceof URLSearchParams ? e.toString() : new URLSearchParams(e).toString();
151
+ function Rt() {
152
152
  return I() && window.self !== window.top;
153
153
  }
154
154
  function R(e) {
155
- return Bt() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
155
+ return Rt() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
156
156
  Ne(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
157
157
  }
158
- const Et = () => {
158
+ const Bt = () => {
159
159
  if (I()) {
160
160
  const e = new URL(location.href);
161
161
  return e.pathname === "" && (e.pathname = "/"), e;
162
162
  } else
163
163
  return console.warn("Cannot get location for tracking in non-browser environment"), null;
164
- }, Pt = () => typeof navigator == "object" && navigator.userAgent || "", Oe = () => {
165
- const e = Pt(), t = {
164
+ }, Et = () => typeof navigator == "object" && navigator.userAgent || "", Oe = () => {
165
+ const e = Et(), t = {
166
166
  Android() {
167
167
  return e.match(/Android/i);
168
168
  },
@@ -181,13 +181,13 @@ const Et = () => {
181
181
  any() {
182
182
  return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || E === "reactNative";
183
183
  }
184
- }, n = e.match(/Tablet|iPad/i), o = Et();
184
+ }, n = e.match(/Tablet|iPad/i), o = Bt();
185
185
  return {
186
186
  urlPath: o == null ? void 0 : o.pathname,
187
187
  host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
188
188
  device: n ? "tablet" : t.any() ? "mobile" : "desktop"
189
189
  };
190
- }, xt = ({
190
+ }, Pt = ({
191
191
  builder: e,
192
192
  context: t,
193
193
  event: n,
@@ -199,34 +199,14 @@ const Et = () => {
199
199
  builder: e,
200
200
  context: t,
201
201
  event: n
202
- }), At = () => ({
202
+ }), xt = () => ({
203
203
  isEditing: R(),
204
204
  isBrowser: I(),
205
205
  isServer: !I(),
206
206
  getUserAttributes: () => Oe()
207
- }), Vt = (e, {
207
+ }), At = (e, {
208
208
  isExpression: t = !0
209
- }) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, Ce = ({
210
- code: e,
211
- builder: t,
212
- context: n,
213
- event: o,
214
- localState: r,
215
- rootSetState: i,
216
- rootState: s
217
- }) => {
218
- const l = xt({
219
- builder: t,
220
- context: n,
221
- event: o,
222
- state: Fe({
223
- rootState: s,
224
- localState: r,
225
- rootSetState: i
226
- })
227
- });
228
- return new Function(...l.map(([a]) => a), e)(...l.map(([, a]) => a));
229
- };
209
+ }) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
230
210
  function Fe({
231
211
  rootState: e,
232
212
  localState: t,
@@ -252,22 +232,42 @@ function Fe({
252
232
  }
253
233
  });
254
234
  }
255
- const L = (e) => e != null;
256
- function Wt() {
235
+ const Ce = ({
236
+ code: e,
237
+ builder: t,
238
+ context: n,
239
+ event: o,
240
+ localState: r,
241
+ rootSetState: i,
242
+ rootState: s
243
+ }) => {
244
+ const l = Pt({
245
+ builder: t,
246
+ context: n,
247
+ event: o,
248
+ state: Fe({
249
+ rootState: s,
250
+ localState: r,
251
+ rootSetState: i
252
+ })
253
+ });
254
+ return new Function(...l.map(([a]) => a), e)(...l.map(([, a]) => a));
255
+ }, L = (e) => e != null;
256
+ function Vt() {
257
257
  var e;
258
258
  return typeof process < "u" && L((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
259
259
  }
260
- const Nt = ({
260
+ const Wt = ({
261
261
  shouldLogWarning: e
262
262
  }) => {
263
263
  var r;
264
- if (!Wt())
264
+ if (!Vt())
265
265
  return !1;
266
266
  const t = process.arch === "arm64", n = process.version.startsWith("v20"), o = (r = process.env.NODE_OPTIONS) == null ? void 0 : r.includes("--no-node-snapshot");
267
267
  return t && n && !o ? (e && B.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
268
- }, Ot = (e) => (I() || Nt({
268
+ }, Nt = (e) => (I() || Wt({
269
269
  shouldLogWarning: !0
270
- }), Ce(e)), Ft = !0, W = class W {
270
+ }), Ce(e)), Ot = !0, W = class W {
271
271
  static getCacheKey(t) {
272
272
  return JSON.stringify({
273
273
  ...t,
@@ -287,7 +287,7 @@ const Nt = ({
287
287
  };
288
288
  oe(W, "cacheLimit", 20), oe(W, "cache", /* @__PURE__ */ new Map());
289
289
  let U = W;
290
- function G({
290
+ function Y({
291
291
  code: e,
292
292
  context: t,
293
293
  localState: n,
@@ -300,23 +300,23 @@ function G({
300
300
  if (e === "")
301
301
  return;
302
302
  const a = {
303
- code: Vt(e, {
303
+ code: At(e, {
304
304
  isExpression: s
305
305
  }),
306
- builder: At(),
306
+ builder: xt(),
307
307
  context: t,
308
308
  event: i,
309
309
  rootSetState: r,
310
310
  rootState: o,
311
311
  localState: n
312
312
  };
313
- if (l && !Ft) {
313
+ if (l && !Ot) {
314
314
  const u = U.getCacheKey(a), h = U.getCachedValue(u);
315
315
  if (h)
316
316
  return h.value;
317
317
  }
318
318
  try {
319
- const u = Ot(a);
319
+ const u = Nt(a);
320
320
  if (l) {
321
321
  const h = U.getCacheKey(a);
322
322
  U.setCachedValue(h, u);
@@ -347,8 +347,8 @@ function de(e) {
347
347
  n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = de(e[n]));
348
348
  return t;
349
349
  }
350
- const Dt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Lt = (e) => {
351
- if (Dt) {
350
+ const Ft = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Dt = (e) => {
351
+ if (Ft) {
352
352
  const t = he(e);
353
353
  return {
354
354
  ...t,
@@ -360,7 +360,7 @@ const Dt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Lt = (e) =
360
360
  }
361
361
  };
362
362
  } else {
363
- const t = de($t(e, "children", "meta"));
363
+ const t = de(It(e, "children", "meta"));
364
364
  return {
365
365
  ...t,
366
366
  properties: {
@@ -373,7 +373,7 @@ const Dt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Lt = (e) =
373
373
  meta: e.meta
374
374
  };
375
375
  }
376
- }, Ut = ({
376
+ }, Lt = ({
377
377
  block: e,
378
378
  context: t,
379
379
  localState: n,
@@ -382,9 +382,9 @@ const Dt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Lt = (e) =
382
382
  }) => {
383
383
  if (!e.bindings)
384
384
  return e;
385
- const i = Lt(e);
385
+ const i = Dt(e);
386
386
  for (const s in e.bindings) {
387
- const l = e.bindings[s], a = G({
387
+ const l = e.bindings[s], a = Y({
388
388
  code: l,
389
389
  localState: n,
390
390
  rootState: o,
@@ -396,7 +396,7 @@ const Dt = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), Lt = (e) =
396
396
  }
397
397
  return i;
398
398
  };
399
- function Mt({
399
+ function Ut({
400
400
  block: e,
401
401
  context: t,
402
402
  shouldEvaluateBindings: n,
@@ -405,7 +405,7 @@ function Mt({
405
405
  rootSetState: i
406
406
  }) {
407
407
  const s = e;
408
- return n ? Ut({
408
+ return n ? Lt({
409
409
  block: s,
410
410
  localState: o,
411
411
  rootState: r,
@@ -413,22 +413,22 @@ function Mt({
413
413
  context: t
414
414
  }) : s;
415
415
  }
416
- function Ht(e) {
416
+ function Mt(e) {
417
417
  const t = e || (I() ? window.location.search : void 0);
418
418
  return t ? Ne(t).indexOf("builder.preview=") !== -1 : !1;
419
419
  }
420
420
  const jt = (e) => ({
421
421
  type: "builder.registerComponent",
422
422
  data: te(e)
423
- }), Kt = (e) => {
423
+ }), Ht = (e) => {
424
424
  const t = e.toString().trim();
425
425
  return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
426
426
  };
427
427
  function te(e) {
428
- return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ? Kt(n) : n));
428
+ return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ? Ht(n) : n));
429
429
  }
430
430
  const we = {};
431
- function qt(e, t) {
431
+ function Kt(e, t) {
432
432
  e === "plugin" && (t = te(t));
433
433
  let n = we[e];
434
434
  if (n || (n = we[e] = []), n.push(t), I()) {
@@ -457,22 +457,22 @@ function Wi(e) {
457
457
  parent.postMessage(t, "*");
458
458
  }
459
459
  }
460
- const Ie = "builder.", zt = "options.", Le = (e) => {
460
+ const Ie = "builder.", qt = "options.", Le = (e) => {
461
461
  if (!e)
462
462
  return {};
463
463
  const t = We(e), n = {};
464
464
  return Object.keys(t).forEach((o) => {
465
465
  if (o.startsWith(Ie)) {
466
- const r = o.replace(Ie, "").replace(zt, "");
466
+ const r = o.replace(Ie, "").replace(qt, "");
467
467
  n[r] = t[o];
468
468
  }
469
469
  }), n;
470
- }, Jt = () => {
470
+ }, zt = () => {
471
471
  if (!I())
472
472
  return {};
473
473
  const e = new URLSearchParams(window.location.search);
474
474
  return Le(e);
475
- }, Gt = (e) => {
475
+ }, Jt = (e) => {
476
476
  if (e === "localhost" || e === "127.0.0.1")
477
477
  return e;
478
478
  const t = e.split(".");
@@ -488,14 +488,14 @@ const Ie = "builder.", zt = "options.", Le = (e) => {
488
488
  B.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
489
489
  return;
490
490
  }
491
- }, Me = async (e) => Ue(e), Yt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(L).join("; "), Qt = [["secure", ""], ["SameSite", "None"]], Xt = ({
491
+ }, Me = async (e) => Ue(e), Gt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(L).join("; "), Yt = [["secure", ""], ["SameSite", "None"]], Qt = ({
492
492
  name: e,
493
493
  value: t,
494
494
  expires: n
495
495
  }) => {
496
- const r = (I() ? location.protocol === "https:" : !0) ? Qt : [[]], i = n ? [["expires", n.toUTCString()]] : [[]], s = [[e, t], ...i, ["path", "/"], ["domain", Gt(window.location.hostname)], ...r];
497
- return Yt(s);
498
- }, He = async ({
496
+ const r = (I() ? location.protocol === "https:" : !0) ? Yt : [[]], i = n ? [["expires", n.toUTCString()]] : [[]], s = [[e, t], ...i, ["path", "/"], ["domain", Jt(window.location.hostname)], ...r];
497
+ return Gt(s);
498
+ }, je = async ({
499
499
  name: e,
500
500
  value: t,
501
501
  expires: n,
@@ -504,7 +504,7 @@ const Ie = "builder.", zt = "options.", Le = (e) => {
504
504
  try {
505
505
  if (!o)
506
506
  return;
507
- const r = Xt({
507
+ const r = Qt({
508
508
  name: e,
509
509
  value: t,
510
510
  expires: n
@@ -514,16 +514,16 @@ const Ie = "builder.", zt = "options.", Le = (e) => {
514
514
  B.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
515
515
  }
516
516
  };
517
- function Zt() {
517
+ function Xt() {
518
518
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
519
519
  const t = Math.random() * 16 | 0;
520
520
  return (e == "x" ? t : t & 3 | 8).toString(16);
521
521
  });
522
522
  }
523
- function je() {
524
- return Zt().replace(/-/g, "");
523
+ function He() {
524
+ return Xt().replace(/-/g, "");
525
525
  }
526
- const Ke = "builderSessionId", _t = async ({
526
+ const Ke = "builderSessionId", Zt = async ({
527
527
  canTrack: e
528
528
  }) => {
529
529
  if (!e)
@@ -535,20 +535,20 @@ const Ke = "builderSessionId", _t = async ({
535
535
  if (L(t))
536
536
  return t;
537
537
  {
538
- const n = en();
539
- return tn({
538
+ const n = _t();
539
+ return en({
540
540
  id: n,
541
541
  canTrack: e
542
542
  }), n;
543
543
  }
544
- }, en = () => je(), tn = ({
544
+ }, _t = () => He(), en = ({
545
545
  id: e,
546
546
  canTrack: t
547
- }) => He({
547
+ }) => je({
548
548
  name: Ke,
549
549
  value: e,
550
550
  canTrack: t
551
- }), qe = () => I() && typeof localStorage < "u" ? localStorage : void 0, nn = ({
551
+ }), qe = () => I() && typeof localStorage < "u" ? localStorage : void 0, tn = ({
552
552
  key: e,
553
553
  canTrack: t
554
554
  }) => {
@@ -559,7 +559,7 @@ const Ke = "builderSessionId", _t = async ({
559
559
  console.debug("[LocalStorage] GET error: ", o);
560
560
  return;
561
561
  }
562
- }, on = ({
562
+ }, nn = ({
563
563
  key: e,
564
564
  canTrack: t,
565
565
  value: n
@@ -570,32 +570,32 @@ const Ke = "builderSessionId", _t = async ({
570
570
  } catch (r) {
571
571
  console.debug("[LocalStorage] SET error: ", r);
572
572
  }
573
- }, ze = "builderVisitorId", rn = ({
573
+ }, ze = "builderVisitorId", on = ({
574
574
  canTrack: e
575
575
  }) => {
576
576
  if (!e)
577
577
  return;
578
- const t = nn({
578
+ const t = tn({
579
579
  key: ze,
580
580
  canTrack: e
581
581
  });
582
582
  if (L(t))
583
583
  return t;
584
584
  {
585
- const n = sn();
586
- return an({
585
+ const n = rn();
586
+ return sn({
587
587
  id: n,
588
588
  canTrack: e
589
589
  }), n;
590
590
  }
591
- }, sn = () => je(), an = ({
591
+ }, rn = () => He(), sn = ({
592
592
  id: e,
593
593
  canTrack: t
594
- }) => on({
594
+ }) => nn({
595
595
  key: ze,
596
596
  value: e,
597
597
  canTrack: t
598
- }), ln = async ({
598
+ }), an = async ({
599
599
  canTrack: e
600
600
  }) => {
601
601
  if (!e)
@@ -603,16 +603,16 @@ const Ke = "builderSessionId", _t = async ({
603
603
  visitorId: void 0,
604
604
  sessionId: void 0
605
605
  };
606
- const t = await _t({
606
+ const t = await Zt({
607
607
  canTrack: e
608
- }), n = rn({
608
+ }), n = on({
609
609
  canTrack: e
610
610
  });
611
611
  return {
612
612
  sessionId: t,
613
613
  visitorId: n
614
614
  };
615
- }, cn = async ({
615
+ }, ln = async ({
616
616
  type: e,
617
617
  canTrack: t,
618
618
  apiKey: n,
@@ -626,7 +626,7 @@ const Ke = "builderSessionId", _t = async ({
626
626
  url: location.href,
627
627
  ...o
628
628
  },
629
- ...await ln({
629
+ ...await an({
630
630
  canTrack: t
631
631
  }),
632
632
  userAttributes: Oe(),
@@ -642,7 +642,7 @@ async function ue(e) {
642
642
  return fetch("https://cdn.builder.io/api/v1/track", {
643
643
  method: "POST",
644
644
  body: JSON.stringify({
645
- events: [await cn(e)]
645
+ events: [await ln(e)]
646
646
  }),
647
647
  headers: {
648
648
  "content-type": "application/json"
@@ -655,15 +655,15 @@ async function ue(e) {
655
655
  const Ni = (e) => ue({
656
656
  ...e,
657
657
  canTrack: !0
658
- }), dn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
658
+ }), cn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
659
659
  function Je(e, t) {
660
660
  if (!t.origin.startsWith("http") && !t.origin.startsWith("https"))
661
661
  return !1;
662
662
  const n = new URL(t.origin), o = n.hostname;
663
- return (e || dn).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
663
+ return (e || cn).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
664
664
  }
665
- const un = "2.0.20", pn = () => {
666
- qt("insertMenu", {
665
+ const dn = "2.0.21", un = () => {
666
+ Kt("insertMenu", {
667
667
  name: "_default",
668
668
  default: !0,
669
669
  items: [{
@@ -692,7 +692,7 @@ const Ge = (e = {}) => {
692
692
  type: "builder.sdkInfo",
693
693
  data: {
694
694
  target: E,
695
- version: un,
695
+ version: dn,
696
696
  supportsPatchUpdates: !1,
697
697
  // Supports builder-model="..." attribute which is needed to
698
698
  // scope our '+ add block' button styling
@@ -792,24 +792,24 @@ const Ge = (e = {}) => {
792
792
  return window.addEventListener("message", o), () => {
793
793
  window.removeEventListener("message", o);
794
794
  };
795
- }, mn = "builder.tests", fe = (e) => `${mn}.${e}`, hn = ({
795
+ }, pn = "builder.tests", fe = (e) => `${pn}.${e}`, mn = ({
796
796
  contentId: e
797
797
  }) => Me({
798
798
  name: fe(e),
799
799
  canTrack: !0
800
- }), fn = ({
800
+ }), hn = ({
801
801
  contentId: e
802
802
  }) => Ue({
803
803
  name: fe(e),
804
804
  canTrack: !0
805
- }), bn = ({
805
+ }), fn = ({
806
806
  contentId: e,
807
807
  value: t
808
- }) => He({
808
+ }) => je({
809
809
  name: fe(e),
810
810
  value: t,
811
811
  canTrack: !0
812
- }), Qe = (e) => L(e.id) && L(e.variations) && Object.keys(e.variations).length > 0, gn = ({
812
+ }), Qe = (e) => L(e.id) && L(e.variations) && Object.keys(e.variations).length > 0, bn = ({
813
813
  id: e,
814
814
  variations: t
815
815
  }) => {
@@ -823,8 +823,8 @@ const Ge = (e = {}) => {
823
823
  }
824
824
  return e;
825
825
  }, Xe = (e) => {
826
- const t = gn(e);
827
- return bn({
826
+ const t = bn(e);
827
+ return fn({
828
828
  contentId: e.id,
829
829
  value: t
830
830
  }).catch((n) => {
@@ -844,7 +844,7 @@ const Ge = (e = {}) => {
844
844
  testVariationId: n.id,
845
845
  testVariationName: n.name || (n.id === e.id ? "Default" : "")
846
846
  };
847
- }, yn = ({
847
+ }, gn = ({
848
848
  item: e,
849
849
  canTrack: t
850
850
  }) => {
@@ -854,7 +854,7 @@ const Ge = (e = {}) => {
854
854
  return;
855
855
  if (!Qe(e))
856
856
  return e;
857
- const n = fn({
857
+ const n = hn({
858
858
  contentId: e.id
859
859
  }) || Xe({
860
860
  variations: e.variations,
@@ -867,13 +867,13 @@ const Ge = (e = {}) => {
867
867
  ...e,
868
868
  ...o
869
869
  };
870
- }, kn = async ({
870
+ }, yn = async ({
871
871
  item: e,
872
872
  canTrack: t
873
873
  }) => {
874
874
  if (!t || !Qe(e))
875
875
  return e;
876
- const o = await hn({
876
+ const o = await mn({
877
877
  contentId: e.id
878
878
  }) || Xe({
879
879
  variations: e.variations,
@@ -886,18 +886,18 @@ const Ge = (e = {}) => {
886
886
  ...e,
887
887
  ...r
888
888
  };
889
- }, Y = (e) => L(e) ? e : !0;
890
- function vn() {
889
+ }, G = (e) => L(e) ? e : !0;
890
+ function kn() {
891
891
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
892
892
  }
893
- function Sn() {
894
- const e = vn().fetch;
893
+ function vn() {
894
+ const e = kn().fetch;
895
895
  if (typeof e > "u")
896
896
  throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
897
897
  For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
898
898
  return e;
899
899
  }
900
- const _e = Sn();
900
+ const Sn = vn();
901
901
  function pe(e, t = null, n = ".") {
902
902
  return Object.keys(e).reduce((o, r) => {
903
903
  const i = e[r], s = [t, r].filter(Boolean).join(n);
@@ -910,10 +910,10 @@ function pe(e, t = null, n = ".") {
910
910
  };
911
911
  }, {});
912
912
  }
913
- function et(e, t, n = {}) {
913
+ function _e(e, t, n = {}) {
914
914
  for (const o in e) {
915
915
  const r = e[o], i = t ? t + "." + o : o;
916
- r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ? et(r, i, n) : n[i] = r;
916
+ r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ? _e(r, i, n) : n[i] = r;
917
917
  }
918
918
  return n;
919
919
  }
@@ -944,21 +944,21 @@ const Cn = "v3", Re = (e) => typeof e == "number" && !isNaN(e) && e >= 0, be = (
944
944
  const F = pe({
945
945
  sort: v
946
946
  });
947
- for (const H in F)
948
- T.searchParams.set(H, JSON.stringify(F[H]));
947
+ for (const j in F)
948
+ T.searchParams.set(j, JSON.stringify(F[j]));
949
949
  }
950
- const ut = {
951
- ...Jt(),
950
+ const dt = {
951
+ ...zt(),
952
952
  ...We(e.options || {})
953
- }, Se = pe(ut);
953
+ }, Se = pe(dt);
954
954
  for (const F in Se)
955
955
  T.searchParams.set(F, String(Se[F]));
956
956
  if (n && T.searchParams.set("userAttributes", JSON.stringify(n)), o) {
957
- const F = et({
957
+ const F = _e({
958
958
  query: o
959
959
  });
960
- for (const H in F)
961
- T.searchParams.set(H, JSON.stringify(F[H]));
960
+ for (const j in F)
961
+ T.searchParams.set(j, JSON.stringify(F[j]));
962
962
  }
963
963
  return T;
964
964
  }, wn = (e) => "results" in e;
@@ -971,15 +971,15 @@ async function ge(e) {
971
971
  }
972
972
  const Tn = async (e) => {
973
973
  const t = be(e);
974
- return await (await (e.fetch ?? _e)(t.href, e.fetchOptions)).json();
974
+ return await (await (e.fetch ?? Sn)(t.href, e.fetchOptions)).json();
975
975
  }, In = async (e, t, n = be(e)) => {
976
- const o = Y(e.canTrack);
976
+ const o = G(e.canTrack);
977
977
  if (n.search.includes("preview="), !o || !(I() || E === "reactNative"))
978
978
  return t.results;
979
979
  try {
980
980
  const r = [];
981
981
  for (const i of t.results)
982
- r.push(await kn({
982
+ r.push(await yn({
983
983
  item: i,
984
984
  canTrack: o
985
985
  }));
@@ -1047,17 +1047,17 @@ function Bn(e) {
1047
1047
  for (const t of e)
1048
1048
  switch (t.trigger) {
1049
1049
  case "pageLoad":
1050
- ot(t);
1050
+ nt(t);
1051
1051
  break;
1052
1052
  case "scrollInView":
1053
1053
  Pn(t);
1054
1054
  break;
1055
1055
  }
1056
1056
  }
1057
- function tt(e) {
1057
+ function et(e) {
1058
1058
  console.warn(`Cannot animate element: element with ID ${e} not found!`);
1059
1059
  }
1060
- function nt(e, t) {
1060
+ function tt(e, t) {
1061
1061
  const n = En(e), o = getComputedStyle(t), r = e.steps[0].styles, i = e.steps[e.steps.length - 1].styles, s = [r, i];
1062
1062
  for (const l of s)
1063
1063
  for (const a of n)
@@ -1070,14 +1070,14 @@ function En(e) {
1070
1070
  t.indexOf(o) === -1 && t.push(o);
1071
1071
  return t;
1072
1072
  }
1073
- function ot(e) {
1073
+ function nt(e) {
1074
1074
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
1075
1075
  if (!t.length) {
1076
- tt(e.elementId || e.id || "");
1076
+ et(e.elementId || e.id || "");
1077
1077
  return;
1078
1078
  }
1079
1079
  Array.from(t).forEach((n) => {
1080
- nt(e, n), n.style.transition = "none", n.style.transitionDelay = "0", q(n.style, e.steps[0].styles), setTimeout(() => {
1080
+ tt(e, n), n.style.transition = "none", n.style.transitionDelay = "0", q(n.style, e.steps[0].styles), setTimeout(() => {
1081
1081
  n.style.transition = `all ${e.duration}s ${ye(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), q(n.style, e.steps[1].styles), setTimeout(() => {
1082
1082
  n.style.transition = "", n.style.transitionDelay = "";
1083
1083
  }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
@@ -1087,11 +1087,11 @@ function ot(e) {
1087
1087
  function Pn(e) {
1088
1088
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
1089
1089
  if (!t.length) {
1090
- tt(e.elementId || e.id || "");
1090
+ et(e.elementId || e.id || "");
1091
1091
  return;
1092
1092
  }
1093
1093
  Array.from(t).forEach((n) => {
1094
- nt(e, n);
1094
+ tt(e, n);
1095
1095
  let o = !1, r = !1;
1096
1096
  function i() {
1097
1097
  !o && l(n) ? (o = !0, r = !0, setTimeout(() => {
@@ -1119,10 +1119,10 @@ function Pn(e) {
1119
1119
  }), i();
1120
1120
  });
1121
1121
  }
1122
- const rt = (e) => Object.entries(e).map(([n, o]) => {
1122
+ const ot = (e) => Object.entries(e).map(([n, o]) => {
1123
1123
  if (typeof o == "string")
1124
1124
  return `${ye(n)}: ${o};`;
1125
- }).filter(L), xn = (e) => rt(e).join(`
1125
+ }).filter(L), xn = (e) => ot(e).join(`
1126
1126
  `), Di = ({
1127
1127
  mediaQuery: e,
1128
1128
  className: t,
@@ -1143,18 +1143,18 @@ function An({
1143
1143
  const Li = ({
1144
1144
  block: e,
1145
1145
  context: t
1146
- }) => it(An({
1146
+ }) => rt(An({
1147
1147
  style: e.style || {},
1148
1148
  context: t,
1149
1149
  block: e
1150
1150
  }));
1151
- function it(e) {
1151
+ function rt(e) {
1152
1152
  switch (E) {
1153
1153
  case "svelte":
1154
1154
  case "vue":
1155
1155
  case "solid":
1156
1156
  case "angular":
1157
- return rt(e).join(" ");
1157
+ return ot(e).join(" ");
1158
1158
  case "qwik":
1159
1159
  case "reactNative":
1160
1160
  case "react":
@@ -1186,7 +1186,7 @@ const Vn = ({
1186
1186
  } = e;
1187
1187
  if (!(n != null && n.collection))
1188
1188
  return;
1189
- const r = G({
1189
+ const r = Y({
1190
1190
  code: n.collection,
1191
1191
  localState: t.localState,
1192
1192
  rootState: t.rootState,
@@ -1235,22 +1235,22 @@ const Vn = ({
1235
1235
  "Error while attempting to dynamically import component DynamicDiv at ../dynamic-div.vue",
1236
1236
  e
1237
1237
  ), e;
1238
- }), Un = () => import("./block-styles-McsYN1Hd.js").then((e) => e.default).catch((e) => {
1238
+ }), Un = () => import("./block-styles-e9UJWxRw.js").then((e) => e.default).catch((e) => {
1239
1239
  throw console.error(
1240
1240
  "Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
1241
1241
  e
1242
1242
  ), e;
1243
- }), Mn = () => import("./block-wrapper-kIbAHG8K.js").then((e) => e.default).catch((e) => {
1243
+ }), Mn = () => import("./block-wrapper-BBK1LMQ8.js").then((e) => e.default).catch((e) => {
1244
1244
  throw console.error(
1245
1245
  "Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
1246
1246
  e
1247
1247
  ), e;
1248
- }), Hn = () => import("./component-ref-VsUS3j2W.js").then((e) => e.default).catch((e) => {
1248
+ }), jn = () => import("./component-ref-cecMbUuX.js").then((e) => e.default).catch((e) => {
1249
1249
  throw console.error(
1250
1250
  "Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
1251
1251
  e
1252
1252
  ), e;
1253
- }), jn = () => import("./repeated-block-9kzlJZ0z.js").then((e) => e.default).catch((e) => {
1253
+ }), Hn = () => import("./repeated-block-4KouNbyE.js").then((e) => e.default).catch((e) => {
1254
1254
  throw console.error(
1255
1255
  "Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
1256
1256
  e
@@ -1258,11 +1258,11 @@ const Vn = ({
1258
1258
  }), Kn = f({
1259
1259
  name: "block",
1260
1260
  components: {
1261
- BlockStyles: j(Un),
1262
- RepeatedBlock: j(jn),
1263
- ComponentRef: j(Hn),
1264
- BlockWrapper: j(Mn),
1265
- DynamicDiv: j(Ln)
1261
+ BlockStyles: H(Un),
1262
+ RepeatedBlock: H(Hn),
1263
+ ComponentRef: H(jn),
1264
+ BlockWrapper: H(Mn),
1265
+ DynamicDiv: H(Ln)
1266
1266
  },
1267
1267
  props: ["block", "context", "registeredComponents", "linkComponent"],
1268
1268
  data() {
@@ -1293,7 +1293,7 @@ const Vn = ({
1293
1293
  },
1294
1294
  processedBlock() {
1295
1295
  var t;
1296
- return (t = this.block.repeat) != null && t.collection ? this.block : Mt({
1296
+ return (t = this.block.repeat) != null && t.collection ? this.block : Ut({
1297
1297
  block: this.block,
1298
1298
  localState: this.context.localState,
1299
1299
  rootState: this.context.rootState,
@@ -1329,7 +1329,7 @@ const Vn = ({
1329
1329
  blockChildren: this.processedBlock.children ?? [],
1330
1330
  componentRef: (e = this.blockComponent) == null ? void 0 : e.component,
1331
1331
  componentOptions: {
1332
- ...It(this.processedBlock),
1332
+ ...Tt(this.processedBlock),
1333
1333
  ...Fn(this.blockComponent, this.processedBlock),
1334
1334
  ...Dn(this.blockComponent, this.context),
1335
1335
  ...Nn(this.blockComponent, this.linkComponent),
@@ -1542,7 +1542,7 @@ const Q = /* @__PURE__ */ b(Xn, [["render", Zn]]), _n = /* @__PURE__ */ Object.f
1542
1542
  },
1543
1543
  name: "inlined-styles",
1544
1544
  props: ["styles", "id", "nonce"]
1545
- }), st = {
1545
+ }), it = {
1546
1546
  small: {
1547
1547
  min: 320,
1548
1548
  default: 321,
@@ -1558,11 +1558,11 @@ const Q = /* @__PURE__ */ b(Xn, [["render", Zn]]), _n = /* @__PURE__ */ Object.f
1558
1558
  default: 991,
1559
1559
  max: 1200
1560
1560
  }
1561
- }, Mi = (e, t = st) => `@media (max-width: ${t[e].max}px)`, eo = ({
1561
+ }, Mi = (e, t = it) => `@media (max-width: ${t[e].max}px)`, eo = ({
1562
1562
  small: e,
1563
1563
  medium: t
1564
1564
  }) => {
1565
- const n = he(st);
1565
+ const n = he(it);
1566
1566
  if (!e || !t)
1567
1567
  return n;
1568
1568
  const o = Math.floor(e / 2);
@@ -1713,7 +1713,7 @@ const Q = /* @__PURE__ */ b(Xn, [["render", Zn]]), _n = /* @__PURE__ */ Object.f
1713
1713
  href: e.link
1714
1714
  } : {},
1715
1715
  [ee()]: "builder-column",
1716
- style: it(this.columnCssVars(t))
1716
+ style: rt(this.columnCssVars(t))
1717
1717
  };
1718
1718
  }
1719
1719
  }
@@ -2863,7 +2863,7 @@ function Uo(e, t, n, o, r, i) {
2863
2863
  ])) : S("", !0)
2864
2864
  ]);
2865
2865
  }
2866
- const Mo = /* @__PURE__ */ b(Fo, [["render", Uo]]), Ho = {
2866
+ const Mo = /* @__PURE__ */ b(Fo, [["render", Uo]]), jo = {
2867
2867
  shouldReceiveBuilderProps: {
2868
2868
  builderBlock: !1,
2869
2869
  builderContext: !0
@@ -2885,7 +2885,7 @@ const Mo = /* @__PURE__ */ b(Fo, [["render", Uo]]), Ho = {
2885
2885
  height: "auto",
2886
2886
  textAlign: "center"
2887
2887
  }
2888
- }, jo = f({
2888
+ }, Ho = f({
2889
2889
  name: "builder-text",
2890
2890
  props: ["builderContext", "text"],
2891
2891
  computed: {
@@ -2899,7 +2899,7 @@ const Mo = /* @__PURE__ */ b(Fo, [["render", Uo]]), Ho = {
2899
2899
  } = e;
2900
2900
  return String(((i = this.text) == null ? void 0 : i.toString()) || "").replace(
2901
2901
  /{{([^}]+)}}/g,
2902
- (s, l) => G({
2902
+ (s, l) => Y({
2903
2903
  code: l,
2904
2904
  context: t,
2905
2905
  localState: n,
@@ -2920,7 +2920,7 @@ function qo(e, t, n, o, r, i) {
2920
2920
  }
2921
2921
  }, null, 8, Ko);
2922
2922
  }
2923
- const zo = /* @__PURE__ */ b(jo, [["render", qo]]), Jo = {
2923
+ const zo = /* @__PURE__ */ b(Ho, [["render", qo]]), Jo = {
2924
2924
  name: "Custom Code",
2925
2925
  static: !0,
2926
2926
  requiredPermissions: ["editCode"],
@@ -3898,7 +3898,7 @@ const Dr = /* @__PURE__ */ b(Nr, [["render", Fr]]), Lr = {
3898
3898
  }
3899
3899
  }), Mr = { style: {
3900
3900
  position: "relative"
3901
- } }, Hr = ["preload", "src", "poster"], jr = ["src"], Kr = {
3901
+ } }, jr = ["preload", "src", "poster"], Hr = ["src"], Kr = {
3902
3902
  key: 1,
3903
3903
  style: {
3904
3904
  display: "flex",
@@ -3946,8 +3946,8 @@ function zr(e, t, n, o, r, i) {
3946
3946
  key: 0,
3947
3947
  type: "video/mp4",
3948
3948
  src: e.video
3949
- }, null, 8, jr))
3950
- ], 16, Hr),
3949
+ }, null, 8, Hr))
3950
+ ], 16, jr),
3951
3951
  e.aspectRatio && !(e.fitContent && ((a = (l = e.builderBlock) == null ? void 0 : l.children) != null && a.length)) ? (c(), m("div", {
3952
3952
  key: 0,
3953
3953
  style: D({
@@ -3993,7 +3993,7 @@ const Jr = /* @__PURE__ */ b(Ur, [["render", zr]]), Gr = () => [{
3993
3993
  component: Jr,
3994
3994
  ...Lr
3995
3995
  }], Ee = () => [{
3996
- component: Ct,
3996
+ component: St,
3997
3997
  ...$o
3998
3998
  }, {
3999
3999
  component: ro,
@@ -4015,7 +4015,7 @@ const Jr = /* @__PURE__ */ b(Ur, [["render", zr]]), Gr = () => [{
4015
4015
  ...No
4016
4016
  }, {
4017
4017
  component: zo,
4018
- ...Ho
4018
+ ...jo
4019
4019
  }, {
4020
4020
  component: Mo,
4021
4021
  ...Oo
@@ -4112,25 +4112,25 @@ const Jr = /* @__PURE__ */ b(Ur, [["render", zr]]), Gr = () => [{
4112
4112
  thisScriptEl?.remove();
4113
4113
  }
4114
4114
  return;
4115
- }`, at = "builderIoAbTest", lt = "builderIoRenderContent", _ = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
4115
+ }`, st = "builderIoAbTest", at = "builderIoRenderContent", _ = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
4116
4116
  ...t,
4117
4117
  testVariationId: t.id,
4118
4118
  id: e == null ? void 0 : e.id
4119
4119
  })), Xr = ({
4120
4120
  canTrack: e,
4121
4121
  content: t
4122
- }) => !(!(_(t).length > 0) || !e), Zr = (e) => e === "react" || e === "reactNative", ct = Zr(E), _r = () => `
4123
- window.${at} = ${Yr}
4124
- window.${lt} = ${Qr}
4122
+ }) => !(!(_(t).length > 0) || !e), Zr = (e) => e === "react" || e === "reactNative", lt = Zr(E), _r = () => `
4123
+ window.${st} = ${Yr}
4124
+ window.${at} = ${Qr}
4125
4125
  `, ei = (e, t) => `
4126
- window.${at}(
4127
- "${t}",${JSON.stringify(e)}, ${ct}
4126
+ window.${st}(
4127
+ "${t}",${JSON.stringify(e)}, ${lt}
4128
4128
  )`, ti = ({
4129
4129
  contentId: e,
4130
4130
  variationId: t
4131
- }) => `window.${lt}(
4132
- "${t}", "${e}", ${ct}
4133
- )`, dt = f({
4131
+ }) => `window.${at}(
4132
+ "${t}", "${e}", ${lt}
4133
+ )`, ct = f({
4134
4134
  render() {
4135
4135
  return Ae("script", {
4136
4136
  innerHTML: this.scriptStr,
@@ -4268,31 +4268,28 @@ font-weight: ${s};
4268
4268
  [ce.key]: e.builderContextSignal
4269
4269
  };
4270
4270
  },
4271
+ created() {
4272
+ this.runHttpRequests(), this.emitStateUpdate();
4273
+ },
4271
4274
  mounted() {
4272
- (() => {
4273
- var n, o;
4274
- if (I()) {
4275
- if (R() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
4276
- new CustomEvent("initeditingbldr")
4277
- ), this.builderContextSignal.content && Y(this.canTrack)) {
4278
- const i = (n = this.builderContextSignal.content) == null ? void 0 : n.testVariationId, s = (o = this.builderContextSignal.content) == null ? void 0 : o.id, l = this.apiKey;
4279
- ue({
4280
- type: "impression",
4281
- canTrack: !0,
4282
- contentId: s,
4283
- apiKey: l,
4284
- variationId: i !== s ? i : void 0
4285
- });
4286
- }
4287
- Ht() && !R() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
4288
- new CustomEvent("initpreviewingbldr")
4289
- );
4275
+ var e, t;
4276
+ if (I()) {
4277
+ if (R() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
4278
+ new CustomEvent("initeditingbldr")
4279
+ ), this.builderContextSignal.content && G(this.canTrack)) {
4280
+ const o = (e = this.builderContextSignal.content) == null ? void 0 : e.testVariationId, r = (t = this.builderContextSignal.content) == null ? void 0 : t.id, i = this.apiKey;
4281
+ ue({
4282
+ type: "impression",
4283
+ canTrack: !0,
4284
+ contentId: r,
4285
+ apiKey: i,
4286
+ variationId: o !== r ? o : void 0
4287
+ });
4290
4288
  }
4291
- })(), (() => {
4292
- this.apiKey || B.error(
4293
- "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
4294
- ), this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
4295
- })();
4289
+ Mt() && !R() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
4290
+ new CustomEvent("initpreviewingbldr")
4291
+ );
4292
+ }
4296
4293
  },
4297
4294
  watch: {
4298
4295
  onUpdateHook0: {
@@ -4302,30 +4299,18 @@ font-weight: ${s};
4302
4299
  immediate: !0
4303
4300
  },
4304
4301
  onUpdateHook1: {
4305
- handler() {
4306
- this.evaluateJsCode();
4307
- },
4308
- immediate: !0
4309
- },
4310
- onUpdateHook2: {
4311
- handler() {
4312
- this.runHttpRequests();
4313
- },
4314
- immediate: !0
4315
- },
4316
- onUpdateHook3: {
4317
4302
  handler() {
4318
4303
  this.emitStateUpdate();
4319
4304
  },
4320
4305
  immediate: !0
4321
4306
  },
4322
- onUpdateHook4: {
4307
+ onUpdateHook2: {
4323
4308
  handler() {
4324
4309
  this.data && this.mergeNewRootState(this.data);
4325
4310
  },
4326
4311
  immediate: !0
4327
4312
  },
4328
- onUpdateHook5: {
4313
+ onUpdateHook3: {
4329
4314
  handler() {
4330
4315
  this.locale && this.mergeNewRootState({
4331
4316
  locale: this.locale
@@ -4353,28 +4338,16 @@ font-weight: ${s};
4353
4338
  };
4354
4339
  },
4355
4340
  onUpdateHook1() {
4356
- var e, t;
4357
- return {
4358
- 0: (t = (e = this.builderContextSignal.content) == null ? void 0 : e.data) == null ? void 0 : t.jsCode
4359
- };
4360
- },
4361
- onUpdateHook2() {
4362
- var e, t;
4363
- return {
4364
- 0: (t = (e = this.builderContextSignal.content) == null ? void 0 : e.data) == null ? void 0 : t.httpRequests
4365
- };
4366
- },
4367
- onUpdateHook3() {
4368
4341
  return {
4369
4342
  0: this.builderContextSignal.rootState
4370
4343
  };
4371
4344
  },
4372
- onUpdateHook4() {
4345
+ onUpdateHook2() {
4373
4346
  return {
4374
4347
  0: this.data
4375
4348
  };
4376
4349
  },
4377
- onUpdateHook5() {
4350
+ onUpdateHook3() {
4378
4351
  return {
4379
4352
  0: this.locale
4380
4353
  };
@@ -4421,7 +4394,7 @@ font-weight: ${s};
4421
4394
  });
4422
4395
  },
4423
4396
  animation: (t) => {
4424
- ot(t);
4397
+ nt(t);
4425
4398
  },
4426
4399
  contentUpdate: (t) => {
4427
4400
  this.mergeNewContent(t);
@@ -4429,28 +4402,13 @@ font-weight: ${s};
4429
4402
  }
4430
4403
  })(e);
4431
4404
  },
4432
- evaluateJsCode() {
4433
- var t, n;
4434
- const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
4435
- e && G({
4436
- code: e,
4437
- context: this.context || {},
4438
- localState: void 0,
4439
- rootState: this.builderContextSignal.rootState,
4440
- rootSetState: this.builderContextSignal.rootSetState,
4441
- /**
4442
- * We don't want to cache the result of the JS code, since it's arbitrary side effect code.
4443
- */
4444
- enableCache: !1
4445
- });
4446
- },
4447
4405
  onClick(e) {
4448
4406
  var t, n;
4449
4407
  if (this.builderContextSignal.content) {
4450
4408
  const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, r = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
4451
4409
  ue({
4452
4410
  type: "click",
4453
- canTrack: Y(this.canTrack),
4411
+ canTrack: G(this.canTrack),
4454
4412
  contentId: r,
4455
4413
  apiKey: this.apiKey,
4456
4414
  variationId: o !== r ? o : void 0,
@@ -4470,7 +4428,7 @@ font-weight: ${s};
4470
4428
  const i = r.replace(
4471
4429
  /{{([^}]+)}}/g,
4472
4430
  (s, l) => String(
4473
- G({
4431
+ Y({
4474
4432
  code: l,
4475
4433
  context: this.context || {},
4476
4434
  localState: void 0,
@@ -4480,7 +4438,7 @@ font-weight: ${s};
4480
4438
  })
4481
4439
  )
4482
4440
  );
4483
- _e(i).then((s) => s.json()).then((s) => {
4441
+ fetch(i).then((s) => s.json()).then((s) => {
4484
4442
  this.mergeNewRootState({
4485
4443
  [o]: s
4486
4444
  }), this.httpReqsData[o] = !0;
@@ -4507,7 +4465,7 @@ font-weight: ${s};
4507
4465
  );
4508
4466
  },
4509
4467
  elementRef_onIniteditingbldr(e) {
4510
- window.addEventListener("message", this.processMessage), pn(), Ge({
4468
+ window.addEventListener("message", this.processMessage), un(), Ge({
4511
4469
  ...this.locale ? {
4512
4470
  locale: this.locale
4513
4471
  } : {},
@@ -4550,7 +4508,7 @@ function pi(e, t, n, o, r, i) {
4550
4508
  onClick: (u) => e.onClick(u),
4551
4509
  "builder-content-id": (s = e.builderContextSignal.content) == null ? void 0 : s.id,
4552
4510
  "builder-model": e.model,
4553
- class: e.getWrapperClassName(((l = e.content) == null ? void 0 : l.testVariationId) || ((a = e.content) == null ? void 0 : a.id)),
4511
+ className: e.getWrapperClassName(((l = e.content) == null ? void 0 : l.testVariationId) || ((a = e.content) == null ? void 0 : a.id)),
4554
4512
  onIniteditingbldr: (u) => e.elementRef_onIniteditingbldr(u),
4555
4513
  onInitpreviewingbldr: (u) => e.elementRef_onInitpreviewingbldr(u)
4556
4514
  }, { ...e.showContentProps, ...e.contentWrapperProps }), {
@@ -4558,7 +4516,7 @@ function pi(e, t, n, o, r, i) {
4558
4516
  x(e.$slots, "default")
4559
4517
  ]),
4560
4518
  _: 3
4561
- }, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : S("", !0);
4519
+ }, 16, ["onClick", "builder-content-id", "builder-model", "className", "onIniteditingbldr", "onInitpreviewingbldr"])) : S("", !0);
4562
4520
  }
4563
4521
  const mi = /* @__PURE__ */ b(ui, [["render", pi]]), hi = f({
4564
4522
  name: "content-styles",
@@ -4614,24 +4572,24 @@ const bi = /* @__PURE__ */ b(hi, [["render", fi]]), gi = ({
4614
4572
  ...t
4615
4573
  },
4616
4574
  meta: e == null ? void 0 : e.meta
4617
- } : void 0, ki = ft, vi = f({
4575
+ } : void 0, ki = ht, vi = f({
4618
4576
  name: "content-component",
4619
4577
  components: {
4620
4578
  EnableEditor: mi,
4621
- InlinedScript: dt,
4579
+ InlinedScript: ct,
4622
4580
  ContentStyles: bi,
4623
4581
  Blocks: M,
4624
4582
  DynamicDiv: Q
4625
4583
  },
4626
4584
  props: [
4585
+ "apiKey",
4586
+ "context",
4627
4587
  "content",
4628
4588
  "customComponents",
4629
4589
  "model",
4630
4590
  "data",
4631
4591
  "locale",
4632
- "context",
4633
4592
  "canTrack",
4634
- "apiKey",
4635
4593
  "apiVersion",
4636
4594
  "blocksWrapper",
4637
4595
  "blocksWrapperProps",
@@ -4709,6 +4667,27 @@ const bi = /* @__PURE__ */ b(hi, [["render", fi]]), gi = ({
4709
4667
  }
4710
4668
  };
4711
4669
  },
4670
+ created() {
4671
+ var t, n;
4672
+ this.apiKey || B.error(
4673
+ "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
4674
+ );
4675
+ const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
4676
+ e && Y({
4677
+ code: e,
4678
+ context: this.context || {},
4679
+ localState: void 0,
4680
+ rootState: this.builderContextSignal.rootState,
4681
+ rootSetState: (o) => {
4682
+ this.builderContextSignal.rootState = o;
4683
+ },
4684
+ isExpression: !1,
4685
+ /**
4686
+ * We don't want to cache the result of the JS code, since it's arbitrary side effect code.
4687
+ */
4688
+ enableCache: !1
4689
+ });
4690
+ },
4712
4691
  methods: {
4713
4692
  contentSetState(e) {
4714
4693
  this.builderContextSignal.rootState = e;
@@ -4764,7 +4743,7 @@ function Si(e, t, n, o, r, i) {
4764
4743
  const Ci = /* @__PURE__ */ b(vi, [["render", Si]]), wi = f({
4765
4744
  name: "content-variants",
4766
4745
  components: {
4767
- InlinedScript: dt,
4746
+ InlinedScript: ct,
4768
4747
  InlinedStyles: ve,
4769
4748
  ContentComponent: Ci
4770
4749
  },
@@ -4791,7 +4770,7 @@ const Ci = /* @__PURE__ */ b(vi, [["render", Si]]), wi = f({
4791
4770
  data() {
4792
4771
  return {
4793
4772
  shouldRenderVariants: Xr({
4794
- canTrack: Y(this.canTrack),
4773
+ canTrack: G(this.canTrack),
4795
4774
  content: this.content
4796
4775
  }),
4797
4776
  TARGET: E,
@@ -4820,9 +4799,9 @@ const Ci = /* @__PURE__ */ b(vi, [["render", Si]]), wi = f({
4820
4799
  return this.shouldRenderVariants ? {
4821
4800
  ...this.content,
4822
4801
  testVariationId: (e = this.content) == null ? void 0 : e.id
4823
- } : yn({
4802
+ } : gn({
4824
4803
  item: this.content,
4825
- canTrack: Y(this.canTrack)
4804
+ canTrack: G(this.canTrack)
4826
4805
  });
4827
4806
  }
4828
4807
  }
@@ -5022,20 +5001,20 @@ export {
5022
5001
  L as c,
5023
5002
  ye as d,
5024
5003
  b as e,
5025
- G as f,
5004
+ Y as f,
5026
5005
  eo as g,
5027
5006
  Li as h,
5028
5007
  ee as i,
5029
5008
  ce as j,
5030
- Ct as k,
5009
+ St as k,
5031
5010
  Ei as l,
5032
5011
  zo as m,
5033
5012
  M as n,
5034
5013
  Ii as o,
5035
5014
  R as p,
5036
- Ht as q,
5015
+ Mt as q,
5037
5016
  jt as r,
5038
- qt as s,
5017
+ Kt as s,
5039
5018
  Wi as t,
5040
5019
  Le as u,
5041
5020
  Ni as v,