@builder.io/sdk-react 2.0.5 → 2.0.9
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 +17 -17
- package/lib/browser/blocks-exports.mjs +53 -53
- 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/{node/server-entry-7e145817.cjs → browser/server-entry-16fc27fe.cjs} +2 -2
- package/lib/browser/{server-entry-0c6c220c.js → server-entry-8bf52a55.js} +74 -73
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-99129d68.js → accordion-589b3ac8.js} +1 -1
- package/lib/edge/{accordion-72dab8ce.cjs → accordion-afed3bd3.cjs} +1 -1
- package/lib/edge/{blocks-53ae1b87.cjs → blocks-854f4022.cjs} +2 -2
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{blocks-426e0c44.js → blocks-fdb24842.js} +33 -33
- package/lib/edge/{button-778062cd.js → button-08412b69.js} +2 -2
- package/lib/edge/{button-967d0268.cjs → button-26b76a4a.cjs} +1 -1
- package/lib/edge/{columns-3a8c4d3f.js → columns-bd2a004b.js} +4 -4
- package/lib/edge/{columns-3b921658.cjs → columns-ccdafcc7.cjs} +1 -1
- package/lib/edge/{content-variants-15d191de.js → content-variants-dd7ea0f9.js} +11 -11
- package/lib/edge/{content-variants-4b8718f8.cjs → content-variants-fc207487.cjs} +4 -4
- package/lib/edge/{evaluate-c0eeb4f8.cjs → evaluate-3991fda5.cjs} +1 -1
- package/lib/edge/{evaluate-26c0fdb7.js → evaluate-e2f692df.js} +1 -1
- package/lib/edge/{form-9d9dce5d.cjs → form-5eb85abf.cjs} +1 -1
- package/lib/edge/{form-ccb0b912.js → form-b9148162.js} +4 -4
- package/lib/edge/{get-class-prop-name-0a91c3bd.js → get-class-prop-name-0c783f8c.js} +1 -1
- package/lib/edge/{get-class-prop-name-eae60eae.cjs → get-class-prop-name-2fa91d70.cjs} +1 -1
- package/lib/edge/{img-183de27d.cjs → img-2f30658b.cjs} +1 -1
- package/lib/edge/{img-75751c89.js → img-602f7d3a.js} +1 -1
- 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/{input-27972020.js → input-4c791db9.js} +1 -1
- package/lib/edge/{input-fd18a67d.cjs → input-551362f3.cjs} +1 -1
- package/lib/edge/{select-60ff549c.js → select-d1391d12.js} +1 -1
- package/lib/edge/{select-6ea0d59f.cjs → select-eb26f837.cjs} +1 -1
- package/lib/edge/server-entry-7b4fa72f.cjs +2 -0
- package/lib/edge/{server-entry-feff6177.js → server-entry-c537d834.js} +59 -58
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-2347377e.js → slot-d375d5eb.js} +4 -4
- package/lib/edge/{slot-a4509cae.cjs → slot-d723d000.cjs} +1 -1
- package/lib/edge/{symbol-98650b06.cjs → symbol-6c18ca90.cjs} +1 -1
- package/lib/edge/{symbol-dcef0d8e.js → symbol-8b3a6b98.js} +2 -2
- package/lib/edge/{tabs-0784574b.js → tabs-1e47cfd4.js} +4 -4
- package/lib/edge/{tabs-4c131e17.cjs → tabs-8296bce7.cjs} +1 -1
- package/lib/edge/{text-1c1986aa.cjs → text-9eac9e4d.cjs} +1 -1
- package/lib/edge/{text-6f7cbc35.js → text-d3c86634.js} +2 -2
- package/lib/node/blocks-exports.cjs +3 -3
- package/lib/node/blocks-exports.mjs +19 -19
- 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-4978bc21.cjs → node-runtime-c7c85f6c.cjs} +1 -1
- package/lib/node/{node-runtime-ce5c71e5.js → node-runtime-e41e9eb6.js} +1 -1
- package/lib/{browser/server-entry-7e145817.cjs → node/server-entry-16fc27fe.cjs} +2 -2
- package/lib/node/{server-entry-0c6c220c.js → server-entry-8bf52a55.js} +74 -73
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/components/content-variants/content-variants.types.d.ts +2 -1
- package/types/components/content-variants/extra-framework-props-types.d.ts +2 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/extra-context-types.d.ts +6 -0
- package/types/context/types.d.ts +2 -1
- package/types/functions/register-component.d.ts +1 -1
- package/lib/edge/server-entry-4133a544.cjs +0 -2
|
@@ -7,27 +7,27 @@ const v = "react", b = "[Builder.io]: ", f = {
|
|
|
7
7
|
function c() {
|
|
8
8
|
return typeof window != "undefined" && typeof document != "undefined";
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const Q = (t) => {
|
|
11
11
|
const e = {};
|
|
12
12
|
return t.forEach((n, r) => {
|
|
13
13
|
e[r] = n;
|
|
14
14
|
}), e;
|
|
15
|
-
}, L = (t) => t instanceof URLSearchParams ?
|
|
16
|
-
function
|
|
15
|
+
}, L = (t) => t instanceof URLSearchParams ? Q(t) : t, V = (t) => typeof t == "string" ? t : t instanceof URLSearchParams ? t.toString() : new URLSearchParams(t).toString();
|
|
16
|
+
function Y() {
|
|
17
17
|
return c() && window.self !== window.top;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
19
|
+
function Z(t) {
|
|
20
|
+
return Y() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
|
|
21
21
|
V(t || window.location.search).indexOf("builder.frameEditing=") !== -1;
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const tt = () => {
|
|
24
24
|
if (c()) {
|
|
25
25
|
const t = new URL(location.href);
|
|
26
26
|
return t.pathname === "" && (t.pathname = "/"), t;
|
|
27
27
|
} else
|
|
28
28
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
29
|
-
},
|
|
30
|
-
const t =
|
|
29
|
+
}, et = () => typeof navigator == "object" && navigator.userAgent || "", nt = () => {
|
|
30
|
+
const t = et(), e = {
|
|
31
31
|
Android() {
|
|
32
32
|
return t.match(/Android/i);
|
|
33
33
|
},
|
|
@@ -46,13 +46,13 @@ const Z = () => {
|
|
|
46
46
|
any() {
|
|
47
47
|
return e.Android() || e.BlackBerry() || e.iOS() || e.Opera() || e.Windows() || v === "reactNative";
|
|
48
48
|
}
|
|
49
|
-
}, n = t.match(/Tablet|iPad/i), r =
|
|
49
|
+
}, n = t.match(/Tablet|iPad/i), r = tt();
|
|
50
50
|
return {
|
|
51
51
|
urlPath: r == null ? void 0 : r.pathname,
|
|
52
52
|
host: (r == null ? void 0 : r.host) || (r == null ? void 0 : r.hostname),
|
|
53
53
|
device: n ? "tablet" : e.any() ? "mobile" : "desktop"
|
|
54
54
|
};
|
|
55
|
-
}, m = (t) => t != null,
|
|
55
|
+
}, m = (t) => t != null, rt = (t) => {
|
|
56
56
|
if (t === "localhost" || t === "127.0.0.1")
|
|
57
57
|
return t;
|
|
58
58
|
const e = t.split(".");
|
|
@@ -68,14 +68,14 @@ const Z = () => {
|
|
|
68
68
|
f.warn("[COOKIE] GET error: ", (r == null ? void 0 : r.message) || r);
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
}, M = async (t) => U(t),
|
|
71
|
+
}, M = async (t) => U(t), ot = (t) => t.map(([e, n]) => n ? `${e}=${n}` : e).filter(m).join("; "), st = [["secure", ""], ["SameSite", "None"]], it = ({
|
|
72
72
|
name: t,
|
|
73
73
|
value: e,
|
|
74
74
|
expires: n
|
|
75
75
|
}) => {
|
|
76
|
-
const o = (c() ? location.protocol === "https:" : !0) ?
|
|
77
|
-
return
|
|
78
|
-
},
|
|
76
|
+
const o = (c() ? location.protocol === "https:" : !0) ? st : [[]], s = n ? [["expires", n.toUTCString()]] : [[]], a = [[t, e], ...s, ["path", "/"], ["domain", rt(window.location.hostname)], ...o];
|
|
77
|
+
return ot(a);
|
|
78
|
+
}, F = async ({
|
|
79
79
|
name: t,
|
|
80
80
|
value: e,
|
|
81
81
|
expires: n,
|
|
@@ -84,7 +84,7 @@ const Z = () => {
|
|
|
84
84
|
try {
|
|
85
85
|
if (!r)
|
|
86
86
|
return;
|
|
87
|
-
const o =
|
|
87
|
+
const o = it({
|
|
88
88
|
name: t,
|
|
89
89
|
value: e,
|
|
90
90
|
expires: n
|
|
@@ -93,24 +93,24 @@ const Z = () => {
|
|
|
93
93
|
} catch (o) {
|
|
94
94
|
f.warn("[COOKIE] SET error: ", (o == null ? void 0 : o.message) || o);
|
|
95
95
|
}
|
|
96
|
-
},
|
|
96
|
+
}, at = "builder.tests", E = (t) => `${at}.${t}`, ct = ({
|
|
97
97
|
contentId: t
|
|
98
98
|
}) => M({
|
|
99
99
|
name: E(t),
|
|
100
100
|
canTrack: !0
|
|
101
|
-
}),
|
|
101
|
+
}), ut = ({
|
|
102
102
|
contentId: t
|
|
103
103
|
}) => U({
|
|
104
104
|
name: E(t),
|
|
105
105
|
canTrack: !0
|
|
106
|
-
}),
|
|
106
|
+
}), dt = ({
|
|
107
107
|
contentId: t,
|
|
108
108
|
value: e
|
|
109
|
-
}) =>
|
|
109
|
+
}) => F({
|
|
110
110
|
name: E(t),
|
|
111
111
|
value: e,
|
|
112
112
|
canTrack: !0
|
|
113
|
-
}),
|
|
113
|
+
}), N = (t) => m(t.id) && m(t.variations) && Object.keys(t.variations).length > 0, lt = ({
|
|
114
114
|
id: t,
|
|
115
115
|
variations: e
|
|
116
116
|
}) => {
|
|
@@ -124,8 +124,8 @@ const Z = () => {
|
|
|
124
124
|
}
|
|
125
125
|
return t;
|
|
126
126
|
}, j = (t) => {
|
|
127
|
-
const e =
|
|
128
|
-
return
|
|
127
|
+
const e = lt(t);
|
|
128
|
+
return dt({
|
|
129
129
|
contentId: t.id,
|
|
130
130
|
value: e
|
|
131
131
|
}).catch((n) => {
|
|
@@ -153,9 +153,9 @@ const Z = () => {
|
|
|
153
153
|
return t;
|
|
154
154
|
if (!t)
|
|
155
155
|
return;
|
|
156
|
-
if (!
|
|
156
|
+
if (!N(t))
|
|
157
157
|
return t;
|
|
158
|
-
const n =
|
|
158
|
+
const n = ut({
|
|
159
159
|
contentId: t.id
|
|
160
160
|
}) || j({
|
|
161
161
|
variations: t.variations,
|
|
@@ -168,13 +168,13 @@ const Z = () => {
|
|
|
168
168
|
...t,
|
|
169
169
|
...r
|
|
170
170
|
};
|
|
171
|
-
},
|
|
171
|
+
}, ft = async ({
|
|
172
172
|
item: t,
|
|
173
173
|
canTrack: e
|
|
174
174
|
}) => {
|
|
175
|
-
if (!e || !
|
|
175
|
+
if (!e || !N(t))
|
|
176
176
|
return t;
|
|
177
|
-
const r = await
|
|
177
|
+
const r = await ct({
|
|
178
178
|
contentId: t.id
|
|
179
179
|
}) || j({
|
|
180
180
|
variations: t.variations,
|
|
@@ -187,15 +187,15 @@ const Z = () => {
|
|
|
187
187
|
...t,
|
|
188
188
|
...o
|
|
189
189
|
};
|
|
190
|
-
},
|
|
190
|
+
}, ht = (t) => m(t) ? t : !0, $t = (t) => ({
|
|
191
191
|
type: "builder.registerComponent",
|
|
192
|
-
data:
|
|
193
|
-
}),
|
|
192
|
+
data: K(t)
|
|
193
|
+
}), gt = (t) => {
|
|
194
194
|
const e = t.toString().trim();
|
|
195
195
|
return `return (${!e.startsWith("function") && !e.startsWith("(") ? "function " : ""}${e}).apply(this, arguments)`;
|
|
196
196
|
};
|
|
197
|
-
function
|
|
198
|
-
return JSON.parse(JSON.stringify(t, (e, n) => typeof n == "function" ?
|
|
197
|
+
function K(t) {
|
|
198
|
+
return JSON.parse(JSON.stringify(t, (e, n) => typeof n == "function" ? gt(n) : n));
|
|
199
199
|
}
|
|
200
200
|
function pt() {
|
|
201
201
|
return typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : globalThis;
|
|
@@ -220,14 +220,14 @@ function k(t, e = null, n = ".") {
|
|
|
220
220
|
};
|
|
221
221
|
}, {});
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function W(t, e, n = {}) {
|
|
224
224
|
for (const r in t) {
|
|
225
225
|
const o = t[r], s = e ? e + "." + r : r;
|
|
226
|
-
o && typeof o == "object" && !Array.isArray(o) && !Object.keys(o).find((a) => a.startsWith("$")) ?
|
|
226
|
+
o && typeof o == "object" && !Array.isArray(o) && !Object.keys(o).find((a) => a.startsWith("$")) ? W(o, s, n) : n[s] = o;
|
|
227
227
|
}
|
|
228
228
|
return n;
|
|
229
229
|
}
|
|
230
|
-
const wt = "v3", x = "builder.", St = "options.",
|
|
230
|
+
const wt = "v3", x = "builder.", St = "options.", _ = (t) => {
|
|
231
231
|
if (!t)
|
|
232
232
|
return {};
|
|
233
233
|
const e = L(t), n = {};
|
|
@@ -241,7 +241,7 @@ const wt = "v3", x = "builder.", St = "options.", W = (t) => {
|
|
|
241
241
|
if (!c())
|
|
242
242
|
return {};
|
|
243
243
|
const t = new URLSearchParams(window.location.search);
|
|
244
|
-
return
|
|
244
|
+
return _(t);
|
|
245
245
|
}, A = (t) => typeof t == "number" && !isNaN(t) && t >= 0, P = (t) => {
|
|
246
246
|
const {
|
|
247
247
|
limit: e = 30,
|
|
@@ -264,22 +264,22 @@ const wt = "v3", x = "builder.", St = "options.", W = (t) => {
|
|
|
264
264
|
throw new Error("Missing API key");
|
|
265
265
|
if (!["v3"].includes(y))
|
|
266
266
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${y}'`);
|
|
267
|
-
const
|
|
268
|
-
if (i.searchParams.set("apiKey", s), i.searchParams.set("limit", String(e)), i.searchParams.set("noTraverse", String(
|
|
267
|
+
const X = e !== 1, i = new URL(`https://cdn.builder.io/api/${y}/content/${o}`);
|
|
268
|
+
if (i.searchParams.set("apiKey", s), i.searchParams.set("limit", String(e)), i.searchParams.set("noTraverse", String(X)), i.searchParams.set("includeRefs", String(!0)), d && i.searchParams.set("locale", d), a && i.searchParams.set("enrich", String(a)), i.searchParams.set("omit", I || "meta.componentsUsed"), p && i.searchParams.set("fields", p), Number.isFinite(u) && u > -1 && i.searchParams.set("offset", String(Math.floor(u))), typeof O == "boolean" && i.searchParams.set("includeUnpublished", String(O)), h && A(h) && i.searchParams.set("cacheSeconds", String(h)), g && A(g) && i.searchParams.set("staleCacheSeconds", String(g)), w) {
|
|
269
269
|
const l = k({
|
|
270
270
|
sort: w
|
|
271
271
|
});
|
|
272
272
|
for (const S in l)
|
|
273
273
|
i.searchParams.set(S, JSON.stringify(l[S]));
|
|
274
274
|
}
|
|
275
|
-
const
|
|
275
|
+
const q = {
|
|
276
276
|
...bt(),
|
|
277
277
|
...L(t.options || {})
|
|
278
|
-
}, C = k(
|
|
278
|
+
}, C = k(q);
|
|
279
279
|
for (const l in C)
|
|
280
280
|
i.searchParams.set(l, String(C[l]));
|
|
281
281
|
if (n && i.searchParams.set("userAttributes", JSON.stringify(n)), r) {
|
|
282
|
-
const l =
|
|
282
|
+
const l = W({
|
|
283
283
|
query: r
|
|
284
284
|
});
|
|
285
285
|
for (const S in l)
|
|
@@ -299,13 +299,13 @@ const kt = async (t) => {
|
|
|
299
299
|
const e = P(t);
|
|
300
300
|
return await (await ((s = t.fetch) != null ? s : yt)(e.href, t.fetchOptions)).json();
|
|
301
301
|
}, Et = async (t, e, n = P(t)) => {
|
|
302
|
-
const r =
|
|
302
|
+
const r = ht(t.canTrack);
|
|
303
303
|
if (n.search.includes("preview="), !r || !(c() || v === "reactNative"))
|
|
304
304
|
return e.results;
|
|
305
305
|
try {
|
|
306
306
|
const o = [];
|
|
307
307
|
for (const s of e.results)
|
|
308
|
-
o.push(await
|
|
308
|
+
o.push(await ft({
|
|
309
309
|
item: s,
|
|
310
310
|
canTrack: r
|
|
311
311
|
}));
|
|
@@ -337,16 +337,16 @@ function Ot() {
|
|
|
337
337
|
return (t == "x" ? e : e & 3 | 8).toString(16);
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function $() {
|
|
341
341
|
return Ot().replace(/-/g, "");
|
|
342
342
|
}
|
|
343
|
-
const
|
|
343
|
+
const G = "builderSessionId", Ct = async ({
|
|
344
344
|
canTrack: t
|
|
345
345
|
}) => {
|
|
346
346
|
if (!t)
|
|
347
347
|
return;
|
|
348
348
|
const e = await M({
|
|
349
|
-
name:
|
|
349
|
+
name: G,
|
|
350
350
|
canTrack: t
|
|
351
351
|
});
|
|
352
352
|
if (m(e))
|
|
@@ -358,20 +358,20 @@ const $ = "builderSessionId", Ct = async ({
|
|
|
358
358
|
canTrack: t
|
|
359
359
|
}), n;
|
|
360
360
|
}
|
|
361
|
-
}, xt = () =>
|
|
361
|
+
}, xt = () => $(), At = ({
|
|
362
362
|
id: t,
|
|
363
363
|
canTrack: e
|
|
364
|
-
}) =>
|
|
365
|
-
name:
|
|
364
|
+
}) => F({
|
|
365
|
+
name: G,
|
|
366
366
|
value: t,
|
|
367
367
|
canTrack: e
|
|
368
|
-
}),
|
|
368
|
+
}), J = () => c() && typeof localStorage != "undefined" ? localStorage : void 0, Tt = ({
|
|
369
369
|
key: t,
|
|
370
370
|
canTrack: e
|
|
371
371
|
}) => {
|
|
372
372
|
var n;
|
|
373
373
|
try {
|
|
374
|
-
return e ? (n =
|
|
374
|
+
return e ? (n = J()) == null ? void 0 : n.getItem(t) : void 0;
|
|
375
375
|
} catch (r) {
|
|
376
376
|
console.debug("[LocalStorage] GET error: ", r);
|
|
377
377
|
return;
|
|
@@ -383,17 +383,17 @@ const $ = "builderSessionId", Ct = async ({
|
|
|
383
383
|
}) => {
|
|
384
384
|
var r;
|
|
385
385
|
try {
|
|
386
|
-
e && ((r =
|
|
386
|
+
e && ((r = J()) == null || r.setItem(t, n));
|
|
387
387
|
} catch (o) {
|
|
388
388
|
console.debug("[LocalStorage] SET error: ", o);
|
|
389
389
|
}
|
|
390
|
-
},
|
|
390
|
+
}, z = "builderVisitorId", Bt = ({
|
|
391
391
|
canTrack: t
|
|
392
392
|
}) => {
|
|
393
393
|
if (!t)
|
|
394
394
|
return;
|
|
395
395
|
const e = Tt({
|
|
396
|
-
key:
|
|
396
|
+
key: z,
|
|
397
397
|
canTrack: t
|
|
398
398
|
});
|
|
399
399
|
if (m(e))
|
|
@@ -405,11 +405,11 @@ const $ = "builderSessionId", Ct = async ({
|
|
|
405
405
|
canTrack: t
|
|
406
406
|
}), n;
|
|
407
407
|
}
|
|
408
|
-
}, Lt = () =>
|
|
408
|
+
}, Lt = () => $(), Vt = ({
|
|
409
409
|
id: t,
|
|
410
410
|
canTrack: e
|
|
411
411
|
}) => Rt({
|
|
412
|
-
key:
|
|
412
|
+
key: z,
|
|
413
413
|
value: t,
|
|
414
414
|
canTrack: e
|
|
415
415
|
}), Ut = async ({
|
|
@@ -446,16 +446,16 @@ const $ = "builderSessionId", Ct = async ({
|
|
|
446
446
|
...await Ut({
|
|
447
447
|
canTrack: e
|
|
448
448
|
}),
|
|
449
|
-
userAttributes:
|
|
449
|
+
userAttributes: nt(),
|
|
450
450
|
ownerId: n
|
|
451
451
|
}
|
|
452
452
|
});
|
|
453
|
-
async function
|
|
453
|
+
async function Ft(t) {
|
|
454
454
|
if (!t.apiKey) {
|
|
455
455
|
f.error("Missing API key for track call. Please provide your API key.");
|
|
456
456
|
return;
|
|
457
457
|
}
|
|
458
|
-
if (t.canTrack && !
|
|
458
|
+
if (t.canTrack && !Z() && (c() || v === "reactNative"))
|
|
459
459
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
460
460
|
method: "POST",
|
|
461
461
|
body: JSON.stringify({
|
|
@@ -469,18 +469,19 @@ async function Nt(t) {
|
|
|
469
469
|
console.error("Failed to track: ", e);
|
|
470
470
|
});
|
|
471
471
|
}
|
|
472
|
-
const Jt = (t) =>
|
|
472
|
+
const Jt = (t) => Ft({
|
|
473
473
|
...t,
|
|
474
474
|
canTrack: !0
|
|
475
|
-
}),
|
|
476
|
-
function
|
|
475
|
+
}), Nt = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
476
|
+
function H(t, e) {
|
|
477
477
|
if (!e.origin.startsWith("http") && !e.origin.startsWith("https"))
|
|
478
478
|
return !1;
|
|
479
479
|
const n = new URL(e.origin), r = n.hostname;
|
|
480
|
-
return (t ||
|
|
480
|
+
return (t || Nt).findIndex((o) => o.startsWith("*.") ? r.endsWith(o.slice(1)) : o === r) > -1;
|
|
481
481
|
}
|
|
482
|
-
const jt = "2.0.
|
|
482
|
+
const jt = "2.0.9", T = {};
|
|
483
483
|
function Dt(t, e) {
|
|
484
|
+
t === "plugin" && (e = K(e));
|
|
484
485
|
let n = T[t];
|
|
485
486
|
if (n || (n = T[t] = []), n.push(e), c()) {
|
|
486
487
|
const r = {
|
|
@@ -541,7 +542,7 @@ const Kt = (t = {}) => {
|
|
|
541
542
|
}
|
|
542
543
|
}, "*"), window.addEventListener("message", (r) => {
|
|
543
544
|
var s, a;
|
|
544
|
-
if (!
|
|
545
|
+
if (!H(t.trustedHosts, r))
|
|
545
546
|
return;
|
|
546
547
|
const {
|
|
547
548
|
data: o
|
|
@@ -587,7 +588,7 @@ const Kt = (t = {}) => {
|
|
|
587
588
|
trustedHosts: e,
|
|
588
589
|
callbacks: n
|
|
589
590
|
}) => (r) => {
|
|
590
|
-
if (!
|
|
591
|
+
if (!H(e, r))
|
|
591
592
|
return;
|
|
592
593
|
const {
|
|
593
594
|
data: o
|
|
@@ -650,7 +651,7 @@ const qt = async (t) => {
|
|
|
650
651
|
urlPath: e
|
|
651
652
|
} : {}
|
|
652
653
|
},
|
|
653
|
-
options:
|
|
654
|
+
options: _(t.searchParams || ((s = t.url) == null ? void 0 : s.searchParams) || t.options)
|
|
654
655
|
};
|
|
655
656
|
return {
|
|
656
657
|
apiKey: n.apiKey,
|
|
@@ -662,7 +663,7 @@ export {
|
|
|
662
663
|
b as MSG_PREFIX,
|
|
663
664
|
v as TARGET,
|
|
664
665
|
Et as _processContentResult,
|
|
665
|
-
|
|
666
|
+
Ft as _track,
|
|
666
667
|
m as checkIsDefined,
|
|
667
668
|
Wt as createEditorListener,
|
|
668
669
|
$t as createRegisterComponentMessage,
|
|
@@ -670,17 +671,17 @@ export {
|
|
|
670
671
|
qt as fetchBuilderProps,
|
|
671
672
|
Pt as fetchEntries,
|
|
672
673
|
It as fetchOneEntry,
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
674
|
+
_ as getBuilderSearchParams,
|
|
675
|
+
ht as getDefaultCanTrack,
|
|
676
|
+
nt as getUserAttributes,
|
|
676
677
|
_t as handleABTestingSync,
|
|
677
678
|
c as isBrowser,
|
|
678
|
-
|
|
679
|
+
Z as isEditing,
|
|
679
680
|
Gt as isPreviewing,
|
|
680
681
|
f as logger,
|
|
681
682
|
Dt as register,
|
|
682
683
|
zt as registerInsertMenu,
|
|
683
|
-
|
|
684
|
+
K as serializeIncludingFunctions,
|
|
684
685
|
Xt as setEditorSettings,
|
|
685
686
|
Kt as setupBrowserForEditing,
|
|
686
687
|
Ht as subscribeToEditor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./server-entry-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./server-entry-16fc27fe.cjs");exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _processContentResult as r, createRegisterComponentMessage as s, fetchBuilderProps as i, fetchEntries as n, fetchOneEntry as o, getBuilderSearchParams as c, isEditing as g, isPreviewing as a, register as d, setEditorSettings as E, subscribeToEditor as f, track as h } from "./server-entry-
|
|
1
|
+
import { _processContentResult as r, createRegisterComponentMessage as s, fetchBuilderProps as i, fetchEntries as n, fetchOneEntry as o, getBuilderSearchParams as c, isEditing as g, isPreviewing as a, register as d, setEditorSettings as E, subscribeToEditor as f, track as h } from "./server-entry-8bf52a55.js";
|
|
2
2
|
export {
|
|
3
3
|
r as _processContentResult,
|
|
4
4
|
s as createRegisterComponentMessage,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as x, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import { useState as A } from "react";
|
|
3
3
|
import { Blocks as g } from "./blocks-exports.mjs";
|
|
4
|
-
import "./server-entry-
|
|
4
|
+
import "./server-entry-c537d834.js";
|
|
5
5
|
const y = (t) => t.toString();
|
|
6
6
|
function B(t) {
|
|
7
7
|
var a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),O=require("react"),g=require("./blocks-exports.cjs");require("./server-entry-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),O=require("react"),g=require("./blocks-exports.cjs");require("./server-entry-7b4fa72f.cjs");const y=t=>t.toString();function v(t){var u;const[o,s]=O.useState(()=>[]);function d(){return!!(t.grid||t.oneAtATime)}function C(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...t.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function h(){const n={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(n).filter(([l,a])=>a!==void 0))}function j(e){return`builder-accordion-title builder-accordion-title-${o.includes(e)?"open":"closed"}`}function k(e){return`builder-accordion-detail builder-accordion-detail-${o.includes(e)?"open":"closed"}`}function c(){let e=null;if(t.grid&&o.length&&document){const l=o[0];let i=document.querySelector(`.builder-accordion-title[data-index="${l}"]`);if(e=l,i){let m=i.getBoundingClientRect();for(;i=i&&i.nextElementSibling;)if(i){if(i.classList.contains("builder-accordion-detail"))continue;const f=i.getBoundingClientRect();if(f.left>m.left){const b=parseInt(i.getAttribute("data-index")||"",10);isNaN(b)||(m=f,e=b)}else break}}}return typeof e=="number"&&(e=e+1),e}function x(){const e={order:typeof c()=="number"?c():void 0,...t.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(e).filter(([n,l])=>l!==void 0))}function I(e){o.includes(e)?s(d()?[]:o.filter(n=>n!==e)):s(d()?[e]:o.concat(e))}return r.jsx("div",{className:"builder-accordion",style:C(),children:(u=t.items)==null?void 0:u.map((e,n)=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:j(n),style:{...h(),width:t.grid?t.gridRowWidth:void 0,order:c()!==null?y(n):y(n+1)},"data-index":n,onClick:l=>I(n),children:r.jsx(g.Blocks,{blocks:e.title,path:`items.${n}.title`,parent:t.builderBlock.id,context:t.builderContext,registeredComponents:t.builderComponents,linkComponent:t.builderLinkComponent})}),o.includes(n)?r.jsx("div",{className:k(n),style:x(),children:r.jsx(g.Blocks,{blocks:e.detail,path:`items.${n}.detail`,parent:t.builderBlock.id,context:t.builderContext,registeredComponents:t.builderComponents,linkComponent:t.builderLinkComponent})}):null]}))})}exports.default=v;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),S=require("react"),$=require("./blocks-exports.cjs"),
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),S=require("react"),$=require("./blocks-exports.cjs"),g=require("./server-entry-7b4fa72f.cjs"),p=require("./evaluate-3991fda5.cjs"),_=require("./get-class-prop-name-2fa91d70.cjs"),V=require("./dynamic-renderer-b29b45ca.cjs"),P=e=>JSON.parse(JSON.stringify(e)),N=S.createContext({registeredComponents:{}});function G(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options}}const K=({block:e,context:t,localState:n,rootState:o,rootSetState:r})=>{if(!e.bindings)return e;const s=P(e),i={...s,properties:{...s.properties},actions:{...s.actions}};for(const l in e.bindings){const u=e.bindings[l],f=p.evaluate({code:u,localState:n,rootState:o,rootSetState:r,context:t,enableCache:!0});p.set(i,l,f)}return i};function b({block:e,context:t,shouldEvaluateBindings:n,localState:o,rootState:r,rootSetState:s}){const i=e;return n?K({block:i,localState:o,rootState:r,rootSetState:s,context:t}):i}const B=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function Z(e,t,n={}){let o,r,s,i=null,l=0;const u=function(){l=n.leading===!1?0:Date.now(),i=null,s=e.apply(o,r),i||(o=r=null)};return function(){const f=Date.now();!l&&n.leading===!1&&(l=f);const x=t-(f-l);return o=this,r=arguments,x<=0||x>t?(i&&(clearTimeout(i),i=null),l=f,s=e.apply(o,r),i||(o=r=null)):!i&&n.trailing!==!1&&(i=setTimeout(u,x)),s}}function y(e,...t){const n=Object(e);for(let o=1;o<arguments.length;o++){const r=arguments[o];if(r!=null)for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n}function J(e){for(const t of e)switch(t.trigger){case"pageLoad":D(t);break;case"scrollInView":X(t);break}}function T(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function O(e,t){const n=Q(e),o=getComputedStyle(t),r=e.steps[0].styles,s=e.steps[e.steps.length-1].styles,i=[r,s];for(const l of i)for(const u of n)u in l||(l[u]=o[u])}function Q(e){const t=[];for(const n of e.steps)for(const o in n.styles)t.indexOf(o)===-1&&t.push(o);return t}function D(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){T(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{O(e,n),n.style.transition="none",n.style.transitionDelay="0",y(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${B(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),y(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function X(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){T(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{O(e,n);let o=!1,r=!1;function s(){!o&&l(n)?(o=!0,r=!0,setTimeout(()=>{y(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",i),setTimeout(()=>{r=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&o&&!r&&!l(n)&&(o=!1,y(n.style,e.steps[0].styles))}const i=Z(s,200,{leading:!1});function l(x){const a=x.getBoundingClientRect(),d=window.innerHeight,m=(e.thresholdPercent||0)/100*d;return a.bottom>m&&a.top<d-m}const u=e.steps[0].styles;function f(){y(n.style,u)}f(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${B(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",i,{capture:!0,passive:!0}),s()})}const F=e=>Object.entries(e).map(([n,o])=>{if(typeof o=="string")return`${B(n)}: ${o};`}).filter(g.checkIsDefined),Y=e=>F(e).join(`
|
|
2
2
|
`),C=({mediaQuery:e,className:t,styles:n})=>{const o=`.${t} {
|
|
3
3
|
${Y(n)}
|
|
4
4
|
}`;return e?`${e} {
|
|
5
5
|
${o}
|
|
6
6
|
}`:o};function ee({style:e}){return e}const te=({block:e,context:t})=>M(ee({style:e.style||{},context:t,block:e}));function M(e){switch(g.TARGET){case"svelte":case"vue":case"solid":case"angular":return F(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const ne=({block:e,context:t,registeredComponents:n})=>{var s;const o=(s=b({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:s.name;if(!o)return null;const r=n[o];if(r)return r;console.warn(`
|
|
7
7
|
Could not find a registered component named "${o}".
|
|
8
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},oe=({block:e,context:t})=>{const{repeat:n,...o}=e;if(!(n!=null&&n.collection))return;const r=p.evaluate({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(r))return;const s=n.collection.split(".").pop(),i=n.itemName||(s?s+"Item":"item");return r.map((u,f)=>({context:{...t,localState:{...t.localState,$index:f,$item:u,[i]:u,[`$${i}Index`]:f}},block:o}))},re=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},se=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderComponents?{builderComponents:t}:{}},ce=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},le=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},L={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},A=(e,t=L)=>`@media (max-width: ${t[e].max}px)`,q=({small:e,medium:t})=>{const n=P(L);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const r=n.small.max+1;n.medium={max:t,min:r,default:r+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n};function z(e){return c.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function ie(e){function t(){const o=b({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return g.checkIsDefined(o.hide)?!o.hide:g.checkIsDefined(o.show)?o.show:!0}function n(){var I,R,E;const o=b({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),r=o.responsiveStyles,s=e.context.content,i=q(((I=s==null?void 0:s.meta)==null?void 0:I.breakpoints)||{}),l=r==null?void 0:r.large,u=r==null?void 0:r.medium,f=r==null?void 0:r.small,x=o.id;if(!x)return"";const a=l?C({className:x,styles:l}):"",d=u?C({className:x,styles:u,mediaQuery:A("medium",i)}):"",h=f?C({className:x,styles:f,mediaQuery:A("small",i)}):"",m=o.animations&&o.animations.find(v=>v.trigger==="hover");let w="";if(m){const v=((E=(R=m.steps)==null?void 0:R[1])==null?void 0:E.styles)||{};w=C({className:`${x}:hover`,styles:{...v,transition:`all ${m.duration}s ${B(m.easing)}`,transitionDelay:m.delay?`${m.delay}s`:"0s"}})||""}return[a,d,h,w].join(" ")}return c.jsx(c.Fragment,{children:n()&&t()?c.jsx(c.Fragment,{children:c.jsx(z,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function ae(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ue=e=>`on${ae(e)}`,de=(e,t)=>n=>p.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function H(e){var o;const t={},n=(o=e.block.actions)!=null?o:{};for(const r in n){if(!n.hasOwnProperty(r))continue;const s=n[r];let i=ue(r);if(e.stripPrefix)switch(g.TARGET){case"vue":i=i.replace("v-on:","");break;case"svelte":i=i.replace("on:","");break}t[i]=de(s,e)}return t}function fe({properties:e}){return e}const me=e=>({href:e.href});function j({block:e,context:t}){var o;const n={...me(e),...e.properties,"builder-id":e.id,style:te({block:e,context:t}),[_.getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return fe({properties:n,context:t,block:e})}function xe(e){return c.jsx(V.DynamicRenderer,{TagName:e.Wrapper,attributes:j({block:e.block,context:e.context}),actionAttributes:H({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function he(e){function t(){return e.includeBlockProps?{...j({block:e.block,context:e.context}),...H({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return c.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})}const ge=({componentOptions:e,builderBlock:t,context:n,componentRef:o,includeBlockProps:r,isInteractive:s,contextValue:i})=>{const l={...e,...r?{attributes:j({block:t,context:i})}:{}};return s?{Wrapper:o,block:t,context:n,wrapperProps:e,includeBlockProps:r}:l};function W(e){var o;const[t,n]=S.useState(()=>e.isInteractive?he:e.componentRef);return c.jsx(c.Fragment,{children:e.componentRef?c.jsx(c.Fragment,{children:c.jsx(t,{...ge({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(o=e.blockChildren)==null?void 0:o.map(r=>c.jsx(k,{block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},r.id))})}):null})}function Se(e){const[t,n]=S.useState(()=>e.repeatContext);return c.jsx($.BuilderContext.Provider,{value:t,children:c.jsx(k,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function k(e){var u,f,x;function t(){return ne({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return oe({block:e.block,context:e.context})}function o(){var a;return(a=e.block.repeat)!=null&&a.collection?e.block:b({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function r(){var d;return e.block.tagName==="a"||((d=o().properties)==null?void 0:d.href)||o().href?e.linkComponent||"a":e.block.tagName||"div"}function s(){var h,m;if((h=e.block.repeat)!=null&&h.collection)return!!((m=n==null?void 0:n())!=null&&m.length);const a="hide"in o()?o().hide:!1;return("show"in o()?o().show:!0)&&!a}function i(){var d,h;return!((d=t==null?void 0:t())!=null&&d.component)&&!n()?(h=o().children)!=null?h:[]:[]}function l(){var a,d,h,m;return{blockChildren:(a=o().children)!=null?a:[],componentRef:(d=t==null?void 0:t())==null?void 0:d.component,componentOptions:{...
|
|
8
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`)},oe=({block:e,context:t})=>{const{repeat:n,...o}=e;if(!(n!=null&&n.collection))return;const r=p.evaluate({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(r))return;const s=n.collection.split(".").pop(),i=n.itemName||(s?s+"Item":"item");return r.map((u,f)=>({context:{...t,localState:{...t.localState,$index:f,$item:u,[i]:u,[`$${i}Index`]:f}},block:o}))},re=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},se=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderComponents?{builderComponents:t}:{}},ce=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},le=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},L={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},A=(e,t=L)=>`@media (max-width: ${t[e].max}px)`,q=({small:e,medium:t})=>{const n=P(L);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const r=n.small.max+1;n.medium={max:t,min:r,default:r+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n};function z(e){return c.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function ie(e){function t(){const o=b({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return g.checkIsDefined(o.hide)?!o.hide:g.checkIsDefined(o.show)?o.show:!0}function n(){var I,R,E;const o=b({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),r=o.responsiveStyles,s=e.context.content,i=q(((I=s==null?void 0:s.meta)==null?void 0:I.breakpoints)||{}),l=r==null?void 0:r.large,u=r==null?void 0:r.medium,f=r==null?void 0:r.small,x=o.id;if(!x)return"";const a=l?C({className:x,styles:l}):"",d=u?C({className:x,styles:u,mediaQuery:A("medium",i)}):"",h=f?C({className:x,styles:f,mediaQuery:A("small",i)}):"",m=o.animations&&o.animations.find(v=>v.trigger==="hover");let w="";if(m){const v=((E=(R=m.steps)==null?void 0:R[1])==null?void 0:E.styles)||{};w=C({className:`${x}:hover`,styles:{...v,transition:`all ${m.duration}s ${B(m.easing)}`,transitionDelay:m.delay?`${m.delay}s`:"0s"}})||""}return[a,d,h,w].join(" ")}return c.jsx(c.Fragment,{children:n()&&t()?c.jsx(c.Fragment,{children:c.jsx(z,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function ae(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ue=e=>`on${ae(e)}`,de=(e,t)=>n=>p.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function H(e){var o;const t={},n=(o=e.block.actions)!=null?o:{};for(const r in n){if(!n.hasOwnProperty(r))continue;const s=n[r];let i=ue(r);if(e.stripPrefix)switch(g.TARGET){case"vue":i=i.replace("v-on:","");break;case"svelte":i=i.replace("on:","");break}t[i]=de(s,e)}return t}function fe({properties:e}){return e}const me=e=>({href:e.href});function j({block:e,context:t}){var o;const n={...me(e),...e.properties,"builder-id":e.id,style:te({block:e,context:t}),[_.getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return fe({properties:n,context:t,block:e})}function xe(e){return c.jsx(V.DynamicRenderer,{TagName:e.Wrapper,attributes:j({block:e.block,context:e.context}),actionAttributes:H({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function he(e){function t(){return e.includeBlockProps?{...j({block:e.block,context:e.context}),...H({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return c.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})}const ge=({componentOptions:e,builderBlock:t,context:n,componentRef:o,includeBlockProps:r,isInteractive:s,contextValue:i})=>{const l={...e,...r?{attributes:j({block:t,context:i})}:{}};return s?{Wrapper:o,block:t,context:n,wrapperProps:e,includeBlockProps:r}:l};function W(e){var o;const[t,n]=S.useState(()=>e.isInteractive?he:e.componentRef);return c.jsx(c.Fragment,{children:e.componentRef?c.jsx(c.Fragment,{children:c.jsx(t,{...ge({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(o=e.blockChildren)==null?void 0:o.map(r=>c.jsx(k,{block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},r.id))})}):null})}function Se(e){const[t,n]=S.useState(()=>e.repeatContext);return c.jsx($.BuilderContext.Provider,{value:t,children:c.jsx(k,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function k(e){var u,f,x;function t(){return ne({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return oe({block:e.block,context:e.context})}function o(){var a;return(a=e.block.repeat)!=null&&a.collection?e.block:b({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function r(){var d;return e.block.tagName==="a"||((d=o().properties)==null?void 0:d.href)||o().href?e.linkComponent||"a":e.block.tagName||"div"}function s(){var h,m;if((h=e.block.repeat)!=null&&h.collection)return!!((m=n==null?void 0:n())!=null&&m.length);const a="hide"in o()?o().hide:!1;return("show"in o()?o().show:!0)&&!a}function i(){var d,h;return!((d=t==null?void 0:t())!=null&&d.component)&&!n()?(h=o().children)!=null?h:[]:[]}function l(){var a,d,h,m;return{blockChildren:(a=o().children)!=null?a:[],componentRef:(d=t==null?void 0:t())==null?void 0:d.component,componentOptions:{...G(o()),...ce(t(),o()),...le(t(),e.context),...re(t(),e.linkComponent),...se(t(),e.registeredComponents)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:o(),includeBlockProps:((h=t==null?void 0:t())==null?void 0:h.noWrap)===!0,isInteractive:!((m=t==null?void 0:t())!=null&&m.isRSC&&g.TARGET==="rsc")}}return S.useEffect(()=>{const a=o().id,d=o().animations;d&&a&&J(d.map(h=>({...h,elementId:a})))},[]),c.jsx(c.Fragment,{children:s()?c.jsxs(c.Fragment,{children:[c.jsx(ie,{block:e.block,context:e.context}),(u=t==null?void 0:t())!=null&&u.noWrap?c.jsx(c.Fragment,{children:c.jsx(W,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive})}):c.jsx(c.Fragment,{children:n()?c.jsx(c.Fragment,{children:(x=n())==null?void 0:x.map((a,d)=>c.jsx(Se,{repeatContext:a.context,block:a.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},d))}):c.jsxs(xe,{Wrapper:r(),block:o(),context:e.context,children:[c.jsx(W,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive}),(f=i())==null?void 0:f.map(a=>c.jsx(k,{block:a,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},a.id))]})})]}):null})}function ye(e){function t(){var r;return"builder-blocks"+((r=e.blocks)!=null&&r.length?"":" no-blocks")}function n(){var r,s;g.isEditing()&&!((r=e.blocks)!=null&&r.length)&&((s=window.parent)==null||s.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function o(){var r,s;g.isEditing()&&!((r=e.blocks)!=null&&r.length)&&((s=window.parent)==null||s.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return c.jsxs(c.Fragment,{children:[c.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7cd1560e","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:r=>n(),onMouseEnter:r=>o(),onKeyPress:r=>n(),...e.BlocksWrapperProps,children:e.children}),c.jsx("style",{children:`.props-blocks-wrapper-7cd1560e {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");require("./server-entry-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");require("./server-entry-7b4fa72f.cjs");const t=e.lazy(()=>Promise.resolve().then(()=>require("./button-26b76a4a.cjs"))),r=e.lazy(()=>Promise.resolve().then(()=>require("./columns-ccdafcc7.cjs"))),n=e.lazy(()=>Promise.resolve().then(()=>require("./fragment-b6e3a326.cjs"))),s=e.lazy(()=>Promise.resolve().then(()=>require("./image-eebfcbac.cjs"))),i=e.lazy(()=>Promise.resolve().then(()=>require("./section-d655ea14.cjs"))),l=e.lazy(()=>Promise.resolve().then(()=>require("./symbol-6c18ca90.cjs"))),c=e.lazy(()=>Promise.resolve().then(()=>require("./text-9eac9e4d.cjs"))),a=e.lazy(()=>Promise.resolve().then(()=>require("./video-e20dcbbc.cjs"))),u=e.lazy(()=>Promise.resolve().then(()=>require("./blocks-854f4022.cjs")).then(o=>o.blocks)),m=e.lazy(()=>Promise.resolve().then(()=>require("./content-variants-fc207487.cjs"))),y=e.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:""});exports.Blocks=u;exports.BuilderContext=y;exports.Button=t;exports.Columns=r;exports.Content=m;exports.Fragment=n;exports.Image=s;exports.Section=i;exports.Symbol=l;exports.Text=c;exports.Video=a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { lazy as t, createContext as n } from "react";
|
|
3
|
-
import "./server-entry-
|
|
4
|
-
const i = t(() => import("./button-
|
|
3
|
+
import "./server-entry-c537d834.js";
|
|
4
|
+
const i = t(() => import("./button-08412b69.js")), r = t(() => import("./columns-bd2a004b.js")), a = t(() => import("./fragment-1492bc7f.js")), c = t(() => import("./image-6a074aab.js")), m = t(() => import("./section-d83e2dd3.js")), p = t(() => import("./symbol-8b3a6b98.js")), l = t(() => import("./text-d3c86634.js")), u = t(() => import("./video-58c2cc8d.js")), d = t(() => import("./blocks-fdb24842.js").then((o) => o.blocks)), x = t(() => import("./content-variants-dd7ea0f9.js")), S = n({
|
|
5
5
|
content: null,
|
|
6
6
|
context: {},
|
|
7
7
|
localState: void 0,
|