@builder.io/sdk-vue 0.13.2 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/block-styles-5NGYAhBS.cjs +1 -0
- package/lib/browser/{block-styles.234c76cc.js → block-styles-jDSz7IPu.js} +15 -15
- package/lib/browser/{block-wrapper.632a0344.cjs → block-wrapper-aYMueUMD.cjs} +1 -1
- package/lib/browser/{block-wrapper.87efb259.js → block-wrapper-i3S3k3_c.js} +10 -10
- package/lib/browser/blocks/button/button.vue.d.ts +1 -1
- package/lib/browser/blocks/columns/columns.types.d.ts +2 -2
- package/lib/browser/blocks/columns/columns.vue.d.ts +1 -4
- package/lib/browser/blocks/custom-code/custom-code.vue.d.ts +1 -1
- package/lib/browser/blocks/embed/embed.vue.d.ts +1 -1
- package/lib/browser/blocks/form/form/form.vue.d.ts +4 -4
- package/lib/browser/blocks/form/input/input.vue.d.ts +4 -4
- package/lib/browser/blocks/form/select/select.vue.d.ts +1 -1
- package/lib/browser/blocks/form/submit-button/submit-button.vue.d.ts +1 -1
- package/lib/browser/blocks/fragment/fragment.vue.d.ts +1 -1
- package/lib/browser/blocks/image/image.vue.d.ts +1 -1
- package/lib/browser/blocks/img/img.vue.d.ts +1 -1
- package/lib/browser/blocks/section/section.vue.d.ts +1 -1
- package/lib/browser/blocks/slot/slot.vue.d.ts +4 -4
- package/lib/browser/blocks/symbol/symbol.types.d.ts +2 -2
- package/lib/browser/blocks/symbol/symbol.vue.d.ts +1 -4
- package/lib/browser/blocks/text/text.vue.d.ts +1 -1
- package/lib/browser/blocks/video/video.vue.d.ts +1 -1
- package/lib/browser/{component-ref.3afd884d.cjs → component-ref-23FBngqj.cjs} +1 -1
- package/lib/browser/{component-ref.3863762f.js → component-ref-YzJX0Oul.js} +21 -17
- package/lib/browser/components/block/block.vue.d.ts +1 -1
- package/lib/browser/components/block/components/block-styles.vue.d.ts +1 -1
- package/lib/browser/components/block/components/block-wrapper.vue.d.ts +1 -1
- package/lib/browser/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +1 -1
- package/lib/browser/components/block/components/interactive-element.vue.d.ts +2 -1
- package/lib/browser/components/block/components/repeated-block.vue.d.ts +1 -1
- package/lib/browser/components/blocks/blocks-wrapper.vue.d.ts +2 -1
- package/lib/browser/components/blocks/blocks.vue.d.ts +1 -1
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +1 -1
- package/lib/browser/components/content/components/styles.vue.d.ts +1 -1
- package/lib/browser/components/content/content.types.d.ts +1 -8
- package/lib/browser/components/content/content.vue.d.ts +1 -1
- package/lib/browser/components/content/contentProps.types.d.ts +7 -0
- package/lib/browser/components/content-variants/content-variants.vue.d.ts +1 -1
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.vue.d.ts +7 -1
- package/lib/browser/components/inlined-script.vue.d.ts +1 -1
- package/lib/browser/components/inlined-styles.vue.d.ts +1 -1
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/get-block-properties-KacPzO_o.cjs +1 -0
- package/lib/browser/{get-block-properties.954bd25c.js → get-block-properties-ZirT3ZGB.js} +19 -20
- package/lib/browser/{index.5e2629c5.js → index-6a_qPbnw.js} +637 -597
- package/lib/browser/index-7Z8XjtKs.cjs +166 -0
- package/lib/browser/index-helpers/blocks-exports.d.ts +2 -2
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.js +26 -27
- package/lib/browser/{repeated-block.ff7c6ac4.cjs → repeated-block-70kCyQ_l.cjs} +1 -1
- package/lib/browser/repeated-block-hRYVKXrX.js +35 -0
- package/lib/browser/style.css +1 -1
- package/lib/browser/types/builder-props.d.ts +1 -1
- package/lib/browser/types/enforced-partials.d.ts +1 -26
- package/lib/browser/types/input.d.ts +1 -0
- package/lib/browser/types/typescript.d.ts +0 -3
- package/lib/edge/block-styles--T_GAm5-.cjs +1 -0
- package/lib/edge/{block-styles.445302ca.js → block-styles-Tjp0oeui.js} +18 -18
- package/lib/edge/{block-wrapper.e5bbd06c.cjs → block-wrapper-K-I0ddom.cjs} +1 -1
- package/lib/{node/block-wrapper.745530a0.js → edge/block-wrapper-MgeL6r_A.js} +9 -10
- package/lib/edge/blocks/button/button.vue.d.ts +1 -1
- package/lib/edge/blocks/columns/columns.types.d.ts +2 -2
- package/lib/edge/blocks/columns/columns.vue.d.ts +1 -4
- package/lib/edge/blocks/custom-code/custom-code.vue.d.ts +1 -1
- package/lib/edge/blocks/embed/embed.vue.d.ts +1 -1
- package/lib/edge/blocks/form/form/form.vue.d.ts +4 -4
- package/lib/edge/blocks/form/input/input.vue.d.ts +4 -4
- package/lib/edge/blocks/form/select/select.vue.d.ts +1 -1
- package/lib/edge/blocks/form/submit-button/submit-button.vue.d.ts +1 -1
- package/lib/edge/blocks/fragment/fragment.vue.d.ts +1 -1
- package/lib/edge/blocks/image/image.vue.d.ts +1 -1
- package/lib/edge/blocks/img/img.vue.d.ts +1 -1
- package/lib/edge/blocks/section/section.vue.d.ts +1 -1
- package/lib/edge/blocks/slot/slot.vue.d.ts +4 -4
- package/lib/edge/blocks/symbol/symbol.types.d.ts +2 -2
- package/lib/edge/blocks/symbol/symbol.vue.d.ts +1 -4
- package/lib/edge/blocks/text/text.vue.d.ts +1 -1
- package/lib/edge/blocks/video/video.vue.d.ts +1 -1
- package/lib/edge/{component-ref.297cbfe7.js → component-ref-Oo-dR5xV.js} +21 -17
- package/lib/edge/{component-ref.c47dd754.cjs → component-ref-iibFypv7.cjs} +1 -1
- package/lib/edge/components/block/block.vue.d.ts +1 -1
- package/lib/edge/components/block/components/block-styles.vue.d.ts +1 -1
- package/lib/edge/components/block/components/block-wrapper.vue.d.ts +1 -1
- package/lib/edge/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +1 -1
- package/lib/edge/components/block/components/interactive-element.vue.d.ts +2 -1
- package/lib/edge/components/block/components/repeated-block.vue.d.ts +1 -1
- package/lib/edge/components/blocks/blocks-wrapper.vue.d.ts +2 -1
- package/lib/edge/components/blocks/blocks.vue.d.ts +1 -1
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +1 -1
- package/lib/edge/components/content/components/styles.vue.d.ts +1 -1
- package/lib/edge/components/content/content.types.d.ts +1 -8
- package/lib/edge/components/content/content.vue.d.ts +1 -1
- package/lib/edge/components/content/contentProps.types.d.ts +7 -0
- package/lib/edge/components/content-variants/content-variants.vue.d.ts +1 -1
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.vue.d.ts +7 -1
- package/lib/edge/components/inlined-script.vue.d.ts +1 -1
- package/lib/edge/components/inlined-styles.vue.d.ts +1 -1
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/{get-block-properties.4ea261a1.js → get-block-properties-BKnsvu-2.js} +19 -20
- package/lib/edge/get-block-properties-q52zAZuL.cjs +1 -0
- package/lib/edge/{index.f5711364.js → index-FjGYEtq6.js} +1490 -1450
- package/lib/edge/index-helpers/blocks-exports.d.ts +2 -2
- package/lib/edge/index-oq0qBISZ.cjs +186 -0
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.js +25 -26
- package/lib/{browser/repeated-block.83b91a53.js → edge/repeated-block-IVuHJhMQ.js} +4 -5
- package/lib/edge/repeated-block-IrS130V6.cjs +1 -0
- package/lib/edge/style.css +1 -1
- package/lib/edge/types/builder-props.d.ts +1 -1
- package/lib/edge/types/enforced-partials.d.ts +1 -26
- package/lib/edge/types/input.d.ts +1 -0
- package/lib/edge/types/typescript.d.ts +0 -3
- package/lib/node/block-styles-1bGjM-mF.cjs +1 -0
- package/lib/node/{block-styles.bc53b639.js → block-styles-WHZ3oh47.js} +18 -19
- package/lib/node/block-wrapper-7G595XQl.cjs +1 -0
- package/lib/{edge/block-wrapper.c973027d.js → node/block-wrapper-Oi21HLL-.js} +10 -10
- package/lib/node/blocks/button/button.vue.d.ts +1 -1
- package/lib/node/blocks/columns/columns.types.d.ts +2 -2
- package/lib/node/blocks/columns/columns.vue.d.ts +1 -4
- package/lib/node/blocks/custom-code/custom-code.vue.d.ts +1 -1
- package/lib/node/blocks/embed/embed.vue.d.ts +1 -1
- package/lib/node/blocks/form/form/form.vue.d.ts +4 -4
- package/lib/node/blocks/form/input/input.vue.d.ts +4 -4
- package/lib/node/blocks/form/select/select.vue.d.ts +1 -1
- package/lib/node/blocks/form/submit-button/submit-button.vue.d.ts +1 -1
- package/lib/node/blocks/fragment/fragment.vue.d.ts +1 -1
- package/lib/node/blocks/image/image.vue.d.ts +1 -1
- package/lib/node/blocks/img/img.vue.d.ts +1 -1
- package/lib/node/blocks/section/section.vue.d.ts +1 -1
- package/lib/node/blocks/slot/slot.vue.d.ts +4 -4
- package/lib/node/blocks/symbol/symbol.types.d.ts +2 -2
- package/lib/node/blocks/symbol/symbol.vue.d.ts +1 -4
- package/lib/node/blocks/text/text.vue.d.ts +1 -1
- package/lib/node/blocks/video/video.vue.d.ts +1 -1
- package/lib/node/{component-ref.50b4a2f9.js → component-ref-6gNNgUIq.js} +22 -19
- package/lib/node/component-ref-bBOIZLBr.cjs +1 -0
- package/lib/node/components/block/block.vue.d.ts +1 -1
- package/lib/node/components/block/components/block-styles.vue.d.ts +1 -1
- package/lib/node/components/block/components/block-wrapper.vue.d.ts +1 -1
- package/lib/node/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +1 -1
- package/lib/node/components/block/components/interactive-element.vue.d.ts +2 -1
- package/lib/node/components/block/components/repeated-block.vue.d.ts +1 -1
- package/lib/node/components/blocks/blocks-wrapper.vue.d.ts +2 -1
- package/lib/node/components/blocks/blocks.vue.d.ts +1 -1
- package/lib/node/components/content/components/enable-editor.vue.d.ts +1 -1
- package/lib/node/components/content/components/styles.vue.d.ts +1 -1
- package/lib/node/components/content/content.types.d.ts +1 -8
- package/lib/node/components/content/content.vue.d.ts +1 -1
- package/lib/node/components/content/contentProps.types.d.ts +7 -0
- package/lib/node/components/content-variants/content-variants.vue.d.ts +1 -1
- package/lib/node/components/dynamic-renderer/dynamic-renderer.vue.d.ts +7 -1
- package/lib/node/components/inlined-script.vue.d.ts +1 -1
- package/lib/node/components/inlined-styles.vue.d.ts +1 -1
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/{get-block-properties.9d97d213.js → get-block-properties-LsQPb5mK.js} +19 -20
- package/lib/node/get-block-properties-saGQjgeQ.cjs +1 -0
- package/lib/node/{index.2fe76754.js → index-TgZujUqz.js} +244 -201
- package/lib/node/index-helpers/blocks-exports.d.ts +2 -2
- package/lib/node/index-mB-x2rNA.cjs +206 -0
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.js +27 -29
- package/lib/node/{repeated-block.17f75fe4.js → repeated-block-4ZvFRl8H.js} +4 -5
- package/lib/node/repeated-block-ghBGljjL.cjs +1 -0
- package/lib/node/style.css +1 -1
- package/lib/node/types/builder-props.d.ts +1 -1
- package/lib/node/types/enforced-partials.d.ts +1 -26
- package/lib/node/types/input.d.ts +1 -0
- package/lib/node/types/typescript.d.ts +0 -3
- package/package.json +5 -5
- package/lib/browser/block-styles.119ae070.cjs +0 -1
- package/lib/browser/get-block-properties.f75a4388.cjs +0 -1
- package/lib/browser/index.30ba40a5.cjs +0 -166
- package/lib/edge/block-styles.8957f0b3.cjs +0 -1
- package/lib/edge/get-block-properties.8ae4a0af.cjs +0 -1
- package/lib/edge/index.8f395d9b.cjs +0 -186
- package/lib/edge/repeated-block.afb8bacc.cjs +0 -1
- package/lib/edge/repeated-block.bb60007b.js +0 -34
- package/lib/node/block-styles.f0d350eb.cjs +0 -1
- package/lib/node/block-wrapper.a0037a74.cjs +0 -1
- package/lib/node/component-ref.3f3377ee.cjs +0 -1
- package/lib/node/get-block-properties.414a1d7e.cjs +0 -1
- package/lib/node/index.9ac19b66.cjs +0 -206
- package/lib/node/repeated-block.e79fb518.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { defineComponent as f, openBlock as u, createElementBlock as h, Fragment as
|
|
2
|
+
import { defineComponent as f, openBlock as u, createElementBlock as h, Fragment as I, createBlock as g, resolveDynamicComponent as D, mergeProps as C, toHandlers as E, withCtx as B, renderSlot as P, resolveComponent as k, createTextVNode as it, toDisplayString as _, defineAsyncComponent as q, createVNode as V, renderList as O, createCommentVNode as v, h as Te, createElementVNode as Z, normalizeStyle as ee, normalizeClass as Re, markRaw as at } from "vue";
|
|
3
3
|
const lt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), ct = (e) => typeof e == "string" && lt.has(e.toLowerCase());
|
|
4
4
|
function F(e = {}, t, n) {
|
|
5
5
|
const o = {};
|
|
@@ -17,32 +17,32 @@ const dt = f({
|
|
|
17
17
|
data() {
|
|
18
18
|
return { isEmptyElement: ct };
|
|
19
19
|
}
|
|
20
|
-
}),
|
|
20
|
+
}), y = (e, t) => {
|
|
21
21
|
const n = e.__vccOpts || e;
|
|
22
22
|
for (const [o, s] of t)
|
|
23
23
|
n[o] = s;
|
|
24
24
|
return n;
|
|
25
25
|
};
|
|
26
26
|
function ut(e, t, n, o, s, r) {
|
|
27
|
-
return e.isEmptyElement(e.TagName) ? (u(),
|
|
28
|
-
typeof e.TagName == "string" ? (u(),
|
|
27
|
+
return e.isEmptyElement(e.TagName) ? (u(), g(D(e.TagName), C({ key: 1 }, e.attributes, E(e.actionAttributes)), null, 16)) : (u(), h(I, { key: 0 }, [
|
|
28
|
+
typeof e.TagName == "string" ? (u(), g(D(e.TagName), C({ key: 0 }, e.attributes, E(e.actionAttributes)), {
|
|
29
29
|
default: B(() => [
|
|
30
|
-
|
|
30
|
+
P(e.$slots, "default")
|
|
31
31
|
]),
|
|
32
32
|
_: 3
|
|
33
|
-
}, 16)) : (u(),
|
|
33
|
+
}, 16)) : (u(), g(D(e.TagName), C({ key: 1 }, e.attributes, E(e.actionAttributes)), {
|
|
34
34
|
default: B(() => [
|
|
35
|
-
|
|
35
|
+
P(e.$slots, "default")
|
|
36
36
|
]),
|
|
37
37
|
_: 3
|
|
38
38
|
}, 16))
|
|
39
39
|
], 64));
|
|
40
40
|
}
|
|
41
|
-
const se = /* @__PURE__ */
|
|
41
|
+
const se = /* @__PURE__ */ y(dt, [["render", ut]]), qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
42
42
|
__proto__: null,
|
|
43
43
|
default: se
|
|
44
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
45
|
-
switch (
|
|
44
|
+
}, Symbol.toStringTag, { value: "Module" })), A = "vue", re = () => {
|
|
45
|
+
switch (A) {
|
|
46
46
|
case "react":
|
|
47
47
|
case "reactNative":
|
|
48
48
|
case "rsc":
|
|
@@ -69,7 +69,7 @@ const se = /* @__PURE__ */ b(dt, [["render", ut], ["__file", "/home/runner/work/
|
|
|
69
69
|
});
|
|
70
70
|
function mt(e, t, n, o, s, r) {
|
|
71
71
|
const i = k("dynamic-renderer");
|
|
72
|
-
return u(),
|
|
72
|
+
return u(), g(i, {
|
|
73
73
|
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
74
74
|
attributes: {
|
|
75
75
|
...e.filterAttrs(e.attributes, "v-on:", !1),
|
|
@@ -85,12 +85,12 @@ function mt(e, t, n, o, s, r) {
|
|
|
85
85
|
actionAttributes: e.filterAttrs(e.attributes, "v-on:", !0)
|
|
86
86
|
}, {
|
|
87
87
|
default: B(() => [
|
|
88
|
-
it(
|
|
88
|
+
it(_(e.text), 1)
|
|
89
89
|
]),
|
|
90
90
|
_: 1
|
|
91
91
|
}, 8, ["TagName", "attributes", "actionAttributes"]);
|
|
92
92
|
}
|
|
93
|
-
const ht = /* @__PURE__ */
|
|
93
|
+
const ht = /* @__PURE__ */ y(pt, [["render", mt]]), ft = Symbol(), te = {
|
|
94
94
|
Builder: {
|
|
95
95
|
content: null,
|
|
96
96
|
context: {},
|
|
@@ -115,14 +115,17 @@ function gt(e) {
|
|
|
115
115
|
return {
|
|
116
116
|
...(t = e.component) == null ? void 0 : t.options,
|
|
117
117
|
...e.options,
|
|
118
|
+
/**
|
|
119
|
+
* Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
|
|
120
|
+
*/
|
|
118
121
|
builderBlock: e
|
|
119
122
|
};
|
|
120
123
|
}
|
|
121
|
-
const
|
|
122
|
-
log: (...e) => console.log(
|
|
123
|
-
error: (...e) => console.error(
|
|
124
|
-
warn: (...e) => console.warn(
|
|
125
|
-
debug: (...e) => console.debug(
|
|
124
|
+
const z = "[Builder.io]: ", $ = {
|
|
125
|
+
log: (...e) => console.log(z, ...e),
|
|
126
|
+
error: (...e) => console.error(z, ...e),
|
|
127
|
+
warn: (...e) => console.warn(z, ...e),
|
|
128
|
+
debug: (...e) => console.debug(z, ...e)
|
|
126
129
|
};
|
|
127
130
|
function w() {
|
|
128
131
|
return typeof window < "u" && typeof document < "u";
|
|
@@ -131,7 +134,7 @@ function yt() {
|
|
|
131
134
|
return w() && window.self !== window.top;
|
|
132
135
|
}
|
|
133
136
|
function T() {
|
|
134
|
-
return yt() &&
|
|
137
|
+
return yt() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
135
138
|
}
|
|
136
139
|
const kt = () => {
|
|
137
140
|
if (w()) {
|
|
@@ -139,8 +142,8 @@ const kt = () => {
|
|
|
139
142
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
140
143
|
} else
|
|
141
144
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
142
|
-
},
|
|
143
|
-
const e =
|
|
145
|
+
}, St = () => typeof navigator == "object" && navigator.userAgent || "", Pe = () => {
|
|
146
|
+
const e = St(), t = {
|
|
144
147
|
Android() {
|
|
145
148
|
return e.match(/Android/i);
|
|
146
149
|
},
|
|
@@ -157,7 +160,7 @@ const kt = () => {
|
|
|
157
160
|
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
158
161
|
},
|
|
159
162
|
any() {
|
|
160
|
-
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() ||
|
|
163
|
+
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || A === "reactNative";
|
|
161
164
|
}
|
|
162
165
|
}, n = e.match(/Tablet|iPad/i), o = kt();
|
|
163
166
|
return {
|
|
@@ -165,7 +168,7 @@ const kt = () => {
|
|
|
165
168
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
166
169
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
167
170
|
};
|
|
168
|
-
},
|
|
171
|
+
}, vt = ({
|
|
169
172
|
builder: e,
|
|
170
173
|
context: t,
|
|
171
174
|
event: n,
|
|
@@ -173,6 +176,7 @@ const kt = () => {
|
|
|
173
176
|
}) => Object.entries({
|
|
174
177
|
state: o,
|
|
175
178
|
Builder: e,
|
|
179
|
+
// legacy
|
|
176
180
|
builder: e,
|
|
177
181
|
context: t,
|
|
178
182
|
event: n
|
|
@@ -183,7 +187,7 @@ const kt = () => {
|
|
|
183
187
|
getUserAttributes: () => Pe()
|
|
184
188
|
}), wt = (e, {
|
|
185
189
|
isExpression: t = !0
|
|
186
|
-
}) => t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, fe = ({
|
|
190
|
+
}) => /* 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, fe = ({
|
|
187
191
|
code: e,
|
|
188
192
|
builder: t,
|
|
189
193
|
context: n,
|
|
@@ -192,11 +196,11 @@ const kt = () => {
|
|
|
192
196
|
rootSetState: r,
|
|
193
197
|
rootState: i
|
|
194
198
|
}) => {
|
|
195
|
-
const a =
|
|
199
|
+
const a = vt({
|
|
196
200
|
builder: t,
|
|
197
201
|
context: n,
|
|
198
202
|
event: o,
|
|
199
|
-
state:
|
|
203
|
+
state: Ae({
|
|
200
204
|
rootState: i,
|
|
201
205
|
localState: s,
|
|
202
206
|
rootSetState: r
|
|
@@ -204,7 +208,7 @@ const kt = () => {
|
|
|
204
208
|
});
|
|
205
209
|
return new Function(...a.map(([l]) => l), e)(...a.map(([, l]) => l));
|
|
206
210
|
};
|
|
207
|
-
function
|
|
211
|
+
function Ae({
|
|
208
212
|
rootState: e,
|
|
209
213
|
localState: t,
|
|
210
214
|
rootSetState: n
|
|
@@ -214,7 +218,7 @@ function xe({
|
|
|
214
218
|
if (t && s in t)
|
|
215
219
|
return t[s];
|
|
216
220
|
const r = o[s];
|
|
217
|
-
return typeof r == "object" ?
|
|
221
|
+
return typeof r == "object" ? Ae({
|
|
218
222
|
rootState: r,
|
|
219
223
|
localState: void 0,
|
|
220
224
|
rootSetState: n ? (i) => {
|
|
@@ -230,18 +234,18 @@ function xe({
|
|
|
230
234
|
});
|
|
231
235
|
}
|
|
232
236
|
const N = (e) => e != null;
|
|
233
|
-
function
|
|
237
|
+
function It() {
|
|
234
238
|
var e;
|
|
235
239
|
return typeof process < "u" && N((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
236
240
|
}
|
|
237
|
-
const
|
|
241
|
+
const $t = () => {
|
|
238
242
|
var o;
|
|
239
|
-
if (
|
|
243
|
+
if (!It())
|
|
240
244
|
return !1;
|
|
241
245
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
242
|
-
return e && t && !n ? (
|
|
243
|
-
}, Tt = (e) => (w() ||
|
|
244
|
-
function
|
|
246
|
+
return e && t && !n ? ($.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;
|
|
247
|
+
}, Tt = (e) => (w() || $t(), fe(e));
|
|
248
|
+
function Y({
|
|
245
249
|
code: e,
|
|
246
250
|
context: t,
|
|
247
251
|
localState: n,
|
|
@@ -251,7 +255,7 @@ function G({
|
|
|
251
255
|
isExpression: i = !0
|
|
252
256
|
}) {
|
|
253
257
|
if (e === "") {
|
|
254
|
-
|
|
258
|
+
$.warn("Skipping evaluation of empty code block.");
|
|
255
259
|
return;
|
|
256
260
|
}
|
|
257
261
|
const a = {
|
|
@@ -268,13 +272,13 @@ function G({
|
|
|
268
272
|
try {
|
|
269
273
|
return Tt(a);
|
|
270
274
|
} catch (l) {
|
|
271
|
-
|
|
275
|
+
$.error("Failed code evaluation: " + l.message, {
|
|
272
276
|
code: e
|
|
273
277
|
});
|
|
274
278
|
return;
|
|
275
279
|
}
|
|
276
280
|
}
|
|
277
|
-
const
|
|
281
|
+
const j = (e) => JSON.parse(JSON.stringify(e)), xe = (e, t, n) => {
|
|
278
282
|
if (Object(e) !== e)
|
|
279
283
|
return e;
|
|
280
284
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
@@ -289,7 +293,7 @@ const Rt = ({
|
|
|
289
293
|
}) => {
|
|
290
294
|
if (!e.bindings)
|
|
291
295
|
return e;
|
|
292
|
-
const r =
|
|
296
|
+
const r = j(e), i = {
|
|
293
297
|
...r,
|
|
294
298
|
properties: {
|
|
295
299
|
...r.properties
|
|
@@ -299,14 +303,14 @@ const Rt = ({
|
|
|
299
303
|
}
|
|
300
304
|
};
|
|
301
305
|
for (const a in e.bindings) {
|
|
302
|
-
const l = e.bindings[a],
|
|
306
|
+
const l = e.bindings[a], d = Y({
|
|
303
307
|
code: l,
|
|
304
308
|
localState: n,
|
|
305
309
|
rootState: o,
|
|
306
310
|
rootSetState: s,
|
|
307
311
|
context: t
|
|
308
312
|
});
|
|
309
|
-
|
|
313
|
+
xe(i, a, d);
|
|
310
314
|
}
|
|
311
315
|
return i;
|
|
312
316
|
};
|
|
@@ -331,7 +335,7 @@ const Et = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase
|
|
|
331
335
|
if (typeof o == "string")
|
|
332
336
|
return `${Et(n)}: ${o};`;
|
|
333
337
|
}).filter(N), Pt = (e) => Be(e).join(`
|
|
334
|
-
`),
|
|
338
|
+
`), zs = ({
|
|
335
339
|
mediaQuery: e,
|
|
336
340
|
className: t,
|
|
337
341
|
styles: n
|
|
@@ -343,21 +347,21 @@ const Et = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase
|
|
|
343
347
|
${o}
|
|
344
348
|
}` : o;
|
|
345
349
|
};
|
|
346
|
-
function
|
|
350
|
+
function At({
|
|
347
351
|
style: e
|
|
348
352
|
}) {
|
|
349
353
|
return e;
|
|
350
354
|
}
|
|
351
|
-
const
|
|
355
|
+
const Js = ({
|
|
352
356
|
block: e,
|
|
353
357
|
context: t
|
|
354
|
-
}) => We(
|
|
358
|
+
}) => We(At({
|
|
355
359
|
style: e.style || {},
|
|
356
360
|
context: t,
|
|
357
361
|
block: e
|
|
358
362
|
}));
|
|
359
363
|
function We(e) {
|
|
360
|
-
switch (
|
|
364
|
+
switch (A) {
|
|
361
365
|
case "svelte":
|
|
362
366
|
case "vue":
|
|
363
367
|
case "solid":
|
|
@@ -369,16 +373,16 @@ function We(e) {
|
|
|
369
373
|
return e;
|
|
370
374
|
}
|
|
371
375
|
}
|
|
372
|
-
function
|
|
376
|
+
function xt(e, t, n = {}) {
|
|
373
377
|
let o, s, r, i = null, a = 0;
|
|
374
378
|
const l = function() {
|
|
375
379
|
a = n.leading === !1 ? 0 : Date.now(), i = null, r = e.apply(o, s), i || (o = s = null);
|
|
376
380
|
};
|
|
377
381
|
return function() {
|
|
378
|
-
const
|
|
379
|
-
!a && n.leading === !1 && (a =
|
|
380
|
-
const
|
|
381
|
-
return o = this, s = arguments,
|
|
382
|
+
const d = Date.now();
|
|
383
|
+
!a && n.leading === !1 && (a = d);
|
|
384
|
+
const m = t - (d - a);
|
|
385
|
+
return o = this, s = arguments, m <= 0 || m > t ? (i && (clearTimeout(i), i = null), a = d, r = e.apply(o, s), i || (o = s = null)) : !i && n.trailing !== !1 && (i = setTimeout(l, m)), r;
|
|
382
386
|
};
|
|
383
387
|
}
|
|
384
388
|
function U(e, ...t) {
|
|
@@ -472,18 +476,18 @@ function Nt(e) {
|
|
|
472
476
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
473
477
|
})) : e.repeat && o && !s && !a(n) && (o = !1, U(n.style, e.steps[0].styles));
|
|
474
478
|
}
|
|
475
|
-
const i =
|
|
479
|
+
const i = xt(r, 200, {
|
|
476
480
|
leading: !1
|
|
477
481
|
});
|
|
478
|
-
function a(
|
|
479
|
-
const
|
|
480
|
-
return
|
|
482
|
+
function a(m) {
|
|
483
|
+
const c = m.getBoundingClientRect(), p = window.innerHeight, b = (e.thresholdPercent || 0) / 100 * p;
|
|
484
|
+
return c.bottom > b && c.top < p - b;
|
|
481
485
|
}
|
|
482
486
|
const l = e.steps[0].styles;
|
|
483
|
-
function
|
|
487
|
+
function d() {
|
|
484
488
|
U(n.style, l);
|
|
485
489
|
}
|
|
486
|
-
|
|
490
|
+
d(), setTimeout(() => {
|
|
487
491
|
n.style.transition = `all ${e.duration}s ${ie(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
488
492
|
}), document.addEventListener("scroll", i, {
|
|
489
493
|
capture: !0,
|
|
@@ -523,7 +527,7 @@ const Ft = ({
|
|
|
523
527
|
} = e;
|
|
524
528
|
if (!(n != null && n.collection))
|
|
525
529
|
return;
|
|
526
|
-
const s =
|
|
530
|
+
const s = Y({
|
|
527
531
|
code: n.collection,
|
|
528
532
|
localState: t.localState,
|
|
529
533
|
rootState: t.rootState,
|
|
@@ -533,46 +537,46 @@ const Ft = ({
|
|
|
533
537
|
if (!Array.isArray(s))
|
|
534
538
|
return;
|
|
535
539
|
const r = n.collection.split(".").pop(), i = n.itemName || (r ? r + "Item" : "item");
|
|
536
|
-
return s.map((l,
|
|
540
|
+
return s.map((l, d) => ({
|
|
537
541
|
context: {
|
|
538
542
|
...t,
|
|
539
543
|
localState: {
|
|
540
544
|
...t.localState,
|
|
541
|
-
$index:
|
|
545
|
+
$index: d,
|
|
542
546
|
$item: l,
|
|
543
547
|
[i]: l,
|
|
544
|
-
[`$${i}Index`]:
|
|
548
|
+
[`$${i}Index`]: d
|
|
545
549
|
}
|
|
546
550
|
},
|
|
547
551
|
block: o
|
|
548
552
|
}));
|
|
549
|
-
}, Ot = () => import("./block-styles.
|
|
553
|
+
}, Ot = () => import("./block-styles-jDSz7IPu.js").then((e) => e.default).catch((e) => {
|
|
550
554
|
throw console.error(
|
|
551
555
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
552
556
|
e
|
|
553
557
|
), e;
|
|
554
|
-
}), Mt = () => import("./block-wrapper.
|
|
558
|
+
}), Mt = () => import("./block-wrapper-i3S3k3_c.js").then((e) => e.default).catch((e) => {
|
|
555
559
|
throw console.error(
|
|
556
560
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
557
561
|
e
|
|
558
562
|
), e;
|
|
559
|
-
}), Lt = () => import("./component-ref.
|
|
563
|
+
}), Lt = () => import("./component-ref-YzJX0Oul.js").then((e) => e.default).catch((e) => {
|
|
560
564
|
throw console.error(
|
|
561
565
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
562
566
|
e
|
|
563
567
|
), e;
|
|
564
|
-
}),
|
|
568
|
+
}), Dt = () => import("./repeated-block-hRYVKXrX.js").then((e) => e.default).catch((e) => {
|
|
565
569
|
throw console.error(
|
|
566
570
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
567
571
|
e
|
|
568
572
|
), e;
|
|
569
|
-
}),
|
|
573
|
+
}), Ht = f({
|
|
570
574
|
name: "block",
|
|
571
575
|
components: {
|
|
572
|
-
BlockStyles:
|
|
573
|
-
ComponentRef:
|
|
574
|
-
RepeatedBlock:
|
|
575
|
-
BlockWrapper:
|
|
576
|
+
BlockStyles: q(Ot),
|
|
577
|
+
ComponentRef: q(Lt),
|
|
578
|
+
RepeatedBlock: q(Dt),
|
|
579
|
+
BlockWrapper: q(Mt)
|
|
576
580
|
},
|
|
577
581
|
props: ["block", "context", "registeredComponents", "linkComponent"],
|
|
578
582
|
data() {
|
|
@@ -624,21 +628,21 @@ const Ft = ({
|
|
|
624
628
|
return ("show" in this.processedBlock ? this.processedBlock.show : !0) && !e;
|
|
625
629
|
},
|
|
626
630
|
childrenWithoutParentComponent() {
|
|
627
|
-
var t
|
|
628
|
-
return !((t = this.blockComponent) != null && t.component) && !this.repeatItem ?
|
|
631
|
+
var t;
|
|
632
|
+
return !((t = this.blockComponent) != null && t.component) && !this.repeatItem ? this.processedBlock.children ?? [] : [];
|
|
629
633
|
},
|
|
630
634
|
componentRefProps() {
|
|
631
|
-
var e, t, n, o, s, r, i, a, l,
|
|
635
|
+
var e, t, n, o, s, r, i, a, l, d;
|
|
632
636
|
return {
|
|
633
|
-
blockChildren:
|
|
634
|
-
componentRef: (
|
|
637
|
+
blockChildren: this.processedBlock.children ?? [],
|
|
638
|
+
componentRef: (e = this.blockComponent) == null ? void 0 : e.component,
|
|
635
639
|
componentOptions: {
|
|
636
640
|
...gt(this.processedBlock),
|
|
637
641
|
builderContext: this.context,
|
|
638
|
-
...((
|
|
642
|
+
...((t = this.blockComponent) == null ? void 0 : t.name) === "Core:Button" || ((n = this.blockComponent) == null ? void 0 : n.name) === "Symbol" || ((o = this.blockComponent) == null ? void 0 : o.name) === "Columns" || ((s = this.blockComponent) == null ? void 0 : s.name) === "Form:Form" ? {
|
|
639
643
|
builderLinkComponent: this.linkComponent
|
|
640
644
|
} : {},
|
|
641
|
-
...((
|
|
645
|
+
...((r = this.blockComponent) == null ? void 0 : r.name) === "Symbol" || ((i = this.blockComponent) == null ? void 0 : i.name) === "Columns" || ((a = this.blockComponent) == null ? void 0 : a.name) === "Form:Form" ? {
|
|
642
646
|
builderComponents: this.registeredComponents
|
|
643
647
|
} : {}
|
|
644
648
|
},
|
|
@@ -646,21 +650,21 @@ const Ft = ({
|
|
|
646
650
|
linkComponent: this.linkComponent,
|
|
647
651
|
registeredComponents: this.registeredComponents,
|
|
648
652
|
builderBlock: this.processedBlock,
|
|
649
|
-
includeBlockProps: ((
|
|
650
|
-
isInteractive: !((
|
|
653
|
+
includeBlockProps: ((l = this.blockComponent) == null ? void 0 : l.noWrap) === !0,
|
|
654
|
+
isInteractive: !((d = this.blockComponent) != null && d.isRSC)
|
|
651
655
|
};
|
|
652
656
|
}
|
|
653
657
|
}
|
|
654
658
|
});
|
|
655
|
-
function
|
|
656
|
-
var
|
|
657
|
-
const i = k("block-styles"), a = k("component-ref"), l = k("block", !0),
|
|
658
|
-
return e.canShowBlock ? (u(), h(
|
|
659
|
+
function jt(e, t, n, o, s, r) {
|
|
660
|
+
var c;
|
|
661
|
+
const i = k("block-styles"), a = k("component-ref"), l = k("block", !0), d = k("block-wrapper"), m = k("repeated-block");
|
|
662
|
+
return e.canShowBlock ? (u(), h(I, { key: 0 }, [
|
|
659
663
|
V(i, {
|
|
660
664
|
block: e.block,
|
|
661
665
|
context: e.context
|
|
662
666
|
}, null, 8, ["block", "context"]),
|
|
663
|
-
(
|
|
667
|
+
(c = e.blockComponent) != null && c.noWrap ? (u(), g(a, {
|
|
664
668
|
key: 1,
|
|
665
669
|
componentRef: e.componentRefProps.componentRef,
|
|
666
670
|
componentOptions: e.componentRefProps.componentOptions,
|
|
@@ -671,14 +675,14 @@ function Ht(e, t, n, o, s, r) {
|
|
|
671
675
|
builderBlock: e.componentRefProps.builderBlock,
|
|
672
676
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
673
677
|
isInteractive: e.componentRefProps.isInteractive
|
|
674
|
-
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"])) : (u(), h(
|
|
675
|
-
e.repeatItem ? (u(!0), h(
|
|
676
|
-
key:
|
|
677
|
-
repeatContext:
|
|
678
|
-
block:
|
|
678
|
+
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"])) : (u(), h(I, { key: 0 }, [
|
|
679
|
+
e.repeatItem ? (u(!0), h(I, { key: 1 }, O(e.repeatItem, (p, S) => (u(), g(m, {
|
|
680
|
+
key: S,
|
|
681
|
+
repeatContext: p.context,
|
|
682
|
+
block: p.block,
|
|
679
683
|
registeredComponents: e.registeredComponents,
|
|
680
684
|
linkComponent: e.linkComponent
|
|
681
|
-
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (u(),
|
|
685
|
+
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (u(), g(d, {
|
|
682
686
|
key: 0,
|
|
683
687
|
Wrapper: e.Tag,
|
|
684
688
|
block: e.processedBlock,
|
|
@@ -697,9 +701,9 @@ function Ht(e, t, n, o, s, r) {
|
|
|
697
701
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
698
702
|
isInteractive: e.componentRefProps.isInteractive
|
|
699
703
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"]),
|
|
700
|
-
(u(!0), h(
|
|
701
|
-
key:
|
|
702
|
-
block:
|
|
704
|
+
(u(!0), h(I, null, O(e.childrenWithoutParentComponent, (p, S) => (u(), g(l, {
|
|
705
|
+
key: p.id,
|
|
706
|
+
block: p,
|
|
703
707
|
context: e.childrenContext,
|
|
704
708
|
registeredComponents: e.registeredComponents,
|
|
705
709
|
linkComponent: e.linkComponent
|
|
@@ -708,12 +712,12 @@ function Ht(e, t, n, o, s, r) {
|
|
|
708
712
|
_: 1
|
|
709
713
|
}, 8, ["Wrapper", "block", "context", "linkComponent"]))
|
|
710
714
|
], 64))
|
|
711
|
-
], 64)) :
|
|
715
|
+
], 64)) : v("", !0);
|
|
712
716
|
}
|
|
713
|
-
const ce = /* @__PURE__ */
|
|
717
|
+
const ce = /* @__PURE__ */ y(Ht, [["render", jt]]), Gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
714
718
|
__proto__: null,
|
|
715
719
|
default: ce
|
|
716
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
720
|
+
}, Symbol.toStringTag, { value: "Module" })), Kt = f({
|
|
717
721
|
name: "builder-blocks-wrapper",
|
|
718
722
|
props: [
|
|
719
723
|
"BlocksWrapper",
|
|
@@ -758,8 +762,8 @@ const ce = /* @__PURE__ */ b(Dt, [["render", Ht], ["__file", "/home/runner/work/
|
|
|
758
762
|
}
|
|
759
763
|
}
|
|
760
764
|
});
|
|
761
|
-
function
|
|
762
|
-
return u(),
|
|
765
|
+
function qt(e, t, n, o, s, r) {
|
|
766
|
+
return u(), g(D(e.BlocksWrapper), C({
|
|
763
767
|
class: e.className + " component-b1turyjjkok",
|
|
764
768
|
"builder-path": e.path,
|
|
765
769
|
"builder-parent-id": e.parent,
|
|
@@ -769,14 +773,14 @@ function Kt(e, t, n, o, s, r) {
|
|
|
769
773
|
onKeyPress: (i) => e.onClick()
|
|
770
774
|
}, { ...e.BlocksWrapperProps }), {
|
|
771
775
|
default: B(() => [
|
|
772
|
-
|
|
776
|
+
P(e.$slots, "default", {}, void 0, !0)
|
|
773
777
|
]),
|
|
774
778
|
_: 3
|
|
775
779
|
}, 16, ["class", "builder-path", "builder-parent-id", "style", "onClick", "onMouseEnter", "onKeyPress"]);
|
|
776
780
|
}
|
|
777
|
-
const
|
|
781
|
+
const zt = /* @__PURE__ */ y(Kt, [["render", qt], ["__scopeId", "data-v-3403e3cb"]]), Jt = f({
|
|
778
782
|
name: "builder-blocks",
|
|
779
|
-
components: { BlocksWrapper:
|
|
783
|
+
components: { BlocksWrapper: zt, Block: ce },
|
|
780
784
|
props: [
|
|
781
785
|
"blocks",
|
|
782
786
|
"parent",
|
|
@@ -791,36 +795,36 @@ const qt = /* @__PURE__ */ b(jt, [["render", Kt], ["__scopeId", "data-v-1f8aab9f
|
|
|
791
795
|
componentsContext: Ee.key
|
|
792
796
|
}
|
|
793
797
|
});
|
|
794
|
-
function
|
|
795
|
-
var l,
|
|
798
|
+
function Gt(e, t, n, o, s, r) {
|
|
799
|
+
var l, d;
|
|
796
800
|
const i = k("block"), a = k("blocks-wrapper");
|
|
797
|
-
return u(),
|
|
801
|
+
return u(), g(a, {
|
|
798
802
|
blocks: e.blocks,
|
|
799
803
|
parent: e.parent,
|
|
800
804
|
path: e.path,
|
|
801
805
|
styleProp: e.styleProp,
|
|
802
806
|
BlocksWrapper: (l = e.context) == null ? void 0 : l.BlocksWrapper,
|
|
803
|
-
BlocksWrapperProps: (
|
|
807
|
+
BlocksWrapperProps: (d = e.context) == null ? void 0 : d.BlocksWrapperProps
|
|
804
808
|
}, {
|
|
805
809
|
default: B(() => [
|
|
806
|
-
e.blocks ? (u(!0), h(
|
|
807
|
-
key:
|
|
808
|
-
block:
|
|
810
|
+
e.blocks ? (u(!0), h(I, { key: 0 }, O(e.blocks, (m, c) => (u(), g(i, {
|
|
811
|
+
key: m.id,
|
|
812
|
+
block: m,
|
|
809
813
|
linkComponent: e.linkComponent,
|
|
810
814
|
context: e.context || e.builderContext,
|
|
811
815
|
registeredComponents: e.registeredComponents || e.componentsContext.registeredComponents
|
|
812
|
-
}, null, 8, ["block", "linkComponent", "context", "registeredComponents"]))), 128)) :
|
|
816
|
+
}, null, 8, ["block", "linkComponent", "context", "registeredComponents"]))), 128)) : v("", !0)
|
|
813
817
|
]),
|
|
814
818
|
_: 1
|
|
815
819
|
}, 8, ["blocks", "parent", "path", "styleProp", "BlocksWrapper", "BlocksWrapperProps"]);
|
|
816
820
|
}
|
|
817
|
-
const
|
|
821
|
+
const K = /* @__PURE__ */ y(Jt, [["render", Gt]]), de = f({
|
|
818
822
|
render() {
|
|
819
823
|
return Te("style", { id: this.id, innerHTML: this.styles });
|
|
820
824
|
},
|
|
821
825
|
name: "inlined-styles",
|
|
822
826
|
props: ["styles", "id"]
|
|
823
|
-
}),
|
|
827
|
+
}), Fe = {
|
|
824
828
|
small: {
|
|
825
829
|
min: 320,
|
|
826
830
|
default: 321,
|
|
@@ -836,11 +840,11 @@ const j = /* @__PURE__ */ b(zt, [["render", Jt], ["__file", "/home/runner/work/b
|
|
|
836
840
|
default: 991,
|
|
837
841
|
max: 1200
|
|
838
842
|
}
|
|
839
|
-
},
|
|
843
|
+
}, Ys = (e, t = Fe) => `@media (max-width: ${t[e].max}px)`, Yt = ({
|
|
840
844
|
small: e,
|
|
841
845
|
medium: t
|
|
842
846
|
}) => {
|
|
843
|
-
const n =
|
|
847
|
+
const n = j(Fe);
|
|
844
848
|
if (!e || !t)
|
|
845
849
|
return n;
|
|
846
850
|
const o = Math.floor(e / 2);
|
|
@@ -858,18 +862,18 @@ const j = /* @__PURE__ */ b(zt, [["render", Jt], ["__file", "/home/runner/work/b
|
|
|
858
862
|
const r = n.medium.max + 1;
|
|
859
863
|
return n.large = {
|
|
860
864
|
max: 2e3,
|
|
865
|
+
// TODO: decide upper limit
|
|
861
866
|
min: r,
|
|
862
867
|
default: r + 1
|
|
863
868
|
}, n;
|
|
864
|
-
},
|
|
869
|
+
}, _t = f({
|
|
865
870
|
name: "builder-columns",
|
|
866
871
|
components: {
|
|
867
872
|
InlinedStyles: de,
|
|
868
873
|
DynamicRenderer: se,
|
|
869
|
-
Blocks:
|
|
874
|
+
Blocks: K
|
|
870
875
|
},
|
|
871
876
|
props: [
|
|
872
|
-
"js",
|
|
873
877
|
"space",
|
|
874
878
|
"columns",
|
|
875
879
|
"stackColumnsAt",
|
|
@@ -885,7 +889,7 @@ const j = /* @__PURE__ */ b(zt, [["render", Jt], ["__file", "/home/runner/work/b
|
|
|
885
889
|
cols: this.columns || [],
|
|
886
890
|
stackAt: this.stackColumnsAt || "tablet",
|
|
887
891
|
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
888
|
-
TARGET:
|
|
892
|
+
TARGET: A,
|
|
889
893
|
getClassPropName: re,
|
|
890
894
|
mapStyleObjToStrIfNeeded: We
|
|
891
895
|
};
|
|
@@ -985,31 +989,31 @@ const j = /* @__PURE__ */ b(zt, [["render", Jt], ["__file", "/home/runner/work/b
|
|
|
985
989
|
}
|
|
986
990
|
}
|
|
987
991
|
});
|
|
988
|
-
function
|
|
992
|
+
function Qt(e, t, n, o, s, r) {
|
|
989
993
|
const i = k("inlined-styles"), a = k("blocks"), l = k("dynamic-renderer");
|
|
990
994
|
return u(), h("div", C({
|
|
991
995
|
class: `builder-columns ${e.builderBlock.id}-breakpoints div-16nol0lwi20`,
|
|
992
996
|
style: e.columnsCssVars
|
|
993
997
|
}, {}), [
|
|
994
|
-
e.TARGET !== "reactNative" ? (u(),
|
|
998
|
+
e.TARGET !== "reactNative" ? (u(), g(i, {
|
|
995
999
|
key: 0,
|
|
996
1000
|
styles: e.columnsStyles
|
|
997
|
-
}, null, 8, ["styles"])) :
|
|
998
|
-
(u(!0), h(
|
|
999
|
-
key:
|
|
1000
|
-
TagName:
|
|
1001
|
+
}, null, 8, ["styles"])) : v("", !0),
|
|
1002
|
+
(u(!0), h(I, null, O(e.columns, (d, m) => (u(), g(l, {
|
|
1003
|
+
key: m,
|
|
1004
|
+
TagName: d.link ? e.builderLinkComponent || "a" : "div",
|
|
1001
1005
|
actionAttributes: {},
|
|
1002
1006
|
attributes: {
|
|
1003
|
-
...
|
|
1004
|
-
href:
|
|
1007
|
+
...d.link ? {
|
|
1008
|
+
href: d.link
|
|
1005
1009
|
} : {},
|
|
1006
1010
|
[e.getClassPropName()]: "builder-column",
|
|
1007
|
-
style: e.mapStyleObjToStrIfNeeded(e.columnCssVars(
|
|
1011
|
+
style: e.mapStyleObjToStrIfNeeded(e.columnCssVars(m))
|
|
1008
1012
|
}
|
|
1009
1013
|
}, {
|
|
1010
1014
|
default: B(() => [
|
|
1011
1015
|
V(a, {
|
|
1012
|
-
path: `component.options.columns.${
|
|
1016
|
+
path: `component.options.columns.${m}.blocks`,
|
|
1013
1017
|
parent: e.builderBlock.id,
|
|
1014
1018
|
styleProp: {
|
|
1015
1019
|
flexGrow: "1"
|
|
@@ -1017,31 +1021,31 @@ function Xt(e, t, n, o, s, r) {
|
|
|
1017
1021
|
context: e.builderContext,
|
|
1018
1022
|
registeredComponents: e.builderComponents,
|
|
1019
1023
|
linkComponent: e.builderLinkComponent,
|
|
1020
|
-
blocks:
|
|
1024
|
+
blocks: d.blocks
|
|
1021
1025
|
}, null, 8, ["path", "parent", "context", "registeredComponents", "linkComponent", "blocks"])
|
|
1022
1026
|
]),
|
|
1023
1027
|
_: 2
|
|
1024
1028
|
}, 1032, ["TagName", "attributes"]))), 128))
|
|
1025
1029
|
], 16);
|
|
1026
1030
|
}
|
|
1027
|
-
const
|
|
1031
|
+
const Xt = /* @__PURE__ */ y(_t, [["render", Qt], ["__scopeId", "data-v-3a12caec"]]), Zt = f({
|
|
1028
1032
|
name: "builder-fragment-component",
|
|
1029
1033
|
props: []
|
|
1030
1034
|
});
|
|
1031
|
-
function
|
|
1035
|
+
function en(e, t, n, o, s, r) {
|
|
1032
1036
|
return u(), h("span", null, [
|
|
1033
|
-
|
|
1037
|
+
P(e.$slots, "default")
|
|
1034
1038
|
]);
|
|
1035
1039
|
}
|
|
1036
|
-
const
|
|
1040
|
+
const tn = /* @__PURE__ */ y(Zt, [["render", en]]);
|
|
1037
1041
|
function be(e) {
|
|
1038
1042
|
return e.replace(/http(s)?:/, "");
|
|
1039
1043
|
}
|
|
1040
|
-
function
|
|
1044
|
+
function nn(e = "", t, n) {
|
|
1041
1045
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), s = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1042
1046
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + s + t + "=" + encodeURIComponent(n);
|
|
1043
1047
|
}
|
|
1044
|
-
function
|
|
1048
|
+
function on(e, t) {
|
|
1045
1049
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1046
1050
|
return e;
|
|
1047
1051
|
if (t === "master")
|
|
@@ -1060,11 +1064,11 @@ function X(e) {
|
|
|
1060
1064
|
if (e.match(/builder\.io/)) {
|
|
1061
1065
|
let n = e;
|
|
1062
1066
|
const o = Number(e.split("?width=")[1]);
|
|
1063
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((s) => s !== o).map((s) => `${
|
|
1067
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((s) => s !== o).map((s) => `${nn(e, "width", s)} ${s}w`).concat([n]).join(", ");
|
|
1064
1068
|
}
|
|
1065
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1069
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [on(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
1066
1070
|
}
|
|
1067
|
-
const
|
|
1071
|
+
const sn = f({
|
|
1068
1072
|
name: "builder-image",
|
|
1069
1073
|
props: [
|
|
1070
1074
|
"image",
|
|
@@ -1084,9 +1088,11 @@ const rn = f({
|
|
|
1084
1088
|
srcSetToUse() {
|
|
1085
1089
|
var n;
|
|
1086
1090
|
const t = this.image || this.src;
|
|
1087
|
-
if (!t ||
|
|
1091
|
+
if (!t || // We can auto add srcset for cdn.builder.io and shopify
|
|
1092
|
+
// images, otherwise you can supply this prop manually
|
|
1093
|
+
!(t.match(/builder\.io/) || t.match(/cdn\.shopify\.com/)))
|
|
1088
1094
|
return this.srcset;
|
|
1089
|
-
if (this.srcset && ((n = this.image)
|
|
1095
|
+
if (this.srcset && ((n = this.image) != null && n.includes("builder.io/api/v1/image"))) {
|
|
1090
1096
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
1091
1097
|
return console.debug("Removed given srcset"), X(t);
|
|
1092
1098
|
} else if (this.image && !this.srcset)
|
|
@@ -1095,7 +1101,7 @@ const rn = f({
|
|
|
1095
1101
|
},
|
|
1096
1102
|
webpSrcSet() {
|
|
1097
1103
|
var e;
|
|
1098
|
-
return (
|
|
1104
|
+
return (e = this.srcSetToUse) != null && e.match(/builder\.io/) && !this.noWebp ? this.srcSetToUse.replace(/\?/g, "?format=webp&") : "";
|
|
1099
1105
|
},
|
|
1100
1106
|
aspectRatioCss() {
|
|
1101
1107
|
const e = {
|
|
@@ -1108,20 +1114,19 @@ const rn = f({
|
|
|
1108
1114
|
return this.aspectRatio ? e : void 0;
|
|
1109
1115
|
}
|
|
1110
1116
|
}
|
|
1111
|
-
})
|
|
1112
|
-
const an = ["srcset"], ln = ["alt", "role", "src", "srcset", "sizes"], cn = {
|
|
1117
|
+
}), rn = ["srcset"], an = ["alt", "role", "src", "srcset", "sizes"], ln = {
|
|
1113
1118
|
key: 2,
|
|
1114
1119
|
class: "div-4wbls88y960-2"
|
|
1115
1120
|
};
|
|
1116
|
-
function
|
|
1117
|
-
var i, a, l,
|
|
1118
|
-
return u(), h(
|
|
1121
|
+
function cn(e, t, n, o, s, r) {
|
|
1122
|
+
var i, a, l, d;
|
|
1123
|
+
return u(), h(I, null, [
|
|
1119
1124
|
Z("picture", null, [
|
|
1120
1125
|
e.webpSrcSet ? (u(), h("source", {
|
|
1121
1126
|
key: 0,
|
|
1122
1127
|
type: "image/webp",
|
|
1123
1128
|
srcset: e.webpSrcSet
|
|
1124
|
-
}, null, 8,
|
|
1129
|
+
}, null, 8, rn)) : v("", !0),
|
|
1125
1130
|
Z("img", {
|
|
1126
1131
|
loading: "lazy",
|
|
1127
1132
|
alt: e.altText,
|
|
@@ -1137,29 +1142,29 @@ function dn(e, t, n, o, s, r) {
|
|
|
1137
1142
|
src: e.image,
|
|
1138
1143
|
srcset: e.srcSetToUse,
|
|
1139
1144
|
sizes: e.sizes
|
|
1140
|
-
}, null, 14,
|
|
1145
|
+
}, null, 14, an)
|
|
1141
1146
|
]),
|
|
1142
|
-
e.aspectRatio && !((
|
|
1147
|
+
e.aspectRatio && !((a = (i = e.builderBlock) == null ? void 0 : i.children) != null && a.length && e.fitContent) ? (u(), h("div", {
|
|
1143
1148
|
key: 0,
|
|
1144
1149
|
class: "builder-image-sizer div-4wbls88y960",
|
|
1145
1150
|
style: ee({
|
|
1146
1151
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1147
1152
|
})
|
|
1148
|
-
}, null, 4)) :
|
|
1149
|
-
(
|
|
1150
|
-
!e.fitContent && e.$slots.default ? (u(), h("div",
|
|
1151
|
-
|
|
1152
|
-
])) :
|
|
1153
|
+
}, null, 4)) : v("", !0),
|
|
1154
|
+
(d = (l = e.builderBlock) == null ? void 0 : l.children) != null && d.length && e.fitContent ? P(e.$slots, "default", { key: 1 }, void 0, !0) : v("", !0),
|
|
1155
|
+
!e.fitContent && e.$slots.default ? (u(), h("div", ln, [
|
|
1156
|
+
P(e.$slots, "default", {}, void 0, !0)
|
|
1157
|
+
])) : v("", !0)
|
|
1153
1158
|
], 64);
|
|
1154
1159
|
}
|
|
1155
|
-
const
|
|
1160
|
+
const dn = /* @__PURE__ */ y(sn, [["render", cn], ["__scopeId", "data-v-4ab1cc9f"]]), un = f({
|
|
1156
1161
|
name: "builder-section-component",
|
|
1157
1162
|
props: ["attributes", "maxWidth"],
|
|
1158
1163
|
data() {
|
|
1159
1164
|
return { filterAttrs: F };
|
|
1160
1165
|
}
|
|
1161
1166
|
});
|
|
1162
|
-
function
|
|
1167
|
+
function pn(e, t, n, o, s, r) {
|
|
1163
1168
|
return u(), h("section", C({
|
|
1164
1169
|
style: {
|
|
1165
1170
|
width: "100%",
|
|
@@ -1173,11 +1178,11 @@ function mn(e, t, n, o, s, r) {
|
|
|
1173
1178
|
marginLeft: "auto",
|
|
1174
1179
|
marginRight: "auto"
|
|
1175
1180
|
}
|
|
1176
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
1177
|
-
|
|
1181
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
1182
|
+
P(e.$slots, "default")
|
|
1178
1183
|
], 16);
|
|
1179
1184
|
}
|
|
1180
|
-
const
|
|
1185
|
+
const mn = /* @__PURE__ */ y(un, [["render", pn]]), hn = (e) => {
|
|
1181
1186
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1182
1187
|
return e;
|
|
1183
1188
|
const t = e.split(".");
|
|
@@ -1190,16 +1195,16 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1190
1195
|
try {
|
|
1191
1196
|
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
1192
1197
|
} catch (o) {
|
|
1193
|
-
|
|
1198
|
+
$.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
1194
1199
|
return;
|
|
1195
1200
|
}
|
|
1196
|
-
}, Oe = async (e) => Ue(e),
|
|
1201
|
+
}, Oe = async (e) => Ue(e), fn = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(N).join("; "), bn = [["secure", ""], ["SameSite", "None"]], gn = ({
|
|
1197
1202
|
name: e,
|
|
1198
1203
|
value: t,
|
|
1199
1204
|
expires: n
|
|
1200
1205
|
}) => {
|
|
1201
|
-
const s = (w() ? location.protocol === "https:" : !0) ?
|
|
1202
|
-
return
|
|
1206
|
+
const s = (w() ? location.protocol === "https:" : !0) ? bn : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [[e, t], ...r, ["path", "/"], ["domain", hn(window.location.hostname)], ...s];
|
|
1207
|
+
return fn(i);
|
|
1203
1208
|
}, Me = async ({
|
|
1204
1209
|
name: e,
|
|
1205
1210
|
value: t,
|
|
@@ -1209,16 +1214,16 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1209
1214
|
try {
|
|
1210
1215
|
if (!o)
|
|
1211
1216
|
return;
|
|
1212
|
-
const s =
|
|
1217
|
+
const s = gn({
|
|
1213
1218
|
name: e,
|
|
1214
1219
|
value: t,
|
|
1215
1220
|
expires: n
|
|
1216
1221
|
});
|
|
1217
1222
|
document.cookie = s;
|
|
1218
1223
|
} catch (s) {
|
|
1219
|
-
|
|
1224
|
+
$.warn("[COOKIE] SET error: ", (s == null ? void 0 : s.message) || s);
|
|
1220
1225
|
}
|
|
1221
|
-
},
|
|
1226
|
+
}, yn = "builder.tests", ue = (e) => `${yn}.${e}`, kn = ({
|
|
1222
1227
|
contentId: e
|
|
1223
1228
|
}) => Oe({
|
|
1224
1229
|
name: ue(e),
|
|
@@ -1228,14 +1233,14 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1228
1233
|
}) => Ue({
|
|
1229
1234
|
name: ue(e),
|
|
1230
1235
|
canTrack: !0
|
|
1231
|
-
}),
|
|
1236
|
+
}), vn = ({
|
|
1232
1237
|
contentId: e,
|
|
1233
1238
|
value: t
|
|
1234
1239
|
}) => Me({
|
|
1235
1240
|
name: ue(e),
|
|
1236
1241
|
value: t,
|
|
1237
1242
|
canTrack: !0
|
|
1238
|
-
}), Le = (e) => N(e.id) && N(e.variations) && Object.keys(e.variations).length > 0,
|
|
1243
|
+
}), Le = (e) => N(e.id) && N(e.variations) && Object.keys(e.variations).length > 0, Cn = ({
|
|
1239
1244
|
id: e,
|
|
1240
1245
|
variations: t
|
|
1241
1246
|
}) => {
|
|
@@ -1248,20 +1253,21 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1248
1253
|
return r;
|
|
1249
1254
|
}
|
|
1250
1255
|
return e;
|
|
1251
|
-
},
|
|
1252
|
-
const t =
|
|
1253
|
-
return
|
|
1256
|
+
}, De = (e) => {
|
|
1257
|
+
const t = Cn(e);
|
|
1258
|
+
return vn({
|
|
1254
1259
|
contentId: e.id,
|
|
1255
1260
|
value: t
|
|
1256
1261
|
}).catch((n) => {
|
|
1257
|
-
|
|
1262
|
+
$.error("could not store A/B test variation: ", n);
|
|
1258
1263
|
}), t;
|
|
1259
|
-
},
|
|
1264
|
+
}, He = ({
|
|
1260
1265
|
item: e,
|
|
1261
1266
|
testGroupId: t
|
|
1262
1267
|
}) => {
|
|
1263
1268
|
const n = e.variations[t];
|
|
1264
|
-
return t === e.id ||
|
|
1269
|
+
return t === e.id || // handle edge-case where `testGroupId` points to non-existing variation
|
|
1270
|
+
!n ? {
|
|
1265
1271
|
testVariationId: e.id,
|
|
1266
1272
|
testVariationName: "Default"
|
|
1267
1273
|
} : {
|
|
@@ -1269,7 +1275,7 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1269
1275
|
testVariationId: n.id,
|
|
1270
1276
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
1271
1277
|
};
|
|
1272
|
-
},
|
|
1278
|
+
}, wn = ({
|
|
1273
1279
|
item: e,
|
|
1274
1280
|
canTrack: t
|
|
1275
1281
|
}) => {
|
|
@@ -1281,10 +1287,10 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1281
1287
|
return e;
|
|
1282
1288
|
const n = Sn({
|
|
1283
1289
|
contentId: e.id
|
|
1284
|
-
}) ||
|
|
1290
|
+
}) || De({
|
|
1285
1291
|
variations: e.variations,
|
|
1286
1292
|
id: e.id
|
|
1287
|
-
}), o =
|
|
1293
|
+
}), o = He({
|
|
1288
1294
|
item: e,
|
|
1289
1295
|
testGroupId: n
|
|
1290
1296
|
});
|
|
@@ -1298,12 +1304,12 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1298
1304
|
}) => {
|
|
1299
1305
|
if (!t || !Le(e))
|
|
1300
1306
|
return e;
|
|
1301
|
-
const o = await
|
|
1307
|
+
const o = await kn({
|
|
1302
1308
|
contentId: e.id
|
|
1303
|
-
}) ||
|
|
1309
|
+
}) || De({
|
|
1304
1310
|
variations: e.variations,
|
|
1305
1311
|
id: e.id
|
|
1306
|
-
}), s =
|
|
1312
|
+
}), s = He({
|
|
1307
1313
|
item: e,
|
|
1308
1314
|
testGroupId: o
|
|
1309
1315
|
});
|
|
@@ -1311,10 +1317,11 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1311
1317
|
...e,
|
|
1312
1318
|
...s
|
|
1313
1319
|
};
|
|
1314
|
-
},
|
|
1320
|
+
}, H = (e) => N(e) ? e : !0, $n = {
|
|
1315
1321
|
name: "Core:Button",
|
|
1316
1322
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1317
1323
|
defaultStyles: {
|
|
1324
|
+
// TODO: make min width more intuitive and set one
|
|
1318
1325
|
appearance: "none",
|
|
1319
1326
|
paddingTop: "15px",
|
|
1320
1327
|
paddingBottom: "15px",
|
|
@@ -1343,7 +1350,8 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1343
1350
|
}],
|
|
1344
1351
|
static: !0,
|
|
1345
1352
|
noWrap: !0
|
|
1346
|
-
},
|
|
1353
|
+
}, Tn = {
|
|
1354
|
+
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1347
1355
|
name: "Columns",
|
|
1348
1356
|
isRSC: !0,
|
|
1349
1357
|
inputs: [{
|
|
@@ -1521,7 +1529,7 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1521
1529
|
});
|
|
1522
1530
|
}
|
|
1523
1531
|
const n = e.get("columns");
|
|
1524
|
-
Array.isArray(n) &&
|
|
1532
|
+
Array.isArray(n) && n.find((s) => s.get("width")) && (n.find((r) => !r.get("width")) || n.reduce((a, l) => a + l.get("width"), 0) !== 100) && t();
|
|
1525
1533
|
}
|
|
1526
1534
|
}, {
|
|
1527
1535
|
name: "space",
|
|
@@ -1543,13 +1551,13 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1543
1551
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1544
1552
|
advanced: !0
|
|
1545
1553
|
}]
|
|
1546
|
-
},
|
|
1554
|
+
}, Rn = {
|
|
1547
1555
|
name: "Fragment",
|
|
1548
1556
|
static: !0,
|
|
1549
1557
|
hidden: !0,
|
|
1550
1558
|
canHaveChildren: !0,
|
|
1551
1559
|
noWrap: !0
|
|
1552
|
-
},
|
|
1560
|
+
}, En = {
|
|
1553
1561
|
name: "Image",
|
|
1554
1562
|
static: !0,
|
|
1555
1563
|
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",
|
|
@@ -1570,15 +1578,15 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1570
1578
|
onChange: (e) => {
|
|
1571
1579
|
e.delete("srcset"), e.delete("noWebp");
|
|
1572
1580
|
function n(i, a = 6e4) {
|
|
1573
|
-
return new Promise((l,
|
|
1574
|
-
const
|
|
1575
|
-
let
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
},
|
|
1579
|
-
console.warn("Image load failed",
|
|
1580
|
-
}),
|
|
1581
|
-
|
|
1581
|
+
return new Promise((l, d) => {
|
|
1582
|
+
const m = document.createElement("img");
|
|
1583
|
+
let c = !1;
|
|
1584
|
+
m.onload = () => {
|
|
1585
|
+
c = !0, l(m);
|
|
1586
|
+
}, m.addEventListener("error", (p) => {
|
|
1587
|
+
console.warn("Image load failed", p.error), d(p.error);
|
|
1588
|
+
}), m.src = i, setTimeout(() => {
|
|
1589
|
+
c || d(new Error("Image load timed out"));
|
|
1582
1590
|
}, a);
|
|
1583
1591
|
});
|
|
1584
1592
|
}
|
|
@@ -1649,7 +1657,7 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1649
1657
|
advanced: !0,
|
|
1650
1658
|
defaultValue: 0.7041
|
|
1651
1659
|
}]
|
|
1652
|
-
},
|
|
1660
|
+
}, Pn = {
|
|
1653
1661
|
name: "Core:Section",
|
|
1654
1662
|
static: !0,
|
|
1655
1663
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1694,19 +1702,20 @@ const hn = /* @__PURE__ */ b(pn, [["render", mn], ["__file", "/home/runner/work/
|
|
|
1694
1702
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
1695
1703
|
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
1696
1704
|
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
1705
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
1697
1706
|
inputs: [{
|
|
1698
1707
|
name: "name",
|
|
1699
1708
|
type: "string",
|
|
1700
1709
|
required: !0,
|
|
1701
1710
|
defaultValue: "children"
|
|
1702
1711
|
}]
|
|
1703
|
-
},
|
|
1712
|
+
}, xn = f({
|
|
1704
1713
|
name: "builder-slot",
|
|
1705
|
-
components: { Blocks:
|
|
1714
|
+
components: { Blocks: K },
|
|
1706
1715
|
props: ["js", "builderContext", "name"]
|
|
1707
1716
|
});
|
|
1708
|
-
function
|
|
1709
|
-
var a, l,
|
|
1717
|
+
function Vn(e, t, n, o, s, r) {
|
|
1718
|
+
var a, l, d;
|
|
1710
1719
|
const i = k("blocks");
|
|
1711
1720
|
return u(), h("div", C(
|
|
1712
1721
|
{ style: {
|
|
@@ -1720,11 +1729,11 @@ function Bn(e, t, n, o, s, r) {
|
|
|
1720
1729
|
parent: (l = e.builderContext.context) == null ? void 0 : l.symbolId,
|
|
1721
1730
|
path: `symbol.data.${e.name}`,
|
|
1722
1731
|
context: e.builderContext,
|
|
1723
|
-
blocks: (
|
|
1732
|
+
blocks: (d = e.builderContext.rootState) == null ? void 0 : d[e.name]
|
|
1724
1733
|
}, null, 8, ["parent", "path", "context", "blocks"])
|
|
1725
1734
|
], 16);
|
|
1726
1735
|
}
|
|
1727
|
-
const
|
|
1736
|
+
const Bn = /* @__PURE__ */ y(xn, [["render", Vn]]), Wn = {
|
|
1728
1737
|
name: "Symbol",
|
|
1729
1738
|
noWrap: !0,
|
|
1730
1739
|
static: !0,
|
|
@@ -1757,7 +1766,7 @@ const Wn = /* @__PURE__ */ b(Vn, [["render", Bn], ["__file", "/home/runner/work/
|
|
|
1757
1766
|
hideFromUI: !0,
|
|
1758
1767
|
type: "boolean"
|
|
1759
1768
|
}]
|
|
1760
|
-
},
|
|
1769
|
+
}, Nn = {
|
|
1761
1770
|
name: "Text",
|
|
1762
1771
|
static: !0,
|
|
1763
1772
|
isRSC: !0,
|
|
@@ -1775,11 +1784,11 @@ const Wn = /* @__PURE__ */ b(Vn, [["render", Bn], ["__file", "/home/runner/work/
|
|
|
1775
1784
|
height: "auto",
|
|
1776
1785
|
textAlign: "center"
|
|
1777
1786
|
}
|
|
1778
|
-
},
|
|
1787
|
+
}, Fn = f({
|
|
1779
1788
|
name: "builder-text",
|
|
1780
1789
|
props: ["text"]
|
|
1781
|
-
}),
|
|
1782
|
-
function
|
|
1790
|
+
}), Un = ["innerHTML"];
|
|
1791
|
+
function On(e, t, n, o, s, r) {
|
|
1783
1792
|
var i;
|
|
1784
1793
|
return u(), h("div", {
|
|
1785
1794
|
class: "builder-text",
|
|
@@ -1787,9 +1796,9 @@ function Mn(e, t, n, o, s, r) {
|
|
|
1787
1796
|
style: {
|
|
1788
1797
|
outline: "none"
|
|
1789
1798
|
}
|
|
1790
|
-
}, null, 8,
|
|
1799
|
+
}, null, 8, Un);
|
|
1791
1800
|
}
|
|
1792
|
-
const
|
|
1801
|
+
const Mn = /* @__PURE__ */ y(Fn, [["render", On]]), Ln = {
|
|
1793
1802
|
name: "Custom Code",
|
|
1794
1803
|
static: !0,
|
|
1795
1804
|
requiredPermissions: ["editCode"],
|
|
@@ -1853,7 +1862,7 @@ function jn(e, t, n, o, s, r) {
|
|
|
1853
1862
|
innerHTML: e.code
|
|
1854
1863
|
}, null, 10, Hn);
|
|
1855
1864
|
}
|
|
1856
|
-
const Kn = /* @__PURE__ */
|
|
1865
|
+
const Kn = /* @__PURE__ */ y(Dn, [["render", jn]]), qn = {
|
|
1857
1866
|
name: "Embed",
|
|
1858
1867
|
static: !0,
|
|
1859
1868
|
inputs: [{
|
|
@@ -1921,15 +1930,16 @@ const Kn = /* @__PURE__ */ b(Dn, [["render", jn], ["__file", "/home/runner/work/
|
|
|
1921
1930
|
}
|
|
1922
1931
|
}
|
|
1923
1932
|
}), Yn = ["innerHTML"];
|
|
1924
|
-
function
|
|
1933
|
+
function _n(e, t, n, o, s, r) {
|
|
1925
1934
|
return u(), h("div", {
|
|
1926
1935
|
class: "builder-embed",
|
|
1927
1936
|
ref: "elem",
|
|
1928
1937
|
innerHTML: e.content
|
|
1929
1938
|
}, null, 8, Yn);
|
|
1930
1939
|
}
|
|
1931
|
-
const
|
|
1940
|
+
const Qn = /* @__PURE__ */ y(Gn, [["render", _n]]), Xn = {
|
|
1932
1941
|
name: "Form:Form",
|
|
1942
|
+
// editableTags: ['builder-form-error']
|
|
1933
1943
|
defaults: {
|
|
1934
1944
|
responsiveStyles: {
|
|
1935
1945
|
large: {
|
|
@@ -1942,6 +1952,11 @@ const Xn = /* @__PURE__ */ b(Gn, [["render", Qn], ["__file", "/home/runner/work/
|
|
|
1942
1952
|
inputs: [{
|
|
1943
1953
|
name: "sendSubmissionsTo",
|
|
1944
1954
|
type: "string",
|
|
1955
|
+
// TODO: save to builder data and user can download as csv
|
|
1956
|
+
// TODO: easy for mode too or computed add/remove fields form mode
|
|
1957
|
+
// so you can edit details and high level mode at same time...
|
|
1958
|
+
// Later - more integrations like mailchimp
|
|
1959
|
+
// /api/v1/form-submit?to=mailchimp
|
|
1945
1960
|
enum: [{
|
|
1946
1961
|
label: "Send to email",
|
|
1947
1962
|
value: "email",
|
|
@@ -1956,6 +1971,7 @@ const Xn = /* @__PURE__ */ b(Gn, [["render", Qn], ["__file", "/home/runner/work/
|
|
|
1956
1971
|
name: "sendSubmissionsToEmail",
|
|
1957
1972
|
type: "string",
|
|
1958
1973
|
required: !0,
|
|
1974
|
+
// TODO: required: () => options.get("sendSubmissionsTo") === "email"
|
|
1959
1975
|
defaultValue: "your@email.com",
|
|
1960
1976
|
showIf: 'options.get("sendSubmissionsTo") === "email"'
|
|
1961
1977
|
}, {
|
|
@@ -1968,6 +1984,7 @@ const Xn = /* @__PURE__ */ b(Gn, [["render", Qn], ["__file", "/home/runner/work/
|
|
|
1968
1984
|
name: "name",
|
|
1969
1985
|
type: "string",
|
|
1970
1986
|
defaultValue: "My form"
|
|
1987
|
+
// advanced: true
|
|
1971
1988
|
}, {
|
|
1972
1989
|
name: "action",
|
|
1973
1990
|
type: "string",
|
|
@@ -1978,6 +1995,7 @@ const Xn = /* @__PURE__ */ b(Gn, [["render", Qn], ["__file", "/home/runner/work/
|
|
|
1978
1995
|
type: "string",
|
|
1979
1996
|
defaultValue: "application/json",
|
|
1980
1997
|
advanced: !0,
|
|
1998
|
+
// TODO: do automatically if file input
|
|
1981
1999
|
enum: ["application/json", "multipart/form-data", "application/x-www-form-urlencoded"],
|
|
1982
2000
|
showIf: 'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'
|
|
1983
2001
|
}, {
|
|
@@ -1989,6 +2007,7 @@ const Xn = /* @__PURE__ */ b(Gn, [["render", Qn], ["__file", "/home/runner/work/
|
|
|
1989
2007
|
}, {
|
|
1990
2008
|
name: "previewState",
|
|
1991
2009
|
type: "string",
|
|
2010
|
+
// TODO: persist: false flag
|
|
1992
2011
|
enum: ["unsubmitted", "sending", "success", "error"],
|
|
1993
2012
|
defaultValue: "unsubmitted",
|
|
1994
2013
|
helperText: 'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',
|
|
@@ -2149,15 +2168,15 @@ const Xn = /* @__PURE__ */ b(Gn, [["render", Qn], ["__file", "/home/runner/work/
|
|
|
2149
2168
|
}
|
|
2150
2169
|
}
|
|
2151
2170
|
}]
|
|
2152
|
-
},
|
|
2171
|
+
}, Zn = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], eo = () => {
|
|
2153
2172
|
const e = process.env.NODE_ENV || "production";
|
|
2154
|
-
return
|
|
2155
|
-
},
|
|
2173
|
+
return Zn.includes(e) ? e : "production";
|
|
2174
|
+
}, to = (e, t, n) => {
|
|
2156
2175
|
const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((s, r) => s != null ? s[r] : s, e);
|
|
2157
2176
|
return o === void 0 || o === e ? n : o;
|
|
2158
|
-
},
|
|
2177
|
+
}, no = f({
|
|
2159
2178
|
name: "builder-form-component",
|
|
2160
|
-
components: { Block: ce, Blocks:
|
|
2179
|
+
components: { Block: ce, Blocks: K },
|
|
2161
2180
|
props: [
|
|
2162
2181
|
"js",
|
|
2163
2182
|
"builderContext",
|
|
@@ -2217,112 +2236,111 @@ const Xn = /* @__PURE__ */ b(Gn, [["render", Qn], ["__file", "/home/runner/work/
|
|
|
2217
2236
|
let r;
|
|
2218
2237
|
const i = new FormData(o), a = Array.from(
|
|
2219
2238
|
e.currentTarget.querySelectorAll("input,select,textarea")
|
|
2220
|
-
).filter((
|
|
2221
|
-
let
|
|
2222
|
-
const
|
|
2223
|
-
if (
|
|
2224
|
-
if (
|
|
2225
|
-
if (
|
|
2226
|
-
return
|
|
2227
|
-
key:
|
|
2228
|
-
value:
|
|
2239
|
+
).filter((c) => !!c.name).map((c) => {
|
|
2240
|
+
let p;
|
|
2241
|
+
const S = c.name;
|
|
2242
|
+
if (c instanceof HTMLInputElement)
|
|
2243
|
+
if (c.type === "radio") {
|
|
2244
|
+
if (c.checked)
|
|
2245
|
+
return p = c.name, {
|
|
2246
|
+
key: S,
|
|
2247
|
+
value: p
|
|
2229
2248
|
};
|
|
2230
|
-
} else if (
|
|
2231
|
-
|
|
2232
|
-
else if (
|
|
2233
|
-
const
|
|
2234
|
-
isNaN(
|
|
2249
|
+
} else if (c.type === "checkbox")
|
|
2250
|
+
p = c.checked;
|
|
2251
|
+
else if (c.type === "number" || c.type === "range") {
|
|
2252
|
+
const b = c.valueAsNumber;
|
|
2253
|
+
isNaN(b) || (p = b);
|
|
2235
2254
|
} else
|
|
2236
|
-
|
|
2255
|
+
c.type === "file" ? p = c.files : p = c.value;
|
|
2237
2256
|
else
|
|
2238
|
-
|
|
2257
|
+
p = c.value;
|
|
2239
2258
|
return {
|
|
2240
|
-
key:
|
|
2241
|
-
value:
|
|
2259
|
+
key: S,
|
|
2260
|
+
value: p
|
|
2242
2261
|
};
|
|
2243
2262
|
});
|
|
2244
2263
|
let l = this.contentType;
|
|
2245
|
-
if (this.sendSubmissionsTo === "email" && (l = "multipart/form-data"), Array.from(a).forEach(({ value:
|
|
2246
|
-
(
|
|
2264
|
+
if (this.sendSubmissionsTo === "email" && (l = "multipart/form-data"), Array.from(a).forEach(({ value: c }) => {
|
|
2265
|
+
(c instanceof File || Array.isArray(c) && c[0] instanceof File || c instanceof FileList) && (l = "multipart/form-data");
|
|
2247
2266
|
}), l !== "application/json")
|
|
2248
2267
|
r = i;
|
|
2249
2268
|
else {
|
|
2250
|
-
const
|
|
2251
|
-
Array.from(a).forEach(({ value:
|
|
2252
|
-
|
|
2253
|
-
}), r = JSON.stringify(
|
|
2269
|
+
const c = {};
|
|
2270
|
+
Array.from(a).forEach(({ value: p, key: S }) => {
|
|
2271
|
+
xe(c, S, p);
|
|
2272
|
+
}), r = JSON.stringify(c);
|
|
2254
2273
|
}
|
|
2255
|
-
l && l !== "multipart/form-data" && (t && ((n = this.action)
|
|
2256
|
-
const
|
|
2274
|
+
l && l !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (s["content-type"] = l));
|
|
2275
|
+
const d = new CustomEvent("presubmit", {
|
|
2257
2276
|
detail: {
|
|
2258
2277
|
body: r
|
|
2259
2278
|
}
|
|
2260
2279
|
});
|
|
2261
|
-
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(
|
|
2280
|
+
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(d), d.defaultPrevented))
|
|
2262
2281
|
return;
|
|
2263
2282
|
this.formState = "sending";
|
|
2264
|
-
const
|
|
2283
|
+
const m = `${eo() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
|
|
2265
2284
|
this.sendSubmissionsToEmail || ""
|
|
2266
2285
|
)}&name=${encodeURIComponent(this.name || "")}`;
|
|
2267
2286
|
fetch(
|
|
2268
|
-
this.sendSubmissionsTo === "email" ?
|
|
2287
|
+
this.sendSubmissionsTo === "email" ? m : this.action,
|
|
2269
2288
|
{
|
|
2270
2289
|
body: r,
|
|
2271
2290
|
headers: s,
|
|
2272
2291
|
method: this.method || "post"
|
|
2273
2292
|
}
|
|
2274
2293
|
).then(
|
|
2275
|
-
async (
|
|
2276
|
-
let
|
|
2277
|
-
const
|
|
2278
|
-
if (
|
|
2279
|
-
let
|
|
2280
|
-
|
|
2281
|
-
formErrorMessage:
|
|
2294
|
+
async (c) => {
|
|
2295
|
+
let p;
|
|
2296
|
+
const S = c.headers.get("content-type");
|
|
2297
|
+
if (S && S.indexOf("application/json") !== -1 ? p = await c.json() : p = await c.text(), !c.ok && this.errorMessagePath) {
|
|
2298
|
+
let b = to(p, this.errorMessagePath);
|
|
2299
|
+
b && (typeof b != "string" && (b = JSON.stringify(b)), this.formErrorMessage = b, this.mergeNewRootState({
|
|
2300
|
+
formErrorMessage: b
|
|
2282
2301
|
}));
|
|
2283
2302
|
}
|
|
2284
|
-
if (this.responseData =
|
|
2285
|
-
const
|
|
2303
|
+
if (this.responseData = p, this.formState = c.ok ? "success" : "error", c.ok) {
|
|
2304
|
+
const b = new CustomEvent("submit:success", {
|
|
2286
2305
|
detail: {
|
|
2287
|
-
res:
|
|
2288
|
-
body:
|
|
2306
|
+
res: c,
|
|
2307
|
+
body: p
|
|
2289
2308
|
}
|
|
2290
2309
|
});
|
|
2291
2310
|
if (this.$refs.formRef) {
|
|
2292
|
-
if (this.$refs.formRef.dispatchEvent(
|
|
2311
|
+
if (this.$refs.formRef.dispatchEvent(b), b.defaultPrevented)
|
|
2293
2312
|
return;
|
|
2294
2313
|
this.resetFormOnSubmit !== !1 && this.$refs.formRef.reset();
|
|
2295
2314
|
}
|
|
2296
2315
|
if (this.successUrl)
|
|
2297
2316
|
if (this.$refs.formRef) {
|
|
2298
|
-
const
|
|
2317
|
+
const x = new CustomEvent("route", {
|
|
2299
2318
|
detail: {
|
|
2300
2319
|
url: this.successUrl
|
|
2301
2320
|
}
|
|
2302
2321
|
});
|
|
2303
|
-
this.$refs.formRef.dispatchEvent(
|
|
2322
|
+
this.$refs.formRef.dispatchEvent(x), x.defaultPrevented || (location.href = this.successUrl);
|
|
2304
2323
|
} else
|
|
2305
2324
|
location.href = this.successUrl;
|
|
2306
2325
|
}
|
|
2307
2326
|
},
|
|
2308
|
-
(
|
|
2309
|
-
const
|
|
2327
|
+
(c) => {
|
|
2328
|
+
const p = new CustomEvent("submit:error", {
|
|
2310
2329
|
detail: {
|
|
2311
|
-
error:
|
|
2330
|
+
error: c
|
|
2312
2331
|
}
|
|
2313
2332
|
});
|
|
2314
|
-
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(
|
|
2333
|
+
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(p), p.defaultPrevented) || (this.responseData = c, this.formState = "error");
|
|
2315
2334
|
}
|
|
2316
2335
|
);
|
|
2317
2336
|
}
|
|
2318
2337
|
}
|
|
2319
2338
|
}
|
|
2320
|
-
})
|
|
2321
|
-
const so = ["validate", "action", "method", "name"], ro = {
|
|
2339
|
+
}), oo = ["validate", "action", "method", "name"], so = {
|
|
2322
2340
|
key: 3,
|
|
2323
2341
|
class: "builder-form-error-text pre-tqyw9m0iue"
|
|
2324
2342
|
};
|
|
2325
|
-
function
|
|
2343
|
+
function ro(e, t, n, o, s, r) {
|
|
2326
2344
|
var l;
|
|
2327
2345
|
const i = k("block"), a = k("blocks");
|
|
2328
2346
|
return u(), h("form", C({
|
|
@@ -2331,38 +2349,38 @@ function io(e, t, n, o, s, r) {
|
|
|
2331
2349
|
action: !e.sendWithJs && e.action,
|
|
2332
2350
|
method: e.method,
|
|
2333
2351
|
name: e.name,
|
|
2334
|
-
onSubmit: t[0] || (t[0] = (
|
|
2335
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
2336
|
-
e.builderBlock && e.builderBlock.children ? (u(!0), h(
|
|
2352
|
+
onSubmit: t[0] || (t[0] = (d) => e.onSubmit(d))
|
|
2353
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
2354
|
+
e.builderBlock && e.builderBlock.children ? (u(!0), h(I, { key: 0 }, O((l = e.builderBlock) == null ? void 0 : l.children, (d, m) => (u(), g(i, {
|
|
2337
2355
|
key: `form-block-${e.idx}`,
|
|
2338
|
-
block:
|
|
2356
|
+
block: d,
|
|
2339
2357
|
context: e.builderContext,
|
|
2340
2358
|
registeredComponents: e.builderComponents,
|
|
2341
2359
|
linkComponent: e.builderLinkComponent
|
|
2342
|
-
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) :
|
|
2343
|
-
e.submissionState() === "error" ? (u(),
|
|
2360
|
+
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : v("", !0),
|
|
2361
|
+
e.submissionState() === "error" ? (u(), g(a, {
|
|
2344
2362
|
key: 1,
|
|
2345
2363
|
path: "errorMessage",
|
|
2346
2364
|
blocks: e.errorMessage,
|
|
2347
2365
|
context: e.builderContext
|
|
2348
|
-
}, null, 8, ["blocks", "context"])) :
|
|
2349
|
-
e.submissionState() === "sending" ? (u(),
|
|
2366
|
+
}, null, 8, ["blocks", "context"])) : v("", !0),
|
|
2367
|
+
e.submissionState() === "sending" ? (u(), g(a, {
|
|
2350
2368
|
key: 2,
|
|
2351
2369
|
path: "sendingMessage",
|
|
2352
2370
|
blocks: e.sendingMessage,
|
|
2353
2371
|
context: e.builderContext
|
|
2354
|
-
}, null, 8, ["blocks", "context"])) :
|
|
2355
|
-
e.submissionState() === "error" && e.responseData ? (u(), h("pre",
|
|
2356
|
-
`, 1)) :
|
|
2357
|
-
e.submissionState() === "success" ? (u(),
|
|
2372
|
+
}, null, 8, ["blocks", "context"])) : v("", !0),
|
|
2373
|
+
e.submissionState() === "error" && e.responseData ? (u(), h("pre", so, " " + _(JSON.stringify(e.responseData, null, 2)) + `
|
|
2374
|
+
`, 1)) : v("", !0),
|
|
2375
|
+
e.submissionState() === "success" ? (u(), g(a, {
|
|
2358
2376
|
key: 4,
|
|
2359
2377
|
path: "successMessage",
|
|
2360
2378
|
blocks: e.successMessage,
|
|
2361
2379
|
context: e.builderContext
|
|
2362
|
-
}, null, 8, ["blocks", "context"])) :
|
|
2363
|
-
], 16,
|
|
2380
|
+
}, null, 8, ["blocks", "context"])) : v("", !0)
|
|
2381
|
+
], 16, oo);
|
|
2364
2382
|
}
|
|
2365
|
-
const
|
|
2383
|
+
const io = /* @__PURE__ */ y(no, [["render", ro], ["__scopeId", "data-v-e7803f50"]]), ao = {
|
|
2366
2384
|
name: "Form:Input",
|
|
2367
2385
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2368
2386
|
inputs: [
|
|
@@ -2384,6 +2402,7 @@ const ao = /* @__PURE__ */ b(oo, [["render", io], ["__scopeId", "data-v-fac74b80
|
|
|
2384
2402
|
defaultValue: "Hello there",
|
|
2385
2403
|
helperText: "Text to display when there is no value"
|
|
2386
2404
|
},
|
|
2405
|
+
// TODO: handle value vs default value automatically like ng-model
|
|
2387
2406
|
{
|
|
2388
2407
|
name: "defaultValue",
|
|
2389
2408
|
type: "string"
|
|
@@ -2412,7 +2431,7 @@ const ao = /* @__PURE__ */ b(oo, [["render", io], ["__scopeId", "data-v-fac74b80
|
|
|
2412
2431
|
borderStyle: "solid",
|
|
2413
2432
|
borderColor: "#ccc"
|
|
2414
2433
|
}
|
|
2415
|
-
},
|
|
2434
|
+
}, lo = f({
|
|
2416
2435
|
name: "builder-form-input-component",
|
|
2417
2436
|
props: [
|
|
2418
2437
|
"attributes",
|
|
@@ -2426,8 +2445,8 @@ const ao = /* @__PURE__ */ b(oo, [["render", io], ["__scopeId", "data-v-fac74b80
|
|
|
2426
2445
|
data() {
|
|
2427
2446
|
return { isEditing: T, filterAttrs: F };
|
|
2428
2447
|
}
|
|
2429
|
-
}),
|
|
2430
|
-
function
|
|
2448
|
+
}), co = ["placeholder", "type", "name", "value", "defaultValue", "required"];
|
|
2449
|
+
function uo(e, t, n, o, s, r) {
|
|
2431
2450
|
return u(), h("input", C({
|
|
2432
2451
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2433
2452
|
placeholder: e.placeholder,
|
|
@@ -2436,9 +2455,9 @@ function po(e, t, n, o, s, r) {
|
|
|
2436
2455
|
value: e.value,
|
|
2437
2456
|
defaultValue: e.defaultValue,
|
|
2438
2457
|
required: e.required
|
|
2439
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
2458
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, co);
|
|
2440
2459
|
}
|
|
2441
|
-
const
|
|
2460
|
+
const po = /* @__PURE__ */ y(lo, [["render", uo]]), mo = {
|
|
2442
2461
|
name: "Form:Select",
|
|
2443
2462
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
2444
2463
|
defaultStyles: {
|
|
@@ -2480,27 +2499,27 @@ const mo = /* @__PURE__ */ b(co, [["render", po], ["__file", "/home/runner/work/
|
|
|
2480
2499
|
}],
|
|
2481
2500
|
static: !0,
|
|
2482
2501
|
noWrap: !0
|
|
2483
|
-
},
|
|
2502
|
+
}, ho = f({
|
|
2484
2503
|
name: "builder-select-component",
|
|
2485
2504
|
props: ["attributes", "value", "defaultValue", "name", "options"],
|
|
2486
2505
|
data() {
|
|
2487
2506
|
return { isEditing: T, filterAttrs: F };
|
|
2488
2507
|
}
|
|
2489
|
-
}),
|
|
2490
|
-
function
|
|
2508
|
+
}), fo = ["value", "defaultValue", "name"], bo = ["value"];
|
|
2509
|
+
function go(e, t, n, o, s, r) {
|
|
2491
2510
|
return u(), h("select", C({
|
|
2492
2511
|
value: e.value,
|
|
2493
2512
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2494
2513
|
defaultValue: e.defaultValue,
|
|
2495
2514
|
name: e.name
|
|
2496
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
2497
|
-
(u(!0), h(
|
|
2515
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
2516
|
+
(u(!0), h(I, null, O(e.options, (i, a) => (u(), h("option", {
|
|
2498
2517
|
key: a,
|
|
2499
2518
|
value: i.value
|
|
2500
|
-
},
|
|
2501
|
-
], 16,
|
|
2519
|
+
}, _(i.name || i.value), 9, bo))), 128))
|
|
2520
|
+
], 16, fo);
|
|
2502
2521
|
}
|
|
2503
|
-
const
|
|
2522
|
+
const yo = /* @__PURE__ */ y(ho, [["render", go]]), ko = {
|
|
2504
2523
|
name: "Form:SubmitButton",
|
|
2505
2524
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
2506
2525
|
defaultStyles: {
|
|
@@ -2521,6 +2540,10 @@ const ko = /* @__PURE__ */ b(fo, [["render", yo], ["__file", "/home/runner/work/
|
|
|
2521
2540
|
}],
|
|
2522
2541
|
static: !0,
|
|
2523
2542
|
noWrap: !0
|
|
2543
|
+
// TODO: optional children? maybe as optional form input
|
|
2544
|
+
// that only shows if advanced setting is flipped
|
|
2545
|
+
// TODO: defaultChildren
|
|
2546
|
+
// canHaveChildren: true,
|
|
2524
2547
|
}, So = f({
|
|
2525
2548
|
name: "builder-submit-button",
|
|
2526
2549
|
props: ["attributes", "text"],
|
|
@@ -2528,10 +2551,11 @@ const ko = /* @__PURE__ */ b(fo, [["render", yo], ["__file", "/home/runner/work/
|
|
|
2528
2551
|
return { filterAttrs: F };
|
|
2529
2552
|
}
|
|
2530
2553
|
});
|
|
2531
|
-
function
|
|
2532
|
-
return u(), h("button", C({ type: "submit" }, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
2554
|
+
function vo(e, t, n, o, s, r) {
|
|
2555
|
+
return u(), h("button", C({ type: "submit" }, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), _(e.text), 17);
|
|
2533
2556
|
}
|
|
2534
|
-
const
|
|
2557
|
+
const Co = /* @__PURE__ */ y(So, [["render", vo]]), wo = {
|
|
2558
|
+
// friendlyName?
|
|
2535
2559
|
name: "Raw:Img",
|
|
2536
2560
|
hideFromInsertMenu: !0,
|
|
2537
2561
|
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",
|
|
@@ -2557,8 +2581,8 @@ const wo = /* @__PURE__ */ b(So, [["render", Co], ["__file", "/home/runner/work/
|
|
|
2557
2581
|
data() {
|
|
2558
2582
|
return { isEditing: T, filterAttrs: F };
|
|
2559
2583
|
}
|
|
2560
|
-
}),
|
|
2561
|
-
function
|
|
2584
|
+
}), $o = ["alt", "src"];
|
|
2585
|
+
function To(e, t, n, o, s, r) {
|
|
2562
2586
|
return u(), h("img", C({
|
|
2563
2587
|
style: {
|
|
2564
2588
|
objectFit: e.backgroundSize || "cover",
|
|
@@ -2567,9 +2591,9 @@ function Ro(e, t, n, o, s, r) {
|
|
|
2567
2591
|
key: e.isEditing() && e.imgSrc || "default-key",
|
|
2568
2592
|
alt: e.altText,
|
|
2569
2593
|
src: e.imgSrc || e.image
|
|
2570
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1),
|
|
2594
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, $o);
|
|
2571
2595
|
}
|
|
2572
|
-
const
|
|
2596
|
+
const Ro = /* @__PURE__ */ y(Io, [["render", To]]), Eo = {
|
|
2573
2597
|
name: "Video",
|
|
2574
2598
|
canHaveChildren: !0,
|
|
2575
2599
|
defaultStyles: {
|
|
@@ -2650,7 +2674,7 @@ const Eo = /* @__PURE__ */ b(Io, [["render", Ro], ["__file", "/home/runner/work/
|
|
|
2650
2674
|
defaultValue: !0,
|
|
2651
2675
|
advanced: !0
|
|
2652
2676
|
}]
|
|
2653
|
-
},
|
|
2677
|
+
}, Po = f({
|
|
2654
2678
|
name: "builder-video",
|
|
2655
2679
|
props: [
|
|
2656
2680
|
"autoPlay",
|
|
@@ -2697,14 +2721,14 @@ const Eo = /* @__PURE__ */ b(Io, [["render", Ro], ["__file", "/home/runner/work/
|
|
|
2697
2721
|
}
|
|
2698
2722
|
}), Ao = { style: {
|
|
2699
2723
|
position: "relative"
|
|
2700
|
-
} },
|
|
2724
|
+
} }, xo = ["preload", "src", "poster"], Vo = ["src"], Bo = {
|
|
2701
2725
|
key: 1,
|
|
2702
2726
|
style: {
|
|
2703
2727
|
display: "flex",
|
|
2704
2728
|
flexDirection: "column",
|
|
2705
2729
|
alignItems: "stretch"
|
|
2706
2730
|
}
|
|
2707
|
-
},
|
|
2731
|
+
}, Wo = {
|
|
2708
2732
|
key: 2,
|
|
2709
2733
|
style: {
|
|
2710
2734
|
pointerEvents: "none",
|
|
@@ -2718,8 +2742,8 @@ const Eo = /* @__PURE__ */ b(Io, [["render", Ro], ["__file", "/home/runner/work/
|
|
|
2718
2742
|
height: "100%"
|
|
2719
2743
|
}
|
|
2720
2744
|
};
|
|
2721
|
-
function
|
|
2722
|
-
var i, a, l,
|
|
2745
|
+
function No(e, t, n, o, s, r) {
|
|
2746
|
+
var i, a, l, d, m, c, p;
|
|
2723
2747
|
return u(), h("div", Ao, [
|
|
2724
2748
|
Z("video", C({
|
|
2725
2749
|
class: "builder-video",
|
|
@@ -2730,6 +2754,8 @@ function Fo(e, t, n, o, s, r) {
|
|
|
2730
2754
|
...(i = e.attributes) == null ? void 0 : i.style,
|
|
2731
2755
|
objectFit: e.fit,
|
|
2732
2756
|
objectPosition: e.position,
|
|
2757
|
+
// Hack to get object fit to work as expected and
|
|
2758
|
+
// not have the video overflow
|
|
2733
2759
|
zIndex: 2,
|
|
2734
2760
|
borderRadius: "1px",
|
|
2735
2761
|
...e.aspectRatio ? {
|
|
@@ -2739,13 +2765,13 @@ function Fo(e, t, n, o, s, r) {
|
|
|
2739
2765
|
src: e.video || "no-src",
|
|
2740
2766
|
poster: e.posterImage
|
|
2741
2767
|
}, e.spreadProps), [
|
|
2742
|
-
e.lazyLoad ?
|
|
2768
|
+
e.lazyLoad ? v("", !0) : (u(), h("source", {
|
|
2743
2769
|
key: 0,
|
|
2744
2770
|
type: "video/mp4",
|
|
2745
2771
|
src: e.video
|
|
2746
|
-
}, null, 8,
|
|
2747
|
-
], 16,
|
|
2748
|
-
e.aspectRatio && !(e.fitContent && ((l = (a = e.builderBlock) == null ? void 0 : a.children)
|
|
2772
|
+
}, null, 8, Vo))
|
|
2773
|
+
], 16, xo),
|
|
2774
|
+
e.aspectRatio && !(e.fitContent && ((l = (a = e.builderBlock) == null ? void 0 : a.children) != null && l.length)) ? (u(), h("div", {
|
|
2749
2775
|
key: 0,
|
|
2750
2776
|
style: ee({
|
|
2751
2777
|
width: "100%",
|
|
@@ -2753,77 +2779,77 @@ function Fo(e, t, n, o, s, r) {
|
|
|
2753
2779
|
pointerEvents: "none",
|
|
2754
2780
|
fontSize: "0px"
|
|
2755
2781
|
})
|
|
2756
|
-
}, null, 4)) :
|
|
2757
|
-
(
|
|
2758
|
-
|
|
2759
|
-
])) :
|
|
2760
|
-
(
|
|
2761
|
-
|
|
2762
|
-
])) :
|
|
2782
|
+
}, null, 4)) : v("", !0),
|
|
2783
|
+
(m = (d = e.builderBlock) == null ? void 0 : d.children) != null && m.length && e.fitContent ? (u(), h("div", Bo, [
|
|
2784
|
+
P(e.$slots, "default")
|
|
2785
|
+
])) : v("", !0),
|
|
2786
|
+
(p = (c = e.builderBlock) == null ? void 0 : c.children) != null && p.length && !e.fitContent ? (u(), h("div", Wo, [
|
|
2787
|
+
P(e.$slots, "default")
|
|
2788
|
+
])) : v("", !0)
|
|
2763
2789
|
]);
|
|
2764
2790
|
}
|
|
2765
|
-
const
|
|
2791
|
+
const Fo = /* @__PURE__ */ y(Po, [["render", No]]), Uo = () => [{
|
|
2766
2792
|
component: Kn,
|
|
2767
|
-
...
|
|
2793
|
+
...Ln
|
|
2768
2794
|
}, {
|
|
2769
|
-
component:
|
|
2795
|
+
component: Qn,
|
|
2770
2796
|
...qn
|
|
2771
2797
|
}, {
|
|
2772
|
-
component:
|
|
2773
|
-
...
|
|
2798
|
+
component: io,
|
|
2799
|
+
...Xn
|
|
2774
2800
|
}, {
|
|
2775
|
-
component:
|
|
2776
|
-
...
|
|
2801
|
+
component: po,
|
|
2802
|
+
...ao
|
|
2777
2803
|
}, {
|
|
2778
|
-
component:
|
|
2779
|
-
...
|
|
2804
|
+
component: Co,
|
|
2805
|
+
...ko
|
|
2780
2806
|
}, {
|
|
2781
|
-
component:
|
|
2782
|
-
...
|
|
2807
|
+
component: yo,
|
|
2808
|
+
...mo
|
|
2783
2809
|
}, {
|
|
2784
|
-
component:
|
|
2785
|
-
|
|
2810
|
+
component: Ro,
|
|
2811
|
+
...wo
|
|
2786
2812
|
}, {
|
|
2787
|
-
component:
|
|
2788
|
-
...
|
|
2813
|
+
component: Fo,
|
|
2814
|
+
...Eo
|
|
2789
2815
|
}], ge = () => [{
|
|
2790
2816
|
component: ht,
|
|
2817
|
+
...$n
|
|
2818
|
+
}, {
|
|
2819
|
+
component: Xt,
|
|
2791
2820
|
...Tn
|
|
2792
2821
|
}, {
|
|
2793
|
-
component:
|
|
2822
|
+
component: tn,
|
|
2794
2823
|
...Rn
|
|
2795
2824
|
}, {
|
|
2796
|
-
component:
|
|
2825
|
+
component: dn,
|
|
2797
2826
|
...En
|
|
2798
2827
|
}, {
|
|
2799
|
-
component:
|
|
2828
|
+
component: mn,
|
|
2800
2829
|
...Pn
|
|
2801
2830
|
}, {
|
|
2802
|
-
component:
|
|
2803
|
-
...xn
|
|
2804
|
-
}, {
|
|
2805
|
-
component: Wn,
|
|
2831
|
+
component: Bn,
|
|
2806
2832
|
...An
|
|
2807
2833
|
}, {
|
|
2808
|
-
component:
|
|
2809
|
-
...
|
|
2834
|
+
component: Hs,
|
|
2835
|
+
...Wn
|
|
2810
2836
|
}, {
|
|
2811
|
-
component:
|
|
2812
|
-
...
|
|
2813
|
-
}, ...
|
|
2837
|
+
component: Mn,
|
|
2838
|
+
...Nn
|
|
2839
|
+
}, ...Uo()], ye = [], Oo = (e) => ({
|
|
2814
2840
|
type: "builder.registerComponent",
|
|
2815
2841
|
data: ne(e)
|
|
2816
|
-
}),
|
|
2842
|
+
}), Mo = (e) => {
|
|
2817
2843
|
const t = e.toString().trim();
|
|
2818
2844
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
2819
|
-
},
|
|
2845
|
+
}, Lo = (e) => typeof e == "function" ? Mo(e) : j(e), ne = ({
|
|
2820
2846
|
inputs: e,
|
|
2821
2847
|
...t
|
|
2822
2848
|
}) => ({
|
|
2823
|
-
...
|
|
2849
|
+
...j(t),
|
|
2824
2850
|
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [s, r]) => ({
|
|
2825
2851
|
...o,
|
|
2826
|
-
[s]:
|
|
2852
|
+
[s]: Lo(r)
|
|
2827
2853
|
}), {}))
|
|
2828
2854
|
}), Do = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
2829
2855
|
function getAndSetVariantId() {
|
|
@@ -2915,75 +2941,75 @@ const Uo = /* @__PURE__ */ b(xo, [["render", Fo], ["__file", "/home/runner/work/
|
|
|
2915
2941
|
thisScriptEl?.remove();
|
|
2916
2942
|
}
|
|
2917
2943
|
return;
|
|
2918
|
-
}`,
|
|
2944
|
+
}`, je = "builderIoAbTest", Ke = "builderIoRenderContent", J = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
2919
2945
|
...t,
|
|
2920
2946
|
testVariationId: t.id,
|
|
2921
2947
|
id: e == null ? void 0 : e.id
|
|
2922
2948
|
})), jo = ({
|
|
2923
2949
|
canTrack: e,
|
|
2924
2950
|
content: t
|
|
2925
|
-
}) => !(!(
|
|
2926
|
-
window.${
|
|
2927
|
-
window.${
|
|
2951
|
+
}) => !(!(J(t).length > 0) || !e), Ko = (e) => e === "react" || e === "reactNative", qe = Ko(A), qo = () => `
|
|
2952
|
+
window.${je} = ${Do}
|
|
2953
|
+
window.${Ke} = ${Ho}
|
|
2928
2954
|
`, zo = (e, t) => `
|
|
2929
|
-
window.${
|
|
2930
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
2955
|
+
window.${je}(
|
|
2956
|
+
"${t}",${JSON.stringify(e)}, ${qe}
|
|
2931
2957
|
)`, Jo = ({
|
|
2932
2958
|
contentId: e,
|
|
2933
2959
|
variationId: t
|
|
2934
|
-
}) => `window.${
|
|
2935
|
-
"${t}", "${e}", ${
|
|
2936
|
-
)`,
|
|
2960
|
+
}) => `window.${Ke}(
|
|
2961
|
+
"${t}", "${e}", ${qe}
|
|
2962
|
+
)`, ze = f({
|
|
2937
2963
|
render() {
|
|
2938
2964
|
return Te("script", { id: this.id, innerHTML: this.scriptStr });
|
|
2939
2965
|
},
|
|
2940
2966
|
name: "inlined-script",
|
|
2941
2967
|
props: ["scriptStr", "id"]
|
|
2942
|
-
})
|
|
2943
|
-
function
|
|
2968
|
+
});
|
|
2969
|
+
function Go() {
|
|
2944
2970
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
2945
2971
|
}
|
|
2946
|
-
function
|
|
2947
|
-
const e =
|
|
2972
|
+
function Yo() {
|
|
2973
|
+
const e = Go().fetch;
|
|
2948
2974
|
if (typeof e > "u")
|
|
2949
2975
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
2950
2976
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
2951
2977
|
return e;
|
|
2952
2978
|
}
|
|
2953
|
-
const
|
|
2954
|
-
function
|
|
2979
|
+
const Je = Yo();
|
|
2980
|
+
function G(e, t = null, n = ".") {
|
|
2955
2981
|
return Object.keys(e).reduce((o, s) => {
|
|
2956
2982
|
const r = e[s], i = [t, s].filter(Boolean).join(n);
|
|
2957
2983
|
return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
|
|
2958
2984
|
...o,
|
|
2959
|
-
...
|
|
2985
|
+
...G(r, i, n)
|
|
2960
2986
|
} : {
|
|
2961
2987
|
...o,
|
|
2962
2988
|
[i]: r
|
|
2963
2989
|
};
|
|
2964
2990
|
}, {});
|
|
2965
2991
|
}
|
|
2966
|
-
const
|
|
2992
|
+
const _o = "v3", ke = "builder.", Qo = "options.", Xo = (e) => {
|
|
2967
2993
|
const t = {};
|
|
2968
2994
|
return e.forEach((n, o) => {
|
|
2969
2995
|
t[o] = n;
|
|
2970
2996
|
}), t;
|
|
2971
|
-
},
|
|
2997
|
+
}, Ge = (e) => {
|
|
2972
2998
|
if (!e)
|
|
2973
2999
|
return {};
|
|
2974
|
-
const t =
|
|
3000
|
+
const t = Ye(e), n = {};
|
|
2975
3001
|
return Object.keys(t).forEach((o) => {
|
|
2976
3002
|
if (o.startsWith(ke)) {
|
|
2977
|
-
const s = o.replace(ke, "").replace(
|
|
3003
|
+
const s = o.replace(ke, "").replace(Qo, "");
|
|
2978
3004
|
n[s] = t[o];
|
|
2979
3005
|
}
|
|
2980
3006
|
}), n;
|
|
2981
|
-
},
|
|
3007
|
+
}, Zo = () => {
|
|
2982
3008
|
if (!w())
|
|
2983
3009
|
return {};
|
|
2984
3010
|
const e = new URLSearchParams(window.location.search);
|
|
2985
|
-
return
|
|
2986
|
-
},
|
|
3011
|
+
return Ge(e);
|
|
3012
|
+
}, Ye = (e) => e instanceof URLSearchParams ? Xo(e) : e, Se = (e) => typeof e == "number" && !isNaN(e) && e >= 0, pe = (e) => {
|
|
2987
3013
|
let {
|
|
2988
3014
|
noTraverse: t = !1
|
|
2989
3015
|
} = e;
|
|
@@ -2995,57 +3021,57 @@ const Xo = "v3", ke = "builder.", Zo = "options.", es = (e) => {
|
|
|
2995
3021
|
apiKey: i,
|
|
2996
3022
|
includeRefs: a = !0,
|
|
2997
3023
|
enrich: l,
|
|
2998
|
-
locale:
|
|
2999
|
-
apiVersion:
|
|
3000
|
-
fields:
|
|
3001
|
-
omit:
|
|
3002
|
-
offset:
|
|
3003
|
-
cacheSeconds:
|
|
3004
|
-
staleCacheSeconds:
|
|
3024
|
+
locale: d,
|
|
3025
|
+
apiVersion: m = _o,
|
|
3026
|
+
fields: c,
|
|
3027
|
+
omit: p,
|
|
3028
|
+
offset: S,
|
|
3029
|
+
cacheSeconds: b,
|
|
3030
|
+
staleCacheSeconds: x,
|
|
3005
3031
|
sort: M,
|
|
3006
3032
|
includeUnpublished: me
|
|
3007
3033
|
} = e;
|
|
3008
3034
|
if (!i)
|
|
3009
3035
|
throw new Error("Missing API key");
|
|
3010
|
-
if (!["v3"].includes(
|
|
3011
|
-
throw new Error(`Invalid apiVersion: expected 'v3', received '${
|
|
3036
|
+
if (!["v3"].includes(m))
|
|
3037
|
+
throw new Error(`Invalid apiVersion: expected 'v3', received '${m}'`);
|
|
3012
3038
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
3013
|
-
const R = new URL(`https://cdn.builder.io/api/${
|
|
3014
|
-
if (R.searchParams.set("omit",
|
|
3015
|
-
const W =
|
|
3039
|
+
const R = new URL(`https://cdn.builder.io/api/${m}/content/${r}?apiKey=${i}&limit=${n}&noTraverse=${t}&includeRefs=${a}${d ? `&locale=${d}` : ""}${l ? `&enrich=${l}` : ""}`);
|
|
3040
|
+
if (R.searchParams.set("omit", p || "meta.componentsUsed"), c && R.searchParams.set("fields", c), Number.isFinite(S) && S > -1 && R.searchParams.set("offset", String(Math.floor(S))), typeof me == "boolean" && R.searchParams.set("includeUnpublished", String(me)), b && Se(b) && R.searchParams.set("cacheSeconds", String(b)), x && Se(x) && R.searchParams.set("staleCacheSeconds", String(x)), M) {
|
|
3041
|
+
const W = G({
|
|
3016
3042
|
sort: M
|
|
3017
3043
|
});
|
|
3018
3044
|
for (const L in W)
|
|
3019
3045
|
R.searchParams.set(L, JSON.stringify(W[L]));
|
|
3020
3046
|
}
|
|
3021
3047
|
const rt = {
|
|
3022
|
-
...
|
|
3023
|
-
...
|
|
3024
|
-
}, he =
|
|
3048
|
+
...Zo(),
|
|
3049
|
+
...Ye(e.options || {})
|
|
3050
|
+
}, he = G(rt);
|
|
3025
3051
|
for (const W in he)
|
|
3026
3052
|
R.searchParams.set(W, String(he[W]));
|
|
3027
3053
|
if (o && R.searchParams.set("userAttributes", JSON.stringify(o)), s) {
|
|
3028
|
-
const W =
|
|
3054
|
+
const W = G({
|
|
3029
3055
|
query: s
|
|
3030
3056
|
});
|
|
3031
3057
|
for (const L in W)
|
|
3032
3058
|
R.searchParams.set(L, JSON.stringify(W[L]));
|
|
3033
3059
|
}
|
|
3034
3060
|
return R;
|
|
3035
|
-
},
|
|
3061
|
+
}, es = (e) => "results" in e;
|
|
3036
3062
|
async function Q(e) {
|
|
3037
|
-
const t = await
|
|
3063
|
+
const t = await _e({
|
|
3038
3064
|
...e,
|
|
3039
3065
|
limit: 1
|
|
3040
3066
|
});
|
|
3041
3067
|
return t && t[0] || null;
|
|
3042
3068
|
}
|
|
3043
|
-
const
|
|
3069
|
+
const _s = Q, ts = async (e) => {
|
|
3044
3070
|
const t = pe(e);
|
|
3045
|
-
return await (await
|
|
3046
|
-
},
|
|
3047
|
-
const o =
|
|
3048
|
-
if (n.search.includes("preview="), !o || !(w() ||
|
|
3071
|
+
return await (await Je(t.href)).json();
|
|
3072
|
+
}, ns = async (e, t, n = pe(e)) => {
|
|
3073
|
+
const o = H(e.canTrack);
|
|
3074
|
+
if (n.search.includes("preview="), !o || !(w() || A === "reactNative"))
|
|
3049
3075
|
return t.results;
|
|
3050
3076
|
try {
|
|
3051
3077
|
const s = [];
|
|
@@ -3056,36 +3082,36 @@ const Xs = Q, os = async (e) => {
|
|
|
3056
3082
|
}));
|
|
3057
3083
|
t.results = s;
|
|
3058
3084
|
} catch (s) {
|
|
3059
|
-
|
|
3085
|
+
$.error("Could not process A/B tests. ", s);
|
|
3060
3086
|
}
|
|
3061
3087
|
return t.results;
|
|
3062
3088
|
};
|
|
3063
|
-
async function
|
|
3089
|
+
async function _e(e) {
|
|
3064
3090
|
try {
|
|
3065
|
-
const t = pe(e), n = await
|
|
3066
|
-
return
|
|
3091
|
+
const t = pe(e), n = await ts(e);
|
|
3092
|
+
return es(n) ? ns(e, n) : ($.error("Error fetching data. ", {
|
|
3067
3093
|
url: t,
|
|
3068
3094
|
content: n,
|
|
3069
3095
|
options: e
|
|
3070
3096
|
}), null);
|
|
3071
3097
|
} catch (t) {
|
|
3072
|
-
return
|
|
3098
|
+
return $.error("Error fetching data. ", t), null;
|
|
3073
3099
|
}
|
|
3074
3100
|
}
|
|
3075
|
-
const
|
|
3076
|
-
function
|
|
3077
|
-
return !w() || T() ? !1 :
|
|
3101
|
+
const Qs = _e;
|
|
3102
|
+
function os() {
|
|
3103
|
+
return !w() || T() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
3078
3104
|
}
|
|
3079
|
-
function
|
|
3105
|
+
function ss() {
|
|
3080
3106
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
3081
3107
|
const t = Math.random() * 16 | 0;
|
|
3082
3108
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
3083
3109
|
});
|
|
3084
3110
|
}
|
|
3085
3111
|
function Qe() {
|
|
3086
|
-
return
|
|
3112
|
+
return ss().replace(/-/g, "");
|
|
3087
3113
|
}
|
|
3088
|
-
const Xe = "builderSessionId",
|
|
3114
|
+
const Xe = "builderSessionId", rs = async ({
|
|
3089
3115
|
canTrack: e
|
|
3090
3116
|
}) => {
|
|
3091
3117
|
if (!e)
|
|
@@ -3097,20 +3123,20 @@ const Xe = "builderSessionId", as = async ({
|
|
|
3097
3123
|
if (N(t))
|
|
3098
3124
|
return t;
|
|
3099
3125
|
{
|
|
3100
|
-
const n =
|
|
3101
|
-
return
|
|
3126
|
+
const n = is();
|
|
3127
|
+
return as({
|
|
3102
3128
|
id: n,
|
|
3103
3129
|
canTrack: e
|
|
3104
3130
|
}), n;
|
|
3105
3131
|
}
|
|
3106
|
-
},
|
|
3132
|
+
}, is = () => Qe(), as = ({
|
|
3107
3133
|
id: e,
|
|
3108
3134
|
canTrack: t
|
|
3109
3135
|
}) => Me({
|
|
3110
3136
|
name: Xe,
|
|
3111
3137
|
value: e,
|
|
3112
3138
|
canTrack: t
|
|
3113
|
-
}), Ze = () => w() && typeof localStorage < "u" ? localStorage : void 0,
|
|
3139
|
+
}), Ze = () => w() && typeof localStorage < "u" ? localStorage : void 0, ls = ({
|
|
3114
3140
|
key: e,
|
|
3115
3141
|
canTrack: t
|
|
3116
3142
|
}) => {
|
|
@@ -3121,7 +3147,7 @@ const Xe = "builderSessionId", as = async ({
|
|
|
3121
3147
|
console.debug("[LocalStorage] GET error: ", o);
|
|
3122
3148
|
return;
|
|
3123
3149
|
}
|
|
3124
|
-
},
|
|
3150
|
+
}, cs = ({
|
|
3125
3151
|
key: e,
|
|
3126
3152
|
canTrack: t,
|
|
3127
3153
|
value: n
|
|
@@ -3132,32 +3158,32 @@ const Xe = "builderSessionId", as = async ({
|
|
|
3132
3158
|
} catch (s) {
|
|
3133
3159
|
console.debug("[LocalStorage] SET error: ", s);
|
|
3134
3160
|
}
|
|
3135
|
-
}, et = "builderVisitorId",
|
|
3161
|
+
}, et = "builderVisitorId", ds = ({
|
|
3136
3162
|
canTrack: e
|
|
3137
3163
|
}) => {
|
|
3138
3164
|
if (!e)
|
|
3139
3165
|
return;
|
|
3140
|
-
const t =
|
|
3166
|
+
const t = ls({
|
|
3141
3167
|
key: et,
|
|
3142
3168
|
canTrack: e
|
|
3143
3169
|
});
|
|
3144
3170
|
if (N(t))
|
|
3145
3171
|
return t;
|
|
3146
3172
|
{
|
|
3147
|
-
const n =
|
|
3148
|
-
return
|
|
3173
|
+
const n = us();
|
|
3174
|
+
return ps({
|
|
3149
3175
|
id: n,
|
|
3150
3176
|
canTrack: e
|
|
3151
3177
|
}), n;
|
|
3152
3178
|
}
|
|
3153
|
-
},
|
|
3179
|
+
}, us = () => Qe(), ps = ({
|
|
3154
3180
|
id: e,
|
|
3155
3181
|
canTrack: t
|
|
3156
|
-
}) =>
|
|
3182
|
+
}) => cs({
|
|
3157
3183
|
key: et,
|
|
3158
3184
|
value: e,
|
|
3159
3185
|
canTrack: t
|
|
3160
|
-
}),
|
|
3186
|
+
}), ms = async ({
|
|
3161
3187
|
canTrack: e
|
|
3162
3188
|
}) => {
|
|
3163
3189
|
if (!e)
|
|
@@ -3165,16 +3191,16 @@ const Xe = "builderSessionId", as = async ({
|
|
|
3165
3191
|
visitorId: void 0,
|
|
3166
3192
|
sessionId: void 0
|
|
3167
3193
|
};
|
|
3168
|
-
const t = await
|
|
3194
|
+
const t = await rs({
|
|
3169
3195
|
canTrack: e
|
|
3170
|
-
}), n =
|
|
3196
|
+
}), n = ds({
|
|
3171
3197
|
canTrack: e
|
|
3172
3198
|
});
|
|
3173
3199
|
return {
|
|
3174
3200
|
sessionId: t,
|
|
3175
3201
|
visitorId: n
|
|
3176
3202
|
};
|
|
3177
|
-
},
|
|
3203
|
+
}, hs = async ({
|
|
3178
3204
|
type: e,
|
|
3179
3205
|
canTrack: t,
|
|
3180
3206
|
apiKey: n,
|
|
@@ -3188,7 +3214,7 @@ const Xe = "builderSessionId", as = async ({
|
|
|
3188
3214
|
url: location.href,
|
|
3189
3215
|
...o
|
|
3190
3216
|
},
|
|
3191
|
-
...await
|
|
3217
|
+
...await ms({
|
|
3192
3218
|
canTrack: t
|
|
3193
3219
|
}),
|
|
3194
3220
|
userAttributes: Pe(),
|
|
@@ -3197,14 +3223,14 @@ const Xe = "builderSessionId", as = async ({
|
|
|
3197
3223
|
});
|
|
3198
3224
|
async function oe(e) {
|
|
3199
3225
|
if (!e.apiKey) {
|
|
3200
|
-
|
|
3226
|
+
$.error("Missing API key for track call. Please provide your API key.");
|
|
3201
3227
|
return;
|
|
3202
3228
|
}
|
|
3203
|
-
if (
|
|
3229
|
+
if (e.canTrack && !T() && (w() || A === "reactNative"))
|
|
3204
3230
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
3205
3231
|
method: "POST",
|
|
3206
3232
|
body: JSON.stringify({
|
|
3207
|
-
events: [await
|
|
3233
|
+
events: [await hs(e)]
|
|
3208
3234
|
}),
|
|
3209
3235
|
headers: {
|
|
3210
3236
|
"content-type": "application/json"
|
|
@@ -3214,14 +3240,14 @@ async function oe(e) {
|
|
|
3214
3240
|
console.error("Failed to track: ", t);
|
|
3215
3241
|
});
|
|
3216
3242
|
}
|
|
3217
|
-
const
|
|
3243
|
+
const Xs = (e) => oe({
|
|
3218
3244
|
...e,
|
|
3219
3245
|
canTrack: !0
|
|
3220
3246
|
});
|
|
3221
|
-
function
|
|
3247
|
+
function ve(e) {
|
|
3222
3248
|
return Math.round(e * 1e3) / 1e3;
|
|
3223
3249
|
}
|
|
3224
|
-
const
|
|
3250
|
+
const fs = (e, t, n = !0) => {
|
|
3225
3251
|
if (!(e instanceof HTMLElement))
|
|
3226
3252
|
return null;
|
|
3227
3253
|
let o = n ? e : e.parentElement;
|
|
@@ -3232,20 +3258,20 @@ const gs = (e, t, n = !0) => {
|
|
|
3232
3258
|
return o;
|
|
3233
3259
|
} while (o = o.parentElement);
|
|
3234
3260
|
return null;
|
|
3235
|
-
},
|
|
3261
|
+
}, bs = (e) => fs(e, (t) => {
|
|
3236
3262
|
const n = t.getAttribute("builder-id") || t.id;
|
|
3237
|
-
return
|
|
3263
|
+
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
3238
3264
|
}), Ce = ({
|
|
3239
3265
|
event: e,
|
|
3240
3266
|
target: t
|
|
3241
3267
|
}) => {
|
|
3242
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r =
|
|
3268
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r = ve(o / n.width), i = ve(s / n.height);
|
|
3243
3269
|
return {
|
|
3244
3270
|
x: r,
|
|
3245
3271
|
y: i
|
|
3246
3272
|
};
|
|
3247
|
-
},
|
|
3248
|
-
const t = e.target, n = t &&
|
|
3273
|
+
}, gs = (e) => {
|
|
3274
|
+
const t = e.target, n = t && bs(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
3249
3275
|
return {
|
|
3250
3276
|
targetBuilderElement: o || void 0,
|
|
3251
3277
|
metadata: {
|
|
@@ -3260,13 +3286,13 @@ const gs = (e, t, n = !0) => {
|
|
|
3260
3286
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
3261
3287
|
}
|
|
3262
3288
|
};
|
|
3263
|
-
},
|
|
3289
|
+
}, ys = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
3264
3290
|
function tt(e, t) {
|
|
3265
3291
|
const n = new URL(t.origin), o = n.hostname;
|
|
3266
|
-
return (e ||
|
|
3292
|
+
return (e || ys).findIndex((s) => s.startsWith("*.") ? o.endsWith(s.slice(1)) : s === o) > -1;
|
|
3267
3293
|
}
|
|
3268
|
-
const
|
|
3269
|
-
function
|
|
3294
|
+
const ks = "0.13.3", we = {};
|
|
3295
|
+
function Ss(e, t) {
|
|
3270
3296
|
let n = we[e];
|
|
3271
3297
|
if (n || (n = we[e] = []), n.push(t), w()) {
|
|
3272
3298
|
const o = {
|
|
@@ -3283,8 +3309,8 @@ function Cs(e, t) {
|
|
|
3283
3309
|
}
|
|
3284
3310
|
}
|
|
3285
3311
|
}
|
|
3286
|
-
const
|
|
3287
|
-
|
|
3312
|
+
const vs = () => {
|
|
3313
|
+
Ss("insertMenu", {
|
|
3288
3314
|
name: "_default",
|
|
3289
3315
|
default: !0,
|
|
3290
3316
|
items: [{
|
|
@@ -3306,15 +3332,17 @@ const ws = () => {
|
|
|
3306
3332
|
}]
|
|
3307
3333
|
});
|
|
3308
3334
|
};
|
|
3309
|
-
let
|
|
3335
|
+
let Ie = !1;
|
|
3310
3336
|
const nt = (e = {}) => {
|
|
3311
3337
|
var t, n;
|
|
3312
|
-
|
|
3338
|
+
Ie || (Ie = !0, w() && ((t = window.parent) == null || t.postMessage({
|
|
3313
3339
|
type: "builder.sdkInfo",
|
|
3314
3340
|
data: {
|
|
3315
|
-
target:
|
|
3316
|
-
version:
|
|
3341
|
+
target: A,
|
|
3342
|
+
version: ks,
|
|
3317
3343
|
supportsPatchUpdates: !1,
|
|
3344
|
+
// Supports builder-model="..." attribute which is needed to
|
|
3345
|
+
// scope our '+ add block' button styling
|
|
3318
3346
|
supportsAddBlockScoping: !0,
|
|
3319
3347
|
supportsCustomBreakpoints: !0
|
|
3320
3348
|
}
|
|
@@ -3330,36 +3358,36 @@ const nt = (e = {}) => {
|
|
|
3330
3358
|
const {
|
|
3331
3359
|
data: s
|
|
3332
3360
|
} = o;
|
|
3333
|
-
if (
|
|
3361
|
+
if (s != null && s.type)
|
|
3334
3362
|
switch (s.type) {
|
|
3335
3363
|
case "builder.evaluate": {
|
|
3336
|
-
const a = s.data.text, l = s.data.arguments || [],
|
|
3337
|
-
let
|
|
3364
|
+
const a = s.data.text, l = s.data.arguments || [], d = s.data.id, m = new Function(a);
|
|
3365
|
+
let c, p = null;
|
|
3338
3366
|
try {
|
|
3339
|
-
|
|
3340
|
-
} catch (
|
|
3341
|
-
|
|
3367
|
+
c = m.apply(null, l);
|
|
3368
|
+
} catch (S) {
|
|
3369
|
+
p = S;
|
|
3342
3370
|
}
|
|
3343
|
-
|
|
3371
|
+
p ? (r = window.parent) == null || r.postMessage({
|
|
3344
3372
|
type: "builder.evaluateError",
|
|
3345
3373
|
data: {
|
|
3346
|
-
id:
|
|
3347
|
-
error:
|
|
3374
|
+
id: d,
|
|
3375
|
+
error: p.message
|
|
3348
3376
|
}
|
|
3349
|
-
}, "*") :
|
|
3350
|
-
var
|
|
3351
|
-
(
|
|
3377
|
+
}, "*") : c && typeof c.then == "function" ? c.then((S) => {
|
|
3378
|
+
var b;
|
|
3379
|
+
(b = window.parent) == null || b.postMessage({
|
|
3352
3380
|
type: "builder.evaluateResult",
|
|
3353
3381
|
data: {
|
|
3354
|
-
id:
|
|
3355
|
-
result:
|
|
3382
|
+
id: d,
|
|
3383
|
+
result: S
|
|
3356
3384
|
}
|
|
3357
3385
|
}, "*");
|
|
3358
3386
|
}).catch(console.error) : (i = window.parent) == null || i.postMessage({
|
|
3359
3387
|
type: "builder.evaluateResult",
|
|
3360
3388
|
data: {
|
|
3361
|
-
result:
|
|
3362
|
-
id:
|
|
3389
|
+
result: c,
|
|
3390
|
+
id: d
|
|
3363
3391
|
}
|
|
3364
3392
|
}, "*");
|
|
3365
3393
|
break;
|
|
@@ -3392,9 +3420,9 @@ const nt = (e = {}) => {
|
|
|
3392
3420
|
break;
|
|
3393
3421
|
}
|
|
3394
3422
|
}
|
|
3395
|
-
},
|
|
3423
|
+
}, Zs = (e, t, n) => {
|
|
3396
3424
|
if (!w)
|
|
3397
|
-
return
|
|
3425
|
+
return $.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
3398
3426
|
};
|
|
3399
3427
|
nt();
|
|
3400
3428
|
const o = ot({
|
|
@@ -3411,7 +3439,7 @@ const nt = (e = {}) => {
|
|
|
3411
3439
|
return window.addEventListener("message", o), () => {
|
|
3412
3440
|
window.removeEventListener("message", o);
|
|
3413
3441
|
};
|
|
3414
|
-
},
|
|
3442
|
+
}, Cs = f({
|
|
3415
3443
|
name: "enable-editor",
|
|
3416
3444
|
props: [
|
|
3417
3445
|
"builderContextSignal",
|
|
@@ -3453,7 +3481,7 @@ const nt = (e = {}) => {
|
|
|
3453
3481
|
if (w()) {
|
|
3454
3482
|
if (T() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
3455
3483
|
new CustomEvent("initeditingbldr")
|
|
3456
|
-
), this.builderContextSignal.content &&
|
|
3484
|
+
), this.builderContextSignal.content && H(this.canTrack)) {
|
|
3457
3485
|
const r = (n = this.builderContextSignal.content) == null ? void 0 : n.testVariationId, i = (o = this.builderContextSignal.content) == null ? void 0 : o.id, a = this.apiKey;
|
|
3458
3486
|
oe({
|
|
3459
3487
|
type: "impression",
|
|
@@ -3463,12 +3491,12 @@ const nt = (e = {}) => {
|
|
|
3463
3491
|
variationId: r !== i ? r : void 0
|
|
3464
3492
|
});
|
|
3465
3493
|
}
|
|
3466
|
-
|
|
3494
|
+
os() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
3467
3495
|
new CustomEvent("initpreviewingbldr")
|
|
3468
3496
|
);
|
|
3469
3497
|
}
|
|
3470
3498
|
})(), (() => {
|
|
3471
|
-
this.apiKey ||
|
|
3499
|
+
this.apiKey || $.error(
|
|
3472
3500
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
3473
3501
|
), this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
|
|
3474
3502
|
})();
|
|
@@ -3612,7 +3640,7 @@ const nt = (e = {}) => {
|
|
|
3612
3640
|
evaluateJsCode() {
|
|
3613
3641
|
var t, n;
|
|
3614
3642
|
const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
|
|
3615
|
-
e &&
|
|
3643
|
+
e && Y({
|
|
3616
3644
|
code: e,
|
|
3617
3645
|
context: this.context || {},
|
|
3618
3646
|
localState: void 0,
|
|
@@ -3626,11 +3654,11 @@ const nt = (e = {}) => {
|
|
|
3626
3654
|
const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, s = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
|
|
3627
3655
|
oe({
|
|
3628
3656
|
type: "click",
|
|
3629
|
-
canTrack:
|
|
3657
|
+
canTrack: H(this.canTrack),
|
|
3630
3658
|
contentId: s,
|
|
3631
3659
|
apiKey: this.apiKey,
|
|
3632
3660
|
variationId: o !== s ? o : void 0,
|
|
3633
|
-
...
|
|
3661
|
+
...gs(e),
|
|
3634
3662
|
unique: !this.clicked
|
|
3635
3663
|
});
|
|
3636
3664
|
}
|
|
@@ -3639,7 +3667,7 @@ const nt = (e = {}) => {
|
|
|
3639
3667
|
evalExpression(e) {
|
|
3640
3668
|
return e.replace(
|
|
3641
3669
|
/{{([^}]+)}}/g,
|
|
3642
|
-
(t, n) =>
|
|
3670
|
+
(t, n) => Y({
|
|
3643
3671
|
code: n,
|
|
3644
3672
|
context: this.context || {},
|
|
3645
3673
|
localState: void 0,
|
|
@@ -3649,7 +3677,7 @@ const nt = (e = {}) => {
|
|
|
3649
3677
|
);
|
|
3650
3678
|
},
|
|
3651
3679
|
handleRequest({ url: e, key: t }) {
|
|
3652
|
-
|
|
3680
|
+
Je(e).then((n) => n.json()).then((n) => {
|
|
3653
3681
|
var s, r;
|
|
3654
3682
|
const o = {
|
|
3655
3683
|
...this.builderContextSignal.rootState,
|
|
@@ -3661,14 +3689,14 @@ const nt = (e = {}) => {
|
|
|
3661
3689
|
});
|
|
3662
3690
|
},
|
|
3663
3691
|
runHttpRequests() {
|
|
3664
|
-
var t, n
|
|
3665
|
-
const e = (
|
|
3666
|
-
Object.entries(e).forEach(([
|
|
3667
|
-
if (
|
|
3668
|
-
const
|
|
3692
|
+
var t, n;
|
|
3693
|
+
const e = ((n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) ?? {};
|
|
3694
|
+
Object.entries(e).forEach(([o, s]) => {
|
|
3695
|
+
if (s && (!this.httpReqsData[o] || T())) {
|
|
3696
|
+
const r = this.evalExpression(s);
|
|
3669
3697
|
this.handleRequest({
|
|
3670
|
-
url:
|
|
3671
|
-
key:
|
|
3698
|
+
url: r,
|
|
3699
|
+
key: o
|
|
3672
3700
|
});
|
|
3673
3701
|
}
|
|
3674
3702
|
});
|
|
@@ -3679,7 +3707,7 @@ const nt = (e = {}) => {
|
|
|
3679
3707
|
"builder:component:stateChange",
|
|
3680
3708
|
{
|
|
3681
3709
|
detail: {
|
|
3682
|
-
state:
|
|
3710
|
+
state: j(this.builderContextSignal.rootState),
|
|
3683
3711
|
ref: {
|
|
3684
3712
|
name: this.model
|
|
3685
3713
|
}
|
|
@@ -3689,7 +3717,7 @@ const nt = (e = {}) => {
|
|
|
3689
3717
|
);
|
|
3690
3718
|
},
|
|
3691
3719
|
elementRef_onIniteditingbldr(e) {
|
|
3692
|
-
this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage),
|
|
3720
|
+
this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage), vs(), nt({
|
|
3693
3721
|
...this.locale ? {
|
|
3694
3722
|
locale: this.locale
|
|
3695
3723
|
} : {},
|
|
@@ -3706,7 +3734,7 @@ const nt = (e = {}) => {
|
|
|
3706
3734
|
this.builderContextSignal.componentInfos
|
|
3707
3735
|
).forEach((t) => {
|
|
3708
3736
|
var o;
|
|
3709
|
-
const n =
|
|
3737
|
+
const n = Oo(t);
|
|
3710
3738
|
(o = window.parent) == null || o.postMessage(n, "*");
|
|
3711
3739
|
}), window.addEventListener(
|
|
3712
3740
|
"builder:component:stateChangeListenerActivated",
|
|
@@ -3727,17 +3755,17 @@ const nt = (e = {}) => {
|
|
|
3727
3755
|
}
|
|
3728
3756
|
}
|
|
3729
3757
|
});
|
|
3730
|
-
function
|
|
3758
|
+
function ws(e, t, n, o, s, r) {
|
|
3731
3759
|
var i, a, l;
|
|
3732
|
-
return e.builderContextSignal.content ? (u(),
|
|
3760
|
+
return e.builderContextSignal.content ? (u(), g(D(e.ContentWrapper), C({
|
|
3733
3761
|
key: e.forceReRenderCount,
|
|
3734
3762
|
ref: "elementRef",
|
|
3735
|
-
onClick: (
|
|
3763
|
+
onClick: (d) => e.onClick(d),
|
|
3736
3764
|
"builder-content-id": (i = e.builderContextSignal.content) == null ? void 0 : i.id,
|
|
3737
3765
|
"builder-model": e.model,
|
|
3738
3766
|
class: `variant-${((a = e.content) == null ? void 0 : a.testVariationId) || ((l = e.content) == null ? void 0 : l.id)}`,
|
|
3739
|
-
onIniteditingbldr: (
|
|
3740
|
-
onInitpreviewingbldr: (
|
|
3767
|
+
onIniteditingbldr: (d) => e.elementRef_onIniteditingbldr(d),
|
|
3768
|
+
onInitpreviewingbldr: (d) => e.elementRef_onInitpreviewingbldr(d)
|
|
3741
3769
|
}, {
|
|
3742
3770
|
...e.showContent ? {} : {
|
|
3743
3771
|
hidden: !0,
|
|
@@ -3746,14 +3774,14 @@ function Is(e, t, n, o, s, r) {
|
|
|
3746
3774
|
...e.contentWrapperProps
|
|
3747
3775
|
}), {
|
|
3748
3776
|
default: B(() => [
|
|
3749
|
-
|
|
3777
|
+
P(e.$slots, "default")
|
|
3750
3778
|
]),
|
|
3751
3779
|
_: 3
|
|
3752
|
-
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) :
|
|
3780
|
+
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : v("", !0);
|
|
3753
3781
|
}
|
|
3754
|
-
const
|
|
3755
|
-
var r
|
|
3756
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o =
|
|
3782
|
+
const Is = /* @__PURE__ */ y(Cs, [["render", ws]]), $s = (e) => {
|
|
3783
|
+
var r;
|
|
3784
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((r = e == null ? void 0 : e.files) == null ? void 0 : r.regular);
|
|
3757
3785
|
let s = "";
|
|
3758
3786
|
if (o && t && n && (s += `
|
|
3759
3787
|
@font-face {
|
|
@@ -3763,40 +3791,40 @@ font-display: fallback;
|
|
|
3763
3791
|
font-weight: 400;
|
|
3764
3792
|
}
|
|
3765
3793
|
`.trim()), e.files)
|
|
3766
|
-
for (const
|
|
3767
|
-
if (!(String(Number(
|
|
3794
|
+
for (const i in e.files) {
|
|
3795
|
+
if (!(String(Number(i)) === i))
|
|
3768
3796
|
continue;
|
|
3769
|
-
const
|
|
3770
|
-
|
|
3797
|
+
const l = e.files[i];
|
|
3798
|
+
l && l !== o && (s += `
|
|
3771
3799
|
@font-face {
|
|
3772
3800
|
font-family: "${t}";
|
|
3773
|
-
src: url('${
|
|
3801
|
+
src: url('${l}') format('woff2');
|
|
3774
3802
|
font-display: fallback;
|
|
3775
|
-
font-weight: ${
|
|
3803
|
+
font-weight: ${i};
|
|
3776
3804
|
}
|
|
3777
3805
|
`.trim());
|
|
3778
3806
|
}
|
|
3779
3807
|
return s;
|
|
3780
|
-
},
|
|
3808
|
+
}, Ts = ({
|
|
3781
3809
|
customFonts: e
|
|
3782
3810
|
}) => {
|
|
3783
3811
|
var t;
|
|
3784
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
3785
|
-
},
|
|
3812
|
+
return ((t = e == null ? void 0 : e.map((n) => $s(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3813
|
+
}, Rs = ({
|
|
3786
3814
|
cssCode: e,
|
|
3787
3815
|
contentId: t
|
|
3788
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
3816
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", Es = f({
|
|
3789
3817
|
name: "content-styles",
|
|
3790
3818
|
components: { InlinedStyles: de },
|
|
3791
3819
|
props: ["cssCode", "contentId", "customFonts"],
|
|
3792
3820
|
data() {
|
|
3793
3821
|
return {
|
|
3794
3822
|
injectedStyles: `
|
|
3795
|
-
${
|
|
3823
|
+
${Rs({
|
|
3796
3824
|
cssCode: this.cssCode,
|
|
3797
3825
|
contentId: this.contentId
|
|
3798
3826
|
})}
|
|
3799
|
-
${
|
|
3827
|
+
${Ts({
|
|
3800
3828
|
customFonts: this.customFonts
|
|
3801
3829
|
})}
|
|
3802
3830
|
|
|
@@ -3820,11 +3848,11 @@ ${Es({
|
|
|
3820
3848
|
};
|
|
3821
3849
|
}
|
|
3822
3850
|
});
|
|
3823
|
-
function
|
|
3851
|
+
function Ps(e, t, n, o, s, r) {
|
|
3824
3852
|
const i = k("inlined-styles");
|
|
3825
|
-
return u(),
|
|
3853
|
+
return u(), g(i, { styles: e.injectedStyles }, null, 8, ["styles"]);
|
|
3826
3854
|
}
|
|
3827
|
-
const
|
|
3855
|
+
const As = /* @__PURE__ */ y(Es, [["render", Ps]]), xs = ({
|
|
3828
3856
|
content: e,
|
|
3829
3857
|
data: t,
|
|
3830
3858
|
locale: n
|
|
@@ -3841,7 +3869,7 @@ const Vs = /* @__PURE__ */ b(xs, [["render", As], ["__file", "/home/runner/work/
|
|
|
3841
3869
|
locale: n
|
|
3842
3870
|
} : {}
|
|
3843
3871
|
};
|
|
3844
|
-
},
|
|
3872
|
+
}, Vs = ({
|
|
3845
3873
|
content: e,
|
|
3846
3874
|
data: t
|
|
3847
3875
|
}) => e ? {
|
|
@@ -3851,13 +3879,13 @@ const Vs = /* @__PURE__ */ b(xs, [["render", As], ["__file", "/home/runner/work/
|
|
|
3851
3879
|
...t
|
|
3852
3880
|
},
|
|
3853
3881
|
meta: e == null ? void 0 : e.meta
|
|
3854
|
-
} : void 0,
|
|
3882
|
+
} : void 0, Bs = at, Ws = f({
|
|
3855
3883
|
name: "content-component",
|
|
3856
3884
|
components: {
|
|
3857
|
-
EnableEditor:
|
|
3858
|
-
InlinedScript:
|
|
3859
|
-
ContentStyles:
|
|
3860
|
-
Blocks:
|
|
3885
|
+
EnableEditor: Is,
|
|
3886
|
+
InlinedScript: ze,
|
|
3887
|
+
ContentStyles: As,
|
|
3888
|
+
Blocks: K
|
|
3861
3889
|
},
|
|
3862
3890
|
props: [
|
|
3863
3891
|
"content",
|
|
@@ -3884,30 +3912,37 @@ const Vs = /* @__PURE__ */ b(xs, [["render", As], ["__file", "/home/runner/work/
|
|
|
3884
3912
|
var e, t;
|
|
3885
3913
|
return {
|
|
3886
3914
|
scriptStr: Jo({
|
|
3915
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3887
3916
|
variationId: (e = this.content) == null ? void 0 : e.testVariationId,
|
|
3917
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3888
3918
|
contentId: (t = this.content) == null ? void 0 : t.id
|
|
3889
3919
|
}),
|
|
3890
3920
|
registeredComponents: [
|
|
3891
3921
|
...ge(),
|
|
3922
|
+
// While this `components` object is deprecated, we must maintain support for it.
|
|
3923
|
+
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
3924
|
+
// existing usage.
|
|
3925
|
+
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
3926
|
+
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
3892
3927
|
...ye,
|
|
3893
3928
|
...this.customComponents || []
|
|
3894
3929
|
].reduce(
|
|
3895
3930
|
(n, { component: o, ...s }) => ({
|
|
3896
3931
|
...n,
|
|
3897
3932
|
[s.name]: {
|
|
3898
|
-
component:
|
|
3933
|
+
component: Bs(o),
|
|
3899
3934
|
...ne(s)
|
|
3900
3935
|
}
|
|
3901
3936
|
}),
|
|
3902
3937
|
{}
|
|
3903
3938
|
),
|
|
3904
3939
|
builderContextSignal: {
|
|
3905
|
-
content:
|
|
3940
|
+
content: Vs({
|
|
3906
3941
|
content: this.content,
|
|
3907
3942
|
data: this.data
|
|
3908
3943
|
}),
|
|
3909
3944
|
localState: void 0,
|
|
3910
|
-
rootState:
|
|
3945
|
+
rootState: xs({
|
|
3911
3946
|
content: this.content,
|
|
3912
3947
|
data: this.data,
|
|
3913
3948
|
locale: this.locale
|
|
@@ -3918,6 +3953,11 @@ const Vs = /* @__PURE__ */ b(xs, [["render", As], ["__file", "/home/runner/work/
|
|
|
3918
3953
|
apiVersion: this.apiVersion,
|
|
3919
3954
|
componentInfos: [
|
|
3920
3955
|
...ge(),
|
|
3956
|
+
// While this `components` object is deprecated, we must maintain support for it.
|
|
3957
|
+
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
3958
|
+
// existing usage.
|
|
3959
|
+
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
3960
|
+
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
3921
3961
|
...ye,
|
|
3922
3962
|
...this.customComponents || []
|
|
3923
3963
|
].reduce(
|
|
@@ -3931,7 +3971,7 @@ const Vs = /* @__PURE__ */ b(xs, [["render", As], ["__file", "/home/runner/work/
|
|
|
3931
3971
|
BlocksWrapper: this.blocksWrapper || "div",
|
|
3932
3972
|
BlocksWrapperProps: this.blocksWrapperProps || {}
|
|
3933
3973
|
},
|
|
3934
|
-
TARGET:
|
|
3974
|
+
TARGET: A
|
|
3935
3975
|
};
|
|
3936
3976
|
},
|
|
3937
3977
|
provide() {
|
|
@@ -3948,9 +3988,9 @@ const Vs = /* @__PURE__ */ b(xs, [["render", As], ["__file", "/home/runner/work/
|
|
|
3948
3988
|
}
|
|
3949
3989
|
}
|
|
3950
3990
|
});
|
|
3951
|
-
function
|
|
3952
|
-
const i = k("inlined-script"), a = k("content-styles"), l = k("blocks"),
|
|
3953
|
-
return u(),
|
|
3991
|
+
function Ns(e, t, n, o, s, r) {
|
|
3992
|
+
const i = k("inlined-script"), a = k("content-styles"), l = k("blocks"), d = k("enable-editor");
|
|
3993
|
+
return u(), g(d, C({
|
|
3954
3994
|
content: e.content,
|
|
3955
3995
|
data: e.data,
|
|
3956
3996
|
model: e.model,
|
|
@@ -3968,20 +4008,20 @@ function Us(e, t, n, o, s, r) {
|
|
|
3968
4008
|
trustedHosts: e.trustedHosts
|
|
3969
4009
|
}, {}), {
|
|
3970
4010
|
default: B(() => {
|
|
3971
|
-
var
|
|
4011
|
+
var m, c, p, S, b, x, M;
|
|
3972
4012
|
return [
|
|
3973
|
-
e.isSsrAbTest ? (u(),
|
|
4013
|
+
e.isSsrAbTest ? (u(), g(i, {
|
|
3974
4014
|
key: 0,
|
|
3975
4015
|
scriptStr: e.scriptStr
|
|
3976
|
-
}, null, 8, ["scriptStr"])) :
|
|
3977
|
-
e.TARGET !== "reactNative" ? (u(),
|
|
4016
|
+
}, null, 8, ["scriptStr"])) : v("", !0),
|
|
4017
|
+
e.TARGET !== "reactNative" ? (u(), g(a, {
|
|
3978
4018
|
key: 1,
|
|
3979
|
-
contentId: (
|
|
3980
|
-
cssCode: (
|
|
3981
|
-
customFonts: (
|
|
3982
|
-
}, null, 8, ["contentId", "cssCode", "customFonts"])) :
|
|
4019
|
+
contentId: (m = e.builderContextSignal.content) == null ? void 0 : m.id,
|
|
4020
|
+
cssCode: (p = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : p.cssCode,
|
|
4021
|
+
customFonts: (b = (S = e.builderContextSignal.content) == null ? void 0 : S.data) == null ? void 0 : b.customFonts
|
|
4022
|
+
}, null, 8, ["contentId", "cssCode", "customFonts"])) : v("", !0),
|
|
3983
4023
|
V(l, {
|
|
3984
|
-
blocks: (M = (
|
|
4024
|
+
blocks: (M = (x = e.builderContextSignal.content) == null ? void 0 : x.data) == null ? void 0 : M.blocks,
|
|
3985
4025
|
context: e.builderContextSignal,
|
|
3986
4026
|
registeredComponents: e.registeredComponents,
|
|
3987
4027
|
linkComponent: e.linkComponent
|
|
@@ -3991,12 +4031,12 @@ function Us(e, t, n, o, s, r) {
|
|
|
3991
4031
|
_: 1
|
|
3992
4032
|
}, 16, ["content", "data", "model", "context", "apiKey", "canTrack", "locale", "includeRefs", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps", "linkComponent", "trustedHosts"]);
|
|
3993
4033
|
}
|
|
3994
|
-
const
|
|
4034
|
+
const Fs = /* @__PURE__ */ y(Ws, [["render", Ns]]), Us = f({
|
|
3995
4035
|
name: "content-variants",
|
|
3996
4036
|
components: {
|
|
3997
|
-
InlinedScript:
|
|
4037
|
+
InlinedScript: ze,
|
|
3998
4038
|
InlinedStyles: de,
|
|
3999
|
-
ContentComponent:
|
|
4039
|
+
ContentComponent: Fs
|
|
4000
4040
|
},
|
|
4001
4041
|
props: [
|
|
4002
4042
|
"canTrack",
|
|
@@ -4021,12 +4061,12 @@ const Os = /* @__PURE__ */ b(Fs, [["render", Us], ["__file", "/home/runner/work/
|
|
|
4021
4061
|
data() {
|
|
4022
4062
|
return {
|
|
4023
4063
|
shouldRenderVariants: jo({
|
|
4024
|
-
canTrack:
|
|
4064
|
+
canTrack: H(this.canTrack),
|
|
4025
4065
|
content: this.content
|
|
4026
4066
|
}),
|
|
4027
|
-
TARGET:
|
|
4067
|
+
TARGET: A,
|
|
4028
4068
|
getScriptString: qo,
|
|
4029
|
-
getVariants:
|
|
4069
|
+
getVariants: J
|
|
4030
4070
|
};
|
|
4031
4071
|
},
|
|
4032
4072
|
mounted() {
|
|
@@ -4036,7 +4076,7 @@ const Os = /* @__PURE__ */ b(Fs, [["render", Us], ["__file", "/home/runner/work/
|
|
|
4036
4076
|
updateCookieAndStylesScriptStr() {
|
|
4037
4077
|
var e;
|
|
4038
4078
|
return zo(
|
|
4039
|
-
|
|
4079
|
+
J(this.content).map((t) => ({
|
|
4040
4080
|
id: t.testVariationId,
|
|
4041
4081
|
testRatio: t.testRatio
|
|
4042
4082
|
})),
|
|
@@ -4044,37 +4084,37 @@ const Os = /* @__PURE__ */ b(Fs, [["render", Us], ["__file", "/home/runner/work/
|
|
|
4044
4084
|
);
|
|
4045
4085
|
},
|
|
4046
4086
|
hideVariantsStyleString() {
|
|
4047
|
-
return
|
|
4087
|
+
return J(this.content).map((e) => `.variant-${e.testVariationId} { display: none; } `).join("");
|
|
4048
4088
|
},
|
|
4049
4089
|
defaultContent() {
|
|
4050
4090
|
var e;
|
|
4051
4091
|
return this.shouldRenderVariants ? {
|
|
4052
4092
|
...this.content,
|
|
4053
4093
|
testVariationId: (e = this.content) == null ? void 0 : e.id
|
|
4054
|
-
} :
|
|
4094
|
+
} : wn({
|
|
4055
4095
|
item: this.content,
|
|
4056
|
-
canTrack:
|
|
4096
|
+
canTrack: H(this.canTrack)
|
|
4057
4097
|
});
|
|
4058
4098
|
}
|
|
4059
4099
|
}
|
|
4060
4100
|
});
|
|
4061
|
-
function
|
|
4062
|
-
var
|
|
4101
|
+
function Os(e, t, n, o, s, r) {
|
|
4102
|
+
var d;
|
|
4063
4103
|
const i = k("inlined-script"), a = k("inlined-styles"), l = k("content-component");
|
|
4064
|
-
return u(), h(
|
|
4065
|
-
!e.__isNestedRender && e.TARGET !== "reactNative" ? (u(),
|
|
4104
|
+
return u(), h(I, null, [
|
|
4105
|
+
!e.__isNestedRender && e.TARGET !== "reactNative" ? (u(), g(i, {
|
|
4066
4106
|
key: 0,
|
|
4067
4107
|
scriptStr: e.getScriptString()
|
|
4068
|
-
}, null, 8, ["scriptStr"])) :
|
|
4069
|
-
e.shouldRenderVariants ? (u(), h(
|
|
4108
|
+
}, null, 8, ["scriptStr"])) : v("", !0),
|
|
4109
|
+
e.shouldRenderVariants ? (u(), h(I, { key: 1 }, [
|
|
4070
4110
|
V(a, {
|
|
4071
|
-
id: `variants-styles-${(
|
|
4111
|
+
id: `variants-styles-${(d = e.content) == null ? void 0 : d.id}`,
|
|
4072
4112
|
styles: e.hideVariantsStyleString
|
|
4073
4113
|
}, null, 8, ["id", "styles"]),
|
|
4074
4114
|
V(i, { scriptStr: e.updateCookieAndStylesScriptStr }, null, 8, ["scriptStr"]),
|
|
4075
|
-
(u(!0), h(
|
|
4076
|
-
key:
|
|
4077
|
-
content:
|
|
4115
|
+
(u(!0), h(I, null, O(e.getVariants(e.content), (m, c) => (u(), g(l, {
|
|
4116
|
+
key: m.testVariationId,
|
|
4117
|
+
content: m,
|
|
4078
4118
|
showContent: !1,
|
|
4079
4119
|
model: e.model,
|
|
4080
4120
|
data: e.data,
|
|
@@ -4094,7 +4134,7 @@ function Ls(e, t, n, o, s, r) {
|
|
|
4094
4134
|
contentWrapperProps: e.contentWrapperProps,
|
|
4095
4135
|
trustedHosts: e.trustedHosts
|
|
4096
4136
|
}, null, 8, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"]))), 128))
|
|
4097
|
-
], 64)) :
|
|
4137
|
+
], 64)) : v("", !0),
|
|
4098
4138
|
V(l, C({
|
|
4099
4139
|
content: e.defaultContent,
|
|
4100
4140
|
showContent: !0,
|
|
@@ -4120,11 +4160,12 @@ function Ls(e, t, n, o, s, r) {
|
|
|
4120
4160
|
}), null, 16, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
|
|
4121
4161
|
], 64);
|
|
4122
4162
|
}
|
|
4123
|
-
const st = /* @__PURE__ */
|
|
4163
|
+
const st = /* @__PURE__ */ y(Us, [["render", Os]]), Ms = async ({
|
|
4124
4164
|
builderContextValue: e,
|
|
4125
4165
|
symbol: t
|
|
4126
4166
|
}) => {
|
|
4127
|
-
if (
|
|
4167
|
+
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
4168
|
+
(e != null && e.apiKey))
|
|
4128
4169
|
return Q({
|
|
4129
4170
|
model: t.model,
|
|
4130
4171
|
apiKey: e.apiKey,
|
|
@@ -4135,13 +4176,12 @@ const st = /* @__PURE__ */ b(Ms, [["render", Ls], ["__file", "/home/runner/work/
|
|
|
4135
4176
|
}
|
|
4136
4177
|
}
|
|
4137
4178
|
}).catch((n) => {
|
|
4138
|
-
|
|
4179
|
+
$.error("Could not fetch symbol content: ", n);
|
|
4139
4180
|
});
|
|
4140
|
-
},
|
|
4181
|
+
}, Ls = f({
|
|
4141
4182
|
name: "builder-symbol",
|
|
4142
4183
|
components: { ContentVariants: st },
|
|
4143
4184
|
props: [
|
|
4144
|
-
"js",
|
|
4145
4185
|
"attributes",
|
|
4146
4186
|
"symbol",
|
|
4147
4187
|
"dynamic",
|
|
@@ -4172,7 +4212,7 @@ const st = /* @__PURE__ */ b(Ms, [["render", Ls], ["__file", "/home/runner/work/
|
|
|
4172
4212
|
this.attributes[re()],
|
|
4173
4213
|
"builder-symbol",
|
|
4174
4214
|
(e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
|
|
4175
|
-
(
|
|
4215
|
+
(t = this.symbol) != null && t.dynamic || this.dynamic ? "builder-dynamic-symbol" : void 0
|
|
4176
4216
|
].filter(Boolean).join(" ");
|
|
4177
4217
|
},
|
|
4178
4218
|
onUpdateHook0() {
|
|
@@ -4183,7 +4223,7 @@ const st = /* @__PURE__ */ b(Ms, [["render", Ls], ["__file", "/home/runner/work/
|
|
|
4183
4223
|
},
|
|
4184
4224
|
methods: {
|
|
4185
4225
|
setContent() {
|
|
4186
|
-
this.contentToUse ||
|
|
4226
|
+
this.contentToUse || Ms({
|
|
4187
4227
|
symbol: this.symbol,
|
|
4188
4228
|
builderContextValue: this.builderContext
|
|
4189
4229
|
}).then((e) => {
|
|
@@ -4192,10 +4232,10 @@ const st = /* @__PURE__ */ b(Ms, [["render", Ls], ["__file", "/home/runner/work/
|
|
|
4192
4232
|
}
|
|
4193
4233
|
}
|
|
4194
4234
|
});
|
|
4195
|
-
function
|
|
4196
|
-
var a, l,
|
|
4235
|
+
function Ds(e, t, n, o, s, r) {
|
|
4236
|
+
var a, l, d, m, c;
|
|
4197
4237
|
const i = k("content-variants");
|
|
4198
|
-
return u(), h("div", C({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) },
|
|
4238
|
+
return u(), h("div", C({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
4199
4239
|
V(i, {
|
|
4200
4240
|
__isNestedRender: !0,
|
|
4201
4241
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -4208,26 +4248,26 @@ function Hs(e, t, n, o, s, r) {
|
|
|
4208
4248
|
data: {
|
|
4209
4249
|
...(l = e.symbol) == null ? void 0 : l.data,
|
|
4210
4250
|
...e.builderContext.localState,
|
|
4211
|
-
...(
|
|
4251
|
+
...(m = (d = e.contentToUse) == null ? void 0 : d.data) == null ? void 0 : m.state
|
|
4212
4252
|
},
|
|
4213
|
-
model: (
|
|
4253
|
+
model: (c = e.symbol) == null ? void 0 : c.model,
|
|
4214
4254
|
content: e.contentToUse,
|
|
4215
4255
|
linkComponent: e.builderLinkComponent
|
|
4216
4256
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content", "linkComponent"])
|
|
4217
4257
|
], 16);
|
|
4218
4258
|
}
|
|
4219
|
-
const
|
|
4220
|
-
function
|
|
4259
|
+
const Hs = /* @__PURE__ */ y(Ls, [["render", Ds]]), er = K, tr = st, $e = {};
|
|
4260
|
+
function nr(e) {
|
|
4221
4261
|
if (w()) {
|
|
4222
|
-
Object.assign(
|
|
4262
|
+
Object.assign($e, e);
|
|
4223
4263
|
const t = {
|
|
4224
4264
|
type: "builder.settingsChange",
|
|
4225
|
-
data:
|
|
4265
|
+
data: $e
|
|
4226
4266
|
};
|
|
4227
4267
|
parent.postMessage(t, "*");
|
|
4228
4268
|
}
|
|
4229
4269
|
}
|
|
4230
|
-
const
|
|
4270
|
+
const or = async (e) => {
|
|
4231
4271
|
var o, s, r;
|
|
4232
4272
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((s = e.userAttributes) == null ? void 0 : s.urlPath), n = {
|
|
4233
4273
|
...e,
|
|
@@ -4239,7 +4279,7 @@ const rr = async (e) => {
|
|
|
4239
4279
|
urlPath: t
|
|
4240
4280
|
} : {}
|
|
4241
4281
|
},
|
|
4242
|
-
options:
|
|
4282
|
+
options: Ge(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
|
|
4243
4283
|
};
|
|
4244
4284
|
return {
|
|
4245
4285
|
apiKey: n.apiKey,
|
|
@@ -4248,46 +4288,46 @@ const rr = async (e) => {
|
|
|
4248
4288
|
};
|
|
4249
4289
|
};
|
|
4250
4290
|
export {
|
|
4251
|
-
|
|
4291
|
+
ns as A,
|
|
4252
4292
|
ce as B,
|
|
4253
4293
|
st as C,
|
|
4254
|
-
|
|
4294
|
+
_e as D,
|
|
4255
4295
|
Q as E,
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4296
|
+
tn as F,
|
|
4297
|
+
Qs as G,
|
|
4298
|
+
_s as H,
|
|
4299
|
+
dn as I,
|
|
4300
|
+
qs as J,
|
|
4301
|
+
Gs as K,
|
|
4302
|
+
er as R,
|
|
4303
|
+
mn as S,
|
|
4304
|
+
A as T,
|
|
4305
|
+
Fo as V,
|
|
4306
|
+
de as _,
|
|
4267
4307
|
Yt as a,
|
|
4268
|
-
|
|
4308
|
+
zs as b,
|
|
4269
4309
|
N as c,
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4310
|
+
Ys as d,
|
|
4311
|
+
y as e,
|
|
4312
|
+
Y as f,
|
|
4273
4313
|
Ve as g,
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
j,
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4314
|
+
Js as h,
|
|
4315
|
+
re as i,
|
|
4316
|
+
te as j,
|
|
4317
|
+
K as k,
|
|
4318
|
+
tr as l,
|
|
4319
|
+
ht as m,
|
|
4320
|
+
Xt as n,
|
|
4321
|
+
Hs as o,
|
|
4322
|
+
Mn as p,
|
|
4283
4323
|
T as q,
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4324
|
+
os as r,
|
|
4325
|
+
Oo as s,
|
|
4326
|
+
Ss as t,
|
|
4327
|
+
nr as u,
|
|
4328
|
+
Ge as v,
|
|
4329
|
+
Bs as w,
|
|
4330
|
+
Xs as x,
|
|
4331
|
+
Zs as y,
|
|
4332
|
+
or as z
|
|
4293
4333
|
};
|