@builder.io/sdk-react-nextjs 0.16.1 → 0.16.2
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 +11 -11
- package/lib/browser/blocks-exports.mjs +213 -211
- 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-8a4d2728.js → server-entry-242f596f.js} +1 -1
- package/lib/browser/{server-entry-555ce264.cjs → server-entry-494604dc.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/blocks-exports.cjs +16 -16
- package/lib/edge/blocks-exports.mjs +243 -241
- 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-8a4d2728.js → server-entry-242f596f.js} +1 -1
- package/lib/edge/{server-entry-555ce264.cjs → server-entry-494604dc.cjs} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/node/blocks-exports.cjs +11 -11
- package/lib/node/blocks-exports.mjs +169 -167
- 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-753c71f6.js → node-runtime-42e494ca.js} +1 -1
- package/lib/node/{node-runtime-1e70fe16.cjs → node-runtime-e1243cd6.cjs} +1 -1
- package/lib/node/{server-entry-61a8c25a.cjs → server-entry-db7b41aa.cjs} +1 -1
- package/lib/node/{server-entry-e47775d7.js → server-entry-fbf4e3a9.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/esm/constants/sdk-version.d.ts +1 -1
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
var Ne = Object.defineProperty;
|
|
3
3
|
var Ae = (e, t, n) => t in e ? Ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
4
|
var ee = (e, t, n) => (Ae(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
5
|
-
import { jsx as l, Fragment as
|
|
6
|
-
import { TARGET as H, checkIsDefined as K, logger as J, isBrowser as z, fastClone as ie, isEditing as V, 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 pe, serializeComponentInfo as me, handleABTestingSync as He } from "./server-entry-
|
|
7
|
-
import { getFunctionArguments as Me, runInNode as Ue, parseCode as _e, getBuilderGlobals as Ke, set as ze } from "./node-runtime-
|
|
8
|
-
import { useRef as oe, useState as
|
|
5
|
+
import { jsx as l, Fragment as C, jsxs as P } from "react/jsx-runtime";
|
|
6
|
+
import { TARGET as H, checkIsDefined as K, logger as J, isBrowser as z, fastClone as ie, isEditing as V, 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 pe, serializeComponentInfo as me, handleABTestingSync as He } from "./server-entry-fbf4e3a9.js";
|
|
7
|
+
import { getFunctionArguments as Me, runInNode as Ue, parseCode as _e, getBuilderGlobals as Ke, set as ze } from "./node-runtime-42e494ca.js";
|
|
8
|
+
import { useRef as oe, useState as A, useEffect as R, createContext as qe } from "react";
|
|
9
9
|
import { useRouter as Ye } from "next/navigation";
|
|
10
10
|
import "lru-cache";
|
|
11
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
12
|
function ae(e) {
|
|
13
|
-
return /* @__PURE__ */ l(
|
|
13
|
+
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 }) }) });
|
|
14
14
|
}
|
|
15
15
|
const D = () => {
|
|
16
16
|
switch (H) {
|
|
@@ -113,7 +113,7 @@ const tt = () => {
|
|
|
113
113
|
return !1;
|
|
114
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
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),
|
|
116
|
+
}, nt = (e) => z() || tt() ? Ze(e) : Ue(e), N = class N {
|
|
117
117
|
static getCacheKey(t) {
|
|
118
118
|
return JSON.stringify({
|
|
119
119
|
...t,
|
|
@@ -123,16 +123,16 @@ const tt = () => {
|
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
static getCachedValue(t) {
|
|
126
|
-
return
|
|
126
|
+
return N.cache.get(t);
|
|
127
127
|
}
|
|
128
128
|
static setCachedValue(t, n) {
|
|
129
|
-
|
|
129
|
+
N.cache.size > 20 && N.cache.delete(N.cache.keys().next().value), N.cache.set(t, {
|
|
130
130
|
value: n
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
ee(
|
|
135
|
-
let F =
|
|
134
|
+
ee(N, "cacheLimit", 20), ee(N, "cache", /* @__PURE__ */ new Map());
|
|
135
|
+
let F = N;
|
|
136
136
|
function O({
|
|
137
137
|
code: e,
|
|
138
138
|
context: t,
|
|
@@ -407,7 +407,7 @@ function ft(e) {
|
|
|
407
407
|
});
|
|
408
408
|
return K(o.hide) ? !o.hide : K(o.show) ? o.show : !0;
|
|
409
409
|
}, n = function() {
|
|
410
|
-
var
|
|
410
|
+
var y, v, p;
|
|
411
411
|
const o = Y({
|
|
412
412
|
block: e.block,
|
|
413
413
|
localState: e.context.localState,
|
|
@@ -416,14 +416,14 @@ function ft(e) {
|
|
|
416
416
|
context: e.context.context,
|
|
417
417
|
shouldEvaluateBindings: !0
|
|
418
418
|
}), a = o.responsiveStyles, c = e.context.content, r = Te(
|
|
419
|
-
((
|
|
419
|
+
((y = c == null ? void 0 : c.meta) == null ? void 0 : y.breakpoints) || {}
|
|
420
420
|
), s = a == null ? void 0 : a.large, d = a == null ? void 0 : a.medium, m = a == null ? void 0 : a.small, u = o.id;
|
|
421
421
|
if (!u)
|
|
422
422
|
return "";
|
|
423
423
|
const h = s ? U({
|
|
424
424
|
className: u,
|
|
425
425
|
styles: s
|
|
426
|
-
}) : "",
|
|
426
|
+
}) : "", I = d ? U({
|
|
427
427
|
className: u,
|
|
428
428
|
styles: d,
|
|
429
429
|
mediaQuery: fe(
|
|
@@ -437,29 +437,29 @@ function ft(e) {
|
|
|
437
437
|
"small",
|
|
438
438
|
r
|
|
439
439
|
)
|
|
440
|
-
}) : "",
|
|
441
|
-
let
|
|
442
|
-
if (
|
|
443
|
-
const T = ((
|
|
444
|
-
|
|
440
|
+
}) : "", b = o.animations && o.animations.find((T) => T.trigger === "hover");
|
|
441
|
+
let E = "";
|
|
442
|
+
if (b) {
|
|
443
|
+
const T = ((p = (v = b.steps) == null ? void 0 : v[1]) == null ? void 0 : p.styles) || {};
|
|
444
|
+
E = U({
|
|
445
445
|
className: `${u}:hover`,
|
|
446
446
|
styles: {
|
|
447
447
|
...T,
|
|
448
|
-
transition: `all ${
|
|
449
|
-
|
|
448
|
+
transition: `all ${b.duration}s ${re(
|
|
449
|
+
b.easing
|
|
450
450
|
)}`,
|
|
451
|
-
transitionDelay:
|
|
451
|
+
transitionDelay: b.delay ? `${b.delay}s` : "0s"
|
|
452
452
|
}
|
|
453
453
|
}) || "";
|
|
454
454
|
}
|
|
455
455
|
return [
|
|
456
456
|
h,
|
|
457
|
-
|
|
457
|
+
I,
|
|
458
458
|
w,
|
|
459
|
-
|
|
459
|
+
E
|
|
460
460
|
].join(" ");
|
|
461
461
|
};
|
|
462
|
-
return /* @__PURE__ */ l(
|
|
462
|
+
return /* @__PURE__ */ l(C, { children: n() && t() ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(
|
|
463
463
|
Q,
|
|
464
464
|
{
|
|
465
465
|
id: "builderio-block",
|
|
@@ -603,7 +603,7 @@ const pt = ({
|
|
|
603
603
|
function he(e) {
|
|
604
604
|
var n;
|
|
605
605
|
const t = e.isInteractive ? St : e.componentRef;
|
|
606
|
-
return /* @__PURE__ */ l(
|
|
606
|
+
return /* @__PURE__ */ l(C, { children: e.componentRef ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(
|
|
607
607
|
t,
|
|
608
608
|
{
|
|
609
609
|
...pt({
|
|
@@ -665,22 +665,22 @@ function G(e) {
|
|
|
665
665
|
shouldEvaluateBindings: !0
|
|
666
666
|
});
|
|
667
667
|
}, o = function() {
|
|
668
|
-
var
|
|
669
|
-
return e.block.tagName === "a" || ((
|
|
668
|
+
var I;
|
|
669
|
+
return e.block.tagName === "a" || ((I = i().properties) == null ? void 0 : I.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
670
670
|
}, a = function() {
|
|
671
|
-
var w,
|
|
671
|
+
var w, b;
|
|
672
672
|
if ((w = e.block.repeat) != null && w.collection)
|
|
673
|
-
return !!((
|
|
673
|
+
return !!((b = n()) != null && b.length);
|
|
674
674
|
const h = "hide" in i() ? i().hide : !1;
|
|
675
675
|
return ("show" in i() ? i().show : !0) && !h;
|
|
676
676
|
}, c = function() {
|
|
677
|
-
var
|
|
678
|
-
return !((
|
|
677
|
+
var I, w;
|
|
678
|
+
return !((I = t()) != null && I.component) && !n() ? (w = i().children) != null ? w : [] : [];
|
|
679
679
|
}, r = function() {
|
|
680
|
-
var h,
|
|
680
|
+
var h, I, w, b;
|
|
681
681
|
return {
|
|
682
682
|
blockChildren: (h = i().children) != null ? h : [],
|
|
683
|
-
componentRef: (
|
|
683
|
+
componentRef: (I = t()) == null ? void 0 : I.component,
|
|
684
684
|
componentOptions: {
|
|
685
685
|
...Xe(i()),
|
|
686
686
|
...ut(t(), i()),
|
|
@@ -696,12 +696,12 @@ function G(e) {
|
|
|
696
696
|
registeredComponents: e.registeredComponents,
|
|
697
697
|
builderBlock: i(),
|
|
698
698
|
includeBlockProps: ((w = t()) == null ? void 0 : w.noWrap) === !0,
|
|
699
|
-
isInteractive: !((
|
|
699
|
+
isInteractive: !((b = t()) != null && b.isRSC)
|
|
700
700
|
};
|
|
701
701
|
};
|
|
702
|
-
return /* @__PURE__ */ l(
|
|
702
|
+
return /* @__PURE__ */ l(C, { children: a() ? /* @__PURE__ */ P(C, { children: [
|
|
703
703
|
/* @__PURE__ */ l(ft, { block: e.block, context: e.context }),
|
|
704
|
-
(s = t()) != null && s.noWrap ? /* @__PURE__ */ l(
|
|
704
|
+
(s = t()) != null && s.noWrap ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(
|
|
705
705
|
he,
|
|
706
706
|
{
|
|
707
707
|
componentRef: r().componentRef,
|
|
@@ -714,7 +714,7 @@ function G(e) {
|
|
|
714
714
|
includeBlockProps: r().includeBlockProps,
|
|
715
715
|
isInteractive: r().isInteractive
|
|
716
716
|
}
|
|
717
|
-
) }) : /* @__PURE__ */ l(
|
|
717
|
+
) }) : /* @__PURE__ */ l(C, { children: n() ? /* @__PURE__ */ l(C, { children: (m = n()) == null ? void 0 : m.map((u, h) => /* @__PURE__ */ l(
|
|
718
718
|
kt,
|
|
719
719
|
{
|
|
720
720
|
repeatContext: u.context,
|
|
@@ -790,7 +790,7 @@ function Ct(e) {
|
|
|
790
790
|
"*"
|
|
791
791
|
));
|
|
792
792
|
}
|
|
793
|
-
return /* @__PURE__ */ P(
|
|
793
|
+
return /* @__PURE__ */ P(C, { children: [
|
|
794
794
|
/* @__PURE__ */ l(
|
|
795
795
|
e.BlocksWrapper,
|
|
796
796
|
{
|
|
@@ -823,7 +823,7 @@ function le(e) {
|
|
|
823
823
|
styleProp: e.styleProp,
|
|
824
824
|
BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
|
|
825
825
|
BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
|
|
826
|
-
children: e.blocks ? /* @__PURE__ */ l(
|
|
826
|
+
children: e.blocks ? /* @__PURE__ */ l(C, { children: (i = e.blocks) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
|
|
827
827
|
G,
|
|
828
828
|
{
|
|
829
829
|
block: o,
|
|
@@ -838,25 +838,25 @@ function le(e) {
|
|
|
838
838
|
}
|
|
839
839
|
const It = (e) => `builder-columns ${e}-breakpoints`;
|
|
840
840
|
function wt(e) {
|
|
841
|
-
var
|
|
842
|
-
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], i = e.stackColumnsAt || "tablet", o = function(
|
|
843
|
-
return
|
|
844
|
-
}, a = function(
|
|
845
|
-
var
|
|
846
|
-
return ((
|
|
847
|
-
}, c = function(
|
|
848
|
-
const
|
|
849
|
-
return `calc(${
|
|
841
|
+
var b, E;
|
|
842
|
+
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], i = e.stackColumnsAt || "tablet", o = function(v) {
|
|
843
|
+
return v.link ? e.builderLinkComponent || "a" : "div";
|
|
844
|
+
}, a = function(v) {
|
|
845
|
+
var p;
|
|
846
|
+
return ((p = n[v]) == null ? void 0 : p.width) || 100 / n.length;
|
|
847
|
+
}, c = function(v) {
|
|
848
|
+
const p = a(v), T = t * (n.length - 1) * (p / 100);
|
|
849
|
+
return `calc(${p}% - ${T}px)`;
|
|
850
850
|
}, r = function({
|
|
851
|
-
stackedStyle:
|
|
852
|
-
desktopStyle:
|
|
851
|
+
stackedStyle: v,
|
|
852
|
+
desktopStyle: p
|
|
853
853
|
}) {
|
|
854
|
-
return i === "tablet" ?
|
|
854
|
+
return i === "tablet" ? v : p;
|
|
855
855
|
}, s = function({
|
|
856
|
-
stackedStyle:
|
|
857
|
-
desktopStyle:
|
|
856
|
+
stackedStyle: v,
|
|
857
|
+
desktopStyle: p
|
|
858
858
|
}) {
|
|
859
|
-
return i === "never" ?
|
|
859
|
+
return i === "never" ? p : v;
|
|
860
860
|
}, d = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", m = function() {
|
|
861
861
|
return {
|
|
862
862
|
"--flex-dir": d,
|
|
@@ -865,8 +865,8 @@ function wt(e) {
|
|
|
865
865
|
desktopStyle: "row"
|
|
866
866
|
})
|
|
867
867
|
};
|
|
868
|
-
}, u = function(
|
|
869
|
-
const
|
|
868
|
+
}, u = function(v) {
|
|
869
|
+
const p = v === 0 ? 0 : t, T = c(v), W = `${p}px`, L = "100%", j = 0;
|
|
870
870
|
return {
|
|
871
871
|
...{
|
|
872
872
|
display: "flex",
|
|
@@ -874,14 +874,14 @@ function wt(e) {
|
|
|
874
874
|
alignItems: "stretch"
|
|
875
875
|
},
|
|
876
876
|
width: T,
|
|
877
|
-
["marginLeft"]:
|
|
877
|
+
["marginLeft"]: W,
|
|
878
878
|
"--column-width-mobile": s({
|
|
879
879
|
stackedStyle: L,
|
|
880
880
|
desktopStyle: T
|
|
881
881
|
}),
|
|
882
882
|
"--column-margin-left-mobile": s({
|
|
883
883
|
stackedStyle: j,
|
|
884
|
-
desktopStyle:
|
|
884
|
+
desktopStyle: W
|
|
885
885
|
}),
|
|
886
886
|
"--column-width-tablet": r({
|
|
887
887
|
stackedStyle: L,
|
|
@@ -889,15 +889,15 @@ function wt(e) {
|
|
|
889
889
|
}),
|
|
890
890
|
"--column-margin-left-tablet": r({
|
|
891
891
|
stackedStyle: j,
|
|
892
|
-
desktopStyle:
|
|
892
|
+
desktopStyle: W
|
|
893
893
|
})
|
|
894
894
|
};
|
|
895
|
-
}, h = function(
|
|
896
|
-
var T,
|
|
895
|
+
}, h = function(v) {
|
|
896
|
+
var T, W;
|
|
897
897
|
return Te(
|
|
898
|
-
((
|
|
899
|
-
)[
|
|
900
|
-
},
|
|
898
|
+
((W = (T = e.builderContext.content) == null ? void 0 : T.meta) == null ? void 0 : W.breakpoints) || {}
|
|
899
|
+
)[v].max;
|
|
900
|
+
}, I = function() {
|
|
901
901
|
return `
|
|
902
902
|
@media (max-width: ${h("medium")}px) {
|
|
903
903
|
.${e.builderBlock.id}-breakpoints {
|
|
@@ -923,40 +923,40 @@ function wt(e) {
|
|
|
923
923
|
}
|
|
924
924
|
},
|
|
925
925
|
`;
|
|
926
|
-
}, w = function(
|
|
926
|
+
}, w = function(v, p) {
|
|
927
927
|
return {
|
|
928
|
-
...
|
|
929
|
-
href:
|
|
928
|
+
...v.link ? {
|
|
929
|
+
href: v.link
|
|
930
930
|
} : {},
|
|
931
931
|
[D()]: "builder-column",
|
|
932
|
-
style: Ie(u(
|
|
932
|
+
style: Ie(u(p))
|
|
933
933
|
};
|
|
934
934
|
};
|
|
935
|
-
return /* @__PURE__ */ P(
|
|
935
|
+
return /* @__PURE__ */ P(C, { children: [
|
|
936
936
|
/* @__PURE__ */ P(
|
|
937
937
|
"div",
|
|
938
938
|
{
|
|
939
|
-
className: It((
|
|
939
|
+
className: It((b = e.builderBlock) == null ? void 0 : b.id) + " div-c89348d2",
|
|
940
940
|
style: m(),
|
|
941
941
|
children: [
|
|
942
942
|
/* @__PURE__ */ l(
|
|
943
943
|
Q,
|
|
944
944
|
{
|
|
945
945
|
id: "builderio-columns",
|
|
946
|
-
styles:
|
|
946
|
+
styles: I(),
|
|
947
947
|
nonce: e.builderContext.nonce
|
|
948
948
|
}
|
|
949
949
|
),
|
|
950
|
-
(
|
|
950
|
+
(E = e.columns) == null ? void 0 : E.map((y, v) => /* @__PURE__ */ l(
|
|
951
951
|
ae,
|
|
952
952
|
{
|
|
953
|
-
TagName: o(
|
|
953
|
+
TagName: o(y),
|
|
954
954
|
actionAttributes: {},
|
|
955
|
-
attributes: w(
|
|
955
|
+
attributes: w(y, v),
|
|
956
956
|
children: /* @__PURE__ */ l(
|
|
957
957
|
le,
|
|
958
958
|
{
|
|
959
|
-
path: `component.options.columns.${
|
|
959
|
+
path: `component.options.columns.${v}.blocks`,
|
|
960
960
|
parent: e.builderBlock.id,
|
|
961
961
|
styleProp: {
|
|
962
962
|
flexGrow: "1"
|
|
@@ -964,11 +964,11 @@ function wt(e) {
|
|
|
964
964
|
context: e.builderContext,
|
|
965
965
|
registeredComponents: e.builderComponents,
|
|
966
966
|
linkComponent: e.builderLinkComponent,
|
|
967
|
-
blocks:
|
|
967
|
+
blocks: y.blocks
|
|
968
968
|
}
|
|
969
969
|
)
|
|
970
970
|
},
|
|
971
|
-
|
|
971
|
+
v
|
|
972
972
|
))
|
|
973
973
|
]
|
|
974
974
|
}
|
|
@@ -1021,12 +1021,14 @@ function Et(e) {
|
|
|
1021
1021
|
// images, otherwise you can supply this prop manually
|
|
1022
1022
|
!(u.match(/builder\.io/) || u.match(/cdn\.shopify\.com/)))
|
|
1023
1023
|
return e.srcset;
|
|
1024
|
-
if (e.
|
|
1025
|
-
if (
|
|
1026
|
-
|
|
1027
|
-
|
|
1024
|
+
if (!e.noWebp) {
|
|
1025
|
+
if (e.srcset && ((h = e.image) != null && h.includes("builder.io/api/v1/image"))) {
|
|
1026
|
+
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
1027
|
+
return console.debug("Removed given srcset"), te(u);
|
|
1028
|
+
} else if (e.image && !e.srcset)
|
|
1029
|
+
return te(u);
|
|
1028
1030
|
return te(u);
|
|
1029
|
-
|
|
1031
|
+
}
|
|
1030
1032
|
}
|
|
1031
1033
|
function n() {
|
|
1032
1034
|
var m;
|
|
@@ -1042,8 +1044,8 @@ function Et(e) {
|
|
|
1042
1044
|
};
|
|
1043
1045
|
return e.aspectRatio ? m : void 0;
|
|
1044
1046
|
}
|
|
1045
|
-
return /* @__PURE__ */ P(
|
|
1046
|
-
/* @__PURE__ */ P(
|
|
1047
|
+
return /* @__PURE__ */ P(C, { children: [
|
|
1048
|
+
/* @__PURE__ */ P(C, { children: [
|
|
1047
1049
|
/* @__PURE__ */ P("picture", { children: [
|
|
1048
1050
|
n() ? /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) : null,
|
|
1049
1051
|
/* @__PURE__ */ l(
|
|
@@ -1058,7 +1060,7 @@ function Et(e) {
|
|
|
1058
1060
|
objectFit: e.backgroundSize || "cover",
|
|
1059
1061
|
...i()
|
|
1060
1062
|
},
|
|
1061
|
-
className: "builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
1063
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-56bbd606",
|
|
1062
1064
|
src: e.image,
|
|
1063
1065
|
srcSet: t(),
|
|
1064
1066
|
sizes: e.sizes
|
|
@@ -1068,23 +1070,23 @@ function Et(e) {
|
|
|
1068
1070
|
e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ l(
|
|
1069
1071
|
"div",
|
|
1070
1072
|
{
|
|
1071
|
-
className: "builder-image-sizer div-
|
|
1073
|
+
className: "builder-image-sizer div-56bbd606",
|
|
1072
1074
|
style: {
|
|
1073
1075
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1074
1076
|
}
|
|
1075
1077
|
}
|
|
1076
1078
|
) : null,
|
|
1077
|
-
(r = (c = e.builderBlock) == null ? void 0 : c.children) != null && r.length && e.fitContent ? /* @__PURE__ */ l(
|
|
1078
|
-
!e.fitContent && ((d = (s = e.builderBlock) == null ? void 0 : s.children) != null && d.length) ? /* @__PURE__ */ l("div", { className: "div-
|
|
1079
|
+
(r = (c = e.builderBlock) == null ? void 0 : c.children) != null && r.length && e.fitContent ? /* @__PURE__ */ l(C, { children: e.children }) : null,
|
|
1080
|
+
!e.fitContent && ((d = (s = e.builderBlock) == null ? void 0 : s.children) != null && d.length) ? /* @__PURE__ */ l("div", { className: "div-56bbd606-2", children: e.children }) : null
|
|
1079
1081
|
] }),
|
|
1080
|
-
/* @__PURE__ */ l("style", { children: `.img-
|
|
1082
|
+
/* @__PURE__ */ l("style", { children: `.img-56bbd606 {
|
|
1081
1083
|
opacity: 1;
|
|
1082
1084
|
transition: opacity 0.2s ease-in-out;
|
|
1083
|
-
}.div-
|
|
1085
|
+
}.div-56bbd606 {
|
|
1084
1086
|
width: 100%;
|
|
1085
1087
|
pointer-events: none;
|
|
1086
1088
|
font-size: 0;
|
|
1087
|
-
}.div-
|
|
1089
|
+
}.div-56bbd606-2 {
|
|
1088
1090
|
display: flex;
|
|
1089
1091
|
flex-direction: column;
|
|
1090
1092
|
align-items: stretch;
|
|
@@ -1651,7 +1653,7 @@ const Ht = {
|
|
|
1651
1653
|
}]
|
|
1652
1654
|
};
|
|
1653
1655
|
function Mt(e) {
|
|
1654
|
-
const t = oe(null), [n, i] =
|
|
1656
|
+
const t = oe(null), [n, i] = A(() => []), [o, a] = A(() => []);
|
|
1655
1657
|
return R(() => {
|
|
1656
1658
|
var r;
|
|
1657
1659
|
if (!((r = t.current) != null && r.getElementsByTagName) || typeof window == "undefined")
|
|
@@ -1705,7 +1707,7 @@ const Ut = {
|
|
|
1705
1707
|
}]
|
|
1706
1708
|
}, _t = ["text/javascript", "application/javascript", "application/ecmascript"], Kt = (e) => _t.includes(e.type);
|
|
1707
1709
|
function zt(e) {
|
|
1708
|
-
const t = oe(null), [n, i] =
|
|
1710
|
+
const t = oe(null), [n, i] = A(() => []), [o, a] = A(() => []), [c, r] = A(() => !1);
|
|
1709
1711
|
function s() {
|
|
1710
1712
|
if (!t.current || !t.current.getElementsByTagName)
|
|
1711
1713
|
return;
|
|
@@ -2263,29 +2265,29 @@ font-weight: ${r};
|
|
|
2263
2265
|
}
|
|
2264
2266
|
`, xn = (e) => e ? "" : vn, Sn = (e) => `variant-${e}`;
|
|
2265
2267
|
function pn(e) {
|
|
2266
|
-
var
|
|
2268
|
+
var W, L, j, X, Z, se, de;
|
|
2267
2269
|
const t = oe(null);
|
|
2268
2270
|
function n(g) {
|
|
2269
|
-
var
|
|
2271
|
+
var x, S;
|
|
2270
2272
|
const f = {
|
|
2271
2273
|
...e.builderContextSignal.rootState,
|
|
2272
2274
|
...g
|
|
2273
2275
|
};
|
|
2274
|
-
e.builderContextSignal.rootSetState ? (
|
|
2276
|
+
e.builderContextSignal.rootSetState ? (S = (x = e.builderContextSignal).rootSetState) == null || S.call(x, f) : e.builderContextSignal.rootState = f;
|
|
2275
2277
|
}
|
|
2276
2278
|
function i(g) {
|
|
2277
|
-
var
|
|
2279
|
+
var x, S, k, B, M;
|
|
2278
2280
|
const f = {
|
|
2279
2281
|
...e.builderContextSignal.content,
|
|
2280
2282
|
...g,
|
|
2281
2283
|
data: {
|
|
2282
|
-
...(
|
|
2284
|
+
...(x = e.builderContextSignal.content) == null ? void 0 : x.data,
|
|
2283
2285
|
...g == null ? void 0 : g.data
|
|
2284
2286
|
},
|
|
2285
2287
|
meta: {
|
|
2286
|
-
...(
|
|
2288
|
+
...(S = e.builderContextSignal.content) == null ? void 0 : S.meta,
|
|
2287
2289
|
...g == null ? void 0 : g.meta,
|
|
2288
|
-
breakpoints: ((
|
|
2290
|
+
breakpoints: ((k = g == null ? void 0 : g.meta) == null ? void 0 : k.breakpoints) || ((M = (B = e.builderContextSignal.content) == null ? void 0 : B.meta) == null ? void 0 : M.breakpoints)
|
|
2289
2291
|
}
|
|
2290
2292
|
};
|
|
2291
2293
|
dn({
|
|
@@ -2301,7 +2303,7 @@ function pn(e) {
|
|
|
2301
2303
|
"aria-hidden": !0
|
|
2302
2304
|
};
|
|
2303
2305
|
}
|
|
2304
|
-
const [a, c] =
|
|
2306
|
+
const [a, c] = A(
|
|
2305
2307
|
() => e.contentWrapper || "div"
|
|
2306
2308
|
);
|
|
2307
2309
|
function r(g) {
|
|
@@ -2310,11 +2312,11 @@ function pn(e) {
|
|
|
2310
2312
|
trustedHosts: e.trustedHosts,
|
|
2311
2313
|
callbacks: {
|
|
2312
2314
|
configureSdk: (f) => {
|
|
2313
|
-
var
|
|
2314
|
-
const { breakpoints:
|
|
2315
|
-
!
|
|
2315
|
+
var k;
|
|
2316
|
+
const { breakpoints: x, contentId: S } = f;
|
|
2317
|
+
!S || S !== ((k = e.builderContextSignal.content) == null ? void 0 : k.id) || x && i({
|
|
2316
2318
|
meta: {
|
|
2317
|
-
breakpoints:
|
|
2319
|
+
breakpoints: x
|
|
2318
2320
|
}
|
|
2319
2321
|
});
|
|
2320
2322
|
},
|
|
@@ -2328,8 +2330,8 @@ function pn(e) {
|
|
|
2328
2330
|
})(g);
|
|
2329
2331
|
}
|
|
2330
2332
|
function s() {
|
|
2331
|
-
var f,
|
|
2332
|
-
const g = (
|
|
2333
|
+
var f, x;
|
|
2334
|
+
const g = (x = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : x.jsCode;
|
|
2333
2335
|
g && O({
|
|
2334
2336
|
code: g,
|
|
2335
2337
|
context: e.context || {},
|
|
@@ -2342,31 +2344,31 @@ function pn(e) {
|
|
|
2342
2344
|
enableCache: !1
|
|
2343
2345
|
});
|
|
2344
2346
|
}
|
|
2345
|
-
const [d, m] =
|
|
2346
|
-
function
|
|
2347
|
-
var f,
|
|
2347
|
+
const [d, m] = A(() => ({})), [u, h] = A(() => ({})), [I, w] = A(() => !1);
|
|
2348
|
+
function b(g) {
|
|
2349
|
+
var f, x;
|
|
2348
2350
|
if (e.builderContextSignal.content) {
|
|
2349
|
-
const
|
|
2351
|
+
const S = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, k = (x = e.builderContextSignal.content) == null ? void 0 : x.id;
|
|
2350
2352
|
ue({
|
|
2351
2353
|
type: "click",
|
|
2352
2354
|
canTrack: q(e.canTrack),
|
|
2353
|
-
contentId:
|
|
2355
|
+
contentId: k,
|
|
2354
2356
|
apiKey: e.apiKey,
|
|
2355
|
-
variationId:
|
|
2357
|
+
variationId: S !== k ? S : void 0,
|
|
2356
2358
|
...sn(g),
|
|
2357
|
-
unique: !
|
|
2359
|
+
unique: !I
|
|
2358
2360
|
});
|
|
2359
2361
|
}
|
|
2360
|
-
|
|
2362
|
+
I || w(!0);
|
|
2361
2363
|
}
|
|
2362
|
-
function
|
|
2363
|
-
var f,
|
|
2364
|
-
const g = (
|
|
2365
|
-
Object.entries(g).forEach(([
|
|
2366
|
-
if (!
|
|
2364
|
+
function E() {
|
|
2365
|
+
var f, x, S;
|
|
2366
|
+
const g = (S = (x = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : x.httpRequests) != null ? S : {};
|
|
2367
|
+
Object.entries(g).forEach(([k, B]) => {
|
|
2368
|
+
if (!B || u[k] || d[k] && !V())
|
|
2367
2369
|
return;
|
|
2368
|
-
u[
|
|
2369
|
-
const M =
|
|
2370
|
+
u[k] = !0;
|
|
2371
|
+
const M = B.replace(
|
|
2370
2372
|
/{{([^}]+)}}/g,
|
|
2371
2373
|
($, We) => String(
|
|
2372
2374
|
O({
|
|
@@ -2381,16 +2383,16 @@ function pn(e) {
|
|
|
2381
2383
|
);
|
|
2382
2384
|
Le(M).then(($) => $.json()).then(($) => {
|
|
2383
2385
|
n({
|
|
2384
|
-
[
|
|
2385
|
-
}), d[
|
|
2386
|
+
[k]: $
|
|
2387
|
+
}), d[k] = !0;
|
|
2386
2388
|
}).catch(($) => {
|
|
2387
|
-
console.error("error fetching dynamic data",
|
|
2389
|
+
console.error("error fetching dynamic data", B, $);
|
|
2388
2390
|
}).finally(() => {
|
|
2389
|
-
u[
|
|
2391
|
+
u[k] = !1;
|
|
2390
2392
|
});
|
|
2391
2393
|
});
|
|
2392
2394
|
}
|
|
2393
|
-
function
|
|
2395
|
+
function y() {
|
|
2394
2396
|
V() && window.dispatchEvent(
|
|
2395
2397
|
new CustomEvent(
|
|
2396
2398
|
"builder:component:stateChange",
|
|
@@ -2405,7 +2407,7 @@ function pn(e) {
|
|
|
2405
2407
|
)
|
|
2406
2408
|
);
|
|
2407
2409
|
}
|
|
2408
|
-
function
|
|
2410
|
+
function v(g) {
|
|
2409
2411
|
window.addEventListener("message", r), je(), De({
|
|
2410
2412
|
...e.locale ? {
|
|
2411
2413
|
locale: e.locale
|
|
@@ -2419,24 +2421,24 @@ function pn(e) {
|
|
|
2419
2421
|
}), Object.values(
|
|
2420
2422
|
e.builderContextSignal.componentInfos
|
|
2421
2423
|
).forEach((f) => {
|
|
2422
|
-
var
|
|
2423
|
-
const
|
|
2424
|
-
(
|
|
2424
|
+
var S;
|
|
2425
|
+
const x = Oe(f);
|
|
2426
|
+
(S = window.parent) == null || S.postMessage(x, "*");
|
|
2425
2427
|
}), window.addEventListener(
|
|
2426
2428
|
"builder:component:stateChangeListenerActivated",
|
|
2427
|
-
|
|
2429
|
+
y
|
|
2428
2430
|
);
|
|
2429
2431
|
}
|
|
2430
|
-
function
|
|
2431
|
-
const f = new URL(location.href).searchParams,
|
|
2432
|
-
`builder.overrides.${
|
|
2433
|
-
),
|
|
2434
|
-
|
|
2432
|
+
function p(g) {
|
|
2433
|
+
const f = new URL(location.href).searchParams, x = f.get("builder.preview"), S = f.get(
|
|
2434
|
+
`builder.overrides.${x}`
|
|
2435
|
+
), k = f.get("apiKey") || f.get("builder.space");
|
|
2436
|
+
x === e.model && k === e.apiKey && (!e.content || S === e.content.id) && pe({
|
|
2435
2437
|
model: e.model,
|
|
2436
2438
|
apiKey: e.apiKey,
|
|
2437
2439
|
apiVersion: e.builderContextSignal.apiVersion
|
|
2438
|
-
}).then((
|
|
2439
|
-
|
|
2440
|
+
}).then((B) => {
|
|
2441
|
+
B && i(B);
|
|
2440
2442
|
});
|
|
2441
2443
|
}
|
|
2442
2444
|
const T = Ye();
|
|
@@ -2444,37 +2446,37 @@ function pn(e) {
|
|
|
2444
2446
|
var g;
|
|
2445
2447
|
return (g = t.current) == null || g.addEventListener(
|
|
2446
2448
|
"initeditingbldr",
|
|
2447
|
-
|
|
2449
|
+
v
|
|
2448
2450
|
), () => {
|
|
2449
2451
|
var f;
|
|
2450
2452
|
return (f = t.current) == null ? void 0 : f.removeEventListener(
|
|
2451
2453
|
"initeditingbldr",
|
|
2452
|
-
|
|
2454
|
+
v
|
|
2453
2455
|
);
|
|
2454
2456
|
};
|
|
2455
2457
|
}, []), R(() => {
|
|
2456
2458
|
var g;
|
|
2457
2459
|
return (g = t.current) == null || g.addEventListener(
|
|
2458
2460
|
"initpreviewingbldr",
|
|
2459
|
-
|
|
2461
|
+
p
|
|
2460
2462
|
), () => {
|
|
2461
2463
|
var f;
|
|
2462
2464
|
return (f = t.current) == null ? void 0 : f.removeEventListener(
|
|
2463
2465
|
"initpreviewingbldr",
|
|
2464
|
-
|
|
2466
|
+
p
|
|
2465
2467
|
);
|
|
2466
2468
|
};
|
|
2467
2469
|
}, []), R(() => {
|
|
2468
2470
|
var g, f;
|
|
2469
2471
|
if (z()) {
|
|
2470
2472
|
if (V() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && q(e.canTrack)) {
|
|
2471
|
-
const
|
|
2473
|
+
const S = (g = e.builderContextSignal.content) == null ? void 0 : g.testVariationId, k = (f = e.builderContextSignal.content) == null ? void 0 : f.id, B = e.apiKey;
|
|
2472
2474
|
ue({
|
|
2473
2475
|
type: "impression",
|
|
2474
2476
|
canTrack: !0,
|
|
2475
|
-
contentId:
|
|
2476
|
-
apiKey:
|
|
2477
|
-
variationId:
|
|
2477
|
+
contentId: k,
|
|
2478
|
+
apiKey: B,
|
|
2479
|
+
variationId: S !== k ? S : void 0
|
|
2478
2480
|
});
|
|
2479
2481
|
}
|
|
2480
2482
|
$e() && V();
|
|
@@ -2482,14 +2484,14 @@ function pn(e) {
|
|
|
2482
2484
|
}, []), R(() => {
|
|
2483
2485
|
e.apiKey || J.error(
|
|
2484
2486
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2485
|
-
), s(),
|
|
2487
|
+
), s(), E(), y();
|
|
2486
2488
|
}, []), R(() => {
|
|
2487
2489
|
}, [e.content]), R(() => {
|
|
2488
2490
|
s();
|
|
2489
|
-
}, [(L = (
|
|
2490
|
-
|
|
2491
|
+
}, [(L = (W = e.builderContextSignal.content) == null ? void 0 : W.data) == null ? void 0 : L.jsCode]), R(() => {
|
|
2492
|
+
E();
|
|
2491
2493
|
}, [(X = (j = e.builderContextSignal.content) == null ? void 0 : j.data) == null ? void 0 : X.httpRequests]), R(() => {
|
|
2492
|
-
|
|
2494
|
+
y();
|
|
2493
2495
|
}, [e.builderContextSignal.rootState]), R(() => {
|
|
2494
2496
|
e.data && n(e.data);
|
|
2495
2497
|
}, [e.data]), R(() => {
|
|
@@ -2499,13 +2501,13 @@ function pn(e) {
|
|
|
2499
2501
|
}, [e.locale]), R(() => () => {
|
|
2500
2502
|
z() && (window.removeEventListener("message", r), window.removeEventListener(
|
|
2501
2503
|
"builder:component:stateChangeListenerActivated",
|
|
2502
|
-
|
|
2504
|
+
y
|
|
2503
2505
|
));
|
|
2504
2506
|
}, []), /* @__PURE__ */ l(rn.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(
|
|
2505
2507
|
a,
|
|
2506
2508
|
{
|
|
2507
2509
|
ref: t,
|
|
2508
|
-
onClick: (g) =>
|
|
2510
|
+
onClick: (g) => b(g),
|
|
2509
2511
|
"builder-content-id": (Z = e.builderContextSignal.content) == null ? void 0 : Z.id,
|
|
2510
2512
|
"builder-model": e.model,
|
|
2511
2513
|
...o(),
|
|
@@ -2566,7 +2568,7 @@ const Cn = ({
|
|
|
2566
2568
|
meta: e == null ? void 0 : e.meta
|
|
2567
2569
|
} : void 0;
|
|
2568
2570
|
function Se(e) {
|
|
2569
|
-
var o, a, c, r, s, d, m, u, h;
|
|
2571
|
+
var o, a, c, r, s, d, m, u, h, I, w;
|
|
2570
2572
|
const t = an({
|
|
2571
2573
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2572
2574
|
variationId: (o = e.content) == null ? void 0 : o.testVariationId,
|
|
@@ -2574,12 +2576,12 @@ function Se(e) {
|
|
|
2574
2576
|
contentId: (a = e.content) == null ? void 0 : a.id
|
|
2575
2577
|
}), n = [
|
|
2576
2578
|
...be(),
|
|
2577
|
-
...e.customComponents || []
|
|
2579
|
+
...((c = e.customComponents) == null ? void 0 : c.filter(({ models: b }) => !(b != null && b.length) || !e.model ? !0 : b.includes(e.model))) || []
|
|
2578
2580
|
].reduce(
|
|
2579
|
-
(
|
|
2580
|
-
...
|
|
2581
|
+
(b, { component: E, ...y }) => ({
|
|
2582
|
+
...b,
|
|
2581
2583
|
[y.name]: {
|
|
2582
|
-
component:
|
|
2584
|
+
component: E,
|
|
2583
2585
|
...me(y)
|
|
2584
2586
|
}
|
|
2585
2587
|
}),
|
|
@@ -2602,10 +2604,10 @@ function Se(e) {
|
|
|
2602
2604
|
apiVersion: e.apiVersion,
|
|
2603
2605
|
componentInfos: [
|
|
2604
2606
|
...be(),
|
|
2605
|
-
...e.customComponents || []
|
|
2607
|
+
...((r = e.customComponents) == null ? void 0 : r.filter(({ models: b }) => !(b != null && b.length) || !e.model ? !0 : b.includes(e.model))) || []
|
|
2606
2608
|
].reduce(
|
|
2607
|
-
(
|
|
2608
|
-
...
|
|
2609
|
+
(b, { component: E, ...y }) => ({
|
|
2610
|
+
...b,
|
|
2609
2611
|
[y.name]: me(y)
|
|
2610
2612
|
}),
|
|
2611
2613
|
{}
|
|
@@ -2646,15 +2648,15 @@ function Se(e) {
|
|
|
2646
2648
|
{
|
|
2647
2649
|
nonce: e.nonce || "",
|
|
2648
2650
|
isNestedRender: e.isNestedRender,
|
|
2649
|
-
contentId: (
|
|
2650
|
-
cssCode: (
|
|
2651
|
-
customFonts: (
|
|
2651
|
+
contentId: (s = i.content) == null ? void 0 : s.id,
|
|
2652
|
+
cssCode: (m = (d = i.content) == null ? void 0 : d.data) == null ? void 0 : m.cssCode,
|
|
2653
|
+
customFonts: (h = (u = i.content) == null ? void 0 : u.data) == null ? void 0 : h.customFonts
|
|
2652
2654
|
}
|
|
2653
2655
|
),
|
|
2654
2656
|
/* @__PURE__ */ l(
|
|
2655
2657
|
le,
|
|
2656
2658
|
{
|
|
2657
|
-
blocks: (
|
|
2659
|
+
blocks: (w = (I = i.content) == null ? void 0 : I.data) == null ? void 0 : w.blocks,
|
|
2658
2660
|
context: i,
|
|
2659
2661
|
registeredComponents: n,
|
|
2660
2662
|
linkComponent: e.linkComponent
|
|
@@ -2690,7 +2692,7 @@ function wn(e) {
|
|
|
2690
2692
|
canTrack: q(e.canTrack)
|
|
2691
2693
|
});
|
|
2692
2694
|
};
|
|
2693
|
-
return /* @__PURE__ */ P(
|
|
2695
|
+
return /* @__PURE__ */ P(C, { children: [
|
|
2694
2696
|
!e.isNestedRender && H !== "reactNative" ? /* @__PURE__ */ l(
|
|
2695
2697
|
ne,
|
|
2696
2698
|
{
|
|
@@ -2699,7 +2701,7 @@ function wn(e) {
|
|
|
2699
2701
|
nonce: e.nonce || ""
|
|
2700
2702
|
}
|
|
2701
2703
|
) : null,
|
|
2702
|
-
t ? /* @__PURE__ */ P(
|
|
2704
|
+
t ? /* @__PURE__ */ P(C, { children: [
|
|
2703
2705
|
/* @__PURE__ */ l(
|
|
2704
2706
|
Q,
|
|
2705
2707
|
{
|