@builder.io/sdk-react-nextjs 0.12.1 → 0.12.3

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 (48) hide show
  1. package/lib/browser/USE_CLIENT_BUNDLE-64b6ec10.cjs +21 -0
  2. package/lib/browser/USE_CLIENT_BUNDLE-e89d3175.js +713 -0
  3. package/lib/{edge/USE_SERVER_BUNDLE-231b55dd.js → browser/USE_SERVER_BUNDLE-d6bec4ec.js} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-24df6623.cjs → browser/USE_SERVER_BUNDLE-f34c0814.cjs} +1 -1
  5. package/lib/browser/bundle-50ff23eb.cjs +172 -0
  6. package/lib/browser/{bundle-7e2a44d9.js → bundle-f3e8cd29.js} +576 -573
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +17 -17
  9. package/lib/edge/USE_CLIENT_BUNDLE-2aed408a.cjs +21 -0
  10. package/lib/edge/USE_CLIENT_BUNDLE-a3258a60.js +713 -0
  11. package/lib/{node/USE_SERVER_BUNDLE-33c309df.js → edge/USE_SERVER_BUNDLE-4e9af8f5.js} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-93366161.cjs → edge/USE_SERVER_BUNDLE-e79e6b55.cjs} +1 -1
  13. package/lib/edge/{bundle-44392f6d.js → bundle-cb191300.js} +811 -808
  14. package/lib/edge/{bundle-6d55a6a7.cjs → bundle-d4f509a3.cjs} +37 -33
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +17 -17
  17. package/lib/node/USE_CLIENT_BUNDLE-98a4fbf4.js +713 -0
  18. package/lib/node/USE_CLIENT_BUNDLE-990b655a.cjs +21 -0
  19. package/lib/{browser/USE_SERVER_BUNDLE-153f7d4b.js → node/USE_SERVER_BUNDLE-b231d861.js} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-a0bf6d8f.cjs → node/USE_SERVER_BUNDLE-c86a1fb8.cjs} +1 -1
  21. package/lib/node/{bundle-217b5738.js → bundle-11daeaca.js} +166 -163
  22. package/lib/node/{bundle-b9af39ec.cjs → bundle-b2d68b60.cjs} +11 -7
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +17 -17
  25. package/package.json +1 -1
  26. package/types/cjs/components/block/block.helpers.d.ts +0 -1
  27. package/types/cjs/components/block/components/block-wrapper.d.ts +2 -6
  28. package/types/cjs/components/content-variants/content-variants.types.d.ts +4 -0
  29. package/types/cjs/components/dynamic-renderer/dynamic-renderer.d.ts +8 -0
  30. package/types/cjs/components/dynamic-renderer/dynamic-renderer.helpers.d.ts +1 -0
  31. package/types/cjs/constants/sdk-version.d.ts +1 -1
  32. package/types/cjs/functions/is-from-trusted-host.d.ts +3 -0
  33. package/types/cjs/scripts/init-editing.d.ts +1 -0
  34. package/types/esm/components/block/block.helpers.d.ts +0 -1
  35. package/types/esm/components/block/components/block-wrapper.d.ts +2 -6
  36. package/types/esm/components/content-variants/content-variants.types.d.ts +4 -0
  37. package/types/esm/components/dynamic-renderer/dynamic-renderer.d.ts +8 -0
  38. package/types/esm/components/dynamic-renderer/dynamic-renderer.helpers.d.ts +1 -0
  39. package/types/esm/constants/sdk-version.d.ts +1 -1
  40. package/types/esm/functions/is-from-trusted-host.d.ts +3 -0
  41. package/types/esm/scripts/init-editing.d.ts +1 -0
  42. package/lib/browser/USE_CLIENT_BUNDLE-5457b97e.cjs +0 -23
  43. package/lib/browser/USE_CLIENT_BUNDLE-ac9ba054.js +0 -732
  44. package/lib/browser/bundle-6435b7fb.cjs +0 -168
  45. package/lib/edge/USE_CLIENT_BUNDLE-3049fd56.js +0 -732
  46. package/lib/edge/USE_CLIENT_BUNDLE-8922846d.cjs +0 -23
  47. package/lib/node/USE_CLIENT_BUNDLE-09122ff1.cjs +0 -23
  48. package/lib/node/USE_CLIENT_BUNDLE-f4804af3.js +0 -732
@@ -1,9 +1,9 @@
1
- import { LRUCache as Pe } from "lru-cache";
2
- import { jsx as l, Fragment as y, jsxs as I } from "react/jsx-runtime";
3
- import { createElement as Ve } from "react";
4
- import { I as Be, B as G, a as We, b as $e, C as Oe, E as Fe, F as Ne, c as _e, d as Le, S as Ue, V as Me, e as De } from "./USE_CLIENT_BUNDLE-ac9ba054.js";
1
+ import { LRUCache as Re } from "lru-cache";
2
+ import { jsx as l, Fragment as S, jsxs as T } from "react/jsx-runtime";
3
+ import { createElement as Ae } from "react";
4
+ import { I as Pe, B as Ve, a as Be, b as We, C as $e, E as Oe, F as Fe, c as Ne, d as _e, S as Le, V as Ue, e as Me } from "./USE_CLIENT_BUNDLE-e89d3175.js";
5
5
  import "next/navigation";
6
- function je(e) {
6
+ function De(e) {
7
7
  var t;
8
8
  return {
9
9
  ...(t = e.component) == null ? void 0 : t.options,
@@ -20,24 +20,24 @@ const P = "[Builder.io]: ", k = {
20
20
  warn: (...e) => console.warn(P, ...e),
21
21
  debug: (...e) => console.debug(P, ...e)
22
22
  };
23
- function x() {
23
+ function v() {
24
24
  return typeof window < "u" && typeof document < "u";
25
25
  }
26
- const T = "rsc";
27
- function Ke() {
28
- return x() && window.self !== window.top;
26
+ const I = "rsc";
27
+ function je() {
28
+ return v() && window.self !== window.top;
29
29
  }
30
- function j() {
31
- return Ke() && window.location.search.indexOf("builder.frameEditing=") !== -1;
30
+ function D() {
31
+ return je() && window.location.search.indexOf("builder.frameEditing=") !== -1;
32
32
  }
33
33
  const He = () => {
34
- if (x()) {
34
+ if (v()) {
35
35
  const e = new URL(location.href);
36
36
  return e.pathname === "" && (e.pathname = "/"), e;
37
37
  } else
38
38
  return console.warn("Cannot get location for tracking in non-browser environment"), null;
39
- }, ze = () => typeof navigator == "object" && navigator.userAgent || "", le = () => {
40
- const e = ze(), t = {
39
+ }, Ke = () => typeof navigator == "object" && navigator.userAgent || "", se = () => {
40
+ const e = Ke(), t = {
41
41
  Android() {
42
42
  return e.match(/Android/i);
43
43
  },
@@ -54,7 +54,7 @@ const He = () => {
54
54
  return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
55
55
  },
56
56
  any() {
57
- return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || T === "reactNative";
57
+ return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || I === "reactNative";
58
58
  }
59
59
  }, n = e.match(/Tablet|iPad/i), o = He();
60
60
  return {
@@ -62,7 +62,7 @@ const He = () => {
62
62
  host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
63
63
  device: n ? "tablet" : t.any() ? "mobile" : "desktop"
64
64
  };
65
- }, qe = ({
65
+ }, ze = ({
66
66
  builder: e,
67
67
  context: t,
68
68
  event: n,
@@ -74,69 +74,69 @@ const He = () => {
74
74
  builder: e,
75
75
  context: t,
76
76
  event: n
77
- }), Ge = () => ({
78
- isEditing: j(),
79
- isBrowser: x(),
80
- isServer: !x(),
81
- getUserAttributes: () => le()
82
- }), Ye = (e, {
77
+ }), qe = () => ({
78
+ isEditing: D(),
79
+ isBrowser: v(),
80
+ isServer: !v(),
81
+ getUserAttributes: () => se()
82
+ }), Ge = (e, {
83
83
  isExpression: t = !0
84
- }) => /* 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 = ({
84
+ }) => /* 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 = ({
85
85
  code: e,
86
86
  builder: t,
87
87
  context: n,
88
88
  event: o,
89
89
  localState: i,
90
- rootSetState: r,
91
- rootState: a
90
+ rootSetState: a,
91
+ rootState: r
92
92
  }) => {
93
- const s = qe({
93
+ const s = ze({
94
94
  builder: t,
95
95
  context: n,
96
96
  event: o,
97
- state: Je(a, i, r)
97
+ state: Ye(r, i, a)
98
98
  });
99
99
  return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
100
100
  };
101
- function Je(e, t, n) {
101
+ function Ye(e, t, n) {
102
102
  if (e === t)
103
103
  throw new Error("rootState === localState");
104
104
  return new Proxy(e, {
105
105
  get: (o, i) => t && i in t ? t[i] : e[i],
106
- set: (o, i, r) => {
106
+ set: (o, i, a) => {
107
107
  if (t && i in t)
108
108
  throw new Error("Writing to local state is not allowed as it is read-only.");
109
- return e[i] = r, n == null || n(e), !0;
109
+ return e[i] = a, n == null || n(e), !0;
110
110
  }
111
111
  });
112
112
  }
113
- const Qe = (e) => (x(), Y(e));
114
- function K({
113
+ const Je = (e) => (v(), q(e));
114
+ function j({
115
115
  code: e,
116
116
  context: t,
117
117
  localState: n,
118
118
  rootState: o,
119
119
  rootSetState: i,
120
- event: r,
121
- isExpression: a = !0
120
+ event: a,
121
+ isExpression: r = !0
122
122
  }) {
123
123
  if (e === "") {
124
124
  k.warn("Skipping evaluation of empty code block.");
125
125
  return;
126
126
  }
127
127
  const s = {
128
- code: Ye(e, {
129
- isExpression: a
128
+ code: Ge(e, {
129
+ isExpression: r
130
130
  }),
131
- builder: Ge(),
131
+ builder: qe(),
132
132
  context: t,
133
- event: r,
133
+ event: a,
134
134
  rootSetState: i,
135
135
  rootState: o,
136
136
  localState: n
137
137
  };
138
138
  try {
139
- return Qe(s);
139
+ return Je(s);
140
140
  } catch (c) {
141
141
  k.error("Failed code evaluation: " + c.message, {
142
142
  code: e
@@ -144,13 +144,13 @@ function K({
144
144
  return;
145
145
  }
146
146
  }
147
- const $ = (e) => JSON.parse(JSON.stringify(e)), Xe = (e, t, n) => {
147
+ const $ = (e) => JSON.parse(JSON.stringify(e)), Qe = (e, t, n) => {
148
148
  if (Object(e) !== e)
149
149
  return e;
150
150
  const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
151
- 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;
151
+ return o.slice(0, -1).reduce((i, a, r) => Object(i[a]) === i[a] ? i[a] : i[a] = Math.abs(Number(o[r + 1])) >> 0 === +o[r + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
152
152
  };
153
- const Ze = ({
153
+ const Xe = ({
154
154
  block: e,
155
155
  context: t,
156
156
  localState: n,
@@ -159,26 +159,26 @@ const Ze = ({
159
159
  }) => {
160
160
  if (!e.bindings)
161
161
  return e;
162
- const r = $(e), a = {
163
- ...r,
162
+ const a = $(e), r = {
163
+ ...a,
164
164
  properties: {
165
- ...r.properties
165
+ ...a.properties
166
166
  },
167
167
  actions: {
168
- ...r.actions
168
+ ...a.actions
169
169
  }
170
170
  };
171
171
  for (const s in e.bindings) {
172
- const c = e.bindings[s], u = K({
172
+ const c = e.bindings[s], u = j({
173
173
  code: c,
174
174
  localState: n,
175
175
  rootState: o,
176
176
  rootSetState: i,
177
177
  context: t
178
178
  });
179
- Xe(a, s, u);
179
+ Qe(r, s, u);
180
180
  }
181
- return a;
181
+ return r;
182
182
  };
183
183
  function W({
184
184
  block: e,
@@ -186,31 +186,31 @@ function W({
186
186
  shouldEvaluateBindings: n,
187
187
  localState: o,
188
188
  rootState: i,
189
- rootSetState: r
189
+ rootSetState: a
190
190
  }) {
191
- const a = e;
192
- return n ? Ze({
193
- block: a,
191
+ const r = e;
192
+ return n ? Xe({
193
+ block: r,
194
194
  localState: o,
195
195
  rootState: i,
196
- rootSetState: r,
196
+ rootSetState: a,
197
197
  context: t
198
- }) : a;
198
+ }) : r;
199
199
  }
200
- const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], _ = (e) => typeof e == "string" && et.includes(e.toLowerCase()), tt = ({
200
+ const Ze = ({
201
201
  block: e,
202
202
  context: t,
203
203
  registeredComponents: n
204
204
  }) => {
205
- var r;
206
- const o = (r = W({
205
+ var a;
206
+ const o = (a = W({
207
207
  block: e,
208
208
  localState: t.localState,
209
209
  rootState: t.rootState,
210
210
  rootSetState: t.rootSetState,
211
211
  context: t.context,
212
212
  shouldEvaluateBindings: !1
213
- }).component) == null ? void 0 : r.name;
213
+ }).component) == null ? void 0 : a.name;
214
214
  if (!o)
215
215
  return null;
216
216
  const i = n[o];
@@ -219,7 +219,7 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
219
219
  console.warn(`
220
220
  Could not find a registered component named "${o}".
221
221
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
222
- }, nt = ({
222
+ }, et = ({
223
223
  block: e,
224
224
  context: t
225
225
  }) => {
@@ -229,7 +229,7 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
229
229
  } = e;
230
230
  if (!(n != null && n.collection))
231
231
  return;
232
- const i = K({
232
+ const i = j({
233
233
  code: n.collection,
234
234
  localState: t.localState,
235
235
  rootState: t.rootState,
@@ -238,7 +238,7 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
238
238
  });
239
239
  if (!Array.isArray(i))
240
240
  return;
241
- const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
241
+ const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
242
242
  return i.map((c, u) => ({
243
243
  context: {
244
244
  ...t,
@@ -246,13 +246,13 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
246
246
  ...t.localState,
247
247
  $index: u,
248
248
  $item: c,
249
- [a]: c,
250
- [`$${a}Index`]: u
249
+ [r]: c,
250
+ [`$${r}Index`]: u
251
251
  }
252
252
  },
253
253
  block: o
254
254
  }));
255
- }, de = {
255
+ }, ce = {
256
256
  small: {
257
257
  min: 320,
258
258
  default: 321,
@@ -268,11 +268,11 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
268
268
  default: 991,
269
269
  max: 1200
270
270
  }
271
- }, J = (e, t = de) => `@media (max-width: ${t[e].max}px)`, ue = ({
271
+ }, G = (e, t = ce) => `@media (max-width: ${t[e].max}px)`, le = ({
272
272
  small: e,
273
273
  medium: t
274
274
  }) => {
275
- const n = $(de);
275
+ const n = $(ce);
276
276
  if (!e || !t)
277
277
  return n;
278
278
  const o = Math.floor(e / 2);
@@ -287,24 +287,24 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
287
287
  min: i,
288
288
  default: i + 1
289
289
  };
290
- const r = n.medium.max + 1;
290
+ const a = n.medium.max + 1;
291
291
  return n.large = {
292
292
  max: 2e3,
293
293
  // TODO: decide upper limit
294
- min: r,
295
- default: r + 1
294
+ min: a,
295
+ default: a + 1
296
296
  }, n;
297
- }, ot = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), w = (e) => e != null, me = (e) => Object.entries(e).map(([n, o]) => {
297
+ }, tt = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), w = (e) => e != null, de = (e) => Object.entries(e).map(([n, o]) => {
298
298
  if (typeof o == "string")
299
- return `${ot(n)}: ${o};`;
300
- }).filter(w), it = (e) => me(e).join(`
301
- `), L = ({
299
+ return `${tt(n)}: ${o};`;
300
+ }).filter(w), nt = (e) => de(e).join(`
301
+ `), _ = ({
302
302
  mediaQuery: e,
303
303
  className: t,
304
304
  styles: n
305
305
  }) => {
306
306
  const o = `.${t} {
307
- ${it(n)}
307
+ ${nt(n)}
308
308
  }`;
309
309
  return e ? `${e} {
310
310
  ${o}
@@ -313,7 +313,7 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
313
313
  function O(e) {
314
314
  return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
315
315
  }
316
- function rt(e) {
316
+ function ot(e) {
317
317
  const t = function() {
318
318
  const i = W({
319
319
  block: e.block,
@@ -333,37 +333,37 @@ function rt(e) {
333
333
  rootSetState: e.context.rootSetState,
334
334
  context: e.context.context,
335
335
  shouldEvaluateBindings: !0
336
- }), r = i.responsiveStyles, a = e.context.content, s = ue(
337
- ((d = a == null ? void 0 : a.meta) == null ? void 0 : d.breakpoints) || {}
338
- ), c = r == null ? void 0 : r.large, u = r == null ? void 0 : r.medium, m = r == null ? void 0 : r.small, g = i.id;
339
- if (!g)
336
+ }), a = i.responsiveStyles, r = e.context.content, s = le(
337
+ ((d = r == null ? void 0 : r.meta) == null ? void 0 : d.breakpoints) || {}
338
+ ), c = a == null ? void 0 : a.large, u = a == null ? void 0 : a.medium, g = a == null ? void 0 : a.small, p = i.id;
339
+ if (!p)
340
340
  return "";
341
- const f = c ? L({
342
- className: g,
341
+ const m = c ? _({
342
+ className: p,
343
343
  styles: c
344
- }) : "", h = u ? L({
345
- className: g,
344
+ }) : "", h = u ? _({
345
+ className: p,
346
346
  styles: u,
347
- mediaQuery: J(
347
+ mediaQuery: G(
348
348
  "medium",
349
349
  s
350
350
  )
351
- }) : "", p = m ? L({
352
- className: g,
353
- styles: m,
354
- mediaQuery: J(
351
+ }) : "", f = g ? _({
352
+ className: p,
353
+ styles: g,
354
+ mediaQuery: G(
355
355
  "small",
356
356
  s
357
357
  )
358
358
  }) : "";
359
- return [f, h, p].join(" ");
359
+ return [m, h, f].join(" ");
360
360
  };
361
- return /* @__PURE__ */ l(y, { children: n() && t() ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
361
+ return /* @__PURE__ */ l(S, { children: n() && t() ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
362
362
  }
363
- function at(e) {
363
+ function it(e) {
364
364
  return e.charAt(0).toUpperCase() + e.slice(1);
365
365
  }
366
- const st = (e) => `on${at(e)}`, ct = (e, t) => (n) => K({
366
+ const at = (e) => `on${it(e)}`, rt = (e, t) => (n) => j({
367
367
  code: e,
368
368
  context: t.context,
369
369
  localState: t.localState,
@@ -372,58 +372,58 @@ const st = (e) => `on${at(e)}`, ct = (e, t) => (n) => K({
372
372
  event: n,
373
373
  isExpression: !1
374
374
  });
375
- function Dn(e) {
375
+ function jn(e) {
376
376
  const t = {}, n = e.block.actions ?? {};
377
377
  for (const o in n) {
378
378
  if (!n.hasOwnProperty(o))
379
379
  continue;
380
380
  const i = n[o];
381
- let r = st(o);
381
+ let a = at(o);
382
382
  if (e.stripPrefix)
383
- switch (T) {
383
+ switch (I) {
384
384
  case "vue":
385
- r = r.replace("v-on:", "");
385
+ a = a.replace("v-on:", "");
386
386
  break;
387
387
  case "svelte":
388
- r = r.replace("on:", "");
388
+ a = a.replace("on:", "");
389
389
  break;
390
390
  }
391
- t[r] = ct(i, e);
391
+ t[a] = rt(i, e);
392
392
  }
393
393
  return t;
394
394
  }
395
- function lt({
395
+ function st({
396
396
  properties: e
397
397
  }) {
398
398
  return e.className = e.class, delete e.class, e;
399
399
  }
400
- const dt = (e) => ({
400
+ const ct = (e) => ({
401
401
  href: e.href
402
402
  });
403
- function ut({
403
+ function lt({
404
404
  block: e,
405
405
  context: t
406
406
  }) {
407
407
  var o;
408
408
  const n = {
409
- ...dt(e),
409
+ ...ct(e),
410
410
  ...e.properties,
411
411
  "builder-id": e.id,
412
- style: e.style ? mt(e.style) : void 0,
412
+ style: e.style ? dt(e.style) : void 0,
413
413
  class: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
414
414
  };
415
- return lt({
415
+ return st({
416
416
  properties: n,
417
417
  context: t,
418
418
  block: e
419
419
  });
420
420
  }
421
- function mt(e) {
422
- switch (T) {
421
+ function dt(e) {
422
+ switch (I) {
423
423
  case "svelte":
424
424
  case "vue":
425
425
  case "solid":
426
- return me(e).join(" ");
426
+ return de(e).join(" ");
427
427
  case "qwik":
428
428
  case "reactNative":
429
429
  case "react":
@@ -431,14 +431,14 @@ function mt(e) {
431
431
  return e;
432
432
  }
433
433
  }
434
- const ft = ({
434
+ const ut = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Hn = (e) => typeof e == "string" && ut.has(e.toLowerCase()), mt = ({
435
435
  componentOptions: e,
436
436
  builderBlock: t,
437
437
  context: n,
438
438
  componentRef: o,
439
439
  includeBlockProps: i,
440
- isInteractive: r,
441
- contextValue: a
440
+ isInteractive: a,
441
+ contextValue: r
442
442
  }) => {
443
443
  const s = {
444
444
  ...e,
@@ -447,13 +447,13 @@ const ft = ({
447
447
  * component itself directly. Otherwise, they are provided to the wrapper element.
448
448
  */
449
449
  ...i ? {
450
- attributes: ut({
450
+ attributes: lt({
451
451
  block: t,
452
- context: a
452
+ context: r
453
453
  })
454
454
  } : {}
455
455
  };
456
- return r ? {
456
+ return a ? {
457
457
  Wrapper: o,
458
458
  block: t,
459
459
  context: n,
@@ -461,13 +461,13 @@ const ft = ({
461
461
  includeBlockProps: i
462
462
  } : s;
463
463
  };
464
- function Q(e) {
464
+ function Y(e) {
465
465
  var n;
466
- const t = e.isInteractive ? Be : e.componentRef;
467
- return /* @__PURE__ */ l(y, { children: e.componentRef ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
466
+ const t = e.isInteractive ? Pe : e.componentRef;
467
+ return /* @__PURE__ */ l(S, { children: e.componentRef ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
468
468
  t,
469
469
  {
470
- ...ft({
470
+ ...mt({
471
471
  componentOptions: e.componentOptions,
472
472
  builderBlock: e.builderBlock,
473
473
  context: e.context,
@@ -488,7 +488,7 @@ function Q(e) {
488
488
  }
489
489
  ) }) : null });
490
490
  }
491
- function ht(e) {
491
+ function ft(e) {
492
492
  const t = e.repeatContext;
493
493
  return /* @__PURE__ */ l(
494
494
  F,
@@ -500,15 +500,15 @@ function ht(e) {
500
500
  );
501
501
  }
502
502
  function F(e) {
503
- var u, m, g;
503
+ var u, g, p;
504
504
  const t = function() {
505
- return tt({
505
+ return Ze({
506
506
  block: e.block,
507
507
  context: e.context,
508
508
  registeredComponents: e.registeredComponents
509
509
  });
510
510
  }, n = function() {
511
- return nt({
511
+ return et({
512
512
  block: e.block,
513
513
  context: e.context
514
514
  });
@@ -524,24 +524,24 @@ function F(e) {
524
524
  });
525
525
  }, i = function() {
526
526
  return e.block.tagName || "div";
527
- }, r = function() {
527
+ }, a = function() {
528
528
  var d, b;
529
529
  if ((d = e.block.repeat) != null && d.collection)
530
530
  return !!((b = n()) != null && b.length);
531
531
  const h = "hide" in o() ? o().hide : !1;
532
532
  return ("show" in o() ? o().show : !0) && !h;
533
- }, a = function() {
534
- var p;
535
- return !((p = t()) != null && p.component) && !n() ? o().children ?? [] : [];
533
+ }, r = function() {
534
+ var f;
535
+ return !((f = t()) != null && f.component) && !n() ? o().children ?? [] : [];
536
536
  }, s = function() {
537
- var h, p, d, b, S;
537
+ var h, f, d, b, x;
538
538
  return {
539
539
  blockChildren: o().children ?? [],
540
540
  componentRef: (h = t()) == null ? void 0 : h.component,
541
541
  componentOptions: {
542
- ...je(o()),
542
+ ...De(o()),
543
543
  builderContext: e.context,
544
- ...((p = t()) == null ? void 0 : p.name) === "Symbol" || ((d = t()) == null ? void 0 : d.name) === "Columns" ? {
544
+ ...((f = t()) == null ? void 0 : f.name) === "Symbol" || ((d = t()) == null ? void 0 : d.name) === "Columns" ? {
545
545
  builderComponents: e.registeredComponents
546
546
  } : {}
547
547
  },
@@ -549,13 +549,13 @@ function F(e) {
549
549
  registeredComponents: e.registeredComponents,
550
550
  builderBlock: o(),
551
551
  includeBlockProps: ((b = t()) == null ? void 0 : b.noWrap) === !0,
552
- isInteractive: !((S = t()) != null && S.isRSC)
552
+ isInteractive: !((x = t()) != null && x.isRSC)
553
553
  };
554
554
  }, c = e.context;
555
- return /* @__PURE__ */ l(y, { children: r() ? /* @__PURE__ */ I(y, { children: [
556
- /* @__PURE__ */ l(rt, { block: e.block, context: e.context }),
557
- (u = t()) != null && u.noWrap ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
558
- Q,
555
+ return /* @__PURE__ */ l(S, { children: a() ? /* @__PURE__ */ T(S, { children: [
556
+ /* @__PURE__ */ l(ot, { block: e.block, context: e.context }),
557
+ (u = t()) != null && u.noWrap ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
558
+ Y,
559
559
  {
560
560
  componentRef: s().componentRef,
561
561
  componentOptions: s().componentOptions,
@@ -566,65 +566,52 @@ function F(e) {
566
566
  includeBlockProps: s().includeBlockProps,
567
567
  isInteractive: s().isInteractive
568
568
  }
569
- ) }) : /* @__PURE__ */ I(y, { children: [
570
- _(i()) ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
571
- G,
572
- {
573
- Wrapper: i(),
574
- block: o(),
575
- context: e.context,
576
- hasChildren: !1
577
- }
578
- ) }) : null,
579
- !_(i()) && n() ? /* @__PURE__ */ l(y, { children: (m = n()) == null ? void 0 : m.map((f, h) => /* @__PURE__ */ l(
580
- ht,
581
- {
582
- repeatContext: f.context,
583
- block: f.block,
584
- registeredComponents: e.registeredComponents
585
- },
586
- h
587
- )) }) : null,
588
- !_(i()) && !n() ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ I(
589
- G,
590
- {
591
- Wrapper: i(),
592
- block: o(),
593
- context: e.context,
594
- hasChildren: !0,
595
- children: [
596
- /* @__PURE__ */ l(
597
- Q,
598
- {
599
- componentRef: s().componentRef,
600
- componentOptions: s().componentOptions,
601
- blockChildren: s().blockChildren,
602
- context: s().context,
603
- registeredComponents: s().registeredComponents,
604
- builderBlock: s().builderBlock,
605
- includeBlockProps: s().includeBlockProps,
606
- isInteractive: s().isInteractive
607
- }
608
- ),
609
- (g = a()) == null ? void 0 : g.map((f) => /* @__PURE__ */ l(
610
- F,
611
- {
612
- block: f,
613
- context: c,
614
- registeredComponents: e.registeredComponents
615
- },
616
- f.id
617
- ))
618
- ]
619
- }
620
- ) }) : null
621
- ] })
569
+ ) }) : /* @__PURE__ */ l(S, { children: n() ? /* @__PURE__ */ l(S, { children: (p = n()) == null ? void 0 : p.map((m, h) => /* @__PURE__ */ l(
570
+ ft,
571
+ {
572
+ repeatContext: m.context,
573
+ block: m.block,
574
+ registeredComponents: e.registeredComponents
575
+ },
576
+ h
577
+ )) }) : /* @__PURE__ */ l(S, { children: /* @__PURE__ */ T(
578
+ Ve,
579
+ {
580
+ Wrapper: i(),
581
+ block: o(),
582
+ context: e.context,
583
+ children: [
584
+ /* @__PURE__ */ l(
585
+ Y,
586
+ {
587
+ componentRef: s().componentRef,
588
+ componentOptions: s().componentOptions,
589
+ blockChildren: s().blockChildren,
590
+ context: s().context,
591
+ registeredComponents: s().registeredComponents,
592
+ builderBlock: s().builderBlock,
593
+ includeBlockProps: s().includeBlockProps,
594
+ isInteractive: s().isInteractive
595
+ }
596
+ ),
597
+ (g = r()) == null ? void 0 : g.map((m) => /* @__PURE__ */ l(
598
+ F,
599
+ {
600
+ block: m,
601
+ context: c,
602
+ registeredComponents: e.registeredComponents
603
+ },
604
+ m.id
605
+ ))
606
+ ]
607
+ }
608
+ ) }) })
622
609
  ] }) : null });
623
610
  }
624
611
  function N(e) {
625
612
  var t, n, o;
626
613
  return /* @__PURE__ */ l(
627
- We,
614
+ Be,
628
615
  {
629
616
  blocks: e.blocks,
630
617
  parent: e.parent,
@@ -632,7 +619,7 @@ function N(e) {
632
619
  styleProp: e.styleProp,
633
620
  BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
634
621
  BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
635
- children: e.blocks ? /* @__PURE__ */ l(y, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
622
+ children: e.blocks ? /* @__PURE__ */ l(S, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
636
623
  F,
637
624
  {
638
625
  block: i,
@@ -644,15 +631,15 @@ function N(e) {
644
631
  }
645
632
  );
646
633
  }
647
- function pt(e) {
634
+ function ht(e) {
648
635
  var h;
649
636
  const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
650
637
  var b;
651
638
  return ((b = n[d]) == null ? void 0 : b.width) || 100 / n.length;
652
- }, r = function(d) {
639
+ }, a = function(d) {
653
640
  const b = t * (n.length - 1) / n.length;
654
641
  return `calc(${i(d)}% - ${b}px)`;
655
- }, a = function({
642
+ }, r = function({
656
643
  stackedStyle: d,
657
644
  desktopStyle: b
658
645
  }) {
@@ -665,41 +652,41 @@ function pt(e) {
665
652
  }, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", u = function() {
666
653
  return {
667
654
  "--flex-dir": c,
668
- "--flex-dir-tablet": a({
655
+ "--flex-dir-tablet": r({
669
656
  stackedStyle: c,
670
657
  desktopStyle: "row"
671
658
  })
672
659
  };
673
- }, m = function(d) {
674
- const b = d === 0 ? 0 : t, S = r(d), v = `${b}px`, A = "100%", E = 0;
660
+ }, g = function(d) {
661
+ const b = d === 0 ? 0 : t, x = a(d), y = `${b}px`, A = "100%", E = 0;
675
662
  return {
676
- width: S,
677
- ["marginLeft"]: v,
663
+ width: x,
664
+ ["marginLeft"]: y,
678
665
  "--column-width-mobile": s({
679
666
  stackedStyle: A,
680
- desktopStyle: S
667
+ desktopStyle: x
681
668
  }),
682
669
  "--column-margin-left-mobile": s({
683
670
  stackedStyle: E,
684
- desktopStyle: v
671
+ desktopStyle: y
685
672
  }),
686
- "--column-width-tablet": a({
673
+ "--column-width-tablet": r({
687
674
  stackedStyle: A,
688
- desktopStyle: S
675
+ desktopStyle: x
689
676
  }),
690
- "--column-margin-left-tablet": a({
677
+ "--column-margin-left-tablet": r({
691
678
  stackedStyle: E,
692
- desktopStyle: v
679
+ desktopStyle: y
693
680
  })
694
681
  };
695
- }, g = function(d) {
696
- var S, v;
697
- return ue(
698
- ((v = (S = e.builderContext.content) == null ? void 0 : S.meta) == null ? void 0 : v.breakpoints) || {}
682
+ }, p = function(d) {
683
+ var x, y;
684
+ return le(
685
+ ((y = (x = e.builderContext.content) == null ? void 0 : x.meta) == null ? void 0 : y.breakpoints) || {}
699
686
  )[d].max;
700
- }, f = function() {
687
+ }, m = function() {
701
688
  return `
702
- @media (max-width: ${g("medium")}px) {
689
+ @media (max-width: ${p("medium")}px) {
703
690
  .${e.builderBlock.id}-breakpoints {
704
691
  flex-direction: var(--flex-dir-tablet);
705
692
  align-items: stretch;
@@ -711,7 +698,7 @@ function pt(e) {
711
698
  }
712
699
  }
713
700
 
714
- @media (max-width: ${g("small")}px) {
701
+ @media (max-width: ${p("small")}px) {
715
702
  .${e.builderBlock.id}-breakpoints {
716
703
  flex-direction: var(--flex-dir);
717
704
  align-items: stretch;
@@ -724,19 +711,19 @@ function pt(e) {
724
711
  },
725
712
  `;
726
713
  };
727
- return /* @__PURE__ */ I(y, { children: [
728
- /* @__PURE__ */ I(
714
+ return /* @__PURE__ */ T(S, { children: [
715
+ /* @__PURE__ */ T(
729
716
  "div",
730
717
  {
731
718
  className: `builder-columns ${e.builderBlock.id}-breakpoints div-39daef82`,
732
719
  style: u(),
733
720
  children: [
734
- /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(O, { styles: f() }) }),
735
- (h = e.columns) == null ? void 0 : h.map((p, d) => /* @__PURE__ */ Ve(
721
+ /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(O, { styles: m() }) }),
722
+ (h = e.columns) == null ? void 0 : h.map((f, d) => /* @__PURE__ */ Ae(
736
723
  "div",
737
724
  {
738
725
  className: "builder-column div-39daef82-2",
739
- style: m(d),
726
+ style: g(d),
740
727
  key: d
741
728
  },
742
729
  /* @__PURE__ */ l(
@@ -749,7 +736,7 @@ function pt(e) {
749
736
  },
750
737
  context: e.builderContext,
751
738
  registeredComponents: e.builderComponents,
752
- blocks: p.blocks
739
+ blocks: f.blocks
753
740
  }
754
741
  )
755
742
  ))
@@ -766,42 +753,42 @@ function pt(e) {
766
753
  }` })
767
754
  ] });
768
755
  }
769
- function X(e) {
756
+ function J(e) {
770
757
  return e.replace(/http(s)?:/, "");
771
758
  }
772
- function gt(e = "", t, n) {
759
+ function pt(e = "", t, n) {
773
760
  const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
774
761
  return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
775
762
  }
776
- function bt(e, t) {
763
+ function gt(e, t) {
777
764
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
778
765
  return e;
779
766
  if (t === "master")
780
- return X(e);
767
+ return J(e);
781
768
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
782
769
  if (n) {
783
- const o = e.split(n[0]), i = n[3], r = t.match("x") ? t : `${t}x`;
784
- return X(`${o[0]}_${r}${i}`);
770
+ const o = e.split(n[0]), i = n[3], a = t.match("x") ? t : `${t}x`;
771
+ return J(`${o[0]}_${a}${i}`);
785
772
  }
786
773
  return null;
787
774
  }
788
- function jn(e) {
775
+ function Kn(e) {
789
776
  if (!e)
790
777
  return e;
791
778
  const t = [100, 200, 400, 800, 1200, 1600, 2e3];
792
779
  if (e.match(/builder\.io/)) {
793
780
  let n = e;
794
781
  const o = Number(e.split("?width=")[1]);
795
- return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${gt(e, "width", i)} ${i}w`).concat([n]).join(", ");
782
+ return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${pt(e, "width", i)} ${i}w`).concat([n]).join(", ");
796
783
  }
797
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [bt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
784
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [gt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
798
785
  }
799
- const yt = (e) => {
786
+ const bt = (e) => {
800
787
  if (e === "localhost" || e === "127.0.0.1")
801
788
  return e;
802
789
  const t = e.split(".");
803
790
  return t.length > 2 ? t.slice(1).join(".") : e;
804
- }, fe = ({
791
+ }, ue = ({
805
792
  name: e,
806
793
  canTrack: t
807
794
  }) => {
@@ -812,14 +799,14 @@ const yt = (e) => {
812
799
  k.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
813
800
  return;
814
801
  }
815
- }, he = async (e) => fe(e), vt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(w).join("; "), xt = [["secure", ""], ["SameSite", "None"]], St = ({
802
+ }, me = async (e) => ue(e), yt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(w).join("; "), St = [["secure", ""], ["SameSite", "None"]], vt = ({
816
803
  name: e,
817
804
  value: t,
818
805
  expires: n
819
806
  }) => {
820
- const i = (x() ? location.protocol === "https:" : !0) ? xt : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", yt(window.location.hostname)], ...i];
821
- return vt(a);
822
- }, pe = async ({
807
+ const i = (v() ? location.protocol === "https:" : !0) ? St : [[]], a = n ? [["expires", n.toUTCString()]] : [[]], r = [[e, t], ...a, ["path", "/"], ["domain", bt(window.location.hostname)], ...i];
808
+ return yt(r);
809
+ }, fe = async ({
823
810
  name: e,
824
811
  value: t,
825
812
  expires: n,
@@ -828,7 +815,7 @@ const yt = (e) => {
828
815
  try {
829
816
  if (!o)
830
817
  return;
831
- const i = St({
818
+ const i = vt({
832
819
  name: e,
833
820
  value: t,
834
821
  expires: n
@@ -837,45 +824,45 @@ const yt = (e) => {
837
824
  } catch (i) {
838
825
  k.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
839
826
  }
840
- }, kt = "builder.tests", H = (e) => `${kt}.${e}`, Ct = ({
827
+ }, xt = "builder.tests", H = (e) => `${xt}.${e}`, kt = ({
841
828
  contentId: e
842
- }) => he({
829
+ }) => me({
843
830
  name: H(e),
844
831
  canTrack: !0
845
- }), wt = ({
832
+ }), Ct = ({
846
833
  contentId: e
847
- }) => fe({
834
+ }) => ue({
848
835
  name: H(e),
849
836
  canTrack: !0
850
- }), It = ({
837
+ }), wt = ({
851
838
  contentId: e,
852
839
  value: t
853
- }) => pe({
840
+ }) => fe({
854
841
  name: H(e),
855
842
  value: t,
856
843
  canTrack: !0
857
- }), ge = (e) => w(e.id) && w(e.variations) && Object.keys(e.variations).length > 0, Tt = ({
844
+ }), he = (e) => w(e.id) && w(e.variations) && Object.keys(e.variations).length > 0, It = ({
858
845
  id: e,
859
846
  variations: t
860
847
  }) => {
861
848
  var i;
862
849
  let n = 0;
863
850
  const o = Math.random();
864
- for (const r in t) {
865
- const a = (i = t[r]) == null ? void 0 : i.testRatio;
866
- if (n += a, o < n)
867
- return r;
851
+ for (const a in t) {
852
+ const r = (i = t[a]) == null ? void 0 : i.testRatio;
853
+ if (n += r, o < n)
854
+ return a;
868
855
  }
869
856
  return e;
870
- }, be = (e) => {
871
- const t = Tt(e);
872
- return It({
857
+ }, pe = (e) => {
858
+ const t = It(e);
859
+ return wt({
873
860
  contentId: e.id,
874
861
  value: t
875
862
  }).catch((n) => {
876
863
  k.error("could not store A/B test variation: ", n);
877
864
  }), t;
878
- }, ye = ({
865
+ }, ge = ({
879
866
  item: e,
880
867
  testGroupId: t
881
868
  }) => {
@@ -889,7 +876,7 @@ const yt = (e) => {
889
876
  testVariationId: n.id,
890
877
  testVariationName: n.name || (n.id === e.id ? "Default" : "")
891
878
  };
892
- }, Et = ({
879
+ }, Tt = ({
893
880
  item: e,
894
881
  canTrack: t
895
882
  }) => {
@@ -897,14 +884,14 @@ const yt = (e) => {
897
884
  return e;
898
885
  if (!e)
899
886
  return;
900
- if (!ge(e))
887
+ if (!he(e))
901
888
  return e;
902
- const n = wt({
889
+ const n = Ct({
903
890
  contentId: e.id
904
- }) || be({
891
+ }) || pe({
905
892
  variations: e.variations,
906
893
  id: e.id
907
- }), o = ye({
894
+ }), o = ge({
908
895
  item: e,
909
896
  testGroupId: n
910
897
  });
@@ -912,18 +899,18 @@ const yt = (e) => {
912
899
  ...e,
913
900
  ...o
914
901
  };
915
- }, Rt = async ({
902
+ }, Et = async ({
916
903
  item: e,
917
904
  canTrack: t
918
905
  }) => {
919
- if (!t || !ge(e))
906
+ if (!t || !he(e))
920
907
  return e;
921
- const o = await Ct({
908
+ const o = await kt({
922
909
  contentId: e.id
923
- }) || be({
910
+ }) || pe({
924
911
  variations: e.variations,
925
912
  id: e.id
926
- }), i = ye({
913
+ }), i = ge({
927
914
  item: e,
928
915
  testGroupId: o
929
916
  });
@@ -931,7 +918,7 @@ const yt = (e) => {
931
918
  ...e,
932
919
  ...i
933
920
  };
934
- }, U = (e) => w(e) ? e : !0, At = {
921
+ }, L = (e) => w(e) ? e : !0, Rt = {
935
922
  name: "Core:Button",
936
923
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
937
924
  defaultStyles: {
@@ -964,7 +951,7 @@ const yt = (e) => {
964
951
  }],
965
952
  static: !0,
966
953
  noWrap: !0
967
- }, Pt = {
954
+ }, At = {
968
955
  // TODO: ways to statically preprocess JSON for references, functions, etc
969
956
  name: "Columns",
970
957
  isRSC: !0,
@@ -1143,7 +1130,7 @@ const yt = (e) => {
1143
1130
  });
1144
1131
  }
1145
1132
  const n = e.get("columns");
1146
- Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((r) => !r.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
1133
+ Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
1147
1134
  }
1148
1135
  }, {
1149
1136
  name: "space",
@@ -1165,7 +1152,7 @@ const yt = (e) => {
1165
1152
  helperText: "When stacking columns for mobile devices, reverse the ordering",
1166
1153
  advanced: !0
1167
1154
  }]
1168
- }, Vt = {
1155
+ }, Pt = {
1169
1156
  name: "Custom Code",
1170
1157
  static: !0,
1171
1158
  requiredPermissions: ["editCode"],
@@ -1187,7 +1174,7 @@ const yt = (e) => {
1187
1174
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1188
1175
  advanced: !0
1189
1176
  }]
1190
- }, Bt = {
1177
+ }, Vt = {
1191
1178
  name: "Embed",
1192
1179
  static: !0,
1193
1180
  inputs: [{
@@ -1212,13 +1199,13 @@ const yt = (e) => {
1212
1199
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1213
1200
  hideFromUI: !0
1214
1201
  }]
1215
- }, Wt = ["text/javascript", "application/javascript", "application/ecmascript"], Kn = (e) => Wt.includes(e.type), $t = {
1202
+ }, Bt = ["text/javascript", "application/javascript", "application/ecmascript"], zn = (e) => Bt.includes(e.type), Wt = {
1216
1203
  name: "Fragment",
1217
1204
  static: !0,
1218
1205
  hidden: !0,
1219
1206
  canHaveChildren: !0,
1220
1207
  noWrap: !0
1221
- }, Ot = {
1208
+ }, $t = {
1222
1209
  name: "Image",
1223
1210
  static: !0,
1224
1211
  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",
@@ -1238,29 +1225,29 @@ const yt = (e) => {
1238
1225
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1239
1226
  onChange: (e) => {
1240
1227
  e.delete("srcset"), e.delete("noWebp");
1241
- function n(a, s = 6e4) {
1228
+ function n(r, s = 6e4) {
1242
1229
  return new Promise((c, u) => {
1243
- const m = document.createElement("img");
1244
- let g = !1;
1245
- m.onload = () => {
1246
- g = !0, c(m);
1247
- }, m.addEventListener("error", (f) => {
1248
- console.warn("Image load failed", f.error), u(f.error);
1249
- }), m.src = a, setTimeout(() => {
1250
- g || u(new Error("Image load timed out"));
1230
+ const g = document.createElement("img");
1231
+ let p = !1;
1232
+ g.onload = () => {
1233
+ p = !0, c(g);
1234
+ }, g.addEventListener("error", (m) => {
1235
+ console.warn("Image load failed", m.error), u(m.error);
1236
+ }), g.src = r, setTimeout(() => {
1237
+ p || u(new Error("Image load timed out"));
1251
1238
  }, s);
1252
1239
  });
1253
1240
  }
1254
- function o(a) {
1255
- return Math.round(a * 1e3) / 1e3;
1241
+ function o(r) {
1242
+ return Math.round(r * 1e3) / 1e3;
1256
1243
  }
1257
- const i = e.get("image"), r = e.get("aspectRatio");
1258
- if (fetch(i).then((a) => a.blob()).then((a) => {
1259
- a.type.includes("svg") && e.set("noWebp", !0);
1260
- }), i && (!r || r === 0.7041))
1261
- return n(i).then((a) => {
1244
+ const i = e.get("image"), a = e.get("aspectRatio");
1245
+ if (fetch(i).then((r) => r.blob()).then((r) => {
1246
+ r.type.includes("svg") && e.set("noWebp", !0);
1247
+ }), i && (!a || a === 0.7041))
1248
+ return n(i).then((r) => {
1262
1249
  const s = e.get("aspectRatio");
1263
- e.get("image") === i && (!s || s === 0.7041) && a.width && a.height && (e.set("aspectRatio", o(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
1250
+ e.get("image") === i && (!s || s === 0.7041) && r.width && r.height && (e.set("aspectRatio", o(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
1264
1251
  });
1265
1252
  }
1266
1253
  }, {
@@ -1318,7 +1305,7 @@ const yt = (e) => {
1318
1305
  advanced: !0,
1319
1306
  defaultValue: 0.7041
1320
1307
  }]
1321
- }, Ft = {
1308
+ }, Ot = {
1322
1309
  // friendlyName?
1323
1310
  name: "Raw:Img",
1324
1311
  hideFromInsertMenu: !0,
@@ -1332,7 +1319,7 @@ const yt = (e) => {
1332
1319
  }],
1333
1320
  noWrap: !0,
1334
1321
  static: !0
1335
- }, Nt = {
1322
+ }, Ft = {
1336
1323
  name: "Core:Section",
1337
1324
  static: !0,
1338
1325
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1371,7 +1358,7 @@ const yt = (e) => {
1371
1358
  }
1372
1359
  }
1373
1360
  }]
1374
- }, _t = {
1361
+ }, Nt = {
1375
1362
  name: "Slot",
1376
1363
  isRSC: !0,
1377
1364
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -1385,7 +1372,7 @@ const yt = (e) => {
1385
1372
  defaultValue: "children"
1386
1373
  }]
1387
1374
  };
1388
- function Lt(e) {
1375
+ function _t(e) {
1389
1376
  var t, n, o;
1390
1377
  return /* @__PURE__ */ l(
1391
1378
  "div",
@@ -1408,7 +1395,7 @@ function Lt(e) {
1408
1395
  }
1409
1396
  );
1410
1397
  }
1411
- const Ut = {
1398
+ const Lt = {
1412
1399
  name: "Symbol",
1413
1400
  noWrap: !0,
1414
1401
  static: !0,
@@ -1441,7 +1428,7 @@ const Ut = {
1441
1428
  hideFromUI: !0,
1442
1429
  type: "boolean"
1443
1430
  }]
1444
- }, Mt = {
1431
+ }, Ut = {
1445
1432
  name: "Text",
1446
1433
  static: !0,
1447
1434
  isRSC: !0,
@@ -1460,7 +1447,7 @@ const Ut = {
1460
1447
  textAlign: "center"
1461
1448
  }
1462
1449
  };
1463
- function Dt(e) {
1450
+ function Mt(e) {
1464
1451
  var t;
1465
1452
  return /* @__PURE__ */ l(
1466
1453
  "div",
@@ -1473,7 +1460,7 @@ function Dt(e) {
1473
1460
  }
1474
1461
  );
1475
1462
  }
1476
- const jt = {
1463
+ const Dt = {
1477
1464
  name: "Video",
1478
1465
  canHaveChildren: !0,
1479
1466
  defaultStyles: {
@@ -1554,18 +1541,21 @@ const jt = {
1554
1541
  defaultValue: !0,
1555
1542
  advanced: !0
1556
1543
  }]
1557
- }, Z = () => [{
1558
- component: $e,
1544
+ }, Q = () => [{
1545
+ component: We,
1546
+ ...Rt
1547
+ }, {
1548
+ component: ht,
1559
1549
  ...At
1560
1550
  }, {
1561
- component: pt,
1551
+ component: $e,
1562
1552
  ...Pt
1563
1553
  }, {
1564
1554
  component: Oe,
1565
1555
  ...Vt
1566
1556
  }, {
1567
1557
  component: Fe,
1568
- ...Bt
1558
+ ...Wt
1569
1559
  }, {
1570
1560
  component: Ne,
1571
1561
  ...$t
@@ -1576,36 +1566,33 @@ const jt = {
1576
1566
  component: Le,
1577
1567
  ...Ft
1578
1568
  }, {
1579
- component: Ue,
1580
- ...Nt
1569
+ component: Nn,
1570
+ ...Lt
1581
1571
  }, {
1582
- component: Fn,
1572
+ component: Mt,
1583
1573
  ...Ut
1584
1574
  }, {
1585
- component: Dt,
1586
- ...Mt
1587
- }, {
1588
- component: Me,
1589
- ...jt
1575
+ component: Ue,
1576
+ ...Dt
1590
1577
  }, {
1591
- component: Lt,
1592
- ..._t
1593
- }], ee = [], Hn = (e) => ({
1578
+ component: _t,
1579
+ ...Nt
1580
+ }], X = [], qn = (e) => ({
1594
1581
  type: "builder.registerComponent",
1595
- data: M(e)
1596
- }), Kt = (e) => {
1582
+ data: U(e)
1583
+ }), jt = (e) => {
1597
1584
  const t = e.toString().trim();
1598
1585
  return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
1599
- }, Ht = (e) => typeof e == "function" ? Kt(e) : $(e), M = ({
1586
+ }, Ht = (e) => typeof e == "function" ? jt(e) : $(e), U = ({
1600
1587
  inputs: e,
1601
1588
  ...t
1602
1589
  }) => ({
1603
1590
  ...$(t),
1604
- inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
1591
+ inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, a]) => ({
1605
1592
  ...o,
1606
- [i]: Ht(r)
1593
+ [i]: Ht(a)
1607
1594
  }), {}))
1608
- }), zt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1595
+ }), Kt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1609
1596
  function getAndSetVariantId() {
1610
1597
  function setCookie(name, value, days) {
1611
1598
  let expires = '';
@@ -1661,7 +1648,7 @@ const jt = {
1661
1648
  }).join('');
1662
1649
  styleEl.innerHTML = newStyleStr;
1663
1650
  }
1664
- }`, qt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1651
+ }`, zt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1665
1652
  if (!navigator.cookieEnabled) {
1666
1653
  return;
1667
1654
  }
@@ -1695,26 +1682,26 @@ const jt = {
1695
1682
  thisScriptEl?.remove();
1696
1683
  }
1697
1684
  return;
1698
- }`, ve = "builderIoAbTest", xe = "builderIoRenderContent", V = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1685
+ }`, be = "builderIoAbTest", ye = "builderIoRenderContent", V = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1699
1686
  ...t,
1700
1687
  testVariationId: t.id,
1701
1688
  id: e == null ? void 0 : e.id
1702
- })), Gt = ({
1689
+ })), qt = ({
1703
1690
  canTrack: e,
1704
1691
  content: t
1705
- }) => !(!(V(t).length > 0) || !e || x()), Yt = (e) => e === "react" || e === "reactNative", Se = Yt(T), Jt = () => `
1706
- window.${ve} = ${zt}
1707
- window.${xe} = ${qt}
1708
- `, Qt = (e, t) => `
1709
- window.${ve}(
1692
+ }) => !(!(V(t).length > 0) || !e || v()), Gt = (e) => e === "react" || e === "reactNative", Se = Gt(I), Yt = () => `
1693
+ window.${be} = ${Kt}
1694
+ window.${ye} = ${zt}
1695
+ `, Jt = (e, t) => `
1696
+ window.${be}(
1710
1697
  "${t}",${JSON.stringify(e)}, ${Se}
1711
- )`, Xt = ({
1698
+ )`, Qt = ({
1712
1699
  contentId: e,
1713
1700
  variationId: t
1714
- }) => `window.${xe}(
1701
+ }) => `window.${ye}(
1715
1702
  "${t}", "${e}", ${Se}
1716
1703
  )`;
1717
- function D(e) {
1704
+ function M(e) {
1718
1705
  return /* @__PURE__ */ l(
1719
1706
  "script",
1720
1707
  {
@@ -1723,66 +1710,66 @@ function D(e) {
1723
1710
  }
1724
1711
  );
1725
1712
  }
1726
- const Zt = (e) => {
1713
+ const Xt = (e) => {
1727
1714
  const t = e.get("preview"), n = e.get("overrides." + t);
1728
1715
  return n || k.warn("No previewed ID found in search params."), n;
1729
1716
  };
1730
- function en() {
1731
- globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Pe({
1717
+ function Zt() {
1718
+ globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Re({
1732
1719
  max: 500,
1733
1720
  // how long to live in ms
1734
1721
  ttl: 1e3 * 60 * 5
1735
1722
  }));
1736
1723
  }
1737
- function tn(e) {
1738
- en();
1739
- const t = Zt(e);
1724
+ function en(e) {
1725
+ Zt();
1726
+ const t = Xt(e);
1740
1727
  return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
1741
1728
  }
1742
- function nn() {
1729
+ function tn() {
1743
1730
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
1744
1731
  }
1745
- function on() {
1746
- const e = nn().fetch;
1732
+ function nn() {
1733
+ const e = tn().fetch;
1747
1734
  if (typeof e > "u")
1748
1735
  throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
1749
1736
  For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
1750
1737
  return e;
1751
1738
  }
1752
- const rn = on();
1739
+ const on = nn();
1753
1740
  function B(e, t = null, n = ".") {
1754
1741
  return Object.keys(e).reduce((o, i) => {
1755
- const r = e[i], a = [t, i].filter(Boolean).join(n);
1756
- return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
1742
+ const a = e[i], r = [t, i].filter(Boolean).join(n);
1743
+ return [typeof a == "object", a !== null, !(Array.isArray(a) && a.length === 0)].every(Boolean) ? {
1757
1744
  ...o,
1758
- ...B(r, a, n)
1745
+ ...B(a, r, n)
1759
1746
  } : {
1760
1747
  ...o,
1761
- [a]: r
1748
+ [r]: a
1762
1749
  };
1763
1750
  }, {});
1764
1751
  }
1765
- const an = "v3", te = "builder.", sn = "options.", cn = (e) => {
1752
+ const an = "v3", Z = "builder.", rn = "options.", sn = (e) => {
1766
1753
  const t = {};
1767
1754
  return e.forEach((n, o) => {
1768
1755
  t[o] = n;
1769
1756
  }), t;
1770
- }, ke = (e) => {
1757
+ }, ve = (e) => {
1771
1758
  if (!e)
1772
1759
  return {};
1773
- const t = Ce(e), n = {};
1760
+ const t = xe(e), n = {};
1774
1761
  return Object.keys(t).forEach((o) => {
1775
- if (o.startsWith(te)) {
1776
- const i = o.replace(te, "").replace(sn, "");
1762
+ if (o.startsWith(Z)) {
1763
+ const i = o.replace(Z, "").replace(rn, "");
1777
1764
  n[i] = t[o];
1778
1765
  }
1779
1766
  }), n;
1780
- }, ln = () => {
1781
- if (!x())
1767
+ }, cn = () => {
1768
+ if (!v())
1782
1769
  return {};
1783
1770
  const e = new URLSearchParams(window.location.search);
1784
- return ke(e);
1785
- }, Ce = (e) => e instanceof URLSearchParams ? cn(e) : e, ne = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
1771
+ return ve(e);
1772
+ }, xe = (e) => e instanceof URLSearchParams ? sn(e) : e, ee = (e) => typeof e == "number" && !isNaN(e) && e >= 0, K = (e) => {
1786
1773
  let {
1787
1774
  noTraverse: t = !1
1788
1775
  } = e;
@@ -1790,87 +1777,87 @@ const an = "v3", te = "builder.", sn = "options.", cn = (e) => {
1790
1777
  limit: n = 30,
1791
1778
  userAttributes: o,
1792
1779
  query: i,
1793
- model: r,
1794
- apiKey: a,
1780
+ model: a,
1781
+ apiKey: r,
1795
1782
  includeRefs: s = !0,
1796
1783
  enrich: c,
1797
1784
  locale: u,
1798
- apiVersion: m = an,
1799
- fields: g,
1800
- omit: f,
1785
+ apiVersion: g = an,
1786
+ fields: p,
1787
+ omit: m,
1801
1788
  offset: h,
1802
- cacheSeconds: p,
1789
+ cacheSeconds: f,
1803
1790
  staleCacheSeconds: d,
1804
1791
  sort: b,
1805
- includeUnpublished: S
1792
+ includeUnpublished: x
1806
1793
  } = e;
1807
- if (!a)
1794
+ if (!r)
1808
1795
  throw new Error("Missing API key");
1809
- if (!["v2", "v3"].includes(m))
1810
- throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${m}'`);
1796
+ if (!["v2", "v3"].includes(g))
1797
+ throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${g}'`);
1811
1798
  (e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
1812
- const v = new URL(`https://cdn.builder.io/api/${m}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${u ? `&locale=${u}` : ""}${c ? `&enrich=${c}` : ""}`);
1813
- if (v.searchParams.set("omit", f || "meta.componentsUsed"), g && v.searchParams.set("fields", g), Number.isFinite(h) && h > -1 && v.searchParams.set("offset", String(Math.floor(h))), typeof S == "boolean" && v.searchParams.set("includeUnpublished", String(S)), p && ne(p) && v.searchParams.set("cacheSeconds", String(p)), d && ne(d) && v.searchParams.set("staleCacheSeconds", String(d)), b) {
1799
+ const y = new URL(`https://cdn.builder.io/api/${g}/content/${a}?apiKey=${r}&limit=${n}&noTraverse=${t}&includeRefs=${s}${u ? `&locale=${u}` : ""}${c ? `&enrich=${c}` : ""}`);
1800
+ if (y.searchParams.set("omit", m || "meta.componentsUsed"), p && y.searchParams.set("fields", p), Number.isFinite(h) && h > -1 && y.searchParams.set("offset", String(Math.floor(h))), typeof x == "boolean" && y.searchParams.set("includeUnpublished", String(x)), f && ee(f) && y.searchParams.set("cacheSeconds", String(f)), d && ee(d) && y.searchParams.set("staleCacheSeconds", String(d)), b) {
1814
1801
  const C = B({
1815
1802
  sort: b
1816
1803
  });
1817
1804
  for (const R in C)
1818
- v.searchParams.set(R, JSON.stringify(C[R]));
1805
+ y.searchParams.set(R, JSON.stringify(C[R]));
1819
1806
  }
1820
1807
  const A = {
1821
- ...ln(),
1822
- ...Ce(e.options || {})
1808
+ ...cn(),
1809
+ ...xe(e.options || {})
1823
1810
  }, E = B(A);
1824
1811
  for (const C in E)
1825
- v.searchParams.set(C, String(E[C]));
1826
- if (o && v.searchParams.set("userAttributes", JSON.stringify(o)), i) {
1812
+ y.searchParams.set(C, String(E[C]));
1813
+ if (o && y.searchParams.set("userAttributes", JSON.stringify(o)), i) {
1827
1814
  const C = B({
1828
1815
  query: i
1829
1816
  });
1830
1817
  for (const R in C)
1831
- v.searchParams.set(R, JSON.stringify(C[R]));
1818
+ y.searchParams.set(R, JSON.stringify(C[R]));
1832
1819
  }
1833
- return v;
1834
- }, dn = (e) => "results" in e;
1835
- async function q(e) {
1836
- const t = await we({
1820
+ return y;
1821
+ }, ln = (e) => "results" in e;
1822
+ async function z(e) {
1823
+ const t = await ke({
1837
1824
  ...e,
1838
1825
  limit: 1
1839
1826
  });
1840
1827
  return t && t[0] || null;
1841
1828
  }
1842
- const zn = q, un = async (e) => {
1843
- const t = z(e);
1844
- return await (await rn(t.href)).json();
1845
- }, mn = async (e, t, n = z(e)) => {
1846
- const o = U(e.canTrack);
1829
+ const Gn = z, dn = async (e) => {
1830
+ const t = K(e);
1831
+ return await (await on(t.href)).json();
1832
+ }, un = async (e, t, n = K(e)) => {
1833
+ const o = L(e.canTrack);
1847
1834
  if (n.search.includes("preview=")) {
1848
- const r = [];
1849
- for (const a of t.results) {
1850
- const s = tn(n.searchParams);
1851
- r.push(s || a);
1835
+ const a = [];
1836
+ for (const r of t.results) {
1837
+ const s = en(n.searchParams);
1838
+ a.push(s || r);
1852
1839
  }
1853
- t.results = r;
1840
+ t.results = a;
1854
1841
  }
1855
- if (!o || !(x() || T === "reactNative"))
1842
+ if (!o || !(v() || I === "reactNative"))
1856
1843
  return t.results;
1857
1844
  try {
1858
- const r = [];
1859
- for (const a of t.results)
1860
- r.push(await Rt({
1861
- item: a,
1845
+ const a = [];
1846
+ for (const r of t.results)
1847
+ a.push(await Et({
1848
+ item: r,
1862
1849
  canTrack: o
1863
1850
  }));
1864
- t.results = r;
1865
- } catch (r) {
1866
- k.error("Could not process A/B tests. ", r);
1851
+ t.results = a;
1852
+ } catch (a) {
1853
+ k.error("Could not process A/B tests. ", a);
1867
1854
  }
1868
1855
  return t.results;
1869
1856
  };
1870
- async function we(e) {
1857
+ async function ke(e) {
1871
1858
  try {
1872
- const t = z(e), n = await un(e);
1873
- return dn(n) ? mn(e, n) : (k.error("Error fetching data. ", {
1859
+ const t = K(e), n = await dn(e);
1860
+ return ln(n) ? un(e, n) : (k.error("Error fetching data. ", {
1874
1861
  url: t,
1875
1862
  content: n,
1876
1863
  options: e
@@ -1879,92 +1866,96 @@ async function we(e) {
1879
1866
  return k.error("Error fetching data. ", t), null;
1880
1867
  }
1881
1868
  }
1882
- const qn = we;
1883
- function Gn() {
1884
- return !x() || j() ? !1 : location.search.indexOf("builder.preview=") !== -1;
1869
+ const Yn = ke, mn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
1870
+ function fn(e, t) {
1871
+ const n = new URL(t.origin), o = n.hostname;
1872
+ return (e || mn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
1885
1873
  }
1886
- function fn() {
1874
+ function Jn() {
1875
+ return !v() || D() ? !1 : location.search.indexOf("builder.preview=") !== -1;
1876
+ }
1877
+ function hn() {
1887
1878
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1888
1879
  const t = Math.random() * 16 | 0;
1889
1880
  return (e == "x" ? t : t & 3 | 8).toString(16);
1890
1881
  });
1891
1882
  }
1892
- function Ie() {
1893
- return fn().replace(/-/g, "");
1883
+ function Ce() {
1884
+ return hn().replace(/-/g, "");
1894
1885
  }
1895
- const Te = "builderSessionId", hn = async ({
1886
+ const we = "builderSessionId", pn = async ({
1896
1887
  canTrack: e
1897
1888
  }) => {
1898
1889
  if (!e)
1899
1890
  return;
1900
- const t = await he({
1901
- name: Te,
1891
+ const t = await me({
1892
+ name: we,
1902
1893
  canTrack: e
1903
1894
  });
1904
1895
  if (w(t))
1905
1896
  return t;
1906
1897
  {
1907
- const n = pn();
1908
- return gn({
1898
+ const n = gn();
1899
+ return bn({
1909
1900
  id: n,
1910
1901
  canTrack: e
1911
1902
  }), n;
1912
1903
  }
1913
- }, pn = () => Ie(), gn = ({
1904
+ }, gn = () => Ce(), bn = ({
1914
1905
  id: e,
1915
1906
  canTrack: t
1916
- }) => pe({
1917
- name: Te,
1907
+ }) => fe({
1908
+ name: we,
1918
1909
  value: e,
1919
1910
  canTrack: t
1920
- }), Ee = () => x() && typeof localStorage < "u" ? localStorage : void 0, bn = ({
1911
+ }), Ie = () => v() && typeof localStorage < "u" ? localStorage : void 0, yn = ({
1921
1912
  key: e,
1922
1913
  canTrack: t
1923
1914
  }) => {
1924
1915
  var n;
1925
1916
  try {
1926
- return t ? (n = Ee()) == null ? void 0 : n.getItem(e) : void 0;
1917
+ return t ? (n = Ie()) == null ? void 0 : n.getItem(e) : void 0;
1927
1918
  } catch (o) {
1928
1919
  console.debug("[LocalStorage] GET error: ", o);
1929
1920
  return;
1930
1921
  }
1931
- }, yn = ({
1922
+ }, Sn = ({
1932
1923
  key: e,
1933
1924
  canTrack: t,
1934
1925
  value: n
1935
1926
  }) => {
1936
1927
  var o;
1937
1928
  try {
1938
- t && ((o = Ee()) == null || o.setItem(e, n));
1929
+ t && ((o = Ie()) == null || o.setItem(e, n));
1939
1930
  } catch (i) {
1940
1931
  console.debug("[LocalStorage] SET error: ", i);
1941
1932
  }
1942
- }, Re = "builderVisitorId", vn = ({
1933
+ }, Te = "builderVisitorId", vn = ({
1943
1934
  canTrack: e
1944
1935
  }) => {
1945
1936
  if (!e)
1946
1937
  return;
1947
- const t = bn({
1948
- key: Re,
1938
+ const t = yn({
1939
+ key: Te,
1949
1940
  canTrack: e
1950
1941
  });
1951
1942
  if (w(t))
1952
1943
  return t;
1953
1944
  {
1954
1945
  const n = xn();
1955
- return Sn({
1946
+ return kn({
1956
1947
  id: n,
1957
1948
  canTrack: e
1958
1949
  }), n;
1959
1950
  }
1960
- }, xn = () => Ie(), Sn = ({
1951
+ }, xn = () => Ce(), kn = ({
1961
1952
  id: e,
1962
1953
  canTrack: t
1963
- }) => yn({
1964
- key: Re,
1954
+ }) => Sn({
1955
+ key: Te,
1965
1956
  value: e,
1966
1957
  canTrack: t
1967
- }), kn = async ({
1958
+ }), Cn = async ({
1968
1959
  canTrack: e
1969
1960
  }) => {
1970
1961
  if (!e)
@@ -1972,7 +1963,7 @@ const Te = "builderSessionId", hn = async ({
1972
1963
  visitorId: void 0,
1973
1964
  sessionId: void 0
1974
1965
  };
1975
- const t = await hn({
1966
+ const t = await pn({
1976
1967
  canTrack: e
1977
1968
  }), n = vn({
1978
1969
  canTrack: e
@@ -1981,7 +1972,7 @@ const Te = "builderSessionId", hn = async ({
1981
1972
  sessionId: t,
1982
1973
  visitorId: n
1983
1974
  };
1984
- }, Cn = async ({
1975
+ }, wn = async ({
1985
1976
  type: e,
1986
1977
  canTrack: t,
1987
1978
  apiKey: n,
@@ -1995,23 +1986,23 @@ const Te = "builderSessionId", hn = async ({
1995
1986
  url: location.href,
1996
1987
  ...o
1997
1988
  },
1998
- ...await kn({
1989
+ ...await Cn({
1999
1990
  canTrack: t
2000
1991
  }),
2001
- userAttributes: le(),
1992
+ userAttributes: se(),
2002
1993
  ownerId: n
2003
1994
  }
2004
1995
  });
2005
- async function wn(e) {
1996
+ async function In(e) {
2006
1997
  if (!e.apiKey) {
2007
1998
  k.error("Missing API key for track call. Please provide your API key.");
2008
1999
  return;
2009
2000
  }
2010
- if (e.canTrack && !j() && (x() || T === "reactNative"))
2001
+ if (e.canTrack && !D() && (v() || I === "reactNative"))
2011
2002
  return fetch("https://cdn.builder.io/api/v1/track", {
2012
2003
  method: "POST",
2013
2004
  body: JSON.stringify({
2014
- events: [await Cn(e)]
2005
+ events: [await wn(e)]
2015
2006
  }),
2016
2007
  headers: {
2017
2008
  "content-type": "application/json"
@@ -2021,14 +2012,14 @@ async function wn(e) {
2021
2012
  console.error("Failed to track: ", t);
2022
2013
  });
2023
2014
  }
2024
- const Yn = (e) => wn({
2015
+ const Qn = (e) => In({
2025
2016
  ...e,
2026
2017
  canTrack: !0
2027
2018
  });
2028
- function oe(e) {
2019
+ function te(e) {
2029
2020
  return Math.round(e * 1e3) / 1e3;
2030
2021
  }
2031
- const In = (e, t, n = !0) => {
2022
+ const Tn = (e, t, n = !0) => {
2032
2023
  if (!(e instanceof HTMLElement))
2033
2024
  return null;
2034
2025
  let o = n ? e : e.parentElement;
@@ -2039,38 +2030,38 @@ const In = (e, t, n = !0) => {
2039
2030
  return o;
2040
2031
  } while (o = o.parentElement);
2041
2032
  return null;
2042
- }, Tn = (e) => In(e, (t) => {
2033
+ }, En = (e) => Tn(e, (t) => {
2043
2034
  const n = t.getAttribute("builder-id") || t.id;
2044
2035
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
2045
- }), ie = ({
2036
+ }), ne = ({
2046
2037
  event: e,
2047
2038
  target: t
2048
2039
  }) => {
2049
- const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = oe(o / n.width), a = oe(i / n.height);
2040
+ const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, a = te(o / n.width), r = te(i / n.height);
2050
2041
  return {
2051
- x: r,
2052
- y: a
2042
+ x: a,
2043
+ y: r
2053
2044
  };
2054
- }, Jn = (e) => {
2055
- const t = e.target, n = t && Tn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2045
+ }, Xn = (e) => {
2046
+ const t = e.target, n = t && En(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2056
2047
  return {
2057
2048
  targetBuilderElement: o || void 0,
2058
2049
  metadata: {
2059
- targetOffset: t ? ie({
2050
+ targetOffset: t ? ne({
2060
2051
  event: e,
2061
2052
  target: t
2062
2053
  }) : void 0,
2063
- builderTargetOffset: n ? ie({
2054
+ builderTargetOffset: n ? ne({
2064
2055
  event: e,
2065
2056
  target: n
2066
2057
  }) : void 0,
2067
2058
  builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
2068
2059
  }
2069
2060
  };
2070
- }, En = "0.12.1", re = {};
2071
- function Rn(e, t) {
2072
- let n = re[e];
2073
- if (n || (n = re[e] = []), n.push(t), x()) {
2061
+ }, Rn = "0.12.3", oe = {};
2062
+ function An(e, t) {
2063
+ let n = oe[e];
2064
+ if (n || (n = oe[e] = []), n.push(t), v()) {
2074
2065
  const o = {
2075
2066
  type: "builder.register",
2076
2067
  data: {
@@ -2085,8 +2076,8 @@ function Rn(e, t) {
2085
2076
  }
2086
2077
  }
2087
2078
  }
2088
- const Qn = () => {
2089
- Rn("insertMenu", {
2079
+ const Zn = () => {
2080
+ An("insertMenu", {
2090
2081
  name: "_default",
2091
2082
  default: !0,
2092
2083
  items: [{
@@ -2108,14 +2099,14 @@ const Qn = () => {
2108
2099
  }]
2109
2100
  });
2110
2101
  };
2111
- let ae = !1;
2112
- const Xn = (e = {}) => {
2102
+ let ie = !1;
2103
+ const eo = (e = {}) => {
2113
2104
  var t, n;
2114
- ae || (ae = !0, x() && ((t = window.parent) == null || t.postMessage({
2105
+ ie || (ie = !0, v() && ((t = window.parent) == null || t.postMessage({
2115
2106
  type: "builder.sdkInfo",
2116
2107
  data: {
2117
- target: T,
2118
- version: En,
2108
+ target: I,
2109
+ version: Rn,
2119
2110
  supportsPatchUpdates: !1,
2120
2111
  // Supports builder-model="..." attribute which is needed to
2121
2112
  // scope our '+ add block' button styling
@@ -2127,49 +2118,52 @@ const Xn = (e = {}) => {
2127
2118
  data: {
2128
2119
  options: e
2129
2120
  }
2130
- }, "*"), window.addEventListener("message", ({
2131
- data: o
2132
- }) => {
2133
- var i, r;
2134
- if (o != null && o.type)
2135
- switch (o.type) {
2121
+ }, "*"), window.addEventListener("message", (o) => {
2122
+ var a, r;
2123
+ if (!fn(e.trustedHosts, o))
2124
+ return;
2125
+ const {
2126
+ data: i
2127
+ } = o;
2128
+ if (i != null && i.type)
2129
+ switch (i.type) {
2136
2130
  case "builder.evaluate": {
2137
- const a = o.data.text, s = o.data.arguments || [], c = o.data.id, u = new Function(a);
2138
- let m, g = null;
2131
+ const s = i.data.text, c = i.data.arguments || [], u = i.data.id, g = new Function(s);
2132
+ let p, m = null;
2139
2133
  try {
2140
- m = u.apply(null, s);
2141
- } catch (f) {
2142
- g = f;
2134
+ p = g.apply(null, c);
2135
+ } catch (h) {
2136
+ m = h;
2143
2137
  }
2144
- g ? (i = window.parent) == null || i.postMessage({
2138
+ m ? (a = window.parent) == null || a.postMessage({
2145
2139
  type: "builder.evaluateError",
2146
2140
  data: {
2147
- id: c,
2148
- error: g.message
2141
+ id: u,
2142
+ error: m.message
2149
2143
  }
2150
- }, "*") : m && typeof m.then == "function" ? m.then((f) => {
2151
- var h;
2152
- (h = window.parent) == null || h.postMessage({
2144
+ }, "*") : p && typeof p.then == "function" ? p.then((h) => {
2145
+ var f;
2146
+ (f = window.parent) == null || f.postMessage({
2153
2147
  type: "builder.evaluateResult",
2154
2148
  data: {
2155
- id: c,
2156
- result: f
2149
+ id: u,
2150
+ result: h
2157
2151
  }
2158
2152
  }, "*");
2159
2153
  }).catch(console.error) : (r = window.parent) == null || r.postMessage({
2160
2154
  type: "builder.evaluateResult",
2161
2155
  data: {
2162
- result: m,
2163
- id: c
2156
+ result: p,
2157
+ id: u
2164
2158
  }
2165
2159
  }, "*");
2166
2160
  break;
2167
2161
  }
2168
2162
  }
2169
2163
  })));
2170
- }, An = (e) => {
2171
- var r;
2172
- 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);
2164
+ }, Pn = (e) => {
2165
+ var a;
2166
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((a = e == null ? void 0 : e.files) == null ? void 0 : a.regular);
2173
2167
  let i = "";
2174
2168
  if (o && t && n && (i += `
2175
2169
  @font-face {
@@ -2179,39 +2173,43 @@ font-display: fallback;
2179
2173
  font-weight: 400;
2180
2174
  }
2181
2175
  `.trim()), e.files)
2182
- for (const a in e.files) {
2183
- if (!(String(Number(a)) === a))
2176
+ for (const r in e.files) {
2177
+ if (!(String(Number(r)) === r))
2184
2178
  continue;
2185
- const c = e.files[a];
2179
+ const c = e.files[r];
2186
2180
  c && c !== o && (i += `
2187
2181
  @font-face {
2188
2182
  font-family: "${t}";
2189
2183
  src: url('${c}') format('woff2');
2190
2184
  font-display: fallback;
2191
- font-weight: ${a};
2185
+ font-weight: ${r};
2192
2186
  }
2193
2187
  `.trim());
2194
2188
  }
2195
2189
  return i;
2196
- }, Pn = ({
2190
+ }, Vn = ({
2197
2191
  customFonts: e
2198
2192
  }) => {
2199
2193
  var t;
2200
- return ((t = e == null ? void 0 : e.map((n) => An(n))) == null ? void 0 : t.join(" ")) || "";
2201
- }, Vn = ({
2194
+ return ((t = e == null ? void 0 : e.map((n) => Pn(n))) == null ? void 0 : t.join(" ")) || "";
2195
+ }, Bn = ({
2202
2196
  cssCode: e,
2203
2197
  contentId: t
2204
2198
  }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
2205
- function Bn(e) {
2199
+ function Wn(e) {
2206
2200
  const t = `
2207
- ${Vn({
2201
+ ${Bn({
2208
2202
  cssCode: e.cssCode,
2209
2203
  contentId: e.contentId
2210
2204
  })}
2211
- ${Pn({
2205
+ ${Vn({
2212
2206
  customFonts: e.customFonts
2213
2207
  })}
2214
2208
 
2209
+ .builder-button {
2210
+ all: unset;
2211
+ }
2212
+
2215
2213
  .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
2216
2214
  margin: 0;
2217
2215
  }
@@ -2227,14 +2225,14 @@ ${Pn({
2227
2225
  `.trim();
2228
2226
  return /* @__PURE__ */ l(O, { styles: t });
2229
2227
  }
2230
- const Wn = ({
2228
+ const $n = ({
2231
2229
  content: e,
2232
2230
  data: t,
2233
2231
  locale: n
2234
2232
  }) => {
2235
- var r, a, s;
2236
- const o = {}, i = ((r = e == null ? void 0 : e.data) == null ? void 0 : r.state) || {};
2237
- return (s = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || s.forEach((c) => {
2233
+ var a, r, s;
2234
+ const o = {}, i = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
2235
+ return (s = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || s.forEach((c) => {
2238
2236
  c.name && c.defaultValue !== void 0 && (o[c.name] = c.defaultValue);
2239
2237
  }), {
2240
2238
  ...o,
@@ -2244,7 +2242,7 @@ const Wn = ({
2244
2242
  locale: n
2245
2243
  } : {}
2246
2244
  };
2247
- }, $n = ({
2245
+ }, On = ({
2248
2246
  content: e,
2249
2247
  data: t
2250
2248
  }) => e ? {
@@ -2255,38 +2253,38 @@ const Wn = ({
2255
2253
  },
2256
2254
  meta: e == null ? void 0 : e.meta
2257
2255
  } : void 0;
2258
- function se(e) {
2259
- var i, r, a, s, c, u, m, g, f;
2260
- const t = Xt({
2256
+ function ae(e) {
2257
+ var i, a, r, s, c, u, g, p, m;
2258
+ const t = Qt({
2261
2259
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2262
2260
  variationId: (i = e.content) == null ? void 0 : i.testVariationId,
2263
2261
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2264
- contentId: (r = e.content) == null ? void 0 : r.id
2262
+ contentId: (a = e.content) == null ? void 0 : a.id
2265
2263
  }), n = [
2266
- ...Z(),
2264
+ ...Q(),
2267
2265
  // While this `components` object is deprecated, we must maintain support for it.
2268
2266
  // Since users are able to override our default components, we need to make sure that we do not break such
2269
2267
  // existing usage.
2270
2268
  // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2271
2269
  // which is the new standard way of providing custom components, and must therefore take precedence.
2272
- ...ee,
2270
+ ...X,
2273
2271
  ...e.customComponents || []
2274
2272
  ].reduce(
2275
- (h, { component: p, ...d }) => ({
2273
+ (h, { component: f, ...d }) => ({
2276
2274
  ...h,
2277
2275
  [d.name]: {
2278
- component: p,
2279
- ...M(d)
2276
+ component: f,
2277
+ ...U(d)
2280
2278
  }
2281
2279
  }),
2282
2280
  {}
2283
2281
  ), o = {
2284
- content: $n({
2282
+ content: On({
2285
2283
  content: e.content,
2286
2284
  data: e.data
2287
2285
  }),
2288
2286
  localState: void 0,
2289
- rootState: Wn({
2287
+ rootState: $n({
2290
2288
  content: e.content,
2291
2289
  data: e.data,
2292
2290
  locale: e.locale
@@ -2296,18 +2294,18 @@ function se(e) {
2296
2294
  apiKey: e.apiKey,
2297
2295
  apiVersion: e.apiVersion,
2298
2296
  componentInfos: [
2299
- ...Z(),
2297
+ ...Q(),
2300
2298
  // While this `components` object is deprecated, we must maintain support for it.
2301
2299
  // Since users are able to override our default components, we need to make sure that we do not break such
2302
2300
  // existing usage.
2303
2301
  // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2304
2302
  // which is the new standard way of providing custom components, and must therefore take precedence.
2305
- ...ee,
2303
+ ...X,
2306
2304
  ...e.customComponents || []
2307
2305
  ].reduce(
2308
- (h, { component: p, ...d }) => ({
2306
+ (h, { component: f, ...d }) => ({
2309
2307
  ...h,
2310
- [d.name]: M(d)
2308
+ [d.name]: U(d)
2311
2309
  }),
2312
2310
  {}
2313
2311
  ),
@@ -2315,8 +2313,8 @@ function se(e) {
2315
2313
  BlocksWrapper: e.blocksWrapper || "div",
2316
2314
  BlocksWrapperProps: e.blocksWrapperProps || {}
2317
2315
  };
2318
- return /* @__PURE__ */ I(
2319
- De,
2316
+ return /* @__PURE__ */ T(
2317
+ Me,
2320
2318
  {
2321
2319
  content: e.content,
2322
2320
  data: e.data,
@@ -2331,20 +2329,21 @@ function se(e) {
2331
2329
  builderContextSignal: o,
2332
2330
  contentWrapper: e.contentWrapper,
2333
2331
  contentWrapperProps: e.contentWrapperProps,
2332
+ trustedHosts: e.trustedHosts,
2334
2333
  children: [
2335
- e.isSsrAbTest ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(D, { scriptStr: t }) }) : null,
2336
- /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
2337
- Bn,
2334
+ e.isSsrAbTest ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(M, { scriptStr: t }) }) : null,
2335
+ /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
2336
+ Wn,
2338
2337
  {
2339
- contentId: (a = o.content) == null ? void 0 : a.id,
2338
+ contentId: (r = o.content) == null ? void 0 : r.id,
2340
2339
  cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
2341
- customFonts: (m = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : m.customFonts
2340
+ customFonts: (g = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : g.customFonts
2342
2341
  }
2343
2342
  ) }),
2344
2343
  /* @__PURE__ */ l(
2345
2344
  N,
2346
2345
  {
2347
- blocks: (f = (g = o.content) == null ? void 0 : g.data) == null ? void 0 : f.blocks,
2346
+ blocks: (m = (p = o.content) == null ? void 0 : p.data) == null ? void 0 : m.blocks,
2348
2347
  context: o,
2349
2348
  registeredComponents: n
2350
2349
  }
@@ -2353,14 +2352,14 @@ function se(e) {
2353
2352
  }
2354
2353
  );
2355
2354
  }
2356
- function Ae(e) {
2357
- var r, a;
2358
- const t = Gt({
2359
- canTrack: U(e.canTrack),
2355
+ function Ee(e) {
2356
+ var a, r;
2357
+ const t = qt({
2358
+ canTrack: L(e.canTrack),
2360
2359
  content: e.content
2361
2360
  }), n = function() {
2362
2361
  var c;
2363
- return Qt(
2362
+ return Jt(
2364
2363
  V(e.content).map((u) => ({
2365
2364
  id: u.testVariationId,
2366
2365
  testRatio: u.testRatio
@@ -2374,24 +2373,24 @@ function Ae(e) {
2374
2373
  return t ? {
2375
2374
  ...e.content,
2376
2375
  testVariationId: (c = e.content) == null ? void 0 : c.id
2377
- } : Et({
2376
+ } : Tt({
2378
2377
  item: e.content,
2379
- canTrack: U(e.canTrack)
2378
+ canTrack: L(e.canTrack)
2380
2379
  });
2381
2380
  };
2382
- return /* @__PURE__ */ I(y, { children: [
2383
- !e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(D, { scriptStr: Jt() }) }) : null,
2384
- t ? /* @__PURE__ */ I(y, { children: [
2381
+ return /* @__PURE__ */ T(S, { children: [
2382
+ !e.__isNestedRender && I !== "reactNative" ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(M, { scriptStr: Yt() }) }) : null,
2383
+ t ? /* @__PURE__ */ T(S, { children: [
2385
2384
  /* @__PURE__ */ l(
2386
2385
  O,
2387
2386
  {
2388
- id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
2387
+ id: `variants-styles-${(a = e.content) == null ? void 0 : a.id}`,
2389
2388
  styles: o()
2390
2389
  }
2391
2390
  ),
2392
- /* @__PURE__ */ l(D, { scriptStr: n() }),
2393
- (a = V(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
2394
- se,
2391
+ /* @__PURE__ */ l(M, { scriptStr: n() }),
2392
+ (r = V(e.content)) == null ? void 0 : r.map((s) => /* @__PURE__ */ l(
2393
+ ae,
2395
2394
  {
2396
2395
  content: s,
2397
2396
  showContent: !1,
@@ -2409,13 +2408,14 @@ function Ae(e) {
2409
2408
  blocksWrapper: e.blocksWrapper,
2410
2409
  blocksWrapperProps: e.blocksWrapperProps,
2411
2410
  contentWrapper: e.contentWrapper,
2412
- contentWrapperProps: e.contentWrapperProps
2411
+ contentWrapperProps: e.contentWrapperProps,
2412
+ trustedHosts: e.trustedHosts
2413
2413
  },
2414
2414
  s.testVariationId
2415
2415
  ))
2416
2416
  ] }) : null,
2417
2417
  /* @__PURE__ */ l(
2418
- se,
2418
+ ae,
2419
2419
  {
2420
2420
  content: i(),
2421
2421
  showContent: !0,
@@ -2433,18 +2433,19 @@ function Ae(e) {
2433
2433
  blocksWrapper: e.blocksWrapper,
2434
2434
  blocksWrapperProps: e.blocksWrapperProps,
2435
2435
  contentWrapper: e.contentWrapper,
2436
- contentWrapperProps: e.contentWrapperProps
2436
+ contentWrapperProps: e.contentWrapperProps,
2437
+ trustedHosts: e.trustedHosts
2437
2438
  }
2438
2439
  )
2439
2440
  ] });
2440
2441
  }
2441
- const On = async ({
2442
+ const Fn = async ({
2442
2443
  builderContextValue: e,
2443
2444
  symbol: t
2444
2445
  }) => {
2445
2446
  if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
2446
2447
  (e != null && e.apiKey))
2447
- return q({
2448
+ return z({
2448
2449
  model: t.model,
2449
2450
  apiKey: e.apiKey,
2450
2451
  apiVersion: e.apiVersion,
@@ -2457,22 +2458,22 @@ const On = async ({
2457
2458
  k.error("Could not fetch symbol content: ", n);
2458
2459
  });
2459
2460
  };
2460
- async function Fn(e) {
2461
- var o, i, r, a, s;
2461
+ async function Nn(e) {
2462
+ var o, i, a, r, s;
2462
2463
  const t = function() {
2463
- var u, m;
2464
+ var u, g;
2464
2465
  return [
2465
2466
  e.attributes.className,
2466
2467
  "builder-symbol",
2467
2468
  (u = e.symbol) != null && u.inline ? "builder-inline-symbol" : void 0,
2468
- (m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2469
+ (g = e.symbol) != null && g.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2469
2470
  ].filter(Boolean).join(" ");
2470
- }, n = ((o = e.symbol) == null ? void 0 : o.content) || await On({
2471
+ }, n = ((o = e.symbol) == null ? void 0 : o.content) || await Fn({
2471
2472
  symbol: e.symbol,
2472
2473
  builderContextValue: e.builderContext
2473
2474
  });
2474
2475
  return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
2475
- Ae,
2476
+ Ee,
2476
2477
  {
2477
2478
  __isNestedRender: !0,
2478
2479
  apiVersion: e.builderContext.apiVersion,
@@ -2483,28 +2484,28 @@ async function Fn(e) {
2483
2484
  },
2484
2485
  customComponents: Object.values(e.builderComponents),
2485
2486
  data: {
2486
- ...(r = e.symbol) == null ? void 0 : r.data,
2487
+ ...(a = e.symbol) == null ? void 0 : a.data,
2487
2488
  ...e.builderContext.localState,
2488
- ...(a = n == null ? void 0 : n.data) == null ? void 0 : a.state
2489
+ ...(r = n == null ? void 0 : n.data) == null ? void 0 : r.state
2489
2490
  },
2490
2491
  model: (s = e.symbol) == null ? void 0 : s.model,
2491
2492
  content: n
2492
2493
  }
2493
2494
  ) });
2494
2495
  }
2495
- const Zn = N, eo = Ae, ce = {};
2496
- function to(e) {
2497
- if (x()) {
2498
- Object.assign(ce, e);
2496
+ const to = N, no = Ee, re = {};
2497
+ function oo(e) {
2498
+ if (v()) {
2499
+ Object.assign(re, e);
2499
2500
  const t = {
2500
2501
  type: "builder.settingsChange",
2501
- data: ce
2502
+ data: re
2502
2503
  };
2503
2504
  parent.postMessage(t, "*");
2504
2505
  }
2505
2506
  }
2506
- const no = async (e) => {
2507
- var o, i, r;
2507
+ const io = async (e) => {
2508
+ var o, i, a;
2508
2509
  const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
2509
2510
  ...e,
2510
2511
  apiKey: e.apiKey,
@@ -2515,48 +2516,50 @@ const no = async (e) => {
2515
2516
  urlPath: t
2516
2517
  } : {}
2517
2518
  },
2518
- options: ke(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
2519
+ options: ve(e.searchParams || ((a = e.url) == null ? void 0 : a.searchParams) || e.options)
2519
2520
  };
2520
2521
  return {
2521
2522
  apiKey: n.apiKey,
2522
2523
  model: n.model,
2523
- content: await q(n)
2524
+ content: await z(n)
2524
2525
  };
2525
2526
  };
2526
2527
  export {
2527
- ke as A,
2528
+ Yn as A,
2528
2529
  N as B,
2529
- Ae as C,
2530
- Yn as D,
2531
- no as E,
2532
- Zn as R,
2533
- Fn as S,
2534
- Dt as T,
2535
- wn as _,
2536
- Dn as a,
2537
- jn as b,
2530
+ Ee as C,
2531
+ Gn as D,
2532
+ ve as E,
2533
+ Qn as F,
2534
+ io as G,
2535
+ to as R,
2536
+ Nn as S,
2537
+ Mt as T,
2538
+ In as _,
2539
+ jn as a,
2540
+ D as b,
2538
2541
  Kn as c,
2539
- x as d,
2540
- U as e,
2541
- Gn as f,
2542
- ut as g,
2543
- K as h,
2544
- j as i,
2545
- Jn as j,
2546
- $ as k,
2542
+ zn as d,
2543
+ v as e,
2544
+ L as f,
2545
+ lt as g,
2546
+ Jn as h,
2547
+ Hn as i,
2548
+ fn as j,
2549
+ j as k,
2547
2550
  k as l,
2548
- Hn as m,
2549
- q as n,
2550
- rn as o,
2551
- en as p,
2552
- eo as q,
2553
- Qn as r,
2554
- Xn as s,
2555
- pt as t,
2556
- Rn as u,
2557
- to as v,
2558
- mn as w,
2559
- we as x,
2560
- qn as y,
2561
- zn as z
2551
+ Xn as m,
2552
+ $ as n,
2553
+ qn as o,
2554
+ z as p,
2555
+ on as q,
2556
+ Zn as r,
2557
+ eo as s,
2558
+ Zt as t,
2559
+ no as u,
2560
+ ht as v,
2561
+ An as w,
2562
+ oo as x,
2563
+ un as y,
2564
+ ke as z
2562
2565
  };