@builder.io/sdk-react-nextjs 0.14.6 → 0.14.7

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 (38) hide show
  1. package/README.md +8 -2
  2. package/lib/browser/USE_CLIENT_BUNDLE-9a694813.cjs +21 -0
  3. package/lib/browser/{USE_CLIENT_BUNDLE-dbef551d.js → USE_CLIENT_BUNDLE-f0eac1bb.js} +143 -136
  4. package/lib/{edge/USE_SERVER_BUNDLE-abb6c4ae.js → browser/USE_SERVER_BUNDLE-280036e3.js} +1 -1
  5. package/lib/{edge/USE_SERVER_BUNDLE-2000e927.cjs → browser/USE_SERVER_BUNDLE-ea761ee7.cjs} +1 -1
  6. package/lib/browser/{bundle-b2b7ab8b.js → bundle-187b6567.js} +620 -585
  7. package/lib/browser/bundle-f2d9f409.cjs +168 -0
  8. package/lib/browser/index.cjs +1 -1
  9. package/lib/browser/index.mjs +3 -3
  10. package/lib/{node/USE_CLIENT_BUNDLE-22e26b2f.js → edge/USE_CLIENT_BUNDLE-7cf0df22.js} +143 -136
  11. package/lib/edge/USE_CLIENT_BUNDLE-bda05805.cjs +21 -0
  12. package/lib/{node/USE_SERVER_BUNDLE-5a67cb67.cjs → edge/USE_SERVER_BUNDLE-0165e9c2.cjs} +1 -1
  13. package/lib/{node/USE_SERVER_BUNDLE-90b6e155.js → edge/USE_SERVER_BUNDLE-536a078a.js} +1 -1
  14. package/lib/edge/{bundle-9950e3ec.js → bundle-d26182eb.js} +1253 -1218
  15. package/lib/edge/{bundle-f4b34118.cjs → bundle-f84983cc.cjs} +35 -35
  16. package/lib/edge/index.cjs +1 -1
  17. package/lib/edge/index.mjs +3 -3
  18. package/lib/{edge/USE_CLIENT_BUNDLE-471a7309.js → node/USE_CLIENT_BUNDLE-04e65a8b.js} +143 -136
  19. package/lib/node/USE_CLIENT_BUNDLE-4e14ccee.cjs +21 -0
  20. package/lib/{browser/USE_SERVER_BUNDLE-545db2f7.cjs → node/USE_SERVER_BUNDLE-6f53d199.cjs} +1 -1
  21. package/lib/{browser/USE_SERVER_BUNDLE-a6a333bd.js → node/USE_SERVER_BUNDLE-dee3041b.js} +1 -1
  22. package/lib/node/{bundle-a8519a3b.js → bundle-29f6bee7.js} +245 -210
  23. package/lib/node/{bundle-9f34ab83.cjs → bundle-b303d0db.cjs} +11 -11
  24. package/lib/node/index.cjs +1 -1
  25. package/lib/node/index.mjs +3 -3
  26. package/package.json +1 -1
  27. package/types/cjs/components/block/block.helpers.d.ts +4 -0
  28. package/types/cjs/constants/sdk-version.d.ts +1 -1
  29. package/types/cjs/functions/evaluate/evaluate.d.ts +3 -1
  30. package/types/cjs/functions/evaluate/helpers.d.ts +1 -0
  31. package/types/esm/components/block/block.helpers.d.ts +4 -0
  32. package/types/esm/constants/sdk-version.d.ts +1 -1
  33. package/types/esm/functions/evaluate/evaluate.d.ts +3 -1
  34. package/types/esm/functions/evaluate/helpers.d.ts +1 -0
  35. package/lib/browser/USE_CLIENT_BUNDLE-e0428aec.cjs +0 -21
  36. package/lib/browser/bundle-0de8b96d.cjs +0 -168
  37. package/lib/edge/USE_CLIENT_BUNDLE-1ce5de06.cjs +0 -21
  38. package/lib/node/USE_CLIENT_BUNDLE-07b10dcb.cjs +0 -21
@@ -1,9 +1,9 @@
1
- import { jsx as l, Fragment as S, jsxs as R } from "react/jsx-runtime";
1
+ import { jsx as l, Fragment as v, jsxs as R } from "react/jsx-runtime";
2
2
  import "react";
3
- import { LRUCache as Be } from "lru-cache";
4
- import { I as Ve, B as We, a as Oe, D as $e, C as Fe, E as Ne, b as Le, V as Ue, c as _e, F as De, d as je, S as Me, e as He } from "./USE_CLIENT_BUNDLE-dbef551d.js";
3
+ import { LRUCache as We } from "lru-cache";
4
+ import { I as Oe, B as $e, a as Ne, D as Fe, C as Le, E as Ue, b as _e, V as De, c as Me, F as je, d as He, S as Ke, e as ze } from "./USE_CLIENT_BUNDLE-f0eac1bb.js";
5
5
  import "next/navigation";
6
- const Ke = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), no = (e) => typeof e == "string" && Ke.has(e.toLowerCase()), T = "rsc", D = () => {
6
+ const qe = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), ro = (e) => typeof e == "string" && qe.has(e.toLowerCase()), T = "rsc", M = () => {
7
7
  switch (T) {
8
8
  case "react":
9
9
  case "reactNative":
@@ -16,7 +16,7 @@ const Ke = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr",
16
16
  return "class";
17
17
  }
18
18
  };
19
- function ze(e) {
19
+ function Ge(e) {
20
20
  var t;
21
21
  return {
22
22
  ...(t = e.component) == null ? void 0 : t.options,
@@ -27,35 +27,35 @@ function ze(e) {
27
27
  builderBlock: e
28
28
  };
29
29
  }
30
- const P = "[Builder.io]: ", x = {
31
- log: (...e) => console.log(P, ...e),
32
- error: (...e) => console.error(P, ...e),
33
- warn: (...e) => console.warn(P, ...e),
34
- debug: (...e) => console.debug(P, ...e)
30
+ const A = "[Builder.io]: ", x = {
31
+ log: (...e) => console.log(A, ...e),
32
+ error: (...e) => console.error(A, ...e),
33
+ warn: (...e) => console.warn(A, ...e),
34
+ debug: (...e) => console.debug(A, ...e)
35
35
  };
36
- function k() {
36
+ function S() {
37
37
  return typeof window < "u" && typeof document < "u";
38
38
  }
39
- const qe = (e) => {
39
+ const Je = (e) => {
40
40
  const t = {};
41
41
  return e.forEach((n, o) => {
42
42
  t[o] = n;
43
43
  }), t;
44
- }, se = (e) => e instanceof URLSearchParams ? qe(e) : e, ce = (e) => typeof e == "string" ? e : e instanceof URLSearchParams ? e.toString() : new URLSearchParams(e).toString();
45
- function Ge() {
46
- return k() && window.self !== window.top;
44
+ }, le = (e) => e instanceof URLSearchParams ? Je(e) : e, de = (e) => typeof e == "string" ? e : e instanceof URLSearchParams ? e.toString() : new URLSearchParams(e).toString();
45
+ function Ye() {
46
+ return S() && window.self !== window.top;
47
47
  }
48
48
  function j(e) {
49
- return Ge() && ce(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
49
+ return Ye() && de(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
50
50
  }
51
- const Ye = () => {
52
- if (k()) {
51
+ const Qe = () => {
52
+ if (S()) {
53
53
  const e = new URL(location.href);
54
54
  return e.pathname === "" && (e.pathname = "/"), e;
55
55
  } else
56
56
  return console.warn("Cannot get location for tracking in non-browser environment"), null;
57
- }, Je = () => typeof navigator == "object" && navigator.userAgent || "", le = () => {
58
- const e = Je(), t = {
57
+ }, Xe = () => typeof navigator == "object" && navigator.userAgent || "", ue = () => {
58
+ const e = Xe(), t = {
59
59
  Android() {
60
60
  return e.match(/Android/i);
61
61
  },
@@ -74,13 +74,13 @@ const Ye = () => {
74
74
  any() {
75
75
  return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || T === "reactNative";
76
76
  }
77
- }, n = e.match(/Tablet|iPad/i), o = Ye();
77
+ }, n = e.match(/Tablet|iPad/i), o = Qe();
78
78
  return {
79
79
  urlPath: o == null ? void 0 : o.pathname,
80
80
  host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
81
81
  device: n ? "tablet" : t.any() ? "mobile" : "desktop"
82
82
  };
83
- }, Qe = ({
83
+ }, Ze = ({
84
84
  builder: e,
85
85
  context: t,
86
86
  event: n,
@@ -92,14 +92,14 @@ const Ye = () => {
92
92
  builder: e,
93
93
  context: t,
94
94
  event: n
95
- }), Xe = () => ({
95
+ }), et = () => ({
96
96
  isEditing: j(),
97
- isBrowser: k(),
98
- isServer: !k(),
99
- getUserAttributes: () => le()
100
- }), Ze = (e, {
97
+ isBrowser: S(),
98
+ isServer: !S(),
99
+ getUserAttributes: () => ue()
100
+ }), tt = (e, {
101
101
  isExpression: t = !0
102
- }) => /* 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, q = ({
102
+ }) => /* 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 = ({
103
103
  code: e,
104
104
  builder: t,
105
105
  context: n,
@@ -108,11 +108,11 @@ const Ye = () => {
108
108
  rootSetState: r,
109
109
  rootState: a
110
110
  }) => {
111
- const s = Qe({
111
+ const s = Ze({
112
112
  builder: t,
113
113
  context: n,
114
114
  event: o,
115
- state: de({
115
+ state: me({
116
116
  rootState: a,
117
117
  localState: i,
118
118
  rootSetState: r
@@ -120,7 +120,7 @@ const Ye = () => {
120
120
  });
121
121
  return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
122
122
  };
123
- function de({
123
+ function me({
124
124
  rootState: e,
125
125
  localState: t,
126
126
  rootSetState: n
@@ -130,7 +130,7 @@ function de({
130
130
  if (t && i in t)
131
131
  return t[i];
132
132
  const r = o[i];
133
- return typeof r == "object" ? de({
133
+ return typeof r == "object" && r !== null ? me({
134
134
  rootState: r,
135
135
  localState: void 0,
136
136
  rootSetState: n ? (a) => {
@@ -146,57 +146,88 @@ function de({
146
146
  });
147
147
  }
148
148
  const w = (e) => e != null;
149
- function et() {
149
+ function nt() {
150
150
  var e;
151
151
  return typeof process < "u" && w((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
152
152
  }
153
- const tt = () => {
153
+ const ot = () => {
154
154
  var o;
155
- if (!et())
155
+ if (!nt())
156
156
  return !1;
157
157
  const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
158
158
  return e && t && !n ? (x.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;
159
- }, nt = (e) => (k() || tt(), q(e));
160
- function M({
159
+ }, it = (e) => (S() || ot(), J(e)), H = class P {
160
+ static getCacheKey(t) {
161
+ return JSON.stringify({
162
+ ...t,
163
+ // replace the event with a random number to break cache
164
+ // thats because we can't serialize the event object due to circular refs in DOM node refs.
165
+ event: t.event ? Math.random() : void 0
166
+ });
167
+ }
168
+ static getCachedValue(t) {
169
+ return P.cache.get(t);
170
+ }
171
+ static setCachedValue(t, n) {
172
+ P.cache.size > 20 && P.cache.delete(P.cache.keys().next().value), P.cache.set(t, {
173
+ value: n
174
+ });
175
+ }
176
+ };
177
+ H.cacheLimit = 20;
178
+ H.cache = /* @__PURE__ */ new Map();
179
+ let V = H;
180
+ function K({
161
181
  code: e,
162
182
  context: t,
163
183
  localState: n,
164
184
  rootState: o,
165
185
  rootSetState: i,
166
186
  event: r,
167
- isExpression: a = !0
187
+ isExpression: a = !0,
188
+ enableCache: s
168
189
  }) {
169
190
  if (e === "") {
170
191
  x.warn("Skipping evaluation of empty code block.");
171
192
  return;
172
193
  }
173
- const s = {
174
- code: Ze(e, {
194
+ const c = {
195
+ code: tt(e, {
175
196
  isExpression: a
176
197
  }),
177
- builder: Xe(),
198
+ builder: et(),
178
199
  context: t,
179
200
  event: r,
180
201
  rootSetState: i,
181
202
  rootState: o,
182
203
  localState: n
183
204
  };
205
+ if (s) {
206
+ const d = V.getCacheKey(c), p = V.getCachedValue(d);
207
+ if (p)
208
+ return p.value;
209
+ }
184
210
  try {
185
- return nt(s);
186
- } catch (c) {
187
- x.error("Failed code evaluation: " + c.message, {
211
+ const d = it(c);
212
+ if (s) {
213
+ const p = V.getCacheKey(c);
214
+ V.setCachedValue(p, d);
215
+ }
216
+ return d;
217
+ } catch (d) {
218
+ x.error("Failed code evaluation: " + d.message, {
188
219
  code: e
189
220
  });
190
221
  return;
191
222
  }
192
223
  }
193
- const W = (e) => JSON.parse(JSON.stringify(e)), ot = (e, t, n) => {
224
+ const $ = (e) => JSON.parse(JSON.stringify(e)), rt = (e, t, n) => {
194
225
  if (Object(e) !== e)
195
226
  return e;
196
227
  const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
197
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;
198
229
  };
199
- const it = ({
230
+ const at = ({
200
231
  block: e,
201
232
  context: t,
202
233
  localState: n,
@@ -205,7 +236,7 @@ const it = ({
205
236
  }) => {
206
237
  if (!e.bindings)
207
238
  return e;
208
- const r = W(e), a = {
239
+ const r = $(e), a = {
209
240
  ...r,
210
241
  properties: {
211
242
  ...r.properties
@@ -215,18 +246,19 @@ const it = ({
215
246
  }
216
247
  };
217
248
  for (const s in e.bindings) {
218
- const c = e.bindings[s], m = M({
249
+ const c = e.bindings[s], d = K({
219
250
  code: c,
220
251
  localState: n,
221
252
  rootState: o,
222
253
  rootSetState: i,
223
- context: t
254
+ context: t,
255
+ enableCache: !0
224
256
  });
225
- ot(a, s, m);
257
+ rt(a, s, d);
226
258
  }
227
259
  return a;
228
260
  };
229
- function V({
261
+ function O({
230
262
  block: e,
231
263
  context: t,
232
264
  shouldEvaluateBindings: n,
@@ -235,7 +267,7 @@ function V({
235
267
  rootSetState: r
236
268
  }) {
237
269
  const a = e;
238
- return n ? it({
270
+ return n ? at({
239
271
  block: a,
240
272
  localState: o,
241
273
  rootState: i,
@@ -243,13 +275,55 @@ function V({
243
275
  context: t
244
276
  }) : a;
245
277
  }
246
- const rt = ({
278
+ const st = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), fe = (e) => Object.entries(e).map(([n, o]) => {
279
+ if (typeof o == "string")
280
+ return `${st(n)}: ${o};`;
281
+ }).filter(w), ct = (e) => fe(e).join(`
282
+ `), L = ({
283
+ mediaQuery: e,
284
+ className: t,
285
+ styles: n
286
+ }) => {
287
+ const o = `.${t} {
288
+ ${ct(n)}
289
+ }`;
290
+ return e ? `${e} {
291
+ ${o}
292
+ }` : o;
293
+ };
294
+ function lt({
295
+ style: e
296
+ }) {
297
+ return e;
298
+ }
299
+ const dt = ({
300
+ block: e,
301
+ context: t
302
+ }) => he(lt({
303
+ style: e.style || {},
304
+ context: t,
305
+ block: e
306
+ }));
307
+ function he(e) {
308
+ switch (T) {
309
+ case "svelte":
310
+ case "vue":
311
+ case "solid":
312
+ return fe(e).join(" ");
313
+ case "qwik":
314
+ case "reactNative":
315
+ case "react":
316
+ case "rsc":
317
+ return e;
318
+ }
319
+ }
320
+ const ut = ({
247
321
  block: e,
248
322
  context: t,
249
323
  registeredComponents: n
250
324
  }) => {
251
325
  var r;
252
- const o = (r = V({
326
+ const o = (r = O({
253
327
  block: e,
254
328
  localState: t.localState,
255
329
  rootState: t.rootState,
@@ -265,7 +339,7 @@ const rt = ({
265
339
  console.warn(`
266
340
  Could not find a registered component named "${o}".
267
341
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
268
- }, at = ({
342
+ }, mt = ({
269
343
  block: e,
270
344
  context: t
271
345
  }) => {
@@ -275,30 +349,31 @@ const rt = ({
275
349
  } = e;
276
350
  if (!(n != null && n.collection))
277
351
  return;
278
- const i = M({
352
+ const i = K({
279
353
  code: n.collection,
280
354
  localState: t.localState,
281
355
  rootState: t.rootState,
282
356
  rootSetState: t.rootSetState,
283
- context: t.context
357
+ context: t.context,
358
+ enableCache: !0
284
359
  });
285
360
  if (!Array.isArray(i))
286
361
  return;
287
362
  const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
288
- return i.map((c, m) => ({
363
+ return i.map((c, d) => ({
289
364
  context: {
290
365
  ...t,
291
366
  localState: {
292
367
  ...t.localState,
293
- $index: m,
368
+ $index: d,
294
369
  $item: c,
295
370
  [a]: c,
296
- [`$${a}Index`]: m
371
+ [`$${a}Index`]: d
297
372
  }
298
373
  },
299
374
  block: o
300
375
  }));
301
- }, ue = {
376
+ }, pe = {
302
377
  small: {
303
378
  min: 320,
304
379
  default: 321,
@@ -314,11 +389,11 @@ const rt = ({
314
389
  default: 991,
315
390
  max: 1200
316
391
  }
317
- }, G = (e, t = ue) => `@media (max-width: ${t[e].max}px)`, me = ({
392
+ }, Y = (e, t = pe) => `@media (max-width: ${t[e].max}px)`, ge = ({
318
393
  small: e,
319
394
  medium: t
320
395
  }) => {
321
- const n = W(ue);
396
+ const n = $(pe);
322
397
  if (!e || !t)
323
398
  return n;
324
399
  const o = Math.floor(e / 2);
@@ -340,28 +415,13 @@ const rt = ({
340
415
  min: r,
341
416
  default: r + 1
342
417
  }, n;
343
- }, st = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), fe = (e) => Object.entries(e).map(([n, o]) => {
344
- if (typeof o == "string")
345
- return `${st(n)}: ${o};`;
346
- }).filter(w), ct = (e) => fe(e).join(`
347
- `), N = ({
348
- mediaQuery: e,
349
- className: t,
350
- styles: n
351
- }) => {
352
- const o = `.${t} {
353
- ${ct(n)}
354
- }`;
355
- return e ? `${e} {
356
- ${o}
357
- }` : o;
358
418
  };
359
- function O(e) {
419
+ function N(e) {
360
420
  return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
361
421
  }
362
- function lt(e) {
422
+ function ft(e) {
363
423
  const t = function() {
364
- const i = V({
424
+ const i = O({
365
425
  block: e.block,
366
426
  localState: e.context.localState,
367
427
  rootState: e.context.rootState,
@@ -371,60 +431,61 @@ function lt(e) {
371
431
  });
372
432
  return w(i.hide) ? !i.hide : w(i.show) ? i.show : !0;
373
433
  }, n = function() {
374
- var d;
375
- const i = V({
434
+ var m;
435
+ const i = O({
376
436
  block: e.block,
377
437
  localState: e.context.localState,
378
438
  rootState: e.context.rootState,
379
439
  rootSetState: e.context.rootSetState,
380
440
  context: e.context.context,
381
441
  shouldEvaluateBindings: !0
382
- }), r = i.responsiveStyles, a = e.context.content, s = me(
383
- ((d = a == null ? void 0 : a.meta) == null ? void 0 : d.breakpoints) || {}
384
- ), c = r == null ? void 0 : r.large, m = r == null ? void 0 : r.medium, b = r == null ? void 0 : r.small, g = i.id;
385
- if (!g)
442
+ }), r = i.responsiveStyles, a = e.context.content, s = ge(
443
+ ((m = a == null ? void 0 : a.meta) == null ? void 0 : m.breakpoints) || {}
444
+ ), c = r == null ? void 0 : r.large, d = r == null ? void 0 : r.medium, p = r == null ? void 0 : r.small, u = i.id;
445
+ if (!u)
386
446
  return "";
387
- const f = c ? N({
388
- className: g,
447
+ const f = c ? L({
448
+ className: u,
389
449
  styles: c
390
- }) : "", h = m ? N({
391
- className: g,
392
- styles: m,
393
- mediaQuery: G(
450
+ }) : "", b = d ? L({
451
+ className: u,
452
+ styles: d,
453
+ mediaQuery: Y(
394
454
  "medium",
395
455
  s
396
456
  )
397
- }) : "", u = b ? N({
398
- className: g,
399
- styles: b,
400
- mediaQuery: G(
457
+ }) : "", h = p ? L({
458
+ className: u,
459
+ styles: p,
460
+ mediaQuery: Y(
401
461
  "small",
402
462
  s
403
463
  )
404
464
  }) : "";
405
- return [f, h, u].join(" ");
465
+ return [f, b, h].join(" ");
406
466
  };
407
- return /* @__PURE__ */ l(S, { children: n() && t() ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
467
+ return /* @__PURE__ */ l(v, { children: n() && t() ? /* @__PURE__ */ l(v, { children: /* @__PURE__ */ l(N, { styles: n() }) }) : null });
408
468
  }
409
- function dt(e) {
469
+ function ht(e) {
410
470
  return e.charAt(0).toUpperCase() + e.slice(1);
411
471
  }
412
- const ut = (e) => `on${dt(e)}`, mt = (e, t) => (n) => M({
472
+ const pt = (e) => `on${ht(e)}`, gt = (e, t) => (n) => K({
413
473
  code: e,
414
474
  context: t.context,
415
475
  localState: t.localState,
416
476
  rootState: t.rootState,
417
477
  rootSetState: t.rootSetState,
418
478
  event: n,
419
- isExpression: !1
479
+ isExpression: !1,
480
+ enableCache: !0
420
481
  });
421
- function oo(e) {
482
+ function ao(e) {
422
483
  const t = {}, n = e.block.actions ?? {};
423
484
  for (const o in n) {
424
485
  if (!n.hasOwnProperty(o))
425
486
  continue;
426
487
  const i = n[o];
427
- let r = ut(o);
488
+ let r = pt(o);
428
489
  if (e.stripPrefix)
429
490
  switch (T) {
430
491
  case "vue":
@@ -434,66 +495,40 @@ function oo(e) {
434
495
  r = r.replace("on:", "");
435
496
  break;
436
497
  }
437
- t[r] = mt(i, e);
498
+ t[r] = gt(i, e);
438
499
  }
439
500
  return t;
440
501
  }
441
- function ft({
442
- style: e
443
- }) {
444
- return e;
445
- }
446
- const ht = ({
447
- block: e,
448
- context: t
449
- }) => he(ft({
450
- style: e.style || {},
451
- context: t,
452
- block: e
453
- }));
454
- function he(e) {
455
- switch (T) {
456
- case "svelte":
457
- case "vue":
458
- case "solid":
459
- return fe(e).join(" ");
460
- case "qwik":
461
- case "reactNative":
462
- case "react":
463
- case "rsc":
464
- return e;
465
- }
466
- }
467
- function pt({
502
+ function bt({
468
503
  properties: e
469
504
  }) {
470
505
  return e;
471
506
  }
472
- const gt = (e) => ({
507
+ const yt = (e) => ({
473
508
  href: e.href
474
509
  });
475
- function bt({
510
+ function St({
476
511
  block: e,
477
512
  context: t
478
513
  }) {
479
514
  var o;
480
515
  const n = {
481
- ...gt(e),
516
+ ...yt(e),
482
517
  ...e.properties,
483
518
  "builder-id": e.id,
484
- style: ht({
519
+ style: dt({
485
520
  block: e,
486
521
  context: t
487
522
  }),
488
- [D()]: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
523
+ [M()]: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
489
524
  };
490
- return pt({
525
+ return bt({
491
526
  properties: n,
492
527
  context: t,
493
528
  block: e
494
529
  });
495
530
  }
496
- const yt = ({
531
+ const kt = ({
497
532
  componentOptions: e,
498
533
  builderBlock: t,
499
534
  context: n,
@@ -509,7 +544,7 @@ const yt = ({
509
544
  * component itself directly. Otherwise, they are provided to the wrapper element.
510
545
  */
511
546
  ...i ? {
512
- attributes: bt({
547
+ attributes: St({
513
548
  block: t,
514
549
  context: a
515
550
  })
@@ -523,13 +558,13 @@ const yt = ({
523
558
  includeBlockProps: i
524
559
  } : s;
525
560
  };
526
- function Y(e) {
561
+ function Q(e) {
527
562
  var n;
528
- const t = e.isInteractive ? Ve : e.componentRef;
529
- return /* @__PURE__ */ l(S, { children: e.componentRef ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
563
+ const t = e.isInteractive ? Oe : e.componentRef;
564
+ return /* @__PURE__ */ l(v, { children: e.componentRef ? /* @__PURE__ */ l(v, { children: /* @__PURE__ */ l(
530
565
  t,
531
566
  {
532
- ...yt({
567
+ ...kt({
533
568
  componentOptions: e.componentOptions,
534
569
  builderBlock: e.builderBlock,
535
570
  context: e.context,
@@ -540,7 +575,7 @@ function Y(e) {
540
575
  contextValue: e.context
541
576
  }),
542
577
  children: (n = e.blockChildren) == null ? void 0 : n.map((o) => /* @__PURE__ */ l(
543
- $,
578
+ F,
544
579
  {
545
580
  block: o,
546
581
  context: e.context,
@@ -552,10 +587,10 @@ function Y(e) {
552
587
  }
553
588
  ) }) : null });
554
589
  }
555
- function St(e) {
590
+ function vt(e) {
556
591
  const t = e.repeatContext;
557
592
  return /* @__PURE__ */ l(
558
- $,
593
+ F,
559
594
  {
560
595
  block: e.block,
561
596
  context: t,
@@ -564,22 +599,22 @@ function St(e) {
564
599
  }
565
600
  );
566
601
  }
567
- function $(e) {
568
- var m, b, g;
602
+ function F(e) {
603
+ var c, d, p;
569
604
  const t = function() {
570
- return rt({
605
+ return ut({
571
606
  block: e.block,
572
607
  context: e.context,
573
608
  registeredComponents: e.registeredComponents
574
609
  });
575
610
  }, n = function() {
576
- return at({
611
+ return mt({
577
612
  block: e.block,
578
613
  context: e.context
579
614
  });
580
615
  }, o = function() {
581
- var h;
582
- return (h = e.block.repeat) != null && h.collection ? e.block : V({
616
+ var f;
617
+ return (f = e.block.repeat) != null && f.collection ? e.block : O({
583
618
  block: e.block,
584
619
  localState: e.context.localState,
585
620
  rootState: e.context.rootState,
@@ -588,44 +623,44 @@ function $(e) {
588
623
  shouldEvaluateBindings: !0
589
624
  });
590
625
  }, i = function() {
591
- var u;
592
- return e.block.tagName === "a" || ((u = o().properties) == null ? void 0 : u.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
626
+ var b;
627
+ return e.block.tagName === "a" || ((b = o().properties) == null ? void 0 : b.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
593
628
  }, r = function() {
594
- var d, y;
595
- if ((d = e.block.repeat) != null && d.collection)
596
- return !!((y = n()) != null && y.length);
597
- const h = "hide" in o() ? o().hide : !1;
598
- return ("show" in o() ? o().show : !0) && !h;
629
+ var h, m;
630
+ if ((h = e.block.repeat) != null && h.collection)
631
+ return !!((m = n()) != null && m.length);
632
+ const f = "hide" in o() ? o().hide : !1;
633
+ return ("show" in o() ? o().show : !0) && !f;
599
634
  }, a = function() {
600
- var u;
601
- return !((u = t()) != null && u.component) && !n() ? o().children ?? [] : [];
635
+ var b;
636
+ return !((b = t()) != null && b.component) && !n() ? o().children ?? [] : [];
602
637
  }, s = function() {
603
- var h, u, d, y, p, C, E, v, I, F;
638
+ var f, b, h, m, y, g, C, E, k, I;
604
639
  return {
605
640
  blockChildren: o().children ?? [],
606
- componentRef: (h = t()) == null ? void 0 : h.component,
641
+ componentRef: (f = t()) == null ? void 0 : f.component,
607
642
  componentOptions: {
608
- ...ze(o()),
643
+ ...Ge(o()),
609
644
  builderContext: e.context,
610
- ...((u = t()) == null ? void 0 : u.name) === "Core:Button" || ((d = t()) == null ? void 0 : d.name) === "Symbol" || ((y = t()) == null ? void 0 : y.name) === "Columns" || ((p = t()) == null ? void 0 : p.name) === "Form:Form" ? {
645
+ ...((b = t()) == null ? void 0 : b.name) === "Core:Button" || ((h = t()) == null ? void 0 : h.name) === "Symbol" || ((m = t()) == null ? void 0 : m.name) === "Columns" || ((y = t()) == null ? void 0 : y.name) === "Form:Form" ? {
611
646
  builderLinkComponent: e.linkComponent
612
647
  } : {},
613
- ...((C = t()) == null ? void 0 : C.name) === "Symbol" || ((E = t()) == null ? void 0 : E.name) === "Columns" || ((v = t()) == null ? void 0 : v.name) === "Form:Form" ? {
648
+ ...((g = t()) == null ? void 0 : g.name) === "Symbol" || ((C = t()) == null ? void 0 : C.name) === "Columns" || ((E = t()) == null ? void 0 : E.name) === "Form:Form" ? {
614
649
  builderComponents: e.registeredComponents
615
650
  } : {}
616
651
  },
617
- context: c,
652
+ context: e.context,
618
653
  linkComponent: e.linkComponent,
619
654
  registeredComponents: e.registeredComponents,
620
655
  builderBlock: o(),
621
- includeBlockProps: ((I = t()) == null ? void 0 : I.noWrap) === !0,
622
- isInteractive: !((F = t()) != null && F.isRSC)
656
+ includeBlockProps: ((k = t()) == null ? void 0 : k.noWrap) === !0,
657
+ isInteractive: !((I = t()) != null && I.isRSC)
623
658
  };
624
- }, c = e.context;
625
- return /* @__PURE__ */ l(S, { children: r() ? /* @__PURE__ */ R(S, { children: [
626
- /* @__PURE__ */ l(lt, { block: e.block, context: e.context }),
627
- (m = t()) != null && m.noWrap ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
628
- Y,
659
+ };
660
+ return /* @__PURE__ */ l(v, { children: r() ? /* @__PURE__ */ R(v, { children: [
661
+ /* @__PURE__ */ l(ft, { block: e.block, context: e.context }),
662
+ (c = t()) != null && c.noWrap ? /* @__PURE__ */ l(v, { children: /* @__PURE__ */ l(
663
+ Q,
629
664
  {
630
665
  componentRef: s().componentRef,
631
666
  componentOptions: s().componentOptions,
@@ -637,17 +672,17 @@ function $(e) {
637
672
  includeBlockProps: s().includeBlockProps,
638
673
  isInteractive: s().isInteractive
639
674
  }
640
- ) }) : /* @__PURE__ */ l(S, { children: n() ? /* @__PURE__ */ l(S, { children: (g = n()) == null ? void 0 : g.map((f, h) => /* @__PURE__ */ l(
641
- St,
675
+ ) }) : /* @__PURE__ */ l(v, { children: n() ? /* @__PURE__ */ l(v, { children: (p = n()) == null ? void 0 : p.map((u, f) => /* @__PURE__ */ l(
676
+ vt,
642
677
  {
643
- repeatContext: f.context,
644
- block: f.block,
678
+ repeatContext: u.context,
679
+ block: u.block,
645
680
  registeredComponents: e.registeredComponents,
646
681
  linkComponent: e.linkComponent
647
682
  },
648
- h
649
- )) }) : /* @__PURE__ */ l(S, { children: /* @__PURE__ */ R(
650
- We,
683
+ f
684
+ )) }) : /* @__PURE__ */ R(
685
+ $e,
651
686
  {
652
687
  Wrapper: i(),
653
688
  block: o(),
@@ -655,7 +690,7 @@ function $(e) {
655
690
  linkComponent: e.linkComponent,
656
691
  children: [
657
692
  /* @__PURE__ */ l(
658
- Y,
693
+ Q,
659
694
  {
660
695
  componentRef: s().componentRef,
661
696
  componentOptions: s().componentOptions,
@@ -668,25 +703,25 @@ function $(e) {
668
703
  isInteractive: s().isInteractive
669
704
  }
670
705
  ),
671
- (b = a()) == null ? void 0 : b.map((f) => /* @__PURE__ */ l(
672
- $,
706
+ (d = a()) == null ? void 0 : d.map((u) => /* @__PURE__ */ l(
707
+ F,
673
708
  {
674
- block: f,
675
- context: c,
709
+ block: u,
676
710
  registeredComponents: e.registeredComponents,
677
- linkComponent: e.linkComponent
711
+ linkComponent: e.linkComponent,
712
+ context: e.context
678
713
  },
679
- f.id
714
+ u.id
680
715
  ))
681
716
  ]
682
717
  }
683
- ) }) })
718
+ ) })
684
719
  ] }) : null });
685
720
  }
686
- function H(e) {
721
+ function z(e) {
687
722
  var t, n, o;
688
723
  return /* @__PURE__ */ l(
689
- Oe,
724
+ Ne,
690
725
  {
691
726
  blocks: e.blocks,
692
727
  parent: e.parent,
@@ -694,8 +729,8 @@ function H(e) {
694
729
  styleProp: e.styleProp,
695
730
  BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
696
731
  BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
697
- children: e.blocks ? /* @__PURE__ */ l(S, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
698
- $,
732
+ children: e.blocks ? /* @__PURE__ */ l(v, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
733
+ F,
699
734
  {
700
735
  block: i,
701
736
  linkComponent: e.linkComponent,
@@ -707,25 +742,25 @@ function H(e) {
707
742
  }
708
743
  );
709
744
  }
710
- function kt(e) {
711
- var h;
712
- const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
745
+ function xt(e) {
746
+ var b;
747
+ const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(m) {
713
748
  var y;
714
- return ((y = n[d]) == null ? void 0 : y.width) || 100 / n.length;
715
- }, r = function(d) {
749
+ return ((y = n[m]) == null ? void 0 : y.width) || 100 / n.length;
750
+ }, r = function(m) {
716
751
  const y = t * (n.length - 1) / n.length;
717
- return `calc(${i(d)}% - ${y}px)`;
752
+ return `calc(${i(m)}% - ${y}px)`;
718
753
  }, a = function({
719
- stackedStyle: d,
754
+ stackedStyle: m,
720
755
  desktopStyle: y
721
756
  }) {
722
- return o === "tablet" ? d : y;
757
+ return o === "tablet" ? m : y;
723
758
  }, s = function({
724
- stackedStyle: d,
759
+ stackedStyle: m,
725
760
  desktopStyle: y
726
761
  }) {
727
- return o === "never" ? y : d;
728
- }, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", m = function() {
762
+ return o === "never" ? y : m;
763
+ }, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", d = function() {
729
764
  return {
730
765
  "--flex-dir": c,
731
766
  "--flex-dir-tablet": a({
@@ -733,41 +768,41 @@ function kt(e) {
733
768
  desktopStyle: "row"
734
769
  })
735
770
  };
736
- }, b = function(d) {
737
- const y = d === 0 ? 0 : t, p = r(d), C = `${y}px`, E = "100%", v = 0;
771
+ }, p = function(m) {
772
+ const y = m === 0 ? 0 : t, g = r(m), C = `${y}px`, E = "100%", k = 0;
738
773
  return {
739
774
  ...{
740
775
  display: "flex",
741
776
  flexDirection: "column",
742
777
  alignItems: "stretch"
743
778
  },
744
- width: p,
779
+ width: g,
745
780
  ["marginLeft"]: C,
746
781
  "--column-width-mobile": s({
747
782
  stackedStyle: E,
748
- desktopStyle: p
783
+ desktopStyle: g
749
784
  }),
750
785
  "--column-margin-left-mobile": s({
751
- stackedStyle: v,
786
+ stackedStyle: k,
752
787
  desktopStyle: C
753
788
  }),
754
789
  "--column-width-tablet": a({
755
790
  stackedStyle: E,
756
- desktopStyle: p
791
+ desktopStyle: g
757
792
  }),
758
793
  "--column-margin-left-tablet": a({
759
- stackedStyle: v,
794
+ stackedStyle: k,
760
795
  desktopStyle: C
761
796
  })
762
797
  };
763
- }, g = function(d) {
764
- var p, C;
765
- return me(
766
- ((C = (p = e.builderContext.content) == null ? void 0 : p.meta) == null ? void 0 : C.breakpoints) || {}
767
- )[d].max;
798
+ }, u = function(m) {
799
+ var g, C;
800
+ return ge(
801
+ ((C = (g = e.builderContext.content) == null ? void 0 : g.meta) == null ? void 0 : C.breakpoints) || {}
802
+ )[m].max;
768
803
  }, f = function() {
769
804
  return `
770
- @media (max-width: ${g("medium")}px) {
805
+ @media (max-width: ${u("medium")}px) {
771
806
  .${e.builderBlock.id}-breakpoints {
772
807
  flex-direction: var(--flex-dir-tablet);
773
808
  align-items: stretch;
@@ -779,7 +814,7 @@ function kt(e) {
779
814
  }
780
815
  }
781
816
 
782
- @media (max-width: ${g("small")}px) {
817
+ @media (max-width: ${u("small")}px) {
783
818
  .${e.builderBlock.id}-breakpoints {
784
819
  flex-direction: var(--flex-dir);
785
820
  align-items: stretch;
@@ -792,30 +827,30 @@ function kt(e) {
792
827
  },
793
828
  `;
794
829
  };
795
- return /* @__PURE__ */ R(S, { children: [
830
+ return /* @__PURE__ */ R(v, { children: [
796
831
  /* @__PURE__ */ R(
797
832
  "div",
798
833
  {
799
- className: `builder-columns ${e.builderBlock.id}-breakpoints div-1f78b21c`,
800
- style: m(),
834
+ className: `builder-columns ${e.builderBlock.id}-breakpoints div-7e6263b2`,
835
+ style: d(),
801
836
  children: [
802
- /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(O, { styles: f() }) }),
803
- (h = e.columns) == null ? void 0 : h.map((u, d) => /* @__PURE__ */ l(
804
- $e,
837
+ /* @__PURE__ */ l(N, { styles: f() }),
838
+ (b = e.columns) == null ? void 0 : b.map((h, m) => /* @__PURE__ */ l(
839
+ Fe,
805
840
  {
806
- TagName: u.link ? e.builderLinkComponent || "a" : "div",
841
+ TagName: h.link ? e.builderLinkComponent || "a" : "div",
807
842
  actionAttributes: {},
808
843
  attributes: {
809
- ...u.link ? {
810
- href: u.link
844
+ ...h.link ? {
845
+ href: h.link
811
846
  } : {},
812
- [D()]: "builder-column",
813
- style: he(b(d))
847
+ [M()]: "builder-column",
848
+ style: he(p(m))
814
849
  },
815
850
  children: /* @__PURE__ */ l(
816
- H,
851
+ z,
817
852
  {
818
- path: `component.options.columns.${d}.blocks`,
853
+ path: `component.options.columns.${m}.blocks`,
819
854
  parent: e.builderBlock.id,
820
855
  styleProp: {
821
856
  flexGrow: "1"
@@ -823,57 +858,57 @@ function kt(e) {
823
858
  context: e.builderContext,
824
859
  registeredComponents: e.builderComponents,
825
860
  linkComponent: e.builderLinkComponent,
826
- blocks: u.blocks
861
+ blocks: h.blocks
827
862
  }
828
863
  )
829
864
  },
830
- d
865
+ m
831
866
  ))
832
867
  ]
833
868
  }
834
869
  ),
835
- /* @__PURE__ */ l("style", { children: `.div-1f78b21c {
870
+ /* @__PURE__ */ l("style", { children: `.div-7e6263b2 {
836
871
  display: flex;
837
872
  line-height: normal;
838
873
  }` })
839
874
  ] });
840
875
  }
841
- function J(e) {
876
+ function X(e) {
842
877
  return e.replace(/http(s)?:/, "");
843
878
  }
844
- function vt(e = "", t, n) {
879
+ function Ct(e = "", t, n) {
845
880
  const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
846
881
  return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
847
882
  }
848
- function xt(e, t) {
883
+ function wt(e, t) {
849
884
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
850
885
  return e;
851
886
  if (t === "master")
852
- return J(e);
887
+ return X(e);
853
888
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
854
889
  if (n) {
855
890
  const o = e.split(n[0]), i = n[3], r = t.match("x") ? t : `${t}x`;
856
- return J(`${o[0]}_${r}${i}`);
891
+ return X(`${o[0]}_${r}${i}`);
857
892
  }
858
893
  return null;
859
894
  }
860
- function io(e) {
895
+ function so(e) {
861
896
  if (!e)
862
897
  return e;
863
898
  const t = [100, 200, 400, 800, 1200, 1600, 2e3];
864
899
  if (e.match(/builder\.io/)) {
865
900
  let n = e;
866
901
  const o = Number(e.split("?width=")[1]);
867
- return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${vt(e, "width", i)} ${i}w`).concat([n]).join(", ");
902
+ return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${Ct(e, "width", i)} ${i}w`).concat([n]).join(", ");
868
903
  }
869
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [xt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
904
+ 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;
870
905
  }
871
- const Ct = (e) => {
906
+ const It = (e) => {
872
907
  if (e === "localhost" || e === "127.0.0.1")
873
908
  return e;
874
909
  const t = e.split(".");
875
910
  return t.length > 2 ? t.slice(1).join(".") : e;
876
- }, pe = ({
911
+ }, be = ({
877
912
  name: e,
878
913
  canTrack: t
879
914
  }) => {
@@ -884,14 +919,14 @@ const Ct = (e) => {
884
919
  x.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
885
920
  return;
886
921
  }
887
- }, ge = async (e) => pe(e), wt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(w).join("; "), It = [["secure", ""], ["SameSite", "None"]], Tt = ({
922
+ }, ye = async (e) => be(e), Tt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(w).join("; "), Et = [["secure", ""], ["SameSite", "None"]], Rt = ({
888
923
  name: e,
889
924
  value: t,
890
925
  expires: n
891
926
  }) => {
892
- const i = (k() ? location.protocol === "https:" : !0) ? It : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", Ct(window.location.hostname)], ...i];
893
- return wt(a);
894
- }, be = async ({
927
+ const i = (S() ? location.protocol === "https:" : !0) ? Et : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", It(window.location.hostname)], ...i];
928
+ return Tt(a);
929
+ }, Se = async ({
895
930
  name: e,
896
931
  value: t,
897
932
  expires: n,
@@ -900,7 +935,7 @@ const Ct = (e) => {
900
935
  try {
901
936
  if (!o)
902
937
  return;
903
- const i = Tt({
938
+ const i = Rt({
904
939
  name: e,
905
940
  value: t,
906
941
  expires: n
@@ -909,24 +944,24 @@ const Ct = (e) => {
909
944
  } catch (i) {
910
945
  x.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
911
946
  }
912
- }, Et = "builder.tests", K = (e) => `${Et}.${e}`, Rt = ({
947
+ }, Pt = "builder.tests", q = (e) => `${Pt}.${e}`, At = ({
913
948
  contentId: e
914
- }) => ge({
915
- name: K(e),
949
+ }) => ye({
950
+ name: q(e),
916
951
  canTrack: !0
917
- }), Pt = ({
952
+ }), Vt = ({
918
953
  contentId: e
919
- }) => pe({
920
- name: K(e),
954
+ }) => be({
955
+ name: q(e),
921
956
  canTrack: !0
922
- }), At = ({
957
+ }), Bt = ({
923
958
  contentId: e,
924
959
  value: t
925
- }) => be({
926
- name: K(e),
960
+ }) => Se({
961
+ name: q(e),
927
962
  value: t,
928
963
  canTrack: !0
929
- }), ye = (e) => w(e.id) && w(e.variations) && Object.keys(e.variations).length > 0, Bt = ({
964
+ }), ke = (e) => w(e.id) && w(e.variations) && Object.keys(e.variations).length > 0, Wt = ({
930
965
  id: e,
931
966
  variations: t
932
967
  }) => {
@@ -939,15 +974,15 @@ const Ct = (e) => {
939
974
  return r;
940
975
  }
941
976
  return e;
942
- }, Se = (e) => {
943
- const t = Bt(e);
944
- return At({
977
+ }, ve = (e) => {
978
+ const t = Wt(e);
979
+ return Bt({
945
980
  contentId: e.id,
946
981
  value: t
947
982
  }).catch((n) => {
948
983
  x.error("could not store A/B test variation: ", n);
949
984
  }), t;
950
- }, ke = ({
985
+ }, xe = ({
951
986
  item: e,
952
987
  testGroupId: t
953
988
  }) => {
@@ -961,7 +996,7 @@ const Ct = (e) => {
961
996
  testVariationId: n.id,
962
997
  testVariationName: n.name || (n.id === e.id ? "Default" : "")
963
998
  };
964
- }, Vt = ({
999
+ }, Ot = ({
965
1000
  item: e,
966
1001
  canTrack: t
967
1002
  }) => {
@@ -969,14 +1004,14 @@ const Ct = (e) => {
969
1004
  return e;
970
1005
  if (!e)
971
1006
  return;
972
- if (!ye(e))
1007
+ if (!ke(e))
973
1008
  return e;
974
- const n = Pt({
1009
+ const n = Vt({
975
1010
  contentId: e.id
976
- }) || Se({
1011
+ }) || ve({
977
1012
  variations: e.variations,
978
1013
  id: e.id
979
- }), o = ke({
1014
+ }), o = xe({
980
1015
  item: e,
981
1016
  testGroupId: n
982
1017
  });
@@ -984,18 +1019,18 @@ const Ct = (e) => {
984
1019
  ...e,
985
1020
  ...o
986
1021
  };
987
- }, Wt = async ({
1022
+ }, $t = async ({
988
1023
  item: e,
989
1024
  canTrack: t
990
1025
  }) => {
991
- if (!t || !ye(e))
1026
+ if (!t || !ke(e))
992
1027
  return e;
993
- const o = await Rt({
1028
+ const o = await At({
994
1029
  contentId: e.id
995
- }) || Se({
1030
+ }) || ve({
996
1031
  variations: e.variations,
997
1032
  id: e.id
998
- }), i = ke({
1033
+ }), i = xe({
999
1034
  item: e,
1000
1035
  testGroupId: o
1001
1036
  });
@@ -1003,7 +1038,7 @@ const Ct = (e) => {
1003
1038
  ...e,
1004
1039
  ...i
1005
1040
  };
1006
- }, L = (e) => w(e) ? e : !0, Ot = {
1041
+ }, U = (e) => w(e) ? e : !0, Nt = {
1007
1042
  name: "Core:Button",
1008
1043
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1009
1044
  defaultStyles: {
@@ -1036,7 +1071,7 @@ const Ct = (e) => {
1036
1071
  }],
1037
1072
  static: !0,
1038
1073
  noWrap: !0
1039
- }, $t = {
1074
+ }, Ft = {
1040
1075
  // TODO: ways to statically preprocess JSON for references, functions, etc
1041
1076
  name: "Columns",
1042
1077
  isRSC: !0,
@@ -1237,13 +1272,13 @@ const Ct = (e) => {
1237
1272
  helperText: "When stacking columns for mobile devices, reverse the ordering",
1238
1273
  advanced: !0
1239
1274
  }]
1240
- }, Ft = {
1275
+ }, Lt = {
1241
1276
  name: "Fragment",
1242
1277
  static: !0,
1243
1278
  hidden: !0,
1244
1279
  canHaveChildren: !0,
1245
1280
  noWrap: !0
1246
- }, Nt = {
1281
+ }, Ut = {
1247
1282
  name: "Image",
1248
1283
  static: !0,
1249
1284
  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",
@@ -1264,15 +1299,15 @@ const Ct = (e) => {
1264
1299
  onChange: (e) => {
1265
1300
  e.delete("srcset"), e.delete("noWebp");
1266
1301
  function n(a, s = 6e4) {
1267
- return new Promise((c, m) => {
1268
- const b = document.createElement("img");
1269
- let g = !1;
1270
- b.onload = () => {
1271
- g = !0, c(b);
1272
- }, b.addEventListener("error", (f) => {
1273
- console.warn("Image load failed", f.error), m(f.error);
1274
- }), b.src = a, setTimeout(() => {
1275
- g || m(new Error("Image load timed out"));
1302
+ return new Promise((c, d) => {
1303
+ const p = document.createElement("img");
1304
+ let u = !1;
1305
+ p.onload = () => {
1306
+ u = !0, c(p);
1307
+ }, p.addEventListener("error", (f) => {
1308
+ console.warn("Image load failed", f.error), d(f.error);
1309
+ }), p.src = a, setTimeout(() => {
1310
+ u || d(new Error("Image load timed out"));
1276
1311
  }, s);
1277
1312
  });
1278
1313
  }
@@ -1343,7 +1378,7 @@ const Ct = (e) => {
1343
1378
  advanced: !0,
1344
1379
  defaultValue: 0.7041
1345
1380
  }]
1346
- }, Lt = {
1381
+ }, _t = {
1347
1382
  name: "Core:Section",
1348
1383
  static: !0,
1349
1384
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1382,7 +1417,7 @@ const Ct = (e) => {
1382
1417
  }
1383
1418
  }
1384
1419
  }]
1385
- }, Ut = {
1420
+ }, Dt = {
1386
1421
  name: "Slot",
1387
1422
  isRSC: !0,
1388
1423
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -1396,7 +1431,7 @@ const Ct = (e) => {
1396
1431
  defaultValue: "children"
1397
1432
  }]
1398
1433
  };
1399
- function _t(e) {
1434
+ function Mt(e) {
1400
1435
  var t, n, o;
1401
1436
  return /* @__PURE__ */ l(
1402
1437
  "div",
@@ -1408,7 +1443,7 @@ function _t(e) {
1408
1443
  "builder-slot": e.name
1409
1444
  },
1410
1445
  children: /* @__PURE__ */ l(
1411
- H,
1446
+ z,
1412
1447
  {
1413
1448
  parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
1414
1449
  path: `symbol.data.${e.name}`,
@@ -1419,7 +1454,7 @@ function _t(e) {
1419
1454
  }
1420
1455
  );
1421
1456
  }
1422
- const Dt = {
1457
+ const jt = {
1423
1458
  name: "Symbol",
1424
1459
  noWrap: !0,
1425
1460
  static: !0,
@@ -1452,7 +1487,7 @@ const Dt = {
1452
1487
  hideFromUI: !0,
1453
1488
  type: "boolean"
1454
1489
  }]
1455
- }, jt = {
1490
+ }, Ht = {
1456
1491
  name: "Text",
1457
1492
  static: !0,
1458
1493
  isRSC: !0,
@@ -1471,7 +1506,7 @@ const Dt = {
1471
1506
  textAlign: "center"
1472
1507
  }
1473
1508
  };
1474
- function Mt(e) {
1509
+ function Kt(e) {
1475
1510
  var t;
1476
1511
  return /* @__PURE__ */ l(
1477
1512
  "div",
@@ -1484,7 +1519,7 @@ function Mt(e) {
1484
1519
  }
1485
1520
  );
1486
1521
  }
1487
- const Ht = {
1522
+ const zt = {
1488
1523
  name: "Custom Code",
1489
1524
  static: !0,
1490
1525
  requiredPermissions: ["editCode"],
@@ -1506,7 +1541,7 @@ const Ht = {
1506
1541
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1507
1542
  advanced: !0
1508
1543
  }]
1509
- }, Kt = {
1544
+ }, qt = {
1510
1545
  name: "Embed",
1511
1546
  static: !0,
1512
1547
  inputs: [{
@@ -1531,7 +1566,7 @@ const Ht = {
1531
1566
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1532
1567
  hideFromUI: !0
1533
1568
  }]
1534
- }, zt = ["text/javascript", "application/javascript", "application/ecmascript"], ro = (e) => zt.includes(e.type), qt = {
1569
+ }, Gt = ["text/javascript", "application/javascript", "application/ecmascript"], co = (e) => Gt.includes(e.type), Jt = {
1535
1570
  // friendlyName?
1536
1571
  name: "Raw:Img",
1537
1572
  hideFromInsertMenu: !0,
@@ -1545,7 +1580,7 @@ const Ht = {
1545
1580
  }],
1546
1581
  noWrap: !0,
1547
1582
  static: !0
1548
- }, Gt = {
1583
+ }, Yt = {
1549
1584
  name: "Video",
1550
1585
  canHaveChildren: !0,
1551
1586
  defaultStyles: {
@@ -1626,58 +1661,58 @@ const Ht = {
1626
1661
  defaultValue: !0,
1627
1662
  advanced: !0
1628
1663
  }]
1629
- }, Yt = () => [{
1630
- component: Fe,
1631
- ...Ht
1632
- }, {
1633
- component: Ne,
1634
- ...Kt
1635
- }, {
1664
+ }, Qt = () => [{
1636
1665
  component: Le,
1637
- ...qt
1666
+ ...zt
1638
1667
  }, {
1639
1668
  component: Ue,
1640
- ...Gt
1641
- }], Q = () => [{
1642
- component: _e,
1643
- ...Ot
1669
+ ...qt
1644
1670
  }, {
1645
- component: kt,
1646
- ...$t
1671
+ component: _e,
1672
+ ...Jt
1647
1673
  }, {
1648
1674
  component: De,
1675
+ ...Yt
1676
+ }], Z = () => [{
1677
+ component: Me,
1678
+ ...Nt
1679
+ }, {
1680
+ component: xt,
1649
1681
  ...Ft
1650
1682
  }, {
1651
1683
  component: je,
1652
- ...Nt
1653
- }, {
1654
- component: Me,
1655
1684
  ...Lt
1656
1685
  }, {
1657
- component: _t,
1686
+ component: He,
1658
1687
  ...Ut
1659
1688
  }, {
1660
- component: Jn,
1661
- ...Dt
1689
+ component: Ke,
1690
+ ..._t
1662
1691
  }, {
1663
1692
  component: Mt,
1693
+ ...Dt
1694
+ }, {
1695
+ component: Xn,
1664
1696
  ...jt
1665
- }, ...Yt()], ao = (e) => ({
1697
+ }, {
1698
+ component: Kt,
1699
+ ...Ht
1700
+ }, ...Qt()], lo = (e) => ({
1666
1701
  type: "builder.registerComponent",
1667
- data: U(e)
1668
- }), Jt = (e) => {
1702
+ data: _(e)
1703
+ }), Xt = (e) => {
1669
1704
  const t = e.toString().trim();
1670
1705
  return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
1671
- }, Qt = (e) => typeof e == "function" ? Jt(e) : W(e), U = ({
1706
+ }, Zt = (e) => typeof e == "function" ? Xt(e) : $(e), _ = ({
1672
1707
  inputs: e,
1673
1708
  ...t
1674
1709
  }) => ({
1675
- ...W(t),
1710
+ ...$(t),
1676
1711
  inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
1677
1712
  ...o,
1678
- [i]: Qt(r)
1713
+ [i]: Zt(r)
1679
1714
  }), {}))
1680
- }), Xt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1715
+ }), en = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1681
1716
  function getAndSetVariantId() {
1682
1717
  function setCookie(name, value, days) {
1683
1718
  let expires = '';
@@ -1733,7 +1768,7 @@ const Ht = {
1733
1768
  }).join('');
1734
1769
  styleEl.innerHTML = newStyleStr;
1735
1770
  }
1736
- }`, Zt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1771
+ }`, tn = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1737
1772
  if (!navigator.cookieEnabled) {
1738
1773
  return;
1739
1774
  }
@@ -1767,26 +1802,26 @@ const Ht = {
1767
1802
  thisScriptEl?.remove();
1768
1803
  }
1769
1804
  return;
1770
- }`, ve = "builderIoAbTest", xe = "builderIoRenderContent", A = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1805
+ }`, Ce = "builderIoAbTest", we = "builderIoRenderContent", B = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1771
1806
  ...t,
1772
1807
  testVariationId: t.id,
1773
1808
  id: e == null ? void 0 : e.id
1774
- })), en = ({
1809
+ })), nn = ({
1775
1810
  canTrack: e,
1776
1811
  content: t
1777
- }) => !(!(A(t).length > 0) || !e || k()), tn = (e) => e === "react" || e === "reactNative", Ce = tn(T), nn = () => `
1778
- window.${ve} = ${Xt}
1779
- window.${xe} = ${Zt}
1780
- `, on = (e, t) => `
1781
- window.${ve}(
1782
- "${t}",${JSON.stringify(e)}, ${Ce}
1783
- )`, rn = ({
1812
+ }) => !(!(B(t).length > 0) || !e || S()), on = (e) => e === "react" || e === "reactNative", Ie = on(T), rn = () => `
1813
+ window.${Ce} = ${en}
1814
+ window.${we} = ${tn}
1815
+ `, an = (e, t) => `
1816
+ window.${Ce}(
1817
+ "${t}",${JSON.stringify(e)}, ${Ie}
1818
+ )`, sn = ({
1784
1819
  contentId: e,
1785
1820
  variationId: t
1786
- }) => `window.${xe}(
1787
- "${t}", "${e}", ${Ce}
1821
+ }) => `window.${we}(
1822
+ "${t}", "${e}", ${Ie}
1788
1823
  )`;
1789
- function _(e) {
1824
+ function D(e) {
1790
1825
  return /* @__PURE__ */ l(
1791
1826
  "script",
1792
1827
  {
@@ -1795,61 +1830,61 @@ function _(e) {
1795
1830
  }
1796
1831
  );
1797
1832
  }
1798
- const an = (e) => {
1833
+ const cn = (e) => {
1799
1834
  const t = e.get("preview"), n = e.get("overrides." + t);
1800
1835
  return n || x.warn("No previewed ID found in search params."), n;
1801
1836
  };
1802
- function sn() {
1803
- globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Be({
1837
+ function ln() {
1838
+ globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new We({
1804
1839
  max: 500,
1805
1840
  // how long to live in ms
1806
1841
  ttl: 1e3 * 60 * 5
1807
1842
  }));
1808
1843
  }
1809
- function cn(e) {
1810
- sn();
1811
- const t = an(e);
1844
+ function dn(e) {
1845
+ ln();
1846
+ const t = cn(e);
1812
1847
  return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
1813
1848
  }
1814
- function ln() {
1849
+ function un() {
1815
1850
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
1816
1851
  }
1817
- function dn() {
1818
- const e = ln().fetch;
1852
+ function mn() {
1853
+ const e = un().fetch;
1819
1854
  if (typeof e > "u")
1820
1855
  throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
1821
1856
  For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
1822
1857
  return e;
1823
1858
  }
1824
- const un = dn();
1825
- function B(e, t = null, n = ".") {
1859
+ const fn = mn();
1860
+ function W(e, t = null, n = ".") {
1826
1861
  return Object.keys(e).reduce((o, i) => {
1827
1862
  const r = e[i], a = [t, i].filter(Boolean).join(n);
1828
1863
  return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
1829
1864
  ...o,
1830
- ...B(r, a, n)
1865
+ ...W(r, a, n)
1831
1866
  } : {
1832
1867
  ...o,
1833
1868
  [a]: r
1834
1869
  };
1835
1870
  }, {});
1836
1871
  }
1837
- const mn = "v3", X = "builder.", fn = "options.", we = (e) => {
1872
+ const hn = "v3", ee = "builder.", pn = "options.", Te = (e) => {
1838
1873
  if (!e)
1839
1874
  return {};
1840
- const t = se(e), n = {};
1875
+ const t = le(e), n = {};
1841
1876
  return Object.keys(t).forEach((o) => {
1842
- if (o.startsWith(X)) {
1843
- const i = o.replace(X, "").replace(fn, "");
1877
+ if (o.startsWith(ee)) {
1878
+ const i = o.replace(ee, "").replace(pn, "");
1844
1879
  n[i] = t[o];
1845
1880
  }
1846
1881
  }), n;
1847
- }, hn = () => {
1848
- if (!k())
1882
+ }, gn = () => {
1883
+ if (!S())
1849
1884
  return {};
1850
1885
  const e = new URLSearchParams(window.location.search);
1851
- return we(e);
1852
- }, Z = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
1886
+ return Te(e);
1887
+ }, te = (e) => typeof e == "number" && !isNaN(e) && e >= 0, G = (e) => {
1853
1888
  const {
1854
1889
  limit: t = 30,
1855
1890
  userAttributes: n,
@@ -1858,68 +1893,68 @@ const mn = "v3", X = "builder.", fn = "options.", we = (e) => {
1858
1893
  apiKey: r,
1859
1894
  enrich: a,
1860
1895
  locale: s,
1861
- apiVersion: c = mn,
1862
- fields: m,
1863
- omit: b,
1864
- offset: g,
1896
+ apiVersion: c = hn,
1897
+ fields: d,
1898
+ omit: p,
1899
+ offset: u,
1865
1900
  cacheSeconds: f,
1866
- staleCacheSeconds: h,
1867
- sort: u,
1868
- includeUnpublished: d
1901
+ staleCacheSeconds: b,
1902
+ sort: h,
1903
+ includeUnpublished: m
1869
1904
  } = e;
1870
1905
  if (!r)
1871
1906
  throw new Error("Missing API key");
1872
1907
  if (!["v3"].includes(c))
1873
1908
  throw new Error(`Invalid apiVersion: expected 'v3', received '${c}'`);
1874
- const y = t !== 1, p = new URL(`https://cdn.builder.io/api/${c}/content/${i}`);
1875
- if (p.searchParams.set("apiKey", r), p.searchParams.set("limit", String(t)), p.searchParams.set("noTraverse", String(y)), p.searchParams.set("includeRefs", String(!0)), s && p.searchParams.set("locale", s), a && p.searchParams.set("enrich", String(a)), p.searchParams.set("omit", b || "meta.componentsUsed"), m && p.searchParams.set("fields", m), Number.isFinite(g) && g > -1 && p.searchParams.set("offset", String(Math.floor(g))), typeof d == "boolean" && p.searchParams.set("includeUnpublished", String(d)), f && Z(f) && p.searchParams.set("cacheSeconds", String(f)), h && Z(h) && p.searchParams.set("staleCacheSeconds", String(h)), u) {
1876
- const v = B({
1877
- sort: u
1909
+ const y = t !== 1, g = new URL(`https://cdn.builder.io/api/${c}/content/${i}`);
1910
+ if (g.searchParams.set("apiKey", r), g.searchParams.set("limit", String(t)), g.searchParams.set("noTraverse", String(y)), g.searchParams.set("includeRefs", String(!0)), s && g.searchParams.set("locale", s), a && g.searchParams.set("enrich", String(a)), g.searchParams.set("omit", p || "meta.componentsUsed"), d && g.searchParams.set("fields", d), Number.isFinite(u) && u > -1 && g.searchParams.set("offset", String(Math.floor(u))), typeof m == "boolean" && g.searchParams.set("includeUnpublished", String(m)), f && te(f) && g.searchParams.set("cacheSeconds", String(f)), b && te(b) && g.searchParams.set("staleCacheSeconds", String(b)), h) {
1911
+ const k = W({
1912
+ sort: h
1878
1913
  });
1879
- for (const I in v)
1880
- p.searchParams.set(I, JSON.stringify(v[I]));
1914
+ for (const I in k)
1915
+ g.searchParams.set(I, JSON.stringify(k[I]));
1881
1916
  }
1882
1917
  const C = {
1883
- ...hn(),
1884
- ...se(e.options || {})
1885
- }, E = B(C);
1886
- for (const v in E)
1887
- p.searchParams.set(v, String(E[v]));
1888
- if (n && p.searchParams.set("userAttributes", JSON.stringify(n)), o) {
1889
- const v = B({
1918
+ ...gn(),
1919
+ ...le(e.options || {})
1920
+ }, E = W(C);
1921
+ for (const k in E)
1922
+ g.searchParams.set(k, String(E[k]));
1923
+ if (n && g.searchParams.set("userAttributes", JSON.stringify(n)), o) {
1924
+ const k = W({
1890
1925
  query: o
1891
1926
  });
1892
- for (const I in v)
1893
- p.searchParams.set(I, JSON.stringify(v[I]));
1927
+ for (const I in k)
1928
+ g.searchParams.set(I, JSON.stringify(k[I]));
1894
1929
  }
1895
- return p;
1896
- }, pn = (e) => "results" in e;
1897
- async function Ie(e) {
1898
- const t = await yn({
1930
+ return g;
1931
+ }, bn = (e) => "results" in e;
1932
+ async function Ee(e) {
1933
+ const t = await kn({
1899
1934
  ...e,
1900
1935
  limit: 1
1901
1936
  });
1902
1937
  return t && t[0] || null;
1903
1938
  }
1904
- const gn = async (e) => {
1905
- const t = z(e);
1906
- return await (await un(t.href)).json();
1907
- }, bn = async (e, t, n = z(e)) => {
1908
- const o = L(e.canTrack);
1939
+ const yn = async (e) => {
1940
+ const t = G(e);
1941
+ return await (await fn(t.href)).json();
1942
+ }, Sn = async (e, t, n = G(e)) => {
1943
+ const o = U(e.canTrack);
1909
1944
  if (n.search.includes("preview=")) {
1910
1945
  const r = [];
1911
1946
  for (const a of t.results) {
1912
- const s = cn(n.searchParams);
1947
+ const s = dn(n.searchParams);
1913
1948
  r.push(s || a);
1914
1949
  }
1915
1950
  t.results = r;
1916
1951
  }
1917
- if (!o || !(k() || T === "reactNative"))
1952
+ if (!o || !(S() || T === "reactNative"))
1918
1953
  return t.results;
1919
1954
  try {
1920
1955
  const r = [];
1921
1956
  for (const a of t.results)
1922
- r.push(await Wt({
1957
+ r.push(await $t({
1923
1958
  item: a,
1924
1959
  canTrack: o
1925
1960
  }));
@@ -1929,10 +1964,10 @@ const gn = async (e) => {
1929
1964
  }
1930
1965
  return t.results;
1931
1966
  };
1932
- async function yn(e) {
1967
+ async function kn(e) {
1933
1968
  try {
1934
- const t = z(e), n = await gn(e);
1935
- return pn(n) ? bn(e, n) : (x.error("Error fetching data. ", {
1969
+ const t = G(e), n = await yn(e);
1970
+ return bn(n) ? Sn(e, n) : (x.error("Error fetching data. ", {
1936
1971
  url: t,
1937
1972
  content: n,
1938
1973
  options: e
@@ -1941,94 +1976,94 @@ async function yn(e) {
1941
1976
  return x.error("Error fetching data. ", t), null;
1942
1977
  }
1943
1978
  }
1944
- function so(e) {
1945
- if (!k())
1979
+ function uo(e) {
1980
+ if (!S())
1946
1981
  return !1;
1947
- const t = ce(e || window.location.search);
1982
+ const t = de(e || window.location.search);
1948
1983
  return j(t) ? !1 : t.indexOf("builder.preview=") !== -1;
1949
1984
  }
1950
- function Sn() {
1985
+ function vn() {
1951
1986
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1952
1987
  const t = Math.random() * 16 | 0;
1953
1988
  return (e == "x" ? t : t & 3 | 8).toString(16);
1954
1989
  });
1955
1990
  }
1956
- function Te() {
1957
- return Sn().replace(/-/g, "");
1991
+ function Re() {
1992
+ return vn().replace(/-/g, "");
1958
1993
  }
1959
- const Ee = "builderSessionId", kn = async ({
1994
+ const Pe = "builderSessionId", xn = async ({
1960
1995
  canTrack: e
1961
1996
  }) => {
1962
1997
  if (!e)
1963
1998
  return;
1964
- const t = await ge({
1965
- name: Ee,
1999
+ const t = await ye({
2000
+ name: Pe,
1966
2001
  canTrack: e
1967
2002
  });
1968
2003
  if (w(t))
1969
2004
  return t;
1970
2005
  {
1971
- const n = vn();
1972
- return xn({
2006
+ const n = Cn();
2007
+ return wn({
1973
2008
  id: n,
1974
2009
  canTrack: e
1975
2010
  }), n;
1976
2011
  }
1977
- }, vn = () => Te(), xn = ({
2012
+ }, Cn = () => Re(), wn = ({
1978
2013
  id: e,
1979
2014
  canTrack: t
1980
- }) => be({
1981
- name: Ee,
2015
+ }) => Se({
2016
+ name: Pe,
1982
2017
  value: e,
1983
2018
  canTrack: t
1984
- }), Re = () => k() && typeof localStorage < "u" ? localStorage : void 0, Cn = ({
2019
+ }), Ae = () => S() && typeof localStorage < "u" ? localStorage : void 0, In = ({
1985
2020
  key: e,
1986
2021
  canTrack: t
1987
2022
  }) => {
1988
2023
  var n;
1989
2024
  try {
1990
- return t ? (n = Re()) == null ? void 0 : n.getItem(e) : void 0;
2025
+ return t ? (n = Ae()) == null ? void 0 : n.getItem(e) : void 0;
1991
2026
  } catch (o) {
1992
2027
  console.debug("[LocalStorage] GET error: ", o);
1993
2028
  return;
1994
2029
  }
1995
- }, wn = ({
2030
+ }, Tn = ({
1996
2031
  key: e,
1997
2032
  canTrack: t,
1998
2033
  value: n
1999
2034
  }) => {
2000
2035
  var o;
2001
2036
  try {
2002
- t && ((o = Re()) == null || o.setItem(e, n));
2037
+ t && ((o = Ae()) == null || o.setItem(e, n));
2003
2038
  } catch (i) {
2004
2039
  console.debug("[LocalStorage] SET error: ", i);
2005
2040
  }
2006
- }, Pe = "builderVisitorId", In = ({
2041
+ }, Ve = "builderVisitorId", En = ({
2007
2042
  canTrack: e
2008
2043
  }) => {
2009
2044
  if (!e)
2010
2045
  return;
2011
- const t = Cn({
2012
- key: Pe,
2046
+ const t = In({
2047
+ key: Ve,
2013
2048
  canTrack: e
2014
2049
  });
2015
2050
  if (w(t))
2016
2051
  return t;
2017
2052
  {
2018
- const n = Tn();
2019
- return En({
2053
+ const n = Rn();
2054
+ return Pn({
2020
2055
  id: n,
2021
2056
  canTrack: e
2022
2057
  }), n;
2023
2058
  }
2024
- }, Tn = () => Te(), En = ({
2059
+ }, Rn = () => Re(), Pn = ({
2025
2060
  id: e,
2026
2061
  canTrack: t
2027
- }) => wn({
2028
- key: Pe,
2062
+ }) => Tn({
2063
+ key: Ve,
2029
2064
  value: e,
2030
2065
  canTrack: t
2031
- }), Rn = async ({
2066
+ }), An = async ({
2032
2067
  canTrack: e
2033
2068
  }) => {
2034
2069
  if (!e)
@@ -2036,16 +2071,16 @@ const Ee = "builderSessionId", kn = async ({
2036
2071
  visitorId: void 0,
2037
2072
  sessionId: void 0
2038
2073
  };
2039
- const t = await kn({
2074
+ const t = await xn({
2040
2075
  canTrack: e
2041
- }), n = In({
2076
+ }), n = En({
2042
2077
  canTrack: e
2043
2078
  });
2044
2079
  return {
2045
2080
  sessionId: t,
2046
2081
  visitorId: n
2047
2082
  };
2048
- }, Pn = async ({
2083
+ }, Vn = async ({
2049
2084
  type: e,
2050
2085
  canTrack: t,
2051
2086
  apiKey: n,
@@ -2059,23 +2094,23 @@ const Ee = "builderSessionId", kn = async ({
2059
2094
  url: location.href,
2060
2095
  ...o
2061
2096
  },
2062
- ...await Rn({
2097
+ ...await An({
2063
2098
  canTrack: t
2064
2099
  }),
2065
- userAttributes: le(),
2100
+ userAttributes: ue(),
2066
2101
  ownerId: n
2067
2102
  }
2068
2103
  });
2069
- async function An(e) {
2104
+ async function Bn(e) {
2070
2105
  if (!e.apiKey) {
2071
2106
  x.error("Missing API key for track call. Please provide your API key.");
2072
2107
  return;
2073
2108
  }
2074
- if (e.canTrack && !j() && (k() || T === "reactNative"))
2109
+ if (e.canTrack && !j() && (S() || T === "reactNative"))
2075
2110
  return fetch("https://cdn.builder.io/api/v1/track", {
2076
2111
  method: "POST",
2077
2112
  body: JSON.stringify({
2078
- events: [await Pn(e)]
2113
+ events: [await Vn(e)]
2079
2114
  }),
2080
2115
  headers: {
2081
2116
  "content-type": "application/json"
@@ -2085,14 +2120,14 @@ async function An(e) {
2085
2120
  console.error("Failed to track: ", t);
2086
2121
  });
2087
2122
  }
2088
- const co = (e) => An({
2123
+ const mo = (e) => Bn({
2089
2124
  ...e,
2090
2125
  canTrack: !0
2091
2126
  });
2092
- function ee(e) {
2127
+ function ne(e) {
2093
2128
  return Math.round(e * 1e3) / 1e3;
2094
2129
  }
2095
- const Bn = (e, t, n = !0) => {
2130
+ const Wn = (e, t, n = !0) => {
2096
2131
  if (!(e instanceof HTMLElement))
2097
2132
  return null;
2098
2133
  let o = n ? e : e.parentElement;
@@ -2103,43 +2138,43 @@ const Bn = (e, t, n = !0) => {
2103
2138
  return o;
2104
2139
  } while (o = o.parentElement);
2105
2140
  return null;
2106
- }, Vn = (e) => Bn(e, (t) => {
2141
+ }, On = (e) => Wn(e, (t) => {
2107
2142
  const n = t.getAttribute("builder-id") || t.id;
2108
2143
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
2109
- }), te = ({
2144
+ }), oe = ({
2110
2145
  event: e,
2111
2146
  target: t
2112
2147
  }) => {
2113
- const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = ee(o / n.width), a = ee(i / n.height);
2148
+ const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = ne(o / n.width), a = ne(i / n.height);
2114
2149
  return {
2115
2150
  x: r,
2116
2151
  y: a
2117
2152
  };
2118
- }, lo = (e) => {
2119
- const t = e.target, n = t && Vn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2153
+ }, fo = (e) => {
2154
+ const t = e.target, n = t && On(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2120
2155
  return {
2121
2156
  targetBuilderElement: o || void 0,
2122
2157
  metadata: {
2123
- targetOffset: t ? te({
2158
+ targetOffset: t ? oe({
2124
2159
  event: e,
2125
2160
  target: t
2126
2161
  }) : void 0,
2127
- builderTargetOffset: n ? te({
2162
+ builderTargetOffset: n ? oe({
2128
2163
  event: e,
2129
2164
  target: n
2130
2165
  }) : void 0,
2131
2166
  builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
2132
2167
  }
2133
2168
  };
2134
- }, Wn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
2135
- function Ae(e, t) {
2169
+ }, $n = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
2170
+ function Be(e, t) {
2136
2171
  const n = new URL(t.origin), o = n.hostname;
2137
- return (e || Wn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
2172
+ return (e || $n).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
2138
2173
  }
2139
- const On = "0.14.6", ne = {};
2140
- function $n(e, t) {
2141
- let n = ne[e];
2142
- if (n || (n = ne[e] = []), n.push(t), k()) {
2174
+ const Nn = "0.14.7", ie = {};
2175
+ function Fn(e, t) {
2176
+ let n = ie[e];
2177
+ if (n || (n = ie[e] = []), n.push(t), S()) {
2143
2178
  const o = {
2144
2179
  type: "builder.register",
2145
2180
  data: {
@@ -2154,8 +2189,8 @@ function $n(e, t) {
2154
2189
  }
2155
2190
  }
2156
2191
  }
2157
- const uo = () => {
2158
- $n("insertMenu", {
2192
+ const ho = () => {
2193
+ Fn("insertMenu", {
2159
2194
  name: "_default",
2160
2195
  default: !0,
2161
2196
  items: [{
@@ -2177,14 +2212,14 @@ const uo = () => {
2177
2212
  }]
2178
2213
  });
2179
2214
  };
2180
- let oe = !1;
2181
- const Fn = (e = {}) => {
2215
+ let re = !1;
2216
+ const Ln = (e = {}) => {
2182
2217
  var t, n;
2183
- oe || (oe = !0, k() && ((t = window.parent) == null || t.postMessage({
2218
+ re || (re = !0, S() && ((t = window.parent) == null || t.postMessage({
2184
2219
  type: "builder.sdkInfo",
2185
2220
  data: {
2186
2221
  target: T,
2187
- version: On,
2222
+ version: Nn,
2188
2223
  supportsPatchUpdates: !1,
2189
2224
  // Supports builder-model="..." attribute which is needed to
2190
2225
  // scope our '+ add block' button styling
@@ -2198,7 +2233,7 @@ const Fn = (e = {}) => {
2198
2233
  }
2199
2234
  }, "*"), window.addEventListener("message", (o) => {
2200
2235
  var r, a;
2201
- if (!Ae(e.trustedHosts, o))
2236
+ if (!Be(e.trustedHosts, o))
2202
2237
  return;
2203
2238
  const {
2204
2239
  data: i
@@ -2206,45 +2241,45 @@ const Fn = (e = {}) => {
2206
2241
  if (i != null && i.type)
2207
2242
  switch (i.type) {
2208
2243
  case "builder.evaluate": {
2209
- const s = i.data.text, c = i.data.arguments || [], m = i.data.id, b = new Function(s);
2210
- let g, f = null;
2244
+ const s = i.data.text, c = i.data.arguments || [], d = i.data.id, p = new Function(s);
2245
+ let u, f = null;
2211
2246
  try {
2212
- g = b.apply(null, c);
2213
- } catch (h) {
2214
- f = h;
2247
+ u = p.apply(null, c);
2248
+ } catch (b) {
2249
+ f = b;
2215
2250
  }
2216
2251
  f ? (r = window.parent) == null || r.postMessage({
2217
2252
  type: "builder.evaluateError",
2218
2253
  data: {
2219
- id: m,
2254
+ id: d,
2220
2255
  error: f.message
2221
2256
  }
2222
- }, "*") : g && typeof g.then == "function" ? g.then((h) => {
2223
- var u;
2224
- (u = window.parent) == null || u.postMessage({
2257
+ }, "*") : u && typeof u.then == "function" ? u.then((b) => {
2258
+ var h;
2259
+ (h = window.parent) == null || h.postMessage({
2225
2260
  type: "builder.evaluateResult",
2226
2261
  data: {
2227
- id: m,
2228
- result: h
2262
+ id: d,
2263
+ result: b
2229
2264
  }
2230
2265
  }, "*");
2231
2266
  }).catch(console.error) : (a = window.parent) == null || a.postMessage({
2232
2267
  type: "builder.evaluateResult",
2233
2268
  data: {
2234
- result: g,
2235
- id: m
2269
+ result: u,
2270
+ id: d
2236
2271
  }
2237
2272
  }, "*");
2238
2273
  break;
2239
2274
  }
2240
2275
  }
2241
2276
  })));
2242
- }, Nn = ({
2277
+ }, Un = ({
2243
2278
  model: e,
2244
2279
  trustedHosts: t,
2245
2280
  callbacks: n
2246
2281
  }) => (o) => {
2247
- if (!Ae(t, o))
2282
+ if (!Be(t, o))
2248
2283
  return;
2249
2284
  const {
2250
2285
  data: i
@@ -2265,12 +2300,12 @@ const Fn = (e = {}) => {
2265
2300
  break;
2266
2301
  }
2267
2302
  }
2268
- }, mo = (e, t, n) => {
2269
- if (!k)
2303
+ }, po = (e, t, n) => {
2304
+ if (!S)
2270
2305
  return x.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
2271
2306
  };
2272
- Fn();
2273
- const o = Nn({
2307
+ Ln();
2308
+ const o = Un({
2274
2309
  callbacks: {
2275
2310
  contentUpdate: t,
2276
2311
  animation: () => {
@@ -2285,7 +2320,7 @@ const Fn = (e = {}) => {
2285
2320
  window.removeEventListener("message", o);
2286
2321
  };
2287
2322
  };
2288
- function ie(e, ...t) {
2323
+ function ae(e, ...t) {
2289
2324
  const n = Object(e);
2290
2325
  for (let o = 1; o < arguments.length; o++) {
2291
2326
  const i = arguments[o];
@@ -2295,38 +2330,38 @@ function ie(e, ...t) {
2295
2330
  }
2296
2331
  return n;
2297
2332
  }
2298
- const Ln = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
2299
- function Un(e) {
2333
+ const _n = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
2334
+ function Dn(e) {
2300
2335
  console.warn(`Cannot animate element: element with ID ${e} not found!`);
2301
2336
  }
2302
- function _n(e, t) {
2303
- const n = Dn(e), o = getComputedStyle(t), i = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, a = [i, r];
2337
+ function Mn(e, t) {
2338
+ const n = jn(e), o = getComputedStyle(t), i = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, a = [i, r];
2304
2339
  for (const s of a)
2305
2340
  for (const c of n)
2306
2341
  c in s || (s[c] = o[c]);
2307
2342
  }
2308
- function Dn(e) {
2343
+ function jn(e) {
2309
2344
  const t = [];
2310
2345
  for (const n of e.steps)
2311
2346
  for (const o in n.styles)
2312
2347
  t.indexOf(o) === -1 && t.push(o);
2313
2348
  return t;
2314
2349
  }
2315
- function fo(e) {
2350
+ function go(e) {
2316
2351
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
2317
2352
  if (!t.length) {
2318
- Un(e.elementId || e.id || "");
2353
+ Dn(e.elementId || e.id || "");
2319
2354
  return;
2320
2355
  }
2321
2356
  Array.from(t).forEach((n) => {
2322
- _n(e, n), n.style.transition = "none", n.style.transitionDelay = "0", ie(n.style, e.steps[0].styles), setTimeout(() => {
2323
- n.style.transition = `all ${e.duration}s ${Ln(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), ie(n.style, e.steps[1].styles), setTimeout(() => {
2357
+ Mn(e, n), n.style.transition = "none", n.style.transitionDelay = "0", ae(n.style, e.steps[0].styles), setTimeout(() => {
2358
+ n.style.transition = `all ${e.duration}s ${_n(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), ae(n.style, e.steps[1].styles), setTimeout(() => {
2324
2359
  n.style.transition = "", n.style.transitionDelay = "";
2325
2360
  }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
2326
2361
  });
2327
2362
  });
2328
2363
  }
2329
- const jn = (e) => {
2364
+ const Hn = (e) => {
2330
2365
  var r;
2331
2366
  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);
2332
2367
  let i = "";
@@ -2352,22 +2387,22 @@ font-weight: ${a};
2352
2387
  `.trim());
2353
2388
  }
2354
2389
  return i;
2355
- }, Mn = ({
2390
+ }, Kn = ({
2356
2391
  customFonts: e
2357
2392
  }) => {
2358
2393
  var t;
2359
- return ((t = e == null ? void 0 : e.map((n) => jn(n))) == null ? void 0 : t.join(" ")) || "";
2360
- }, Hn = ({
2394
+ return ((t = e == null ? void 0 : e.map((n) => Hn(n))) == null ? void 0 : t.join(" ")) || "";
2395
+ }, zn = ({
2361
2396
  cssCode: e,
2362
2397
  contentId: t
2363
2398
  }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
2364
- function Kn(e) {
2399
+ function qn(e) {
2365
2400
  const t = `
2366
- ${Hn({
2401
+ ${zn({
2367
2402
  cssCode: e.cssCode,
2368
2403
  contentId: e.contentId
2369
2404
  })}
2370
- ${Mn({
2405
+ ${Kn({
2371
2406
  customFonts: e.customFonts
2372
2407
  })}
2373
2408
 
@@ -2388,9 +2423,9 @@ ${Mn({
2388
2423
  font-family: inherit;
2389
2424
  }
2390
2425
  `.trim();
2391
- return /* @__PURE__ */ l(O, { styles: t });
2426
+ return /* @__PURE__ */ l(N, { styles: t });
2392
2427
  }
2393
- const zn = ({
2428
+ const Gn = ({
2394
2429
  content: e,
2395
2430
  data: t,
2396
2431
  locale: n
@@ -2407,7 +2442,7 @@ const zn = ({
2407
2442
  locale: n
2408
2443
  } : {}
2409
2444
  };
2410
- }, qn = ({
2445
+ }, Jn = ({
2411
2446
  content: e,
2412
2447
  data: t
2413
2448
  }) => e ? {
@@ -2418,32 +2453,32 @@ const zn = ({
2418
2453
  },
2419
2454
  meta: e == null ? void 0 : e.meta
2420
2455
  } : void 0;
2421
- function re(e) {
2422
- var i, r, a, s, c, m, b, g, f;
2423
- const t = rn({
2456
+ function se(e) {
2457
+ var i, r, a, s, c, d, p, u, f;
2458
+ const t = sn({
2424
2459
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2425
2460
  variationId: (i = e.content) == null ? void 0 : i.testVariationId,
2426
2461
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2427
2462
  contentId: (r = e.content) == null ? void 0 : r.id
2428
2463
  }), n = [
2429
- ...Q(),
2464
+ ...Z(),
2430
2465
  ...e.customComponents || []
2431
2466
  ].reduce(
2432
- (h, { component: u, ...d }) => ({
2433
- ...h,
2434
- [d.name]: {
2435
- component: u,
2436
- ...U(d)
2467
+ (b, { component: h, ...m }) => ({
2468
+ ...b,
2469
+ [m.name]: {
2470
+ component: h,
2471
+ ..._(m)
2437
2472
  }
2438
2473
  }),
2439
2474
  {}
2440
2475
  ), o = {
2441
- content: qn({
2476
+ content: Jn({
2442
2477
  content: e.content,
2443
2478
  data: e.data
2444
2479
  }),
2445
2480
  localState: void 0,
2446
- rootState: zn({
2481
+ rootState: Gn({
2447
2482
  content: e.content,
2448
2483
  data: e.data,
2449
2484
  locale: e.locale
@@ -2453,12 +2488,12 @@ function re(e) {
2453
2488
  apiKey: e.apiKey,
2454
2489
  apiVersion: e.apiVersion,
2455
2490
  componentInfos: [
2456
- ...Q(),
2491
+ ...Z(),
2457
2492
  ...e.customComponents || []
2458
2493
  ].reduce(
2459
- (h, { component: u, ...d }) => ({
2460
- ...h,
2461
- [d.name]: U(d)
2494
+ (b, { component: h, ...m }) => ({
2495
+ ...b,
2496
+ [m.name]: _(m)
2462
2497
  }),
2463
2498
  {}
2464
2499
  ),
@@ -2467,7 +2502,7 @@ function re(e) {
2467
2502
  BlocksWrapperProps: e.blocksWrapperProps || {}
2468
2503
  };
2469
2504
  return /* @__PURE__ */ R(
2470
- He,
2505
+ ze,
2471
2506
  {
2472
2507
  content: e.content,
2473
2508
  data: e.data,
@@ -2484,19 +2519,19 @@ function re(e) {
2484
2519
  linkComponent: e.linkComponent,
2485
2520
  trustedHosts: e.trustedHosts,
2486
2521
  children: [
2487
- e.isSsrAbTest ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(_, { scriptStr: t }) }) : null,
2488
- /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
2489
- Kn,
2522
+ e.isSsrAbTest ? /* @__PURE__ */ l(D, { scriptStr: t }) : null,
2523
+ /* @__PURE__ */ l(
2524
+ qn,
2490
2525
  {
2491
2526
  contentId: (a = o.content) == null ? void 0 : a.id,
2492
2527
  cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
2493
- customFonts: (b = (m = o.content) == null ? void 0 : m.data) == null ? void 0 : b.customFonts
2528
+ customFonts: (p = (d = o.content) == null ? void 0 : d.data) == null ? void 0 : p.customFonts
2494
2529
  }
2495
- ) }),
2530
+ ),
2496
2531
  /* @__PURE__ */ l(
2497
- H,
2532
+ z,
2498
2533
  {
2499
- blocks: (f = (g = o.content) == null ? void 0 : g.data) == null ? void 0 : f.blocks,
2534
+ blocks: (f = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : f.blocks,
2500
2535
  context: o,
2501
2536
  registeredComponents: n,
2502
2537
  linkComponent: e.linkComponent
@@ -2506,45 +2541,45 @@ function re(e) {
2506
2541
  }
2507
2542
  );
2508
2543
  }
2509
- function Gn(e) {
2544
+ function Yn(e) {
2510
2545
  var r, a;
2511
- const t = en({
2512
- canTrack: L(e.canTrack),
2546
+ const t = nn({
2547
+ canTrack: U(e.canTrack),
2513
2548
  content: e.content
2514
2549
  }), n = function() {
2515
2550
  var c;
2516
- return on(
2517
- A(e.content).map((m) => ({
2518
- id: m.testVariationId,
2519
- testRatio: m.testRatio
2551
+ return an(
2552
+ B(e.content).map((d) => ({
2553
+ id: d.testVariationId,
2554
+ testRatio: d.testRatio
2520
2555
  })),
2521
2556
  ((c = e.content) == null ? void 0 : c.id) || ""
2522
2557
  );
2523
2558
  }, o = function() {
2524
- return A(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
2559
+ return B(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
2525
2560
  }, i = function() {
2526
2561
  var c;
2527
2562
  return t ? {
2528
2563
  ...e.content,
2529
2564
  testVariationId: (c = e.content) == null ? void 0 : c.id
2530
- } : Vt({
2565
+ } : Ot({
2531
2566
  item: e.content,
2532
- canTrack: L(e.canTrack)
2567
+ canTrack: U(e.canTrack)
2533
2568
  });
2534
2569
  };
2535
- return /* @__PURE__ */ R(S, { children: [
2536
- !e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(_, { scriptStr: nn() }) }) : null,
2537
- t ? /* @__PURE__ */ R(S, { children: [
2570
+ return /* @__PURE__ */ R(v, { children: [
2571
+ !e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(D, { scriptStr: rn() }) : null,
2572
+ t ? /* @__PURE__ */ R(v, { children: [
2538
2573
  /* @__PURE__ */ l(
2539
- O,
2574
+ N,
2540
2575
  {
2541
2576
  id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
2542
2577
  styles: o()
2543
2578
  }
2544
2579
  ),
2545
- /* @__PURE__ */ l(_, { scriptStr: n() }),
2546
- (a = A(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
2547
- re,
2580
+ /* @__PURE__ */ l(D, { scriptStr: n() }),
2581
+ (a = B(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
2582
+ se,
2548
2583
  {
2549
2584
  content: s,
2550
2585
  showContent: !1,
@@ -2569,7 +2604,7 @@ function Gn(e) {
2569
2604
  ))
2570
2605
  ] }) : null,
2571
2606
  /* @__PURE__ */ l(
2572
- re,
2607
+ se,
2573
2608
  {
2574
2609
  content: i(),
2575
2610
  showContent: !0,
@@ -2593,13 +2628,13 @@ function Gn(e) {
2593
2628
  )
2594
2629
  ] });
2595
2630
  }
2596
- const Yn = async ({
2631
+ const Qn = async ({
2597
2632
  builderContextValue: e,
2598
2633
  symbol: t
2599
2634
  }) => {
2600
2635
  if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
2601
2636
  (e != null && e.apiKey))
2602
- return Ie({
2637
+ return Ee({
2603
2638
  model: t.model,
2604
2639
  apiKey: e.apiKey,
2605
2640
  apiVersion: e.apiVersion,
@@ -2612,22 +2647,22 @@ const Yn = async ({
2612
2647
  x.error("Could not fetch symbol content: ", n);
2613
2648
  });
2614
2649
  };
2615
- async function Jn(e) {
2650
+ async function Xn(e) {
2616
2651
  var o, i, r, a, s;
2617
2652
  const t = function() {
2618
- var m, b;
2653
+ var d, p;
2619
2654
  return [
2620
- e.attributes[D()],
2655
+ e.attributes[M()],
2621
2656
  "builder-symbol",
2622
- (m = e.symbol) != null && m.inline ? "builder-inline-symbol" : void 0,
2623
- (b = e.symbol) != null && b.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2657
+ (d = e.symbol) != null && d.inline ? "builder-inline-symbol" : void 0,
2658
+ (p = e.symbol) != null && p.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2624
2659
  ].filter(Boolean).join(" ");
2625
- }, n = ((o = e.symbol) == null ? void 0 : o.content) || await Yn({
2660
+ }, n = ((o = e.symbol) == null ? void 0 : o.content) || await Qn({
2626
2661
  symbol: e.symbol,
2627
2662
  builderContextValue: e.builderContext
2628
2663
  });
2629
2664
  return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
2630
- Gn,
2665
+ Yn,
2631
2666
  {
2632
2667
  __isNestedRender: !0,
2633
2668
  apiVersion: e.builderContext.apiVersion,
@@ -2650,18 +2685,18 @@ async function Jn(e) {
2650
2685
  }
2651
2686
  ) });
2652
2687
  }
2653
- const ae = {};
2654
- function ho(e) {
2655
- if (k()) {
2656
- Object.assign(ae, e);
2688
+ const ce = {};
2689
+ function bo(e) {
2690
+ if (S()) {
2691
+ Object.assign(ce, e);
2657
2692
  const t = {
2658
2693
  type: "builder.settingsChange",
2659
- data: ae
2694
+ data: ce
2660
2695
  };
2661
2696
  parent.postMessage(t, "*");
2662
2697
  }
2663
2698
  }
2664
- const po = async (e) => {
2699
+ const yo = async (e) => {
2665
2700
  var o, i, r;
2666
2701
  const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
2667
2702
  ...e,
@@ -2673,49 +2708,49 @@ const po = async (e) => {
2673
2708
  urlPath: t
2674
2709
  } : {}
2675
2710
  },
2676
- options: we(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
2711
+ options: Te(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
2677
2712
  };
2678
2713
  return {
2679
2714
  apiKey: n.apiKey,
2680
2715
  model: n.model,
2681
- content: await Ie(n)
2716
+ content: await Ee(n)
2682
2717
  };
2683
2718
  };
2684
2719
  export {
2685
- co as A,
2686
- H as B,
2687
- kt as C,
2688
- mo as D,
2689
- po as E,
2690
- bn as F,
2691
- yn as G,
2692
- Jn as S,
2693
- Mt as T,
2694
- An as _,
2695
- bt as a,
2696
- oo as b,
2720
+ mo as A,
2721
+ z as B,
2722
+ xt as C,
2723
+ po as D,
2724
+ yo as E,
2725
+ Sn as F,
2726
+ kn as G,
2727
+ Xn as S,
2728
+ Kt as T,
2729
+ Bn as _,
2730
+ St as a,
2731
+ ao as b,
2697
2732
  j as c,
2698
- io as d,
2699
- ro as e,
2700
- k as f,
2701
- D as g,
2702
- L as h,
2703
- no as i,
2704
- so as j,
2705
- Nn as k,
2733
+ so as d,
2734
+ co as e,
2735
+ S as f,
2736
+ M as g,
2737
+ U as h,
2738
+ ro as i,
2739
+ uo as j,
2740
+ Un as k,
2706
2741
  x as l,
2707
- M as m,
2708
- lo as n,
2709
- W as o,
2710
- ao as p,
2711
- Ie as q,
2712
- uo as r,
2713
- Fn as s,
2714
- fo as t,
2715
- un as u,
2716
- sn as v,
2717
- Gn as w,
2718
- $n as x,
2719
- ho as y,
2720
- we as z
2742
+ K as m,
2743
+ fo as n,
2744
+ $ as o,
2745
+ lo as p,
2746
+ Ee as q,
2747
+ ho as r,
2748
+ Ln as s,
2749
+ go as t,
2750
+ fn as u,
2751
+ ln as v,
2752
+ Yn as w,
2753
+ Fn as x,
2754
+ bo as y,
2755
+ Te as z
2721
2756
  };