@builder.io/sdk-react 0.7.2 → 0.7.4

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.
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { jsxs as P, Fragment as g, jsx as s } from "react/jsx-runtime";
3
- import { createContext as Se, useState as I, useContext as ae, createElement as ve, useRef as Z, useEffect as B } from "react";
4
- import { i as V, j as F, k as $e, l as _, m as ee, n as Y, T as M, r as Ae, o as U, p as re, a as Ve, c as Fe, b as pe, q as Ne, u as le, v as ce, w as We } from "./server-entry-0aebe4be.mjs";
5
- import { _ as ln, h as cn, f as sn, g as dn, e as un, d as mn, s as fn, t as hn } from "./server-entry-0aebe4be.mjs";
2
+ import { jsxs as T, Fragment as f, jsx as r } from "react/jsx-runtime";
3
+ import { createContext as pe, useState as S, useContext as le, createElement as ke, useRef as Z, useEffect as P } from "react";
4
+ import { i as $, j as N, k as $e, l as M, m as ee, n as G, T as L, r as Ne, o as U, p as ce, a as Fe, c as We, b as Ce, q as _e, u as se, v as de, w as Le } from "./server-entry-0aebe4be.mjs";
5
+ import { _ as sn, h as dn, f as un, g as mn, e as fn, d as hn, s as gn, t as bn } from "./server-entry-0aebe4be.mjs";
6
6
  function je(e) {
7
- return /* @__PURE__ */ P(g, { children: [
8
- e.link ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
7
+ return /* @__PURE__ */ T(f, { children: [
8
+ e.link ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
9
9
  "a",
10
10
  {
11
11
  ...e.attributes,
@@ -14,7 +14,7 @@ function je(e) {
14
14
  role: "button",
15
15
  children: e.text
16
16
  }
17
- ) }) : /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
17
+ ) }) : /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
18
18
  "button",
19
19
  {
20
20
  ...e.attributes,
@@ -23,12 +23,12 @@ function je(e) {
23
23
  children: e.text
24
24
  }
25
25
  ) }),
26
- /* @__PURE__ */ s("style", { children: `.button-5294b10c {
26
+ /* @__PURE__ */ r("style", { children: `.button-5294b10c {
27
27
  all: unset;
28
28
  }` })
29
29
  ] });
30
30
  }
31
- const te = Se({
31
+ const te = pe({
32
32
  content: null,
33
33
  context: {},
34
34
  localState: void 0,
@@ -39,7 +39,7 @@ const te = Se({
39
39
  apiVersion: void 0,
40
40
  componentInfos: {},
41
41
  inheritedStyles: {}
42
- }), ke = Se({ registeredComponents: {} });
42
+ }), we = pe({ registeredComponents: {} });
43
43
  function Me(e) {
44
44
  var t;
45
45
  return {
@@ -51,7 +51,7 @@ function Me(e) {
51
51
  builderBlock: e
52
52
  };
53
53
  }
54
- const Le = ({
54
+ const Ue = ({
55
55
  builder: e,
56
56
  context: t,
57
57
  event: n,
@@ -63,148 +63,148 @@ const Le = ({
63
63
  builder: e,
64
64
  context: t,
65
65
  event: n
66
- }), _e = () => ({
67
- isEditing: V(),
68
- isBrowser: F(),
69
- isServer: !F(),
66
+ }), De = () => ({
67
+ isEditing: $(),
68
+ isBrowser: N(),
69
+ isServer: !N(),
70
70
  getUserAttributes: () => $e()
71
- }), Ue = (e, {
71
+ }), Oe = (e, {
72
72
  isExpression: t = !0
73
- }) => /* 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, se = ({
73
+ }) => /* 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, ue = ({
74
74
  code: e,
75
75
  builder: t,
76
76
  context: n,
77
77
  event: i,
78
- localState: o,
79
- rootSetState: a,
80
- rootState: r
78
+ localState: a,
79
+ rootSetState: o,
80
+ rootState: l
81
81
  }) => {
82
- const l = Le({
82
+ const s = Ue({
83
83
  builder: t,
84
84
  context: n,
85
85
  event: i,
86
- state: Oe(r, o, a)
86
+ state: Ke(l, a, o)
87
87
  });
88
- return new Function(...l.map(([c]) => c), e)(...l.map(([, c]) => c));
88
+ return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
89
89
  };
90
- function Oe(e, t, n) {
90
+ function Ke(e, t, n) {
91
91
  if (e === t)
92
92
  throw new Error("rootState === localState");
93
93
  return new Proxy(e, {
94
- get: (i, o) => t && o in t ? t[o] : e[o],
95
- set: (i, o, a) => {
96
- if (t && o in t)
94
+ get: (i, a) => t && a in t ? t[a] : e[a],
95
+ set: (i, a, o) => {
96
+ if (t && a in t)
97
97
  throw new Error("Writing to local state is not allowed as it is read-only.");
98
- return e[o] = a, n == null || n(e), !0;
98
+ return e[a] = o, n == null || n(e), !0;
99
99
  }
100
100
  });
101
101
  }
102
- const Ke = (e) => (F(), se(e));
103
- function j({
102
+ const He = (e) => (N(), ue(e));
103
+ function _({
104
104
  code: e,
105
105
  context: t,
106
106
  localState: n,
107
107
  rootState: i,
108
- rootSetState: o,
109
- event: a,
110
- isExpression: r = !0
108
+ rootSetState: a,
109
+ event: o,
110
+ isExpression: l = !0
111
111
  }) {
112
112
  if (e === "") {
113
- _.warn("Skipping evaluation of empty code block.");
113
+ M.warn("Skipping evaluation of empty code block.");
114
114
  return;
115
115
  }
116
- const l = {
117
- code: Ue(e, {
118
- isExpression: r
116
+ const s = {
117
+ code: Oe(e, {
118
+ isExpression: l
119
119
  }),
120
- builder: _e(),
120
+ builder: De(),
121
121
  context: t,
122
- event: a,
123
- rootSetState: o,
122
+ event: o,
123
+ rootSetState: a,
124
124
  rootState: i,
125
125
  localState: n
126
126
  };
127
127
  try {
128
- return Ke(l);
128
+ return He(s);
129
129
  } catch (c) {
130
- _.error("Failed code evaluation: " + c.message, {
130
+ M.error("Failed code evaluation: " + c.message, {
131
131
  code: e
132
132
  });
133
133
  return;
134
134
  }
135
135
  }
136
- const He = (e, t, n) => {
136
+ const ze = (e, t, n) => {
137
137
  if (Object(e) !== e)
138
138
  return e;
139
139
  const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
140
- return i.slice(0, -1).reduce((o, a, r) => Object(o[a]) === o[a] ? o[a] : o[a] = Math.abs(Number(i[r + 1])) >> 0 === +i[r + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
140
+ return i.slice(0, -1).reduce((a, o, l) => Object(a[o]) === a[o] ? a[o] : a[o] = Math.abs(Number(i[l + 1])) >> 0 === +i[l + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
141
141
  };
142
- const ze = ({
142
+ const qe = ({
143
143
  block: e,
144
144
  context: t,
145
145
  localState: n,
146
146
  rootState: i,
147
- rootSetState: o
147
+ rootSetState: a
148
148
  }) => {
149
149
  if (!e.bindings)
150
150
  return e;
151
- const a = ee(e), r = {
152
- ...a,
151
+ const o = ee(e), l = {
152
+ ...o,
153
153
  properties: {
154
- ...a.properties
154
+ ...o.properties
155
155
  },
156
156
  actions: {
157
- ...a.actions
157
+ ...o.actions
158
158
  }
159
159
  };
160
- for (const l in e.bindings) {
161
- const c = e.bindings[l], d = j({
160
+ for (const s in e.bindings) {
161
+ const c = e.bindings[s], d = _({
162
162
  code: c,
163
163
  localState: n,
164
164
  rootState: i,
165
- rootSetState: o,
165
+ rootSetState: a,
166
166
  context: t
167
167
  });
168
- He(r, l, d);
168
+ ze(l, s, d);
169
169
  }
170
- return r;
170
+ return l;
171
171
  };
172
- function O({
172
+ function D({
173
173
  block: e,
174
174
  context: t,
175
175
  shouldEvaluateBindings: n,
176
176
  localState: i,
177
- rootState: o,
178
- rootSetState: a
177
+ rootState: a,
178
+ rootSetState: o
179
179
  }) {
180
- const r = e;
181
- return n ? ze({
182
- block: r,
180
+ const l = e;
181
+ return n ? qe({
182
+ block: l,
183
183
  localState: i,
184
- rootState: o,
185
- rootSetState: a,
184
+ rootState: a,
185
+ rootSetState: o,
186
186
  context: t
187
- }) : r;
187
+ }) : l;
188
188
  }
189
- const qe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], D = (e) => typeof e == "string" && qe.includes(e.toLowerCase()), De = ({
189
+ const Ye = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], q = (e) => typeof e == "string" && Ye.includes(e.toLowerCase()), Qe = ({
190
190
  block: e,
191
191
  context: t,
192
192
  registeredComponents: n
193
193
  }) => {
194
- var a;
195
- const i = (a = O({
194
+ var o;
195
+ const i = (o = D({
196
196
  block: e,
197
197
  localState: t.localState,
198
198
  rootState: t.rootState,
199
199
  rootSetState: t.rootSetState,
200
200
  context: t.context,
201
201
  shouldEvaluateBindings: !1
202
- }).component) == null ? void 0 : a.name;
202
+ }).component) == null ? void 0 : o.name;
203
203
  if (!i)
204
204
  return null;
205
- const o = n[i];
206
- if (o)
207
- return o;
205
+ const a = n[i];
206
+ if (a)
207
+ return a;
208
208
  console.warn(`
209
209
  Could not find a registered component named "${i}".
210
210
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
@@ -218,30 +218,30 @@ const qe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
218
218
  } = e;
219
219
  if (!(n != null && n.collection))
220
220
  return;
221
- const o = j({
221
+ const a = _({
222
222
  code: n.collection,
223
223
  localState: t.localState,
224
224
  rootState: t.rootState,
225
225
  rootSetState: t.rootSetState,
226
226
  context: t.context
227
227
  });
228
- if (!Array.isArray(o))
228
+ if (!Array.isArray(a))
229
229
  return;
230
- const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
231
- return o.map((c, d) => ({
230
+ const o = n.collection.split(".").pop(), l = n.itemName || (o ? o + "Item" : "item");
231
+ return a.map((c, d) => ({
232
232
  context: {
233
233
  ...t,
234
234
  localState: {
235
235
  ...t.localState,
236
236
  $index: d,
237
237
  $item: c,
238
- [r]: c,
239
- [`$${r}Index`]: d
238
+ [l]: c,
239
+ [`$${l}Index`]: d
240
240
  }
241
241
  },
242
242
  block: i
243
243
  }));
244
- }, Ce = {
244
+ }, Ie = {
245
245
  small: {
246
246
  min: 320,
247
247
  default: 321,
@@ -257,11 +257,11 @@ const qe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
257
257
  default: 991,
258
258
  max: 1200
259
259
  }
260
- }, de = (e, t = Ce) => `@media (max-width: ${t[e].max}px)`, we = ({
260
+ }, me = (e, t = Ie) => `@media (max-width: ${t[e].max}px)`, Te = ({
261
261
  small: e,
262
262
  medium: t
263
263
  }) => {
264
- const n = ee(Ce);
264
+ const n = ee(Ie);
265
265
  if (!e || !t)
266
266
  return n;
267
267
  const i = Math.floor(e / 2);
@@ -270,41 +270,41 @@ const qe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
270
270
  min: i,
271
271
  default: i + 1
272
272
  };
273
- const o = n.small.max + 1;
273
+ const a = n.small.max + 1;
274
274
  n.medium = {
275
275
  max: t,
276
- min: o,
277
- default: o + 1
276
+ min: a,
277
+ default: a + 1
278
278
  };
279
- const a = n.medium.max + 1;
279
+ const o = n.medium.max + 1;
280
280
  return n.large = {
281
281
  max: 2e3,
282
282
  // TODO: decide upper limit
283
- min: a,
284
- default: a + 1
283
+ min: o,
284
+ default: o + 1
285
285
  }, n;
286
- }, Je = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Ie = (e) => Object.entries(e).map(([n, i]) => {
286
+ }, Je = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Re = (e) => Object.entries(e).map(([n, i]) => {
287
287
  if (typeof i == "string")
288
288
  return `${Je(n)}: ${i};`;
289
- }).filter(Y), Ye = (e) => Ie(e).join(`
290
- `), G = ({
289
+ }).filter(G), Xe = (e) => Re(e).join(`
290
+ `), Y = ({
291
291
  mediaQuery: e,
292
292
  className: t,
293
293
  styles: n
294
294
  }) => {
295
295
  const i = `.${t} {
296
- ${Ye(n)}
296
+ ${Xe(n)}
297
297
  }`;
298
298
  return e ? `${e} {
299
299
  ${i}
300
300
  }` : i;
301
301
  };
302
- function H(e) {
303
- return /* @__PURE__ */ s("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
302
+ function K(e) {
303
+ return /* @__PURE__ */ r("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
304
304
  }
305
305
  function ne(e) {
306
306
  function t() {
307
- const i = O({
307
+ const i = D({
308
308
  block: e.block,
309
309
  localState: e.context.localState,
310
310
  rootState: e.context.rootState,
@@ -312,48 +312,48 @@ function ne(e) {
312
312
  context: e.context.context,
313
313
  shouldEvaluateBindings: !0
314
314
  });
315
- return Y(i.hide) ? !i.hide : Y(i.show) ? i.show : !0;
315
+ return G(i.hide) ? !i.hide : G(i.show) ? i.show : !0;
316
316
  }
317
317
  function n() {
318
- var b;
319
- const i = O({
318
+ var v;
319
+ const i = D({
320
320
  block: e.block,
321
321
  localState: e.context.localState,
322
322
  rootState: e.context.rootState,
323
323
  rootSetState: e.context.rootSetState,
324
324
  context: e.context.context,
325
325
  shouldEvaluateBindings: !0
326
- }), o = i.responsiveStyles, a = e.context.content, r = we(
327
- ((b = a == null ? void 0 : a.meta) == null ? void 0 : b.breakpoints) || {}
328
- ), l = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, d = o == null ? void 0 : o.small, u = i.id;
326
+ }), a = i.responsiveStyles, o = e.context.content, l = Te(
327
+ ((v = o == null ? void 0 : o.meta) == null ? void 0 : v.breakpoints) || {}
328
+ ), s = a == null ? void 0 : a.large, c = a == null ? void 0 : a.medium, d = a == null ? void 0 : a.small, u = i.id;
329
329
  if (!u)
330
330
  return "";
331
- const h = l ? G({
331
+ const g = s ? Y({
332
332
  className: u,
333
- styles: l
334
- }) : "", y = c ? G({
333
+ styles: s
334
+ }) : "", y = c ? Y({
335
335
  className: u,
336
336
  styles: c,
337
- mediaQuery: de(
337
+ mediaQuery: me(
338
338
  "medium",
339
- r
339
+ l
340
340
  )
341
- }) : "", k = d ? G({
341
+ }) : "", V = d ? Y({
342
342
  className: u,
343
343
  styles: d,
344
- mediaQuery: de(
344
+ mediaQuery: me(
345
345
  "small",
346
- r
346
+ l
347
347
  )
348
348
  }) : "";
349
- return [h, y, k].join(" ");
349
+ return [g, y, V].join(" ");
350
350
  }
351
- return /* @__PURE__ */ s(g, { children: n() && t() ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(H, { styles: n() }) }) : null });
351
+ return /* @__PURE__ */ r(f, { children: n() && t() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(K, { styles: n() }) }) : null });
352
352
  }
353
- function Qe(e) {
353
+ function Ze(e) {
354
354
  return e.charAt(0).toUpperCase() + e.slice(1);
355
355
  }
356
- const Xe = (e) => `on${Qe(e)}`, Ze = (e, t) => (n) => j({
356
+ const et = (e) => `on${Ze(e)}`, tt = (e, t) => (n) => _({
357
357
  code: e,
358
358
  context: t.context,
359
359
  localState: t.localState,
@@ -362,54 +362,54 @@ const Xe = (e) => `on${Qe(e)}`, Ze = (e, t) => (n) => j({
362
362
  event: n,
363
363
  isExpression: !1
364
364
  });
365
- function Q(e) {
365
+ function J(e) {
366
366
  const t = {}, n = e.block.actions ?? {};
367
367
  for (const i in n) {
368
368
  if (!n.hasOwnProperty(i))
369
369
  continue;
370
- const o = n[i];
371
- let a = Xe(i);
370
+ const a = n[i];
371
+ let o = et(i);
372
372
  if (e.stripPrefix)
373
- switch (M) {
373
+ switch (L) {
374
374
  case "vue2":
375
375
  case "vue3":
376
- a = a.replace("v-on:", "");
376
+ o = o.replace("v-on:", "");
377
377
  break;
378
378
  case "svelte":
379
- a = a.replace("on:", "");
379
+ o = o.replace("on:", "");
380
380
  break;
381
381
  }
382
- t[a] = Ze(o, e);
382
+ t[o] = tt(a, e);
383
383
  }
384
384
  return t;
385
385
  }
386
- function et(e) {
386
+ function nt(e) {
387
387
  return e.className = e.class, delete e.class, e;
388
388
  }
389
- const tt = (e) => ({
389
+ const it = (e) => ({
390
390
  href: e.href
391
391
  });
392
- function K({
392
+ function O({
393
393
  block: e,
394
394
  context: t
395
395
  }) {
396
396
  var i;
397
397
  const n = {
398
- ...tt(e),
398
+ ...it(e),
399
399
  ...e.properties,
400
400
  "builder-id": e.id,
401
- style: e.style ? nt(e.style) : void 0,
401
+ style: e.style ? at(e.style) : void 0,
402
402
  class: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
403
403
  };
404
- return et(n);
404
+ return nt(n);
405
405
  }
406
- function nt(e) {
407
- switch (M) {
406
+ function at(e) {
407
+ switch (L) {
408
408
  case "svelte":
409
409
  case "vue2":
410
410
  case "vue3":
411
411
  case "solid":
412
- return Ie(e).join(" ");
412
+ return Re(e).join(" ");
413
413
  case "qwik":
414
414
  case "reactNative":
415
415
  case "react":
@@ -417,17 +417,17 @@ function nt(e) {
417
417
  return e;
418
418
  }
419
419
  }
420
- function ue(e) {
421
- return /* @__PURE__ */ P(g, { children: [
420
+ function fe(e) {
421
+ return /* @__PURE__ */ T(f, { children: [
422
422
  " ",
423
- e.hasChildren ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ P(
423
+ e.hasChildren ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
424
424
  e.Wrapper,
425
425
  {
426
- ...K({
426
+ ...O({
427
427
  block: e.block,
428
428
  context: e.context
429
429
  }),
430
- ...Q({
430
+ ...J({
431
431
  block: e.block,
432
432
  rootState: e.context.rootState,
433
433
  rootSetState: e.context.rootSetState,
@@ -441,14 +441,14 @@ function ue(e) {
441
441
  " "
442
442
  ]
443
443
  }
444
- ) }) : /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
444
+ ) }) : /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
445
445
  e.Wrapper,
446
446
  {
447
- ...K({
447
+ ...O({
448
448
  block: e.block,
449
449
  context: e.context
450
450
  }),
451
- ...Q({
451
+ ...J({
452
452
  block: e.block,
453
453
  rootState: e.context.rootState,
454
454
  rootSetState: e.context.rootSetState,
@@ -461,17 +461,17 @@ function ue(e) {
461
461
  " "
462
462
  ] });
463
463
  }
464
- function it(e) {
465
- return /* @__PURE__ */ s(
464
+ function ot(e) {
465
+ return /* @__PURE__ */ r(
466
466
  e.Wrapper,
467
467
  {
468
468
  ...e.wrapperProps,
469
469
  attributes: {
470
- ...K({
470
+ ...O({
471
471
  block: e.block,
472
472
  context: e.context
473
473
  }),
474
- ...Q({
474
+ ...J({
475
475
  block: e.block,
476
476
  rootState: e.context.rootState,
477
477
  rootSetState: e.context.rootSetState,
@@ -483,15 +483,15 @@ function it(e) {
483
483
  }
484
484
  );
485
485
  }
486
- const ot = ({
486
+ const rt = ({
487
487
  componentOptions: e,
488
488
  builderBlock: t,
489
489
  context: n,
490
490
  componentRef: i,
491
- includeBlockProps: o,
492
- isInteractive: a,
493
- contextValue: r
494
- }) => a ? {
491
+ includeBlockProps: a,
492
+ isInteractive: o,
493
+ contextValue: l
494
+ }) => o ? {
495
495
  Wrapper: i,
496
496
  block: t,
497
497
  context: n,
@@ -502,22 +502,22 @@ const ot = ({
502
502
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
503
503
  * component itself directly. Otherwise, they are provided to the wrapper element.
504
504
  */
505
- ...o ? {
506
- attributes: K({
505
+ ...a ? {
506
+ attributes: O({
507
507
  block: t,
508
- context: r
508
+ context: l
509
509
  })
510
510
  } : {}
511
511
  };
512
- function me(e) {
513
- var i, o;
514
- const [t, n] = I(
515
- () => e.isInteractive ? it : e.componentRef
512
+ function he(e) {
513
+ var i, a;
514
+ const [t, n] = S(
515
+ () => e.isInteractive ? ot : e.componentRef
516
516
  );
517
- return /* @__PURE__ */ s(g, { children: e.componentRef ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ P(
517
+ return /* @__PURE__ */ r(f, { children: e.componentRef ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
518
518
  t,
519
519
  {
520
- ...ot({
520
+ ...rt({
521
521
  componentOptions: e.componentOptions,
522
522
  builderBlock: e.builderBlock,
523
523
  context: e.context,
@@ -527,31 +527,31 @@ function me(e) {
527
527
  contextValue: e.context
528
528
  }),
529
529
  children: [
530
- (i = e.blockChildren) == null ? void 0 : i.map((a) => /* @__PURE__ */ s(
531
- z,
530
+ (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ r(
531
+ H,
532
532
  {
533
- block: a,
533
+ block: o,
534
534
  context: e.context,
535
535
  registeredComponents: e.registeredComponents
536
536
  },
537
- "block-" + a.id
537
+ "block-" + o.id
538
538
  )),
539
- (o = e.blockChildren) == null ? void 0 : o.map((a) => /* @__PURE__ */ s(
539
+ (a = e.blockChildren) == null ? void 0 : a.map((o) => /* @__PURE__ */ r(
540
540
  ne,
541
541
  {
542
- block: a,
542
+ block: o,
543
543
  context: e.context
544
544
  },
545
- "block-style-" + a.id
545
+ "block-style-" + o.id
546
546
  ))
547
547
  ]
548
548
  }
549
549
  ) }) : null });
550
550
  }
551
- function at(e) {
552
- const [t, n] = I(() => e.repeatContext);
553
- return /* @__PURE__ */ s(te.Provider, { value: t, children: /* @__PURE__ */ s(
554
- z,
551
+ function lt(e) {
552
+ const [t, n] = S(() => e.repeatContext);
553
+ return /* @__PURE__ */ r(te.Provider, { value: t, children: /* @__PURE__ */ r(
554
+ H,
555
555
  {
556
556
  block: e.block,
557
557
  context: t,
@@ -559,10 +559,10 @@ function at(e) {
559
559
  }
560
560
  ) });
561
561
  }
562
- function z(e) {
563
- var u, h, y, k;
562
+ function H(e) {
563
+ var u, g, y, V;
564
564
  function t() {
565
- return De({
565
+ return Qe({
566
566
  block: e.block,
567
567
  context: e.context,
568
568
  registeredComponents: e.registeredComponents
@@ -575,7 +575,7 @@ function z(e) {
575
575
  });
576
576
  }
577
577
  function i() {
578
- return n() ? e.block : O({
578
+ return n() ? e.block : D({
579
579
  block: e.block,
580
580
  localState: e.context.localState,
581
581
  rootState: e.context.rootState,
@@ -584,118 +584,118 @@ function z(e) {
584
584
  shouldEvaluateBindings: !0
585
585
  });
586
586
  }
587
- function o() {
587
+ function a() {
588
588
  return e.block.tagName || "div";
589
589
  }
590
- function a() {
590
+ function o() {
591
591
  return "hide" in i() ? !i().hide : "show" in i() ? i().show : !0;
592
592
  }
593
- function r() {
594
- var S;
595
- return !((S = t == null ? void 0 : t()) != null && S.component) && !n() ? i().children ?? [] : [];
596
- }
597
593
  function l() {
598
- var b, S, C, w, x;
594
+ var p;
595
+ return !((p = t == null ? void 0 : t()) != null && p.component) && !n() ? i().children ?? [] : [];
596
+ }
597
+ function s() {
598
+ var v, p, E, R, C;
599
599
  return {
600
600
  blockChildren: i().children ?? [],
601
- componentRef: (b = t == null ? void 0 : t()) == null ? void 0 : b.component,
601
+ componentRef: (v = t == null ? void 0 : t()) == null ? void 0 : v.component,
602
602
  componentOptions: {
603
603
  ...Me(i()),
604
604
  builderContext: e.context,
605
- ...((S = t == null ? void 0 : t()) == null ? void 0 : S.name) === "Symbol" || ((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Columns" ? {
605
+ ...((p = t == null ? void 0 : t()) == null ? void 0 : p.name) === "Symbol" || ((E = t == null ? void 0 : t()) == null ? void 0 : E.name) === "Columns" ? {
606
606
  builderComponents: e.registeredComponents
607
607
  } : {}
608
608
  },
609
609
  context: c,
610
610
  registeredComponents: e.registeredComponents,
611
611
  builderBlock: i(),
612
- includeBlockProps: ((w = t == null ? void 0 : t()) == null ? void 0 : w.noWrap) === !0,
613
- isInteractive: !((x = t == null ? void 0 : t()) != null && x.isRSC)
612
+ includeBlockProps: ((R = t == null ? void 0 : t()) == null ? void 0 : R.noWrap) === !0,
613
+ isInteractive: !((C = t == null ? void 0 : t()) != null && C.isRSC)
614
614
  };
615
615
  }
616
- const [c, d] = I(() => e.context);
617
- return /* @__PURE__ */ s(g, { children: a() ? /* @__PURE__ */ s(g, { children: (u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
618
- me,
616
+ const [c, d] = S(() => e.context);
617
+ return /* @__PURE__ */ r(f, { children: o() ? /* @__PURE__ */ r(f, { children: (u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
618
+ he,
619
619
  {
620
- componentRef: l().componentRef,
621
- componentOptions: l().componentOptions,
622
- blockChildren: l().blockChildren,
623
- context: l().context,
624
- registeredComponents: l().registeredComponents,
625
- builderBlock: l().builderBlock,
626
- includeBlockProps: l().includeBlockProps,
627
- isInteractive: l().isInteractive
620
+ componentRef: s().componentRef,
621
+ componentOptions: s().componentOptions,
622
+ blockChildren: s().blockChildren,
623
+ context: s().context,
624
+ registeredComponents: s().registeredComponents,
625
+ builderBlock: s().builderBlock,
626
+ includeBlockProps: s().includeBlockProps,
627
+ isInteractive: s().isInteractive
628
628
  }
629
- ) }) : /* @__PURE__ */ P(g, { children: [
630
- D(o()) ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
631
- ue,
629
+ ) }) : /* @__PURE__ */ T(f, { children: [
630
+ q(a()) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
631
+ fe,
632
632
  {
633
- Wrapper: o(),
633
+ Wrapper: a(),
634
634
  block: i(),
635
635
  context: e.context,
636
636
  hasChildren: !1
637
637
  }
638
638
  ) }) : null,
639
- !D(o()) && n() ? /* @__PURE__ */ s(g, { children: (h = n()) == null ? void 0 : h.map((b, S) => /* @__PURE__ */ s(
640
- at,
639
+ !q(a()) && n() ? /* @__PURE__ */ r(f, { children: (g = n()) == null ? void 0 : g.map((v, p) => /* @__PURE__ */ r(
640
+ lt,
641
641
  {
642
- repeatContext: b.context,
643
- block: b.block,
642
+ repeatContext: v.context,
643
+ block: v.block,
644
644
  registeredComponents: e.registeredComponents
645
645
  },
646
- S
646
+ p
647
647
  )) }) : null,
648
- !D(o()) && !n() ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ P(
649
- ue,
648
+ !q(a()) && !n() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
649
+ fe,
650
650
  {
651
- Wrapper: o(),
651
+ Wrapper: a(),
652
652
  block: i(),
653
653
  context: e.context,
654
654
  hasChildren: !0,
655
655
  children: [
656
- /* @__PURE__ */ s(
657
- me,
656
+ /* @__PURE__ */ r(
657
+ he,
658
658
  {
659
- componentRef: l().componentRef,
660
- componentOptions: l().componentOptions,
661
- blockChildren: l().blockChildren,
662
- context: l().context,
663
- registeredComponents: l().registeredComponents,
664
- builderBlock: l().builderBlock,
665
- includeBlockProps: l().includeBlockProps,
666
- isInteractive: l().isInteractive
659
+ componentRef: s().componentRef,
660
+ componentOptions: s().componentOptions,
661
+ blockChildren: s().blockChildren,
662
+ context: s().context,
663
+ registeredComponents: s().registeredComponents,
664
+ builderBlock: s().builderBlock,
665
+ includeBlockProps: s().includeBlockProps,
666
+ isInteractive: s().isInteractive
667
667
  }
668
668
  ),
669
- (y = r()) == null ? void 0 : y.map((b) => /* @__PURE__ */ s(
670
- z,
669
+ (y = l()) == null ? void 0 : y.map((v) => /* @__PURE__ */ r(
670
+ H,
671
671
  {
672
- block: b,
672
+ block: v,
673
673
  context: c,
674
674
  registeredComponents: e.registeredComponents
675
675
  },
676
- "block-" + b.id
676
+ "block-" + v.id
677
677
  )),
678
- (k = r()) == null ? void 0 : k.map((b) => /* @__PURE__ */ s(
678
+ (V = l()) == null ? void 0 : V.map((v) => /* @__PURE__ */ r(
679
679
  ne,
680
680
  {
681
- block: b,
681
+ block: v,
682
682
  context: c
683
683
  },
684
- "block-style-" + b.id
684
+ "block-style-" + v.id
685
685
  ))
686
686
  ]
687
687
  }
688
688
  ) }) : null
689
689
  ] }) }) : null });
690
690
  }
691
- function rt(e) {
691
+ function ct(e) {
692
692
  function t() {
693
- var o;
694
- return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
693
+ var a;
694
+ return "builder-blocks" + ((a = e.blocks) != null && a.length ? "" : " no-blocks");
695
695
  }
696
696
  function n() {
697
- var o, a;
698
- V() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
697
+ var a, o;
698
+ $() && !((a = e.blocks) != null && a.length) && ((o = window.parent) == null || o.postMessage(
699
699
  {
700
700
  type: "builder.clickEmptyBlocks",
701
701
  data: {
@@ -707,8 +707,8 @@ function rt(e) {
707
707
  ));
708
708
  }
709
709
  function i() {
710
- var o, a;
711
- V() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
710
+ var a, o;
711
+ $() && !((a = e.blocks) != null && a.length) && ((o = window.parent) == null || o.postMessage(
712
712
  {
713
713
  type: "builder.hoverEmptyBlocks",
714
714
  data: {
@@ -719,21 +719,21 @@ function rt(e) {
719
719
  "*"
720
720
  ));
721
721
  }
722
- return /* @__PURE__ */ P(g, { children: [
723
- /* @__PURE__ */ s(
722
+ return /* @__PURE__ */ T(f, { children: [
723
+ /* @__PURE__ */ r(
724
724
  "div",
725
725
  {
726
726
  className: t() + " div-02c7a115",
727
727
  "builder-path": e.path,
728
728
  "builder-parent-id": e.parent,
729
729
  style: e.styleProp,
730
- onClick: (o) => n(),
731
- onMouseEnter: (o) => i(),
732
- onKeyPress: (o) => n(),
730
+ onClick: (a) => n(),
731
+ onMouseEnter: (a) => i(),
732
+ onKeyPress: (a) => n(),
733
733
  children: e.children
734
734
  }
735
735
  ),
736
- /* @__PURE__ */ s("style", { children: `.div-02c7a115 {
736
+ /* @__PURE__ */ r("style", { children: `.div-02c7a115 {
737
737
  display: flex;
738
738
  flex-direction: column;
739
739
  align-items: stretch;
@@ -741,108 +741,108 @@ function rt(e) {
741
741
  ] });
742
742
  }
743
743
  function ie(e) {
744
- var i, o;
745
- const t = ae(te), n = ae(ke);
746
- return /* @__PURE__ */ P(
747
- rt,
744
+ var i, a;
745
+ const t = le(te), n = le(we);
746
+ return /* @__PURE__ */ T(
747
+ ct,
748
748
  {
749
749
  blocks: e.blocks,
750
750
  parent: e.parent,
751
751
  path: e.path,
752
752
  styleProp: e.styleProp,
753
753
  children: [
754
- e.blocks ? /* @__PURE__ */ s(g, { children: (i = e.blocks) == null ? void 0 : i.map((a) => /* @__PURE__ */ s(
755
- z,
754
+ e.blocks ? /* @__PURE__ */ r(f, { children: (i = e.blocks) == null ? void 0 : i.map((o) => /* @__PURE__ */ r(
755
+ H,
756
756
  {
757
- block: a,
757
+ block: o,
758
758
  context: e.context || t,
759
759
  registeredComponents: e.registeredComponents || n.registeredComponents
760
760
  },
761
- "render-block-" + a.id
761
+ "render-block-" + o.id
762
762
  )) }) : null,
763
- e.blocks ? /* @__PURE__ */ s(g, { children: (o = e.blocks) == null ? void 0 : o.map((a) => /* @__PURE__ */ s(
763
+ e.blocks ? /* @__PURE__ */ r(f, { children: (a = e.blocks) == null ? void 0 : a.map((o) => /* @__PURE__ */ r(
764
764
  ne,
765
765
  {
766
- block: a,
766
+ block: o,
767
767
  context: e.context || t
768
768
  },
769
- "block-style-" + a.id
769
+ "block-style-" + o.id
770
770
  )) }) : null
771
771
  ]
772
772
  }
773
773
  );
774
774
  }
775
- function lt(e) {
776
- var w;
777
- const [t, n] = I(
775
+ function st(e) {
776
+ var R;
777
+ const [t, n] = S(
778
778
  () => typeof e.space == "number" ? e.space || 0 : 20
779
- ), [i, o] = I(() => e.columns || []), [a, r] = I(
779
+ ), [i, a] = S(() => e.columns || []), [o, l] = S(
780
780
  () => e.stackColumnsAt || "tablet"
781
781
  );
782
- function l(x) {
783
- var R;
784
- return ((R = i[x]) == null ? void 0 : R.width) || 100 / i.length;
782
+ function s(C) {
783
+ var w;
784
+ return ((w = i[C]) == null ? void 0 : w.width) || 100 / i.length;
785
785
  }
786
- function c(x) {
787
- const R = t * (i.length - 1) / i.length;
788
- return `calc(${l(x)}% - ${R}px)`;
786
+ function c(C) {
787
+ const w = t * (i.length - 1) / i.length;
788
+ return `calc(${s(C)}% - ${w}px)`;
789
789
  }
790
790
  function d({
791
- stackedStyle: x,
792
- desktopStyle: R
791
+ stackedStyle: C,
792
+ desktopStyle: w
793
793
  }) {
794
- return a === "tablet" ? x : R;
794
+ return o === "tablet" ? C : w;
795
795
  }
796
796
  function u({
797
- stackedStyle: x,
798
- desktopStyle: R
797
+ stackedStyle: C,
798
+ desktopStyle: w
799
799
  }) {
800
- return a === "never" ? R : x;
800
+ return o === "never" ? w : C;
801
801
  }
802
- const [h, y] = I(
802
+ const [g, y] = S(
803
803
  () => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
804
804
  );
805
- function k() {
805
+ function V() {
806
806
  return {
807
- "--flex-dir": h,
807
+ "--flex-dir": g,
808
808
  "--flex-dir-tablet": d({
809
- stackedStyle: h,
809
+ stackedStyle: g,
810
810
  desktopStyle: "row"
811
811
  })
812
812
  };
813
813
  }
814
- function b(x) {
815
- const R = x === 0 ? 0 : t, $ = c(x), A = `${R}px`, N = "100%", W = 0;
814
+ function v(C) {
815
+ const w = C === 0 ? 0 : t, A = c(C), B = `${w}px`, F = "100%", W = 0;
816
816
  return {
817
- width: $,
818
- ["marginLeft"]: A,
817
+ width: A,
818
+ ["marginLeft"]: B,
819
819
  "--column-width-mobile": u({
820
- stackedStyle: N,
821
- desktopStyle: $
820
+ stackedStyle: F,
821
+ desktopStyle: A
822
822
  }),
823
823
  "--column-margin-left-mobile": u({
824
824
  stackedStyle: W,
825
- desktopStyle: A
825
+ desktopStyle: B
826
826
  }),
827
827
  "--column-width-tablet": d({
828
- stackedStyle: N,
829
- desktopStyle: $
828
+ stackedStyle: F,
829
+ desktopStyle: A
830
830
  }),
831
831
  "--column-margin-left-tablet": d({
832
832
  stackedStyle: W,
833
- desktopStyle: A
833
+ desktopStyle: B
834
834
  })
835
835
  };
836
836
  }
837
- function S(x) {
838
- var $, A;
839
- return we(
840
- ((A = ($ = e.builderContext.content) == null ? void 0 : $.meta) == null ? void 0 : A.breakpoints) || {}
841
- )[x].max;
837
+ function p(C) {
838
+ var A, B;
839
+ return Te(
840
+ ((B = (A = e.builderContext.content) == null ? void 0 : A.meta) == null ? void 0 : B.breakpoints) || {}
841
+ )[C].max;
842
842
  }
843
- function C() {
843
+ function E() {
844
844
  return `
845
- @media (max-width: ${S("medium")}px) {
845
+ @media (max-width: ${p("medium")}px) {
846
846
  .${e.builderBlock.id}-breakpoints {
847
847
  flex-direction: var(--flex-dir-tablet);
848
848
  align-items: stretch;
@@ -854,7 +854,7 @@ function lt(e) {
854
854
  }
855
855
  }
856
856
 
857
- @media (max-width: ${S("small")}px) {
857
+ @media (max-width: ${p("small")}px) {
858
858
  .${e.builderBlock.id}-breakpoints {
859
859
  flex-direction: var(--flex-dir);
860
860
  align-items: stretch;
@@ -867,39 +867,39 @@ function lt(e) {
867
867
  },
868
868
  `;
869
869
  }
870
- return /* @__PURE__ */ P(g, { children: [
871
- /* @__PURE__ */ P(
870
+ return /* @__PURE__ */ T(f, { children: [
871
+ /* @__PURE__ */ T(
872
872
  "div",
873
873
  {
874
874
  className: `builder-columns ${e.builderBlock.id}-breakpoints div-53636e90`,
875
- style: k(),
875
+ style: V(),
876
876
  children: [
877
- /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(H, { styles: C() }) }),
878
- (w = e.columns) == null ? void 0 : w.map((x, R) => /* @__PURE__ */ ve(
877
+ /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(K, { styles: E() }) }),
878
+ (R = e.columns) == null ? void 0 : R.map((C, w) => /* @__PURE__ */ ke(
879
879
  "div",
880
880
  {
881
881
  className: "builder-column div-53636e90-2",
882
- style: b(R),
883
- key: R
882
+ style: v(w),
883
+ key: w
884
884
  },
885
- /* @__PURE__ */ s(
885
+ /* @__PURE__ */ r(
886
886
  ie,
887
887
  {
888
- path: `component.options.columns.${R}.blocks`,
888
+ path: `component.options.columns.${w}.blocks`,
889
889
  parent: e.builderBlock.id,
890
890
  styleProp: {
891
891
  flexGrow: "1"
892
892
  },
893
893
  context: e.builderContext,
894
894
  registeredComponents: e.builderComponents,
895
- blocks: x.blocks
895
+ blocks: C.blocks
896
896
  }
897
897
  )
898
898
  ))
899
899
  ]
900
900
  }
901
901
  ),
902
- /* @__PURE__ */ s("style", { children: `.div-53636e90 {
902
+ /* @__PURE__ */ r("style", { children: `.div-53636e90 {
903
903
  display: flex;
904
904
  line-height: normal;
905
905
  }.div-53636e90-2 {
@@ -909,41 +909,41 @@ function lt(e) {
909
909
  }` })
910
910
  ] });
911
911
  }
912
- function ct(e) {
913
- return /* @__PURE__ */ s("span", { children: e.children });
912
+ function dt(e) {
913
+ return /* @__PURE__ */ r("span", { children: e.children });
914
914
  }
915
- function fe(e) {
915
+ function ge(e) {
916
916
  return e.replace(/http(s)?:/, "");
917
917
  }
918
- function st(e = "", t, n) {
919
- const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
920
- return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
918
+ function ut(e = "", t, n) {
919
+ const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), a = e.indexOf("?") !== -1 ? "&" : "?";
920
+ return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + a + t + "=" + encodeURIComponent(n);
921
921
  }
922
- function dt(e, t) {
922
+ function mt(e, t) {
923
923
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
924
924
  return e;
925
925
  if (t === "master")
926
- return fe(e);
926
+ return ge(e);
927
927
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
928
928
  if (n) {
929
- const i = e.split(n[0]), o = n[3], a = t.match("x") ? t : `${t}x`;
930
- return fe(`${i[0]}_${a}${o}`);
929
+ const i = e.split(n[0]), a = n[3], o = t.match("x") ? t : `${t}x`;
930
+ return ge(`${i[0]}_${o}${a}`);
931
931
  }
932
932
  return null;
933
933
  }
934
- function J(e) {
934
+ function Q(e) {
935
935
  if (!e)
936
936
  return e;
937
937
  const t = [100, 200, 400, 800, 1200, 1600, 2e3];
938
938
  if (e.match(/builder\.io/)) {
939
939
  let n = e;
940
940
  const i = Number(e.split("?width=")[1]);
941
- return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${st(e, "width", o)} ${o}w`).concat([n]).join(", ");
941
+ return isNaN(i) || (n = `${n} ${i}w`), t.filter((a) => a !== i).map((a) => `${ut(e, "width", a)} ${a}w`).concat([n]).join(", ");
942
942
  }
943
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [dt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
943
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [mt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
944
944
  }
945
- function ut(e) {
946
- var o, a, r, l;
945
+ function ft(e) {
946
+ var a, o, l, s;
947
947
  function t() {
948
948
  var u;
949
949
  const d = e.image || e.src;
@@ -953,10 +953,10 @@ function ut(e) {
953
953
  return e.srcset;
954
954
  if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
955
955
  if (!e.srcset.includes(e.image.split("?")[0]))
956
- return console.debug("Removed given srcset"), J(d);
956
+ return console.debug("Removed given srcset"), Q(d);
957
957
  } else if (e.image && !e.srcset)
958
- return J(d);
959
- return J(d);
958
+ return Q(d);
959
+ return Q(d);
960
960
  }
961
961
  function n() {
962
962
  var c;
@@ -972,11 +972,11 @@ function ut(e) {
972
972
  };
973
973
  return e.aspectRatio ? c : void 0;
974
974
  }
975
- return /* @__PURE__ */ P(g, { children: [
976
- /* @__PURE__ */ P(g, { children: [
977
- /* @__PURE__ */ P("picture", { children: [
978
- n() ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s("source", { type: "image/webp", srcSet: n() }) }) : null,
979
- /* @__PURE__ */ s(
975
+ return /* @__PURE__ */ T(f, { children: [
976
+ /* @__PURE__ */ T(f, { children: [
977
+ /* @__PURE__ */ T("picture", { children: [
978
+ n() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r("source", { type: "image/webp", srcSet: n() }) }) : null,
979
+ /* @__PURE__ */ r(
980
980
  "img",
981
981
  {
982
982
  loading: "lazy",
@@ -994,7 +994,7 @@ function ut(e) {
994
994
  }
995
995
  )
996
996
  ] }),
997
- e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
997
+ e.aspectRatio && !((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length && e.fitContent) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
998
998
  "div",
999
999
  {
1000
1000
  className: "builder-image-sizer div-dbab4030",
@@ -1003,10 +1003,10 @@ function ut(e) {
1003
1003
  }
1004
1004
  }
1005
1005
  ) }) : null,
1006
- (l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ s(g, { children: e.children }) : null,
1007
- !e.fitContent && e.children ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s("div", { className: "div-dbab4030-2", children: e.children }) }) : null
1006
+ (s = (l = e.builderBlock) == null ? void 0 : l.children) != null && s.length && e.fitContent ? /* @__PURE__ */ r(f, { children: e.children }) : null,
1007
+ !e.fitContent && e.children ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r("div", { className: "div-dbab4030-2", children: e.children }) }) : null
1008
1008
  ] }),
1009
- /* @__PURE__ */ s("style", { children: `.img-dbab4030 {
1009
+ /* @__PURE__ */ r("style", { children: `.img-dbab4030 {
1010
1010
  opacity: 1;
1011
1011
  transition: opacity 0.2s ease-in-out;
1012
1012
  }.div-dbab4030 {
@@ -1025,8 +1025,8 @@ function ut(e) {
1025
1025
  }` })
1026
1026
  ] });
1027
1027
  }
1028
- function mt(e) {
1029
- return /* @__PURE__ */ s(
1028
+ function ht(e) {
1029
+ return /* @__PURE__ */ r(
1030
1030
  "section",
1031
1031
  {
1032
1032
  ...e.attributes,
@@ -1046,7 +1046,7 @@ function mt(e) {
1046
1046
  }
1047
1047
  );
1048
1048
  }
1049
- const ft = {
1049
+ const gt = {
1050
1050
  name: "Core:Button",
1051
1051
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1052
1052
  defaultStyles: {
@@ -1079,7 +1079,7 @@ const ft = {
1079
1079
  }],
1080
1080
  static: !0,
1081
1081
  noWrap: !0
1082
- }, ht = {
1082
+ }, bt = {
1083
1083
  // TODO: ways to statically preprocess JSON for references, functions, etc
1084
1084
  name: "Columns",
1085
1085
  isRSC: !0,
@@ -1258,7 +1258,7 @@ const ft = {
1258
1258
  });
1259
1259
  }
1260
1260
  const n = e.get("columns");
1261
- Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((l, c) => l + c.get("width"), 0) !== 100) && t();
1261
+ Array.isArray(n) && n.find((a) => a.get("width")) && (n.find((o) => !o.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
1262
1262
  }
1263
1263
  }, {
1264
1264
  name: "space",
@@ -1280,7 +1280,7 @@ const ft = {
1280
1280
  helperText: "When stacking columns for mobile devices, reverse the ordering",
1281
1281
  advanced: !0
1282
1282
  }]
1283
- }, gt = {
1283
+ }, xt = {
1284
1284
  name: "Custom Code",
1285
1285
  static: !0,
1286
1286
  requiredPermissions: ["editCode"],
@@ -1303,15 +1303,15 @@ const ft = {
1303
1303
  advanced: !0
1304
1304
  }]
1305
1305
  };
1306
- function bt(e) {
1307
- const t = Z(null), [n, i] = I(() => []), [o, a] = I(() => []);
1308
- return B(() => {
1309
- var l;
1310
- if (!((l = t.current) != null && l.getElementsByTagName) || typeof window > "u")
1306
+ function yt(e) {
1307
+ const t = Z(null), [n, i] = S(() => []), [a, o] = S(() => []);
1308
+ return P(() => {
1309
+ var s;
1310
+ if (!((s = t.current) != null && s.getElementsByTagName) || typeof window > "u")
1311
1311
  return;
1312
- const r = t.current.getElementsByTagName("script");
1313
- for (let c = 0; c < r.length; c++) {
1314
- const d = r[c];
1312
+ const l = t.current.getElementsByTagName("script");
1313
+ for (let c = 0; c < l.length; c++) {
1314
+ const d = l[c];
1315
1315
  if (d.src) {
1316
1316
  if (n.includes(d.src))
1317
1317
  continue;
@@ -1323,16 +1323,16 @@ function bt(e) {
1323
1323
  "application/javascript",
1324
1324
  "application/ecmascript"
1325
1325
  ].includes(d.type)) {
1326
- if (o.includes(d.innerText))
1326
+ if (a.includes(d.innerText))
1327
1327
  continue;
1328
1328
  try {
1329
- o.push(d.innerText), new Function(d.innerText)();
1329
+ a.push(d.innerText), new Function(d.innerText)();
1330
1330
  } catch (u) {
1331
1331
  console.warn("`CustomCode`: Error running script:", u);
1332
1332
  }
1333
1333
  }
1334
1334
  }
1335
- }, []), /* @__PURE__ */ s(
1335
+ }, []), /* @__PURE__ */ r(
1336
1336
  "div",
1337
1337
  {
1338
1338
  ref: t,
@@ -1341,7 +1341,7 @@ function bt(e) {
1341
1341
  }
1342
1342
  );
1343
1343
  }
1344
- const xt = {
1344
+ const St = {
1345
1345
  name: "Embed",
1346
1346
  static: !0,
1347
1347
  inputs: [{
@@ -1366,30 +1366,30 @@ const xt = {
1366
1366
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1367
1367
  hideFromUI: !0
1368
1368
  }]
1369
- }, yt = ["text/javascript", "application/javascript", "application/ecmascript"], St = (e) => yt.includes(e.type);
1370
- function vt(e) {
1371
- const t = Z(null), [n, i] = I(() => []), [o, a] = I(() => []), [r, l] = I(() => !1);
1369
+ }, vt = ["text/javascript", "application/javascript", "application/ecmascript"], pt = (e) => vt.includes(e.type);
1370
+ function kt(e) {
1371
+ const t = Z(null), [n, i] = S(() => []), [a, o] = S(() => []), [l, s] = S(() => !1);
1372
1372
  function c() {
1373
1373
  if (!t.current || !t.current.getElementsByTagName)
1374
1374
  return;
1375
1375
  const d = t.current.getElementsByTagName("script");
1376
1376
  for (let u = 0; u < d.length; u++) {
1377
- const h = d[u];
1378
- if (h.src && !n.includes(h.src)) {
1379
- n.push(h.src);
1377
+ const g = d[u];
1378
+ if (g.src && !n.includes(g.src)) {
1379
+ n.push(g.src);
1380
1380
  const y = document.createElement("script");
1381
- y.async = !0, y.src = h.src, document.head.appendChild(y);
1382
- } else if (St(h) && !o.includes(h.innerText))
1381
+ y.async = !0, y.src = g.src, document.head.appendChild(y);
1382
+ } else if (pt(g) && !a.includes(g.innerText))
1383
1383
  try {
1384
- o.push(h.innerText), new Function(h.innerText)();
1384
+ a.push(g.innerText), new Function(g.innerText)();
1385
1385
  } catch (y) {
1386
1386
  console.warn("`Embed`: Error running script:", y);
1387
1387
  }
1388
1388
  }
1389
1389
  }
1390
- return B(() => {
1391
- t.current && !r && (l(!0), c());
1392
- }, [t.current, r]), /* @__PURE__ */ s(
1390
+ return P(() => {
1391
+ t.current && !l && (s(!0), c());
1392
+ }, [t.current, l]), /* @__PURE__ */ r(
1393
1393
  "div",
1394
1394
  {
1395
1395
  className: "builder-embed",
@@ -1398,13 +1398,13 @@ function vt(e) {
1398
1398
  }
1399
1399
  );
1400
1400
  }
1401
- const pt = {
1401
+ const Ct = {
1402
1402
  name: "Fragment",
1403
1403
  static: !0,
1404
1404
  hidden: !0,
1405
1405
  canHaveChildren: !0,
1406
1406
  noWrap: !0
1407
- }, kt = {
1407
+ }, wt = {
1408
1408
  name: "Image",
1409
1409
  static: !0,
1410
1410
  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",
@@ -1424,29 +1424,29 @@ const pt = {
1424
1424
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1425
1425
  onChange: (e) => {
1426
1426
  e.delete("srcset"), e.delete("noWebp");
1427
- function n(r, l = 6e4) {
1427
+ function n(l, s = 6e4) {
1428
1428
  return new Promise((c, d) => {
1429
1429
  const u = document.createElement("img");
1430
- let h = !1;
1430
+ let g = !1;
1431
1431
  u.onload = () => {
1432
- h = !0, c(u);
1432
+ g = !0, c(u);
1433
1433
  }, u.addEventListener("error", (y) => {
1434
1434
  console.warn("Image load failed", y.error), d(y.error);
1435
- }), u.src = r, setTimeout(() => {
1436
- h || d(new Error("Image load timed out"));
1437
- }, l);
1435
+ }), u.src = l, setTimeout(() => {
1436
+ g || d(new Error("Image load timed out"));
1437
+ }, s);
1438
1438
  });
1439
1439
  }
1440
- function i(r) {
1441
- return Math.round(r * 1e3) / 1e3;
1440
+ function i(l) {
1441
+ return Math.round(l * 1e3) / 1e3;
1442
1442
  }
1443
- const o = e.get("image"), a = e.get("aspectRatio");
1444
- if (fetch(o).then((r) => r.blob()).then((r) => {
1445
- r.type.includes("svg") && e.set("noWebp", !0);
1446
- }), o && (!a || a === 0.7041))
1447
- return n(o).then((r) => {
1448
- const l = e.get("aspectRatio");
1449
- e.get("image") === o && (!l || l === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
1443
+ const a = e.get("image"), o = e.get("aspectRatio");
1444
+ if (fetch(a).then((l) => l.blob()).then((l) => {
1445
+ l.type.includes("svg") && e.set("noWebp", !0);
1446
+ }), a && (!o || o === 0.7041))
1447
+ return n(a).then((l) => {
1448
+ const s = e.get("aspectRatio");
1449
+ e.get("image") === a && (!s || s === 0.7041) && l.width && l.height && (e.set("aspectRatio", i(l.height / l.width)), e.set("height", l.height), e.set("width", l.width));
1450
1450
  });
1451
1451
  }
1452
1452
  }, {
@@ -1504,7 +1504,7 @@ const pt = {
1504
1504
  advanced: !0,
1505
1505
  defaultValue: 0.7041
1506
1506
  }]
1507
- }, Ct = {
1507
+ }, It = {
1508
1508
  // friendlyName?
1509
1509
  name: "Raw:Img",
1510
1510
  hideFromInsertMenu: !0,
@@ -1519,8 +1519,8 @@ const pt = {
1519
1519
  noWrap: !0,
1520
1520
  static: !0
1521
1521
  };
1522
- function wt(e) {
1523
- return /* @__PURE__ */ s(
1522
+ function Tt(e) {
1523
+ return /* @__PURE__ */ r(
1524
1524
  "img",
1525
1525
  {
1526
1526
  style: {
@@ -1531,10 +1531,10 @@ function wt(e) {
1531
1531
  src: e.imgSrc || e.image,
1532
1532
  ...e.attributes
1533
1533
  },
1534
- V() && e.imgSrc || "default-key"
1534
+ $() && e.imgSrc || "default-key"
1535
1535
  );
1536
1536
  }
1537
- const It = {
1537
+ const Rt = {
1538
1538
  name: "Core:Section",
1539
1539
  static: !0,
1540
1540
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1573,7 +1573,7 @@ const It = {
1573
1573
  }
1574
1574
  }
1575
1575
  }]
1576
- }, Tt = {
1576
+ }, Et = {
1577
1577
  name: "Symbol",
1578
1578
  noWrap: !0,
1579
1579
  static: !0,
@@ -1606,7 +1606,7 @@ const It = {
1606
1606
  hideFromUI: !0,
1607
1607
  type: "boolean"
1608
1608
  }]
1609
- }, Rt = {
1609
+ }, Pt = {
1610
1610
  name: "Text",
1611
1611
  static: !0,
1612
1612
  isRSC: !0,
@@ -1625,9 +1625,9 @@ const It = {
1625
1625
  textAlign: "center"
1626
1626
  }
1627
1627
  };
1628
- function Et(e) {
1628
+ function Vt(e) {
1629
1629
  var t;
1630
- return /* @__PURE__ */ s(
1630
+ return /* @__PURE__ */ r(
1631
1631
  "div",
1632
1632
  {
1633
1633
  className: "builder-text",
@@ -1638,7 +1638,7 @@ function Et(e) {
1638
1638
  }
1639
1639
  );
1640
1640
  }
1641
- const Pt = {
1641
+ const At = {
1642
1642
  name: "Video",
1643
1643
  canHaveChildren: !0,
1644
1644
  defaultStyles: {
@@ -1721,7 +1721,7 @@ const Pt = {
1721
1721
  }]
1722
1722
  };
1723
1723
  function Bt(e) {
1724
- var i;
1724
+ var i, a, o, l, s, c, d;
1725
1725
  function t() {
1726
1726
  return {
1727
1727
  ...e.autoPlay === !0 ? {
@@ -1743,165 +1743,236 @@ function Bt(e) {
1743
1743
  }
1744
1744
  function n() {
1745
1745
  return {
1746
- ...e.attributes,
1747
1746
  ...t()
1748
1747
  };
1749
1748
  }
1750
- return /* @__PURE__ */ s(
1751
- "video",
1749
+ return /* @__PURE__ */ T(
1750
+ "div",
1752
1751
  {
1753
- ...n(),
1754
- preload: e.preload || "metadata",
1755
1752
  style: {
1756
- width: "100%",
1757
- height: "100%",
1758
- ...(i = e.attributes) == null ? void 0 : i.style,
1759
- objectFit: e.fit,
1760
- objectPosition: e.position,
1761
- // Hack to get object fit to work as expected and
1762
- // not have the video overflow
1763
- borderRadius: 1
1753
+ position: "relative"
1764
1754
  },
1765
- src: e.video || "no-src",
1766
- poster: e.posterImage
1755
+ children: [
1756
+ /* @__PURE__ */ r(
1757
+ "video",
1758
+ {
1759
+ className: "builder-video",
1760
+ ...n(),
1761
+ preload: e.preload || "metadata",
1762
+ style: {
1763
+ width: "100%",
1764
+ height: "100%",
1765
+ ...(i = e.attributes) == null ? void 0 : i.style,
1766
+ objectFit: e.fit,
1767
+ objectPosition: e.position,
1768
+ // Hack to get object fit to work as expected and
1769
+ // not have the video overflow
1770
+ zIndex: 2,
1771
+ borderRadius: "1px",
1772
+ ...e.aspectRatio ? {
1773
+ position: "absolute"
1774
+ } : null
1775
+ },
1776
+ src: e.video || "no-src",
1777
+ poster: e.posterImage,
1778
+ children: e.lazyLoad ? null : /* @__PURE__ */ r("source", { type: "video/mp4", src: e.video })
1779
+ }
1780
+ ),
1781
+ e.aspectRatio && !(e.fitContent && ((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length)) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
1782
+ "div",
1783
+ {
1784
+ style: {
1785
+ width: "100%",
1786
+ paddingTop: e.aspectRatio * 100 + "%",
1787
+ pointerEvents: "none",
1788
+ fontSize: "0px"
1789
+ }
1790
+ }
1791
+ ) }) : null,
1792
+ (s = (l = e.builderBlock) == null ? void 0 : l.children) != null && s.length && e.fitContent ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
1793
+ "div",
1794
+ {
1795
+ style: {
1796
+ display: "flex",
1797
+ flexDirection: "column",
1798
+ alignItems: "stretch"
1799
+ },
1800
+ children: e.children
1801
+ }
1802
+ ) }) : null,
1803
+ (d = (c = e.builderBlock) == null ? void 0 : c.children) != null && d.length && !e.fitContent ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
1804
+ "div",
1805
+ {
1806
+ style: {
1807
+ pointerEvents: "none",
1808
+ display: "flex",
1809
+ flexDirection: "column",
1810
+ alignItems: "stretch",
1811
+ position: "absolute",
1812
+ top: "0",
1813
+ left: "0",
1814
+ width: "100%",
1815
+ height: "100%"
1816
+ },
1817
+ children: e.children
1818
+ }
1819
+ ) }) : null
1820
+ ]
1767
1821
  }
1768
1822
  );
1769
1823
  }
1770
- const he = () => [{
1824
+ const be = () => [{
1771
1825
  component: je,
1772
- ...ft
1773
- }, {
1774
- component: lt,
1775
- ...ht
1776
- }, {
1777
- component: bt,
1778
1826
  ...gt
1779
1827
  }, {
1780
- component: vt,
1781
- ...xt
1828
+ component: st,
1829
+ ...bt
1782
1830
  }, {
1783
- component: ct,
1784
- ...pt
1831
+ component: yt,
1832
+ ...xt
1785
1833
  }, {
1786
- component: ut,
1787
- ...kt
1834
+ component: kt,
1835
+ ...St
1788
1836
  }, {
1789
- component: wt,
1837
+ component: dt,
1790
1838
  ...Ct
1791
1839
  }, {
1792
- component: mt,
1793
- ...It
1840
+ component: ft,
1841
+ ...wt
1794
1842
  }, {
1795
- component: Xt,
1796
- ...Tt
1843
+ component: Tt,
1844
+ ...It
1797
1845
  }, {
1798
- component: Et,
1846
+ component: ht,
1799
1847
  ...Rt
1800
1848
  }, {
1801
- component: Bt,
1849
+ component: en,
1850
+ ...Et
1851
+ }, {
1852
+ component: Vt,
1802
1853
  ...Pt
1803
- }], L = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1804
- ...t,
1805
- testVariationId: t.id,
1806
- id: e == null ? void 0 : e.id
1807
- })), $t = ({
1808
- canTrack: e,
1809
- content: t
1810
- }) => !(!(L(t).length > 0) || !e || F());
1811
- function At(e, t, n) {
1812
- var r;
1813
- function i() {
1814
- function l(b, S, C) {
1815
- let w = "";
1816
- if (C) {
1817
- const x = /* @__PURE__ */ new Date();
1818
- x.setTime(x.getTime() + C * 24 * 60 * 60 * 1e3), w = "; expires=" + x.toUTCString();
1854
+ }, {
1855
+ component: Bt,
1856
+ ...At
1857
+ }], $t = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1858
+ function getAndSetVariantId() {
1859
+ function setCookie(name, value, days) {
1860
+ let expires = '';
1861
+ if (days) {
1862
+ const date = new Date();
1863
+ date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
1864
+ expires = '; expires=' + date.toUTCString();
1819
1865
  }
1820
- document.cookie = b + "=" + (S || "") + w + "; path=/; Secure; SameSite=None";
1866
+ document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';
1821
1867
  }
1822
- function c(b) {
1823
- const S = b + "=", C = document.cookie.split(";");
1824
- for (let w = 0; w < C.length; w++) {
1825
- let x = C[w];
1826
- for (; x.charAt(0) === " "; )
1827
- x = x.substring(1, x.length);
1828
- if (x.indexOf(S) === 0)
1829
- return x.substring(S.length, x.length);
1868
+ function getCookie(name) {
1869
+ const nameEQ = name + '=';
1870
+ const ca = document.cookie.split(';');
1871
+ for (let i = 0; i < ca.length; i++) {
1872
+ let c = ca[i];
1873
+ while (c.charAt(0) === ' ') c = c.substring(1, c.length);
1874
+ if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
1830
1875
  }
1831
1876
  return null;
1832
1877
  }
1833
- const d = `builder.tests.${e}`, u = c(d), h = t.map((b) => b.id).concat(e);
1834
- if (u && h.includes(u))
1835
- return u;
1836
- let y = 0;
1837
- const k = Math.random();
1838
- for (let b = 0; b < t.length; b++) {
1839
- const S = t[b], C = S.testRatio;
1840
- if (y += C, k < y)
1841
- return l(d, S.id), S.id;
1878
+ const cookieName = \`builder.tests.\${contentId}\`;
1879
+ const variantInCookie = getCookie(cookieName);
1880
+ const availableIDs = variants.map(vr => vr.id).concat(contentId);
1881
+ if (variantInCookie && availableIDs.includes(variantInCookie)) {
1882
+ return variantInCookie;
1883
+ }
1884
+ let n = 0;
1885
+ const random = Math.random();
1886
+ for (let i = 0; i < variants.length; i++) {
1887
+ const variant = variants[i];
1888
+ const testRatio = variant.testRatio;
1889
+ n += testRatio;
1890
+ if (random < n) {
1891
+ setCookie(cookieName, variant.id);
1892
+ return variant.id;
1893
+ }
1842
1894
  }
1843
- return l(d, e), e;
1895
+ setCookie(cookieName, contentId);
1896
+ return contentId;
1844
1897
  }
1845
- const o = i(), a = (r = document.currentScript) == null ? void 0 : r.previousElementSibling;
1846
- if (n) {
1847
- a.remove();
1848
- const l = document.currentScript;
1849
- l == null || l.remove();
1898
+ const winningVariantId = getAndSetVariantId();
1899
+ const styleEl = document.currentScript?.previousElementSibling;
1900
+ if (isHydrationTarget) {
1901
+ styleEl.remove();
1902
+ const thisScriptEl = document.currentScript;
1903
+ thisScriptEl?.remove();
1850
1904
  } else {
1851
- const l = t.concat({
1852
- id: e
1853
- }).filter((c) => c.id !== o).map((c) => `.variant-${c.id} { display: none; }
1854
- `).join("");
1855
- a.innerHTML = l;
1905
+ const newStyleStr = variants.concat({
1906
+ id: contentId
1907
+ }).filter(variant => variant.id !== winningVariantId).map(value => {
1908
+ return \`.variant-\${value.id} { display: none; }
1909
+ \`;
1910
+ }).join('');
1911
+ styleEl.innerHTML = newStyleStr;
1856
1912
  }
1857
- }
1858
- function Vt(e, t, n) {
1859
- var c;
1860
- if (!navigator.cookieEnabled)
1913
+ }`, Nt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1914
+ if (!navigator.cookieEnabled) {
1861
1915
  return;
1862
- function i(d) {
1863
- const u = d + "=", h = document.cookie.split(";");
1864
- for (let y = 0; y < h.length; y++) {
1865
- let k = h[y];
1866
- for (; k.charAt(0) === " "; )
1867
- k = k.substring(1, k.length);
1868
- if (k.indexOf(u) === 0)
1869
- return k.substring(u.length, k.length);
1916
+ }
1917
+ function getCookie(name) {
1918
+ const nameEQ = name + '=';
1919
+ const ca = document.cookie.split(';');
1920
+ for (let i = 0; i < ca.length; i++) {
1921
+ let c = ca[i];
1922
+ while (c.charAt(0) === ' ') c = c.substring(1, c.length);
1923
+ if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
1870
1924
  }
1871
1925
  return null;
1872
1926
  }
1873
- const o = `builder.tests.${t}`, a = i(o), r = (c = document.currentScript) == null ? void 0 : c.parentElement, l = e === t;
1874
- if (a === e) {
1875
- if (l)
1876
- return;
1877
- r == null || r.removeAttribute("hidden"), r == null || r.removeAttribute("aria-hidden");
1878
- } else {
1879
- l && (n ? r == null || r.remove() : (r == null || r.setAttribute("hidden", "true"), r == null || r.setAttribute("aria-hidden", "true")));
1880
- return;
1927
+ const cookieName = \`builder.tests.\${defaultContentId}\`;
1928
+ const winningVariant = getCookie(cookieName);
1929
+ const parentDiv = document.currentScript?.parentElement;
1930
+ const isDefaultContent = variantContentId === defaultContentId;
1931
+ const isWinningVariant = winningVariant === variantContentId;
1932
+ if (isWinningVariant && !isDefaultContent) {
1933
+ parentDiv?.removeAttribute('hidden');
1934
+ parentDiv?.removeAttribute('aria-hidden');
1935
+ } else if (!isWinningVariant && isDefaultContent) {
1936
+ parentDiv?.setAttribute('hidden', 'true');
1937
+ parentDiv?.setAttribute('aria-hidden', 'true');
1881
1938
  }
1882
- }
1883
- const Ft = (e) => e === "react" || e === "reactNative", Te = Ft(M), Re = "builderIoAbTest", Ee = "builderIoRenderContent", Nt = () => {
1884
- const e = At.toString().replace(/\s+/g, " "), t = Vt.toString().replace(/\s+/g, " ");
1885
- return `
1886
- window.${Re} = ${e}
1887
- window.${Ee} = ${t}
1888
- `;
1889
- }, Wt = (e, t) => `
1890
- window.${Re}("${t}",${JSON.stringify(e)}, ${Te})`, jt = ({
1939
+ if (isHydrationTarget) {
1940
+ if (!isWinningVariant) {
1941
+ parentDiv?.remove();
1942
+ }
1943
+ const thisScriptEl = document.currentScript;
1944
+ thisScriptEl?.remove();
1945
+ }
1946
+ return;
1947
+ }`, Ee = "builderIoAbTest", Pe = "builderIoRenderContent", j = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1948
+ ...t,
1949
+ testVariationId: t.id,
1950
+ id: e == null ? void 0 : e.id
1951
+ })), Ft = ({
1952
+ canTrack: e,
1953
+ content: t
1954
+ }) => !(!(j(t).length > 0) || !e || N()), Wt = (e) => e === "react" || e === "reactNative", Ve = Wt(L), _t = () => `
1955
+ window.${Ee} = ${$t}
1956
+ window.${Pe} = ${Nt}
1957
+ `, Lt = (e, t) => `
1958
+ window.${Ee}(
1959
+ "${t}",${JSON.stringify(e)}, ${Ve}
1960
+ )`, jt = ({
1891
1961
  contentId: e,
1892
1962
  variationId: t
1893
- }) => `
1894
- window.${Ee}("${t}", "${e}", ${Te})`;
1963
+ }) => `window.${Pe}(
1964
+ "${t}", "${e}", ${Ve}
1965
+ )`;
1895
1966
  function X(e) {
1896
- return /* @__PURE__ */ s(
1967
+ return /* @__PURE__ */ r(
1897
1968
  "script",
1898
1969
  {
1899
1970
  dangerouslySetInnerHTML: { __html: e.scriptStr },
1900
- id: e.id
1971
+ id: e.id || ""
1901
1972
  }
1902
1973
  );
1903
1974
  }
1904
- function ge(e) {
1975
+ function xe(e) {
1905
1976
  return Math.round(e * 1e3) / 1e3;
1906
1977
  }
1907
1978
  const Mt = (e, t, n = !0) => {
@@ -1915,36 +1986,36 @@ const Mt = (e, t, n = !0) => {
1915
1986
  return i;
1916
1987
  } while (i = i.parentElement);
1917
1988
  return null;
1918
- }, Lt = (e) => Mt(e, (t) => {
1989
+ }, Ut = (e) => Mt(e, (t) => {
1919
1990
  const n = t.getAttribute("builder-id") || t.id;
1920
1991
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
1921
- }), be = ({
1992
+ }), ye = ({
1922
1993
  event: e,
1923
1994
  target: t
1924
1995
  }) => {
1925
- const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a = ge(i / n.width), r = ge(o / n.height);
1996
+ const n = t.getBoundingClientRect(), i = e.clientX - n.left, a = e.clientY - n.top, o = xe(i / n.width), l = xe(a / n.height);
1926
1997
  return {
1927
- x: a,
1928
- y: r
1998
+ x: o,
1999
+ y: l
1929
2000
  };
1930
- }, _t = (e) => {
1931
- const t = e.target, n = t && Lt(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2001
+ }, Dt = (e) => {
2002
+ const t = e.target, n = t && Ut(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1932
2003
  return {
1933
2004
  targetBuilderElement: i || void 0,
1934
2005
  metadata: {
1935
- targetOffset: t ? be({
2006
+ targetOffset: t ? ye({
1936
2007
  event: e,
1937
2008
  target: t
1938
2009
  }) : void 0,
1939
- builderTargetOffset: n ? be({
2010
+ builderTargetOffset: n ? ye({
1940
2011
  event: e,
1941
2012
  target: n
1942
2013
  }) : void 0,
1943
2014
  builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
1944
2015
  }
1945
2016
  };
1946
- }, Ut = "0.7.2", Ot = () => {
1947
- Ae("insertMenu", {
2017
+ }, Ot = "0.7.4", Kt = () => {
2018
+ Ne("insertMenu", {
1948
2019
  name: "_default",
1949
2020
  default: !0,
1950
2021
  items: [{
@@ -1966,14 +2037,14 @@ const Mt = (e, t, n = !0) => {
1966
2037
  }]
1967
2038
  });
1968
2039
  };
1969
- let xe = !1;
1970
- const Kt = (e = {}) => {
2040
+ let Se = !1;
2041
+ const Ht = (e = {}) => {
1971
2042
  var t, n;
1972
- xe || (xe = !0, F() && ((t = window.parent) == null || t.postMessage({
2043
+ Se || (Se = !0, N() && ((t = window.parent) == null || t.postMessage({
1973
2044
  type: "builder.sdkInfo",
1974
2045
  data: {
1975
- target: M,
1976
- version: Ut,
2046
+ target: L,
2047
+ version: Ot,
1977
2048
  supportsPatchUpdates: !1,
1978
2049
  // Supports builder-model="..." attribute which is needed to
1979
2050
  // scope our '+ add block' button styling
@@ -1988,33 +2059,33 @@ const Kt = (e = {}) => {
1988
2059
  }, "*"), window.addEventListener("message", ({
1989
2060
  data: i
1990
2061
  }) => {
1991
- var o, a;
2062
+ var a, o;
1992
2063
  if (i != null && i.type)
1993
2064
  switch (i.type) {
1994
2065
  case "builder.evaluate": {
1995
- const r = i.data.text, l = i.data.arguments || [], c = i.data.id, d = new Function(r);
1996
- let u, h = null;
2066
+ const l = i.data.text, s = i.data.arguments || [], c = i.data.id, d = new Function(l);
2067
+ let u, g = null;
1997
2068
  try {
1998
- u = d.apply(null, l);
2069
+ u = d.apply(null, s);
1999
2070
  } catch (y) {
2000
- h = y;
2071
+ g = y;
2001
2072
  }
2002
- h ? (o = window.parent) == null || o.postMessage({
2073
+ g ? (a = window.parent) == null || a.postMessage({
2003
2074
  type: "builder.evaluateError",
2004
2075
  data: {
2005
2076
  id: c,
2006
- error: h.message
2077
+ error: g.message
2007
2078
  }
2008
2079
  }, "*") : u && typeof u.then == "function" ? u.then((y) => {
2009
- var k;
2010
- (k = window.parent) == null || k.postMessage({
2080
+ var V;
2081
+ (V = window.parent) == null || V.postMessage({
2011
2082
  type: "builder.evaluateResult",
2012
2083
  data: {
2013
2084
  id: c,
2014
2085
  result: y
2015
2086
  }
2016
2087
  }, "*");
2017
- }).catch(console.error) : (a = window.parent) == null || a.postMessage({
2088
+ }).catch(console.error) : (o = window.parent) == null || o.postMessage({
2018
2089
  type: "builder.evaluateResult",
2019
2090
  data: {
2020
2091
  result: u,
@@ -2026,60 +2097,60 @@ const Kt = (e = {}) => {
2026
2097
  }
2027
2098
  })));
2028
2099
  };
2029
- function Ht(e) {
2030
- var $, A, N, W, q;
2031
- const t = Z(null), [n, i] = I(() => 0);
2032
- function o(m) {
2033
- var v, p, T, E, oe;
2034
- const f = {
2100
+ function zt(e) {
2101
+ var A, B, F, W, z, ae, oe;
2102
+ const t = Z(null), [n, i] = S(() => 0);
2103
+ function a(m) {
2104
+ var b, x, k, I, re;
2105
+ const h = {
2035
2106
  ...e.builderContextSignal.content,
2036
2107
  ...m,
2037
2108
  data: {
2038
- ...(v = e.builderContextSignal.content) == null ? void 0 : v.data,
2109
+ ...(b = e.builderContextSignal.content) == null ? void 0 : b.data,
2039
2110
  ...m == null ? void 0 : m.data
2040
2111
  },
2041
2112
  meta: {
2042
- ...(p = e.builderContextSignal.content) == null ? void 0 : p.meta,
2113
+ ...(x = e.builderContextSignal.content) == null ? void 0 : x.meta,
2043
2114
  ...m == null ? void 0 : m.meta,
2044
- breakpoints: ((T = m == null ? void 0 : m.meta) == null ? void 0 : T.breakpoints) || ((oe = (E = e.builderContextSignal.content) == null ? void 0 : E.meta) == null ? void 0 : oe.breakpoints)
2115
+ breakpoints: ((k = m == null ? void 0 : m.meta) == null ? void 0 : k.breakpoints) || ((re = (I = e.builderContextSignal.content) == null ? void 0 : I.meta) == null ? void 0 : re.breakpoints)
2045
2116
  }
2046
2117
  };
2047
2118
  e.setBuilderContextSignal((Be) => ({
2048
2119
  ...Be,
2049
- content: f
2120
+ content: h
2050
2121
  }));
2051
2122
  }
2052
- I(() => 0);
2053
- const [a, r] = I(
2123
+ S(() => 0);
2124
+ const [o, l] = S(
2054
2125
  () => !1
2055
2126
  );
2056
- function l(m) {
2057
- var v;
2058
- const { data: f } = m;
2059
- if (f)
2060
- switch (f.type) {
2127
+ function s(m) {
2128
+ var b;
2129
+ const { data: h } = m;
2130
+ if (h)
2131
+ switch (h.type) {
2061
2132
  case "builder.configureSdk": {
2062
- const p = f.data, { breakpoints: T, contentId: E } = p;
2063
- if (!E || E !== ((v = e.builderContextSignal.content) == null ? void 0 : v.id))
2133
+ const x = h.data, { breakpoints: k, contentId: I } = x;
2134
+ if (!I || I !== ((b = e.builderContextSignal.content) == null ? void 0 : b.id))
2064
2135
  return;
2065
- T && o({
2136
+ k && a({
2066
2137
  meta: {
2067
- breakpoints: T
2138
+ breakpoints: k
2068
2139
  }
2069
2140
  }), i(n + 1);
2070
2141
  break;
2071
2142
  }
2072
2143
  case "builder.contentUpdate": {
2073
- const p = f.data, T = p.key || p.alias || p.entry || p.modelName, E = p.data;
2074
- T === e.model && (o(E), i(n + 1));
2144
+ const x = h.data, k = x.key || x.alias || x.entry || x.modelName, I = x.data;
2145
+ k === e.model && (a(I), i(n + 1));
2075
2146
  break;
2076
2147
  }
2077
2148
  }
2078
2149
  }
2079
2150
  function c() {
2080
- var f, v;
2081
- const m = (v = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : v.jsCode;
2082
- m && j({
2151
+ var h, b;
2152
+ const m = (b = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : b.jsCode;
2153
+ m && _({
2083
2154
  code: m,
2084
2155
  context: e.context || {},
2085
2156
  localState: void 0,
@@ -2087,28 +2158,28 @@ function Ht(e) {
2087
2158
  rootSetState: e.builderContextSignal.rootSetState
2088
2159
  });
2089
2160
  }
2090
- const [d, u] = I(() => ({})), [h, y] = I(() => !1);
2091
- function k(m) {
2092
- var f, v;
2161
+ const [d, u] = S(() => ({})), [g, y] = S(() => !1);
2162
+ function V(m) {
2163
+ var h, b;
2093
2164
  if (e.builderContextSignal.content) {
2094
- const p = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, T = (v = e.builderContextSignal.content) == null ? void 0 : v.id;
2095
- re({
2165
+ const x = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, k = (b = e.builderContextSignal.content) == null ? void 0 : b.id;
2166
+ ce({
2096
2167
  type: "click",
2097
2168
  canTrack: U(e.canTrack),
2098
- contentId: T,
2169
+ contentId: k,
2099
2170
  apiKey: e.apiKey,
2100
- variationId: p !== T ? p : void 0,
2101
- ..._t(m),
2102
- unique: !h
2171
+ variationId: x !== k ? x : void 0,
2172
+ ...Dt(m),
2173
+ unique: !g
2103
2174
  });
2104
2175
  }
2105
- h || y(!0);
2176
+ g || y(!0);
2106
2177
  }
2107
- function b(m) {
2178
+ function v(m) {
2108
2179
  return m.replace(
2109
2180
  /{{([^}]+)}}/g,
2110
- (f, v) => j({
2111
- code: v,
2181
+ (h, b) => _({
2182
+ code: b,
2112
2183
  context: e.context || {},
2113
2184
  localState: void 0,
2114
2185
  rootState: e.builderContextSignal.rootState,
@@ -2116,33 +2187,33 @@ function Ht(e) {
2116
2187
  })
2117
2188
  );
2118
2189
  }
2119
- function S({ url: m, key: f }) {
2120
- Ne(m).then((v) => v.json()).then((v) => {
2121
- var T, E;
2122
- const p = {
2190
+ function p({ url: m, key: h }) {
2191
+ _e(m).then((b) => b.json()).then((b) => {
2192
+ var k, I;
2193
+ const x = {
2123
2194
  ...e.builderContextSignal.rootState,
2124
- [f]: v
2195
+ [h]: b
2125
2196
  };
2126
- (E = (T = e.builderContextSignal).rootSetState) == null || E.call(T, p), d[f] = !0;
2127
- }).catch((v) => {
2128
- console.error("error fetching dynamic data", m, v);
2197
+ (I = (k = e.builderContextSignal).rootSetState) == null || I.call(k, x), d[h] = !0;
2198
+ }).catch((b) => {
2199
+ console.error("error fetching dynamic data", m, b);
2129
2200
  });
2130
2201
  }
2131
- function C() {
2132
- var f, v;
2133
- const m = ((v = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : v.httpRequests) ?? {};
2134
- Object.entries(m).forEach(([p, T]) => {
2135
- if (T && (!d[p] || V())) {
2136
- const E = b(T);
2137
- S({
2138
- url: E,
2139
- key: p
2202
+ function E() {
2203
+ var h, b;
2204
+ const m = ((b = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : b.httpRequests) ?? {};
2205
+ Object.entries(m).forEach(([x, k]) => {
2206
+ if (k && (!d[x] || $())) {
2207
+ const I = v(k);
2208
+ p({
2209
+ url: I,
2210
+ key: x
2140
2211
  });
2141
2212
  }
2142
2213
  });
2143
2214
  }
2144
- function w() {
2145
- V() && window.dispatchEvent(
2215
+ function R() {
2216
+ $() && window.dispatchEvent(
2146
2217
  new CustomEvent(
2147
2218
  "builder:component:stateChange",
2148
2219
  {
@@ -2156,8 +2227,8 @@ function Ht(e) {
2156
2227
  )
2157
2228
  );
2158
2229
  }
2159
- function x(m) {
2160
- i(n + 1), window.addEventListener("message", l), Ot(), Kt({
2230
+ function C(m) {
2231
+ i(n + 1), window.addEventListener("message", s), Kt(), Ht({
2161
2232
  ...e.locale ? {
2162
2233
  locale: e.locale
2163
2234
  } : {},
@@ -2169,109 +2240,109 @@ function Ht(e) {
2169
2240
  } : {}
2170
2241
  }), Object.values(
2171
2242
  e.builderContextSignal.componentInfos
2172
- ).forEach((f) => {
2173
- var p;
2174
- const v = Fe(f);
2175
- (p = window.parent) == null || p.postMessage(v, "*");
2243
+ ).forEach((h) => {
2244
+ var x;
2245
+ const b = We(h);
2246
+ (x = window.parent) == null || x.postMessage(b, "*");
2176
2247
  }), window.addEventListener(
2177
2248
  "builder:component:stateChangeListenerActivated",
2178
- w
2249
+ R
2179
2250
  );
2180
2251
  }
2181
- function R(m) {
2182
- const f = new URL(location.href).searchParams, v = f.get("builder.preview"), p = f.get(
2183
- `builder.preview.${v}`
2184
- ), T = f.get("apiKey") || f.get("builder.space");
2185
- v === e.model && T === e.apiKey && (!e.content || p === e.content.id) && pe({
2252
+ function w(m) {
2253
+ const h = new URL(location.href).searchParams, b = h.get("builder.preview"), x = h.get(
2254
+ `builder.preview.${b}`
2255
+ ), k = h.get("apiKey") || h.get("builder.space");
2256
+ b === e.model && k === e.apiKey && (!e.content || x === e.content.id) && Ce({
2186
2257
  model: e.model,
2187
2258
  apiKey: e.apiKey,
2188
2259
  apiVersion: e.builderContextSignal.apiVersion
2189
- }).then((E) => {
2190
- E && o(E);
2260
+ }).then((I) => {
2261
+ I && a(I);
2191
2262
  });
2192
2263
  }
2193
- return B(() => {
2264
+ return P(() => {
2194
2265
  var m;
2195
2266
  return (m = t.current) == null || m.addEventListener(
2196
2267
  "initeditingbldr",
2197
- x
2268
+ C
2198
2269
  ), () => {
2199
- var f;
2200
- return (f = t.current) == null ? void 0 : f.removeEventListener(
2270
+ var h;
2271
+ return (h = t.current) == null ? void 0 : h.removeEventListener(
2201
2272
  "initeditingbldr",
2202
- x
2273
+ C
2203
2274
  );
2204
2275
  };
2205
- }, []), B(() => {
2276
+ }, []), P(() => {
2206
2277
  var m;
2207
2278
  return (m = t.current) == null || m.addEventListener(
2208
2279
  "initpreviewingbldr",
2209
- R
2280
+ w
2210
2281
  ), () => {
2211
- var f;
2212
- return (f = t.current) == null ? void 0 : f.removeEventListener(
2282
+ var h;
2283
+ return (h = t.current) == null ? void 0 : h.removeEventListener(
2213
2284
  "initpreviewingbldr",
2214
- R
2285
+ w
2215
2286
  );
2216
2287
  };
2217
- }, []), B(() => {
2218
- var m, f;
2219
- if (F()) {
2220
- if (V() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && U(e.canTrack)) {
2221
- const p = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, T = (f = e.builderContextSignal.content) == null ? void 0 : f.id, E = e.apiKey;
2222
- re({
2288
+ }, []), P(() => {
2289
+ var m, h;
2290
+ if (N()) {
2291
+ if ($() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && U(e.canTrack)) {
2292
+ const x = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, k = (h = e.builderContextSignal.content) == null ? void 0 : h.id, I = e.apiKey;
2293
+ ce({
2223
2294
  type: "impression",
2224
2295
  canTrack: !0,
2225
- contentId: T,
2226
- apiKey: E,
2227
- variationId: p !== T ? p : void 0
2296
+ contentId: k,
2297
+ apiKey: I,
2298
+ variationId: x !== k ? x : void 0
2228
2299
  });
2229
2300
  }
2230
- Ve() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
2301
+ Fe() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
2231
2302
  }
2232
- }, []), B(() => {
2233
- e.apiKey || _.error(
2303
+ }, []), P(() => {
2304
+ e.apiKey || M.error(
2234
2305
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2235
- ), c(), C(), w();
2236
- }, []), B(() => {
2237
- e.content && o(e.content);
2238
- }, [e.content]), B(() => {
2239
- }, [a]), B(() => {
2306
+ ), c(), E(), R();
2307
+ }, []), P(() => {
2308
+ e.content && a(e.content);
2309
+ }, [e.content]), P(() => {
2310
+ }, [o]), P(() => {
2240
2311
  c();
2241
2312
  }, [
2242
- (A = ($ = e.builderContextSignal.content) == null ? void 0 : $.data) == null ? void 0 : A.jsCode,
2313
+ (B = (A = e.builderContextSignal.content) == null ? void 0 : A.data) == null ? void 0 : B.jsCode,
2243
2314
  e.builderContextSignal.rootState
2244
- ]), B(() => {
2245
- C();
2246
- }, [(W = (N = e.builderContextSignal.content) == null ? void 0 : N.data) == null ? void 0 : W.httpRequests]), B(() => {
2247
- w();
2248
- }, [e.builderContextSignal.rootState]), B(() => () => {
2249
- F() && (window.removeEventListener("message", l), window.removeEventListener(
2315
+ ]), P(() => {
2316
+ E();
2317
+ }, [(W = (F = e.builderContextSignal.content) == null ? void 0 : F.data) == null ? void 0 : W.httpRequests]), P(() => {
2318
+ R();
2319
+ }, [e.builderContextSignal.rootState]), P(() => () => {
2320
+ N() && (window.removeEventListener("message", s), window.removeEventListener(
2250
2321
  "builder:component:stateChangeListenerActivated",
2251
- w
2322
+ R
2252
2323
  ));
2253
- }, []), /* @__PURE__ */ s(te.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ ve(
2324
+ }, []), /* @__PURE__ */ r(te.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ ke(
2254
2325
  "div",
2255
2326
  {
2256
2327
  key: n,
2257
2328
  ref: t,
2258
- onClick: (m) => k(m),
2259
- "builder-content-id": (q = e.builderContextSignal.content) == null ? void 0 : q.id,
2329
+ onClick: (m) => V(m),
2330
+ "builder-content-id": (z = e.builderContextSignal.content) == null ? void 0 : z.id,
2260
2331
  "builder-model": e.model,
2261
2332
  ...e.showContent ? {} : {
2262
2333
  hidden: !0,
2263
2334
  "aria-hidden": !0
2264
2335
  },
2265
- className: e.classNameProp
2336
+ className: `variant-${((ae = e.content) == null ? void 0 : ae.testVariationId) || ((oe = e.content) == null ? void 0 : oe.id)}`
2266
2337
  },
2267
2338
  e.children
2268
2339
  ) }) : null });
2269
2340
  }
2270
- const zt = (e) => {
2271
- var a;
2272
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = e.fileUrl ?? ((a = e == null ? void 0 : e.files) == null ? void 0 : a.regular);
2273
- let o = "";
2274
- if (i && t && n && (o += `
2341
+ const qt = (e) => {
2342
+ var o;
2343
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = e.fileUrl ?? ((o = e == null ? void 0 : e.files) == null ? void 0 : o.regular);
2344
+ let a = "";
2345
+ if (i && t && n && (a += `
2275
2346
  @font-face {
2276
2347
  font-family: "${t}";
2277
2348
  src: local("${n}"), url('${i}') format('woff2');
@@ -2279,37 +2350,37 @@ font-display: fallback;
2279
2350
  font-weight: 400;
2280
2351
  }
2281
2352
  `.trim()), e.files)
2282
- for (const r in e.files) {
2283
- if (!(String(Number(r)) === r))
2353
+ for (const l in e.files) {
2354
+ if (!(String(Number(l)) === l))
2284
2355
  continue;
2285
- const c = e.files[r];
2286
- c && c !== i && (o += `
2356
+ const c = e.files[l];
2357
+ c && c !== i && (a += `
2287
2358
  @font-face {
2288
2359
  font-family: "${t}";
2289
2360
  src: url('${c}') format('woff2');
2290
2361
  font-display: fallback;
2291
- font-weight: ${r};
2362
+ font-weight: ${l};
2292
2363
  }
2293
2364
  `.trim());
2294
2365
  }
2295
- return o;
2296
- }, qt = ({
2366
+ return a;
2367
+ }, Yt = ({
2297
2368
  customFonts: e
2298
2369
  }) => {
2299
2370
  var t;
2300
- return ((t = e == null ? void 0 : e.map((n) => zt(n))) == null ? void 0 : t.join(" ")) || "";
2301
- }, Dt = ({
2371
+ return ((t = e == null ? void 0 : e.map((n) => qt(n))) == null ? void 0 : t.join(" ")) || "";
2372
+ }, Qt = ({
2302
2373
  cssCode: e,
2303
2374
  contentId: t
2304
2375
  }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
2305
2376
  function Gt(e) {
2306
- const [t, n] = I(
2377
+ const [t, n] = S(
2307
2378
  () => `
2308
- ${Dt({
2379
+ ${Qt({
2309
2380
  cssCode: e.cssCode,
2310
2381
  contentId: e.contentId
2311
2382
  })}
2312
- ${qt({
2383
+ ${Yt({
2313
2384
  customFonts: e.customFonts
2314
2385
  })}
2315
2386
 
@@ -2327,21 +2398,21 @@ ${qt({
2327
2398
  }
2328
2399
  `.trim()
2329
2400
  );
2330
- return /* @__PURE__ */ s(H, { styles: t });
2401
+ return /* @__PURE__ */ r(K, { styles: t });
2331
2402
  }
2332
2403
  const Jt = ({
2333
2404
  content: e,
2334
2405
  data: t,
2335
2406
  locale: n
2336
2407
  }) => {
2337
- var a, r, l;
2408
+ var o, l, s;
2338
2409
  const i = {};
2339
- (r = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || r.forEach((c) => {
2410
+ (l = (o = e == null ? void 0 : e.data) == null ? void 0 : o.inputs) == null || l.forEach((c) => {
2340
2411
  var d;
2341
2412
  c.name && c.defaultValue !== void 0 && ((d = e == null ? void 0 : e.data) != null && d.state) && e.data.state[c.name] === void 0 && (i[c.name] = c.defaultValue);
2342
2413
  });
2343
- const o = {
2344
- ...(l = e == null ? void 0 : e.data) == null ? void 0 : l.state,
2414
+ const a = {
2415
+ ...(s = e == null ? void 0 : e.data) == null ? void 0 : s.state,
2345
2416
  ...t,
2346
2417
  ...n ? {
2347
2418
  locale: n
@@ -2349,9 +2420,9 @@ const Jt = ({
2349
2420
  };
2350
2421
  return {
2351
2422
  ...i,
2352
- ...o
2423
+ ...a
2353
2424
  };
2354
- }, Yt = ({
2425
+ }, Xt = ({
2355
2426
  content: e,
2356
2427
  data: t
2357
2428
  }) => e ? {
@@ -2362,47 +2433,47 @@ const Jt = ({
2362
2433
  },
2363
2434
  meta: e == null ? void 0 : e.meta
2364
2435
  } : void 0;
2365
- function ye(e) {
2366
- var c, d, u, h, y, k, b;
2367
- const [t, n] = I(
2436
+ function ve(e) {
2437
+ var c, d, u, g, y, V, v;
2438
+ const [t, n] = S(
2368
2439
  () => {
2369
- var S, C;
2440
+ var p, E;
2370
2441
  return jt({
2371
2442
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2372
- variationId: (S = e.content) == null ? void 0 : S.testVariationId,
2443
+ variationId: (p = e.content) == null ? void 0 : p.testVariationId,
2373
2444
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2374
- contentId: (C = e.content) == null ? void 0 : C.id
2445
+ contentId: (E = e.content) == null ? void 0 : E.id
2375
2446
  });
2376
2447
  }
2377
2448
  );
2378
- function i(S) {
2379
- l((C) => ({
2380
- ...C,
2381
- rootState: S
2449
+ function i(p) {
2450
+ s((E) => ({
2451
+ ...E,
2452
+ rootState: p
2382
2453
  }));
2383
2454
  }
2384
- const [o, a] = I(
2455
+ const [a, o] = S(
2385
2456
  () => [
2386
- ...he(),
2457
+ ...be(),
2387
2458
  // While this `components` object is deprecated, we must maintain support for it.
2388
2459
  // Since users are able to override our default components, we need to make sure that we do not break such
2389
2460
  // existing usage.
2390
2461
  // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2391
2462
  // which is the new standard way of providing custom components, and must therefore take precedence.
2392
- ...le,
2463
+ ...se,
2393
2464
  ...e.customComponents || []
2394
2465
  ].reduce(
2395
- (S, { component: C, ...w }) => ({
2396
- ...S,
2397
- [w.name]: {
2398
- component: C,
2399
- ...ce(w)
2466
+ (p, { component: E, ...R }) => ({
2467
+ ...p,
2468
+ [R.name]: {
2469
+ component: E,
2470
+ ...de(R)
2400
2471
  }
2401
2472
  }),
2402
2473
  {}
2403
2474
  )
2404
- ), [r, l] = I(() => ({
2405
- content: Yt({
2475
+ ), [l, s] = S(() => ({
2476
+ content: Xt({
2406
2477
  content: e.content,
2407
2478
  data: e.data
2408
2479
  }),
@@ -2417,31 +2488,31 @@ function ye(e) {
2417
2488
  apiKey: e.apiKey,
2418
2489
  apiVersion: e.apiVersion,
2419
2490
  componentInfos: [
2420
- ...he(),
2491
+ ...be(),
2421
2492
  // While this `components` object is deprecated, we must maintain support for it.
2422
2493
  // Since users are able to override our default components, we need to make sure that we do not break such
2423
2494
  // existing usage.
2424
2495
  // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2425
2496
  // which is the new standard way of providing custom components, and must therefore take precedence.
2426
- ...le,
2497
+ ...se,
2427
2498
  ...e.customComponents || []
2428
2499
  ].reduce(
2429
- (S, { component: C, ...w }) => ({
2430
- ...S,
2431
- [w.name]: ce(w)
2500
+ (p, { component: E, ...R }) => ({
2501
+ ...p,
2502
+ [R.name]: de(R)
2432
2503
  }),
2433
2504
  {}
2434
2505
  ),
2435
2506
  inheritedStyles: {}
2436
2507
  }));
2437
- return /* @__PURE__ */ s(
2438
- ke.Provider,
2508
+ return /* @__PURE__ */ r(
2509
+ we.Provider,
2439
2510
  {
2440
2511
  value: {
2441
- registeredComponents: o
2512
+ registeredComponents: a
2442
2513
  },
2443
- children: /* @__PURE__ */ P(
2444
- Ht,
2514
+ children: /* @__PURE__ */ T(
2515
+ zt,
2445
2516
  {
2446
2517
  content: e.content,
2447
2518
  model: e.model,
@@ -2451,26 +2522,25 @@ function ye(e) {
2451
2522
  locale: e.locale,
2452
2523
  includeRefs: e.includeRefs,
2453
2524
  enrich: e.enrich,
2454
- classNameProp: e.classNameProp,
2455
2525
  showContent: e.showContent,
2456
- builderContextSignal: r,
2457
- setBuilderContextSignal: l,
2526
+ builderContextSignal: l,
2527
+ setBuilderContextSignal: s,
2458
2528
  children: [
2459
- e.isSsrAbTest ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(X, { scriptStr: t }) }) : null,
2460
- /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
2529
+ e.isSsrAbTest ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(X, { scriptStr: t }) }) : null,
2530
+ /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
2461
2531
  Gt,
2462
2532
  {
2463
- contentId: (c = r.content) == null ? void 0 : c.id,
2464
- cssCode: (u = (d = r.content) == null ? void 0 : d.data) == null ? void 0 : u.cssCode,
2465
- customFonts: (y = (h = r.content) == null ? void 0 : h.data) == null ? void 0 : y.customFonts
2533
+ contentId: (c = l.content) == null ? void 0 : c.id,
2534
+ cssCode: (u = (d = l.content) == null ? void 0 : d.data) == null ? void 0 : u.cssCode,
2535
+ customFonts: (y = (g = l.content) == null ? void 0 : g.data) == null ? void 0 : y.customFonts
2466
2536
  }
2467
2537
  ) }),
2468
- /* @__PURE__ */ s(
2538
+ /* @__PURE__ */ r(
2469
2539
  ie,
2470
2540
  {
2471
- blocks: (b = (k = r.content) == null ? void 0 : k.data) == null ? void 0 : b.blocks,
2472
- context: r,
2473
- registeredComponents: o
2541
+ blocks: (v = (V = l.content) == null ? void 0 : V.data) == null ? void 0 : v.blocks,
2542
+ context: l,
2543
+ registeredComponents: a
2474
2544
  }
2475
2545
  )
2476
2546
  ]
@@ -2479,55 +2549,54 @@ function ye(e) {
2479
2549
  }
2480
2550
  );
2481
2551
  }
2482
- function Pe(e) {
2483
- var r, l, c;
2484
- const [t, n] = I(
2485
- () => $t({
2552
+ function Ae(e) {
2553
+ var l, s;
2554
+ const [t, n] = S(
2555
+ () => Ft({
2486
2556
  canTrack: U(e.canTrack),
2487
2557
  content: e.content
2488
2558
  })
2489
2559
  );
2490
2560
  function i() {
2491
- var d;
2492
- return Wt(
2493
- L(e.content).map((u) => ({
2494
- id: u.testVariationId,
2495
- testRatio: u.testRatio
2561
+ var c;
2562
+ return Lt(
2563
+ j(e.content).map((d) => ({
2564
+ id: d.testVariationId,
2565
+ testRatio: d.testRatio
2496
2566
  })),
2497
- ((d = e.content) == null ? void 0 : d.id) || ""
2567
+ ((c = e.content) == null ? void 0 : c.id) || ""
2498
2568
  );
2499
2569
  }
2500
- function o() {
2501
- return L(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
2502
- }
2503
2570
  function a() {
2504
- var d;
2571
+ return j(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
2572
+ }
2573
+ function o() {
2574
+ var c;
2505
2575
  return t ? {
2506
2576
  ...e.content,
2507
- testVariationId: (d = e.content) == null ? void 0 : d.id
2508
- } : We({
2577
+ testVariationId: (c = e.content) == null ? void 0 : c.id
2578
+ } : Le({
2509
2579
  item: e.content,
2510
2580
  canTrack: U(e.canTrack)
2511
2581
  });
2512
2582
  }
2513
- return B(() => {
2514
- }, []), /* @__PURE__ */ P(g, { children: [
2515
- !e.__isNestedRender && M !== "reactNative" ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(X, { scriptStr: Nt() }) }) : null,
2516
- t ? /* @__PURE__ */ P(g, { children: [
2517
- /* @__PURE__ */ s(
2518
- H,
2583
+ return P(() => {
2584
+ }, []), /* @__PURE__ */ T(f, { children: [
2585
+ !e.__isNestedRender && L !== "reactNative" ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(X, { scriptStr: _t() }) }) : null,
2586
+ t ? /* @__PURE__ */ T(f, { children: [
2587
+ /* @__PURE__ */ r(
2588
+ K,
2519
2589
  {
2520
- id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
2521
- styles: o()
2590
+ id: `variants-styles-${(l = e.content) == null ? void 0 : l.id}`,
2591
+ styles: a()
2522
2592
  }
2523
2593
  ),
2524
- /* @__PURE__ */ s(X, { scriptStr: i() }),
2525
- (l = L(e.content)) == null ? void 0 : l.map((d) => /* @__PURE__ */ s(
2526
- ye,
2594
+ /* @__PURE__ */ r(X, { scriptStr: i() }),
2595
+ (s = j(e.content)) == null ? void 0 : s.map((c) => /* @__PURE__ */ r(
2596
+ ve,
2527
2597
  {
2528
- content: d,
2598
+ content: c,
2529
2599
  showContent: !1,
2530
- classNameProp: void 0,
2531
2600
  model: e.model,
2532
2601
  data: e.data,
2533
2602
  context: e.context,
@@ -2540,14 +2609,13 @@ function Pe(e) {
2540
2609
  enrich: e.enrich,
2541
2610
  isSsrAbTest: t
2542
2611
  },
2543
- d.testVariationId
2612
+ c.testVariationId
2544
2613
  ))
2545
2614
  ] }) : null,
2546
- /* @__PURE__ */ s(
2547
- ye,
2615
+ /* @__PURE__ */ r(
2616
+ ve,
2548
2617
  {
2549
- content: a(),
2550
- classNameProp: `variant-${(c = e.content) == null ? void 0 : c.id}`,
2618
+ content: o(),
2551
2619
  showContent: !0,
2552
2620
  model: e.model,
2553
2621
  data: e.data,
@@ -2564,13 +2632,13 @@ function Pe(e) {
2564
2632
  )
2565
2633
  ] });
2566
2634
  }
2567
- const Qt = async ({
2635
+ const Zt = async ({
2568
2636
  builderContextValue: e,
2569
2637
  symbol: t
2570
2638
  }) => {
2571
2639
  if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
2572
2640
  (e != null && e.apiKey))
2573
- return pe({
2641
+ return Ce({
2574
2642
  model: t.model,
2575
2643
  apiKey: e.apiKey,
2576
2644
  apiVersion: e.apiVersion,
@@ -2580,11 +2648,11 @@ const Qt = async ({
2580
2648
  }
2581
2649
  }
2582
2650
  }).catch((n) => {
2583
- _.error("Could not fetch symbol content: ", n);
2651
+ M.error("Could not fetch symbol content: ", n);
2584
2652
  });
2585
2653
  };
2586
- function Xt(e) {
2587
- var a, r, l;
2654
+ function en(e) {
2655
+ var o, l, s;
2588
2656
  function t() {
2589
2657
  var c, d;
2590
2658
  return [
@@ -2594,23 +2662,23 @@ function Xt(e) {
2594
2662
  (d = e.symbol) != null && d.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2595
2663
  ].filter(Boolean).join(" ");
2596
2664
  }
2597
- const [n, i] = I(() => {
2665
+ const [n, i] = S(() => {
2598
2666
  var c;
2599
2667
  return (c = e.symbol) == null ? void 0 : c.content;
2600
2668
  });
2601
- function o() {
2602
- n || Qt({
2669
+ function a() {
2670
+ n || Zt({
2603
2671
  symbol: e.symbol,
2604
2672
  builderContextValue: e.builderContext
2605
2673
  }).then((c) => {
2606
2674
  c && i(c);
2607
2675
  });
2608
2676
  }
2609
- return B(() => {
2610
- }, []), B(() => {
2611
- o();
2612
- }, [e.symbol]), /* @__PURE__ */ s("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ s(
2613
- Pe,
2677
+ return P(() => {
2678
+ }, []), P(() => {
2679
+ a();
2680
+ }, [e.symbol]), /* @__PURE__ */ r("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ r(
2681
+ Ae,
2614
2682
  {
2615
2683
  __isNestedRender: !0,
2616
2684
  apiVersion: e.builderContext.apiVersion,
@@ -2618,40 +2686,40 @@ function Xt(e) {
2618
2686
  context: e.builderContext.context,
2619
2687
  customComponents: Object.values(e.builderComponents),
2620
2688
  data: {
2621
- ...(a = e.symbol) == null ? void 0 : a.data,
2689
+ ...(o = e.symbol) == null ? void 0 : o.data,
2622
2690
  ...e.builderContext.localState,
2623
- ...(r = n == null ? void 0 : n.data) == null ? void 0 : r.state
2691
+ ...(l = n == null ? void 0 : n.data) == null ? void 0 : l.state
2624
2692
  },
2625
- model: (l = e.symbol) == null ? void 0 : l.model,
2693
+ model: (s = e.symbol) == null ? void 0 : s.model,
2626
2694
  content: n
2627
2695
  }
2628
2696
  ) });
2629
2697
  }
2630
- const nn = ie, on = Pe;
2698
+ const on = ie, rn = Ae;
2631
2699
  export {
2632
2700
  ie as Blocks,
2633
2701
  je as Button,
2634
- lt as Columns,
2635
- Pe as Content,
2636
- ct as Fragment,
2637
- ut as Image,
2638
- nn as RenderBlocks,
2639
- on as RenderContent,
2640
- mt as Section,
2641
- Xt as Symbol,
2642
- Et as Text,
2702
+ st as Columns,
2703
+ Ae as Content,
2704
+ dt as Fragment,
2705
+ ft as Image,
2706
+ on as RenderBlocks,
2707
+ rn as RenderContent,
2708
+ ht as Section,
2709
+ en as Symbol,
2710
+ Vt as Text,
2643
2711
  Bt as Video,
2644
- ln as _processContentResult,
2645
- Fe as createRegisterComponentMessage,
2646
- cn as fetchBuilderProps,
2647
- sn as fetchEntries,
2648
- pe as fetchOneEntry,
2649
- dn as getAllContent,
2650
- un as getBuilderSearchParams,
2651
- mn as getContent,
2652
- V as isEditing,
2653
- Ve as isPreviewing,
2654
- Ae as register,
2655
- fn as setEditorSettings,
2656
- hn as track
2712
+ sn as _processContentResult,
2713
+ We as createRegisterComponentMessage,
2714
+ dn as fetchBuilderProps,
2715
+ un as fetchEntries,
2716
+ Ce as fetchOneEntry,
2717
+ mn as getAllContent,
2718
+ fn as getBuilderSearchParams,
2719
+ hn as getContent,
2720
+ $ as isEditing,
2721
+ Fe as isPreviewing,
2722
+ Ne as register,
2723
+ gn as setEditorSettings,
2724
+ bn as track
2657
2725
  };