@builder.io/sdk-react-nextjs 0.16.2 → 0.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +26 -26
- package/lib/browser/blocks-exports.mjs +198 -177
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/init.cjs +1 -1
- package/lib/browser/init.mjs +1 -1
- package/lib/browser/server-entry-15a258a6.cjs +2 -0
- package/lib/browser/{server-entry-242f596f.js → server-entry-3336d7c2.js} +152 -158
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/blocks-exports.cjs +35 -35
- package/lib/edge/blocks-exports.mjs +228 -206
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/init.cjs +1 -1
- package/lib/edge/init.mjs +1 -1
- package/lib/edge/server-entry-15a258a6.cjs +2 -0
- package/lib/{node/server-entry-fbf4e3a9.js → edge/server-entry-3336d7c2.js} +152 -158
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/node/blocks-exports.cjs +15 -15
- package/lib/node/blocks-exports.mjs +128 -107
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +2 -2
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +2 -2
- package/lib/node/{node-runtime-e1243cd6.cjs → node-runtime-7537779c.cjs} +2 -2
- package/lib/node/{node-runtime-42e494ca.js → node-runtime-adcc8fa1.js} +3 -2
- package/lib/node/server-entry-15a258a6.cjs +2 -0
- package/lib/{edge/server-entry-242f596f.js → node/server-entry-3336d7c2.js} +152 -158
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/cjs/blocks/image/image.types.d.ts +2 -0
- package/types/cjs/blocks/symbol/symbol.types.d.ts +1 -0
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/register-component.d.ts +2 -2
- package/types/esm/blocks/image/image.types.d.ts +2 -0
- package/types/esm/blocks/symbol/symbol.types.d.ts +1 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/register-component.d.ts +2 -2
- package/lib/browser/server-entry-494604dc.cjs +0 -2
- package/lib/edge/server-entry-494604dc.cjs +0 -2
- package/lib/node/server-entry-db7b41aa.cjs +0 -2
|
@@ -3,15 +3,15 @@ var Ae = Object.defineProperty;
|
|
|
3
3
|
var Ve = (e, t, n) => t in e ? Ae(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
4
|
var ee = (e, t, n) => (Ve(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
5
5
|
import { jsx as l, Fragment as C, jsxs as E } from "react/jsx-runtime";
|
|
6
|
-
import { TARGET as M, isEditing as V, isBrowser as L, getUserAttributes as $e, checkIsDefined as z, logger as J,
|
|
7
|
-
import {
|
|
6
|
+
import { TARGET as M, isEditing as V, isBrowser as L, getUserAttributes as $e, checkIsDefined as z, logger as J, init as Fe, getDefaultCanTrack as q, _track as ue, isPreviewing as Le, createEditorListener as Oe, fetch as De, registerInsertMenu as je, setupBrowserForEditing as He, createRegisterComponentMessage as Me, fetchOneEntry as ke, serializeComponentInfo as me, handleABTestingSync as Ue } from "./server-entry-3336d7c2.js";
|
|
7
|
+
import { useEffect as R, useRef as ie, useState as A, createContext as _e } from "react";
|
|
8
8
|
import { useRouter as Ke } from "next/navigation";
|
|
9
9
|
import "lru-cache";
|
|
10
10
|
const ze = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), qe = (e) => typeof e == "string" && ze.has(e.toLowerCase());
|
|
11
|
-
function
|
|
11
|
+
function oe(e) {
|
|
12
12
|
return /* @__PURE__ */ l(C, { children: qe(e.TagName) ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(C, { children: typeof e.TagName == "string" ? /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const H = () => {
|
|
15
15
|
switch (M) {
|
|
16
16
|
case "react":
|
|
17
17
|
case "reactNative":
|
|
@@ -29,7 +29,7 @@ function Ye(e) {
|
|
|
29
29
|
function t() {
|
|
30
30
|
return {
|
|
31
31
|
...e.attributes,
|
|
32
|
-
[
|
|
32
|
+
[H()]: `${e.link ? "" : "builder-button"} ${e.attributes[H()] || ""}`,
|
|
33
33
|
...e.link ? {
|
|
34
34
|
href: e.link,
|
|
35
35
|
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
@@ -40,7 +40,7 @@ function Ye(e) {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
return /* @__PURE__ */ l(
|
|
43
|
-
|
|
43
|
+
oe,
|
|
44
44
|
{
|
|
45
45
|
attributes: t(),
|
|
46
46
|
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
@@ -75,7 +75,7 @@ const Qe = ({
|
|
|
75
75
|
getUserAttributes: () => $e()
|
|
76
76
|
}), Xe = (e, {
|
|
77
77
|
isExpression: t = !0
|
|
78
|
-
}) => /* 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,
|
|
78
|
+
}) => /* 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, fe = ({
|
|
79
79
|
code: e,
|
|
80
80
|
builder: t,
|
|
81
81
|
context: n,
|
|
@@ -131,7 +131,7 @@ const et = () => {
|
|
|
131
131
|
return !1;
|
|
132
132
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
|
|
133
133
|
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;
|
|
134
|
-
}, tt = (e) => (L() || et(),
|
|
134
|
+
}, tt = (e) => (L() || et(), fe(e)), N = class N {
|
|
135
135
|
static getCacheKey(t) {
|
|
136
136
|
return JSON.stringify({
|
|
137
137
|
...t,
|
|
@@ -151,7 +151,7 @@ const et = () => {
|
|
|
151
151
|
};
|
|
152
152
|
ee(N, "cacheLimit", 20), ee(N, "cache", /* @__PURE__ */ new Map());
|
|
153
153
|
let F = N;
|
|
154
|
-
function
|
|
154
|
+
function O({
|
|
155
155
|
code: e,
|
|
156
156
|
context: t,
|
|
157
157
|
localState: n,
|
|
@@ -193,7 +193,7 @@ function H({
|
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
const nt = (e, t, n) => {
|
|
196
|
+
const ae = (e) => JSON.parse(JSON.stringify(e)), nt = (e, t, n) => {
|
|
197
197
|
if (Object(e) !== e)
|
|
198
198
|
return e;
|
|
199
199
|
const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
@@ -208,7 +208,7 @@ const it = ({
|
|
|
208
208
|
}) => {
|
|
209
209
|
if (!e.bindings)
|
|
210
210
|
return e;
|
|
211
|
-
const a =
|
|
211
|
+
const a = ae(e), r = {
|
|
212
212
|
...a,
|
|
213
213
|
properties: {
|
|
214
214
|
...a.properties
|
|
@@ -218,7 +218,7 @@ const it = ({
|
|
|
218
218
|
}
|
|
219
219
|
};
|
|
220
220
|
for (const c in e.bindings) {
|
|
221
|
-
const s = e.bindings[c], d =
|
|
221
|
+
const s = e.bindings[c], d = O({
|
|
222
222
|
code: s,
|
|
223
223
|
localState: n,
|
|
224
224
|
rootState: i,
|
|
@@ -322,7 +322,7 @@ const ct = ({
|
|
|
322
322
|
} = e;
|
|
323
323
|
if (!(n != null && n.collection))
|
|
324
324
|
return;
|
|
325
|
-
const o =
|
|
325
|
+
const o = O({
|
|
326
326
|
code: n.collection,
|
|
327
327
|
localState: t.localState,
|
|
328
328
|
rootState: t.rootState,
|
|
@@ -382,11 +382,11 @@ const ct = ({
|
|
|
382
382
|
default: 991,
|
|
383
383
|
max: 1200
|
|
384
384
|
}
|
|
385
|
-
},
|
|
385
|
+
}, he = (e, t = Te) => `@media (max-width: ${t[e].max}px)`, Re = ({
|
|
386
386
|
small: e,
|
|
387
387
|
medium: t
|
|
388
388
|
}) => {
|
|
389
|
-
const n =
|
|
389
|
+
const n = ae(Te);
|
|
390
390
|
if (!e || !t)
|
|
391
391
|
return n;
|
|
392
392
|
const i = Math.floor(e / 2);
|
|
@@ -419,7 +419,7 @@ function Q(e) {
|
|
|
419
419
|
}
|
|
420
420
|
);
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function ft(e) {
|
|
423
423
|
const t = function() {
|
|
424
424
|
const o = Y({
|
|
425
425
|
block: e.block,
|
|
@@ -431,7 +431,7 @@ function ht(e) {
|
|
|
431
431
|
});
|
|
432
432
|
return z(o.hide) ? !o.hide : z(o.show) ? o.show : !0;
|
|
433
433
|
}, n = function() {
|
|
434
|
-
var
|
|
434
|
+
var x, y, p;
|
|
435
435
|
const o = Y({
|
|
436
436
|
block: e.block,
|
|
437
437
|
localState: e.context.localState,
|
|
@@ -440,31 +440,31 @@ function ht(e) {
|
|
|
440
440
|
context: e.context.context,
|
|
441
441
|
shouldEvaluateBindings: !0
|
|
442
442
|
}), a = o.responsiveStyles, r = e.context.content, c = Re(
|
|
443
|
-
((
|
|
443
|
+
((x = r == null ? void 0 : r.meta) == null ? void 0 : x.breakpoints) || {}
|
|
444
444
|
), s = a == null ? void 0 : a.large, d = a == null ? void 0 : a.medium, m = a == null ? void 0 : a.small, u = o.id;
|
|
445
445
|
if (!u)
|
|
446
446
|
return "";
|
|
447
|
-
const
|
|
447
|
+
const h = s ? _({
|
|
448
448
|
className: u,
|
|
449
449
|
styles: s
|
|
450
450
|
}) : "", w = d ? _({
|
|
451
451
|
className: u,
|
|
452
452
|
styles: d,
|
|
453
|
-
mediaQuery:
|
|
453
|
+
mediaQuery: he(
|
|
454
454
|
"medium",
|
|
455
455
|
c
|
|
456
456
|
)
|
|
457
457
|
}) : "", I = m ? _({
|
|
458
458
|
className: u,
|
|
459
459
|
styles: m,
|
|
460
|
-
mediaQuery:
|
|
460
|
+
mediaQuery: he(
|
|
461
461
|
"small",
|
|
462
462
|
c
|
|
463
463
|
)
|
|
464
464
|
}) : "", b = o.animations && o.animations.find((T) => T.trigger === "hover");
|
|
465
465
|
let P = "";
|
|
466
466
|
if (b) {
|
|
467
|
-
const T = ((p = (
|
|
467
|
+
const T = ((p = (y = b.steps) == null ? void 0 : y[1]) == null ? void 0 : p.styles) || {};
|
|
468
468
|
P = _({
|
|
469
469
|
className: `${u}:hover`,
|
|
470
470
|
styles: {
|
|
@@ -477,7 +477,7 @@ function ht(e) {
|
|
|
477
477
|
}) || "";
|
|
478
478
|
}
|
|
479
479
|
return [
|
|
480
|
-
|
|
480
|
+
h,
|
|
481
481
|
w,
|
|
482
482
|
I,
|
|
483
483
|
P
|
|
@@ -492,10 +492,10 @@ function ht(e) {
|
|
|
492
492
|
}
|
|
493
493
|
) }) : null });
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function ht(e) {
|
|
496
496
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
497
497
|
}
|
|
498
|
-
const gt = (e) => `on${
|
|
498
|
+
const gt = (e) => `on${ht(e)}`, bt = (e, t) => (n) => O({
|
|
499
499
|
code: e,
|
|
500
500
|
context: t.context,
|
|
501
501
|
localState: t.localState,
|
|
@@ -531,7 +531,7 @@ function yt({
|
|
|
531
531
|
}) {
|
|
532
532
|
return e;
|
|
533
533
|
}
|
|
534
|
-
const
|
|
534
|
+
const xt = (e) => ({
|
|
535
535
|
href: e.href
|
|
536
536
|
});
|
|
537
537
|
function ce({
|
|
@@ -540,14 +540,14 @@ function ce({
|
|
|
540
540
|
}) {
|
|
541
541
|
var i;
|
|
542
542
|
const n = {
|
|
543
|
-
...
|
|
543
|
+
...xt(e),
|
|
544
544
|
...e.properties,
|
|
545
545
|
"builder-id": e.id,
|
|
546
546
|
style: rt({
|
|
547
547
|
block: e,
|
|
548
548
|
context: t
|
|
549
549
|
}),
|
|
550
|
-
[
|
|
550
|
+
[H()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
551
551
|
};
|
|
552
552
|
return yt({
|
|
553
553
|
properties: n,
|
|
@@ -555,9 +555,9 @@ function ce({
|
|
|
555
555
|
block: e
|
|
556
556
|
});
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function St(e) {
|
|
559
559
|
return /* @__PURE__ */ l(
|
|
560
|
-
|
|
560
|
+
oe,
|
|
561
561
|
{
|
|
562
562
|
TagName: e.Wrapper,
|
|
563
563
|
attributes: ce({
|
|
@@ -576,7 +576,7 @@ function xt(e) {
|
|
|
576
576
|
}
|
|
577
577
|
);
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function vt(e) {
|
|
580
580
|
function t() {
|
|
581
581
|
return e.includeBlockProps ? {
|
|
582
582
|
...ce({
|
|
@@ -626,7 +626,7 @@ const pt = ({
|
|
|
626
626
|
};
|
|
627
627
|
function ge(e) {
|
|
628
628
|
var n;
|
|
629
|
-
const t = e.isInteractive ?
|
|
629
|
+
const t = e.isInteractive ? vt : e.componentRef;
|
|
630
630
|
return /* @__PURE__ */ l(C, { children: e.componentRef ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(
|
|
631
631
|
t,
|
|
632
632
|
{
|
|
@@ -679,8 +679,8 @@ function G(e) {
|
|
|
679
679
|
context: e.context
|
|
680
680
|
});
|
|
681
681
|
}, i = function() {
|
|
682
|
-
var
|
|
683
|
-
return (
|
|
682
|
+
var h;
|
|
683
|
+
return (h = e.block.repeat) != null && h.collection ? e.block : Y({
|
|
684
684
|
block: e.block,
|
|
685
685
|
localState: e.context.localState,
|
|
686
686
|
rootState: e.context.rootState,
|
|
@@ -695,15 +695,15 @@ function G(e) {
|
|
|
695
695
|
var I, b;
|
|
696
696
|
if ((I = e.block.repeat) != null && I.collection)
|
|
697
697
|
return !!((b = n()) != null && b.length);
|
|
698
|
-
const
|
|
699
|
-
return ("show" in i() ? i().show : !0) && !
|
|
698
|
+
const h = "hide" in i() ? i().hide : !1;
|
|
699
|
+
return ("show" in i() ? i().show : !0) && !h;
|
|
700
700
|
}, r = function() {
|
|
701
701
|
var w, I;
|
|
702
702
|
return !((w = t()) != null && w.component) && !n() ? (I = i().children) != null ? I : [] : [];
|
|
703
703
|
}, c = function() {
|
|
704
|
-
var
|
|
704
|
+
var h, w, I, b;
|
|
705
705
|
return {
|
|
706
|
-
blockChildren: (
|
|
706
|
+
blockChildren: (h = i().children) != null ? h : [],
|
|
707
707
|
componentRef: (w = t()) == null ? void 0 : w.component,
|
|
708
708
|
componentOptions: {
|
|
709
709
|
...Je(i()),
|
|
@@ -724,7 +724,7 @@ function G(e) {
|
|
|
724
724
|
};
|
|
725
725
|
};
|
|
726
726
|
return /* @__PURE__ */ l(C, { children: a() ? /* @__PURE__ */ E(C, { children: [
|
|
727
|
-
/* @__PURE__ */ l(
|
|
727
|
+
/* @__PURE__ */ l(ft, { block: e.block, context: e.context }),
|
|
728
728
|
(s = t()) != null && s.noWrap ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(
|
|
729
729
|
ge,
|
|
730
730
|
{
|
|
@@ -738,7 +738,7 @@ function G(e) {
|
|
|
738
738
|
includeBlockProps: c().includeBlockProps,
|
|
739
739
|
isInteractive: c().isInteractive
|
|
740
740
|
}
|
|
741
|
-
) }) : /* @__PURE__ */ l(C, { children: n() ? /* @__PURE__ */ l(C, { children: (m = n()) == null ? void 0 : m.map((u,
|
|
741
|
+
) }) : /* @__PURE__ */ l(C, { children: n() ? /* @__PURE__ */ l(C, { children: (m = n()) == null ? void 0 : m.map((u, h) => /* @__PURE__ */ l(
|
|
742
742
|
kt,
|
|
743
743
|
{
|
|
744
744
|
repeatContext: u.context,
|
|
@@ -746,9 +746,9 @@ function G(e) {
|
|
|
746
746
|
registeredComponents: e.registeredComponents,
|
|
747
747
|
linkComponent: e.linkComponent
|
|
748
748
|
},
|
|
749
|
-
|
|
749
|
+
h
|
|
750
750
|
)) }) : /* @__PURE__ */ E(
|
|
751
|
-
|
|
751
|
+
St,
|
|
752
752
|
{
|
|
753
753
|
Wrapper: o(),
|
|
754
754
|
block: i(),
|
|
@@ -863,24 +863,24 @@ function le(e) {
|
|
|
863
863
|
const wt = (e) => `builder-columns ${e}-breakpoints`;
|
|
864
864
|
function It(e) {
|
|
865
865
|
var b, P;
|
|
866
|
-
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], i = e.stackColumnsAt || "tablet", o = function(
|
|
867
|
-
return
|
|
868
|
-
}, a = function(
|
|
866
|
+
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], i = e.stackColumnsAt || "tablet", o = function(y) {
|
|
867
|
+
return y.link ? e.builderLinkComponent || "a" : "div";
|
|
868
|
+
}, a = function(y) {
|
|
869
869
|
var p;
|
|
870
|
-
return ((p = n[
|
|
871
|
-
}, r = function(
|
|
872
|
-
const p = a(
|
|
870
|
+
return ((p = n[y]) == null ? void 0 : p.width) || 100 / n.length;
|
|
871
|
+
}, r = function(y) {
|
|
872
|
+
const p = a(y), T = t * (n.length - 1) * (p / 100);
|
|
873
873
|
return `calc(${p}% - ${T}px)`;
|
|
874
874
|
}, c = function({
|
|
875
|
-
stackedStyle:
|
|
875
|
+
stackedStyle: y,
|
|
876
876
|
desktopStyle: p
|
|
877
877
|
}) {
|
|
878
|
-
return i === "tablet" ?
|
|
878
|
+
return i === "tablet" ? y : p;
|
|
879
879
|
}, s = function({
|
|
880
|
-
stackedStyle:
|
|
880
|
+
stackedStyle: y,
|
|
881
881
|
desktopStyle: p
|
|
882
882
|
}) {
|
|
883
|
-
return i === "never" ? p :
|
|
883
|
+
return i === "never" ? p : y;
|
|
884
884
|
}, d = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", m = function() {
|
|
885
885
|
return {
|
|
886
886
|
"--flex-dir": d,
|
|
@@ -889,8 +889,8 @@ function It(e) {
|
|
|
889
889
|
desktopStyle: "row"
|
|
890
890
|
})
|
|
891
891
|
};
|
|
892
|
-
}, u = function(
|
|
893
|
-
const p =
|
|
892
|
+
}, u = function(y) {
|
|
893
|
+
const p = y === 0 ? 0 : t, T = r(y), W = `${p}px`, D = "100%", j = 0;
|
|
894
894
|
return {
|
|
895
895
|
...{
|
|
896
896
|
display: "flex",
|
|
@@ -900,59 +900,60 @@ function It(e) {
|
|
|
900
900
|
width: T,
|
|
901
901
|
["marginLeft"]: W,
|
|
902
902
|
"--column-width-mobile": s({
|
|
903
|
-
stackedStyle:
|
|
903
|
+
stackedStyle: D,
|
|
904
904
|
desktopStyle: T
|
|
905
905
|
}),
|
|
906
906
|
"--column-margin-left-mobile": s({
|
|
907
|
-
stackedStyle:
|
|
907
|
+
stackedStyle: j,
|
|
908
908
|
desktopStyle: W
|
|
909
909
|
}),
|
|
910
910
|
"--column-width-tablet": c({
|
|
911
|
-
stackedStyle:
|
|
911
|
+
stackedStyle: D,
|
|
912
912
|
desktopStyle: T
|
|
913
913
|
}),
|
|
914
914
|
"--column-margin-left-tablet": c({
|
|
915
|
-
stackedStyle:
|
|
915
|
+
stackedStyle: j,
|
|
916
916
|
desktopStyle: W
|
|
917
917
|
})
|
|
918
918
|
};
|
|
919
|
-
},
|
|
919
|
+
}, h = function(y) {
|
|
920
920
|
var T, W;
|
|
921
921
|
return Re(
|
|
922
922
|
((W = (T = e.builderContext.content) == null ? void 0 : T.meta) == null ? void 0 : W.breakpoints) || {}
|
|
923
|
-
)[
|
|
923
|
+
)[y].max;
|
|
924
924
|
}, w = function() {
|
|
925
|
+
const y = `.${e.builderBlock.id}-breakpoints > .builder-column`;
|
|
925
926
|
return `
|
|
926
|
-
@media (max-width: ${
|
|
927
|
+
@media (max-width: ${h("medium")}px) {
|
|
927
928
|
.${e.builderBlock.id}-breakpoints {
|
|
928
929
|
flex-direction: var(--flex-dir-tablet);
|
|
929
930
|
align-items: stretch;
|
|
930
931
|
}
|
|
931
932
|
|
|
932
|
-
|
|
933
|
+
${y} {
|
|
933
934
|
width: var(--column-width-tablet) !important;
|
|
934
935
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
935
936
|
}
|
|
936
937
|
}
|
|
937
938
|
|
|
938
|
-
@media (max-width: ${
|
|
939
|
+
@media (max-width: ${h("small")}px) {
|
|
939
940
|
.${e.builderBlock.id}-breakpoints {
|
|
940
941
|
flex-direction: var(--flex-dir);
|
|
941
942
|
align-items: stretch;
|
|
942
943
|
}
|
|
943
944
|
|
|
944
|
-
|
|
945
|
+
${y} {
|
|
945
946
|
width: var(--column-width-mobile) !important;
|
|
946
947
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
947
948
|
}
|
|
948
949
|
},
|
|
949
950
|
`;
|
|
950
|
-
}, I = function(
|
|
951
|
+
}, I = function(y, p) {
|
|
951
952
|
return {
|
|
952
|
-
...
|
|
953
|
-
href:
|
|
953
|
+
...y.link ? {
|
|
954
|
+
href: y.link
|
|
954
955
|
} : {},
|
|
955
|
-
[
|
|
956
|
+
[H()]: "builder-column",
|
|
956
957
|
style: Ie(u(p))
|
|
957
958
|
};
|
|
958
959
|
};
|
|
@@ -960,7 +961,7 @@ function It(e) {
|
|
|
960
961
|
/* @__PURE__ */ E(
|
|
961
962
|
"div",
|
|
962
963
|
{
|
|
963
|
-
className: wt((b = e.builderBlock) == null ? void 0 : b.id) + " div-
|
|
964
|
+
className: wt((b = e.builderBlock) == null ? void 0 : b.id) + " div-2cd13691",
|
|
964
965
|
style: m(),
|
|
965
966
|
children: [
|
|
966
967
|
/* @__PURE__ */ l(
|
|
@@ -971,16 +972,16 @@ function It(e) {
|
|
|
971
972
|
nonce: e.builderContext.nonce
|
|
972
973
|
}
|
|
973
974
|
),
|
|
974
|
-
(P = e.columns) == null ? void 0 : P.map((
|
|
975
|
-
|
|
975
|
+
(P = e.columns) == null ? void 0 : P.map((x, y) => /* @__PURE__ */ l(
|
|
976
|
+
oe,
|
|
976
977
|
{
|
|
977
|
-
TagName: o(
|
|
978
|
+
TagName: o(x),
|
|
978
979
|
actionAttributes: {},
|
|
979
|
-
attributes: I(
|
|
980
|
+
attributes: I(x, y),
|
|
980
981
|
children: /* @__PURE__ */ l(
|
|
981
982
|
le,
|
|
982
983
|
{
|
|
983
|
-
path: `component.options.columns.${
|
|
984
|
+
path: `component.options.columns.${y}.blocks`,
|
|
984
985
|
parent: e.builderBlock.id,
|
|
985
986
|
styleProp: {
|
|
986
987
|
flexGrow: "1"
|
|
@@ -988,16 +989,16 @@ function It(e) {
|
|
|
988
989
|
context: e.builderContext,
|
|
989
990
|
registeredComponents: e.builderComponents,
|
|
990
991
|
linkComponent: e.builderLinkComponent,
|
|
991
|
-
blocks:
|
|
992
|
+
blocks: x.blocks
|
|
992
993
|
}
|
|
993
994
|
)
|
|
994
995
|
},
|
|
995
|
-
|
|
996
|
+
y
|
|
996
997
|
))
|
|
997
998
|
]
|
|
998
999
|
}
|
|
999
1000
|
),
|
|
1000
|
-
/* @__PURE__ */ l("style", { children: `.div-
|
|
1001
|
+
/* @__PURE__ */ l("style", { children: `.div-2cd13691 {
|
|
1001
1002
|
display: flex;
|
|
1002
1003
|
line-height: normal;
|
|
1003
1004
|
}` })
|
|
@@ -1039,14 +1040,14 @@ function te(e) {
|
|
|
1039
1040
|
function Pt(e) {
|
|
1040
1041
|
var o, a, r, c, s, d;
|
|
1041
1042
|
function t() {
|
|
1042
|
-
var
|
|
1043
|
+
var h;
|
|
1043
1044
|
const u = e.image || e.src;
|
|
1044
1045
|
if (!u || // We can auto add srcset for cdn.builder.io and shopify
|
|
1045
1046
|
// images, otherwise you can supply this prop manually
|
|
1046
1047
|
!(u.match(/builder\.io/) || u.match(/cdn\.shopify\.com/)))
|
|
1047
1048
|
return e.srcset;
|
|
1048
1049
|
if (!e.noWebp) {
|
|
1049
|
-
if (e.srcset && ((
|
|
1050
|
+
if (e.srcset && ((h = e.image) != null && h.includes("builder.io/api/v1/image"))) {
|
|
1050
1051
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
1051
1052
|
return console.debug("Removed given srcset"), te(u);
|
|
1052
1053
|
} else if (e.image && !e.srcset)
|
|
@@ -1068,7 +1069,8 @@ function Pt(e) {
|
|
|
1068
1069
|
};
|
|
1069
1070
|
return e.aspectRatio ? m : void 0;
|
|
1070
1071
|
}
|
|
1071
|
-
return
|
|
1072
|
+
return R(() => {
|
|
1073
|
+
}, []), /* @__PURE__ */ E(C, { children: [
|
|
1072
1074
|
/* @__PURE__ */ E(C, { children: [
|
|
1073
1075
|
/* @__PURE__ */ E("picture", { children: [
|
|
1074
1076
|
n() ? /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) : null,
|
|
@@ -1084,7 +1086,7 @@ function Pt(e) {
|
|
|
1084
1086
|
objectFit: e.backgroundSize || "cover",
|
|
1085
1087
|
...i()
|
|
1086
1088
|
},
|
|
1087
|
-
className: "builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
1089
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-2d6925f2",
|
|
1088
1090
|
src: e.image,
|
|
1089
1091
|
srcSet: t(),
|
|
1090
1092
|
sizes: e.sizes
|
|
@@ -1094,23 +1096,23 @@ function Pt(e) {
|
|
|
1094
1096
|
e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ l(
|
|
1095
1097
|
"div",
|
|
1096
1098
|
{
|
|
1097
|
-
className: "builder-image-sizer div-
|
|
1099
|
+
className: "builder-image-sizer div-2d6925f2",
|
|
1098
1100
|
style: {
|
|
1099
1101
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1100
1102
|
}
|
|
1101
1103
|
}
|
|
1102
1104
|
) : null,
|
|
1103
1105
|
(c = (r = e.builderBlock) == null ? void 0 : r.children) != null && c.length && e.fitContent ? /* @__PURE__ */ l(C, { children: e.children }) : null,
|
|
1104
|
-
!e.fitContent && ((d = (s = e.builderBlock) == null ? void 0 : s.children) != null && d.length) ? /* @__PURE__ */ l("div", { className: "div-
|
|
1106
|
+
!e.fitContent && ((d = (s = e.builderBlock) == null ? void 0 : s.children) != null && d.length) ? /* @__PURE__ */ l("div", { className: "div-2d6925f2-2", children: e.children }) : null
|
|
1105
1107
|
] }),
|
|
1106
|
-
/* @__PURE__ */ l("style", { children: `.img-
|
|
1108
|
+
/* @__PURE__ */ l("style", { children: `.img-2d6925f2 {
|
|
1107
1109
|
opacity: 1;
|
|
1108
1110
|
transition: opacity 0.2s ease-in-out;
|
|
1109
|
-
}.div-
|
|
1111
|
+
}.div-2d6925f2 {
|
|
1110
1112
|
width: 100%;
|
|
1111
1113
|
pointer-events: none;
|
|
1112
1114
|
font-size: 0;
|
|
1113
|
-
}.div-
|
|
1115
|
+
}.div-2d6925f2-2 {
|
|
1114
1116
|
display: flex;
|
|
1115
1117
|
flex-direction: column;
|
|
1116
1118
|
align-items: stretch;
|
|
@@ -1418,8 +1420,8 @@ const Wt = {
|
|
|
1418
1420
|
let u = !1;
|
|
1419
1421
|
m.onload = () => {
|
|
1420
1422
|
u = !0, s(m);
|
|
1421
|
-
}, m.addEventListener("error", (
|
|
1422
|
-
console.warn("Image load failed",
|
|
1423
|
+
}, m.addEventListener("error", (h) => {
|
|
1424
|
+
console.warn("Image load failed", h.error), d(h.error);
|
|
1423
1425
|
}), m.src = r, setTimeout(() => {
|
|
1424
1426
|
u || d(new Error("Image load timed out"));
|
|
1425
1427
|
}, c);
|
|
@@ -1620,7 +1622,8 @@ const Ot = {
|
|
|
1620
1622
|
}
|
|
1621
1623
|
}, Dt = {
|
|
1622
1624
|
shouldReceiveBuilderProps: {
|
|
1623
|
-
builderBlock: !1
|
|
1625
|
+
builderBlock: !1,
|
|
1626
|
+
builderContext: !0
|
|
1624
1627
|
},
|
|
1625
1628
|
name: "Text",
|
|
1626
1629
|
static: !0,
|
|
@@ -1641,12 +1644,30 @@ const Ot = {
|
|
|
1641
1644
|
}
|
|
1642
1645
|
};
|
|
1643
1646
|
function jt(e) {
|
|
1644
|
-
var t;
|
|
1645
1647
|
return /* @__PURE__ */ l(
|
|
1646
1648
|
"div",
|
|
1647
1649
|
{
|
|
1648
1650
|
className: "builder-text",
|
|
1649
|
-
dangerouslySetInnerHTML: { __html: (
|
|
1651
|
+
dangerouslySetInnerHTML: { __html: function() {
|
|
1652
|
+
var s;
|
|
1653
|
+
const i = e.builderContext, {
|
|
1654
|
+
context: o,
|
|
1655
|
+
localState: a,
|
|
1656
|
+
rootState: r,
|
|
1657
|
+
rootSetState: c
|
|
1658
|
+
} = i;
|
|
1659
|
+
return String(((s = e.text) == null ? void 0 : s.toString()) || "").replace(
|
|
1660
|
+
/{{([^}]+)}}/g,
|
|
1661
|
+
(d, m) => O({
|
|
1662
|
+
code: m,
|
|
1663
|
+
context: o,
|
|
1664
|
+
localState: a,
|
|
1665
|
+
rootState: r,
|
|
1666
|
+
rootSetState: c,
|
|
1667
|
+
enableCache: !1
|
|
1668
|
+
})
|
|
1669
|
+
);
|
|
1670
|
+
}() },
|
|
1650
1671
|
style: {
|
|
1651
1672
|
outline: "none"
|
|
1652
1673
|
}
|
|
@@ -1677,7 +1698,7 @@ const Ht = {
|
|
|
1677
1698
|
}]
|
|
1678
1699
|
};
|
|
1679
1700
|
function Mt(e) {
|
|
1680
|
-
const t =
|
|
1701
|
+
const t = ie(null), [n, i] = A(() => []), [o, a] = A(() => []);
|
|
1681
1702
|
return R(() => {
|
|
1682
1703
|
var c;
|
|
1683
1704
|
if (!((c = t.current) != null && c.getElementsByTagName) || typeof window == "undefined")
|
|
@@ -1731,7 +1752,7 @@ const Ut = {
|
|
|
1731
1752
|
}]
|
|
1732
1753
|
}, _t = ["text/javascript", "application/javascript", "application/ecmascript"], Kt = (e) => _t.includes(e.type);
|
|
1733
1754
|
function zt(e) {
|
|
1734
|
-
const t =
|
|
1755
|
+
const t = ie(null), [n, i] = A(() => []), [o, a] = A(() => []), [r, c] = A(() => !1);
|
|
1735
1756
|
function s() {
|
|
1736
1757
|
if (!t.current || !t.current.getElementsByTagName)
|
|
1737
1758
|
return;
|
|
@@ -1740,13 +1761,13 @@ function zt(e) {
|
|
|
1740
1761
|
const u = d[m];
|
|
1741
1762
|
if (u.src && !n.includes(u.src)) {
|
|
1742
1763
|
n.push(u.src);
|
|
1743
|
-
const
|
|
1744
|
-
|
|
1764
|
+
const h = document.createElement("script");
|
|
1765
|
+
h.async = !0, h.src = u.src, document.head.appendChild(h);
|
|
1745
1766
|
} else if (Kt(u) && !o.includes(u.innerText))
|
|
1746
1767
|
try {
|
|
1747
1768
|
o.push(u.innerText), new Function(u.innerText)();
|
|
1748
|
-
} catch (
|
|
1749
|
-
console.warn("`Embed`: Error running script:",
|
|
1769
|
+
} catch (h) {
|
|
1770
|
+
console.warn("`Embed`: Error running script:", h);
|
|
1750
1771
|
}
|
|
1751
1772
|
}
|
|
1752
1773
|
}
|
|
@@ -2147,7 +2168,7 @@ const rn = _e({
|
|
|
2147
2168
|
BlocksWrapperProps: {},
|
|
2148
2169
|
nonce: ""
|
|
2149
2170
|
});
|
|
2150
|
-
function
|
|
2171
|
+
function xe(e) {
|
|
2151
2172
|
return Math.round(e * 1e3) / 1e3;
|
|
2152
2173
|
}
|
|
2153
2174
|
const cn = (e, t, n = !0) => {
|
|
@@ -2164,11 +2185,11 @@ const cn = (e, t, n = !0) => {
|
|
|
2164
2185
|
}, ln = (e) => cn(e, (t) => {
|
|
2165
2186
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2166
2187
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2167
|
-
}),
|
|
2188
|
+
}), Se = ({
|
|
2168
2189
|
event: e,
|
|
2169
2190
|
target: t
|
|
2170
2191
|
}) => {
|
|
2171
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a =
|
|
2192
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a = xe(i / n.width), r = xe(o / n.height);
|
|
2172
2193
|
return {
|
|
2173
2194
|
x: a,
|
|
2174
2195
|
y: r
|
|
@@ -2178,11 +2199,11 @@ const cn = (e, t, n = !0) => {
|
|
|
2178
2199
|
return {
|
|
2179
2200
|
targetBuilderElement: i || void 0,
|
|
2180
2201
|
metadata: {
|
|
2181
|
-
targetOffset: t ?
|
|
2202
|
+
targetOffset: t ? Se({
|
|
2182
2203
|
event: e,
|
|
2183
2204
|
target: t
|
|
2184
2205
|
}) : void 0,
|
|
2185
|
-
builderTargetOffset: n ?
|
|
2206
|
+
builderTargetOffset: n ? Se({
|
|
2186
2207
|
event: e,
|
|
2187
2208
|
target: n
|
|
2188
2209
|
}) : void 0,
|
|
@@ -2196,7 +2217,7 @@ async function dn({
|
|
|
2196
2217
|
}) {
|
|
2197
2218
|
return Fe(), globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e, t), { [e]: t };
|
|
2198
2219
|
}
|
|
2199
|
-
function
|
|
2220
|
+
function ve(e, ...t) {
|
|
2200
2221
|
const n = Object(e);
|
|
2201
2222
|
for (let i = 1; i < arguments.length; i++) {
|
|
2202
2223
|
const o = arguments[i];
|
|
@@ -2210,27 +2231,27 @@ function un(e) {
|
|
|
2210
2231
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
2211
2232
|
}
|
|
2212
2233
|
function mn(e, t) {
|
|
2213
|
-
const n =
|
|
2234
|
+
const n = fn(e), i = getComputedStyle(t), o = e.steps[0].styles, a = e.steps[e.steps.length - 1].styles, r = [o, a];
|
|
2214
2235
|
for (const c of r)
|
|
2215
2236
|
for (const s of n)
|
|
2216
2237
|
s in c || (c[s] = i[s]);
|
|
2217
2238
|
}
|
|
2218
|
-
function
|
|
2239
|
+
function fn(e) {
|
|
2219
2240
|
const t = [];
|
|
2220
2241
|
for (const n of e.steps)
|
|
2221
2242
|
for (const i in n.styles)
|
|
2222
2243
|
t.indexOf(i) === -1 && t.push(i);
|
|
2223
2244
|
return t;
|
|
2224
2245
|
}
|
|
2225
|
-
function
|
|
2246
|
+
function hn(e) {
|
|
2226
2247
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
2227
2248
|
if (!t.length) {
|
|
2228
2249
|
un(e.elementId || e.id || "");
|
|
2229
2250
|
return;
|
|
2230
2251
|
}
|
|
2231
2252
|
Array.from(t).forEach((n) => {
|
|
2232
|
-
mn(e, n), n.style.transition = "none", n.style.transitionDelay = "0",
|
|
2233
|
-
n.style.transition = `all ${e.duration}s ${re(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"),
|
|
2253
|
+
mn(e, n), n.style.transition = "none", n.style.transitionDelay = "0", ve(n.style, e.steps[0].styles), setTimeout(() => {
|
|
2254
|
+
n.style.transition = `all ${e.duration}s ${re(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), ve(n.style, e.steps[1].styles), setTimeout(() => {
|
|
2234
2255
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
2235
2256
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
2236
2257
|
});
|
|
@@ -2270,7 +2291,7 @@ font-weight: ${c};
|
|
|
2270
2291
|
}, yn = ({
|
|
2271
2292
|
cssCode: e,
|
|
2272
2293
|
contentId: t
|
|
2273
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
2294
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", xn = `
|
|
2274
2295
|
.builder-button {
|
|
2275
2296
|
all: unset;
|
|
2276
2297
|
}
|
|
@@ -2287,36 +2308,36 @@ font-weight: ${c};
|
|
|
2287
2308
|
text-align: inherit;
|
|
2288
2309
|
font-family: inherit;
|
|
2289
2310
|
}
|
|
2290
|
-
`,
|
|
2311
|
+
`, Sn = (e) => e ? "" : xn, vn = (e) => `variant-${e}`;
|
|
2291
2312
|
function pn(e) {
|
|
2292
|
-
var W,
|
|
2293
|
-
const t =
|
|
2313
|
+
var W, D, j, X, Z, se, de;
|
|
2314
|
+
const t = ie(null);
|
|
2294
2315
|
function n(g) {
|
|
2295
|
-
var
|
|
2296
|
-
const
|
|
2316
|
+
var S, v;
|
|
2317
|
+
const f = {
|
|
2297
2318
|
...e.builderContextSignal.rootState,
|
|
2298
2319
|
...g
|
|
2299
2320
|
};
|
|
2300
|
-
e.builderContextSignal.rootSetState ? (
|
|
2321
|
+
e.builderContextSignal.rootSetState ? (v = (S = e.builderContextSignal).rootSetState) == null || v.call(S, f) : e.builderContextSignal.rootState = f;
|
|
2301
2322
|
}
|
|
2302
2323
|
function i(g) {
|
|
2303
|
-
var
|
|
2304
|
-
const
|
|
2324
|
+
var S, v, k, B, U;
|
|
2325
|
+
const f = {
|
|
2305
2326
|
...e.builderContextSignal.content,
|
|
2306
2327
|
...g,
|
|
2307
2328
|
data: {
|
|
2308
|
-
...(
|
|
2329
|
+
...(S = e.builderContextSignal.content) == null ? void 0 : S.data,
|
|
2309
2330
|
...g == null ? void 0 : g.data
|
|
2310
2331
|
},
|
|
2311
2332
|
meta: {
|
|
2312
|
-
...(
|
|
2333
|
+
...(v = e.builderContextSignal.content) == null ? void 0 : v.meta,
|
|
2313
2334
|
...g == null ? void 0 : g.meta,
|
|
2314
2335
|
breakpoints: ((k = g == null ? void 0 : g.meta) == null ? void 0 : k.breakpoints) || ((U = (B = e.builderContextSignal.content) == null ? void 0 : B.meta) == null ? void 0 : U.breakpoints)
|
|
2315
2336
|
}
|
|
2316
2337
|
};
|
|
2317
2338
|
dn({
|
|
2318
|
-
value:
|
|
2319
|
-
key:
|
|
2339
|
+
value: f,
|
|
2340
|
+
key: f.id
|
|
2320
2341
|
}).then(() => {
|
|
2321
2342
|
T.refresh();
|
|
2322
2343
|
});
|
|
@@ -2335,28 +2356,28 @@ function pn(e) {
|
|
|
2335
2356
|
model: e.model,
|
|
2336
2357
|
trustedHosts: e.trustedHosts,
|
|
2337
2358
|
callbacks: {
|
|
2338
|
-
configureSdk: (
|
|
2359
|
+
configureSdk: (f) => {
|
|
2339
2360
|
var k;
|
|
2340
|
-
const { breakpoints:
|
|
2341
|
-
!
|
|
2361
|
+
const { breakpoints: S, contentId: v } = f;
|
|
2362
|
+
!v || v !== ((k = e.builderContextSignal.content) == null ? void 0 : k.id) || S && i({
|
|
2342
2363
|
meta: {
|
|
2343
|
-
breakpoints:
|
|
2364
|
+
breakpoints: S
|
|
2344
2365
|
}
|
|
2345
2366
|
});
|
|
2346
2367
|
},
|
|
2347
|
-
animation: (
|
|
2348
|
-
|
|
2368
|
+
animation: (f) => {
|
|
2369
|
+
hn(f);
|
|
2349
2370
|
},
|
|
2350
|
-
contentUpdate: (
|
|
2351
|
-
i(
|
|
2371
|
+
contentUpdate: (f) => {
|
|
2372
|
+
i(f);
|
|
2352
2373
|
}
|
|
2353
2374
|
}
|
|
2354
2375
|
})(g);
|
|
2355
2376
|
}
|
|
2356
2377
|
function s() {
|
|
2357
|
-
var
|
|
2358
|
-
const g = (
|
|
2359
|
-
g &&
|
|
2378
|
+
var f, S;
|
|
2379
|
+
const g = (S = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : S.jsCode;
|
|
2380
|
+
g && O({
|
|
2360
2381
|
code: g,
|
|
2361
2382
|
context: e.context || {},
|
|
2362
2383
|
localState: void 0,
|
|
@@ -2368,17 +2389,17 @@ function pn(e) {
|
|
|
2368
2389
|
enableCache: !1
|
|
2369
2390
|
});
|
|
2370
2391
|
}
|
|
2371
|
-
const [d, m] = A(() => ({})), [u,
|
|
2392
|
+
const [d, m] = A(() => ({})), [u, h] = A(() => ({})), [w, I] = A(() => !1);
|
|
2372
2393
|
function b(g) {
|
|
2373
|
-
var
|
|
2394
|
+
var f, S;
|
|
2374
2395
|
if (e.builderContextSignal.content) {
|
|
2375
|
-
const
|
|
2396
|
+
const v = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, k = (S = e.builderContextSignal.content) == null ? void 0 : S.id;
|
|
2376
2397
|
ue({
|
|
2377
2398
|
type: "click",
|
|
2378
2399
|
canTrack: q(e.canTrack),
|
|
2379
2400
|
contentId: k,
|
|
2380
2401
|
apiKey: e.apiKey,
|
|
2381
|
-
variationId:
|
|
2402
|
+
variationId: v !== k ? v : void 0,
|
|
2382
2403
|
...sn(g),
|
|
2383
2404
|
unique: !w
|
|
2384
2405
|
});
|
|
@@ -2386,8 +2407,8 @@ function pn(e) {
|
|
|
2386
2407
|
w || I(!0);
|
|
2387
2408
|
}
|
|
2388
2409
|
function P() {
|
|
2389
|
-
var
|
|
2390
|
-
const g = (
|
|
2410
|
+
var f, S, v;
|
|
2411
|
+
const g = (v = (S = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : S.httpRequests) != null ? v : {};
|
|
2391
2412
|
Object.entries(g).forEach(([k, B]) => {
|
|
2392
2413
|
if (!B || u[k] || d[k] && !V())
|
|
2393
2414
|
return;
|
|
@@ -2395,7 +2416,7 @@ function pn(e) {
|
|
|
2395
2416
|
const U = B.replace(
|
|
2396
2417
|
/{{([^}]+)}}/g,
|
|
2397
2418
|
($, Ne) => String(
|
|
2398
|
-
|
|
2419
|
+
O({
|
|
2399
2420
|
code: Ne,
|
|
2400
2421
|
context: e.context || {},
|
|
2401
2422
|
localState: void 0,
|
|
@@ -2416,13 +2437,13 @@ function pn(e) {
|
|
|
2416
2437
|
});
|
|
2417
2438
|
});
|
|
2418
2439
|
}
|
|
2419
|
-
function
|
|
2440
|
+
function x() {
|
|
2420
2441
|
V() && window.dispatchEvent(
|
|
2421
2442
|
new CustomEvent(
|
|
2422
2443
|
"builder:component:stateChange",
|
|
2423
2444
|
{
|
|
2424
2445
|
detail: {
|
|
2425
|
-
state:
|
|
2446
|
+
state: ae(e.builderContextSignal.rootState),
|
|
2426
2447
|
ref: {
|
|
2427
2448
|
name: e.model
|
|
2428
2449
|
}
|
|
@@ -2431,7 +2452,7 @@ function pn(e) {
|
|
|
2431
2452
|
)
|
|
2432
2453
|
);
|
|
2433
2454
|
}
|
|
2434
|
-
function
|
|
2455
|
+
function y(g) {
|
|
2435
2456
|
window.addEventListener("message", c), je(), He({
|
|
2436
2457
|
...e.locale ? {
|
|
2437
2458
|
locale: e.locale
|
|
@@ -2444,20 +2465,20 @@ function pn(e) {
|
|
|
2444
2465
|
} : {}
|
|
2445
2466
|
}), Object.values(
|
|
2446
2467
|
e.builderContextSignal.componentInfos
|
|
2447
|
-
).forEach((
|
|
2448
|
-
var
|
|
2449
|
-
const
|
|
2450
|
-
(
|
|
2468
|
+
).forEach((f) => {
|
|
2469
|
+
var v;
|
|
2470
|
+
const S = Me(f);
|
|
2471
|
+
(v = window.parent) == null || v.postMessage(S, "*");
|
|
2451
2472
|
}), window.addEventListener(
|
|
2452
2473
|
"builder:component:stateChangeListenerActivated",
|
|
2453
|
-
|
|
2474
|
+
x
|
|
2454
2475
|
);
|
|
2455
2476
|
}
|
|
2456
2477
|
function p(g) {
|
|
2457
|
-
const
|
|
2458
|
-
`builder.overrides.${
|
|
2459
|
-
), k =
|
|
2460
|
-
|
|
2478
|
+
const f = new URL(location.href).searchParams, S = f.get("builder.preview"), v = f.get(
|
|
2479
|
+
`builder.overrides.${S}`
|
|
2480
|
+
), k = f.get("apiKey") || f.get("builder.space");
|
|
2481
|
+
S === e.model && k === e.apiKey && (!e.content || v === e.content.id) && ke({
|
|
2461
2482
|
model: e.model,
|
|
2462
2483
|
apiKey: e.apiKey,
|
|
2463
2484
|
apiVersion: e.builderContextSignal.apiVersion
|
|
@@ -2470,12 +2491,12 @@ function pn(e) {
|
|
|
2470
2491
|
var g;
|
|
2471
2492
|
return (g = t.current) == null || g.addEventListener(
|
|
2472
2493
|
"initeditingbldr",
|
|
2473
|
-
|
|
2494
|
+
y
|
|
2474
2495
|
), () => {
|
|
2475
|
-
var
|
|
2476
|
-
return (
|
|
2496
|
+
var f;
|
|
2497
|
+
return (f = t.current) == null ? void 0 : f.removeEventListener(
|
|
2477
2498
|
"initeditingbldr",
|
|
2478
|
-
|
|
2499
|
+
y
|
|
2479
2500
|
);
|
|
2480
2501
|
};
|
|
2481
2502
|
}, []), R(() => {
|
|
@@ -2484,23 +2505,23 @@ function pn(e) {
|
|
|
2484
2505
|
"initpreviewingbldr",
|
|
2485
2506
|
p
|
|
2486
2507
|
), () => {
|
|
2487
|
-
var
|
|
2488
|
-
return (
|
|
2508
|
+
var f;
|
|
2509
|
+
return (f = t.current) == null ? void 0 : f.removeEventListener(
|
|
2489
2510
|
"initpreviewingbldr",
|
|
2490
2511
|
p
|
|
2491
2512
|
);
|
|
2492
2513
|
};
|
|
2493
2514
|
}, []), R(() => {
|
|
2494
|
-
var g,
|
|
2515
|
+
var g, f;
|
|
2495
2516
|
if (L()) {
|
|
2496
2517
|
if (V() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && q(e.canTrack)) {
|
|
2497
|
-
const
|
|
2518
|
+
const v = (g = e.builderContextSignal.content) == null ? void 0 : g.testVariationId, k = (f = e.builderContextSignal.content) == null ? void 0 : f.id, B = e.apiKey;
|
|
2498
2519
|
ue({
|
|
2499
2520
|
type: "impression",
|
|
2500
2521
|
canTrack: !0,
|
|
2501
2522
|
contentId: k,
|
|
2502
2523
|
apiKey: B,
|
|
2503
|
-
variationId:
|
|
2524
|
+
variationId: v !== k ? v : void 0
|
|
2504
2525
|
});
|
|
2505
2526
|
}
|
|
2506
2527
|
Le() && V();
|
|
@@ -2508,14 +2529,14 @@ function pn(e) {
|
|
|
2508
2529
|
}, []), R(() => {
|
|
2509
2530
|
e.apiKey || J.error(
|
|
2510
2531
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2511
|
-
), s(), P(),
|
|
2532
|
+
), s(), P(), x();
|
|
2512
2533
|
}, []), R(() => {
|
|
2513
2534
|
}, [e.content]), R(() => {
|
|
2514
2535
|
s();
|
|
2515
|
-
}, [(
|
|
2536
|
+
}, [(D = (W = e.builderContextSignal.content) == null ? void 0 : W.data) == null ? void 0 : D.jsCode]), R(() => {
|
|
2516
2537
|
P();
|
|
2517
|
-
}, [(X = (
|
|
2518
|
-
|
|
2538
|
+
}, [(X = (j = e.builderContextSignal.content) == null ? void 0 : j.data) == null ? void 0 : X.httpRequests]), R(() => {
|
|
2539
|
+
x();
|
|
2519
2540
|
}, [e.builderContextSignal.rootState]), R(() => {
|
|
2520
2541
|
e.data && n(e.data);
|
|
2521
2542
|
}, [e.data]), R(() => {
|
|
@@ -2525,7 +2546,7 @@ function pn(e) {
|
|
|
2525
2546
|
}, [e.locale]), R(() => () => {
|
|
2526
2547
|
L() && (window.removeEventListener("message", c), window.removeEventListener(
|
|
2527
2548
|
"builder:component:stateChangeListenerActivated",
|
|
2528
|
-
|
|
2549
|
+
x
|
|
2529
2550
|
));
|
|
2530
2551
|
}, []), /* @__PURE__ */ l(rn.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(
|
|
2531
2552
|
a,
|
|
@@ -2536,7 +2557,7 @@ function pn(e) {
|
|
|
2536
2557
|
"builder-model": e.model,
|
|
2537
2558
|
...o(),
|
|
2538
2559
|
...e.contentWrapperProps,
|
|
2539
|
-
className:
|
|
2560
|
+
className: vn(
|
|
2540
2561
|
((se = e.content) == null ? void 0 : se.testVariationId) || ((de = e.content) == null ? void 0 : de.id)
|
|
2541
2562
|
),
|
|
2542
2563
|
children: e.children
|
|
@@ -2552,7 +2573,7 @@ ${yn({
|
|
|
2552
2573
|
${bn({
|
|
2553
2574
|
customFonts: e.customFonts
|
|
2554
2575
|
})}
|
|
2555
|
-
${
|
|
2576
|
+
${Sn(e.isNestedRender)}
|
|
2556
2577
|
`.trim();
|
|
2557
2578
|
return /* @__PURE__ */ l(
|
|
2558
2579
|
Q,
|
|
@@ -2592,7 +2613,7 @@ const Cn = ({
|
|
|
2592
2613
|
meta: e == null ? void 0 : e.meta
|
|
2593
2614
|
} : void 0;
|
|
2594
2615
|
function pe(e) {
|
|
2595
|
-
var o, a, r, c, s, d, m, u,
|
|
2616
|
+
var o, a, r, c, s, d, m, u, h, w, I;
|
|
2596
2617
|
const t = an({
|
|
2597
2618
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2598
2619
|
variationId: (o = e.content) == null ? void 0 : o.testVariationId,
|
|
@@ -2602,11 +2623,11 @@ function pe(e) {
|
|
|
2602
2623
|
...ye(),
|
|
2603
2624
|
...((r = e.customComponents) == null ? void 0 : r.filter(({ models: b }) => !(b != null && b.length) || !e.model ? !0 : b.includes(e.model))) || []
|
|
2604
2625
|
].reduce(
|
|
2605
|
-
(b, { component: P, ...
|
|
2626
|
+
(b, { component: P, ...x }) => ({
|
|
2606
2627
|
...b,
|
|
2607
|
-
[
|
|
2628
|
+
[x.name]: {
|
|
2608
2629
|
component: P,
|
|
2609
|
-
...me(
|
|
2630
|
+
...me(x)
|
|
2610
2631
|
}
|
|
2611
2632
|
}),
|
|
2612
2633
|
{}
|
|
@@ -2630,9 +2651,9 @@ function pe(e) {
|
|
|
2630
2651
|
...ye(),
|
|
2631
2652
|
...((c = e.customComponents) == null ? void 0 : c.filter(({ models: b }) => !(b != null && b.length) || !e.model ? !0 : b.includes(e.model))) || []
|
|
2632
2653
|
].reduce(
|
|
2633
|
-
(b, { component: P, ...
|
|
2654
|
+
(b, { component: P, ...x }) => ({
|
|
2634
2655
|
...b,
|
|
2635
|
-
[
|
|
2656
|
+
[x.name]: me(x)
|
|
2636
2657
|
}),
|
|
2637
2658
|
{}
|
|
2638
2659
|
),
|
|
@@ -2674,7 +2695,7 @@ function pe(e) {
|
|
|
2674
2695
|
isNestedRender: e.isNestedRender,
|
|
2675
2696
|
contentId: (s = i.content) == null ? void 0 : s.id,
|
|
2676
2697
|
cssCode: (m = (d = i.content) == null ? void 0 : d.data) == null ? void 0 : m.cssCode,
|
|
2677
|
-
customFonts: (
|
|
2698
|
+
customFonts: (h = (u = i.content) == null ? void 0 : u.data) == null ? void 0 : h.customFonts
|
|
2678
2699
|
}
|
|
2679
2700
|
),
|
|
2680
2701
|
/* @__PURE__ */ l(
|
|
@@ -2822,12 +2843,12 @@ async function Rn(e) {
|
|
|
2822
2843
|
}, n = function() {
|
|
2823
2844
|
return "div";
|
|
2824
2845
|
}, i = function() {
|
|
2825
|
-
var u,
|
|
2846
|
+
var u, h;
|
|
2826
2847
|
return [
|
|
2827
|
-
e.attributes[
|
|
2848
|
+
e.attributes[H()],
|
|
2828
2849
|
"builder-symbol",
|
|
2829
2850
|
(u = e.symbol) != null && u.inline ? "builder-inline-symbol" : void 0,
|
|
2830
|
-
(
|
|
2851
|
+
(h = e.symbol) != null && h.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2831
2852
|
].filter(Boolean).join(" ");
|
|
2832
2853
|
}, o = ((a = e.symbol) == null ? void 0 : a.content) || await Tn({
|
|
2833
2854
|
symbol: e.symbol,
|