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

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