@builder.io/sdk-vue 2.0.14-6 → 2.0.15
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/{edge/block-styles-zRPUnWLf.js → browser/block-styles-3kNIHbfo.js} +6 -6
- package/lib/browser/block-styles-mYBwPtv0.cjs +1 -0
- package/lib/browser/{block-wrapper-hPYvxseU.js → block-wrapper-N1PMQPGA.js} +3 -3
- package/lib/browser/{block-wrapper-l_mdj42t.cjs → block-wrapper-mGepkLsD.cjs} +1 -1
- package/lib/browser/{component-ref-dPnPtrON.cjs → component-ref-D4a8WUvU.cjs} +1 -1
- package/lib/browser/{component-ref-JlpkOrad.js → component-ref-eSpEv_vu.js} +2 -2
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/{edge/get-block-properties-PLBPSz3W.js → browser/get-block-properties--gxTb6u9.js} +13 -13
- package/lib/browser/get-block-properties-1Vr9AX-f.cjs +1 -0
- package/lib/browser/{index-ZL8QUFiN.js → index-dh7iM10N.js} +552 -546
- package/lib/browser/index-vQfvmzgX.cjs +166 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{repeated-block-8EN4xN25.js → repeated-block-CnX7KaV3.js} +2 -2
- package/lib/browser/{repeated-block-uV-zuqkw.cjs → repeated-block-zZGzC5Ez.cjs} +1 -1
- package/lib/browser/server-index.d.ts +1 -0
- package/lib/{node/block-styles-gLB-jSXN.js → edge/block-styles-IJpbU1il.js} +12 -13
- package/lib/edge/block-styles-c-t5DB1d.cjs +1 -0
- package/lib/{node/block-wrapper-frfIIST_.js → edge/block-wrapper-UEsTg8bU.js} +3 -3
- package/lib/edge/{block-wrapper-9IWz2vxg.cjs → block-wrapper-cbxxzz21.cjs} +1 -1
- package/lib/{node/component-ref-IbarjSnq.js → edge/component-ref-2h-cUV3Z.js} +2 -2
- package/lib/{node/component-ref-ZlBAzimq.cjs → edge/component-ref-pqmk5wUc.cjs} +1 -1
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/{node/get-block-properties-QIsIgfnu.js → edge/get-block-properties-S3qjKi7G.js} +16 -17
- package/lib/edge/get-block-properties-egDFLKDW.cjs +1 -0
- package/lib/edge/{index-TGe9_80q.js → index-BN18YEfB.js} +843 -837
- package/lib/edge/{index-5-C3UhJz.cjs → index-NQs12e6I.cjs} +31 -31
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{repeated-block-_9Gs2AOY.js → repeated-block-3py1q2sc.js} +2 -2
- package/lib/{node/repeated-block-ZpVu-xdw.cjs → edge/repeated-block-IMmb2AE9.cjs} +1 -1
- package/lib/edge/server-index.d.ts +1 -0
- package/lib/{browser/block-styles-nWGppwAf.js → node/block-styles-E0MOJgK4.js} +12 -14
- package/lib/node/block-styles-VaKrzGA5.cjs +1 -0
- package/lib/node/{block-wrapper-cCYzfiv5.cjs → block-wrapper-TvqPY7Mt.cjs} +1 -1
- package/lib/{edge/block-wrapper-x7ERONr-.js → node/block-wrapper-cHgl5RuV.js} +5 -5
- package/lib/{edge/component-ref-eV0RBAzs.cjs → node/component-ref-fYSFTWDE.cjs} +1 -1
- package/lib/{edge/component-ref-JRfa9Vwo.js → node/component-ref-gqNpKniv.js} +2 -2
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/{browser/get-block-properties-HzVZCpxa.js → node/get-block-properties-AZMTucap.js} +18 -20
- package/lib/node/get-block-properties-IntKgx2x.cjs +1 -0
- package/lib/node/index-ozkdxROi.cjs +213 -0
- package/lib/node/{index-BugETl2c.js → index-xSGjb-sL.js} +1123 -907
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +16 -17
- package/lib/node/{repeated-block-Z-_chLeZ.js → repeated-block-WqJu5DET.js} +2 -2
- package/lib/{edge/repeated-block-FB2jF4o_.cjs → node/repeated-block-wW6CINnA.cjs} +1 -1
- package/lib/node/server-index.d.ts +1 -0
- package/nuxt.js +0 -13
- package/package.json +2 -8
- package/lib/browser/block-styles-rt4v7rBl.cjs +0 -1
- package/lib/browser/get-block-properties-sInACBRh.cjs +0 -1
- package/lib/browser/index-MDNnQzZB.cjs +0 -166
- package/lib/browser/init.cjs +0 -8
- package/lib/browser/init.d.cts +0 -14
- package/lib/browser/init.d.mts +0 -14
- package/lib/browser/init.mjs +0 -65
- package/lib/browser/logger-0-1mARBa.cjs +0 -1
- package/lib/browser/logger-Hm2e1Xk_.js +0 -12
- package/lib/edge/block-styles-Ta3OQAmE.cjs +0 -1
- package/lib/edge/get-block-properties-Dy3XF05J.cjs +0 -1
- package/lib/edge/init.cjs +0 -8
- package/lib/edge/init.d.cts +0 -14
- package/lib/edge/init.d.mts +0 -14
- package/lib/edge/init.mjs +0 -64
- package/lib/edge/logger-I8FmJD_1.js +0 -11
- package/lib/edge/logger-U9-0vDJK.cjs +0 -1
- package/lib/node/block-styles-u7KGnyuc.cjs +0 -1
- package/lib/node/get-block-properties-2Q2lr9bu.cjs +0 -1
- package/lib/node/index-s5vEnK-M.cjs +0 -166
- package/lib/node/init.cjs +0 -1
- package/lib/node/init.d.cts +0 -14
- package/lib/node/init.d.mts +0 -14
- package/lib/node/init.mjs +0 -11
- package/lib/node/node-runtime-0rF8vJwU.js +0 -233
- package/lib/node/node-runtime-Bqb5TnyM.cjs +0 -48
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
function
|
|
1
|
+
var $ = Object.defineProperty;
|
|
2
|
+
var E = (e, t, n) => t in e ? $(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var v = (e, t, n) => (E(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
import { defineComponent, openBlock, createElementBlock, Fragment as Fragment$1, createBlock, resolveDynamicComponent, mergeProps, toHandlers, withCtx, renderSlot, resolveComponent, createTextVNode, toDisplayString, defineAsyncComponent, createVNode, renderList, createCommentVNode, h, createElementVNode, normalizeStyle, normalizeClass, markRaw } from "vue";
|
|
5
|
+
import { createRequire } from "node:module";
|
|
6
|
+
const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), isEmptyElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.has(e.toLowerCase());
|
|
7
|
+
function filterAttrs(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 V(e = {}, t, n) {
|
|
|
14
14
|
}
|
|
15
15
|
return o;
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const _sfc_main$t = defineComponent({
|
|
18
18
|
name: "dynamic-renderer",
|
|
19
19
|
props: ["TagName", "attributes", "actionAttributes"],
|
|
20
20
|
data() {
|
|
21
|
-
return { isEmptyElement
|
|
21
|
+
return { isEmptyElement };
|
|
22
22
|
}
|
|
23
|
-
}),
|
|
23
|
+
}), _export_sfc = (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 _sfc_render$r(e, t, n, o, r, i) {
|
|
30
|
+
return e.isEmptyElement(e.TagName) ? (openBlock(), createBlock(resolveDynamicComponent(e.TagName), mergeProps({ key: 1 }, e.attributes, toHandlers(e.actionAttributes)), null, 16)) : (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
31
|
+
typeof e.TagName == "string" ? (openBlock(), createBlock(resolveDynamicComponent(e.TagName), mergeProps({ key: 0 }, e.attributes, toHandlers(e.actionAttributes)), {
|
|
32
|
+
default: withCtx(() => [
|
|
33
|
+
renderSlot(e.$slots, "default")
|
|
34
34
|
]),
|
|
35
35
|
_: 3
|
|
36
|
-
}, 16)) : (
|
|
37
|
-
default:
|
|
38
|
-
|
|
36
|
+
}, 16)) : (openBlock(), createBlock(resolveDynamicComponent(e.TagName), mergeProps({ key: 1 }, e.attributes, toHandlers(e.actionAttributes)), {
|
|
37
|
+
default: withCtx(() => [
|
|
38
|
+
renderSlot(e.$slots, "default")
|
|
39
39
|
]),
|
|
40
40
|
_: 3
|
|
41
41
|
}, 16))
|
|
42
42
|
], 64));
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const DynamicRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$r]]), dynamicRenderer = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
45
45
|
__proto__: null,
|
|
46
|
-
default:
|
|
47
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
48
|
-
switch (
|
|
46
|
+
default: DynamicRenderer
|
|
47
|
+
}, Symbol.toStringTag, { value: "Module" })), TARGET = "vue", getClassPropName = () => {
|
|
48
|
+
switch (TARGET) {
|
|
49
49
|
case "react":
|
|
50
50
|
case "reactNative":
|
|
51
51
|
case "rsc":
|
|
@@ -57,9 +57,9 @@ const me = /* @__PURE__ */ b(vt, [["render", Ct]]), Bi = /* @__PURE__ */ Object.
|
|
|
57
57
|
case "angular":
|
|
58
58
|
return "class";
|
|
59
59
|
}
|
|
60
|
-
},
|
|
60
|
+
}, _sfc_main$s = defineComponent({
|
|
61
61
|
name: "builder-button",
|
|
62
|
-
components: { DynamicRenderer
|
|
62
|
+
components: { DynamicRenderer },
|
|
63
63
|
props: [
|
|
64
64
|
"attributes",
|
|
65
65
|
"link",
|
|
@@ -68,13 +68,13 @@ const me = /* @__PURE__ */ b(vt, [["render", Ct]]), Bi = /* @__PURE__ */ Object.
|
|
|
68
68
|
"text"
|
|
69
69
|
],
|
|
70
70
|
data() {
|
|
71
|
-
return { filterAttrs
|
|
71
|
+
return { filterAttrs };
|
|
72
72
|
},
|
|
73
73
|
methods: {
|
|
74
74
|
attrs() {
|
|
75
75
|
return {
|
|
76
|
-
...
|
|
77
|
-
[
|
|
76
|
+
...filterAttrs(this.attributes, "v-on:", !1),
|
|
77
|
+
[getClassPropName()]: `${this.link ? "" : "builder-button"} ${this.attributes[getClassPropName()] || ""}`,
|
|
78
78
|
...this.link ? {
|
|
79
79
|
href: this.link,
|
|
80
80
|
target: this.openLinkInNewTab ? "_blank" : void 0,
|
|
@@ -86,20 +86,20 @@ const me = /* @__PURE__ */ b(vt, [["render", Ct]]), Bi = /* @__PURE__ */ Object.
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
|
-
function
|
|
90
|
-
const s =
|
|
91
|
-
return
|
|
89
|
+
function _sfc_render$q(e, t, n, o, r, i) {
|
|
90
|
+
const s = resolveComponent("DynamicRenderer");
|
|
91
|
+
return openBlock(), createBlock(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: withCtx(() => [
|
|
97
|
+
createTextVNode(toDisplayString(e.text), 1)
|
|
98
98
|
]),
|
|
99
99
|
_: 1
|
|
100
100
|
}, 8, ["attributes", "TagName", "actionAttributes"]);
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$q]]), key$1 = Symbol(), BuilderContext = {
|
|
103
103
|
Builder: {
|
|
104
104
|
content: null,
|
|
105
105
|
context: {},
|
|
@@ -115,25 +115,98 @@ const wt = /* @__PURE__ */ b(St, [["render", Tt]]), It = Symbol(), le = {
|
|
|
115
115
|
BlocksWrapperProps: {},
|
|
116
116
|
nonce: ""
|
|
117
117
|
},
|
|
118
|
-
key:
|
|
119
|
-
},
|
|
118
|
+
key: key$1
|
|
119
|
+
}, key = Symbol(), ComponentsContext = {
|
|
120
120
|
Components: { registeredComponents: {} },
|
|
121
|
-
key
|
|
121
|
+
key
|
|
122
122
|
};
|
|
123
|
-
function
|
|
123
|
+
function getBlockComponentOptions(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
|
-
function
|
|
130
|
+
function omit(e, ...t) {
|
|
131
131
|
const n = Object.assign({}, e);
|
|
132
132
|
for (const o of t)
|
|
133
133
|
delete n[o];
|
|
134
134
|
return n;
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const MSG_PREFIX = "[Builder.io]: ", logger = {
|
|
137
|
+
log: (...e) => console.log(MSG_PREFIX, ...e),
|
|
138
|
+
error: (...e) => console.error(MSG_PREFIX, ...e),
|
|
139
|
+
warn: (...e) => console.warn(MSG_PREFIX, ...e),
|
|
140
|
+
debug: (...e) => console.debug(MSG_PREFIX, ...e)
|
|
141
|
+
};
|
|
142
|
+
function isBrowser() {
|
|
143
|
+
return typeof window < "u" && typeof document < "u";
|
|
144
|
+
}
|
|
145
|
+
const convertSearchParamsToQueryObject = (e) => {
|
|
146
|
+
const t = {};
|
|
147
|
+
return e.forEach((n, o) => {
|
|
148
|
+
t[o] = n;
|
|
149
|
+
}), t;
|
|
150
|
+
}, normalizeSearchParams = (e) => e instanceof URLSearchParams ? convertSearchParamsToQueryObject(e) : e, getSearchString = (e) => typeof e == "string" ? e : e instanceof URLSearchParams ? e.toString() : new URLSearchParams(e).toString();
|
|
151
|
+
function isIframe() {
|
|
152
|
+
return isBrowser() && window.self !== window.top;
|
|
153
|
+
}
|
|
154
|
+
function isEditing(e) {
|
|
155
|
+
return isIframe() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
|
|
156
|
+
getSearchString(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
|
|
157
|
+
}
|
|
158
|
+
const getLocation = () => {
|
|
159
|
+
if (isBrowser()) {
|
|
160
|
+
const e = new URL(location.href);
|
|
161
|
+
return e.pathname === "" && (e.pathname = "/"), e;
|
|
162
|
+
} else
|
|
163
|
+
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
164
|
+
}, getUserAgent = () => typeof navigator == "object" && navigator.userAgent || "", getUserAttributes = () => {
|
|
165
|
+
const e = getUserAgent(), t = {
|
|
166
|
+
Android() {
|
|
167
|
+
return e.match(/Android/i);
|
|
168
|
+
},
|
|
169
|
+
BlackBerry() {
|
|
170
|
+
return e.match(/BlackBerry/i);
|
|
171
|
+
},
|
|
172
|
+
iOS() {
|
|
173
|
+
return e.match(/iPhone|iPod/i);
|
|
174
|
+
},
|
|
175
|
+
Opera() {
|
|
176
|
+
return e.match(/Opera Mini/i);
|
|
177
|
+
},
|
|
178
|
+
Windows() {
|
|
179
|
+
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
180
|
+
},
|
|
181
|
+
any() {
|
|
182
|
+
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || TARGET === "reactNative";
|
|
183
|
+
}
|
|
184
|
+
}, n = e.match(/Tablet|iPad/i), o = getLocation();
|
|
185
|
+
return {
|
|
186
|
+
urlPath: o == null ? void 0 : o.pathname,
|
|
187
|
+
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
188
|
+
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
189
|
+
};
|
|
190
|
+
}, getFunctionArguments = ({
|
|
191
|
+
builder: e,
|
|
192
|
+
context: t,
|
|
193
|
+
event: n,
|
|
194
|
+
state: o
|
|
195
|
+
}) => Object.entries({
|
|
196
|
+
state: o,
|
|
197
|
+
Builder: e,
|
|
198
|
+
// legacy
|
|
199
|
+
builder: e,
|
|
200
|
+
context: t,
|
|
201
|
+
event: n
|
|
202
|
+
}), getBuilderGlobals = () => ({
|
|
203
|
+
isEditing: isEditing(),
|
|
204
|
+
isBrowser: isBrowser(),
|
|
205
|
+
isServer: !isBrowser(),
|
|
206
|
+
getUserAttributes: () => getUserAttributes()
|
|
207
|
+
}), parseCode = (e, {
|
|
208
|
+
isExpression: t = !0
|
|
209
|
+
}) => /* 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 = ({
|
|
137
210
|
code: e,
|
|
138
211
|
builder: t,
|
|
139
212
|
context: n,
|
|
@@ -142,11 +215,11 @@ const Bt = ({
|
|
|
142
215
|
rootSetState: i,
|
|
143
216
|
rootState: s
|
|
144
217
|
}) => {
|
|
145
|
-
const l =
|
|
218
|
+
const l = getFunctionArguments({
|
|
146
219
|
builder: t,
|
|
147
220
|
context: n,
|
|
148
221
|
event: o,
|
|
149
|
-
state:
|
|
222
|
+
state: flattenState({
|
|
150
223
|
rootState: s,
|
|
151
224
|
localState: r,
|
|
152
225
|
rootSetState: i
|
|
@@ -154,7 +227,7 @@ const Bt = ({
|
|
|
154
227
|
});
|
|
155
228
|
return new Function(...l.map(([a]) => a), e)(...l.map(([, a]) => a));
|
|
156
229
|
};
|
|
157
|
-
function
|
|
230
|
+
function flattenState({
|
|
158
231
|
rootState: e,
|
|
159
232
|
localState: t,
|
|
160
233
|
rootSetState: n
|
|
@@ -164,7 +237,7 @@ function We({
|
|
|
164
237
|
if (t && r in t)
|
|
165
238
|
return t[r];
|
|
166
239
|
const i = o[r];
|
|
167
|
-
return typeof i == "object" && i !== null ?
|
|
240
|
+
return typeof i == "object" && i !== null ? flattenState({
|
|
168
241
|
rootState: i,
|
|
169
242
|
localState: void 0,
|
|
170
243
|
rootSetState: n ? (s) => {
|
|
@@ -179,18 +252,156 @@ function We({
|
|
|
179
252
|
}
|
|
180
253
|
});
|
|
181
254
|
}
|
|
182
|
-
const
|
|
183
|
-
|
|
255
|
+
const SDK_NAME_FOR_TARGET = (() => {
|
|
256
|
+
switch (TARGET) {
|
|
257
|
+
case "rsc":
|
|
258
|
+
return "react-nextjs";
|
|
259
|
+
case "reactNative":
|
|
260
|
+
return "react-native";
|
|
261
|
+
default:
|
|
262
|
+
return TARGET;
|
|
263
|
+
}
|
|
264
|
+
})(), SDK_NAME = `@builder.io/sdk-${SDK_NAME_FOR_TARGET}`, fastClone = (e) => JSON.parse(JSON.stringify(e)), set = (e, t, n) => {
|
|
265
|
+
if (Object(e) !== e)
|
|
266
|
+
return e;
|
|
267
|
+
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
268
|
+
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;
|
|
269
|
+
}, noop = () => {
|
|
270
|
+
};
|
|
271
|
+
let safeDynamicRequire = noop;
|
|
272
|
+
try {
|
|
273
|
+
safeDynamicRequire = createRequire(import.meta.url);
|
|
274
|
+
} catch (error) {
|
|
275
|
+
try {
|
|
276
|
+
safeDynamicRequire = eval("require");
|
|
277
|
+
} catch (e) {
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
const getSyncValName = (e) => `bldr_${e}_sync`, BUILDER_SET_STATE_NAME = "BUILDER_SET_STATE", INJECTED_IVM_GLOBAL = "BUILDER_IVM", REF_TO_PROXY_FN = `
|
|
281
|
+
var refToProxy = (obj) => {
|
|
282
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
283
|
+
return obj;
|
|
284
|
+
}
|
|
285
|
+
return new Proxy({}, {
|
|
286
|
+
get(target, key) {
|
|
287
|
+
if (key === 'copySync') {
|
|
288
|
+
return () => obj.copySync();
|
|
289
|
+
}
|
|
290
|
+
const val = obj.getSync(key);
|
|
291
|
+
if (typeof val?.getSync === 'function') {
|
|
292
|
+
return refToProxy(val);
|
|
293
|
+
}
|
|
294
|
+
return val;
|
|
295
|
+
},
|
|
296
|
+
set(target, key, value) {
|
|
297
|
+
const v = typeof value === 'object' ? new ${INJECTED_IVM_GLOBAL}.Reference(value) : value;
|
|
298
|
+
obj.setSync(key, v);
|
|
299
|
+
${BUILDER_SET_STATE_NAME}(key, value)
|
|
300
|
+
},
|
|
301
|
+
deleteProperty(target, key) {
|
|
302
|
+
obj.deleteSync(key);
|
|
303
|
+
}
|
|
304
|
+
})
|
|
305
|
+
}
|
|
306
|
+
`, processCode = ({
|
|
307
|
+
code: e,
|
|
308
|
+
args: t
|
|
309
|
+
}) => {
|
|
310
|
+
const n = t.map(([o]) => `var ${o} = refToProxy(${getSyncValName(o)}); `).join("");
|
|
311
|
+
return `
|
|
312
|
+
${REF_TO_PROXY_FN}
|
|
313
|
+
${n}
|
|
314
|
+
function theFunction() {
|
|
315
|
+
${e}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const output = theFunction()
|
|
319
|
+
|
|
320
|
+
if (typeof output === 'object' && output !== null) {
|
|
321
|
+
return JSON.stringify(output.copySync ? output.copySync() : output);
|
|
322
|
+
} else {
|
|
323
|
+
return output;
|
|
324
|
+
}
|
|
325
|
+
`;
|
|
326
|
+
};
|
|
327
|
+
let IVM_INSTANCE = null, IVM_CONTEXT = null;
|
|
328
|
+
const SHOULD_MENTION_INITIALIZE_SCRIPT = SDK_NAME === "@builder.io/sdk-react-nextjs" || SDK_NAME === "@builder.io/sdk-react" || SDK_NAME === "@builder.io/sdk-qwik", getIvm = () => {
|
|
329
|
+
try {
|
|
330
|
+
const t = safeDynamicRequire("isolated-vm");
|
|
331
|
+
if (t)
|
|
332
|
+
return t;
|
|
333
|
+
} catch (t) {
|
|
334
|
+
logger.error("isolated-vm import error.", t);
|
|
335
|
+
}
|
|
336
|
+
const e = `${MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
|
|
337
|
+
|
|
338
|
+
SOLUTION: In a server-only execution path within your application, do one of the following:
|
|
339
|
+
|
|
340
|
+
${SHOULD_MENTION_INITIALIZE_SCRIPT ? `- import and call \`initializeNodeRuntime()\` from "${SDK_NAME}/node/init".` : ""}
|
|
341
|
+
- add the following import: \`await import('isolated-vm')\`.
|
|
342
|
+
|
|
343
|
+
For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
|
|
344
|
+
throw new Error(e);
|
|
345
|
+
};
|
|
346
|
+
function setIsolateContext(e = {
|
|
347
|
+
memoryLimit: 128
|
|
348
|
+
}) {
|
|
349
|
+
const t = getIvm(), o = new t.Isolate(e).createContextSync(), r = o.global;
|
|
350
|
+
return r.setSync("global", r.derefInto()), r.setSync("log", function(...i) {
|
|
351
|
+
console.log(...i);
|
|
352
|
+
}), r.setSync(INJECTED_IVM_GLOBAL, t), IVM_CONTEXT = o, o;
|
|
353
|
+
}
|
|
354
|
+
const getIsolateContext = () => IVM_CONTEXT || setIsolateContext(), runInNode = ({
|
|
355
|
+
code: e,
|
|
356
|
+
builder: t,
|
|
357
|
+
context: n,
|
|
358
|
+
event: o,
|
|
359
|
+
localState: r,
|
|
360
|
+
rootSetState: i,
|
|
361
|
+
rootState: s
|
|
362
|
+
}) => {
|
|
363
|
+
const l = getIvm(), a = fastClone({
|
|
364
|
+
...s,
|
|
365
|
+
...r
|
|
366
|
+
}), d = getFunctionArguments({
|
|
367
|
+
builder: t,
|
|
368
|
+
context: n,
|
|
369
|
+
event: o,
|
|
370
|
+
state: a
|
|
371
|
+
}), p = getIsolateContext(), c = p.global;
|
|
372
|
+
c.setSync(BUILDER_SET_STATE_NAME, function(m, b) {
|
|
373
|
+
set(s, m, b), i == null || i(s);
|
|
374
|
+
}), d.forEach(([m, b]) => {
|
|
375
|
+
const C = typeof b == "object" ? new l.Reference(
|
|
376
|
+
// workaround: methods with default values for arguments is not being cloned over
|
|
377
|
+
m === "builder" ? {
|
|
378
|
+
...b,
|
|
379
|
+
getUserAttributes: () => b.getUserAttributes()
|
|
380
|
+
} : b
|
|
381
|
+
) : null;
|
|
382
|
+
c.setSync(getSyncValName(m), C);
|
|
383
|
+
});
|
|
384
|
+
const u = processCode({
|
|
385
|
+
code: e,
|
|
386
|
+
args: d
|
|
387
|
+
}), f = p.evalClosureSync(u);
|
|
388
|
+
try {
|
|
389
|
+
return JSON.parse(f);
|
|
390
|
+
} catch {
|
|
391
|
+
return f;
|
|
392
|
+
}
|
|
393
|
+
}, checkIsDefined = (e) => e != null;
|
|
394
|
+
function isNodeRuntime() {
|
|
184
395
|
var e;
|
|
185
|
-
return typeof process < "u" &&
|
|
396
|
+
return typeof process < "u" && checkIsDefined((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
186
397
|
}
|
|
187
|
-
const
|
|
398
|
+
const shouldForceBrowserRuntimeInNode = () => {
|
|
188
399
|
var o;
|
|
189
|
-
if (!
|
|
400
|
+
if (!isNodeRuntime())
|
|
190
401
|
return !1;
|
|
191
402
|
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 ? (
|
|
193
|
-
},
|
|
403
|
+
return e && t && !n ? (logger.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;
|
|
404
|
+
}, chooseBrowserOrServerEval = (e) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(e) : runInNode(e), DISABLE_CACHE = !0, y = class y {
|
|
194
405
|
static getCacheKey(t) {
|
|
195
406
|
return JSON.stringify({
|
|
196
407
|
...t,
|
|
@@ -200,17 +411,17 @@ const xt = () => {
|
|
|
200
411
|
});
|
|
201
412
|
}
|
|
202
413
|
static getCachedValue(t) {
|
|
203
|
-
return
|
|
414
|
+
return y.cache.get(t);
|
|
204
415
|
}
|
|
205
416
|
static setCachedValue(t, n) {
|
|
206
|
-
|
|
417
|
+
y.cache.size > 20 && y.cache.delete(y.cache.keys().next().value), y.cache.set(t, {
|
|
207
418
|
value: n
|
|
208
419
|
});
|
|
209
420
|
}
|
|
210
421
|
};
|
|
211
|
-
|
|
212
|
-
let
|
|
213
|
-
function
|
|
422
|
+
v(y, "cacheLimit", 20), v(y, "cache", /* @__PURE__ */ new Map());
|
|
423
|
+
let EvalCache = y;
|
|
424
|
+
function evaluate({
|
|
214
425
|
code: e,
|
|
215
426
|
context: t,
|
|
216
427
|
localState: n,
|
|
@@ -223,50 +434,53 @@ function G({
|
|
|
223
434
|
if (e === "")
|
|
224
435
|
return;
|
|
225
436
|
const a = {
|
|
226
|
-
code:
|
|
437
|
+
code: parseCode(e, {
|
|
227
438
|
isExpression: s
|
|
228
439
|
}),
|
|
229
|
-
builder:
|
|
440
|
+
builder: getBuilderGlobals(),
|
|
230
441
|
context: t,
|
|
231
442
|
event: i,
|
|
232
443
|
rootSetState: r,
|
|
233
444
|
rootState: o,
|
|
234
445
|
localState: n
|
|
235
446
|
};
|
|
236
|
-
if (l && !
|
|
237
|
-
const
|
|
238
|
-
if (
|
|
239
|
-
return
|
|
447
|
+
if (l && !DISABLE_CACHE) {
|
|
448
|
+
const d = EvalCache.getCacheKey(a), p = EvalCache.getCachedValue(d);
|
|
449
|
+
if (p)
|
|
450
|
+
return p.value;
|
|
240
451
|
}
|
|
241
452
|
try {
|
|
242
|
-
const
|
|
453
|
+
const d = chooseBrowserOrServerEval(a);
|
|
243
454
|
if (l) {
|
|
244
|
-
const
|
|
245
|
-
|
|
455
|
+
const p = EvalCache.getCacheKey(a);
|
|
456
|
+
EvalCache.setCachedValue(p, d);
|
|
246
457
|
}
|
|
247
|
-
return
|
|
248
|
-
} catch (
|
|
249
|
-
|
|
458
|
+
return d;
|
|
459
|
+
} catch (d) {
|
|
460
|
+
logger.error("Failed code evaluation: " + d.message, {
|
|
250
461
|
code: e
|
|
251
462
|
});
|
|
252
463
|
return;
|
|
253
464
|
}
|
|
254
465
|
}
|
|
255
|
-
function
|
|
466
|
+
function transformBlock(e) {
|
|
467
|
+
return e;
|
|
468
|
+
}
|
|
469
|
+
function deepCloneWithConditions(e) {
|
|
256
470
|
if (e === null || typeof e != "object")
|
|
257
471
|
return e;
|
|
258
472
|
if (Array.isArray(e))
|
|
259
|
-
return e.map((n) =>
|
|
473
|
+
return e.map((n) => deepCloneWithConditions(n));
|
|
260
474
|
if (e["@type"] === "@builder.io/sdk:Element")
|
|
261
475
|
return e;
|
|
262
476
|
const t = {};
|
|
263
477
|
for (const n in e)
|
|
264
|
-
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
478
|
+
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = deepCloneWithConditions(e[n]));
|
|
265
479
|
return t;
|
|
266
480
|
}
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
269
|
-
const t =
|
|
481
|
+
const IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK = ["svelte", "vue", "angular", "qwik", "solid"].includes(TARGET), getCopy = (e) => {
|
|
482
|
+
if (IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK) {
|
|
483
|
+
const t = fastClone(e);
|
|
270
484
|
return {
|
|
271
485
|
...t,
|
|
272
486
|
properties: {
|
|
@@ -277,7 +491,7 @@ const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(x), Nt = (e) =
|
|
|
277
491
|
}
|
|
278
492
|
};
|
|
279
493
|
} else {
|
|
280
|
-
const t =
|
|
494
|
+
const t = deepCloneWithConditions(omit(e, "children", "meta"));
|
|
281
495
|
return {
|
|
282
496
|
...t,
|
|
283
497
|
properties: {
|
|
@@ -290,7 +504,7 @@ const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(x), Nt = (e) =
|
|
|
290
504
|
meta: e.meta
|
|
291
505
|
};
|
|
292
506
|
}
|
|
293
|
-
},
|
|
507
|
+
}, evaluateBindings = ({
|
|
294
508
|
block: e,
|
|
295
509
|
context: t,
|
|
296
510
|
localState: n,
|
|
@@ -299,9 +513,9 @@ const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(x), Nt = (e) =
|
|
|
299
513
|
}) => {
|
|
300
514
|
if (!e.bindings)
|
|
301
515
|
return e;
|
|
302
|
-
const i =
|
|
516
|
+
const i = getCopy(e);
|
|
303
517
|
for (const s in e.bindings) {
|
|
304
|
-
const l = e.bindings[s], a =
|
|
518
|
+
const l = e.bindings[s], a = evaluate({
|
|
305
519
|
code: l,
|
|
306
520
|
localState: n,
|
|
307
521
|
rootState: o,
|
|
@@ -309,11 +523,11 @@ const Wt = ["svelte", "vue", "angular", "qwik", "solid"].includes(x), Nt = (e) =
|
|
|
309
523
|
context: t,
|
|
310
524
|
enableCache: !0
|
|
311
525
|
});
|
|
312
|
-
|
|
526
|
+
set(i, s, a);
|
|
313
527
|
}
|
|
314
528
|
return i;
|
|
315
529
|
};
|
|
316
|
-
function
|
|
530
|
+
function getProcessedBlock({
|
|
317
531
|
block: e,
|
|
318
532
|
context: t,
|
|
319
533
|
shouldEvaluateBindings: n,
|
|
@@ -322,7 +536,7 @@ function Ot({
|
|
|
322
536
|
rootSetState: i
|
|
323
537
|
}) {
|
|
324
538
|
const s = e;
|
|
325
|
-
return n ?
|
|
539
|
+
return n ? evaluateBindings({
|
|
326
540
|
block: s,
|
|
327
541
|
localState: o,
|
|
328
542
|
rootState: r,
|
|
@@ -330,25 +544,25 @@ function Ot({
|
|
|
330
544
|
context: t
|
|
331
545
|
}) : s;
|
|
332
546
|
}
|
|
333
|
-
function
|
|
334
|
-
const t = e || (
|
|
335
|
-
return t ?
|
|
547
|
+
function isPreviewing(e) {
|
|
548
|
+
const t = e || (isBrowser() ? window.location.search : void 0);
|
|
549
|
+
return t ? getSearchString(t).indexOf("builder.preview=") !== -1 : !1;
|
|
336
550
|
}
|
|
337
|
-
const
|
|
551
|
+
const createRegisterComponentMessage = (e) => ({
|
|
338
552
|
type: "builder.registerComponent",
|
|
339
|
-
data:
|
|
340
|
-
}),
|
|
553
|
+
data: serializeIncludingFunctions(e)
|
|
554
|
+
}), serializeFn = (e) => {
|
|
341
555
|
const t = e.toString().trim();
|
|
342
556
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
343
557
|
};
|
|
344
|
-
function
|
|
345
|
-
return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ?
|
|
558
|
+
function serializeIncludingFunctions(e) {
|
|
559
|
+
return JSON.parse(JSON.stringify(e, (t, n) => typeof n == "function" ? serializeFn(n) : n));
|
|
346
560
|
}
|
|
347
|
-
const
|
|
348
|
-
function
|
|
349
|
-
e === "plugin" && (t =
|
|
350
|
-
let n =
|
|
351
|
-
if (n || (n =
|
|
561
|
+
const registry = {};
|
|
562
|
+
function register(e, t) {
|
|
563
|
+
e === "plugin" && (t = serializeIncludingFunctions(t));
|
|
564
|
+
let n = registry[e];
|
|
565
|
+
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
352
566
|
const o = {
|
|
353
567
|
type: "builder.register",
|
|
354
568
|
data: {
|
|
@@ -363,38 +577,38 @@ function Mt(e, t) {
|
|
|
363
577
|
}
|
|
364
578
|
}
|
|
365
579
|
}
|
|
366
|
-
const
|
|
367
|
-
function
|
|
368
|
-
if (
|
|
369
|
-
Object.assign(
|
|
580
|
+
const settings = {};
|
|
581
|
+
function setEditorSettings(e) {
|
|
582
|
+
if (isBrowser()) {
|
|
583
|
+
Object.assign(settings, e);
|
|
370
584
|
const t = {
|
|
371
585
|
type: "builder.settingsChange",
|
|
372
|
-
data:
|
|
586
|
+
data: settings
|
|
373
587
|
};
|
|
374
588
|
parent.postMessage(t, "*");
|
|
375
589
|
}
|
|
376
590
|
}
|
|
377
|
-
const
|
|
591
|
+
const BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUILDER_OPTIONS_PREFIX = "options.", getBuilderSearchParams = (e) => {
|
|
378
592
|
if (!e)
|
|
379
593
|
return {};
|
|
380
|
-
const t =
|
|
594
|
+
const t = normalizeSearchParams(e), n = {};
|
|
381
595
|
return Object.keys(t).forEach((o) => {
|
|
382
|
-
if (o.startsWith(
|
|
383
|
-
const r = o.replace(
|
|
596
|
+
if (o.startsWith(BUILDER_SEARCHPARAMS_PREFIX)) {
|
|
597
|
+
const r = o.replace(BUILDER_SEARCHPARAMS_PREFIX, "").replace(BUILDER_OPTIONS_PREFIX, "");
|
|
384
598
|
n[r] = t[o];
|
|
385
599
|
}
|
|
386
600
|
}), n;
|
|
387
|
-
},
|
|
388
|
-
if (
|
|
601
|
+
}, getBuilderSearchParamsFromWindow = () => {
|
|
602
|
+
if (!isBrowser())
|
|
389
603
|
return {};
|
|
390
604
|
const e = new URLSearchParams(window.location.search);
|
|
391
|
-
return
|
|
392
|
-
},
|
|
605
|
+
return getBuilderSearchParams(e);
|
|
606
|
+
}, getTopLevelDomain = (e) => {
|
|
393
607
|
if (e === "localhost" || e === "127.0.0.1")
|
|
394
608
|
return e;
|
|
395
609
|
const t = e.split(".");
|
|
396
610
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
397
|
-
},
|
|
611
|
+
}, getCookieSync = ({
|
|
398
612
|
name: e,
|
|
399
613
|
canTrack: t
|
|
400
614
|
}) => {
|
|
@@ -402,17 +616,17 @@ const Te = "builder.", Ht = "options.", Ne = (e) => {
|
|
|
402
616
|
try {
|
|
403
617
|
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
404
618
|
} catch (o) {
|
|
405
|
-
|
|
619
|
+
logger.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
406
620
|
return;
|
|
407
621
|
}
|
|
408
|
-
},
|
|
622
|
+
}, getCookie = async (e) => getCookieSync(e), stringifyCookie = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(checkIsDefined).join("; "), SECURE_CONFIG = [["secure", ""], ["SameSite", "None"]], createCookieString = ({
|
|
409
623
|
name: e,
|
|
410
624
|
value: t,
|
|
411
625
|
expires: n
|
|
412
626
|
}) => {
|
|
413
|
-
const r = (
|
|
414
|
-
return
|
|
415
|
-
},
|
|
627
|
+
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];
|
|
628
|
+
return stringifyCookie(s);
|
|
629
|
+
}, setCookie = async ({
|
|
416
630
|
name: e,
|
|
417
631
|
value: t,
|
|
418
632
|
expires: n,
|
|
@@ -421,98 +635,98 @@ const Te = "builder.", Ht = "options.", Ne = (e) => {
|
|
|
421
635
|
try {
|
|
422
636
|
if (!o)
|
|
423
637
|
return;
|
|
424
|
-
const r =
|
|
638
|
+
const r = createCookieString({
|
|
425
639
|
name: e,
|
|
426
640
|
value: t,
|
|
427
641
|
expires: n
|
|
428
642
|
});
|
|
429
643
|
document.cookie = r;
|
|
430
644
|
} catch (r) {
|
|
431
|
-
|
|
645
|
+
logger.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
|
|
432
646
|
}
|
|
433
647
|
};
|
|
434
|
-
function
|
|
648
|
+
function uuidv4() {
|
|
435
649
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
436
650
|
const t = Math.random() * 16 | 0;
|
|
437
651
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
438
652
|
});
|
|
439
653
|
}
|
|
440
|
-
function
|
|
441
|
-
return
|
|
654
|
+
function uuid() {
|
|
655
|
+
return uuidv4().replace(/-/g, "");
|
|
442
656
|
}
|
|
443
|
-
const
|
|
657
|
+
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId", getSessionId = async ({
|
|
444
658
|
canTrack: e
|
|
445
659
|
}) => {
|
|
446
660
|
if (!e)
|
|
447
661
|
return;
|
|
448
|
-
const t = await
|
|
449
|
-
name:
|
|
662
|
+
const t = await getCookie({
|
|
663
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
450
664
|
canTrack: e
|
|
451
665
|
});
|
|
452
|
-
if (
|
|
666
|
+
if (checkIsDefined(t))
|
|
453
667
|
return t;
|
|
454
668
|
{
|
|
455
|
-
const n =
|
|
456
|
-
return
|
|
669
|
+
const n = createSessionId();
|
|
670
|
+
return setSessionId({
|
|
457
671
|
id: n,
|
|
458
672
|
canTrack: e
|
|
459
673
|
}), n;
|
|
460
674
|
}
|
|
461
|
-
},
|
|
675
|
+
}, createSessionId = () => uuid(), setSessionId = ({
|
|
462
676
|
id: e,
|
|
463
677
|
canTrack: t
|
|
464
|
-
}) =>
|
|
465
|
-
name:
|
|
678
|
+
}) => setCookie({
|
|
679
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
466
680
|
value: e,
|
|
467
681
|
canTrack: t
|
|
468
|
-
}),
|
|
682
|
+
}), getLocalStorage = () => isBrowser() && typeof localStorage < "u" ? localStorage : void 0, getLocalStorageItem = ({
|
|
469
683
|
key: e,
|
|
470
684
|
canTrack: t
|
|
471
685
|
}) => {
|
|
472
686
|
var n;
|
|
473
687
|
try {
|
|
474
|
-
return t ? (n =
|
|
688
|
+
return t ? (n = getLocalStorage()) == null ? void 0 : n.getItem(e) : void 0;
|
|
475
689
|
} catch (o) {
|
|
476
690
|
console.debug("[LocalStorage] GET error: ", o);
|
|
477
691
|
return;
|
|
478
692
|
}
|
|
479
|
-
},
|
|
693
|
+
}, setLocalStorageItem = ({
|
|
480
694
|
key: e,
|
|
481
695
|
canTrack: t,
|
|
482
696
|
value: n
|
|
483
697
|
}) => {
|
|
484
698
|
var o;
|
|
485
699
|
try {
|
|
486
|
-
t && ((o =
|
|
700
|
+
t && ((o = getLocalStorage()) == null || o.setItem(e, n));
|
|
487
701
|
} catch (r) {
|
|
488
702
|
console.debug("[LocalStorage] SET error: ", r);
|
|
489
703
|
}
|
|
490
|
-
},
|
|
704
|
+
}, VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId", getVisitorId = ({
|
|
491
705
|
canTrack: e
|
|
492
706
|
}) => {
|
|
493
707
|
if (!e)
|
|
494
708
|
return;
|
|
495
|
-
const t =
|
|
496
|
-
key:
|
|
709
|
+
const t = getLocalStorageItem({
|
|
710
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
497
711
|
canTrack: e
|
|
498
712
|
});
|
|
499
|
-
if (
|
|
713
|
+
if (checkIsDefined(t))
|
|
500
714
|
return t;
|
|
501
715
|
{
|
|
502
|
-
const n =
|
|
503
|
-
return
|
|
716
|
+
const n = createVisitorId();
|
|
717
|
+
return setVisitorId({
|
|
504
718
|
id: n,
|
|
505
719
|
canTrack: e
|
|
506
720
|
}), n;
|
|
507
721
|
}
|
|
508
|
-
},
|
|
722
|
+
}, createVisitorId = () => uuid(), setVisitorId = ({
|
|
509
723
|
id: e,
|
|
510
724
|
canTrack: t
|
|
511
|
-
}) =>
|
|
512
|
-
key:
|
|
725
|
+
}) => setLocalStorageItem({
|
|
726
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
513
727
|
value: e,
|
|
514
728
|
canTrack: t
|
|
515
|
-
}),
|
|
729
|
+
}), getTrackingEventData = async ({
|
|
516
730
|
canTrack: e
|
|
517
731
|
}) => {
|
|
518
732
|
if (!e)
|
|
@@ -520,16 +734,16 @@ const Ue = "builderSessionId", Yt = async ({
|
|
|
520
734
|
visitorId: void 0,
|
|
521
735
|
sessionId: void 0
|
|
522
736
|
};
|
|
523
|
-
const t = await
|
|
737
|
+
const t = await getSessionId({
|
|
524
738
|
canTrack: e
|
|
525
|
-
}), n =
|
|
739
|
+
}), n = getVisitorId({
|
|
526
740
|
canTrack: e
|
|
527
741
|
});
|
|
528
742
|
return {
|
|
529
743
|
sessionId: t,
|
|
530
744
|
visitorId: n
|
|
531
745
|
};
|
|
532
|
-
},
|
|
746
|
+
}, createEvent = async ({
|
|
533
747
|
type: e,
|
|
534
748
|
canTrack: t,
|
|
535
749
|
apiKey: n,
|
|
@@ -543,23 +757,23 @@ const Ue = "builderSessionId", Yt = async ({
|
|
|
543
757
|
url: location.href,
|
|
544
758
|
...o
|
|
545
759
|
},
|
|
546
|
-
...await
|
|
760
|
+
...await getTrackingEventData({
|
|
547
761
|
canTrack: t
|
|
548
762
|
}),
|
|
549
|
-
userAttributes:
|
|
763
|
+
userAttributes: getUserAttributes(),
|
|
550
764
|
ownerId: n
|
|
551
765
|
}
|
|
552
766
|
});
|
|
553
|
-
async function
|
|
767
|
+
async function _track(e) {
|
|
554
768
|
if (!e.apiKey) {
|
|
555
|
-
|
|
769
|
+
logger.error("Missing API key for track call. Please provide your API key.");
|
|
556
770
|
return;
|
|
557
771
|
}
|
|
558
|
-
if (e.canTrack && !
|
|
772
|
+
if (e.canTrack && !isEditing() && (isBrowser() || TARGET === "reactNative"))
|
|
559
773
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
560
774
|
method: "POST",
|
|
561
775
|
body: JSON.stringify({
|
|
562
|
-
events: [await
|
|
776
|
+
events: [await createEvent(e)]
|
|
563
777
|
}),
|
|
564
778
|
headers: {
|
|
565
779
|
"content-type": "application/json"
|
|
@@ -569,18 +783,18 @@ async function de(e) {
|
|
|
569
783
|
console.error("Failed to track: ", t);
|
|
570
784
|
});
|
|
571
785
|
}
|
|
572
|
-
const
|
|
786
|
+
const track = (e) => _track({
|
|
573
787
|
...e,
|
|
574
788
|
canTrack: !0
|
|
575
|
-
}),
|
|
576
|
-
function
|
|
789
|
+
}), DEFAULT_TRUSTED_HOSTS = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
790
|
+
function isFromTrustedHost(e, t) {
|
|
577
791
|
if (!t.origin.startsWith("http") && !t.origin.startsWith("https"))
|
|
578
792
|
return !1;
|
|
579
793
|
const n = new URL(t.origin), o = n.hostname;
|
|
580
|
-
return (e ||
|
|
794
|
+
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
581
795
|
}
|
|
582
|
-
const
|
|
583
|
-
|
|
796
|
+
const SDK_VERSION = "2.0.15", registerInsertMenu = () => {
|
|
797
|
+
register("insertMenu", {
|
|
584
798
|
name: "_default",
|
|
585
799
|
default: !0,
|
|
586
800
|
items: [{
|
|
@@ -602,14 +816,14 @@ const an = "2.0.13", ln = () => {
|
|
|
602
816
|
}]
|
|
603
817
|
});
|
|
604
818
|
};
|
|
605
|
-
let
|
|
606
|
-
const
|
|
819
|
+
let isSetupForEditing = !1;
|
|
820
|
+
const setupBrowserForEditing = (e = {}) => {
|
|
607
821
|
var t, n;
|
|
608
|
-
|
|
822
|
+
isSetupForEditing || (isSetupForEditing = !0, isBrowser() && ((t = window.parent) == null || t.postMessage({
|
|
609
823
|
type: "builder.sdkInfo",
|
|
610
824
|
data: {
|
|
611
|
-
target:
|
|
612
|
-
version:
|
|
825
|
+
target: TARGET,
|
|
826
|
+
version: SDK_VERSION,
|
|
613
827
|
supportsPatchUpdates: !1,
|
|
614
828
|
// Supports builder-model="..." attribute which is needed to
|
|
615
829
|
// scope our '+ add block' button styling
|
|
@@ -623,7 +837,7 @@ const Ke = (e = {}) => {
|
|
|
623
837
|
}
|
|
624
838
|
}, "*"), window.addEventListener("message", (o) => {
|
|
625
839
|
var i, s;
|
|
626
|
-
if (!
|
|
840
|
+
if (!isFromTrustedHost(e.trustedHosts, o))
|
|
627
841
|
return;
|
|
628
842
|
const {
|
|
629
843
|
data: r
|
|
@@ -631,45 +845,45 @@ const Ke = (e = {}) => {
|
|
|
631
845
|
if (r != null && r.type)
|
|
632
846
|
switch (r.type) {
|
|
633
847
|
case "builder.evaluate": {
|
|
634
|
-
const l = r.data.text, a = r.data.arguments || [],
|
|
635
|
-
let
|
|
848
|
+
const l = r.data.text, a = r.data.arguments || [], d = r.data.id, p = new Function(l);
|
|
849
|
+
let c, u = null;
|
|
636
850
|
try {
|
|
637
|
-
|
|
638
|
-
} catch (
|
|
639
|
-
|
|
851
|
+
c = p.apply(null, a);
|
|
852
|
+
} catch (f) {
|
|
853
|
+
u = f;
|
|
640
854
|
}
|
|
641
|
-
|
|
855
|
+
u ? (i = window.parent) == null || i.postMessage({
|
|
642
856
|
type: "builder.evaluateError",
|
|
643
857
|
data: {
|
|
644
|
-
id:
|
|
645
|
-
error:
|
|
858
|
+
id: d,
|
|
859
|
+
error: u.message
|
|
646
860
|
}
|
|
647
|
-
}, "*") :
|
|
648
|
-
var
|
|
649
|
-
(
|
|
861
|
+
}, "*") : c && typeof c.then == "function" ? c.then((f) => {
|
|
862
|
+
var m;
|
|
863
|
+
(m = window.parent) == null || m.postMessage({
|
|
650
864
|
type: "builder.evaluateResult",
|
|
651
865
|
data: {
|
|
652
|
-
id:
|
|
653
|
-
result:
|
|
866
|
+
id: d,
|
|
867
|
+
result: f
|
|
654
868
|
}
|
|
655
869
|
}, "*");
|
|
656
870
|
}).catch(console.error) : (s = window.parent) == null || s.postMessage({
|
|
657
871
|
type: "builder.evaluateResult",
|
|
658
872
|
data: {
|
|
659
|
-
result:
|
|
660
|
-
id:
|
|
873
|
+
result: c,
|
|
874
|
+
id: d
|
|
661
875
|
}
|
|
662
876
|
}, "*");
|
|
663
877
|
break;
|
|
664
878
|
}
|
|
665
879
|
}
|
|
666
880
|
})));
|
|
667
|
-
},
|
|
881
|
+
}, createEditorListener = ({
|
|
668
882
|
model: e,
|
|
669
883
|
trustedHosts: t,
|
|
670
884
|
callbacks: n
|
|
671
885
|
}) => (o) => {
|
|
672
|
-
if (!
|
|
886
|
+
if (!isFromTrustedHost(t, o))
|
|
673
887
|
return;
|
|
674
888
|
const {
|
|
675
889
|
data: r
|
|
@@ -690,12 +904,12 @@ const Ke = (e = {}) => {
|
|
|
690
904
|
break;
|
|
691
905
|
}
|
|
692
906
|
}
|
|
693
|
-
},
|
|
694
|
-
if (
|
|
695
|
-
return
|
|
907
|
+
}, subscribeToEditor = (e, t, n) => {
|
|
908
|
+
if (!isBrowser)
|
|
909
|
+
return logger.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
696
910
|
};
|
|
697
|
-
|
|
698
|
-
const o =
|
|
911
|
+
setupBrowserForEditing();
|
|
912
|
+
const o = createEditorListener({
|
|
699
913
|
callbacks: {
|
|
700
914
|
contentUpdate: t,
|
|
701
915
|
animation: () => {
|
|
@@ -709,24 +923,24 @@ const Ke = (e = {}) => {
|
|
|
709
923
|
return window.addEventListener("message", o), () => {
|
|
710
924
|
window.removeEventListener("message", o);
|
|
711
925
|
};
|
|
712
|
-
},
|
|
926
|
+
}, BUILDER_STORE_PREFIX = "builder.tests", getContentTestKey = (e) => `${BUILDER_STORE_PREFIX}.${e}`, getContentVariationCookie = ({
|
|
713
927
|
contentId: e
|
|
714
|
-
}) =>
|
|
715
|
-
name:
|
|
928
|
+
}) => getCookie({
|
|
929
|
+
name: getContentTestKey(e),
|
|
716
930
|
canTrack: !0
|
|
717
|
-
}),
|
|
931
|
+
}), getContentVariationCookieSync = ({
|
|
718
932
|
contentId: e
|
|
719
|
-
}) =>
|
|
720
|
-
name:
|
|
933
|
+
}) => getCookieSync({
|
|
934
|
+
name: getContentTestKey(e),
|
|
721
935
|
canTrack: !0
|
|
722
|
-
}),
|
|
936
|
+
}), setContentVariationCookie = ({
|
|
723
937
|
contentId: e,
|
|
724
938
|
value: t
|
|
725
|
-
}) =>
|
|
726
|
-
name:
|
|
939
|
+
}) => setCookie({
|
|
940
|
+
name: getContentTestKey(e),
|
|
727
941
|
value: t,
|
|
728
942
|
canTrack: !0
|
|
729
|
-
}),
|
|
943
|
+
}), checkIsBuilderContentWithVariations = (e) => checkIsDefined(e.id) && checkIsDefined(e.variations) && Object.keys(e.variations).length > 0, getRandomVariationId = ({
|
|
730
944
|
id: e,
|
|
731
945
|
variations: t
|
|
732
946
|
}) => {
|
|
@@ -739,15 +953,15 @@ const Ke = (e = {}) => {
|
|
|
739
953
|
return i;
|
|
740
954
|
}
|
|
741
955
|
return e;
|
|
742
|
-
},
|
|
743
|
-
const t =
|
|
744
|
-
return
|
|
956
|
+
}, getAndSetVariantId = (e) => {
|
|
957
|
+
const t = getRandomVariationId(e);
|
|
958
|
+
return setContentVariationCookie({
|
|
745
959
|
contentId: e.id,
|
|
746
960
|
value: t
|
|
747
961
|
}).catch((n) => {
|
|
748
|
-
|
|
962
|
+
logger.error("could not store A/B test variation: ", n);
|
|
749
963
|
}), t;
|
|
750
|
-
},
|
|
964
|
+
}, getTestFields = ({
|
|
751
965
|
item: e,
|
|
752
966
|
testGroupId: t
|
|
753
967
|
}) => {
|
|
@@ -761,7 +975,7 @@ const Ke = (e = {}) => {
|
|
|
761
975
|
testVariationId: n.id,
|
|
762
976
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
763
977
|
};
|
|
764
|
-
},
|
|
978
|
+
}, handleABTestingSync = ({
|
|
765
979
|
item: e,
|
|
766
980
|
canTrack: t
|
|
767
981
|
}) => {
|
|
@@ -769,14 +983,14 @@ const Ke = (e = {}) => {
|
|
|
769
983
|
return e;
|
|
770
984
|
if (!e)
|
|
771
985
|
return;
|
|
772
|
-
if (!
|
|
986
|
+
if (!checkIsBuilderContentWithVariations(e))
|
|
773
987
|
return e;
|
|
774
|
-
const n =
|
|
988
|
+
const n = getContentVariationCookieSync({
|
|
775
989
|
contentId: e.id
|
|
776
|
-
}) ||
|
|
990
|
+
}) || getAndSetVariantId({
|
|
777
991
|
variations: e.variations,
|
|
778
992
|
id: e.id
|
|
779
|
-
}), o =
|
|
993
|
+
}), o = getTestFields({
|
|
780
994
|
item: e,
|
|
781
995
|
testGroupId: n
|
|
782
996
|
});
|
|
@@ -784,18 +998,18 @@ const Ke = (e = {}) => {
|
|
|
784
998
|
...e,
|
|
785
999
|
...o
|
|
786
1000
|
};
|
|
787
|
-
},
|
|
1001
|
+
}, handleABTesting = async ({
|
|
788
1002
|
item: e,
|
|
789
1003
|
canTrack: t
|
|
790
1004
|
}) => {
|
|
791
|
-
if (!t || !
|
|
1005
|
+
if (!t || !checkIsBuilderContentWithVariations(e))
|
|
792
1006
|
return e;
|
|
793
|
-
const o = await
|
|
1007
|
+
const o = await getContentVariationCookie({
|
|
794
1008
|
contentId: e.id
|
|
795
|
-
}) ||
|
|
1009
|
+
}) || getAndSetVariantId({
|
|
796
1010
|
variations: e.variations,
|
|
797
1011
|
id: e.id
|
|
798
|
-
}), r =
|
|
1012
|
+
}), r = getTestFields({
|
|
799
1013
|
item: e,
|
|
800
1014
|
testGroupId: o
|
|
801
1015
|
});
|
|
@@ -803,38 +1017,38 @@ const Ke = (e = {}) => {
|
|
|
803
1017
|
...e,
|
|
804
1018
|
...r
|
|
805
1019
|
};
|
|
806
|
-
},
|
|
807
|
-
function
|
|
1020
|
+
}, getDefaultCanTrack = (e) => checkIsDefined(e) ? e : !0;
|
|
1021
|
+
function getGlobalThis() {
|
|
808
1022
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
809
1023
|
}
|
|
810
|
-
function
|
|
811
|
-
const e =
|
|
1024
|
+
function getFetch() {
|
|
1025
|
+
const e = getGlobalThis().fetch;
|
|
812
1026
|
if (typeof e > "u")
|
|
813
1027
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
814
1028
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
815
1029
|
return e;
|
|
816
1030
|
}
|
|
817
|
-
const
|
|
818
|
-
function
|
|
1031
|
+
const fetch$1 = getFetch();
|
|
1032
|
+
function flatten(e, t = null, n = ".") {
|
|
819
1033
|
return Object.keys(e).reduce((o, r) => {
|
|
820
1034
|
const i = e[r], s = [t, r].filter(Boolean).join(n);
|
|
821
1035
|
return [typeof i == "object", i !== null, !(Array.isArray(i) && i.length === 0)].every(Boolean) ? {
|
|
822
1036
|
...o,
|
|
823
|
-
...
|
|
1037
|
+
...flatten(i, s, n)
|
|
824
1038
|
} : {
|
|
825
1039
|
...o,
|
|
826
1040
|
[s]: i
|
|
827
1041
|
};
|
|
828
1042
|
}, {});
|
|
829
1043
|
}
|
|
830
|
-
function
|
|
1044
|
+
function flattenMongoQuery(e, t, n = {}) {
|
|
831
1045
|
for (const o in e) {
|
|
832
1046
|
const r = e[o], i = t ? t + "." + o : o;
|
|
833
|
-
r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ?
|
|
1047
|
+
r && typeof r == "object" && !Array.isArray(r) && !Object.keys(r).find((s) => s.startsWith("$")) ? flattenMongoQuery(r, i, n) : n[i] = r;
|
|
834
1048
|
}
|
|
835
1049
|
return n;
|
|
836
1050
|
}
|
|
837
|
-
const
|
|
1051
|
+
const DEFAULT_API_VERSION = "v3", isPositiveNumber = (e) => typeof e == "number" && !isNaN(e) && e >= 0, generateContentUrl = (e) => {
|
|
838
1052
|
const {
|
|
839
1053
|
limit: t = 30,
|
|
840
1054
|
userAttributes: n,
|
|
@@ -843,82 +1057,82 @@ const yn = "v3", Ie = (e) => typeof e == "number" && !isNaN(e) && e >= 0, fe = (
|
|
|
843
1057
|
apiKey: i,
|
|
844
1058
|
enrich: s,
|
|
845
1059
|
locale: l,
|
|
846
|
-
apiVersion: a =
|
|
847
|
-
fields:
|
|
848
|
-
omit:
|
|
849
|
-
offset:
|
|
850
|
-
cacheSeconds:
|
|
851
|
-
staleCacheSeconds:
|
|
852
|
-
sort:
|
|
853
|
-
includeUnpublished:
|
|
1060
|
+
apiVersion: a = DEFAULT_API_VERSION,
|
|
1061
|
+
fields: d,
|
|
1062
|
+
omit: p,
|
|
1063
|
+
offset: c,
|
|
1064
|
+
cacheSeconds: u,
|
|
1065
|
+
staleCacheSeconds: f,
|
|
1066
|
+
sort: m,
|
|
1067
|
+
includeUnpublished: b
|
|
854
1068
|
} = e;
|
|
855
1069
|
if (!i)
|
|
856
1070
|
throw new Error("Missing API key");
|
|
857
1071
|
if (!["v3"].includes(a))
|
|
858
1072
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${a}'`);
|
|
859
|
-
const
|
|
860
|
-
if (
|
|
861
|
-
const
|
|
862
|
-
sort:
|
|
1073
|
+
const C = t !== 1, g = new URL(`https://cdn.builder.io/api/${a}/content/${r}`);
|
|
1074
|
+
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", p || "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)), u && isPositiveNumber(u) && g.searchParams.set("cacheSeconds", String(u)), f && isPositiveNumber(f) && g.searchParams.set("staleCacheSeconds", String(f)), m) {
|
|
1075
|
+
const k = flatten({
|
|
1076
|
+
sort: m
|
|
863
1077
|
});
|
|
864
|
-
for (const
|
|
865
|
-
|
|
1078
|
+
for (const S in k)
|
|
1079
|
+
g.searchParams.set(S, JSON.stringify(k[S]));
|
|
866
1080
|
}
|
|
867
|
-
const
|
|
868
|
-
...
|
|
869
|
-
...
|
|
870
|
-
},
|
|
871
|
-
for (const
|
|
872
|
-
|
|
873
|
-
if (n &&
|
|
874
|
-
const
|
|
1081
|
+
const I = {
|
|
1082
|
+
...getBuilderSearchParamsFromWindow(),
|
|
1083
|
+
...normalizeSearchParams(e.options || {})
|
|
1084
|
+
}, T = flatten(I);
|
|
1085
|
+
for (const k in T)
|
|
1086
|
+
g.searchParams.set(k, String(T[k]));
|
|
1087
|
+
if (n && g.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
1088
|
+
const k = flattenMongoQuery({
|
|
875
1089
|
query: o
|
|
876
1090
|
});
|
|
877
|
-
for (const
|
|
878
|
-
|
|
1091
|
+
for (const S in k)
|
|
1092
|
+
g.searchParams.set(S, JSON.stringify(k[S]));
|
|
879
1093
|
}
|
|
880
|
-
return
|
|
881
|
-
},
|
|
882
|
-
async function
|
|
883
|
-
const t = await
|
|
1094
|
+
return g;
|
|
1095
|
+
}, checkContentHasResults = (e) => "results" in e;
|
|
1096
|
+
async function fetchOneEntry(e) {
|
|
1097
|
+
const t = await fetchEntries({
|
|
884
1098
|
...e,
|
|
885
1099
|
limit: 1
|
|
886
1100
|
});
|
|
887
1101
|
return t && t[0] || null;
|
|
888
1102
|
}
|
|
889
|
-
const
|
|
890
|
-
const t =
|
|
891
|
-
return await (await (e.fetch ??
|
|
892
|
-
},
|
|
893
|
-
const o =
|
|
894
|
-
if (n.search.includes("preview="), !o || !(
|
|
1103
|
+
const _fetchContent = async (e) => {
|
|
1104
|
+
const t = generateContentUrl(e);
|
|
1105
|
+
return await (await (e.fetch ?? fetch$1)(t.href, e.fetchOptions)).json();
|
|
1106
|
+
}, _processContentResult = async (e, t, n = generateContentUrl(e)) => {
|
|
1107
|
+
const o = getDefaultCanTrack(e.canTrack);
|
|
1108
|
+
if (n.search.includes("preview="), !o || !(isBrowser() || TARGET === "reactNative"))
|
|
895
1109
|
return t.results;
|
|
896
1110
|
try {
|
|
897
1111
|
const r = [];
|
|
898
1112
|
for (const i of t.results)
|
|
899
|
-
r.push(await
|
|
1113
|
+
r.push(await handleABTesting({
|
|
900
1114
|
item: i,
|
|
901
1115
|
canTrack: o
|
|
902
1116
|
}));
|
|
903
1117
|
t.results = r;
|
|
904
1118
|
} catch (r) {
|
|
905
|
-
|
|
1119
|
+
logger.error("Could not process A/B tests. ", r);
|
|
906
1120
|
}
|
|
907
1121
|
return t.results;
|
|
908
1122
|
};
|
|
909
|
-
async function
|
|
1123
|
+
async function fetchEntries(e) {
|
|
910
1124
|
try {
|
|
911
|
-
const t =
|
|
912
|
-
return
|
|
1125
|
+
const t = generateContentUrl(e), n = await _fetchContent(e);
|
|
1126
|
+
return checkContentHasResults(n) ? _processContentResult(e, n) : (logger.error("Error fetching data. ", {
|
|
913
1127
|
url: t,
|
|
914
1128
|
content: n,
|
|
915
1129
|
options: e
|
|
916
1130
|
}), null);
|
|
917
1131
|
} catch (t) {
|
|
918
|
-
return
|
|
1132
|
+
return logger.error("Error fetching data. ", t), null;
|
|
919
1133
|
}
|
|
920
1134
|
}
|
|
921
|
-
const
|
|
1135
|
+
const fetchBuilderProps = async (e) => {
|
|
922
1136
|
var o, r, i;
|
|
923
1137
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((r = e.userAttributes) == null ? void 0 : r.urlPath), n = {
|
|
924
1138
|
...e,
|
|
@@ -930,27 +1144,27 @@ const Vi = async (e) => {
|
|
|
930
1144
|
urlPath: t
|
|
931
1145
|
} : {}
|
|
932
1146
|
},
|
|
933
|
-
options:
|
|
1147
|
+
options: getBuilderSearchParams(e.searchParams || ((i = e.url) == null ? void 0 : i.searchParams) || e.options)
|
|
934
1148
|
};
|
|
935
1149
|
return {
|
|
936
1150
|
apiKey: n.apiKey,
|
|
937
1151
|
model: n.model,
|
|
938
|
-
content: await
|
|
1152
|
+
content: await fetchOneEntry(n)
|
|
939
1153
|
};
|
|
940
|
-
},
|
|
941
|
-
function
|
|
1154
|
+
}, camelToKebabCase = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
1155
|
+
function throttle(e, t, n = {}) {
|
|
942
1156
|
let o, r, i, s = null, l = 0;
|
|
943
1157
|
const a = function() {
|
|
944
1158
|
l = n.leading === !1 ? 0 : Date.now(), s = null, i = e.apply(o, r), s || (o = r = null);
|
|
945
1159
|
};
|
|
946
1160
|
return function() {
|
|
947
|
-
const
|
|
948
|
-
!l && n.leading === !1 && (l =
|
|
949
|
-
const
|
|
950
|
-
return o = this, r = arguments,
|
|
1161
|
+
const d = Date.now();
|
|
1162
|
+
!l && n.leading === !1 && (l = d);
|
|
1163
|
+
const p = t - (d - l);
|
|
1164
|
+
return o = this, r = arguments, p <= 0 || p > t ? (s && (clearTimeout(s), s = null), l = d, i = e.apply(o, r), s || (o = r = null)) : !s && n.trailing !== !1 && (s = setTimeout(a, p)), i;
|
|
951
1165
|
};
|
|
952
1166
|
}
|
|
953
|
-
function
|
|
1167
|
+
function assign(e, ...t) {
|
|
954
1168
|
const n = Object(e);
|
|
955
1169
|
for (let o = 1; o < arguments.length; o++) {
|
|
956
1170
|
const r = arguments[o];
|
|
@@ -960,118 +1174,118 @@ function q(e, ...t) {
|
|
|
960
1174
|
}
|
|
961
1175
|
return n;
|
|
962
1176
|
}
|
|
963
|
-
function
|
|
1177
|
+
function bindAnimations(e) {
|
|
964
1178
|
for (const t of e)
|
|
965
1179
|
switch (t.trigger) {
|
|
966
1180
|
case "pageLoad":
|
|
967
|
-
|
|
1181
|
+
triggerAnimation(t);
|
|
968
1182
|
break;
|
|
969
1183
|
case "scrollInView":
|
|
970
|
-
|
|
1184
|
+
bindScrollInViewAnimation(t);
|
|
971
1185
|
break;
|
|
972
1186
|
}
|
|
973
1187
|
}
|
|
974
|
-
function
|
|
1188
|
+
function warnElementNotPresent(e) {
|
|
975
1189
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
976
1190
|
}
|
|
977
|
-
function
|
|
978
|
-
const n =
|
|
1191
|
+
function augmentAnimation(e, t) {
|
|
1192
|
+
const n = getAllStylesUsed(e), o = getComputedStyle(t), r = e.steps[0].styles, i = e.steps[e.steps.length - 1].styles, s = [r, i];
|
|
979
1193
|
for (const l of s)
|
|
980
1194
|
for (const a of n)
|
|
981
1195
|
a in l || (l[a] = o[a]);
|
|
982
1196
|
}
|
|
983
|
-
function
|
|
1197
|
+
function getAllStylesUsed(e) {
|
|
984
1198
|
const t = [];
|
|
985
1199
|
for (const n of e.steps)
|
|
986
1200
|
for (const o in n.styles)
|
|
987
1201
|
t.indexOf(o) === -1 && t.push(o);
|
|
988
1202
|
return t;
|
|
989
1203
|
}
|
|
990
|
-
function
|
|
1204
|
+
function triggerAnimation(e) {
|
|
991
1205
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
992
1206
|
if (!t.length) {
|
|
993
|
-
|
|
1207
|
+
warnElementNotPresent(e.elementId || e.id || "");
|
|
994
1208
|
return;
|
|
995
1209
|
}
|
|
996
1210
|
Array.from(t).forEach((n) => {
|
|
997
|
-
|
|
998
|
-
n.style.transition = `all ${e.duration}s ${
|
|
1211
|
+
augmentAnimation(e, n), n.style.transition = "none", n.style.transitionDelay = "0", assign(n.style, e.steps[0].styles), setTimeout(() => {
|
|
1212
|
+
n.style.transition = `all ${e.duration}s ${camelToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), assign(n.style, e.steps[1].styles), setTimeout(() => {
|
|
999
1213
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
1000
1214
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
1001
1215
|
});
|
|
1002
1216
|
});
|
|
1003
1217
|
}
|
|
1004
|
-
function
|
|
1218
|
+
function bindScrollInViewAnimation(e) {
|
|
1005
1219
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
1006
1220
|
if (!t.length) {
|
|
1007
|
-
|
|
1221
|
+
warnElementNotPresent(e.elementId || e.id || "");
|
|
1008
1222
|
return;
|
|
1009
1223
|
}
|
|
1010
1224
|
Array.from(t).forEach((n) => {
|
|
1011
|
-
|
|
1225
|
+
augmentAnimation(e, n);
|
|
1012
1226
|
let o = !1, r = !1;
|
|
1013
1227
|
function i() {
|
|
1014
1228
|
!o && l(n) ? (o = !0, r = !0, setTimeout(() => {
|
|
1015
|
-
|
|
1229
|
+
assign(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", s), setTimeout(() => {
|
|
1016
1230
|
r = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
1017
1231
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
1018
|
-
})) : e.repeat && o && !r && !l(n) && (o = !1,
|
|
1232
|
+
})) : e.repeat && o && !r && !l(n) && (o = !1, assign(n.style, e.steps[0].styles));
|
|
1019
1233
|
}
|
|
1020
|
-
const s =
|
|
1234
|
+
const s = throttle(i, 200, {
|
|
1021
1235
|
leading: !1
|
|
1022
1236
|
});
|
|
1023
|
-
function l(
|
|
1024
|
-
const
|
|
1025
|
-
return
|
|
1237
|
+
function l(p) {
|
|
1238
|
+
const c = p.getBoundingClientRect(), u = window.innerHeight, m = (e.thresholdPercent || 0) / 100 * u;
|
|
1239
|
+
return c.bottom > m && c.top < u - m;
|
|
1026
1240
|
}
|
|
1027
1241
|
const a = e.steps[0].styles;
|
|
1028
|
-
function
|
|
1029
|
-
|
|
1242
|
+
function d() {
|
|
1243
|
+
assign(n.style, a);
|
|
1030
1244
|
}
|
|
1031
|
-
|
|
1032
|
-
n.style.transition = `all ${e.duration}s ${
|
|
1245
|
+
d(), setTimeout(() => {
|
|
1246
|
+
n.style.transition = `all ${e.duration}s ${camelToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
1033
1247
|
}), document.addEventListener("scroll", s, {
|
|
1034
1248
|
capture: !0,
|
|
1035
1249
|
passive: !0
|
|
1036
1250
|
}), i();
|
|
1037
1251
|
});
|
|
1038
1252
|
}
|
|
1039
|
-
const
|
|
1253
|
+
const convertStyleMapToCSSArray = (e) => Object.entries(e).map(([n, o]) => {
|
|
1040
1254
|
if (typeof o == "string")
|
|
1041
|
-
return `${
|
|
1042
|
-
}).filter(
|
|
1043
|
-
`),
|
|
1255
|
+
return `${camelToKebabCase(n)}: ${o};`;
|
|
1256
|
+
}).filter(checkIsDefined), convertStyleMapToCSS = (e) => convertStyleMapToCSSArray(e).join(`
|
|
1257
|
+
`), createCssClass = ({
|
|
1044
1258
|
mediaQuery: e,
|
|
1045
1259
|
className: t,
|
|
1046
1260
|
styles: n
|
|
1047
1261
|
}) => {
|
|
1048
1262
|
const o = `.${t} {
|
|
1049
|
-
${
|
|
1263
|
+
${convertStyleMapToCSS(n)}
|
|
1050
1264
|
}`;
|
|
1051
1265
|
return e ? `${e} {
|
|
1052
1266
|
${o}
|
|
1053
1267
|
}` : o;
|
|
1054
1268
|
};
|
|
1055
|
-
function
|
|
1269
|
+
function transformStyleProperty({
|
|
1056
1270
|
style: e
|
|
1057
1271
|
}) {
|
|
1058
1272
|
return e;
|
|
1059
1273
|
}
|
|
1060
|
-
const
|
|
1274
|
+
const getStyle = ({
|
|
1061
1275
|
block: e,
|
|
1062
1276
|
context: t
|
|
1063
|
-
}) =>
|
|
1277
|
+
}) => mapStyleObjToStrIfNeeded(transformStyleProperty({
|
|
1064
1278
|
style: e.style || {},
|
|
1065
1279
|
context: t,
|
|
1066
1280
|
block: e
|
|
1067
1281
|
}));
|
|
1068
|
-
function
|
|
1069
|
-
switch (
|
|
1282
|
+
function mapStyleObjToStrIfNeeded(e) {
|
|
1283
|
+
switch (TARGET) {
|
|
1070
1284
|
case "svelte":
|
|
1071
1285
|
case "vue":
|
|
1072
1286
|
case "solid":
|
|
1073
1287
|
case "angular":
|
|
1074
|
-
return
|
|
1288
|
+
return convertStyleMapToCSSArray(e).join(" ");
|
|
1075
1289
|
case "qwik":
|
|
1076
1290
|
case "reactNative":
|
|
1077
1291
|
case "react":
|
|
@@ -1079,7 +1293,7 @@ function tt(e) {
|
|
|
1079
1293
|
return e;
|
|
1080
1294
|
}
|
|
1081
1295
|
}
|
|
1082
|
-
const
|
|
1296
|
+
const getComponent = ({
|
|
1083
1297
|
block: e,
|
|
1084
1298
|
registeredComponents: t
|
|
1085
1299
|
}) => {
|
|
@@ -1093,7 +1307,7 @@ const Bn = ({
|
|
|
1093
1307
|
console.warn(`
|
|
1094
1308
|
Could not find a registered component named "${n}".
|
|
1095
1309
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
1096
|
-
},
|
|
1310
|
+
}, getRepeatItemData = ({
|
|
1097
1311
|
block: e,
|
|
1098
1312
|
context: t
|
|
1099
1313
|
}) => {
|
|
@@ -1103,7 +1317,7 @@ const Bn = ({
|
|
|
1103
1317
|
} = e;
|
|
1104
1318
|
if (!(n != null && n.collection))
|
|
1105
1319
|
return;
|
|
1106
|
-
const r =
|
|
1320
|
+
const r = evaluate({
|
|
1107
1321
|
code: n.collection,
|
|
1108
1322
|
localState: t.localState,
|
|
1109
1323
|
rootState: t.rootState,
|
|
@@ -1114,72 +1328,72 @@ const Bn = ({
|
|
|
1114
1328
|
if (!Array.isArray(r))
|
|
1115
1329
|
return;
|
|
1116
1330
|
const i = n.collection.split(".").pop(), s = n.itemName || (i ? i + "Item" : "item");
|
|
1117
|
-
return r.map((a,
|
|
1331
|
+
return r.map((a, d) => ({
|
|
1118
1332
|
context: {
|
|
1119
1333
|
...t,
|
|
1120
1334
|
localState: {
|
|
1121
1335
|
...t.localState,
|
|
1122
|
-
$index:
|
|
1336
|
+
$index: d,
|
|
1123
1337
|
$item: a,
|
|
1124
1338
|
[s]: a,
|
|
1125
|
-
[`$${s}Index`]:
|
|
1339
|
+
[`$${s}Index`]: d
|
|
1126
1340
|
}
|
|
1127
1341
|
},
|
|
1128
1342
|
block: o
|
|
1129
1343
|
}));
|
|
1130
|
-
},
|
|
1344
|
+
}, provideLinkComponent = (e, t) => {
|
|
1131
1345
|
var n;
|
|
1132
1346
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderLinkComponent ? {
|
|
1133
1347
|
builderLinkComponent: t
|
|
1134
1348
|
} : {};
|
|
1135
|
-
},
|
|
1349
|
+
}, provideRegisteredComponents = (e, t) => {
|
|
1136
1350
|
var n;
|
|
1137
1351
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderComponents ? {
|
|
1138
1352
|
builderComponents: t
|
|
1139
1353
|
} : {};
|
|
1140
|
-
},
|
|
1354
|
+
}, provideBuilderBlock = (e, t) => {
|
|
1141
1355
|
var n;
|
|
1142
1356
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderBlock ? {
|
|
1143
1357
|
builderBlock: t
|
|
1144
1358
|
} : {};
|
|
1145
|
-
},
|
|
1359
|
+
}, provideBuilderContext = (e, t) => {
|
|
1146
1360
|
var n;
|
|
1147
1361
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
|
|
1148
1362
|
builderContext: t
|
|
1149
1363
|
} : {};
|
|
1150
|
-
},
|
|
1364
|
+
}, DynamicDiv$1 = () => Promise.resolve().then(() => dynamicDiv).then((e) => e.default).catch((e) => {
|
|
1151
1365
|
throw console.error(
|
|
1152
1366
|
"Error while attempting to dynamically import component DynamicDiv at ../dynamic-div.vue",
|
|
1153
1367
|
e
|
|
1154
1368
|
), e;
|
|
1155
|
-
}),
|
|
1369
|
+
}), BlockStyles = () => import("./block-styles-E0MOJgK4.js").then((e) => e.default).catch((e) => {
|
|
1156
1370
|
throw console.error(
|
|
1157
1371
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
1158
1372
|
e
|
|
1159
1373
|
), e;
|
|
1160
|
-
}),
|
|
1374
|
+
}), BlockWrapper = () => import("./block-wrapper-cHgl5RuV.js").then((e) => e.default).catch((e) => {
|
|
1161
1375
|
throw console.error(
|
|
1162
1376
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
1163
1377
|
e
|
|
1164
1378
|
), e;
|
|
1165
|
-
}),
|
|
1379
|
+
}), ComponentRef = () => import("./component-ref-gqNpKniv.js").then((e) => e.default).catch((e) => {
|
|
1166
1380
|
throw console.error(
|
|
1167
1381
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
1168
1382
|
e
|
|
1169
1383
|
), e;
|
|
1170
|
-
}),
|
|
1384
|
+
}), RepeatedBlock = () => import("./repeated-block-WqJu5DET.js").then((e) => e.default).catch((e) => {
|
|
1171
1385
|
throw console.error(
|
|
1172
1386
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
1173
1387
|
e
|
|
1174
1388
|
), e;
|
|
1175
|
-
}),
|
|
1389
|
+
}), _sfc_main$r = defineComponent({
|
|
1176
1390
|
name: "block",
|
|
1177
1391
|
components: {
|
|
1178
|
-
BlockStyles:
|
|
1179
|
-
RepeatedBlock:
|
|
1180
|
-
ComponentRef:
|
|
1181
|
-
BlockWrapper:
|
|
1182
|
-
DynamicDiv:
|
|
1392
|
+
BlockStyles: defineAsyncComponent(BlockStyles),
|
|
1393
|
+
RepeatedBlock: defineAsyncComponent(RepeatedBlock),
|
|
1394
|
+
ComponentRef: defineAsyncComponent(ComponentRef),
|
|
1395
|
+
BlockWrapper: defineAsyncComponent(BlockWrapper),
|
|
1396
|
+
DynamicDiv: defineAsyncComponent(DynamicDiv$1)
|
|
1183
1397
|
},
|
|
1184
1398
|
props: ["block", "context", "registeredComponents", "linkComponent"],
|
|
1185
1399
|
data() {
|
|
@@ -1192,7 +1406,7 @@ const Bn = ({
|
|
|
1192
1406
|
},
|
|
1193
1407
|
mounted() {
|
|
1194
1408
|
const e = this.processedBlock.id, t = this.processedBlock.animations;
|
|
1195
|
-
t && e &&
|
|
1409
|
+
t && e && bindAnimations(
|
|
1196
1410
|
t.map((n) => ({
|
|
1197
1411
|
...n,
|
|
1198
1412
|
elementId: e
|
|
@@ -1203,14 +1417,14 @@ const Bn = ({
|
|
|
1203
1417
|
},
|
|
1204
1418
|
computed: {
|
|
1205
1419
|
repeatItem() {
|
|
1206
|
-
return
|
|
1420
|
+
return getRepeatItemData({
|
|
1207
1421
|
block: this.block,
|
|
1208
1422
|
context: this.context
|
|
1209
1423
|
});
|
|
1210
1424
|
},
|
|
1211
1425
|
processedBlock() {
|
|
1212
1426
|
var t;
|
|
1213
|
-
return (t = this.block.repeat) != null && t.collection ? this.block :
|
|
1427
|
+
return (t = this.block.repeat) != null && t.collection ? this.block : getProcessedBlock({
|
|
1214
1428
|
block: this.block,
|
|
1215
1429
|
localState: this.context.localState,
|
|
1216
1430
|
rootState: this.context.rootState,
|
|
@@ -1220,7 +1434,7 @@ const Bn = ({
|
|
|
1220
1434
|
});
|
|
1221
1435
|
},
|
|
1222
1436
|
blockComponent() {
|
|
1223
|
-
return
|
|
1437
|
+
return getComponent({
|
|
1224
1438
|
block: this.processedBlock,
|
|
1225
1439
|
registeredComponents: this.registeredComponents
|
|
1226
1440
|
});
|
|
@@ -1246,11 +1460,11 @@ const Bn = ({
|
|
|
1246
1460
|
blockChildren: this.processedBlock.children ?? [],
|
|
1247
1461
|
componentRef: (e = this.blockComponent) == null ? void 0 : e.component,
|
|
1248
1462
|
componentOptions: {
|
|
1249
|
-
...
|
|
1250
|
-
...
|
|
1251
|
-
...
|
|
1252
|
-
...
|
|
1253
|
-
...
|
|
1463
|
+
...getBlockComponentOptions(this.processedBlock),
|
|
1464
|
+
...provideBuilderBlock(this.blockComponent, this.processedBlock),
|
|
1465
|
+
...provideBuilderContext(this.blockComponent, this.context),
|
|
1466
|
+
...provideLinkComponent(this.blockComponent, this.linkComponent),
|
|
1467
|
+
...provideRegisteredComponents(
|
|
1254
1468
|
this.blockComponent,
|
|
1255
1469
|
this.registeredComponents
|
|
1256
1470
|
)
|
|
@@ -1260,27 +1474,27 @@ const Bn = ({
|
|
|
1260
1474
|
registeredComponents: this.registeredComponents,
|
|
1261
1475
|
builderBlock: this.processedBlock,
|
|
1262
1476
|
includeBlockProps: ((t = this.blockComponent) == null ? void 0 : t.noWrap) === !0,
|
|
1263
|
-
isInteractive: !((n = this.blockComponent) != null && n.isRSC &&
|
|
1477
|
+
isInteractive: !((n = this.blockComponent) != null && n.isRSC && TARGET === "rsc")
|
|
1264
1478
|
};
|
|
1265
1479
|
}
|
|
1266
1480
|
}
|
|
1267
1481
|
});
|
|
1268
|
-
function
|
|
1269
|
-
var
|
|
1270
|
-
const s =
|
|
1271
|
-
return e.canShowBlock ? (
|
|
1272
|
-
|
|
1482
|
+
function _sfc_render$p(e, t, n, o, r, i) {
|
|
1483
|
+
var c;
|
|
1484
|
+
const s = resolveComponent("BlockStyles"), l = resolveComponent("ComponentRef"), a = resolveComponent("Block", !0), d = resolveComponent("BlockWrapper"), p = resolveComponent("RepeatedBlock");
|
|
1485
|
+
return e.canShowBlock ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
1486
|
+
createVNode(s, {
|
|
1273
1487
|
block: e.processedBlock,
|
|
1274
1488
|
context: e.context
|
|
1275
1489
|
}, null, 8, ["block", "context"]),
|
|
1276
|
-
(
|
|
1277
|
-
e.repeatItem ? (
|
|
1278
|
-
key:
|
|
1279
|
-
repeatContext:
|
|
1280
|
-
block:
|
|
1490
|
+
(c = e.blockComponent) != null && c.noWrap ? (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
|
|
1491
|
+
e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (u, f) => (openBlock(), createBlock(p, {
|
|
1492
|
+
key: f,
|
|
1493
|
+
repeatContext: u.context,
|
|
1494
|
+
block: u.block,
|
|
1281
1495
|
registeredComponents: e.registeredComponents,
|
|
1282
1496
|
linkComponent: e.linkComponent
|
|
1283
|
-
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (
|
|
1497
|
+
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (openBlock(), createBlock(l, {
|
|
1284
1498
|
key: 0,
|
|
1285
1499
|
componentRef: e.componentRefProps.componentRef,
|
|
1286
1500
|
componentOptions: e.componentRefProps.componentOptions,
|
|
@@ -1292,21 +1506,21 @@ function Mn(e, t, n, o, r, i) {
|
|
|
1292
1506
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
1293
1507
|
isInteractive: e.componentRefProps.isInteractive
|
|
1294
1508
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"]))
|
|
1295
|
-
], 64)) : (
|
|
1296
|
-
e.repeatItem ? (
|
|
1297
|
-
key:
|
|
1298
|
-
repeatContext:
|
|
1299
|
-
block:
|
|
1509
|
+
], 64)) : (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
1510
|
+
e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (u, f) => (openBlock(), createBlock(p, {
|
|
1511
|
+
key: f,
|
|
1512
|
+
repeatContext: u.context,
|
|
1513
|
+
block: u.block,
|
|
1300
1514
|
registeredComponents: e.registeredComponents,
|
|
1301
1515
|
linkComponent: e.linkComponent
|
|
1302
|
-
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (
|
|
1516
|
+
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (openBlock(), createBlock(d, {
|
|
1303
1517
|
key: 0,
|
|
1304
1518
|
Wrapper: e.Tag,
|
|
1305
1519
|
block: e.processedBlock,
|
|
1306
1520
|
context: e.context
|
|
1307
1521
|
}, {
|
|
1308
|
-
default:
|
|
1309
|
-
|
|
1522
|
+
default: withCtx(() => [
|
|
1523
|
+
createVNode(l, {
|
|
1310
1524
|
componentRef: e.componentRefProps.componentRef,
|
|
1311
1525
|
componentOptions: e.componentRefProps.componentOptions,
|
|
1312
1526
|
blockChildren: e.componentRefProps.blockChildren,
|
|
@@ -1317,9 +1531,9 @@ function Mn(e, t, n, o, r, i) {
|
|
|
1317
1531
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
1318
1532
|
isInteractive: e.componentRefProps.isInteractive
|
|
1319
1533
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"]),
|
|
1320
|
-
(
|
|
1321
|
-
key:
|
|
1322
|
-
block:
|
|
1534
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (u, f) => (openBlock(), createBlock(a, {
|
|
1535
|
+
key: u.id,
|
|
1536
|
+
block: u,
|
|
1323
1537
|
registeredComponents: e.registeredComponents,
|
|
1324
1538
|
linkComponent: e.linkComponent,
|
|
1325
1539
|
context: e.context
|
|
@@ -1328,12 +1542,12 @@ function Mn(e, t, n, o, r, i) {
|
|
|
1328
1542
|
_: 1
|
|
1329
1543
|
}, 8, ["Wrapper", "block", "context"]))
|
|
1330
1544
|
], 64))
|
|
1331
|
-
], 64)) :
|
|
1545
|
+
], 64)) : createCommentVNode("", !0);
|
|
1332
1546
|
}
|
|
1333
|
-
const
|
|
1547
|
+
const Block = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$p]]), block = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1334
1548
|
__proto__: null,
|
|
1335
|
-
default:
|
|
1336
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1549
|
+
default: Block
|
|
1550
|
+
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$q = defineComponent({
|
|
1337
1551
|
name: "builder-blocks-wrapper",
|
|
1338
1552
|
props: [
|
|
1339
1553
|
"blocks",
|
|
@@ -1354,7 +1568,7 @@ const ye = /* @__PURE__ */ b(Un, [["render", Mn]]), Fi = /* @__PURE__ */ Object.
|
|
|
1354
1568
|
methods: {
|
|
1355
1569
|
onClick() {
|
|
1356
1570
|
var e, t;
|
|
1357
|
-
|
|
1571
|
+
isEditing() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
1358
1572
|
{
|
|
1359
1573
|
type: "builder.clickEmptyBlocks",
|
|
1360
1574
|
data: {
|
|
@@ -1367,7 +1581,7 @@ const ye = /* @__PURE__ */ b(Un, [["render", Mn]]), Fi = /* @__PURE__ */ Object.
|
|
|
1367
1581
|
},
|
|
1368
1582
|
onMouseEnter() {
|
|
1369
1583
|
var e, t;
|
|
1370
|
-
|
|
1584
|
+
isEditing() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
1371
1585
|
{
|
|
1372
1586
|
type: "builder.hoverEmptyBlocks",
|
|
1373
1587
|
data: {
|
|
@@ -1380,8 +1594,8 @@ const ye = /* @__PURE__ */ b(Un, [["render", Mn]]), Fi = /* @__PURE__ */ Object.
|
|
|
1380
1594
|
}
|
|
1381
1595
|
}
|
|
1382
1596
|
});
|
|
1383
|
-
function
|
|
1384
|
-
return
|
|
1597
|
+
function _sfc_render$o(e, t, n, o, r, i) {
|
|
1598
|
+
return openBlock(), createBlock(resolveDynamicComponent(e.BlocksWrapper), mergeProps({
|
|
1385
1599
|
ref: "blocksWrapperRef",
|
|
1386
1600
|
class: e.className + " component-178o76acnws",
|
|
1387
1601
|
"builder-path": e.path,
|
|
@@ -1391,15 +1605,15 @@ function jn(e, t, n, o, r, i) {
|
|
|
1391
1605
|
onMouseEnter: (s) => e.onMouseEnter(),
|
|
1392
1606
|
onKeyPress: (s) => e.onClick()
|
|
1393
1607
|
}, { ...e.BlocksWrapperProps }), {
|
|
1394
|
-
default:
|
|
1395
|
-
|
|
1608
|
+
default: withCtx(() => [
|
|
1609
|
+
renderSlot(e.$slots, "default", {}, void 0, !0)
|
|
1396
1610
|
]),
|
|
1397
1611
|
_: 3
|
|
1398
1612
|
}, 16, ["class", "builder-path", "builder-parent-id", "style", "onClick", "onMouseEnter", "onKeyPress"]);
|
|
1399
1613
|
}
|
|
1400
|
-
const
|
|
1614
|
+
const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$o], ["__scopeId", "data-v-824f09a8"]]), _sfc_main$p = defineComponent({
|
|
1401
1615
|
name: "builder-blocks",
|
|
1402
|
-
components: { BlocksWrapper
|
|
1616
|
+
components: { BlocksWrapper, Block },
|
|
1403
1617
|
props: [
|
|
1404
1618
|
"blocks",
|
|
1405
1619
|
"parent",
|
|
@@ -1410,48 +1624,48 @@ const Kn = /* @__PURE__ */ b(Hn, [["render", jn], ["__scopeId", "data-v-824f09a8
|
|
|
1410
1624
|
"registeredComponents"
|
|
1411
1625
|
],
|
|
1412
1626
|
inject: {
|
|
1413
|
-
builderContext:
|
|
1414
|
-
componentsContext:
|
|
1627
|
+
builderContext: BuilderContext.key,
|
|
1628
|
+
componentsContext: ComponentsContext.key
|
|
1415
1629
|
}
|
|
1416
1630
|
});
|
|
1417
|
-
function
|
|
1418
|
-
var a,
|
|
1419
|
-
const s =
|
|
1420
|
-
return
|
|
1631
|
+
function _sfc_render$n(e, t, n, o, r, i) {
|
|
1632
|
+
var a, d;
|
|
1633
|
+
const s = resolveComponent("Block"), l = resolveComponent("BlocksWrapper");
|
|
1634
|
+
return openBlock(), createBlock(l, {
|
|
1421
1635
|
blocks: e.blocks,
|
|
1422
1636
|
parent: e.parent,
|
|
1423
1637
|
path: e.path,
|
|
1424
1638
|
styleProp: e.styleProp,
|
|
1425
1639
|
BlocksWrapper: ((a = e.context) == null ? void 0 : a.BlocksWrapper) || e.builderContext.BlocksWrapper,
|
|
1426
|
-
BlocksWrapperProps: ((
|
|
1640
|
+
BlocksWrapperProps: ((d = e.context) == null ? void 0 : d.BlocksWrapperProps) || e.builderContext.BlocksWrapperProps
|
|
1427
1641
|
}, {
|
|
1428
|
-
default:
|
|
1429
|
-
e.blocks ? (
|
|
1430
|
-
key:
|
|
1431
|
-
block:
|
|
1642
|
+
default: withCtx(() => [
|
|
1643
|
+
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (p, c) => (openBlock(), createBlock(s, {
|
|
1644
|
+
key: p.id,
|
|
1645
|
+
block: p,
|
|
1432
1646
|
linkComponent: e.linkComponent,
|
|
1433
1647
|
context: e.context || e.builderContext,
|
|
1434
1648
|
registeredComponents: e.registeredComponents || e.componentsContext.registeredComponents
|
|
1435
|
-
}, null, 8, ["block", "linkComponent", "context", "registeredComponents"]))), 128)) :
|
|
1649
|
+
}, null, 8, ["block", "linkComponent", "context", "registeredComponents"]))), 128)) : createCommentVNode("", !0)
|
|
1436
1650
|
]),
|
|
1437
1651
|
_: 1
|
|
1438
1652
|
}, 8, ["blocks", "parent", "path", "styleProp", "BlocksWrapper", "BlocksWrapperProps"]);
|
|
1439
1653
|
}
|
|
1440
|
-
const
|
|
1654
|
+
const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$n]]), _sfc_main$o = defineComponent({
|
|
1441
1655
|
name: "dynamic-div",
|
|
1442
1656
|
props: []
|
|
1443
1657
|
});
|
|
1444
|
-
function
|
|
1445
|
-
return
|
|
1446
|
-
|
|
1658
|
+
function _sfc_render$m(e, t, n, o, r, i) {
|
|
1659
|
+
return openBlock(), createElementBlock("div", null, [
|
|
1660
|
+
renderSlot(e.$slots, "default")
|
|
1447
1661
|
]);
|
|
1448
1662
|
}
|
|
1449
|
-
const
|
|
1663
|
+
const DynamicDiv = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$m]]), dynamicDiv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1450
1664
|
__proto__: null,
|
|
1451
|
-
default:
|
|
1452
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1665
|
+
default: DynamicDiv
|
|
1666
|
+
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$n = defineComponent({
|
|
1453
1667
|
render() {
|
|
1454
|
-
return
|
|
1668
|
+
return h("style", {
|
|
1455
1669
|
innerHTML: this.styles,
|
|
1456
1670
|
"data-id": this.id,
|
|
1457
1671
|
nonce: this.nonce
|
|
@@ -1459,7 +1673,7 @@ const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.f
|
|
|
1459
1673
|
},
|
|
1460
1674
|
name: "inlined-styles",
|
|
1461
1675
|
props: ["styles", "id", "nonce"]
|
|
1462
|
-
}),
|
|
1676
|
+
}), SIZES = {
|
|
1463
1677
|
small: {
|
|
1464
1678
|
min: 320,
|
|
1465
1679
|
default: 321,
|
|
@@ -1475,11 +1689,11 @@ const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.f
|
|
|
1475
1689
|
default: 991,
|
|
1476
1690
|
max: 1200
|
|
1477
1691
|
}
|
|
1478
|
-
},
|
|
1692
|
+
}, getMaxWidthQueryForSize = (e, t = SIZES) => `@media (max-width: ${t[e].max}px)`, getSizesForBreakpoints = ({
|
|
1479
1693
|
small: e,
|
|
1480
1694
|
medium: t
|
|
1481
1695
|
}) => {
|
|
1482
|
-
const n =
|
|
1696
|
+
const n = fastClone(SIZES);
|
|
1483
1697
|
if (!e || !t)
|
|
1484
1698
|
return n;
|
|
1485
1699
|
const o = Math.floor(e / 2);
|
|
@@ -1501,13 +1715,13 @@ const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.f
|
|
|
1501
1715
|
min: i,
|
|
1502
1716
|
default: i + 1
|
|
1503
1717
|
}, n;
|
|
1504
|
-
},
|
|
1718
|
+
}, getColumnsClass = (e) => `builder-columns ${e}-breakpoints`, _sfc_main$m = defineComponent({
|
|
1505
1719
|
name: "builder-columns",
|
|
1506
1720
|
components: {
|
|
1507
|
-
InlinedStyles:
|
|
1508
|
-
DynamicRenderer
|
|
1509
|
-
Blocks
|
|
1510
|
-
DynamicDiv
|
|
1721
|
+
InlinedStyles: _sfc_main$n,
|
|
1722
|
+
DynamicRenderer,
|
|
1723
|
+
Blocks,
|
|
1724
|
+
DynamicDiv
|
|
1511
1725
|
},
|
|
1512
1726
|
props: [
|
|
1513
1727
|
"space",
|
|
@@ -1525,8 +1739,8 @@ const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.f
|
|
|
1525
1739
|
cols: this.columns || [],
|
|
1526
1740
|
stackAt: this.stackColumnsAt || "tablet",
|
|
1527
1741
|
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
1528
|
-
TARGET
|
|
1529
|
-
getColumnsClass
|
|
1742
|
+
TARGET,
|
|
1743
|
+
getColumnsClass
|
|
1530
1744
|
};
|
|
1531
1745
|
},
|
|
1532
1746
|
methods: {
|
|
@@ -1592,7 +1806,7 @@ const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.f
|
|
|
1592
1806
|
},
|
|
1593
1807
|
getWidthForBreakpointSize(e) {
|
|
1594
1808
|
var n, o;
|
|
1595
|
-
return
|
|
1809
|
+
return getSizesForBreakpoints(
|
|
1596
1810
|
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
1597
1811
|
)[e].max;
|
|
1598
1812
|
},
|
|
@@ -1629,34 +1843,34 @@ const Q = /* @__PURE__ */ b(Jn, [["render", Gn]]), Yn = /* @__PURE__ */ Object.f
|
|
|
1629
1843
|
...e.link ? {
|
|
1630
1844
|
href: e.link
|
|
1631
1845
|
} : {},
|
|
1632
|
-
[
|
|
1633
|
-
style:
|
|
1846
|
+
[getClassPropName()]: "builder-column",
|
|
1847
|
+
style: mapStyleObjToStrIfNeeded(this.columnCssVars(t))
|
|
1634
1848
|
};
|
|
1635
1849
|
}
|
|
1636
1850
|
}
|
|
1637
1851
|
});
|
|
1638
|
-
function
|
|
1639
|
-
var
|
|
1640
|
-
const s =
|
|
1641
|
-
return
|
|
1642
|
-
class: e.getColumnsClass((
|
|
1852
|
+
function _sfc_render$l(e, t, n, o, r, i) {
|
|
1853
|
+
var d;
|
|
1854
|
+
const s = resolveComponent("InlinedStyles"), l = resolveComponent("Blocks"), a = resolveComponent("DynamicRenderer");
|
|
1855
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
1856
|
+
class: e.getColumnsClass((d = e.builderBlock) == null ? void 0 : d.id) + " div-2brhoa1k8gd",
|
|
1643
1857
|
style: e.columnsCssVars()
|
|
1644
1858
|
}, {}), [
|
|
1645
|
-
e.TARGET !== "reactNative" ? (
|
|
1859
|
+
e.TARGET !== "reactNative" ? (openBlock(), createBlock(s, {
|
|
1646
1860
|
key: 0,
|
|
1647
1861
|
id: "builderio-columns",
|
|
1648
1862
|
styles: e.columnsStyles(),
|
|
1649
1863
|
nonce: e.builderContext.nonce
|
|
1650
|
-
}, null, 8, ["styles", "nonce"])) :
|
|
1651
|
-
(
|
|
1652
|
-
key:
|
|
1653
|
-
TagName: e.getTagName(
|
|
1864
|
+
}, null, 8, ["styles", "nonce"])) : createCommentVNode("", !0),
|
|
1865
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.columns, (p, c) => (openBlock(), createBlock(a, {
|
|
1866
|
+
key: c,
|
|
1867
|
+
TagName: e.getTagName(p),
|
|
1654
1868
|
actionAttributes: {},
|
|
1655
|
-
attributes: e.getAttributes(
|
|
1869
|
+
attributes: e.getAttributes(p, c)
|
|
1656
1870
|
}, {
|
|
1657
|
-
default:
|
|
1658
|
-
|
|
1659
|
-
path: `component.options.columns.${
|
|
1871
|
+
default: withCtx(() => [
|
|
1872
|
+
createVNode(l, {
|
|
1873
|
+
path: `component.options.columns.${c}.blocks`,
|
|
1660
1874
|
parent: e.builderBlock.id,
|
|
1661
1875
|
styleProp: {
|
|
1662
1876
|
flexGrow: "1"
|
|
@@ -1664,54 +1878,54 @@ function _n(e, t, n, o, r, i) {
|
|
|
1664
1878
|
context: e.builderContext,
|
|
1665
1879
|
registeredComponents: e.builderComponents,
|
|
1666
1880
|
linkComponent: e.builderLinkComponent,
|
|
1667
|
-
blocks:
|
|
1881
|
+
blocks: p.blocks
|
|
1668
1882
|
}, null, 8, ["path", "parent", "context", "registeredComponents", "linkComponent", "blocks"])
|
|
1669
1883
|
]),
|
|
1670
1884
|
_: 2
|
|
1671
1885
|
}, 1032, ["TagName", "attributes"]))), 128))
|
|
1672
1886
|
], 16);
|
|
1673
1887
|
}
|
|
1674
|
-
const
|
|
1888
|
+
const Columns = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-52366f16"]]), _sfc_main$l = defineComponent({
|
|
1675
1889
|
name: "builder-fragment-component",
|
|
1676
1890
|
props: []
|
|
1677
1891
|
});
|
|
1678
|
-
function
|
|
1679
|
-
return
|
|
1680
|
-
|
|
1892
|
+
function _sfc_render$k(e, t, n, o, r, i) {
|
|
1893
|
+
return openBlock(), createElementBlock("span", null, [
|
|
1894
|
+
renderSlot(e.$slots, "default")
|
|
1681
1895
|
]);
|
|
1682
1896
|
}
|
|
1683
|
-
const
|
|
1684
|
-
function
|
|
1897
|
+
const Fragment = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k]]);
|
|
1898
|
+
function removeProtocol(e) {
|
|
1685
1899
|
return e.replace(/http(s)?:/, "");
|
|
1686
1900
|
}
|
|
1687
|
-
function
|
|
1901
|
+
function updateQueryParam(e = "", t, n) {
|
|
1688
1902
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), r = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1689
1903
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + r + t + "=" + encodeURIComponent(n);
|
|
1690
1904
|
}
|
|
1691
|
-
function
|
|
1905
|
+
function getShopifyImageUrl(e, t) {
|
|
1692
1906
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1693
1907
|
return e;
|
|
1694
1908
|
if (t === "master")
|
|
1695
|
-
return
|
|
1909
|
+
return removeProtocol(e);
|
|
1696
1910
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1697
1911
|
if (n) {
|
|
1698
1912
|
const o = e.split(n[0]), r = n[3], i = t.match("x") ? t : `${t}x`;
|
|
1699
|
-
return
|
|
1913
|
+
return removeProtocol(`${o[0]}_${i}${r}`);
|
|
1700
1914
|
}
|
|
1701
1915
|
return null;
|
|
1702
1916
|
}
|
|
1703
|
-
function
|
|
1917
|
+
function getSrcSet(e) {
|
|
1704
1918
|
if (!e)
|
|
1705
1919
|
return e;
|
|
1706
1920
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
1707
1921
|
if (e.match(/builder\.io/)) {
|
|
1708
1922
|
let n = e;
|
|
1709
1923
|
const o = Number(e.split("?width=")[1]);
|
|
1710
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${
|
|
1924
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${updateQueryParam(e, "width", r)} ${r}w`).concat([n]).join(", ");
|
|
1711
1925
|
}
|
|
1712
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1926
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [getShopifyImageUrl(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
1713
1927
|
}
|
|
1714
|
-
const
|
|
1928
|
+
const _sfc_main$k = defineComponent({
|
|
1715
1929
|
name: "builder-image",
|
|
1716
1930
|
props: [
|
|
1717
1931
|
"image",
|
|
@@ -1741,10 +1955,10 @@ const so = f({
|
|
|
1741
1955
|
if (!this.noWebp) {
|
|
1742
1956
|
if (this.srcset && ((n = this.image) != null && n.includes("builder.io/api/v1/image"))) {
|
|
1743
1957
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
1744
|
-
return console.debug("Removed given srcset"),
|
|
1958
|
+
return console.debug("Removed given srcset"), getSrcSet(t);
|
|
1745
1959
|
} else if (this.image && !this.srcset)
|
|
1746
|
-
return
|
|
1747
|
-
return
|
|
1960
|
+
return getSrcSet(t);
|
|
1961
|
+
return getSrcSet(t);
|
|
1748
1962
|
}
|
|
1749
1963
|
},
|
|
1750
1964
|
webpSrcSet() {
|
|
@@ -1762,59 +1976,59 @@ const so = f({
|
|
|
1762
1976
|
return this.aspectRatio ? e : void 0;
|
|
1763
1977
|
}
|
|
1764
1978
|
}
|
|
1765
|
-
}),
|
|
1979
|
+
}), _hoisted_1$b = ["srcset"], _hoisted_2$4 = ["loading", "fetchpriority", "alt", "role", "src", "srcset", "sizes"], _hoisted_3$1 = {
|
|
1766
1980
|
key: 2,
|
|
1767
1981
|
class: "div-1pl23ac79ld-2"
|
|
1768
1982
|
};
|
|
1769
|
-
function
|
|
1770
|
-
var s, l, a,
|
|
1771
|
-
return
|
|
1772
|
-
|
|
1773
|
-
e.webpSrcSet ? (
|
|
1983
|
+
function _sfc_render$j(e, t, n, o, r, i) {
|
|
1984
|
+
var s, l, a, d, p, c;
|
|
1985
|
+
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
1986
|
+
createElementVNode("picture", null, [
|
|
1987
|
+
e.webpSrcSet ? (openBlock(), createElementBlock("source", {
|
|
1774
1988
|
key: 0,
|
|
1775
1989
|
type: "image/webp",
|
|
1776
1990
|
srcset: e.webpSrcSet
|
|
1777
|
-
}, null, 8,
|
|
1778
|
-
|
|
1991
|
+
}, null, 8, _hoisted_1$b)) : createCommentVNode("", !0),
|
|
1992
|
+
createElementVNode("img", {
|
|
1779
1993
|
loading: e.highPriority ? "eager" : "lazy",
|
|
1780
1994
|
fetchpriority: e.highPriority ? "high" : "auto",
|
|
1781
1995
|
alt: e.altText,
|
|
1782
1996
|
role: e.altText ? void 0 : "presentation",
|
|
1783
|
-
style:
|
|
1997
|
+
style: normalizeStyle({
|
|
1784
1998
|
objectPosition: e.backgroundPosition || "center",
|
|
1785
1999
|
objectFit: e.backgroundSize || "cover",
|
|
1786
2000
|
...e.aspectRatioCss
|
|
1787
2001
|
}),
|
|
1788
|
-
class:
|
|
2002
|
+
class: normalizeClass(
|
|
1789
2003
|
"builder-image" + (e.className ? " " + e.className : "") + " img-1pl23ac79ld"
|
|
1790
2004
|
),
|
|
1791
2005
|
src: e.image,
|
|
1792
2006
|
srcset: e.srcSetToUse,
|
|
1793
2007
|
sizes: e.sizes
|
|
1794
|
-
}, null, 14,
|
|
2008
|
+
}, null, 14, _hoisted_2$4)
|
|
1795
2009
|
]),
|
|
1796
|
-
e.aspectRatio && !((l = (s = e.builderBlock) == null ? void 0 : s.children) != null && l.length && e.fitContent) ? (
|
|
2010
|
+
e.aspectRatio && !((l = (s = e.builderBlock) == null ? void 0 : s.children) != null && l.length && e.fitContent) ? (openBlock(), createElementBlock("div", {
|
|
1797
2011
|
key: 0,
|
|
1798
2012
|
class: "builder-image-sizer div-1pl23ac79ld",
|
|
1799
|
-
style:
|
|
2013
|
+
style: normalizeStyle({
|
|
1800
2014
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1801
2015
|
})
|
|
1802
|
-
}, null, 4)) :
|
|
1803
|
-
(
|
|
1804
|
-
!e.fitContent && ((
|
|
1805
|
-
|
|
1806
|
-
])) :
|
|
2016
|
+
}, null, 4)) : createCommentVNode("", !0),
|
|
2017
|
+
(d = (a = e.builderBlock) == null ? void 0 : a.children) != null && d.length && e.fitContent ? renderSlot(e.$slots, "default", { key: 1 }, void 0, !0) : createCommentVNode("", !0),
|
|
2018
|
+
!e.fitContent && ((c = (p = e.builderBlock) == null ? void 0 : p.children) != null && c.length) ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
2019
|
+
renderSlot(e.$slots, "default", {}, void 0, !0)
|
|
2020
|
+
])) : createCommentVNode("", !0)
|
|
1807
2021
|
], 64);
|
|
1808
2022
|
}
|
|
1809
|
-
const
|
|
2023
|
+
const Image = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-b1147753"]]), _sfc_main$j = defineComponent({
|
|
1810
2024
|
name: "builder-section-component",
|
|
1811
2025
|
props: ["attributes", "maxWidth"],
|
|
1812
2026
|
data() {
|
|
1813
|
-
return { filterAttrs
|
|
2027
|
+
return { filterAttrs };
|
|
1814
2028
|
}
|
|
1815
2029
|
});
|
|
1816
|
-
function
|
|
1817
|
-
return
|
|
2030
|
+
function _sfc_render$i(e, t, n, o, r, i) {
|
|
2031
|
+
return openBlock(), createElementBlock("section", mergeProps({
|
|
1818
2032
|
style: {
|
|
1819
2033
|
width: "100%",
|
|
1820
2034
|
alignSelf: "stretch",
|
|
@@ -1827,11 +2041,11 @@ function ho(e, t, n, o, r, i) {
|
|
|
1827
2041
|
marginLeft: "auto",
|
|
1828
2042
|
marginRight: "auto"
|
|
1829
2043
|
}
|
|
1830
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
1831
|
-
|
|
2044
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
2045
|
+
renderSlot(e.$slots, "default")
|
|
1832
2046
|
], 16);
|
|
1833
2047
|
}
|
|
1834
|
-
const
|
|
2048
|
+
const Section = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i]]), defaultTitle = {
|
|
1835
2049
|
"@type": "@builder.io/sdk:Element",
|
|
1836
2050
|
layerName: "Accordion item title",
|
|
1837
2051
|
responsiveStyles: {
|
|
@@ -1860,7 +2074,7 @@ const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
|
|
|
1860
2074
|
}
|
|
1861
2075
|
}
|
|
1862
2076
|
}]
|
|
1863
|
-
},
|
|
2077
|
+
}, defaultDetail = {
|
|
1864
2078
|
"@type": "@builder.io/sdk:Element",
|
|
1865
2079
|
layerName: "Accordion item detail",
|
|
1866
2080
|
responsiveStyles: {
|
|
@@ -1891,7 +2105,7 @@ const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
|
|
|
1891
2105
|
}
|
|
1892
2106
|
}
|
|
1893
2107
|
}]
|
|
1894
|
-
},
|
|
2108
|
+
}, componentInfo$i = {
|
|
1895
2109
|
name: "Builder:Accordion",
|
|
1896
2110
|
canHaveChildren: !0,
|
|
1897
2111
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -1908,19 +2122,19 @@ const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
|
|
|
1908
2122
|
name: "title",
|
|
1909
2123
|
type: "uiBlocks",
|
|
1910
2124
|
hideFromUI: !0,
|
|
1911
|
-
defaultValue: [
|
|
2125
|
+
defaultValue: [defaultTitle]
|
|
1912
2126
|
}, {
|
|
1913
2127
|
name: "detail",
|
|
1914
2128
|
type: "uiBlocks",
|
|
1915
2129
|
hideFromUI: !0,
|
|
1916
|
-
defaultValue: [
|
|
2130
|
+
defaultValue: [defaultDetail]
|
|
1917
2131
|
}],
|
|
1918
2132
|
defaultValue: [{
|
|
1919
|
-
title: [
|
|
1920
|
-
detail: [
|
|
2133
|
+
title: [defaultTitle],
|
|
2134
|
+
detail: [defaultDetail]
|
|
1921
2135
|
}, {
|
|
1922
|
-
title: [
|
|
1923
|
-
detail: [
|
|
2136
|
+
title: [defaultTitle],
|
|
2137
|
+
detail: [defaultDetail]
|
|
1924
2138
|
}],
|
|
1925
2139
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
1926
2140
|
}, {
|
|
@@ -1955,9 +2169,9 @@ const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
|
|
|
1955
2169
|
builderComponents: !0,
|
|
1956
2170
|
builderLinkComponent: !0
|
|
1957
2171
|
}
|
|
1958
|
-
},
|
|
2172
|
+
}, convertOrderNumberToString = (e) => e.toString(), _sfc_main$i = defineComponent({
|
|
1959
2173
|
name: "builder-accordion",
|
|
1960
|
-
components: { Blocks
|
|
2174
|
+
components: { Blocks },
|
|
1961
2175
|
props: [
|
|
1962
2176
|
"grid",
|
|
1963
2177
|
"oneAtATime",
|
|
@@ -1969,7 +2183,7 @@ const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
|
|
|
1969
2183
|
"builderLinkComponent"
|
|
1970
2184
|
],
|
|
1971
2185
|
data() {
|
|
1972
|
-
return { open: [], convertOrderNumberToString
|
|
2186
|
+
return { open: [], convertOrderNumberToString };
|
|
1973
2187
|
},
|
|
1974
2188
|
computed: {
|
|
1975
2189
|
onlyOneAtATime() {
|
|
@@ -2050,25 +2264,25 @@ const fo = /* @__PURE__ */ b(mo, [["render", ho]]), re = {
|
|
|
2050
2264
|
this.open.includes(e) ? this.open = this.onlyOneAtATime ? [] : this.open.filter((t) => t !== e) : this.open = this.onlyOneAtATime ? [e] : this.open.concat(e);
|
|
2051
2265
|
}
|
|
2052
2266
|
}
|
|
2053
|
-
}),
|
|
2054
|
-
function
|
|
2055
|
-
const s =
|
|
2056
|
-
return
|
|
2267
|
+
}), _hoisted_1$a = ["data-index", "onClick"];
|
|
2268
|
+
function _sfc_render$h(e, t, n, o, r, i) {
|
|
2269
|
+
const s = resolveComponent("Blocks");
|
|
2270
|
+
return openBlock(), createElementBlock("div", {
|
|
2057
2271
|
class: "builder-accordion",
|
|
2058
|
-
style:
|
|
2272
|
+
style: normalizeStyle(e.accordionStyles)
|
|
2059
2273
|
}, [
|
|
2060
|
-
(
|
|
2061
|
-
|
|
2062
|
-
class:
|
|
2063
|
-
style:
|
|
2274
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.items, (l, a) => (openBlock(), createElementBlock(Fragment$1, { key: a }, [
|
|
2275
|
+
createElementVNode("div", {
|
|
2276
|
+
class: normalizeClass(e.getAccordionTitleClassName(a)),
|
|
2277
|
+
style: normalizeStyle({
|
|
2064
2278
|
...e.accordionTitleStyles,
|
|
2065
2279
|
width: e.grid ? e.gridRowWidth : void 0,
|
|
2066
2280
|
order: e.openGridItemOrder !== null ? e.convertOrderNumberToString(a) : e.convertOrderNumberToString(a + 1)
|
|
2067
2281
|
}),
|
|
2068
2282
|
"data-index": a,
|
|
2069
|
-
onClick: (
|
|
2283
|
+
onClick: (d) => e.onClick(a)
|
|
2070
2284
|
}, [
|
|
2071
|
-
|
|
2285
|
+
createVNode(s, {
|
|
2072
2286
|
blocks: l.title,
|
|
2073
2287
|
path: `items.${a}.title`,
|
|
2074
2288
|
parent: e.builderBlock.id,
|
|
@@ -2076,13 +2290,13 @@ function vo(e, t, n, o, r, i) {
|
|
|
2076
2290
|
registeredComponents: e.builderComponents,
|
|
2077
2291
|
linkComponent: e.builderLinkComponent
|
|
2078
2292
|
}, null, 8, ["blocks", "path", "parent", "context", "registeredComponents", "linkComponent"])
|
|
2079
|
-
], 14,
|
|
2080
|
-
e.open.includes(a) ? (
|
|
2293
|
+
], 14, _hoisted_1$a),
|
|
2294
|
+
e.open.includes(a) ? (openBlock(), createElementBlock("div", {
|
|
2081
2295
|
key: 0,
|
|
2082
|
-
class:
|
|
2083
|
-
style:
|
|
2296
|
+
class: normalizeClass(e.getAccordionDetailClassName(a)),
|
|
2297
|
+
style: normalizeStyle(e.accordionDetailStyles)
|
|
2084
2298
|
}, [
|
|
2085
|
-
|
|
2299
|
+
createVNode(s, {
|
|
2086
2300
|
blocks: l.detail,
|
|
2087
2301
|
path: `items.${a}.detail`,
|
|
2088
2302
|
parent: e.builderBlock.id,
|
|
@@ -2090,11 +2304,11 @@ function vo(e, t, n, o, r, i) {
|
|
|
2090
2304
|
registeredComponents: e.builderComponents,
|
|
2091
2305
|
linkComponent: e.builderLinkComponent
|
|
2092
2306
|
}, null, 8, ["blocks", "path", "parent", "context", "registeredComponents", "linkComponent"])
|
|
2093
|
-
], 6)) :
|
|
2307
|
+
], 6)) : createCommentVNode("", !0)
|
|
2094
2308
|
], 64))), 128))
|
|
2095
2309
|
], 4);
|
|
2096
2310
|
}
|
|
2097
|
-
const
|
|
2311
|
+
const Accordion = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h]]), componentInfo$h = {
|
|
2098
2312
|
name: "Core:Button",
|
|
2099
2313
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
2100
2314
|
defaultStyles: {
|
|
@@ -2130,7 +2344,7 @@ const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
|
|
|
2130
2344
|
shouldReceiveBuilderProps: {
|
|
2131
2345
|
builderLinkComponent: !0
|
|
2132
2346
|
}
|
|
2133
|
-
},
|
|
2347
|
+
}, componentInfo$g = {
|
|
2134
2348
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
2135
2349
|
name: "Columns",
|
|
2136
2350
|
isRSC: !0,
|
|
@@ -2337,13 +2551,13 @@ const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
|
|
|
2337
2551
|
builderComponents: !0,
|
|
2338
2552
|
builderLinkComponent: !0
|
|
2339
2553
|
}
|
|
2340
|
-
},
|
|
2554
|
+
}, componentInfo$f = {
|
|
2341
2555
|
name: "Fragment",
|
|
2342
2556
|
static: !0,
|
|
2343
2557
|
hidden: !0,
|
|
2344
2558
|
canHaveChildren: !0,
|
|
2345
2559
|
noWrap: !0
|
|
2346
|
-
},
|
|
2560
|
+
}, componentInfo$e = {
|
|
2347
2561
|
name: "Image",
|
|
2348
2562
|
static: !0,
|
|
2349
2563
|
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",
|
|
@@ -2364,15 +2578,15 @@ const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
|
|
|
2364
2578
|
onChange: (e) => {
|
|
2365
2579
|
e.delete("srcset"), e.delete("noWebp");
|
|
2366
2580
|
function n(s, l = 6e4) {
|
|
2367
|
-
return new Promise((a,
|
|
2368
|
-
const
|
|
2369
|
-
let
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
},
|
|
2373
|
-
console.warn("Image load failed",
|
|
2374
|
-
}),
|
|
2375
|
-
|
|
2581
|
+
return new Promise((a, d) => {
|
|
2582
|
+
const p = document.createElement("img");
|
|
2583
|
+
let c = !1;
|
|
2584
|
+
p.onload = () => {
|
|
2585
|
+
c = !0, a(p);
|
|
2586
|
+
}, p.addEventListener("error", (u) => {
|
|
2587
|
+
console.warn("Image load failed", u.error), d(u.error);
|
|
2588
|
+
}), p.src = s, setTimeout(() => {
|
|
2589
|
+
c || d(new Error("Image load timed out"));
|
|
2376
2590
|
}, l);
|
|
2377
2591
|
});
|
|
2378
2592
|
}
|
|
@@ -2451,7 +2665,7 @@ const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
|
|
|
2451
2665
|
shouldReceiveBuilderProps: {
|
|
2452
2666
|
builderBlock: !0
|
|
2453
2667
|
}
|
|
2454
|
-
}, $
|
|
2668
|
+
}, componentInfo$d = {
|
|
2455
2669
|
name: "Core:Section",
|
|
2456
2670
|
static: !0,
|
|
2457
2671
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -2490,7 +2704,7 @@ const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
|
|
|
2490
2704
|
}
|
|
2491
2705
|
}
|
|
2492
2706
|
}]
|
|
2493
|
-
},
|
|
2707
|
+
}, componentInfo$c = {
|
|
2494
2708
|
name: "Slot",
|
|
2495
2709
|
isRSC: !0,
|
|
2496
2710
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -2507,15 +2721,15 @@ const Co = /* @__PURE__ */ b(yo, [["render", vo]]), So = {
|
|
|
2507
2721
|
builderContext: !0,
|
|
2508
2722
|
builderComponents: !0
|
|
2509
2723
|
}
|
|
2510
|
-
},
|
|
2724
|
+
}, _sfc_main$h = defineComponent({
|
|
2511
2725
|
name: "builder-slot",
|
|
2512
|
-
components: { Blocks
|
|
2726
|
+
components: { Blocks },
|
|
2513
2727
|
props: ["builderContext", "name", "builderComponents"]
|
|
2514
2728
|
});
|
|
2515
|
-
function
|
|
2516
|
-
var l, a,
|
|
2517
|
-
const s =
|
|
2518
|
-
return
|
|
2729
|
+
function _sfc_render$g(e, t, n, o, r, i) {
|
|
2730
|
+
var l, a, d;
|
|
2731
|
+
const s = resolveComponent("Blocks");
|
|
2732
|
+
return openBlock(), createElementBlock("div", mergeProps(
|
|
2519
2733
|
{ style: {
|
|
2520
2734
|
pointerEvents: "auto"
|
|
2521
2735
|
} },
|
|
@@ -2523,16 +2737,16 @@ function Bo(e, t, n, o, r, i) {
|
|
|
2523
2737
|
"builder-slot": e.name
|
|
2524
2738
|
}
|
|
2525
2739
|
), [
|
|
2526
|
-
|
|
2740
|
+
createVNode(s, {
|
|
2527
2741
|
parent: (a = e.builderContext.context) == null ? void 0 : a.symbolId,
|
|
2528
2742
|
path: `symbol.data.${e.name}`,
|
|
2529
2743
|
context: e.builderContext,
|
|
2530
2744
|
registeredComponents: e.builderComponents,
|
|
2531
|
-
blocks: (
|
|
2745
|
+
blocks: (d = e.builderContext.rootState) == null ? void 0 : d[e.name]
|
|
2532
2746
|
}, null, 8, ["parent", "path", "context", "registeredComponents", "blocks"])
|
|
2533
2747
|
], 16);
|
|
2534
2748
|
}
|
|
2535
|
-
const
|
|
2749
|
+
const Slot = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]]), componentInfo$b = {
|
|
2536
2750
|
name: "Symbol",
|
|
2537
2751
|
noWrap: !0,
|
|
2538
2752
|
static: !0,
|
|
@@ -2571,7 +2785,7 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
|
|
|
2571
2785
|
builderComponents: !0,
|
|
2572
2786
|
builderLinkComponent: !0
|
|
2573
2787
|
}
|
|
2574
|
-
},
|
|
2788
|
+
}, defaultTab = {
|
|
2575
2789
|
"@type": "@builder.io/sdk:Element",
|
|
2576
2790
|
responsiveStyles: {
|
|
2577
2791
|
large: {
|
|
@@ -2593,7 +2807,7 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
|
|
|
2593
2807
|
text: "New tab"
|
|
2594
2808
|
}
|
|
2595
2809
|
}
|
|
2596
|
-
},
|
|
2810
|
+
}, defaultElement = {
|
|
2597
2811
|
"@type": "@builder.io/sdk:Element",
|
|
2598
2812
|
responsiveStyles: {
|
|
2599
2813
|
large: {
|
|
@@ -2609,7 +2823,7 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
|
|
|
2609
2823
|
text: "New tab content "
|
|
2610
2824
|
}
|
|
2611
2825
|
}
|
|
2612
|
-
},
|
|
2826
|
+
}, componentInfo$a = {
|
|
2613
2827
|
name: "Builder: Tabs",
|
|
2614
2828
|
inputs: [{
|
|
2615
2829
|
name: "tabs",
|
|
@@ -2619,16 +2833,16 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
|
|
|
2619
2833
|
name: "label",
|
|
2620
2834
|
type: "uiBlocks",
|
|
2621
2835
|
hideFromUI: !0,
|
|
2622
|
-
defaultValue: [
|
|
2836
|
+
defaultValue: [defaultTab]
|
|
2623
2837
|
}, {
|
|
2624
2838
|
name: "content",
|
|
2625
2839
|
type: "uiBlocks",
|
|
2626
2840
|
hideFromUI: !0,
|
|
2627
|
-
defaultValue: [
|
|
2841
|
+
defaultValue: [defaultElement]
|
|
2628
2842
|
}],
|
|
2629
2843
|
defaultValue: [{
|
|
2630
2844
|
label: [{
|
|
2631
|
-
...
|
|
2845
|
+
...defaultTab,
|
|
2632
2846
|
component: {
|
|
2633
2847
|
name: "Text",
|
|
2634
2848
|
options: {
|
|
@@ -2637,7 +2851,7 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
|
|
|
2637
2851
|
}
|
|
2638
2852
|
}],
|
|
2639
2853
|
content: [{
|
|
2640
|
-
...
|
|
2854
|
+
...defaultElement,
|
|
2641
2855
|
component: {
|
|
2642
2856
|
name: "Text",
|
|
2643
2857
|
options: {
|
|
@@ -2647,7 +2861,7 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
|
|
|
2647
2861
|
}]
|
|
2648
2862
|
}, {
|
|
2649
2863
|
label: [{
|
|
2650
|
-
...
|
|
2864
|
+
...defaultTab,
|
|
2651
2865
|
component: {
|
|
2652
2866
|
name: "Text",
|
|
2653
2867
|
options: {
|
|
@@ -2656,7 +2870,7 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
|
|
|
2656
2870
|
}
|
|
2657
2871
|
}],
|
|
2658
2872
|
content: [{
|
|
2659
|
-
...
|
|
2873
|
+
...defaultElement,
|
|
2660
2874
|
component: {
|
|
2661
2875
|
name: "Text",
|
|
2662
2876
|
options: {
|
|
@@ -2712,9 +2926,9 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
|
|
|
2712
2926
|
builderComponents: !0,
|
|
2713
2927
|
builderLinkComponent: !0
|
|
2714
2928
|
}
|
|
2715
|
-
},
|
|
2929
|
+
}, _sfc_main$g = defineComponent({
|
|
2716
2930
|
name: "builder-tabs",
|
|
2717
|
-
components: { Blocks
|
|
2931
|
+
components: { Blocks },
|
|
2718
2932
|
props: [
|
|
2719
2933
|
"defaultActiveTab",
|
|
2720
2934
|
"tabs",
|
|
@@ -2737,28 +2951,28 @@ const Po = /* @__PURE__ */ b(Eo, [["render", Bo]]), xo = {
|
|
|
2737
2951
|
e === this.activeTab && this.collapsible ? this.activeTab = -1 : this.activeTab = e;
|
|
2738
2952
|
}
|
|
2739
2953
|
}
|
|
2740
|
-
}),
|
|
2741
|
-
function
|
|
2742
|
-
const s =
|
|
2743
|
-
return
|
|
2744
|
-
|
|
2954
|
+
}), _hoisted_1$9 = ["onClick"], _hoisted_2$3 = { key: 0 };
|
|
2955
|
+
function _sfc_render$f(e, t, n, o, r, i) {
|
|
2956
|
+
const s = resolveComponent("Blocks");
|
|
2957
|
+
return openBlock(), createElementBlock("div", null, [
|
|
2958
|
+
createElementVNode("div", {
|
|
2745
2959
|
class: "builder-tabs-wrap",
|
|
2746
|
-
style:
|
|
2960
|
+
style: normalizeStyle({
|
|
2747
2961
|
display: "flex",
|
|
2748
2962
|
flexDirection: "row",
|
|
2749
2963
|
justifyContent: e.tabHeaderLayout || "flex-start",
|
|
2750
2964
|
overflow: "auto"
|
|
2751
2965
|
})
|
|
2752
2966
|
}, [
|
|
2753
|
-
(
|
|
2967
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.tabs, (l, a) => (openBlock(), createElementBlock("span", {
|
|
2754
2968
|
key: a,
|
|
2755
|
-
class:
|
|
2756
|
-
style:
|
|
2969
|
+
class: normalizeClass(`builder-tab-wrap ${e.activeTab === a ? "builder-tab-active" : ""}`),
|
|
2970
|
+
style: normalizeStyle({
|
|
2757
2971
|
...e.activeTab === a ? e.activeTabStyle : {}
|
|
2758
2972
|
}),
|
|
2759
|
-
onClick: (
|
|
2973
|
+
onClick: (d) => e.onClick(a)
|
|
2760
2974
|
}, [
|
|
2761
|
-
|
|
2975
|
+
createVNode(s, {
|
|
2762
2976
|
parent: e.builderBlock.id,
|
|
2763
2977
|
path: `component.options.tabs.${a}.label`,
|
|
2764
2978
|
blocks: l.label,
|
|
@@ -2766,10 +2980,10 @@ function Fo(e, t, n, o, r, i) {
|
|
|
2766
2980
|
registeredComponents: e.builderComponents,
|
|
2767
2981
|
linkComponent: e.builderLinkComponent
|
|
2768
2982
|
}, null, 8, ["parent", "path", "blocks", "context", "registeredComponents", "linkComponent"])
|
|
2769
|
-
], 14,
|
|
2983
|
+
], 14, _hoisted_1$9))), 128))
|
|
2770
2984
|
], 4),
|
|
2771
|
-
e.activeTabContent(e.activeTab) ? (
|
|
2772
|
-
|
|
2985
|
+
e.activeTabContent(e.activeTab) ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
|
|
2986
|
+
createVNode(s, {
|
|
2773
2987
|
parent: e.builderBlock.id,
|
|
2774
2988
|
path: `component.options.tabs.${e.activeTab}.content`,
|
|
2775
2989
|
blocks: e.activeTabContent(e.activeTab),
|
|
@@ -2777,10 +2991,10 @@ function Fo(e, t, n, o, r, i) {
|
|
|
2777
2991
|
registeredComponents: e.builderComponents,
|
|
2778
2992
|
linkComponent: e.builderLinkComponent
|
|
2779
2993
|
}, null, 8, ["parent", "path", "blocks", "context", "registeredComponents", "linkComponent"])
|
|
2780
|
-
])) :
|
|
2994
|
+
])) : createCommentVNode("", !0)
|
|
2781
2995
|
]);
|
|
2782
2996
|
}
|
|
2783
|
-
const
|
|
2997
|
+
const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f]]), componentInfo$9 = {
|
|
2784
2998
|
shouldReceiveBuilderProps: {
|
|
2785
2999
|
builderBlock: !1,
|
|
2786
3000
|
builderContext: !0
|
|
@@ -2802,7 +3016,7 @@ const Oo = /* @__PURE__ */ b(Vo, [["render", Fo]]), Do = {
|
|
|
2802
3016
|
height: "auto",
|
|
2803
3017
|
textAlign: "center"
|
|
2804
3018
|
}
|
|
2805
|
-
},
|
|
3019
|
+
}, _sfc_main$f = defineComponent({
|
|
2806
3020
|
name: "builder-text",
|
|
2807
3021
|
props: ["builderContext", "text"],
|
|
2808
3022
|
computed: {
|
|
@@ -2816,7 +3030,7 @@ const Oo = /* @__PURE__ */ b(Vo, [["render", Fo]]), Do = {
|
|
|
2816
3030
|
} = e;
|
|
2817
3031
|
return String(((i = this.text) == null ? void 0 : i.toString()) || "").replace(
|
|
2818
3032
|
/{{([^}]+)}}/g,
|
|
2819
|
-
(s, l) =>
|
|
3033
|
+
(s, l) => evaluate({
|
|
2820
3034
|
code: l,
|
|
2821
3035
|
context: t,
|
|
2822
3036
|
localState: n,
|
|
@@ -2827,17 +3041,17 @@ const Oo = /* @__PURE__ */ b(Vo, [["render", Fo]]), Do = {
|
|
|
2827
3041
|
);
|
|
2828
3042
|
}
|
|
2829
3043
|
}
|
|
2830
|
-
}),
|
|
2831
|
-
function
|
|
2832
|
-
return
|
|
3044
|
+
}), _hoisted_1$8 = ["innerHTML"];
|
|
3045
|
+
function _sfc_render$e(e, t, n, o, r, i) {
|
|
3046
|
+
return openBlock(), createElementBlock("div", {
|
|
2833
3047
|
class: "builder-text",
|
|
2834
3048
|
innerHTML: e.processedText,
|
|
2835
3049
|
style: {
|
|
2836
3050
|
outline: "none"
|
|
2837
3051
|
}
|
|
2838
|
-
}, null, 8,
|
|
3052
|
+
}, null, 8, _hoisted_1$8);
|
|
2839
3053
|
}
|
|
2840
|
-
const
|
|
3054
|
+
const Text = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e]]), componentInfo$8 = {
|
|
2841
3055
|
name: "Custom Code",
|
|
2842
3056
|
static: !0,
|
|
2843
3057
|
requiredPermissions: ["editCode"],
|
|
@@ -2859,7 +3073,7 @@ const Ho = /* @__PURE__ */ b(Lo, [["render", Mo]]), jo = {
|
|
|
2859
3073
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
2860
3074
|
advanced: !0
|
|
2861
3075
|
}]
|
|
2862
|
-
},
|
|
3076
|
+
}, _sfc_main$e = defineComponent({
|
|
2863
3077
|
name: "builder-custom-code",
|
|
2864
3078
|
props: ["replaceNodes", "code"],
|
|
2865
3079
|
data() {
|
|
@@ -2893,15 +3107,15 @@ const Ho = /* @__PURE__ */ b(Lo, [["render", Mo]]), jo = {
|
|
|
2893
3107
|
}
|
|
2894
3108
|
}
|
|
2895
3109
|
}
|
|
2896
|
-
}),
|
|
2897
|
-
function
|
|
2898
|
-
return
|
|
3110
|
+
}), _hoisted_1$7 = ["innerHTML"];
|
|
3111
|
+
function _sfc_render$d(e, t, n, o, r, i) {
|
|
3112
|
+
return openBlock(), createElementBlock("div", {
|
|
2899
3113
|
ref: "elementRef",
|
|
2900
|
-
class:
|
|
3114
|
+
class: normalizeClass("builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")),
|
|
2901
3115
|
innerHTML: e.code
|
|
2902
|
-
}, null, 10,
|
|
3116
|
+
}, null, 10, _hoisted_1$7);
|
|
2903
3117
|
}
|
|
2904
|
-
const
|
|
3118
|
+
const customCode = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d]]), componentInfo$7 = {
|
|
2905
3119
|
name: "Embed",
|
|
2906
3120
|
static: !0,
|
|
2907
3121
|
inputs: [{
|
|
@@ -2916,7 +3130,7 @@ const Jo = /* @__PURE__ */ b(Ko, [["render", zo]]), Go = {
|
|
|
2916
3130
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
2917
3131
|
hideFromUI: !0
|
|
2918
3132
|
}]
|
|
2919
|
-
},
|
|
3133
|
+
}, SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"], isJsScript = (e) => SCRIPT_MIME_TYPES.includes(e.type), _sfc_main$d = defineComponent({
|
|
2920
3134
|
name: "builder-embed",
|
|
2921
3135
|
props: ["content"],
|
|
2922
3136
|
data() {
|
|
@@ -2949,7 +3163,7 @@ const Jo = /* @__PURE__ */ b(Ko, [["render", zo]]), Go = {
|
|
|
2949
3163
|
this.scriptsInserted.push(n.src);
|
|
2950
3164
|
const o = document.createElement("script");
|
|
2951
3165
|
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
2952
|
-
} else if (
|
|
3166
|
+
} else if (isJsScript(n) && !this.scriptsRun.includes(n.innerText))
|
|
2953
3167
|
try {
|
|
2954
3168
|
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
2955
3169
|
} catch (o) {
|
|
@@ -2958,15 +3172,15 @@ const Jo = /* @__PURE__ */ b(Ko, [["render", zo]]), Go = {
|
|
|
2958
3172
|
}
|
|
2959
3173
|
}
|
|
2960
3174
|
}
|
|
2961
|
-
}),
|
|
2962
|
-
function
|
|
2963
|
-
return
|
|
3175
|
+
}), _hoisted_1$6 = ["innerHTML"];
|
|
3176
|
+
function _sfc_render$c(e, t, n, o, r, i) {
|
|
3177
|
+
return openBlock(), createElementBlock("div", {
|
|
2964
3178
|
class: "builder-embed",
|
|
2965
3179
|
ref: "elem",
|
|
2966
3180
|
innerHTML: e.content
|
|
2967
|
-
}, null, 8,
|
|
3181
|
+
}, null, 8, _hoisted_1$6);
|
|
2968
3182
|
}
|
|
2969
|
-
const
|
|
3183
|
+
const embed = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c]]), componentInfo$6 = {
|
|
2970
3184
|
name: "Form:Form",
|
|
2971
3185
|
// editableTags: ['builder-form-error']
|
|
2972
3186
|
defaults: {
|
|
@@ -3203,15 +3417,15 @@ const er = /* @__PURE__ */ b(Xo, [["render", _o]]), tr = {
|
|
|
3203
3417
|
builderComponents: !0,
|
|
3204
3418
|
builderLinkComponent: !0
|
|
3205
3419
|
}
|
|
3206
|
-
},
|
|
3420
|
+
}, validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], getEnv = () => {
|
|
3207
3421
|
const e = process.env.NODE_ENV || "production";
|
|
3208
|
-
return
|
|
3209
|
-
},
|
|
3422
|
+
return validEnvList.includes(e) ? e : "production";
|
|
3423
|
+
}, get = (e, t, n) => {
|
|
3210
3424
|
const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r, i) => r != null ? r[i] : r, e);
|
|
3211
3425
|
return o === void 0 || o === e ? n : o;
|
|
3212
|
-
},
|
|
3426
|
+
}, _sfc_main$c = defineComponent({
|
|
3213
3427
|
name: "builder-form-component",
|
|
3214
|
-
components: { Block
|
|
3428
|
+
components: { Block, Blocks },
|
|
3215
3429
|
props: [
|
|
3216
3430
|
"builderContext",
|
|
3217
3431
|
"previewState",
|
|
@@ -3240,7 +3454,7 @@ const er = /* @__PURE__ */ b(Xo, [["render", _o]]), tr = {
|
|
|
3240
3454
|
formState: "unsubmitted",
|
|
3241
3455
|
responseData: null,
|
|
3242
3456
|
formErrorMessage: "",
|
|
3243
|
-
filterAttrs
|
|
3457
|
+
filterAttrs
|
|
3244
3458
|
};
|
|
3245
3459
|
},
|
|
3246
3460
|
methods: {
|
|
@@ -3253,7 +3467,7 @@ const er = /* @__PURE__ */ b(Xo, [["render", _o]]), tr = {
|
|
|
3253
3467
|
this.builderContext.rootSetState ? (o = (n = this.builderContext).rootSetState) == null || o.call(n, t) : this.builderContext.rootState = t;
|
|
3254
3468
|
},
|
|
3255
3469
|
submissionState() {
|
|
3256
|
-
return
|
|
3470
|
+
return isEditing() && this.previewState || this.formState;
|
|
3257
3471
|
},
|
|
3258
3472
|
onSubmit(e) {
|
|
3259
3473
|
var n;
|
|
@@ -3268,150 +3482,150 @@ const er = /* @__PURE__ */ b(Xo, [["render", _o]]), tr = {
|
|
|
3268
3482
|
e.preventDefault();
|
|
3269
3483
|
const o = e.currentTarget || e.target, r = this.customHeaders || {};
|
|
3270
3484
|
let i;
|
|
3271
|
-
const s = new FormData(o), l = Array.from(o.querySelectorAll("input,select,textarea")).filter((
|
|
3272
|
-
let
|
|
3273
|
-
const
|
|
3274
|
-
if (
|
|
3275
|
-
if (
|
|
3276
|
-
if (
|
|
3277
|
-
return
|
|
3278
|
-
key:
|
|
3279
|
-
value:
|
|
3485
|
+
const s = new FormData(o), l = Array.from(o.querySelectorAll("input,select,textarea")).filter((c) => !!c.name).map((c) => {
|
|
3486
|
+
let u;
|
|
3487
|
+
const f = c.name;
|
|
3488
|
+
if (c instanceof HTMLInputElement)
|
|
3489
|
+
if (c.type === "radio") {
|
|
3490
|
+
if (c.checked)
|
|
3491
|
+
return u = c.name, {
|
|
3492
|
+
key: f,
|
|
3493
|
+
value: u
|
|
3280
3494
|
};
|
|
3281
|
-
} else if (
|
|
3282
|
-
|
|
3283
|
-
else if (
|
|
3284
|
-
const
|
|
3285
|
-
isNaN(
|
|
3495
|
+
} else if (c.type === "checkbox")
|
|
3496
|
+
u = c.checked;
|
|
3497
|
+
else if (c.type === "number" || c.type === "range") {
|
|
3498
|
+
const m = c.valueAsNumber;
|
|
3499
|
+
isNaN(m) || (u = m);
|
|
3286
3500
|
} else
|
|
3287
|
-
|
|
3501
|
+
c.type === "file" ? u = c.files : u = c.value;
|
|
3288
3502
|
else
|
|
3289
|
-
|
|
3503
|
+
u = c.value;
|
|
3290
3504
|
return {
|
|
3291
|
-
key:
|
|
3292
|
-
value:
|
|
3505
|
+
key: f,
|
|
3506
|
+
value: u
|
|
3293
3507
|
};
|
|
3294
3508
|
});
|
|
3295
3509
|
let a = this.contentType;
|
|
3296
|
-
if (this.sendSubmissionsTo === "email" && (a = "multipart/form-data"), Array.from(l).forEach(({ value:
|
|
3297
|
-
(
|
|
3510
|
+
if (this.sendSubmissionsTo === "email" && (a = "multipart/form-data"), Array.from(l).forEach(({ value: c }) => {
|
|
3511
|
+
(c instanceof File || Array.isArray(c) && c[0] instanceof File || c instanceof FileList) && (a = "multipart/form-data");
|
|
3298
3512
|
}), a !== "application/json")
|
|
3299
3513
|
i = s;
|
|
3300
3514
|
else {
|
|
3301
|
-
const
|
|
3302
|
-
Array.from(l).forEach(({ value:
|
|
3303
|
-
|
|
3304
|
-
}), i = JSON.stringify(
|
|
3515
|
+
const c = {};
|
|
3516
|
+
Array.from(l).forEach(({ value: u, key: f }) => {
|
|
3517
|
+
set(c, f, u);
|
|
3518
|
+
}), i = JSON.stringify(c);
|
|
3305
3519
|
}
|
|
3306
3520
|
a && a !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (r["content-type"] = a));
|
|
3307
|
-
const
|
|
3521
|
+
const d = new CustomEvent("presubmit", {
|
|
3308
3522
|
detail: {
|
|
3309
3523
|
body: i
|
|
3310
3524
|
}
|
|
3311
3525
|
});
|
|
3312
|
-
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(
|
|
3526
|
+
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(d), d.defaultPrevented))
|
|
3313
3527
|
return;
|
|
3314
3528
|
this.formState = "sending";
|
|
3315
|
-
const
|
|
3529
|
+
const p = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
|
|
3316
3530
|
this.sendSubmissionsToEmail || ""
|
|
3317
3531
|
)}&name=${encodeURIComponent(this.name || "")}`;
|
|
3318
3532
|
fetch(
|
|
3319
|
-
this.sendSubmissionsTo === "email" ?
|
|
3533
|
+
this.sendSubmissionsTo === "email" ? p : this.action,
|
|
3320
3534
|
{
|
|
3321
3535
|
body: i,
|
|
3322
3536
|
headers: r,
|
|
3323
3537
|
method: this.method || "post"
|
|
3324
3538
|
}
|
|
3325
3539
|
).then(
|
|
3326
|
-
async (
|
|
3327
|
-
let
|
|
3328
|
-
const
|
|
3329
|
-
if (
|
|
3330
|
-
let
|
|
3331
|
-
|
|
3332
|
-
formErrorMessage:
|
|
3540
|
+
async (c) => {
|
|
3541
|
+
let u;
|
|
3542
|
+
const f = c.headers.get("content-type");
|
|
3543
|
+
if (f && f.indexOf("application/json") !== -1 ? u = await c.json() : u = await c.text(), !c.ok && this.errorMessagePath) {
|
|
3544
|
+
let m = get(u, this.errorMessagePath);
|
|
3545
|
+
m && (typeof m != "string" && (m = JSON.stringify(m)), this.formErrorMessage = m, this.mergeNewRootState({
|
|
3546
|
+
formErrorMessage: m
|
|
3333
3547
|
}));
|
|
3334
3548
|
}
|
|
3335
|
-
if (this.responseData =
|
|
3336
|
-
const
|
|
3549
|
+
if (this.responseData = u, this.formState = c.ok ? "success" : "error", c.ok) {
|
|
3550
|
+
const m = new CustomEvent("submit:success", {
|
|
3337
3551
|
detail: {
|
|
3338
|
-
res:
|
|
3339
|
-
body:
|
|
3552
|
+
res: c,
|
|
3553
|
+
body: u
|
|
3340
3554
|
}
|
|
3341
3555
|
});
|
|
3342
3556
|
if (this.$refs.formRef) {
|
|
3343
|
-
if (this.$refs.formRef.dispatchEvent(
|
|
3557
|
+
if (this.$refs.formRef.dispatchEvent(m), m.defaultPrevented)
|
|
3344
3558
|
return;
|
|
3345
3559
|
this.resetFormOnSubmit !== !1 && this.$refs.formRef.reset();
|
|
3346
3560
|
}
|
|
3347
3561
|
if (this.successUrl)
|
|
3348
3562
|
if (this.$refs.formRef) {
|
|
3349
|
-
const
|
|
3563
|
+
const b = new CustomEvent("route", {
|
|
3350
3564
|
detail: {
|
|
3351
3565
|
url: this.successUrl
|
|
3352
3566
|
}
|
|
3353
3567
|
});
|
|
3354
|
-
this.$refs.formRef.dispatchEvent(
|
|
3568
|
+
this.$refs.formRef.dispatchEvent(b), b.defaultPrevented || (location.href = this.successUrl);
|
|
3355
3569
|
} else
|
|
3356
3570
|
location.href = this.successUrl;
|
|
3357
3571
|
}
|
|
3358
3572
|
},
|
|
3359
|
-
(
|
|
3360
|
-
const
|
|
3573
|
+
(c) => {
|
|
3574
|
+
const u = new CustomEvent("submit:error", {
|
|
3361
3575
|
detail: {
|
|
3362
|
-
error:
|
|
3576
|
+
error: c
|
|
3363
3577
|
}
|
|
3364
3578
|
});
|
|
3365
|
-
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(
|
|
3579
|
+
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(u), u.defaultPrevented) || (this.responseData = c, this.formState = "error");
|
|
3366
3580
|
}
|
|
3367
3581
|
);
|
|
3368
3582
|
}
|
|
3369
3583
|
}
|
|
3370
3584
|
}
|
|
3371
|
-
}),
|
|
3585
|
+
}), _hoisted_1$5 = ["validate", "action", "method", "name"], _hoisted_2$2 = {
|
|
3372
3586
|
key: 3,
|
|
3373
3587
|
class: "builder-form-error-text pre-3i4ezorcfhi"
|
|
3374
3588
|
};
|
|
3375
|
-
function
|
|
3589
|
+
function _sfc_render$b(e, t, n, o, r, i) {
|
|
3376
3590
|
var a;
|
|
3377
|
-
const s =
|
|
3378
|
-
return
|
|
3591
|
+
const s = resolveComponent("Block"), l = resolveComponent("Blocks");
|
|
3592
|
+
return openBlock(), createElementBlock("form", mergeProps({
|
|
3379
3593
|
validate: e.validate,
|
|
3380
3594
|
ref: "formRef",
|
|
3381
3595
|
action: !e.sendWithJs && e.action,
|
|
3382
3596
|
method: e.method,
|
|
3383
3597
|
name: e.name,
|
|
3384
|
-
onSubmit: t[0] || (t[0] = (
|
|
3385
|
-
}, { ...e.filterAttrs(e.attributes, "v-on:", !1) },
|
|
3386
|
-
e.builderBlock && e.builderBlock.children ? (
|
|
3598
|
+
onSubmit: t[0] || (t[0] = (d) => e.onSubmit(d))
|
|
3599
|
+
}, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3600
|
+
e.builderBlock && e.builderBlock.children ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList((a = e.builderBlock) == null ? void 0 : a.children, (d, p) => (openBlock(), createBlock(s, {
|
|
3387
3601
|
key: `form-block-${e.idx}`,
|
|
3388
|
-
block:
|
|
3602
|
+
block: d,
|
|
3389
3603
|
context: e.builderContext,
|
|
3390
3604
|
registeredComponents: e.builderComponents,
|
|
3391
3605
|
linkComponent: e.builderLinkComponent
|
|
3392
|
-
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) :
|
|
3393
|
-
e.submissionState() === "error" ? (
|
|
3606
|
+
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : createCommentVNode("", !0),
|
|
3607
|
+
e.submissionState() === "error" ? (openBlock(), createBlock(l, {
|
|
3394
3608
|
key: 1,
|
|
3395
3609
|
path: "errorMessage",
|
|
3396
3610
|
blocks: e.errorMessage,
|
|
3397
3611
|
context: e.builderContext
|
|
3398
|
-
}, null, 8, ["blocks", "context"])) :
|
|
3399
|
-
e.submissionState() === "sending" ? (
|
|
3612
|
+
}, null, 8, ["blocks", "context"])) : createCommentVNode("", !0),
|
|
3613
|
+
e.submissionState() === "sending" ? (openBlock(), createBlock(l, {
|
|
3400
3614
|
key: 2,
|
|
3401
3615
|
path: "sendingMessage",
|
|
3402
3616
|
blocks: e.sendingMessage,
|
|
3403
3617
|
context: e.builderContext
|
|
3404
|
-
}, null, 8, ["blocks", "context"])) :
|
|
3405
|
-
e.submissionState() === "error" && e.responseData ? (
|
|
3406
|
-
e.submissionState() === "success" ? (
|
|
3618
|
+
}, null, 8, ["blocks", "context"])) : createCommentVNode("", !0),
|
|
3619
|
+
e.submissionState() === "error" && e.responseData ? (openBlock(), createElementBlock("pre", _hoisted_2$2, toDisplayString(JSON.stringify(e.responseData, null, 2)), 1)) : createCommentVNode("", !0),
|
|
3620
|
+
e.submissionState() === "success" ? (openBlock(), createBlock(l, {
|
|
3407
3621
|
key: 4,
|
|
3408
3622
|
path: "successMessage",
|
|
3409
3623
|
blocks: e.successMessage,
|
|
3410
3624
|
context: e.builderContext
|
|
3411
|
-
}, null, 8, ["blocks", "context"])) :
|
|
3412
|
-
], 16,
|
|
3625
|
+
}, null, 8, ["blocks", "context"])) : createCommentVNode("", !0)
|
|
3626
|
+
], 16, _hoisted_1$5);
|
|
3413
3627
|
}
|
|
3414
|
-
const
|
|
3628
|
+
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-489330f7"]]), componentInfo$5 = {
|
|
3415
3629
|
name: "Form:Input",
|
|
3416
3630
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
3417
3631
|
inputs: [
|
|
@@ -3462,7 +3676,7 @@ const cr = /* @__PURE__ */ b(ir, [["render", lr], ["__scopeId", "data-v-489330f7
|
|
|
3462
3676
|
borderStyle: "solid",
|
|
3463
3677
|
borderColor: "#ccc"
|
|
3464
3678
|
}
|
|
3465
|
-
},
|
|
3679
|
+
}, _sfc_main$b = defineComponent({
|
|
3466
3680
|
name: "builder-form-input-component",
|
|
3467
3681
|
props: [
|
|
3468
3682
|
"attributes",
|
|
@@ -3474,11 +3688,11 @@ const cr = /* @__PURE__ */ b(ir, [["render", lr], ["__scopeId", "data-v-489330f7
|
|
|
3474
3688
|
"required"
|
|
3475
3689
|
],
|
|
3476
3690
|
data() {
|
|
3477
|
-
return { isEditing
|
|
3691
|
+
return { isEditing, filterAttrs };
|
|
3478
3692
|
}
|
|
3479
|
-
}),
|
|
3480
|
-
function
|
|
3481
|
-
return
|
|
3693
|
+
}), _hoisted_1$4 = ["placeholder", "type", "name", "value", "defaultValue", "required"];
|
|
3694
|
+
function _sfc_render$a(e, t, n, o, r, i) {
|
|
3695
|
+
return openBlock(), createElementBlock("input", mergeProps({
|
|
3482
3696
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
3483
3697
|
placeholder: e.placeholder,
|
|
3484
3698
|
type: e.type,
|
|
@@ -3486,9 +3700,9 @@ function mr(e, t, n, o, r, i) {
|
|
|
3486
3700
|
value: e.value,
|
|
3487
3701
|
defaultValue: e.defaultValue,
|
|
3488
3702
|
required: e.required
|
|
3489
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
3703
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$4);
|
|
3490
3704
|
}
|
|
3491
|
-
const
|
|
3705
|
+
const FormInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a]]), componentInfo$4 = {
|
|
3492
3706
|
name: "Form:Select",
|
|
3493
3707
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
3494
3708
|
defaultStyles: {
|
|
@@ -3530,28 +3744,28 @@ const hr = /* @__PURE__ */ b(ur, [["render", mr]]), fr = {
|
|
|
3530
3744
|
}],
|
|
3531
3745
|
static: !0,
|
|
3532
3746
|
noWrap: !0
|
|
3533
|
-
},
|
|
3747
|
+
}, _sfc_main$a = defineComponent({
|
|
3534
3748
|
name: "builder-select-component",
|
|
3535
3749
|
props: ["attributes", "value", "defaultValue", "name", "required", "options"],
|
|
3536
3750
|
data() {
|
|
3537
|
-
return { isEditing
|
|
3751
|
+
return { isEditing, filterAttrs };
|
|
3538
3752
|
}
|
|
3539
|
-
}),
|
|
3540
|
-
function
|
|
3541
|
-
return
|
|
3753
|
+
}), _hoisted_1$3 = ["value", "defaultValue", "name", "required"], _hoisted_2$1 = ["value"];
|
|
3754
|
+
function _sfc_render$9(e, t, n, o, r, i) {
|
|
3755
|
+
return openBlock(), createElementBlock("select", mergeProps({
|
|
3542
3756
|
value: e.value,
|
|
3543
3757
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
3544
3758
|
defaultValue: e.defaultValue,
|
|
3545
3759
|
name: e.name,
|
|
3546
3760
|
required: e.required
|
|
3547
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
3548
|
-
(
|
|
3761
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3762
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.options, (s, l) => (openBlock(), createElementBlock("option", {
|
|
3549
3763
|
key: `${s.name}-${l}`,
|
|
3550
3764
|
value: s.value
|
|
3551
|
-
},
|
|
3552
|
-
], 16,
|
|
3765
|
+
}, toDisplayString(s.name || s.value), 9, _hoisted_2$1))), 128))
|
|
3766
|
+
], 16, _hoisted_1$3);
|
|
3553
3767
|
}
|
|
3554
|
-
const
|
|
3768
|
+
const FormSelect = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9]]), componentInfo$3 = {
|
|
3555
3769
|
name: "Form:SubmitButton",
|
|
3556
3770
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
3557
3771
|
defaultStyles: {
|
|
@@ -3576,17 +3790,17 @@ const vr = /* @__PURE__ */ b(br, [["render", kr]]), Cr = {
|
|
|
3576
3790
|
// that only shows if advanced setting is flipped
|
|
3577
3791
|
// TODO: defaultChildren
|
|
3578
3792
|
// canHaveChildren: true,
|
|
3579
|
-
},
|
|
3793
|
+
}, _sfc_main$9 = defineComponent({
|
|
3580
3794
|
name: "builder-submit-button",
|
|
3581
3795
|
props: ["attributes", "text"],
|
|
3582
3796
|
data() {
|
|
3583
|
-
return { filterAttrs
|
|
3797
|
+
return { filterAttrs };
|
|
3584
3798
|
}
|
|
3585
3799
|
});
|
|
3586
|
-
function
|
|
3587
|
-
return
|
|
3800
|
+
function _sfc_render$8(e, t, n, o, r, i) {
|
|
3801
|
+
return openBlock(), createElementBlock("button", mergeProps({ type: "submit" }, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), toDisplayString(e.text), 17);
|
|
3588
3802
|
}
|
|
3589
|
-
const
|
|
3803
|
+
const FormSubmitButton = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8]]), componentInfo$2 = {
|
|
3590
3804
|
name: "Form:TextArea",
|
|
3591
3805
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
3592
3806
|
inputs: [{
|
|
@@ -3622,7 +3836,7 @@ const wr = /* @__PURE__ */ b(Sr, [["render", Tr]]), Ir = {
|
|
|
3622
3836
|
},
|
|
3623
3837
|
static: !0,
|
|
3624
3838
|
noWrap: !0
|
|
3625
|
-
}, $
|
|
3839
|
+
}, _sfc_main$8 = defineComponent({
|
|
3626
3840
|
name: "builder-textarea",
|
|
3627
3841
|
props: [
|
|
3628
3842
|
"attributes",
|
|
@@ -3633,19 +3847,19 @@ const wr = /* @__PURE__ */ b(Sr, [["render", Tr]]), Ir = {
|
|
|
3633
3847
|
"required"
|
|
3634
3848
|
],
|
|
3635
3849
|
data() {
|
|
3636
|
-
return { filterAttrs
|
|
3850
|
+
return { filterAttrs };
|
|
3637
3851
|
}
|
|
3638
|
-
}),
|
|
3639
|
-
function
|
|
3640
|
-
return
|
|
3852
|
+
}), _hoisted_1$2 = ["placeholder", "name", "value", "defaultValue", "required"];
|
|
3853
|
+
function _sfc_render$7(e, t, n, o, r, i) {
|
|
3854
|
+
return openBlock(), createElementBlock("textarea", mergeProps({
|
|
3641
3855
|
placeholder: e.placeholder,
|
|
3642
3856
|
name: e.name,
|
|
3643
3857
|
value: e.value,
|
|
3644
3858
|
defaultValue: e.defaultValue,
|
|
3645
3859
|
required: e.required
|
|
3646
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
3860
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$2);
|
|
3647
3861
|
}
|
|
3648
|
-
const
|
|
3862
|
+
const Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7]]), componentInfo$1 = {
|
|
3649
3863
|
// friendlyName?
|
|
3650
3864
|
name: "Raw:Img",
|
|
3651
3865
|
hideFromInsertMenu: !0,
|
|
@@ -3659,7 +3873,7 @@ const Br = /* @__PURE__ */ b($r, [["render", Er]]), Pr = {
|
|
|
3659
3873
|
}],
|
|
3660
3874
|
noWrap: !0,
|
|
3661
3875
|
static: !0
|
|
3662
|
-
},
|
|
3876
|
+
}, _sfc_main$7 = defineComponent({
|
|
3663
3877
|
name: "builder-img-component",
|
|
3664
3878
|
props: [
|
|
3665
3879
|
"backgroundSize",
|
|
@@ -3670,11 +3884,11 @@ const Br = /* @__PURE__ */ b($r, [["render", Er]]), Pr = {
|
|
|
3670
3884
|
"attributes"
|
|
3671
3885
|
],
|
|
3672
3886
|
data() {
|
|
3673
|
-
return { isEditing
|
|
3887
|
+
return { isEditing, filterAttrs };
|
|
3674
3888
|
}
|
|
3675
|
-
}),
|
|
3676
|
-
function
|
|
3677
|
-
return
|
|
3889
|
+
}), _hoisted_1$1 = ["alt", "src"];
|
|
3890
|
+
function _sfc_render$6(e, t, n, o, r, i) {
|
|
3891
|
+
return openBlock(), createElementBlock("img", mergeProps({
|
|
3678
3892
|
style: {
|
|
3679
3893
|
objectFit: e.backgroundSize || "cover",
|
|
3680
3894
|
objectPosition: e.backgroundPosition || "center"
|
|
@@ -3682,9 +3896,9 @@ function Vr(e, t, n, o, r, i) {
|
|
|
3682
3896
|
key: e.isEditing() && e.imgSrc || "default-key",
|
|
3683
3897
|
alt: e.altText,
|
|
3684
3898
|
src: e.imgSrc || e.image
|
|
3685
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
3899
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, _hoisted_1$1);
|
|
3686
3900
|
}
|
|
3687
|
-
const
|
|
3901
|
+
const Img = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]), componentInfo = {
|
|
3688
3902
|
name: "Video",
|
|
3689
3903
|
canHaveChildren: !0,
|
|
3690
3904
|
defaultStyles: {
|
|
@@ -3768,7 +3982,7 @@ const Wr = /* @__PURE__ */ b(xr, [["render", Vr]]), Nr = {
|
|
|
3768
3982
|
shouldReceiveBuilderProps: {
|
|
3769
3983
|
builderBlock: !0
|
|
3770
3984
|
}
|
|
3771
|
-
},
|
|
3985
|
+
}, _sfc_main$6 = defineComponent({
|
|
3772
3986
|
name: "builder-video",
|
|
3773
3987
|
props: [
|
|
3774
3988
|
"autoPlay",
|
|
@@ -3813,16 +4027,16 @@ const Wr = /* @__PURE__ */ b(xr, [["render", Vr]]), Nr = {
|
|
|
3813
4027
|
};
|
|
3814
4028
|
}
|
|
3815
4029
|
}
|
|
3816
|
-
}),
|
|
4030
|
+
}), _hoisted_1 = { style: {
|
|
3817
4031
|
position: "relative"
|
|
3818
|
-
} },
|
|
4032
|
+
} }, _hoisted_2 = ["preload", "src", "poster"], _hoisted_3 = ["src"], _hoisted_4 = {
|
|
3819
4033
|
key: 1,
|
|
3820
4034
|
style: {
|
|
3821
4035
|
display: "flex",
|
|
3822
4036
|
flexDirection: "column",
|
|
3823
4037
|
alignItems: "stretch"
|
|
3824
4038
|
}
|
|
3825
|
-
},
|
|
4039
|
+
}, _hoisted_5 = {
|
|
3826
4040
|
key: 2,
|
|
3827
4041
|
style: {
|
|
3828
4042
|
pointerEvents: "none",
|
|
@@ -3836,10 +4050,10 @@ const Wr = /* @__PURE__ */ b(xr, [["render", Vr]]), Nr = {
|
|
|
3836
4050
|
height: "100%"
|
|
3837
4051
|
}
|
|
3838
4052
|
};
|
|
3839
|
-
function
|
|
3840
|
-
var s, l, a,
|
|
3841
|
-
return
|
|
3842
|
-
|
|
4053
|
+
function _sfc_render$5(e, t, n, o, r, i) {
|
|
4054
|
+
var s, l, a, d, p, c, u;
|
|
4055
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
4056
|
+
createElementVNode("video", mergeProps({
|
|
3843
4057
|
class: "builder-video",
|
|
3844
4058
|
preload: e.preload || "metadata",
|
|
3845
4059
|
style: {
|
|
@@ -3859,87 +4073,87 @@ function Hr(e, t, n, o, r, i) {
|
|
|
3859
4073
|
src: e.video || "no-src",
|
|
3860
4074
|
poster: e.posterImage
|
|
3861
4075
|
}, e.spreadProps), [
|
|
3862
|
-
e.lazyLoad ?
|
|
4076
|
+
e.lazyLoad ? createCommentVNode("", !0) : (openBlock(), createElementBlock("source", {
|
|
3863
4077
|
key: 0,
|
|
3864
4078
|
type: "video/mp4",
|
|
3865
4079
|
src: e.video
|
|
3866
|
-
}, null, 8,
|
|
3867
|
-
], 16,
|
|
3868
|
-
e.aspectRatio && !(e.fitContent && ((a = (l = e.builderBlock) == null ? void 0 : l.children) != null && a.length)) ? (
|
|
4080
|
+
}, null, 8, _hoisted_3))
|
|
4081
|
+
], 16, _hoisted_2),
|
|
4082
|
+
e.aspectRatio && !(e.fitContent && ((a = (l = e.builderBlock) == null ? void 0 : l.children) != null && a.length)) ? (openBlock(), createElementBlock("div", {
|
|
3869
4083
|
key: 0,
|
|
3870
|
-
style:
|
|
4084
|
+
style: normalizeStyle({
|
|
3871
4085
|
width: "100%",
|
|
3872
4086
|
paddingTop: e.aspectRatio * 100 + "%",
|
|
3873
4087
|
pointerEvents: "none",
|
|
3874
4088
|
fontSize: "0px"
|
|
3875
4089
|
})
|
|
3876
|
-
}, null, 4)) :
|
|
3877
|
-
(
|
|
3878
|
-
|
|
3879
|
-
])) :
|
|
3880
|
-
(
|
|
3881
|
-
|
|
3882
|
-
])) :
|
|
4090
|
+
}, null, 4)) : createCommentVNode("", !0),
|
|
4091
|
+
(p = (d = e.builderBlock) == null ? void 0 : d.children) != null && p.length && e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
4092
|
+
renderSlot(e.$slots, "default")
|
|
4093
|
+
])) : createCommentVNode("", !0),
|
|
4094
|
+
(u = (c = e.builderBlock) == null ? void 0 : c.children) != null && u.length && !e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
4095
|
+
renderSlot(e.$slots, "default")
|
|
4096
|
+
])) : createCommentVNode("", !0)
|
|
3883
4097
|
]);
|
|
3884
4098
|
}
|
|
3885
|
-
const
|
|
3886
|
-
component:
|
|
3887
|
-
...
|
|
4099
|
+
const Video = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]]), getExtraComponents = () => [{
|
|
4100
|
+
component: customCode,
|
|
4101
|
+
...componentInfo$8
|
|
3888
4102
|
}, {
|
|
3889
|
-
component:
|
|
3890
|
-
...
|
|
4103
|
+
component: embed,
|
|
4104
|
+
...componentInfo$7
|
|
3891
4105
|
}, {
|
|
3892
|
-
component:
|
|
3893
|
-
...
|
|
4106
|
+
component: Form,
|
|
4107
|
+
...componentInfo$6
|
|
3894
4108
|
}, {
|
|
3895
|
-
component:
|
|
3896
|
-
...
|
|
4109
|
+
component: FormInput,
|
|
4110
|
+
...componentInfo$5
|
|
3897
4111
|
}, {
|
|
3898
|
-
component:
|
|
3899
|
-
...
|
|
4112
|
+
component: FormSubmitButton,
|
|
4113
|
+
...componentInfo$3
|
|
3900
4114
|
}, {
|
|
3901
|
-
component:
|
|
3902
|
-
...
|
|
4115
|
+
component: FormSelect,
|
|
4116
|
+
...componentInfo$4
|
|
3903
4117
|
}, {
|
|
3904
|
-
component:
|
|
3905
|
-
...
|
|
4118
|
+
component: Textarea,
|
|
4119
|
+
...componentInfo$2
|
|
3906
4120
|
}, {
|
|
3907
|
-
component:
|
|
3908
|
-
...
|
|
4121
|
+
component: Img,
|
|
4122
|
+
...componentInfo$1
|
|
3909
4123
|
}, {
|
|
3910
|
-
component:
|
|
3911
|
-
...
|
|
3912
|
-
}],
|
|
3913
|
-
component:
|
|
3914
|
-
...
|
|
4124
|
+
component: Video,
|
|
4125
|
+
...componentInfo
|
|
4126
|
+
}], getDefaultRegisteredComponents = () => [{
|
|
4127
|
+
component: Button,
|
|
4128
|
+
...componentInfo$h
|
|
3915
4129
|
}, {
|
|
3916
|
-
component:
|
|
3917
|
-
...
|
|
4130
|
+
component: Columns,
|
|
4131
|
+
...componentInfo$g
|
|
3918
4132
|
}, {
|
|
3919
|
-
component:
|
|
3920
|
-
...
|
|
4133
|
+
component: Fragment,
|
|
4134
|
+
...componentInfo$f
|
|
3921
4135
|
}, {
|
|
3922
|
-
component:
|
|
3923
|
-
...
|
|
4136
|
+
component: Image,
|
|
4137
|
+
...componentInfo$e
|
|
3924
4138
|
}, {
|
|
3925
|
-
component:
|
|
3926
|
-
|
|
4139
|
+
component: Section,
|
|
4140
|
+
...componentInfo$d
|
|
3927
4141
|
}, {
|
|
3928
|
-
component:
|
|
3929
|
-
...
|
|
4142
|
+
component: Slot,
|
|
4143
|
+
...componentInfo$c
|
|
3930
4144
|
}, {
|
|
3931
|
-
component:
|
|
3932
|
-
...
|
|
4145
|
+
component: Symbol$1,
|
|
4146
|
+
...componentInfo$b
|
|
3933
4147
|
}, {
|
|
3934
|
-
component:
|
|
3935
|
-
...
|
|
4148
|
+
component: Text,
|
|
4149
|
+
...componentInfo$9
|
|
3936
4150
|
}, {
|
|
3937
|
-
component:
|
|
3938
|
-
...
|
|
4151
|
+
component: Tabs,
|
|
4152
|
+
...componentInfo$a
|
|
3939
4153
|
}, {
|
|
3940
|
-
component:
|
|
3941
|
-
...
|
|
3942
|
-
}, ...
|
|
4154
|
+
component: Accordion,
|
|
4155
|
+
...componentInfo$i
|
|
4156
|
+
}, ...getExtraComponents()], UPDATE_COOKIES_AND_STYLES_SCRIPT = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
3943
4157
|
function getAndSetVariantId() {
|
|
3944
4158
|
function setCookie(name, value, days) {
|
|
3945
4159
|
let expires = '';
|
|
@@ -3995,7 +4209,7 @@ const jr = /* @__PURE__ */ b(Fr, [["render", Hr]]), Kr = () => [{
|
|
|
3995
4209
|
}).join('');
|
|
3996
4210
|
styleEl.innerHTML = newStyleStr;
|
|
3997
4211
|
}
|
|
3998
|
-
}`,
|
|
4212
|
+
}`, UPDATE_VARIANT_VISIBILITY_SCRIPT = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
3999
4213
|
if (!navigator.cookieEnabled) {
|
|
4000
4214
|
return;
|
|
4001
4215
|
}
|
|
@@ -4029,27 +4243,27 @@ const jr = /* @__PURE__ */ b(Fr, [["render", Hr]]), Kr = () => [{
|
|
|
4029
4243
|
thisScriptEl?.remove();
|
|
4030
4244
|
}
|
|
4031
4245
|
return;
|
|
4032
|
-
}`,
|
|
4246
|
+
}`, 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) => ({
|
|
4033
4247
|
...t,
|
|
4034
4248
|
testVariationId: t.id,
|
|
4035
4249
|
id: e == null ? void 0 : e.id
|
|
4036
|
-
})),
|
|
4250
|
+
})), checkShouldRenderVariants = ({
|
|
4037
4251
|
canTrack: e,
|
|
4038
4252
|
content: t
|
|
4039
|
-
}) => !(!(
|
|
4040
|
-
window.${
|
|
4041
|
-
window.${
|
|
4042
|
-
`,
|
|
4043
|
-
window.${
|
|
4044
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
4045
|
-
)`,
|
|
4253
|
+
}) => !(!(getVariants(t).length > 0) || !e), getIsHydrationTarget = (e) => e === "react" || e === "reactNative", isHydrationTarget = getIsHydrationTarget(TARGET), getInitVariantsFnsScriptString = () => `
|
|
4254
|
+
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
4255
|
+
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
4256
|
+
`, getUpdateCookieAndStylesScript = (e, t) => `
|
|
4257
|
+
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}(
|
|
4258
|
+
"${t}",${JSON.stringify(e)}, ${isHydrationTarget}
|
|
4259
|
+
)`, getUpdateVariantVisibilityScript = ({
|
|
4046
4260
|
contentId: e,
|
|
4047
4261
|
variationId: t
|
|
4048
|
-
}) => `window.${
|
|
4049
|
-
"${t}", "${e}", ${
|
|
4050
|
-
)`,
|
|
4262
|
+
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
4263
|
+
"${t}", "${e}", ${isHydrationTarget}
|
|
4264
|
+
)`, _sfc_main$5 = defineComponent({
|
|
4051
4265
|
render() {
|
|
4052
|
-
return
|
|
4266
|
+
return h("script", {
|
|
4053
4267
|
innerHTML: this.scriptStr,
|
|
4054
4268
|
"data-id": this.id,
|
|
4055
4269
|
nonce: this.nonce
|
|
@@ -4058,10 +4272,10 @@ const jr = /* @__PURE__ */ b(Fr, [["render", Hr]]), Kr = () => [{
|
|
|
4058
4272
|
name: "inlined-script",
|
|
4059
4273
|
props: ["scriptStr", "id", "nonce"]
|
|
4060
4274
|
});
|
|
4061
|
-
function
|
|
4275
|
+
function round(e) {
|
|
4062
4276
|
return Math.round(e * 1e3) / 1e3;
|
|
4063
4277
|
}
|
|
4064
|
-
const
|
|
4278
|
+
const findParentElement = (e, t, n = !0) => {
|
|
4065
4279
|
if (!(e instanceof HTMLElement))
|
|
4066
4280
|
return null;
|
|
4067
4281
|
let o = n ? e : e.parentElement;
|
|
@@ -4072,35 +4286,35 @@ const Zr = (e, t, n = !0) => {
|
|
|
4072
4286
|
return o;
|
|
4073
4287
|
} while (o = o.parentElement);
|
|
4074
4288
|
return null;
|
|
4075
|
-
},
|
|
4289
|
+
}, findBuilderParent = (e) => findParentElement(e, (t) => {
|
|
4076
4290
|
const n = t.getAttribute("builder-id") || t.id;
|
|
4077
4291
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
4078
|
-
}),
|
|
4292
|
+
}), computeOffset = ({
|
|
4079
4293
|
event: e,
|
|
4080
4294
|
target: t
|
|
4081
4295
|
}) => {
|
|
4082
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, i =
|
|
4296
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, i = round(o / n.width), s = round(r / n.height);
|
|
4083
4297
|
return {
|
|
4084
4298
|
x: i,
|
|
4085
4299
|
y: s
|
|
4086
4300
|
};
|
|
4087
|
-
},
|
|
4088
|
-
const t = e.target, n = t &&
|
|
4301
|
+
}, getInteractionPropertiesForEvent = (e) => {
|
|
4302
|
+
const t = e.target, n = t && findBuilderParent(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
4089
4303
|
return {
|
|
4090
4304
|
targetBuilderElement: o || void 0,
|
|
4091
4305
|
metadata: {
|
|
4092
|
-
targetOffset: t ?
|
|
4306
|
+
targetOffset: t ? computeOffset({
|
|
4093
4307
|
event: e,
|
|
4094
4308
|
target: t
|
|
4095
4309
|
}) : void 0,
|
|
4096
|
-
builderTargetOffset: n ?
|
|
4310
|
+
builderTargetOffset: n ? computeOffset({
|
|
4097
4311
|
event: e,
|
|
4098
4312
|
target: n
|
|
4099
4313
|
}) : void 0,
|
|
4100
4314
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
4101
4315
|
}
|
|
4102
4316
|
};
|
|
4103
|
-
},
|
|
4317
|
+
}, getCssFromFont = (e) => {
|
|
4104
4318
|
var i;
|
|
4105
4319
|
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);
|
|
4106
4320
|
let r = "";
|
|
@@ -4126,15 +4340,15 @@ font-weight: ${s};
|
|
|
4126
4340
|
`.trim());
|
|
4127
4341
|
}
|
|
4128
4342
|
return r;
|
|
4129
|
-
},
|
|
4343
|
+
}, getFontCss = ({
|
|
4130
4344
|
customFonts: e
|
|
4131
4345
|
}) => {
|
|
4132
4346
|
var t;
|
|
4133
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
4134
|
-
},
|
|
4347
|
+
return ((t = e == null ? void 0 : e.map((n) => getCssFromFont(n))) == null ? void 0 : t.join(" ")) || "";
|
|
4348
|
+
}, getCss = ({
|
|
4135
4349
|
cssCode: e,
|
|
4136
4350
|
contentId: t
|
|
4137
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
4351
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", DEFAULT_STYLES = `
|
|
4138
4352
|
.builder-button {
|
|
4139
4353
|
all: unset;
|
|
4140
4354
|
}
|
|
@@ -4151,9 +4365,9 @@ font-weight: ${s};
|
|
|
4151
4365
|
text-align: inherit;
|
|
4152
4366
|
font-family: inherit;
|
|
4153
4367
|
}
|
|
4154
|
-
`,
|
|
4368
|
+
`, getDefaultStyles = (e) => e ? "" : DEFAULT_STYLES, getWrapperClassName = (e) => `variant-${e}`, _sfc_main$4 = defineComponent({
|
|
4155
4369
|
name: "enable-editor",
|
|
4156
|
-
components: { DynamicDiv
|
|
4370
|
+
components: { DynamicDiv },
|
|
4157
4371
|
props: [
|
|
4158
4372
|
"builderContextSignal",
|
|
4159
4373
|
"canTrack",
|
|
@@ -4175,25 +4389,25 @@ font-weight: ${s};
|
|
|
4175
4389
|
httpReqsData: {},
|
|
4176
4390
|
httpReqsPending: {},
|
|
4177
4391
|
clicked: !1,
|
|
4178
|
-
builderContext:
|
|
4179
|
-
getWrapperClassName
|
|
4392
|
+
builderContext: BuilderContext,
|
|
4393
|
+
getWrapperClassName
|
|
4180
4394
|
};
|
|
4181
4395
|
},
|
|
4182
4396
|
provide() {
|
|
4183
4397
|
const e = this;
|
|
4184
4398
|
return {
|
|
4185
|
-
[
|
|
4399
|
+
[BuilderContext.key]: e.builderContextSignal
|
|
4186
4400
|
};
|
|
4187
4401
|
},
|
|
4188
4402
|
mounted() {
|
|
4189
4403
|
(() => {
|
|
4190
4404
|
var n, o;
|
|
4191
|
-
if (
|
|
4192
|
-
if (
|
|
4405
|
+
if (isBrowser()) {
|
|
4406
|
+
if (isEditing() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
4193
4407
|
new CustomEvent("initeditingbldr")
|
|
4194
|
-
), this.builderContextSignal.content &&
|
|
4408
|
+
), this.builderContextSignal.content && getDefaultCanTrack(this.canTrack)) {
|
|
4195
4409
|
const i = (n = this.builderContextSignal.content) == null ? void 0 : n.testVariationId, s = (o = this.builderContextSignal.content) == null ? void 0 : o.id, l = this.apiKey;
|
|
4196
|
-
|
|
4410
|
+
_track({
|
|
4197
4411
|
type: "impression",
|
|
4198
4412
|
canTrack: !0,
|
|
4199
4413
|
contentId: s,
|
|
@@ -4201,12 +4415,12 @@ font-weight: ${s};
|
|
|
4201
4415
|
variationId: i !== s ? i : void 0
|
|
4202
4416
|
});
|
|
4203
4417
|
}
|
|
4204
|
-
|
|
4418
|
+
isPreviewing() && !isEditing() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
4205
4419
|
new CustomEvent("initpreviewingbldr")
|
|
4206
4420
|
);
|
|
4207
4421
|
}
|
|
4208
4422
|
})(), (() => {
|
|
4209
|
-
this.apiKey ||
|
|
4423
|
+
this.apiKey || logger.error(
|
|
4210
4424
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
4211
4425
|
), this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
|
|
4212
4426
|
})();
|
|
@@ -4252,7 +4466,7 @@ font-weight: ${s};
|
|
|
4252
4466
|
}
|
|
4253
4467
|
},
|
|
4254
4468
|
unmounted() {
|
|
4255
|
-
|
|
4469
|
+
isBrowser() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
|
|
4256
4470
|
"builder:component:stateChangeListenerActivated",
|
|
4257
4471
|
this.emitStateUpdate
|
|
4258
4472
|
));
|
|
@@ -4324,7 +4538,7 @@ font-weight: ${s};
|
|
|
4324
4538
|
this.builderContextSignal.content = t;
|
|
4325
4539
|
},
|
|
4326
4540
|
processMessage(e) {
|
|
4327
|
-
return
|
|
4541
|
+
return createEditorListener({
|
|
4328
4542
|
model: this.model,
|
|
4329
4543
|
trustedHosts: this.trustedHosts,
|
|
4330
4544
|
callbacks: {
|
|
@@ -4338,7 +4552,7 @@ font-weight: ${s};
|
|
|
4338
4552
|
});
|
|
4339
4553
|
},
|
|
4340
4554
|
animation: (t) => {
|
|
4341
|
-
|
|
4555
|
+
triggerAnimation(t);
|
|
4342
4556
|
},
|
|
4343
4557
|
contentUpdate: (t) => {
|
|
4344
4558
|
this.mergeNewContent(t);
|
|
@@ -4349,7 +4563,7 @@ font-weight: ${s};
|
|
|
4349
4563
|
evaluateJsCode() {
|
|
4350
4564
|
var t, n;
|
|
4351
4565
|
const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
|
|
4352
|
-
e &&
|
|
4566
|
+
e && evaluate({
|
|
4353
4567
|
code: e,
|
|
4354
4568
|
context: this.context || {},
|
|
4355
4569
|
localState: void 0,
|
|
@@ -4365,13 +4579,13 @@ font-weight: ${s};
|
|
|
4365
4579
|
var t, n;
|
|
4366
4580
|
if (this.builderContextSignal.content) {
|
|
4367
4581
|
const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, r = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
|
|
4368
|
-
|
|
4582
|
+
_track({
|
|
4369
4583
|
type: "click",
|
|
4370
|
-
canTrack:
|
|
4584
|
+
canTrack: getDefaultCanTrack(this.canTrack),
|
|
4371
4585
|
contentId: r,
|
|
4372
4586
|
apiKey: this.apiKey,
|
|
4373
4587
|
variationId: o !== r ? o : void 0,
|
|
4374
|
-
...
|
|
4588
|
+
...getInteractionPropertiesForEvent(e),
|
|
4375
4589
|
unique: !this.clicked
|
|
4376
4590
|
});
|
|
4377
4591
|
}
|
|
@@ -4381,13 +4595,13 @@ font-weight: ${s};
|
|
|
4381
4595
|
var t, n;
|
|
4382
4596
|
const e = ((n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) ?? {};
|
|
4383
4597
|
Object.entries(e).forEach(([o, r]) => {
|
|
4384
|
-
if (!r || this.httpReqsPending[o] || this.httpReqsData[o] && !
|
|
4598
|
+
if (!r || this.httpReqsPending[o] || this.httpReqsData[o] && !isEditing())
|
|
4385
4599
|
return;
|
|
4386
4600
|
this.httpReqsPending[o] = !0;
|
|
4387
4601
|
const i = r.replace(
|
|
4388
4602
|
/{{([^}]+)}}/g,
|
|
4389
4603
|
(s, l) => String(
|
|
4390
|
-
|
|
4604
|
+
evaluate({
|
|
4391
4605
|
code: l,
|
|
4392
4606
|
context: this.context || {},
|
|
4393
4607
|
localState: void 0,
|
|
@@ -4397,7 +4611,7 @@ font-weight: ${s};
|
|
|
4397
4611
|
})
|
|
4398
4612
|
)
|
|
4399
4613
|
);
|
|
4400
|
-
|
|
4614
|
+
fetch$1(i).then((s) => s.json()).then((s) => {
|
|
4401
4615
|
this.mergeNewRootState({
|
|
4402
4616
|
[o]: s
|
|
4403
4617
|
}), this.httpReqsData[o] = !0;
|
|
@@ -4409,12 +4623,12 @@ font-weight: ${s};
|
|
|
4409
4623
|
});
|
|
4410
4624
|
},
|
|
4411
4625
|
emitStateUpdate() {
|
|
4412
|
-
|
|
4626
|
+
isEditing() && window.dispatchEvent(
|
|
4413
4627
|
new CustomEvent(
|
|
4414
4628
|
"builder:component:stateChange",
|
|
4415
4629
|
{
|
|
4416
4630
|
detail: {
|
|
4417
|
-
state:
|
|
4631
|
+
state: fastClone(this.builderContextSignal.rootState),
|
|
4418
4632
|
ref: {
|
|
4419
4633
|
name: this.model
|
|
4420
4634
|
}
|
|
@@ -4424,7 +4638,7 @@ font-weight: ${s};
|
|
|
4424
4638
|
);
|
|
4425
4639
|
},
|
|
4426
4640
|
elementRef_onIniteditingbldr(e) {
|
|
4427
|
-
window.addEventListener("message", this.processMessage),
|
|
4641
|
+
window.addEventListener("message", this.processMessage), registerInsertMenu(), setupBrowserForEditing({
|
|
4428
4642
|
...this.locale ? {
|
|
4429
4643
|
locale: this.locale
|
|
4430
4644
|
} : {},
|
|
@@ -4438,7 +4652,7 @@ font-weight: ${s};
|
|
|
4438
4652
|
this.builderContextSignal.componentInfos
|
|
4439
4653
|
).forEach((t) => {
|
|
4440
4654
|
var o;
|
|
4441
|
-
const n =
|
|
4655
|
+
const n = createRegisterComponentMessage(t);
|
|
4442
4656
|
(o = window.parent) == null || o.postMessage(n, "*");
|
|
4443
4657
|
}), window.addEventListener(
|
|
4444
4658
|
"builder:component:stateChangeListenerActivated",
|
|
@@ -4449,7 +4663,7 @@ font-weight: ${s};
|
|
|
4449
4663
|
const t = new URL(location.href).searchParams, n = t.get("builder.preview"), o = t.get(
|
|
4450
4664
|
`builder.overrides.${n}`
|
|
4451
4665
|
), r = t.get("apiKey") || t.get("builder.space");
|
|
4452
|
-
n === this.model && r === this.apiKey && (!this.content || o === this.content.id) &&
|
|
4666
|
+
n === this.model && r === this.apiKey && (!this.content || o === this.content.id) && fetchOneEntry({
|
|
4453
4667
|
model: this.model,
|
|
4454
4668
|
apiKey: this.apiKey,
|
|
4455
4669
|
apiVersion: this.builderContextSignal.apiVersion
|
|
@@ -4459,52 +4673,52 @@ font-weight: ${s};
|
|
|
4459
4673
|
}
|
|
4460
4674
|
}
|
|
4461
4675
|
});
|
|
4462
|
-
function
|
|
4676
|
+
function _sfc_render$4(e, t, n, o, r, i) {
|
|
4463
4677
|
var s, l, a;
|
|
4464
|
-
return e.builderContextSignal.content ? (
|
|
4678
|
+
return e.builderContextSignal.content ? (openBlock(), createBlock(resolveDynamicComponent(e.ContentWrapper), mergeProps({
|
|
4465
4679
|
key: 0,
|
|
4466
4680
|
ref: "elementRef",
|
|
4467
|
-
onClick: (
|
|
4681
|
+
onClick: (d) => e.onClick(d),
|
|
4468
4682
|
"builder-content-id": (s = e.builderContextSignal.content) == null ? void 0 : s.id,
|
|
4469
4683
|
"builder-model": e.model,
|
|
4470
4684
|
class: e.getWrapperClassName(((l = e.content) == null ? void 0 : l.testVariationId) || ((a = e.content) == null ? void 0 : a.id)),
|
|
4471
|
-
onIniteditingbldr: (
|
|
4472
|
-
onInitpreviewingbldr: (
|
|
4685
|
+
onIniteditingbldr: (d) => e.elementRef_onIniteditingbldr(d),
|
|
4686
|
+
onInitpreviewingbldr: (d) => e.elementRef_onInitpreviewingbldr(d)
|
|
4473
4687
|
}, { ...e.showContentProps, ...e.contentWrapperProps }), {
|
|
4474
|
-
default:
|
|
4475
|
-
|
|
4688
|
+
default: withCtx(() => [
|
|
4689
|
+
renderSlot(e.$slots, "default")
|
|
4476
4690
|
]),
|
|
4477
4691
|
_: 3
|
|
4478
|
-
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) :
|
|
4692
|
+
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : createCommentVNode("", !0);
|
|
4479
4693
|
}
|
|
4480
|
-
const
|
|
4694
|
+
const EnableEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]), _sfc_main$3 = defineComponent({
|
|
4481
4695
|
name: "content-styles",
|
|
4482
|
-
components: { InlinedStyles:
|
|
4696
|
+
components: { InlinedStyles: _sfc_main$n },
|
|
4483
4697
|
props: ["cssCode", "contentId", "customFonts", "isNestedRender", "nonce"],
|
|
4484
4698
|
data() {
|
|
4485
4699
|
return {
|
|
4486
4700
|
injectedStyles: `
|
|
4487
|
-
${
|
|
4701
|
+
${getCss({
|
|
4488
4702
|
cssCode: this.cssCode,
|
|
4489
4703
|
contentId: this.contentId
|
|
4490
4704
|
})}
|
|
4491
|
-
${
|
|
4705
|
+
${getFontCss({
|
|
4492
4706
|
customFonts: this.customFonts
|
|
4493
4707
|
})}
|
|
4494
|
-
${
|
|
4708
|
+
${getDefaultStyles(this.isNestedRender)}
|
|
4495
4709
|
`.trim()
|
|
4496
4710
|
};
|
|
4497
4711
|
}
|
|
4498
4712
|
});
|
|
4499
|
-
function
|
|
4500
|
-
const s =
|
|
4501
|
-
return
|
|
4713
|
+
function _sfc_render$3(e, t, n, o, r, i) {
|
|
4714
|
+
const s = resolveComponent("InlinedStyles");
|
|
4715
|
+
return openBlock(), createBlock(s, {
|
|
4502
4716
|
id: "builderio-content",
|
|
4503
4717
|
styles: e.injectedStyles,
|
|
4504
4718
|
nonce: e.nonce
|
|
4505
4719
|
}, null, 8, ["styles", "nonce"]);
|
|
4506
4720
|
}
|
|
4507
|
-
const
|
|
4721
|
+
const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]), getRootStateInitialValue = ({
|
|
4508
4722
|
content: e,
|
|
4509
4723
|
data: t,
|
|
4510
4724
|
locale: n
|
|
@@ -4521,7 +4735,7 @@ const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
|
|
|
4521
4735
|
locale: n
|
|
4522
4736
|
} : {}
|
|
4523
4737
|
};
|
|
4524
|
-
},
|
|
4738
|
+
}, getContentInitialValue = ({
|
|
4525
4739
|
content: e,
|
|
4526
4740
|
data: t
|
|
4527
4741
|
}) => e ? {
|
|
@@ -4531,14 +4745,14 @@ const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
|
|
|
4531
4745
|
...t
|
|
4532
4746
|
},
|
|
4533
4747
|
meta: e == null ? void 0 : e.meta
|
|
4534
|
-
} : void 0,
|
|
4748
|
+
} : void 0, wrapComponentRef = markRaw, _sfc_main$2 = defineComponent({
|
|
4535
4749
|
name: "content-component",
|
|
4536
4750
|
components: {
|
|
4537
|
-
EnableEditor
|
|
4538
|
-
InlinedScript:
|
|
4539
|
-
ContentStyles
|
|
4540
|
-
Blocks
|
|
4541
|
-
DynamicDiv
|
|
4751
|
+
EnableEditor,
|
|
4752
|
+
InlinedScript: _sfc_main$5,
|
|
4753
|
+
ContentStyles,
|
|
4754
|
+
Blocks,
|
|
4755
|
+
DynamicDiv
|
|
4542
4756
|
},
|
|
4543
4757
|
props: [
|
|
4544
4758
|
"content",
|
|
@@ -4565,32 +4779,32 @@ const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
|
|
|
4565
4779
|
data() {
|
|
4566
4780
|
var e, t, n, o;
|
|
4567
4781
|
return {
|
|
4568
|
-
scriptStr:
|
|
4782
|
+
scriptStr: getUpdateVariantVisibilityScript({
|
|
4569
4783
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
4570
4784
|
variationId: (e = this.content) == null ? void 0 : e.testVariationId,
|
|
4571
4785
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
4572
4786
|
contentId: (t = this.content) == null ? void 0 : t.id
|
|
4573
4787
|
}),
|
|
4574
4788
|
registeredComponents: [
|
|
4575
|
-
...
|
|
4789
|
+
...getDefaultRegisteredComponents(),
|
|
4576
4790
|
...((n = this.customComponents) == null ? void 0 : n.filter(({ models: r }) => !(r != null && r.length) || !this.model ? !0 : r.includes(this.model))) || []
|
|
4577
4791
|
].reduce(
|
|
4578
4792
|
(r, { component: i, ...s }) => ({
|
|
4579
4793
|
...r,
|
|
4580
4794
|
[s.name]: {
|
|
4581
|
-
component:
|
|
4582
|
-
...
|
|
4795
|
+
component: wrapComponentRef(i),
|
|
4796
|
+
...serializeIncludingFunctions(s)
|
|
4583
4797
|
}
|
|
4584
4798
|
}),
|
|
4585
4799
|
{}
|
|
4586
4800
|
),
|
|
4587
4801
|
builderContextSignal: {
|
|
4588
|
-
content:
|
|
4802
|
+
content: getContentInitialValue({
|
|
4589
4803
|
content: this.content,
|
|
4590
4804
|
data: this.data
|
|
4591
4805
|
}),
|
|
4592
4806
|
localState: void 0,
|
|
4593
|
-
rootState:
|
|
4807
|
+
rootState: getRootStateInitialValue({
|
|
4594
4808
|
content: this.content,
|
|
4595
4809
|
data: this.data,
|
|
4596
4810
|
locale: this.locale
|
|
@@ -4601,12 +4815,12 @@ const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
|
|
|
4601
4815
|
apiKey: this.apiKey,
|
|
4602
4816
|
apiVersion: this.apiVersion,
|
|
4603
4817
|
componentInfos: [
|
|
4604
|
-
...
|
|
4818
|
+
...getDefaultRegisteredComponents(),
|
|
4605
4819
|
...((o = this.customComponents) == null ? void 0 : o.filter(({ models: r }) => !(r != null && r.length) || !this.model ? !0 : r.includes(this.model))) || []
|
|
4606
4820
|
].reduce(
|
|
4607
4821
|
(r, { component: i, ...s }) => ({
|
|
4608
4822
|
...r,
|
|
4609
|
-
[s.name]:
|
|
4823
|
+
[s.name]: serializeIncludingFunctions(s)
|
|
4610
4824
|
}),
|
|
4611
4825
|
{}
|
|
4612
4826
|
),
|
|
@@ -4615,13 +4829,13 @@ const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
|
|
|
4615
4829
|
BlocksWrapperProps: this.blocksWrapperProps || {},
|
|
4616
4830
|
nonce: this.nonce || ""
|
|
4617
4831
|
},
|
|
4618
|
-
TARGET
|
|
4832
|
+
TARGET
|
|
4619
4833
|
};
|
|
4620
4834
|
},
|
|
4621
4835
|
provide() {
|
|
4622
4836
|
const e = this;
|
|
4623
4837
|
return {
|
|
4624
|
-
[
|
|
4838
|
+
[ComponentsContext.key]: {
|
|
4625
4839
|
registeredComponents: e.registeredComponents
|
|
4626
4840
|
}
|
|
4627
4841
|
};
|
|
@@ -4632,9 +4846,9 @@ const pi = /* @__PURE__ */ b(di, [["render", ui]]), mi = ({
|
|
|
4632
4846
|
}
|
|
4633
4847
|
}
|
|
4634
4848
|
});
|
|
4635
|
-
function
|
|
4636
|
-
const s =
|
|
4637
|
-
return
|
|
4849
|
+
function _sfc_render$2(e, t, n, o, r, i) {
|
|
4850
|
+
const s = resolveComponent("InlinedScript"), l = resolveComponent("ContentStyles"), a = resolveComponent("Blocks"), d = resolveComponent("EnableEditor");
|
|
4851
|
+
return openBlock(), createBlock(d, mergeProps({
|
|
4638
4852
|
nonce: e.nonce,
|
|
4639
4853
|
content: e.content,
|
|
4640
4854
|
data: e.data,
|
|
@@ -4650,25 +4864,25 @@ function gi(e, t, n, o, r, i) {
|
|
|
4650
4864
|
contentWrapperProps: e.contentWrapperProps,
|
|
4651
4865
|
trustedHosts: e.trustedHosts
|
|
4652
4866
|
}, {}), {
|
|
4653
|
-
default:
|
|
4654
|
-
var
|
|
4867
|
+
default: withCtx(() => {
|
|
4868
|
+
var p, c, u, f, m, b, C;
|
|
4655
4869
|
return [
|
|
4656
|
-
e.isSsrAbTest ? (
|
|
4870
|
+
e.isSsrAbTest ? (openBlock(), createBlock(s, {
|
|
4657
4871
|
key: 0,
|
|
4658
4872
|
id: "builderio-variant-visibility",
|
|
4659
4873
|
scriptStr: e.scriptStr,
|
|
4660
4874
|
nonce: e.nonce || ""
|
|
4661
|
-
}, null, 8, ["scriptStr", "nonce"])) :
|
|
4662
|
-
e.TARGET !== "reactNative" ? (
|
|
4875
|
+
}, null, 8, ["scriptStr", "nonce"])) : createCommentVNode("", !0),
|
|
4876
|
+
e.TARGET !== "reactNative" ? (openBlock(), createBlock(l, {
|
|
4663
4877
|
key: 1,
|
|
4664
4878
|
nonce: e.nonce || "",
|
|
4665
4879
|
isNestedRender: e.isNestedRender,
|
|
4666
|
-
contentId: (
|
|
4667
|
-
cssCode: (
|
|
4668
|
-
customFonts: (
|
|
4669
|
-
}, null, 8, ["nonce", "isNestedRender", "contentId", "cssCode", "customFonts"])) :
|
|
4670
|
-
|
|
4671
|
-
blocks: (
|
|
4880
|
+
contentId: (p = e.builderContextSignal.content) == null ? void 0 : p.id,
|
|
4881
|
+
cssCode: (u = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : u.cssCode,
|
|
4882
|
+
customFonts: (m = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : m.customFonts
|
|
4883
|
+
}, null, 8, ["nonce", "isNestedRender", "contentId", "cssCode", "customFonts"])) : createCommentVNode("", !0),
|
|
4884
|
+
createVNode(a, {
|
|
4885
|
+
blocks: (C = (b = e.builderContextSignal.content) == null ? void 0 : b.data) == null ? void 0 : C.blocks,
|
|
4672
4886
|
context: e.builderContextSignal,
|
|
4673
4887
|
registeredComponents: e.registeredComponents,
|
|
4674
4888
|
linkComponent: e.linkComponent
|
|
@@ -4678,12 +4892,12 @@ function gi(e, t, n, o, r, i) {
|
|
|
4678
4892
|
_: 1
|
|
4679
4893
|
}, 16, ["nonce", "content", "data", "model", "context", "apiKey", "canTrack", "locale", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps", "trustedHosts"]);
|
|
4680
4894
|
}
|
|
4681
|
-
const
|
|
4895
|
+
const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]), _sfc_main$1 = defineComponent({
|
|
4682
4896
|
name: "content-variants",
|
|
4683
4897
|
components: {
|
|
4684
|
-
InlinedScript:
|
|
4685
|
-
InlinedStyles:
|
|
4686
|
-
ContentComponent
|
|
4898
|
+
InlinedScript: _sfc_main$5,
|
|
4899
|
+
InlinedStyles: _sfc_main$n,
|
|
4900
|
+
ContentComponent
|
|
4687
4901
|
},
|
|
4688
4902
|
props: [
|
|
4689
4903
|
"canTrack",
|
|
@@ -4707,13 +4921,13 @@ const yi = /* @__PURE__ */ b(bi, [["render", gi]]), ki = f({
|
|
|
4707
4921
|
],
|
|
4708
4922
|
data() {
|
|
4709
4923
|
return {
|
|
4710
|
-
shouldRenderVariants:
|
|
4711
|
-
canTrack:
|
|
4924
|
+
shouldRenderVariants: checkShouldRenderVariants({
|
|
4925
|
+
canTrack: getDefaultCanTrack(this.canTrack),
|
|
4712
4926
|
content: this.content
|
|
4713
4927
|
}),
|
|
4714
|
-
TARGET
|
|
4715
|
-
getInitVariantsFnsScriptString
|
|
4716
|
-
getVariants
|
|
4928
|
+
TARGET,
|
|
4929
|
+
getInitVariantsFnsScriptString,
|
|
4930
|
+
getVariants
|
|
4717
4931
|
};
|
|
4718
4932
|
},
|
|
4719
4933
|
mounted() {
|
|
@@ -4721,8 +4935,8 @@ const yi = /* @__PURE__ */ b(bi, [["render", gi]]), ki = f({
|
|
|
4721
4935
|
computed: {
|
|
4722
4936
|
updateCookieAndStylesScriptStr() {
|
|
4723
4937
|
var e;
|
|
4724
|
-
return
|
|
4725
|
-
|
|
4938
|
+
return getUpdateCookieAndStylesScript(
|
|
4939
|
+
getVariants(this.content).map((t) => ({
|
|
4726
4940
|
id: t.testVariationId,
|
|
4727
4941
|
testRatio: t.testRatio
|
|
4728
4942
|
})),
|
|
@@ -4730,45 +4944,45 @@ const yi = /* @__PURE__ */ b(bi, [["render", gi]]), ki = f({
|
|
|
4730
4944
|
);
|
|
4731
4945
|
},
|
|
4732
4946
|
hideVariantsStyleString() {
|
|
4733
|
-
return
|
|
4947
|
+
return getVariants(this.content).map((e) => `.variant-${e.testVariationId} { display: none; } `).join("");
|
|
4734
4948
|
},
|
|
4735
4949
|
defaultContent() {
|
|
4736
4950
|
var e;
|
|
4737
4951
|
return this.shouldRenderVariants ? {
|
|
4738
4952
|
...this.content,
|
|
4739
4953
|
testVariationId: (e = this.content) == null ? void 0 : e.id
|
|
4740
|
-
} :
|
|
4954
|
+
} : handleABTestingSync({
|
|
4741
4955
|
item: this.content,
|
|
4742
|
-
canTrack:
|
|
4956
|
+
canTrack: getDefaultCanTrack(this.canTrack)
|
|
4743
4957
|
});
|
|
4744
4958
|
}
|
|
4745
4959
|
}
|
|
4746
4960
|
});
|
|
4747
|
-
function
|
|
4748
|
-
const s =
|
|
4749
|
-
return
|
|
4750
|
-
!e.isNestedRender && e.TARGET !== "reactNative" ? (
|
|
4961
|
+
function _sfc_render$1(e, t, n, o, r, i) {
|
|
4962
|
+
const s = resolveComponent("InlinedScript"), l = resolveComponent("InlinedStyles"), a = resolveComponent("ContentComponent");
|
|
4963
|
+
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
4964
|
+
!e.isNestedRender && e.TARGET !== "reactNative" ? (openBlock(), createBlock(s, {
|
|
4751
4965
|
key: 0,
|
|
4752
4966
|
id: "builderio-init-variants-fns",
|
|
4753
4967
|
scriptStr: e.getInitVariantsFnsScriptString(),
|
|
4754
4968
|
nonce: e.nonce || ""
|
|
4755
|
-
}, null, 8, ["scriptStr", "nonce"])) :
|
|
4756
|
-
e.shouldRenderVariants ? (
|
|
4757
|
-
|
|
4969
|
+
}, null, 8, ["scriptStr", "nonce"])) : createCommentVNode("", !0),
|
|
4970
|
+
e.shouldRenderVariants ? (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
|
|
4971
|
+
createVNode(l, {
|
|
4758
4972
|
id: "builderio-variants",
|
|
4759
4973
|
styles: e.hideVariantsStyleString,
|
|
4760
4974
|
nonce: e.nonce || ""
|
|
4761
4975
|
}, null, 8, ["styles", "nonce"]),
|
|
4762
|
-
|
|
4976
|
+
createVNode(s, {
|
|
4763
4977
|
id: "builderio-variants-visibility",
|
|
4764
4978
|
scriptStr: e.updateCookieAndStylesScriptStr,
|
|
4765
4979
|
nonce: e.nonce || ""
|
|
4766
4980
|
}, null, 8, ["scriptStr", "nonce"]),
|
|
4767
|
-
(
|
|
4768
|
-
key:
|
|
4981
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (d, p) => (openBlock(), createBlock(a, mergeProps({
|
|
4982
|
+
key: d.testVariationId,
|
|
4769
4983
|
isNestedRender: e.isNestedRender,
|
|
4770
4984
|
nonce: e.nonce,
|
|
4771
|
-
content:
|
|
4985
|
+
content: d,
|
|
4772
4986
|
showContent: !1,
|
|
4773
4987
|
model: e.model,
|
|
4774
4988
|
data: e.data,
|
|
@@ -4787,8 +5001,8 @@ function vi(e, t, n, o, r, i) {
|
|
|
4787
5001
|
contentWrapperProps: e.contentWrapperProps,
|
|
4788
5002
|
trustedHosts: e.trustedHosts
|
|
4789
5003
|
}, {}), null, 16, ["isNestedRender", "nonce", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"]))), 128))
|
|
4790
|
-
], 64)) :
|
|
4791
|
-
|
|
5004
|
+
], 64)) : createCommentVNode("", !0),
|
|
5005
|
+
createVNode(a, mergeProps({
|
|
4792
5006
|
nonce: e.nonce,
|
|
4793
5007
|
isNestedRender: e.isNestedRender,
|
|
4794
5008
|
content: e.defaultContent,
|
|
@@ -4814,13 +5028,13 @@ function vi(e, t, n, o, r, i) {
|
|
|
4814
5028
|
}), null, 16, ["nonce", "isNestedRender", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
|
|
4815
5029
|
], 64);
|
|
4816
5030
|
}
|
|
4817
|
-
const
|
|
5031
|
+
const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]), fetchSymbolContent = async ({
|
|
4818
5032
|
builderContextValue: e,
|
|
4819
5033
|
symbol: t
|
|
4820
5034
|
}) => {
|
|
4821
5035
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
4822
5036
|
(e != null && e.apiKey))
|
|
4823
|
-
return
|
|
5037
|
+
return fetchOneEntry({
|
|
4824
5038
|
model: t.model,
|
|
4825
5039
|
apiKey: e.apiKey,
|
|
4826
5040
|
apiVersion: e.apiVersion,
|
|
@@ -4830,11 +5044,11 @@ const Ci = /* @__PURE__ */ b(ki, [["render", vi]]), Si = async ({
|
|
|
4830
5044
|
}
|
|
4831
5045
|
}
|
|
4832
5046
|
}).catch((n) => {
|
|
4833
|
-
|
|
5047
|
+
logger.error("Could not fetch symbol content: ", n);
|
|
4834
5048
|
});
|
|
4835
|
-
},
|
|
5049
|
+
}, _sfc_main = defineComponent({
|
|
4836
5050
|
name: "builder-symbol",
|
|
4837
|
-
components: { ContentVariants
|
|
5051
|
+
components: { ContentVariants, DynamicDiv },
|
|
4838
5052
|
props: [
|
|
4839
5053
|
"symbol",
|
|
4840
5054
|
"attributes",
|
|
@@ -4846,7 +5060,7 @@ const Ci = /* @__PURE__ */ b(ki, [["render", vi]]), Si = async ({
|
|
|
4846
5060
|
],
|
|
4847
5061
|
data() {
|
|
4848
5062
|
var e;
|
|
4849
|
-
return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs
|
|
5063
|
+
return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs };
|
|
4850
5064
|
},
|
|
4851
5065
|
mounted() {
|
|
4852
5066
|
this.setContent();
|
|
@@ -4869,7 +5083,7 @@ const Ci = /* @__PURE__ */ b(ki, [["render", vi]]), Si = async ({
|
|
|
4869
5083
|
className() {
|
|
4870
5084
|
var e, t;
|
|
4871
5085
|
return [
|
|
4872
|
-
this.attributes[
|
|
5086
|
+
this.attributes[getClassPropName()],
|
|
4873
5087
|
"builder-symbol",
|
|
4874
5088
|
(e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
|
|
4875
5089
|
(t = this.symbol) != null && t.dynamic || this.dynamic ? "builder-dynamic-symbol" : void 0
|
|
@@ -4883,7 +5097,7 @@ const Ci = /* @__PURE__ */ b(ki, [["render", vi]]), Si = async ({
|
|
|
4883
5097
|
},
|
|
4884
5098
|
methods: {
|
|
4885
5099
|
setContent() {
|
|
4886
|
-
this.contentToUse ||
|
|
5100
|
+
this.contentToUse || fetchSymbolContent({
|
|
4887
5101
|
symbol: this.symbol,
|
|
4888
5102
|
builderContextValue: this.builderContext
|
|
4889
5103
|
}).then((e) => {
|
|
@@ -4892,11 +5106,11 @@ const Ci = /* @__PURE__ */ b(ki, [["render", vi]]), Si = async ({
|
|
|
4892
5106
|
}
|
|
4893
5107
|
}
|
|
4894
5108
|
});
|
|
4895
|
-
function
|
|
4896
|
-
var l, a,
|
|
4897
|
-
const s =
|
|
4898
|
-
return
|
|
4899
|
-
|
|
5109
|
+
function _sfc_render(e, t, n, o, r, i) {
|
|
5110
|
+
var l, a, d, p, c;
|
|
5111
|
+
const s = resolveComponent("ContentVariants");
|
|
5112
|
+
return openBlock(), createElementBlock("div", mergeProps({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
5113
|
+
createVNode(s, {
|
|
4900
5114
|
nonce: e.builderContext.nonce,
|
|
4901
5115
|
isNestedRender: !0,
|
|
4902
5116
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -4909,10 +5123,10 @@ function wi(e, t, n, o, r, i) {
|
|
|
4909
5123
|
data: {
|
|
4910
5124
|
...(a = e.symbol) == null ? void 0 : a.data,
|
|
4911
5125
|
...e.builderContext.localState,
|
|
4912
|
-
...(
|
|
5126
|
+
...(p = (d = e.contentToUse) == null ? void 0 : d.data) == null ? void 0 : p.state
|
|
4913
5127
|
},
|
|
4914
5128
|
canTrack: e.builderContext.canTrack,
|
|
4915
|
-
model: (
|
|
5129
|
+
model: (c = e.symbol) == null ? void 0 : c.model,
|
|
4916
5130
|
content: e.contentToUse,
|
|
4917
5131
|
linkComponent: e.builderLinkComponent,
|
|
4918
5132
|
blocksWrapper: e.blocksWrapper,
|
|
@@ -4920,42 +5134,44 @@ function wi(e, t, n, o, r, i) {
|
|
|
4920
5134
|
}, null, 8, ["nonce", "apiVersion", "apiKey", "context", "customComponents", "data", "canTrack", "model", "content", "linkComponent", "blocksWrapper", "contentWrapper"])
|
|
4921
5135
|
], 16);
|
|
4922
5136
|
}
|
|
4923
|
-
const
|
|
5137
|
+
const Symbol$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
4924
5138
|
export {
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
5139
|
+
fetchEntries as A,
|
|
5140
|
+
Block as B,
|
|
5141
|
+
Columns as C,
|
|
5142
|
+
fetchOneEntry as D,
|
|
5143
|
+
dynamicRenderer as E,
|
|
5144
|
+
Fragment as F,
|
|
5145
|
+
block as G,
|
|
5146
|
+
Image as I,
|
|
5147
|
+
Section as S,
|
|
5148
|
+
TARGET as T,
|
|
5149
|
+
Video as V,
|
|
5150
|
+
_sfc_main$n as _,
|
|
5151
|
+
createCssClass as a,
|
|
5152
|
+
getMaxWidthQueryForSize as b,
|
|
5153
|
+
checkIsDefined as c,
|
|
5154
|
+
camelToKebabCase as d,
|
|
5155
|
+
_export_sfc as e,
|
|
5156
|
+
evaluate as f,
|
|
5157
|
+
getSizesForBreakpoints as g,
|
|
5158
|
+
getStyle as h,
|
|
5159
|
+
getClassPropName as i,
|
|
5160
|
+
BuilderContext as j,
|
|
5161
|
+
Button as k,
|
|
5162
|
+
Symbol$1 as l,
|
|
5163
|
+
Text as m,
|
|
5164
|
+
Blocks as n,
|
|
5165
|
+
ContentVariants as o,
|
|
5166
|
+
isEditing as p,
|
|
5167
|
+
isPreviewing as q,
|
|
5168
|
+
createRegisterComponentMessage as r,
|
|
5169
|
+
register as s,
|
|
5170
|
+
setEditorSettings as t,
|
|
5171
|
+
getBuilderSearchParams as u,
|
|
5172
|
+
track as v,
|
|
5173
|
+
wrapComponentRef as w,
|
|
5174
|
+
subscribeToEditor as x,
|
|
5175
|
+
fetchBuilderProps as y,
|
|
5176
|
+
_processContentResult as z
|
|
4961
5177
|
};
|