@builder.io/sdk-react-nextjs 0.14.29 → 0.14.30

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 (100) hide show
  1. package/lib/browser/blocks-exports.cjs +188 -0
  2. package/lib/browser/blocks-exports.mjs +2812 -0
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +25 -26
  5. package/lib/browser/init.cjs +8 -0
  6. package/lib/browser/init.mjs +60 -0
  7. package/lib/browser/server-entry-24a8bb57.js +720 -0
  8. package/lib/browser/server-entry-6927b611.cjs +2 -0
  9. package/lib/browser/server-entry.cjs +1 -0
  10. package/lib/browser/server-entry.mjs +16 -0
  11. package/lib/edge/blocks-exports.cjs +208 -0
  12. package/lib/edge/{bundle-f748b05a.js → blocks-exports.mjs} +2381 -2401
  13. package/lib/edge/index.cjs +1 -1
  14. package/lib/edge/index.mjs +25 -26
  15. package/lib/edge/init.cjs +8 -0
  16. package/lib/edge/init.mjs +60 -0
  17. package/lib/edge/server-entry-24a8bb57.js +720 -0
  18. package/lib/edge/server-entry-6927b611.cjs +2 -0
  19. package/lib/edge/server-entry.cjs +1 -0
  20. package/lib/edge/server-entry.mjs +16 -0
  21. package/lib/node/blocks-exports.cjs +188 -0
  22. package/lib/node/blocks-exports.mjs +2788 -0
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +23 -23
  25. package/lib/node/init.cjs +1 -0
  26. package/lib/node/init.mjs +13 -0
  27. package/lib/node/node-runtime-39bc20c5.cjs +48 -0
  28. package/lib/node/node-runtime-bf50fca0.js +167 -0
  29. package/lib/node/server-entry-3cc55723.js +720 -0
  30. package/lib/node/server-entry-8112afc1.cjs +2 -0
  31. package/lib/node/server-entry.cjs +1 -0
  32. package/lib/node/server-entry.mjs +16 -0
  33. package/package.json +14 -9
  34. package/types/cjs/blocks/BaseText.d.ts +6 -0
  35. package/types/cjs/blocks/raw-text/component-info.d.ts +2 -0
  36. package/types/cjs/blocks/raw-text/index.d.ts +1 -0
  37. package/types/cjs/blocks/raw-text/raw-text.d.ts +7 -0
  38. package/types/cjs/blocks/textarea/component-info.d.ts +2 -0
  39. package/types/cjs/blocks/textarea/index.d.ts +1 -0
  40. package/types/cjs/blocks/textarea/textarea.d.ts +13 -0
  41. package/types/cjs/components/content/index.d.ts +1 -0
  42. package/types/cjs/components/error-boundary.d.ts +11 -0
  43. package/types/cjs/constants/sdk-name.d.ts +1 -0
  44. package/types/cjs/constants/sdk-version.d.ts +1 -1
  45. package/types/cjs/functions/apply-patch-with-mutation.d.ts +10 -0
  46. package/types/cjs/functions/evaluate/edge-runtime/acorn-interpreter.d.ts +2 -0
  47. package/types/cjs/functions/evaluate/edge-runtime/edge-runtime.d.ts +2 -0
  48. package/types/cjs/functions/evaluate/edge-runtime/index.d.ts +1 -0
  49. package/types/cjs/functions/evaluate/node-runtime/index.d.ts +1 -0
  50. package/types/cjs/functions/evaluate/node-runtime/init.d.ts +13 -0
  51. package/types/cjs/functions/evaluate/node-runtime/node-runtime.d.ts +11 -0
  52. package/types/cjs/functions/evaluate/node-runtime/safeDynamicRequire.d.ts +8 -0
  53. package/types/cjs/functions/evaluate/placeholder-runtime.d.ts +2 -0
  54. package/types/cjs/functions/extract-css-var-default-value.d.ts +1 -0
  55. package/types/cjs/functions/is-edge-runtime.d.ts +4 -0
  56. package/types/cjs/functions/on-change.d.ts +7 -0
  57. package/types/cjs/helpers/omit.d.ts +1 -0
  58. package/types/cjs/helpers/time.d.ts +1 -0
  59. package/types/esm/blocks/BaseText.d.ts +6 -0
  60. package/types/esm/blocks/raw-text/component-info.d.ts +2 -0
  61. package/types/esm/blocks/raw-text/index.d.ts +1 -0
  62. package/types/esm/blocks/raw-text/raw-text.d.ts +7 -0
  63. package/types/esm/blocks/textarea/component-info.d.ts +2 -0
  64. package/types/esm/blocks/textarea/index.d.ts +1 -0
  65. package/types/esm/blocks/textarea/textarea.d.ts +13 -0
  66. package/types/esm/components/content/index.d.ts +1 -0
  67. package/types/esm/components/error-boundary.d.ts +11 -0
  68. package/types/esm/constants/sdk-name.d.ts +1 -0
  69. package/types/esm/constants/sdk-version.d.ts +1 -1
  70. package/types/esm/functions/apply-patch-with-mutation.d.ts +10 -0
  71. package/types/esm/functions/evaluate/edge-runtime/acorn-interpreter.d.ts +2 -0
  72. package/types/esm/functions/evaluate/edge-runtime/edge-runtime.d.ts +2 -0
  73. package/types/esm/functions/evaluate/edge-runtime/index.d.ts +1 -0
  74. package/types/esm/functions/evaluate/node-runtime/index.d.ts +1 -0
  75. package/types/esm/functions/evaluate/node-runtime/init.d.ts +13 -0
  76. package/types/esm/functions/evaluate/node-runtime/node-runtime.d.ts +11 -0
  77. package/types/esm/functions/evaluate/node-runtime/safeDynamicRequire.d.ts +8 -0
  78. package/types/esm/functions/evaluate/placeholder-runtime.d.ts +2 -0
  79. package/types/esm/functions/extract-css-var-default-value.d.ts +1 -0
  80. package/types/esm/functions/is-edge-runtime.d.ts +4 -0
  81. package/types/esm/functions/on-change.d.ts +7 -0
  82. package/types/esm/helpers/omit.d.ts +1 -0
  83. package/types/esm/helpers/time.d.ts +1 -0
  84. package/lib/browser/USE_CLIENT_BUNDLE-2675ec3a.js +0 -703
  85. package/lib/browser/USE_CLIENT_BUNDLE-d62c0e9f.cjs +0 -21
  86. package/lib/browser/USE_SERVER_BUNDLE-22146bcb.cjs +0 -1
  87. package/lib/browser/USE_SERVER_BUNDLE-a878761a.js +0 -11
  88. package/lib/browser/bundle-4aca3c04.cjs +0 -169
  89. package/lib/browser/bundle-9acde1f6.js +0 -2832
  90. package/lib/edge/USE_CLIENT_BUNDLE-744a0d92.js +0 -703
  91. package/lib/edge/USE_CLIENT_BUNDLE-ad07ada0.cjs +0 -21
  92. package/lib/edge/USE_SERVER_BUNDLE-50d2bf59.cjs +0 -1
  93. package/lib/edge/USE_SERVER_BUNDLE-d2138019.js +0 -11
  94. package/lib/edge/bundle-6770809f.cjs +0 -189
  95. package/lib/node/USE_CLIENT_BUNDLE-2f8a2b0f.cjs +0 -21
  96. package/lib/node/USE_CLIENT_BUNDLE-bdfd3683.js +0 -703
  97. package/lib/node/USE_SERVER_BUNDLE-786cc2c7.cjs +0 -1
  98. package/lib/node/USE_SERVER_BUNDLE-a6561926.js +0 -11
  99. package/lib/node/bundle-8b02f7d4.cjs +0 -216
  100. package/lib/node/bundle-ca4c205c.js +0 -2953
@@ -0,0 +1,2788 @@
1
+ "use client";
2
+ var Ne = Object.defineProperty;
3
+ var Ae = (e, t, n) => t in e ? Ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
+ var ee = (e, t, n) => (Ae(e, typeof t != "symbol" ? t + "" : t, n), n);
5
+ import { jsx as c, Fragment as C, jsxs as E } from "react/jsx-runtime";
6
+ import { TARGET as B, checkIsDefined as K, logger as J, isBrowser as z, fastClone as ie, isEditing as $, init as Ve, getDefaultCanTrack as q, _track as ue, isPreviewing as $e, createEditorListener as Fe, fetch as Le, registerInsertMenu as je, setupBrowserForEditing as De, createRegisterComponentMessage as Oe, fetchOneEntry as ve, serializeComponentInfo as me, handleABTestingSync as _e } from "./server-entry-3cc55723.js";
7
+ import { getFunctionArguments as He, runInNode as Ue, parseCode as Me, getBuilderGlobals as Ke, set as ze } from "./node-runtime-bf50fca0.js";
8
+ import { useRef as oe, useState as A, useEffect as T, createContext as qe } from "react";
9
+ import { useRouter as Ye } from "next/navigation";
10
+ import "lru-cache";
11
+ const Je = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Qe = (e) => typeof e == "string" && Je.has(e.toLowerCase());
12
+ function ae(e) {
13
+ return /* @__PURE__ */ c(C, { children: Qe(e.TagName) ? /* @__PURE__ */ c(C, { children: /* @__PURE__ */ c(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ c(C, { children: typeof e.TagName == "string" ? /* @__PURE__ */ c(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ c(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
14
+ }
15
+ const O = () => {
16
+ switch (B) {
17
+ case "react":
18
+ case "reactNative":
19
+ case "rsc":
20
+ return "className";
21
+ case "svelte":
22
+ case "vue":
23
+ case "solid":
24
+ case "qwik":
25
+ case "angular":
26
+ return "class";
27
+ }
28
+ };
29
+ function Ge(e) {
30
+ function t() {
31
+ return {
32
+ ...e.attributes,
33
+ [O()]: `${e.link ? "" : "builder-button"} ${e.attributes[O()] || ""}`,
34
+ ...e.link ? {
35
+ href: e.link,
36
+ target: e.openLinkInNewTab ? "_blank" : void 0,
37
+ role: "link"
38
+ } : {
39
+ role: "button"
40
+ }
41
+ };
42
+ }
43
+ return /* @__PURE__ */ c(
44
+ ae,
45
+ {
46
+ attributes: t(),
47
+ TagName: e.link ? e.builderLinkComponent || "a" : "button",
48
+ actionAttributes: {},
49
+ children: e.text
50
+ }
51
+ );
52
+ }
53
+ function Xe(e) {
54
+ var t;
55
+ return {
56
+ ...(t = e.component) == null ? void 0 : t.options,
57
+ ...e.options
58
+ };
59
+ }
60
+ const Ze = ({
61
+ code: e,
62
+ builder: t,
63
+ context: n,
64
+ event: i,
65
+ localState: o,
66
+ rootSetState: a,
67
+ rootState: l
68
+ }) => {
69
+ const r = He({
70
+ builder: t,
71
+ context: n,
72
+ event: i,
73
+ state: ke({
74
+ rootState: l,
75
+ localState: o,
76
+ rootSetState: a
77
+ })
78
+ });
79
+ return new Function(...r.map(([s]) => s), e)(...r.map(([, s]) => s));
80
+ };
81
+ function ke({
82
+ rootState: e,
83
+ localState: t,
84
+ rootSetState: n
85
+ }) {
86
+ return new Proxy(e, {
87
+ get: (i, o) => {
88
+ if (t && o in t)
89
+ return t[o];
90
+ const a = i[o];
91
+ return typeof a == "object" && a !== null ? ke({
92
+ rootState: a,
93
+ localState: void 0,
94
+ rootSetState: n ? (l) => {
95
+ i[o] = l, n(i);
96
+ } : void 0
97
+ }) : a;
98
+ },
99
+ set: (i, o, a) => {
100
+ if (t && o in t)
101
+ throw new Error("Writing to local state is not allowed as it is read-only.");
102
+ return i[o] = a, n == null || n(i), !0;
103
+ }
104
+ });
105
+ }
106
+ function et() {
107
+ var e;
108
+ return typeof process != "undefined" && K((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
109
+ }
110
+ const tt = () => {
111
+ var i;
112
+ if (!et())
113
+ return !1;
114
+ const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
115
+ return e && t && !n ? (J.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;
116
+ }, nt = (e) => z() || tt() ? Ze(e) : Ue(e), N = class N {
117
+ static getCacheKey(t) {
118
+ return JSON.stringify({
119
+ ...t,
120
+ // replace the event with a random number to break cache
121
+ // thats because we can't serialize the event object due to circular refs in DOM node refs.
122
+ event: t.event ? Math.random() : void 0
123
+ });
124
+ }
125
+ static getCachedValue(t) {
126
+ return N.cache.get(t);
127
+ }
128
+ static setCachedValue(t, n) {
129
+ N.cache.size > 20 && N.cache.delete(N.cache.keys().next().value), N.cache.set(t, {
130
+ value: n
131
+ });
132
+ }
133
+ };
134
+ ee(N, "cacheLimit", 20), ee(N, "cache", /* @__PURE__ */ new Map());
135
+ let L = N;
136
+ function _({
137
+ code: e,
138
+ context: t,
139
+ localState: n,
140
+ rootState: i,
141
+ rootSetState: o,
142
+ event: a,
143
+ isExpression: l = !0,
144
+ enableCache: r
145
+ }) {
146
+ if (e === "")
147
+ return;
148
+ const s = {
149
+ code: Me(e, {
150
+ isExpression: l
151
+ }),
152
+ builder: Ke(),
153
+ context: t,
154
+ event: a,
155
+ rootSetState: o,
156
+ rootState: i,
157
+ localState: n
158
+ };
159
+ if (r) {
160
+ const d = L.getCacheKey(s), m = L.getCachedValue(d);
161
+ if (m)
162
+ return m.value;
163
+ }
164
+ try {
165
+ const d = nt(s);
166
+ if (r) {
167
+ const m = L.getCacheKey(s);
168
+ L.setCachedValue(m, d);
169
+ }
170
+ return d;
171
+ } catch (d) {
172
+ J.error("Failed code evaluation: " + d.message, {
173
+ code: e
174
+ });
175
+ return;
176
+ }
177
+ }
178
+ const it = ({
179
+ block: e,
180
+ context: t,
181
+ localState: n,
182
+ rootState: i,
183
+ rootSetState: o
184
+ }) => {
185
+ if (!e.bindings)
186
+ return e;
187
+ const a = ie(e), l = {
188
+ ...a,
189
+ properties: {
190
+ ...a.properties
191
+ },
192
+ actions: {
193
+ ...a.actions
194
+ }
195
+ };
196
+ for (const r in e.bindings) {
197
+ const s = e.bindings[r], d = _({
198
+ code: s,
199
+ localState: n,
200
+ rootState: i,
201
+ rootSetState: o,
202
+ context: t,
203
+ enableCache: !0
204
+ });
205
+ ze(l, r, d);
206
+ }
207
+ return l;
208
+ };
209
+ function Y({
210
+ block: e,
211
+ context: t,
212
+ shouldEvaluateBindings: n,
213
+ localState: i,
214
+ rootState: o,
215
+ rootSetState: a
216
+ }) {
217
+ const l = e;
218
+ return n ? it({
219
+ block: l,
220
+ localState: i,
221
+ rootState: o,
222
+ rootSetState: a,
223
+ context: t
224
+ }) : l;
225
+ }
226
+ const re = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "", Ce = (e) => Object.entries(e).map(([n, i]) => {
227
+ if (typeof i == "string")
228
+ return `${re(n)}: ${i};`;
229
+ }).filter(K), ot = (e) => Ce(e).join(`
230
+ `), U = ({
231
+ mediaQuery: e,
232
+ className: t,
233
+ styles: n
234
+ }) => {
235
+ const i = `.${t} {
236
+ ${ot(n)}
237
+ }`;
238
+ return e ? `${e} {
239
+ ${i}
240
+ }` : i;
241
+ };
242
+ function at({
243
+ style: e
244
+ }) {
245
+ return e;
246
+ }
247
+ const rt = ({
248
+ block: e,
249
+ context: t
250
+ }) => Ie(at({
251
+ style: e.style || {},
252
+ context: t,
253
+ block: e
254
+ }));
255
+ function Ie(e) {
256
+ switch (B) {
257
+ case "svelte":
258
+ case "vue":
259
+ case "solid":
260
+ case "angular":
261
+ return Ce(e).join(" ");
262
+ case "qwik":
263
+ case "reactNative":
264
+ case "react":
265
+ case "rsc":
266
+ return e;
267
+ }
268
+ }
269
+ const lt = ({
270
+ block: e,
271
+ context: t,
272
+ registeredComponents: n
273
+ }) => {
274
+ var a;
275
+ const i = (a = Y({
276
+ block: e,
277
+ localState: t.localState,
278
+ rootState: t.rootState,
279
+ rootSetState: t.rootSetState,
280
+ context: t.context,
281
+ shouldEvaluateBindings: !1
282
+ }).component) == null ? void 0 : a.name;
283
+ if (!i)
284
+ return null;
285
+ const o = n[i];
286
+ if (o)
287
+ return o;
288
+ console.warn(`
289
+ Could not find a registered component named "${i}".
290
+ If you registered it, is the file that registered it imported by the file that needs to render it?`);
291
+ }, ct = ({
292
+ block: e,
293
+ context: t
294
+ }) => {
295
+ const {
296
+ repeat: n,
297
+ ...i
298
+ } = e;
299
+ if (!(n != null && n.collection))
300
+ return;
301
+ const o = _({
302
+ code: n.collection,
303
+ localState: t.localState,
304
+ rootState: t.rootState,
305
+ rootSetState: t.rootSetState,
306
+ context: t.context,
307
+ enableCache: !0
308
+ });
309
+ if (!Array.isArray(o))
310
+ return;
311
+ const a = n.collection.split(".").pop(), l = n.itemName || (a ? a + "Item" : "item");
312
+ return o.map((s, d) => ({
313
+ context: {
314
+ ...t,
315
+ localState: {
316
+ ...t.localState,
317
+ $index: d,
318
+ $item: s,
319
+ [l]: s,
320
+ [`$${l}Index`]: d
321
+ }
322
+ },
323
+ block: i
324
+ }));
325
+ }, st = (e, t) => e && (e.isRSC && B === "rsc" || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(e.name)) ? {
326
+ builderLinkComponent: t
327
+ } : {}, dt = (e, t) => e && (e.isRSC && B === "rsc" || ["Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(e.name)) ? {
328
+ builderComponents: t
329
+ } : {}, ut = (e, t) => e && (e.isRSC && B === "rsc" || B === "reactNative" || ["Builder:Accordion", "Columns", "Form:Form", "Builder: Tabs", "Symbol", "Image", "Video"].includes(e.name)) ? {
330
+ builderBlock: t
331
+ } : {}, mt = (e, t) => e && (e.isRSC && B === "rsc" || ["Builder:Accordion", "Columns", "Form:Form", "Builder: Tabs", "Symbol", "Slot"].includes(e.name)) ? {
332
+ builderContext: t
333
+ } : {}, we = {
334
+ small: {
335
+ min: 320,
336
+ default: 321,
337
+ max: 640
338
+ },
339
+ medium: {
340
+ min: 641,
341
+ default: 642,
342
+ max: 991
343
+ },
344
+ large: {
345
+ min: 990,
346
+ default: 991,
347
+ max: 1200
348
+ }
349
+ }, fe = (e, t = we) => `@media (max-width: ${t[e].max}px)`, Te = ({
350
+ small: e,
351
+ medium: t
352
+ }) => {
353
+ const n = ie(we);
354
+ if (!e || !t)
355
+ return n;
356
+ const i = Math.floor(e / 2);
357
+ n.small = {
358
+ max: e,
359
+ min: i,
360
+ default: i + 1
361
+ };
362
+ const o = n.small.max + 1;
363
+ n.medium = {
364
+ max: t,
365
+ min: o,
366
+ default: o + 1
367
+ };
368
+ const a = n.medium.max + 1;
369
+ return n.large = {
370
+ max: 2e3,
371
+ // TODO: decide upper limit
372
+ min: a,
373
+ default: a + 1
374
+ }, n;
375
+ };
376
+ function Q(e) {
377
+ return /* @__PURE__ */ c(
378
+ "style",
379
+ {
380
+ dangerouslySetInnerHTML: { __html: e.styles },
381
+ "data-id": e.id
382
+ }
383
+ );
384
+ }
385
+ function ft(e) {
386
+ const t = function() {
387
+ const o = Y({
388
+ block: e.block,
389
+ localState: e.context.localState,
390
+ rootState: e.context.rootState,
391
+ rootSetState: e.context.rootSetState,
392
+ context: e.context.context,
393
+ shouldEvaluateBindings: !0
394
+ });
395
+ return K(o.hide) ? !o.hide : K(o.show) ? o.show : !0;
396
+ }, n = function() {
397
+ var x, b, I;
398
+ const o = Y({
399
+ block: e.block,
400
+ localState: e.context.localState,
401
+ rootState: e.context.rootState,
402
+ rootSetState: e.context.rootSetState,
403
+ context: e.context.context,
404
+ shouldEvaluateBindings: !0
405
+ }), a = o.responsiveStyles, l = e.context.content, r = Te(
406
+ ((x = l == null ? void 0 : l.meta) == null ? void 0 : x.breakpoints) || {}
407
+ ), s = a == null ? void 0 : a.large, d = a == null ? void 0 : a.medium, m = a == null ? void 0 : a.small, u = o.id;
408
+ if (!u)
409
+ return "";
410
+ const h = s ? U({
411
+ className: u,
412
+ styles: s
413
+ }) : "", v = d ? U({
414
+ className: u,
415
+ styles: d,
416
+ mediaQuery: fe(
417
+ "medium",
418
+ r
419
+ )
420
+ }) : "", w = m ? U({
421
+ className: u,
422
+ styles: m,
423
+ mediaQuery: fe(
424
+ "small",
425
+ r
426
+ )
427
+ }) : "", y = o.animations && o.animations.find((R) => R.trigger === "hover");
428
+ let V = "";
429
+ if (y) {
430
+ const R = ((I = (b = y.steps) == null ? void 0 : b[1]) == null ? void 0 : I.styles) || {};
431
+ V = U({
432
+ className: `${u}:hover`,
433
+ styles: {
434
+ ...R,
435
+ transition: `all ${y.duration}s ${re(
436
+ y.easing
437
+ )}`,
438
+ transitionDelay: y.delay ? `${y.delay}s` : "0s"
439
+ }
440
+ }) || "";
441
+ }
442
+ return [
443
+ h,
444
+ v,
445
+ w,
446
+ V
447
+ ].join(" ");
448
+ };
449
+ return /* @__PURE__ */ c(C, { children: n() && t() ? /* @__PURE__ */ c(C, { children: /* @__PURE__ */ c(Q, { id: "builderio-block", styles: n() }) }) : null });
450
+ }
451
+ function ht(e) {
452
+ return e.charAt(0).toUpperCase() + e.slice(1);
453
+ }
454
+ const gt = (e) => `on${ht(e)}`, bt = (e, t) => (n) => _({
455
+ code: e,
456
+ context: t.context,
457
+ localState: t.localState,
458
+ rootState: t.rootState,
459
+ rootSetState: t.rootSetState,
460
+ event: n,
461
+ isExpression: !1,
462
+ enableCache: !0
463
+ });
464
+ function Re(e) {
465
+ var i;
466
+ const t = {}, n = (i = e.block.actions) != null ? i : {};
467
+ for (const o in n) {
468
+ if (!n.hasOwnProperty(o))
469
+ continue;
470
+ const a = n[o];
471
+ let l = gt(o);
472
+ if (e.stripPrefix)
473
+ switch (B) {
474
+ case "vue":
475
+ l = l.replace("v-on:", "");
476
+ break;
477
+ case "svelte":
478
+ l = l.replace("on:", "");
479
+ break;
480
+ }
481
+ t[l] = bt(a, e);
482
+ }
483
+ return t;
484
+ }
485
+ function yt({
486
+ properties: e
487
+ }) {
488
+ return e;
489
+ }
490
+ const St = (e) => ({
491
+ href: e.href
492
+ });
493
+ function le({
494
+ block: e,
495
+ context: t
496
+ }) {
497
+ var i;
498
+ const n = {
499
+ ...St(e),
500
+ ...e.properties,
501
+ "builder-id": e.id,
502
+ style: rt({
503
+ block: e,
504
+ context: t
505
+ }),
506
+ [O()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
507
+ };
508
+ return yt({
509
+ properties: n,
510
+ context: t,
511
+ block: e
512
+ });
513
+ }
514
+ function pt(e) {
515
+ return /* @__PURE__ */ c(
516
+ ae,
517
+ {
518
+ TagName: e.Wrapper,
519
+ attributes: le({
520
+ block: e.block,
521
+ context: e.context
522
+ }),
523
+ actionAttributes: Re({
524
+ block: e.block,
525
+ rootState: e.context.rootState,
526
+ rootSetState: e.context.rootSetState,
527
+ localState: e.context.localState,
528
+ context: e.context.context,
529
+ stripPrefix: !0
530
+ }),
531
+ children: e.children
532
+ }
533
+ );
534
+ }
535
+ function xt(e) {
536
+ function t() {
537
+ return e.includeBlockProps ? {
538
+ ...le({
539
+ block: e.block,
540
+ context: e.context
541
+ }),
542
+ ...Re({
543
+ block: e.block,
544
+ rootState: e.context.rootState,
545
+ rootSetState: e.context.rootSetState,
546
+ localState: e.context.localState,
547
+ context: e.context.context
548
+ })
549
+ } : {};
550
+ }
551
+ return /* @__PURE__ */ c(e.Wrapper, { ...e.wrapperProps, attributes: t(), children: e.children });
552
+ }
553
+ const vt = ({
554
+ componentOptions: e,
555
+ builderBlock: t,
556
+ context: n,
557
+ componentRef: i,
558
+ includeBlockProps: o,
559
+ isInteractive: a,
560
+ contextValue: l
561
+ }) => {
562
+ const r = {
563
+ ...e,
564
+ /**
565
+ * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
566
+ * component itself directly. Otherwise, they are provided to the wrapper element.
567
+ */
568
+ ...o ? {
569
+ attributes: le({
570
+ block: t,
571
+ context: l
572
+ })
573
+ } : {}
574
+ };
575
+ return a ? {
576
+ Wrapper: i,
577
+ block: t,
578
+ context: n,
579
+ wrapperProps: e,
580
+ includeBlockProps: o
581
+ } : r;
582
+ };
583
+ function he(e) {
584
+ var n;
585
+ const t = e.isInteractive ? xt : e.componentRef;
586
+ return /* @__PURE__ */ c(C, { children: e.componentRef ? /* @__PURE__ */ c(C, { children: /* @__PURE__ */ c(
587
+ t,
588
+ {
589
+ ...vt({
590
+ componentOptions: e.componentOptions,
591
+ builderBlock: e.builderBlock,
592
+ context: e.context,
593
+ componentRef: e.componentRef,
594
+ linkComponent: e.linkComponent,
595
+ includeBlockProps: e.includeBlockProps,
596
+ isInteractive: e.isInteractive,
597
+ contextValue: e.context
598
+ }),
599
+ children: (n = e.blockChildren) == null ? void 0 : n.map((i) => /* @__PURE__ */ c(
600
+ G,
601
+ {
602
+ block: i,
603
+ context: e.context,
604
+ registeredComponents: e.registeredComponents,
605
+ linkComponent: e.linkComponent
606
+ },
607
+ i.id
608
+ ))
609
+ }
610
+ ) }) : null });
611
+ }
612
+ function kt(e) {
613
+ const t = e.repeatContext;
614
+ return /* @__PURE__ */ c(
615
+ G,
616
+ {
617
+ block: e.block,
618
+ context: t,
619
+ registeredComponents: e.registeredComponents,
620
+ linkComponent: e.linkComponent
621
+ }
622
+ );
623
+ }
624
+ function G(e) {
625
+ var s, d, m;
626
+ const t = function() {
627
+ return lt({
628
+ block: e.block,
629
+ context: e.context,
630
+ registeredComponents: e.registeredComponents
631
+ });
632
+ }, n = function() {
633
+ return ct({
634
+ block: e.block,
635
+ context: e.context
636
+ });
637
+ }, i = function() {
638
+ var h;
639
+ return (h = e.block.repeat) != null && h.collection ? e.block : Y({
640
+ block: e.block,
641
+ localState: e.context.localState,
642
+ rootState: e.context.rootState,
643
+ rootSetState: e.context.rootSetState,
644
+ context: e.context.context,
645
+ shouldEvaluateBindings: !0
646
+ });
647
+ }, o = function() {
648
+ var v;
649
+ return e.block.tagName === "a" || ((v = i().properties) == null ? void 0 : v.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
650
+ }, a = function() {
651
+ var w, y;
652
+ if ((w = e.block.repeat) != null && w.collection)
653
+ return !!((y = n()) != null && y.length);
654
+ const h = "hide" in i() ? i().hide : !1;
655
+ return ("show" in i() ? i().show : !0) && !h;
656
+ }, l = function() {
657
+ var v, w;
658
+ return !((v = t()) != null && v.component) && !n() ? (w = i().children) != null ? w : [] : [];
659
+ }, r = function() {
660
+ var h, v, w, y;
661
+ return {
662
+ blockChildren: (h = i().children) != null ? h : [],
663
+ componentRef: (v = t()) == null ? void 0 : v.component,
664
+ componentOptions: {
665
+ ...Xe(i()),
666
+ ...ut(t(), i()),
667
+ ...mt(t(), e.context),
668
+ ...st(t(), e.linkComponent),
669
+ ...dt(
670
+ t(),
671
+ e.registeredComponents
672
+ )
673
+ },
674
+ context: e.context,
675
+ linkComponent: e.linkComponent,
676
+ registeredComponents: e.registeredComponents,
677
+ builderBlock: i(),
678
+ includeBlockProps: ((w = t()) == null ? void 0 : w.noWrap) === !0,
679
+ isInteractive: !((y = t()) != null && y.isRSC)
680
+ };
681
+ };
682
+ return /* @__PURE__ */ c(C, { children: a() ? /* @__PURE__ */ E(C, { children: [
683
+ /* @__PURE__ */ c(ft, { block: e.block, context: e.context }),
684
+ (s = t()) != null && s.noWrap ? /* @__PURE__ */ c(C, { children: /* @__PURE__ */ c(
685
+ he,
686
+ {
687
+ componentRef: r().componentRef,
688
+ componentOptions: r().componentOptions,
689
+ blockChildren: r().blockChildren,
690
+ context: r().context,
691
+ registeredComponents: r().registeredComponents,
692
+ linkComponent: r().linkComponent,
693
+ builderBlock: r().builderBlock,
694
+ includeBlockProps: r().includeBlockProps,
695
+ isInteractive: r().isInteractive
696
+ }
697
+ ) }) : /* @__PURE__ */ c(C, { children: n() ? /* @__PURE__ */ c(C, { children: (m = n()) == null ? void 0 : m.map((u, h) => /* @__PURE__ */ c(
698
+ kt,
699
+ {
700
+ repeatContext: u.context,
701
+ block: u.block,
702
+ registeredComponents: e.registeredComponents,
703
+ linkComponent: e.linkComponent
704
+ },
705
+ h
706
+ )) }) : /* @__PURE__ */ E(
707
+ pt,
708
+ {
709
+ Wrapper: o(),
710
+ block: i(),
711
+ context: e.context,
712
+ children: [
713
+ /* @__PURE__ */ c(
714
+ he,
715
+ {
716
+ componentRef: r().componentRef,
717
+ componentOptions: r().componentOptions,
718
+ blockChildren: r().blockChildren,
719
+ context: r().context,
720
+ registeredComponents: r().registeredComponents,
721
+ linkComponent: r().linkComponent,
722
+ builderBlock: r().builderBlock,
723
+ includeBlockProps: r().includeBlockProps,
724
+ isInteractive: r().isInteractive
725
+ }
726
+ ),
727
+ (d = l()) == null ? void 0 : d.map((u) => /* @__PURE__ */ c(
728
+ G,
729
+ {
730
+ block: u,
731
+ registeredComponents: e.registeredComponents,
732
+ linkComponent: e.linkComponent,
733
+ context: e.context
734
+ },
735
+ u.id
736
+ ))
737
+ ]
738
+ }
739
+ ) })
740
+ ] }) : null });
741
+ }
742
+ function Ct(e) {
743
+ function t() {
744
+ var o;
745
+ return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
746
+ }
747
+ function n() {
748
+ var o, a;
749
+ $() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
750
+ {
751
+ type: "builder.clickEmptyBlocks",
752
+ data: {
753
+ parentElementId: e.parent,
754
+ dataPath: e.path
755
+ }
756
+ },
757
+ "*"
758
+ ));
759
+ }
760
+ function i() {
761
+ var o, a;
762
+ $() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
763
+ {
764
+ type: "builder.hoverEmptyBlocks",
765
+ data: {
766
+ parentElementId: e.parent,
767
+ dataPath: e.path
768
+ }
769
+ },
770
+ "*"
771
+ ));
772
+ }
773
+ return /* @__PURE__ */ E(C, { children: [
774
+ /* @__PURE__ */ c(
775
+ e.BlocksWrapper,
776
+ {
777
+ className: t() + " props-blocks-wrapper-7cd1560e",
778
+ "builder-path": e.path,
779
+ "builder-parent-id": e.parent,
780
+ style: e.styleProp,
781
+ onClick: (o) => n(),
782
+ onMouseEnter: (o) => i(),
783
+ onKeyPress: (o) => n(),
784
+ ...e.BlocksWrapperProps,
785
+ children: e.children
786
+ }
787
+ ),
788
+ /* @__PURE__ */ c("style", { children: `.props-blocks-wrapper-7cd1560e {
789
+ display: flex;
790
+ flex-direction: column;
791
+ align-items: stretch;
792
+ }` })
793
+ ] });
794
+ }
795
+ function ce(e) {
796
+ var t, n, i;
797
+ return /* @__PURE__ */ c(
798
+ Ct,
799
+ {
800
+ blocks: e.blocks,
801
+ parent: e.parent,
802
+ path: e.path,
803
+ styleProp: e.styleProp,
804
+ BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
805
+ BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
806
+ children: e.blocks ? /* @__PURE__ */ c(C, { children: (i = e.blocks) == null ? void 0 : i.map((o) => /* @__PURE__ */ c(
807
+ G,
808
+ {
809
+ block: o,
810
+ linkComponent: e.linkComponent,
811
+ context: e.context,
812
+ registeredComponents: e.registeredComponents
813
+ },
814
+ o.id
815
+ )) }) : null
816
+ }
817
+ );
818
+ }
819
+ const It = (e) => `builder-columns ${e}-breakpoints`;
820
+ function wt(e) {
821
+ var y, V;
822
+ const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], i = e.stackColumnsAt || "tablet", o = function(b) {
823
+ return b.link ? e.builderLinkComponent || "a" : "div";
824
+ }, a = function(b) {
825
+ var I;
826
+ return ((I = n[b]) == null ? void 0 : I.width) || 100 / n.length;
827
+ }, l = function(b) {
828
+ const I = t * (n.length - 1) / n.length;
829
+ return `calc(${a(b)}% - ${I}px)`;
830
+ }, r = function({
831
+ stackedStyle: b,
832
+ desktopStyle: I
833
+ }) {
834
+ return i === "tablet" ? b : I;
835
+ }, s = function({
836
+ stackedStyle: b,
837
+ desktopStyle: I
838
+ }) {
839
+ return i === "never" ? I : b;
840
+ }, d = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", m = function() {
841
+ return {
842
+ "--flex-dir": d,
843
+ "--flex-dir-tablet": r({
844
+ stackedStyle: d,
845
+ desktopStyle: "row"
846
+ })
847
+ };
848
+ }, u = function(b) {
849
+ const I = b === 0 ? 0 : t, R = l(b), W = `${I}px`, j = "100%", D = 0;
850
+ return {
851
+ ...{
852
+ display: "flex",
853
+ flexDirection: "column",
854
+ alignItems: "stretch"
855
+ },
856
+ width: R,
857
+ ["marginLeft"]: W,
858
+ "--column-width-mobile": s({
859
+ stackedStyle: j,
860
+ desktopStyle: R
861
+ }),
862
+ "--column-margin-left-mobile": s({
863
+ stackedStyle: D,
864
+ desktopStyle: W
865
+ }),
866
+ "--column-width-tablet": r({
867
+ stackedStyle: j,
868
+ desktopStyle: R
869
+ }),
870
+ "--column-margin-left-tablet": r({
871
+ stackedStyle: D,
872
+ desktopStyle: W
873
+ })
874
+ };
875
+ }, h = function(b) {
876
+ var R, W;
877
+ return Te(
878
+ ((W = (R = e.builderContext.content) == null ? void 0 : R.meta) == null ? void 0 : W.breakpoints) || {}
879
+ )[b].max;
880
+ }, v = function() {
881
+ return `
882
+ @media (max-width: ${h("medium")}px) {
883
+ .${e.builderBlock.id}-breakpoints {
884
+ flex-direction: var(--flex-dir-tablet);
885
+ align-items: stretch;
886
+ }
887
+
888
+ .${e.builderBlock.id}-breakpoints > .builder-column {
889
+ width: var(--column-width-tablet) !important;
890
+ margin-left: var(--column-margin-left-tablet) !important;
891
+ }
892
+ }
893
+
894
+ @media (max-width: ${h("small")}px) {
895
+ .${e.builderBlock.id}-breakpoints {
896
+ flex-direction: var(--flex-dir);
897
+ align-items: stretch;
898
+ }
899
+
900
+ .${e.builderBlock.id}-breakpoints > .builder-column {
901
+ width: var(--column-width-mobile) !important;
902
+ margin-left: var(--column-margin-left-mobile) !important;
903
+ }
904
+ },
905
+ `;
906
+ }, w = function(b, I) {
907
+ return {
908
+ ...b.link ? {
909
+ href: b.link
910
+ } : {},
911
+ [O()]: "builder-column",
912
+ style: Ie(u(I))
913
+ };
914
+ };
915
+ return /* @__PURE__ */ E(C, { children: [
916
+ /* @__PURE__ */ E(
917
+ "div",
918
+ {
919
+ className: It((y = e.builderBlock) == null ? void 0 : y.id) + " div-eeca3604",
920
+ style: m(),
921
+ children: [
922
+ /* @__PURE__ */ c(Q, { id: "builderio-columns", styles: v() }),
923
+ (V = e.columns) == null ? void 0 : V.map((x, b) => /* @__PURE__ */ c(
924
+ ae,
925
+ {
926
+ TagName: o(x),
927
+ actionAttributes: {},
928
+ attributes: w(x, b),
929
+ children: /* @__PURE__ */ c(
930
+ ce,
931
+ {
932
+ path: `component.options.columns.${b}.blocks`,
933
+ parent: e.builderBlock.id,
934
+ styleProp: {
935
+ flexGrow: "1"
936
+ },
937
+ context: e.builderContext,
938
+ registeredComponents: e.builderComponents,
939
+ linkComponent: e.builderLinkComponent,
940
+ blocks: x.blocks
941
+ }
942
+ )
943
+ },
944
+ b
945
+ ))
946
+ ]
947
+ }
948
+ ),
949
+ /* @__PURE__ */ c("style", { children: `.div-eeca3604 {
950
+ display: flex;
951
+ line-height: normal;
952
+ }` })
953
+ ] });
954
+ }
955
+ function Tt(e) {
956
+ return /* @__PURE__ */ c("span", { children: e.children });
957
+ }
958
+ function ge(e) {
959
+ return e.replace(/http(s)?:/, "");
960
+ }
961
+ function Rt(e = "", t, n) {
962
+ const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
963
+ return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
964
+ }
965
+ function Et(e, t) {
966
+ if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
967
+ return e;
968
+ if (t === "master")
969
+ return ge(e);
970
+ const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
971
+ if (n) {
972
+ const i = e.split(n[0]), o = n[3], a = t.match("x") ? t : `${t}x`;
973
+ return ge(`${i[0]}_${a}${o}`);
974
+ }
975
+ return null;
976
+ }
977
+ function te(e) {
978
+ if (!e)
979
+ return e;
980
+ const t = [100, 200, 400, 800, 1200, 1600, 2e3];
981
+ if (e.match(/builder\.io/)) {
982
+ let n = e;
983
+ const i = Number(e.split("?width=")[1]);
984
+ return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${Rt(e, "width", o)} ${o}w`).concat([n]).join(", ");
985
+ }
986
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Et(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
987
+ }
988
+ function Pt(e) {
989
+ var o, a, l, r, s, d;
990
+ function t() {
991
+ var h;
992
+ const u = e.image || e.src;
993
+ if (!u || // We can auto add srcset for cdn.builder.io and shopify
994
+ // images, otherwise you can supply this prop manually
995
+ !(u.match(/builder\.io/) || u.match(/cdn\.shopify\.com/)))
996
+ return e.srcset;
997
+ if (e.srcset && ((h = e.image) != null && h.includes("builder.io/api/v1/image"))) {
998
+ if (!e.srcset.includes(e.image.split("?")[0]))
999
+ return console.debug("Removed given srcset"), te(u);
1000
+ } else if (e.image && !e.srcset)
1001
+ return te(u);
1002
+ return te(u);
1003
+ }
1004
+ function n() {
1005
+ var m;
1006
+ return (m = t == null ? void 0 : t()) != null && m.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
1007
+ }
1008
+ function i() {
1009
+ const m = {
1010
+ position: "absolute",
1011
+ height: "100%",
1012
+ width: "100%",
1013
+ left: "0px",
1014
+ top: "0px"
1015
+ };
1016
+ return e.aspectRatio ? m : void 0;
1017
+ }
1018
+ return /* @__PURE__ */ E(C, { children: [
1019
+ /* @__PURE__ */ E(C, { children: [
1020
+ /* @__PURE__ */ E("picture", { children: [
1021
+ n() ? /* @__PURE__ */ c("source", { type: "image/webp", srcSet: n() }) : null,
1022
+ /* @__PURE__ */ c(
1023
+ "img",
1024
+ {
1025
+ loading: e.highPriority ? "eager" : "lazy",
1026
+ fetchPriority: e.highPriority ? "high" : "auto",
1027
+ alt: e.altText,
1028
+ role: e.altText ? void 0 : "presentation",
1029
+ style: {
1030
+ objectPosition: e.backgroundPosition || "center",
1031
+ objectFit: e.backgroundSize || "cover",
1032
+ ...i()
1033
+ },
1034
+ className: "builder-image" + (e.className ? " " + e.className : "") + " img-ac3dff4a",
1035
+ src: e.image,
1036
+ srcSet: t(),
1037
+ sizes: e.sizes
1038
+ }
1039
+ )
1040
+ ] }),
1041
+ e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ c(
1042
+ "div",
1043
+ {
1044
+ className: "builder-image-sizer div-ac3dff4a",
1045
+ style: {
1046
+ paddingTop: e.aspectRatio * 100 + "%"
1047
+ }
1048
+ }
1049
+ ) : null,
1050
+ (r = (l = e.builderBlock) == null ? void 0 : l.children) != null && r.length && e.fitContent ? /* @__PURE__ */ c(C, { children: e.children }) : null,
1051
+ !e.fitContent && ((d = (s = e.builderBlock) == null ? void 0 : s.children) != null && d.length) ? /* @__PURE__ */ c("div", { className: "div-ac3dff4a-2", children: e.children }) : null
1052
+ ] }),
1053
+ /* @__PURE__ */ c("style", { children: `.img-ac3dff4a {
1054
+ opacity: 1;
1055
+ transition: opacity 0.2s ease-in-out;
1056
+ }.div-ac3dff4a {
1057
+ width: 100%;
1058
+ pointer-events: none;
1059
+ font-size: 0;
1060
+ }.div-ac3dff4a-2 {
1061
+ display: flex;
1062
+ flex-direction: column;
1063
+ align-items: stretch;
1064
+ position: absolute;
1065
+ top: 0;
1066
+ left: 0;
1067
+ width: 100%;
1068
+ height: 100%;
1069
+ }` })
1070
+ ] });
1071
+ }
1072
+ function Bt(e) {
1073
+ return /* @__PURE__ */ c(
1074
+ "section",
1075
+ {
1076
+ ...e.attributes,
1077
+ style: {
1078
+ width: "100%",
1079
+ alignSelf: "stretch",
1080
+ flexGrow: 1,
1081
+ boxSizing: "border-box",
1082
+ maxWidth: e.maxWidth || 1200,
1083
+ display: "flex",
1084
+ flexDirection: "column",
1085
+ alignItems: "stretch",
1086
+ marginLeft: "auto",
1087
+ marginRight: "auto"
1088
+ },
1089
+ children: e.children
1090
+ }
1091
+ );
1092
+ }
1093
+ const Wt = {
1094
+ name: "Core:Button",
1095
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1096
+ defaultStyles: {
1097
+ // TODO: make min width more intuitive and set one
1098
+ appearance: "none",
1099
+ paddingTop: "15px",
1100
+ paddingBottom: "15px",
1101
+ paddingLeft: "25px",
1102
+ paddingRight: "25px",
1103
+ backgroundColor: "#000000",
1104
+ color: "white",
1105
+ borderRadius: "4px",
1106
+ textAlign: "center",
1107
+ cursor: "pointer"
1108
+ },
1109
+ inputs: [{
1110
+ name: "text",
1111
+ type: "text",
1112
+ defaultValue: "Click me!",
1113
+ bubble: !0
1114
+ }, {
1115
+ name: "link",
1116
+ type: "url",
1117
+ bubble: !0
1118
+ }, {
1119
+ name: "openLinkInNewTab",
1120
+ type: "boolean",
1121
+ defaultValue: !1,
1122
+ friendlyName: "Open link in new tab"
1123
+ }],
1124
+ static: !0,
1125
+ noWrap: !0
1126
+ }, Nt = {
1127
+ // TODO: ways to statically preprocess JSON for references, functions, etc
1128
+ name: "Columns",
1129
+ isRSC: !0,
1130
+ inputs: [{
1131
+ name: "columns",
1132
+ type: "array",
1133
+ broadcast: !0,
1134
+ subFields: [{
1135
+ name: "blocks",
1136
+ type: "array",
1137
+ hideFromUI: !0,
1138
+ defaultValue: [{
1139
+ "@type": "@builder.io/sdk:Element",
1140
+ responsiveStyles: {
1141
+ large: {
1142
+ display: "flex",
1143
+ flexDirection: "column",
1144
+ alignItems: "stretch",
1145
+ flexShrink: "0",
1146
+ position: "relative",
1147
+ marginTop: "30px",
1148
+ textAlign: "center",
1149
+ lineHeight: "normal",
1150
+ height: "auto",
1151
+ minHeight: "20px",
1152
+ minWidth: "20px",
1153
+ overflow: "hidden"
1154
+ }
1155
+ },
1156
+ component: {
1157
+ name: "Image",
1158
+ options: {
1159
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
1160
+ backgroundPosition: "center",
1161
+ backgroundSize: "cover",
1162
+ aspectRatio: 0.7004048582995948
1163
+ }
1164
+ }
1165
+ }, {
1166
+ "@type": "@builder.io/sdk:Element",
1167
+ responsiveStyles: {
1168
+ large: {
1169
+ display: "flex",
1170
+ flexDirection: "column",
1171
+ alignItems: "stretch",
1172
+ flexShrink: "0",
1173
+ position: "relative",
1174
+ marginTop: "30px",
1175
+ textAlign: "center",
1176
+ lineHeight: "normal",
1177
+ height: "auto"
1178
+ }
1179
+ },
1180
+ component: {
1181
+ name: "Text",
1182
+ options: {
1183
+ text: "<p>Enter some text...</p>"
1184
+ }
1185
+ }
1186
+ }]
1187
+ }, {
1188
+ name: "width",
1189
+ type: "number",
1190
+ hideFromUI: !0,
1191
+ helperText: "Width %, e.g. set to 50 to fill half of the space"
1192
+ }, {
1193
+ name: "link",
1194
+ type: "url",
1195
+ helperText: "Optionally set a url that clicking this column will link to"
1196
+ }],
1197
+ defaultValue: [{
1198
+ blocks: [{
1199
+ "@type": "@builder.io/sdk:Element",
1200
+ responsiveStyles: {
1201
+ large: {
1202
+ display: "flex",
1203
+ flexDirection: "column",
1204
+ alignItems: "stretch",
1205
+ flexShrink: "0",
1206
+ position: "relative",
1207
+ marginTop: "30px",
1208
+ textAlign: "center",
1209
+ lineHeight: "normal",
1210
+ height: "auto",
1211
+ minHeight: "20px",
1212
+ minWidth: "20px",
1213
+ overflow: "hidden"
1214
+ }
1215
+ },
1216
+ component: {
1217
+ name: "Image",
1218
+ options: {
1219
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
1220
+ backgroundPosition: "center",
1221
+ backgroundSize: "cover",
1222
+ aspectRatio: 0.7004048582995948
1223
+ }
1224
+ }
1225
+ }, {
1226
+ "@type": "@builder.io/sdk:Element",
1227
+ responsiveStyles: {
1228
+ large: {
1229
+ display: "flex",
1230
+ flexDirection: "column",
1231
+ alignItems: "stretch",
1232
+ flexShrink: "0",
1233
+ position: "relative",
1234
+ marginTop: "30px",
1235
+ textAlign: "center",
1236
+ lineHeight: "normal",
1237
+ height: "auto"
1238
+ }
1239
+ },
1240
+ component: {
1241
+ name: "Text",
1242
+ options: {
1243
+ text: "<p>Enter some text...</p>"
1244
+ }
1245
+ }
1246
+ }]
1247
+ }, {
1248
+ blocks: [{
1249
+ "@type": "@builder.io/sdk:Element",
1250
+ responsiveStyles: {
1251
+ large: {
1252
+ display: "flex",
1253
+ flexDirection: "column",
1254
+ alignItems: "stretch",
1255
+ flexShrink: "0",
1256
+ position: "relative",
1257
+ marginTop: "30px",
1258
+ textAlign: "center",
1259
+ lineHeight: "normal",
1260
+ height: "auto",
1261
+ minHeight: "20px",
1262
+ minWidth: "20px",
1263
+ overflow: "hidden"
1264
+ }
1265
+ },
1266
+ component: {
1267
+ name: "Image",
1268
+ options: {
1269
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
1270
+ backgroundPosition: "center",
1271
+ backgroundSize: "cover",
1272
+ aspectRatio: 0.7004048582995948
1273
+ }
1274
+ }
1275
+ }, {
1276
+ "@type": "@builder.io/sdk:Element",
1277
+ responsiveStyles: {
1278
+ large: {
1279
+ display: "flex",
1280
+ flexDirection: "column",
1281
+ alignItems: "stretch",
1282
+ flexShrink: "0",
1283
+ position: "relative",
1284
+ marginTop: "30px",
1285
+ textAlign: "center",
1286
+ lineHeight: "normal",
1287
+ height: "auto"
1288
+ }
1289
+ },
1290
+ component: {
1291
+ name: "Text",
1292
+ options: {
1293
+ text: "<p>Enter some text...</p>"
1294
+ }
1295
+ }
1296
+ }]
1297
+ }],
1298
+ onChange: (e) => {
1299
+ function t() {
1300
+ n.forEach((i) => {
1301
+ i.delete("width");
1302
+ });
1303
+ }
1304
+ const n = e.get("columns");
1305
+ Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((r, s) => r + s.get("width"), 0) !== 100) && t();
1306
+ }
1307
+ }, {
1308
+ name: "space",
1309
+ type: "number",
1310
+ defaultValue: 20,
1311
+ helperText: "Size of gap between columns",
1312
+ advanced: !0
1313
+ }, {
1314
+ name: "stackColumnsAt",
1315
+ type: "string",
1316
+ defaultValue: "tablet",
1317
+ helperText: "Convert horizontal columns to vertical at what device size",
1318
+ enum: ["tablet", "mobile", "never"],
1319
+ advanced: !0
1320
+ }, {
1321
+ name: "reverseColumnsWhenStacked",
1322
+ type: "boolean",
1323
+ defaultValue: !1,
1324
+ helperText: "When stacking columns for mobile devices, reverse the ordering",
1325
+ advanced: !0
1326
+ }]
1327
+ }, At = {
1328
+ name: "Fragment",
1329
+ static: !0,
1330
+ hidden: !0,
1331
+ canHaveChildren: !0,
1332
+ noWrap: !0
1333
+ }, Vt = {
1334
+ name: "Image",
1335
+ static: !0,
1336
+ 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",
1337
+ defaultStyles: {
1338
+ position: "relative",
1339
+ minHeight: "20px",
1340
+ minWidth: "20px",
1341
+ overflow: "hidden"
1342
+ },
1343
+ canHaveChildren: !0,
1344
+ inputs: [{
1345
+ name: "image",
1346
+ type: "file",
1347
+ bubble: !0,
1348
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
1349
+ required: !0,
1350
+ defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1351
+ onChange: (e) => {
1352
+ e.delete("srcset"), e.delete("noWebp");
1353
+ function n(l, r = 6e4) {
1354
+ return new Promise((s, d) => {
1355
+ const m = document.createElement("img");
1356
+ let u = !1;
1357
+ m.onload = () => {
1358
+ u = !0, s(m);
1359
+ }, m.addEventListener("error", (h) => {
1360
+ console.warn("Image load failed", h.error), d(h.error);
1361
+ }), m.src = l, setTimeout(() => {
1362
+ u || d(new Error("Image load timed out"));
1363
+ }, r);
1364
+ });
1365
+ }
1366
+ function i(l) {
1367
+ return Math.round(l * 1e3) / 1e3;
1368
+ }
1369
+ const o = e.get("image"), a = e.get("aspectRatio");
1370
+ if (fetch(o).then((l) => l.blob()).then((l) => {
1371
+ l.type.includes("svg") && e.set("noWebp", !0);
1372
+ }), o && (!a || a === 0.7041))
1373
+ return n(o).then((l) => {
1374
+ const r = e.get("aspectRatio");
1375
+ e.get("image") === o && (!r || r === 0.7041) && l.width && l.height && (e.set("aspectRatio", i(l.height / l.width)), e.set("height", l.height), e.set("width", l.width));
1376
+ });
1377
+ }
1378
+ }, {
1379
+ name: "backgroundSize",
1380
+ type: "text",
1381
+ defaultValue: "cover",
1382
+ enum: [{
1383
+ label: "contain",
1384
+ value: "contain",
1385
+ helperText: "The image should never get cropped"
1386
+ }, {
1387
+ label: "cover",
1388
+ value: "cover",
1389
+ helperText: "The image should fill it's box, cropping when needed"
1390
+ }]
1391
+ }, {
1392
+ name: "backgroundPosition",
1393
+ type: "text",
1394
+ defaultValue: "center",
1395
+ enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
1396
+ }, {
1397
+ name: "altText",
1398
+ type: "string",
1399
+ helperText: "Text to display when the user has images off"
1400
+ }, {
1401
+ name: "height",
1402
+ type: "number",
1403
+ hideFromUI: !0
1404
+ }, {
1405
+ name: "width",
1406
+ type: "number",
1407
+ hideFromUI: !0
1408
+ }, {
1409
+ name: "sizes",
1410
+ type: "string",
1411
+ hideFromUI: !0
1412
+ }, {
1413
+ name: "srcset",
1414
+ type: "string",
1415
+ hideFromUI: !0
1416
+ }, {
1417
+ name: "lazy",
1418
+ type: "boolean",
1419
+ defaultValue: !0,
1420
+ hideFromUI: !0
1421
+ }, {
1422
+ name: "fitContent",
1423
+ type: "boolean",
1424
+ helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio",
1425
+ defaultValue: !0
1426
+ }, {
1427
+ name: "highPriority",
1428
+ type: "boolean",
1429
+ advanced: !0,
1430
+ helperText: "Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."
1431
+ }, {
1432
+ name: "aspectRatio",
1433
+ type: "number",
1434
+ helperText: "This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",
1435
+ advanced: !0,
1436
+ defaultValue: 0.7041
1437
+ }]
1438
+ }, $t = {
1439
+ name: "Core:Section",
1440
+ static: !0,
1441
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
1442
+ inputs: [{
1443
+ name: "maxWidth",
1444
+ type: "number",
1445
+ defaultValue: 1200
1446
+ }, {
1447
+ name: "lazyLoad",
1448
+ type: "boolean",
1449
+ defaultValue: !1,
1450
+ advanced: !0,
1451
+ description: "Only render this section when in view"
1452
+ }],
1453
+ defaultStyles: {
1454
+ paddingLeft: "20px",
1455
+ paddingRight: "20px",
1456
+ paddingTop: "50px",
1457
+ paddingBottom: "50px",
1458
+ marginTop: "0px",
1459
+ width: "100vw",
1460
+ marginLeft: "calc(50% - 50vw)"
1461
+ },
1462
+ canHaveChildren: !0,
1463
+ defaultChildren: [{
1464
+ "@type": "@builder.io/sdk:Element",
1465
+ responsiveStyles: {
1466
+ large: {
1467
+ textAlign: "center"
1468
+ }
1469
+ },
1470
+ component: {
1471
+ name: "Text",
1472
+ options: {
1473
+ text: "<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"
1474
+ }
1475
+ }
1476
+ }]
1477
+ }, Ft = {
1478
+ name: "Slot",
1479
+ isRSC: !0,
1480
+ description: "Allow child blocks to be inserted into this content when used as a Symbol",
1481
+ docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
1482
+ image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
1483
+ // Maybe wrap this for canHaveChildren so bind children to this hm
1484
+ inputs: [{
1485
+ name: "name",
1486
+ type: "string",
1487
+ required: !0,
1488
+ defaultValue: "children"
1489
+ }]
1490
+ };
1491
+ function Lt(e) {
1492
+ var t, n, i;
1493
+ return /* @__PURE__ */ c(
1494
+ "div",
1495
+ {
1496
+ style: {
1497
+ pointerEvents: "auto"
1498
+ },
1499
+ ...!((t = e.builderContext.context) != null && t.symbolId) && {
1500
+ "builder-slot": e.name
1501
+ },
1502
+ children: /* @__PURE__ */ c(
1503
+ ce,
1504
+ {
1505
+ parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
1506
+ path: `symbol.data.${e.name}`,
1507
+ context: e.builderContext,
1508
+ blocks: (i = e.builderContext.rootState) == null ? void 0 : i[e.name]
1509
+ }
1510
+ )
1511
+ }
1512
+ );
1513
+ }
1514
+ const jt = {
1515
+ name: "Symbol",
1516
+ noWrap: !0,
1517
+ static: !0,
1518
+ isRSC: !0,
1519
+ inputs: [{
1520
+ name: "symbol",
1521
+ type: "uiSymbol"
1522
+ }, {
1523
+ name: "dataOnly",
1524
+ helperText: "Make this a data symbol that doesn't display any UI",
1525
+ type: "boolean",
1526
+ defaultValue: !1,
1527
+ advanced: !0,
1528
+ hideFromUI: !0
1529
+ }, {
1530
+ name: "inheritState",
1531
+ helperText: "Inherit the parent component state and data",
1532
+ type: "boolean",
1533
+ defaultValue: !1,
1534
+ advanced: !0
1535
+ }, {
1536
+ name: "renderToLiquid",
1537
+ helperText: "Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",
1538
+ type: "boolean",
1539
+ defaultValue: !1,
1540
+ advanced: !0,
1541
+ hideFromUI: !0
1542
+ }, {
1543
+ name: "useChildren",
1544
+ hideFromUI: !0,
1545
+ type: "boolean"
1546
+ }]
1547
+ }, Dt = {
1548
+ name: "Text",
1549
+ static: !0,
1550
+ isRSC: !0,
1551
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
1552
+ inputs: [{
1553
+ name: "text",
1554
+ type: "html",
1555
+ required: !0,
1556
+ autoFocus: !0,
1557
+ bubble: !0,
1558
+ defaultValue: "Enter some text..."
1559
+ }],
1560
+ defaultStyles: {
1561
+ lineHeight: "normal",
1562
+ height: "auto",
1563
+ textAlign: "center"
1564
+ }
1565
+ };
1566
+ function Ot(e) {
1567
+ var t;
1568
+ return /* @__PURE__ */ c(
1569
+ "div",
1570
+ {
1571
+ className: "builder-text",
1572
+ dangerouslySetInnerHTML: { __html: ((t = e.text) == null ? void 0 : t.toString()) || "" },
1573
+ style: {
1574
+ outline: "none"
1575
+ }
1576
+ }
1577
+ );
1578
+ }
1579
+ const _t = {
1580
+ name: "Custom Code",
1581
+ static: !0,
1582
+ requiredPermissions: ["editCode"],
1583
+ inputs: [{
1584
+ name: "code",
1585
+ type: "html",
1586
+ required: !0,
1587
+ defaultValue: "<p>Hello there, I am custom HTML code!</p>",
1588
+ code: !0
1589
+ }, {
1590
+ name: "replaceNodes",
1591
+ type: "boolean",
1592
+ helperText: "Preserve server rendered dom nodes",
1593
+ advanced: !0
1594
+ }, {
1595
+ name: "scriptsClientOnly",
1596
+ type: "boolean",
1597
+ defaultValue: !1,
1598
+ helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1599
+ advanced: !0
1600
+ }]
1601
+ };
1602
+ function Ht(e) {
1603
+ const t = oe(null), [n, i] = A(() => []), [o, a] = A(() => []);
1604
+ return T(() => {
1605
+ var r;
1606
+ if (!((r = t.current) != null && r.getElementsByTagName) || typeof window == "undefined")
1607
+ return;
1608
+ const l = t.current.getElementsByTagName("script");
1609
+ for (let s = 0; s < l.length; s++) {
1610
+ const d = l[s];
1611
+ if (d.src) {
1612
+ if (n.includes(d.src))
1613
+ continue;
1614
+ n.push(d.src);
1615
+ const m = document.createElement("script");
1616
+ m.async = !0, m.src = d.src, document.head.appendChild(m);
1617
+ } else if (!d.type || [
1618
+ "text/javascript",
1619
+ "application/javascript",
1620
+ "application/ecmascript"
1621
+ ].includes(d.type)) {
1622
+ if (o.includes(d.innerText))
1623
+ continue;
1624
+ try {
1625
+ o.push(d.innerText), new Function(d.innerText)();
1626
+ } catch (m) {
1627
+ console.warn("`CustomCode`: Error running script:", m);
1628
+ }
1629
+ }
1630
+ }
1631
+ }, []), /* @__PURE__ */ c(
1632
+ "div",
1633
+ {
1634
+ ref: t,
1635
+ className: "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : ""),
1636
+ dangerouslySetInnerHTML: { __html: e.code }
1637
+ }
1638
+ );
1639
+ }
1640
+ const Ut = {
1641
+ name: "Embed",
1642
+ static: !0,
1643
+ inputs: [{
1644
+ name: "url",
1645
+ type: "url",
1646
+ required: !0,
1647
+ defaultValue: "",
1648
+ helperText: "e.g. enter a youtube url, google map, etc",
1649
+ onChange: (e) => {
1650
+ const t = e.get("url");
1651
+ if (t) {
1652
+ e.set("content", "Loading...");
1653
+ const n = _iframelyApiKey;
1654
+ return fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=${n}`).then((i) => i.json()).then((i) => {
1655
+ e.get("url") === t && (i.html ? e.set("content", i.html) : e.set("content", "Invalid url, please try another"));
1656
+ }).catch((i) => {
1657
+ e.set("content", "There was an error embedding this URL, please try again or another URL");
1658
+ });
1659
+ } else
1660
+ e.delete("content");
1661
+ }
1662
+ }, {
1663
+ name: "content",
1664
+ type: "html",
1665
+ defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1666
+ hideFromUI: !0
1667
+ }]
1668
+ }, Mt = ["text/javascript", "application/javascript", "application/ecmascript"], Kt = (e) => Mt.includes(e.type);
1669
+ function zt(e) {
1670
+ const t = oe(null), [n, i] = A(() => []), [o, a] = A(() => []), [l, r] = A(() => !1);
1671
+ function s() {
1672
+ if (!t.current || !t.current.getElementsByTagName)
1673
+ return;
1674
+ const d = t.current.getElementsByTagName("script");
1675
+ for (let m = 0; m < d.length; m++) {
1676
+ const u = d[m];
1677
+ if (u.src && !n.includes(u.src)) {
1678
+ n.push(u.src);
1679
+ const h = document.createElement("script");
1680
+ h.async = !0, h.src = u.src, document.head.appendChild(h);
1681
+ } else if (Kt(u) && !o.includes(u.innerText))
1682
+ try {
1683
+ o.push(u.innerText), new Function(u.innerText)();
1684
+ } catch (h) {
1685
+ console.warn("`Embed`: Error running script:", h);
1686
+ }
1687
+ }
1688
+ }
1689
+ return T(() => {
1690
+ t.current && !l && (r(!0), s());
1691
+ }, [t.current, l]), /* @__PURE__ */ c(
1692
+ "div",
1693
+ {
1694
+ className: "builder-embed",
1695
+ ref: t,
1696
+ dangerouslySetInnerHTML: { __html: e.content }
1697
+ }
1698
+ );
1699
+ }
1700
+ const qt = {
1701
+ // friendlyName?
1702
+ name: "Raw:Img",
1703
+ hideFromInsertMenu: !0,
1704
+ 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",
1705
+ inputs: [{
1706
+ name: "image",
1707
+ bubble: !0,
1708
+ type: "file",
1709
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
1710
+ required: !0
1711
+ }],
1712
+ noWrap: !0,
1713
+ static: !0
1714
+ };
1715
+ function Yt(e) {
1716
+ return /* @__PURE__ */ c(
1717
+ "img",
1718
+ {
1719
+ style: {
1720
+ objectFit: e.backgroundSize || "cover",
1721
+ objectPosition: e.backgroundPosition || "center"
1722
+ },
1723
+ alt: e.altText,
1724
+ src: e.imgSrc || e.image,
1725
+ ...e.attributes
1726
+ },
1727
+ $() && e.imgSrc || "default-key"
1728
+ );
1729
+ }
1730
+ const Jt = {
1731
+ name: "Video",
1732
+ canHaveChildren: !0,
1733
+ defaultStyles: {
1734
+ minHeight: "20px",
1735
+ minWidth: "20px"
1736
+ },
1737
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",
1738
+ inputs: [{
1739
+ name: "video",
1740
+ type: "file",
1741
+ allowedFileTypes: ["mp4"],
1742
+ bubble: !0,
1743
+ defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
1744
+ required: !0
1745
+ }, {
1746
+ name: "posterImage",
1747
+ type: "file",
1748
+ allowedFileTypes: ["jpeg", "png"],
1749
+ helperText: "Image to show before the video plays"
1750
+ }, {
1751
+ name: "autoPlay",
1752
+ type: "boolean",
1753
+ defaultValue: !0
1754
+ }, {
1755
+ name: "controls",
1756
+ type: "boolean",
1757
+ defaultValue: !1
1758
+ }, {
1759
+ name: "muted",
1760
+ type: "boolean",
1761
+ defaultValue: !0
1762
+ }, {
1763
+ name: "loop",
1764
+ type: "boolean",
1765
+ defaultValue: !0
1766
+ }, {
1767
+ name: "playsInline",
1768
+ type: "boolean",
1769
+ defaultValue: !0
1770
+ }, {
1771
+ name: "fit",
1772
+ type: "text",
1773
+ defaultValue: "cover",
1774
+ enum: ["contain", "cover", "fill", "auto"]
1775
+ }, {
1776
+ name: "preload",
1777
+ type: "text",
1778
+ defaultValue: "metadata",
1779
+ enum: ["auto", "metadata", "none"]
1780
+ }, {
1781
+ name: "fitContent",
1782
+ type: "boolean",
1783
+ helperText: "When child blocks are provided, fit to them instead of using the aspect ratio",
1784
+ defaultValue: !0,
1785
+ advanced: !0
1786
+ }, {
1787
+ name: "position",
1788
+ type: "text",
1789
+ defaultValue: "center",
1790
+ enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
1791
+ }, {
1792
+ name: "height",
1793
+ type: "number",
1794
+ advanced: !0
1795
+ }, {
1796
+ name: "width",
1797
+ type: "number",
1798
+ advanced: !0
1799
+ }, {
1800
+ name: "aspectRatio",
1801
+ type: "number",
1802
+ advanced: !0,
1803
+ defaultValue: 0.7004048582995948
1804
+ }, {
1805
+ name: "lazyLoad",
1806
+ type: "boolean",
1807
+ helperText: 'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',
1808
+ defaultValue: !0,
1809
+ advanced: !0
1810
+ }]
1811
+ };
1812
+ function Qt(e) {
1813
+ var i, o, a, l, r, s, d;
1814
+ function t() {
1815
+ return {
1816
+ ...e.autoPlay === !0 ? {
1817
+ autoPlay: !0
1818
+ } : {},
1819
+ ...e.muted === !0 ? {
1820
+ muted: !0
1821
+ } : {},
1822
+ ...e.controls === !0 ? {
1823
+ controls: !0
1824
+ } : {},
1825
+ ...e.loop === !0 ? {
1826
+ loop: !0
1827
+ } : {},
1828
+ ...e.playsInline === !0 ? {
1829
+ playsInline: !0
1830
+ } : {}
1831
+ };
1832
+ }
1833
+ function n() {
1834
+ return {
1835
+ ...t()
1836
+ };
1837
+ }
1838
+ return /* @__PURE__ */ E(
1839
+ "div",
1840
+ {
1841
+ style: {
1842
+ position: "relative"
1843
+ },
1844
+ children: [
1845
+ /* @__PURE__ */ c(
1846
+ "video",
1847
+ {
1848
+ className: "builder-video",
1849
+ ...n(),
1850
+ preload: e.preload || "metadata",
1851
+ style: {
1852
+ width: "100%",
1853
+ height: "100%",
1854
+ ...(i = e.attributes) == null ? void 0 : i.style,
1855
+ objectFit: e.fit,
1856
+ objectPosition: e.position,
1857
+ // Hack to get object fit to work as expected and
1858
+ // not have the video overflow
1859
+ zIndex: 2,
1860
+ borderRadius: "1px",
1861
+ ...e.aspectRatio ? {
1862
+ position: "absolute"
1863
+ } : null
1864
+ },
1865
+ src: e.video || "no-src",
1866
+ poster: e.posterImage,
1867
+ children: e.lazyLoad ? null : /* @__PURE__ */ c("source", { type: "video/mp4", src: e.video })
1868
+ }
1869
+ ),
1870
+ e.aspectRatio && !(e.fitContent && ((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length)) ? /* @__PURE__ */ c(
1871
+ "div",
1872
+ {
1873
+ style: {
1874
+ width: "100%",
1875
+ paddingTop: e.aspectRatio * 100 + "%",
1876
+ pointerEvents: "none",
1877
+ fontSize: "0px"
1878
+ }
1879
+ }
1880
+ ) : null,
1881
+ (r = (l = e.builderBlock) == null ? void 0 : l.children) != null && r.length && e.fitContent ? /* @__PURE__ */ c(
1882
+ "div",
1883
+ {
1884
+ style: {
1885
+ display: "flex",
1886
+ flexDirection: "column",
1887
+ alignItems: "stretch"
1888
+ },
1889
+ children: e.children
1890
+ }
1891
+ ) : null,
1892
+ (d = (s = e.builderBlock) == null ? void 0 : s.children) != null && d.length && !e.fitContent ? /* @__PURE__ */ c(
1893
+ "div",
1894
+ {
1895
+ style: {
1896
+ pointerEvents: "none",
1897
+ display: "flex",
1898
+ flexDirection: "column",
1899
+ alignItems: "stretch",
1900
+ position: "absolute",
1901
+ top: "0",
1902
+ left: "0",
1903
+ width: "100%",
1904
+ height: "100%"
1905
+ },
1906
+ children: e.children
1907
+ }
1908
+ ) : null
1909
+ ]
1910
+ }
1911
+ );
1912
+ }
1913
+ const Gt = () => [{
1914
+ component: Ht,
1915
+ ..._t
1916
+ }, {
1917
+ component: zt,
1918
+ ...Ut
1919
+ }, {
1920
+ component: Yt,
1921
+ ...qt
1922
+ }, {
1923
+ component: Qt,
1924
+ ...Jt
1925
+ }], be = () => [{
1926
+ component: Ge,
1927
+ ...Wt
1928
+ }, {
1929
+ component: wt,
1930
+ ...Nt
1931
+ }, {
1932
+ component: Tt,
1933
+ ...At
1934
+ }, {
1935
+ component: Pt,
1936
+ ...Vt
1937
+ }, {
1938
+ component: Bt,
1939
+ ...$t
1940
+ }, {
1941
+ component: Lt,
1942
+ ...Ft
1943
+ }, {
1944
+ component: Rn,
1945
+ ...jt
1946
+ }, {
1947
+ component: Ot,
1948
+ ...Dt
1949
+ }, ...Gt()], Xt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1950
+ function getAndSetVariantId() {
1951
+ function setCookie(name, value, days) {
1952
+ let expires = '';
1953
+ if (days) {
1954
+ const date = new Date();
1955
+ date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
1956
+ expires = '; expires=' + date.toUTCString();
1957
+ }
1958
+ document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';
1959
+ }
1960
+ function getCookie(name) {
1961
+ const nameEQ = name + '=';
1962
+ const ca = document.cookie.split(';');
1963
+ for (let i = 0; i < ca.length; i++) {
1964
+ let c = ca[i];
1965
+ while (c.charAt(0) === ' ') c = c.substring(1, c.length);
1966
+ if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
1967
+ }
1968
+ return null;
1969
+ }
1970
+ const cookieName = \`builder.tests.\${contentId}\`;
1971
+ const variantInCookie = getCookie(cookieName);
1972
+ const availableIDs = variants.map(vr => vr.id).concat(contentId);
1973
+ if (variantInCookie && availableIDs.includes(variantInCookie)) {
1974
+ return variantInCookie;
1975
+ }
1976
+ let n = 0;
1977
+ const random = Math.random();
1978
+ for (let i = 0; i < variants.length; i++) {
1979
+ const variant = variants[i];
1980
+ const testRatio = variant.testRatio;
1981
+ n += testRatio;
1982
+ if (random < n) {
1983
+ setCookie(cookieName, variant.id);
1984
+ return variant.id;
1985
+ }
1986
+ }
1987
+ setCookie(cookieName, contentId);
1988
+ return contentId;
1989
+ }
1990
+ const winningVariantId = getAndSetVariantId();
1991
+ const styleEl = document.currentScript?.previousElementSibling;
1992
+ if (isHydrationTarget) {
1993
+ styleEl.remove();
1994
+ const thisScriptEl = document.currentScript;
1995
+ thisScriptEl?.remove();
1996
+ } else {
1997
+ const newStyleStr = variants.concat({
1998
+ id: contentId
1999
+ }).filter(variant => variant.id !== winningVariantId).map(value => {
2000
+ return \`.variant-\${value.id} { display: none; }
2001
+ \`;
2002
+ }).join('');
2003
+ styleEl.innerHTML = newStyleStr;
2004
+ }
2005
+ }`, Zt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
2006
+ if (!navigator.cookieEnabled) {
2007
+ return;
2008
+ }
2009
+ function getCookie(name) {
2010
+ const nameEQ = name + '=';
2011
+ const ca = document.cookie.split(';');
2012
+ for (let i = 0; i < ca.length; i++) {
2013
+ let c = ca[i];
2014
+ while (c.charAt(0) === ' ') c = c.substring(1, c.length);
2015
+ if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
2016
+ }
2017
+ return null;
2018
+ }
2019
+ const cookieName = \`builder.tests.\${defaultContentId}\`;
2020
+ const winningVariant = getCookie(cookieName);
2021
+ const parentDiv = document.currentScript?.parentElement;
2022
+ const isDefaultContent = variantContentId === defaultContentId;
2023
+ const isWinningVariant = winningVariant === variantContentId;
2024
+ if (isWinningVariant && !isDefaultContent) {
2025
+ parentDiv?.removeAttribute('hidden');
2026
+ parentDiv?.removeAttribute('aria-hidden');
2027
+ } else if (!isWinningVariant && isDefaultContent) {
2028
+ parentDiv?.setAttribute('hidden', 'true');
2029
+ parentDiv?.setAttribute('aria-hidden', 'true');
2030
+ }
2031
+ if (isHydrationTarget) {
2032
+ if (!isWinningVariant) {
2033
+ parentDiv?.remove();
2034
+ }
2035
+ const thisScriptEl = document.currentScript;
2036
+ thisScriptEl?.remove();
2037
+ }
2038
+ return;
2039
+ }`, Ee = "builderIoAbTest", Pe = "builderIoRenderContent", M = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
2040
+ ...t,
2041
+ testVariationId: t.id,
2042
+ id: e == null ? void 0 : e.id
2043
+ })), en = ({
2044
+ canTrack: e,
2045
+ content: t
2046
+ }) => !(!(M(t).length > 0) || !e || z()), tn = (e) => e === "react" || e === "reactNative", Be = tn(B), nn = () => `
2047
+ window.${Ee} = ${Xt}
2048
+ window.${Pe} = ${Zt}
2049
+ `, on = (e, t) => `
2050
+ window.${Ee}(
2051
+ "${t}",${JSON.stringify(e)}, ${Be}
2052
+ )`, an = ({
2053
+ contentId: e,
2054
+ variationId: t
2055
+ }) => `window.${Pe}(
2056
+ "${t}", "${e}", ${Be}
2057
+ )`;
2058
+ function ne(e) {
2059
+ return /* @__PURE__ */ c(
2060
+ "script",
2061
+ {
2062
+ dangerouslySetInnerHTML: { __html: e.scriptStr },
2063
+ "data-id": e.id
2064
+ }
2065
+ );
2066
+ }
2067
+ const rn = qe({
2068
+ content: null,
2069
+ context: {},
2070
+ localState: void 0,
2071
+ rootSetState() {
2072
+ },
2073
+ rootState: {},
2074
+ apiKey: null,
2075
+ apiVersion: void 0,
2076
+ componentInfos: {},
2077
+ inheritedStyles: {},
2078
+ BlocksWrapper: "div",
2079
+ BlocksWrapperProps: {}
2080
+ });
2081
+ function ye(e) {
2082
+ return Math.round(e * 1e3) / 1e3;
2083
+ }
2084
+ const ln = (e, t, n = !0) => {
2085
+ if (!(e instanceof HTMLElement))
2086
+ return null;
2087
+ let i = n ? e : e.parentElement;
2088
+ do {
2089
+ if (!i)
2090
+ return null;
2091
+ if (t(i))
2092
+ return i;
2093
+ } while (i = i.parentElement);
2094
+ return null;
2095
+ }, cn = (e) => ln(e, (t) => {
2096
+ const n = t.getAttribute("builder-id") || t.id;
2097
+ return (n == null ? void 0 : n.indexOf("builder-")) === 0;
2098
+ }), Se = ({
2099
+ event: e,
2100
+ target: t
2101
+ }) => {
2102
+ const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a = ye(i / n.width), l = ye(o / n.height);
2103
+ return {
2104
+ x: a,
2105
+ y: l
2106
+ };
2107
+ }, sn = (e) => {
2108
+ const t = e.target, n = t && cn(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2109
+ return {
2110
+ targetBuilderElement: i || void 0,
2111
+ metadata: {
2112
+ targetOffset: t ? Se({
2113
+ event: e,
2114
+ target: t
2115
+ }) : void 0,
2116
+ builderTargetOffset: n ? Se({
2117
+ event: e,
2118
+ target: n
2119
+ }) : void 0,
2120
+ builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
2121
+ }
2122
+ };
2123
+ };
2124
+ async function dn({
2125
+ key: e,
2126
+ value: t
2127
+ }) {
2128
+ return Ve(), globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e, t), { [e]: t };
2129
+ }
2130
+ function pe(e, ...t) {
2131
+ const n = Object(e);
2132
+ for (let i = 1; i < arguments.length; i++) {
2133
+ const o = arguments[i];
2134
+ if (o != null)
2135
+ for (const a in o)
2136
+ Object.prototype.hasOwnProperty.call(o, a) && (n[a] = o[a]);
2137
+ }
2138
+ return n;
2139
+ }
2140
+ function un(e) {
2141
+ console.warn(`Cannot animate element: element with ID ${e} not found!`);
2142
+ }
2143
+ function mn(e, t) {
2144
+ const n = fn(e), i = getComputedStyle(t), o = e.steps[0].styles, a = e.steps[e.steps.length - 1].styles, l = [o, a];
2145
+ for (const r of l)
2146
+ for (const s of n)
2147
+ s in r || (r[s] = i[s]);
2148
+ }
2149
+ function fn(e) {
2150
+ const t = [];
2151
+ for (const n of e.steps)
2152
+ for (const i in n.styles)
2153
+ t.indexOf(i) === -1 && t.push(i);
2154
+ return t;
2155
+ }
2156
+ function hn(e) {
2157
+ const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
2158
+ if (!t.length) {
2159
+ un(e.elementId || e.id || "");
2160
+ return;
2161
+ }
2162
+ Array.from(t).forEach((n) => {
2163
+ mn(e, n), n.style.transition = "none", n.style.transitionDelay = "0", pe(n.style, e.steps[0].styles), setTimeout(() => {
2164
+ n.style.transition = `all ${e.duration}s ${re(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), pe(n.style, e.steps[1].styles), setTimeout(() => {
2165
+ n.style.transition = "", n.style.transitionDelay = "";
2166
+ }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
2167
+ });
2168
+ });
2169
+ }
2170
+ const gn = (e) => {
2171
+ var a, l;
2172
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (l = e.fileUrl) != null ? l : (a = e == null ? void 0 : e.files) == null ? void 0 : a.regular;
2173
+ let o = "";
2174
+ if (i && t && n && (o += `
2175
+ @font-face {
2176
+ font-family: "${t}";
2177
+ src: local("${n}"), url('${i}') format('woff2');
2178
+ font-display: fallback;
2179
+ font-weight: 400;
2180
+ }
2181
+ `.trim()), e.files)
2182
+ for (const r in e.files) {
2183
+ if (!(String(Number(r)) === r))
2184
+ continue;
2185
+ const d = e.files[r];
2186
+ d && d !== i && (o += `
2187
+ @font-face {
2188
+ font-family: "${t}";
2189
+ src: url('${d}') format('woff2');
2190
+ font-display: fallback;
2191
+ font-weight: ${r};
2192
+ }
2193
+ `.trim());
2194
+ }
2195
+ return o;
2196
+ }, bn = ({
2197
+ customFonts: e
2198
+ }) => {
2199
+ var t;
2200
+ return ((t = e == null ? void 0 : e.map((n) => gn(n))) == null ? void 0 : t.join(" ")) || "";
2201
+ }, yn = ({
2202
+ cssCode: e,
2203
+ contentId: t
2204
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", Sn = `
2205
+ .builder-button {
2206
+ all: unset;
2207
+ }
2208
+
2209
+ .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
2210
+ margin: 0;
2211
+ }
2212
+ .builder-text > p, .builder-text > .builder-paragraph {
2213
+ color: inherit;
2214
+ line-height: inherit;
2215
+ letter-spacing: inherit;
2216
+ font-weight: inherit;
2217
+ font-size: inherit;
2218
+ text-align: inherit;
2219
+ font-family: inherit;
2220
+ }
2221
+ `, pn = (e) => e ? "" : Sn, xn = (e) => `variant-${e}`;
2222
+ function vn(e) {
2223
+ var W, j, D, X, Z, se, de;
2224
+ const t = oe(null);
2225
+ function n(g) {
2226
+ var S, p;
2227
+ const f = {
2228
+ ...e.builderContextSignal.rootState,
2229
+ ...g
2230
+ };
2231
+ e.builderContextSignal.rootSetState ? (p = (S = e.builderContextSignal).rootSetState) == null || p.call(S, f) : e.builderContextSignal.rootState = f;
2232
+ }
2233
+ function i(g) {
2234
+ var S, p, k, P, H;
2235
+ const f = {
2236
+ ...e.builderContextSignal.content,
2237
+ ...g,
2238
+ data: {
2239
+ ...(S = e.builderContextSignal.content) == null ? void 0 : S.data,
2240
+ ...g == null ? void 0 : g.data
2241
+ },
2242
+ meta: {
2243
+ ...(p = e.builderContextSignal.content) == null ? void 0 : p.meta,
2244
+ ...g == null ? void 0 : g.meta,
2245
+ breakpoints: ((k = g == null ? void 0 : g.meta) == null ? void 0 : k.breakpoints) || ((H = (P = e.builderContextSignal.content) == null ? void 0 : P.meta) == null ? void 0 : H.breakpoints)
2246
+ }
2247
+ };
2248
+ dn({
2249
+ value: f,
2250
+ key: f.id
2251
+ }).then(() => {
2252
+ R.refresh();
2253
+ });
2254
+ }
2255
+ function o() {
2256
+ return e.showContent ? {} : {
2257
+ hidden: !0,
2258
+ "aria-hidden": !0
2259
+ };
2260
+ }
2261
+ const [a, l] = A(
2262
+ () => e.contentWrapper || "div"
2263
+ );
2264
+ function r(g) {
2265
+ return Fe({
2266
+ model: e.model,
2267
+ trustedHosts: e.trustedHosts,
2268
+ callbacks: {
2269
+ configureSdk: (f) => {
2270
+ var k;
2271
+ const { breakpoints: S, contentId: p } = f;
2272
+ !p || p !== ((k = e.builderContextSignal.content) == null ? void 0 : k.id) || S && i({
2273
+ meta: {
2274
+ breakpoints: S
2275
+ }
2276
+ });
2277
+ },
2278
+ animation: (f) => {
2279
+ hn(f);
2280
+ },
2281
+ contentUpdate: (f) => {
2282
+ i(f);
2283
+ }
2284
+ }
2285
+ })(g);
2286
+ }
2287
+ function s() {
2288
+ var f, S;
2289
+ const g = (S = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : S.jsCode;
2290
+ g && _({
2291
+ code: g,
2292
+ context: e.context || {},
2293
+ localState: void 0,
2294
+ rootState: e.builderContextSignal.rootState,
2295
+ rootSetState: e.builderContextSignal.rootSetState,
2296
+ /**
2297
+ * We don't want to cache the result of the JS code, since it's arbitrary side effect code.
2298
+ */
2299
+ enableCache: !1
2300
+ });
2301
+ }
2302
+ const [d, m] = A(() => ({})), [u, h] = A(() => ({})), [v, w] = A(() => !1);
2303
+ function y(g) {
2304
+ var f, S;
2305
+ if (e.builderContextSignal.content) {
2306
+ const p = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, k = (S = e.builderContextSignal.content) == null ? void 0 : S.id;
2307
+ ue({
2308
+ type: "click",
2309
+ canTrack: q(e.canTrack),
2310
+ contentId: k,
2311
+ apiKey: e.apiKey,
2312
+ variationId: p !== k ? p : void 0,
2313
+ ...sn(g),
2314
+ unique: !v
2315
+ });
2316
+ }
2317
+ v || w(!0);
2318
+ }
2319
+ function V() {
2320
+ var f, S, p;
2321
+ const g = (p = (S = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : S.httpRequests) != null ? p : {};
2322
+ Object.entries(g).forEach(([k, P]) => {
2323
+ if (!P || u[k] || d[k] && !$())
2324
+ return;
2325
+ u[k] = !0;
2326
+ const H = P.replace(
2327
+ /{{([^}]+)}}/g,
2328
+ (F, We) => String(
2329
+ _({
2330
+ code: We,
2331
+ context: e.context || {},
2332
+ localState: void 0,
2333
+ rootState: e.builderContextSignal.rootState,
2334
+ rootSetState: e.builderContextSignal.rootSetState,
2335
+ enableCache: !0
2336
+ })
2337
+ )
2338
+ );
2339
+ Le(H).then((F) => F.json()).then((F) => {
2340
+ n({
2341
+ [k]: F
2342
+ }), d[k] = !0;
2343
+ }).catch((F) => {
2344
+ console.error("error fetching dynamic data", P, F);
2345
+ }).finally(() => {
2346
+ u[k] = !1;
2347
+ });
2348
+ });
2349
+ }
2350
+ function x() {
2351
+ $() && window.dispatchEvent(
2352
+ new CustomEvent(
2353
+ "builder:component:stateChange",
2354
+ {
2355
+ detail: {
2356
+ state: ie(e.builderContextSignal.rootState),
2357
+ ref: {
2358
+ name: e.model
2359
+ }
2360
+ }
2361
+ }
2362
+ )
2363
+ );
2364
+ }
2365
+ function b(g) {
2366
+ window.addEventListener("message", r), je(), De({
2367
+ ...e.locale ? {
2368
+ locale: e.locale
2369
+ } : {},
2370
+ ...e.enrich ? {
2371
+ enrich: e.enrich
2372
+ } : {},
2373
+ ...e.trustedHosts ? {
2374
+ trustedHosts: e.trustedHosts
2375
+ } : {}
2376
+ }), Object.values(
2377
+ e.builderContextSignal.componentInfos
2378
+ ).forEach((f) => {
2379
+ var p;
2380
+ const S = Oe(f);
2381
+ (p = window.parent) == null || p.postMessage(S, "*");
2382
+ }), window.addEventListener(
2383
+ "builder:component:stateChangeListenerActivated",
2384
+ x
2385
+ );
2386
+ }
2387
+ function I(g) {
2388
+ const f = new URL(location.href).searchParams, S = f.get("builder.preview"), p = f.get(
2389
+ `builder.overrides.${S}`
2390
+ ), k = f.get("apiKey") || f.get("builder.space");
2391
+ S === e.model && k === e.apiKey && (!e.content || p === e.content.id) && ve({
2392
+ model: e.model,
2393
+ apiKey: e.apiKey,
2394
+ apiVersion: e.builderContextSignal.apiVersion
2395
+ }).then((P) => {
2396
+ P && i(P);
2397
+ });
2398
+ }
2399
+ const R = Ye();
2400
+ return T(() => {
2401
+ var g;
2402
+ return (g = t.current) == null || g.addEventListener(
2403
+ "initeditingbldr",
2404
+ b
2405
+ ), () => {
2406
+ var f;
2407
+ return (f = t.current) == null ? void 0 : f.removeEventListener(
2408
+ "initeditingbldr",
2409
+ b
2410
+ );
2411
+ };
2412
+ }, []), T(() => {
2413
+ var g;
2414
+ return (g = t.current) == null || g.addEventListener(
2415
+ "initpreviewingbldr",
2416
+ I
2417
+ ), () => {
2418
+ var f;
2419
+ return (f = t.current) == null ? void 0 : f.removeEventListener(
2420
+ "initpreviewingbldr",
2421
+ I
2422
+ );
2423
+ };
2424
+ }, []), T(() => {
2425
+ var g, f;
2426
+ if (z()) {
2427
+ if ($() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && q(e.canTrack)) {
2428
+ const p = (g = e.builderContextSignal.content) == null ? void 0 : g.testVariationId, k = (f = e.builderContextSignal.content) == null ? void 0 : f.id, P = e.apiKey;
2429
+ ue({
2430
+ type: "impression",
2431
+ canTrack: !0,
2432
+ contentId: k,
2433
+ apiKey: P,
2434
+ variationId: p !== k ? p : void 0
2435
+ });
2436
+ }
2437
+ $e() && $();
2438
+ }
2439
+ }, []), T(() => {
2440
+ e.apiKey || J.error(
2441
+ "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2442
+ ), s(), V(), x();
2443
+ }, []), T(() => {
2444
+ }, [e.content]), T(() => {
2445
+ s();
2446
+ }, [(j = (W = e.builderContextSignal.content) == null ? void 0 : W.data) == null ? void 0 : j.jsCode]), T(() => {
2447
+ V();
2448
+ }, [(X = (D = e.builderContextSignal.content) == null ? void 0 : D.data) == null ? void 0 : X.httpRequests]), T(() => {
2449
+ x();
2450
+ }, [e.builderContextSignal.rootState]), T(() => {
2451
+ e.data && n(e.data);
2452
+ }, [e.data]), T(() => {
2453
+ e.locale && n({
2454
+ locale: e.locale
2455
+ });
2456
+ }, [e.locale]), T(() => () => {
2457
+ z() && (window.removeEventListener("message", r), window.removeEventListener(
2458
+ "builder:component:stateChangeListenerActivated",
2459
+ x
2460
+ ));
2461
+ }, []), /* @__PURE__ */ c(rn.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ c(
2462
+ a,
2463
+ {
2464
+ ref: t,
2465
+ onClick: (g) => y(g),
2466
+ "builder-content-id": (Z = e.builderContextSignal.content) == null ? void 0 : Z.id,
2467
+ "builder-model": e.model,
2468
+ ...o(),
2469
+ ...e.contentWrapperProps,
2470
+ className: xn(
2471
+ ((se = e.content) == null ? void 0 : se.testVariationId) || ((de = e.content) == null ? void 0 : de.id)
2472
+ ),
2473
+ children: e.children
2474
+ }
2475
+ ) : null });
2476
+ }
2477
+ function kn(e) {
2478
+ const t = `
2479
+ ${yn({
2480
+ cssCode: e.cssCode,
2481
+ contentId: e.contentId
2482
+ })}
2483
+ ${bn({
2484
+ customFonts: e.customFonts
2485
+ })}
2486
+ ${pn(e.isNestedRender)}
2487
+ `.trim();
2488
+ return /* @__PURE__ */ c(Q, { id: "builderio-content", styles: t });
2489
+ }
2490
+ const Cn = ({
2491
+ content: e,
2492
+ data: t,
2493
+ locale: n
2494
+ }) => {
2495
+ var a, l, r;
2496
+ const i = {}, o = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
2497
+ return (r = (l = e == null ? void 0 : e.data) == null ? void 0 : l.inputs) == null || r.forEach((s) => {
2498
+ s.name && s.defaultValue !== void 0 && (i[s.name] = s.defaultValue);
2499
+ }), {
2500
+ ...i,
2501
+ ...o,
2502
+ ...t,
2503
+ ...n ? {
2504
+ locale: n
2505
+ } : {}
2506
+ };
2507
+ }, In = ({
2508
+ content: e,
2509
+ data: t
2510
+ }) => e ? {
2511
+ ...e,
2512
+ data: {
2513
+ ...e == null ? void 0 : e.data,
2514
+ ...t
2515
+ },
2516
+ meta: e == null ? void 0 : e.meta
2517
+ } : void 0;
2518
+ function xe(e) {
2519
+ var o, a, l, r, s, d, m, u, h;
2520
+ const t = an({
2521
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2522
+ variationId: (o = e.content) == null ? void 0 : o.testVariationId,
2523
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2524
+ contentId: (a = e.content) == null ? void 0 : a.id
2525
+ }), n = [
2526
+ ...be(),
2527
+ ...e.customComponents || []
2528
+ ].reduce(
2529
+ (v, { component: w, ...y }) => ({
2530
+ ...v,
2531
+ [y.name]: {
2532
+ component: w,
2533
+ ...me(y)
2534
+ }
2535
+ }),
2536
+ {}
2537
+ ), i = {
2538
+ content: In({
2539
+ content: e.content,
2540
+ data: e.data
2541
+ }),
2542
+ localState: void 0,
2543
+ rootState: Cn({
2544
+ content: e.content,
2545
+ data: e.data,
2546
+ locale: e.locale
2547
+ }),
2548
+ rootSetState: void 0,
2549
+ context: e.context || {},
2550
+ canTrack: e.canTrack,
2551
+ apiKey: e.apiKey,
2552
+ apiVersion: e.apiVersion,
2553
+ componentInfos: [
2554
+ ...be(),
2555
+ ...e.customComponents || []
2556
+ ].reduce(
2557
+ (v, { component: w, ...y }) => ({
2558
+ ...v,
2559
+ [y.name]: me(y)
2560
+ }),
2561
+ {}
2562
+ ),
2563
+ inheritedStyles: {},
2564
+ BlocksWrapper: e.blocksWrapper || "div",
2565
+ BlocksWrapperProps: e.blocksWrapperProps || {}
2566
+ };
2567
+ return /* @__PURE__ */ E(
2568
+ vn,
2569
+ {
2570
+ content: e.content,
2571
+ data: e.data,
2572
+ model: e.model,
2573
+ context: e.context,
2574
+ apiKey: e.apiKey,
2575
+ canTrack: e.canTrack,
2576
+ locale: e.locale,
2577
+ enrich: e.enrich,
2578
+ showContent: e.showContent,
2579
+ builderContextSignal: i,
2580
+ contentWrapper: e.contentWrapper,
2581
+ contentWrapperProps: e.contentWrapperProps,
2582
+ trustedHosts: e.trustedHosts,
2583
+ children: [
2584
+ e.isSsrAbTest ? /* @__PURE__ */ c(
2585
+ ne,
2586
+ {
2587
+ id: "builderio-variant-visibility",
2588
+ scriptStr: t
2589
+ }
2590
+ ) : null,
2591
+ /* @__PURE__ */ c(
2592
+ kn,
2593
+ {
2594
+ isNestedRender: e.isNestedRender,
2595
+ contentId: (l = i.content) == null ? void 0 : l.id,
2596
+ cssCode: (s = (r = i.content) == null ? void 0 : r.data) == null ? void 0 : s.cssCode,
2597
+ customFonts: (m = (d = i.content) == null ? void 0 : d.data) == null ? void 0 : m.customFonts
2598
+ }
2599
+ ),
2600
+ /* @__PURE__ */ c(
2601
+ ce,
2602
+ {
2603
+ blocks: (h = (u = i.content) == null ? void 0 : u.data) == null ? void 0 : h.blocks,
2604
+ context: i,
2605
+ registeredComponents: n,
2606
+ linkComponent: e.linkComponent
2607
+ }
2608
+ )
2609
+ ]
2610
+ }
2611
+ );
2612
+ }
2613
+ function wn(e) {
2614
+ var a;
2615
+ const t = en({
2616
+ canTrack: q(e.canTrack),
2617
+ content: e.content
2618
+ }), n = function() {
2619
+ var r;
2620
+ return on(
2621
+ M(e.content).map((s) => ({
2622
+ id: s.testVariationId,
2623
+ testRatio: s.testRatio
2624
+ })),
2625
+ ((r = e.content) == null ? void 0 : r.id) || ""
2626
+ );
2627
+ }, i = function() {
2628
+ return M(e.content).map((r) => `.variant-${r.testVariationId} { display: none; } `).join("");
2629
+ }, o = function() {
2630
+ var r;
2631
+ return t ? {
2632
+ ...e.content,
2633
+ testVariationId: (r = e.content) == null ? void 0 : r.id
2634
+ } : _e({
2635
+ item: e.content,
2636
+ canTrack: q(e.canTrack)
2637
+ });
2638
+ };
2639
+ return /* @__PURE__ */ E(C, { children: [
2640
+ !e.isNestedRender && B !== "reactNative" ? /* @__PURE__ */ c(
2641
+ ne,
2642
+ {
2643
+ id: "builderio-init-variants-fns",
2644
+ scriptStr: nn()
2645
+ }
2646
+ ) : null,
2647
+ t ? /* @__PURE__ */ E(C, { children: [
2648
+ /* @__PURE__ */ c(
2649
+ Q,
2650
+ {
2651
+ id: "builderio-variants",
2652
+ styles: i()
2653
+ }
2654
+ ),
2655
+ /* @__PURE__ */ c(
2656
+ ne,
2657
+ {
2658
+ id: "builderio-variants-visibility",
2659
+ scriptStr: n()
2660
+ }
2661
+ ),
2662
+ (a = M(e.content)) == null ? void 0 : a.map((l) => /* @__PURE__ */ c(
2663
+ xe,
2664
+ {
2665
+ isNestedRender: e.isNestedRender,
2666
+ content: l,
2667
+ showContent: !1,
2668
+ model: e.model,
2669
+ data: e.data,
2670
+ context: e.context,
2671
+ apiKey: e.apiKey,
2672
+ apiVersion: e.apiVersion,
2673
+ customComponents: e.customComponents,
2674
+ linkComponent: e.linkComponent,
2675
+ canTrack: e.canTrack,
2676
+ locale: e.locale,
2677
+ enrich: e.enrich,
2678
+ isSsrAbTest: t,
2679
+ blocksWrapper: e.blocksWrapper,
2680
+ blocksWrapperProps: e.blocksWrapperProps,
2681
+ contentWrapper: e.contentWrapper,
2682
+ contentWrapperProps: e.contentWrapperProps,
2683
+ trustedHosts: e.trustedHosts
2684
+ },
2685
+ l.testVariationId
2686
+ ))
2687
+ ] }) : null,
2688
+ /* @__PURE__ */ c(
2689
+ xe,
2690
+ {
2691
+ isNestedRender: e.isNestedRender,
2692
+ content: o(),
2693
+ showContent: !0,
2694
+ model: e.model,
2695
+ data: e.data,
2696
+ context: e.context,
2697
+ apiKey: e.apiKey,
2698
+ apiVersion: e.apiVersion,
2699
+ customComponents: e.customComponents,
2700
+ linkComponent: e.linkComponent,
2701
+ canTrack: e.canTrack,
2702
+ locale: e.locale,
2703
+ enrich: e.enrich,
2704
+ isSsrAbTest: t,
2705
+ blocksWrapper: e.blocksWrapper,
2706
+ blocksWrapperProps: e.blocksWrapperProps,
2707
+ contentWrapper: e.contentWrapper,
2708
+ contentWrapperProps: e.contentWrapperProps,
2709
+ trustedHosts: e.trustedHosts
2710
+ }
2711
+ )
2712
+ ] });
2713
+ }
2714
+ const Tn = async ({
2715
+ builderContextValue: e,
2716
+ symbol: t
2717
+ }) => {
2718
+ if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
2719
+ (e != null && e.apiKey))
2720
+ return ve({
2721
+ model: t.model,
2722
+ apiKey: e.apiKey,
2723
+ apiVersion: e.apiVersion,
2724
+ ...(t == null ? void 0 : t.entry) && {
2725
+ query: {
2726
+ id: t.entry
2727
+ }
2728
+ }
2729
+ }).catch((n) => {
2730
+ J.error("Could not fetch symbol content: ", n);
2731
+ });
2732
+ };
2733
+ async function Rn(e) {
2734
+ var a, l, r, s, d;
2735
+ const t = function() {
2736
+ return "div";
2737
+ }, n = function() {
2738
+ return "div";
2739
+ }, i = function() {
2740
+ var u, h;
2741
+ return [
2742
+ e.attributes[O()],
2743
+ "builder-symbol",
2744
+ (u = e.symbol) != null && u.inline ? "builder-inline-symbol" : void 0,
2745
+ (h = e.symbol) != null && h.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2746
+ ].filter(Boolean).join(" ");
2747
+ }, o = ((a = e.symbol) == null ? void 0 : a.content) || await Tn({
2748
+ symbol: e.symbol,
2749
+ builderContextValue: e.builderContext
2750
+ });
2751
+ return /* @__PURE__ */ c("div", { ...e.attributes, className: i(), children: /* @__PURE__ */ c(
2752
+ wn,
2753
+ {
2754
+ isNestedRender: !0,
2755
+ apiVersion: e.builderContext.apiVersion,
2756
+ apiKey: e.builderContext.apiKey,
2757
+ context: {
2758
+ ...e.builderContext.context,
2759
+ symbolId: (l = e.builderBlock) == null ? void 0 : l.id
2760
+ },
2761
+ customComponents: Object.values(e.builderComponents),
2762
+ data: {
2763
+ ...(r = e.symbol) == null ? void 0 : r.data,
2764
+ ...e.builderContext.localState,
2765
+ ...(s = o == null ? void 0 : o.data) == null ? void 0 : s.state
2766
+ },
2767
+ canTrack: e.builderContext.canTrack,
2768
+ model: (d = e.symbol) == null ? void 0 : d.model,
2769
+ content: o,
2770
+ linkComponent: e.builderLinkComponent,
2771
+ blocksWrapper: t(),
2772
+ contentWrapper: n()
2773
+ }
2774
+ ) });
2775
+ }
2776
+ export {
2777
+ ce as Blocks,
2778
+ rn as BuilderContext,
2779
+ Ge as Button,
2780
+ wt as Columns,
2781
+ wn as Content,
2782
+ Tt as Fragment,
2783
+ Pt as Image,
2784
+ Bt as Section,
2785
+ Rn as Symbol,
2786
+ Ot as Text,
2787
+ Qt as Video
2788
+ };