@builder.io/sdk-react-nextjs 0.14.17 → 0.14.20

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 (54) hide show
  1. package/lib/{node/USE_CLIENT_BUNDLE-8dadab11.js → browser/USE_CLIENT_BUNDLE-b0af90c6.js} +251 -247
  2. package/lib/browser/USE_CLIENT_BUNDLE-eb52194d.cjs +21 -0
  3. package/lib/{edge/USE_SERVER_BUNDLE-4035cf43.cjs → browser/USE_SERVER_BUNDLE-719f53b1.cjs} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-6b33cfd7.js → browser/USE_SERVER_BUNDLE-d83b7d23.js} +1 -1
  5. package/lib/browser/bundle-12d2c3ee.cjs +169 -0
  6. package/lib/browser/{bundle-974bbd75.js → bundle-83df769b.js} +590 -578
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +4 -4
  9. package/lib/{browser/USE_CLIENT_BUNDLE-f685a480.js → edge/USE_CLIENT_BUNDLE-2d9b453e.js} +251 -247
  10. package/lib/edge/USE_CLIENT_BUNDLE-47285217.cjs +21 -0
  11. package/lib/{node/USE_SERVER_BUNDLE-d847a064.cjs → edge/USE_SERVER_BUNDLE-9e66cbc6.cjs} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-d7d118c1.js → edge/USE_SERVER_BUNDLE-c879ad04.js} +1 -1
  13. package/lib/edge/{bundle-0e4ba4de.js → bundle-73367f5c.js} +1016 -1004
  14. package/lib/edge/bundle-8a8fdc14.cjs +189 -0
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +4 -4
  17. package/lib/{edge/USE_CLIENT_BUNDLE-bf35f13e.js → node/USE_CLIENT_BUNDLE-68277019.js} +251 -247
  18. package/lib/node/USE_CLIENT_BUNDLE-8d2c6823.cjs +21 -0
  19. package/lib/{browser/USE_SERVER_BUNDLE-fbe70d66.js → node/USE_SERVER_BUNDLE-84ab22ef.js} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-1ee4e92a.cjs → node/USE_SERVER_BUNDLE-a4d10e9b.cjs} +1 -1
  21. package/lib/node/{bundle-a8217ddb.js → bundle-08369562.js} +256 -242
  22. package/lib/node/{bundle-39fe7680.cjs → bundle-832f5a95.cjs} +18 -18
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +4 -4
  25. package/package.json +1 -1
  26. package/types/cjs/blocks/columns/columns.types.d.ts +1 -1
  27. package/types/cjs/blocks/columns/helpers.d.ts +1 -0
  28. package/types/cjs/blocks/tabs/component-info.d.ts +2 -0
  29. package/types/cjs/blocks/tabs/index.d.ts +1 -0
  30. package/types/cjs/blocks/tabs/tabs.d.ts +4 -0
  31. package/types/cjs/blocks/tabs/tabs.types.d.ts +13 -0
  32. package/types/cjs/blocks/text/text.types.d.ts +2 -1
  33. package/types/cjs/components/block/block.helpers.d.ts +4 -2
  34. package/types/cjs/components/content/components/styles.helpers.d.ts +1 -0
  35. package/types/cjs/components/dynamic-div.d.ts +15 -0
  36. package/types/cjs/constants/sdk-version.d.ts +1 -1
  37. package/types/cjs/types/targets.d.ts +1 -1
  38. package/types/esm/blocks/columns/columns.types.d.ts +1 -1
  39. package/types/esm/blocks/columns/helpers.d.ts +1 -0
  40. package/types/esm/blocks/tabs/component-info.d.ts +2 -0
  41. package/types/esm/blocks/tabs/index.d.ts +1 -0
  42. package/types/esm/blocks/tabs/tabs.d.ts +4 -0
  43. package/types/esm/blocks/tabs/tabs.types.d.ts +13 -0
  44. package/types/esm/blocks/text/text.types.d.ts +2 -1
  45. package/types/esm/components/block/block.helpers.d.ts +4 -2
  46. package/types/esm/components/content/components/styles.helpers.d.ts +1 -0
  47. package/types/esm/components/dynamic-div.d.ts +15 -0
  48. package/types/esm/constants/sdk-version.d.ts +1 -1
  49. package/types/esm/types/targets.d.ts +1 -1
  50. package/lib/browser/USE_CLIENT_BUNDLE-f11159f6.cjs +0 -21
  51. package/lib/browser/bundle-e5f3c905.cjs +0 -169
  52. package/lib/edge/USE_CLIENT_BUNDLE-22f09854.cjs +0 -21
  53. package/lib/edge/bundle-15a88622.cjs +0 -189
  54. package/lib/node/USE_CLIENT_BUNDLE-e62d9c72.cjs +0 -21
@@ -1,10 +1,10 @@
1
- import { jsx as l, Fragment as x, jsxs as R } from "react/jsx-runtime";
1
+ import { jsx as l, Fragment as C, jsxs as R } from "react/jsx-runtime";
2
2
  import "react";
3
- import { I as Oe, B as $e, a as Ne, D as Fe, C as Le, E as Ue, b as De, V as _e, c as Me, F as je, d as He, S as Ke, e as ze } from "./USE_CLIENT_BUNDLE-f685a480.js";
4
- import { LRUCache as qe } from "lru-cache";
3
+ import { LRUCache as Oe } from "lru-cache";
4
+ import { I as Fe, B as Le, a as Ue, D as De, C as _e, E as Me, b as je, V as He, c as Ke, F as ze, d as qe, S as Ye, e as Ge } from "./USE_CLIENT_BUNDLE-b0af90c6.js";
5
5
  import "next/navigation";
6
- const Ye = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), so = (e) => typeof e == "string" && Ye.has(e.toLowerCase()), E = "rsc", M = () => {
7
- switch (E) {
6
+ const Je = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), ho = (e) => typeof e == "string" && Je.has(e.toLowerCase()), T = "rsc", M = () => {
7
+ switch (T) {
8
8
  case "react":
9
9
  case "reactNative":
10
10
  case "rsc":
@@ -13,10 +13,11 @@ const Ye = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr",
13
13
  case "vue":
14
14
  case "solid":
15
15
  case "qwik":
16
+ case "angular":
16
17
  return "class";
17
18
  }
18
19
  };
19
- function Ge(e) {
20
+ function Qe(e) {
20
21
  var t;
21
22
  return {
22
23
  ...(t = e.component) == null ? void 0 : t.options,
@@ -27,36 +28,36 @@ function Ge(e) {
27
28
  builderBlock: e
28
29
  };
29
30
  }
30
- const A = "[Builder.io]: ", C = {
31
+ const A = "[Builder.io]: ", w = {
31
32
  log: (...e) => console.log(A, ...e),
32
33
  error: (...e) => console.error(A, ...e),
33
34
  warn: (...e) => console.warn(A, ...e),
34
35
  debug: (...e) => console.debug(A, ...e)
35
36
  };
36
- function v() {
37
+ function k() {
37
38
  return typeof window < "u" && typeof document < "u";
38
39
  }
39
- const Je = (e) => {
40
+ const Xe = (e) => {
40
41
  const t = {};
41
42
  return e.forEach((n, o) => {
42
43
  t[o] = n;
43
44
  }), t;
44
- }, ce = (e) => e instanceof URLSearchParams ? Je(e) : e, le = (e) => typeof e == "string" ? e : e instanceof URLSearchParams ? e.toString() : new URLSearchParams(e).toString();
45
- function Qe() {
46
- return v() && window.self !== window.top;
45
+ }, de = (e) => e instanceof URLSearchParams ? Xe(e) : e, ue = (e) => typeof e == "string" ? e : e instanceof URLSearchParams ? e.toString() : new URLSearchParams(e).toString();
46
+ function Ze() {
47
+ return k() && window.self !== window.top;
47
48
  }
48
- function de(e) {
49
- return Qe() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
50
- le(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
49
+ function me(e) {
50
+ return Ze() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
51
+ ue(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
51
52
  }
52
- const Xe = () => {
53
- if (v()) {
53
+ const et = () => {
54
+ if (k()) {
54
55
  const e = new URL(location.href);
55
56
  return e.pathname === "" && (e.pathname = "/"), e;
56
57
  } else
57
58
  return console.warn("Cannot get location for tracking in non-browser environment"), null;
58
- }, Ze = () => typeof navigator == "object" && navigator.userAgent || "", ue = () => {
59
- const e = Ze(), t = {
59
+ }, tt = () => typeof navigator == "object" && navigator.userAgent || "", fe = () => {
60
+ const e = tt(), t = {
60
61
  Android() {
61
62
  return e.match(/Android/i);
62
63
  },
@@ -73,15 +74,15 @@ const Xe = () => {
73
74
  return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
74
75
  },
75
76
  any() {
76
- return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || E === "reactNative";
77
+ return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || T === "reactNative";
77
78
  }
78
- }, n = e.match(/Tablet|iPad/i), o = Xe();
79
+ }, n = e.match(/Tablet|iPad/i), o = et();
79
80
  return {
80
81
  urlPath: o == null ? void 0 : o.pathname,
81
82
  host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
82
83
  device: n ? "tablet" : t.any() ? "mobile" : "desktop"
83
84
  };
84
- }, et = ({
85
+ }, nt = ({
85
86
  builder: e,
86
87
  context: t,
87
88
  event: n,
@@ -93,14 +94,14 @@ const Xe = () => {
93
94
  builder: e,
94
95
  context: t,
95
96
  event: n
96
- }), tt = () => ({
97
- isEditing: de(),
98
- isBrowser: v(),
99
- isServer: !v(),
100
- getUserAttributes: () => ue()
101
- }), nt = (e, {
97
+ }), ot = () => ({
98
+ isEditing: me(),
99
+ isBrowser: k(),
100
+ isServer: !k(),
101
+ getUserAttributes: () => fe()
102
+ }), it = (e, {
102
103
  isExpression: t = !0
103
- }) => /* 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, Y = ({
104
+ }) => /* 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, J = ({
104
105
  code: e,
105
106
  builder: t,
106
107
  context: n,
@@ -109,11 +110,11 @@ const Xe = () => {
109
110
  rootSetState: r,
110
111
  rootState: a
111
112
  }) => {
112
- const s = et({
113
+ const s = nt({
113
114
  builder: t,
114
115
  context: n,
115
116
  event: o,
116
- state: me({
117
+ state: he({
117
118
  rootState: a,
118
119
  localState: i,
119
120
  rootSetState: r
@@ -121,7 +122,7 @@ const Xe = () => {
121
122
  });
122
123
  return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
123
124
  };
124
- function me({
125
+ function he({
125
126
  rootState: e,
126
127
  localState: t,
127
128
  rootSetState: n
@@ -131,7 +132,7 @@ function me({
131
132
  if (t && i in t)
132
133
  return t[i];
133
134
  const r = o[i];
134
- return typeof r == "object" && r !== null ? me({
135
+ return typeof r == "object" && r !== null ? he({
135
136
  rootState: r,
136
137
  localState: void 0,
137
138
  rootSetState: n ? (a) => {
@@ -147,17 +148,17 @@ function me({
147
148
  });
148
149
  }
149
150
  const I = (e) => e != null;
150
- function ot() {
151
+ function rt() {
151
152
  var e;
152
153
  return typeof process < "u" && I((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
153
154
  }
154
- const it = () => {
155
+ const at = () => {
155
156
  var o;
156
- if (!ot())
157
+ if (!rt())
157
158
  return !1;
158
159
  const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
159
- return e && t && !n ? (C.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;
160
- }, rt = (e) => (v() || it(), Y(e)), j = class P {
160
+ return e && t && !n ? (w.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;
161
+ }, st = (e) => (k() || at(), J(e)), j = class P {
161
162
  static getCacheKey(t) {
162
163
  return JSON.stringify({
163
164
  ...t,
@@ -191,10 +192,10 @@ function H({
191
192
  if (e === "")
192
193
  return;
193
194
  const c = {
194
- code: nt(e, {
195
+ code: it(e, {
195
196
  isExpression: a
196
197
  }),
197
- builder: tt(),
198
+ builder: ot(),
198
199
  context: t,
199
200
  event: r,
200
201
  rootSetState: i,
@@ -202,31 +203,31 @@ function H({
202
203
  localState: n
203
204
  };
204
205
  if (s) {
205
- const m = V.getCacheKey(c), g = V.getCachedValue(m);
206
- if (g)
207
- return g.value;
206
+ const u = V.getCacheKey(c), h = V.getCachedValue(u);
207
+ if (h)
208
+ return h.value;
208
209
  }
209
210
  try {
210
- const m = rt(c);
211
+ const u = st(c);
211
212
  if (s) {
212
- const g = V.getCacheKey(c);
213
- V.setCachedValue(g, m);
213
+ const h = V.getCacheKey(c);
214
+ V.setCachedValue(h, u);
214
215
  }
215
- return m;
216
- } catch (m) {
217
- C.error("Failed code evaluation: " + m.message, {
216
+ return u;
217
+ } catch (u) {
218
+ w.error("Failed code evaluation: " + u.message, {
218
219
  code: e
219
220
  });
220
221
  return;
221
222
  }
222
223
  }
223
- const N = (e) => JSON.parse(JSON.stringify(e)), at = (e, t, n) => {
224
+ const O = (e) => JSON.parse(JSON.stringify(e)), ct = (e, t, n) => {
224
225
  if (Object(e) !== e)
225
226
  return e;
226
227
  const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
227
228
  return o.slice(0, -1).reduce((i, r, a) => Object(i[r]) === i[r] ? i[r] : i[r] = Math.abs(Number(o[a + 1])) >> 0 === +o[a + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
228
229
  };
229
- const st = ({
230
+ const lt = ({
230
231
  block: e,
231
232
  context: t,
232
233
  localState: n,
@@ -235,7 +236,7 @@ const st = ({
235
236
  }) => {
236
237
  if (!e.bindings)
237
238
  return e;
238
- const r = N(e), a = {
239
+ const r = O(e), a = {
239
240
  ...r,
240
241
  properties: {
241
242
  ...r.properties
@@ -245,7 +246,7 @@ const st = ({
245
246
  }
246
247
  };
247
248
  for (const s in e.bindings) {
248
- const c = e.bindings[s], m = H({
249
+ const c = e.bindings[s], u = H({
249
250
  code: c,
250
251
  localState: n,
251
252
  rootState: o,
@@ -253,11 +254,11 @@ const st = ({
253
254
  context: t,
254
255
  enableCache: !0
255
256
  });
256
- at(a, s, m);
257
+ ct(a, s, u);
257
258
  }
258
259
  return a;
259
260
  };
260
- function $({
261
+ function N({
261
262
  block: e,
262
263
  context: t,
263
264
  shouldEvaluateBindings: n,
@@ -266,7 +267,7 @@ function $({
266
267
  rootSetState: r
267
268
  }) {
268
269
  const a = e;
269
- return n ? st({
270
+ return n ? lt({
270
271
  block: a,
271
272
  localState: o,
272
273
  rootState: i,
@@ -274,41 +275,42 @@ function $({
274
275
  context: t
275
276
  }) : a;
276
277
  }
277
- const ct = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), fe = (e) => Object.entries(e).map(([n, o]) => {
278
+ const dt = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), pe = (e) => Object.entries(e).map(([n, o]) => {
278
279
  if (typeof o == "string")
279
- return `${ct(n)}: ${o};`;
280
- }).filter(I), lt = (e) => fe(e).join(`
280
+ return `${dt(n)}: ${o};`;
281
+ }).filter(I), ut = (e) => pe(e).join(`
281
282
  `), B = ({
282
283
  mediaQuery: e,
283
284
  className: t,
284
285
  styles: n
285
286
  }) => {
286
287
  const o = `.${t} {
287
- ${lt(n)}
288
+ ${ut(n)}
288
289
  }`;
289
290
  return e ? `${e} {
290
291
  ${o}
291
292
  }` : o;
292
293
  };
293
- function dt({
294
+ function mt({
294
295
  style: e
295
296
  }) {
296
297
  return e;
297
298
  }
298
- const ut = ({
299
+ const ft = ({
299
300
  block: e,
300
301
  context: t
301
- }) => he(dt({
302
+ }) => ge(mt({
302
303
  style: e.style || {},
303
304
  context: t,
304
305
  block: e
305
306
  }));
306
- function he(e) {
307
- switch (E) {
307
+ function ge(e) {
308
+ switch (T) {
308
309
  case "svelte":
309
310
  case "vue":
310
311
  case "solid":
311
- return fe(e).join(" ");
312
+ case "angular":
313
+ return pe(e).join(" ");
312
314
  case "qwik":
313
315
  case "reactNative":
314
316
  case "react":
@@ -316,13 +318,13 @@ function he(e) {
316
318
  return e;
317
319
  }
318
320
  }
319
- const mt = ({
321
+ const ht = ({
320
322
  block: e,
321
323
  context: t,
322
324
  registeredComponents: n
323
325
  }) => {
324
326
  var r;
325
- const o = (r = $({
327
+ const o = (r = N({
326
328
  block: e,
327
329
  localState: t.localState,
328
330
  rootState: t.rootState,
@@ -338,7 +340,7 @@ const mt = ({
338
340
  console.warn(`
339
341
  Could not find a registered component named "${o}".
340
342
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
341
- }, ft = ({
343
+ }, pt = ({
342
344
  block: e,
343
345
  context: t
344
346
  }) => {
@@ -359,20 +361,20 @@ const mt = ({
359
361
  if (!Array.isArray(i))
360
362
  return;
361
363
  const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
362
- return i.map((c, m) => ({
364
+ return i.map((c, u) => ({
363
365
  context: {
364
366
  ...t,
365
367
  localState: {
366
368
  ...t.localState,
367
- $index: m,
369
+ $index: u,
368
370
  $item: c,
369
371
  [a]: c,
370
- [`$${a}Index`]: m
372
+ [`$${a}Index`]: u
371
373
  }
372
374
  },
373
375
  block: o
374
376
  }));
375
- }, pe = {
377
+ }, gt = (e) => e && (e.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(e.name)), bt = (e) => e && (e.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(e.name)), be = {
376
378
  small: {
377
379
  min: 320,
378
380
  default: 321,
@@ -388,11 +390,11 @@ const mt = ({
388
390
  default: 991,
389
391
  max: 1200
390
392
  }
391
- }, G = (e, t = pe) => `@media (max-width: ${t[e].max}px)`, ge = ({
393
+ }, Q = (e, t = be) => `@media (max-width: ${t[e].max}px)`, ye = ({
392
394
  small: e,
393
395
  medium: t
394
396
  }) => {
395
- const n = N(pe);
397
+ const n = O(be);
396
398
  if (!e || !t)
397
399
  return n;
398
400
  const o = Math.floor(e / 2);
@@ -424,7 +426,7 @@ function F(e) {
424
426
  }
425
427
  );
426
428
  }
427
- function J(e, ...t) {
429
+ function X(e, ...t) {
428
430
  const n = Object(e);
429
431
  for (let o = 1; o < arguments.length; o++) {
430
432
  const i = arguments[o];
@@ -434,40 +436,40 @@ function J(e, ...t) {
434
436
  }
435
437
  return n;
436
438
  }
437
- const be = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
438
- function ht(e) {
439
+ const Se = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
440
+ function yt(e) {
439
441
  console.warn(`Cannot animate element: element with ID ${e} not found!`);
440
442
  }
441
- function pt(e, t) {
442
- const n = gt(e), o = getComputedStyle(t), i = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, a = [i, r];
443
+ function St(e, t) {
444
+ const n = vt(e), o = getComputedStyle(t), i = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, a = [i, r];
443
445
  for (const s of a)
444
446
  for (const c of n)
445
447
  c in s || (s[c] = o[c]);
446
448
  }
447
- function gt(e) {
449
+ function vt(e) {
448
450
  const t = [];
449
451
  for (const n of e.steps)
450
452
  for (const o in n.styles)
451
453
  t.indexOf(o) === -1 && t.push(o);
452
454
  return t;
453
455
  }
454
- function co(e) {
456
+ function po(e) {
455
457
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
456
458
  if (!t.length) {
457
- ht(e.elementId || e.id || "");
459
+ yt(e.elementId || e.id || "");
458
460
  return;
459
461
  }
460
462
  Array.from(t).forEach((n) => {
461
- pt(e, n), n.style.transition = "none", n.style.transitionDelay = "0", J(n.style, e.steps[0].styles), setTimeout(() => {
462
- n.style.transition = `all ${e.duration}s ${be(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), J(n.style, e.steps[1].styles), setTimeout(() => {
463
+ St(e, n), n.style.transition = "none", n.style.transitionDelay = "0", X(n.style, e.steps[0].styles), setTimeout(() => {
464
+ n.style.transition = `all ${e.duration}s ${Se(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), X(n.style, e.steps[1].styles), setTimeout(() => {
463
465
  n.style.transition = "", n.style.transitionDelay = "";
464
466
  }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
465
467
  });
466
468
  });
467
469
  }
468
- function bt(e) {
470
+ function kt(e) {
469
471
  const t = function() {
470
- const i = $({
472
+ const i = N({
471
473
  block: e.block,
472
474
  localState: e.context.localState,
473
475
  rootState: e.context.rootState,
@@ -477,64 +479,64 @@ function bt(e) {
477
479
  });
478
480
  return I(i.hide) ? !i.hide : I(i.show) ? i.show : !0;
479
481
  }, n = function() {
480
- var f, k, w;
481
- const i = $({
482
+ var m, p, y;
483
+ const i = N({
482
484
  block: e.block,
483
485
  localState: e.context.localState,
484
486
  rootState: e.context.rootState,
485
487
  rootSetState: e.context.rootSetState,
486
488
  context: e.context.context,
487
489
  shouldEvaluateBindings: !0
488
- }), r = i.responsiveStyles, a = e.context.content, s = ge(
489
- ((f = a == null ? void 0 : a.meta) == null ? void 0 : f.breakpoints) || {}
490
- ), c = r == null ? void 0 : r.large, m = r == null ? void 0 : r.medium, g = r == null ? void 0 : r.small, u = i.id;
491
- if (!u)
490
+ }), r = i.responsiveStyles, a = e.context.content, s = ye(
491
+ ((m = a == null ? void 0 : a.meta) == null ? void 0 : m.breakpoints) || {}
492
+ ), c = r == null ? void 0 : r.large, u = r == null ? void 0 : r.medium, h = r == null ? void 0 : r.small, d = i.id;
493
+ if (!d)
492
494
  return "";
493
- const h = c ? B({
494
- className: u,
495
+ const f = c ? B({
496
+ className: d,
495
497
  styles: c
496
- }) : "", b = m ? B({
497
- className: u,
498
- styles: m,
499
- mediaQuery: G(
498
+ }) : "", g = u ? B({
499
+ className: d,
500
+ styles: u,
501
+ mediaQuery: Q(
500
502
  "medium",
501
503
  s
502
504
  )
503
- }) : "", p = g ? B({
504
- className: u,
505
- styles: g,
506
- mediaQuery: G(
505
+ }) : "", v = h ? B({
506
+ className: d,
507
+ styles: h,
508
+ mediaQuery: Q(
507
509
  "small",
508
510
  s
509
511
  )
510
- }) : "", d = i.animations && i.animations.find((S) => S.trigger === "hover");
511
- let y = "";
512
- if (d) {
513
- const S = ((w = (k = d.steps) == null ? void 0 : k[1]) == null ? void 0 : w.styles) || {};
514
- y = B({
515
- className: `${u}:hover`,
512
+ }) : "", b = i.animations && i.animations.find((S) => S.trigger === "hover");
513
+ let E = "";
514
+ if (b) {
515
+ const S = ((y = (p = b.steps) == null ? void 0 : p[1]) == null ? void 0 : y.styles) || {};
516
+ E = B({
517
+ className: `${d}:hover`,
516
518
  styles: {
517
519
  ...S,
518
- transition: `all ${d.duration}s ${be(
519
- d.easing
520
+ transition: `all ${b.duration}s ${Se(
521
+ b.easing
520
522
  )}`,
521
- transitionDelay: d.delay ? `${d.delay}s` : "0s"
523
+ transitionDelay: b.delay ? `${b.delay}s` : "0s"
522
524
  }
523
525
  }) || "";
524
526
  }
525
527
  return [
526
- h,
527
- b,
528
- p,
529
- y
528
+ f,
529
+ g,
530
+ v,
531
+ E
530
532
  ].join(" ");
531
533
  };
532
- return /* @__PURE__ */ l(x, { children: n() && t() ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(F, { id: "builderio-block", styles: n() }) }) : null });
534
+ return /* @__PURE__ */ l(C, { children: n() && t() ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(F, { id: "builderio-block", styles: n() }) }) : null });
533
535
  }
534
- function yt(e) {
536
+ function Ct(e) {
535
537
  return e.charAt(0).toUpperCase() + e.slice(1);
536
538
  }
537
- const St = (e) => `on${yt(e)}`, vt = (e, t) => (n) => H({
539
+ const xt = (e) => `on${Ct(e)}`, wt = (e, t) => (n) => H({
538
540
  code: e,
539
541
  context: t.context,
540
542
  localState: t.localState,
@@ -544,15 +546,15 @@ const St = (e) => `on${yt(e)}`, vt = (e, t) => (n) => H({
544
546
  isExpression: !1,
545
547
  enableCache: !0
546
548
  });
547
- function lo(e) {
549
+ function go(e) {
548
550
  const t = {}, n = e.block.actions ?? {};
549
551
  for (const o in n) {
550
552
  if (!n.hasOwnProperty(o))
551
553
  continue;
552
554
  const i = n[o];
553
- let r = St(o);
555
+ let r = xt(o);
554
556
  if (e.stripPrefix)
555
- switch (E) {
557
+ switch (T) {
556
558
  case "vue":
557
559
  r = r.replace("v-on:", "");
558
560
  break;
@@ -560,40 +562,40 @@ function lo(e) {
560
562
  r = r.replace("on:", "");
561
563
  break;
562
564
  }
563
- t[r] = vt(i, e);
565
+ t[r] = wt(i, e);
564
566
  }
565
567
  return t;
566
568
  }
567
- function kt({
569
+ function It({
568
570
  properties: e
569
571
  }) {
570
572
  return e;
571
573
  }
572
- const xt = (e) => ({
574
+ const Tt = (e) => ({
573
575
  href: e.href
574
576
  });
575
- function Ct({
577
+ function Et({
576
578
  block: e,
577
579
  context: t
578
580
  }) {
579
581
  var o;
580
582
  const n = {
581
- ...xt(e),
583
+ ...Tt(e),
582
584
  ...e.properties,
583
585
  "builder-id": e.id,
584
- style: ut({
586
+ style: ft({
585
587
  block: e,
586
588
  context: t
587
589
  }),
588
590
  [M()]: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
589
591
  };
590
- return kt({
592
+ return It({
591
593
  properties: n,
592
594
  context: t,
593
595
  block: e
594
596
  });
595
597
  }
596
- const wt = ({
598
+ const Rt = ({
597
599
  componentOptions: e,
598
600
  builderBlock: t,
599
601
  context: n,
@@ -609,7 +611,7 @@ const wt = ({
609
611
  * component itself directly. Otherwise, they are provided to the wrapper element.
610
612
  */
611
613
  ...i ? {
612
- attributes: Ct({
614
+ attributes: Et({
613
615
  block: t,
614
616
  context: a
615
617
  })
@@ -623,13 +625,13 @@ const wt = ({
623
625
  includeBlockProps: i
624
626
  } : s;
625
627
  };
626
- function Q(e) {
628
+ function Z(e) {
627
629
  var n;
628
- const t = e.isInteractive ? Oe : e.componentRef;
629
- return /* @__PURE__ */ l(x, { children: e.componentRef ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(
630
+ const t = e.isInteractive ? Fe : e.componentRef;
631
+ return /* @__PURE__ */ l(C, { children: e.componentRef ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(
630
632
  t,
631
633
  {
632
- ...wt({
634
+ ...Rt({
633
635
  componentOptions: e.componentOptions,
634
636
  builderBlock: e.builderBlock,
635
637
  context: e.context,
@@ -652,7 +654,7 @@ function Q(e) {
652
654
  }
653
655
  ) }) : null });
654
656
  }
655
- function It(e) {
657
+ function Pt(e) {
656
658
  const t = e.repeatContext;
657
659
  return /* @__PURE__ */ l(
658
660
  L,
@@ -665,21 +667,21 @@ function It(e) {
665
667
  );
666
668
  }
667
669
  function L(e) {
668
- var c, m, g;
670
+ var c, u, h;
669
671
  const t = function() {
670
- return mt({
672
+ return ht({
671
673
  block: e.block,
672
674
  context: e.context,
673
675
  registeredComponents: e.registeredComponents
674
676
  });
675
677
  }, n = function() {
676
- return ft({
678
+ return pt({
677
679
  block: e.block,
678
680
  context: e.context
679
681
  });
680
682
  }, o = function() {
681
- var h;
682
- return (h = e.block.repeat) != null && h.collection ? e.block : $({
683
+ var f;
684
+ return (f = e.block.repeat) != null && f.collection ? e.block : N({
683
685
  block: e.block,
684
686
  localState: e.context.localState,
685
687
  rootState: e.context.rootState,
@@ -688,29 +690,29 @@ function L(e) {
688
690
  shouldEvaluateBindings: !0
689
691
  });
690
692
  }, i = function() {
691
- var b;
692
- return e.block.tagName === "a" || ((b = o().properties) == null ? void 0 : b.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
693
+ var g;
694
+ return e.block.tagName === "a" || ((g = o().properties) == null ? void 0 : g.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
693
695
  }, r = function() {
694
- var p, d;
695
- if ((p = e.block.repeat) != null && p.collection)
696
- return !!((d = n()) != null && d.length);
697
- const h = "hide" in o() ? o().hide : !1;
698
- return ("show" in o() ? o().show : !0) && !h;
696
+ var v, b;
697
+ if ((v = e.block.repeat) != null && v.collection)
698
+ return !!((b = n()) != null && b.length);
699
+ const f = "hide" in o() ? o().hide : !1;
700
+ return ("show" in o() ? o().show : !0) && !f;
699
701
  }, a = function() {
700
- var b;
701
- return !((b = t()) != null && b.component) && !n() ? o().children ?? [] : [];
702
+ var g;
703
+ return !((g = t()) != null && g.component) && !n() ? o().children ?? [] : [];
702
704
  }, s = function() {
703
- var h, b, p, d, y, f, k, w, S, T;
705
+ var f, g, v;
704
706
  return {
705
707
  blockChildren: o().children ?? [],
706
- componentRef: (h = t()) == null ? void 0 : h.component,
708
+ componentRef: (f = t()) == null ? void 0 : f.component,
707
709
  componentOptions: {
708
- ...Ge(o()),
710
+ ...Qe(o()),
709
711
  builderContext: e.context,
710
- ...((b = t()) == null ? void 0 : b.name) === "Core:Button" || ((p = t()) == null ? void 0 : p.name) === "Symbol" || ((d = t()) == null ? void 0 : d.name) === "Columns" || ((y = t()) == null ? void 0 : y.name) === "Form:Form" ? {
712
+ ...gt(t()) ? {
711
713
  builderLinkComponent: e.linkComponent
712
714
  } : {},
713
- ...((f = t()) == null ? void 0 : f.name) === "Symbol" || ((k = t()) == null ? void 0 : k.name) === "Columns" || ((w = t()) == null ? void 0 : w.name) === "Form:Form" ? {
715
+ ...bt(t()) ? {
714
716
  builderComponents: e.registeredComponents
715
717
  } : {}
716
718
  },
@@ -718,14 +720,14 @@ function L(e) {
718
720
  linkComponent: e.linkComponent,
719
721
  registeredComponents: e.registeredComponents,
720
722
  builderBlock: o(),
721
- includeBlockProps: ((S = t()) == null ? void 0 : S.noWrap) === !0,
722
- isInteractive: !((T = t()) != null && T.isRSC)
723
+ includeBlockProps: ((g = t()) == null ? void 0 : g.noWrap) === !0,
724
+ isInteractive: !((v = t()) != null && v.isRSC)
723
725
  };
724
726
  };
725
- return /* @__PURE__ */ l(x, { children: r() ? /* @__PURE__ */ R(x, { children: [
726
- /* @__PURE__ */ l(bt, { block: e.block, context: e.context }),
727
- (c = t()) != null && c.noWrap ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(
728
- Q,
727
+ return /* @__PURE__ */ l(C, { children: r() ? /* @__PURE__ */ R(C, { children: [
728
+ /* @__PURE__ */ l(kt, { block: e.block, context: e.context }),
729
+ (c = t()) != null && c.noWrap ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(
730
+ Z,
729
731
  {
730
732
  componentRef: s().componentRef,
731
733
  componentOptions: s().componentOptions,
@@ -737,17 +739,17 @@ function L(e) {
737
739
  includeBlockProps: s().includeBlockProps,
738
740
  isInteractive: s().isInteractive
739
741
  }
740
- ) }) : /* @__PURE__ */ l(x, { children: n() ? /* @__PURE__ */ l(x, { children: (g = n()) == null ? void 0 : g.map((u, h) => /* @__PURE__ */ l(
741
- It,
742
+ ) }) : /* @__PURE__ */ l(C, { children: n() ? /* @__PURE__ */ l(C, { children: (h = n()) == null ? void 0 : h.map((d, f) => /* @__PURE__ */ l(
743
+ Pt,
742
744
  {
743
- repeatContext: u.context,
744
- block: u.block,
745
+ repeatContext: d.context,
746
+ block: d.block,
745
747
  registeredComponents: e.registeredComponents,
746
748
  linkComponent: e.linkComponent
747
749
  },
748
- h
750
+ f
749
751
  )) }) : /* @__PURE__ */ R(
750
- $e,
752
+ Le,
751
753
  {
752
754
  Wrapper: i(),
753
755
  block: o(),
@@ -755,7 +757,7 @@ function L(e) {
755
757
  linkComponent: e.linkComponent,
756
758
  children: [
757
759
  /* @__PURE__ */ l(
758
- Q,
760
+ Z,
759
761
  {
760
762
  componentRef: s().componentRef,
761
763
  componentOptions: s().componentOptions,
@@ -768,15 +770,15 @@ function L(e) {
768
770
  isInteractive: s().isInteractive
769
771
  }
770
772
  ),
771
- (m = a()) == null ? void 0 : m.map((u) => /* @__PURE__ */ l(
773
+ (u = a()) == null ? void 0 : u.map((d) => /* @__PURE__ */ l(
772
774
  L,
773
775
  {
774
- block: u,
776
+ block: d,
775
777
  registeredComponents: e.registeredComponents,
776
778
  linkComponent: e.linkComponent,
777
779
  context: e.context
778
780
  },
779
- u.id
781
+ d.id
780
782
  ))
781
783
  ]
782
784
  }
@@ -786,7 +788,7 @@ function L(e) {
786
788
  function K(e) {
787
789
  var t, n, o;
788
790
  return /* @__PURE__ */ l(
789
- Ne,
791
+ Ue,
790
792
  {
791
793
  blocks: e.blocks,
792
794
  parent: e.parent,
@@ -794,7 +796,7 @@ function K(e) {
794
796
  styleProp: e.styleProp,
795
797
  BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
796
798
  BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
797
- children: e.blocks ? /* @__PURE__ */ l(x, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
799
+ children: e.blocks ? /* @__PURE__ */ l(C, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
798
800
  L,
799
801
  {
800
802
  block: i,
@@ -807,67 +809,70 @@ function K(e) {
807
809
  }
808
810
  );
809
811
  }
810
- function Tt(e) {
811
- var b;
812
- const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
812
+ const At = (e) => `builder-columns ${e}-breakpoints`;
813
+ function Vt(e) {
814
+ var b, E;
815
+ const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(p) {
816
+ return p.link ? e.builderLinkComponent || "a" : "div";
817
+ }, r = function(p) {
813
818
  var y;
814
- return ((y = n[d]) == null ? void 0 : y.width) || 100 / n.length;
815
- }, r = function(d) {
819
+ return ((y = n[p]) == null ? void 0 : y.width) || 100 / n.length;
820
+ }, a = function(p) {
816
821
  const y = t * (n.length - 1) / n.length;
817
- return `calc(${i(d)}% - ${y}px)`;
818
- }, a = function({
819
- stackedStyle: d,
822
+ return `calc(${r(p)}% - ${y}px)`;
823
+ }, s = function({
824
+ stackedStyle: p,
820
825
  desktopStyle: y
821
826
  }) {
822
- return o === "tablet" ? d : y;
823
- }, s = function({
824
- stackedStyle: d,
827
+ return o === "tablet" ? p : y;
828
+ }, c = function({
829
+ stackedStyle: p,
825
830
  desktopStyle: y
826
831
  }) {
827
- return o === "never" ? y : d;
828
- }, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", m = function() {
832
+ return o === "never" ? y : p;
833
+ }, u = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", h = function() {
829
834
  return {
830
- "--flex-dir": c,
831
- "--flex-dir-tablet": a({
832
- stackedStyle: c,
835
+ "--flex-dir": u,
836
+ "--flex-dir-tablet": s({
837
+ stackedStyle: u,
833
838
  desktopStyle: "row"
834
839
  })
835
840
  };
836
- }, g = function(d) {
837
- const y = d === 0 ? 0 : t, f = r(d), k = `${y}px`, w = "100%", S = 0;
841
+ }, d = function(p) {
842
+ const y = p === 0 ? 0 : t, S = a(p), x = `${y}px`, Y = "100%", G = 0;
838
843
  return {
839
844
  ...{
840
845
  display: "flex",
841
846
  flexDirection: "column",
842
847
  alignItems: "stretch"
843
848
  },
844
- width: f,
845
- ["marginLeft"]: k,
846
- "--column-width-mobile": s({
847
- stackedStyle: w,
848
- desktopStyle: f
849
+ width: S,
850
+ ["marginLeft"]: x,
851
+ "--column-width-mobile": c({
852
+ stackedStyle: Y,
853
+ desktopStyle: S
849
854
  }),
850
- "--column-margin-left-mobile": s({
851
- stackedStyle: S,
852
- desktopStyle: k
855
+ "--column-margin-left-mobile": c({
856
+ stackedStyle: G,
857
+ desktopStyle: x
853
858
  }),
854
- "--column-width-tablet": a({
855
- stackedStyle: w,
856
- desktopStyle: f
859
+ "--column-width-tablet": s({
860
+ stackedStyle: Y,
861
+ desktopStyle: S
857
862
  }),
858
- "--column-margin-left-tablet": a({
859
- stackedStyle: S,
860
- desktopStyle: k
863
+ "--column-margin-left-tablet": s({
864
+ stackedStyle: G,
865
+ desktopStyle: x
861
866
  })
862
867
  };
863
- }, u = function(d) {
864
- var f, k;
865
- return ge(
866
- ((k = (f = e.builderContext.content) == null ? void 0 : f.meta) == null ? void 0 : k.breakpoints) || {}
867
- )[d].max;
868
- }, h = function() {
868
+ }, f = function(p) {
869
+ var S, x;
870
+ return ye(
871
+ ((x = (S = e.builderContext.content) == null ? void 0 : S.meta) == null ? void 0 : x.breakpoints) || {}
872
+ )[p].max;
873
+ }, g = function() {
869
874
  return `
870
- @media (max-width: ${u("medium")}px) {
875
+ @media (max-width: ${f("medium")}px) {
871
876
  .${e.builderBlock.id}-breakpoints {
872
877
  flex-direction: var(--flex-dir-tablet);
873
878
  align-items: stretch;
@@ -879,7 +884,7 @@ function Tt(e) {
879
884
  }
880
885
  }
881
886
 
882
- @media (max-width: ${u("small")}px) {
887
+ @media (max-width: ${f("small")}px) {
883
888
  .${e.builderBlock.id}-breakpoints {
884
889
  flex-direction: var(--flex-dir);
885
890
  align-items: stretch;
@@ -891,31 +896,33 @@ function Tt(e) {
891
896
  }
892
897
  },
893
898
  `;
899
+ }, v = function(p, y) {
900
+ return {
901
+ ...p.link ? {
902
+ href: p.link
903
+ } : {},
904
+ [M()]: "builder-column",
905
+ style: ge(d(y))
906
+ };
894
907
  };
895
- return /* @__PURE__ */ R(x, { children: [
908
+ return /* @__PURE__ */ R(C, { children: [
896
909
  /* @__PURE__ */ R(
897
910
  "div",
898
911
  {
899
- className: `builder-columns ${e.builderBlock.id}-breakpoints div-664216e4`,
900
- style: m(),
912
+ className: At((b = e.builderBlock) == null ? void 0 : b.id) + " div-2651dce4",
913
+ style: h(),
901
914
  children: [
902
- /* @__PURE__ */ l(F, { id: "builderio-columns", styles: h() }),
903
- (b = e.columns) == null ? void 0 : b.map((p, d) => /* @__PURE__ */ l(
904
- Fe,
915
+ /* @__PURE__ */ l(F, { id: "builderio-columns", styles: g() }),
916
+ (E = e.columns) == null ? void 0 : E.map((m, p) => /* @__PURE__ */ l(
917
+ De,
905
918
  {
906
- TagName: p.link ? e.builderLinkComponent || "a" : "div",
919
+ TagName: i(m),
907
920
  actionAttributes: {},
908
- attributes: {
909
- ...p.link ? {
910
- href: p.link
911
- } : {},
912
- [M()]: "builder-column",
913
- style: he(g(d))
914
- },
921
+ attributes: v(m, p),
915
922
  children: /* @__PURE__ */ l(
916
923
  K,
917
924
  {
918
- path: `component.options.columns.${d}.blocks`,
925
+ path: `component.options.columns.${p}.blocks`,
919
926
  parent: e.builderBlock.id,
920
927
  styleProp: {
921
928
  flexGrow: "1"
@@ -923,57 +930,57 @@ function Tt(e) {
923
930
  context: e.builderContext,
924
931
  registeredComponents: e.builderComponents,
925
932
  linkComponent: e.builderLinkComponent,
926
- blocks: p.blocks
933
+ blocks: m.blocks
927
934
  }
928
935
  )
929
936
  },
930
- d
937
+ p
931
938
  ))
932
939
  ]
933
940
  }
934
941
  ),
935
- /* @__PURE__ */ l("style", { children: `.div-664216e4 {
942
+ /* @__PURE__ */ l("style", { children: `.div-2651dce4 {
936
943
  display: flex;
937
944
  line-height: normal;
938
945
  }` })
939
946
  ] });
940
947
  }
941
- function X(e) {
948
+ function ee(e) {
942
949
  return e.replace(/http(s)?:/, "");
943
950
  }
944
- function Et(e = "", t, n) {
951
+ function Bt(e = "", t, n) {
945
952
  const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
946
953
  return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
947
954
  }
948
- function Rt(e, t) {
955
+ function Wt(e, t) {
949
956
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
950
957
  return e;
951
958
  if (t === "master")
952
- return X(e);
959
+ return ee(e);
953
960
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
954
961
  if (n) {
955
962
  const o = e.split(n[0]), i = n[3], r = t.match("x") ? t : `${t}x`;
956
- return X(`${o[0]}_${r}${i}`);
963
+ return ee(`${o[0]}_${r}${i}`);
957
964
  }
958
965
  return null;
959
966
  }
960
- function uo(e) {
967
+ function bo(e) {
961
968
  if (!e)
962
969
  return e;
963
970
  const t = [100, 200, 400, 800, 1200, 1600, 2e3];
964
971
  if (e.match(/builder\.io/)) {
965
972
  let n = e;
966
973
  const o = Number(e.split("?width=")[1]);
967
- return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${Et(e, "width", i)} ${i}w`).concat([n]).join(", ");
974
+ return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${Bt(e, "width", i)} ${i}w`).concat([n]).join(", ");
968
975
  }
969
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Rt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
976
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Wt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
970
977
  }
971
- const Pt = (e) => {
978
+ const $t = (e) => {
972
979
  if (e === "localhost" || e === "127.0.0.1")
973
980
  return e;
974
981
  const t = e.split(".");
975
982
  return t.length > 2 ? t.slice(1).join(".") : e;
976
- }, ye = ({
983
+ }, ve = ({
977
984
  name: e,
978
985
  canTrack: t
979
986
  }) => {
@@ -981,17 +988,17 @@ const Pt = (e) => {
981
988
  try {
982
989
  return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
983
990
  } catch (o) {
984
- C.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
991
+ w.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
985
992
  return;
986
993
  }
987
- }, Se = async (e) => ye(e), At = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(I).join("; "), Vt = [["secure", ""], ["SameSite", "None"]], Bt = ({
994
+ }, ke = async (e) => ve(e), Nt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(I).join("; "), Ot = [["secure", ""], ["SameSite", "None"]], Ft = ({
988
995
  name: e,
989
996
  value: t,
990
997
  expires: n
991
998
  }) => {
992
- const i = (v() ? location.protocol === "https:" : !0) ? Vt : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", Pt(window.location.hostname)], ...i];
993
- return At(a);
994
- }, ve = async ({
999
+ const i = (k() ? location.protocol === "https:" : !0) ? Ot : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", $t(window.location.hostname)], ...i];
1000
+ return Nt(a);
1001
+ }, Ce = async ({
995
1002
  name: e,
996
1003
  value: t,
997
1004
  expires: n,
@@ -1000,33 +1007,33 @@ const Pt = (e) => {
1000
1007
  try {
1001
1008
  if (!o)
1002
1009
  return;
1003
- const i = Bt({
1010
+ const i = Ft({
1004
1011
  name: e,
1005
1012
  value: t,
1006
1013
  expires: n
1007
1014
  });
1008
1015
  document.cookie = i;
1009
1016
  } catch (i) {
1010
- C.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
1017
+ w.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
1011
1018
  }
1012
- }, Wt = "builder.tests", z = (e) => `${Wt}.${e}`, Ot = ({
1019
+ }, Lt = "builder.tests", z = (e) => `${Lt}.${e}`, Ut = ({
1013
1020
  contentId: e
1014
- }) => Se({
1021
+ }) => ke({
1015
1022
  name: z(e),
1016
1023
  canTrack: !0
1017
- }), $t = ({
1024
+ }), Dt = ({
1018
1025
  contentId: e
1019
- }) => ye({
1026
+ }) => ve({
1020
1027
  name: z(e),
1021
1028
  canTrack: !0
1022
- }), Nt = ({
1029
+ }), _t = ({
1023
1030
  contentId: e,
1024
1031
  value: t
1025
- }) => ve({
1032
+ }) => Ce({
1026
1033
  name: z(e),
1027
1034
  value: t,
1028
1035
  canTrack: !0
1029
- }), ke = (e) => I(e.id) && I(e.variations) && Object.keys(e.variations).length > 0, Ft = ({
1036
+ }), xe = (e) => I(e.id) && I(e.variations) && Object.keys(e.variations).length > 0, Mt = ({
1030
1037
  id: e,
1031
1038
  variations: t
1032
1039
  }) => {
@@ -1039,15 +1046,15 @@ const Pt = (e) => {
1039
1046
  return r;
1040
1047
  }
1041
1048
  return e;
1042
- }, xe = (e) => {
1043
- const t = Ft(e);
1044
- return Nt({
1049
+ }, we = (e) => {
1050
+ const t = Mt(e);
1051
+ return _t({
1045
1052
  contentId: e.id,
1046
1053
  value: t
1047
1054
  }).catch((n) => {
1048
- C.error("could not store A/B test variation: ", n);
1055
+ w.error("could not store A/B test variation: ", n);
1049
1056
  }), t;
1050
- }, Ce = ({
1057
+ }, Ie = ({
1051
1058
  item: e,
1052
1059
  testGroupId: t
1053
1060
  }) => {
@@ -1061,7 +1068,7 @@ const Pt = (e) => {
1061
1068
  testVariationId: n.id,
1062
1069
  testVariationName: n.name || (n.id === e.id ? "Default" : "")
1063
1070
  };
1064
- }, Lt = ({
1071
+ }, jt = ({
1065
1072
  item: e,
1066
1073
  canTrack: t
1067
1074
  }) => {
@@ -1069,14 +1076,14 @@ const Pt = (e) => {
1069
1076
  return e;
1070
1077
  if (!e)
1071
1078
  return;
1072
- if (!ke(e))
1079
+ if (!xe(e))
1073
1080
  return e;
1074
- const n = $t({
1081
+ const n = Dt({
1075
1082
  contentId: e.id
1076
- }) || xe({
1083
+ }) || we({
1077
1084
  variations: e.variations,
1078
1085
  id: e.id
1079
- }), o = Ce({
1086
+ }), o = Ie({
1080
1087
  item: e,
1081
1088
  testGroupId: n
1082
1089
  });
@@ -1084,18 +1091,18 @@ const Pt = (e) => {
1084
1091
  ...e,
1085
1092
  ...o
1086
1093
  };
1087
- }, Ut = async ({
1094
+ }, Ht = async ({
1088
1095
  item: e,
1089
1096
  canTrack: t
1090
1097
  }) => {
1091
- if (!t || !ke(e))
1098
+ if (!t || !xe(e))
1092
1099
  return e;
1093
- const o = await Ot({
1100
+ const o = await Ut({
1094
1101
  contentId: e.id
1095
- }) || xe({
1102
+ }) || we({
1096
1103
  variations: e.variations,
1097
1104
  id: e.id
1098
- }), i = Ce({
1105
+ }), i = Ie({
1099
1106
  item: e,
1100
1107
  testGroupId: o
1101
1108
  });
@@ -1103,7 +1110,7 @@ const Pt = (e) => {
1103
1110
  ...e,
1104
1111
  ...i
1105
1112
  };
1106
- }, U = (e) => I(e) ? e : !0, Dt = {
1113
+ }, U = (e) => I(e) ? e : !0, Kt = {
1107
1114
  name: "Core:Button",
1108
1115
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1109
1116
  defaultStyles: {
@@ -1136,7 +1143,7 @@ const Pt = (e) => {
1136
1143
  }],
1137
1144
  static: !0,
1138
1145
  noWrap: !0
1139
- }, _t = {
1146
+ }, zt = {
1140
1147
  // TODO: ways to statically preprocess JSON for references, functions, etc
1141
1148
  name: "Columns",
1142
1149
  isRSC: !0,
@@ -1337,13 +1344,13 @@ const Pt = (e) => {
1337
1344
  helperText: "When stacking columns for mobile devices, reverse the ordering",
1338
1345
  advanced: !0
1339
1346
  }]
1340
- }, Mt = {
1347
+ }, qt = {
1341
1348
  name: "Fragment",
1342
1349
  static: !0,
1343
1350
  hidden: !0,
1344
1351
  canHaveChildren: !0,
1345
1352
  noWrap: !0
1346
- }, jt = {
1353
+ }, Yt = {
1347
1354
  name: "Image",
1348
1355
  static: !0,
1349
1356
  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",
@@ -1364,15 +1371,15 @@ const Pt = (e) => {
1364
1371
  onChange: (e) => {
1365
1372
  e.delete("srcset"), e.delete("noWebp");
1366
1373
  function n(a, s = 6e4) {
1367
- return new Promise((c, m) => {
1368
- const g = document.createElement("img");
1369
- let u = !1;
1370
- g.onload = () => {
1371
- u = !0, c(g);
1372
- }, g.addEventListener("error", (h) => {
1373
- console.warn("Image load failed", h.error), m(h.error);
1374
- }), g.src = a, setTimeout(() => {
1375
- u || m(new Error("Image load timed out"));
1374
+ return new Promise((c, u) => {
1375
+ const h = document.createElement("img");
1376
+ let d = !1;
1377
+ h.onload = () => {
1378
+ d = !0, c(h);
1379
+ }, h.addEventListener("error", (f) => {
1380
+ console.warn("Image load failed", f.error), u(f.error);
1381
+ }), h.src = a, setTimeout(() => {
1382
+ d || u(new Error("Image load timed out"));
1376
1383
  }, s);
1377
1384
  });
1378
1385
  }
@@ -1443,7 +1450,7 @@ const Pt = (e) => {
1443
1450
  advanced: !0,
1444
1451
  defaultValue: 0.7041
1445
1452
  }]
1446
- }, Ht = {
1453
+ }, Gt = {
1447
1454
  name: "Core:Section",
1448
1455
  static: !0,
1449
1456
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1482,7 +1489,7 @@ const Pt = (e) => {
1482
1489
  }
1483
1490
  }
1484
1491
  }]
1485
- }, Kt = {
1492
+ }, Jt = {
1486
1493
  name: "Slot",
1487
1494
  isRSC: !0,
1488
1495
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -1496,7 +1503,7 @@ const Pt = (e) => {
1496
1503
  defaultValue: "children"
1497
1504
  }]
1498
1505
  };
1499
- function zt(e) {
1506
+ function Qt(e) {
1500
1507
  var t, n, o;
1501
1508
  return /* @__PURE__ */ l(
1502
1509
  "div",
@@ -1519,7 +1526,7 @@ function zt(e) {
1519
1526
  }
1520
1527
  );
1521
1528
  }
1522
- const qt = {
1529
+ const Xt = {
1523
1530
  name: "Symbol",
1524
1531
  noWrap: !0,
1525
1532
  static: !0,
@@ -1552,7 +1559,7 @@ const qt = {
1552
1559
  hideFromUI: !0,
1553
1560
  type: "boolean"
1554
1561
  }]
1555
- }, Yt = {
1562
+ }, Zt = {
1556
1563
  name: "Text",
1557
1564
  static: !0,
1558
1565
  isRSC: !0,
@@ -1571,7 +1578,7 @@ const qt = {
1571
1578
  textAlign: "center"
1572
1579
  }
1573
1580
  };
1574
- function Gt(e) {
1581
+ function en(e) {
1575
1582
  var t;
1576
1583
  return /* @__PURE__ */ l(
1577
1584
  "div",
@@ -1584,7 +1591,7 @@ function Gt(e) {
1584
1591
  }
1585
1592
  );
1586
1593
  }
1587
- const Jt = {
1594
+ const tn = {
1588
1595
  name: "Custom Code",
1589
1596
  static: !0,
1590
1597
  requiredPermissions: ["editCode"],
@@ -1606,7 +1613,7 @@ const Jt = {
1606
1613
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1607
1614
  advanced: !0
1608
1615
  }]
1609
- }, Qt = {
1616
+ }, nn = {
1610
1617
  name: "Embed",
1611
1618
  static: !0,
1612
1619
  inputs: [{
@@ -1631,7 +1638,7 @@ const Jt = {
1631
1638
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1632
1639
  hideFromUI: !0
1633
1640
  }]
1634
- }, Xt = ["text/javascript", "application/javascript", "application/ecmascript"], mo = (e) => Xt.includes(e.type), Zt = {
1641
+ }, on = ["text/javascript", "application/javascript", "application/ecmascript"], yo = (e) => on.includes(e.type), rn = {
1635
1642
  // friendlyName?
1636
1643
  name: "Raw:Img",
1637
1644
  hideFromInsertMenu: !0,
@@ -1645,7 +1652,7 @@ const Jt = {
1645
1652
  }],
1646
1653
  noWrap: !0,
1647
1654
  static: !0
1648
- }, en = {
1655
+ }, an = {
1649
1656
  name: "Video",
1650
1657
  canHaveChildren: !0,
1651
1658
  defaultStyles: {
@@ -1726,58 +1733,58 @@ const Jt = {
1726
1733
  defaultValue: !0,
1727
1734
  advanced: !0
1728
1735
  }]
1729
- }, tn = () => [{
1730
- component: Le,
1731
- ...Jt
1732
- }, {
1733
- component: Ue,
1734
- ...Qt
1735
- }, {
1736
- component: De,
1737
- ...Zt
1738
- }, {
1736
+ }, sn = () => [{
1739
1737
  component: _e,
1740
- ...en
1741
- }], Z = () => [{
1742
- component: Me,
1743
- ...Dt
1738
+ ...tn
1744
1739
  }, {
1745
- component: Tt,
1746
- ..._t
1740
+ component: Me,
1741
+ ...nn
1747
1742
  }, {
1748
1743
  component: je,
1749
- ...Mt
1744
+ ...rn
1750
1745
  }, {
1751
1746
  component: He,
1752
- ...jt
1753
- }, {
1747
+ ...an
1748
+ }], te = () => [{
1754
1749
  component: Ke,
1755
- ...Ht
1756
- }, {
1757
- component: zt,
1758
1750
  ...Kt
1759
1751
  }, {
1760
- component: eo,
1752
+ component: Vt,
1753
+ ...zt
1754
+ }, {
1755
+ component: ze,
1761
1756
  ...qt
1762
1757
  }, {
1763
- component: Gt,
1758
+ component: qe,
1764
1759
  ...Yt
1765
- }, ...tn()], fo = (e) => ({
1760
+ }, {
1761
+ component: Ye,
1762
+ ...Gt
1763
+ }, {
1764
+ component: Qt,
1765
+ ...Jt
1766
+ }, {
1767
+ component: ro,
1768
+ ...Xt
1769
+ }, {
1770
+ component: en,
1771
+ ...Zt
1772
+ }, ...sn()], So = (e) => ({
1766
1773
  type: "builder.registerComponent",
1767
1774
  data: D(e)
1768
- }), nn = (e) => {
1775
+ }), cn = (e) => {
1769
1776
  const t = e.toString().trim();
1770
1777
  return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
1771
- }, on = (e) => typeof e == "function" ? nn(e) : N(e), D = ({
1778
+ }, ln = (e) => typeof e == "function" ? cn(e) : O(e), D = ({
1772
1779
  inputs: e,
1773
1780
  ...t
1774
1781
  }) => ({
1775
- ...N(t),
1782
+ ...O(t),
1776
1783
  inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
1777
1784
  ...o,
1778
- [i]: on(r)
1785
+ [i]: ln(r)
1779
1786
  }), {}))
1780
- }), rn = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1787
+ }), dn = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1781
1788
  function getAndSetVariantId() {
1782
1789
  function setCookie(name, value, days) {
1783
1790
  let expires = '';
@@ -1833,7 +1840,7 @@ const Jt = {
1833
1840
  }).join('');
1834
1841
  styleEl.innerHTML = newStyleStr;
1835
1842
  }
1836
- }`, an = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1843
+ }`, un = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1837
1844
  if (!navigator.cookieEnabled) {
1838
1845
  return;
1839
1846
  }
@@ -1867,24 +1874,24 @@ const Jt = {
1867
1874
  thisScriptEl?.remove();
1868
1875
  }
1869
1876
  return;
1870
- }`, we = "builderIoAbTest", Ie = "builderIoRenderContent", W = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1877
+ }`, Te = "builderIoAbTest", Ee = "builderIoRenderContent", W = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1871
1878
  ...t,
1872
1879
  testVariationId: t.id,
1873
1880
  id: e == null ? void 0 : e.id
1874
- })), sn = ({
1881
+ })), mn = ({
1875
1882
  canTrack: e,
1876
1883
  content: t
1877
- }) => !(!(W(t).length > 0) || !e || v()), cn = (e) => e === "react" || e === "reactNative", Te = cn(E), ln = () => `
1878
- window.${we} = ${rn}
1879
- window.${Ie} = ${an}
1880
- `, dn = (e, t) => `
1881
- window.${we}(
1882
- "${t}",${JSON.stringify(e)}, ${Te}
1883
- )`, un = ({
1884
+ }) => !(!(W(t).length > 0) || !e || k()), fn = (e) => e === "react" || e === "reactNative", Re = fn(T), hn = () => `
1885
+ window.${Te} = ${dn}
1886
+ window.${Ee} = ${un}
1887
+ `, pn = (e, t) => `
1888
+ window.${Te}(
1889
+ "${t}",${JSON.stringify(e)}, ${Re}
1890
+ )`, gn = ({
1884
1891
  contentId: e,
1885
1892
  variationId: t
1886
- }) => `window.${Ie}(
1887
- "${t}", "${e}", ${Te}
1893
+ }) => `window.${Ee}(
1894
+ "${t}", "${e}", ${Re}
1888
1895
  )`;
1889
1896
  function _(e) {
1890
1897
  return /* @__PURE__ */ l(
@@ -1895,61 +1902,61 @@ function _(e) {
1895
1902
  }
1896
1903
  );
1897
1904
  }
1898
- const mn = (e) => {
1905
+ const bn = (e) => {
1899
1906
  const t = e.get("preview"), n = e.get("overrides." + t);
1900
- return n || C.warn("No previewed ID found in search params."), n;
1907
+ return n || w.warn("No previewed ID found in search params."), n;
1901
1908
  };
1902
- function fn() {
1903
- globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new qe({
1909
+ function yn() {
1910
+ globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Oe({
1904
1911
  max: 500,
1905
1912
  // how long to live in ms
1906
1913
  ttl: 1e3 * 60 * 5
1907
1914
  }));
1908
1915
  }
1909
- function hn(e) {
1910
- fn();
1911
- const t = mn(e);
1916
+ function Sn(e) {
1917
+ yn();
1918
+ const t = bn(e);
1912
1919
  return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
1913
1920
  }
1914
- function pn() {
1921
+ function vn() {
1915
1922
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
1916
1923
  }
1917
- function gn() {
1918
- const e = pn().fetch;
1924
+ function kn() {
1925
+ const e = vn().fetch;
1919
1926
  if (typeof e > "u")
1920
1927
  throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
1921
1928
  For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
1922
1929
  return e;
1923
1930
  }
1924
- const bn = gn();
1925
- function O(e, t = null, n = ".") {
1931
+ const Cn = kn();
1932
+ function $(e, t = null, n = ".") {
1926
1933
  return Object.keys(e).reduce((o, i) => {
1927
1934
  const r = e[i], a = [t, i].filter(Boolean).join(n);
1928
1935
  return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
1929
1936
  ...o,
1930
- ...O(r, a, n)
1937
+ ...$(r, a, n)
1931
1938
  } : {
1932
1939
  ...o,
1933
1940
  [a]: r
1934
1941
  };
1935
1942
  }, {});
1936
1943
  }
1937
- const yn = "v3", ee = "builder.", Sn = "options.", Ee = (e) => {
1944
+ const xn = "v3", ne = "builder.", wn = "options.", Pe = (e) => {
1938
1945
  if (!e)
1939
1946
  return {};
1940
- const t = ce(e), n = {};
1947
+ const t = de(e), n = {};
1941
1948
  return Object.keys(t).forEach((o) => {
1942
- if (o.startsWith(ee)) {
1943
- const i = o.replace(ee, "").replace(Sn, "");
1949
+ if (o.startsWith(ne)) {
1950
+ const i = o.replace(ne, "").replace(wn, "");
1944
1951
  n[i] = t[o];
1945
1952
  }
1946
1953
  }), n;
1947
- }, vn = () => {
1948
- if (!v())
1954
+ }, In = () => {
1955
+ if (!k())
1949
1956
  return {};
1950
1957
  const e = new URLSearchParams(window.location.search);
1951
- return Ee(e);
1952
- }, te = (e) => typeof e == "number" && !isNaN(e) && e >= 0, q = (e) => {
1958
+ return Pe(e);
1959
+ }, oe = (e) => typeof e == "number" && !isNaN(e) && e >= 0, q = (e) => {
1953
1960
  const {
1954
1961
  limit: t = 30,
1955
1962
  userAttributes: n,
@@ -1958,175 +1965,175 @@ const yn = "v3", ee = "builder.", Sn = "options.", Ee = (e) => {
1958
1965
  apiKey: r,
1959
1966
  enrich: a,
1960
1967
  locale: s,
1961
- apiVersion: c = yn,
1962
- fields: m,
1963
- omit: g,
1964
- offset: u,
1965
- cacheSeconds: h,
1966
- staleCacheSeconds: b,
1967
- sort: p,
1968
- includeUnpublished: d
1968
+ apiVersion: c = xn,
1969
+ fields: u,
1970
+ omit: h,
1971
+ offset: d,
1972
+ cacheSeconds: f,
1973
+ staleCacheSeconds: g,
1974
+ sort: v,
1975
+ includeUnpublished: b
1969
1976
  } = e;
1970
1977
  if (!r)
1971
1978
  throw new Error("Missing API key");
1972
1979
  if (!["v3"].includes(c))
1973
1980
  throw new Error(`Invalid apiVersion: expected 'v3', received '${c}'`);
1974
- const y = t !== 1, f = new URL(`https://cdn.builder.io/api/${c}/content/${i}`);
1975
- if (f.searchParams.set("apiKey", r), f.searchParams.set("limit", String(t)), f.searchParams.set("noTraverse", String(y)), f.searchParams.set("includeRefs", String(!0)), s && f.searchParams.set("locale", s), a && f.searchParams.set("enrich", String(a)), f.searchParams.set("omit", g || "meta.componentsUsed"), m && f.searchParams.set("fields", m), Number.isFinite(u) && u > -1 && f.searchParams.set("offset", String(Math.floor(u))), typeof d == "boolean" && f.searchParams.set("includeUnpublished", String(d)), h && te(h) && f.searchParams.set("cacheSeconds", String(h)), b && te(b) && f.searchParams.set("staleCacheSeconds", String(b)), p) {
1976
- const S = O({
1977
- sort: p
1981
+ const E = t !== 1, m = new URL(`https://cdn.builder.io/api/${c}/content/${i}`);
1982
+ if (m.searchParams.set("apiKey", r), m.searchParams.set("limit", String(t)), m.searchParams.set("noTraverse", String(E)), m.searchParams.set("includeRefs", String(!0)), s && m.searchParams.set("locale", s), a && m.searchParams.set("enrich", String(a)), m.searchParams.set("omit", h || "meta.componentsUsed"), u && m.searchParams.set("fields", u), Number.isFinite(d) && d > -1 && m.searchParams.set("offset", String(Math.floor(d))), typeof b == "boolean" && m.searchParams.set("includeUnpublished", String(b)), f && oe(f) && m.searchParams.set("cacheSeconds", String(f)), g && oe(g) && m.searchParams.set("staleCacheSeconds", String(g)), v) {
1983
+ const S = $({
1984
+ sort: v
1978
1985
  });
1979
- for (const T in S)
1980
- f.searchParams.set(T, JSON.stringify(S[T]));
1986
+ for (const x in S)
1987
+ m.searchParams.set(x, JSON.stringify(S[x]));
1981
1988
  }
1982
- const k = {
1983
- ...vn(),
1984
- ...ce(e.options || {})
1985
- }, w = O(k);
1986
- for (const S in w)
1987
- f.searchParams.set(S, String(w[S]));
1988
- if (n && f.searchParams.set("userAttributes", JSON.stringify(n)), o) {
1989
- const S = O({
1989
+ const p = {
1990
+ ...In(),
1991
+ ...de(e.options || {})
1992
+ }, y = $(p);
1993
+ for (const S in y)
1994
+ m.searchParams.set(S, String(y[S]));
1995
+ if (n && m.searchParams.set("userAttributes", JSON.stringify(n)), o) {
1996
+ const S = $({
1990
1997
  query: o
1991
1998
  });
1992
- for (const T in S)
1993
- f.searchParams.set(T, JSON.stringify(S[T]));
1999
+ for (const x in S)
2000
+ m.searchParams.set(x, JSON.stringify(S[x]));
1994
2001
  }
1995
- return f;
1996
- }, kn = (e) => "results" in e;
1997
- async function Re(e) {
1998
- const t = await wn({
2002
+ return m;
2003
+ }, Tn = (e) => "results" in e;
2004
+ async function Ae(e) {
2005
+ const t = await Pn({
1999
2006
  ...e,
2000
2007
  limit: 1
2001
2008
  });
2002
2009
  return t && t[0] || null;
2003
2010
  }
2004
- const xn = async (e) => {
2011
+ const En = async (e) => {
2005
2012
  const t = q(e);
2006
- return await (await (e.fetch ?? bn)(t.href, e.fetchOptions)).json();
2007
- }, Cn = async (e, t, n = q(e)) => {
2013
+ return await (await (e.fetch ?? Cn)(t.href, e.fetchOptions)).json();
2014
+ }, Rn = async (e, t, n = q(e)) => {
2008
2015
  const o = U(e.canTrack);
2009
2016
  if (n.search.includes("preview=")) {
2010
2017
  const r = [];
2011
2018
  for (const a of t.results) {
2012
- const s = hn(n.searchParams);
2019
+ const s = Sn(n.searchParams);
2013
2020
  r.push(s || a);
2014
2021
  }
2015
2022
  t.results = r;
2016
2023
  }
2017
- if (!o || !(v() || E === "reactNative"))
2024
+ if (!o || !(k() || T === "reactNative"))
2018
2025
  return t.results;
2019
2026
  try {
2020
2027
  const r = [];
2021
2028
  for (const a of t.results)
2022
- r.push(await Ut({
2029
+ r.push(await Ht({
2023
2030
  item: a,
2024
2031
  canTrack: o
2025
2032
  }));
2026
2033
  t.results = r;
2027
2034
  } catch (r) {
2028
- C.error("Could not process A/B tests. ", r);
2035
+ w.error("Could not process A/B tests. ", r);
2029
2036
  }
2030
2037
  return t.results;
2031
2038
  };
2032
- async function wn(e) {
2039
+ async function Pn(e) {
2033
2040
  try {
2034
- const t = q(e), n = await xn(e);
2035
- return kn(n) ? Cn(e, n) : (C.error("Error fetching data. ", {
2041
+ const t = q(e), n = await En(e);
2042
+ return Tn(n) ? Rn(e, n) : (w.error("Error fetching data. ", {
2036
2043
  url: t,
2037
2044
  content: n,
2038
2045
  options: e
2039
2046
  }), null);
2040
2047
  } catch (t) {
2041
- return C.error("Error fetching data. ", t), null;
2048
+ return w.error("Error fetching data. ", t), null;
2042
2049
  }
2043
2050
  }
2044
- function ho(e) {
2045
- const t = e || (v() ? window.location.search : void 0);
2046
- return t ? le(t).indexOf("builder.preview=") !== -1 : !1;
2051
+ function vo(e) {
2052
+ const t = e || (k() ? window.location.search : void 0);
2053
+ return t ? ue(t).indexOf("builder.preview=") !== -1 : !1;
2047
2054
  }
2048
- function In() {
2055
+ function An() {
2049
2056
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
2050
2057
  const t = Math.random() * 16 | 0;
2051
2058
  return (e == "x" ? t : t & 3 | 8).toString(16);
2052
2059
  });
2053
2060
  }
2054
- function Pe() {
2055
- return In().replace(/-/g, "");
2061
+ function Ve() {
2062
+ return An().replace(/-/g, "");
2056
2063
  }
2057
- const Ae = "builderSessionId", Tn = async ({
2064
+ const Be = "builderSessionId", Vn = async ({
2058
2065
  canTrack: e
2059
2066
  }) => {
2060
2067
  if (!e)
2061
2068
  return;
2062
- const t = await Se({
2063
- name: Ae,
2069
+ const t = await ke({
2070
+ name: Be,
2064
2071
  canTrack: e
2065
2072
  });
2066
2073
  if (I(t))
2067
2074
  return t;
2068
2075
  {
2069
- const n = En();
2070
- return Rn({
2076
+ const n = Bn();
2077
+ return Wn({
2071
2078
  id: n,
2072
2079
  canTrack: e
2073
2080
  }), n;
2074
2081
  }
2075
- }, En = () => Pe(), Rn = ({
2082
+ }, Bn = () => Ve(), Wn = ({
2076
2083
  id: e,
2077
2084
  canTrack: t
2078
- }) => ve({
2079
- name: Ae,
2085
+ }) => Ce({
2086
+ name: Be,
2080
2087
  value: e,
2081
2088
  canTrack: t
2082
- }), Ve = () => v() && typeof localStorage < "u" ? localStorage : void 0, Pn = ({
2089
+ }), We = () => k() && typeof localStorage < "u" ? localStorage : void 0, $n = ({
2083
2090
  key: e,
2084
2091
  canTrack: t
2085
2092
  }) => {
2086
2093
  var n;
2087
2094
  try {
2088
- return t ? (n = Ve()) == null ? void 0 : n.getItem(e) : void 0;
2095
+ return t ? (n = We()) == null ? void 0 : n.getItem(e) : void 0;
2089
2096
  } catch (o) {
2090
2097
  console.debug("[LocalStorage] GET error: ", o);
2091
2098
  return;
2092
2099
  }
2093
- }, An = ({
2100
+ }, Nn = ({
2094
2101
  key: e,
2095
2102
  canTrack: t,
2096
2103
  value: n
2097
2104
  }) => {
2098
2105
  var o;
2099
2106
  try {
2100
- t && ((o = Ve()) == null || o.setItem(e, n));
2107
+ t && ((o = We()) == null || o.setItem(e, n));
2101
2108
  } catch (i) {
2102
2109
  console.debug("[LocalStorage] SET error: ", i);
2103
2110
  }
2104
- }, Be = "builderVisitorId", Vn = ({
2111
+ }, $e = "builderVisitorId", On = ({
2105
2112
  canTrack: e
2106
2113
  }) => {
2107
2114
  if (!e)
2108
2115
  return;
2109
- const t = Pn({
2110
- key: Be,
2116
+ const t = $n({
2117
+ key: $e,
2111
2118
  canTrack: e
2112
2119
  });
2113
2120
  if (I(t))
2114
2121
  return t;
2115
2122
  {
2116
- const n = Bn();
2117
- return Wn({
2123
+ const n = Fn();
2124
+ return Ln({
2118
2125
  id: n,
2119
2126
  canTrack: e
2120
2127
  }), n;
2121
2128
  }
2122
- }, Bn = () => Pe(), Wn = ({
2129
+ }, Fn = () => Ve(), Ln = ({
2123
2130
  id: e,
2124
2131
  canTrack: t
2125
- }) => An({
2126
- key: Be,
2132
+ }) => Nn({
2133
+ key: $e,
2127
2134
  value: e,
2128
2135
  canTrack: t
2129
- }), On = async ({
2136
+ }), Un = async ({
2130
2137
  canTrack: e
2131
2138
  }) => {
2132
2139
  if (!e)
@@ -2134,16 +2141,16 @@ const Ae = "builderSessionId", Tn = async ({
2134
2141
  visitorId: void 0,
2135
2142
  sessionId: void 0
2136
2143
  };
2137
- const t = await Tn({
2144
+ const t = await Vn({
2138
2145
  canTrack: e
2139
- }), n = Vn({
2146
+ }), n = On({
2140
2147
  canTrack: e
2141
2148
  });
2142
2149
  return {
2143
2150
  sessionId: t,
2144
2151
  visitorId: n
2145
2152
  };
2146
- }, $n = async ({
2153
+ }, Dn = async ({
2147
2154
  type: e,
2148
2155
  canTrack: t,
2149
2156
  apiKey: n,
@@ -2157,23 +2164,23 @@ const Ae = "builderSessionId", Tn = async ({
2157
2164
  url: location.href,
2158
2165
  ...o
2159
2166
  },
2160
- ...await On({
2167
+ ...await Un({
2161
2168
  canTrack: t
2162
2169
  }),
2163
- userAttributes: ue(),
2170
+ userAttributes: fe(),
2164
2171
  ownerId: n
2165
2172
  }
2166
2173
  });
2167
- async function Nn(e) {
2174
+ async function _n(e) {
2168
2175
  if (!e.apiKey) {
2169
- C.error("Missing API key for track call. Please provide your API key.");
2176
+ w.error("Missing API key for track call. Please provide your API key.");
2170
2177
  return;
2171
2178
  }
2172
- if (e.canTrack && !de() && (v() || E === "reactNative"))
2179
+ if (e.canTrack && !me() && (k() || T === "reactNative"))
2173
2180
  return fetch("https://cdn.builder.io/api/v1/track", {
2174
2181
  method: "POST",
2175
2182
  body: JSON.stringify({
2176
- events: [await $n(e)]
2183
+ events: [await Dn(e)]
2177
2184
  }),
2178
2185
  headers: {
2179
2186
  "content-type": "application/json"
@@ -2183,14 +2190,14 @@ async function Nn(e) {
2183
2190
  console.error("Failed to track: ", t);
2184
2191
  });
2185
2192
  }
2186
- const po = (e) => Nn({
2193
+ const ko = (e) => _n({
2187
2194
  ...e,
2188
2195
  canTrack: !0
2189
2196
  });
2190
- function ne(e) {
2197
+ function ie(e) {
2191
2198
  return Math.round(e * 1e3) / 1e3;
2192
2199
  }
2193
- const Fn = (e, t, n = !0) => {
2200
+ const Mn = (e, t, n = !0) => {
2194
2201
  if (!(e instanceof HTMLElement))
2195
2202
  return null;
2196
2203
  let o = n ? e : e.parentElement;
@@ -2201,43 +2208,43 @@ const Fn = (e, t, n = !0) => {
2201
2208
  return o;
2202
2209
  } while (o = o.parentElement);
2203
2210
  return null;
2204
- }, Ln = (e) => Fn(e, (t) => {
2211
+ }, jn = (e) => Mn(e, (t) => {
2205
2212
  const n = t.getAttribute("builder-id") || t.id;
2206
2213
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
2207
- }), oe = ({
2214
+ }), re = ({
2208
2215
  event: e,
2209
2216
  target: t
2210
2217
  }) => {
2211
- const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = ne(o / n.width), a = ne(i / n.height);
2218
+ const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = ie(o / n.width), a = ie(i / n.height);
2212
2219
  return {
2213
2220
  x: r,
2214
2221
  y: a
2215
2222
  };
2216
- }, go = (e) => {
2217
- const t = e.target, n = t && Ln(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2223
+ }, Co = (e) => {
2224
+ const t = e.target, n = t && jn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2218
2225
  return {
2219
2226
  targetBuilderElement: o || void 0,
2220
2227
  metadata: {
2221
- targetOffset: t ? oe({
2228
+ targetOffset: t ? re({
2222
2229
  event: e,
2223
2230
  target: t
2224
2231
  }) : void 0,
2225
- builderTargetOffset: n ? oe({
2232
+ builderTargetOffset: n ? re({
2226
2233
  event: e,
2227
2234
  target: n
2228
2235
  }) : void 0,
2229
2236
  builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
2230
2237
  }
2231
2238
  };
2232
- }, Un = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
2233
- function We(e, t) {
2239
+ }, Hn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
2240
+ function Ne(e, t) {
2234
2241
  const n = new URL(t.origin), o = n.hostname;
2235
- return (e || Un).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
2242
+ return (e || Hn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
2236
2243
  }
2237
- const Dn = "0.14.17", ie = {};
2238
- function _n(e, t) {
2239
- let n = ie[e];
2240
- if (n || (n = ie[e] = []), n.push(t), v()) {
2244
+ const Kn = "0.14.20", ae = {};
2245
+ function zn(e, t) {
2246
+ let n = ae[e];
2247
+ if (n || (n = ae[e] = []), n.push(t), k()) {
2241
2248
  const o = {
2242
2249
  type: "builder.register",
2243
2250
  data: {
@@ -2252,8 +2259,8 @@ function _n(e, t) {
2252
2259
  }
2253
2260
  }
2254
2261
  }
2255
- const bo = () => {
2256
- _n("insertMenu", {
2262
+ const xo = () => {
2263
+ zn("insertMenu", {
2257
2264
  name: "_default",
2258
2265
  default: !0,
2259
2266
  items: [{
@@ -2275,14 +2282,14 @@ const bo = () => {
2275
2282
  }]
2276
2283
  });
2277
2284
  };
2278
- let re = !1;
2279
- const Mn = (e = {}) => {
2285
+ let se = !1;
2286
+ const qn = (e = {}) => {
2280
2287
  var t, n;
2281
- re || (re = !0, v() && ((t = window.parent) == null || t.postMessage({
2288
+ se || (se = !0, k() && ((t = window.parent) == null || t.postMessage({
2282
2289
  type: "builder.sdkInfo",
2283
2290
  data: {
2284
- target: E,
2285
- version: Dn,
2291
+ target: T,
2292
+ version: Kn,
2286
2293
  supportsPatchUpdates: !1,
2287
2294
  // Supports builder-model="..." attribute which is needed to
2288
2295
  // scope our '+ add block' button styling
@@ -2296,7 +2303,7 @@ const Mn = (e = {}) => {
2296
2303
  }
2297
2304
  }, "*"), window.addEventListener("message", (o) => {
2298
2305
  var r, a;
2299
- if (!We(e.trustedHosts, o))
2306
+ if (!Ne(e.trustedHosts, o))
2300
2307
  return;
2301
2308
  const {
2302
2309
  data: i
@@ -2304,45 +2311,45 @@ const Mn = (e = {}) => {
2304
2311
  if (i != null && i.type)
2305
2312
  switch (i.type) {
2306
2313
  case "builder.evaluate": {
2307
- const s = i.data.text, c = i.data.arguments || [], m = i.data.id, g = new Function(s);
2308
- let u, h = null;
2314
+ const s = i.data.text, c = i.data.arguments || [], u = i.data.id, h = new Function(s);
2315
+ let d, f = null;
2309
2316
  try {
2310
- u = g.apply(null, c);
2311
- } catch (b) {
2312
- h = b;
2317
+ d = h.apply(null, c);
2318
+ } catch (g) {
2319
+ f = g;
2313
2320
  }
2314
- h ? (r = window.parent) == null || r.postMessage({
2321
+ f ? (r = window.parent) == null || r.postMessage({
2315
2322
  type: "builder.evaluateError",
2316
2323
  data: {
2317
- id: m,
2318
- error: h.message
2324
+ id: u,
2325
+ error: f.message
2319
2326
  }
2320
- }, "*") : u && typeof u.then == "function" ? u.then((b) => {
2321
- var p;
2322
- (p = window.parent) == null || p.postMessage({
2327
+ }, "*") : d && typeof d.then == "function" ? d.then((g) => {
2328
+ var v;
2329
+ (v = window.parent) == null || v.postMessage({
2323
2330
  type: "builder.evaluateResult",
2324
2331
  data: {
2325
- id: m,
2326
- result: b
2332
+ id: u,
2333
+ result: g
2327
2334
  }
2328
2335
  }, "*");
2329
2336
  }).catch(console.error) : (a = window.parent) == null || a.postMessage({
2330
2337
  type: "builder.evaluateResult",
2331
2338
  data: {
2332
- result: u,
2333
- id: m
2339
+ result: d,
2340
+ id: u
2334
2341
  }
2335
2342
  }, "*");
2336
2343
  break;
2337
2344
  }
2338
2345
  }
2339
2346
  })));
2340
- }, jn = ({
2347
+ }, Yn = ({
2341
2348
  model: e,
2342
2349
  trustedHosts: t,
2343
2350
  callbacks: n
2344
2351
  }) => (o) => {
2345
- if (!We(t, o))
2352
+ if (!Ne(t, o))
2346
2353
  return;
2347
2354
  const {
2348
2355
  data: i
@@ -2363,12 +2370,12 @@ const Mn = (e = {}) => {
2363
2370
  break;
2364
2371
  }
2365
2372
  }
2366
- }, yo = (e, t, n) => {
2367
- if (!v)
2368
- return C.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
2373
+ }, wo = (e, t, n) => {
2374
+ if (!k)
2375
+ return w.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
2369
2376
  };
2370
- Mn();
2371
- const o = jn({
2377
+ qn();
2378
+ const o = Yn({
2372
2379
  callbacks: {
2373
2380
  contentUpdate: t,
2374
2381
  animation: () => {
@@ -2382,7 +2389,7 @@ const Mn = (e = {}) => {
2382
2389
  return window.addEventListener("message", o), () => {
2383
2390
  window.removeEventListener("message", o);
2384
2391
  };
2385
- }, Hn = (e) => {
2392
+ }, Gn = (e) => {
2386
2393
  var r;
2387
2394
  const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((r = e == null ? void 0 : e.files) == null ? void 0 : r.regular);
2388
2395
  let i = "";
@@ -2408,15 +2415,15 @@ font-weight: ${a};
2408
2415
  `.trim());
2409
2416
  }
2410
2417
  return i;
2411
- }, Kn = ({
2418
+ }, Jn = ({
2412
2419
  customFonts: e
2413
2420
  }) => {
2414
2421
  var t;
2415
- return ((t = e == null ? void 0 : e.map((n) => Hn(n))) == null ? void 0 : t.join(" ")) || "";
2416
- }, zn = ({
2422
+ return ((t = e == null ? void 0 : e.map((n) => Gn(n))) == null ? void 0 : t.join(" ")) || "";
2423
+ }, Qn = ({
2417
2424
  cssCode: e,
2418
2425
  contentId: t
2419
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", qn = `
2426
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", Xn = `
2420
2427
  .builder-button {
2421
2428
  all: unset;
2422
2429
  }
@@ -2433,21 +2440,21 @@ font-weight: ${a};
2433
2440
  text-align: inherit;
2434
2441
  font-family: inherit;
2435
2442
  }
2436
- `, Yn = (e) => e ? "" : qn;
2437
- function Gn(e) {
2443
+ `, Zn = (e) => e ? "" : Xn, Io = (e) => `variant-${e}`;
2444
+ function eo(e) {
2438
2445
  const t = `
2439
- ${zn({
2446
+ ${Qn({
2440
2447
  cssCode: e.cssCode,
2441
2448
  contentId: e.contentId
2442
2449
  })}
2443
- ${Kn({
2450
+ ${Jn({
2444
2451
  customFonts: e.customFonts
2445
2452
  })}
2446
- ${Yn(e.isNestedRender)}
2453
+ ${Zn(e.isNestedRender)}
2447
2454
  `.trim();
2448
2455
  return /* @__PURE__ */ l(F, { id: "builderio-content", styles: t });
2449
2456
  }
2450
- const Jn = ({
2457
+ const to = ({
2451
2458
  content: e,
2452
2459
  data: t,
2453
2460
  locale: n
@@ -2464,7 +2471,7 @@ const Jn = ({
2464
2471
  locale: n
2465
2472
  } : {}
2466
2473
  };
2467
- }, Qn = ({
2474
+ }, no = ({
2468
2475
  content: e,
2469
2476
  data: t
2470
2477
  }) => e ? {
@@ -2475,32 +2482,32 @@ const Jn = ({
2475
2482
  },
2476
2483
  meta: e == null ? void 0 : e.meta
2477
2484
  } : void 0;
2478
- function ae(e) {
2479
- var i, r, a, s, c, m, g, u, h;
2480
- const t = un({
2485
+ function ce(e) {
2486
+ var i, r, a, s, c, u, h, d, f;
2487
+ const t = gn({
2481
2488
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2482
2489
  variationId: (i = e.content) == null ? void 0 : i.testVariationId,
2483
2490
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2484
2491
  contentId: (r = e.content) == null ? void 0 : r.id
2485
2492
  }), n = [
2486
- ...Z(),
2493
+ ...te(),
2487
2494
  ...e.customComponents || []
2488
2495
  ].reduce(
2489
- (b, { component: p, ...d }) => ({
2490
- ...b,
2491
- [d.name]: {
2492
- component: p,
2493
- ...D(d)
2496
+ (g, { component: v, ...b }) => ({
2497
+ ...g,
2498
+ [b.name]: {
2499
+ component: v,
2500
+ ...D(b)
2494
2501
  }
2495
2502
  }),
2496
2503
  {}
2497
2504
  ), o = {
2498
- content: Qn({
2505
+ content: no({
2499
2506
  content: e.content,
2500
2507
  data: e.data
2501
2508
  }),
2502
2509
  localState: void 0,
2503
- rootState: Jn({
2510
+ rootState: to({
2504
2511
  content: e.content,
2505
2512
  data: e.data,
2506
2513
  locale: e.locale
@@ -2510,12 +2517,12 @@ function ae(e) {
2510
2517
  apiKey: e.apiKey,
2511
2518
  apiVersion: e.apiVersion,
2512
2519
  componentInfos: [
2513
- ...Z(),
2520
+ ...te(),
2514
2521
  ...e.customComponents || []
2515
2522
  ].reduce(
2516
- (b, { component: p, ...d }) => ({
2517
- ...b,
2518
- [d.name]: D(d)
2523
+ (g, { component: v, ...b }) => ({
2524
+ ...g,
2525
+ [b.name]: D(b)
2519
2526
  }),
2520
2527
  {}
2521
2528
  ),
@@ -2524,7 +2531,7 @@ function ae(e) {
2524
2531
  BlocksWrapperProps: e.blocksWrapperProps || {}
2525
2532
  };
2526
2533
  return /* @__PURE__ */ R(
2527
- ze,
2534
+ Ge,
2528
2535
  {
2529
2536
  content: e.content,
2530
2537
  data: e.data,
@@ -2549,18 +2556,18 @@ function ae(e) {
2549
2556
  }
2550
2557
  ) : null,
2551
2558
  /* @__PURE__ */ l(
2552
- Gn,
2559
+ eo,
2553
2560
  {
2554
2561
  isNestedRender: e.isNestedRender,
2555
2562
  contentId: (a = o.content) == null ? void 0 : a.id,
2556
2563
  cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
2557
- customFonts: (g = (m = o.content) == null ? void 0 : m.data) == null ? void 0 : g.customFonts
2564
+ customFonts: (h = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : h.customFonts
2558
2565
  }
2559
2566
  ),
2560
2567
  /* @__PURE__ */ l(
2561
2568
  K,
2562
2569
  {
2563
- blocks: (h = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : h.blocks,
2570
+ blocks: (f = (d = o.content) == null ? void 0 : d.data) == null ? void 0 : f.blocks,
2564
2571
  context: o,
2565
2572
  registeredComponents: n,
2566
2573
  linkComponent: e.linkComponent
@@ -2570,14 +2577,14 @@ function ae(e) {
2570
2577
  }
2571
2578
  );
2572
2579
  }
2573
- function Xn(e) {
2580
+ function oo(e) {
2574
2581
  var r;
2575
- const t = sn({
2582
+ const t = mn({
2576
2583
  canTrack: U(e.canTrack),
2577
2584
  content: e.content
2578
2585
  }), n = function() {
2579
2586
  var s;
2580
- return dn(
2587
+ return pn(
2581
2588
  W(e.content).map((c) => ({
2582
2589
  id: c.testVariationId,
2583
2590
  testRatio: c.testRatio
@@ -2591,20 +2598,20 @@ function Xn(e) {
2591
2598
  return t ? {
2592
2599
  ...e.content,
2593
2600
  testVariationId: (s = e.content) == null ? void 0 : s.id
2594
- } : Lt({
2601
+ } : jt({
2595
2602
  item: e.content,
2596
2603
  canTrack: U(e.canTrack)
2597
2604
  });
2598
2605
  };
2599
- return /* @__PURE__ */ R(x, { children: [
2600
- !e.isNestedRender && E !== "reactNative" ? /* @__PURE__ */ l(
2606
+ return /* @__PURE__ */ R(C, { children: [
2607
+ !e.isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(
2601
2608
  _,
2602
2609
  {
2603
2610
  id: "builderio-init-variants-fns",
2604
- scriptStr: ln()
2611
+ scriptStr: hn()
2605
2612
  }
2606
2613
  ) : null,
2607
- t ? /* @__PURE__ */ R(x, { children: [
2614
+ t ? /* @__PURE__ */ R(C, { children: [
2608
2615
  /* @__PURE__ */ l(
2609
2616
  F,
2610
2617
  {
@@ -2620,7 +2627,7 @@ function Xn(e) {
2620
2627
  }
2621
2628
  ),
2622
2629
  (r = W(e.content)) == null ? void 0 : r.map((a) => /* @__PURE__ */ l(
2623
- ae,
2630
+ ce,
2624
2631
  {
2625
2632
  isNestedRender: e.isNestedRender,
2626
2633
  content: a,
@@ -2646,7 +2653,7 @@ function Xn(e) {
2646
2653
  ))
2647
2654
  ] }) : null,
2648
2655
  /* @__PURE__ */ l(
2649
- ae,
2656
+ ce,
2650
2657
  {
2651
2658
  isNestedRender: e.isNestedRender,
2652
2659
  content: i(),
@@ -2671,13 +2678,13 @@ function Xn(e) {
2671
2678
  )
2672
2679
  ] });
2673
2680
  }
2674
- const Zn = async ({
2681
+ const io = async ({
2675
2682
  builderContextValue: e,
2676
2683
  symbol: t
2677
2684
  }) => {
2678
2685
  if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
2679
2686
  (e != null && e.apiKey))
2680
- return Re({
2687
+ return Ae({
2681
2688
  model: t.model,
2682
2689
  apiKey: e.apiKey,
2683
2690
  apiVersion: e.apiVersion,
@@ -2687,59 +2694,63 @@ const Zn = async ({
2687
2694
  }
2688
2695
  }
2689
2696
  }).catch((n) => {
2690
- C.error("Could not fetch symbol content: ", n);
2697
+ w.error("Could not fetch symbol content: ", n);
2691
2698
  });
2692
2699
  };
2693
- async function eo(e) {
2694
- var o, i, r, a, s;
2700
+ async function ro(e) {
2701
+ var r, a, s, c, u;
2695
2702
  const t = function() {
2696
- var m, g;
2703
+ return "div";
2704
+ }, n = function() {
2705
+ return "div";
2706
+ }, o = function() {
2707
+ var d, f;
2697
2708
  return [
2698
2709
  e.attributes[M()],
2699
2710
  "builder-symbol",
2700
- (m = e.symbol) != null && m.inline ? "builder-inline-symbol" : void 0,
2701
- (g = e.symbol) != null && g.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2711
+ (d = e.symbol) != null && d.inline ? "builder-inline-symbol" : void 0,
2712
+ (f = e.symbol) != null && f.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2702
2713
  ].filter(Boolean).join(" ");
2703
- }, n = ((o = e.symbol) == null ? void 0 : o.content) || await Zn({
2714
+ }, i = ((r = e.symbol) == null ? void 0 : r.content) || await io({
2704
2715
  symbol: e.symbol,
2705
2716
  builderContextValue: e.builderContext
2706
2717
  });
2707
- return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
2708
- Xn,
2718
+ return /* @__PURE__ */ l("div", { ...e.attributes, className: o(), children: /* @__PURE__ */ l(
2719
+ oo,
2709
2720
  {
2710
2721
  isNestedRender: !0,
2711
2722
  apiVersion: e.builderContext.apiVersion,
2712
2723
  apiKey: e.builderContext.apiKey,
2713
2724
  context: {
2714
2725
  ...e.builderContext.context,
2715
- symbolId: (i = e.builderBlock) == null ? void 0 : i.id
2726
+ symbolId: (a = e.builderBlock) == null ? void 0 : a.id
2716
2727
  },
2717
2728
  customComponents: Object.values(e.builderComponents),
2718
2729
  data: {
2719
- ...(r = e.symbol) == null ? void 0 : r.data,
2730
+ ...(s = e.symbol) == null ? void 0 : s.data,
2720
2731
  ...e.builderContext.localState,
2721
- ...(a = n == null ? void 0 : n.data) == null ? void 0 : a.state
2732
+ ...(c = i == null ? void 0 : i.data) == null ? void 0 : c.state
2722
2733
  },
2723
- model: (s = e.symbol) == null ? void 0 : s.model,
2724
- content: n,
2734
+ model: (u = e.symbol) == null ? void 0 : u.model,
2735
+ content: i,
2725
2736
  linkComponent: e.builderLinkComponent,
2726
- blocksWrapper: "div",
2727
- contentWrapper: "div"
2737
+ blocksWrapper: t(),
2738
+ contentWrapper: n()
2728
2739
  }
2729
2740
  ) });
2730
2741
  }
2731
- const se = {};
2732
- function So(e) {
2733
- if (v()) {
2734
- Object.assign(se, e);
2742
+ const le = {};
2743
+ function To(e) {
2744
+ if (k()) {
2745
+ Object.assign(le, e);
2735
2746
  const t = {
2736
2747
  type: "builder.settingsChange",
2737
- data: se
2748
+ data: le
2738
2749
  };
2739
2750
  parent.postMessage(t, "*");
2740
2751
  }
2741
2752
  }
2742
- const vo = async (e) => {
2753
+ const Eo = async (e) => {
2743
2754
  var o, i, r;
2744
2755
  const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
2745
2756
  ...e,
@@ -2751,49 +2762,50 @@ const vo = async (e) => {
2751
2762
  urlPath: t
2752
2763
  } : {}
2753
2764
  },
2754
- options: Ee(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
2765
+ options: Pe(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
2755
2766
  };
2756
2767
  return {
2757
2768
  apiKey: n.apiKey,
2758
2769
  model: n.model,
2759
- content: await Re(n)
2770
+ content: await Ae(n)
2760
2771
  };
2761
2772
  };
2762
2773
  export {
2763
- po as A,
2774
+ Pe as A,
2764
2775
  K as B,
2765
- Tt as C,
2766
- yo as D,
2767
- vo as E,
2768
- Cn as F,
2769
- wn as G,
2770
- eo as S,
2771
- Gt as T,
2772
- Nn as _,
2773
- Ct as a,
2774
- lo as b,
2775
- de as c,
2776
- uo as d,
2777
- mo as e,
2778
- v as f,
2776
+ Vt as C,
2777
+ ko as D,
2778
+ wo as E,
2779
+ Eo as F,
2780
+ Rn as G,
2781
+ Pn as H,
2782
+ ro as S,
2783
+ en as T,
2784
+ _n as _,
2785
+ Et as a,
2786
+ go as b,
2787
+ me as c,
2788
+ bo as d,
2789
+ yo as e,
2790
+ k as f,
2779
2791
  M as g,
2780
2792
  U as h,
2781
- so as i,
2782
- ho as j,
2783
- jn as k,
2784
- C as l,
2785
- H as m,
2786
- go as n,
2787
- bn as o,
2788
- N as p,
2789
- fo as q,
2790
- bo as r,
2791
- Mn as s,
2792
- co as t,
2793
- Re as u,
2794
- fn as v,
2795
- Xn as w,
2796
- _n as x,
2797
- So as y,
2798
- Ee as z
2793
+ ho as i,
2794
+ vo as j,
2795
+ Io as k,
2796
+ w as l,
2797
+ Yn as m,
2798
+ H as n,
2799
+ Co as o,
2800
+ Cn as p,
2801
+ O as q,
2802
+ xo as r,
2803
+ qn as s,
2804
+ po as t,
2805
+ So as u,
2806
+ Ae as v,
2807
+ yn as w,
2808
+ oo as x,
2809
+ zn as y,
2810
+ To as z
2799
2811
  };