@builder.io/sdk-react 4.1.2 → 4.2.0
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 +7 -7
- package/lib/browser/blocks-exports.mjs +215 -193
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-275748e0.js → server-entry-065ec411.js} +1 -1
- package/lib/browser/{server-entry-d2f19ab1.cjs → server-entry-09953757.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-59685072.js → accordion-79f6d62c.js} +1 -1
- package/lib/edge/{accordion-59377bdf.cjs → accordion-c239771d.cjs} +1 -1
- package/lib/edge/{blocks-803a3669.js → blocks-3cb3a9cd.js} +5 -5
- package/lib/edge/{blocks-ab4caea4.cjs → blocks-56f79850.cjs} +2 -2
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-244756d9.js → button-6dee05c9.js} +2 -2
- package/lib/edge/{button-d9ead397.cjs → button-759b43fb.cjs} +1 -1
- package/lib/edge/{columns-ac088b45.js → columns-2743498a.js} +3 -3
- package/lib/edge/{columns-88904faf.cjs → columns-a29ec0ac.cjs} +1 -1
- package/lib/edge/{content-variants-7ba31977.js → content-variants-4d5a1e3c.js} +172 -150
- package/lib/edge/{content-variants-d0558de3.cjs → content-variants-bdf1748b.cjs} +6 -6
- package/lib/edge/{custom-code-e2904013.cjs → custom-code-6129bd8c.cjs} +1 -1
- package/lib/edge/{custom-code-3d893bd2.js → custom-code-8034fac0.js} +1 -1
- package/lib/edge/{embed-7710e674.cjs → embed-b2ea5150.cjs} +1 -1
- package/lib/edge/{embed-7c2fe6ce.js → embed-f5b10eeb.js} +1 -1
- package/lib/edge/{form-a5b57678.js → form-14942d4f.js} +3 -3
- package/lib/edge/{form-ec1cd318.cjs → form-26c3a03e.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-31bfc4d6.cjs → get-class-prop-name-7e739c9f.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-4ca8bda9.js → get-class-prop-name-f6a63f4a.js} +1 -1
- package/lib/edge/{img-1b034d45.js → img-ba2ef9ee.js} +1 -1
- package/lib/edge/{img-f00b7db5.cjs → img-f33a2e42.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-dfd8b37e.js → input-7089e95f.js} +1 -1
- package/lib/edge/{input-19390442.cjs → input-c2f95825.cjs} +1 -1
- package/lib/edge/{personalization-container-40c62fee.cjs → personalization-container-794b3939.cjs} +1 -1
- package/lib/edge/{personalization-container-660938a9.js → personalization-container-eb1ecef2.js} +4 -4
- package/lib/edge/{select-155fc504.js → select-8f01592a.js} +1 -1
- package/lib/edge/{select-9839622b.cjs → select-af0bb9fe.cjs} +1 -1
- package/lib/edge/{server-entry-bdf7aa30.cjs → server-entry-142a50e9.cjs} +1 -1
- package/lib/edge/{server-entry-75006b6f.js → server-entry-7c65c9a8.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-c14c2de1.js → slot-2638fd6d.js} +3 -3
- package/lib/edge/{slot-28225152.cjs → slot-db37860e.cjs} +1 -1
- package/lib/edge/{symbol-e5dc7a91.cjs → symbol-630b9a57.cjs} +1 -1
- package/lib/edge/{symbol-2419b184.js → symbol-7faca118.js} +2 -2
- package/lib/edge/{tabs-c7011fa2.js → tabs-2eee6422.js} +3 -3
- package/lib/edge/{tabs-d7aa6ac2.cjs → tabs-502123df.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +14 -14
- package/lib/node/blocks-exports.mjs +218 -196
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-7a611f62.cjs → server-entry-375d06e8.cjs} +1 -1
- package/lib/node/{server-entry-0cf21855.js → server-entry-581dd491.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-68685828.cjs → setIvm-2eb44b9d.cjs} +1 -1
- package/lib/node/{setIvm-4171d613.js → setIvm-8d02dc72.js} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-88656beb.cjs → should-force-browser-runtime-in-node-ed3fa1f9.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-9fe42073.js → should-force-browser-runtime-in-node-f461467e.js} +1 -1
- package/package.json +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { TARGET as
|
|
3
|
-
import { setClientUserAttributes as Hi } from "./server-entry-
|
|
4
|
-
import { jsx as s, Fragment as R, jsxs as
|
|
2
|
+
import { TARGET as O, isEditing as L, isBrowser as M, getUserAttributes as ct, checkIsDefined as ae, logger as J, isPreviewing as se, userAttributesService as Ce, getDefaultCanTrack as Z, logFetch as Fe, setupBrowserForEditing as ut, createRegisterComponentMessage as dt, getCookieSync as mt, _track as Te, fetchOneEntry as Le, createEditorListener as ft, serializeIncludingFunctions as Ie, handleABTestingSync as ht } from "./server-entry-065ec411.js";
|
|
3
|
+
import { setClientUserAttributes as Hi } from "./server-entry-065ec411.js";
|
|
4
|
+
import { jsx as s, Fragment as R, jsxs as $ } from "react/jsx-runtime";
|
|
5
5
|
import * as gt from "react";
|
|
6
6
|
import { createContext as _e, useEffect as V, useState as C, useRef as H, useContext as we, createElement as Ue } from "react";
|
|
7
7
|
const bt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), yt = (e) => typeof e == "string" && bt.has(e.toLowerCase());
|
|
@@ -9,7 +9,7 @@ function ye(e) {
|
|
|
9
9
|
return /* @__PURE__ */ s(R, { children: yt(e.TagName) ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ s(R, { children: typeof e.TagName == "string" ? /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
|
|
10
10
|
}
|
|
11
11
|
const z = () => {
|
|
12
|
-
switch (
|
|
12
|
+
switch (O) {
|
|
13
13
|
case "react":
|
|
14
14
|
case "reactNative":
|
|
15
15
|
case "rsc":
|
|
@@ -272,7 +272,7 @@ function be(e) {
|
|
|
272
272
|
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = be(e[n]));
|
|
273
273
|
return t;
|
|
274
274
|
}
|
|
275
|
-
const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(
|
|
275
|
+
const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(O), $t = (e) => {
|
|
276
276
|
if (Wt) {
|
|
277
277
|
const t = ve(e);
|
|
278
278
|
return {
|
|
@@ -320,24 +320,24 @@ const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(F), $t = (e) =
|
|
|
320
320
|
}
|
|
321
321
|
return o;
|
|
322
322
|
};
|
|
323
|
-
function
|
|
323
|
+
function Ot({
|
|
324
324
|
block: e,
|
|
325
325
|
context: t,
|
|
326
326
|
localState: n,
|
|
327
327
|
rootState: i,
|
|
328
328
|
rootSetState: r
|
|
329
329
|
}) {
|
|
330
|
-
let o =
|
|
331
|
-
return o =
|
|
330
|
+
let o = e;
|
|
331
|
+
return o = Dt({
|
|
332
332
|
block: o,
|
|
333
333
|
localState: n,
|
|
334
334
|
rootState: i,
|
|
335
335
|
rootSetState: r,
|
|
336
336
|
context: t
|
|
337
|
-
});
|
|
337
|
+
}), o = Nt(o, i.locale), o;
|
|
338
338
|
}
|
|
339
339
|
const ce = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
340
|
-
function
|
|
340
|
+
function Ft(e, t, n = {}) {
|
|
341
341
|
let i, r, o, a = null, l = 0;
|
|
342
342
|
const c = function() {
|
|
343
343
|
l = n.leading === !1 ? 0 : Date.now(), a = null, o = e.apply(i, r), a || (i = r = null);
|
|
@@ -416,7 +416,7 @@ function Ut(e) {
|
|
|
416
416
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
417
417
|
})) : e.repeat && i && !r && !l(n) && (i = !1, X(n.style, e.steps[0].styles));
|
|
418
418
|
}
|
|
419
|
-
const a =
|
|
419
|
+
const a = Ft(o, 200, {
|
|
420
420
|
leading: !1
|
|
421
421
|
});
|
|
422
422
|
function l(f) {
|
|
@@ -465,7 +465,7 @@ const qt = ({
|
|
|
465
465
|
block: e
|
|
466
466
|
}));
|
|
467
467
|
function Ye(e) {
|
|
468
|
-
switch (
|
|
468
|
+
switch (O) {
|
|
469
469
|
case "svelte":
|
|
470
470
|
case "vue":
|
|
471
471
|
case "solid":
|
|
@@ -624,7 +624,7 @@ function Yt(e) {
|
|
|
624
624
|
return ae(i.hide) ? !i.hide : ae(i.show) ? i.show : !0;
|
|
625
625
|
}
|
|
626
626
|
function n() {
|
|
627
|
-
var k, A, T,
|
|
627
|
+
var k, A, T, w, g;
|
|
628
628
|
const i = e.block, r = i.responsiveStyles, o = e.context.content, a = et(
|
|
629
629
|
((k = o == null ? void 0 : o.meta) == null ? void 0 : k.breakpoints) || {}
|
|
630
630
|
), l = !!((T = (A = o == null ? void 0 : o.meta) == null ? void 0 : A.breakpoints) != null && T.xsmall), c = r == null ? void 0 : r.large, u = r == null ? void 0 : r.medium, f = r == null ? void 0 : r.small, b = r == null ? void 0 : r.xsmall, m = i.id;
|
|
@@ -657,7 +657,7 @@ function Yt(e) {
|
|
|
657
657
|
}) : "", y = i.animations && i.animations.find((x) => x.trigger === "hover");
|
|
658
658
|
let S = "";
|
|
659
659
|
if (y) {
|
|
660
|
-
const x = ((g = (
|
|
660
|
+
const x = ((g = (w = y.steps) == null ? void 0 : w[1]) == null ? void 0 : g.styles) || {};
|
|
661
661
|
S = Y({
|
|
662
662
|
className: `${m}:hover`,
|
|
663
663
|
styles: {
|
|
@@ -707,7 +707,7 @@ function tt(e) {
|
|
|
707
707
|
const o = n[r];
|
|
708
708
|
let a = Zt(r);
|
|
709
709
|
if (e.stripPrefix)
|
|
710
|
-
switch (
|
|
710
|
+
switch (O) {
|
|
711
711
|
case "vue":
|
|
712
712
|
a = a.replace("v-on:", "");
|
|
713
713
|
break;
|
|
@@ -899,7 +899,7 @@ function ue(e) {
|
|
|
899
899
|
var h;
|
|
900
900
|
if (n.value && !n.update && !se())
|
|
901
901
|
return n.value;
|
|
902
|
-
const d = (h = e.block.repeat) != null && h.collection ? e.block :
|
|
902
|
+
const d = (h = e.block.repeat) != null && h.collection ? e.block : Ot({
|
|
903
903
|
block: e.block,
|
|
904
904
|
localState: e.context.localState,
|
|
905
905
|
rootState: e.context.rootState,
|
|
@@ -951,7 +951,7 @@ function ue(e) {
|
|
|
951
951
|
registeredComponents: e.registeredComponents,
|
|
952
952
|
builderBlock: r(),
|
|
953
953
|
includeBlockProps: ((p = o == null ? void 0 : o()) == null ? void 0 : p.noWrap) === !0,
|
|
954
|
-
isInteractive: !((y = o == null ? void 0 : o()) != null && y.isRSC &&
|
|
954
|
+
isInteractive: !((y = o == null ? void 0 : o()) != null && y.isRSC && O === "rsc")
|
|
955
955
|
};
|
|
956
956
|
}
|
|
957
957
|
return V(() => {
|
|
@@ -964,7 +964,7 @@ function ue(e) {
|
|
|
964
964
|
);
|
|
965
965
|
}, []), V(() => {
|
|
966
966
|
n.update = !0;
|
|
967
|
-
}), /* @__PURE__ */ s(R, { children: l() ? /* @__PURE__ */
|
|
967
|
+
}), /* @__PURE__ */ s(R, { children: l() ? /* @__PURE__ */ $(R, { children: [
|
|
968
968
|
/* @__PURE__ */ s(Yt, { block: r(), context: e.context }),
|
|
969
969
|
(f = o == null ? void 0 : o()) != null && f.noWrap ? t() ? /* @__PURE__ */ s(R, { children: (v = t()) == null ? void 0 : v.map((d, h) => /* @__PURE__ */ s(
|
|
970
970
|
Ve,
|
|
@@ -997,7 +997,7 @@ function ue(e) {
|
|
|
997
997
|
linkComponent: e.linkComponent
|
|
998
998
|
},
|
|
999
999
|
Re(h)
|
|
1000
|
-
)) }) : /* @__PURE__ */
|
|
1000
|
+
)) }) : /* @__PURE__ */ $(
|
|
1001
1001
|
rn,
|
|
1002
1002
|
{
|
|
1003
1003
|
Wrapper: a(),
|
|
@@ -1078,7 +1078,7 @@ function sn(e) {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
return V(() => {
|
|
1080
1080
|
}, []), V(() => {
|
|
1081
|
-
}, [e.blocks]), /* @__PURE__ */
|
|
1081
|
+
}, [e.blocks]), /* @__PURE__ */ $(R, { children: [
|
|
1082
1082
|
/* @__PURE__ */ s("style", { children: `.props-blocks-wrapper-8834791c {
|
|
1083
1083
|
display: flex;
|
|
1084
1084
|
flex-direction: column;
|
|
@@ -1101,10 +1101,10 @@ function sn(e) {
|
|
|
1101
1101
|
)
|
|
1102
1102
|
] });
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1104
|
+
function U(e) {
|
|
1105
1105
|
var i, r, o;
|
|
1106
1106
|
const t = we(pe), n = we(He);
|
|
1107
|
-
return /* @__PURE__ */
|
|
1107
|
+
return /* @__PURE__ */ $(
|
|
1108
1108
|
sn,
|
|
1109
1109
|
{
|
|
1110
1110
|
blocks: e.blocks,
|
|
@@ -1178,7 +1178,7 @@ function un(e) {
|
|
|
1178
1178
|
};
|
|
1179
1179
|
}
|
|
1180
1180
|
function b(y) {
|
|
1181
|
-
const S = y === 0 ? 0 : t(), k = a(y), A = `${S}px`, T = "100%",
|
|
1181
|
+
const S = y === 0 ? 0 : t(), k = a(y), A = `${S}px`, T = "100%", w = 0;
|
|
1182
1182
|
return {
|
|
1183
1183
|
...{
|
|
1184
1184
|
display: "flex",
|
|
@@ -1192,7 +1192,7 @@ function un(e) {
|
|
|
1192
1192
|
desktopStyle: k
|
|
1193
1193
|
}),
|
|
1194
1194
|
"--column-margin-left-mobile": c({
|
|
1195
|
-
stackedStyle:
|
|
1195
|
+
stackedStyle: w,
|
|
1196
1196
|
desktopStyle: A
|
|
1197
1197
|
}),
|
|
1198
1198
|
"--column-width-tablet": l({
|
|
@@ -1200,7 +1200,7 @@ function un(e) {
|
|
|
1200
1200
|
desktopStyle: k
|
|
1201
1201
|
}),
|
|
1202
1202
|
"--column-margin-left-tablet": l({
|
|
1203
|
-
stackedStyle:
|
|
1203
|
+
stackedStyle: w,
|
|
1204
1204
|
desktopStyle: A
|
|
1205
1205
|
})
|
|
1206
1206
|
};
|
|
@@ -1248,13 +1248,13 @@ function un(e) {
|
|
|
1248
1248
|
style: Ye(b(S))
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
1251
|
-
return /* @__PURE__ */
|
|
1251
|
+
return /* @__PURE__ */ $(R, { children: [
|
|
1252
1252
|
/* @__PURE__ */ s("style", { children: `.div-0369db37 {
|
|
1253
1253
|
display: flex;
|
|
1254
1254
|
line-height: normal;
|
|
1255
1255
|
height: 100%;
|
|
1256
1256
|
}` }),
|
|
1257
|
-
/* @__PURE__ */
|
|
1257
|
+
/* @__PURE__ */ $(
|
|
1258
1258
|
"div",
|
|
1259
1259
|
{
|
|
1260
1260
|
className: cn((h = e.builderBlock) == null ? void 0 : h.id) + " div-0369db37",
|
|
@@ -1275,7 +1275,7 @@ function un(e) {
|
|
|
1275
1275
|
actionAttributes: {},
|
|
1276
1276
|
attributes: d(y, S),
|
|
1277
1277
|
children: /* @__PURE__ */ s(
|
|
1278
|
-
|
|
1278
|
+
U,
|
|
1279
1279
|
{
|
|
1280
1280
|
path: `columns.${S}.blocks`,
|
|
1281
1281
|
parent: e.builderBlock.id,
|
|
@@ -1362,7 +1362,7 @@ function hn(e) {
|
|
|
1362
1362
|
return e.aspectRatio ? f : void 0;
|
|
1363
1363
|
}
|
|
1364
1364
|
return V(() => {
|
|
1365
|
-
}, []), /* @__PURE__ */
|
|
1365
|
+
}, []), /* @__PURE__ */ $(R, { children: [
|
|
1366
1366
|
/* @__PURE__ */ s("style", { children: `.img-3cc22d08 {
|
|
1367
1367
|
opacity: 1;
|
|
1368
1368
|
transition: opacity 0.2s ease-in-out;
|
|
@@ -1380,8 +1380,8 @@ function hn(e) {
|
|
|
1380
1380
|
width: 100%;
|
|
1381
1381
|
height: 100%;
|
|
1382
1382
|
}` }),
|
|
1383
|
-
/* @__PURE__ */
|
|
1384
|
-
/* @__PURE__ */
|
|
1383
|
+
/* @__PURE__ */ $(R, { children: [
|
|
1384
|
+
/* @__PURE__ */ $("picture", { children: [
|
|
1385
1385
|
n() ? /* @__PURE__ */ s("source", { type: "image/webp", srcSet: n() }) : null,
|
|
1386
1386
|
/* @__PURE__ */ s(
|
|
1387
1387
|
"img",
|
|
@@ -1658,7 +1658,7 @@ const yn = `function getPersonalizedVariant(variants, blockId, isHydrationTarget
|
|
|
1658
1658
|
}
|
|
1659
1659
|
}`, ie = "default", xn = "filterWithCustomTargeting", nt = "builderIoPersonalization", it = "updateVisibilityStylesScript", rt = ["react", "vue", "svelte", "qwik"], re = ["vue", "svelte", "qwik"];
|
|
1660
1660
|
function Sn(e, t) {
|
|
1661
|
-
return !(e && e.length > 0) || !t ? !1 : re.includes(
|
|
1661
|
+
return !(e && e.length > 0) || !t ? !1 : re.includes(O) ? !0 : !M();
|
|
1662
1662
|
}
|
|
1663
1663
|
function kn({
|
|
1664
1664
|
variants: e,
|
|
@@ -1703,7 +1703,7 @@ const Cn = () => `
|
|
|
1703
1703
|
window.${xn} = ${pn}
|
|
1704
1704
|
window.${nt} = ${yn}
|
|
1705
1705
|
window.${it} = ${vn}
|
|
1706
|
-
`, ot =
|
|
1706
|
+
`, ot = O === "react", Tn = (e, t, n) => `window.${nt}(${JSON.stringify(e)}, "${t}", ${ot}${n ? `, "${n}"` : ""})`, In = (e, t, n) => `window.${it}(${JSON.stringify(e)}, "${t}", ${ot}${n ? `, "${n}"` : ""})`, me = {
|
|
1707
1707
|
"@type": "@builder.io/sdk:Element",
|
|
1708
1708
|
layerName: "Accordion item title",
|
|
1709
1709
|
responsiveStyles: {
|
|
@@ -1906,7 +1906,7 @@ function En(e) {
|
|
|
1906
1906
|
function f(m) {
|
|
1907
1907
|
t.includes(m) ? n(i() ? [] : t.filter((v) => v !== m)) : n(i() ? [m] : t.concat(m));
|
|
1908
1908
|
}
|
|
1909
|
-
return /* @__PURE__ */ s("div", { className: "builder-accordion", style: r(), children: (b = e.items) == null ? void 0 : b.map((m, v) => /* @__PURE__ */
|
|
1909
|
+
return /* @__PURE__ */ s("div", { className: "builder-accordion", style: r(), children: (b = e.items) == null ? void 0 : b.map((m, v) => /* @__PURE__ */ $(gt.Fragment, { children: [
|
|
1910
1910
|
/* @__PURE__ */ s(
|
|
1911
1911
|
"div",
|
|
1912
1912
|
{
|
|
@@ -1921,7 +1921,7 @@ function En(e) {
|
|
|
1921
1921
|
"data-index": v,
|
|
1922
1922
|
onClick: (d) => f(v),
|
|
1923
1923
|
children: /* @__PURE__ */ s(
|
|
1924
|
-
|
|
1924
|
+
U,
|
|
1925
1925
|
{
|
|
1926
1926
|
blocks: m.title,
|
|
1927
1927
|
path: `items.${v}.title`,
|
|
@@ -1939,7 +1939,7 @@ function En(e) {
|
|
|
1939
1939
|
className: l(v),
|
|
1940
1940
|
style: u(),
|
|
1941
1941
|
children: /* @__PURE__ */ s(
|
|
1942
|
-
|
|
1942
|
+
U,
|
|
1943
1943
|
{
|
|
1944
1944
|
blocks: m.detail,
|
|
1945
1945
|
path: `items.${v}.detail`,
|
|
@@ -2362,33 +2362,33 @@ function j(e) {
|
|
|
2362
2362
|
);
|
|
2363
2363
|
}
|
|
2364
2364
|
function Wn(e) {
|
|
2365
|
-
var S, k, A, T,
|
|
2365
|
+
var S, k, A, T, w, g, x, E, N, F, _, P, D;
|
|
2366
2366
|
const t = H(null), [n, i] = C(
|
|
2367
2367
|
() => Ce.getUserAttributes()
|
|
2368
2368
|
), [r, o] = C(
|
|
2369
2369
|
() => {
|
|
2370
|
-
var
|
|
2370
|
+
var I, B, W;
|
|
2371
2371
|
return Tn(
|
|
2372
2372
|
e.variants,
|
|
2373
|
-
((
|
|
2374
|
-
(
|
|
2373
|
+
((I = e.builderBlock) == null ? void 0 : I.id) || "none",
|
|
2374
|
+
(W = (B = e.builderContext) == null ? void 0 : B.rootState) == null ? void 0 : W.locale
|
|
2375
2375
|
);
|
|
2376
2376
|
}
|
|
2377
2377
|
), [a, l] = C(
|
|
2378
2378
|
() => {
|
|
2379
|
-
var
|
|
2379
|
+
var I, B, W;
|
|
2380
2380
|
return In(
|
|
2381
2381
|
e.variants,
|
|
2382
|
-
((
|
|
2383
|
-
(
|
|
2382
|
+
((I = e.builderBlock) == null ? void 0 : I.id) || "none",
|
|
2383
|
+
(W = (B = e.builderContext) == null ? void 0 : B.rootState) == null ? void 0 : W.locale
|
|
2384
2384
|
);
|
|
2385
2385
|
}
|
|
2386
2386
|
), [c, u] = C(() => []), [f, b] = C(
|
|
2387
2387
|
() => {
|
|
2388
|
-
var
|
|
2388
|
+
var I;
|
|
2389
2389
|
return Sn(
|
|
2390
2390
|
e.variants,
|
|
2391
|
-
Z((
|
|
2391
|
+
Z((I = e.builderContext) == null ? void 0 : I.canTrack)
|
|
2392
2392
|
);
|
|
2393
2393
|
}
|
|
2394
2394
|
), [m, v] = C(() => !1);
|
|
@@ -2399,26 +2399,26 @@ function Wn(e) {
|
|
|
2399
2399
|
};
|
|
2400
2400
|
}
|
|
2401
2401
|
function h() {
|
|
2402
|
-
return (e.variants || []).filter((
|
|
2403
|
-
var B,
|
|
2402
|
+
return (e.variants || []).filter((I) => {
|
|
2403
|
+
var B, W, K, q;
|
|
2404
2404
|
return bn(
|
|
2405
2405
|
{
|
|
2406
|
-
...(
|
|
2406
|
+
...(W = (B = e.builderContext) == null ? void 0 : B.rootState) != null && W.locale ? {
|
|
2407
2407
|
locale: (q = (K = e.builderContext) == null ? void 0 : K.rootState) == null ? void 0 : q.locale
|
|
2408
2408
|
} : {},
|
|
2409
2409
|
...n
|
|
2410
2410
|
},
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2411
|
+
I.query,
|
|
2412
|
+
I.startDate,
|
|
2413
|
+
I.endDate
|
|
2414
2414
|
);
|
|
2415
2415
|
});
|
|
2416
2416
|
}
|
|
2417
2417
|
function p() {
|
|
2418
|
-
var
|
|
2418
|
+
var I;
|
|
2419
2419
|
return kn({
|
|
2420
2420
|
variants: e.variants,
|
|
2421
|
-
fallbackBlocks: (
|
|
2421
|
+
fallbackBlocks: (I = e.builderBlock) == null ? void 0 : I.children,
|
|
2422
2422
|
isHydrated: m,
|
|
2423
2423
|
filteredVariants: h(),
|
|
2424
2424
|
previewingIndex: e.previewingIndex
|
|
@@ -2426,29 +2426,29 @@ function Wn(e) {
|
|
|
2426
2426
|
}
|
|
2427
2427
|
function y() {
|
|
2428
2428
|
return (e.variants || []).map(
|
|
2429
|
-
(
|
|
2430
|
-
var
|
|
2431
|
-
return `div[data-variant-id="${(
|
|
2429
|
+
(I, B) => {
|
|
2430
|
+
var W;
|
|
2431
|
+
return `div[data-variant-id="${(W = e.builderBlock) == null ? void 0 : W.id}-${B}"] { display: none !important; } `;
|
|
2432
2432
|
}
|
|
2433
2433
|
).join("");
|
|
2434
2434
|
}
|
|
2435
2435
|
return V(() => {
|
|
2436
2436
|
var B;
|
|
2437
2437
|
v(!0);
|
|
2438
|
-
const
|
|
2439
|
-
(
|
|
2440
|
-
i(
|
|
2438
|
+
const I = Ce.subscribeOnUserAttributesChange(
|
|
2439
|
+
(W) => {
|
|
2440
|
+
i(W);
|
|
2441
2441
|
},
|
|
2442
2442
|
{
|
|
2443
|
-
fireImmediately:
|
|
2443
|
+
fireImmediately: O === "qwik"
|
|
2444
2444
|
}
|
|
2445
2445
|
);
|
|
2446
2446
|
if (!(L() || se())) {
|
|
2447
|
-
const
|
|
2447
|
+
const W = h()[0];
|
|
2448
2448
|
t.current && (t.current.dispatchEvent(
|
|
2449
2449
|
new CustomEvent("builder.variantLoaded", {
|
|
2450
2450
|
detail: {
|
|
2451
|
-
variant:
|
|
2451
|
+
variant: W || ie,
|
|
2452
2452
|
content: (B = e.builderContext) == null ? void 0 : B.content
|
|
2453
2453
|
},
|
|
2454
2454
|
bubbles: !0
|
|
@@ -2459,7 +2459,7 @@ function Wn(e) {
|
|
|
2459
2459
|
te.isIntersecting && t.current && t.current.dispatchEvent(
|
|
2460
2460
|
new CustomEvent("builder.variantDisplayed", {
|
|
2461
2461
|
detail: {
|
|
2462
|
-
variant:
|
|
2462
|
+
variant: W || ie,
|
|
2463
2463
|
content: (Q = e.builderContext) == null ? void 0 : Q.content
|
|
2464
2464
|
},
|
|
2465
2465
|
bubbles: !0
|
|
@@ -2468,12 +2468,12 @@ function Wn(e) {
|
|
|
2468
2468
|
});
|
|
2469
2469
|
}).observe(t.current));
|
|
2470
2470
|
}
|
|
2471
|
-
c.push(
|
|
2471
|
+
c.push(I);
|
|
2472
2472
|
}, []), V(() => () => {
|
|
2473
|
-
c.forEach((
|
|
2474
|
-
}, []), /* @__PURE__ */
|
|
2475
|
-
m && re.includes(
|
|
2476
|
-
|
|
2473
|
+
c.forEach((I) => I());
|
|
2474
|
+
}, []), /* @__PURE__ */ $("div", { ref: t, ...d(), children: [
|
|
2475
|
+
m && re.includes(O) ? /* @__PURE__ */ s(
|
|
2476
|
+
U,
|
|
2477
2477
|
{
|
|
2478
2478
|
blocks: p().blocks,
|
|
2479
2479
|
parent: (S = e.builderBlock) == null ? void 0 : S.id,
|
|
@@ -2486,14 +2486,14 @@ function Wn(e) {
|
|
|
2486
2486
|
}
|
|
2487
2487
|
}
|
|
2488
2488
|
) : null,
|
|
2489
|
-
!m && re.includes(
|
|
2490
|
-
f ? /* @__PURE__ */
|
|
2489
|
+
!m && re.includes(O) || !re.includes(O) ? /* @__PURE__ */ $(R, { children: [
|
|
2490
|
+
f ? /* @__PURE__ */ $(R, { children: [
|
|
2491
2491
|
/* @__PURE__ */ s(
|
|
2492
2492
|
ee,
|
|
2493
2493
|
{
|
|
2494
2494
|
nonce: ((T = e.builderContext) == null ? void 0 : T.nonce) || "",
|
|
2495
2495
|
styles: y(),
|
|
2496
|
-
id: `variants-styles-${(
|
|
2496
|
+
id: `variants-styles-${(w = e.builderBlock) == null ? void 0 : w.id}`
|
|
2497
2497
|
}
|
|
2498
2498
|
),
|
|
2499
2499
|
/* @__PURE__ */ s(
|
|
@@ -2504,18 +2504,18 @@ function Wn(e) {
|
|
|
2504
2504
|
id: `variants-visibility-script-${(x = e.builderBlock) == null ? void 0 : x.id}`
|
|
2505
2505
|
}
|
|
2506
2506
|
),
|
|
2507
|
-
(
|
|
2508
|
-
var
|
|
2507
|
+
(E = e.variants) == null ? void 0 : E.map((I, B) => {
|
|
2508
|
+
var W, K, q, te, Q, ke;
|
|
2509
2509
|
return /* @__PURE__ */ s(
|
|
2510
|
-
|
|
2510
|
+
U,
|
|
2511
2511
|
{
|
|
2512
2512
|
BlocksWrapperProps: {
|
|
2513
|
-
...(
|
|
2513
|
+
...(W = e.builderContext) == null ? void 0 : W.BlocksWrapperProps,
|
|
2514
2514
|
"aria-hidden": !0,
|
|
2515
2515
|
hidden: !0,
|
|
2516
2516
|
"data-variant-id": `${(K = e.builderBlock) == null ? void 0 : K.id}-${B}`
|
|
2517
2517
|
},
|
|
2518
|
-
blocks:
|
|
2518
|
+
blocks: I.blocks,
|
|
2519
2519
|
parent: (q = e.builderBlock) == null ? void 0 : q.id,
|
|
2520
2520
|
path: `component.options.variants.${B}.blocks`,
|
|
2521
2521
|
context: e.builderContext,
|
|
@@ -2534,23 +2534,23 @@ function Wn(e) {
|
|
|
2534
2534
|
})
|
|
2535
2535
|
] }) : null,
|
|
2536
2536
|
/* @__PURE__ */ s(
|
|
2537
|
-
|
|
2537
|
+
U,
|
|
2538
2538
|
{
|
|
2539
2539
|
blocks: p().blocks,
|
|
2540
|
-
parent: (
|
|
2540
|
+
parent: (N = e.builderBlock) == null ? void 0 : N.id,
|
|
2541
2541
|
path: p().path,
|
|
2542
2542
|
context: e.builderContext,
|
|
2543
2543
|
registeredComponents: e.builderComponents,
|
|
2544
2544
|
BlocksWrapperProps: {
|
|
2545
|
-
...(
|
|
2546
|
-
"data-variant-id": `${(
|
|
2545
|
+
...(F = e.builderContext) == null ? void 0 : F.BlocksWrapperProps,
|
|
2546
|
+
"data-variant-id": `${(_ = e.builderBlock) == null ? void 0 : _.id}-${p().index}`
|
|
2547
2547
|
},
|
|
2548
2548
|
children: f ? /* @__PURE__ */ s(
|
|
2549
2549
|
j,
|
|
2550
2550
|
{
|
|
2551
2551
|
nonce: ((P = e.builderContext) == null ? void 0 : P.nonce) || "",
|
|
2552
2552
|
scriptStr: r,
|
|
2553
|
-
id: `variants-script-${(
|
|
2553
|
+
id: `variants-script-${(D = e.builderBlock) == null ? void 0 : D.id}-${ie}`
|
|
2554
2554
|
}
|
|
2555
2555
|
) : null
|
|
2556
2556
|
}
|
|
@@ -2615,7 +2615,7 @@ const $n = {
|
|
|
2615
2615
|
builderComponents: !0
|
|
2616
2616
|
}
|
|
2617
2617
|
};
|
|
2618
|
-
function
|
|
2618
|
+
function On(e) {
|
|
2619
2619
|
var t, n, i;
|
|
2620
2620
|
return /* @__PURE__ */ s(
|
|
2621
2621
|
"div",
|
|
@@ -2627,7 +2627,7 @@ function Fn(e) {
|
|
|
2627
2627
|
"builder-slot": e.name
|
|
2628
2628
|
},
|
|
2629
2629
|
children: /* @__PURE__ */ s(
|
|
2630
|
-
|
|
2630
|
+
U,
|
|
2631
2631
|
{
|
|
2632
2632
|
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
2633
2633
|
path: `symbol.data.${e.name}`,
|
|
@@ -2639,7 +2639,7 @@ function Fn(e) {
|
|
|
2639
2639
|
}
|
|
2640
2640
|
);
|
|
2641
2641
|
}
|
|
2642
|
-
const
|
|
2642
|
+
const Fn = {
|
|
2643
2643
|
name: "Symbol",
|
|
2644
2644
|
noWrap: !0,
|
|
2645
2645
|
static: !0,
|
|
@@ -2831,7 +2831,7 @@ function _n(e) {
|
|
|
2831
2831
|
function r(a) {
|
|
2832
2832
|
a === t && e.collapsible ? n(-1) : n(a);
|
|
2833
2833
|
}
|
|
2834
|
-
return /* @__PURE__ */
|
|
2834
|
+
return /* @__PURE__ */ $("div", { children: [
|
|
2835
2835
|
/* @__PURE__ */ s(
|
|
2836
2836
|
"div",
|
|
2837
2837
|
{
|
|
@@ -2851,7 +2851,7 @@ function _n(e) {
|
|
|
2851
2851
|
},
|
|
2852
2852
|
onClick: (c) => r(l),
|
|
2853
2853
|
children: /* @__PURE__ */ s(
|
|
2854
|
-
|
|
2854
|
+
U,
|
|
2855
2855
|
{
|
|
2856
2856
|
parent: e.builderBlock.id,
|
|
2857
2857
|
path: `tabs.${l}.label`,
|
|
@@ -2867,7 +2867,7 @@ function _n(e) {
|
|
|
2867
2867
|
}
|
|
2868
2868
|
),
|
|
2869
2869
|
i(t) ? /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
2870
|
-
|
|
2870
|
+
U,
|
|
2871
2871
|
{
|
|
2872
2872
|
parent: e.builderBlock.id,
|
|
2873
2873
|
path: `tabs.${t}.content`,
|
|
@@ -3297,25 +3297,25 @@ function Xn(e) {
|
|
|
3297
3297
|
let p;
|
|
3298
3298
|
const y = new FormData(d), S = Array.from(d.querySelectorAll("input,select,textarea")).filter((g) => !!g.name).map((g) => {
|
|
3299
3299
|
let x;
|
|
3300
|
-
const
|
|
3300
|
+
const E = g.name;
|
|
3301
3301
|
if (g instanceof HTMLInputElement)
|
|
3302
3302
|
if (g.type === "radio") {
|
|
3303
3303
|
if (g.checked)
|
|
3304
3304
|
return x = g.name, {
|
|
3305
|
-
key:
|
|
3305
|
+
key: E,
|
|
3306
3306
|
value: x
|
|
3307
3307
|
};
|
|
3308
3308
|
} else if (g.type === "checkbox")
|
|
3309
3309
|
x = g.checked;
|
|
3310
3310
|
else if (g.type === "number" || g.type === "range") {
|
|
3311
|
-
const
|
|
3312
|
-
isNaN(
|
|
3311
|
+
const N = g.valueAsNumber;
|
|
3312
|
+
isNaN(N) || (x = N);
|
|
3313
3313
|
} else
|
|
3314
3314
|
g.type === "file" ? x = g.files : x = g.value;
|
|
3315
3315
|
else
|
|
3316
3316
|
x = g.value;
|
|
3317
3317
|
return {
|
|
3318
|
-
key:
|
|
3318
|
+
key: E,
|
|
3319
3319
|
value: x
|
|
3320
3320
|
};
|
|
3321
3321
|
});
|
|
@@ -3326,8 +3326,8 @@ function Xn(e) {
|
|
|
3326
3326
|
p = y;
|
|
3327
3327
|
else {
|
|
3328
3328
|
const g = {};
|
|
3329
|
-
Array.from(S).forEach(({ value: x, key:
|
|
3330
|
-
ze(g,
|
|
3329
|
+
Array.from(S).forEach(({ value: x, key: E }) => {
|
|
3330
|
+
ze(g, E, x);
|
|
3331
3331
|
}), p = JSON.stringify(g);
|
|
3332
3332
|
}
|
|
3333
3333
|
k && k !== "multipart/form-data" && (m && ((v = e.action) != null && v.includes("zapier.com")) || (h["content-type"] = k));
|
|
@@ -3341,17 +3341,17 @@ function Xn(e) {
|
|
|
3341
3341
|
}
|
|
3342
3342
|
const T = `${Yn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
|
|
3343
3343
|
e.sendSubmissionsToEmail || ""
|
|
3344
|
-
)}&name=${encodeURIComponent(e.name || "")}`,
|
|
3345
|
-
|
|
3344
|
+
)}&name=${encodeURIComponent(e.name || "")}`, w = e.sendSubmissionsTo === "email" ? T : e.action;
|
|
3345
|
+
Fe(w), fetch(w, { body: p, headers: h, method: e.method || "post" }).then(
|
|
3346
3346
|
async (g) => {
|
|
3347
|
-
var
|
|
3347
|
+
var N, F;
|
|
3348
3348
|
let x;
|
|
3349
|
-
const
|
|
3350
|
-
if (
|
|
3351
|
-
const
|
|
3349
|
+
const E = g.headers.get("content-type");
|
|
3350
|
+
if (E && E.indexOf("application/json") !== -1 ? x = await g.json() : x = await g.text(), !g.ok) {
|
|
3351
|
+
const _ = new CustomEvent("submit:error", {
|
|
3352
3352
|
detail: { error: x, status: g.status }
|
|
3353
3353
|
});
|
|
3354
|
-
if ((
|
|
3354
|
+
if ((N = t.current) != null && N.nativeElement && ((F = t.current) == null || F.nativeElement.dispatchEvent(_), _.defaultPrevented))
|
|
3355
3355
|
return;
|
|
3356
3356
|
o(x), i("error");
|
|
3357
3357
|
let P = e.errorMessagePath ? Me(x, e.errorMessagePath) : x.message || x.error || x;
|
|
@@ -3359,11 +3359,11 @@ function Xn(e) {
|
|
|
3359
3359
|
return;
|
|
3360
3360
|
}
|
|
3361
3361
|
if (o(x), i(g.ok ? "success" : "error"), g.ok) {
|
|
3362
|
-
const
|
|
3362
|
+
const _ = new CustomEvent("submit:success", {
|
|
3363
3363
|
detail: { res: g, body: x }
|
|
3364
3364
|
});
|
|
3365
3365
|
if (t.current) {
|
|
3366
|
-
if (t.current.dispatchEvent(
|
|
3366
|
+
if (t.current.dispatchEvent(_), _.defaultPrevented)
|
|
3367
3367
|
return;
|
|
3368
3368
|
e.resetFormOnSubmit !== !1 && t.current.reset();
|
|
3369
3369
|
}
|
|
@@ -3386,11 +3386,11 @@ function Xn(e) {
|
|
|
3386
3386
|
);
|
|
3387
3387
|
}
|
|
3388
3388
|
}
|
|
3389
|
-
return /* @__PURE__ */
|
|
3389
|
+
return /* @__PURE__ */ $(R, { children: [
|
|
3390
3390
|
" ",
|
|
3391
3391
|
/* @__PURE__ */ s("style", { children: ".pre-7c90c93e { padding: 10px; color: red; text-align: center; }" }),
|
|
3392
3392
|
" ",
|
|
3393
|
-
/* @__PURE__ */
|
|
3393
|
+
/* @__PURE__ */ $(
|
|
3394
3394
|
"form",
|
|
3395
3395
|
{
|
|
3396
3396
|
validate: e.validate,
|
|
@@ -3403,7 +3403,7 @@ function Xn(e) {
|
|
|
3403
3403
|
children: [
|
|
3404
3404
|
e.children,
|
|
3405
3405
|
u() === "error" ? /* @__PURE__ */ s(
|
|
3406
|
-
|
|
3406
|
+
U,
|
|
3407
3407
|
{
|
|
3408
3408
|
path: "errorMessage",
|
|
3409
3409
|
blocks: e.errorMessage,
|
|
@@ -3411,7 +3411,7 @@ function Xn(e) {
|
|
|
3411
3411
|
}
|
|
3412
3412
|
) : null,
|
|
3413
3413
|
u() === "sending" ? /* @__PURE__ */ s(
|
|
3414
|
-
|
|
3414
|
+
U,
|
|
3415
3415
|
{
|
|
3416
3416
|
path: "sendingMessage",
|
|
3417
3417
|
blocks: e.sendingMessage,
|
|
@@ -3420,7 +3420,7 @@ function Xn(e) {
|
|
|
3420
3420
|
) : null,
|
|
3421
3421
|
u() === "error" && r ? /* @__PURE__ */ s("pre", { className: "builder-form-error-text pre-7c90c93e", children: JSON.stringify(r, null, 2) }) : null,
|
|
3422
3422
|
u() === "success" ? /* @__PURE__ */ s(
|
|
3423
|
-
|
|
3423
|
+
U,
|
|
3424
3424
|
{
|
|
3425
3425
|
path: "successMessage",
|
|
3426
3426
|
blocks: e.successMessage,
|
|
@@ -3811,7 +3811,7 @@ function ui(e) {
|
|
|
3811
3811
|
}
|
|
3812
3812
|
}, []), V(() => () => {
|
|
3813
3813
|
r && r.disconnect();
|
|
3814
|
-
}, []), /* @__PURE__ */
|
|
3814
|
+
}, []), /* @__PURE__ */ $(
|
|
3815
3815
|
"div",
|
|
3816
3816
|
{
|
|
3817
3817
|
style: {
|
|
@@ -3938,15 +3938,15 @@ const di = () => [{
|
|
|
3938
3938
|
component: gn,
|
|
3939
3939
|
...$n
|
|
3940
3940
|
}, {
|
|
3941
|
-
component:
|
|
3941
|
+
component: On,
|
|
3942
3942
|
...Dn
|
|
3943
3943
|
}, {
|
|
3944
3944
|
component: Di,
|
|
3945
|
-
...
|
|
3945
|
+
...Fn
|
|
3946
3946
|
}, {
|
|
3947
3947
|
component: Hn,
|
|
3948
3948
|
...Un
|
|
3949
|
-
}, ...rt.includes(
|
|
3949
|
+
}, ...rt.includes(O) ? [{
|
|
3950
3950
|
component: Wn,
|
|
3951
3951
|
...Nn
|
|
3952
3952
|
}] : [], {
|
|
@@ -4055,7 +4055,7 @@ const di = () => [{
|
|
|
4055
4055
|
})), hi = ({
|
|
4056
4056
|
canTrack: e,
|
|
4057
4057
|
content: t
|
|
4058
|
-
}) => !(!(oe(t).length > 0) || !e || M()), gi = (e) => e === "react" || e === "reactNative", bi =
|
|
4058
|
+
}) => !(!(oe(t).length > 0) || !e || M()), gi = (e) => e === "react" || e === "reactNative", bi = O === "angular", st = gi(O), yi = () => `
|
|
4059
4059
|
window.${at} = ${mi}
|
|
4060
4060
|
window.${lt} = ${fi}
|
|
4061
4061
|
`, pi = (e, t) => `
|
|
@@ -4109,7 +4109,7 @@ const xi = (e, t, n = !0) => {
|
|
|
4109
4109
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
4110
4110
|
}
|
|
4111
4111
|
};
|
|
4112
|
-
}, Ci = ["svelte", "qwik", "vue"], De = () => Ci.includes(
|
|
4112
|
+
}, Ci = ["svelte", "qwik", "vue"], De = () => Ci.includes(O) && (L() || se()), Ti = (e) => {
|
|
4113
4113
|
var o, a;
|
|
4114
4114
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (o = e == null ? void 0 : e.files) == null ? void 0 : o.regular;
|
|
4115
4115
|
let r = "";
|
|
@@ -4167,18 +4167,18 @@ function Vi(e) {
|
|
|
4167
4167
|
C(() => !1);
|
|
4168
4168
|
function n(T) {
|
|
4169
4169
|
var g, x;
|
|
4170
|
-
const
|
|
4170
|
+
const w = {
|
|
4171
4171
|
...e.builderContextSignal.rootState,
|
|
4172
4172
|
...T
|
|
4173
4173
|
};
|
|
4174
|
-
e.builderContextSignal.rootSetState ? (x = (g = e.builderContextSignal).rootSetState) == null || x.call(g,
|
|
4175
|
-
...
|
|
4176
|
-
rootState:
|
|
4174
|
+
e.builderContextSignal.rootSetState ? (x = (g = e.builderContextSignal).rootSetState) == null || x.call(g, w) : e.setBuilderContextSignal((E) => ({
|
|
4175
|
+
...E,
|
|
4176
|
+
rootState: w
|
|
4177
4177
|
}));
|
|
4178
4178
|
}
|
|
4179
4179
|
function i(T) {
|
|
4180
|
-
var g, x,
|
|
4181
|
-
const
|
|
4180
|
+
var g, x, E, N, F;
|
|
4181
|
+
const w = {
|
|
4182
4182
|
...e.builderContextSignal.content,
|
|
4183
4183
|
...T,
|
|
4184
4184
|
data: {
|
|
@@ -4188,12 +4188,12 @@ function Vi(e) {
|
|
|
4188
4188
|
meta: {
|
|
4189
4189
|
...(x = e.builderContextSignal.content) == null ? void 0 : x.meta,
|
|
4190
4190
|
...T == null ? void 0 : T.meta,
|
|
4191
|
-
breakpoints: ((
|
|
4191
|
+
breakpoints: ((E = T == null ? void 0 : T.meta) == null ? void 0 : E.breakpoints) || ((F = (N = e.builderContextSignal.content) == null ? void 0 : N.meta) == null ? void 0 : F.breakpoints)
|
|
4192
4192
|
}
|
|
4193
4193
|
};
|
|
4194
|
-
e.setBuilderContextSignal((
|
|
4195
|
-
|
|
4196
|
-
content:
|
|
4194
|
+
e.setBuilderContextSignal((_) => ({
|
|
4195
|
+
..._,
|
|
4196
|
+
content: w
|
|
4197
4197
|
}));
|
|
4198
4198
|
}
|
|
4199
4199
|
function r() {
|
|
@@ -4210,39 +4210,39 @@ function Vi(e) {
|
|
|
4210
4210
|
model: e.model,
|
|
4211
4211
|
trustedHosts: e.trustedHosts,
|
|
4212
4212
|
callbacks: {
|
|
4213
|
-
configureSdk: (
|
|
4214
|
-
var
|
|
4215
|
-
const { breakpoints: g, contentId: x } =
|
|
4216
|
-
!x || x !== ((
|
|
4213
|
+
configureSdk: (w) => {
|
|
4214
|
+
var E;
|
|
4215
|
+
const { breakpoints: g, contentId: x } = w;
|
|
4216
|
+
!x || x !== ((E = e.builderContextSignal.content) == null ? void 0 : E.id) || g && i({
|
|
4217
4217
|
meta: {
|
|
4218
4218
|
breakpoints: g
|
|
4219
4219
|
}
|
|
4220
4220
|
});
|
|
4221
4221
|
},
|
|
4222
|
-
animation: (
|
|
4223
|
-
Ge(
|
|
4222
|
+
animation: (w) => {
|
|
4223
|
+
Ge(w);
|
|
4224
4224
|
},
|
|
4225
|
-
contentUpdate: (
|
|
4226
|
-
i(
|
|
4225
|
+
contentUpdate: (w) => {
|
|
4226
|
+
i(w);
|
|
4227
4227
|
},
|
|
4228
|
-
stateUpdate: (
|
|
4229
|
-
n(
|
|
4228
|
+
stateUpdate: (w) => {
|
|
4229
|
+
n(w);
|
|
4230
4230
|
}
|
|
4231
4231
|
}
|
|
4232
4232
|
})(T);
|
|
4233
4233
|
}
|
|
4234
4234
|
const [c, u] = C(() => ({})), [f, b] = C(() => ({})), [m, v] = C(() => !1);
|
|
4235
4235
|
function d(T) {
|
|
4236
|
-
var
|
|
4236
|
+
var w, g;
|
|
4237
4237
|
if (e.builderContextSignal.content) {
|
|
4238
|
-
const x = (
|
|
4238
|
+
const x = (w = e.builderContextSignal.content) == null ? void 0 : w.testVariationId, E = (g = e.builderContextSignal.content) == null ? void 0 : g.id;
|
|
4239
4239
|
Te({
|
|
4240
4240
|
apiHost: e.apiHost,
|
|
4241
4241
|
type: "click",
|
|
4242
4242
|
canTrack: Z(e.canTrack),
|
|
4243
|
-
contentId:
|
|
4243
|
+
contentId: E,
|
|
4244
4244
|
apiKey: e.apiKey,
|
|
4245
|
-
variationId: x !==
|
|
4245
|
+
variationId: x !== E ? x : void 0,
|
|
4246
4246
|
...ki(T),
|
|
4247
4247
|
unique: !m
|
|
4248
4248
|
});
|
|
@@ -4250,34 +4250,56 @@ function Vi(e) {
|
|
|
4250
4250
|
m || v(!0);
|
|
4251
4251
|
}
|
|
4252
4252
|
function h() {
|
|
4253
|
-
var
|
|
4254
|
-
const T = (x = (g = (
|
|
4255
|
-
Object.entries(T).forEach(
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4253
|
+
var w, g, x;
|
|
4254
|
+
const T = (x = (g = (w = e.builderContextSignal.content) == null ? void 0 : w.data) == null ? void 0 : g.httpRequests) != null ? x : {};
|
|
4255
|
+
Object.entries(T).forEach(
|
|
4256
|
+
([E, N]) => {
|
|
4257
|
+
if (!N)
|
|
4258
|
+
return;
|
|
4259
|
+
const F = typeof N == "object" && N["@type"] === "@builder.io/core:Request";
|
|
4260
|
+
if (f[E] || c[E] && !L())
|
|
4261
|
+
return;
|
|
4262
|
+
const _ = F ? N.request.url : N;
|
|
4263
|
+
f[E] = !0;
|
|
4264
|
+
const P = _.replace(
|
|
4265
|
+
/{{([^}]+)}}/g,
|
|
4266
|
+
(I, B) => String(
|
|
4267
|
+
G({
|
|
4268
|
+
code: B,
|
|
4269
|
+
context: e.context || {},
|
|
4270
|
+
localState: void 0,
|
|
4271
|
+
rootState: e.builderContextSignal.rootState,
|
|
4272
|
+
rootSetState: e.builderContextSignal.rootSetState
|
|
4273
|
+
})
|
|
4274
|
+
)
|
|
4275
|
+
), D = F ? {
|
|
4276
|
+
url: P,
|
|
4277
|
+
method: N.request.method,
|
|
4278
|
+
headers: N.request.headers,
|
|
4279
|
+
body: N.request.body
|
|
4280
|
+
} : {
|
|
4281
|
+
url: P,
|
|
4282
|
+
method: "GET"
|
|
4283
|
+
};
|
|
4284
|
+
Fe(JSON.stringify(D)), fetch(D.url, {
|
|
4285
|
+
method: D.method,
|
|
4286
|
+
headers: D.headers,
|
|
4287
|
+
body: D.body
|
|
4288
|
+
}).then((I) => I.json()).then((I) => {
|
|
4289
|
+
n({
|
|
4290
|
+
[E]: I
|
|
4291
|
+
}), c[E] = !0;
|
|
4292
|
+
}).catch((I) => {
|
|
4293
|
+
console.error(
|
|
4294
|
+
"error fetching dynamic data",
|
|
4295
|
+
JSON.stringify(N),
|
|
4296
|
+
I
|
|
4297
|
+
);
|
|
4298
|
+
}).finally(() => {
|
|
4299
|
+
f[E] = !1;
|
|
4300
|
+
});
|
|
4301
|
+
}
|
|
4302
|
+
);
|
|
4281
4303
|
}
|
|
4282
4304
|
function p() {
|
|
4283
4305
|
L() && window.dispatchEvent(
|
|
@@ -4296,7 +4318,7 @@ function Vi(e) {
|
|
|
4296
4318
|
}
|
|
4297
4319
|
const y = H(!1);
|
|
4298
4320
|
return y.current || (h(), p(), y.current = !0), V(() => {
|
|
4299
|
-
var T,
|
|
4321
|
+
var T, w, g, x, E;
|
|
4300
4322
|
if (M()) {
|
|
4301
4323
|
L() && !e.isNestedRender && (window.addEventListener("message", l), ut({
|
|
4302
4324
|
...e.locale ? {
|
|
@@ -4313,45 +4335,45 @@ function Vi(e) {
|
|
|
4313
4335
|
}), Object.values(
|
|
4314
4336
|
e.builderContextSignal.componentInfos
|
|
4315
4337
|
).forEach((P) => {
|
|
4316
|
-
var
|
|
4317
|
-
if (!((
|
|
4338
|
+
var D, I;
|
|
4339
|
+
if (!((D = P.models) != null && D.length) || P.models.includes(e.model)) {
|
|
4318
4340
|
const B = dt(P);
|
|
4319
|
-
(
|
|
4341
|
+
(I = window.parent) == null || I.postMessage(B, "*");
|
|
4320
4342
|
}
|
|
4321
4343
|
}), window.addEventListener(
|
|
4322
4344
|
"builder:component:stateChangeListenerActivated",
|
|
4323
4345
|
p
|
|
4324
4346
|
));
|
|
4325
|
-
const
|
|
4326
|
-
name: `builder.tests.${(
|
|
4347
|
+
const N = e.builderContextSignal.content && Z(e.canTrack), F = mt({
|
|
4348
|
+
name: `builder.tests.${(w = e.builderContextSignal.content) == null ? void 0 : w.id}`,
|
|
4327
4349
|
canTrack: !0
|
|
4328
|
-
}),
|
|
4329
|
-
if (
|
|
4330
|
-
const P = (x = e.builderContextSignal.content) == null ? void 0 : x.id,
|
|
4350
|
+
}), _ = (g = e.builderContextSignal.content) == null ? void 0 : g.testVariationId;
|
|
4351
|
+
if (N && _ === F) {
|
|
4352
|
+
const P = (x = e.builderContextSignal.content) == null ? void 0 : x.id, D = e.apiKey;
|
|
4331
4353
|
Te({
|
|
4332
4354
|
apiHost: e.apiHost,
|
|
4333
4355
|
type: "impression",
|
|
4334
4356
|
canTrack: !0,
|
|
4335
4357
|
contentId: P,
|
|
4336
|
-
apiKey:
|
|
4337
|
-
variationId:
|
|
4358
|
+
apiKey: D,
|
|
4359
|
+
variationId: F !== P ? F : void 0
|
|
4338
4360
|
});
|
|
4339
4361
|
}
|
|
4340
4362
|
if (se() && !L()) {
|
|
4341
|
-
const P = new URL(location.href).searchParams,
|
|
4342
|
-
`builder.overrides.${
|
|
4363
|
+
const P = new URL(location.href).searchParams, D = P.get("builder.preview"), I = P.get(
|
|
4364
|
+
`builder.overrides.${D}`
|
|
4343
4365
|
), B = P.get("apiKey") || P.get("builder.space");
|
|
4344
|
-
(
|
|
4366
|
+
(D === "BUILDER_STUDIO" || D === e.model && B === e.apiKey && (!e.content || I === e.content.id)) && Le({
|
|
4345
4367
|
model: e.model,
|
|
4346
4368
|
apiKey: e.apiKey,
|
|
4347
4369
|
apiVersion: e.builderContextSignal.apiVersion,
|
|
4348
|
-
...
|
|
4370
|
+
...D === "BUILDER_STUDIO" && ((E = e.context) != null && E.symbolId) ? {
|
|
4349
4371
|
query: {
|
|
4350
4372
|
id: e.context.symbolId
|
|
4351
4373
|
}
|
|
4352
4374
|
} : {}
|
|
4353
|
-
}).then((
|
|
4354
|
-
|
|
4375
|
+
}).then((W) => {
|
|
4376
|
+
W && i(W);
|
|
4355
4377
|
});
|
|
4356
4378
|
}
|
|
4357
4379
|
}
|
|
@@ -4439,7 +4461,7 @@ const Bi = ({
|
|
|
4439
4461
|
},
|
|
4440
4462
|
meta: e == null ? void 0 : e.meta
|
|
4441
4463
|
} : void 0;
|
|
4442
|
-
function
|
|
4464
|
+
function Oe(e) {
|
|
4443
4465
|
var u, f, b, m, v, d, h, p, y;
|
|
4444
4466
|
const [t, n] = C(
|
|
4445
4467
|
() => {
|
|
@@ -4526,7 +4548,7 @@ function Fe(e) {
|
|
|
4526
4548
|
value: {
|
|
4527
4549
|
registeredComponents: r
|
|
4528
4550
|
},
|
|
4529
|
-
children: /* @__PURE__ */
|
|
4551
|
+
children: /* @__PURE__ */ $(
|
|
4530
4552
|
Vi,
|
|
4531
4553
|
{
|
|
4532
4554
|
apiHost: e.apiHost,
|
|
@@ -4566,7 +4588,7 @@ function Fe(e) {
|
|
|
4566
4588
|
}
|
|
4567
4589
|
),
|
|
4568
4590
|
/* @__PURE__ */ s(
|
|
4569
|
-
|
|
4591
|
+
U,
|
|
4570
4592
|
{
|
|
4571
4593
|
blocks: (y = (p = a.content) == null ? void 0 : p.data) == null ? void 0 : y.blocks,
|
|
4572
4594
|
context: a,
|
|
@@ -4612,8 +4634,8 @@ function Wi(e) {
|
|
|
4612
4634
|
});
|
|
4613
4635
|
}
|
|
4614
4636
|
return V(() => {
|
|
4615
|
-
}, []), /* @__PURE__ */
|
|
4616
|
-
!e.isNestedRender &&
|
|
4637
|
+
}, []), /* @__PURE__ */ $(R, { children: [
|
|
4638
|
+
!e.isNestedRender && O !== "reactNative" ? /* @__PURE__ */ $(R, { children: [
|
|
4617
4639
|
/* @__PURE__ */ s(
|
|
4618
4640
|
j,
|
|
4619
4641
|
{
|
|
@@ -4622,7 +4644,7 @@ function Wi(e) {
|
|
|
4622
4644
|
nonce: e.nonce || ""
|
|
4623
4645
|
}
|
|
4624
4646
|
),
|
|
4625
|
-
rt.includes(
|
|
4647
|
+
rt.includes(O) ? /* @__PURE__ */ s(
|
|
4626
4648
|
j,
|
|
4627
4649
|
{
|
|
4628
4650
|
id: "builderio-init-personalization-variants-fns",
|
|
@@ -4631,7 +4653,7 @@ function Wi(e) {
|
|
|
4631
4653
|
}
|
|
4632
4654
|
) : null
|
|
4633
4655
|
] }) : null,
|
|
4634
|
-
t ? /* @__PURE__ */
|
|
4656
|
+
t ? /* @__PURE__ */ $(R, { children: [
|
|
4635
4657
|
/* @__PURE__ */ s(
|
|
4636
4658
|
ee,
|
|
4637
4659
|
{
|
|
@@ -4649,7 +4671,7 @@ function Wi(e) {
|
|
|
4649
4671
|
}
|
|
4650
4672
|
),
|
|
4651
4673
|
(a = oe(e.content)) == null ? void 0 : a.map((l) => /* @__PURE__ */ s(
|
|
4652
|
-
|
|
4674
|
+
Oe,
|
|
4653
4675
|
{
|
|
4654
4676
|
apiHost: e.apiHost,
|
|
4655
4677
|
isNestedRender: e.isNestedRender,
|
|
@@ -4677,7 +4699,7 @@ function Wi(e) {
|
|
|
4677
4699
|
))
|
|
4678
4700
|
] }) : null,
|
|
4679
4701
|
/* @__PURE__ */ s(
|
|
4680
|
-
|
|
4702
|
+
Oe,
|
|
4681
4703
|
{
|
|
4682
4704
|
apiHost: e.apiHost,
|
|
4683
4705
|
nonce: e.nonce,
|
|
@@ -4787,7 +4809,7 @@ function Di(e) {
|
|
|
4787
4809
|
) });
|
|
4788
4810
|
}
|
|
4789
4811
|
export {
|
|
4790
|
-
|
|
4812
|
+
U as Blocks,
|
|
4791
4813
|
pe as BuilderContext,
|
|
4792
4814
|
pt as Button,
|
|
4793
4815
|
un as Columns,
|