@builder.io/sdk-vue 2.0.8 → 2.0.14-1
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/block-styles-nWGppwAf.js +77 -0
- package/lib/browser/block-styles-rt4v7rBl.cjs +1 -0
- package/lib/browser/{block-wrapper-H_K5XgNp.js → block-wrapper-hPYvxseU.js} +3 -3
- package/lib/browser/{block-wrapper-vI9rE_qz.cjs → block-wrapper-l_mdj42t.cjs} +1 -1
- package/lib/browser/blocks/accordion/accordion.vue.d.ts +6 -6
- package/lib/browser/blocks/button/button.vue.d.ts +3 -3
- package/lib/browser/blocks/columns/columns.vue.d.ts +9 -9
- package/lib/browser/blocks/form/form/form.vue.d.ts +9 -9
- package/lib/browser/blocks/form/input/input.vue.d.ts +3 -3
- package/lib/browser/blocks/form/select/select.vue.d.ts +3 -3
- package/lib/browser/blocks/image/image.vue.d.ts +3 -3
- package/lib/browser/blocks/img/img.vue.d.ts +3 -3
- package/lib/browser/blocks/section/section.vue.d.ts +3 -3
- package/lib/browser/blocks/slot/slot.vue.d.ts +5 -2
- package/lib/browser/blocks/symbol/symbol.vue.d.ts +9 -9
- package/lib/browser/blocks/tabs/tabs.vue.d.ts +3 -3
- package/lib/browser/blocks/video/video.vue.d.ts +6 -6
- package/lib/browser/{component-ref-ULmI7Z-4.js → component-ref-JlpkOrad.js} +2 -2
- package/lib/browser/{component-ref-k4s0KRD5.cjs → component-ref-dPnPtrON.cjs} +1 -1
- package/lib/browser/components/block/block.helpers.d.ts +1 -2
- package/lib/browser/components/block/block.vue.d.ts +10 -5
- package/lib/browser/components/block/components/block-styles.vue.d.ts +1 -1
- package/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +6 -6
- package/lib/browser/components/block/components/repeated-block.vue.d.ts +3 -3
- package/lib/browser/components/blocks/blocks.vue.d.ts +3 -3
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +12 -12
- package/lib/browser/components/content/content.vue.d.ts +18 -18
- package/lib/browser/components/content-variants/content-variants.vue.d.ts +12 -12
- package/lib/browser/components/inlined-styles.vue.d.ts +3 -3
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/functions/evaluate/node-runtime/init.d.ts +1 -0
- package/lib/browser/functions/get-processed-block.d.ts +1 -0
- package/lib/browser/functions/register-component.d.ts +1 -1
- package/lib/{node/get-block-properties-ctA1IgxF.js → browser/get-block-properties-HzVZCpxa.js} +20 -18
- package/lib/browser/get-block-properties-sInACBRh.cjs +1 -0
- package/lib/browser/index-MDNnQzZB.cjs +166 -0
- package/lib/browser/{index-wQ1FWMHJ.js → index-ZL8QUFiN.js} +1416 -1371
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +3 -3
- package/lib/browser/init.cjs +8 -0
- package/lib/browser/init.mjs +65 -0
- package/lib/browser/logger-0-1mARBa.cjs +1 -0
- package/lib/browser/logger-Hm2e1Xk_.js +12 -0
- package/lib/browser/{repeated-block-Aa1yIQkp.js → repeated-block-8EN4xN25.js} +2 -2
- package/lib/browser/{repeated-block-UKWYkgKG.cjs → repeated-block-uV-zuqkw.cjs} +1 -1
- package/lib/browser/style.css +1 -1
- package/lib/edge/block-styles-Ta3OQAmE.cjs +1 -0
- package/lib/edge/block-styles-zRPUnWLf.js +76 -0
- package/lib/{node/block-wrapper-QqrLFWp0.cjs → edge/block-wrapper-9IWz2vxg.cjs} +1 -1
- package/lib/{node/block-wrapper-4h3CaVrk.js → edge/block-wrapper-x7ERONr-.js} +5 -5
- package/lib/edge/blocks/accordion/accordion.vue.d.ts +6 -6
- package/lib/edge/blocks/button/button.vue.d.ts +3 -3
- package/lib/edge/blocks/columns/columns.vue.d.ts +9 -9
- package/lib/edge/blocks/form/form/form.vue.d.ts +9 -9
- package/lib/edge/blocks/form/input/input.vue.d.ts +3 -3
- package/lib/edge/blocks/form/select/select.vue.d.ts +3 -3
- package/lib/edge/blocks/image/image.vue.d.ts +3 -3
- package/lib/edge/blocks/img/img.vue.d.ts +3 -3
- package/lib/edge/blocks/section/section.vue.d.ts +3 -3
- package/lib/edge/blocks/slot/slot.vue.d.ts +5 -2
- package/lib/edge/blocks/symbol/symbol.vue.d.ts +9 -9
- package/lib/edge/blocks/tabs/tabs.vue.d.ts +3 -3
- package/lib/edge/blocks/video/video.vue.d.ts +6 -6
- package/lib/{node/component-ref-hI62zIZA.js → edge/component-ref-JRfa9Vwo.js} +2 -2
- package/lib/{node/component-ref-NW-UB2pJ.cjs → edge/component-ref-eV0RBAzs.cjs} +1 -1
- package/lib/edge/components/block/block.helpers.d.ts +1 -2
- package/lib/edge/components/block/block.vue.d.ts +10 -5
- package/lib/edge/components/block/components/block-styles.vue.d.ts +1 -1
- package/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +6 -6
- package/lib/edge/components/block/components/repeated-block.vue.d.ts +3 -3
- package/lib/edge/components/blocks/blocks.vue.d.ts +3 -3
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +12 -12
- package/lib/edge/components/content/content.vue.d.ts +18 -18
- package/lib/edge/components/content-variants/content-variants.vue.d.ts +12 -12
- package/lib/edge/components/inlined-styles.vue.d.ts +3 -3
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/functions/evaluate/node-runtime/init.d.ts +1 -0
- package/lib/edge/functions/get-processed-block.d.ts +1 -0
- package/lib/edge/functions/register-component.d.ts +1 -1
- package/lib/edge/get-block-properties-Dy3XF05J.cjs +1 -0
- package/lib/{browser/get-block-properties-IjhCV9z_.js → edge/get-block-properties-PLBPSz3W.js} +15 -15
- package/lib/edge/index-5-C3UhJz.cjs +186 -0
- package/lib/edge/{index-yARC0VI1.js → index-TGe9_80q.js} +1696 -1651
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +4 -4
- package/lib/edge/init.cjs +8 -0
- package/lib/edge/init.mjs +64 -0
- package/lib/edge/logger-I8FmJD_1.js +11 -0
- package/lib/edge/logger-U9-0vDJK.cjs +1 -0
- package/lib/edge/{repeated-block-q6gyu9cH.cjs → repeated-block-FB2jF4o_.cjs} +1 -1
- package/lib/edge/{repeated-block-IdOOvFG5.js → repeated-block-_9Gs2AOY.js} +13 -13
- package/lib/edge/style.css +1 -1
- package/lib/node/block-styles-gLB-jSXN.js +76 -0
- package/lib/node/block-styles-u7KGnyuc.cjs +1 -0
- package/lib/{edge/block-wrapper-P5w2jQ_u.cjs → node/block-wrapper-cCYzfiv5.cjs} +1 -1
- package/lib/{edge/block-wrapper-M3goYBkP.js → node/block-wrapper-frfIIST_.js} +3 -3
- package/lib/node/blocks/accordion/accordion.vue.d.ts +6 -6
- package/lib/node/blocks/button/button.vue.d.ts +3 -3
- package/lib/node/blocks/columns/columns.vue.d.ts +9 -9
- package/lib/node/blocks/form/form/form.vue.d.ts +9 -9
- package/lib/node/blocks/form/input/input.vue.d.ts +3 -3
- package/lib/node/blocks/form/select/select.vue.d.ts +3 -3
- package/lib/node/blocks/image/image.vue.d.ts +3 -3
- package/lib/node/blocks/img/img.vue.d.ts +3 -3
- package/lib/node/blocks/section/section.vue.d.ts +3 -3
- package/lib/node/blocks/slot/slot.vue.d.ts +5 -2
- package/lib/node/blocks/symbol/symbol.vue.d.ts +9 -9
- package/lib/node/blocks/tabs/tabs.vue.d.ts +3 -3
- package/lib/node/blocks/video/video.vue.d.ts +6 -6
- package/lib/{edge/component-ref-ZtKc8UMX.js → node/component-ref-IbarjSnq.js} +2 -2
- package/lib/{edge/component-ref-EPsyn_2c.cjs → node/component-ref-ZlBAzimq.cjs} +1 -1
- package/lib/node/components/block/block.helpers.d.ts +1 -2
- package/lib/node/components/block/block.vue.d.ts +10 -5
- package/lib/node/components/block/components/block-styles.vue.d.ts +1 -1
- package/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +6 -6
- package/lib/node/components/block/components/repeated-block.vue.d.ts +3 -3
- package/lib/node/components/blocks/blocks.vue.d.ts +3 -3
- package/lib/node/components/content/components/enable-editor.vue.d.ts +12 -12
- package/lib/node/components/content/content.vue.d.ts +18 -18
- package/lib/node/components/content-variants/content-variants.vue.d.ts +12 -12
- package/lib/node/components/inlined-styles.vue.d.ts +3 -3
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/functions/evaluate/node-runtime/init.d.ts +1 -0
- package/lib/node/functions/get-processed-block.d.ts +1 -0
- package/lib/node/functions/register-component.d.ts +1 -1
- package/lib/node/get-block-properties-2Q2lr9bu.cjs +1 -0
- package/lib/{edge/get-block-properties-zzQ9xBK7.js → node/get-block-properties-QIsIgfnu.js} +17 -16
- package/lib/node/{index-xdY2kzl8.js → index-BugETl2c.js} +1537 -1702
- package/lib/node/index-s5vEnK-M.cjs +166 -0
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +17 -16
- package/lib/node/init.cjs +1 -0
- package/lib/node/init.mjs +11 -0
- package/lib/node/node-runtime-0rF8vJwU.js +233 -0
- package/lib/node/node-runtime-Bqb5TnyM.cjs +48 -0
- package/lib/node/{repeated-block-ndxvinZD.js → repeated-block-Z-_chLeZ.js} +13 -13
- package/lib/node/{repeated-block-T2ld1sa9.cjs → repeated-block-ZpVu-xdw.cjs} +1 -1
- package/lib/node/style.css +1 -1
- package/package.json +7 -3
- package/lib/browser/block-styles-UWiLqSPk.js +0 -90
- package/lib/browser/block-styles-mtiWQW_J.cjs +0 -1
- package/lib/browser/get-block-properties-JqBN5X7_.cjs +0 -1
- package/lib/browser/index-TIoYRvmr.cjs +0 -166
- package/lib/edge/block-styles-4MJqQlwZ.cjs +0 -1
- package/lib/edge/block-styles-P44kj2Ws.js +0 -89
- package/lib/edge/get-block-properties-N40WxPwN.cjs +0 -1
- package/lib/edge/index-hw9mu6mD.cjs +0 -186
- package/lib/node/block-styles-HZaZpVMf.cjs +0 -1
- package/lib/node/block-styles-brJAybxf.js +0 -89
- package/lib/node/get-block-properties-W3cxXL5S.cjs +0 -1
- package/lib/node/index-HPinODNY.cjs +0 -213
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent, openBlock, createElementBlock, Fragment as
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
function
|
|
1
|
+
var lt = Object.defineProperty;
|
|
2
|
+
var ct = (e, t, n) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var ne = (e, t, n) => (ct(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
import { defineComponent as f, openBlock as c, createElementBlock as m, Fragment as T, createBlock as g, resolveDynamicComponent as K, mergeProps as S, toHandlers as B, withCtx as N, renderSlot as P, resolveComponent as y, createTextVNode as dt, toDisplayString as te, defineAsyncComponent as j, createVNode as I, renderList as A, createCommentVNode as C, h as Pe, createElementVNode as z, normalizeStyle as D, normalizeClass as J, markRaw as ut } from "vue";
|
|
5
|
+
import { T as x, g as pt, l as R, i as $, r as mt, p as ht, a as ft, s as xe, f as pe, b as bt, n as Ae, c as E, d as gt } from "./node-runtime-0rF8vJwU.js";
|
|
6
|
+
const yt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), kt = (e) => typeof e == "string" && yt.has(e.toLowerCase());
|
|
7
|
+
function V(e = {}, t, n) {
|
|
8
8
|
const o = {};
|
|
9
9
|
for (const r in e) {
|
|
10
10
|
if (!e[r] || n && !r.startsWith(t))
|
|
@@ -14,38 +14,38 @@ function filterAttrs(e = {}, t, n) {
|
|
|
14
14
|
}
|
|
15
15
|
return o;
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const vt = f({
|
|
18
18
|
name: "dynamic-renderer",
|
|
19
19
|
props: ["TagName", "attributes", "actionAttributes"],
|
|
20
20
|
data() {
|
|
21
|
-
return { isEmptyElement };
|
|
21
|
+
return { isEmptyElement: kt };
|
|
22
22
|
}
|
|
23
|
-
}),
|
|
23
|
+
}), b = (e, t) => {
|
|
24
24
|
const n = e.__vccOpts || e;
|
|
25
25
|
for (const [o, r] of t)
|
|
26
26
|
n[o] = r;
|
|
27
27
|
return n;
|
|
28
28
|
};
|
|
29
|
-
function
|
|
30
|
-
return e.isEmptyElement(e.TagName) ? (
|
|
31
|
-
typeof e.TagName == "string" ? (
|
|
32
|
-
default:
|
|
33
|
-
|
|
29
|
+
function Ct(e, t, n, o, r, i) {
|
|
30
|
+
return e.isEmptyElement(e.TagName) ? (c(), g(K(e.TagName), S({ key: 1 }, e.attributes, B(e.actionAttributes)), null, 16)) : (c(), m(T, { key: 0 }, [
|
|
31
|
+
typeof e.TagName == "string" ? (c(), g(K(e.TagName), S({ key: 0 }, e.attributes, B(e.actionAttributes)), {
|
|
32
|
+
default: N(() => [
|
|
33
|
+
P(e.$slots, "default")
|
|
34
34
|
]),
|
|
35
35
|
_: 3
|
|
36
|
-
}, 16)) : (
|
|
37
|
-
default:
|
|
38
|
-
|
|
36
|
+
}, 16)) : (c(), g(K(e.TagName), S({ key: 1 }, e.attributes, B(e.actionAttributes)), {
|
|
37
|
+
default: N(() => [
|
|
38
|
+
P(e.$slots, "default")
|
|
39
39
|
]),
|
|
40
40
|
_: 3
|
|
41
41
|
}, 16))
|
|
42
42
|
], 64));
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const me = /* @__PURE__ */ b(vt, [["render", Ct]]), Bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
45
45
|
__proto__: null,
|
|
46
|
-
default:
|
|
47
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
48
|
-
switch (
|
|
46
|
+
default: me
|
|
47
|
+
}, Symbol.toStringTag, { value: "Module" })), _ = () => {
|
|
48
|
+
switch (x) {
|
|
49
49
|
case "react":
|
|
50
50
|
case "reactNative":
|
|
51
51
|
case "rsc":
|
|
@@ -57,9 +57,9 @@ const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sf
|
|
|
57
57
|
case "angular":
|
|
58
58
|
return "class";
|
|
59
59
|
}
|
|
60
|
-
},
|
|
60
|
+
}, St = f({
|
|
61
61
|
name: "builder-button",
|
|
62
|
-
components: { DynamicRenderer },
|
|
62
|
+
components: { DynamicRenderer: me },
|
|
63
63
|
props: [
|
|
64
64
|
"attributes",
|
|
65
65
|
"link",
|
|
@@ -68,13 +68,13 @@ const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sf
|
|
|
68
68
|
"text"
|
|
69
69
|
],
|
|
70
70
|
data() {
|
|
71
|
-
return { filterAttrs };
|
|
71
|
+
return { filterAttrs: V };
|
|
72
72
|
},
|
|
73
73
|
methods: {
|
|
74
74
|
attrs() {
|
|
75
75
|
return {
|
|
76
|
-
...
|
|
77
|
-
[
|
|
76
|
+
...V(this.attributes, "v-on:", !1),
|
|
77
|
+
[_()]: `${this.link ? "" : "builder-button"} ${this.attributes[_()] || ""}`,
|
|
78
78
|
...this.link ? {
|
|
79
79
|
href: this.link,
|
|
80
80
|
target: this.openLinkInNewTab ? "_blank" : void 0,
|
|
@@ -86,20 +86,20 @@ const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sf
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
|
-
function
|
|
90
|
-
const s =
|
|
91
|
-
return
|
|
89
|
+
function Tt(e, t, n, o, r, i) {
|
|
90
|
+
const s = y("DynamicRenderer");
|
|
91
|
+
return c(), g(s, {
|
|
92
92
|
attributes: e.attrs(),
|
|
93
93
|
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
94
94
|
actionAttributes: e.filterAttrs(e.attributes, "v-on:", !0)
|
|
95
95
|
}, {
|
|
96
|
-
default:
|
|
97
|
-
|
|
96
|
+
default: N(() => [
|
|
97
|
+
dt(te(e.text), 1)
|
|
98
98
|
]),
|
|
99
99
|
_: 1
|
|
100
100
|
}, 8, ["attributes", "TagName", "actionAttributes"]);
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const wt = /* @__PURE__ */ b(St, [["render", Tt]]), It = Symbol(), le = {
|
|
103
103
|
Builder: {
|
|
104
104
|
content: null,
|
|
105
105
|
context: {},
|
|
@@ -115,92 +115,25 @@ const Button = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$
|
|
|
115
115
|
BlocksWrapperProps: {},
|
|
116
116
|
nonce: ""
|
|
117
117
|
},
|
|
118
|
-
key:
|
|
119
|
-
},
|
|
118
|
+
key: It
|
|
119
|
+
}, $t = Symbol(), Ve = {
|
|
120
120
|
Components: { registeredComponents: {} },
|
|
121
|
-
key
|
|
121
|
+
key: $t
|
|
122
122
|
};
|
|
123
|
-
function
|
|
123
|
+
function Rt(e) {
|
|
124
124
|
var t;
|
|
125
125
|
return {
|
|
126
126
|
...(t = e.component) == null ? void 0 : t.options,
|
|
127
127
|
...e.options
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
};
|
|
136
|
-
function isBrowser() {
|
|
137
|
-
return typeof window < "u" && typeof document < "u";
|
|
138
|
-
}
|
|
139
|
-
const convertSearchParamsToQueryObject = (e) => {
|
|
140
|
-
const t = {};
|
|
141
|
-
return e.forEach((n, o) => {
|
|
142
|
-
t[o] = n;
|
|
143
|
-
}), t;
|
|
144
|
-
}, normalizeSearchParams = (e) => e instanceof URLSearchParams ? convertSearchParamsToQueryObject(e) : e, getSearchString = (e) => typeof e == "string" ? e : e instanceof URLSearchParams ? e.toString() : new URLSearchParams(e).toString();
|
|
145
|
-
function isIframe() {
|
|
146
|
-
return isBrowser() && window.self !== window.top;
|
|
147
|
-
}
|
|
148
|
-
function isEditing(e) {
|
|
149
|
-
return isIframe() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
|
|
150
|
-
getSearchString(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
|
|
130
|
+
function Et(e, ...t) {
|
|
131
|
+
const n = Object.assign({}, e);
|
|
132
|
+
for (const o of t)
|
|
133
|
+
delete n[o];
|
|
134
|
+
return n;
|
|
151
135
|
}
|
|
152
|
-
const
|
|
153
|
-
if (isBrowser()) {
|
|
154
|
-
const e = new URL(location.href);
|
|
155
|
-
return e.pathname === "" && (e.pathname = "/"), e;
|
|
156
|
-
} else
|
|
157
|
-
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
158
|
-
}, getUserAgent = () => typeof navigator == "object" && navigator.userAgent || "", getUserAttributes = () => {
|
|
159
|
-
const e = getUserAgent(), t = {
|
|
160
|
-
Android() {
|
|
161
|
-
return e.match(/Android/i);
|
|
162
|
-
},
|
|
163
|
-
BlackBerry() {
|
|
164
|
-
return e.match(/BlackBerry/i);
|
|
165
|
-
},
|
|
166
|
-
iOS() {
|
|
167
|
-
return e.match(/iPhone|iPod/i);
|
|
168
|
-
},
|
|
169
|
-
Opera() {
|
|
170
|
-
return e.match(/Opera Mini/i);
|
|
171
|
-
},
|
|
172
|
-
Windows() {
|
|
173
|
-
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
174
|
-
},
|
|
175
|
-
any() {
|
|
176
|
-
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || TARGET === "reactNative";
|
|
177
|
-
}
|
|
178
|
-
}, n = e.match(/Tablet|iPad/i), o = getLocation();
|
|
179
|
-
return {
|
|
180
|
-
urlPath: o == null ? void 0 : o.pathname,
|
|
181
|
-
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
182
|
-
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
183
|
-
};
|
|
184
|
-
}, getFunctionArguments = ({
|
|
185
|
-
builder: e,
|
|
186
|
-
context: t,
|
|
187
|
-
event: n,
|
|
188
|
-
state: o
|
|
189
|
-
}) => Object.entries({
|
|
190
|
-
state: o,
|
|
191
|
-
Builder: e,
|
|
192
|
-
// legacy
|
|
193
|
-
builder: e,
|
|
194
|
-
context: t,
|
|
195
|
-
event: n
|
|
196
|
-
}), getBuilderGlobals = () => ({
|
|
197
|
-
isEditing: isEditing(),
|
|
198
|
-
isBrowser: isBrowser(),
|
|
199
|
-
isServer: !isBrowser(),
|
|
200
|
-
getUserAttributes: () => getUserAttributes()
|
|
201
|
-
}), parseCode = (e, {
|
|
202
|
-
isExpression: t = !0
|
|
203
|
-
}) => /* 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, runInBrowser = ({
|
|
136
|
+
const Bt = ({
|
|
204
137
|
code: e,
|
|
205
138
|
builder: t,
|
|
206
139
|
context: n,
|
|
@@ -209,11 +142,11 @@ const getLocation = () => {
|
|
|
209
142
|
rootSetState: i,
|
|
210
143
|
rootState: s
|
|
211
144
|
}) => {
|
|
212
|
-
const l =
|
|
145
|
+
const l = pt({
|
|
213
146
|
builder: t,
|
|
214
147
|
context: n,
|
|
215
148
|
event: o,
|
|
216
|
-
state:
|
|
149
|
+
state: We({
|
|
217
150
|
rootState: s,
|
|
218
151
|
localState: r,
|
|
219
152
|
rootSetState: i
|
|
@@ -221,7 +154,7 @@ const getLocation = () => {
|
|
|
221
154
|
});
|
|
222
155
|
return new Function(...l.map(([a]) => a), e)(...l.map(([, a]) => a));
|
|
223
156
|
};
|
|
224
|
-
function
|
|
157
|
+
function We({
|
|
225
158
|
rootState: e,
|
|
226
159
|
localState: t,
|
|
227
160
|
rootSetState: n
|
|
@@ -231,7 +164,7 @@ function flattenState({
|
|
|
231
164
|
if (t && r in t)
|
|
232
165
|
return t[r];
|
|
233
166
|
const i = o[r];
|
|
234
|
-
return typeof i == "object" && i !== null ?
|
|
167
|
+
return typeof i == "object" && i !== null ? We({
|
|
235
168
|
rootState: i,
|
|
236
169
|
localState: void 0,
|
|
237
170
|
rootSetState: n ? (s) => {
|
|
@@ -246,282 +179,778 @@ function flattenState({
|
|
|
246
179
|
}
|
|
247
180
|
});
|
|
248
181
|
}
|
|
249
|
-
const
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
182
|
+
const L = (e) => e != null;
|
|
183
|
+
function Pt() {
|
|
184
|
+
var e;
|
|
185
|
+
return typeof process < "u" && L((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
186
|
+
}
|
|
187
|
+
const xt = () => {
|
|
188
|
+
var o;
|
|
189
|
+
if (!Pt())
|
|
190
|
+
return !1;
|
|
191
|
+
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
192
|
+
return e && t && !n ? (R.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;
|
|
193
|
+
}, At = (e) => $() || xt() ? Bt(e) : mt(e), Vt = !0, W = class W {
|
|
194
|
+
static getCacheKey(t) {
|
|
195
|
+
return JSON.stringify({
|
|
196
|
+
...t,
|
|
197
|
+
// replace the event with a random number to break cache
|
|
198
|
+
// thats because we can't serialize the event object due to circular refs in DOM node refs.
|
|
199
|
+
event: t.event ? Math.random() : void 0
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
static getCachedValue(t) {
|
|
203
|
+
return W.cache.get(t);
|
|
204
|
+
}
|
|
205
|
+
static setCachedValue(t, n) {
|
|
206
|
+
W.cache.size > 20 && W.cache.delete(W.cache.keys().next().value), W.cache.set(t, {
|
|
207
|
+
value: n
|
|
208
|
+
});
|
|
257
209
|
}
|
|
258
|
-
})(), SDK_NAME = `@builder.io/sdk-${SDK_NAME_FOR_TARGET}`, fastClone = (e) => JSON.parse(JSON.stringify(e)), set = (e, t, n) => {
|
|
259
|
-
if (Object(e) !== e)
|
|
260
|
-
return e;
|
|
261
|
-
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
262
|
-
return o.slice(0, -1).reduce((r, i, s) => Object(r[i]) === r[i] ? r[i] : r[i] = Math.abs(Number(o[s + 1])) >> 0 === +o[s + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
|
|
263
|
-
}, noop = () => {
|
|
264
210
|
};
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
211
|
+
ne(W, "cacheLimit", 20), ne(W, "cache", /* @__PURE__ */ new Map());
|
|
212
|
+
let U = W;
|
|
213
|
+
function G({
|
|
214
|
+
code: e,
|
|
215
|
+
context: t,
|
|
216
|
+
localState: n,
|
|
217
|
+
rootState: o,
|
|
218
|
+
rootSetState: r,
|
|
219
|
+
event: i,
|
|
220
|
+
isExpression: s = !0,
|
|
221
|
+
enableCache: l
|
|
222
|
+
}) {
|
|
223
|
+
if (e === "")
|
|
224
|
+
return;
|
|
225
|
+
const a = {
|
|
226
|
+
code: ht(e, {
|
|
227
|
+
isExpression: s
|
|
228
|
+
}),
|
|
229
|
+
builder: ft(),
|
|
230
|
+
context: t,
|
|
231
|
+
event: i,
|
|
232
|
+
rootSetState: r,
|
|
233
|
+
rootState: o,
|
|
234
|
+
localState: n
|
|
235
|
+
};
|
|
236
|
+
if (l && !Vt) {
|
|
237
|
+
const u = U.getCacheKey(a), h = U.getCachedValue(u);
|
|
238
|
+
if (h)
|
|
239
|
+
return h.value;
|
|
240
|
+
}
|
|
269
241
|
try {
|
|
270
|
-
|
|
271
|
-
|
|
242
|
+
const u = At(a);
|
|
243
|
+
if (l) {
|
|
244
|
+
const h = U.getCacheKey(a);
|
|
245
|
+
U.setCachedValue(h, u);
|
|
246
|
+
}
|
|
247
|
+
return u;
|
|
248
|
+
} catch (u) {
|
|
249
|
+
R.error("Failed code evaluation: " + u.message, {
|
|
250
|
+
code: e
|
|
251
|
+
});
|
|
252
|
+
return;
|
|
272
253
|
}
|
|
273
254
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
255
|
+
function ce(e) {
|
|
256
|
+
if (e === null || typeof e != "object")
|
|
257
|
+
return e;
|
|
258
|
+
if (Array.isArray(e))
|
|
259
|
+
return e.map((n) => ce(n));
|
|
260
|
+
if (e["@type"] === "@builder.io/sdk:Element")
|
|
261
|
+
return e;
|
|
262
|
+
const t = {};
|
|
263
|
+
for (const n in e)
|
|
264
|
+
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = ce(e[n]));
|
|
265
|
+
return t;
|
|
266
|
+
}
|
|
267
|
+
const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(x), Nt = (e) => {
|
|
268
|
+
if (Wt) {
|
|
269
|
+
const t = pe(e);
|
|
270
|
+
return {
|
|
271
|
+
...t,
|
|
272
|
+
properties: {
|
|
273
|
+
...t.properties
|
|
274
|
+
},
|
|
275
|
+
actions: {
|
|
276
|
+
...t.actions
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
} else {
|
|
280
|
+
const t = ce(Et(e, "children", "meta"));
|
|
281
|
+
return {
|
|
282
|
+
...t,
|
|
283
|
+
properties: {
|
|
284
|
+
...t.properties
|
|
285
|
+
},
|
|
286
|
+
actions: {
|
|
287
|
+
...t.actions
|
|
288
|
+
},
|
|
289
|
+
children: e.children,
|
|
290
|
+
meta: e.meta
|
|
291
|
+
};
|
|
278
292
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
293
|
+
}, Ft = ({
|
|
294
|
+
block: e,
|
|
295
|
+
context: t,
|
|
296
|
+
localState: n,
|
|
297
|
+
rootState: o,
|
|
298
|
+
rootSetState: r
|
|
299
|
+
}) => {
|
|
300
|
+
if (!e.bindings)
|
|
301
|
+
return e;
|
|
302
|
+
const i = Nt(e);
|
|
303
|
+
for (const s in e.bindings) {
|
|
304
|
+
const l = e.bindings[s], a = G({
|
|
305
|
+
code: l,
|
|
306
|
+
localState: n,
|
|
307
|
+
rootState: o,
|
|
308
|
+
rootSetState: r,
|
|
309
|
+
context: t,
|
|
310
|
+
enableCache: !0
|
|
311
|
+
});
|
|
312
|
+
xe(i, s, a);
|
|
313
|
+
}
|
|
314
|
+
return i;
|
|
315
|
+
};
|
|
316
|
+
function Ot({
|
|
317
|
+
block: e,
|
|
318
|
+
context: t,
|
|
319
|
+
shouldEvaluateBindings: n,
|
|
320
|
+
localState: o,
|
|
321
|
+
rootState: r,
|
|
322
|
+
rootSetState: i
|
|
323
|
+
}) {
|
|
324
|
+
const s = e;
|
|
325
|
+
return n ? Ft({
|
|
326
|
+
block: s,
|
|
327
|
+
localState: o,
|
|
328
|
+
rootState: r,
|
|
329
|
+
rootSetState: i,
|
|
330
|
+
context: t
|
|
331
|
+
}) : s;
|
|
332
|
+
}
|
|
333
|
+
function Dt(e) {
|
|
334
|
+
const t = e || ($() ? window.location.search : void 0);
|
|
335
|
+
return t ? bt(t).indexOf("builder.preview=") !== -1 : !1;
|
|
336
|
+
}
|
|
337
|
+
const Lt = (e) => ({
|
|
338
|
+
type: "builder.registerComponent",
|
|
339
|
+
data: ee(e)
|
|
340
|
+
}), Ut = (e) => {
|
|
341
|
+
const t = e.toString().trim();
|
|
342
|
+
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
343
|
+
};
|
|
344
|
+
function ee(e) {
|
|
345
|
+
return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ? Ut(n) : n));
|
|
346
|
+
}
|
|
347
|
+
const Ce = {};
|
|
348
|
+
function Mt(e, t) {
|
|
349
|
+
e === "plugin" && (t = ee(t));
|
|
350
|
+
let n = Ce[e];
|
|
351
|
+
if (n || (n = Ce[e] = []), n.push(t), $()) {
|
|
352
|
+
const o = {
|
|
353
|
+
type: "builder.register",
|
|
354
|
+
data: {
|
|
355
|
+
type: e,
|
|
356
|
+
info: t
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
try {
|
|
360
|
+
parent.postMessage(o, "*"), parent !== window && window.postMessage(o, "*");
|
|
361
|
+
} catch (r) {
|
|
362
|
+
console.debug("Could not postmessage", r);
|
|
297
363
|
}
|
|
298
|
-
}
|
|
364
|
+
}
|
|
299
365
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
366
|
+
const Se = {};
|
|
367
|
+
function Pi(e) {
|
|
368
|
+
if ($()) {
|
|
369
|
+
Object.assign(Se, e);
|
|
370
|
+
const t = {
|
|
371
|
+
type: "builder.settingsChange",
|
|
372
|
+
data: Se
|
|
373
|
+
};
|
|
374
|
+
parent.postMessage(t, "*");
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
const Te = "builder.", Ht = "options.", Ne = (e) => {
|
|
378
|
+
if (!e)
|
|
379
|
+
return {};
|
|
380
|
+
const t = Ae(e), n = {};
|
|
381
|
+
return Object.keys(t).forEach((o) => {
|
|
382
|
+
if (o.startsWith(Te)) {
|
|
383
|
+
const r = o.replace(Te, "").replace(Ht, "");
|
|
384
|
+
n[r] = t[o];
|
|
385
|
+
}
|
|
386
|
+
}), n;
|
|
387
|
+
}, jt = () => {
|
|
388
|
+
if (!$())
|
|
389
|
+
return {};
|
|
390
|
+
const e = new URLSearchParams(window.location.search);
|
|
391
|
+
return Ne(e);
|
|
392
|
+
}, Kt = (e) => {
|
|
393
|
+
if (e === "localhost" || e === "127.0.0.1")
|
|
394
|
+
return e;
|
|
395
|
+
const t = e.split(".");
|
|
396
|
+
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
397
|
+
}, Fe = ({
|
|
398
|
+
name: e,
|
|
399
|
+
canTrack: t
|
|
400
|
+
}) => {
|
|
401
|
+
var n;
|
|
402
|
+
try {
|
|
403
|
+
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
404
|
+
} catch (o) {
|
|
405
|
+
R.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
}, Oe = async (e) => Fe(e), qt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(L).join("; "), zt = [["secure", ""], ["SameSite", "None"]], Jt = ({
|
|
409
|
+
name: e,
|
|
410
|
+
value: t,
|
|
411
|
+
expires: n
|
|
303
412
|
}) => {
|
|
304
|
-
const
|
|
305
|
-
return
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
413
|
+
const r = ($() ? location.protocol === "https:" : !0) ? zt : [[]], i = n ? [["expires", n.toUTCString()]] : [[]], s = [[e, t], ...i, ["path", "/"], ["domain", Kt(window.location.hostname)], ...r];
|
|
414
|
+
return qt(s);
|
|
415
|
+
}, De = async ({
|
|
416
|
+
name: e,
|
|
417
|
+
value: t,
|
|
418
|
+
expires: n,
|
|
419
|
+
canTrack: o
|
|
420
|
+
}) => {
|
|
421
|
+
try {
|
|
422
|
+
if (!o)
|
|
423
|
+
return;
|
|
424
|
+
const r = Jt({
|
|
425
|
+
name: e,
|
|
426
|
+
value: t,
|
|
427
|
+
expires: n
|
|
428
|
+
});
|
|
429
|
+
document.cookie = r;
|
|
430
|
+
} catch (r) {
|
|
431
|
+
R.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
function Gt() {
|
|
435
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
436
|
+
const t = Math.random() * 16 | 0;
|
|
437
|
+
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
438
|
+
});
|
|
310
439
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
if (typeof output === 'object' && output !== null) {
|
|
315
|
-
return JSON.stringify(output.copySync ? output.copySync() : output);
|
|
316
|
-
} else {
|
|
317
|
-
return output;
|
|
440
|
+
function Le() {
|
|
441
|
+
return Gt().replace(/-/g, "");
|
|
318
442
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
443
|
+
const Ue = "builderSessionId", Yt = async ({
|
|
444
|
+
canTrack: e
|
|
445
|
+
}) => {
|
|
446
|
+
if (!e)
|
|
447
|
+
return;
|
|
448
|
+
const t = await Oe({
|
|
449
|
+
name: Ue,
|
|
450
|
+
canTrack: e
|
|
451
|
+
});
|
|
452
|
+
if (L(t))
|
|
453
|
+
return t;
|
|
454
|
+
{
|
|
455
|
+
const n = Qt();
|
|
456
|
+
return Xt({
|
|
457
|
+
id: n,
|
|
458
|
+
canTrack: e
|
|
459
|
+
}), n;
|
|
460
|
+
}
|
|
461
|
+
}, Qt = () => Le(), Xt = ({
|
|
462
|
+
id: e,
|
|
463
|
+
canTrack: t
|
|
464
|
+
}) => De({
|
|
465
|
+
name: Ue,
|
|
466
|
+
value: e,
|
|
467
|
+
canTrack: t
|
|
468
|
+
}), Me = () => $() && typeof localStorage < "u" ? localStorage : void 0, Zt = ({
|
|
469
|
+
key: e,
|
|
470
|
+
canTrack: t
|
|
471
|
+
}) => {
|
|
472
|
+
var n;
|
|
323
473
|
try {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
logger.error("isolated-vm import error.", t);
|
|
474
|
+
return t ? (n = Me()) == null ? void 0 : n.getItem(e) : void 0;
|
|
475
|
+
} catch (o) {
|
|
476
|
+
console.debug("[LocalStorage] GET error: ", o);
|
|
477
|
+
return;
|
|
329
478
|
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
479
|
+
}, _t = ({
|
|
480
|
+
key: e,
|
|
481
|
+
canTrack: t,
|
|
482
|
+
value: n
|
|
483
|
+
}) => {
|
|
484
|
+
var o;
|
|
485
|
+
try {
|
|
486
|
+
t && ((o = Me()) == null || o.setItem(e, n));
|
|
487
|
+
} catch (r) {
|
|
488
|
+
console.debug("[LocalStorage] SET error: ", r);
|
|
489
|
+
}
|
|
490
|
+
}, He = "builderVisitorId", en = ({
|
|
491
|
+
canTrack: e
|
|
492
|
+
}) => {
|
|
493
|
+
if (!e)
|
|
494
|
+
return;
|
|
495
|
+
const t = Zt({
|
|
496
|
+
key: He,
|
|
497
|
+
canTrack: e
|
|
498
|
+
});
|
|
499
|
+
if (L(t))
|
|
500
|
+
return t;
|
|
501
|
+
{
|
|
502
|
+
const n = tn();
|
|
503
|
+
return nn({
|
|
504
|
+
id: n,
|
|
505
|
+
canTrack: e
|
|
506
|
+
}), n;
|
|
507
|
+
}
|
|
508
|
+
}, tn = () => Le(), nn = ({
|
|
509
|
+
id: e,
|
|
510
|
+
canTrack: t
|
|
511
|
+
}) => _t({
|
|
512
|
+
key: He,
|
|
513
|
+
value: e,
|
|
514
|
+
canTrack: t
|
|
515
|
+
}), on = async ({
|
|
516
|
+
canTrack: e
|
|
517
|
+
}) => {
|
|
518
|
+
if (!e)
|
|
519
|
+
return {
|
|
520
|
+
visitorId: void 0,
|
|
521
|
+
sessionId: void 0
|
|
522
|
+
};
|
|
523
|
+
const t = await Yt({
|
|
524
|
+
canTrack: e
|
|
525
|
+
}), n = en({
|
|
526
|
+
canTrack: e
|
|
527
|
+
});
|
|
528
|
+
return {
|
|
529
|
+
sessionId: t,
|
|
530
|
+
visitorId: n
|
|
531
|
+
};
|
|
532
|
+
}, rn = async ({
|
|
533
|
+
type: e,
|
|
534
|
+
canTrack: t,
|
|
535
|
+
apiKey: n,
|
|
536
|
+
metadata: o,
|
|
537
|
+
...r
|
|
538
|
+
}) => ({
|
|
539
|
+
type: e,
|
|
540
|
+
data: {
|
|
541
|
+
...r,
|
|
542
|
+
metadata: {
|
|
543
|
+
url: location.href,
|
|
544
|
+
...o
|
|
545
|
+
},
|
|
546
|
+
...await on({
|
|
547
|
+
canTrack: t
|
|
548
|
+
}),
|
|
549
|
+
userAttributes: gt(),
|
|
550
|
+
ownerId: n
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
async function de(e) {
|
|
554
|
+
if (!e.apiKey) {
|
|
555
|
+
R.error("Missing API key for track call. Please provide your API key.");
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
if (e.canTrack && !E() && ($() || x === "reactNative"))
|
|
559
|
+
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
560
|
+
method: "POST",
|
|
561
|
+
body: JSON.stringify({
|
|
562
|
+
events: [await rn(e)]
|
|
563
|
+
}),
|
|
564
|
+
headers: {
|
|
565
|
+
"content-type": "application/json"
|
|
566
|
+
},
|
|
567
|
+
mode: "cors"
|
|
568
|
+
}).catch((t) => {
|
|
569
|
+
console.error("Failed to track: ", t);
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
const xi = (e) => de({
|
|
573
|
+
...e,
|
|
574
|
+
canTrack: !0
|
|
575
|
+
}), sn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
576
|
+
function je(e, t) {
|
|
577
|
+
if (!t.origin.startsWith("http") && !t.origin.startsWith("https"))
|
|
578
|
+
return !1;
|
|
579
|
+
const n = new URL(t.origin), o = n.hostname;
|
|
580
|
+
return (e || sn).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
581
|
+
}
|
|
582
|
+
const an = "2.0.13", ln = () => {
|
|
583
|
+
Mt("insertMenu", {
|
|
584
|
+
name: "_default",
|
|
585
|
+
default: !0,
|
|
586
|
+
items: [{
|
|
587
|
+
name: "Box"
|
|
588
|
+
}, {
|
|
589
|
+
name: "Text"
|
|
590
|
+
}, {
|
|
591
|
+
name: "Image"
|
|
592
|
+
}, {
|
|
593
|
+
name: "Columns"
|
|
594
|
+
}, {
|
|
595
|
+
name: "Core:Section"
|
|
596
|
+
}, {
|
|
597
|
+
name: "Core:Button"
|
|
598
|
+
}, {
|
|
599
|
+
name: "Embed"
|
|
600
|
+
}, {
|
|
601
|
+
name: "Custom Code"
|
|
602
|
+
}]
|
|
603
|
+
});
|
|
339
604
|
};
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
605
|
+
let we = !1;
|
|
606
|
+
const Ke = (e = {}) => {
|
|
607
|
+
var t, n;
|
|
608
|
+
we || (we = !0, $() && ((t = window.parent) == null || t.postMessage({
|
|
609
|
+
type: "builder.sdkInfo",
|
|
610
|
+
data: {
|
|
611
|
+
target: x,
|
|
612
|
+
version: an,
|
|
613
|
+
supportsPatchUpdates: !1,
|
|
614
|
+
// Supports builder-model="..." attribute which is needed to
|
|
615
|
+
// scope our '+ add block' button styling
|
|
616
|
+
supportsAddBlockScoping: !0,
|
|
617
|
+
supportsCustomBreakpoints: !0
|
|
618
|
+
}
|
|
619
|
+
}, "*"), (n = window.parent) == null || n.postMessage({
|
|
620
|
+
type: "builder.updateContent",
|
|
621
|
+
data: {
|
|
622
|
+
options: e
|
|
623
|
+
}
|
|
624
|
+
}, "*"), window.addEventListener("message", (o) => {
|
|
625
|
+
var i, s;
|
|
626
|
+
if (!je(e.trustedHosts, o))
|
|
627
|
+
return;
|
|
628
|
+
const {
|
|
629
|
+
data: r
|
|
630
|
+
} = o;
|
|
631
|
+
if (r != null && r.type)
|
|
632
|
+
switch (r.type) {
|
|
633
|
+
case "builder.evaluate": {
|
|
634
|
+
const l = r.data.text, a = r.data.arguments || [], u = r.data.id, h = new Function(l);
|
|
635
|
+
let d, p = null;
|
|
636
|
+
try {
|
|
637
|
+
d = h.apply(null, a);
|
|
638
|
+
} catch (k) {
|
|
639
|
+
p = k;
|
|
640
|
+
}
|
|
641
|
+
p ? (i = window.parent) == null || i.postMessage({
|
|
642
|
+
type: "builder.evaluateError",
|
|
643
|
+
data: {
|
|
644
|
+
id: u,
|
|
645
|
+
error: p.message
|
|
646
|
+
}
|
|
647
|
+
}, "*") : d && typeof d.then == "function" ? d.then((k) => {
|
|
648
|
+
var v;
|
|
649
|
+
(v = window.parent) == null || v.postMessage({
|
|
650
|
+
type: "builder.evaluateResult",
|
|
651
|
+
data: {
|
|
652
|
+
id: u,
|
|
653
|
+
result: k
|
|
654
|
+
}
|
|
655
|
+
}, "*");
|
|
656
|
+
}).catch(console.error) : (s = window.parent) == null || s.postMessage({
|
|
657
|
+
type: "builder.evaluateResult",
|
|
658
|
+
data: {
|
|
659
|
+
result: d,
|
|
660
|
+
id: u
|
|
661
|
+
}
|
|
662
|
+
}, "*");
|
|
663
|
+
break;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
})));
|
|
667
|
+
}, qe = ({
|
|
668
|
+
model: e,
|
|
669
|
+
trustedHosts: t,
|
|
670
|
+
callbacks: n
|
|
671
|
+
}) => (o) => {
|
|
672
|
+
if (!je(t, o))
|
|
673
|
+
return;
|
|
674
|
+
const {
|
|
675
|
+
data: r
|
|
676
|
+
} = o;
|
|
677
|
+
if (r)
|
|
678
|
+
switch (r.type) {
|
|
679
|
+
case "builder.configureSdk": {
|
|
680
|
+
n.configureSdk(r.data);
|
|
681
|
+
break;
|
|
682
|
+
}
|
|
683
|
+
case "builder.triggerAnimation": {
|
|
684
|
+
n.animation(r.data);
|
|
685
|
+
break;
|
|
686
|
+
}
|
|
687
|
+
case "builder.contentUpdate": {
|
|
688
|
+
const i = r.data, s = i.key || i.alias || i.entry || i.modelName, l = i.data;
|
|
689
|
+
s === e && n.contentUpdate(l);
|
|
690
|
+
break;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}, Ai = (e, t, n) => {
|
|
694
|
+
if (!$)
|
|
695
|
+
return R.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
696
|
+
};
|
|
697
|
+
Ke();
|
|
698
|
+
const o = qe({
|
|
699
|
+
callbacks: {
|
|
700
|
+
contentUpdate: t,
|
|
701
|
+
animation: () => {
|
|
702
|
+
},
|
|
703
|
+
configureSdk: () => {
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
model: e,
|
|
707
|
+
trustedHosts: n == null ? void 0 : n.trustedHosts
|
|
708
|
+
});
|
|
709
|
+
return window.addEventListener("message", o), () => {
|
|
710
|
+
window.removeEventListener("message", o);
|
|
711
|
+
};
|
|
712
|
+
}, cn = "builder.tests", he = (e) => `${cn}.${e}`, dn = ({
|
|
713
|
+
contentId: e
|
|
714
|
+
}) => Oe({
|
|
715
|
+
name: he(e),
|
|
716
|
+
canTrack: !0
|
|
717
|
+
}), un = ({
|
|
718
|
+
contentId: e
|
|
719
|
+
}) => Fe({
|
|
720
|
+
name: he(e),
|
|
721
|
+
canTrack: !0
|
|
722
|
+
}), pn = ({
|
|
723
|
+
contentId: e,
|
|
724
|
+
value: t
|
|
725
|
+
}) => De({
|
|
726
|
+
name: he(e),
|
|
727
|
+
value: t,
|
|
728
|
+
canTrack: !0
|
|
729
|
+
}), ze = (e) => L(e.id) && L(e.variations) && Object.keys(e.variations).length > 0, mn = ({
|
|
730
|
+
id: e,
|
|
731
|
+
variations: t
|
|
732
|
+
}) => {
|
|
733
|
+
var r;
|
|
734
|
+
let n = 0;
|
|
735
|
+
const o = Math.random();
|
|
736
|
+
for (const i in t) {
|
|
737
|
+
const s = (r = t[i]) == null ? void 0 : r.testRatio;
|
|
738
|
+
if (n += s, o < n)
|
|
739
|
+
return i;
|
|
740
|
+
}
|
|
741
|
+
return e;
|
|
742
|
+
}, Je = (e) => {
|
|
743
|
+
const t = mn(e);
|
|
744
|
+
return pn({
|
|
745
|
+
contentId: e.id,
|
|
746
|
+
value: t
|
|
747
|
+
}).catch((n) => {
|
|
748
|
+
R.error("could not store A/B test variation: ", n);
|
|
749
|
+
}), t;
|
|
750
|
+
}, Ge = ({
|
|
751
|
+
item: e,
|
|
752
|
+
testGroupId: t
|
|
753
|
+
}) => {
|
|
754
|
+
const n = e.variations[t];
|
|
755
|
+
return t === e.id || // handle edge-case where `testGroupId` points to non-existing variation
|
|
756
|
+
!n ? {
|
|
757
|
+
testVariationId: e.id,
|
|
758
|
+
testVariationName: "Default"
|
|
759
|
+
} : {
|
|
760
|
+
data: n.data,
|
|
761
|
+
testVariationId: n.id,
|
|
762
|
+
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
763
|
+
};
|
|
764
|
+
}, hn = ({
|
|
765
|
+
item: e,
|
|
766
|
+
canTrack: t
|
|
767
|
+
}) => {
|
|
768
|
+
if (!t)
|
|
769
|
+
return e;
|
|
770
|
+
if (!e)
|
|
771
|
+
return;
|
|
772
|
+
if (!ze(e))
|
|
773
|
+
return e;
|
|
774
|
+
const n = un({
|
|
775
|
+
contentId: e.id
|
|
776
|
+
}) || Je({
|
|
777
|
+
variations: e.variations,
|
|
778
|
+
id: e.id
|
|
779
|
+
}), o = Ge({
|
|
780
|
+
item: e,
|
|
781
|
+
testGroupId: n
|
|
782
|
+
});
|
|
783
|
+
return {
|
|
784
|
+
...e,
|
|
785
|
+
...o
|
|
786
|
+
};
|
|
787
|
+
}, fn = async ({
|
|
788
|
+
item: e,
|
|
789
|
+
canTrack: t
|
|
790
|
+
}) => {
|
|
791
|
+
if (!t || !ze(e))
|
|
792
|
+
return e;
|
|
793
|
+
const o = await dn({
|
|
794
|
+
contentId: e.id
|
|
795
|
+
}) || Je({
|
|
796
|
+
variations: e.variations,
|
|
797
|
+
id: e.id
|
|
798
|
+
}), r = Ge({
|
|
799
|
+
item: e,
|
|
800
|
+
testGroupId: o
|
|
801
|
+
});
|
|
802
|
+
return {
|
|
803
|
+
...e,
|
|
804
|
+
...r
|
|
805
|
+
};
|
|
806
|
+
}, Y = (e) => L(e) ? e : !0;
|
|
807
|
+
function bn() {
|
|
808
|
+
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
809
|
+
}
|
|
810
|
+
function gn() {
|
|
811
|
+
const e = bn().fetch;
|
|
812
|
+
if (typeof e > "u")
|
|
813
|
+
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
814
|
+
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
815
|
+
return e;
|
|
816
|
+
}
|
|
817
|
+
const Ye = gn();
|
|
818
|
+
function ue(e, t = null, n = ".") {
|
|
819
|
+
return Object.keys(e).reduce((o, r) => {
|
|
820
|
+
const i = e[r], s = [t, r].filter(Boolean).join(n);
|
|
821
|
+
return [typeof i == "object", i !== null, !(Array.isArray(i) && i.length === 0)].every(Boolean) ? {
|
|
822
|
+
...o,
|
|
823
|
+
...ue(i, s, n)
|
|
824
|
+
} : {
|
|
825
|
+
...o,
|
|
826
|
+
[s]: i
|
|
827
|
+
};
|
|
828
|
+
}, {});
|
|
347
829
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
event: o,
|
|
353
|
-
localState: r,
|
|
354
|
-
rootSetState: i,
|
|
355
|
-
rootState: s
|
|
356
|
-
}) => {
|
|
357
|
-
const l = getIvm(), a = fastClone({
|
|
358
|
-
...s,
|
|
359
|
-
...r
|
|
360
|
-
}), d = getFunctionArguments({
|
|
361
|
-
builder: t,
|
|
362
|
-
context: n,
|
|
363
|
-
event: o,
|
|
364
|
-
state: a
|
|
365
|
-
}), u = getIsolateContext(), c = u.global;
|
|
366
|
-
c.setSync(BUILDER_SET_STATE_NAME, function(m, b) {
|
|
367
|
-
set(s, m, b), i == null || i(s);
|
|
368
|
-
}), d.forEach(([m, b]) => {
|
|
369
|
-
const C = typeof b == "object" ? new l.Reference(
|
|
370
|
-
// workaround: methods with default values for arguments is not being cloned over
|
|
371
|
-
m === "builder" ? {
|
|
372
|
-
...b,
|
|
373
|
-
getUserAttributes: () => b.getUserAttributes()
|
|
374
|
-
} : b
|
|
375
|
-
) : null;
|
|
376
|
-
c.setSync(getSyncValName(m), C);
|
|
377
|
-
});
|
|
378
|
-
const p = processCode({
|
|
379
|
-
code: e,
|
|
380
|
-
args: d
|
|
381
|
-
}), f = u.evalClosureSync(p);
|
|
382
|
-
try {
|
|
383
|
-
return JSON.parse(f);
|
|
384
|
-
} catch {
|
|
385
|
-
return f;
|
|
830
|
+
function Qe(e, t, n = {}) {
|
|
831
|
+
for (const o in e) {
|
|
832
|
+
const r = e[o], i = t ? t + "." + o : o;
|
|
833
|
+
r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ? Qe(r, i, n) : n[i] = r;
|
|
386
834
|
}
|
|
387
|
-
|
|
388
|
-
function isNodeRuntime() {
|
|
389
|
-
var e;
|
|
390
|
-
return typeof process < "u" && checkIsDefined((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
835
|
+
return n;
|
|
391
836
|
}
|
|
392
|
-
const
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
837
|
+
const yn = "v3", Ie = (e) => typeof e == "number" && !isNaN(e) && e >= 0, fe = (e) => {
|
|
838
|
+
const {
|
|
839
|
+
limit: t = 30,
|
|
840
|
+
userAttributes: n,
|
|
841
|
+
query: o,
|
|
842
|
+
model: r,
|
|
843
|
+
apiKey: i,
|
|
844
|
+
enrich: s,
|
|
845
|
+
locale: l,
|
|
846
|
+
apiVersion: a = yn,
|
|
847
|
+
fields: u,
|
|
848
|
+
omit: h,
|
|
849
|
+
offset: d,
|
|
850
|
+
cacheSeconds: p,
|
|
851
|
+
staleCacheSeconds: k,
|
|
852
|
+
sort: v,
|
|
853
|
+
includeUnpublished: F
|
|
854
|
+
} = e;
|
|
855
|
+
if (!i)
|
|
856
|
+
throw new Error("Missing API key");
|
|
857
|
+
if (!["v3"].includes(a))
|
|
858
|
+
throw new Error(`Invalid apiVersion: expected 'v3', received '${a}'`);
|
|
859
|
+
const X = t !== 1, w = new URL(`https://cdn.builder.io/api/${a}/content/${r}`);
|
|
860
|
+
if (w.searchParams.set("apiKey", i), w.searchParams.set("limit", String(t)), w.searchParams.set("noTraverse", String(X)), w.searchParams.set("includeRefs", String(!0)), l && w.searchParams.set("locale", l), s && w.searchParams.set("enrich", String(s)), w.searchParams.set("omit", h || "meta.componentsUsed"), u && w.searchParams.set("fields", u), Number.isFinite(d) && d > -1 && w.searchParams.set("offset", String(Math.floor(d))), typeof F == "boolean" && w.searchParams.set("includeUnpublished", String(F)), p && Ie(p) && w.searchParams.set("cacheSeconds", String(p)), k && Ie(k) && w.searchParams.set("staleCacheSeconds", String(k)), v) {
|
|
861
|
+
const O = ue({
|
|
862
|
+
sort: v
|
|
405
863
|
});
|
|
864
|
+
for (const H in O)
|
|
865
|
+
w.searchParams.set(H, JSON.stringify(O[H]));
|
|
406
866
|
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
867
|
+
const at = {
|
|
868
|
+
...jt(),
|
|
869
|
+
...Ae(e.options || {})
|
|
870
|
+
}, ve = ue(at);
|
|
871
|
+
for (const O in ve)
|
|
872
|
+
w.searchParams.set(O, String(ve[O]));
|
|
873
|
+
if (n && w.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
874
|
+
const O = Qe({
|
|
875
|
+
query: o
|
|
413
876
|
});
|
|
877
|
+
for (const H in O)
|
|
878
|
+
w.searchParams.set(H, JSON.stringify(O[H]));
|
|
414
879
|
}
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
}) {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
if (l) {
|
|
442
|
-
const d = EvalCache.getCacheKey(a), u = EvalCache.getCachedValue(d);
|
|
443
|
-
if (u)
|
|
444
|
-
return u.value;
|
|
880
|
+
return w;
|
|
881
|
+
}, kn = (e) => "results" in e;
|
|
882
|
+
async function be(e) {
|
|
883
|
+
const t = await Sn({
|
|
884
|
+
...e,
|
|
885
|
+
limit: 1
|
|
886
|
+
});
|
|
887
|
+
return t && t[0] || null;
|
|
888
|
+
}
|
|
889
|
+
const vn = async (e) => {
|
|
890
|
+
const t = fe(e);
|
|
891
|
+
return await (await (e.fetch ?? Ye)(t.href, e.fetchOptions)).json();
|
|
892
|
+
}, Cn = async (e, t, n = fe(e)) => {
|
|
893
|
+
const o = Y(e.canTrack);
|
|
894
|
+
if (n.search.includes("preview="), !o || !($() || x === "reactNative"))
|
|
895
|
+
return t.results;
|
|
896
|
+
try {
|
|
897
|
+
const r = [];
|
|
898
|
+
for (const i of t.results)
|
|
899
|
+
r.push(await fn({
|
|
900
|
+
item: i,
|
|
901
|
+
canTrack: o
|
|
902
|
+
}));
|
|
903
|
+
t.results = r;
|
|
904
|
+
} catch (r) {
|
|
905
|
+
R.error("Could not process A/B tests. ", r);
|
|
445
906
|
}
|
|
907
|
+
return t.results;
|
|
908
|
+
};
|
|
909
|
+
async function Sn(e) {
|
|
446
910
|
try {
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
} catch (
|
|
454
|
-
|
|
455
|
-
code: e
|
|
456
|
-
});
|
|
457
|
-
return;
|
|
911
|
+
const t = fe(e), n = await vn(e);
|
|
912
|
+
return kn(n) ? Cn(e, n) : (R.error("Error fetching data. ", {
|
|
913
|
+
url: t,
|
|
914
|
+
content: n,
|
|
915
|
+
options: e
|
|
916
|
+
}), null);
|
|
917
|
+
} catch (t) {
|
|
918
|
+
return R.error("Error fetching data. ", t), null;
|
|
458
919
|
}
|
|
459
920
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
return e;
|
|
472
|
-
const i = fastClone(e), s = {
|
|
473
|
-
...i,
|
|
474
|
-
properties: {
|
|
475
|
-
...i.properties
|
|
921
|
+
const Vi = async (e) => {
|
|
922
|
+
var o, r, i;
|
|
923
|
+
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((r = e.userAttributes) == null ? void 0 : r.urlPath), n = {
|
|
924
|
+
...e,
|
|
925
|
+
apiKey: e.apiKey,
|
|
926
|
+
model: e.model || "page",
|
|
927
|
+
userAttributes: {
|
|
928
|
+
...e.userAttributes,
|
|
929
|
+
...t ? {
|
|
930
|
+
urlPath: t
|
|
931
|
+
} : {}
|
|
476
932
|
},
|
|
477
|
-
|
|
478
|
-
...i.actions
|
|
479
|
-
}
|
|
933
|
+
options: Ne(e.searchParams || ((i = e.url) == null ? void 0 : i.searchParams) || e.options)
|
|
480
934
|
};
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
enableCache: !0
|
|
489
|
-
});
|
|
490
|
-
set(s, l, d);
|
|
491
|
-
}
|
|
492
|
-
return s;
|
|
493
|
-
};
|
|
494
|
-
function getProcessedBlock({
|
|
495
|
-
block: e,
|
|
496
|
-
context: t,
|
|
497
|
-
shouldEvaluateBindings: n,
|
|
498
|
-
localState: o,
|
|
499
|
-
rootState: r,
|
|
500
|
-
rootSetState: i
|
|
501
|
-
}) {
|
|
502
|
-
const s = e;
|
|
503
|
-
return n ? evaluateBindings({
|
|
504
|
-
block: s,
|
|
505
|
-
localState: o,
|
|
506
|
-
rootState: r,
|
|
507
|
-
rootSetState: i,
|
|
508
|
-
context: t
|
|
509
|
-
}) : s;
|
|
510
|
-
}
|
|
511
|
-
const camelToKebabCase = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
512
|
-
function throttle(e, t, n = {}) {
|
|
935
|
+
return {
|
|
936
|
+
apiKey: n.apiKey,
|
|
937
|
+
model: n.model,
|
|
938
|
+
content: await be(n)
|
|
939
|
+
};
|
|
940
|
+
}, ge = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
941
|
+
function Tn(e, t, n = {}) {
|
|
513
942
|
let o, r, i, s = null, l = 0;
|
|
514
943
|
const a = function() {
|
|
515
944
|
l = n.leading === !1 ? 0 : Date.now(), s = null, i = e.apply(o, r), s || (o = r = null);
|
|
516
945
|
};
|
|
517
946
|
return function() {
|
|
518
|
-
const
|
|
519
|
-
!l && n.leading === !1 && (l =
|
|
520
|
-
const
|
|
521
|
-
return o = this, r = arguments,
|
|
947
|
+
const u = Date.now();
|
|
948
|
+
!l && n.leading === !1 && (l = u);
|
|
949
|
+
const h = t - (u - l);
|
|
950
|
+
return o = this, r = arguments, h <= 0 || h > t ? (s && (clearTimeout(s), s = null), l = u, i = e.apply(o, r), s || (o = r = null)) : !s && n.trailing !== !1 && (s = setTimeout(a, h)), i;
|
|
522
951
|
};
|
|
523
952
|
}
|
|
524
|
-
function
|
|
953
|
+
function q(e, ...t) {
|
|
525
954
|
const n = Object(e);
|
|
526
955
|
for (let o = 1; o < arguments.length; o++) {
|
|
527
956
|
const r = arguments[o];
|
|
@@ -531,118 +960,118 @@ function assign(e, ...t) {
|
|
|
531
960
|
}
|
|
532
961
|
return n;
|
|
533
962
|
}
|
|
534
|
-
function
|
|
963
|
+
function wn(e) {
|
|
535
964
|
for (const t of e)
|
|
536
965
|
switch (t.trigger) {
|
|
537
966
|
case "pageLoad":
|
|
538
|
-
|
|
967
|
+
_e(t);
|
|
539
968
|
break;
|
|
540
969
|
case "scrollInView":
|
|
541
|
-
|
|
970
|
+
$n(t);
|
|
542
971
|
break;
|
|
543
972
|
}
|
|
544
973
|
}
|
|
545
|
-
function
|
|
974
|
+
function Xe(e) {
|
|
546
975
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
547
976
|
}
|
|
548
|
-
function
|
|
549
|
-
const n =
|
|
977
|
+
function Ze(e, t) {
|
|
978
|
+
const n = In(e), o = getComputedStyle(t), r = e.steps[0].styles, i = e.steps[e.steps.length - 1].styles, s = [r, i];
|
|
550
979
|
for (const l of s)
|
|
551
980
|
for (const a of n)
|
|
552
981
|
a in l || (l[a] = o[a]);
|
|
553
982
|
}
|
|
554
|
-
function
|
|
983
|
+
function In(e) {
|
|
555
984
|
const t = [];
|
|
556
985
|
for (const n of e.steps)
|
|
557
986
|
for (const o in n.styles)
|
|
558
987
|
t.indexOf(o) === -1 && t.push(o);
|
|
559
988
|
return t;
|
|
560
989
|
}
|
|
561
|
-
function
|
|
990
|
+
function _e(e) {
|
|
562
991
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
563
992
|
if (!t.length) {
|
|
564
|
-
|
|
993
|
+
Xe(e.elementId || e.id || "");
|
|
565
994
|
return;
|
|
566
995
|
}
|
|
567
996
|
Array.from(t).forEach((n) => {
|
|
568
|
-
|
|
569
|
-
n.style.transition = `all ${e.duration}s ${
|
|
997
|
+
Ze(e, n), n.style.transition = "none", n.style.transitionDelay = "0", q(n.style, e.steps[0].styles), setTimeout(() => {
|
|
998
|
+
n.style.transition = `all ${e.duration}s ${ge(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), q(n.style, e.steps[1].styles), setTimeout(() => {
|
|
570
999
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
571
1000
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
572
1001
|
});
|
|
573
1002
|
});
|
|
574
1003
|
}
|
|
575
|
-
function
|
|
1004
|
+
function $n(e) {
|
|
576
1005
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
577
1006
|
if (!t.length) {
|
|
578
|
-
|
|
1007
|
+
Xe(e.elementId || e.id || "");
|
|
579
1008
|
return;
|
|
580
1009
|
}
|
|
581
1010
|
Array.from(t).forEach((n) => {
|
|
582
|
-
|
|
1011
|
+
Ze(e, n);
|
|
583
1012
|
let o = !1, r = !1;
|
|
584
1013
|
function i() {
|
|
585
1014
|
!o && l(n) ? (o = !0, r = !0, setTimeout(() => {
|
|
586
|
-
|
|
1015
|
+
q(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", s), setTimeout(() => {
|
|
587
1016
|
r = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
588
1017
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
589
|
-
})) : e.repeat && o && !r && !l(n) && (o = !1,
|
|
1018
|
+
})) : e.repeat && o && !r && !l(n) && (o = !1, q(n.style, e.steps[0].styles));
|
|
590
1019
|
}
|
|
591
|
-
const s =
|
|
1020
|
+
const s = Tn(i, 200, {
|
|
592
1021
|
leading: !1
|
|
593
1022
|
});
|
|
594
|
-
function l(
|
|
595
|
-
const
|
|
596
|
-
return
|
|
1023
|
+
function l(h) {
|
|
1024
|
+
const d = h.getBoundingClientRect(), p = window.innerHeight, v = (e.thresholdPercent || 0) / 100 * p;
|
|
1025
|
+
return d.bottom > v && d.top < p - v;
|
|
597
1026
|
}
|
|
598
1027
|
const a = e.steps[0].styles;
|
|
599
|
-
function
|
|
600
|
-
|
|
1028
|
+
function u() {
|
|
1029
|
+
q(n.style, a);
|
|
601
1030
|
}
|
|
602
|
-
|
|
603
|
-
n.style.transition = `all ${e.duration}s ${
|
|
1031
|
+
u(), setTimeout(() => {
|
|
1032
|
+
n.style.transition = `all ${e.duration}s ${ge(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
604
1033
|
}), document.addEventListener("scroll", s, {
|
|
605
1034
|
capture: !0,
|
|
606
1035
|
passive: !0
|
|
607
1036
|
}), i();
|
|
608
1037
|
});
|
|
609
1038
|
}
|
|
610
|
-
const
|
|
1039
|
+
const et = (e) => Object.entries(e).map(([n, o]) => {
|
|
611
1040
|
if (typeof o == "string")
|
|
612
|
-
return `${
|
|
613
|
-
}).filter(
|
|
614
|
-
`),
|
|
1041
|
+
return `${ge(n)}: ${o};`;
|
|
1042
|
+
}).filter(L), Rn = (e) => et(e).join(`
|
|
1043
|
+
`), Wi = ({
|
|
615
1044
|
mediaQuery: e,
|
|
616
1045
|
className: t,
|
|
617
1046
|
styles: n
|
|
618
1047
|
}) => {
|
|
619
1048
|
const o = `.${t} {
|
|
620
|
-
${
|
|
1049
|
+
${Rn(n)}
|
|
621
1050
|
}`;
|
|
622
1051
|
return e ? `${e} {
|
|
623
1052
|
${o}
|
|
624
1053
|
}` : o;
|
|
625
1054
|
};
|
|
626
|
-
function
|
|
1055
|
+
function En({
|
|
627
1056
|
style: e
|
|
628
1057
|
}) {
|
|
629
1058
|
return e;
|
|
630
1059
|
}
|
|
631
|
-
const
|
|
1060
|
+
const Ni = ({
|
|
632
1061
|
block: e,
|
|
633
1062
|
context: t
|
|
634
|
-
}) =>
|
|
1063
|
+
}) => tt(En({
|
|
635
1064
|
style: e.style || {},
|
|
636
1065
|
context: t,
|
|
637
1066
|
block: e
|
|
638
1067
|
}));
|
|
639
|
-
function
|
|
640
|
-
switch (
|
|
1068
|
+
function tt(e) {
|
|
1069
|
+
switch (x) {
|
|
641
1070
|
case "svelte":
|
|
642
1071
|
case "vue":
|
|
643
1072
|
case "solid":
|
|
644
1073
|
case "angular":
|
|
645
|
-
return
|
|
1074
|
+
return et(e).join(" ");
|
|
646
1075
|
case "qwik":
|
|
647
1076
|
case "reactNative":
|
|
648
1077
|
case "react":
|
|
@@ -650,29 +1079,21 @@ function mapStyleObjToStrIfNeeded(e) {
|
|
|
650
1079
|
return e;
|
|
651
1080
|
}
|
|
652
1081
|
}
|
|
653
|
-
const
|
|
1082
|
+
const Bn = ({
|
|
654
1083
|
block: e,
|
|
655
|
-
|
|
656
|
-
registeredComponents: n
|
|
1084
|
+
registeredComponents: t
|
|
657
1085
|
}) => {
|
|
658
|
-
var
|
|
659
|
-
const
|
|
660
|
-
|
|
661
|
-
localState: t.localState,
|
|
662
|
-
rootState: t.rootState,
|
|
663
|
-
rootSetState: t.rootSetState,
|
|
664
|
-
context: t.context,
|
|
665
|
-
shouldEvaluateBindings: !1
|
|
666
|
-
}).component) == null ? void 0 : i.name;
|
|
667
|
-
if (!o)
|
|
1086
|
+
var r;
|
|
1087
|
+
const n = (r = e.component) == null ? void 0 : r.name;
|
|
1088
|
+
if (!n)
|
|
668
1089
|
return null;
|
|
669
|
-
const
|
|
670
|
-
if (
|
|
671
|
-
return
|
|
1090
|
+
const o = t[n];
|
|
1091
|
+
if (o)
|
|
1092
|
+
return o;
|
|
672
1093
|
console.warn(`
|
|
673
|
-
Could not find a registered component named "${
|
|
1094
|
+
Could not find a registered component named "${n}".
|
|
674
1095
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
675
|
-
},
|
|
1096
|
+
}, Pn = ({
|
|
676
1097
|
block: e,
|
|
677
1098
|
context: t
|
|
678
1099
|
}) => {
|
|
@@ -682,7 +1103,7 @@ const getComponent = ({
|
|
|
682
1103
|
} = e;
|
|
683
1104
|
if (!(n != null && n.collection))
|
|
684
1105
|
return;
|
|
685
|
-
const r =
|
|
1106
|
+
const r = G({
|
|
686
1107
|
code: n.collection,
|
|
687
1108
|
localState: t.localState,
|
|
688
1109
|
rootState: t.rootState,
|
|
@@ -693,100 +1114,103 @@ const getComponent = ({
|
|
|
693
1114
|
if (!Array.isArray(r))
|
|
694
1115
|
return;
|
|
695
1116
|
const i = n.collection.split(".").pop(), s = n.itemName || (i ? i + "Item" : "item");
|
|
696
|
-
return r.map((a,
|
|
1117
|
+
return r.map((a, u) => ({
|
|
697
1118
|
context: {
|
|
698
1119
|
...t,
|
|
699
1120
|
localState: {
|
|
700
1121
|
...t.localState,
|
|
701
|
-
$index:
|
|
1122
|
+
$index: u,
|
|
702
1123
|
$item: a,
|
|
703
1124
|
[s]: a,
|
|
704
|
-
[`$${s}Index`]:
|
|
1125
|
+
[`$${s}Index`]: u
|
|
705
1126
|
}
|
|
706
1127
|
},
|
|
707
1128
|
block: o
|
|
708
1129
|
}));
|
|
709
|
-
},
|
|
1130
|
+
}, xn = (e, t) => {
|
|
710
1131
|
var n;
|
|
711
1132
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderLinkComponent ? {
|
|
712
1133
|
builderLinkComponent: t
|
|
713
1134
|
} : {};
|
|
714
|
-
},
|
|
1135
|
+
}, An = (e, t) => {
|
|
715
1136
|
var n;
|
|
716
1137
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderComponents ? {
|
|
717
1138
|
builderComponents: t
|
|
718
1139
|
} : {};
|
|
719
|
-
},
|
|
1140
|
+
}, Vn = (e, t) => {
|
|
720
1141
|
var n;
|
|
721
1142
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderBlock ? {
|
|
722
1143
|
builderBlock: t
|
|
723
1144
|
} : {};
|
|
724
|
-
},
|
|
1145
|
+
}, Wn = (e, t) => {
|
|
725
1146
|
var n;
|
|
726
1147
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
|
|
727
1148
|
builderContext: t
|
|
728
1149
|
} : {};
|
|
729
|
-
},
|
|
1150
|
+
}, Nn = () => Promise.resolve().then(() => Yn).then((e) => e.default).catch((e) => {
|
|
730
1151
|
throw console.error(
|
|
731
1152
|
"Error while attempting to dynamically import component DynamicDiv at ../dynamic-div.vue",
|
|
732
1153
|
e
|
|
733
1154
|
), e;
|
|
734
|
-
}),
|
|
1155
|
+
}), Fn = () => import("./block-styles-gLB-jSXN.js").then((e) => e.default).catch((e) => {
|
|
735
1156
|
throw console.error(
|
|
736
1157
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
737
1158
|
e
|
|
738
1159
|
), e;
|
|
739
|
-
}),
|
|
1160
|
+
}), On = () => import("./block-wrapper-frfIIST_.js").then((e) => e.default).catch((e) => {
|
|
740
1161
|
throw console.error(
|
|
741
1162
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
742
1163
|
e
|
|
743
1164
|
), e;
|
|
744
|
-
}),
|
|
1165
|
+
}), Dn = () => import("./component-ref-IbarjSnq.js").then((e) => e.default).catch((e) => {
|
|
745
1166
|
throw console.error(
|
|
746
1167
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
747
1168
|
e
|
|
748
1169
|
), e;
|
|
749
|
-
}),
|
|
1170
|
+
}), Ln = () => import("./repeated-block-Z-_chLeZ.js").then((e) => e.default).catch((e) => {
|
|
750
1171
|
throw console.error(
|
|
751
1172
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
752
1173
|
e
|
|
753
1174
|
), e;
|
|
754
|
-
}),
|
|
1175
|
+
}), Un = f({
|
|
755
1176
|
name: "block",
|
|
756
1177
|
components: {
|
|
757
|
-
BlockStyles:
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
BlockWrapper:
|
|
761
|
-
DynamicDiv:
|
|
1178
|
+
BlockStyles: j(Fn),
|
|
1179
|
+
RepeatedBlock: j(Ln),
|
|
1180
|
+
ComponentRef: j(Dn),
|
|
1181
|
+
BlockWrapper: j(On),
|
|
1182
|
+
DynamicDiv: j(Nn)
|
|
762
1183
|
},
|
|
763
1184
|
props: ["block", "context", "registeredComponents", "linkComponent"],
|
|
1185
|
+
data() {
|
|
1186
|
+
return {
|
|
1187
|
+
_processedBlock: {
|
|
1188
|
+
value: null,
|
|
1189
|
+
update: !1
|
|
1190
|
+
}
|
|
1191
|
+
};
|
|
1192
|
+
},
|
|
764
1193
|
mounted() {
|
|
765
1194
|
const e = this.processedBlock.id, t = this.processedBlock.animations;
|
|
766
|
-
t && e &&
|
|
1195
|
+
t && e && wn(
|
|
767
1196
|
t.map((n) => ({
|
|
768
1197
|
...n,
|
|
769
1198
|
elementId: e
|
|
770
1199
|
}))
|
|
771
1200
|
);
|
|
772
1201
|
},
|
|
1202
|
+
updated() {
|
|
1203
|
+
},
|
|
773
1204
|
computed: {
|
|
774
|
-
blockComponent() {
|
|
775
|
-
return getComponent({
|
|
776
|
-
block: this.block,
|
|
777
|
-
context: this.context,
|
|
778
|
-
registeredComponents: this.registeredComponents
|
|
779
|
-
});
|
|
780
|
-
},
|
|
781
1205
|
repeatItem() {
|
|
782
|
-
return
|
|
1206
|
+
return Pn({
|
|
783
1207
|
block: this.block,
|
|
784
1208
|
context: this.context
|
|
785
1209
|
});
|
|
786
1210
|
},
|
|
787
1211
|
processedBlock() {
|
|
788
|
-
var
|
|
789
|
-
return (
|
|
1212
|
+
var t;
|
|
1213
|
+
return (t = this.block.repeat) != null && t.collection ? this.block : Ot({
|
|
790
1214
|
block: this.block,
|
|
791
1215
|
localState: this.context.localState,
|
|
792
1216
|
rootState: this.context.rootState,
|
|
@@ -795,6 +1219,12 @@ const getComponent = ({
|
|
|
795
1219
|
shouldEvaluateBindings: !0
|
|
796
1220
|
});
|
|
797
1221
|
},
|
|
1222
|
+
blockComponent() {
|
|
1223
|
+
return Bn({
|
|
1224
|
+
block: this.processedBlock,
|
|
1225
|
+
registeredComponents: this.registeredComponents
|
|
1226
|
+
});
|
|
1227
|
+
},
|
|
798
1228
|
Tag() {
|
|
799
1229
|
var t;
|
|
800
1230
|
return this.block.tagName === "a" || ((t = this.processedBlock.properties) == null ? void 0 : t.href) || this.processedBlock.href ? this.linkComponent || "a" : this.block.tagName || "div";
|
|
@@ -816,11 +1246,11 @@ const getComponent = ({
|
|
|
816
1246
|
blockChildren: this.processedBlock.children ?? [],
|
|
817
1247
|
componentRef: (e = this.blockComponent) == null ? void 0 : e.component,
|
|
818
1248
|
componentOptions: {
|
|
819
|
-
...
|
|
820
|
-
...
|
|
821
|
-
...
|
|
822
|
-
...
|
|
823
|
-
...
|
|
1249
|
+
...Rt(this.processedBlock),
|
|
1250
|
+
...Vn(this.blockComponent, this.processedBlock),
|
|
1251
|
+
...Wn(this.blockComponent, this.context),
|
|
1252
|
+
...xn(this.blockComponent, this.linkComponent),
|
|
1253
|
+
...An(
|
|
824
1254
|
this.blockComponent,
|
|
825
1255
|
this.registeredComponents
|
|
826
1256
|
)
|
|
@@ -830,45 +1260,53 @@ const getComponent = ({
|
|
|
830
1260
|
registeredComponents: this.registeredComponents,
|
|
831
1261
|
builderBlock: this.processedBlock,
|
|
832
1262
|
includeBlockProps: ((t = this.blockComponent) == null ? void 0 : t.noWrap) === !0,
|
|
833
|
-
isInteractive: !((n = this.blockComponent) != null && n.isRSC &&
|
|
1263
|
+
isInteractive: !((n = this.blockComponent) != null && n.isRSC && x === "rsc")
|
|
834
1264
|
};
|
|
835
1265
|
}
|
|
836
1266
|
}
|
|
837
1267
|
});
|
|
838
|
-
function
|
|
839
|
-
var
|
|
840
|
-
const s =
|
|
841
|
-
return e.canShowBlock ? (
|
|
842
|
-
|
|
843
|
-
block: e.
|
|
1268
|
+
function Mn(e, t, n, o, r, i) {
|
|
1269
|
+
var d;
|
|
1270
|
+
const s = y("BlockStyles"), l = y("ComponentRef"), a = y("Block", !0), u = y("BlockWrapper"), h = y("RepeatedBlock");
|
|
1271
|
+
return e.canShowBlock ? (c(), m(T, { key: 0 }, [
|
|
1272
|
+
I(s, {
|
|
1273
|
+
block: e.processedBlock,
|
|
844
1274
|
context: e.context
|
|
845
1275
|
}, null, 8, ["block", "context"]),
|
|
846
|
-
(
|
|
847
|
-
key: 1,
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
linkComponent:
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
1276
|
+
(d = e.blockComponent) != null && d.noWrap ? (c(), m(T, { key: 1 }, [
|
|
1277
|
+
e.repeatItem ? (c(!0), m(T, { key: 1 }, A(e.repeatItem, (p, k) => (c(), g(h, {
|
|
1278
|
+
key: k,
|
|
1279
|
+
repeatContext: p.context,
|
|
1280
|
+
block: p.block,
|
|
1281
|
+
registeredComponents: e.registeredComponents,
|
|
1282
|
+
linkComponent: e.linkComponent
|
|
1283
|
+
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (c(), g(l, {
|
|
1284
|
+
key: 0,
|
|
1285
|
+
componentRef: e.componentRefProps.componentRef,
|
|
1286
|
+
componentOptions: e.componentRefProps.componentOptions,
|
|
1287
|
+
blockChildren: e.componentRefProps.blockChildren,
|
|
1288
|
+
context: e.componentRefProps.context,
|
|
1289
|
+
registeredComponents: e.componentRefProps.registeredComponents,
|
|
1290
|
+
linkComponent: e.componentRefProps.linkComponent,
|
|
1291
|
+
builderBlock: e.componentRefProps.builderBlock,
|
|
1292
|
+
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
1293
|
+
isInteractive: e.componentRefProps.isInteractive
|
|
1294
|
+
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"]))
|
|
1295
|
+
], 64)) : (c(), m(T, { key: 0 }, [
|
|
1296
|
+
e.repeatItem ? (c(!0), m(T, { key: 1 }, A(e.repeatItem, (p, k) => (c(), g(h, {
|
|
1297
|
+
key: k,
|
|
860
1298
|
repeatContext: p.context,
|
|
861
1299
|
block: p.block,
|
|
862
1300
|
registeredComponents: e.registeredComponents,
|
|
863
1301
|
linkComponent: e.linkComponent
|
|
864
|
-
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (
|
|
1302
|
+
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (c(), g(u, {
|
|
865
1303
|
key: 0,
|
|
866
1304
|
Wrapper: e.Tag,
|
|
867
1305
|
block: e.processedBlock,
|
|
868
1306
|
context: e.context
|
|
869
1307
|
}, {
|
|
870
|
-
default:
|
|
871
|
-
|
|
1308
|
+
default: N(() => [
|
|
1309
|
+
I(l, {
|
|
872
1310
|
componentRef: e.componentRefProps.componentRef,
|
|
873
1311
|
componentOptions: e.componentRefProps.componentOptions,
|
|
874
1312
|
blockChildren: e.componentRefProps.blockChildren,
|
|
@@ -879,7 +1317,7 @@ function _sfc_render$p(e, t, n, o, r, i) {
|
|
|
879
1317
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
880
1318
|
isInteractive: e.componentRefProps.isInteractive
|
|
881
1319
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"]),
|
|
882
|
-
(
|
|
1320
|
+
(c(!0), m(T, null, A(e.childrenWithoutParentComponent, (p, k) => (c(), g(a, {
|
|
883
1321
|
key: p.id,
|
|
884
1322
|
block: p,
|
|
885
1323
|
registeredComponents: e.registeredComponents,
|
|
@@ -890,12 +1328,12 @@ function _sfc_render$p(e, t, n, o, r, i) {
|
|
|
890
1328
|
_: 1
|
|
891
1329
|
}, 8, ["Wrapper", "block", "context"]))
|
|
892
1330
|
], 64))
|
|
893
|
-
], 64)) :
|
|
1331
|
+
], 64)) : C("", !0);
|
|
894
1332
|
}
|
|
895
|
-
const
|
|
1333
|
+
const ye = /* @__PURE__ */ b(Un, [["render", Mn]]), Fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
896
1334
|
__proto__: null,
|
|
897
|
-
default:
|
|
898
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1335
|
+
default: ye
|
|
1336
|
+
}, Symbol.toStringTag, { value: "Module" })), Hn = f({
|
|
899
1337
|
name: "builder-blocks-wrapper",
|
|
900
1338
|
props: [
|
|
901
1339
|
"blocks",
|
|
@@ -905,6 +1343,8 @@ const Block = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$p
|
|
|
905
1343
|
"BlocksWrapperProps",
|
|
906
1344
|
"BlocksWrapper"
|
|
907
1345
|
],
|
|
1346
|
+
mounted() {
|
|
1347
|
+
},
|
|
908
1348
|
computed: {
|
|
909
1349
|
className() {
|
|
910
1350
|
var e;
|
|
@@ -914,7 +1354,7 @@ const Block = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$p
|
|
|
914
1354
|
methods: {
|
|
915
1355
|
onClick() {
|
|
916
1356
|
var e, t;
|
|
917
|
-
|
|
1357
|
+
E() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
918
1358
|
{
|
|
919
1359
|
type: "builder.clickEmptyBlocks",
|
|
920
1360
|
data: {
|
|
@@ -927,7 +1367,7 @@ const Block = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$p
|
|
|
927
1367
|
},
|
|
928
1368
|
onMouseEnter() {
|
|
929
1369
|
var e, t;
|
|
930
|
-
|
|
1370
|
+
E() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
931
1371
|
{
|
|
932
1372
|
type: "builder.hoverEmptyBlocks",
|
|
933
1373
|
data: {
|
|
@@ -940,8 +1380,9 @@ const Block = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$p
|
|
|
940
1380
|
}
|
|
941
1381
|
}
|
|
942
1382
|
});
|
|
943
|
-
function
|
|
944
|
-
return
|
|
1383
|
+
function jn(e, t, n, o, r, i) {
|
|
1384
|
+
return c(), g(K(e.BlocksWrapper), S({
|
|
1385
|
+
ref: "blocksWrapperRef",
|
|
945
1386
|
class: e.className + " component-178o76acnws",
|
|
946
1387
|
"builder-path": e.path,
|
|
947
1388
|
"builder-parent-id": e.parent,
|
|
@@ -950,15 +1391,15 @@ function _sfc_render$o(e, t, n, o, r, i) {
|
|
|
950
1391
|
onMouseEnter: (s) => e.onMouseEnter(),
|
|
951
1392
|
onKeyPress: (s) => e.onClick()
|
|
952
1393
|
}, { ...e.BlocksWrapperProps }), {
|
|
953
|
-
default:
|
|
954
|
-
|
|
1394
|
+
default: N(() => [
|
|
1395
|
+
P(e.$slots, "default", {}, void 0, !0)
|
|
955
1396
|
]),
|
|
956
1397
|
_: 3
|
|
957
1398
|
}, 16, ["class", "builder-path", "builder-parent-id", "style", "onClick", "onMouseEnter", "onKeyPress"]);
|
|
958
1399
|
}
|
|
959
|
-
const
|
|
1400
|
+
const Kn = /* @__PURE__ */ b(Hn, [["render", jn], ["__scopeId", "data-v-824f09a8"]]), qn = f({
|
|
960
1401
|
name: "builder-blocks",
|
|
961
|
-
components: { BlocksWrapper, Block },
|
|
1402
|
+
components: { BlocksWrapper: Kn, Block: ye },
|
|
962
1403
|
props: [
|
|
963
1404
|
"blocks",
|
|
964
1405
|
"parent",
|
|
@@ -969,48 +1410,48 @@ const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_
|
|
|
969
1410
|
"registeredComponents"
|
|
970
1411
|
],
|
|
971
1412
|
inject: {
|
|
972
|
-
builderContext:
|
|
973
|
-
componentsContext:
|
|
1413
|
+
builderContext: le.key,
|
|
1414
|
+
componentsContext: Ve.key
|
|
974
1415
|
}
|
|
975
1416
|
});
|
|
976
|
-
function
|
|
977
|
-
var a,
|
|
978
|
-
const s =
|
|
979
|
-
return
|
|
1417
|
+
function zn(e, t, n, o, r, i) {
|
|
1418
|
+
var a, u;
|
|
1419
|
+
const s = y("Block"), l = y("BlocksWrapper");
|
|
1420
|
+
return c(), g(l, {
|
|
980
1421
|
blocks: e.blocks,
|
|
981
1422
|
parent: e.parent,
|
|
982
1423
|
path: e.path,
|
|
983
1424
|
styleProp: e.styleProp,
|
|
984
1425
|
BlocksWrapper: ((a = e.context) == null ? void 0 : a.BlocksWrapper) || e.builderContext.BlocksWrapper,
|
|
985
|
-
BlocksWrapperProps: ((
|
|
1426
|
+
BlocksWrapperProps: ((u = e.context) == null ? void 0 : u.BlocksWrapperProps) || e.builderContext.BlocksWrapperProps
|
|
986
1427
|
}, {
|
|
987
|
-
default:
|
|
988
|
-
e.blocks ? (
|
|
989
|
-
key:
|
|
990
|
-
block:
|
|
1428
|
+
default: N(() => [
|
|
1429
|
+
e.blocks ? (c(!0), m(T, { key: 0 }, A(e.blocks, (h, d) => (c(), g(s, {
|
|
1430
|
+
key: h.id,
|
|
1431
|
+
block: h,
|
|
991
1432
|
linkComponent: e.linkComponent,
|
|
992
1433
|
context: e.context || e.builderContext,
|
|
993
1434
|
registeredComponents: e.registeredComponents || e.componentsContext.registeredComponents
|
|
994
|
-
}, null, 8, ["block", "linkComponent", "context", "registeredComponents"]))), 128)) :
|
|
1435
|
+
}, null, 8, ["block", "linkComponent", "context", "registeredComponents"]))), 128)) : C("", !0)
|
|
995
1436
|
]),
|
|
996
1437
|
_: 1
|
|
997
1438
|
}, 8, ["blocks", "parent", "path", "styleProp", "BlocksWrapper", "BlocksWrapperProps"]);
|
|
998
1439
|
}
|
|
999
|
-
const
|
|
1440
|
+
const M = /* @__PURE__ */ b(qn, [["render", zn]]), Jn = f({
|
|
1000
1441
|
name: "dynamic-div",
|
|
1001
1442
|
props: []
|
|
1002
1443
|
});
|
|
1003
|
-
function
|
|
1004
|
-
return
|
|
1005
|
-
|
|
1444
|
+
function Gn(e, t, n, o, r, i) {
|
|
1445
|
+
return c(), m("div", null, [
|
|
1446
|
+
P(e.$slots, "default")
|
|
1006
1447
|
]);
|
|
1007
1448
|
}
|
|
1008
|
-
const
|
|
1449
|
+
const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1009
1450
|
__proto__: null,
|
|
1010
|
-
default:
|
|
1011
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1451
|
+
default: Q
|
|
1452
|
+
}, Symbol.toStringTag, { value: "Module" })), ke = f({
|
|
1012
1453
|
render() {
|
|
1013
|
-
return
|
|
1454
|
+
return Pe("style", {
|
|
1014
1455
|
innerHTML: this.styles,
|
|
1015
1456
|
"data-id": this.id,
|
|
1016
1457
|
nonce: this.nonce
|
|
@@ -1018,7 +1459,7 @@ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_ren
|
|
|
1018
1459
|
},
|
|
1019
1460
|
name: "inlined-styles",
|
|
1020
1461
|
props: ["styles", "id", "nonce"]
|
|
1021
|
-
}),
|
|
1462
|
+
}), nt = {
|
|
1022
1463
|
small: {
|
|
1023
1464
|
min: 320,
|
|
1024
1465
|
default: 321,
|
|
@@ -1034,11 +1475,11 @@ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_ren
|
|
|
1034
1475
|
default: 991,
|
|
1035
1476
|
max: 1200
|
|
1036
1477
|
}
|
|
1037
|
-
},
|
|
1478
|
+
}, Oi = (e, t = nt) => `@media (max-width: ${t[e].max}px)`, Qn = ({
|
|
1038
1479
|
small: e,
|
|
1039
1480
|
medium: t
|
|
1040
1481
|
}) => {
|
|
1041
|
-
const n =
|
|
1482
|
+
const n = pe(nt);
|
|
1042
1483
|
if (!e || !t)
|
|
1043
1484
|
return n;
|
|
1044
1485
|
const o = Math.floor(e / 2);
|
|
@@ -1060,13 +1501,13 @@ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_ren
|
|
|
1060
1501
|
min: i,
|
|
1061
1502
|
default: i + 1
|
|
1062
1503
|
}, n;
|
|
1063
|
-
},
|
|
1504
|
+
}, Xn = (e) => `builder-columns ${e}-breakpoints`, Zn = f({
|
|
1064
1505
|
name: "builder-columns",
|
|
1065
1506
|
components: {
|
|
1066
|
-
InlinedStyles:
|
|
1067
|
-
DynamicRenderer,
|
|
1068
|
-
Blocks,
|
|
1069
|
-
DynamicDiv
|
|
1507
|
+
InlinedStyles: ke,
|
|
1508
|
+
DynamicRenderer: me,
|
|
1509
|
+
Blocks: M,
|
|
1510
|
+
DynamicDiv: Q
|
|
1070
1511
|
},
|
|
1071
1512
|
props: [
|
|
1072
1513
|
"space",
|
|
@@ -1084,8 +1525,8 @@ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_ren
|
|
|
1084
1525
|
cols: this.columns || [],
|
|
1085
1526
|
stackAt: this.stackColumnsAt || "tablet",
|
|
1086
1527
|
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
1087
|
-
TARGET,
|
|
1088
|
-
getColumnsClass
|
|
1528
|
+
TARGET: x,
|
|
1529
|
+
getColumnsClass: Xn
|
|
1089
1530
|
};
|
|
1090
1531
|
},
|
|
1091
1532
|
methods: {
|
|
@@ -1151,7 +1592,7 @@ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_ren
|
|
|
1151
1592
|
},
|
|
1152
1593
|
getWidthForBreakpointSize(e) {
|
|
1153
1594
|
var n, o;
|
|
1154
|
-
return
|
|
1595
|
+
return Qn(
|
|
1155
1596
|
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
1156
1597
|
)[e].max;
|
|
1157
1598
|
},
|
|
@@ -1188,34 +1629,34 @@ const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_ren
|
|
|
1188
1629
|
...e.link ? {
|
|
1189
1630
|
href: e.link
|
|
1190
1631
|
} : {},
|
|
1191
|
-
[
|
|
1192
|
-
style:
|
|
1632
|
+
[_()]: "builder-column",
|
|
1633
|
+
style: tt(this.columnCssVars(t))
|
|
1193
1634
|
};
|
|
1194
1635
|
}
|
|
1195
1636
|
}
|
|
1196
1637
|
});
|
|
1197
|
-
function
|
|
1198
|
-
var
|
|
1199
|
-
const s =
|
|
1200
|
-
return
|
|
1201
|
-
class: e.getColumnsClass((
|
|
1638
|
+
function _n(e, t, n, o, r, i) {
|
|
1639
|
+
var u;
|
|
1640
|
+
const s = y("InlinedStyles"), l = y("Blocks"), a = y("DynamicRenderer");
|
|
1641
|
+
return c(), m("div", S({
|
|
1642
|
+
class: e.getColumnsClass((u = e.builderBlock) == null ? void 0 : u.id) + " div-2brhoa1k8gd",
|
|
1202
1643
|
style: e.columnsCssVars()
|
|
1203
1644
|
}, {}), [
|
|
1204
|
-
e.TARGET !== "reactNative" ? (
|
|
1645
|
+
e.TARGET !== "reactNative" ? (c(), g(s, {
|
|
1205
1646
|
key: 0,
|
|
1206
1647
|
id: "builderio-columns",
|
|
1207
1648
|
styles: e.columnsStyles(),
|
|
1208
1649
|
nonce: e.builderContext.nonce
|
|
1209
|
-
}, null, 8, ["styles", "nonce"])) :
|
|
1210
|
-
(
|
|
1211
|
-
key:
|
|
1212
|
-
TagName: e.getTagName(
|
|
1650
|
+
}, null, 8, ["styles", "nonce"])) : C("", !0),
|
|
1651
|
+
(c(!0), m(T, null, A(e.columns, (h, d) => (c(), g(a, {
|
|
1652
|
+
key: d,
|
|
1653
|
+
TagName: e.getTagName(h),
|
|
1213
1654
|
actionAttributes: {},
|
|
1214
|
-
attributes: e.getAttributes(
|
|
1655
|
+
attributes: e.getAttributes(h, d)
|
|
1215
1656
|
}, {
|
|
1216
|
-
default:
|
|
1217
|
-
|
|
1218
|
-
path: `component.options.columns.${
|
|
1657
|
+
default: N(() => [
|
|
1658
|
+
I(l, {
|
|
1659
|
+
path: `component.options.columns.${d}.blocks`,
|
|
1219
1660
|
parent: e.builderBlock.id,
|
|
1220
1661
|
styleProp: {
|
|
1221
1662
|
flexGrow: "1"
|
|
@@ -1223,54 +1664,54 @@ function _sfc_render$l(e, t, n, o, r, i) {
|
|
|
1223
1664
|
context: e.builderContext,
|
|
1224
1665
|
registeredComponents: e.builderComponents,
|
|
1225
1666
|
linkComponent: e.builderLinkComponent,
|
|
1226
|
-
blocks:
|
|
1667
|
+
blocks: h.blocks
|
|
1227
1668
|
}, null, 8, ["path", "parent", "context", "registeredComponents", "linkComponent", "blocks"])
|
|
1228
1669
|
]),
|
|
1229
1670
|
_: 2
|
|
1230
1671
|
}, 1032, ["TagName", "attributes"]))), 128))
|
|
1231
1672
|
], 16);
|
|
1232
1673
|
}
|
|
1233
|
-
const
|
|
1674
|
+
const eo = /* @__PURE__ */ b(Zn, [["render", _n], ["__scopeId", "data-v-52366f16"]]), to = f({
|
|
1234
1675
|
name: "builder-fragment-component",
|
|
1235
1676
|
props: []
|
|
1236
1677
|
});
|
|
1237
|
-
function
|
|
1238
|
-
return
|
|
1239
|
-
|
|
1678
|
+
function no(e, t, n, o, r, i) {
|
|
1679
|
+
return c(), m("span", null, [
|
|
1680
|
+
P(e.$slots, "default")
|
|
1240
1681
|
]);
|
|
1241
1682
|
}
|
|
1242
|
-
const
|
|
1243
|
-
function
|
|
1683
|
+
const oo = /* @__PURE__ */ b(to, [["render", no]]);
|
|
1684
|
+
function $e(e) {
|
|
1244
1685
|
return e.replace(/http(s)?:/, "");
|
|
1245
1686
|
}
|
|
1246
|
-
function
|
|
1687
|
+
function ro(e = "", t, n) {
|
|
1247
1688
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), r = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1248
1689
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + r + t + "=" + encodeURIComponent(n);
|
|
1249
1690
|
}
|
|
1250
|
-
function
|
|
1691
|
+
function io(e, t) {
|
|
1251
1692
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1252
1693
|
return e;
|
|
1253
1694
|
if (t === "master")
|
|
1254
|
-
return
|
|
1695
|
+
return $e(e);
|
|
1255
1696
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1256
1697
|
if (n) {
|
|
1257
1698
|
const o = e.split(n[0]), r = n[3], i = t.match("x") ? t : `${t}x`;
|
|
1258
|
-
return
|
|
1699
|
+
return $e(`${o[0]}_${i}${r}`);
|
|
1259
1700
|
}
|
|
1260
1701
|
return null;
|
|
1261
1702
|
}
|
|
1262
|
-
function
|
|
1703
|
+
function oe(e) {
|
|
1263
1704
|
if (!e)
|
|
1264
1705
|
return e;
|
|
1265
1706
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
1266
1707
|
if (e.match(/builder\.io/)) {
|
|
1267
1708
|
let n = e;
|
|
1268
1709
|
const o = Number(e.split("?width=")[1]);
|
|
1269
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${
|
|
1710
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${ro(e, "width", r)} ${r}w`).concat([n]).join(", ");
|
|
1270
1711
|
}
|
|
1271
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1712
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [io(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
1272
1713
|
}
|
|
1273
|
-
const
|
|
1714
|
+
const so = f({
|
|
1274
1715
|
name: "builder-image",
|
|
1275
1716
|
props: [
|
|
1276
1717
|
"image",
|
|
@@ -1300,10 +1741,10 @@ const _sfc_main$k = defineComponent({
|
|
|
1300
1741
|
if (!this.noWebp) {
|
|
1301
1742
|
if (this.srcset && ((n = this.image) != null && n.includes("builder.io/api/v1/image"))) {
|
|
1302
1743
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
1303
|
-
return console.debug("Removed given srcset"),
|
|
1744
|
+
return console.debug("Removed given srcset"), oe(t);
|
|
1304
1745
|
} else if (this.image && !this.srcset)
|
|
1305
|
-
return
|
|
1306
|
-
return
|
|
1746
|
+
return oe(t);
|
|
1747
|
+
return oe(t);
|
|
1307
1748
|
}
|
|
1308
1749
|
},
|
|
1309
1750
|
webpSrcSet() {
|
|
@@ -1321,211 +1762,76 @@ const _sfc_main$k = defineComponent({
|
|
|
1321
1762
|
return this.aspectRatio ? e : void 0;
|
|
1322
1763
|
}
|
|
1323
1764
|
}
|
|
1324
|
-
}),
|
|
1765
|
+
}), ao = ["srcset"], lo = ["loading", "fetchpriority", "alt", "role", "src", "srcset", "sizes"], co = {
|
|
1325
1766
|
key: 2,
|
|
1326
1767
|
class: "div-1pl23ac79ld-2"
|
|
1327
1768
|
};
|
|
1328
|
-
function
|
|
1329
|
-
var s, l, a,
|
|
1330
|
-
return
|
|
1331
|
-
|
|
1332
|
-
e.webpSrcSet ? (
|
|
1769
|
+
function uo(e, t, n, o, r, i) {
|
|
1770
|
+
var s, l, a, u, h, d;
|
|
1771
|
+
return c(), m(T, null, [
|
|
1772
|
+
z("picture", null, [
|
|
1773
|
+
e.webpSrcSet ? (c(), m("source", {
|
|
1333
1774
|
key: 0,
|
|
1334
1775
|
type: "image/webp",
|
|
1335
1776
|
srcset: e.webpSrcSet
|
|
1336
|
-
}, null, 8,
|
|
1337
|
-
|
|
1777
|
+
}, null, 8, ao)) : C("", !0),
|
|
1778
|
+
z("img", {
|
|
1338
1779
|
loading: e.highPriority ? "eager" : "lazy",
|
|
1339
1780
|
fetchpriority: e.highPriority ? "high" : "auto",
|
|
1340
1781
|
alt: e.altText,
|
|
1341
1782
|
role: e.altText ? void 0 : "presentation",
|
|
1342
|
-
style:
|
|
1783
|
+
style: D({
|
|
1343
1784
|
objectPosition: e.backgroundPosition || "center",
|
|
1344
1785
|
objectFit: e.backgroundSize || "cover",
|
|
1345
1786
|
...e.aspectRatioCss
|
|
1346
1787
|
}),
|
|
1347
|
-
class:
|
|
1788
|
+
class: J(
|
|
1348
1789
|
"builder-image" + (e.className ? " " + e.className : "") + " img-1pl23ac79ld"
|
|
1349
1790
|
),
|
|
1350
1791
|
src: e.image,
|
|
1351
1792
|
srcset: e.srcSetToUse,
|
|
1352
1793
|
sizes: e.sizes
|
|
1353
|
-
}, null, 14,
|
|
1794
|
+
}, null, 14, lo)
|
|
1354
1795
|
]),
|
|
1355
|
-
e.aspectRatio && !((l = (s = e.builderBlock) == null ? void 0 : s.children) != null && l.length && e.fitContent) ? (
|
|
1356
|
-
key: 0,
|
|
1357
|
-
class: "builder-image-sizer div-1pl23ac79ld",
|
|
1358
|
-
style:
|
|
1359
|
-
paddingTop: e.aspectRatio * 100 + "%"
|
|
1360
|
-
})
|
|
1361
|
-
}, null, 4)) :
|
|
1362
|
-
(
|
|
1363
|
-
!e.fitContent && ((
|
|
1364
|
-
|
|
1365
|
-
])) :
|
|
1366
|
-
], 64);
|
|
1367
|
-
}
|
|
1368
|
-
const
|
|
1369
|
-
name: "builder-section-component",
|
|
1370
|
-
props: ["attributes", "maxWidth"],
|
|
1371
|
-
data() {
|
|
1372
|
-
return { filterAttrs };
|
|
1373
|
-
}
|
|
1374
|
-
});
|
|
1375
|
-
function _sfc_render$i(e, t, n, o, r, i) {
|
|
1376
|
-
return openBlock(), createElementBlock("section", mergeProps({
|
|
1377
|
-
style: {
|
|
1378
|
-
width: "100%",
|
|
1379
|
-
alignSelf: "stretch",
|
|
1380
|
-
flexGrow: 1,
|
|
1381
|
-
boxSizing: "border-box",
|
|
1382
|
-
maxWidth: e.maxWidth || 1200,
|
|
1383
|
-
display: "flex",
|
|
1384
|
-
flexDirection: "column",
|
|
1385
|
-
alignItems: "stretch",
|
|
1386
|
-
marginLeft: "auto",
|
|
1387
|
-
marginRight: "auto"
|
|
1388
|
-
}
|
|
1389
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
1390
|
-
renderSlot(e.$slots, "default")
|
|
1391
|
-
], 16);
|
|
1392
|
-
}
|
|
1393
|
-
const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i]]), getTopLevelDomain = (e) => {
|
|
1394
|
-
if (e === "localhost" || e === "127.0.0.1")
|
|
1395
|
-
return e;
|
|
1396
|
-
const t = e.split(".");
|
|
1397
|
-
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
1398
|
-
}, getCookieSync = ({
|
|
1399
|
-
name: e,
|
|
1400
|
-
canTrack: t
|
|
1401
|
-
}) => {
|
|
1402
|
-
var n;
|
|
1403
|
-
try {
|
|
1404
|
-
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
1405
|
-
} catch (o) {
|
|
1406
|
-
logger.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
1407
|
-
return;
|
|
1408
|
-
}
|
|
1409
|
-
}, getCookie = async (e) => getCookieSync(e), stringifyCookie = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(checkIsDefined).join("; "), SECURE_CONFIG = [["secure", ""], ["SameSite", "None"]], createCookieString = ({
|
|
1410
|
-
name: e,
|
|
1411
|
-
value: t,
|
|
1412
|
-
expires: n
|
|
1413
|
-
}) => {
|
|
1414
|
-
const r = (isBrowser() ? location.protocol === "https:" : !0) ? SECURE_CONFIG : [[]], i = n ? [["expires", n.toUTCString()]] : [[]], s = [[e, t], ...i, ["path", "/"], ["domain", getTopLevelDomain(window.location.hostname)], ...r];
|
|
1415
|
-
return stringifyCookie(s);
|
|
1416
|
-
}, setCookie = async ({
|
|
1417
|
-
name: e,
|
|
1418
|
-
value: t,
|
|
1419
|
-
expires: n,
|
|
1420
|
-
canTrack: o
|
|
1421
|
-
}) => {
|
|
1422
|
-
try {
|
|
1423
|
-
if (!o)
|
|
1424
|
-
return;
|
|
1425
|
-
const r = createCookieString({
|
|
1426
|
-
name: e,
|
|
1427
|
-
value: t,
|
|
1428
|
-
expires: n
|
|
1429
|
-
});
|
|
1430
|
-
document.cookie = r;
|
|
1431
|
-
} catch (r) {
|
|
1432
|
-
logger.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
|
|
1433
|
-
}
|
|
1434
|
-
}, BUILDER_STORE_PREFIX = "builder.tests", getContentTestKey = (e) => `${BUILDER_STORE_PREFIX}.${e}`, getContentVariationCookie = ({
|
|
1435
|
-
contentId: e
|
|
1436
|
-
}) => getCookie({
|
|
1437
|
-
name: getContentTestKey(e),
|
|
1438
|
-
canTrack: !0
|
|
1439
|
-
}), getContentVariationCookieSync = ({
|
|
1440
|
-
contentId: e
|
|
1441
|
-
}) => getCookieSync({
|
|
1442
|
-
name: getContentTestKey(e),
|
|
1443
|
-
canTrack: !0
|
|
1444
|
-
}), setContentVariationCookie = ({
|
|
1445
|
-
contentId: e,
|
|
1446
|
-
value: t
|
|
1447
|
-
}) => setCookie({
|
|
1448
|
-
name: getContentTestKey(e),
|
|
1449
|
-
value: t,
|
|
1450
|
-
canTrack: !0
|
|
1451
|
-
}), checkIsBuilderContentWithVariations = (e) => checkIsDefined(e.id) && checkIsDefined(e.variations) && Object.keys(e.variations).length > 0, getRandomVariationId = ({
|
|
1452
|
-
id: e,
|
|
1453
|
-
variations: t
|
|
1454
|
-
}) => {
|
|
1455
|
-
var r;
|
|
1456
|
-
let n = 0;
|
|
1457
|
-
const o = Math.random();
|
|
1458
|
-
for (const i in t) {
|
|
1459
|
-
const s = (r = t[i]) == null ? void 0 : r.testRatio;
|
|
1460
|
-
if (n += s, o < n)
|
|
1461
|
-
return i;
|
|
1796
|
+
e.aspectRatio && !((l = (s = e.builderBlock) == null ? void 0 : s.children) != null && l.length && e.fitContent) ? (c(), m("div", {
|
|
1797
|
+
key: 0,
|
|
1798
|
+
class: "builder-image-sizer div-1pl23ac79ld",
|
|
1799
|
+
style: D({
|
|
1800
|
+
paddingTop: e.aspectRatio * 100 + "%"
|
|
1801
|
+
})
|
|
1802
|
+
}, null, 4)) : C("", !0),
|
|
1803
|
+
(u = (a = e.builderBlock) == null ? void 0 : a.children) != null && u.length && e.fitContent ? P(e.$slots, "default", { key: 1 }, void 0, !0) : C("", !0),
|
|
1804
|
+
!e.fitContent && ((d = (h = e.builderBlock) == null ? void 0 : h.children) != null && d.length) ? (c(), m("div", co, [
|
|
1805
|
+
P(e.$slots, "default", {}, void 0, !0)
|
|
1806
|
+
])) : C("", !0)
|
|
1807
|
+
], 64);
|
|
1808
|
+
}
|
|
1809
|
+
const po = /* @__PURE__ */ b(so, [["render", uo], ["__scopeId", "data-v-b1147753"]]), mo = f({
|
|
1810
|
+
name: "builder-section-component",
|
|
1811
|
+
props: ["attributes", "maxWidth"],
|
|
1812
|
+
data() {
|
|
1813
|
+
return { filterAttrs: V };
|
|
1462
1814
|
}
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
!
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
testVariationId: n.id,
|
|
1484
|
-
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
1485
|
-
};
|
|
1486
|
-
}, handleABTestingSync = ({
|
|
1487
|
-
item: e,
|
|
1488
|
-
canTrack: t
|
|
1489
|
-
}) => {
|
|
1490
|
-
if (!t)
|
|
1491
|
-
return e;
|
|
1492
|
-
if (!e)
|
|
1493
|
-
return;
|
|
1494
|
-
if (!checkIsBuilderContentWithVariations(e))
|
|
1495
|
-
return e;
|
|
1496
|
-
const n = getContentVariationCookieSync({
|
|
1497
|
-
contentId: e.id
|
|
1498
|
-
}) || getAndSetVariantId({
|
|
1499
|
-
variations: e.variations,
|
|
1500
|
-
id: e.id
|
|
1501
|
-
}), o = getTestFields({
|
|
1502
|
-
item: e,
|
|
1503
|
-
testGroupId: n
|
|
1504
|
-
});
|
|
1505
|
-
return {
|
|
1506
|
-
...e,
|
|
1507
|
-
...o
|
|
1508
|
-
};
|
|
1509
|
-
}, handleABTesting = async ({
|
|
1510
|
-
item: e,
|
|
1511
|
-
canTrack: t
|
|
1512
|
-
}) => {
|
|
1513
|
-
if (!t || !checkIsBuilderContentWithVariations(e))
|
|
1514
|
-
return e;
|
|
1515
|
-
const o = await getContentVariationCookie({
|
|
1516
|
-
contentId: e.id
|
|
1517
|
-
}) || getAndSetVariantId({
|
|
1518
|
-
variations: e.variations,
|
|
1519
|
-
id: e.id
|
|
1520
|
-
}), r = getTestFields({
|
|
1521
|
-
item: e,
|
|
1522
|
-
testGroupId: o
|
|
1523
|
-
});
|
|
1524
|
-
return {
|
|
1525
|
-
...e,
|
|
1526
|
-
...r
|
|
1527
|
-
};
|
|
1528
|
-
}, getDefaultCanTrack = (e) => checkIsDefined(e) ? e : !0, defaultTitle = {
|
|
1815
|
+
});
|
|
1816
|
+
function ho(e, t, n, o, r, i) {
|
|
1817
|
+
return c(), m("section", S({
|
|
1818
|
+
style: {
|
|
1819
|
+
width: "100%",
|
|
1820
|
+
alignSelf: "stretch",
|
|
1821
|
+
flexGrow: 1,
|
|
1822
|
+
boxSizing: "border-box",
|
|
1823
|
+
maxWidth: e.maxWidth || 1200,
|
|
1824
|
+
display: "flex",
|
|
1825
|
+
flexDirection: "column",
|
|
1826
|
+
alignItems: "stretch",
|
|
1827
|
+
marginLeft: "auto",
|
|
1828
|
+
marginRight: "auto"
|
|
1829
|
+
}
|
|
1830
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
1831
|
+
P(e.$slots, "default")
|
|
1832
|
+
], 16);
|
|
1833
|
+
}
|
|
1834
|
+
const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
|
|
1529
1835
|
"@type": "@builder.io/sdk:Element",
|
|
1530
1836
|
layerName: "Accordion item title",
|
|
1531
1837
|
responsiveStyles: {
|
|
@@ -1554,7 +1860,7 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render
|
|
|
1554
1860
|
}
|
|
1555
1861
|
}
|
|
1556
1862
|
}]
|
|
1557
|
-
},
|
|
1863
|
+
}, ie = {
|
|
1558
1864
|
"@type": "@builder.io/sdk:Element",
|
|
1559
1865
|
layerName: "Accordion item detail",
|
|
1560
1866
|
responsiveStyles: {
|
|
@@ -1585,7 +1891,7 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render
|
|
|
1585
1891
|
}
|
|
1586
1892
|
}
|
|
1587
1893
|
}]
|
|
1588
|
-
},
|
|
1894
|
+
}, bo = {
|
|
1589
1895
|
name: "Builder:Accordion",
|
|
1590
1896
|
canHaveChildren: !0,
|
|
1591
1897
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -1602,19 +1908,19 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render
|
|
|
1602
1908
|
name: "title",
|
|
1603
1909
|
type: "uiBlocks",
|
|
1604
1910
|
hideFromUI: !0,
|
|
1605
|
-
defaultValue: [
|
|
1911
|
+
defaultValue: [re]
|
|
1606
1912
|
}, {
|
|
1607
1913
|
name: "detail",
|
|
1608
1914
|
type: "uiBlocks",
|
|
1609
1915
|
hideFromUI: !0,
|
|
1610
|
-
defaultValue: [
|
|
1916
|
+
defaultValue: [ie]
|
|
1611
1917
|
}],
|
|
1612
1918
|
defaultValue: [{
|
|
1613
|
-
title: [
|
|
1614
|
-
detail: [
|
|
1919
|
+
title: [re],
|
|
1920
|
+
detail: [ie]
|
|
1615
1921
|
}, {
|
|
1616
|
-
title: [
|
|
1617
|
-
detail: [
|
|
1922
|
+
title: [re],
|
|
1923
|
+
detail: [ie]
|
|
1618
1924
|
}],
|
|
1619
1925
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
1620
1926
|
}, {
|
|
@@ -1649,9 +1955,9 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render
|
|
|
1649
1955
|
builderComponents: !0,
|
|
1650
1956
|
builderLinkComponent: !0
|
|
1651
1957
|
}
|
|
1652
|
-
},
|
|
1958
|
+
}, go = (e) => e.toString(), yo = f({
|
|
1653
1959
|
name: "builder-accordion",
|
|
1654
|
-
components: { Blocks },
|
|
1960
|
+
components: { Blocks: M },
|
|
1655
1961
|
props: [
|
|
1656
1962
|
"grid",
|
|
1657
1963
|
"oneAtATime",
|
|
@@ -1663,7 +1969,7 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render
|
|
|
1663
1969
|
"builderLinkComponent"
|
|
1664
1970
|
],
|
|
1665
1971
|
data() {
|
|
1666
|
-
return { open: [], convertOrderNumberToString };
|
|
1972
|
+
return { open: [], convertOrderNumberToString: go };
|
|
1667
1973
|
},
|
|
1668
1974
|
computed: {
|
|
1669
1975
|
onlyOneAtATime() {
|
|
@@ -1744,25 +2050,25 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render
|
|
|
1744
2050
|
this.open.includes(e) ? this.open = this.onlyOneAtATime ? [] : this.open.filter((t) => t !== e) : this.open = this.onlyOneAtATime ? [e] : this.open.concat(e);
|
|
1745
2051
|
}
|
|
1746
2052
|
}
|
|
1747
|
-
}),
|
|
1748
|
-
function
|
|
1749
|
-
const s =
|
|
1750
|
-
return
|
|
2053
|
+
}), ko = ["data-index", "onClick"];
|
|
2054
|
+
function vo(e, t, n, o, r, i) {
|
|
2055
|
+
const s = y("Blocks");
|
|
2056
|
+
return c(), m("div", {
|
|
1751
2057
|
class: "builder-accordion",
|
|
1752
|
-
style:
|
|
2058
|
+
style: D(e.accordionStyles)
|
|
1753
2059
|
}, [
|
|
1754
|
-
(
|
|
1755
|
-
|
|
1756
|
-
class:
|
|
1757
|
-
style:
|
|
2060
|
+
(c(!0), m(T, null, A(e.items, (l, a) => (c(), m(T, { key: a }, [
|
|
2061
|
+
z("div", {
|
|
2062
|
+
class: J(e.getAccordionTitleClassName(a)),
|
|
2063
|
+
style: D({
|
|
1758
2064
|
...e.accordionTitleStyles,
|
|
1759
2065
|
width: e.grid ? e.gridRowWidth : void 0,
|
|
1760
2066
|
order: e.openGridItemOrder !== null ? e.convertOrderNumberToString(a) : e.convertOrderNumberToString(a + 1)
|
|
1761
2067
|
}),
|
|
1762
2068
|
"data-index": a,
|
|
1763
|
-
onClick: (
|
|
2069
|
+
onClick: (u) => e.onClick(a)
|
|
1764
2070
|
}, [
|
|
1765
|
-
|
|
2071
|
+
I(s, {
|
|
1766
2072
|
blocks: l.title,
|
|
1767
2073
|
path: `items.${a}.title`,
|
|
1768
2074
|
parent: e.builderBlock.id,
|
|
@@ -1770,13 +2076,13 @@ function _sfc_render$h(e, t, n, o, r, i) {
|
|
|
1770
2076
|
registeredComponents: e.builderComponents,
|
|
1771
2077
|
linkComponent: e.builderLinkComponent
|
|
1772
2078
|
}, null, 8, ["blocks", "path", "parent", "context", "registeredComponents", "linkComponent"])
|
|
1773
|
-
], 14,
|
|
1774
|
-
e.open.includes(a) ? (
|
|
2079
|
+
], 14, ko),
|
|
2080
|
+
e.open.includes(a) ? (c(), m("div", {
|
|
1775
2081
|
key: 0,
|
|
1776
|
-
class:
|
|
1777
|
-
style:
|
|
2082
|
+
class: J(e.getAccordionDetailClassName(a)),
|
|
2083
|
+
style: D(e.accordionDetailStyles)
|
|
1778
2084
|
}, [
|
|
1779
|
-
|
|
2085
|
+
I(s, {
|
|
1780
2086
|
blocks: l.detail,
|
|
1781
2087
|
path: `items.${a}.detail`,
|
|
1782
2088
|
parent: e.builderBlock.id,
|
|
@@ -1784,11 +2090,11 @@ function _sfc_render$h(e, t, n, o, r, i) {
|
|
|
1784
2090
|
registeredComponents: e.builderComponents,
|
|
1785
2091
|
linkComponent: e.builderLinkComponent
|
|
1786
2092
|
}, null, 8, ["blocks", "path", "parent", "context", "registeredComponents", "linkComponent"])
|
|
1787
|
-
], 6)) :
|
|
2093
|
+
], 6)) : C("", !0)
|
|
1788
2094
|
], 64))), 128))
|
|
1789
2095
|
], 4);
|
|
1790
2096
|
}
|
|
1791
|
-
const
|
|
2097
|
+
const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
|
|
1792
2098
|
name: "Core:Button",
|
|
1793
2099
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1794
2100
|
defaultStyles: {
|
|
@@ -1824,7 +2130,7 @@ const Accordion = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_rend
|
|
|
1824
2130
|
shouldReceiveBuilderProps: {
|
|
1825
2131
|
builderLinkComponent: !0
|
|
1826
2132
|
}
|
|
1827
|
-
},
|
|
2133
|
+
}, To = {
|
|
1828
2134
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1829
2135
|
name: "Columns",
|
|
1830
2136
|
isRSC: !0,
|
|
@@ -2031,13 +2337,13 @@ const Accordion = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_rend
|
|
|
2031
2337
|
builderComponents: !0,
|
|
2032
2338
|
builderLinkComponent: !0
|
|
2033
2339
|
}
|
|
2034
|
-
},
|
|
2340
|
+
}, wo = {
|
|
2035
2341
|
name: "Fragment",
|
|
2036
2342
|
static: !0,
|
|
2037
2343
|
hidden: !0,
|
|
2038
2344
|
canHaveChildren: !0,
|
|
2039
2345
|
noWrap: !0
|
|
2040
|
-
},
|
|
2346
|
+
}, Io = {
|
|
2041
2347
|
name: "Image",
|
|
2042
2348
|
static: !0,
|
|
2043
2349
|
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",
|
|
@@ -2058,15 +2364,15 @@ const Accordion = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_rend
|
|
|
2058
2364
|
onChange: (e) => {
|
|
2059
2365
|
e.delete("srcset"), e.delete("noWebp");
|
|
2060
2366
|
function n(s, l = 6e4) {
|
|
2061
|
-
return new Promise((a,
|
|
2062
|
-
const
|
|
2063
|
-
let
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
},
|
|
2067
|
-
console.warn("Image load failed", p.error),
|
|
2068
|
-
}),
|
|
2069
|
-
|
|
2367
|
+
return new Promise((a, u) => {
|
|
2368
|
+
const h = document.createElement("img");
|
|
2369
|
+
let d = !1;
|
|
2370
|
+
h.onload = () => {
|
|
2371
|
+
d = !0, a(h);
|
|
2372
|
+
}, h.addEventListener("error", (p) => {
|
|
2373
|
+
console.warn("Image load failed", p.error), u(p.error);
|
|
2374
|
+
}), h.src = s, setTimeout(() => {
|
|
2375
|
+
d || u(new Error("Image load timed out"));
|
|
2070
2376
|
}, l);
|
|
2071
2377
|
});
|
|
2072
2378
|
}
|
|
@@ -2145,7 +2451,7 @@ const Accordion = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_rend
|
|
|
2145
2451
|
shouldReceiveBuilderProps: {
|
|
2146
2452
|
builderBlock: !0
|
|
2147
2453
|
}
|
|
2148
|
-
},
|
|
2454
|
+
}, $o = {
|
|
2149
2455
|
name: "Core:Section",
|
|
2150
2456
|
static: !0,
|
|
2151
2457
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -2184,7 +2490,7 @@ const Accordion = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_rend
|
|
|
2184
2490
|
}
|
|
2185
2491
|
}
|
|
2186
2492
|
}]
|
|
2187
|
-
},
|
|
2493
|
+
}, Ro = {
|
|
2188
2494
|
name: "Slot",
|
|
2189
2495
|
isRSC: !0,
|
|
2190
2496
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -2198,17 +2504,18 @@ const Accordion = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_rend
|
|
|
2198
2504
|
defaultValue: "children"
|
|
2199
2505
|
}],
|
|
2200
2506
|
shouldReceiveBuilderProps: {
|
|
2201
|
-
builderContext: !0
|
|
2507
|
+
builderContext: !0,
|
|
2508
|
+
builderComponents: !0
|
|
2202
2509
|
}
|
|
2203
|
-
},
|
|
2510
|
+
}, Eo = f({
|
|
2204
2511
|
name: "builder-slot",
|
|
2205
|
-
components: { Blocks },
|
|
2206
|
-
props: ["builderContext", "name"]
|
|
2512
|
+
components: { Blocks: M },
|
|
2513
|
+
props: ["builderContext", "name", "builderComponents"]
|
|
2207
2514
|
});
|
|
2208
|
-
function
|
|
2209
|
-
var l, a,
|
|
2210
|
-
const s =
|
|
2211
|
-
return
|
|
2515
|
+
function Bo(e, t, n, o, r, i) {
|
|
2516
|
+
var l, a, u;
|
|
2517
|
+
const s = y("Blocks");
|
|
2518
|
+
return c(), m("div", S(
|
|
2212
2519
|
{ style: {
|
|
2213
2520
|
pointerEvents: "auto"
|
|
2214
2521
|
} },
|
|
@@ -2216,15 +2523,16 @@ function _sfc_render$g(e, t, n, o, r, i) {
|
|
|
2216
2523
|
"builder-slot": e.name
|
|
2217
2524
|
}
|
|
2218
2525
|
), [
|
|
2219
|
-
|
|
2526
|
+
I(s, {
|
|
2220
2527
|
parent: (a = e.builderContext.context) == null ? void 0 : a.symbolId,
|
|
2221
2528
|
path: `symbol.data.${e.name}`,
|
|
2222
2529
|
context: e.builderContext,
|
|
2223
|
-
|
|
2224
|
-
|
|
2530
|
+
registeredComponents: e.builderComponents,
|
|
2531
|
+
blocks: (u = e.builderContext.rootState) == null ? void 0 : u[e.name]
|
|
2532
|
+
}, null, 8, ["parent", "path", "context", "registeredComponents", "blocks"])
|
|
2225
2533
|
], 16);
|
|
2226
2534
|
}
|
|
2227
|
-
const
|
|
2535
|
+
const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
|
|
2228
2536
|
name: "Symbol",
|
|
2229
2537
|
noWrap: !0,
|
|
2230
2538
|
static: !0,
|
|
@@ -2263,7 +2571,7 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]
|
|
|
2263
2571
|
builderComponents: !0,
|
|
2264
2572
|
builderLinkComponent: !0
|
|
2265
2573
|
}
|
|
2266
|
-
},
|
|
2574
|
+
}, se = {
|
|
2267
2575
|
"@type": "@builder.io/sdk:Element",
|
|
2268
2576
|
responsiveStyles: {
|
|
2269
2577
|
large: {
|
|
@@ -2285,7 +2593,7 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]
|
|
|
2285
2593
|
text: "New tab"
|
|
2286
2594
|
}
|
|
2287
2595
|
}
|
|
2288
|
-
},
|
|
2596
|
+
}, ae = {
|
|
2289
2597
|
"@type": "@builder.io/sdk:Element",
|
|
2290
2598
|
responsiveStyles: {
|
|
2291
2599
|
large: {
|
|
@@ -2301,7 +2609,7 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]
|
|
|
2301
2609
|
text: "New tab content "
|
|
2302
2610
|
}
|
|
2303
2611
|
}
|
|
2304
|
-
},
|
|
2612
|
+
}, Ao = {
|
|
2305
2613
|
name: "Builder: Tabs",
|
|
2306
2614
|
inputs: [{
|
|
2307
2615
|
name: "tabs",
|
|
@@ -2311,16 +2619,16 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]
|
|
|
2311
2619
|
name: "label",
|
|
2312
2620
|
type: "uiBlocks",
|
|
2313
2621
|
hideFromUI: !0,
|
|
2314
|
-
defaultValue: [
|
|
2622
|
+
defaultValue: [se]
|
|
2315
2623
|
}, {
|
|
2316
2624
|
name: "content",
|
|
2317
2625
|
type: "uiBlocks",
|
|
2318
2626
|
hideFromUI: !0,
|
|
2319
|
-
defaultValue: [
|
|
2627
|
+
defaultValue: [ae]
|
|
2320
2628
|
}],
|
|
2321
2629
|
defaultValue: [{
|
|
2322
2630
|
label: [{
|
|
2323
|
-
...
|
|
2631
|
+
...se,
|
|
2324
2632
|
component: {
|
|
2325
2633
|
name: "Text",
|
|
2326
2634
|
options: {
|
|
@@ -2329,7 +2637,7 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]
|
|
|
2329
2637
|
}
|
|
2330
2638
|
}],
|
|
2331
2639
|
content: [{
|
|
2332
|
-
...
|
|
2640
|
+
...ae,
|
|
2333
2641
|
component: {
|
|
2334
2642
|
name: "Text",
|
|
2335
2643
|
options: {
|
|
@@ -2339,7 +2647,7 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]
|
|
|
2339
2647
|
}]
|
|
2340
2648
|
}, {
|
|
2341
2649
|
label: [{
|
|
2342
|
-
...
|
|
2650
|
+
...se,
|
|
2343
2651
|
component: {
|
|
2344
2652
|
name: "Text",
|
|
2345
2653
|
options: {
|
|
@@ -2348,7 +2656,7 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]
|
|
|
2348
2656
|
}
|
|
2349
2657
|
}],
|
|
2350
2658
|
content: [{
|
|
2351
|
-
...
|
|
2659
|
+
...ae,
|
|
2352
2660
|
component: {
|
|
2353
2661
|
name: "Text",
|
|
2354
2662
|
options: {
|
|
@@ -2404,9 +2712,9 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]
|
|
|
2404
2712
|
builderComponents: !0,
|
|
2405
2713
|
builderLinkComponent: !0
|
|
2406
2714
|
}
|
|
2407
|
-
},
|
|
2715
|
+
}, Vo = f({
|
|
2408
2716
|
name: "builder-tabs",
|
|
2409
|
-
components: { Blocks },
|
|
2717
|
+
components: { Blocks: M },
|
|
2410
2718
|
props: [
|
|
2411
2719
|
"defaultActiveTab",
|
|
2412
2720
|
"tabs",
|
|
@@ -2429,28 +2737,28 @@ const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]
|
|
|
2429
2737
|
e === this.activeTab && this.collapsible ? this.activeTab = -1 : this.activeTab = e;
|
|
2430
2738
|
}
|
|
2431
2739
|
}
|
|
2432
|
-
}),
|
|
2433
|
-
function
|
|
2434
|
-
const s =
|
|
2435
|
-
return
|
|
2436
|
-
|
|
2740
|
+
}), Wo = ["onClick"], No = { key: 0 };
|
|
2741
|
+
function Fo(e, t, n, o, r, i) {
|
|
2742
|
+
const s = y("Blocks");
|
|
2743
|
+
return c(), m("div", null, [
|
|
2744
|
+
z("div", {
|
|
2437
2745
|
class: "builder-tabs-wrap",
|
|
2438
|
-
style:
|
|
2746
|
+
style: D({
|
|
2439
2747
|
display: "flex",
|
|
2440
2748
|
flexDirection: "row",
|
|
2441
2749
|
justifyContent: e.tabHeaderLayout || "flex-start",
|
|
2442
2750
|
overflow: "auto"
|
|
2443
2751
|
})
|
|
2444
2752
|
}, [
|
|
2445
|
-
(
|
|
2753
|
+
(c(!0), m(T, null, A(e.tabs, (l, a) => (c(), m("span", {
|
|
2446
2754
|
key: a,
|
|
2447
|
-
class:
|
|
2448
|
-
style:
|
|
2755
|
+
class: J(`builder-tab-wrap ${e.activeTab === a ? "builder-tab-active" : ""}`),
|
|
2756
|
+
style: D({
|
|
2449
2757
|
...e.activeTab === a ? e.activeTabStyle : {}
|
|
2450
2758
|
}),
|
|
2451
|
-
onClick: (
|
|
2759
|
+
onClick: (u) => e.onClick(a)
|
|
2452
2760
|
}, [
|
|
2453
|
-
|
|
2761
|
+
I(s, {
|
|
2454
2762
|
parent: e.builderBlock.id,
|
|
2455
2763
|
path: `component.options.tabs.${a}.label`,
|
|
2456
2764
|
blocks: l.label,
|
|
@@ -2458,10 +2766,10 @@ function _sfc_render$f(e, t, n, o, r, i) {
|
|
|
2458
2766
|
registeredComponents: e.builderComponents,
|
|
2459
2767
|
linkComponent: e.builderLinkComponent
|
|
2460
2768
|
}, null, 8, ["parent", "path", "blocks", "context", "registeredComponents", "linkComponent"])
|
|
2461
|
-
], 14,
|
|
2769
|
+
], 14, Wo))), 128))
|
|
2462
2770
|
], 4),
|
|
2463
|
-
e.activeTabContent(e.activeTab) ? (
|
|
2464
|
-
|
|
2771
|
+
e.activeTabContent(e.activeTab) ? (c(), m("div", No, [
|
|
2772
|
+
I(s, {
|
|
2465
2773
|
parent: e.builderBlock.id,
|
|
2466
2774
|
path: `component.options.tabs.${e.activeTab}.content`,
|
|
2467
2775
|
blocks: e.activeTabContent(e.activeTab),
|
|
@@ -2469,10 +2777,10 @@ function _sfc_render$f(e, t, n, o, r, i) {
|
|
|
2469
2777
|
registeredComponents: e.builderComponents,
|
|
2470
2778
|
linkComponent: e.builderLinkComponent
|
|
2471
2779
|
}, null, 8, ["parent", "path", "blocks", "context", "registeredComponents", "linkComponent"])
|
|
2472
|
-
])) :
|
|
2780
|
+
])) : C("", !0)
|
|
2473
2781
|
]);
|
|
2474
2782
|
}
|
|
2475
|
-
const
|
|
2783
|
+
const Oo = /* @__PURE__ */ b(Vo, [["render", Fo]]), Do = {
|
|
2476
2784
|
shouldReceiveBuilderProps: {
|
|
2477
2785
|
builderBlock: !1,
|
|
2478
2786
|
builderContext: !0
|
|
@@ -2494,7 +2802,7 @@ const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f]
|
|
|
2494
2802
|
height: "auto",
|
|
2495
2803
|
textAlign: "center"
|
|
2496
2804
|
}
|
|
2497
|
-
},
|
|
2805
|
+
}, Lo = f({
|
|
2498
2806
|
name: "builder-text",
|
|
2499
2807
|
props: ["builderContext", "text"],
|
|
2500
2808
|
computed: {
|
|
@@ -2508,7 +2816,7 @@ const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f]
|
|
|
2508
2816
|
} = e;
|
|
2509
2817
|
return String(((i = this.text) == null ? void 0 : i.toString()) || "").replace(
|
|
2510
2818
|
/{{([^}]+)}}/g,
|
|
2511
|
-
(s, l) =>
|
|
2819
|
+
(s, l) => G({
|
|
2512
2820
|
code: l,
|
|
2513
2821
|
context: t,
|
|
2514
2822
|
localState: n,
|
|
@@ -2519,17 +2827,17 @@ const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f]
|
|
|
2519
2827
|
);
|
|
2520
2828
|
}
|
|
2521
2829
|
}
|
|
2522
|
-
}),
|
|
2523
|
-
function
|
|
2524
|
-
return
|
|
2830
|
+
}), Uo = ["innerHTML"];
|
|
2831
|
+
function Mo(e, t, n, o, r, i) {
|
|
2832
|
+
return c(), m("div", {
|
|
2525
2833
|
class: "builder-text",
|
|
2526
2834
|
innerHTML: e.processedText,
|
|
2527
2835
|
style: {
|
|
2528
2836
|
outline: "none"
|
|
2529
2837
|
}
|
|
2530
|
-
}, null, 8,
|
|
2838
|
+
}, null, 8, Uo);
|
|
2531
2839
|
}
|
|
2532
|
-
const
|
|
2840
|
+
const Ho = /* @__PURE__ */ b(Lo, [["render", Mo]]), jo = {
|
|
2533
2841
|
name: "Custom Code",
|
|
2534
2842
|
static: !0,
|
|
2535
2843
|
requiredPermissions: ["editCode"],
|
|
@@ -2551,7 +2859,7 @@ const Text = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e]
|
|
|
2551
2859
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
2552
2860
|
advanced: !0
|
|
2553
2861
|
}]
|
|
2554
|
-
},
|
|
2862
|
+
}, Ko = f({
|
|
2555
2863
|
name: "builder-custom-code",
|
|
2556
2864
|
props: ["replaceNodes", "code"],
|
|
2557
2865
|
data() {
|
|
@@ -2585,15 +2893,15 @@ const Text = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e]
|
|
|
2585
2893
|
}
|
|
2586
2894
|
}
|
|
2587
2895
|
}
|
|
2588
|
-
}),
|
|
2589
|
-
function
|
|
2590
|
-
return
|
|
2896
|
+
}), qo = ["innerHTML"];
|
|
2897
|
+
function zo(e, t, n, o, r, i) {
|
|
2898
|
+
return c(), m("div", {
|
|
2591
2899
|
ref: "elementRef",
|
|
2592
|
-
class:
|
|
2900
|
+
class: J("builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")),
|
|
2593
2901
|
innerHTML: e.code
|
|
2594
|
-
}, null, 10,
|
|
2902
|
+
}, null, 10, qo);
|
|
2595
2903
|
}
|
|
2596
|
-
const
|
|
2904
|
+
const Jo = /* @__PURE__ */ b(Ko, [["render", zo]]), Go = {
|
|
2597
2905
|
name: "Embed",
|
|
2598
2906
|
static: !0,
|
|
2599
2907
|
inputs: [{
|
|
@@ -2608,7 +2916,7 @@ const customCode = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_ren
|
|
|
2608
2916
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
2609
2917
|
hideFromUI: !0
|
|
2610
2918
|
}]
|
|
2611
|
-
},
|
|
2919
|
+
}, Yo = ["text/javascript", "application/javascript", "application/ecmascript"], Qo = (e) => Yo.includes(e.type), Xo = f({
|
|
2612
2920
|
name: "builder-embed",
|
|
2613
2921
|
props: ["content"],
|
|
2614
2922
|
data() {
|
|
@@ -2641,7 +2949,7 @@ const customCode = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_ren
|
|
|
2641
2949
|
this.scriptsInserted.push(n.src);
|
|
2642
2950
|
const o = document.createElement("script");
|
|
2643
2951
|
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
2644
|
-
} else if (
|
|
2952
|
+
} else if (Qo(n) && !this.scriptsRun.includes(n.innerText))
|
|
2645
2953
|
try {
|
|
2646
2954
|
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
2647
2955
|
} catch (o) {
|
|
@@ -2650,15 +2958,15 @@ const customCode = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_ren
|
|
|
2650
2958
|
}
|
|
2651
2959
|
}
|
|
2652
2960
|
}
|
|
2653
|
-
}),
|
|
2654
|
-
function
|
|
2655
|
-
return
|
|
2961
|
+
}), Zo = ["innerHTML"];
|
|
2962
|
+
function _o(e, t, n, o, r, i) {
|
|
2963
|
+
return c(), m("div", {
|
|
2656
2964
|
class: "builder-embed",
|
|
2657
2965
|
ref: "elem",
|
|
2658
2966
|
innerHTML: e.content
|
|
2659
|
-
}, null, 8,
|
|
2967
|
+
}, null, 8, Zo);
|
|
2660
2968
|
}
|
|
2661
|
-
const
|
|
2969
|
+
const er = /* @__PURE__ */ b(Xo, [["render", _o]]), tr = {
|
|
2662
2970
|
name: "Form:Form",
|
|
2663
2971
|
// editableTags: ['builder-form-error']
|
|
2664
2972
|
defaults: {
|
|
@@ -2895,15 +3203,15 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c
|
|
|
2895
3203
|
builderComponents: !0,
|
|
2896
3204
|
builderLinkComponent: !0
|
|
2897
3205
|
}
|
|
2898
|
-
},
|
|
3206
|
+
}, nr = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], or = () => {
|
|
2899
3207
|
const e = process.env.NODE_ENV || "production";
|
|
2900
|
-
return
|
|
2901
|
-
},
|
|
3208
|
+
return nr.includes(e) ? e : "production";
|
|
3209
|
+
}, rr = (e, t, n) => {
|
|
2902
3210
|
const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r, i) => r != null ? r[i] : r, e);
|
|
2903
3211
|
return o === void 0 || o === e ? n : o;
|
|
2904
|
-
},
|
|
3212
|
+
}, ir = f({
|
|
2905
3213
|
name: "builder-form-component",
|
|
2906
|
-
components: { Block, Blocks },
|
|
3214
|
+
components: { Block: ye, Blocks: M },
|
|
2907
3215
|
props: [
|
|
2908
3216
|
"builderContext",
|
|
2909
3217
|
"previewState",
|
|
@@ -2932,7 +3240,7 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c
|
|
|
2932
3240
|
formState: "unsubmitted",
|
|
2933
3241
|
responseData: null,
|
|
2934
3242
|
formErrorMessage: "",
|
|
2935
|
-
filterAttrs
|
|
3243
|
+
filterAttrs: V
|
|
2936
3244
|
};
|
|
2937
3245
|
},
|
|
2938
3246
|
methods: {
|
|
@@ -2945,7 +3253,7 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c
|
|
|
2945
3253
|
this.builderContext.rootSetState ? (o = (n = this.builderContext).rootSetState) == null || o.call(n, t) : this.builderContext.rootState = t;
|
|
2946
3254
|
},
|
|
2947
3255
|
submissionState() {
|
|
2948
|
-
return
|
|
3256
|
+
return E() && this.previewState || this.formState;
|
|
2949
3257
|
},
|
|
2950
3258
|
onSubmit(e) {
|
|
2951
3259
|
var n;
|
|
@@ -2960,150 +3268,150 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c
|
|
|
2960
3268
|
e.preventDefault();
|
|
2961
3269
|
const o = e.currentTarget || e.target, r = this.customHeaders || {};
|
|
2962
3270
|
let i;
|
|
2963
|
-
const s = new FormData(o), l = Array.from(o.querySelectorAll("input,select,textarea")).filter((
|
|
3271
|
+
const s = new FormData(o), l = Array.from(o.querySelectorAll("input,select,textarea")).filter((d) => !!d.name).map((d) => {
|
|
2964
3272
|
let p;
|
|
2965
|
-
const
|
|
2966
|
-
if (
|
|
2967
|
-
if (
|
|
2968
|
-
if (
|
|
2969
|
-
return p =
|
|
2970
|
-
key:
|
|
3273
|
+
const k = d.name;
|
|
3274
|
+
if (d instanceof HTMLInputElement)
|
|
3275
|
+
if (d.type === "radio") {
|
|
3276
|
+
if (d.checked)
|
|
3277
|
+
return p = d.name, {
|
|
3278
|
+
key: k,
|
|
2971
3279
|
value: p
|
|
2972
3280
|
};
|
|
2973
|
-
} else if (
|
|
2974
|
-
p =
|
|
2975
|
-
else if (
|
|
2976
|
-
const
|
|
2977
|
-
isNaN(
|
|
3281
|
+
} else if (d.type === "checkbox")
|
|
3282
|
+
p = d.checked;
|
|
3283
|
+
else if (d.type === "number" || d.type === "range") {
|
|
3284
|
+
const v = d.valueAsNumber;
|
|
3285
|
+
isNaN(v) || (p = v);
|
|
2978
3286
|
} else
|
|
2979
|
-
|
|
3287
|
+
d.type === "file" ? p = d.files : p = d.value;
|
|
2980
3288
|
else
|
|
2981
|
-
p =
|
|
3289
|
+
p = d.value;
|
|
2982
3290
|
return {
|
|
2983
|
-
key:
|
|
3291
|
+
key: k,
|
|
2984
3292
|
value: p
|
|
2985
3293
|
};
|
|
2986
3294
|
});
|
|
2987
3295
|
let a = this.contentType;
|
|
2988
|
-
if (this.sendSubmissionsTo === "email" && (a = "multipart/form-data"), Array.from(l).forEach(({ value:
|
|
2989
|
-
(
|
|
3296
|
+
if (this.sendSubmissionsTo === "email" && (a = "multipart/form-data"), Array.from(l).forEach(({ value: d }) => {
|
|
3297
|
+
(d instanceof File || Array.isArray(d) && d[0] instanceof File || d instanceof FileList) && (a = "multipart/form-data");
|
|
2990
3298
|
}), a !== "application/json")
|
|
2991
3299
|
i = s;
|
|
2992
3300
|
else {
|
|
2993
|
-
const
|
|
2994
|
-
Array.from(l).forEach(({ value: p, key:
|
|
2995
|
-
|
|
2996
|
-
}), i = JSON.stringify(
|
|
3301
|
+
const d = {};
|
|
3302
|
+
Array.from(l).forEach(({ value: p, key: k }) => {
|
|
3303
|
+
xe(d, k, p);
|
|
3304
|
+
}), i = JSON.stringify(d);
|
|
2997
3305
|
}
|
|
2998
3306
|
a && a !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (r["content-type"] = a));
|
|
2999
|
-
const
|
|
3307
|
+
const u = new CustomEvent("presubmit", {
|
|
3000
3308
|
detail: {
|
|
3001
3309
|
body: i
|
|
3002
3310
|
}
|
|
3003
3311
|
});
|
|
3004
|
-
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(
|
|
3312
|
+
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(u), u.defaultPrevented))
|
|
3005
3313
|
return;
|
|
3006
3314
|
this.formState = "sending";
|
|
3007
|
-
const
|
|
3315
|
+
const h = `${or() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
|
|
3008
3316
|
this.sendSubmissionsToEmail || ""
|
|
3009
3317
|
)}&name=${encodeURIComponent(this.name || "")}`;
|
|
3010
3318
|
fetch(
|
|
3011
|
-
this.sendSubmissionsTo === "email" ?
|
|
3319
|
+
this.sendSubmissionsTo === "email" ? h : this.action,
|
|
3012
3320
|
{
|
|
3013
3321
|
body: i,
|
|
3014
3322
|
headers: r,
|
|
3015
3323
|
method: this.method || "post"
|
|
3016
3324
|
}
|
|
3017
3325
|
).then(
|
|
3018
|
-
async (
|
|
3326
|
+
async (d) => {
|
|
3019
3327
|
let p;
|
|
3020
|
-
const
|
|
3021
|
-
if (
|
|
3022
|
-
let
|
|
3023
|
-
|
|
3024
|
-
formErrorMessage:
|
|
3328
|
+
const k = d.headers.get("content-type");
|
|
3329
|
+
if (k && k.indexOf("application/json") !== -1 ? p = await d.json() : p = await d.text(), !d.ok && this.errorMessagePath) {
|
|
3330
|
+
let v = rr(p, this.errorMessagePath);
|
|
3331
|
+
v && (typeof v != "string" && (v = JSON.stringify(v)), this.formErrorMessage = v, this.mergeNewRootState({
|
|
3332
|
+
formErrorMessage: v
|
|
3025
3333
|
}));
|
|
3026
3334
|
}
|
|
3027
|
-
if (this.responseData = p, this.formState =
|
|
3028
|
-
const
|
|
3335
|
+
if (this.responseData = p, this.formState = d.ok ? "success" : "error", d.ok) {
|
|
3336
|
+
const v = new CustomEvent("submit:success", {
|
|
3029
3337
|
detail: {
|
|
3030
|
-
res:
|
|
3338
|
+
res: d,
|
|
3031
3339
|
body: p
|
|
3032
3340
|
}
|
|
3033
3341
|
});
|
|
3034
3342
|
if (this.$refs.formRef) {
|
|
3035
|
-
if (this.$refs.formRef.dispatchEvent(
|
|
3343
|
+
if (this.$refs.formRef.dispatchEvent(v), v.defaultPrevented)
|
|
3036
3344
|
return;
|
|
3037
3345
|
this.resetFormOnSubmit !== !1 && this.$refs.formRef.reset();
|
|
3038
3346
|
}
|
|
3039
3347
|
if (this.successUrl)
|
|
3040
3348
|
if (this.$refs.formRef) {
|
|
3041
|
-
const
|
|
3349
|
+
const F = new CustomEvent("route", {
|
|
3042
3350
|
detail: {
|
|
3043
3351
|
url: this.successUrl
|
|
3044
3352
|
}
|
|
3045
3353
|
});
|
|
3046
|
-
this.$refs.formRef.dispatchEvent(
|
|
3354
|
+
this.$refs.formRef.dispatchEvent(F), F.defaultPrevented || (location.href = this.successUrl);
|
|
3047
3355
|
} else
|
|
3048
3356
|
location.href = this.successUrl;
|
|
3049
3357
|
}
|
|
3050
3358
|
},
|
|
3051
|
-
(
|
|
3359
|
+
(d) => {
|
|
3052
3360
|
const p = new CustomEvent("submit:error", {
|
|
3053
3361
|
detail: {
|
|
3054
|
-
error:
|
|
3362
|
+
error: d
|
|
3055
3363
|
}
|
|
3056
3364
|
});
|
|
3057
|
-
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(p), p.defaultPrevented) || (this.responseData =
|
|
3365
|
+
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(p), p.defaultPrevented) || (this.responseData = d, this.formState = "error");
|
|
3058
3366
|
}
|
|
3059
3367
|
);
|
|
3060
3368
|
}
|
|
3061
3369
|
}
|
|
3062
3370
|
}
|
|
3063
|
-
}),
|
|
3371
|
+
}), sr = ["validate", "action", "method", "name"], ar = {
|
|
3064
3372
|
key: 3,
|
|
3065
3373
|
class: "builder-form-error-text pre-3i4ezorcfhi"
|
|
3066
3374
|
};
|
|
3067
|
-
function
|
|
3375
|
+
function lr(e, t, n, o, r, i) {
|
|
3068
3376
|
var a;
|
|
3069
|
-
const s =
|
|
3070
|
-
return
|
|
3377
|
+
const s = y("Block"), l = y("Blocks");
|
|
3378
|
+
return c(), m("form", S({
|
|
3071
3379
|
validate: e.validate,
|
|
3072
3380
|
ref: "formRef",
|
|
3073
3381
|
action: !e.sendWithJs && e.action,
|
|
3074
3382
|
method: e.method,
|
|
3075
3383
|
name: e.name,
|
|
3076
|
-
onSubmit: t[0] || (t[0] = (
|
|
3077
|
-
}, { ...e.filterAttrs(e.attributes, "v-on:", !1) },
|
|
3078
|
-
e.builderBlock && e.builderBlock.children ? (
|
|
3384
|
+
onSubmit: t[0] || (t[0] = (u) => e.onSubmit(u))
|
|
3385
|
+
}, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3386
|
+
e.builderBlock && e.builderBlock.children ? (c(!0), m(T, { key: 0 }, A((a = e.builderBlock) == null ? void 0 : a.children, (u, h) => (c(), g(s, {
|
|
3079
3387
|
key: `form-block-${e.idx}`,
|
|
3080
|
-
block:
|
|
3388
|
+
block: u,
|
|
3081
3389
|
context: e.builderContext,
|
|
3082
3390
|
registeredComponents: e.builderComponents,
|
|
3083
3391
|
linkComponent: e.builderLinkComponent
|
|
3084
|
-
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) :
|
|
3085
|
-
e.submissionState() === "error" ? (
|
|
3392
|
+
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : C("", !0),
|
|
3393
|
+
e.submissionState() === "error" ? (c(), g(l, {
|
|
3086
3394
|
key: 1,
|
|
3087
3395
|
path: "errorMessage",
|
|
3088
3396
|
blocks: e.errorMessage,
|
|
3089
3397
|
context: e.builderContext
|
|
3090
|
-
}, null, 8, ["blocks", "context"])) :
|
|
3091
|
-
e.submissionState() === "sending" ? (
|
|
3398
|
+
}, null, 8, ["blocks", "context"])) : C("", !0),
|
|
3399
|
+
e.submissionState() === "sending" ? (c(), g(l, {
|
|
3092
3400
|
key: 2,
|
|
3093
3401
|
path: "sendingMessage",
|
|
3094
3402
|
blocks: e.sendingMessage,
|
|
3095
3403
|
context: e.builderContext
|
|
3096
|
-
}, null, 8, ["blocks", "context"])) :
|
|
3097
|
-
e.submissionState() === "error" && e.responseData ? (
|
|
3098
|
-
e.submissionState() === "success" ? (
|
|
3404
|
+
}, null, 8, ["blocks", "context"])) : C("", !0),
|
|
3405
|
+
e.submissionState() === "error" && e.responseData ? (c(), m("pre", ar, te(JSON.stringify(e.responseData, null, 2)), 1)) : C("", !0),
|
|
3406
|
+
e.submissionState() === "success" ? (c(), g(l, {
|
|
3099
3407
|
key: 4,
|
|
3100
3408
|
path: "successMessage",
|
|
3101
3409
|
blocks: e.successMessage,
|
|
3102
3410
|
context: e.builderContext
|
|
3103
|
-
}, null, 8, ["blocks", "context"])) :
|
|
3104
|
-
], 16,
|
|
3411
|
+
}, null, 8, ["blocks", "context"])) : C("", !0)
|
|
3412
|
+
], 16, sr);
|
|
3105
3413
|
}
|
|
3106
|
-
const
|
|
3414
|
+
const cr = /* @__PURE__ */ b(ir, [["render", lr], ["__scopeId", "data-v-489330f7"]]), dr = {
|
|
3107
3415
|
name: "Form:Input",
|
|
3108
3416
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
3109
3417
|
inputs: [
|
|
@@ -3154,7 +3462,7 @@ const Form = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b]
|
|
|
3154
3462
|
borderStyle: "solid",
|
|
3155
3463
|
borderColor: "#ccc"
|
|
3156
3464
|
}
|
|
3157
|
-
},
|
|
3465
|
+
}, ur = f({
|
|
3158
3466
|
name: "builder-form-input-component",
|
|
3159
3467
|
props: [
|
|
3160
3468
|
"attributes",
|
|
@@ -3166,11 +3474,11 @@ const Form = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b]
|
|
|
3166
3474
|
"required"
|
|
3167
3475
|
],
|
|
3168
3476
|
data() {
|
|
3169
|
-
return { isEditing, filterAttrs };
|
|
3477
|
+
return { isEditing: E, filterAttrs: V };
|
|
3170
3478
|
}
|
|
3171
|
-
}),
|
|
3172
|
-
function
|
|
3173
|
-
return
|
|
3479
|
+
}), pr = ["placeholder", "type", "name", "value", "defaultValue", "required"];
|
|
3480
|
+
function mr(e, t, n, o, r, i) {
|
|
3481
|
+
return c(), m("input", S({
|
|
3174
3482
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
3175
3483
|
placeholder: e.placeholder,
|
|
3176
3484
|
type: e.type,
|
|
@@ -3178,9 +3486,9 @@ function _sfc_render$a(e, t, n, o, r, i) {
|
|
|
3178
3486
|
value: e.value,
|
|
3179
3487
|
defaultValue: e.defaultValue,
|
|
3180
3488
|
required: e.required
|
|
3181
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
3489
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, pr);
|
|
3182
3490
|
}
|
|
3183
|
-
const
|
|
3491
|
+
const hr = /* @__PURE__ */ b(ur, [["render", mr]]), fr = {
|
|
3184
3492
|
name: "Form:Select",
|
|
3185
3493
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
3186
3494
|
defaultStyles: {
|
|
@@ -3222,28 +3530,28 @@ const FormInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_rend
|
|
|
3222
3530
|
}],
|
|
3223
3531
|
static: !0,
|
|
3224
3532
|
noWrap: !0
|
|
3225
|
-
},
|
|
3533
|
+
}, br = f({
|
|
3226
3534
|
name: "builder-select-component",
|
|
3227
3535
|
props: ["attributes", "value", "defaultValue", "name", "required", "options"],
|
|
3228
3536
|
data() {
|
|
3229
|
-
return { isEditing, filterAttrs };
|
|
3537
|
+
return { isEditing: E, filterAttrs: V };
|
|
3230
3538
|
}
|
|
3231
|
-
}),
|
|
3232
|
-
function
|
|
3233
|
-
return
|
|
3539
|
+
}), gr = ["value", "defaultValue", "name", "required"], yr = ["value"];
|
|
3540
|
+
function kr(e, t, n, o, r, i) {
|
|
3541
|
+
return c(), m("select", S({
|
|
3234
3542
|
value: e.value,
|
|
3235
3543
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
3236
3544
|
defaultValue: e.defaultValue,
|
|
3237
3545
|
name: e.name,
|
|
3238
3546
|
required: e.required
|
|
3239
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
3240
|
-
(
|
|
3547
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3548
|
+
(c(!0), m(T, null, A(e.options, (s, l) => (c(), m("option", {
|
|
3241
3549
|
key: `${s.name}-${l}`,
|
|
3242
3550
|
value: s.value
|
|
3243
|
-
},
|
|
3244
|
-
], 16,
|
|
3551
|
+
}, te(s.name || s.value), 9, yr))), 128))
|
|
3552
|
+
], 16, gr);
|
|
3245
3553
|
}
|
|
3246
|
-
const
|
|
3554
|
+
const vr = /* @__PURE__ */ b(br, [["render", kr]]), Cr = {
|
|
3247
3555
|
name: "Form:SubmitButton",
|
|
3248
3556
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
3249
3557
|
defaultStyles: {
|
|
@@ -3268,17 +3576,17 @@ const FormSelect = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_ren
|
|
|
3268
3576
|
// that only shows if advanced setting is flipped
|
|
3269
3577
|
// TODO: defaultChildren
|
|
3270
3578
|
// canHaveChildren: true,
|
|
3271
|
-
},
|
|
3579
|
+
}, Sr = f({
|
|
3272
3580
|
name: "builder-submit-button",
|
|
3273
3581
|
props: ["attributes", "text"],
|
|
3274
3582
|
data() {
|
|
3275
|
-
return { filterAttrs };
|
|
3583
|
+
return { filterAttrs: V };
|
|
3276
3584
|
}
|
|
3277
3585
|
});
|
|
3278
|
-
function
|
|
3279
|
-
return
|
|
3586
|
+
function Tr(e, t, n, o, r, i) {
|
|
3587
|
+
return c(), m("button", S({ type: "submit" }, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), te(e.text), 17);
|
|
3280
3588
|
}
|
|
3281
|
-
const
|
|
3589
|
+
const wr = /* @__PURE__ */ b(Sr, [["render", Tr]]), Ir = {
|
|
3282
3590
|
name: "Form:TextArea",
|
|
3283
3591
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
3284
3592
|
inputs: [{
|
|
@@ -3314,7 +3622,7 @@ const FormSubmitButton = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _s
|
|
|
3314
3622
|
},
|
|
3315
3623
|
static: !0,
|
|
3316
3624
|
noWrap: !0
|
|
3317
|
-
},
|
|
3625
|
+
}, $r = f({
|
|
3318
3626
|
name: "builder-textarea",
|
|
3319
3627
|
props: [
|
|
3320
3628
|
"attributes",
|
|
@@ -3325,19 +3633,19 @@ const FormSubmitButton = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _s
|
|
|
3325
3633
|
"required"
|
|
3326
3634
|
],
|
|
3327
3635
|
data() {
|
|
3328
|
-
return { filterAttrs };
|
|
3636
|
+
return { filterAttrs: V };
|
|
3329
3637
|
}
|
|
3330
|
-
}),
|
|
3331
|
-
function
|
|
3332
|
-
return
|
|
3638
|
+
}), Rr = ["placeholder", "name", "value", "defaultValue", "required"];
|
|
3639
|
+
function Er(e, t, n, o, r, i) {
|
|
3640
|
+
return c(), m("textarea", S({
|
|
3333
3641
|
placeholder: e.placeholder,
|
|
3334
3642
|
name: e.name,
|
|
3335
3643
|
value: e.value,
|
|
3336
3644
|
defaultValue: e.defaultValue,
|
|
3337
3645
|
required: e.required
|
|
3338
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
3646
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, Rr);
|
|
3339
3647
|
}
|
|
3340
|
-
const
|
|
3648
|
+
const Br = /* @__PURE__ */ b($r, [["render", Er]]), Pr = {
|
|
3341
3649
|
// friendlyName?
|
|
3342
3650
|
name: "Raw:Img",
|
|
3343
3651
|
hideFromInsertMenu: !0,
|
|
@@ -3351,7 +3659,7 @@ const Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_rende
|
|
|
3351
3659
|
}],
|
|
3352
3660
|
noWrap: !0,
|
|
3353
3661
|
static: !0
|
|
3354
|
-
},
|
|
3662
|
+
}, xr = f({
|
|
3355
3663
|
name: "builder-img-component",
|
|
3356
3664
|
props: [
|
|
3357
3665
|
"backgroundSize",
|
|
@@ -3362,11 +3670,11 @@ const Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_rende
|
|
|
3362
3670
|
"attributes"
|
|
3363
3671
|
],
|
|
3364
3672
|
data() {
|
|
3365
|
-
return { isEditing, filterAttrs };
|
|
3673
|
+
return { isEditing: E, filterAttrs: V };
|
|
3366
3674
|
}
|
|
3367
|
-
}),
|
|
3368
|
-
function
|
|
3369
|
-
return
|
|
3675
|
+
}), Ar = ["alt", "src"];
|
|
3676
|
+
function Vr(e, t, n, o, r, i) {
|
|
3677
|
+
return c(), m("img", S({
|
|
3370
3678
|
style: {
|
|
3371
3679
|
objectFit: e.backgroundSize || "cover",
|
|
3372
3680
|
objectPosition: e.backgroundPosition || "center"
|
|
@@ -3374,9 +3682,9 @@ function _sfc_render$6(e, t, n, o, r, i) {
|
|
|
3374
3682
|
key: e.isEditing() && e.imgSrc || "default-key",
|
|
3375
3683
|
alt: e.altText,
|
|
3376
3684
|
src: e.imgSrc || e.image
|
|
3377
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
3685
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, Ar);
|
|
3378
3686
|
}
|
|
3379
|
-
const
|
|
3687
|
+
const Wr = /* @__PURE__ */ b(xr, [["render", Vr]]), Nr = {
|
|
3380
3688
|
name: "Video",
|
|
3381
3689
|
canHaveChildren: !0,
|
|
3382
3690
|
defaultStyles: {
|
|
@@ -3460,7 +3768,7 @@ const Img = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]
|
|
|
3460
3768
|
shouldReceiveBuilderProps: {
|
|
3461
3769
|
builderBlock: !0
|
|
3462
3770
|
}
|
|
3463
|
-
},
|
|
3771
|
+
}, Fr = f({
|
|
3464
3772
|
name: "builder-video",
|
|
3465
3773
|
props: [
|
|
3466
3774
|
"autoPlay",
|
|
@@ -3505,16 +3813,16 @@ const Img = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]
|
|
|
3505
3813
|
};
|
|
3506
3814
|
}
|
|
3507
3815
|
}
|
|
3508
|
-
}),
|
|
3816
|
+
}), Or = { style: {
|
|
3509
3817
|
position: "relative"
|
|
3510
|
-
} },
|
|
3818
|
+
} }, Dr = ["preload", "src", "poster"], Lr = ["src"], Ur = {
|
|
3511
3819
|
key: 1,
|
|
3512
3820
|
style: {
|
|
3513
3821
|
display: "flex",
|
|
3514
3822
|
flexDirection: "column",
|
|
3515
3823
|
alignItems: "stretch"
|
|
3516
3824
|
}
|
|
3517
|
-
},
|
|
3825
|
+
}, Mr = {
|
|
3518
3826
|
key: 2,
|
|
3519
3827
|
style: {
|
|
3520
3828
|
pointerEvents: "none",
|
|
@@ -3528,10 +3836,10 @@ const Img = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]
|
|
|
3528
3836
|
height: "100%"
|
|
3529
3837
|
}
|
|
3530
3838
|
};
|
|
3531
|
-
function
|
|
3532
|
-
var s, l, a,
|
|
3533
|
-
return
|
|
3534
|
-
|
|
3839
|
+
function Hr(e, t, n, o, r, i) {
|
|
3840
|
+
var s, l, a, u, h, d, p;
|
|
3841
|
+
return c(), m("div", Or, [
|
|
3842
|
+
z("video", S({
|
|
3535
3843
|
class: "builder-video",
|
|
3536
3844
|
preload: e.preload || "metadata",
|
|
3537
3845
|
style: {
|
|
@@ -3551,97 +3859,87 @@ function _sfc_render$5(e, t, n, o, r, i) {
|
|
|
3551
3859
|
src: e.video || "no-src",
|
|
3552
3860
|
poster: e.posterImage
|
|
3553
3861
|
}, e.spreadProps), [
|
|
3554
|
-
e.lazyLoad ?
|
|
3862
|
+
e.lazyLoad ? C("", !0) : (c(), m("source", {
|
|
3555
3863
|
key: 0,
|
|
3556
3864
|
type: "video/mp4",
|
|
3557
3865
|
src: e.video
|
|
3558
|
-
}, null, 8,
|
|
3559
|
-
], 16,
|
|
3560
|
-
e.aspectRatio && !(e.fitContent && ((a = (l = e.builderBlock) == null ? void 0 : l.children) != null && a.length)) ? (
|
|
3866
|
+
}, null, 8, Lr))
|
|
3867
|
+
], 16, Dr),
|
|
3868
|
+
e.aspectRatio && !(e.fitContent && ((a = (l = e.builderBlock) == null ? void 0 : l.children) != null && a.length)) ? (c(), m("div", {
|
|
3561
3869
|
key: 0,
|
|
3562
|
-
style:
|
|
3870
|
+
style: D({
|
|
3563
3871
|
width: "100%",
|
|
3564
3872
|
paddingTop: e.aspectRatio * 100 + "%",
|
|
3565
3873
|
pointerEvents: "none",
|
|
3566
3874
|
fontSize: "0px"
|
|
3567
3875
|
})
|
|
3568
|
-
}, null, 4)) :
|
|
3569
|
-
(
|
|
3570
|
-
|
|
3571
|
-
])) :
|
|
3572
|
-
(p = (
|
|
3573
|
-
|
|
3574
|
-
])) :
|
|
3876
|
+
}, null, 4)) : C("", !0),
|
|
3877
|
+
(h = (u = e.builderBlock) == null ? void 0 : u.children) != null && h.length && e.fitContent ? (c(), m("div", Ur, [
|
|
3878
|
+
P(e.$slots, "default")
|
|
3879
|
+
])) : C("", !0),
|
|
3880
|
+
(p = (d = e.builderBlock) == null ? void 0 : d.children) != null && p.length && !e.fitContent ? (c(), m("div", Mr, [
|
|
3881
|
+
P(e.$slots, "default")
|
|
3882
|
+
])) : C("", !0)
|
|
3575
3883
|
]);
|
|
3576
3884
|
}
|
|
3577
|
-
const
|
|
3578
|
-
component:
|
|
3579
|
-
...
|
|
3885
|
+
const jr = /* @__PURE__ */ b(Fr, [["render", Hr]]), Kr = () => [{
|
|
3886
|
+
component: Jo,
|
|
3887
|
+
...jo
|
|
3580
3888
|
}, {
|
|
3581
|
-
component:
|
|
3582
|
-
...
|
|
3889
|
+
component: er,
|
|
3890
|
+
...Go
|
|
3583
3891
|
}, {
|
|
3584
|
-
component:
|
|
3585
|
-
...
|
|
3892
|
+
component: cr,
|
|
3893
|
+
...tr
|
|
3586
3894
|
}, {
|
|
3587
|
-
component:
|
|
3588
|
-
...
|
|
3895
|
+
component: hr,
|
|
3896
|
+
...dr
|
|
3589
3897
|
}, {
|
|
3590
|
-
component:
|
|
3591
|
-
...
|
|
3898
|
+
component: wr,
|
|
3899
|
+
...Cr
|
|
3592
3900
|
}, {
|
|
3593
|
-
component:
|
|
3594
|
-
...
|
|
3901
|
+
component: vr,
|
|
3902
|
+
...fr
|
|
3595
3903
|
}, {
|
|
3596
|
-
component:
|
|
3597
|
-
...
|
|
3904
|
+
component: Br,
|
|
3905
|
+
...Ir
|
|
3598
3906
|
}, {
|
|
3599
|
-
component:
|
|
3600
|
-
...
|
|
3907
|
+
component: Wr,
|
|
3908
|
+
...Pr
|
|
3601
3909
|
}, {
|
|
3602
|
-
component:
|
|
3603
|
-
...
|
|
3604
|
-
}],
|
|
3605
|
-
component:
|
|
3606
|
-
...
|
|
3910
|
+
component: jr,
|
|
3911
|
+
...Nr
|
|
3912
|
+
}], Re = () => [{
|
|
3913
|
+
component: wt,
|
|
3914
|
+
...So
|
|
3607
3915
|
}, {
|
|
3608
|
-
component:
|
|
3609
|
-
...
|
|
3916
|
+
component: eo,
|
|
3917
|
+
...To
|
|
3610
3918
|
}, {
|
|
3611
|
-
component:
|
|
3612
|
-
...
|
|
3919
|
+
component: oo,
|
|
3920
|
+
...wo
|
|
3613
3921
|
}, {
|
|
3614
|
-
component:
|
|
3615
|
-
...
|
|
3922
|
+
component: po,
|
|
3923
|
+
...Io
|
|
3616
3924
|
}, {
|
|
3617
|
-
component:
|
|
3618
|
-
|
|
3925
|
+
component: fo,
|
|
3926
|
+
...$o
|
|
3619
3927
|
}, {
|
|
3620
|
-
component:
|
|
3621
|
-
...
|
|
3928
|
+
component: Po,
|
|
3929
|
+
...Ro
|
|
3622
3930
|
}, {
|
|
3623
|
-
component:
|
|
3624
|
-
...
|
|
3931
|
+
component: Ii,
|
|
3932
|
+
...xo
|
|
3625
3933
|
}, {
|
|
3626
|
-
component:
|
|
3627
|
-
...
|
|
3934
|
+
component: Ho,
|
|
3935
|
+
...Do
|
|
3628
3936
|
}, {
|
|
3629
|
-
component:
|
|
3630
|
-
...
|
|
3937
|
+
component: Oo,
|
|
3938
|
+
...Ao
|
|
3631
3939
|
}, {
|
|
3632
|
-
component:
|
|
3633
|
-
...
|
|
3634
|
-
}, ...
|
|
3635
|
-
type: "builder.registerComponent",
|
|
3636
|
-
data: serializeComponentInfo(e)
|
|
3637
|
-
}), serializeFn = (e) => {
|
|
3638
|
-
const t = e.toString().trim();
|
|
3639
|
-
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
3640
|
-
};
|
|
3641
|
-
function serializeComponentInfo(e) {
|
|
3642
|
-
return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ? serializeFn(n) : n));
|
|
3643
|
-
}
|
|
3644
|
-
const UPDATE_COOKIES_AND_STYLES_SCRIPT = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
3940
|
+
component: Co,
|
|
3941
|
+
...bo
|
|
3942
|
+
}, ...Kr()], qr = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
3645
3943
|
function getAndSetVariantId() {
|
|
3646
3944
|
function setCookie(name, value, days) {
|
|
3647
3945
|
let expires = '';
|
|
@@ -3686,359 +3984,84 @@ const UPDATE_COOKIES_AND_STYLES_SCRIPT = `function updateCookiesAndStyles(conten
|
|
|
3686
3984
|
const styleEl = document.currentScript?.previousElementSibling;
|
|
3687
3985
|
if (isHydrationTarget) {
|
|
3688
3986
|
styleEl.remove();
|
|
3689
|
-
const thisScriptEl = document.currentScript;
|
|
3690
|
-
thisScriptEl?.remove();
|
|
3691
|
-
} else {
|
|
3692
|
-
const newStyleStr = variants.concat({
|
|
3693
|
-
id: contentId
|
|
3694
|
-
}).filter(variant => variant.id !== winningVariantId).map(value => {
|
|
3695
|
-
return \`.variant-\${value.id} { display: none; }
|
|
3696
|
-
\`;
|
|
3697
|
-
}).join('');
|
|
3698
|
-
styleEl.innerHTML = newStyleStr;
|
|
3699
|
-
}
|
|
3700
|
-
}`, UPDATE_VARIANT_VISIBILITY_SCRIPT = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
3701
|
-
if (!navigator.cookieEnabled) {
|
|
3702
|
-
return;
|
|
3703
|
-
}
|
|
3704
|
-
function getCookie(name) {
|
|
3705
|
-
const nameEQ = name + '=';
|
|
3706
|
-
const ca = document.cookie.split(';');
|
|
3707
|
-
for (let i = 0; i < ca.length; i++) {
|
|
3708
|
-
let c = ca[i];
|
|
3709
|
-
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
3710
|
-
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
3711
|
-
}
|
|
3712
|
-
return null;
|
|
3713
|
-
}
|
|
3714
|
-
const cookieName = \`builder.tests.\${defaultContentId}\`;
|
|
3715
|
-
const winningVariant = getCookie(cookieName);
|
|
3716
|
-
const parentDiv = document.currentScript?.parentElement;
|
|
3717
|
-
const isDefaultContent = variantContentId === defaultContentId;
|
|
3718
|
-
const isWinningVariant = winningVariant === variantContentId;
|
|
3719
|
-
if (isWinningVariant && !isDefaultContent) {
|
|
3720
|
-
parentDiv?.removeAttribute('hidden');
|
|
3721
|
-
parentDiv?.removeAttribute('aria-hidden');
|
|
3722
|
-
} else if (!isWinningVariant && isDefaultContent) {
|
|
3723
|
-
parentDiv?.setAttribute('hidden', 'true');
|
|
3724
|
-
parentDiv?.setAttribute('aria-hidden', 'true');
|
|
3725
|
-
}
|
|
3726
|
-
if (isHydrationTarget) {
|
|
3727
|
-
if (!isWinningVariant) {
|
|
3728
|
-
parentDiv?.remove();
|
|
3729
|
-
}
|
|
3730
|
-
const thisScriptEl = document.currentScript;
|
|
3731
|
-
thisScriptEl?.remove();
|
|
3732
|
-
}
|
|
3733
|
-
return;
|
|
3734
|
-
}`, UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest", UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME = "builderIoRenderContent", getVariants = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
3735
|
-
...t,
|
|
3736
|
-
testVariationId: t.id,
|
|
3737
|
-
id: e == null ? void 0 : e.id
|
|
3738
|
-
})), checkShouldRenderVariants = ({
|
|
3739
|
-
canTrack: e,
|
|
3740
|
-
content: t
|
|
3741
|
-
}) => !(!(getVariants(t).length > 0) || !e), getIsHydrationTarget = (e) => e === "react" || e === "reactNative", isHydrationTarget = getIsHydrationTarget(TARGET), getInitVariantsFnsScriptString = () => `
|
|
3742
|
-
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
3743
|
-
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
3744
|
-
`, getUpdateCookieAndStylesScript = (e, t) => `
|
|
3745
|
-
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}(
|
|
3746
|
-
"${t}",${JSON.stringify(e)}, ${isHydrationTarget}
|
|
3747
|
-
)`, getUpdateVariantVisibilityScript = ({
|
|
3748
|
-
contentId: e,
|
|
3749
|
-
variationId: t
|
|
3750
|
-
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
3751
|
-
"${t}", "${e}", ${isHydrationTarget}
|
|
3752
|
-
)`, _sfc_main$5 = defineComponent({
|
|
3753
|
-
render() {
|
|
3754
|
-
return h("script", {
|
|
3755
|
-
innerHTML: this.scriptStr,
|
|
3756
|
-
"data-id": this.id,
|
|
3757
|
-
nonce: this.nonce
|
|
3758
|
-
});
|
|
3759
|
-
},
|
|
3760
|
-
name: "inlined-script",
|
|
3761
|
-
props: ["scriptStr", "id", "nonce"]
|
|
3762
|
-
});
|
|
3763
|
-
function getGlobalThis() {
|
|
3764
|
-
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
3765
|
-
}
|
|
3766
|
-
function getFetch() {
|
|
3767
|
-
const e = getGlobalThis().fetch;
|
|
3768
|
-
if (typeof e > "u")
|
|
3769
|
-
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
3770
|
-
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
3771
|
-
return e;
|
|
3772
|
-
}
|
|
3773
|
-
const fetch$1 = getFetch();
|
|
3774
|
-
function flatten(e, t = null, n = ".") {
|
|
3775
|
-
return Object.keys(e).reduce((o, r) => {
|
|
3776
|
-
const i = e[r], s = [t, r].filter(Boolean).join(n);
|
|
3777
|
-
return [typeof i == "object", i !== null, !(Array.isArray(i) && i.length === 0)].every(Boolean) ? {
|
|
3778
|
-
...o,
|
|
3779
|
-
...flatten(i, s, n)
|
|
3780
|
-
} : {
|
|
3781
|
-
...o,
|
|
3782
|
-
[s]: i
|
|
3783
|
-
};
|
|
3784
|
-
}, {});
|
|
3785
|
-
}
|
|
3786
|
-
function flattenMongoQuery(e, t, n = {}) {
|
|
3787
|
-
for (const o in e) {
|
|
3788
|
-
const r = e[o], i = t ? t + "." + o : o;
|
|
3789
|
-
r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ? flattenMongoQuery(r, i, n) : n[i] = r;
|
|
3790
|
-
}
|
|
3791
|
-
return n;
|
|
3792
|
-
}
|
|
3793
|
-
const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUILDER_OPTIONS_PREFIX = "options.", getBuilderSearchParams = (e) => {
|
|
3794
|
-
if (!e)
|
|
3795
|
-
return {};
|
|
3796
|
-
const t = normalizeSearchParams(e), n = {};
|
|
3797
|
-
return Object.keys(t).forEach((o) => {
|
|
3798
|
-
if (o.startsWith(BUILDER_SEARCHPARAMS_PREFIX)) {
|
|
3799
|
-
const r = o.replace(BUILDER_SEARCHPARAMS_PREFIX, "").replace(BUILDER_OPTIONS_PREFIX, "");
|
|
3800
|
-
n[r] = t[o];
|
|
3801
|
-
}
|
|
3802
|
-
}), n;
|
|
3803
|
-
}, getBuilderSearchParamsFromWindow = () => {
|
|
3804
|
-
if (!isBrowser())
|
|
3805
|
-
return {};
|
|
3806
|
-
const e = new URLSearchParams(window.location.search);
|
|
3807
|
-
return getBuilderSearchParams(e);
|
|
3808
|
-
}, isPositiveNumber = (e) => typeof e == "number" && !isNaN(e) && e >= 0, generateContentUrl = (e) => {
|
|
3809
|
-
const {
|
|
3810
|
-
limit: t = 30,
|
|
3811
|
-
userAttributes: n,
|
|
3812
|
-
query: o,
|
|
3813
|
-
model: r,
|
|
3814
|
-
apiKey: i,
|
|
3815
|
-
enrich: s,
|
|
3816
|
-
locale: l,
|
|
3817
|
-
apiVersion: a = DEFAULT_API_VERSION,
|
|
3818
|
-
fields: d,
|
|
3819
|
-
omit: u,
|
|
3820
|
-
offset: c,
|
|
3821
|
-
cacheSeconds: p,
|
|
3822
|
-
staleCacheSeconds: f,
|
|
3823
|
-
sort: m,
|
|
3824
|
-
includeUnpublished: b
|
|
3825
|
-
} = e;
|
|
3826
|
-
if (!i)
|
|
3827
|
-
throw new Error("Missing API key");
|
|
3828
|
-
if (!["v3"].includes(a))
|
|
3829
|
-
throw new Error(`Invalid apiVersion: expected 'v3', received '${a}'`);
|
|
3830
|
-
const C = t !== 1, g = new URL(`https://cdn.builder.io/api/${a}/content/${r}`);
|
|
3831
|
-
if (g.searchParams.set("apiKey", i), g.searchParams.set("limit", String(t)), g.searchParams.set("noTraverse", String(C)), g.searchParams.set("includeRefs", String(!0)), l && g.searchParams.set("locale", l), s && g.searchParams.set("enrich", String(s)), g.searchParams.set("omit", u || "meta.componentsUsed"), d && g.searchParams.set("fields", d), Number.isFinite(c) && c > -1 && g.searchParams.set("offset", String(Math.floor(c))), typeof b == "boolean" && g.searchParams.set("includeUnpublished", String(b)), p && isPositiveNumber(p) && g.searchParams.set("cacheSeconds", String(p)), f && isPositiveNumber(f) && g.searchParams.set("staleCacheSeconds", String(f)), m) {
|
|
3832
|
-
const k = flatten({
|
|
3833
|
-
sort: m
|
|
3834
|
-
});
|
|
3835
|
-
for (const S in k)
|
|
3836
|
-
g.searchParams.set(S, JSON.stringify(k[S]));
|
|
3837
|
-
}
|
|
3838
|
-
const I = {
|
|
3839
|
-
...getBuilderSearchParamsFromWindow(),
|
|
3840
|
-
...normalizeSearchParams(e.options || {})
|
|
3841
|
-
}, T = flatten(I);
|
|
3842
|
-
for (const k in T)
|
|
3843
|
-
g.searchParams.set(k, String(T[k]));
|
|
3844
|
-
if (n && g.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
3845
|
-
const k = flattenMongoQuery({
|
|
3846
|
-
query: o
|
|
3847
|
-
});
|
|
3848
|
-
for (const S in k)
|
|
3849
|
-
g.searchParams.set(S, JSON.stringify(k[S]));
|
|
3850
|
-
}
|
|
3851
|
-
return g;
|
|
3852
|
-
}, checkContentHasResults = (e) => "results" in e;
|
|
3853
|
-
async function fetchOneEntry(e) {
|
|
3854
|
-
const t = await fetchEntries({
|
|
3855
|
-
...e,
|
|
3856
|
-
limit: 1
|
|
3857
|
-
});
|
|
3858
|
-
return t && t[0] || null;
|
|
3859
|
-
}
|
|
3860
|
-
const _fetchContent = async (e) => {
|
|
3861
|
-
const t = generateContentUrl(e);
|
|
3862
|
-
return await (await (e.fetch ?? fetch$1)(t.href, e.fetchOptions)).json();
|
|
3863
|
-
}, _processContentResult = async (e, t, n = generateContentUrl(e)) => {
|
|
3864
|
-
const o = getDefaultCanTrack(e.canTrack);
|
|
3865
|
-
if (n.search.includes("preview="), !o || !(isBrowser() || TARGET === "reactNative"))
|
|
3866
|
-
return t.results;
|
|
3867
|
-
try {
|
|
3868
|
-
const r = [];
|
|
3869
|
-
for (const i of t.results)
|
|
3870
|
-
r.push(await handleABTesting({
|
|
3871
|
-
item: i,
|
|
3872
|
-
canTrack: o
|
|
3873
|
-
}));
|
|
3874
|
-
t.results = r;
|
|
3875
|
-
} catch (r) {
|
|
3876
|
-
logger.error("Could not process A/B tests. ", r);
|
|
3877
|
-
}
|
|
3878
|
-
return t.results;
|
|
3879
|
-
};
|
|
3880
|
-
async function fetchEntries(e) {
|
|
3881
|
-
try {
|
|
3882
|
-
const t = generateContentUrl(e), n = await _fetchContent(e);
|
|
3883
|
-
return checkContentHasResults(n) ? _processContentResult(e, n) : (logger.error("Error fetching data. ", {
|
|
3884
|
-
url: t,
|
|
3885
|
-
content: n,
|
|
3886
|
-
options: e
|
|
3887
|
-
}), null);
|
|
3888
|
-
} catch (t) {
|
|
3889
|
-
return logger.error("Error fetching data. ", t), null;
|
|
3890
|
-
}
|
|
3891
|
-
}
|
|
3892
|
-
function isPreviewing(e) {
|
|
3893
|
-
const t = e || (isBrowser() ? window.location.search : void 0);
|
|
3894
|
-
return t ? getSearchString(t).indexOf("builder.preview=") !== -1 : !1;
|
|
3895
|
-
}
|
|
3896
|
-
function uuidv4() {
|
|
3897
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
3898
|
-
const t = Math.random() * 16 | 0;
|
|
3899
|
-
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
3900
|
-
});
|
|
3901
|
-
}
|
|
3902
|
-
function uuid() {
|
|
3903
|
-
return uuidv4().replace(/-/g, "");
|
|
3904
|
-
}
|
|
3905
|
-
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId", getSessionId = async ({
|
|
3906
|
-
canTrack: e
|
|
3907
|
-
}) => {
|
|
3908
|
-
if (!e)
|
|
3909
|
-
return;
|
|
3910
|
-
const t = await getCookie({
|
|
3911
|
-
name: SESSION_LOCAL_STORAGE_KEY,
|
|
3912
|
-
canTrack: e
|
|
3913
|
-
});
|
|
3914
|
-
if (checkIsDefined(t))
|
|
3915
|
-
return t;
|
|
3916
|
-
{
|
|
3917
|
-
const n = createSessionId();
|
|
3918
|
-
return setSessionId({
|
|
3919
|
-
id: n,
|
|
3920
|
-
canTrack: e
|
|
3921
|
-
}), n;
|
|
3922
|
-
}
|
|
3923
|
-
}, createSessionId = () => uuid(), setSessionId = ({
|
|
3924
|
-
id: e,
|
|
3925
|
-
canTrack: t
|
|
3926
|
-
}) => setCookie({
|
|
3927
|
-
name: SESSION_LOCAL_STORAGE_KEY,
|
|
3928
|
-
value: e,
|
|
3929
|
-
canTrack: t
|
|
3930
|
-
}), getLocalStorage = () => isBrowser() && typeof localStorage < "u" ? localStorage : void 0, getLocalStorageItem = ({
|
|
3931
|
-
key: e,
|
|
3932
|
-
canTrack: t
|
|
3933
|
-
}) => {
|
|
3934
|
-
var n;
|
|
3935
|
-
try {
|
|
3936
|
-
return t ? (n = getLocalStorage()) == null ? void 0 : n.getItem(e) : void 0;
|
|
3937
|
-
} catch (o) {
|
|
3938
|
-
console.debug("[LocalStorage] GET error: ", o);
|
|
3939
|
-
return;
|
|
3940
|
-
}
|
|
3941
|
-
}, setLocalStorageItem = ({
|
|
3942
|
-
key: e,
|
|
3943
|
-
canTrack: t,
|
|
3944
|
-
value: n
|
|
3945
|
-
}) => {
|
|
3946
|
-
var o;
|
|
3947
|
-
try {
|
|
3948
|
-
t && ((o = getLocalStorage()) == null || o.setItem(e, n));
|
|
3949
|
-
} catch (r) {
|
|
3950
|
-
console.debug("[LocalStorage] SET error: ", r);
|
|
3987
|
+
const thisScriptEl = document.currentScript;
|
|
3988
|
+
thisScriptEl?.remove();
|
|
3989
|
+
} else {
|
|
3990
|
+
const newStyleStr = variants.concat({
|
|
3991
|
+
id: contentId
|
|
3992
|
+
}).filter(variant => variant.id !== winningVariantId).map(value => {
|
|
3993
|
+
return \`.variant-\${value.id} { display: none; }
|
|
3994
|
+
\`;
|
|
3995
|
+
}).join('');
|
|
3996
|
+
styleEl.innerHTML = newStyleStr;
|
|
3951
3997
|
}
|
|
3952
|
-
}
|
|
3953
|
-
|
|
3954
|
-
}) => {
|
|
3955
|
-
if (!e)
|
|
3998
|
+
}`, zr = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
3999
|
+
if (!navigator.cookieEnabled) {
|
|
3956
4000
|
return;
|
|
3957
|
-
const t = getLocalStorageItem({
|
|
3958
|
-
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
3959
|
-
canTrack: e
|
|
3960
|
-
});
|
|
3961
|
-
if (checkIsDefined(t))
|
|
3962
|
-
return t;
|
|
3963
|
-
{
|
|
3964
|
-
const n = createVisitorId();
|
|
3965
|
-
return setVisitorId({
|
|
3966
|
-
id: n,
|
|
3967
|
-
canTrack: e
|
|
3968
|
-
}), n;
|
|
3969
4001
|
}
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
}
|
|
3978
|
-
|
|
3979
|
-
}) => {
|
|
3980
|
-
if (!e)
|
|
3981
|
-
return {
|
|
3982
|
-
visitorId: void 0,
|
|
3983
|
-
sessionId: void 0
|
|
3984
|
-
};
|
|
3985
|
-
const t = await getSessionId({
|
|
3986
|
-
canTrack: e
|
|
3987
|
-
}), n = getVisitorId({
|
|
3988
|
-
canTrack: e
|
|
3989
|
-
});
|
|
3990
|
-
return {
|
|
3991
|
-
sessionId: t,
|
|
3992
|
-
visitorId: n
|
|
3993
|
-
};
|
|
3994
|
-
}, createEvent = async ({
|
|
3995
|
-
type: e,
|
|
3996
|
-
canTrack: t,
|
|
3997
|
-
apiKey: n,
|
|
3998
|
-
metadata: o,
|
|
3999
|
-
...r
|
|
4000
|
-
}) => ({
|
|
4001
|
-
type: e,
|
|
4002
|
-
data: {
|
|
4003
|
-
...r,
|
|
4004
|
-
metadata: {
|
|
4005
|
-
url: location.href,
|
|
4006
|
-
...o
|
|
4007
|
-
},
|
|
4008
|
-
...await getTrackingEventData({
|
|
4009
|
-
canTrack: t
|
|
4010
|
-
}),
|
|
4011
|
-
userAttributes: getUserAttributes(),
|
|
4012
|
-
ownerId: n
|
|
4002
|
+
function getCookie(name) {
|
|
4003
|
+
const nameEQ = name + '=';
|
|
4004
|
+
const ca = document.cookie.split(';');
|
|
4005
|
+
for (let i = 0; i < ca.length; i++) {
|
|
4006
|
+
let c = ca[i];
|
|
4007
|
+
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
4008
|
+
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
4009
|
+
}
|
|
4010
|
+
return null;
|
|
4013
4011
|
}
|
|
4014
|
-
}
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4012
|
+
const cookieName = \`builder.tests.\${defaultContentId}\`;
|
|
4013
|
+
const winningVariant = getCookie(cookieName);
|
|
4014
|
+
const parentDiv = document.currentScript?.parentElement;
|
|
4015
|
+
const isDefaultContent = variantContentId === defaultContentId;
|
|
4016
|
+
const isWinningVariant = winningVariant === variantContentId;
|
|
4017
|
+
if (isWinningVariant && !isDefaultContent) {
|
|
4018
|
+
parentDiv?.removeAttribute('hidden');
|
|
4019
|
+
parentDiv?.removeAttribute('aria-hidden');
|
|
4020
|
+
} else if (!isWinningVariant && isDefaultContent) {
|
|
4021
|
+
parentDiv?.setAttribute('hidden', 'true');
|
|
4022
|
+
parentDiv?.setAttribute('aria-hidden', 'true');
|
|
4019
4023
|
}
|
|
4020
|
-
if (
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4024
|
+
if (isHydrationTarget) {
|
|
4025
|
+
if (!isWinningVariant) {
|
|
4026
|
+
parentDiv?.remove();
|
|
4027
|
+
}
|
|
4028
|
+
const thisScriptEl = document.currentScript;
|
|
4029
|
+
thisScriptEl?.remove();
|
|
4030
|
+
}
|
|
4031
|
+
return;
|
|
4032
|
+
}`, ot = "builderIoAbTest", rt = "builderIoRenderContent", Z = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
4033
|
+
...t,
|
|
4034
|
+
testVariationId: t.id,
|
|
4035
|
+
id: e == null ? void 0 : e.id
|
|
4036
|
+
})), Jr = ({
|
|
4037
|
+
canTrack: e,
|
|
4038
|
+
content: t
|
|
4039
|
+
}) => !(!(Z(t).length > 0) || !e), Gr = (e) => e === "react" || e === "reactNative", it = Gr(x), Yr = () => `
|
|
4040
|
+
window.${ot} = ${qr}
|
|
4041
|
+
window.${rt} = ${zr}
|
|
4042
|
+
`, Qr = (e, t) => `
|
|
4043
|
+
window.${ot}(
|
|
4044
|
+
"${t}",${JSON.stringify(e)}, ${it}
|
|
4045
|
+
)`, Xr = ({
|
|
4046
|
+
contentId: e,
|
|
4047
|
+
variationId: t
|
|
4048
|
+
}) => `window.${rt}(
|
|
4049
|
+
"${t}", "${e}", ${it}
|
|
4050
|
+
)`, st = f({
|
|
4051
|
+
render() {
|
|
4052
|
+
return Pe("script", {
|
|
4053
|
+
innerHTML: this.scriptStr,
|
|
4054
|
+
"data-id": this.id,
|
|
4055
|
+
nonce: this.nonce
|
|
4032
4056
|
});
|
|
4033
|
-
}
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
canTrack: !0
|
|
4057
|
+
},
|
|
4058
|
+
name: "inlined-script",
|
|
4059
|
+
props: ["scriptStr", "id", "nonce"]
|
|
4037
4060
|
});
|
|
4038
|
-
function
|
|
4061
|
+
function Ee(e) {
|
|
4039
4062
|
return Math.round(e * 1e3) / 1e3;
|
|
4040
4063
|
}
|
|
4041
|
-
const
|
|
4064
|
+
const Zr = (e, t, n = !0) => {
|
|
4042
4065
|
if (!(e instanceof HTMLElement))
|
|
4043
4066
|
return null;
|
|
4044
4067
|
let o = n ? e : e.parentElement;
|
|
@@ -4049,190 +4072,35 @@ const findParentElement = (e, t, n = !0) => {
|
|
|
4049
4072
|
return o;
|
|
4050
4073
|
} while (o = o.parentElement);
|
|
4051
4074
|
return null;
|
|
4052
|
-
},
|
|
4075
|
+
}, _r = (e) => Zr(e, (t) => {
|
|
4053
4076
|
const n = t.getAttribute("builder-id") || t.id;
|
|
4054
4077
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
4055
|
-
}),
|
|
4078
|
+
}), Be = ({
|
|
4056
4079
|
event: e,
|
|
4057
4080
|
target: t
|
|
4058
4081
|
}) => {
|
|
4059
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, i =
|
|
4082
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, i = Ee(o / n.width), s = Ee(r / n.height);
|
|
4060
4083
|
return {
|
|
4061
4084
|
x: i,
|
|
4062
4085
|
y: s
|
|
4063
4086
|
};
|
|
4064
|
-
},
|
|
4065
|
-
const t = e.target, n = t &&
|
|
4087
|
+
}, ei = (e) => {
|
|
4088
|
+
const t = e.target, n = t && _r(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
4066
4089
|
return {
|
|
4067
4090
|
targetBuilderElement: o || void 0,
|
|
4068
4091
|
metadata: {
|
|
4069
|
-
targetOffset: t ?
|
|
4092
|
+
targetOffset: t ? Be({
|
|
4070
4093
|
event: e,
|
|
4071
4094
|
target: t
|
|
4072
4095
|
}) : void 0,
|
|
4073
|
-
builderTargetOffset: n ?
|
|
4096
|
+
builderTargetOffset: n ? Be({
|
|
4074
4097
|
event: e,
|
|
4075
4098
|
target: n
|
|
4076
4099
|
}) : void 0,
|
|
4077
4100
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
4078
4101
|
}
|
|
4079
4102
|
};
|
|
4080
|
-
},
|
|
4081
|
-
function isFromTrustedHost(e, t) {
|
|
4082
|
-
if (!t.origin.startsWith("http") && !t.origin.startsWith("https"))
|
|
4083
|
-
return !1;
|
|
4084
|
-
const n = new URL(t.origin), o = n.hostname;
|
|
4085
|
-
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
4086
|
-
}
|
|
4087
|
-
const SDK_VERSION = "2.0.8", registry = {};
|
|
4088
|
-
function register(e, t) {
|
|
4089
|
-
let n = registry[e];
|
|
4090
|
-
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
4091
|
-
const o = {
|
|
4092
|
-
type: "builder.register",
|
|
4093
|
-
data: {
|
|
4094
|
-
type: e,
|
|
4095
|
-
info: t
|
|
4096
|
-
}
|
|
4097
|
-
};
|
|
4098
|
-
try {
|
|
4099
|
-
parent.postMessage(o, "*"), parent !== window && window.postMessage(o, "*");
|
|
4100
|
-
} catch (r) {
|
|
4101
|
-
console.debug("Could not postmessage", r);
|
|
4102
|
-
}
|
|
4103
|
-
}
|
|
4104
|
-
}
|
|
4105
|
-
const registerInsertMenu = () => {
|
|
4106
|
-
register("insertMenu", {
|
|
4107
|
-
name: "_default",
|
|
4108
|
-
default: !0,
|
|
4109
|
-
items: [{
|
|
4110
|
-
name: "Box"
|
|
4111
|
-
}, {
|
|
4112
|
-
name: "Text"
|
|
4113
|
-
}, {
|
|
4114
|
-
name: "Image"
|
|
4115
|
-
}, {
|
|
4116
|
-
name: "Columns"
|
|
4117
|
-
}, {
|
|
4118
|
-
name: "Core:Section"
|
|
4119
|
-
}, {
|
|
4120
|
-
name: "Core:Button"
|
|
4121
|
-
}, {
|
|
4122
|
-
name: "Embed"
|
|
4123
|
-
}, {
|
|
4124
|
-
name: "Custom Code"
|
|
4125
|
-
}]
|
|
4126
|
-
});
|
|
4127
|
-
};
|
|
4128
|
-
let isSetupForEditing = !1;
|
|
4129
|
-
const setupBrowserForEditing = (e = {}) => {
|
|
4130
|
-
var t, n;
|
|
4131
|
-
isSetupForEditing || (isSetupForEditing = !0, isBrowser() && ((t = window.parent) == null || t.postMessage({
|
|
4132
|
-
type: "builder.sdkInfo",
|
|
4133
|
-
data: {
|
|
4134
|
-
target: TARGET,
|
|
4135
|
-
version: SDK_VERSION,
|
|
4136
|
-
supportsPatchUpdates: !1,
|
|
4137
|
-
// Supports builder-model="..." attribute which is needed to
|
|
4138
|
-
// scope our '+ add block' button styling
|
|
4139
|
-
supportsAddBlockScoping: !0,
|
|
4140
|
-
supportsCustomBreakpoints: !0
|
|
4141
|
-
}
|
|
4142
|
-
}, "*"), (n = window.parent) == null || n.postMessage({
|
|
4143
|
-
type: "builder.updateContent",
|
|
4144
|
-
data: {
|
|
4145
|
-
options: e
|
|
4146
|
-
}
|
|
4147
|
-
}, "*"), window.addEventListener("message", (o) => {
|
|
4148
|
-
var i, s;
|
|
4149
|
-
if (!isFromTrustedHost(e.trustedHosts, o))
|
|
4150
|
-
return;
|
|
4151
|
-
const {
|
|
4152
|
-
data: r
|
|
4153
|
-
} = o;
|
|
4154
|
-
if (r != null && r.type)
|
|
4155
|
-
switch (r.type) {
|
|
4156
|
-
case "builder.evaluate": {
|
|
4157
|
-
const l = r.data.text, a = r.data.arguments || [], d = r.data.id, u = new Function(l);
|
|
4158
|
-
let c, p = null;
|
|
4159
|
-
try {
|
|
4160
|
-
c = u.apply(null, a);
|
|
4161
|
-
} catch (f) {
|
|
4162
|
-
p = f;
|
|
4163
|
-
}
|
|
4164
|
-
p ? (i = window.parent) == null || i.postMessage({
|
|
4165
|
-
type: "builder.evaluateError",
|
|
4166
|
-
data: {
|
|
4167
|
-
id: d,
|
|
4168
|
-
error: p.message
|
|
4169
|
-
}
|
|
4170
|
-
}, "*") : c && typeof c.then == "function" ? c.then((f) => {
|
|
4171
|
-
var m;
|
|
4172
|
-
(m = window.parent) == null || m.postMessage({
|
|
4173
|
-
type: "builder.evaluateResult",
|
|
4174
|
-
data: {
|
|
4175
|
-
id: d,
|
|
4176
|
-
result: f
|
|
4177
|
-
}
|
|
4178
|
-
}, "*");
|
|
4179
|
-
}).catch(console.error) : (s = window.parent) == null || s.postMessage({
|
|
4180
|
-
type: "builder.evaluateResult",
|
|
4181
|
-
data: {
|
|
4182
|
-
result: c,
|
|
4183
|
-
id: d
|
|
4184
|
-
}
|
|
4185
|
-
}, "*");
|
|
4186
|
-
break;
|
|
4187
|
-
}
|
|
4188
|
-
}
|
|
4189
|
-
})));
|
|
4190
|
-
}, createEditorListener = ({
|
|
4191
|
-
model: e,
|
|
4192
|
-
trustedHosts: t,
|
|
4193
|
-
callbacks: n
|
|
4194
|
-
}) => (o) => {
|
|
4195
|
-
if (!isFromTrustedHost(t, o))
|
|
4196
|
-
return;
|
|
4197
|
-
const {
|
|
4198
|
-
data: r
|
|
4199
|
-
} = o;
|
|
4200
|
-
if (r)
|
|
4201
|
-
switch (r.type) {
|
|
4202
|
-
case "builder.configureSdk": {
|
|
4203
|
-
n.configureSdk(r.data);
|
|
4204
|
-
break;
|
|
4205
|
-
}
|
|
4206
|
-
case "builder.triggerAnimation": {
|
|
4207
|
-
n.animation(r.data);
|
|
4208
|
-
break;
|
|
4209
|
-
}
|
|
4210
|
-
case "builder.contentUpdate": {
|
|
4211
|
-
const i = r.data, s = i.key || i.alias || i.entry || i.modelName, l = i.data;
|
|
4212
|
-
s === e && n.contentUpdate(l);
|
|
4213
|
-
break;
|
|
4214
|
-
}
|
|
4215
|
-
}
|
|
4216
|
-
}, subscribeToEditor = (e, t, n) => {
|
|
4217
|
-
if (!isBrowser)
|
|
4218
|
-
return logger.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
4219
|
-
};
|
|
4220
|
-
setupBrowserForEditing();
|
|
4221
|
-
const o = createEditorListener({
|
|
4222
|
-
callbacks: {
|
|
4223
|
-
contentUpdate: t,
|
|
4224
|
-
animation: () => {
|
|
4225
|
-
},
|
|
4226
|
-
configureSdk: () => {
|
|
4227
|
-
}
|
|
4228
|
-
},
|
|
4229
|
-
model: e,
|
|
4230
|
-
trustedHosts: n == null ? void 0 : n.trustedHosts
|
|
4231
|
-
});
|
|
4232
|
-
return window.addEventListener("message", o), () => {
|
|
4233
|
-
window.removeEventListener("message", o);
|
|
4234
|
-
};
|
|
4235
|
-
}, getCssFromFont = (e) => {
|
|
4103
|
+
}, ti = (e) => {
|
|
4236
4104
|
var i;
|
|
4237
4105
|
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);
|
|
4238
4106
|
let r = "";
|
|
@@ -4258,15 +4126,15 @@ font-weight: ${s};
|
|
|
4258
4126
|
`.trim());
|
|
4259
4127
|
}
|
|
4260
4128
|
return r;
|
|
4261
|
-
},
|
|
4129
|
+
}, ni = ({
|
|
4262
4130
|
customFonts: e
|
|
4263
4131
|
}) => {
|
|
4264
4132
|
var t;
|
|
4265
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
4266
|
-
},
|
|
4133
|
+
return ((t = e == null ? void 0 : e.map((n) => ti(n))) == null ? void 0 : t.join(" ")) || "";
|
|
4134
|
+
}, oi = ({
|
|
4267
4135
|
cssCode: e,
|
|
4268
4136
|
contentId: t
|
|
4269
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
4137
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", ri = `
|
|
4270
4138
|
.builder-button {
|
|
4271
4139
|
all: unset;
|
|
4272
4140
|
}
|
|
@@ -4283,9 +4151,9 @@ font-weight: ${s};
|
|
|
4283
4151
|
text-align: inherit;
|
|
4284
4152
|
font-family: inherit;
|
|
4285
4153
|
}
|
|
4286
|
-
`,
|
|
4154
|
+
`, ii = (e) => e ? "" : ri, si = (e) => `variant-${e}`, ai = f({
|
|
4287
4155
|
name: "enable-editor",
|
|
4288
|
-
components: { DynamicDiv },
|
|
4156
|
+
components: { DynamicDiv: Q },
|
|
4289
4157
|
props: [
|
|
4290
4158
|
"builderContextSignal",
|
|
4291
4159
|
"canTrack",
|
|
@@ -4307,25 +4175,25 @@ font-weight: ${s};
|
|
|
4307
4175
|
httpReqsData: {},
|
|
4308
4176
|
httpReqsPending: {},
|
|
4309
4177
|
clicked: !1,
|
|
4310
|
-
builderContext:
|
|
4311
|
-
getWrapperClassName
|
|
4178
|
+
builderContext: le,
|
|
4179
|
+
getWrapperClassName: si
|
|
4312
4180
|
};
|
|
4313
4181
|
},
|
|
4314
4182
|
provide() {
|
|
4315
4183
|
const e = this;
|
|
4316
4184
|
return {
|
|
4317
|
-
[
|
|
4185
|
+
[le.key]: e.builderContextSignal
|
|
4318
4186
|
};
|
|
4319
4187
|
},
|
|
4320
4188
|
mounted() {
|
|
4321
4189
|
(() => {
|
|
4322
4190
|
var n, o;
|
|
4323
|
-
if (
|
|
4324
|
-
if (
|
|
4191
|
+
if ($()) {
|
|
4192
|
+
if (E() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
4325
4193
|
new CustomEvent("initeditingbldr")
|
|
4326
|
-
), this.builderContextSignal.content &&
|
|
4194
|
+
), this.builderContextSignal.content && Y(this.canTrack)) {
|
|
4327
4195
|
const i = (n = this.builderContextSignal.content) == null ? void 0 : n.testVariationId, s = (o = this.builderContextSignal.content) == null ? void 0 : o.id, l = this.apiKey;
|
|
4328
|
-
|
|
4196
|
+
de({
|
|
4329
4197
|
type: "impression",
|
|
4330
4198
|
canTrack: !0,
|
|
4331
4199
|
contentId: s,
|
|
@@ -4333,12 +4201,12 @@ font-weight: ${s};
|
|
|
4333
4201
|
variationId: i !== s ? i : void 0
|
|
4334
4202
|
});
|
|
4335
4203
|
}
|
|
4336
|
-
|
|
4204
|
+
Dt() && !E() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
4337
4205
|
new CustomEvent("initpreviewingbldr")
|
|
4338
4206
|
);
|
|
4339
4207
|
}
|
|
4340
4208
|
})(), (() => {
|
|
4341
|
-
this.apiKey ||
|
|
4209
|
+
this.apiKey || R.error(
|
|
4342
4210
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
4343
4211
|
), this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
|
|
4344
4212
|
})();
|
|
@@ -4384,7 +4252,7 @@ font-weight: ${s};
|
|
|
4384
4252
|
}
|
|
4385
4253
|
},
|
|
4386
4254
|
unmounted() {
|
|
4387
|
-
|
|
4255
|
+
$() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
|
|
4388
4256
|
"builder:component:stateChangeListenerActivated",
|
|
4389
4257
|
this.emitStateUpdate
|
|
4390
4258
|
));
|
|
@@ -4456,7 +4324,7 @@ font-weight: ${s};
|
|
|
4456
4324
|
this.builderContextSignal.content = t;
|
|
4457
4325
|
},
|
|
4458
4326
|
processMessage(e) {
|
|
4459
|
-
return
|
|
4327
|
+
return qe({
|
|
4460
4328
|
model: this.model,
|
|
4461
4329
|
trustedHosts: this.trustedHosts,
|
|
4462
4330
|
callbacks: {
|
|
@@ -4470,7 +4338,7 @@ font-weight: ${s};
|
|
|
4470
4338
|
});
|
|
4471
4339
|
},
|
|
4472
4340
|
animation: (t) => {
|
|
4473
|
-
|
|
4341
|
+
_e(t);
|
|
4474
4342
|
},
|
|
4475
4343
|
contentUpdate: (t) => {
|
|
4476
4344
|
this.mergeNewContent(t);
|
|
@@ -4481,7 +4349,7 @@ font-weight: ${s};
|
|
|
4481
4349
|
evaluateJsCode() {
|
|
4482
4350
|
var t, n;
|
|
4483
4351
|
const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
|
|
4484
|
-
e &&
|
|
4352
|
+
e && G({
|
|
4485
4353
|
code: e,
|
|
4486
4354
|
context: this.context || {},
|
|
4487
4355
|
localState: void 0,
|
|
@@ -4497,13 +4365,13 @@ font-weight: ${s};
|
|
|
4497
4365
|
var t, n;
|
|
4498
4366
|
if (this.builderContextSignal.content) {
|
|
4499
4367
|
const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, r = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
|
|
4500
|
-
|
|
4368
|
+
de({
|
|
4501
4369
|
type: "click",
|
|
4502
|
-
canTrack:
|
|
4370
|
+
canTrack: Y(this.canTrack),
|
|
4503
4371
|
contentId: r,
|
|
4504
4372
|
apiKey: this.apiKey,
|
|
4505
4373
|
variationId: o !== r ? o : void 0,
|
|
4506
|
-
...
|
|
4374
|
+
...ei(e),
|
|
4507
4375
|
unique: !this.clicked
|
|
4508
4376
|
});
|
|
4509
4377
|
}
|
|
@@ -4513,13 +4381,13 @@ font-weight: ${s};
|
|
|
4513
4381
|
var t, n;
|
|
4514
4382
|
const e = ((n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) ?? {};
|
|
4515
4383
|
Object.entries(e).forEach(([o, r]) => {
|
|
4516
|
-
if (!r || this.httpReqsPending[o] || this.httpReqsData[o] && !
|
|
4384
|
+
if (!r || this.httpReqsPending[o] || this.httpReqsData[o] && !E())
|
|
4517
4385
|
return;
|
|
4518
4386
|
this.httpReqsPending[o] = !0;
|
|
4519
4387
|
const i = r.replace(
|
|
4520
4388
|
/{{([^}]+)}}/g,
|
|
4521
4389
|
(s, l) => String(
|
|
4522
|
-
|
|
4390
|
+
G({
|
|
4523
4391
|
code: l,
|
|
4524
4392
|
context: this.context || {},
|
|
4525
4393
|
localState: void 0,
|
|
@@ -4529,7 +4397,7 @@ font-weight: ${s};
|
|
|
4529
4397
|
})
|
|
4530
4398
|
)
|
|
4531
4399
|
);
|
|
4532
|
-
|
|
4400
|
+
Ye(i).then((s) => s.json()).then((s) => {
|
|
4533
4401
|
this.mergeNewRootState({
|
|
4534
4402
|
[o]: s
|
|
4535
4403
|
}), this.httpReqsData[o] = !0;
|
|
@@ -4541,12 +4409,12 @@ font-weight: ${s};
|
|
|
4541
4409
|
});
|
|
4542
4410
|
},
|
|
4543
4411
|
emitStateUpdate() {
|
|
4544
|
-
|
|
4412
|
+
E() && window.dispatchEvent(
|
|
4545
4413
|
new CustomEvent(
|
|
4546
4414
|
"builder:component:stateChange",
|
|
4547
4415
|
{
|
|
4548
4416
|
detail: {
|
|
4549
|
-
state:
|
|
4417
|
+
state: pe(this.builderContextSignal.rootState),
|
|
4550
4418
|
ref: {
|
|
4551
4419
|
name: this.model
|
|
4552
4420
|
}
|
|
@@ -4556,7 +4424,7 @@ font-weight: ${s};
|
|
|
4556
4424
|
);
|
|
4557
4425
|
},
|
|
4558
4426
|
elementRef_onIniteditingbldr(e) {
|
|
4559
|
-
window.addEventListener("message", this.processMessage),
|
|
4427
|
+
window.addEventListener("message", this.processMessage), ln(), Ke({
|
|
4560
4428
|
...this.locale ? {
|
|
4561
4429
|
locale: this.locale
|
|
4562
4430
|
} : {},
|
|
@@ -4570,7 +4438,7 @@ font-weight: ${s};
|
|
|
4570
4438
|
this.builderContextSignal.componentInfos
|
|
4571
4439
|
).forEach((t) => {
|
|
4572
4440
|
var o;
|
|
4573
|
-
const n =
|
|
4441
|
+
const n = Lt(t);
|
|
4574
4442
|
(o = window.parent) == null || o.postMessage(n, "*");
|
|
4575
4443
|
}), window.addEventListener(
|
|
4576
4444
|
"builder:component:stateChangeListenerActivated",
|
|
@@ -4581,7 +4449,7 @@ font-weight: ${s};
|
|
|
4581
4449
|
const t = new URL(location.href).searchParams, n = t.get("builder.preview"), o = t.get(
|
|
4582
4450
|
`builder.overrides.${n}`
|
|
4583
4451
|
), r = t.get("apiKey") || t.get("builder.space");
|
|
4584
|
-
n === this.model && r === this.apiKey && (!this.content || o === this.content.id) &&
|
|
4452
|
+
n === this.model && r === this.apiKey && (!this.content || o === this.content.id) && be({
|
|
4585
4453
|
model: this.model,
|
|
4586
4454
|
apiKey: this.apiKey,
|
|
4587
4455
|
apiVersion: this.builderContextSignal.apiVersion
|
|
@@ -4591,52 +4459,52 @@ font-weight: ${s};
|
|
|
4591
4459
|
}
|
|
4592
4460
|
}
|
|
4593
4461
|
});
|
|
4594
|
-
function
|
|
4462
|
+
function li(e, t, n, o, r, i) {
|
|
4595
4463
|
var s, l, a;
|
|
4596
|
-
return e.builderContextSignal.content ? (
|
|
4464
|
+
return e.builderContextSignal.content ? (c(), g(K(e.ContentWrapper), S({
|
|
4597
4465
|
key: 0,
|
|
4598
4466
|
ref: "elementRef",
|
|
4599
|
-
onClick: (
|
|
4467
|
+
onClick: (u) => e.onClick(u),
|
|
4600
4468
|
"builder-content-id": (s = e.builderContextSignal.content) == null ? void 0 : s.id,
|
|
4601
4469
|
"builder-model": e.model,
|
|
4602
4470
|
class: e.getWrapperClassName(((l = e.content) == null ? void 0 : l.testVariationId) || ((a = e.content) == null ? void 0 : a.id)),
|
|
4603
|
-
onIniteditingbldr: (
|
|
4604
|
-
onInitpreviewingbldr: (
|
|
4471
|
+
onIniteditingbldr: (u) => e.elementRef_onIniteditingbldr(u),
|
|
4472
|
+
onInitpreviewingbldr: (u) => e.elementRef_onInitpreviewingbldr(u)
|
|
4605
4473
|
}, { ...e.showContentProps, ...e.contentWrapperProps }), {
|
|
4606
|
-
default:
|
|
4607
|
-
|
|
4474
|
+
default: N(() => [
|
|
4475
|
+
P(e.$slots, "default")
|
|
4608
4476
|
]),
|
|
4609
4477
|
_: 3
|
|
4610
|
-
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) :
|
|
4478
|
+
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : C("", !0);
|
|
4611
4479
|
}
|
|
4612
|
-
const
|
|
4480
|
+
const ci = /* @__PURE__ */ b(ai, [["render", li]]), di = f({
|
|
4613
4481
|
name: "content-styles",
|
|
4614
|
-
components: { InlinedStyles:
|
|
4482
|
+
components: { InlinedStyles: ke },
|
|
4615
4483
|
props: ["cssCode", "contentId", "customFonts", "isNestedRender", "nonce"],
|
|
4616
4484
|
data() {
|
|
4617
4485
|
return {
|
|
4618
4486
|
injectedStyles: `
|
|
4619
|
-
${
|
|
4487
|
+
${oi({
|
|
4620
4488
|
cssCode: this.cssCode,
|
|
4621
4489
|
contentId: this.contentId
|
|
4622
4490
|
})}
|
|
4623
|
-
${
|
|
4491
|
+
${ni({
|
|
4624
4492
|
customFonts: this.customFonts
|
|
4625
4493
|
})}
|
|
4626
|
-
${
|
|
4494
|
+
${ii(this.isNestedRender)}
|
|
4627
4495
|
`.trim()
|
|
4628
4496
|
};
|
|
4629
4497
|
}
|
|
4630
4498
|
});
|
|
4631
|
-
function
|
|
4632
|
-
const s =
|
|
4633
|
-
return
|
|
4499
|
+
function ui(e, t, n, o, r, i) {
|
|
4500
|
+
const s = y("InlinedStyles");
|
|
4501
|
+
return c(), g(s, {
|
|
4634
4502
|
id: "builderio-content",
|
|
4635
4503
|
styles: e.injectedStyles,
|
|
4636
4504
|
nonce: e.nonce
|
|
4637
4505
|
}, null, 8, ["styles", "nonce"]);
|
|
4638
4506
|
}
|
|
4639
|
-
const
|
|
4507
|
+
const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
|
|
4640
4508
|
content: e,
|
|
4641
4509
|
data: t,
|
|
4642
4510
|
locale: n
|
|
@@ -4653,7 +4521,7 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4653
4521
|
locale: n
|
|
4654
4522
|
} : {}
|
|
4655
4523
|
};
|
|
4656
|
-
},
|
|
4524
|
+
}, hi = ({
|
|
4657
4525
|
content: e,
|
|
4658
4526
|
data: t
|
|
4659
4527
|
}) => e ? {
|
|
@@ -4663,14 +4531,14 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4663
4531
|
...t
|
|
4664
4532
|
},
|
|
4665
4533
|
meta: e == null ? void 0 : e.meta
|
|
4666
|
-
} : void 0,
|
|
4534
|
+
} : void 0, fi = ut, bi = f({
|
|
4667
4535
|
name: "content-component",
|
|
4668
4536
|
components: {
|
|
4669
|
-
EnableEditor,
|
|
4670
|
-
InlinedScript:
|
|
4671
|
-
ContentStyles,
|
|
4672
|
-
Blocks,
|
|
4673
|
-
DynamicDiv
|
|
4537
|
+
EnableEditor: ci,
|
|
4538
|
+
InlinedScript: st,
|
|
4539
|
+
ContentStyles: pi,
|
|
4540
|
+
Blocks: M,
|
|
4541
|
+
DynamicDiv: Q
|
|
4674
4542
|
},
|
|
4675
4543
|
props: [
|
|
4676
4544
|
"content",
|
|
@@ -4697,32 +4565,32 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4697
4565
|
data() {
|
|
4698
4566
|
var e, t, n, o;
|
|
4699
4567
|
return {
|
|
4700
|
-
scriptStr:
|
|
4568
|
+
scriptStr: Xr({
|
|
4701
4569
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
4702
4570
|
variationId: (e = this.content) == null ? void 0 : e.testVariationId,
|
|
4703
4571
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
4704
4572
|
contentId: (t = this.content) == null ? void 0 : t.id
|
|
4705
4573
|
}),
|
|
4706
4574
|
registeredComponents: [
|
|
4707
|
-
...
|
|
4575
|
+
...Re(),
|
|
4708
4576
|
...((n = this.customComponents) == null ? void 0 : n.filter(({ models: r }) => !(r != null && r.length) || !this.model ? !0 : r.includes(this.model))) || []
|
|
4709
4577
|
].reduce(
|
|
4710
4578
|
(r, { component: i, ...s }) => ({
|
|
4711
4579
|
...r,
|
|
4712
4580
|
[s.name]: {
|
|
4713
|
-
component:
|
|
4714
|
-
...
|
|
4581
|
+
component: fi(i),
|
|
4582
|
+
...ee(s)
|
|
4715
4583
|
}
|
|
4716
4584
|
}),
|
|
4717
4585
|
{}
|
|
4718
4586
|
),
|
|
4719
4587
|
builderContextSignal: {
|
|
4720
|
-
content:
|
|
4588
|
+
content: hi({
|
|
4721
4589
|
content: this.content,
|
|
4722
4590
|
data: this.data
|
|
4723
4591
|
}),
|
|
4724
4592
|
localState: void 0,
|
|
4725
|
-
rootState:
|
|
4593
|
+
rootState: mi({
|
|
4726
4594
|
content: this.content,
|
|
4727
4595
|
data: this.data,
|
|
4728
4596
|
locale: this.locale
|
|
@@ -4733,12 +4601,12 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4733
4601
|
apiKey: this.apiKey,
|
|
4734
4602
|
apiVersion: this.apiVersion,
|
|
4735
4603
|
componentInfos: [
|
|
4736
|
-
...
|
|
4604
|
+
...Re(),
|
|
4737
4605
|
...((o = this.customComponents) == null ? void 0 : o.filter(({ models: r }) => !(r != null && r.length) || !this.model ? !0 : r.includes(this.model))) || []
|
|
4738
4606
|
].reduce(
|
|
4739
4607
|
(r, { component: i, ...s }) => ({
|
|
4740
4608
|
...r,
|
|
4741
|
-
[s.name]:
|
|
4609
|
+
[s.name]: ee(s)
|
|
4742
4610
|
}),
|
|
4743
4611
|
{}
|
|
4744
4612
|
),
|
|
@@ -4747,13 +4615,13 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4747
4615
|
BlocksWrapperProps: this.blocksWrapperProps || {},
|
|
4748
4616
|
nonce: this.nonce || ""
|
|
4749
4617
|
},
|
|
4750
|
-
TARGET
|
|
4618
|
+
TARGET: x
|
|
4751
4619
|
};
|
|
4752
4620
|
},
|
|
4753
4621
|
provide() {
|
|
4754
4622
|
const e = this;
|
|
4755
4623
|
return {
|
|
4756
|
-
[
|
|
4624
|
+
[Ve.key]: {
|
|
4757
4625
|
registeredComponents: e.registeredComponents
|
|
4758
4626
|
}
|
|
4759
4627
|
};
|
|
@@ -4764,9 +4632,9 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4764
4632
|
}
|
|
4765
4633
|
}
|
|
4766
4634
|
});
|
|
4767
|
-
function
|
|
4768
|
-
const s =
|
|
4769
|
-
return
|
|
4635
|
+
function gi(e, t, n, o, r, i) {
|
|
4636
|
+
const s = y("InlinedScript"), l = y("ContentStyles"), a = y("Blocks"), u = y("EnableEditor");
|
|
4637
|
+
return c(), g(u, S({
|
|
4770
4638
|
nonce: e.nonce,
|
|
4771
4639
|
content: e.content,
|
|
4772
4640
|
data: e.data,
|
|
@@ -4782,25 +4650,25 @@ function _sfc_render$2(e, t, n, o, r, i) {
|
|
|
4782
4650
|
contentWrapperProps: e.contentWrapperProps,
|
|
4783
4651
|
trustedHosts: e.trustedHosts
|
|
4784
4652
|
}, {}), {
|
|
4785
|
-
default:
|
|
4786
|
-
var
|
|
4653
|
+
default: N(() => {
|
|
4654
|
+
var h, d, p, k, v, F, X;
|
|
4787
4655
|
return [
|
|
4788
|
-
e.isSsrAbTest ? (
|
|
4656
|
+
e.isSsrAbTest ? (c(), g(s, {
|
|
4789
4657
|
key: 0,
|
|
4790
4658
|
id: "builderio-variant-visibility",
|
|
4791
4659
|
scriptStr: e.scriptStr,
|
|
4792
4660
|
nonce: e.nonce || ""
|
|
4793
|
-
}, null, 8, ["scriptStr", "nonce"])) :
|
|
4794
|
-
e.TARGET !== "reactNative" ? (
|
|
4661
|
+
}, null, 8, ["scriptStr", "nonce"])) : C("", !0),
|
|
4662
|
+
e.TARGET !== "reactNative" ? (c(), g(l, {
|
|
4795
4663
|
key: 1,
|
|
4796
4664
|
nonce: e.nonce || "",
|
|
4797
4665
|
isNestedRender: e.isNestedRender,
|
|
4798
|
-
contentId: (
|
|
4799
|
-
cssCode: (p = (
|
|
4800
|
-
customFonts: (
|
|
4801
|
-
}, null, 8, ["nonce", "isNestedRender", "contentId", "cssCode", "customFonts"])) :
|
|
4802
|
-
|
|
4803
|
-
blocks: (
|
|
4666
|
+
contentId: (h = e.builderContextSignal.content) == null ? void 0 : h.id,
|
|
4667
|
+
cssCode: (p = (d = e.builderContextSignal.content) == null ? void 0 : d.data) == null ? void 0 : p.cssCode,
|
|
4668
|
+
customFonts: (v = (k = e.builderContextSignal.content) == null ? void 0 : k.data) == null ? void 0 : v.customFonts
|
|
4669
|
+
}, null, 8, ["nonce", "isNestedRender", "contentId", "cssCode", "customFonts"])) : C("", !0),
|
|
4670
|
+
I(a, {
|
|
4671
|
+
blocks: (X = (F = e.builderContextSignal.content) == null ? void 0 : F.data) == null ? void 0 : X.blocks,
|
|
4804
4672
|
context: e.builderContextSignal,
|
|
4805
4673
|
registeredComponents: e.registeredComponents,
|
|
4806
4674
|
linkComponent: e.linkComponent
|
|
@@ -4810,12 +4678,12 @@ function _sfc_render$2(e, t, n, o, r, i) {
|
|
|
4810
4678
|
_: 1
|
|
4811
4679
|
}, 16, ["nonce", "content", "data", "model", "context", "apiKey", "canTrack", "locale", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps", "trustedHosts"]);
|
|
4812
4680
|
}
|
|
4813
|
-
const
|
|
4681
|
+
const yi = /* @__PURE__ */ b(bi, [["render", gi]]), ki = f({
|
|
4814
4682
|
name: "content-variants",
|
|
4815
4683
|
components: {
|
|
4816
|
-
InlinedScript:
|
|
4817
|
-
InlinedStyles:
|
|
4818
|
-
ContentComponent
|
|
4684
|
+
InlinedScript: st,
|
|
4685
|
+
InlinedStyles: ke,
|
|
4686
|
+
ContentComponent: yi
|
|
4819
4687
|
},
|
|
4820
4688
|
props: [
|
|
4821
4689
|
"canTrack",
|
|
@@ -4839,13 +4707,13 @@ const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _s
|
|
|
4839
4707
|
],
|
|
4840
4708
|
data() {
|
|
4841
4709
|
return {
|
|
4842
|
-
shouldRenderVariants:
|
|
4843
|
-
canTrack:
|
|
4710
|
+
shouldRenderVariants: Jr({
|
|
4711
|
+
canTrack: Y(this.canTrack),
|
|
4844
4712
|
content: this.content
|
|
4845
4713
|
}),
|
|
4846
|
-
TARGET,
|
|
4847
|
-
getInitVariantsFnsScriptString,
|
|
4848
|
-
getVariants
|
|
4714
|
+
TARGET: x,
|
|
4715
|
+
getInitVariantsFnsScriptString: Yr,
|
|
4716
|
+
getVariants: Z
|
|
4849
4717
|
};
|
|
4850
4718
|
},
|
|
4851
4719
|
mounted() {
|
|
@@ -4853,8 +4721,8 @@ const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _s
|
|
|
4853
4721
|
computed: {
|
|
4854
4722
|
updateCookieAndStylesScriptStr() {
|
|
4855
4723
|
var e;
|
|
4856
|
-
return
|
|
4857
|
-
|
|
4724
|
+
return Qr(
|
|
4725
|
+
Z(this.content).map((t) => ({
|
|
4858
4726
|
id: t.testVariationId,
|
|
4859
4727
|
testRatio: t.testRatio
|
|
4860
4728
|
})),
|
|
@@ -4862,45 +4730,45 @@ const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _s
|
|
|
4862
4730
|
);
|
|
4863
4731
|
},
|
|
4864
4732
|
hideVariantsStyleString() {
|
|
4865
|
-
return
|
|
4733
|
+
return Z(this.content).map((e) => `.variant-${e.testVariationId} { display: none; } `).join("");
|
|
4866
4734
|
},
|
|
4867
4735
|
defaultContent() {
|
|
4868
4736
|
var e;
|
|
4869
4737
|
return this.shouldRenderVariants ? {
|
|
4870
4738
|
...this.content,
|
|
4871
4739
|
testVariationId: (e = this.content) == null ? void 0 : e.id
|
|
4872
|
-
} :
|
|
4740
|
+
} : hn({
|
|
4873
4741
|
item: this.content,
|
|
4874
|
-
canTrack:
|
|
4742
|
+
canTrack: Y(this.canTrack)
|
|
4875
4743
|
});
|
|
4876
4744
|
}
|
|
4877
4745
|
}
|
|
4878
4746
|
});
|
|
4879
|
-
function
|
|
4880
|
-
const s =
|
|
4881
|
-
return
|
|
4882
|
-
!e.isNestedRender && e.TARGET !== "reactNative" ? (
|
|
4747
|
+
function vi(e, t, n, o, r, i) {
|
|
4748
|
+
const s = y("InlinedScript"), l = y("InlinedStyles"), a = y("ContentComponent");
|
|
4749
|
+
return c(), m(T, null, [
|
|
4750
|
+
!e.isNestedRender && e.TARGET !== "reactNative" ? (c(), g(s, {
|
|
4883
4751
|
key: 0,
|
|
4884
4752
|
id: "builderio-init-variants-fns",
|
|
4885
4753
|
scriptStr: e.getInitVariantsFnsScriptString(),
|
|
4886
4754
|
nonce: e.nonce || ""
|
|
4887
|
-
}, null, 8, ["scriptStr", "nonce"])) :
|
|
4888
|
-
e.shouldRenderVariants ? (
|
|
4889
|
-
|
|
4755
|
+
}, null, 8, ["scriptStr", "nonce"])) : C("", !0),
|
|
4756
|
+
e.shouldRenderVariants ? (c(), m(T, { key: 1 }, [
|
|
4757
|
+
I(l, {
|
|
4890
4758
|
id: "builderio-variants",
|
|
4891
4759
|
styles: e.hideVariantsStyleString,
|
|
4892
4760
|
nonce: e.nonce || ""
|
|
4893
4761
|
}, null, 8, ["styles", "nonce"]),
|
|
4894
|
-
|
|
4762
|
+
I(s, {
|
|
4895
4763
|
id: "builderio-variants-visibility",
|
|
4896
4764
|
scriptStr: e.updateCookieAndStylesScriptStr,
|
|
4897
4765
|
nonce: e.nonce || ""
|
|
4898
4766
|
}, null, 8, ["scriptStr", "nonce"]),
|
|
4899
|
-
(
|
|
4900
|
-
key:
|
|
4767
|
+
(c(!0), m(T, null, A(e.getVariants(e.content), (u, h) => (c(), g(a, S({
|
|
4768
|
+
key: u.testVariationId,
|
|
4901
4769
|
isNestedRender: e.isNestedRender,
|
|
4902
4770
|
nonce: e.nonce,
|
|
4903
|
-
content:
|
|
4771
|
+
content: u,
|
|
4904
4772
|
showContent: !1,
|
|
4905
4773
|
model: e.model,
|
|
4906
4774
|
data: e.data,
|
|
@@ -4919,8 +4787,8 @@ function _sfc_render$1(e, t, n, o, r, i) {
|
|
|
4919
4787
|
contentWrapperProps: e.contentWrapperProps,
|
|
4920
4788
|
trustedHosts: e.trustedHosts
|
|
4921
4789
|
}, {}), null, 16, ["isNestedRender", "nonce", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"]))), 128))
|
|
4922
|
-
], 64)) :
|
|
4923
|
-
|
|
4790
|
+
], 64)) : C("", !0),
|
|
4791
|
+
I(a, S({
|
|
4924
4792
|
nonce: e.nonce,
|
|
4925
4793
|
isNestedRender: e.isNestedRender,
|
|
4926
4794
|
content: e.defaultContent,
|
|
@@ -4946,13 +4814,13 @@ function _sfc_render$1(e, t, n, o, r, i) {
|
|
|
4946
4814
|
}), null, 16, ["nonce", "isNestedRender", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
|
|
4947
4815
|
], 64);
|
|
4948
4816
|
}
|
|
4949
|
-
const
|
|
4817
|
+
const Ci = /* @__PURE__ */ b(ki, [["render", vi]]), Si = async ({
|
|
4950
4818
|
builderContextValue: e,
|
|
4951
4819
|
symbol: t
|
|
4952
4820
|
}) => {
|
|
4953
4821
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
4954
4822
|
(e != null && e.apiKey))
|
|
4955
|
-
return
|
|
4823
|
+
return be({
|
|
4956
4824
|
model: t.model,
|
|
4957
4825
|
apiKey: e.apiKey,
|
|
4958
4826
|
apiVersion: e.apiVersion,
|
|
@@ -4962,11 +4830,11 @@ const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sf
|
|
|
4962
4830
|
}
|
|
4963
4831
|
}
|
|
4964
4832
|
}).catch((n) => {
|
|
4965
|
-
|
|
4833
|
+
R.error("Could not fetch symbol content: ", n);
|
|
4966
4834
|
});
|
|
4967
|
-
},
|
|
4835
|
+
}, Ti = f({
|
|
4968
4836
|
name: "builder-symbol",
|
|
4969
|
-
components: { ContentVariants, DynamicDiv },
|
|
4837
|
+
components: { ContentVariants: Ci, DynamicDiv: Q },
|
|
4970
4838
|
props: [
|
|
4971
4839
|
"symbol",
|
|
4972
4840
|
"attributes",
|
|
@@ -4978,7 +4846,7 @@ const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sf
|
|
|
4978
4846
|
],
|
|
4979
4847
|
data() {
|
|
4980
4848
|
var e;
|
|
4981
|
-
return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs };
|
|
4849
|
+
return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs: V };
|
|
4982
4850
|
},
|
|
4983
4851
|
mounted() {
|
|
4984
4852
|
this.setContent();
|
|
@@ -5001,7 +4869,7 @@ const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sf
|
|
|
5001
4869
|
className() {
|
|
5002
4870
|
var e, t;
|
|
5003
4871
|
return [
|
|
5004
|
-
this.attributes[
|
|
4872
|
+
this.attributes[_()],
|
|
5005
4873
|
"builder-symbol",
|
|
5006
4874
|
(e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
|
|
5007
4875
|
(t = this.symbol) != null && t.dynamic || this.dynamic ? "builder-dynamic-symbol" : void 0
|
|
@@ -5015,7 +4883,7 @@ const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sf
|
|
|
5015
4883
|
},
|
|
5016
4884
|
methods: {
|
|
5017
4885
|
setContent() {
|
|
5018
|
-
this.contentToUse ||
|
|
4886
|
+
this.contentToUse || Si({
|
|
5019
4887
|
symbol: this.symbol,
|
|
5020
4888
|
builderContextValue: this.builderContext
|
|
5021
4889
|
}).then((e) => {
|
|
@@ -5024,11 +4892,11 @@ const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sf
|
|
|
5024
4892
|
}
|
|
5025
4893
|
}
|
|
5026
4894
|
});
|
|
5027
|
-
function
|
|
5028
|
-
var l, a,
|
|
5029
|
-
const s =
|
|
5030
|
-
return
|
|
5031
|
-
|
|
4895
|
+
function wi(e, t, n, o, r, i) {
|
|
4896
|
+
var l, a, u, h, d;
|
|
4897
|
+
const s = y("ContentVariants");
|
|
4898
|
+
return c(), m("div", S({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, B(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
4899
|
+
I(s, {
|
|
5032
4900
|
nonce: e.builderContext.nonce,
|
|
5033
4901
|
isNestedRender: !0,
|
|
5034
4902
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -5041,10 +4909,10 @@ function _sfc_render(e, t, n, o, r, i) {
|
|
|
5041
4909
|
data: {
|
|
5042
4910
|
...(a = e.symbol) == null ? void 0 : a.data,
|
|
5043
4911
|
...e.builderContext.localState,
|
|
5044
|
-
...(
|
|
4912
|
+
...(h = (u = e.contentToUse) == null ? void 0 : u.data) == null ? void 0 : h.state
|
|
5045
4913
|
},
|
|
5046
4914
|
canTrack: e.builderContext.canTrack,
|
|
5047
|
-
model: (
|
|
4915
|
+
model: (d = e.symbol) == null ? void 0 : d.model,
|
|
5048
4916
|
content: e.contentToUse,
|
|
5049
4917
|
linkComponent: e.builderLinkComponent,
|
|
5050
4918
|
blocksWrapper: e.blocksWrapper,
|
|
@@ -5052,75 +4920,42 @@ function _sfc_render(e, t, n, o, r, i) {
|
|
|
5052
4920
|
}, null, 8, ["nonce", "apiVersion", "apiKey", "context", "customComponents", "data", "canTrack", "model", "content", "linkComponent", "blocksWrapper", "contentWrapper"])
|
|
5053
4921
|
], 16);
|
|
5054
4922
|
}
|
|
5055
|
-
const
|
|
5056
|
-
function setEditorSettings(e) {
|
|
5057
|
-
if (isBrowser()) {
|
|
5058
|
-
Object.assign(settings, e);
|
|
5059
|
-
const t = {
|
|
5060
|
-
type: "builder.settingsChange",
|
|
5061
|
-
data: settings
|
|
5062
|
-
};
|
|
5063
|
-
parent.postMessage(t, "*");
|
|
5064
|
-
}
|
|
5065
|
-
}
|
|
5066
|
-
const fetchBuilderProps = async (e) => {
|
|
5067
|
-
var o, r, i;
|
|
5068
|
-
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((r = e.userAttributes) == null ? void 0 : r.urlPath), n = {
|
|
5069
|
-
...e,
|
|
5070
|
-
apiKey: e.apiKey,
|
|
5071
|
-
model: e.model || "page",
|
|
5072
|
-
userAttributes: {
|
|
5073
|
-
...e.userAttributes,
|
|
5074
|
-
...t ? {
|
|
5075
|
-
urlPath: t
|
|
5076
|
-
} : {}
|
|
5077
|
-
},
|
|
5078
|
-
options: getBuilderSearchParams(e.searchParams || ((i = e.url) == null ? void 0 : i.searchParams) || e.options)
|
|
5079
|
-
};
|
|
5080
|
-
return {
|
|
5081
|
-
apiKey: n.apiKey,
|
|
5082
|
-
model: n.model,
|
|
5083
|
-
content: await fetchOneEntry(n)
|
|
5084
|
-
};
|
|
5085
|
-
};
|
|
4923
|
+
const Ii = /* @__PURE__ */ b(Ti, [["render", wi]]);
|
|
5086
4924
|
export {
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
track as x,
|
|
5124
|
-
subscribeToEditor as y,
|
|
5125
|
-
fetchBuilderProps as z
|
|
4925
|
+
Bi as A,
|
|
4926
|
+
ye as B,
|
|
4927
|
+
eo as C,
|
|
4928
|
+
Fi as D,
|
|
4929
|
+
oo as F,
|
|
4930
|
+
po as I,
|
|
4931
|
+
fo as S,
|
|
4932
|
+
Ho as T,
|
|
4933
|
+
jr as V,
|
|
4934
|
+
ke as _,
|
|
4935
|
+
Wi as a,
|
|
4936
|
+
Oi as b,
|
|
4937
|
+
L as c,
|
|
4938
|
+
ge as d,
|
|
4939
|
+
b as e,
|
|
4940
|
+
G as f,
|
|
4941
|
+
Qn as g,
|
|
4942
|
+
Ni as h,
|
|
4943
|
+
_ as i,
|
|
4944
|
+
le as j,
|
|
4945
|
+
wt as k,
|
|
4946
|
+
Ii as l,
|
|
4947
|
+
M as m,
|
|
4948
|
+
Ci as n,
|
|
4949
|
+
Dt as o,
|
|
4950
|
+
Lt as p,
|
|
4951
|
+
Ne as q,
|
|
4952
|
+
Mt as r,
|
|
4953
|
+
Pi as s,
|
|
4954
|
+
xi as t,
|
|
4955
|
+
Ai as u,
|
|
4956
|
+
Vi as v,
|
|
4957
|
+
fi as w,
|
|
4958
|
+
Cn as x,
|
|
4959
|
+
Sn as y,
|
|
4960
|
+
be as z
|
|
5126
4961
|
};
|