@builder.io/sdk-vue 5.2.3 → 5.2.5
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/{awaiter-TGpflqNO.js → awaiter-BKtN2AMs.js} +1 -1
- package/lib/browser/{awaiter-0ES-HtKy.cjs → awaiter-RQWxLPh7.cjs} +1 -1
- package/lib/browser/{block-wrapper-6JBj9wlj.cjs → block-wrapper-nMKh8p11.cjs} +1 -1
- package/lib/browser/{block-wrapper-M2woB-L4.js → block-wrapper-tny9tjLX.js} +3 -3
- package/lib/browser/{component-ref-TmVziQMC.cjs → component-ref-Mw4IXQsf.cjs} +1 -1
- package/lib/browser/{component-ref-7xUvXH6j.js → component-ref-d2TAsp69.js} +4 -4
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/{get-block-properties-IPH_xTi-.js → get-block-properties-DXgJ283y.js} +1 -1
- package/lib/browser/{get-block-properties-2RZMZvVf.cjs → get-block-properties-yuV5qbSy.cjs} +1 -1
- package/lib/browser/{index-bHeXSwpO.js → index-NzYhd2fP.js} +212 -201
- package/lib/browser/{index-yGDaT-4c.cjs → index-yyjVNpWr.cjs} +27 -19
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{live-edit-zea3UB3U.cjs → live-edit-2xpHwDC6.cjs} +1 -1
- package/lib/browser/{live-edit-ncQFzx-S.js → live-edit-MYo3p6a8.js} +1 -1
- package/lib/browser/{repeated-block-6Car73NY.cjs → repeated-block-2EBzVyUu.cjs} +1 -1
- package/lib/browser/{repeated-block-Mk8O3Rpy.js → repeated-block-Ga5ASejd.js} +2 -2
- package/lib/browser/{style-wrapper-5rtVLsI3.cjs → style-wrapper-L7DnOyfm.cjs} +1 -1
- package/lib/browser/{style-wrapper-r-s-if-A.js → style-wrapper-dI5wRv59.js} +1 -1
- package/lib/edge/{awaiter-rfhkeWZf.js → awaiter-4nEUChYV.js} +1 -1
- package/lib/edge/{awaiter-S6rT9Vve.cjs → awaiter-6AjvWUxL.cjs} +1 -1
- package/lib/edge/{block-wrapper-C8-WoYjv.js → block-wrapper-46vOpFGy.js} +3 -3
- package/lib/{node/block-wrapper-1Y-CVNTM.cjs → edge/block-wrapper-97OfjwlX.cjs} +1 -1
- package/lib/edge/{component-ref-Gc_mK-yZ.cjs → component-ref-DUyRq-EJ.cjs} +1 -1
- package/lib/edge/{component-ref-u0-6ifHM.js → component-ref-yTXpKy_r.js} +4 -4
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/{get-block-properties-HX4IkuJ7.js → get-block-properties-W3W_9H-Z.js} +1 -1
- package/lib/edge/{get-block-properties-YVTdp4N_.cjs → get-block-properties-jJLbFHeq.cjs} +1 -1
- package/lib/edge/{index-z9siWBN1.js → index-DHXkBA25.js} +370 -359
- package/lib/edge/{index-Ep-06GOr.cjs → index-jpFEl6o1.cjs} +33 -25
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/{node/live-edit-YzqrW2ZO.cjs → edge/live-edit-WpboQZDv.cjs} +1 -1
- package/lib/{node/live-edit-k8OIvz20.js → edge/live-edit-nhAMI-64.js} +1 -1
- package/lib/edge/{repeated-block-QAF0iXDX.cjs → repeated-block-dGVzaSM5.cjs} +1 -1
- package/lib/edge/{repeated-block-e-bO_PW3.js → repeated-block-eANZkOUH.js} +2 -2
- package/lib/edge/{style-wrapper-IpBgNlUT.cjs → style-wrapper-CvNVb0wT.cjs} +1 -1
- package/lib/edge/{style-wrapper-UVIpB1x8.js → style-wrapper-GqtgkGuc.js} +1 -1
- package/lib/node/{awaiter-iuox8UDW.js → awaiter-6JHJCJgG.js} +1 -1
- package/lib/node/{awaiter-o04icQ1E.cjs → awaiter-_rQTvMWR.cjs} +1 -1
- package/lib/node/{block-wrapper-Lg6Dv_gm.js → block-wrapper-3P0_XOfk.js} +3 -3
- package/lib/{edge/block-wrapper-SyvaobbZ.cjs → node/block-wrapper-CVcdunhe.cjs} +1 -1
- package/lib/node/{component-ref-MVFxzC_h.js → component-ref-RHwChjOp.js} +5 -5
- package/lib/node/{component-ref-k5AyvYBo.cjs → component-ref-tWjNsmU5.cjs} +1 -1
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/{get-block-properties-Rq2VRXzM.js → get-block-properties-9gqKfU1J.js} +2 -2
- package/lib/node/{get-block-properties-Kb0sj2FV.cjs → get-block-properties-jknWz7As.cjs} +1 -1
- package/lib/node/{index-9hkAOr_P.js → index-CwfwLkvc.js} +182 -171
- package/lib/node/{index-yxMSSBrC.cjs → index-eeU-4w7r.cjs} +27 -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 +1 -1
- package/lib/{edge/live-edit-XsT9ZiMs.js → node/live-edit-NBkhYc-u.js} +1 -1
- package/lib/{edge/live-edit-nkpalAUa.cjs → node/live-edit-iOkS0wUg.cjs} +1 -1
- package/lib/node/{repeated-block-0laikCiE.cjs → repeated-block-BqCLqE8_.cjs} +1 -1
- package/lib/node/{repeated-block-km0tNI0j.js → repeated-block-aHj4jtJt.js} +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-o843UKK7.js → should-force-browser-runtime-in-node-2bRYXF-W.js} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-HK08_EA6.cjs → should-force-browser-runtime-in-node-j9YDACzy.cjs} +1 -1
- package/lib/node/{style-wrapper-O4HZcJNK.cjs → style-wrapper-WxU8Uo4d.cjs} +1 -1
- package/lib/node/{style-wrapper-tc5B1slA.js → style-wrapper-kcTKCb_j.js} +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { defineComponent as y, openBlock as d, createElementBlock as h, Fragment as I, createBlock as S, resolveDynamicComponent as X, mergeProps as $, toHandlers as L, withCtx as x, renderSlot as N, resolveComponent as k, createTextVNode as Vt, toDisplayString as de, defineAsyncComponent as Y, createVNode as E, renderList as F, createCommentVNode as C, h as
|
|
2
|
+
import { defineComponent as y, openBlock as d, createElementBlock as h, Fragment as I, createBlock as S, resolveDynamicComponent as X, mergeProps as $, toHandlers as L, withCtx as x, renderSlot as N, resolveComponent as k, createTextVNode as Vt, toDisplayString as de, defineAsyncComponent as Y, createVNode as E, renderList as F, createCommentVNode as C, h as Qe, createElementVNode as z, normalizeStyle as M, normalizeClass as _, markRaw as Nt } from "vue";
|
|
3
3
|
const Wt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Dt = (e) => typeof e == "string" && Wt.has(e.toLowerCase());
|
|
4
4
|
function W(e = {}, t, n) {
|
|
5
5
|
const o = {};
|
|
@@ -38,9 +38,9 @@ function xt(e, t, n, o, r, i) {
|
|
|
38
38
|
}, 16))
|
|
39
39
|
], 64));
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const Te = /* @__PURE__ */ v(Ot, [["render", xt]]), vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
42
42
|
__proto__: null,
|
|
43
|
-
default:
|
|
43
|
+
default: Te
|
|
44
44
|
}, Symbol.toStringTag, { value: "Module" })), R = "vue", j = () => {
|
|
45
45
|
switch (R) {
|
|
46
46
|
case "react":
|
|
@@ -56,7 +56,7 @@ const ke = /* @__PURE__ */ v(Ot, [["render", xt]]), vs = /* @__PURE__ */ Object.
|
|
|
56
56
|
}
|
|
57
57
|
}, Ut = y({
|
|
58
58
|
name: "builder-button",
|
|
59
|
-
components: { DynamicRenderer:
|
|
59
|
+
components: { DynamicRenderer: Te },
|
|
60
60
|
props: [
|
|
61
61
|
"attributes",
|
|
62
62
|
"link",
|
|
@@ -114,7 +114,7 @@ const Ft = /* @__PURE__ */ v(Ut, [["render", Lt]]), Ht = Symbol(), ge = {
|
|
|
114
114
|
model: ""
|
|
115
115
|
},
|
|
116
116
|
key: Ht
|
|
117
|
-
}, Mt = Symbol(),
|
|
117
|
+
}, Mt = Symbol(), Ye = {
|
|
118
118
|
Components: { registeredComponents: {} },
|
|
119
119
|
key: Mt
|
|
120
120
|
}, ne = "[Builder.io]: ", B = {
|
|
@@ -122,7 +122,7 @@ const Ft = /* @__PURE__ */ v(Ut, [["render", Lt]]), Ht = Symbol(), ge = {
|
|
|
122
122
|
error: (...e) => console.error(ne, ...e),
|
|
123
123
|
warn: (...e) => console.warn(ne, ...e),
|
|
124
124
|
debug: (...e) => console.debug(ne, ...e)
|
|
125
|
-
},
|
|
125
|
+
}, Xe = (e, t, n) => {
|
|
126
126
|
const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r, i) => r != null ? r[i] : r, e);
|
|
127
127
|
return o === void 0 || o === e ? n : o;
|
|
128
128
|
};
|
|
@@ -134,13 +134,13 @@ const jt = (e) => {
|
|
|
134
134
|
return e.forEach((n, o) => {
|
|
135
135
|
t[o] = n;
|
|
136
136
|
}), t;
|
|
137
|
-
},
|
|
137
|
+
}, Ze = (e) => e instanceof URLSearchParams ? jt(e) : e, _e = (e) => typeof e == "string" ? e : e instanceof URLSearchParams ? e.toString() : new URLSearchParams(e).toString();
|
|
138
138
|
function Kt() {
|
|
139
139
|
return T() && window.self !== window.top;
|
|
140
140
|
}
|
|
141
141
|
function A(e) {
|
|
142
142
|
return Kt() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
|
|
143
|
-
|
|
143
|
+
_e(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
|
|
144
144
|
}
|
|
145
145
|
const qt = () => {
|
|
146
146
|
if (T()) {
|
|
@@ -148,7 +148,7 @@ const qt = () => {
|
|
|
148
148
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
149
149
|
} else
|
|
150
150
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
151
|
-
}, zt = () => typeof navigator == "object" && navigator.userAgent || "",
|
|
151
|
+
}, zt = () => typeof navigator == "object" && navigator.userAgent || "", et = () => {
|
|
152
152
|
const e = zt(), t = {
|
|
153
153
|
Android() {
|
|
154
154
|
return e.match(/Android/i);
|
|
@@ -174,10 +174,10 @@ const qt = () => {
|
|
|
174
174
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
175
175
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
176
176
|
};
|
|
177
|
-
},
|
|
177
|
+
}, tt = "5.2.5", nt = () => ({
|
|
178
178
|
"X-Builder-SDK": R,
|
|
179
179
|
"X-Builder-SDK-GEN": "2",
|
|
180
|
-
"X-Builder-SDK-Version":
|
|
180
|
+
"X-Builder-SDK-Version": tt
|
|
181
181
|
}), K = (e) => e != null, Gt = (e) => {
|
|
182
182
|
if (e === "localhost" || e === "127.0.0.1")
|
|
183
183
|
return e;
|
|
@@ -194,14 +194,14 @@ const qt = () => {
|
|
|
194
194
|
B.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
|
-
},
|
|
197
|
+
}, ot = async (e) => ue(e), Jt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(K).join("; "), Qt = [["secure", ""], ["SameSite", "None"]], Yt = ({
|
|
198
198
|
name: e,
|
|
199
199
|
value: t,
|
|
200
200
|
expires: n
|
|
201
201
|
}) => {
|
|
202
202
|
const r = (T() ? location.protocol === "https:" : !0) ? Qt : [[]], i = n ? [["expires", n.toUTCString()]] : [[]], s = [[e, t], ...i, ["path", "/"], ["domain", Gt(window.location.hostname)], ...r];
|
|
203
203
|
return Jt(s);
|
|
204
|
-
},
|
|
204
|
+
}, we = async ({
|
|
205
205
|
name: e,
|
|
206
206
|
value: t,
|
|
207
207
|
expires: n,
|
|
@@ -226,16 +226,16 @@ function Xt() {
|
|
|
226
226
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function rt() {
|
|
230
230
|
return Xt().replace(/-/g, "");
|
|
231
231
|
}
|
|
232
|
-
const
|
|
232
|
+
const it = "builderSessionId", Zt = async ({
|
|
233
233
|
canTrack: e
|
|
234
234
|
}) => {
|
|
235
235
|
if (!e)
|
|
236
236
|
return;
|
|
237
|
-
const t = await
|
|
238
|
-
name:
|
|
237
|
+
const t = await ot({
|
|
238
|
+
name: it,
|
|
239
239
|
canTrack: e
|
|
240
240
|
});
|
|
241
241
|
if (K(t))
|
|
@@ -247,20 +247,20 @@ const nt = "builderSessionId", Zt = async ({
|
|
|
247
247
|
canTrack: e
|
|
248
248
|
}), n;
|
|
249
249
|
}
|
|
250
|
-
}, _t = () =>
|
|
250
|
+
}, _t = () => rt(), en = ({
|
|
251
251
|
id: e,
|
|
252
252
|
canTrack: t
|
|
253
|
-
}) =>
|
|
254
|
-
name:
|
|
253
|
+
}) => we({
|
|
254
|
+
name: it,
|
|
255
255
|
value: e,
|
|
256
256
|
canTrack: t
|
|
257
|
-
}),
|
|
257
|
+
}), st = () => T() && typeof localStorage < "u" ? localStorage : void 0, tn = ({
|
|
258
258
|
key: e,
|
|
259
259
|
canTrack: t
|
|
260
260
|
}) => {
|
|
261
261
|
var n;
|
|
262
262
|
try {
|
|
263
|
-
return t ? (n =
|
|
263
|
+
return t ? (n = st()) == null ? void 0 : n.getItem(e) : void 0;
|
|
264
264
|
} catch (o) {
|
|
265
265
|
console.debug("[LocalStorage] GET error: ", o);
|
|
266
266
|
return;
|
|
@@ -272,17 +272,17 @@ const nt = "builderSessionId", Zt = async ({
|
|
|
272
272
|
}) => {
|
|
273
273
|
var o;
|
|
274
274
|
try {
|
|
275
|
-
t && ((o =
|
|
275
|
+
t && ((o = st()) == null || o.setItem(e, n));
|
|
276
276
|
} catch (r) {
|
|
277
277
|
console.debug("[LocalStorage] SET error: ", r);
|
|
278
278
|
}
|
|
279
|
-
},
|
|
279
|
+
}, at = "builderVisitorId", on = ({
|
|
280
280
|
canTrack: e
|
|
281
281
|
}) => {
|
|
282
282
|
if (!e)
|
|
283
283
|
return;
|
|
284
284
|
const t = tn({
|
|
285
|
-
key:
|
|
285
|
+
key: at,
|
|
286
286
|
canTrack: e
|
|
287
287
|
});
|
|
288
288
|
if (K(t))
|
|
@@ -294,15 +294,15 @@ const nt = "builderSessionId", Zt = async ({
|
|
|
294
294
|
canTrack: e
|
|
295
295
|
}), n;
|
|
296
296
|
}
|
|
297
|
-
}, rn = () =>
|
|
297
|
+
}, rn = () => rt(), sn = ({
|
|
298
298
|
id: e,
|
|
299
299
|
canTrack: t
|
|
300
300
|
}) => nn({
|
|
301
|
-
key:
|
|
301
|
+
key: at,
|
|
302
302
|
value: e,
|
|
303
303
|
canTrack: t
|
|
304
304
|
});
|
|
305
|
-
function
|
|
305
|
+
function Ie(e) {
|
|
306
306
|
var t;
|
|
307
307
|
typeof process < "u" && ((t = process.env) != null && t.DEBUG) && String(process.env.DEBUG) == "true" && B.log(e);
|
|
308
308
|
}
|
|
@@ -340,7 +340,7 @@ const an = async ({
|
|
|
340
340
|
...await an({
|
|
341
341
|
canTrack: t
|
|
342
342
|
}),
|
|
343
|
-
userAttributes:
|
|
343
|
+
userAttributes: et(),
|
|
344
344
|
ownerId: n
|
|
345
345
|
}
|
|
346
346
|
});
|
|
@@ -355,14 +355,14 @@ async function se({
|
|
|
355
355
|
if (!t.canTrack || A() || !(T() || R === "reactNative"))
|
|
356
356
|
return;
|
|
357
357
|
const o = `${e || "https://cdn.builder.io"}/api/v1/track`;
|
|
358
|
-
return
|
|
358
|
+
return Ie(o), fetch(o, {
|
|
359
359
|
method: "POST",
|
|
360
360
|
body: JSON.stringify({
|
|
361
361
|
events: [await ln(t)]
|
|
362
362
|
}),
|
|
363
363
|
headers: {
|
|
364
364
|
"content-type": "application/json",
|
|
365
|
-
...
|
|
365
|
+
...nt()
|
|
366
366
|
},
|
|
367
367
|
mode: "cors"
|
|
368
368
|
}).catch((r) => {
|
|
@@ -388,7 +388,7 @@ const Ss = (e) => se({
|
|
|
388
388
|
isEditing: A(),
|
|
389
389
|
isBrowser: T(),
|
|
390
390
|
isServer: !T(),
|
|
391
|
-
getUserAttributes: () =>
|
|
391
|
+
getUserAttributes: () => et(),
|
|
392
392
|
trackConversion: (t, n) => {
|
|
393
393
|
!(e != null && e.apiKey) || (e == null ? void 0 : e.canTrack) === !1 || se({
|
|
394
394
|
type: "conversion",
|
|
@@ -407,7 +407,7 @@ const Ss = (e) => se({
|
|
|
407
407
|
}), un = (e, {
|
|
408
408
|
isExpression: t = !0
|
|
409
409
|
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
|
|
410
|
-
function
|
|
410
|
+
function lt({
|
|
411
411
|
rootState: e,
|
|
412
412
|
localState: t,
|
|
413
413
|
rootSetState: n
|
|
@@ -417,7 +417,7 @@ function it({
|
|
|
417
417
|
if (t && r in t)
|
|
418
418
|
return t[r];
|
|
419
419
|
const i = o[r];
|
|
420
|
-
return typeof i == "object" && i !== null ?
|
|
420
|
+
return typeof i == "object" && i !== null ? lt({
|
|
421
421
|
rootState: i,
|
|
422
422
|
localState: void 0,
|
|
423
423
|
rootSetState: n ? (s) => {
|
|
@@ -432,7 +432,7 @@ function it({
|
|
|
432
432
|
}
|
|
433
433
|
});
|
|
434
434
|
}
|
|
435
|
-
const
|
|
435
|
+
const xe = ({
|
|
436
436
|
code: e,
|
|
437
437
|
builder: t,
|
|
438
438
|
context: n,
|
|
@@ -445,7 +445,7 @@ const We = ({
|
|
|
445
445
|
builder: t,
|
|
446
446
|
context: n,
|
|
447
447
|
event: o,
|
|
448
|
-
state:
|
|
448
|
+
state: lt({
|
|
449
449
|
rootState: s,
|
|
450
450
|
localState: r,
|
|
451
451
|
rootSetState: i
|
|
@@ -467,7 +467,7 @@ const mn = ({
|
|
|
467
467
|
return t && n && !o ? (e && B.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;
|
|
468
468
|
}, hn = (e) => (T() || mn({
|
|
469
469
|
shouldLogWarning: !0
|
|
470
|
-
}),
|
|
470
|
+
}), xe(e)), fn = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, bn = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, gn = (e) => {
|
|
471
471
|
var t, n, o, r, i, s;
|
|
472
472
|
return ((o = (n = (t = fn.exec(e.trim())) == null ? void 0 : t.groups) == null ? void 0 : n.getPath) == null ? void 0 : o.slice(1)) || ((s = (i = (r = bn.exec(e.trim())) == null ? void 0 : r.groups) == null ? void 0 : i.getPath) == null ? void 0 : s.slice(1));
|
|
473
473
|
};
|
|
@@ -485,7 +485,7 @@ function ee({
|
|
|
485
485
|
return;
|
|
486
486
|
const a = gn(e.trim());
|
|
487
487
|
if (a)
|
|
488
|
-
return
|
|
488
|
+
return Xe({
|
|
489
489
|
...o,
|
|
490
490
|
...n
|
|
491
491
|
}, a);
|
|
@@ -554,7 +554,7 @@ function ae(e, t, n = null, o = null, r = /* @__PURE__ */ new WeakSet()) {
|
|
|
554
554
|
}), ae(s, t, e, i, r);
|
|
555
555
|
}));
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function ct(e) {
|
|
558
558
|
return e && typeof e == "object" && e["@type"] === "@builder.io/core:LocalizedValue";
|
|
559
559
|
}
|
|
560
560
|
function kn(e) {
|
|
@@ -562,7 +562,7 @@ function kn(e) {
|
|
|
562
562
|
return !1;
|
|
563
563
|
let t = !1;
|
|
564
564
|
return ae(e, (n) => {
|
|
565
|
-
if (
|
|
565
|
+
if (ct(n)) {
|
|
566
566
|
t = !0;
|
|
567
567
|
return;
|
|
568
568
|
}
|
|
@@ -570,14 +570,14 @@ function kn(e) {
|
|
|
570
570
|
}
|
|
571
571
|
function Cn(e, t) {
|
|
572
572
|
return !e || !Object.getOwnPropertyNames(e).length ? {} : (ae(e, (n, o) => {
|
|
573
|
-
|
|
573
|
+
ct(n) && o(n[t] ?? void 0);
|
|
574
574
|
}), e);
|
|
575
575
|
}
|
|
576
576
|
function Tn(e, t) {
|
|
577
577
|
var n, o;
|
|
578
578
|
return (n = e.component) != null && n.options && kn((o = e.component) == null ? void 0 : o.options) && (t || console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"), e.component.options = Cn(e.component.options, t ?? "Default")), e;
|
|
579
579
|
}
|
|
580
|
-
const
|
|
580
|
+
const $e = (e) => JSON.parse(JSON.stringify(e)), dt = (e, t, n) => {
|
|
581
581
|
if (Object(e) !== e)
|
|
582
582
|
return e;
|
|
583
583
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
@@ -597,7 +597,7 @@ function ye(e) {
|
|
|
597
597
|
}
|
|
598
598
|
const wn = ["svelte", "vue", "angular", "qwik", "solid"].includes(R), In = (e) => {
|
|
599
599
|
if (wn) {
|
|
600
|
-
const t =
|
|
600
|
+
const t = $e(e);
|
|
601
601
|
return {
|
|
602
602
|
...t,
|
|
603
603
|
properties: {
|
|
@@ -639,7 +639,7 @@ const wn = ["svelte", "vue", "angular", "qwik", "solid"].includes(R), In = (e) =
|
|
|
639
639
|
rootSetState: r,
|
|
640
640
|
context: t
|
|
641
641
|
});
|
|
642
|
-
|
|
642
|
+
dt(i, s, a);
|
|
643
643
|
}
|
|
644
644
|
return i;
|
|
645
645
|
};
|
|
@@ -659,9 +659,9 @@ function Rn({
|
|
|
659
659
|
context: t
|
|
660
660
|
}), i = Tn(i, o.locale), i;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function Re(e) {
|
|
663
663
|
const t = e || (T() ? window.location.search : void 0);
|
|
664
|
-
return t ?
|
|
664
|
+
return t ? _e(t).indexOf("builder.preview=") !== -1 : !1;
|
|
665
665
|
}
|
|
666
666
|
const En = (e) => ({
|
|
667
667
|
type: "builder.registerComponent",
|
|
@@ -673,11 +673,11 @@ const En = (e) => ({
|
|
|
673
673
|
function le(e) {
|
|
674
674
|
return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ? An(n) : n));
|
|
675
675
|
}
|
|
676
|
-
const
|
|
676
|
+
const Ue = {};
|
|
677
677
|
function ks(e, t) {
|
|
678
678
|
e === "plugin" && (t = le(t));
|
|
679
|
-
let n =
|
|
680
|
-
if (n || (n =
|
|
679
|
+
let n = Ue[e];
|
|
680
|
+
if (n || (n = Ue[e] = []), n.push(t), T()) {
|
|
681
681
|
const o = {
|
|
682
682
|
type: "builder.register",
|
|
683
683
|
data: {
|
|
@@ -702,24 +702,24 @@ function Cs(e) {
|
|
|
702
702
|
}, "*");
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
|
-
const
|
|
705
|
+
const Le = {};
|
|
706
706
|
function Ts(e) {
|
|
707
707
|
if (T()) {
|
|
708
|
-
Object.assign(
|
|
708
|
+
Object.assign(Le, e);
|
|
709
709
|
const t = {
|
|
710
710
|
type: "builder.settingsChange",
|
|
711
|
-
data:
|
|
711
|
+
data: Le
|
|
712
712
|
};
|
|
713
713
|
parent.postMessage(t, "*");
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
const
|
|
716
|
+
const Fe = "builder.", Pn = "options.", ut = (e) => {
|
|
717
717
|
if (!e)
|
|
718
718
|
return {};
|
|
719
|
-
const t =
|
|
719
|
+
const t = Ze(e), n = {};
|
|
720
720
|
return Object.keys(t).forEach((o) => {
|
|
721
|
-
if (o.startsWith(
|
|
722
|
-
const r = o.replace(
|
|
721
|
+
if (o.startsWith(Fe)) {
|
|
722
|
+
const r = o.replace(Fe, "").replace(Pn, "");
|
|
723
723
|
n[r] = t[o];
|
|
724
724
|
}
|
|
725
725
|
}), n;
|
|
@@ -727,22 +727,25 @@ const xe = "builder.", Pn = "options.", lt = (e) => {
|
|
|
727
727
|
if (!T())
|
|
728
728
|
return {};
|
|
729
729
|
const e = new URLSearchParams(window.location.search);
|
|
730
|
-
return
|
|
730
|
+
return ut(e);
|
|
731
731
|
}, Vn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
732
|
-
function
|
|
733
|
-
|
|
732
|
+
function pt(e, t) {
|
|
733
|
+
let n;
|
|
734
|
+
try {
|
|
735
|
+
n = new URL(t.origin);
|
|
736
|
+
} catch {
|
|
734
737
|
return !1;
|
|
735
|
-
|
|
736
|
-
return (e || Vn).findIndex((
|
|
738
|
+
}
|
|
739
|
+
return n.protocol !== "http:" && n.protocol !== "https:" ? !1 : (e || Vn).findIndex((o) => o.startsWith("*.") ? n.hostname.endsWith(o.slice(1)) : o === n.hostname) > -1;
|
|
737
740
|
}
|
|
738
|
-
let
|
|
739
|
-
const
|
|
741
|
+
let He = !1;
|
|
742
|
+
const mt = (e) => {
|
|
740
743
|
var t, n;
|
|
741
|
-
|
|
744
|
+
He || (He = !0, T() && ((t = window.parent) == null || t.postMessage({
|
|
742
745
|
type: "builder.sdkInfo",
|
|
743
746
|
data: {
|
|
744
747
|
target: R,
|
|
745
|
-
version:
|
|
748
|
+
version: tt,
|
|
746
749
|
supportsPatchUpdates: !1,
|
|
747
750
|
// Supports builder-model="..." attribute which is needed to
|
|
748
751
|
// scope our '+ add block' button styling
|
|
@@ -760,7 +763,7 @@ const dt = (e) => {
|
|
|
760
763
|
}
|
|
761
764
|
}, "*"), window.addEventListener("message", (o) => {
|
|
762
765
|
var i, s;
|
|
763
|
-
if (!
|
|
766
|
+
if (!pt(e.trustedHosts, o))
|
|
764
767
|
return;
|
|
765
768
|
const {
|
|
766
769
|
data: r
|
|
@@ -801,12 +804,12 @@ const dt = (e) => {
|
|
|
801
804
|
}
|
|
802
805
|
}
|
|
803
806
|
})));
|
|
804
|
-
},
|
|
807
|
+
}, ht = ({
|
|
805
808
|
model: e,
|
|
806
809
|
trustedHosts: t,
|
|
807
810
|
callbacks: n
|
|
808
811
|
}) => (o) => {
|
|
809
|
-
if (!
|
|
812
|
+
if (!pt(t, o))
|
|
810
813
|
return;
|
|
811
814
|
const {
|
|
812
815
|
data: r
|
|
@@ -841,11 +844,11 @@ const dt = (e) => {
|
|
|
841
844
|
if (!T)
|
|
842
845
|
return B.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
843
846
|
};
|
|
844
|
-
|
|
847
|
+
mt({
|
|
845
848
|
modelName: e,
|
|
846
849
|
apiKey: t
|
|
847
850
|
});
|
|
848
|
-
const r =
|
|
851
|
+
const r = ht({
|
|
849
852
|
callbacks: {
|
|
850
853
|
contentUpdate: n,
|
|
851
854
|
animation: () => {
|
|
@@ -861,24 +864,24 @@ const dt = (e) => {
|
|
|
861
864
|
return window.addEventListener("message", r), () => {
|
|
862
865
|
window.removeEventListener("message", r);
|
|
863
866
|
};
|
|
864
|
-
}, Nn = "builder.tests",
|
|
867
|
+
}, Nn = "builder.tests", Ee = (e) => `${Nn}.${e}`, Wn = ({
|
|
865
868
|
contentId: e
|
|
866
|
-
}) =>
|
|
867
|
-
name:
|
|
869
|
+
}) => ot({
|
|
870
|
+
name: Ee(e),
|
|
868
871
|
canTrack: !0
|
|
869
872
|
}), Dn = ({
|
|
870
873
|
contentId: e
|
|
871
874
|
}) => ue({
|
|
872
|
-
name:
|
|
875
|
+
name: Ee(e),
|
|
873
876
|
canTrack: !0
|
|
874
877
|
}), On = ({
|
|
875
878
|
contentId: e,
|
|
876
879
|
value: t
|
|
877
|
-
}) =>
|
|
878
|
-
name:
|
|
880
|
+
}) => we({
|
|
881
|
+
name: Ee(e),
|
|
879
882
|
value: t,
|
|
880
883
|
canTrack: !0
|
|
881
|
-
}),
|
|
884
|
+
}), ft = (e) => K(e.id) && K(e.variations) && Object.keys(e.variations).length > 0, xn = ({
|
|
882
885
|
id: e,
|
|
883
886
|
variations: t
|
|
884
887
|
}) => {
|
|
@@ -891,7 +894,7 @@ const dt = (e) => {
|
|
|
891
894
|
return i;
|
|
892
895
|
}
|
|
893
896
|
return e;
|
|
894
|
-
},
|
|
897
|
+
}, bt = (e) => {
|
|
895
898
|
const t = xn(e);
|
|
896
899
|
return On({
|
|
897
900
|
contentId: e.id,
|
|
@@ -899,7 +902,7 @@ const dt = (e) => {
|
|
|
899
902
|
}).catch((n) => {
|
|
900
903
|
B.error("could not store A/B test variation: ", n);
|
|
901
904
|
}), t;
|
|
902
|
-
},
|
|
905
|
+
}, gt = ({
|
|
903
906
|
item: e,
|
|
904
907
|
testGroupId: t
|
|
905
908
|
}) => {
|
|
@@ -921,14 +924,14 @@ const dt = (e) => {
|
|
|
921
924
|
return e;
|
|
922
925
|
if (!e)
|
|
923
926
|
return;
|
|
924
|
-
if (!
|
|
927
|
+
if (!ft(e))
|
|
925
928
|
return e;
|
|
926
929
|
const n = Dn({
|
|
927
930
|
contentId: e.id
|
|
928
|
-
}) ||
|
|
931
|
+
}) || bt({
|
|
929
932
|
variations: e.variations,
|
|
930
933
|
id: e.id
|
|
931
|
-
}), o =
|
|
934
|
+
}), o = gt({
|
|
932
935
|
item: e,
|
|
933
936
|
testGroupId: n
|
|
934
937
|
});
|
|
@@ -940,14 +943,14 @@ const dt = (e) => {
|
|
|
940
943
|
item: e,
|
|
941
944
|
canTrack: t
|
|
942
945
|
}) => {
|
|
943
|
-
if (!t || !
|
|
946
|
+
if (!t || !ft(e))
|
|
944
947
|
return e;
|
|
945
948
|
const o = await Wn({
|
|
946
949
|
contentId: e.id
|
|
947
|
-
}) ||
|
|
950
|
+
}) || bt({
|
|
948
951
|
variations: e.variations,
|
|
949
952
|
id: e.id
|
|
950
|
-
}), r =
|
|
953
|
+
}), r = gt({
|
|
951
954
|
item: e,
|
|
952
955
|
testGroupId: o
|
|
953
956
|
});
|
|
@@ -956,8 +959,8 @@ const dt = (e) => {
|
|
|
956
959
|
...r
|
|
957
960
|
};
|
|
958
961
|
};
|
|
959
|
-
const
|
|
960
|
-
function
|
|
962
|
+
const Me = "builder.userAttributes";
|
|
963
|
+
function je() {
|
|
961
964
|
let e = !0;
|
|
962
965
|
const t = /* @__PURE__ */ new Set();
|
|
963
966
|
return {
|
|
@@ -968,15 +971,15 @@ function Fe() {
|
|
|
968
971
|
...this.getUserAttributes(),
|
|
969
972
|
...n
|
|
970
973
|
};
|
|
971
|
-
|
|
972
|
-
name:
|
|
974
|
+
we({
|
|
975
|
+
name: Me,
|
|
973
976
|
value: JSON.stringify(o),
|
|
974
977
|
canTrack: e
|
|
975
978
|
}), t.forEach((r) => r(o));
|
|
976
979
|
},
|
|
977
980
|
getUserAttributes() {
|
|
978
981
|
return T() ? JSON.parse(ue({
|
|
979
|
-
name:
|
|
982
|
+
name: Me,
|
|
980
983
|
canTrack: e
|
|
981
984
|
}) || "{}") : {};
|
|
982
985
|
},
|
|
@@ -993,7 +996,7 @@ function Fe() {
|
|
|
993
996
|
};
|
|
994
997
|
}
|
|
995
998
|
let ve;
|
|
996
|
-
T() && R === "qwik" ? (window.__BUILDER_USER_ATTRIBUTES_SERVICE__ || (window.__BUILDER_USER_ATTRIBUTES_SERVICE__ =
|
|
999
|
+
T() && R === "qwik" ? (window.__BUILDER_USER_ATTRIBUTES_SERVICE__ || (window.__BUILDER_USER_ATTRIBUTES_SERVICE__ = je()), ve = window.__BUILDER_USER_ATTRIBUTES_SERVICE__) : ve = je();
|
|
997
1000
|
const ce = ve, Is = (e) => {
|
|
998
1001
|
ce.setUserAttributes(e);
|
|
999
1002
|
}, G = (e) => {
|
|
@@ -1023,10 +1026,10 @@ function Se(e, t = null, n = ".") {
|
|
|
1023
1026
|
};
|
|
1024
1027
|
}, {});
|
|
1025
1028
|
}
|
|
1026
|
-
function
|
|
1029
|
+
function yt(e, t, n = {}) {
|
|
1027
1030
|
for (const o in e) {
|
|
1028
1031
|
const r = e[o], i = t ? t + "." + o : o;
|
|
1029
|
-
r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ?
|
|
1032
|
+
r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ? yt(r, i, n) : n[i] = r;
|
|
1030
1033
|
}
|
|
1031
1034
|
return n;
|
|
1032
1035
|
}
|
|
@@ -1042,7 +1045,7 @@ function jn(e) {
|
|
|
1042
1045
|
}
|
|
1043
1046
|
return t;
|
|
1044
1047
|
}
|
|
1045
|
-
const Kn = "v3",
|
|
1048
|
+
const Kn = "v3", Ke = (e) => typeof e == "number" && !isNaN(e) && e >= 0, Ae = (e) => {
|
|
1046
1049
|
const {
|
|
1047
1050
|
limit: t = 30,
|
|
1048
1051
|
userAttributes: n,
|
|
@@ -1068,7 +1071,7 @@ const Kn = "v3", He = (e) => typeof e == "number" && !isNaN(e) && e >= 0, Re = (
|
|
|
1068
1071
|
const U = t !== 1, V = P || "https://cdn.builder.io", w = new URL(`${V}/api/${a}/content/${r}`);
|
|
1069
1072
|
w.searchParams.set("apiKey", i), w.searchParams.set("limit", String(t)), w.searchParams.set("noTraverse", String(U)), w.searchParams.set("includeRefs", String(!0)), l && w.searchParams.set("locale", l);
|
|
1070
1073
|
let D = n || {};
|
|
1071
|
-
if (s && w.searchParams.set("enrich", String(s)), w.searchParams.set("omit", p ?? "meta.componentsUsed"), u && w.searchParams.set("fields", u), Number.isFinite(f) && f > -1 && w.searchParams.set("offset", String(Math.floor(f))), typeof g == "boolean" && w.searchParams.set("includeUnpublished", String(g)), c &&
|
|
1074
|
+
if (s && w.searchParams.set("enrich", String(s)), w.searchParams.set("omit", p ?? "meta.componentsUsed"), u && w.searchParams.set("fields", u), Number.isFinite(f) && f > -1 && w.searchParams.set("offset", String(Math.floor(f))), typeof g == "boolean" && w.searchParams.set("includeUnpublished", String(g)), c && Ke(c) && w.searchParams.set("cacheSeconds", String(c)), m && Ke(m) && w.searchParams.set("staleCacheSeconds", String(m)), b) {
|
|
1072
1075
|
const O = Se({
|
|
1073
1076
|
sort: b
|
|
1074
1077
|
});
|
|
@@ -1077,7 +1080,7 @@ const Kn = "v3", He = (e) => typeof e == "number" && !isNaN(e) && e >= 0, Re = (
|
|
|
1077
1080
|
}
|
|
1078
1081
|
const J = {
|
|
1079
1082
|
...Bn(),
|
|
1080
|
-
...
|
|
1083
|
+
...Ze(e.options || {})
|
|
1081
1084
|
};
|
|
1082
1085
|
D = {
|
|
1083
1086
|
...D,
|
|
@@ -1087,7 +1090,7 @@ const Kn = "v3", He = (e) => typeof e == "number" && !isNaN(e) && e >= 0, Re = (
|
|
|
1087
1090
|
for (const O in Q)
|
|
1088
1091
|
w.searchParams.set(O, String(Q[O]));
|
|
1089
1092
|
if (Object.keys(D).length > 0 && w.searchParams.set("userAttributes", JSON.stringify(D)), o) {
|
|
1090
|
-
const O =
|
|
1093
|
+
const O = yt({
|
|
1091
1094
|
query: o
|
|
1092
1095
|
});
|
|
1093
1096
|
for (const H in O)
|
|
@@ -1109,7 +1112,7 @@ const Kn = "v3", He = (e) => typeof e == "number" && !isNaN(e) && e >= 0, Re = (
|
|
|
1109
1112
|
}
|
|
1110
1113
|
return {};
|
|
1111
1114
|
}, Gn = (e) => "results" in e;
|
|
1112
|
-
async function
|
|
1115
|
+
async function Pe(e) {
|
|
1113
1116
|
var o;
|
|
1114
1117
|
const t = e.locale || ((o = e.userAttributes) == null ? void 0 : o.locale);
|
|
1115
1118
|
t && (e.locale = t, e.userAttributes = {
|
|
@@ -1124,15 +1127,15 @@ async function Ee(e) {
|
|
|
1124
1127
|
}
|
|
1125
1128
|
const Jn = async (e) => {
|
|
1126
1129
|
var s;
|
|
1127
|
-
const t =
|
|
1130
|
+
const t = Ae(e), n = e.fetch ?? Mn, o = {
|
|
1128
1131
|
...e.fetchOptions,
|
|
1129
1132
|
headers: {
|
|
1130
1133
|
...(s = e.fetchOptions) == null ? void 0 : s.headers,
|
|
1131
|
-
...
|
|
1134
|
+
...nt()
|
|
1132
1135
|
}
|
|
1133
1136
|
};
|
|
1134
1137
|
return await (await n(t.href, o)).json();
|
|
1135
|
-
}, Qn = async (e, t, n =
|
|
1138
|
+
}, Qn = async (e, t, n = Ae(e)) => {
|
|
1136
1139
|
const o = G(e.canTrack);
|
|
1137
1140
|
if (n.search.includes("preview="), !o || !(T() || R === "reactNative"))
|
|
1138
1141
|
return t.results;
|
|
@@ -1150,7 +1153,7 @@ const Jn = async (e) => {
|
|
|
1150
1153
|
return t.results;
|
|
1151
1154
|
};
|
|
1152
1155
|
async function Yn(e) {
|
|
1153
|
-
const t =
|
|
1156
|
+
const t = Ae(e), n = await Jn(e);
|
|
1154
1157
|
if (!Gn(n))
|
|
1155
1158
|
throw B.error("Error fetching data. ", {
|
|
1156
1159
|
url: t,
|
|
@@ -1171,14 +1174,14 @@ const $s = async (e) => {
|
|
|
1171
1174
|
urlPath: t
|
|
1172
1175
|
} : {}
|
|
1173
1176
|
},
|
|
1174
|
-
options:
|
|
1177
|
+
options: ut(e.searchParams || ((i = e.url) == null ? void 0 : i.searchParams) || e.options)
|
|
1175
1178
|
};
|
|
1176
1179
|
return {
|
|
1177
1180
|
apiKey: n.apiKey,
|
|
1178
1181
|
model: n.model,
|
|
1179
|
-
content: await
|
|
1182
|
+
content: await Pe(n)
|
|
1180
1183
|
};
|
|
1181
|
-
},
|
|
1184
|
+
}, Be = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
1182
1185
|
function Xn(e, t, n = {}) {
|
|
1183
1186
|
let o, r, i, s = null, l = 0;
|
|
1184
1187
|
const a = function() {
|
|
@@ -1205,17 +1208,17 @@ function Zn(e) {
|
|
|
1205
1208
|
for (const t of e)
|
|
1206
1209
|
switch (t.trigger) {
|
|
1207
1210
|
case "pageLoad":
|
|
1208
|
-
|
|
1211
|
+
kt(t);
|
|
1209
1212
|
break;
|
|
1210
1213
|
case "scrollInView":
|
|
1211
1214
|
eo(t);
|
|
1212
1215
|
break;
|
|
1213
1216
|
}
|
|
1214
1217
|
}
|
|
1215
|
-
function
|
|
1218
|
+
function vt(e) {
|
|
1216
1219
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
1217
1220
|
}
|
|
1218
|
-
function
|
|
1221
|
+
function St(e, t) {
|
|
1219
1222
|
const n = _n(e), o = getComputedStyle(t), r = e.steps[0].styles, i = e.steps[e.steps.length - 1].styles, s = [r, i];
|
|
1220
1223
|
for (const l of s)
|
|
1221
1224
|
for (const a of n)
|
|
@@ -1228,15 +1231,15 @@ function _n(e) {
|
|
|
1228
1231
|
t.indexOf(o) === -1 && t.push(o);
|
|
1229
1232
|
return t;
|
|
1230
1233
|
}
|
|
1231
|
-
function
|
|
1234
|
+
function kt(e) {
|
|
1232
1235
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
1233
1236
|
if (!t.length) {
|
|
1234
|
-
|
|
1237
|
+
vt(e.elementId || e.id || "");
|
|
1235
1238
|
return;
|
|
1236
1239
|
}
|
|
1237
1240
|
Array.from(t).forEach((n) => {
|
|
1238
|
-
|
|
1239
|
-
n.style.transition = `all ${e.duration}s ${
|
|
1241
|
+
St(e, n), n.style.transition = "none", n.style.transitionDelay = "0", Z(n.style, e.steps[0].styles), setTimeout(() => {
|
|
1242
|
+
n.style.transition = `all ${e.duration}s ${Be(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), Z(n.style, e.steps[1].styles), setTimeout(() => {
|
|
1240
1243
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
1241
1244
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
1242
1245
|
});
|
|
@@ -1245,11 +1248,11 @@ function yt(e) {
|
|
|
1245
1248
|
function eo(e) {
|
|
1246
1249
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
1247
1250
|
if (!t.length) {
|
|
1248
|
-
|
|
1251
|
+
vt(e.elementId || e.id || "");
|
|
1249
1252
|
return;
|
|
1250
1253
|
}
|
|
1251
1254
|
Array.from(t).forEach((n) => {
|
|
1252
|
-
|
|
1255
|
+
St(e, n);
|
|
1253
1256
|
let o = !1, r = !1;
|
|
1254
1257
|
function i() {
|
|
1255
1258
|
!o && l(n) ? (o = !0, r = !0, setTimeout(() => {
|
|
@@ -1270,17 +1273,17 @@ function eo(e) {
|
|
|
1270
1273
|
Z(n.style, a);
|
|
1271
1274
|
}
|
|
1272
1275
|
u(), setTimeout(() => {
|
|
1273
|
-
n.style.transition = `all ${e.duration}s ${
|
|
1276
|
+
n.style.transition = `all ${e.duration}s ${Be(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
1274
1277
|
}), document.addEventListener("scroll", s, {
|
|
1275
1278
|
capture: !0,
|
|
1276
1279
|
passive: !0
|
|
1277
1280
|
}), i();
|
|
1278
1281
|
});
|
|
1279
1282
|
}
|
|
1280
|
-
const
|
|
1283
|
+
const Ct = (e) => Object.entries(e).map(([n, o]) => {
|
|
1281
1284
|
if (typeof o == "string")
|
|
1282
|
-
return `${
|
|
1283
|
-
}).filter(K), to = (e) =>
|
|
1285
|
+
return `${Be(n)}: ${o};`;
|
|
1286
|
+
}).filter(K), to = (e) => Ct(e).join(`
|
|
1284
1287
|
`), Rs = ({
|
|
1285
1288
|
mediaQuery: e,
|
|
1286
1289
|
className: t,
|
|
@@ -1301,18 +1304,18 @@ function no({
|
|
|
1301
1304
|
const Es = ({
|
|
1302
1305
|
block: e,
|
|
1303
1306
|
context: t
|
|
1304
|
-
}) =>
|
|
1307
|
+
}) => Tt(no({
|
|
1305
1308
|
style: e.style || {},
|
|
1306
1309
|
context: t,
|
|
1307
1310
|
block: e
|
|
1308
1311
|
}));
|
|
1309
|
-
function
|
|
1312
|
+
function Tt(e) {
|
|
1310
1313
|
switch (R) {
|
|
1311
1314
|
case "svelte":
|
|
1312
1315
|
case "vue":
|
|
1313
1316
|
case "solid":
|
|
1314
1317
|
case "angular":
|
|
1315
|
-
return
|
|
1318
|
+
return Ct(e).join(" ");
|
|
1316
1319
|
case "qwik":
|
|
1317
1320
|
case "reactNative":
|
|
1318
1321
|
case "react":
|
|
@@ -1320,7 +1323,7 @@ function St(e) {
|
|
|
1320
1323
|
return e;
|
|
1321
1324
|
}
|
|
1322
1325
|
}
|
|
1323
|
-
const
|
|
1326
|
+
const wt = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includes(t) : !1 : !0, oo = ({
|
|
1324
1327
|
block: e,
|
|
1325
1328
|
registeredComponents: t,
|
|
1326
1329
|
model: n
|
|
@@ -1330,7 +1333,7 @@ const kt = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
1330
1333
|
if (!o)
|
|
1331
1334
|
return null;
|
|
1332
1335
|
const r = t[o];
|
|
1333
|
-
if (!r ||
|
|
1336
|
+
if (!r || wt(r, n)) {
|
|
1334
1337
|
console.warn(`
|
|
1335
1338
|
Could not find a registered component named "${o}".
|
|
1336
1339
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
@@ -1378,7 +1381,7 @@ const kt = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
1378
1381
|
}, so = (e, t, n) => {
|
|
1379
1382
|
var o;
|
|
1380
1383
|
return (o = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && o.builderComponents ? {
|
|
1381
|
-
builderComponents: Object.fromEntries(Object.entries(t).filter(([i, s]) => !
|
|
1384
|
+
builderComponents: Object.fromEntries(Object.entries(t).filter(([i, s]) => !wt(s, n)))
|
|
1382
1385
|
} : {};
|
|
1383
1386
|
}, ao = (e, t) => {
|
|
1384
1387
|
var n;
|
|
@@ -1395,22 +1398,22 @@ const kt = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
1395
1398
|
"Error while attempting to dynamically import component DynamicDiv at ../dynamic-div.vue",
|
|
1396
1399
|
e
|
|
1397
1400
|
), e;
|
|
1398
|
-
}), po = () => import("./block-wrapper-
|
|
1401
|
+
}), po = () => import("./block-wrapper-tny9tjLX.js").then((e) => e.default).catch((e) => {
|
|
1399
1402
|
throw console.error(
|
|
1400
1403
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
1401
1404
|
e
|
|
1402
1405
|
), e;
|
|
1403
|
-
}), mo = () => import("./component-ref-
|
|
1406
|
+
}), mo = () => import("./component-ref-d2TAsp69.js").then((e) => e.default).catch((e) => {
|
|
1404
1407
|
throw console.error(
|
|
1405
1408
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
1406
1409
|
e
|
|
1407
1410
|
), e;
|
|
1408
|
-
}), ho = () => import("./repeated-block-
|
|
1411
|
+
}), ho = () => import("./repeated-block-Ga5ASejd.js").then((e) => e.default).catch((e) => {
|
|
1409
1412
|
throw console.error(
|
|
1410
1413
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
1411
1414
|
e
|
|
1412
1415
|
), e;
|
|
1413
|
-
}), fo = () => import("./style-wrapper-
|
|
1416
|
+
}), fo = () => import("./style-wrapper-dI5wRv59.js").then((e) => e.default).catch((e) => {
|
|
1414
1417
|
throw console.error(
|
|
1415
1418
|
"Error while attempting to dynamically import component StyleWrapper at ./components/style-wrapper.vue",
|
|
1416
1419
|
e
|
|
@@ -1576,9 +1579,9 @@ function go(e, t, n, o, r, i) {
|
|
|
1576
1579
|
], 64))
|
|
1577
1580
|
], 64)) : C("", !0);
|
|
1578
1581
|
}
|
|
1579
|
-
const
|
|
1582
|
+
const It = /* @__PURE__ */ v(bo, [["render", go]]), As = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1580
1583
|
__proto__: null,
|
|
1581
|
-
default:
|
|
1584
|
+
default: It
|
|
1582
1585
|
}, Symbol.toStringTag, { value: "Module" })), yo = y({
|
|
1583
1586
|
name: "builder-blocks-wrapper",
|
|
1584
1587
|
props: [
|
|
@@ -1668,7 +1671,7 @@ function vo(e, t, n, o, r, i) {
|
|
|
1668
1671
|
}
|
|
1669
1672
|
const So = /* @__PURE__ */ v(yo, [["render", vo], ["__scopeId", "data-v-82fc93d6"]]), ko = y({
|
|
1670
1673
|
name: "builder-blocks",
|
|
1671
|
-
components: { BlocksWrapper: So, Block:
|
|
1674
|
+
components: { BlocksWrapper: So, Block: It },
|
|
1672
1675
|
props: [
|
|
1673
1676
|
"blocks",
|
|
1674
1677
|
"parent",
|
|
@@ -1682,7 +1685,7 @@ const So = /* @__PURE__ */ v(yo, [["render", vo], ["__scopeId", "data-v-82fc93d6
|
|
|
1682
1685
|
],
|
|
1683
1686
|
inject: {
|
|
1684
1687
|
builderContext: ge.key,
|
|
1685
|
-
componentsContext:
|
|
1688
|
+
componentsContext: Ye.key
|
|
1686
1689
|
}
|
|
1687
1690
|
});
|
|
1688
1691
|
function Co(e, t, n, o, r, i) {
|
|
@@ -1727,7 +1730,7 @@ const te = /* @__PURE__ */ v(To, [["render", wo]]), Io = /* @__PURE__ */ Object.
|
|
|
1727
1730
|
default: te
|
|
1728
1731
|
}, Symbol.toStringTag, { value: "Module" })), pe = y({
|
|
1729
1732
|
render() {
|
|
1730
|
-
return
|
|
1733
|
+
return Qe("style", {
|
|
1731
1734
|
innerHTML: this.styles,
|
|
1732
1735
|
"data-id": this.id,
|
|
1733
1736
|
nonce: this.nonce
|
|
@@ -1735,7 +1738,7 @@ const te = /* @__PURE__ */ v(To, [["render", wo]]), Io = /* @__PURE__ */ Object.
|
|
|
1735
1738
|
},
|
|
1736
1739
|
name: "inlined-styles",
|
|
1737
1740
|
props: ["styles", "id", "nonce"]
|
|
1738
|
-
}),
|
|
1741
|
+
}), $t = {
|
|
1739
1742
|
xsmall: {
|
|
1740
1743
|
min: 0,
|
|
1741
1744
|
default: 160,
|
|
@@ -1756,8 +1759,8 @@ const te = /* @__PURE__ */ v(To, [["render", wo]]), Io = /* @__PURE__ */ Object.
|
|
|
1756
1759
|
default: 991,
|
|
1757
1760
|
max: 1200
|
|
1758
1761
|
}
|
|
1759
|
-
}, Ps = (e, t =
|
|
1760
|
-
const t =
|
|
1762
|
+
}, Ps = (e, t = $t) => `@media (max-width: ${t[e].max}px)`, $o = (e) => {
|
|
1763
|
+
const t = $e($t);
|
|
1761
1764
|
if (!e)
|
|
1762
1765
|
return t;
|
|
1763
1766
|
const {
|
|
@@ -1798,7 +1801,7 @@ const te = /* @__PURE__ */ v(To, [["render", wo]]), Io = /* @__PURE__ */ Object.
|
|
|
1798
1801
|
name: "builder-columns",
|
|
1799
1802
|
components: {
|
|
1800
1803
|
InlinedStyles: pe,
|
|
1801
|
-
DynamicRenderer:
|
|
1804
|
+
DynamicRenderer: Te,
|
|
1802
1805
|
Blocks: q,
|
|
1803
1806
|
DynamicDiv: te
|
|
1804
1807
|
},
|
|
@@ -1930,7 +1933,7 @@ const te = /* @__PURE__ */ v(To, [["render", wo]]), Io = /* @__PURE__ */ Object.
|
|
|
1930
1933
|
href: e.link
|
|
1931
1934
|
} : {},
|
|
1932
1935
|
[j()]: "builder-column",
|
|
1933
|
-
style:
|
|
1936
|
+
style: Tt(this.columnCssVars(t))
|
|
1934
1937
|
};
|
|
1935
1938
|
}
|
|
1936
1939
|
}
|
|
@@ -1981,7 +1984,7 @@ function Vo(e, t, n, o, r, i) {
|
|
|
1981
1984
|
]);
|
|
1982
1985
|
}
|
|
1983
1986
|
const No = /* @__PURE__ */ v(Bo, [["render", Vo]]);
|
|
1984
|
-
function
|
|
1987
|
+
function qe(e) {
|
|
1985
1988
|
return e.replace(/http(s)?:/, "");
|
|
1986
1989
|
}
|
|
1987
1990
|
function Wo(e = "", t, n) {
|
|
@@ -1992,11 +1995,11 @@ function Do(e, t) {
|
|
|
1992
1995
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1993
1996
|
return e;
|
|
1994
1997
|
if (t === "master")
|
|
1995
|
-
return
|
|
1998
|
+
return qe(e);
|
|
1996
1999
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1997
2000
|
if (n) {
|
|
1998
2001
|
const o = e.split(n[0]), r = n[3], i = t.match("x") ? t : `${t}x`;
|
|
1999
|
-
return
|
|
2002
|
+
return qe(`${o[0]}_${i}${r}`);
|
|
2000
2003
|
}
|
|
2001
2004
|
return null;
|
|
2002
2005
|
}
|
|
@@ -2351,9 +2354,9 @@ const zo = `function getPersonalizedVariant(variants, blockId, isHydrationTarget
|
|
|
2351
2354
|
visibilityStylesEl.innerHTML = newStyleStr;
|
|
2352
2355
|
}
|
|
2353
2356
|
}
|
|
2354
|
-
}`, re = "default", Qo = "filterWithCustomTargeting",
|
|
2357
|
+
}`, re = "default", Qo = "filterWithCustomTargeting", Rt = "builderIoPersonalization", Et = "updateVisibilityStylesScript", At = ["react", "vue", "svelte", "qwik"], Pt = ["vue", "svelte", "qwik"];
|
|
2355
2358
|
function Yo(e, t) {
|
|
2356
|
-
return !(e && e.length > 0) || !t ? !1 :
|
|
2359
|
+
return !(e && e.length > 0) || !t ? !1 : Pt.includes(R) ? !0 : !T();
|
|
2357
2360
|
}
|
|
2358
2361
|
function Xo({
|
|
2359
2362
|
variants: e,
|
|
@@ -2395,9 +2398,9 @@ function Xo({
|
|
|
2395
2398
|
}
|
|
2396
2399
|
const Zo = () => `
|
|
2397
2400
|
window.${Qo} = ${Go}
|
|
2398
|
-
window.${
|
|
2399
|
-
window.${
|
|
2400
|
-
`,
|
|
2401
|
+
window.${Rt} = ${zo}
|
|
2402
|
+
window.${Et} = ${Jo}
|
|
2403
|
+
`, Bt = R === "react", _o = (e, t, n) => `window.${Rt}(${JSON.stringify(e)}, "${t}", ${Bt}${n ? `, "${n}"` : ""})`, er = (e, t, n) => `window.${Et}(${JSON.stringify(e)}, "${t}", ${Bt}${n ? `, "${n}"` : ""})`, me = {
|
|
2401
2404
|
"@type": "@builder.io/sdk:Element",
|
|
2402
2405
|
layerName: "Accordion item title",
|
|
2403
2406
|
responsiveStyles: {
|
|
@@ -2911,7 +2914,7 @@ const sr = /* @__PURE__ */ v(or, [["render", ir]]), ar = {
|
|
|
2911
2914
|
hidden: !0,
|
|
2912
2915
|
canHaveChildren: !0,
|
|
2913
2916
|
noWrap: !0
|
|
2914
|
-
},
|
|
2917
|
+
}, Ve = ["jpeg", "jpg", "png", "svg", "webp", "gif", "jfif", "pjpeg", "pjp", "apng", "avif", "tif", "tiff", "heif", "bmp", "eps", "raw", "cr2", "nef", "orf", "sr2", "psd", "heic", "dib", "ai"], dr = ["mp4", "webm", "mkv", "flv", "vob", "ogv", "ogg", "drc", "gif", "gifv", "mng", "avi", "mov", "qt", "mts", "m2ts", "ts", "wmv", "yuv", "rm", "rmvb", "viv", "asf", "amv", "m4p", "mpeg", "mpe", "m2v", "m4v", "svi", "3gp", "3g2", "mxf", "roq", "nsv", "f4v", "f4p", "f4a", "f4b"], ur = {
|
|
2915
2918
|
name: "Image",
|
|
2916
2919
|
static: !0,
|
|
2917
2920
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -2926,7 +2929,7 @@ const sr = /* @__PURE__ */ v(or, [["render", ir]]), ar = {
|
|
|
2926
2929
|
name: "image",
|
|
2927
2930
|
type: "file",
|
|
2928
2931
|
bubble: !0,
|
|
2929
|
-
allowedFileTypes:
|
|
2932
|
+
allowedFileTypes: Ve,
|
|
2930
2933
|
required: !0,
|
|
2931
2934
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
2932
2935
|
onChange: (e) => {
|
|
@@ -3059,9 +3062,9 @@ const sr = /* @__PURE__ */ v(or, [["render", ir]]), ar = {
|
|
|
3059
3062
|
defaultValue: []
|
|
3060
3063
|
}]
|
|
3061
3064
|
}]
|
|
3062
|
-
},
|
|
3065
|
+
}, Ne = y({
|
|
3063
3066
|
render() {
|
|
3064
|
-
return
|
|
3067
|
+
return Qe("script", {
|
|
3065
3068
|
innerHTML: this.scriptStr,
|
|
3066
3069
|
"data-id": this.id,
|
|
3067
3070
|
nonce: this.nonce
|
|
@@ -3074,7 +3077,7 @@ const sr = /* @__PURE__ */ v(or, [["render", ir]]), ar = {
|
|
|
3074
3077
|
components: {
|
|
3075
3078
|
Blocks: q,
|
|
3076
3079
|
InlinedStyles: pe,
|
|
3077
|
-
InlinedScript:
|
|
3080
|
+
InlinedScript: Ne
|
|
3078
3081
|
},
|
|
3079
3082
|
props: [
|
|
3080
3083
|
"builderContext",
|
|
@@ -3106,7 +3109,7 @@ const sr = /* @__PURE__ */ v(or, [["render", ir]]), ar = {
|
|
|
3106
3109
|
shouldResetVariants: !1,
|
|
3107
3110
|
TARGET: R,
|
|
3108
3111
|
DEFAULT_INDEX: re,
|
|
3109
|
-
SDKS_REQUIRING_RESET_APPROACH:
|
|
3112
|
+
SDKS_REQUIRING_RESET_APPROACH: Pt
|
|
3110
3113
|
};
|
|
3111
3114
|
},
|
|
3112
3115
|
mounted() {
|
|
@@ -3120,7 +3123,7 @@ const sr = /* @__PURE__ */ v(or, [["render", ir]]), ar = {
|
|
|
3120
3123
|
fireImmediately: R === "qwik"
|
|
3121
3124
|
}
|
|
3122
3125
|
);
|
|
3123
|
-
if (!(A() ||
|
|
3126
|
+
if (!(A() || Re())) {
|
|
3124
3127
|
const n = this.filteredVariants[0];
|
|
3125
3128
|
this.$refs.rootRef && (this.$refs.rootRef.dispatchEvent(
|
|
3126
3129
|
new CustomEvent("builder.variantLoaded", {
|
|
@@ -3239,12 +3242,12 @@ function hr(e, t, n, o, r, i) {
|
|
|
3239
3242
|
registeredComponents: e.builderComponents
|
|
3240
3243
|
}, {
|
|
3241
3244
|
default: x(() => {
|
|
3242
|
-
var
|
|
3245
|
+
var De, Oe;
|
|
3243
3246
|
return [
|
|
3244
3247
|
E(a, {
|
|
3245
|
-
nonce: ((
|
|
3248
|
+
nonce: ((De = e.builderContext) == null ? void 0 : De.nonce) || "",
|
|
3246
3249
|
scriptStr: e.scriptStr,
|
|
3247
|
-
id: `variants-script-${(
|
|
3250
|
+
id: `variants-script-${(Oe = e.builderBlock) == null ? void 0 : Oe.id}-${D}`
|
|
3248
3251
|
}, null, 8, ["nonce", "scriptStr", "id"])
|
|
3249
3252
|
];
|
|
3250
3253
|
}),
|
|
@@ -4128,7 +4131,7 @@ const Kr = /* @__PURE__ */ v(Hr, [["render", jr]]), qr = {
|
|
|
4128
4131
|
else {
|
|
4129
4132
|
const c = {};
|
|
4130
4133
|
Array.from(l).forEach(({ value: m, key: b }) => {
|
|
4131
|
-
|
|
4134
|
+
dt(c, b, m);
|
|
4132
4135
|
}), i = JSON.stringify(c);
|
|
4133
4136
|
}
|
|
4134
4137
|
a && a !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (r["content-type"] = a));
|
|
@@ -4149,7 +4152,7 @@ const Kr = /* @__PURE__ */ v(Hr, [["render", jr]]), qr = {
|
|
|
4149
4152
|
const p = `${Gr() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
|
|
4150
4153
|
this.sendSubmissionsToEmail || ""
|
|
4151
4154
|
)}&name=${encodeURIComponent(this.name || "")}`, f = this.sendSubmissionsTo === "email" ? p : this.action;
|
|
4152
|
-
|
|
4155
|
+
Ie(f), fetch(f, {
|
|
4153
4156
|
body: i,
|
|
4154
4157
|
headers: r,
|
|
4155
4158
|
method: this.method || "post"
|
|
@@ -4170,7 +4173,7 @@ const Kr = /* @__PURE__ */ v(Hr, [["render", jr]]), qr = {
|
|
|
4170
4173
|
), U.defaultPrevented))
|
|
4171
4174
|
return;
|
|
4172
4175
|
this.responseData = m, this.formState = "error";
|
|
4173
|
-
let V = this.errorMessagePath ?
|
|
4176
|
+
let V = this.errorMessagePath ? Xe(m, this.errorMessagePath) : m.message || m.error || m;
|
|
4174
4177
|
typeof V != "string" && (V = JSON.stringify(V)), this.formErrorMessage = V, this.mergeNewRootState({
|
|
4175
4178
|
formErrorMessage: V
|
|
4176
4179
|
});
|
|
@@ -4490,7 +4493,7 @@ const yi = /* @__PURE__ */ v(fi, [["render", gi]]), vi = {
|
|
|
4490
4493
|
name: "image",
|
|
4491
4494
|
bubble: !0,
|
|
4492
4495
|
type: "file",
|
|
4493
|
-
allowedFileTypes:
|
|
4496
|
+
allowedFileTypes: Ve,
|
|
4494
4497
|
required: !0
|
|
4495
4498
|
}, {
|
|
4496
4499
|
name: "backgroundSize",
|
|
@@ -4591,7 +4594,7 @@ const Ti = /* @__PURE__ */ v(Si, [["render", Ci]]), wi = {
|
|
|
4591
4594
|
}, {
|
|
4592
4595
|
name: "posterImage",
|
|
4593
4596
|
type: "file",
|
|
4594
|
-
allowedFileTypes:
|
|
4597
|
+
allowedFileTypes: Ve,
|
|
4595
4598
|
helperText: "Image to show before the video plays"
|
|
4596
4599
|
}, {
|
|
4597
4600
|
name: "autoPlay",
|
|
@@ -4828,7 +4831,7 @@ const Bi = /* @__PURE__ */ v(Ii, [["render", Pi]]), Vi = () => [{
|
|
|
4828
4831
|
}, {
|
|
4829
4832
|
component: Bi,
|
|
4830
4833
|
...wi
|
|
4831
|
-
}],
|
|
4834
|
+
}], ze = () => [{
|
|
4832
4835
|
component: Ft,
|
|
4833
4836
|
...ar
|
|
4834
4837
|
}, {
|
|
@@ -4852,7 +4855,7 @@ const Bi = /* @__PURE__ */ v(Ii, [["render", Pi]]), Vi = () => [{
|
|
|
4852
4855
|
}, {
|
|
4853
4856
|
component: Vr,
|
|
4854
4857
|
...Er
|
|
4855
|
-
},
|
|
4858
|
+
}, ...At.includes(R) ? [{
|
|
4856
4859
|
component: fr,
|
|
4857
4860
|
...pr
|
|
4858
4861
|
}] : [], {
|
|
@@ -4954,26 +4957,34 @@ const Bi = /* @__PURE__ */ v(Ii, [["render", Pi]]), Vi = () => [{
|
|
|
4954
4957
|
thisScriptEl?.remove();
|
|
4955
4958
|
}
|
|
4956
4959
|
return;
|
|
4957
|
-
}`,
|
|
4960
|
+
}`, ke = "builderIoAbTest", Ce = "builderIoRenderContent", ie = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
4958
4961
|
...t,
|
|
4959
4962
|
testVariationId: t.id,
|
|
4960
4963
|
id: e == null ? void 0 : e.id
|
|
4961
4964
|
})), Di = ({
|
|
4962
4965
|
canTrack: e,
|
|
4963
4966
|
content: t
|
|
4964
|
-
}) => !(!(ie(t).length > 0) || !e), Oi = (e) => e === "react" || e === "reactNative", xi = R === "angular",
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
+
}) => !(!(ie(t).length > 0) || !e), Oi = (e) => e === "react" || e === "reactNative", xi = R === "angular", We = Oi(R), Ui = () => `
|
|
4968
|
+
(function() {
|
|
4969
|
+
if (!window.${ke}) {
|
|
4970
|
+
window.${ke} = ${Ni};
|
|
4971
|
+
}
|
|
4972
|
+
if (!window.${Ce}) {
|
|
4973
|
+
window.${Ce} = ${Wi};
|
|
4974
|
+
}${We ? `
|
|
4975
|
+
var thisScriptEl = document.currentScript;
|
|
4976
|
+
if (thisScriptEl) { thisScriptEl.remove(); }` : ""}
|
|
4977
|
+
})();
|
|
4967
4978
|
`, Li = (e, t) => `
|
|
4968
|
-
window.${
|
|
4969
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
4979
|
+
window.${ke}(
|
|
4980
|
+
"${t}",${JSON.stringify(e)}, ${We}, ${xi}
|
|
4970
4981
|
)`, Fi = ({
|
|
4971
4982
|
contentId: e,
|
|
4972
4983
|
variationId: t
|
|
4973
|
-
}) => `window.${
|
|
4974
|
-
"${t}", "${e}", ${
|
|
4984
|
+
}) => `window.${Ce}(
|
|
4985
|
+
"${t}", "${e}", ${We}
|
|
4975
4986
|
)`;
|
|
4976
|
-
function
|
|
4987
|
+
function Ge(e) {
|
|
4977
4988
|
return Math.round(e * 1e3) / 1e3;
|
|
4978
4989
|
}
|
|
4979
4990
|
const Hi = (e, t, n = !0) => {
|
|
@@ -4990,11 +5001,11 @@ const Hi = (e, t, n = !0) => {
|
|
|
4990
5001
|
}, Mi = (e) => Hi(e, (t) => {
|
|
4991
5002
|
const n = t.getAttribute("builder-id") || t.id;
|
|
4992
5003
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
4993
|
-
}),
|
|
5004
|
+
}), Je = ({
|
|
4994
5005
|
event: e,
|
|
4995
5006
|
target: t
|
|
4996
5007
|
}) => {
|
|
4997
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, i =
|
|
5008
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, i = Ge(o / n.width), s = Ge(r / n.height);
|
|
4998
5009
|
return {
|
|
4999
5010
|
x: i,
|
|
5000
5011
|
y: s
|
|
@@ -5004,18 +5015,18 @@ const Hi = (e, t, n = !0) => {
|
|
|
5004
5015
|
return {
|
|
5005
5016
|
targetBuilderElement: o || void 0,
|
|
5006
5017
|
metadata: {
|
|
5007
|
-
targetOffset: t ?
|
|
5018
|
+
targetOffset: t ? Je({
|
|
5008
5019
|
event: e,
|
|
5009
5020
|
target: t
|
|
5010
5021
|
}) : void 0,
|
|
5011
|
-
builderTargetOffset: n ?
|
|
5022
|
+
builderTargetOffset: n ? Je({
|
|
5012
5023
|
event: e,
|
|
5013
5024
|
target: n
|
|
5014
5025
|
}) : void 0,
|
|
5015
5026
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
5016
5027
|
}
|
|
5017
5028
|
};
|
|
5018
|
-
}, Ki = ["svelte", "qwik", "vue"], qi = () => Ki.includes(R) && (A() ||
|
|
5029
|
+
}, Ki = ["svelte", "qwik", "vue"], qi = () => Ki.includes(R) && (A() || Re()), zi = (e) => {
|
|
5019
5030
|
var i;
|
|
5020
5031
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((i = e == null ? void 0 : e.files) == null ? void 0 : i.regular);
|
|
5021
5032
|
let r = "";
|
|
@@ -5131,7 +5142,7 @@ font-weight: ${s};
|
|
|
5131
5142
|
variationId: r !== s ? r : void 0
|
|
5132
5143
|
});
|
|
5133
5144
|
}
|
|
5134
|
-
|
|
5145
|
+
Re() && !A() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
5135
5146
|
new CustomEvent("initpreviewingbldr")
|
|
5136
5147
|
);
|
|
5137
5148
|
}
|
|
@@ -5233,7 +5244,7 @@ font-weight: ${s};
|
|
|
5233
5244
|
this.builderContextSignal.content = n;
|
|
5234
5245
|
},
|
|
5235
5246
|
processMessage(e) {
|
|
5236
|
-
return
|
|
5247
|
+
return ht({
|
|
5237
5248
|
model: this.model,
|
|
5238
5249
|
trustedHosts: this.trustedHosts,
|
|
5239
5250
|
callbacks: {
|
|
@@ -5247,7 +5258,7 @@ font-weight: ${s};
|
|
|
5247
5258
|
});
|
|
5248
5259
|
},
|
|
5249
5260
|
animation: (t) => {
|
|
5250
|
-
|
|
5261
|
+
kt(t);
|
|
5251
5262
|
},
|
|
5252
5263
|
contentUpdate: (t, n) => {
|
|
5253
5264
|
this.mergeNewContent(t, n);
|
|
@@ -5307,7 +5318,7 @@ font-weight: ${s};
|
|
|
5307
5318
|
url: l,
|
|
5308
5319
|
method: "GET"
|
|
5309
5320
|
};
|
|
5310
|
-
|
|
5321
|
+
Ie(JSON.stringify(a));
|
|
5311
5322
|
const u = {
|
|
5312
5323
|
method: a.method,
|
|
5313
5324
|
headers: a.headers,
|
|
@@ -5335,7 +5346,7 @@ font-weight: ${s};
|
|
|
5335
5346
|
"builder:component:stateChange",
|
|
5336
5347
|
{
|
|
5337
5348
|
detail: {
|
|
5338
|
-
state:
|
|
5349
|
+
state: $e(this.builderContextSignal.rootState),
|
|
5339
5350
|
ref: {
|
|
5340
5351
|
name: this.model
|
|
5341
5352
|
}
|
|
@@ -5345,7 +5356,7 @@ font-weight: ${s};
|
|
|
5345
5356
|
);
|
|
5346
5357
|
},
|
|
5347
5358
|
elementRef_onIniteditingbldr(e) {
|
|
5348
|
-
window.addEventListener("message", this.processMessage),
|
|
5359
|
+
window.addEventListener("message", this.processMessage), mt({
|
|
5349
5360
|
...this.locale ? {
|
|
5350
5361
|
locale: this.locale
|
|
5351
5362
|
} : {},
|
|
@@ -5375,7 +5386,7 @@ font-weight: ${s};
|
|
|
5375
5386
|
const t = new URL(location.href).searchParams, n = t.get("builder.preview"), o = t.get(
|
|
5376
5387
|
`builder.overrides.${n}`
|
|
5377
5388
|
), r = t.get("apiKey") || t.get("builder.space");
|
|
5378
|
-
(n === "BUILDER_STUDIO" || n === this.model && r === this.apiKey && (!this.content || o === this.content.id)) &&
|
|
5389
|
+
(n === "BUILDER_STUDIO" || n === this.model && r === this.apiKey && (!this.content || o === this.content.id)) && Pe({
|
|
5379
5390
|
model: this.model,
|
|
5380
5391
|
apiKey: this.apiKey,
|
|
5381
5392
|
apiVersion: this.builderContextSignal.apiVersion,
|
|
@@ -5469,7 +5480,7 @@ const os = /* @__PURE__ */ v(ts, [["render", ns]]), rs = ({
|
|
|
5469
5480
|
name: "content-component",
|
|
5470
5481
|
components: {
|
|
5471
5482
|
EnableEditor: es,
|
|
5472
|
-
InlinedScript:
|
|
5483
|
+
InlinedScript: Ne,
|
|
5473
5484
|
ContentStyles: os,
|
|
5474
5485
|
Blocks: q,
|
|
5475
5486
|
DynamicDiv: te
|
|
@@ -5507,7 +5518,7 @@ const os = /* @__PURE__ */ v(ts, [["render", ns]]), rs = ({
|
|
|
5507
5518
|
contentId: (t = this.content) == null ? void 0 : t.id
|
|
5508
5519
|
}),
|
|
5509
5520
|
registeredComponents: [
|
|
5510
|
-
...
|
|
5521
|
+
...ze(),
|
|
5511
5522
|
...this.customComponents || []
|
|
5512
5523
|
].reduce(
|
|
5513
5524
|
(n, { component: o, ...r }) => ({
|
|
@@ -5536,7 +5547,7 @@ const os = /* @__PURE__ */ v(ts, [["render", ns]]), rs = ({
|
|
|
5536
5547
|
apiKey: this.apiKey,
|
|
5537
5548
|
apiVersion: this.apiVersion,
|
|
5538
5549
|
componentInfos: [
|
|
5539
|
-
...
|
|
5550
|
+
...ze(),
|
|
5540
5551
|
...this.customComponents || []
|
|
5541
5552
|
].reduce(
|
|
5542
5553
|
(n, { component: o, ...r }) => ({
|
|
@@ -5557,7 +5568,7 @@ const os = /* @__PURE__ */ v(ts, [["render", ns]]), rs = ({
|
|
|
5557
5568
|
provide() {
|
|
5558
5569
|
const e = this;
|
|
5559
5570
|
return {
|
|
5560
|
-
[
|
|
5571
|
+
[Ye.key]: {
|
|
5561
5572
|
registeredComponents: e.registeredComponents
|
|
5562
5573
|
}
|
|
5563
5574
|
};
|
|
@@ -5652,7 +5663,7 @@ function ls(e, t, n, o, r, i) {
|
|
|
5652
5663
|
const cs = /* @__PURE__ */ v(as, [["render", ls]]), ds = y({
|
|
5653
5664
|
name: "content-variants",
|
|
5654
5665
|
components: {
|
|
5655
|
-
InlinedScript:
|
|
5666
|
+
InlinedScript: Ne,
|
|
5656
5667
|
InlinedStyles: pe,
|
|
5657
5668
|
ContentComponent: cs
|
|
5658
5669
|
},
|
|
@@ -5683,7 +5694,7 @@ const cs = /* @__PURE__ */ v(as, [["render", ls]]), ds = y({
|
|
|
5683
5694
|
canTrack: G(this.canTrack),
|
|
5684
5695
|
content: this.content
|
|
5685
5696
|
}),
|
|
5686
|
-
SDKS_SUPPORTING_PERSONALIZATION:
|
|
5697
|
+
SDKS_SUPPORTING_PERSONALIZATION: At,
|
|
5687
5698
|
getInitPersonalizationVariantsFnsScriptString: Zo,
|
|
5688
5699
|
TARGET: R,
|
|
5689
5700
|
getInitVariantsFnsScriptString: Ui,
|
|
@@ -5722,11 +5733,6 @@ function us(e, t, n, o, r, i) {
|
|
|
5722
5733
|
const s = k("InlinedScript"), l = k("InlinedStyles"), a = k("ContentComponent");
|
|
5723
5734
|
return d(), h(I, null, [
|
|
5724
5735
|
!e.isNestedRender && e.TARGET !== "reactNative" ? (d(), h(I, { key: 0 }, [
|
|
5725
|
-
E(s, {
|
|
5726
|
-
id: "builderio-init-variants-fns",
|
|
5727
|
-
scriptStr: e.getInitVariantsFnsScriptString(),
|
|
5728
|
-
nonce: e.nonce || ""
|
|
5729
|
-
}, null, 8, ["scriptStr", "nonce"]),
|
|
5730
5736
|
e.SDKS_SUPPORTING_PERSONALIZATION.includes(e.TARGET) ? (d(), S(s, {
|
|
5731
5737
|
key: 0,
|
|
5732
5738
|
id: "builderio-init-personalization-variants-fns",
|
|
@@ -5735,6 +5741,11 @@ function us(e, t, n, o, r, i) {
|
|
|
5735
5741
|
}, null, 8, ["nonce", "scriptStr"])) : C("", !0)
|
|
5736
5742
|
], 64)) : C("", !0),
|
|
5737
5743
|
e.shouldRenderVariants ? (d(), h(I, { key: 1 }, [
|
|
5744
|
+
E(s, {
|
|
5745
|
+
id: "builderio-init-variants-fns",
|
|
5746
|
+
scriptStr: e.getInitVariantsFnsScriptString(),
|
|
5747
|
+
nonce: e.nonce || ""
|
|
5748
|
+
}, null, 8, ["scriptStr", "nonce"]),
|
|
5738
5749
|
E(l, {
|
|
5739
5750
|
id: "builderio-variants",
|
|
5740
5751
|
styles: e.hideVariantsStyleString,
|
|
@@ -5803,7 +5814,7 @@ const ps = /* @__PURE__ */ v(ds, [["render", us]]), ms = async ({
|
|
|
5803
5814
|
}) => {
|
|
5804
5815
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
5805
5816
|
(e != null && e.apiKey))
|
|
5806
|
-
return
|
|
5817
|
+
return Pe({
|
|
5807
5818
|
model: t.model,
|
|
5808
5819
|
apiKey: t.global && t.ownerId ? t.ownerId : e.apiKey,
|
|
5809
5820
|
apiVersion: e.apiVersion,
|
|
@@ -5915,13 +5926,13 @@ function fs(e, t, n, o, r, i) {
|
|
|
5915
5926
|
const bs = /* @__PURE__ */ v(hs, [["render", fs]]);
|
|
5916
5927
|
export {
|
|
5917
5928
|
ws as A,
|
|
5918
|
-
|
|
5929
|
+
It as B,
|
|
5919
5930
|
Po as C,
|
|
5920
5931
|
$s as D,
|
|
5921
5932
|
Qn as E,
|
|
5922
5933
|
No as F,
|
|
5923
5934
|
Yn as G,
|
|
5924
|
-
|
|
5935
|
+
Pe as H,
|
|
5925
5936
|
Ho as I,
|
|
5926
5937
|
vs as J,
|
|
5927
5938
|
As as K,
|
|
@@ -5939,20 +5950,20 @@ export {
|
|
|
5939
5950
|
Rs as h,
|
|
5940
5951
|
A as i,
|
|
5941
5952
|
Ps as j,
|
|
5942
|
-
|
|
5953
|
+
Be as k,
|
|
5943
5954
|
Rn as l,
|
|
5944
5955
|
Ft as m,
|
|
5945
5956
|
bs as n,
|
|
5946
5957
|
Vr as o,
|
|
5947
5958
|
q as p,
|
|
5948
5959
|
ps as q,
|
|
5949
|
-
|
|
5960
|
+
Re as r,
|
|
5950
5961
|
Is as s,
|
|
5951
5962
|
En as t,
|
|
5952
5963
|
ks as u,
|
|
5953
5964
|
Cs as v,
|
|
5954
5965
|
ss as w,
|
|
5955
5966
|
Ts as x,
|
|
5956
|
-
|
|
5967
|
+
ut as y,
|
|
5957
5968
|
Ss as z
|
|
5958
5969
|
};
|