@builder.io/sdk-vue 0.2.1 → 0.2.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/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.e14644b9.js → block-styles.5729b057.js} +18 -17
- package/packages/_vue2/dist/block-styles.cb3c2dd0.cjs +1 -0
- package/packages/_vue2/dist/css.2efa95fa.cjs +6 -0
- package/packages/{_vue3/dist/css.a2956fb2.js → _vue2/dist/css.a54ddc90.js} +1 -1
- package/packages/_vue2/dist/{index.af260d16.js → index.6a9eec41.js} +416 -399
- package/packages/_vue2/dist/index.8547cce2.cjs +29 -0
- package/packages/_vue2/dist/{render-block.9394f002.js → render-block.4c7d7ca1.js} +38 -35
- package/packages/_vue2/dist/render-block.753d2325.cjs +3 -0
- package/packages/_vue2/dist/render-component.84d45798.js +38 -0
- package/packages/_vue2/dist/render-component.90275cfa.cjs +1 -0
- package/packages/_vue2/dist/render-inlined-styles.1999f52e.cjs +1 -0
- package/packages/_vue2/dist/render-inlined-styles.1fa49816.js +34 -0
- package/packages/_vue2/dist/{render-repeated-block.fd7c9132.js → render-repeated-block.900e2543.js} +15 -13
- package/packages/_vue2/dist/render-repeated-block.f522a309.cjs +1 -0
- package/packages/_vue2/dist/render-styles.15b8cdf0.cjs +31 -0
- package/packages/_vue2/dist/{render-styles.039fcc51.js → render-styles.591ca7be.js} +26 -25
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +23 -22
- package/packages/_vue2/dist/src/blocks/button/button.vue.d.ts +19 -8
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +29 -174
- package/packages/_vue2/dist/src/blocks/custom-code/custom-code.vue.d.ts +9 -13
- package/packages/_vue2/dist/src/blocks/embed/embed.vue.d.ts +13 -20
- package/packages/_vue2/dist/src/blocks/fragment/fragment.vue.d.ts +1 -4
- package/packages/_vue2/dist/src/blocks/image/image.vue.d.ts +72 -0
- package/packages/_vue2/dist/src/blocks/img/img.vue.d.ts +8 -11
- package/packages/_vue2/dist/src/blocks/section/section.vue.d.ts +12 -7
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +15 -245
- package/packages/_vue2/dist/src/blocks/text/text.vue.d.ts +7 -4
- package/packages/_vue2/dist/src/blocks/video/video.vue.d.ts +42 -7
- package/packages/_vue2/dist/src/components/render-block/block-styles.vue.d.ts +18 -27
- package/packages/_vue2/dist/src/components/render-block/render-block.vue.d.ts +3 -86
- package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +3 -86
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +19 -84
- package/packages/_vue2/dist/src/components/render-blocks.vue.d.ts +23 -127
- package/packages/_vue2/dist/src/components/render-content/components/render-styles.vue.d.ts +15 -18
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +46 -212
- package/packages/_vue2/dist/src/components/render-inlined-styles.vue.d.ts +12 -11
- package/packages/_vue2/dist/src/functions/get-content/index.d.ts +1 -1
- package/packages/_vue2/dist/src/helpers/logger.d.ts +5 -0
- package/packages/_vue2/dist/src/index.d.ts +1 -0
- package/packages/_vue2/dist/src/types/builder-content.d.ts +1 -1
- package/packages/_vue2/dist/src/types/components.d.ts +1 -72
- package/packages/_vue2/dist/src/types/input.d.ts +121 -0
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/block-styles.56f7b28a.cjs +1 -0
- package/packages/_vue3/dist/block-styles.f06f105b.js +69 -0
- package/packages/{_vue2/dist/css.9b722913.js → _vue3/dist/css.2ff361fc.js} +1 -1
- package/packages/{_vue2/dist/css.883115fd.cjs → _vue3/dist/css.f83437ab.cjs} +1 -1
- package/packages/_vue3/dist/{index.b87b71f2.js → index.0aed90df.js} +807 -791
- package/packages/_vue3/dist/index.d72bde22.cjs +29 -0
- package/packages/_vue3/dist/render-block.4e95bb8d.cjs +3 -0
- package/packages/_vue3/dist/{render-block.1a6dc153.js → render-block.905bcce5.js} +87 -106
- package/packages/_vue3/dist/render-component.0a7c094b.cjs +1 -0
- package/packages/_vue3/dist/render-component.b4a311b8.js +42 -0
- package/packages/_vue3/dist/render-inlined-styles.454bc38b.js +32 -0
- package/packages/_vue3/dist/render-inlined-styles.a596482a.cjs +1 -0
- package/packages/_vue3/dist/render-repeated-block.12894c71.js +38 -0
- package/packages/_vue3/dist/render-repeated-block.a95715ec.cjs +1 -0
- package/packages/_vue3/dist/{render-styles.86b7cc7d.js → render-styles.90b25836.js} +33 -33
- package/packages/_vue3/dist/render-styles.b6bf070d.cjs +31 -0
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/blocks/button/button.vue.d.ts +19 -8
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +45 -91
- package/packages/_vue3/dist/src/blocks/custom-code/custom-code.vue.d.ts +16 -13
- package/packages/_vue3/dist/src/blocks/embed/embed.vue.d.ts +17 -20
- package/packages/_vue3/dist/src/blocks/fragment/fragment.vue.d.ts +1 -4
- package/packages/_vue3/dist/src/blocks/image/image.vue.d.ts +54 -14
- package/packages/_vue3/dist/src/blocks/img/img.vue.d.ts +27 -11
- package/packages/_vue3/dist/src/blocks/section/section.vue.d.ts +12 -7
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +25 -171
- package/packages/_vue3/dist/src/blocks/text/text.vue.d.ts +7 -4
- package/packages/_vue3/dist/src/blocks/video/video.vue.d.ts +42 -7
- package/packages/_vue3/dist/src/components/render-block/block-styles.vue.d.ts +18 -27
- package/packages/_vue3/dist/src/components/render-block/render-block.vue.d.ts +2 -2
- package/packages/_vue3/dist/src/components/render-block/render-component.vue.d.ts +2 -2
- package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +19 -8
- package/packages/_vue3/dist/src/components/render-blocks.vue.d.ts +23 -44
- package/packages/_vue3/dist/src/components/render-content/components/render-styles.vue.d.ts +15 -18
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +77 -129
- package/packages/_vue3/dist/src/components/render-inlined-styles.vue.d.ts +12 -11
- package/packages/_vue3/dist/src/functions/get-content/index.d.ts +1 -1
- package/packages/_vue3/dist/src/helpers/logger.d.ts +5 -0
- package/packages/_vue3/dist/src/index.d.ts +1 -0
- package/packages/_vue3/dist/src/types/builder-content.d.ts +1 -1
- package/packages/_vue3/dist/src/types/components.d.ts +1 -72
- package/packages/_vue3/dist/src/types/input.d.ts +121 -0
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.1657b45f.cjs +0 -1
- package/packages/_vue2/dist/index.b9a8defa.cjs +0 -29
- package/packages/_vue2/dist/render-block.73e50e2a.cjs +0 -3
- package/packages/_vue2/dist/render-component.58fe0189.js +0 -37
- package/packages/_vue2/dist/render-component.ab9c6751.cjs +0 -1
- package/packages/_vue2/dist/render-inlined-styles.cdf66d21.js +0 -33
- package/packages/_vue2/dist/render-inlined-styles.f139e6d2.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.d7008df1.cjs +0 -1
- package/packages/_vue2/dist/render-styles.5f902b3b.cjs +0 -31
- package/packages/_vue3/dist/block-styles.02894248.cjs +0 -1
- package/packages/_vue3/dist/block-styles.6e74059d.js +0 -69
- package/packages/_vue3/dist/css.4fc86c7e.cjs +0 -6
- package/packages/_vue3/dist/index.501ef5e2.cjs +0 -29
- package/packages/_vue3/dist/render-block.a0bf0cfc.cjs +0 -3
- package/packages/_vue3/dist/render-component.c1760213.js +0 -26
- package/packages/_vue3/dist/render-component.ce1da9f7.cjs +0 -1
- package/packages/_vue3/dist/render-inlined-styles.1e4cf51b.js +0 -32
- package/packages/_vue3/dist/render-inlined-styles.4e769566.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.607b20dd.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.bc4f1130.js +0 -37
- package/packages/_vue3/dist/render-styles.efd8cf3d.cjs +0 -31
|
@@ -1,52 +1,54 @@
|
|
|
1
|
-
import { openBlock as d, createElementBlock as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as h, openBlock as d, createElementBlock as p, mergeProps as x, toHandlers as T, toDisplayString as H, defineAsyncComponent as S, resolveComponent as w, normalizeClass as V, normalizeStyle as R, createBlock as E, createCommentVNode as v, Fragment as A, renderList as U, createVNode as ee, renderSlot as j, createElementVNode as z } from "vue";
|
|
2
|
+
const fe = h({
|
|
3
3
|
name: "builder-button",
|
|
4
4
|
props: ["attributes", "text", "link", "openLinkInNewTab"],
|
|
5
5
|
methods: {
|
|
6
|
-
filterAttrs: function(
|
|
6
|
+
filterAttrs: function(t = {}, n) {
|
|
7
7
|
const o = "v-on:";
|
|
8
|
-
return Object.keys(
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
return Object.keys(t).filter((s) => {
|
|
9
|
+
if (!t[s])
|
|
10
|
+
return !1;
|
|
11
|
+
const r = s.startsWith(o);
|
|
12
|
+
return n ? r : !r;
|
|
11
13
|
}).reduce(
|
|
12
|
-
(s,
|
|
14
|
+
(s, r) => ({
|
|
13
15
|
...s,
|
|
14
|
-
[
|
|
16
|
+
[r.replace(o, "")]: t[r]
|
|
15
17
|
}),
|
|
16
18
|
{}
|
|
17
19
|
);
|
|
18
20
|
},
|
|
19
21
|
_classStringToObject(e) {
|
|
20
|
-
const
|
|
22
|
+
const t = {};
|
|
21
23
|
if (typeof e != "string")
|
|
22
|
-
return
|
|
23
|
-
const
|
|
24
|
-
for (const o of
|
|
25
|
-
|
|
26
|
-
return
|
|
24
|
+
return t;
|
|
25
|
+
const n = e.trim().split(/\s+/);
|
|
26
|
+
for (const o of n)
|
|
27
|
+
t[o] = !0;
|
|
28
|
+
return t;
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
|
-
};
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
for (const [o, s] of
|
|
33
|
-
|
|
34
|
-
return
|
|
35
|
-
},
|
|
36
|
-
function
|
|
37
|
-
return
|
|
31
|
+
});
|
|
32
|
+
const f = (e, t) => {
|
|
33
|
+
const n = e.__vccOpts || e;
|
|
34
|
+
for (const [o, s] of t)
|
|
35
|
+
n[o] = s;
|
|
36
|
+
return n;
|
|
37
|
+
}, ge = ["href", "target"];
|
|
38
|
+
function be(e, t, n, o, s, r) {
|
|
39
|
+
return e.link ? (d(), p("a", x({
|
|
38
40
|
key: 0,
|
|
39
41
|
role: "button",
|
|
40
|
-
href:
|
|
41
|
-
target:
|
|
42
|
-
},
|
|
42
|
+
href: e.link,
|
|
43
|
+
target: e.openLinkInNewTab ? "_blank" : void 0
|
|
44
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), H(e.text), 17, ge)) : (d(), p("button", x({
|
|
43
45
|
key: 1,
|
|
44
|
-
class:
|
|
45
|
-
|
|
46
|
+
class: e._classStringToObject(
|
|
47
|
+
e.attributes.class + " button-1yj9n7yt24z"
|
|
46
48
|
)
|
|
47
|
-
},
|
|
49
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), H(e.text), 17));
|
|
48
50
|
}
|
|
49
|
-
const
|
|
51
|
+
const ye = /* @__PURE__ */ f(fe, [["render", be], ["__scopeId", "data-v-3b72112d"]]), L = (e) => JSON.parse(JSON.stringify(e)), te = {
|
|
50
52
|
small: {
|
|
51
53
|
min: 320,
|
|
52
54
|
default: 321,
|
|
@@ -62,29 +64,29 @@ const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-498ca04d
|
|
|
62
64
|
default: 991,
|
|
63
65
|
max: 1200
|
|
64
66
|
}
|
|
65
|
-
},
|
|
66
|
-
const
|
|
67
|
-
if (!e || !
|
|
68
|
-
return
|
|
67
|
+
}, Vn = (e, t = te) => `@media (max-width: ${t[e].max}px)`, ve = ({ small: e, medium: t }) => {
|
|
68
|
+
const n = L(te);
|
|
69
|
+
if (!e || !t)
|
|
70
|
+
return n;
|
|
69
71
|
const o = Math.floor(e / 2);
|
|
70
|
-
|
|
72
|
+
n.small = {
|
|
71
73
|
max: e,
|
|
72
74
|
min: o,
|
|
73
75
|
default: o + 1
|
|
74
76
|
};
|
|
75
|
-
const s =
|
|
76
|
-
|
|
77
|
-
max:
|
|
77
|
+
const s = n.small.max + 1;
|
|
78
|
+
n.medium = {
|
|
79
|
+
max: t,
|
|
78
80
|
min: s,
|
|
79
81
|
default: s + 1
|
|
80
82
|
};
|
|
81
|
-
const
|
|
82
|
-
return
|
|
83
|
+
const r = n.medium.max + 1;
|
|
84
|
+
return n.large = {
|
|
83
85
|
max: 2e3,
|
|
84
|
-
min:
|
|
85
|
-
default:
|
|
86
|
-
},
|
|
87
|
-
},
|
|
86
|
+
min: r,
|
|
87
|
+
default: r + 1
|
|
88
|
+
}, n;
|
|
89
|
+
}, _ = "vue3", ke = Symbol(), P = {
|
|
88
90
|
Builder: {
|
|
89
91
|
content: null,
|
|
90
92
|
context: {},
|
|
@@ -96,22 +98,22 @@ const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-498ca04d
|
|
|
96
98
|
registeredComponents: {},
|
|
97
99
|
inheritedStyles: {}
|
|
98
100
|
},
|
|
99
|
-
key:
|
|
100
|
-
},
|
|
101
|
+
key: ke
|
|
102
|
+
}, Se = () => Promise.resolve().then(() => ne).then((e) => e.default).catch((e) => {
|
|
101
103
|
throw console.error(
|
|
102
104
|
"Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
|
|
103
105
|
e
|
|
104
106
|
), e;
|
|
105
|
-
}),
|
|
107
|
+
}), we = () => import("./render-inlined-styles.454bc38b.js").then((e) => e.default).catch((e) => {
|
|
106
108
|
throw console.error(
|
|
107
109
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",
|
|
108
110
|
e
|
|
109
111
|
), e;
|
|
110
|
-
}),
|
|
112
|
+
}), Ce = h({
|
|
111
113
|
name: "builder-columns",
|
|
112
114
|
components: {
|
|
113
|
-
RenderInlinedStyles:
|
|
114
|
-
RenderBlocks:
|
|
115
|
+
RenderInlinedStyles: S(we),
|
|
116
|
+
RenderBlocks: S(Se)
|
|
115
117
|
},
|
|
116
118
|
props: [
|
|
117
119
|
"space",
|
|
@@ -126,11 +128,11 @@ const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-498ca04d
|
|
|
126
128
|
cols: this.columns || [],
|
|
127
129
|
stackAt: this.stackColumnsAt || "tablet",
|
|
128
130
|
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
129
|
-
TARGET:
|
|
131
|
+
TARGET: _
|
|
130
132
|
};
|
|
131
133
|
},
|
|
132
134
|
inject: {
|
|
133
|
-
builderContext:
|
|
135
|
+
builderContext: P.key
|
|
134
136
|
},
|
|
135
137
|
computed: {
|
|
136
138
|
columnsCssVars() {
|
|
@@ -144,123 +146,123 @@ const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-498ca04d
|
|
|
144
146
|
},
|
|
145
147
|
columnsStyles() {
|
|
146
148
|
return `
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
150
|
+
.${this.builderBlock.id}-breakpoints {
|
|
151
|
+
flex-direction: var(--flex-dir-tablet);
|
|
152
|
+
align-items: stretch;
|
|
153
|
+
}
|
|
152
154
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
156
|
+
width: var(--column-width-tablet) !important;
|
|
157
|
+
margin-left: var(--column-margin-left-tablet) !important;
|
|
158
|
+
}
|
|
156
159
|
}
|
|
157
|
-
}
|
|
158
160
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
@media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
|
|
162
|
+
.${this.builderBlock.id}-breakpoints {
|
|
163
|
+
flex-direction: var(--flex-dir);
|
|
164
|
+
align-items: stretch;
|
|
165
|
+
}
|
|
164
166
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
168
|
+
width: var(--column-width-mobile) !important;
|
|
169
|
+
margin-left: var(--column-margin-left-mobile) !important;
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
`;
|
|
171
173
|
}
|
|
172
174
|
},
|
|
173
175
|
methods: {
|
|
174
176
|
getWidth(e) {
|
|
175
|
-
var
|
|
176
|
-
return ((
|
|
177
|
+
var t;
|
|
178
|
+
return ((t = this.cols[e]) == null ? void 0 : t.width) || 100 / this.cols.length;
|
|
177
179
|
},
|
|
178
180
|
getColumnCssWidth(e) {
|
|
179
|
-
const
|
|
180
|
-
return `calc(${this.getWidth(e)}% - ${
|
|
181
|
+
const t = this.gutterSize * (this.cols.length - 1) / this.cols.length;
|
|
182
|
+
return `calc(${this.getWidth(e)}% - ${t}px)`;
|
|
181
183
|
},
|
|
182
184
|
getTabletStyle({
|
|
183
185
|
stackedStyle: e,
|
|
184
|
-
desktopStyle:
|
|
186
|
+
desktopStyle: t
|
|
185
187
|
}) {
|
|
186
|
-
return this.stackAt === "tablet" ? e :
|
|
188
|
+
return this.stackAt === "tablet" ? e : t;
|
|
187
189
|
},
|
|
188
190
|
getMobileStyle({
|
|
189
191
|
stackedStyle: e,
|
|
190
|
-
desktopStyle:
|
|
192
|
+
desktopStyle: t
|
|
191
193
|
}) {
|
|
192
|
-
return this.stackAt === "never" ?
|
|
194
|
+
return this.stackAt === "never" ? t : e;
|
|
193
195
|
},
|
|
194
196
|
columnCssVars(e) {
|
|
195
197
|
e === 0 || this.gutterSize;
|
|
196
|
-
const
|
|
198
|
+
const t = this.getColumnCssWidth(e), n = `${this.gutterSize}px`, o = "100%", s = 0;
|
|
197
199
|
return {
|
|
198
|
-
width:
|
|
199
|
-
"margin-left":
|
|
200
|
+
width: t,
|
|
201
|
+
"margin-left": n,
|
|
200
202
|
"--column-width-mobile": this.getMobileStyle({
|
|
201
203
|
stackedStyle: o,
|
|
202
|
-
desktopStyle:
|
|
204
|
+
desktopStyle: t
|
|
203
205
|
}),
|
|
204
206
|
"--column-margin-left-mobile": this.getMobileStyle({
|
|
205
207
|
stackedStyle: s,
|
|
206
|
-
desktopStyle:
|
|
208
|
+
desktopStyle: n
|
|
207
209
|
}),
|
|
208
210
|
"--column-width-tablet": this.getTabletStyle({
|
|
209
211
|
stackedStyle: o,
|
|
210
|
-
desktopStyle:
|
|
212
|
+
desktopStyle: t
|
|
211
213
|
}),
|
|
212
214
|
"--column-margin-left-tablet": this.getTabletStyle({
|
|
213
215
|
stackedStyle: s,
|
|
214
|
-
desktopStyle:
|
|
216
|
+
desktopStyle: n
|
|
215
217
|
})
|
|
216
218
|
};
|
|
217
219
|
},
|
|
218
220
|
getWidthForBreakpointSize(e) {
|
|
219
|
-
var
|
|
220
|
-
return
|
|
221
|
-
((o = (
|
|
221
|
+
var n, o;
|
|
222
|
+
return ve(
|
|
223
|
+
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
222
224
|
)[e].max;
|
|
223
225
|
},
|
|
224
226
|
_classStringToObject(e) {
|
|
225
|
-
const
|
|
227
|
+
const t = {};
|
|
226
228
|
if (typeof e != "string")
|
|
227
|
-
return
|
|
228
|
-
const
|
|
229
|
-
for (const o of
|
|
230
|
-
|
|
231
|
-
return
|
|
229
|
+
return t;
|
|
230
|
+
const n = e.trim().split(/\s+/);
|
|
231
|
+
for (const o of n)
|
|
232
|
+
t[o] = !0;
|
|
233
|
+
return t;
|
|
232
234
|
}
|
|
233
235
|
}
|
|
234
|
-
};
|
|
235
|
-
function
|
|
236
|
-
const
|
|
237
|
-
return d(),
|
|
238
|
-
class:
|
|
239
|
-
|
|
240
|
-
`builder-columns ${
|
|
236
|
+
});
|
|
237
|
+
function xe(e, t, n, o, s, r) {
|
|
238
|
+
const i = w("render-inlined-styles"), l = w("render-blocks");
|
|
239
|
+
return d(), p("div", {
|
|
240
|
+
class: V(
|
|
241
|
+
e._classStringToObject(
|
|
242
|
+
`builder-columns ${e.builderBlock.id}-breakpoints div-361b1o6wv2k`
|
|
241
243
|
)
|
|
242
244
|
),
|
|
243
|
-
style:
|
|
245
|
+
style: R(e.columnsCssVars),
|
|
244
246
|
dataSet: {
|
|
245
247
|
"builder-block-name": "builder-columns"
|
|
246
248
|
}
|
|
247
249
|
}, [
|
|
248
|
-
|
|
250
|
+
e.TARGET !== "reactNative" ? (d(), E(i, {
|
|
249
251
|
key: 0,
|
|
250
|
-
styles:
|
|
251
|
-
}, null, 8, ["styles"])) :
|
|
252
|
-
(d(!0),
|
|
253
|
-
key:
|
|
252
|
+
styles: e.columnsStyles
|
|
253
|
+
}, null, 8, ["styles"])) : v("", !0),
|
|
254
|
+
(d(!0), p(A, null, U(e.columns, (a, c) => (d(), p("div", {
|
|
255
|
+
key: c,
|
|
254
256
|
class: "builder-column div-361b1o6wv2k-2",
|
|
255
|
-
style:
|
|
257
|
+
style: R(e.columnCssVars(c)),
|
|
256
258
|
dataSet: {
|
|
257
259
|
"builder-block-name": "builder-column"
|
|
258
260
|
}
|
|
259
261
|
}, [
|
|
260
|
-
|
|
262
|
+
ee(l, {
|
|
261
263
|
blocks: a.blocks,
|
|
262
|
-
path: `component.options.columns.${
|
|
263
|
-
parent:
|
|
264
|
+
path: `component.options.columns.${c}.blocks`,
|
|
265
|
+
parent: e.builderBlock.id,
|
|
264
266
|
styleProp: {
|
|
265
267
|
flexGrow: "1"
|
|
266
268
|
}
|
|
@@ -268,49 +270,49 @@ function ke(e, n, t, o, s, i) {
|
|
|
268
270
|
], 4))), 128))
|
|
269
271
|
], 6);
|
|
270
272
|
}
|
|
271
|
-
const
|
|
273
|
+
const Ie = /* @__PURE__ */ f(Ce, [["render", xe], ["__scopeId", "data-v-cb4e9d3e"]]), $e = h({
|
|
272
274
|
name: "builder-fragment-component",
|
|
273
275
|
props: []
|
|
274
|
-
};
|
|
275
|
-
function
|
|
276
|
-
return d(),
|
|
277
|
-
|
|
276
|
+
});
|
|
277
|
+
function Te(e, t, n, o, s, r) {
|
|
278
|
+
return d(), p("span", null, [
|
|
279
|
+
j(e.$slots, "default")
|
|
278
280
|
]);
|
|
279
281
|
}
|
|
280
|
-
const
|
|
281
|
-
function
|
|
282
|
+
const Re = /* @__PURE__ */ f($e, [["render", Te]]);
|
|
283
|
+
function K(e) {
|
|
282
284
|
return e.replace(/http(s)?:/, "");
|
|
283
285
|
}
|
|
284
|
-
function
|
|
285
|
-
const o = new RegExp("([?&])" +
|
|
286
|
-
return e.match(o) ? e.replace(o, "$1" +
|
|
286
|
+
function Ee(e = "", t, n) {
|
|
287
|
+
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), s = e.indexOf("?") !== -1 ? "&" : "?";
|
|
288
|
+
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + s + t + "=" + encodeURIComponent(n);
|
|
287
289
|
}
|
|
288
|
-
function
|
|
289
|
-
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !
|
|
290
|
+
function _e(e, t) {
|
|
291
|
+
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
290
292
|
return e;
|
|
291
|
-
if (
|
|
292
|
-
return
|
|
293
|
-
const
|
|
293
|
+
if (t === "master")
|
|
294
|
+
return K(e);
|
|
295
|
+
const n = e.match(
|
|
294
296
|
/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i
|
|
295
297
|
);
|
|
296
|
-
if (
|
|
297
|
-
const o = e.split(
|
|
298
|
-
return
|
|
298
|
+
if (n) {
|
|
299
|
+
const o = e.split(n[0]), s = n[3], r = t.match("x") ? t : `${t}x`;
|
|
300
|
+
return K(`${o[0]}_${r}${s}`);
|
|
299
301
|
}
|
|
300
302
|
return null;
|
|
301
303
|
}
|
|
302
|
-
function
|
|
304
|
+
function F(e) {
|
|
303
305
|
if (!e)
|
|
304
306
|
return e;
|
|
305
|
-
const
|
|
307
|
+
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
306
308
|
if (e.match(/builder\.io/)) {
|
|
307
|
-
let
|
|
309
|
+
let n = e;
|
|
308
310
|
const o = Number(e.split("?width=")[1]);
|
|
309
|
-
return isNaN(o) || (
|
|
311
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((s) => s !== o).map((s) => `${Ee(e, "width", s)} ${s}w`).concat([n]).join(", ");
|
|
310
312
|
}
|
|
311
|
-
return e.match(/cdn\.shopify\.com/) ?
|
|
313
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [_e(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
312
314
|
}
|
|
313
|
-
const
|
|
315
|
+
const Ae = h({
|
|
314
316
|
name: "builder-image",
|
|
315
317
|
props: [
|
|
316
318
|
"image",
|
|
@@ -328,16 +330,16 @@ const Re = {
|
|
|
328
330
|
],
|
|
329
331
|
computed: {
|
|
330
332
|
srcSetToUse() {
|
|
331
|
-
var
|
|
332
|
-
const
|
|
333
|
-
if (!
|
|
333
|
+
var n;
|
|
334
|
+
const t = this.image || this.src;
|
|
335
|
+
if (!t || !(t.match(/builder\.io/) || t.match(/cdn\.shopify\.com/)))
|
|
334
336
|
return this.srcset;
|
|
335
|
-
if (this.srcset && ((
|
|
337
|
+
if (this.srcset && ((n = this.image) == null ? void 0 : n.includes("builder.io/api/v1/image"))) {
|
|
336
338
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
337
|
-
return console.debug("Removed given srcset"),
|
|
339
|
+
return console.debug("Removed given srcset"), F(t);
|
|
338
340
|
} else if (this.image && !this.srcset)
|
|
339
|
-
return
|
|
340
|
-
return
|
|
341
|
+
return F(t);
|
|
342
|
+
return F(t);
|
|
341
343
|
},
|
|
342
344
|
webpSrcSet() {
|
|
343
345
|
var e;
|
|
@@ -356,90 +358,90 @@ const Re = {
|
|
|
356
358
|
},
|
|
357
359
|
methods: {
|
|
358
360
|
_classStringToObject(e) {
|
|
359
|
-
const
|
|
361
|
+
const t = {};
|
|
360
362
|
if (typeof e != "string")
|
|
361
|
-
return
|
|
362
|
-
const
|
|
363
|
-
for (const o of
|
|
364
|
-
|
|
365
|
-
return
|
|
363
|
+
return t;
|
|
364
|
+
const n = e.trim().split(/\s+/);
|
|
365
|
+
for (const o of n)
|
|
366
|
+
t[o] = !0;
|
|
367
|
+
return t;
|
|
366
368
|
}
|
|
367
369
|
}
|
|
368
|
-
};
|
|
369
|
-
const
|
|
370
|
+
});
|
|
371
|
+
const je = ["srcset"], Ve = ["alt", "role", "src", "srcset", "sizes"], Pe = {
|
|
370
372
|
key: 2,
|
|
371
373
|
class: "div-7jvpanrlkn-2"
|
|
372
374
|
};
|
|
373
|
-
function Be(e,
|
|
374
|
-
var
|
|
375
|
-
return d(),
|
|
376
|
-
|
|
377
|
-
|
|
375
|
+
function Be(e, t, n, o, s, r) {
|
|
376
|
+
var i, l, a, c;
|
|
377
|
+
return d(), p(A, null, [
|
|
378
|
+
z("picture", null, [
|
|
379
|
+
e.webpSrcSet ? (d(), p("source", {
|
|
378
380
|
key: 0,
|
|
379
381
|
type: "image/webp",
|
|
380
|
-
srcset:
|
|
381
|
-
}, null, 8,
|
|
382
|
-
|
|
382
|
+
srcset: e.webpSrcSet
|
|
383
|
+
}, null, 8, je)) : v("", !0),
|
|
384
|
+
z("img", {
|
|
383
385
|
loading: "lazy",
|
|
384
|
-
alt:
|
|
385
|
-
role:
|
|
386
|
-
style:
|
|
387
|
-
objectPosition:
|
|
388
|
-
objectFit:
|
|
389
|
-
...
|
|
386
|
+
alt: e.altText,
|
|
387
|
+
role: e.altText ? "presentation" : void 0,
|
|
388
|
+
style: R({
|
|
389
|
+
objectPosition: e.backgroundPosition || "center",
|
|
390
|
+
objectFit: e.backgroundSize || "cover",
|
|
391
|
+
...e.aspectRatioCss
|
|
390
392
|
}),
|
|
391
|
-
class:
|
|
392
|
-
|
|
393
|
-
"builder-image" + (
|
|
393
|
+
class: V(
|
|
394
|
+
e._classStringToObject(
|
|
395
|
+
"builder-image" + (e.className ? " " + e.className : "") + " img-7jvpanrlkn"
|
|
394
396
|
)
|
|
395
397
|
),
|
|
396
|
-
src:
|
|
397
|
-
srcset:
|
|
398
|
-
sizes:
|
|
399
|
-
}, null, 14,
|
|
398
|
+
src: e.image,
|
|
399
|
+
srcset: e.srcSetToUse,
|
|
400
|
+
sizes: e.sizes
|
|
401
|
+
}, null, 14, Ve)
|
|
400
402
|
]),
|
|
401
|
-
|
|
403
|
+
e.aspectRatio && !(((l = (i = e.builderBlock) == null ? void 0 : i.children) == null ? void 0 : l.length) && e.fitContent) ? (d(), p("div", {
|
|
402
404
|
key: 0,
|
|
403
405
|
class: "builder-image-sizer div-7jvpanrlkn",
|
|
404
|
-
style:
|
|
405
|
-
paddingTop:
|
|
406
|
+
style: R({
|
|
407
|
+
paddingTop: e.aspectRatio * 100 + "%"
|
|
406
408
|
})
|
|
407
|
-
}, null, 4)) :
|
|
408
|
-
((
|
|
409
|
-
!
|
|
410
|
-
|
|
411
|
-
])) :
|
|
409
|
+
}, null, 4)) : v("", !0),
|
|
410
|
+
((c = (a = e.builderBlock) == null ? void 0 : a.children) == null ? void 0 : c.length) && e.fitContent ? j(e.$slots, "default", { key: 1 }, void 0, !0) : v("", !0),
|
|
411
|
+
!e.fitContent && e.children ? (d(), p("div", Pe, [
|
|
412
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
413
|
+
])) : v("", !0)
|
|
412
414
|
], 64);
|
|
413
415
|
}
|
|
414
|
-
const
|
|
415
|
-
function
|
|
416
|
+
const Fe = /* @__PURE__ */ f(Ae, [["render", Be], ["__scopeId", "data-v-034e3c7d"]]);
|
|
417
|
+
function m() {
|
|
416
418
|
return typeof window < "u" && typeof document < "u";
|
|
417
419
|
}
|
|
418
420
|
function Oe() {
|
|
419
|
-
return
|
|
421
|
+
return m() && window.self !== window.top;
|
|
420
422
|
}
|
|
421
|
-
function
|
|
423
|
+
function k() {
|
|
422
424
|
return Oe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
423
425
|
}
|
|
424
|
-
const
|
|
426
|
+
const Ue = () => import("./block-styles.f06f105b.js").then((e) => e.default).catch((e) => {
|
|
425
427
|
throw console.error(
|
|
426
428
|
"Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
|
|
427
429
|
e
|
|
428
430
|
), e;
|
|
429
|
-
}),
|
|
431
|
+
}), We = () => import("./render-block.905bcce5.js").then((e) => e.default).catch((e) => {
|
|
430
432
|
throw console.error(
|
|
431
433
|
"Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
|
|
432
434
|
e
|
|
433
435
|
), e;
|
|
434
|
-
}),
|
|
436
|
+
}), Me = h({
|
|
435
437
|
name: "render-blocks",
|
|
436
438
|
components: {
|
|
437
|
-
RenderBlock:
|
|
438
|
-
BlockStyles:
|
|
439
|
+
RenderBlock: S(We),
|
|
440
|
+
BlockStyles: S(Ue)
|
|
439
441
|
},
|
|
440
442
|
props: ["blocks", "parent", "path", "styleProp"],
|
|
441
443
|
inject: {
|
|
442
|
-
builderContext:
|
|
444
|
+
builderContext: P.key
|
|
443
445
|
},
|
|
444
446
|
computed: {
|
|
445
447
|
className() {
|
|
@@ -449,8 +451,8 @@ const Pe = () => import("./block-styles.6e74059d.js").then((e) => e.default).cat
|
|
|
449
451
|
},
|
|
450
452
|
methods: {
|
|
451
453
|
onClick() {
|
|
452
|
-
var e,
|
|
453
|
-
|
|
454
|
+
var e, t;
|
|
455
|
+
k() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
454
456
|
{
|
|
455
457
|
type: "builder.clickEmptyBlocks",
|
|
456
458
|
data: {
|
|
@@ -462,8 +464,8 @@ const Pe = () => import("./block-styles.6e74059d.js").then((e) => e.default).cat
|
|
|
462
464
|
));
|
|
463
465
|
},
|
|
464
466
|
onMouseEnter() {
|
|
465
|
-
var e,
|
|
466
|
-
|
|
467
|
+
var e, t;
|
|
468
|
+
k() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
467
469
|
{
|
|
468
470
|
type: "builder.hoverEmptyBlocks",
|
|
469
471
|
data: {
|
|
@@ -475,46 +477,46 @@ const Pe = () => import("./block-styles.6e74059d.js").then((e) => e.default).cat
|
|
|
475
477
|
));
|
|
476
478
|
},
|
|
477
479
|
_classStringToObject(e) {
|
|
478
|
-
const
|
|
480
|
+
const t = {};
|
|
479
481
|
if (typeof e != "string")
|
|
480
|
-
return
|
|
481
|
-
const
|
|
482
|
-
for (const o of
|
|
483
|
-
|
|
484
|
-
return
|
|
482
|
+
return t;
|
|
483
|
+
const n = e.trim().split(/\s+/);
|
|
484
|
+
for (const o of n)
|
|
485
|
+
t[o] = !0;
|
|
486
|
+
return t;
|
|
485
487
|
}
|
|
486
488
|
}
|
|
487
|
-
};
|
|
488
|
-
const
|
|
489
|
-
function
|
|
490
|
-
const
|
|
491
|
-
return d(),
|
|
492
|
-
class:
|
|
493
|
-
"builder-path":
|
|
494
|
-
"builder-parent-id":
|
|
489
|
+
});
|
|
490
|
+
const Le = ["builder-path", "builder-parent-id", "dataSet"];
|
|
491
|
+
function Ne(e, t, n, o, s, r) {
|
|
492
|
+
const i = w("render-block"), l = w("block-styles");
|
|
493
|
+
return d(), p("div", {
|
|
494
|
+
class: V(e._classStringToObject(e.className + " div-7fq9d0i380")),
|
|
495
|
+
"builder-path": e.path,
|
|
496
|
+
"builder-parent-id": e.parent,
|
|
495
497
|
dataSet: {
|
|
496
|
-
class:
|
|
498
|
+
class: e.className
|
|
497
499
|
},
|
|
498
|
-
style:
|
|
499
|
-
onClick:
|
|
500
|
-
onMouseenter:
|
|
500
|
+
style: R(e.styleProp),
|
|
501
|
+
onClick: t[0] || (t[0] = (a) => e.onClick()),
|
|
502
|
+
onMouseenter: t[1] || (t[1] = (a) => e.onMouseEnter())
|
|
501
503
|
}, [
|
|
502
|
-
|
|
504
|
+
e.blocks ? (d(!0), p(A, { key: 0 }, U(e.blocks, (a, c) => (d(), E(i, {
|
|
503
505
|
key: "render-block-" + a.id,
|
|
504
506
|
block: a,
|
|
505
|
-
context:
|
|
506
|
-
}, null, 8, ["block", "context"]))), 128)) :
|
|
507
|
-
|
|
507
|
+
context: e.builderContext
|
|
508
|
+
}, null, 8, ["block", "context"]))), 128)) : v("", !0),
|
|
509
|
+
e.blocks ? (d(!0), p(A, { key: 1 }, U(e.blocks, (a, c) => (d(), E(l, {
|
|
508
510
|
key: "block-style-" + a.id,
|
|
509
511
|
block: a,
|
|
510
|
-
context:
|
|
511
|
-
}, null, 8, ["block", "context"]))), 128)) :
|
|
512
|
-
], 46,
|
|
512
|
+
context: e.builderContext
|
|
513
|
+
}, null, 8, ["block", "context"]))), 128)) : v("", !0)
|
|
514
|
+
], 46, Le);
|
|
513
515
|
}
|
|
514
|
-
const
|
|
516
|
+
const He = /* @__PURE__ */ f(Me, [["render", Ne], ["__scopeId", "data-v-ff3cb99b"]]), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
515
517
|
__proto__: null,
|
|
516
|
-
default:
|
|
517
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
518
|
+
default: He
|
|
519
|
+
}, Symbol.toStringTag, { value: "Module" })), ze = {
|
|
518
520
|
name: "Core:Button",
|
|
519
521
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
520
522
|
defaultStyles: {
|
|
@@ -550,10 +552,10 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
550
552
|
],
|
|
551
553
|
static: !0,
|
|
552
554
|
noWrap: !0
|
|
553
|
-
},
|
|
554
|
-
const
|
|
555
|
-
return `return (${!
|
|
556
|
-
},
|
|
555
|
+
}, B = (e) => {
|
|
556
|
+
const t = e.toString().trim();
|
|
557
|
+
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
558
|
+
}, Ke = {
|
|
557
559
|
name: "Columns",
|
|
558
560
|
inputs: [
|
|
559
561
|
{
|
|
@@ -740,18 +742,18 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
740
742
|
]
|
|
741
743
|
}
|
|
742
744
|
],
|
|
743
|
-
onChange:
|
|
744
|
-
function
|
|
745
|
-
|
|
745
|
+
onChange: B((e) => {
|
|
746
|
+
function t() {
|
|
747
|
+
n.forEach((o) => {
|
|
746
748
|
o.delete("width");
|
|
747
749
|
});
|
|
748
750
|
}
|
|
749
|
-
const
|
|
750
|
-
Array.isArray(
|
|
751
|
+
const n = e.get("columns");
|
|
752
|
+
Array.isArray(n) && !!n.find(
|
|
751
753
|
(s) => s.get("width")
|
|
752
|
-
) && (!!
|
|
753
|
-
(
|
|
754
|
-
) ||
|
|
754
|
+
) && (!!n.find(
|
|
755
|
+
(r) => !r.get("width")
|
|
756
|
+
) || n.reduce((l, a) => l + a.get("width"), 0) !== 100) && t();
|
|
755
757
|
})
|
|
756
758
|
},
|
|
757
759
|
{
|
|
@@ -777,13 +779,13 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
777
779
|
advanced: !0
|
|
778
780
|
}
|
|
779
781
|
]
|
|
780
|
-
},
|
|
782
|
+
}, De = {
|
|
781
783
|
name: "Fragment",
|
|
782
784
|
static: !0,
|
|
783
785
|
hidden: !0,
|
|
784
786
|
canHaveChildren: !0,
|
|
785
787
|
noWrap: !0
|
|
786
|
-
},
|
|
788
|
+
}, qe = {
|
|
787
789
|
name: "Image",
|
|
788
790
|
static: !0,
|
|
789
791
|
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",
|
|
@@ -802,32 +804,32 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
802
804
|
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
803
805
|
required: !0,
|
|
804
806
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
805
|
-
onChange:
|
|
807
|
+
onChange: B(
|
|
806
808
|
(e) => {
|
|
807
809
|
e.delete("srcset"), e.delete("noWebp");
|
|
808
|
-
function
|
|
809
|
-
return new Promise((a,
|
|
810
|
+
function n(i, l = 6e4) {
|
|
811
|
+
return new Promise((a, c) => {
|
|
810
812
|
const u = document.createElement("img");
|
|
811
|
-
let
|
|
813
|
+
let b = !1;
|
|
812
814
|
u.onload = () => {
|
|
813
|
-
|
|
814
|
-
}, u.addEventListener("error", (
|
|
815
|
-
console.warn("Image load failed",
|
|
816
|
-
}), u.src =
|
|
817
|
-
|
|
818
|
-
},
|
|
815
|
+
b = !0, a(u);
|
|
816
|
+
}, u.addEventListener("error", (g) => {
|
|
817
|
+
console.warn("Image load failed", g.error), c(g.error);
|
|
818
|
+
}), u.src = i, setTimeout(() => {
|
|
819
|
+
b || c(new Error("Image load timed out"));
|
|
820
|
+
}, l);
|
|
819
821
|
});
|
|
820
822
|
}
|
|
821
|
-
function o(
|
|
822
|
-
return Math.round(
|
|
823
|
+
function o(i) {
|
|
824
|
+
return Math.round(i * 1e3) / 1e3;
|
|
823
825
|
}
|
|
824
|
-
const s = e.get("image"),
|
|
825
|
-
if (fetch(s).then((
|
|
826
|
-
|
|
827
|
-
}), s && (!
|
|
828
|
-
return
|
|
829
|
-
const
|
|
830
|
-
e.get("image") === s && (!
|
|
826
|
+
const s = e.get("image"), r = e.get("aspectRatio");
|
|
827
|
+
if (fetch(s).then((i) => i.blob()).then((i) => {
|
|
828
|
+
i.type.includes("svg") && e.set("noWebp", !0);
|
|
829
|
+
}), s && (!r || r === 0.7041))
|
|
830
|
+
return n(s).then((i) => {
|
|
831
|
+
const l = e.get("aspectRatio");
|
|
832
|
+
e.get("image") === s && (!l || l === 0.7041) && i.width && i.height && (e.set("aspectRatio", o(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
|
|
831
833
|
});
|
|
832
834
|
}
|
|
833
835
|
)
|
|
@@ -910,7 +912,7 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
910
912
|
defaultValue: 0.7041
|
|
911
913
|
}
|
|
912
914
|
]
|
|
913
|
-
},
|
|
915
|
+
}, Ge = {
|
|
914
916
|
name: "Core:Section",
|
|
915
917
|
static: !0,
|
|
916
918
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -954,44 +956,46 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
954
956
|
}
|
|
955
957
|
}
|
|
956
958
|
]
|
|
957
|
-
},
|
|
959
|
+
}, Je = h({
|
|
958
960
|
name: "builder-section-component",
|
|
959
961
|
props: ["maxWidth", "attributes"],
|
|
960
962
|
methods: {
|
|
961
|
-
filterAttrs: function(
|
|
963
|
+
filterAttrs: function(t = {}, n) {
|
|
962
964
|
const o = "v-on:";
|
|
963
|
-
return Object.keys(
|
|
964
|
-
|
|
965
|
-
|
|
965
|
+
return Object.keys(t).filter((s) => {
|
|
966
|
+
if (!t[s])
|
|
967
|
+
return !1;
|
|
968
|
+
const r = s.startsWith(o);
|
|
969
|
+
return n ? r : !r;
|
|
966
970
|
}).reduce(
|
|
967
|
-
(s,
|
|
971
|
+
(s, r) => ({
|
|
968
972
|
...s,
|
|
969
|
-
[
|
|
973
|
+
[r.replace(o, "")]: t[r]
|
|
970
974
|
}),
|
|
971
975
|
{}
|
|
972
976
|
);
|
|
973
977
|
}
|
|
974
978
|
}
|
|
975
|
-
};
|
|
976
|
-
function
|
|
977
|
-
return d(),
|
|
979
|
+
});
|
|
980
|
+
function Xe(e, t, n, o, s, r) {
|
|
981
|
+
return d(), p("section", x({
|
|
978
982
|
style: {
|
|
979
983
|
width: "100%",
|
|
980
984
|
alignSelf: "stretch",
|
|
981
985
|
flexGrow: 1,
|
|
982
986
|
boxSizing: "border-box",
|
|
983
|
-
maxWidth:
|
|
987
|
+
maxWidth: e.maxWidth || 1200,
|
|
984
988
|
display: "flex",
|
|
985
989
|
flexDirection: "column",
|
|
986
990
|
alignItems: "stretch",
|
|
987
991
|
marginLeft: "auto",
|
|
988
992
|
marginRight: "auto"
|
|
989
993
|
}
|
|
990
|
-
},
|
|
991
|
-
|
|
994
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), [
|
|
995
|
+
j(e.$slots, "default")
|
|
992
996
|
], 16);
|
|
993
997
|
}
|
|
994
|
-
const
|
|
998
|
+
const Ye = /* @__PURE__ */ f(Je, [["render", Xe]]), Qe = {
|
|
995
999
|
name: "Symbol",
|
|
996
1000
|
noWrap: !0,
|
|
997
1001
|
static: !0,
|
|
@@ -1029,12 +1033,16 @@ const Ge = /* @__PURE__ */ h(De, [["render", qe]]), Je = {
|
|
|
1029
1033
|
type: "boolean"
|
|
1030
1034
|
}
|
|
1031
1035
|
]
|
|
1036
|
+
}, O = "[Builder.io]: ", C = {
|
|
1037
|
+
log: (...e) => console.log(O, ...e),
|
|
1038
|
+
error: (...e) => console.error(O, ...e),
|
|
1039
|
+
warn: (...e) => console.warn(O, ...e)
|
|
1032
1040
|
};
|
|
1033
|
-
function
|
|
1041
|
+
function Ze() {
|
|
1034
1042
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1035
1043
|
}
|
|
1036
|
-
function
|
|
1037
|
-
const e =
|
|
1044
|
+
function et() {
|
|
1045
|
+
const e = Ze().fetch;
|
|
1038
1046
|
if (typeof e > "u")
|
|
1039
1047
|
throw console.warn(
|
|
1040
1048
|
`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
@@ -1042,221 +1050,225 @@ function Xe() {
|
|
|
1042
1050
|
), new Error("Builder SDK could not find a global `fetch` function");
|
|
1043
1051
|
return e;
|
|
1044
1052
|
}
|
|
1045
|
-
const
|
|
1053
|
+
const oe = et(), I = (e) => e != null, tt = (e) => {
|
|
1046
1054
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1047
1055
|
return e;
|
|
1048
|
-
const
|
|
1049
|
-
return
|
|
1050
|
-
},
|
|
1056
|
+
const t = e.split(".");
|
|
1057
|
+
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
1058
|
+
}, se = async ({
|
|
1051
1059
|
name: e,
|
|
1052
|
-
canTrack:
|
|
1060
|
+
canTrack: t
|
|
1053
1061
|
}) => {
|
|
1054
|
-
var
|
|
1062
|
+
var n;
|
|
1055
1063
|
try {
|
|
1056
|
-
return
|
|
1064
|
+
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
1057
1065
|
} catch (o) {
|
|
1058
1066
|
console.debug("[COOKIE] GET error: ", o);
|
|
1059
1067
|
return;
|
|
1060
1068
|
}
|
|
1061
|
-
},
|
|
1069
|
+
}, nt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(I).join("; "), ot = [
|
|
1062
1070
|
["secure", ""],
|
|
1063
1071
|
["SameSite", "None"]
|
|
1064
|
-
],
|
|
1072
|
+
], st = ({
|
|
1065
1073
|
name: e,
|
|
1066
|
-
value:
|
|
1067
|
-
expires:
|
|
1074
|
+
value: t,
|
|
1075
|
+
expires: n
|
|
1068
1076
|
}) => {
|
|
1069
|
-
const s = (
|
|
1070
|
-
[e,
|
|
1071
|
-
...
|
|
1077
|
+
const s = (m() ? location.protocol === "https:" : !0) ? ot : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [
|
|
1078
|
+
[e, t],
|
|
1079
|
+
...r,
|
|
1072
1080
|
["path", "/"],
|
|
1073
|
-
["domain",
|
|
1081
|
+
["domain", tt(window.location.hostname)],
|
|
1074
1082
|
...s
|
|
1075
1083
|
];
|
|
1076
|
-
return
|
|
1077
|
-
},
|
|
1084
|
+
return nt(i);
|
|
1085
|
+
}, re = async ({
|
|
1078
1086
|
name: e,
|
|
1079
|
-
value:
|
|
1080
|
-
expires:
|
|
1087
|
+
value: t,
|
|
1088
|
+
expires: n,
|
|
1081
1089
|
canTrack: o
|
|
1082
1090
|
}) => {
|
|
1083
1091
|
try {
|
|
1084
1092
|
if (!o)
|
|
1085
1093
|
return;
|
|
1086
|
-
const s =
|
|
1094
|
+
const s = st({ name: e, value: t, expires: n });
|
|
1087
1095
|
document.cookie = s;
|
|
1088
1096
|
} catch (s) {
|
|
1089
1097
|
console.warn("[COOKIE] SET error: ", s);
|
|
1090
1098
|
}
|
|
1091
|
-
},
|
|
1099
|
+
}, rt = "builderio.variations", ie = (e) => `${rt}.${e}`, it = ({
|
|
1092
1100
|
contentId: e,
|
|
1093
|
-
canTrack:
|
|
1094
|
-
}) =>
|
|
1101
|
+
canTrack: t
|
|
1102
|
+
}) => se({ name: ie(e), canTrack: t }), at = ({
|
|
1095
1103
|
contentId: e,
|
|
1096
|
-
canTrack:
|
|
1097
|
-
value:
|
|
1098
|
-
}) =>
|
|
1104
|
+
canTrack: t,
|
|
1105
|
+
value: n
|
|
1106
|
+
}) => re({ name: ie(e), value: n, canTrack: t }), lt = (e) => I(e.id) && I(e.variations) && Object.keys(e.variations).length > 0, ct = ({
|
|
1099
1107
|
id: e,
|
|
1100
|
-
variations:
|
|
1108
|
+
variations: t
|
|
1101
1109
|
}) => {
|
|
1102
1110
|
var s;
|
|
1103
|
-
let
|
|
1111
|
+
let n = 0;
|
|
1104
1112
|
const o = Math.random();
|
|
1105
|
-
for (const
|
|
1106
|
-
const
|
|
1107
|
-
if (
|
|
1108
|
-
return
|
|
1113
|
+
for (const r in t) {
|
|
1114
|
+
const i = (s = t[r]) == null ? void 0 : s.testRatio;
|
|
1115
|
+
if (n += i, o < n)
|
|
1116
|
+
return r;
|
|
1109
1117
|
}
|
|
1110
1118
|
return e;
|
|
1111
|
-
},
|
|
1119
|
+
}, D = ({
|
|
1112
1120
|
item: e,
|
|
1113
|
-
testGroupId:
|
|
1121
|
+
testGroupId: t
|
|
1114
1122
|
}) => {
|
|
1115
|
-
const
|
|
1116
|
-
return
|
|
1123
|
+
const n = e.variations[t];
|
|
1124
|
+
return t === e.id || !n ? {
|
|
1117
1125
|
testVariationId: e.id,
|
|
1118
1126
|
testVariationName: "Default"
|
|
1119
1127
|
} : {
|
|
1120
|
-
data:
|
|
1121
|
-
testVariationId:
|
|
1122
|
-
testVariationName:
|
|
1128
|
+
data: n.data,
|
|
1129
|
+
testVariationId: n.id,
|
|
1130
|
+
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
1123
1131
|
};
|
|
1124
|
-
},
|
|
1132
|
+
}, dt = async ({
|
|
1125
1133
|
item: e,
|
|
1126
|
-
canTrack:
|
|
1134
|
+
canTrack: t
|
|
1127
1135
|
}) => {
|
|
1128
|
-
const
|
|
1129
|
-
canTrack:
|
|
1136
|
+
const n = await it({
|
|
1137
|
+
canTrack: t,
|
|
1130
1138
|
contentId: e.id
|
|
1131
|
-
}), o =
|
|
1139
|
+
}), o = n ? D({ item: e, testGroupId: n }) : void 0;
|
|
1132
1140
|
if (o)
|
|
1133
1141
|
return o;
|
|
1134
1142
|
{
|
|
1135
|
-
const s =
|
|
1143
|
+
const s = ct({
|
|
1136
1144
|
variations: e.variations,
|
|
1137
1145
|
id: e.id
|
|
1138
1146
|
});
|
|
1139
|
-
return
|
|
1147
|
+
return at({
|
|
1140
1148
|
contentId: e.id,
|
|
1141
1149
|
value: s,
|
|
1142
|
-
canTrack:
|
|
1143
|
-
}).catch((
|
|
1144
|
-
console.error("could not store A/B test variation: ",
|
|
1145
|
-
}),
|
|
1150
|
+
canTrack: t
|
|
1151
|
+
}).catch((r) => {
|
|
1152
|
+
console.error("could not store A/B test variation: ", r);
|
|
1153
|
+
}), D({ item: e, testGroupId: s });
|
|
1146
1154
|
}
|
|
1147
|
-
},
|
|
1155
|
+
}, ut = async ({
|
|
1148
1156
|
item: e,
|
|
1149
|
-
canTrack:
|
|
1157
|
+
canTrack: t
|
|
1150
1158
|
}) => {
|
|
1151
|
-
if (!
|
|
1159
|
+
if (!lt(e))
|
|
1152
1160
|
return;
|
|
1153
|
-
const
|
|
1154
|
-
Object.assign(e,
|
|
1161
|
+
const n = await dt({ item: e, canTrack: t });
|
|
1162
|
+
Object.assign(e, n);
|
|
1155
1163
|
};
|
|
1156
|
-
function
|
|
1164
|
+
function W(e, t = null, n = ".") {
|
|
1157
1165
|
return Object.keys(e).reduce((o, s) => {
|
|
1158
|
-
const
|
|
1166
|
+
const r = e[s], i = [t, s].filter(Boolean).join(n);
|
|
1159
1167
|
return [
|
|
1160
|
-
typeof
|
|
1161
|
-
|
|
1162
|
-
!(Array.isArray(
|
|
1163
|
-
].every(Boolean) ? { ...o, ...
|
|
1168
|
+
typeof r == "object",
|
|
1169
|
+
r !== null,
|
|
1170
|
+
!(Array.isArray(r) && r.length === 0)
|
|
1171
|
+
].every(Boolean) ? { ...o, ...W(r, i, n) } : { ...o, [i]: r };
|
|
1164
1172
|
}, {});
|
|
1165
1173
|
}
|
|
1166
|
-
const
|
|
1167
|
-
const
|
|
1168
|
-
return e.forEach((
|
|
1169
|
-
|
|
1170
|
-
}),
|
|
1171
|
-
},
|
|
1174
|
+
const q = "builder.", pt = "options.", mt = (e) => {
|
|
1175
|
+
const t = {};
|
|
1176
|
+
return e.forEach((n, o) => {
|
|
1177
|
+
t[o] = n;
|
|
1178
|
+
}), t;
|
|
1179
|
+
}, ht = (e) => {
|
|
1172
1180
|
if (!e)
|
|
1173
1181
|
return {};
|
|
1174
|
-
const
|
|
1175
|
-
return Object.keys(
|
|
1176
|
-
if (o.startsWith(
|
|
1177
|
-
const s = o.replace(
|
|
1178
|
-
|
|
1182
|
+
const t = ae(e), n = {};
|
|
1183
|
+
return Object.keys(t).forEach((o) => {
|
|
1184
|
+
if (o.startsWith(q)) {
|
|
1185
|
+
const s = o.replace(q, "").replace(pt, "");
|
|
1186
|
+
n[s] = t[o];
|
|
1179
1187
|
}
|
|
1180
|
-
}),
|
|
1181
|
-
},
|
|
1182
|
-
if (!
|
|
1188
|
+
}), n;
|
|
1189
|
+
}, ft = () => {
|
|
1190
|
+
if (!m())
|
|
1183
1191
|
return {};
|
|
1184
1192
|
const e = new URLSearchParams(window.location.search);
|
|
1185
|
-
return
|
|
1186
|
-
},
|
|
1193
|
+
return ht(e);
|
|
1194
|
+
}, ae = (e) => e instanceof URLSearchParams ? mt(e) : e, gt = "v3", bt = (e) => {
|
|
1187
1195
|
const {
|
|
1188
|
-
limit:
|
|
1189
|
-
userAttributes:
|
|
1196
|
+
limit: t = 30,
|
|
1197
|
+
userAttributes: n,
|
|
1190
1198
|
query: o,
|
|
1191
1199
|
noTraverse: s = !1,
|
|
1192
|
-
model:
|
|
1193
|
-
apiKey:
|
|
1194
|
-
includeRefs:
|
|
1200
|
+
model: r,
|
|
1201
|
+
apiKey: i,
|
|
1202
|
+
includeRefs: l = !0,
|
|
1195
1203
|
locale: a,
|
|
1196
|
-
apiVersion:
|
|
1204
|
+
apiVersion: c = gt
|
|
1197
1205
|
} = e;
|
|
1198
|
-
if (!
|
|
1206
|
+
if (!i)
|
|
1199
1207
|
throw new Error("Missing API key");
|
|
1200
|
-
if (!["v2", "v3"].includes(
|
|
1208
|
+
if (!["v2", "v3"].includes(c))
|
|
1201
1209
|
throw new Error(
|
|
1202
|
-
`Invalid apiVersion: expected 'v2' or 'v3', received '${
|
|
1210
|
+
`Invalid apiVersion: expected 'v2' or 'v3', received '${c}'`
|
|
1203
1211
|
);
|
|
1204
1212
|
const u = new URL(
|
|
1205
|
-
`https://cdn.builder.io/api/${
|
|
1206
|
-
),
|
|
1207
|
-
...
|
|
1208
|
-
...
|
|
1209
|
-
},
|
|
1210
|
-
for (const
|
|
1211
|
-
u.searchParams.set(
|
|
1212
|
-
if (
|
|
1213
|
-
const
|
|
1214
|
-
for (const
|
|
1215
|
-
u.searchParams.set(
|
|
1213
|
+
`https://cdn.builder.io/api/${c}/content/${r}?apiKey=${i}&limit=${t}&noTraverse=${s}&includeRefs=${l}${a ? `&locale=${a}` : ""}`
|
|
1214
|
+
), b = {
|
|
1215
|
+
...ft(),
|
|
1216
|
+
...ae(e.options || {})
|
|
1217
|
+
}, g = W(b);
|
|
1218
|
+
for (const y in g)
|
|
1219
|
+
u.searchParams.set(y, String(g[y]));
|
|
1220
|
+
if (n && u.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
1221
|
+
const y = W({ query: o });
|
|
1222
|
+
for (const $ in y)
|
|
1223
|
+
u.searchParams.set($, JSON.stringify(y[$]));
|
|
1216
1224
|
}
|
|
1217
1225
|
return u;
|
|
1218
1226
|
};
|
|
1219
|
-
async function
|
|
1220
|
-
const
|
|
1221
|
-
return "results" in
|
|
1227
|
+
async function le(e) {
|
|
1228
|
+
const t = await yt({ ...e, limit: 1 });
|
|
1229
|
+
return t && "results" in t && (t == null ? void 0 : t.results[0]) || null;
|
|
1222
1230
|
}
|
|
1223
|
-
async function
|
|
1224
|
-
const n = ht(e), o = await (await ee(n.href)).json();
|
|
1225
|
-
if ("status" in o && !("results" in o))
|
|
1226
|
-
return console.error("[Builder.io]: Error fetching data. ", o, e), o;
|
|
1227
|
-
const s = e.canTrack !== !1;
|
|
1231
|
+
async function yt(e) {
|
|
1228
1232
|
try {
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1233
|
+
const t = bt(e), o = await (await oe(t.href)).json();
|
|
1234
|
+
if ("status" in o && !("results" in o))
|
|
1235
|
+
return C.error("Error fetching data. ", { url: t, content: o, options: e }), o;
|
|
1236
|
+
const s = e.canTrack !== !1;
|
|
1237
|
+
try {
|
|
1238
|
+
if (s && Array.isArray(o.results))
|
|
1239
|
+
for (const r of o.results)
|
|
1240
|
+
await ut({ item: r, canTrack: s });
|
|
1241
|
+
} catch (r) {
|
|
1242
|
+
C.error("Could not setup A/B testing. ", r);
|
|
1243
|
+
}
|
|
1244
|
+
return o;
|
|
1245
|
+
} catch (t) {
|
|
1246
|
+
return C.error("Error fetching data. ", t), null;
|
|
1234
1247
|
}
|
|
1235
|
-
return o;
|
|
1236
1248
|
}
|
|
1237
|
-
const
|
|
1249
|
+
const vt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((e) => {
|
|
1238
1250
|
throw console.error(
|
|
1239
1251
|
"Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
|
|
1240
1252
|
e
|
|
1241
1253
|
), e;
|
|
1242
|
-
}),
|
|
1254
|
+
}), kt = h({
|
|
1243
1255
|
name: "builder-symbol",
|
|
1244
|
-
components: { RenderContent:
|
|
1256
|
+
components: { RenderContent: S(vt) },
|
|
1245
1257
|
props: ["attributes", "symbol", "dynamic"],
|
|
1246
1258
|
data() {
|
|
1247
|
-
var e,
|
|
1259
|
+
var e, t, n;
|
|
1248
1260
|
return {
|
|
1249
1261
|
className: [
|
|
1250
1262
|
...Object.keys(this.attributes.class),
|
|
1251
1263
|
"builder-symbol",
|
|
1252
1264
|
(e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
|
|
1253
|
-
((
|
|
1265
|
+
((t = this.symbol) == null ? void 0 : t.dynamic) || this.dynamic ? "builder-dynamic-symbol" : void 0
|
|
1254
1266
|
].filter(Boolean).join(" "),
|
|
1255
|
-
contentToUse: (
|
|
1267
|
+
contentToUse: (n = this.symbol) == null ? void 0 : n.content
|
|
1256
1268
|
};
|
|
1257
1269
|
},
|
|
1258
1270
|
inject: {
|
|
1259
|
-
builderContext:
|
|
1271
|
+
builderContext: P.key
|
|
1260
1272
|
},
|
|
1261
1273
|
mounted() {
|
|
1262
1274
|
this.fetchContent();
|
|
@@ -1278,72 +1290,71 @@ const gt = () => Promise.resolve().then(() => Rn).then((e) => e.default).catch((
|
|
|
1278
1290
|
},
|
|
1279
1291
|
methods: {
|
|
1280
1292
|
fetchContent() {
|
|
1281
|
-
var e,
|
|
1282
|
-
!this.contentToUse && ((e = this.symbol) == null ? void 0 : e.model) && ((
|
|
1293
|
+
var e, t;
|
|
1294
|
+
!this.contentToUse && ((e = this.symbol) == null ? void 0 : e.model) && ((t = this.builderContext) == null ? void 0 : t.apiKey) && le({
|
|
1283
1295
|
model: this.symbol.model,
|
|
1284
1296
|
apiKey: this.builderContext.apiKey,
|
|
1285
1297
|
apiVersion: this.builderContext.apiVersion,
|
|
1286
1298
|
query: {
|
|
1287
1299
|
id: this.symbol.entry
|
|
1288
1300
|
}
|
|
1289
|
-
}).then((
|
|
1290
|
-
|
|
1291
|
-
}).catch((
|
|
1292
|
-
|
|
1293
|
-
"[Builder.io]: Could not fetch symbol content: ",
|
|
1294
|
-
t
|
|
1295
|
-
);
|
|
1301
|
+
}).then((n) => {
|
|
1302
|
+
n && (this.contentToUse = n);
|
|
1303
|
+
}).catch((n) => {
|
|
1304
|
+
C.error("Could not fetch symbol content: ", n);
|
|
1296
1305
|
});
|
|
1297
1306
|
},
|
|
1298
|
-
filterAttrs: function(
|
|
1307
|
+
filterAttrs: function(t = {}, n) {
|
|
1299
1308
|
const o = "v-on:";
|
|
1300
|
-
return Object.keys(
|
|
1301
|
-
|
|
1302
|
-
|
|
1309
|
+
return Object.keys(t).filter((s) => {
|
|
1310
|
+
if (!t[s])
|
|
1311
|
+
return !1;
|
|
1312
|
+
const r = s.startsWith(o);
|
|
1313
|
+
return n ? r : !r;
|
|
1303
1314
|
}).reduce(
|
|
1304
|
-
(s,
|
|
1315
|
+
(s, r) => ({
|
|
1305
1316
|
...s,
|
|
1306
|
-
[
|
|
1317
|
+
[r.replace(o, "")]: t[r]
|
|
1307
1318
|
}),
|
|
1308
1319
|
{}
|
|
1309
1320
|
);
|
|
1310
1321
|
},
|
|
1311
1322
|
_classStringToObject(e) {
|
|
1312
|
-
const
|
|
1323
|
+
const t = {};
|
|
1313
1324
|
if (typeof e != "string")
|
|
1314
|
-
return
|
|
1315
|
-
const
|
|
1316
|
-
for (const o of
|
|
1317
|
-
|
|
1318
|
-
return
|
|
1325
|
+
return t;
|
|
1326
|
+
const n = e.trim().split(/\s+/);
|
|
1327
|
+
for (const o of n)
|
|
1328
|
+
t[o] = !0;
|
|
1329
|
+
return t;
|
|
1319
1330
|
}
|
|
1320
1331
|
}
|
|
1321
|
-
},
|
|
1322
|
-
function
|
|
1323
|
-
var
|
|
1324
|
-
const
|
|
1325
|
-
return d(),
|
|
1332
|
+
}), St = ["dataSet"];
|
|
1333
|
+
function wt(e, t, n, o, s, r) {
|
|
1334
|
+
var l, a, c, u;
|
|
1335
|
+
const i = w("render-content");
|
|
1336
|
+
return d(), p("div", x({
|
|
1326
1337
|
dataSet: {
|
|
1327
|
-
class:
|
|
1328
|
-
},
|
|
1329
|
-
class:
|
|
1330
|
-
},
|
|
1331
|
-
|
|
1332
|
-
apiVersion:
|
|
1333
|
-
apiKey:
|
|
1334
|
-
context:
|
|
1335
|
-
customComponents: Object.values(
|
|
1338
|
+
class: e.className
|
|
1339
|
+
},
|
|
1340
|
+
class: e._classStringToObject(e.className)
|
|
1341
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), [
|
|
1342
|
+
ee(i, {
|
|
1343
|
+
apiVersion: e.builderContext.apiVersion,
|
|
1344
|
+
apiKey: e.builderContext.apiKey,
|
|
1345
|
+
context: e.builderContext.context,
|
|
1346
|
+
customComponents: Object.values(e.builderContext.registeredComponents),
|
|
1336
1347
|
data: {
|
|
1337
|
-
...(
|
|
1338
|
-
...
|
|
1339
|
-
...(
|
|
1348
|
+
...(l = e.symbol) == null ? void 0 : l.data,
|
|
1349
|
+
...e.builderContext.state,
|
|
1350
|
+
...(c = (a = e.contentToUse) == null ? void 0 : a.data) == null ? void 0 : c.state
|
|
1340
1351
|
},
|
|
1341
|
-
model: (u =
|
|
1342
|
-
content:
|
|
1352
|
+
model: (u = e.symbol) == null ? void 0 : u.model,
|
|
1353
|
+
content: e.contentToUse
|
|
1343
1354
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content"])
|
|
1344
|
-
], 16,
|
|
1355
|
+
], 16, St);
|
|
1345
1356
|
}
|
|
1346
|
-
const
|
|
1357
|
+
const Ct = /* @__PURE__ */ f(kt, [["render", wt]]), xt = {
|
|
1347
1358
|
name: "Text",
|
|
1348
1359
|
static: !0,
|
|
1349
1360
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
|
|
@@ -1362,20 +1373,20 @@ const xt = /* @__PURE__ */ h(bt, [["render", vt]]), kt = {
|
|
|
1362
1373
|
height: "auto",
|
|
1363
1374
|
textAlign: "center"
|
|
1364
1375
|
}
|
|
1365
|
-
},
|
|
1376
|
+
}, It = h({
|
|
1366
1377
|
name: "builder-text",
|
|
1367
1378
|
props: ["text"]
|
|
1368
|
-
},
|
|
1369
|
-
function
|
|
1370
|
-
return d(),
|
|
1379
|
+
}), $t = ["innerHTML"];
|
|
1380
|
+
function Tt(e, t, n, o, s, r) {
|
|
1381
|
+
return d(), p("span", {
|
|
1371
1382
|
class: "builder-text",
|
|
1372
|
-
innerHTML:
|
|
1383
|
+
innerHTML: e.text,
|
|
1373
1384
|
style: {
|
|
1374
1385
|
outline: "none"
|
|
1375
1386
|
}
|
|
1376
|
-
}, null, 8,
|
|
1387
|
+
}, null, 8, $t);
|
|
1377
1388
|
}
|
|
1378
|
-
const
|
|
1389
|
+
const Rt = /* @__PURE__ */ f(It, [["render", Tt]]), Et = {
|
|
1379
1390
|
name: "Video",
|
|
1380
1391
|
canHaveChildren: !0,
|
|
1381
1392
|
defaultStyles: {
|
|
@@ -1476,7 +1487,7 @@ const Ct = /* @__PURE__ */ h(St, [["render", wt]]), It = {
|
|
|
1476
1487
|
advanced: !0
|
|
1477
1488
|
}
|
|
1478
1489
|
]
|
|
1479
|
-
},
|
|
1490
|
+
}, _t = h({
|
|
1480
1491
|
name: "builder-video",
|
|
1481
1492
|
props: [
|
|
1482
1493
|
"autoPlay",
|
|
@@ -1517,23 +1528,23 @@ const Ct = /* @__PURE__ */ h(St, [["render", wt]]), It = {
|
|
|
1517
1528
|
};
|
|
1518
1529
|
}
|
|
1519
1530
|
}
|
|
1520
|
-
},
|
|
1521
|
-
function
|
|
1522
|
-
var
|
|
1523
|
-
return d(),
|
|
1531
|
+
}), At = ["src", "poster"];
|
|
1532
|
+
function jt(e, t, n, o, s, r) {
|
|
1533
|
+
var i;
|
|
1534
|
+
return d(), p("video", x({
|
|
1524
1535
|
style: {
|
|
1525
1536
|
width: "100%",
|
|
1526
1537
|
height: "100%",
|
|
1527
|
-
...(
|
|
1528
|
-
objectFit:
|
|
1529
|
-
objectPosition:
|
|
1538
|
+
...(i = e.attributes) == null ? void 0 : i.style,
|
|
1539
|
+
objectFit: e.fit,
|
|
1540
|
+
objectPosition: e.position,
|
|
1530
1541
|
borderRadius: 1
|
|
1531
1542
|
},
|
|
1532
|
-
src:
|
|
1533
|
-
poster:
|
|
1534
|
-
},
|
|
1543
|
+
src: e.video || "no-src",
|
|
1544
|
+
poster: e.posterImage
|
|
1545
|
+
}, e.spreadProps), null, 16, At);
|
|
1535
1546
|
}
|
|
1536
|
-
const
|
|
1547
|
+
const Vt = /* @__PURE__ */ f(_t, [["render", jt]]), Pt = {
|
|
1537
1548
|
name: "Embed",
|
|
1538
1549
|
static: !0,
|
|
1539
1550
|
inputs: [
|
|
@@ -1543,14 +1554,14 @@ const At = /* @__PURE__ */ h(Tt, [["render", Et]]), jt = {
|
|
|
1543
1554
|
required: !0,
|
|
1544
1555
|
defaultValue: "",
|
|
1545
1556
|
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1546
|
-
onChange:
|
|
1557
|
+
onChange: B(
|
|
1547
1558
|
(e) => {
|
|
1548
|
-
const
|
|
1549
|
-
if (
|
|
1559
|
+
const t = e.get("url");
|
|
1560
|
+
if (t)
|
|
1550
1561
|
return e.set("content", "Loading..."), fetch(
|
|
1551
|
-
`https://iframe.ly/api/iframely?url=${
|
|
1562
|
+
`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`
|
|
1552
1563
|
).then((o) => o.json()).then((o) => {
|
|
1553
|
-
e.get("url") ===
|
|
1564
|
+
e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
|
|
1554
1565
|
}).catch((o) => {
|
|
1555
1566
|
e.set(
|
|
1556
1567
|
"content",
|
|
@@ -1572,7 +1583,7 @@ const At = /* @__PURE__ */ h(Tt, [["render", Et]]), jt = {
|
|
|
1572
1583
|
"text/javascript",
|
|
1573
1584
|
"application/javascript",
|
|
1574
1585
|
"application/ecmascript"
|
|
1575
|
-
],
|
|
1586
|
+
], Ft = (e) => Bt.includes(e.type), Ot = h({
|
|
1576
1587
|
name: "builder-embed",
|
|
1577
1588
|
props: ["content"],
|
|
1578
1589
|
data() {
|
|
@@ -1599,30 +1610,30 @@ const At = /* @__PURE__ */ h(Tt, [["render", Et]]), jt = {
|
|
|
1599
1610
|
if (!this.$refs.elem || !this.$refs.elem.getElementsByTagName)
|
|
1600
1611
|
return;
|
|
1601
1612
|
const e = this.$refs.elem.getElementsByTagName("script");
|
|
1602
|
-
for (let
|
|
1603
|
-
const
|
|
1604
|
-
if (
|
|
1605
|
-
this.scriptsInserted.push(
|
|
1613
|
+
for (let t = 0; t < e.length; t++) {
|
|
1614
|
+
const n = e[t];
|
|
1615
|
+
if (n.src && !this.scriptsInserted.includes(n.src)) {
|
|
1616
|
+
this.scriptsInserted.push(n.src);
|
|
1606
1617
|
const o = document.createElement("script");
|
|
1607
|
-
o.async = !0, o.src =
|
|
1608
|
-
} else if (
|
|
1618
|
+
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
1619
|
+
} else if (Ft(n) && !this.scriptsRun.includes(n.innerText))
|
|
1609
1620
|
try {
|
|
1610
|
-
this.scriptsRun.push(
|
|
1621
|
+
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
1611
1622
|
} catch (o) {
|
|
1612
1623
|
console.warn("`Embed`: Error running script:", o);
|
|
1613
1624
|
}
|
|
1614
1625
|
}
|
|
1615
1626
|
}
|
|
1616
1627
|
}
|
|
1617
|
-
},
|
|
1618
|
-
function
|
|
1619
|
-
return d(),
|
|
1628
|
+
}), Ut = ["innerHTML"];
|
|
1629
|
+
function Wt(e, t, n, o, s, r) {
|
|
1630
|
+
return d(), p("div", {
|
|
1620
1631
|
class: "builder-embed",
|
|
1621
1632
|
ref: "elem",
|
|
1622
|
-
innerHTML:
|
|
1623
|
-
}, null, 8,
|
|
1633
|
+
innerHTML: e.content
|
|
1634
|
+
}, null, 8, Ut);
|
|
1624
1635
|
}
|
|
1625
|
-
const
|
|
1636
|
+
const Mt = /* @__PURE__ */ f(Ot, [["render", Wt]]), Lt = h({
|
|
1626
1637
|
name: "builder-img-component",
|
|
1627
1638
|
props: [
|
|
1628
1639
|
"backgroundSize",
|
|
@@ -1633,36 +1644,38 @@ const Ut = /* @__PURE__ */ h(Ot, [["render", Ft]]), Wt = {
|
|
|
1633
1644
|
"attributes"
|
|
1634
1645
|
],
|
|
1635
1646
|
data() {
|
|
1636
|
-
return { isEditing:
|
|
1647
|
+
return { isEditing: k };
|
|
1637
1648
|
},
|
|
1638
1649
|
methods: {
|
|
1639
|
-
filterAttrs: function(
|
|
1650
|
+
filterAttrs: function(t = {}, n) {
|
|
1640
1651
|
const o = "v-on:";
|
|
1641
|
-
return Object.keys(
|
|
1642
|
-
|
|
1643
|
-
|
|
1652
|
+
return Object.keys(t).filter((s) => {
|
|
1653
|
+
if (!t[s])
|
|
1654
|
+
return !1;
|
|
1655
|
+
const r = s.startsWith(o);
|
|
1656
|
+
return n ? r : !r;
|
|
1644
1657
|
}).reduce(
|
|
1645
|
-
(s,
|
|
1658
|
+
(s, r) => ({
|
|
1646
1659
|
...s,
|
|
1647
|
-
[
|
|
1660
|
+
[r.replace(o, "")]: t[r]
|
|
1648
1661
|
}),
|
|
1649
1662
|
{}
|
|
1650
1663
|
);
|
|
1651
1664
|
}
|
|
1652
1665
|
}
|
|
1653
|
-
},
|
|
1654
|
-
function
|
|
1655
|
-
return d(),
|
|
1666
|
+
}), Nt = ["alt", "src"];
|
|
1667
|
+
function Ht(e, t, n, o, s, r) {
|
|
1668
|
+
return d(), p("img", x({
|
|
1656
1669
|
style: {
|
|
1657
|
-
objectFit:
|
|
1658
|
-
objectPosition:
|
|
1670
|
+
objectFit: e.backgroundSize || "cover",
|
|
1671
|
+
objectPosition: e.backgroundPosition || "center"
|
|
1659
1672
|
},
|
|
1660
|
-
key:
|
|
1661
|
-
alt:
|
|
1662
|
-
src:
|
|
1663
|
-
},
|
|
1673
|
+
key: e.isEditing() && e.imgSrc || "default-key",
|
|
1674
|
+
alt: e.altText,
|
|
1675
|
+
src: e.imgSrc || e.image
|
|
1676
|
+
}, e.filterAttrs(e.attributes, !1), T(e.filterAttrs(e.attributes, !0), !0)), null, 16, Nt);
|
|
1664
1677
|
}
|
|
1665
|
-
const
|
|
1678
|
+
const zt = /* @__PURE__ */ f(Lt, [["render", Ht]]), Kt = {
|
|
1666
1679
|
name: "Raw:Img",
|
|
1667
1680
|
hideFromInsertMenu: !0,
|
|
1668
1681
|
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",
|
|
@@ -1677,7 +1690,7 @@ const Nt = /* @__PURE__ */ h(Wt, [["render", Lt]]), $t = {
|
|
|
1677
1690
|
],
|
|
1678
1691
|
noWrap: !0,
|
|
1679
1692
|
static: !0
|
|
1680
|
-
},
|
|
1693
|
+
}, Dt = h({
|
|
1681
1694
|
name: "builder-custom-code",
|
|
1682
1695
|
props: ["replaceNodes", "code"],
|
|
1683
1696
|
data() {
|
|
@@ -1690,23 +1703,23 @@ const Nt = /* @__PURE__ */ h(Wt, [["render", Lt]]), $t = {
|
|
|
1690
1703
|
findAndRunScripts() {
|
|
1691
1704
|
if (this.$refs.elem && this.$refs.elem.getElementsByTagName && typeof window < "u") {
|
|
1692
1705
|
const e = this.$refs.elem.getElementsByTagName("script");
|
|
1693
|
-
for (let
|
|
1694
|
-
const
|
|
1695
|
-
if (
|
|
1696
|
-
if (this.scriptsInserted.includes(
|
|
1706
|
+
for (let t = 0; t < e.length; t++) {
|
|
1707
|
+
const n = e[t];
|
|
1708
|
+
if (n.src) {
|
|
1709
|
+
if (this.scriptsInserted.includes(n.src))
|
|
1697
1710
|
continue;
|
|
1698
|
-
this.scriptsInserted.push(
|
|
1711
|
+
this.scriptsInserted.push(n.src);
|
|
1699
1712
|
const o = document.createElement("script");
|
|
1700
|
-
o.async = !0, o.src =
|
|
1701
|
-
} else if (!
|
|
1713
|
+
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
1714
|
+
} else if (!n.type || [
|
|
1702
1715
|
"text/javascript",
|
|
1703
1716
|
"application/javascript",
|
|
1704
1717
|
"application/ecmascript"
|
|
1705
|
-
].includes(
|
|
1706
|
-
if (this.scriptsRun.includes(
|
|
1718
|
+
].includes(n.type)) {
|
|
1719
|
+
if (this.scriptsRun.includes(n.innerText))
|
|
1707
1720
|
continue;
|
|
1708
1721
|
try {
|
|
1709
|
-
this.scriptsRun.push(
|
|
1722
|
+
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
1710
1723
|
} catch (o) {
|
|
1711
1724
|
console.warn("`CustomCode`: Error running script:", o);
|
|
1712
1725
|
}
|
|
@@ -1715,28 +1728,28 @@ const Nt = /* @__PURE__ */ h(Wt, [["render", Lt]]), $t = {
|
|
|
1715
1728
|
}
|
|
1716
1729
|
},
|
|
1717
1730
|
_classStringToObject(e) {
|
|
1718
|
-
const
|
|
1731
|
+
const t = {};
|
|
1719
1732
|
if (typeof e != "string")
|
|
1720
|
-
return
|
|
1721
|
-
const
|
|
1722
|
-
for (const o of
|
|
1723
|
-
|
|
1724
|
-
return
|
|
1733
|
+
return t;
|
|
1734
|
+
const n = e.trim().split(/\s+/);
|
|
1735
|
+
for (const o of n)
|
|
1736
|
+
t[o] = !0;
|
|
1737
|
+
return t;
|
|
1725
1738
|
}
|
|
1726
1739
|
}
|
|
1727
|
-
},
|
|
1728
|
-
function
|
|
1729
|
-
return d(),
|
|
1740
|
+
}), qt = ["innerHTML"];
|
|
1741
|
+
function Gt(e, t, n, o, s, r) {
|
|
1742
|
+
return d(), p("div", {
|
|
1730
1743
|
ref: "elem",
|
|
1731
|
-
class:
|
|
1732
|
-
|
|
1733
|
-
"builder-custom-code" + (
|
|
1744
|
+
class: V(
|
|
1745
|
+
e._classStringToObject(
|
|
1746
|
+
"builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
|
|
1734
1747
|
)
|
|
1735
1748
|
),
|
|
1736
|
-
innerHTML:
|
|
1737
|
-
}, null, 10,
|
|
1749
|
+
innerHTML: e.code
|
|
1750
|
+
}, null, 10, qt);
|
|
1738
1751
|
}
|
|
1739
|
-
const
|
|
1752
|
+
const Jt = /* @__PURE__ */ f(Dt, [["render", Gt]]), Xt = {
|
|
1740
1753
|
name: "Custom Code",
|
|
1741
1754
|
static: !0,
|
|
1742
1755
|
requiredPermissions: ["editCode"],
|
|
@@ -1762,23 +1775,23 @@ const Dt = /* @__PURE__ */ h(Ht, [["render", Kt]]), qt = {
|
|
|
1762
1775
|
advanced: !0
|
|
1763
1776
|
}
|
|
1764
1777
|
]
|
|
1765
|
-
},
|
|
1766
|
-
{ component:
|
|
1767
|
-
{ component:
|
|
1768
|
-
{ component:
|
|
1769
|
-
{ component:
|
|
1770
|
-
{ component:
|
|
1771
|
-
{ component:
|
|
1772
|
-
{ component:
|
|
1773
|
-
{ component:
|
|
1774
|
-
{ component:
|
|
1775
|
-
{ component:
|
|
1776
|
-
{ component:
|
|
1778
|
+
}, Yt = () => [
|
|
1779
|
+
{ component: ye, ...ze },
|
|
1780
|
+
{ component: Ie, ...Ke },
|
|
1781
|
+
{ component: Jt, ...Xt },
|
|
1782
|
+
{ component: Mt, ...Pt },
|
|
1783
|
+
{ component: Re, ...De },
|
|
1784
|
+
{ component: Fe, ...qe },
|
|
1785
|
+
{ component: zt, ...Kt },
|
|
1786
|
+
{ component: Ye, ...Ge },
|
|
1787
|
+
{ component: Ct, ...Qe },
|
|
1788
|
+
{ component: Rt, ...xt },
|
|
1789
|
+
{ component: Vt, ...Et }
|
|
1777
1790
|
];
|
|
1778
|
-
function
|
|
1791
|
+
function G({
|
|
1779
1792
|
code: e,
|
|
1780
|
-
context:
|
|
1781
|
-
state:
|
|
1793
|
+
context: t,
|
|
1794
|
+
state: n,
|
|
1782
1795
|
event: o,
|
|
1783
1796
|
isExpression: s = !0
|
|
1784
1797
|
}) {
|
|
@@ -1786,11 +1799,11 @@ function K({
|
|
|
1786
1799
|
console.warn("Skipping evaluation of empty code block.");
|
|
1787
1800
|
return;
|
|
1788
1801
|
}
|
|
1789
|
-
const
|
|
1790
|
-
isEditing:
|
|
1791
|
-
isBrowser:
|
|
1792
|
-
isServer: !
|
|
1793
|
-
},
|
|
1802
|
+
const r = {
|
|
1803
|
+
isEditing: k(),
|
|
1804
|
+
isBrowser: m(),
|
|
1805
|
+
isServer: !m()
|
|
1806
|
+
}, l = s && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
|
|
1794
1807
|
try {
|
|
1795
1808
|
return new Function(
|
|
1796
1809
|
"builder",
|
|
@@ -1798,127 +1811,127 @@ function K({
|
|
|
1798
1811
|
"state",
|
|
1799
1812
|
"context",
|
|
1800
1813
|
"event",
|
|
1801
|
-
|
|
1802
|
-
)(
|
|
1814
|
+
l
|
|
1815
|
+
)(r, r, n, t, o);
|
|
1803
1816
|
} catch (a) {
|
|
1804
1817
|
console.warn(
|
|
1805
1818
|
`Builder custom code error:
|
|
1806
1819
|
While Evaluating:
|
|
1807
1820
|
`,
|
|
1808
|
-
|
|
1821
|
+
l,
|
|
1809
1822
|
`
|
|
1810
1823
|
`,
|
|
1811
1824
|
a
|
|
1812
1825
|
);
|
|
1813
1826
|
}
|
|
1814
1827
|
}
|
|
1815
|
-
function
|
|
1816
|
-
return !
|
|
1828
|
+
function Qt() {
|
|
1829
|
+
return !m() || k() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1817
1830
|
}
|
|
1818
|
-
const
|
|
1819
|
-
function
|
|
1820
|
-
return
|
|
1831
|
+
const ce = [];
|
|
1832
|
+
function Pn(e, t) {
|
|
1833
|
+
return ce.push({ component: e, ...t }), console.warn(
|
|
1821
1834
|
"registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
|
|
1822
1835
|
), e;
|
|
1823
1836
|
}
|
|
1824
|
-
const
|
|
1837
|
+
const Zt = ({
|
|
1825
1838
|
component: e,
|
|
1826
|
-
...
|
|
1839
|
+
...t
|
|
1827
1840
|
}) => ({
|
|
1828
1841
|
type: "builder.registerComponent",
|
|
1829
|
-
data:
|
|
1830
|
-
}),
|
|
1842
|
+
data: tn(t)
|
|
1843
|
+
}), en = (e) => typeof e == "function" ? B(e) : L(e), tn = ({
|
|
1831
1844
|
inputs: e,
|
|
1832
|
-
...
|
|
1845
|
+
...t
|
|
1833
1846
|
}) => ({
|
|
1834
|
-
...
|
|
1847
|
+
...L(t),
|
|
1835
1848
|
inputs: e == null ? void 0 : e.map(
|
|
1836
|
-
(
|
|
1837
|
-
(o, [s,
|
|
1849
|
+
(n) => Object.entries(n).reduce(
|
|
1850
|
+
(o, [s, r]) => ({
|
|
1838
1851
|
...o,
|
|
1839
|
-
[s]:
|
|
1852
|
+
[s]: en(r)
|
|
1840
1853
|
}),
|
|
1841
1854
|
{}
|
|
1842
1855
|
)
|
|
1843
1856
|
)
|
|
1844
1857
|
});
|
|
1845
|
-
function
|
|
1858
|
+
function nn() {
|
|
1846
1859
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1847
|
-
const
|
|
1848
|
-
return (e == "x" ?
|
|
1860
|
+
const t = Math.random() * 16 | 0;
|
|
1861
|
+
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1849
1862
|
});
|
|
1850
1863
|
}
|
|
1851
|
-
function
|
|
1852
|
-
return
|
|
1864
|
+
function de() {
|
|
1865
|
+
return nn().replace(/-/g, "");
|
|
1853
1866
|
}
|
|
1854
|
-
const
|
|
1867
|
+
const ue = "builderSessionId", on = async ({
|
|
1855
1868
|
canTrack: e
|
|
1856
1869
|
}) => {
|
|
1857
1870
|
if (!e)
|
|
1858
1871
|
return;
|
|
1859
|
-
const
|
|
1860
|
-
name:
|
|
1872
|
+
const t = await se({
|
|
1873
|
+
name: ue,
|
|
1861
1874
|
canTrack: e
|
|
1862
1875
|
});
|
|
1863
|
-
if (
|
|
1864
|
-
return
|
|
1876
|
+
if (I(t))
|
|
1877
|
+
return t;
|
|
1865
1878
|
{
|
|
1866
|
-
const
|
|
1867
|
-
return
|
|
1879
|
+
const n = sn();
|
|
1880
|
+
return rn({ id: n, canTrack: e }), n;
|
|
1868
1881
|
}
|
|
1869
|
-
},
|
|
1882
|
+
}, sn = () => de(), rn = ({
|
|
1870
1883
|
id: e,
|
|
1871
|
-
canTrack:
|
|
1872
|
-
}) =>
|
|
1884
|
+
canTrack: t
|
|
1885
|
+
}) => re({ name: ue, value: e, canTrack: t }), pe = () => m() && typeof localStorage < "u" ? localStorage : void 0, an = ({
|
|
1873
1886
|
key: e,
|
|
1874
|
-
canTrack:
|
|
1887
|
+
canTrack: t
|
|
1875
1888
|
}) => {
|
|
1876
|
-
var
|
|
1889
|
+
var n;
|
|
1877
1890
|
try {
|
|
1878
|
-
return
|
|
1891
|
+
return t ? (n = pe()) == null ? void 0 : n.getItem(e) : void 0;
|
|
1879
1892
|
} catch (o) {
|
|
1880
1893
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1881
1894
|
return;
|
|
1882
1895
|
}
|
|
1883
|
-
},
|
|
1896
|
+
}, ln = ({
|
|
1884
1897
|
key: e,
|
|
1885
|
-
canTrack:
|
|
1886
|
-
value:
|
|
1898
|
+
canTrack: t,
|
|
1899
|
+
value: n
|
|
1887
1900
|
}) => {
|
|
1888
1901
|
var o;
|
|
1889
1902
|
try {
|
|
1890
|
-
|
|
1903
|
+
t && ((o = pe()) == null || o.setItem(e, n));
|
|
1891
1904
|
} catch (s) {
|
|
1892
1905
|
console.debug("[LocalStorage] SET error: ", s);
|
|
1893
1906
|
}
|
|
1894
|
-
},
|
|
1907
|
+
}, me = "builderVisitorId", cn = ({ canTrack: e }) => {
|
|
1895
1908
|
if (!e)
|
|
1896
1909
|
return;
|
|
1897
|
-
const
|
|
1898
|
-
key:
|
|
1910
|
+
const t = an({
|
|
1911
|
+
key: me,
|
|
1899
1912
|
canTrack: e
|
|
1900
1913
|
});
|
|
1901
|
-
if (
|
|
1902
|
-
return
|
|
1914
|
+
if (I(t))
|
|
1915
|
+
return t;
|
|
1903
1916
|
{
|
|
1904
|
-
const
|
|
1905
|
-
return
|
|
1917
|
+
const n = dn();
|
|
1918
|
+
return un({ id: n, canTrack: e }), n;
|
|
1906
1919
|
}
|
|
1907
|
-
},
|
|
1920
|
+
}, dn = () => de(), un = ({
|
|
1908
1921
|
id: e,
|
|
1909
|
-
canTrack:
|
|
1910
|
-
}) =>
|
|
1911
|
-
key:
|
|
1922
|
+
canTrack: t
|
|
1923
|
+
}) => ln({
|
|
1924
|
+
key: me,
|
|
1912
1925
|
value: e,
|
|
1913
|
-
canTrack:
|
|
1914
|
-
}),
|
|
1915
|
-
if (
|
|
1926
|
+
canTrack: t
|
|
1927
|
+
}), pn = () => {
|
|
1928
|
+
if (m()) {
|
|
1916
1929
|
const e = new URL(location.href);
|
|
1917
1930
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
1918
1931
|
} else
|
|
1919
1932
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
1920
|
-
},
|
|
1921
|
-
const e =
|
|
1933
|
+
}, mn = () => typeof navigator == "object" && navigator.userAgent || "", hn = () => {
|
|
1934
|
+
const e = mn(), t = {
|
|
1922
1935
|
Android() {
|
|
1923
1936
|
return e.match(/Android/i);
|
|
1924
1937
|
},
|
|
@@ -1935,28 +1948,28 @@ const ce = "builderSessionId", en = async ({
|
|
|
1935
1948
|
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
1936
1949
|
},
|
|
1937
1950
|
any() {
|
|
1938
|
-
return
|
|
1951
|
+
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || _ === "reactNative";
|
|
1939
1952
|
}
|
|
1940
|
-
},
|
|
1953
|
+
}, n = e.match(/Tablet|iPad/i), o = pn();
|
|
1941
1954
|
return {
|
|
1942
1955
|
urlPath: o == null ? void 0 : o.pathname,
|
|
1943
1956
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
1944
|
-
device:
|
|
1957
|
+
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
1945
1958
|
};
|
|
1946
|
-
},
|
|
1959
|
+
}, fn = async ({
|
|
1947
1960
|
canTrack: e
|
|
1948
1961
|
}) => {
|
|
1949
1962
|
if (!e)
|
|
1950
1963
|
return { visitorId: void 0, sessionId: void 0 };
|
|
1951
|
-
const
|
|
1964
|
+
const t = await on({ canTrack: e }), n = cn({ canTrack: e });
|
|
1952
1965
|
return {
|
|
1953
|
-
sessionId:
|
|
1954
|
-
visitorId:
|
|
1966
|
+
sessionId: t,
|
|
1967
|
+
visitorId: n
|
|
1955
1968
|
};
|
|
1956
|
-
},
|
|
1969
|
+
}, gn = async ({
|
|
1957
1970
|
type: e,
|
|
1958
|
-
canTrack:
|
|
1959
|
-
apiKey:
|
|
1971
|
+
canTrack: t,
|
|
1972
|
+
apiKey: n,
|
|
1960
1973
|
metadata: o,
|
|
1961
1974
|
...s
|
|
1962
1975
|
}) => ({
|
|
@@ -1967,41 +1980,41 @@ const ce = "builderSessionId", en = async ({
|
|
|
1967
1980
|
url: location.href,
|
|
1968
1981
|
...o
|
|
1969
1982
|
},
|
|
1970
|
-
...await
|
|
1971
|
-
userAttributes:
|
|
1972
|
-
ownerId:
|
|
1983
|
+
...await fn({ canTrack: t }),
|
|
1984
|
+
userAttributes: hn(),
|
|
1985
|
+
ownerId: n
|
|
1973
1986
|
}
|
|
1974
1987
|
});
|
|
1975
|
-
async function
|
|
1988
|
+
async function M(e) {
|
|
1976
1989
|
if (!e.apiKey) {
|
|
1977
|
-
|
|
1978
|
-
"
|
|
1990
|
+
C.error(
|
|
1991
|
+
"Missing API key for track call. Please provide your API key."
|
|
1979
1992
|
);
|
|
1980
1993
|
return;
|
|
1981
1994
|
}
|
|
1982
|
-
if (!!e.canTrack && !
|
|
1995
|
+
if (!!e.canTrack && !k() && !!(m() || _ === "reactNative"))
|
|
1983
1996
|
return fetch("https://builder.io/api/v1/track", {
|
|
1984
1997
|
method: "POST",
|
|
1985
1998
|
body: JSON.stringify({
|
|
1986
|
-
events: [await
|
|
1999
|
+
events: [await gn(e)]
|
|
1987
2000
|
}),
|
|
1988
2001
|
headers: {
|
|
1989
2002
|
"content-type": "application/json"
|
|
1990
2003
|
},
|
|
1991
2004
|
mode: "cors"
|
|
1992
|
-
}).catch((
|
|
1993
|
-
console.error("Failed to track: ",
|
|
2005
|
+
}).catch((t) => {
|
|
2006
|
+
console.error("Failed to track: ", t);
|
|
1994
2007
|
});
|
|
1995
2008
|
}
|
|
1996
|
-
const Bn = (e) =>
|
|
1997
|
-
function
|
|
1998
|
-
let
|
|
1999
|
-
if (
|
|
2009
|
+
const Bn = (e) => M({ ...e, canTrack: !0 }), J = {};
|
|
2010
|
+
function bn(e, t) {
|
|
2011
|
+
let n = J[e];
|
|
2012
|
+
if (n || (n = J[e] = []), n.push(t), m()) {
|
|
2000
2013
|
const o = {
|
|
2001
2014
|
type: "builder.register",
|
|
2002
2015
|
data: {
|
|
2003
2016
|
type: e,
|
|
2004
|
-
info:
|
|
2017
|
+
info: t
|
|
2005
2018
|
}
|
|
2006
2019
|
};
|
|
2007
2020
|
try {
|
|
@@ -2011,8 +2024,8 @@ function hn(e, n) {
|
|
|
2011
2024
|
}
|
|
2012
2025
|
}
|
|
2013
2026
|
}
|
|
2014
|
-
const
|
|
2015
|
-
|
|
2027
|
+
const yn = () => {
|
|
2028
|
+
bn("insertMenu", {
|
|
2016
2029
|
name: "_default",
|
|
2017
2030
|
default: !0,
|
|
2018
2031
|
items: [
|
|
@@ -2027,21 +2040,21 @@ const fn = () => {
|
|
|
2027
2040
|
]
|
|
2028
2041
|
});
|
|
2029
2042
|
};
|
|
2030
|
-
let
|
|
2031
|
-
const
|
|
2032
|
-
var
|
|
2033
|
-
|
|
2043
|
+
let X = !1;
|
|
2044
|
+
const vn = (e = {}) => {
|
|
2045
|
+
var t, n;
|
|
2046
|
+
X || (X = !0, m() && ((t = window.parent) == null || t.postMessage(
|
|
2034
2047
|
{
|
|
2035
2048
|
type: "builder.sdkInfo",
|
|
2036
2049
|
data: {
|
|
2037
|
-
target:
|
|
2050
|
+
target: _,
|
|
2038
2051
|
supportsPatchUpdates: !1,
|
|
2039
2052
|
supportsAddBlockScoping: !0,
|
|
2040
2053
|
supportsCustomBreakpoints: !0
|
|
2041
2054
|
}
|
|
2042
2055
|
},
|
|
2043
2056
|
"*"
|
|
2044
|
-
), (
|
|
2057
|
+
), (n = window.parent) == null || n.postMessage(
|
|
2045
2058
|
{
|
|
2046
2059
|
type: "builder.updateContent",
|
|
2047
2060
|
data: {
|
|
@@ -2050,33 +2063,33 @@ const gn = (e = {}) => {
|
|
|
2050
2063
|
},
|
|
2051
2064
|
"*"
|
|
2052
2065
|
), window.addEventListener("message", ({ data: o }) => {
|
|
2053
|
-
var s,
|
|
2066
|
+
var s, r;
|
|
2054
2067
|
if (!!(o != null && o.type))
|
|
2055
2068
|
switch (o.type) {
|
|
2056
2069
|
case "builder.evaluate": {
|
|
2057
|
-
const
|
|
2058
|
-
let u,
|
|
2070
|
+
const i = o.data.text, l = o.data.arguments || [], a = o.data.id, c = new Function(i);
|
|
2071
|
+
let u, b = null;
|
|
2059
2072
|
try {
|
|
2060
|
-
u =
|
|
2061
|
-
} catch (
|
|
2062
|
-
|
|
2073
|
+
u = c.apply(null, l);
|
|
2074
|
+
} catch (g) {
|
|
2075
|
+
b = g;
|
|
2063
2076
|
}
|
|
2064
|
-
|
|
2077
|
+
b ? (s = window.parent) == null || s.postMessage(
|
|
2065
2078
|
{
|
|
2066
2079
|
type: "builder.evaluateError",
|
|
2067
|
-
data: { id: a, error:
|
|
2080
|
+
data: { id: a, error: b.message }
|
|
2068
2081
|
},
|
|
2069
2082
|
"*"
|
|
2070
|
-
) : u && typeof u.then == "function" ? u.then((
|
|
2071
|
-
var
|
|
2072
|
-
(
|
|
2083
|
+
) : u && typeof u.then == "function" ? u.then((g) => {
|
|
2084
|
+
var y;
|
|
2085
|
+
(y = window.parent) == null || y.postMessage(
|
|
2073
2086
|
{
|
|
2074
2087
|
type: "builder.evaluateResult",
|
|
2075
|
-
data: { id: a, result:
|
|
2088
|
+
data: { id: a, result: g }
|
|
2076
2089
|
},
|
|
2077
2090
|
"*"
|
|
2078
2091
|
);
|
|
2079
|
-
}).catch(console.error) : (
|
|
2092
|
+
}).catch(console.error) : (r = window.parent) == null || r.postMessage(
|
|
2080
2093
|
{
|
|
2081
2094
|
type: "builder.evaluateResult",
|
|
2082
2095
|
data: { result: u, id: a }
|
|
@@ -2088,84 +2101,84 @@ const gn = (e = {}) => {
|
|
|
2088
2101
|
}
|
|
2089
2102
|
})));
|
|
2090
2103
|
};
|
|
2091
|
-
function
|
|
2104
|
+
function Y(e) {
|
|
2092
2105
|
return Math.round(e * 1e3) / 1e3;
|
|
2093
2106
|
}
|
|
2094
|
-
const
|
|
2107
|
+
const kn = (e, t, n = !0) => {
|
|
2095
2108
|
if (!(e instanceof HTMLElement))
|
|
2096
2109
|
return null;
|
|
2097
|
-
let o =
|
|
2110
|
+
let o = n ? e : e.parentElement;
|
|
2098
2111
|
do {
|
|
2099
2112
|
if (!o)
|
|
2100
2113
|
return null;
|
|
2101
|
-
if (
|
|
2114
|
+
if (t(o))
|
|
2102
2115
|
return o;
|
|
2103
2116
|
} while (o = o.parentElement);
|
|
2104
2117
|
return null;
|
|
2105
|
-
},
|
|
2106
|
-
const
|
|
2107
|
-
return Boolean((
|
|
2108
|
-
}),
|
|
2118
|
+
}, Sn = (e) => kn(e, (t) => {
|
|
2119
|
+
const n = t.getAttribute("builder-id") || t.id;
|
|
2120
|
+
return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
|
|
2121
|
+
}), Q = ({
|
|
2109
2122
|
event: e,
|
|
2110
|
-
target:
|
|
2123
|
+
target: t
|
|
2111
2124
|
}) => {
|
|
2112
|
-
const
|
|
2125
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r = Y(o / n.width), i = Y(s / n.height);
|
|
2113
2126
|
return {
|
|
2114
|
-
x:
|
|
2115
|
-
y:
|
|
2127
|
+
x: r,
|
|
2128
|
+
y: i
|
|
2116
2129
|
};
|
|
2117
|
-
},
|
|
2118
|
-
const
|
|
2130
|
+
}, wn = (e) => {
|
|
2131
|
+
const t = e.target, n = t && Sn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2119
2132
|
return {
|
|
2120
2133
|
targetBuilderElement: o || void 0,
|
|
2121
2134
|
metadata: {
|
|
2122
|
-
targetOffset:
|
|
2123
|
-
builderTargetOffset:
|
|
2124
|
-
builderElementIndex:
|
|
2135
|
+
targetOffset: t ? Q({ event: e, target: t }) : void 0,
|
|
2136
|
+
builderTargetOffset: n ? Q({ event: e, target: n }) : void 0,
|
|
2137
|
+
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2125
2138
|
}
|
|
2126
2139
|
};
|
|
2127
|
-
},
|
|
2140
|
+
}, Cn = ({
|
|
2128
2141
|
content: e,
|
|
2129
|
-
data:
|
|
2130
|
-
locale:
|
|
2142
|
+
data: t,
|
|
2143
|
+
locale: n
|
|
2131
2144
|
}) => {
|
|
2132
|
-
var
|
|
2145
|
+
var r, i, l;
|
|
2133
2146
|
const o = {};
|
|
2134
|
-
(
|
|
2135
|
-
var
|
|
2136
|
-
a.name && a.defaultValue !== void 0 && ((
|
|
2147
|
+
(i = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || i.forEach((a) => {
|
|
2148
|
+
var c;
|
|
2149
|
+
a.name && a.defaultValue !== void 0 && ((c = e == null ? void 0 : e.data) == null ? void 0 : c.state) && e.data.state[a.name] === void 0 && (o[a.name] = a.defaultValue);
|
|
2137
2150
|
});
|
|
2138
2151
|
const s = {
|
|
2139
|
-
...(
|
|
2140
|
-
...
|
|
2141
|
-
...
|
|
2152
|
+
...(l = e == null ? void 0 : e.data) == null ? void 0 : l.state,
|
|
2153
|
+
...t,
|
|
2154
|
+
...n ? { locale: n } : {}
|
|
2142
2155
|
};
|
|
2143
2156
|
return { ...o, ...s };
|
|
2144
|
-
},
|
|
2157
|
+
}, xn = ({
|
|
2145
2158
|
content: e,
|
|
2146
|
-
data:
|
|
2159
|
+
data: t
|
|
2147
2160
|
}) => e ? {
|
|
2148
2161
|
...e,
|
|
2149
2162
|
data: {
|
|
2150
2163
|
...e == null ? void 0 : e.data,
|
|
2151
|
-
...
|
|
2164
|
+
...t
|
|
2152
2165
|
},
|
|
2153
2166
|
meta: e == null ? void 0 : e.meta
|
|
2154
|
-
} : void 0,
|
|
2167
|
+
} : void 0, In = () => Promise.resolve().then(() => ne).then((e) => e.default).catch((e) => {
|
|
2155
2168
|
throw console.error(
|
|
2156
2169
|
"Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
|
|
2157
2170
|
e
|
|
2158
2171
|
), e;
|
|
2159
|
-
}),
|
|
2172
|
+
}), $n = () => import("./render-styles.90b25836.js").then((e) => e.default).catch((e) => {
|
|
2160
2173
|
throw console.error(
|
|
2161
2174
|
"Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
|
|
2162
2175
|
e
|
|
2163
2176
|
), e;
|
|
2164
|
-
}),
|
|
2177
|
+
}), Tn = h({
|
|
2165
2178
|
name: "render-content",
|
|
2166
2179
|
components: {
|
|
2167
|
-
RenderContentStyles:
|
|
2168
|
-
RenderBlocks:
|
|
2180
|
+
RenderContentStyles: S($n),
|
|
2181
|
+
RenderBlocks: S(In)
|
|
2169
2182
|
},
|
|
2170
2183
|
props: [
|
|
2171
2184
|
"content",
|
|
@@ -2183,53 +2196,54 @@ const bn = (e, n, t = !0) => {
|
|
|
2183
2196
|
return {
|
|
2184
2197
|
forceReRenderCount: 0,
|
|
2185
2198
|
overrideContent: null,
|
|
2186
|
-
useContent:
|
|
2199
|
+
useContent: xn({
|
|
2187
2200
|
content: this.content,
|
|
2188
2201
|
data: this.data
|
|
2189
2202
|
}),
|
|
2190
2203
|
update: 0,
|
|
2191
|
-
canTrackToUse:
|
|
2192
|
-
contentState:
|
|
2204
|
+
canTrackToUse: I(this.canTrack) ? this.canTrack : !0,
|
|
2205
|
+
contentState: Cn({
|
|
2193
2206
|
content: this.content,
|
|
2194
2207
|
data: this.data,
|
|
2195
2208
|
locale: this.locale
|
|
2196
2209
|
}),
|
|
2197
2210
|
allRegisteredComponents: [
|
|
2198
|
-
...
|
|
2199
|
-
...
|
|
2211
|
+
...Yt(),
|
|
2212
|
+
...ce,
|
|
2200
2213
|
...this.customComponents || []
|
|
2201
2214
|
].reduce(
|
|
2202
|
-
(e,
|
|
2215
|
+
(e, t) => ({
|
|
2203
2216
|
...e,
|
|
2204
|
-
[
|
|
2217
|
+
[t.name]: t
|
|
2205
2218
|
}),
|
|
2206
2219
|
{}
|
|
2207
2220
|
),
|
|
2208
2221
|
httpReqsData: {},
|
|
2209
2222
|
clicked: !1,
|
|
2210
|
-
TARGET:
|
|
2223
|
+
TARGET: _
|
|
2211
2224
|
};
|
|
2212
2225
|
},
|
|
2213
2226
|
provide() {
|
|
2214
2227
|
const e = this;
|
|
2215
2228
|
return {
|
|
2216
|
-
[
|
|
2229
|
+
[P.key]: {
|
|
2217
2230
|
content: e.useContent,
|
|
2218
2231
|
state: e.contentState,
|
|
2219
2232
|
setState: e.setContextState,
|
|
2220
2233
|
context: e.context || {},
|
|
2221
2234
|
apiKey: e.apiKey,
|
|
2222
2235
|
apiVersion: e.apiVersion,
|
|
2223
|
-
registeredComponents: e.allRegisteredComponents
|
|
2236
|
+
registeredComponents: e.allRegisteredComponents,
|
|
2237
|
+
inheritedStyles: {}
|
|
2224
2238
|
}
|
|
2225
2239
|
};
|
|
2226
2240
|
},
|
|
2227
2241
|
mounted() {
|
|
2228
|
-
var e,
|
|
2229
|
-
if (this.apiKey ||
|
|
2230
|
-
"
|
|
2231
|
-
),
|
|
2232
|
-
if (
|
|
2242
|
+
var e, t;
|
|
2243
|
+
if (this.apiKey || C.error(
|
|
2244
|
+
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2245
|
+
), m()) {
|
|
2246
|
+
if (k() && (this.forceReRenderCount = this.forceReRenderCount + 1, yn(), vn({
|
|
2233
2247
|
...this.locale ? {
|
|
2234
2248
|
locale: this.locale
|
|
2235
2249
|
} : {},
|
|
@@ -2238,26 +2252,28 @@ const bn = (e, n, t = !0) => {
|
|
|
2238
2252
|
} : {}
|
|
2239
2253
|
}), Object.values(
|
|
2240
2254
|
this.allRegisteredComponents
|
|
2241
|
-
).forEach((
|
|
2255
|
+
).forEach((n) => {
|
|
2242
2256
|
var s;
|
|
2243
|
-
const o =
|
|
2257
|
+
const o = Zt(n);
|
|
2244
2258
|
(s = window.parent) == null || s.postMessage(o, "*");
|
|
2245
2259
|
}), window.addEventListener("message", this.processMessage), window.addEventListener(
|
|
2246
2260
|
"builder:component:stateChangeListenerActivated",
|
|
2247
2261
|
this.emitStateUpdate
|
|
2248
2262
|
)), this.useContent) {
|
|
2249
|
-
const
|
|
2250
|
-
|
|
2263
|
+
const n = (e = this.useContent) == null ? void 0 : e.testVariationId, o = (t = this.useContent) == null ? void 0 : t.id;
|
|
2264
|
+
M({
|
|
2251
2265
|
type: "impression",
|
|
2252
2266
|
canTrack: this.canTrackToUse,
|
|
2253
2267
|
contentId: o,
|
|
2254
2268
|
apiKey: this.apiKey,
|
|
2255
|
-
variationId:
|
|
2269
|
+
variationId: n !== o ? n : void 0
|
|
2256
2270
|
});
|
|
2257
2271
|
}
|
|
2258
|
-
if (
|
|
2259
|
-
const
|
|
2260
|
-
|
|
2272
|
+
if (Qt()) {
|
|
2273
|
+
const n = new URL(location.href).searchParams, o = n.get("builder.preview"), s = n.get(
|
|
2274
|
+
`builder.preview.${o}`
|
|
2275
|
+
), r = n.get("apiKey") || n.get("builder.space");
|
|
2276
|
+
o === this.model && r === this.apiKey && (!this.content || s === this.content.id) && le({
|
|
2261
2277
|
model: this.model,
|
|
2262
2278
|
apiKey: this.apiKey,
|
|
2263
2279
|
apiVersion: this.apiVersion
|
|
@@ -2295,7 +2311,7 @@ const bn = (e, n, t = !0) => {
|
|
|
2295
2311
|
}
|
|
2296
2312
|
},
|
|
2297
2313
|
unmounted() {
|
|
2298
|
-
|
|
2314
|
+
m() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
|
|
2299
2315
|
"builder:component:stateChangeListenerActivated",
|
|
2300
2316
|
this.emitStateUpdate
|
|
2301
2317
|
));
|
|
@@ -2307,16 +2323,16 @@ const bn = (e, n, t = !0) => {
|
|
|
2307
2323
|
};
|
|
2308
2324
|
},
|
|
2309
2325
|
onUpdateHook1() {
|
|
2310
|
-
var e,
|
|
2326
|
+
var e, t;
|
|
2311
2327
|
return {
|
|
2312
|
-
0: (
|
|
2328
|
+
0: (t = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : t.jsCode,
|
|
2313
2329
|
1: this.contentState
|
|
2314
2330
|
};
|
|
2315
2331
|
},
|
|
2316
2332
|
onUpdateHook2() {
|
|
2317
|
-
var e,
|
|
2333
|
+
var e, t;
|
|
2318
2334
|
return {
|
|
2319
|
-
0: (
|
|
2335
|
+
0: (t = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : t.httpRequests
|
|
2320
2336
|
};
|
|
2321
2337
|
},
|
|
2322
2338
|
onUpdateHook3() {
|
|
@@ -2327,27 +2343,27 @@ const bn = (e, n, t = !0) => {
|
|
|
2327
2343
|
},
|
|
2328
2344
|
methods: {
|
|
2329
2345
|
mergeNewContent(e) {
|
|
2330
|
-
var
|
|
2346
|
+
var t, n, o, s, r;
|
|
2331
2347
|
this.useContent = {
|
|
2332
2348
|
...this.useContent,
|
|
2333
2349
|
...e,
|
|
2334
2350
|
data: {
|
|
2335
|
-
...(
|
|
2351
|
+
...(t = this.useContent) == null ? void 0 : t.data,
|
|
2336
2352
|
...e == null ? void 0 : e.data
|
|
2337
2353
|
},
|
|
2338
2354
|
meta: {
|
|
2339
|
-
...(
|
|
2355
|
+
...(n = this.useContent) == null ? void 0 : n.meta,
|
|
2340
2356
|
...e == null ? void 0 : e.meta,
|
|
2341
|
-
breakpoints: ((o = e == null ? void 0 : e.meta) == null ? void 0 : o.breakpoints) || ((
|
|
2357
|
+
breakpoints: ((o = e == null ? void 0 : e.meta) == null ? void 0 : o.breakpoints) || ((r = (s = this.useContent) == null ? void 0 : s.meta) == null ? void 0 : r.breakpoints)
|
|
2342
2358
|
}
|
|
2343
2359
|
};
|
|
2344
2360
|
},
|
|
2345
2361
|
setBreakpoints(e) {
|
|
2346
|
-
var
|
|
2362
|
+
var t;
|
|
2347
2363
|
this.useContent = {
|
|
2348
2364
|
...this.useContent,
|
|
2349
2365
|
meta: {
|
|
2350
|
-
...(
|
|
2366
|
+
...(t = this.useContent) == null ? void 0 : t.meta,
|
|
2351
2367
|
breakpoints: e
|
|
2352
2368
|
}
|
|
2353
2369
|
};
|
|
@@ -2356,44 +2372,44 @@ const bn = (e, n, t = !0) => {
|
|
|
2356
2372
|
this.contentState = e;
|
|
2357
2373
|
},
|
|
2358
2374
|
processMessage(e) {
|
|
2359
|
-
var
|
|
2360
|
-
const { data:
|
|
2361
|
-
if (
|
|
2362
|
-
switch (
|
|
2375
|
+
var n;
|
|
2376
|
+
const { data: t } = e;
|
|
2377
|
+
if (t)
|
|
2378
|
+
switch (t.type) {
|
|
2363
2379
|
case "builder.configureSdk": {
|
|
2364
|
-
const o =
|
|
2365
|
-
if (!
|
|
2380
|
+
const o = t.data, { breakpoints: s, contentId: r } = o;
|
|
2381
|
+
if (!r || r !== ((n = this.useContent) == null ? void 0 : n.id))
|
|
2366
2382
|
return;
|
|
2367
2383
|
s && this.setBreakpoints(s), this.forceReRenderCount = this.forceReRenderCount + 1;
|
|
2368
2384
|
break;
|
|
2369
2385
|
}
|
|
2370
2386
|
case "builder.contentUpdate": {
|
|
2371
|
-
const o =
|
|
2372
|
-
s === this.model && (this.mergeNewContent(
|
|
2387
|
+
const o = t.data, s = o.key || o.alias || o.entry || o.modelName, r = o.data;
|
|
2388
|
+
s === this.model && (this.mergeNewContent(r), this.forceReRenderCount = this.forceReRenderCount + 1);
|
|
2373
2389
|
break;
|
|
2374
2390
|
}
|
|
2375
2391
|
}
|
|
2376
2392
|
},
|
|
2377
2393
|
evaluateJsCode() {
|
|
2378
|
-
var
|
|
2379
|
-
const e = (
|
|
2380
|
-
e &&
|
|
2394
|
+
var t, n;
|
|
2395
|
+
const e = (n = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
|
|
2396
|
+
e && G({
|
|
2381
2397
|
code: e,
|
|
2382
2398
|
context: this.context || {},
|
|
2383
2399
|
state: this.contentState
|
|
2384
2400
|
});
|
|
2385
2401
|
},
|
|
2386
2402
|
onClick(e) {
|
|
2387
|
-
var
|
|
2403
|
+
var t, n;
|
|
2388
2404
|
if (this.useContent) {
|
|
2389
|
-
const o = (
|
|
2390
|
-
|
|
2405
|
+
const o = (t = this.useContent) == null ? void 0 : t.testVariationId, s = (n = this.useContent) == null ? void 0 : n.id;
|
|
2406
|
+
M({
|
|
2391
2407
|
type: "click",
|
|
2392
2408
|
canTrack: this.canTrackToUse,
|
|
2393
2409
|
contentId: s,
|
|
2394
2410
|
apiKey: this.apiKey,
|
|
2395
2411
|
variationId: o !== s ? o : void 0,
|
|
2396
|
-
...
|
|
2412
|
+
...wn(e),
|
|
2397
2413
|
unique: !this.clicked
|
|
2398
2414
|
});
|
|
2399
2415
|
}
|
|
@@ -2402,39 +2418,39 @@ const bn = (e, n, t = !0) => {
|
|
|
2402
2418
|
evalExpression(e) {
|
|
2403
2419
|
return e.replace(
|
|
2404
2420
|
/{{([^}]+)}}/g,
|
|
2405
|
-
(
|
|
2406
|
-
code:
|
|
2421
|
+
(t, n) => G({
|
|
2422
|
+
code: n,
|
|
2407
2423
|
context: this.context || {},
|
|
2408
2424
|
state: this.contentState
|
|
2409
2425
|
})
|
|
2410
2426
|
);
|
|
2411
2427
|
},
|
|
2412
|
-
handleRequest({ url: e, key:
|
|
2413
|
-
|
|
2428
|
+
handleRequest({ url: e, key: t }) {
|
|
2429
|
+
oe(e).then((n) => n.json()).then((n) => {
|
|
2414
2430
|
const o = {
|
|
2415
2431
|
...this.contentState,
|
|
2416
|
-
[
|
|
2432
|
+
[t]: n
|
|
2417
2433
|
};
|
|
2418
2434
|
this.setContextState(o);
|
|
2419
|
-
}).catch((
|
|
2420
|
-
console.error("error fetching dynamic data", e,
|
|
2435
|
+
}).catch((n) => {
|
|
2436
|
+
console.error("error fetching dynamic data", e, n);
|
|
2421
2437
|
});
|
|
2422
2438
|
},
|
|
2423
2439
|
runHttpRequests() {
|
|
2424
|
-
var
|
|
2425
|
-
const e = (o = (
|
|
2426
|
-
Object.entries(e).forEach(([s,
|
|
2427
|
-
if (
|
|
2428
|
-
const
|
|
2440
|
+
var t, n, o;
|
|
2441
|
+
const e = (o = (n = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) != null ? o : {};
|
|
2442
|
+
Object.entries(e).forEach(([s, r]) => {
|
|
2443
|
+
if (r && (!this.httpReqsData[s] || k())) {
|
|
2444
|
+
const i = this.evalExpression(r);
|
|
2429
2445
|
this.handleRequest({
|
|
2430
|
-
url:
|
|
2446
|
+
url: i,
|
|
2431
2447
|
key: s
|
|
2432
2448
|
});
|
|
2433
2449
|
}
|
|
2434
2450
|
});
|
|
2435
2451
|
},
|
|
2436
2452
|
emitStateUpdate() {
|
|
2437
|
-
|
|
2453
|
+
k() && window.dispatchEvent(
|
|
2438
2454
|
new CustomEvent(
|
|
2439
2455
|
"builder:component:stateChange",
|
|
2440
2456
|
{
|
|
@@ -2449,74 +2465,74 @@ const bn = (e, n, t = !0) => {
|
|
|
2449
2465
|
);
|
|
2450
2466
|
}
|
|
2451
2467
|
}
|
|
2452
|
-
},
|
|
2453
|
-
function
|
|
2454
|
-
var a,
|
|
2455
|
-
const
|
|
2456
|
-
return
|
|
2468
|
+
}), Rn = ["builder-content-id", "builder-model"];
|
|
2469
|
+
function En(e, t, n, o, s, r) {
|
|
2470
|
+
var a, c, u, b, g, y, $, N;
|
|
2471
|
+
const i = w("render-content-styles"), l = w("render-blocks");
|
|
2472
|
+
return e.useContent ? (d(), p("div", {
|
|
2457
2473
|
key: 0,
|
|
2458
2474
|
ref: "elementRef",
|
|
2459
|
-
onClick:
|
|
2460
|
-
"builder-content-id": (a =
|
|
2461
|
-
"builder-model":
|
|
2475
|
+
onClick: t[0] || (t[0] = (he) => e.onClick(he)),
|
|
2476
|
+
"builder-content-id": (a = e.useContent) == null ? void 0 : a.id,
|
|
2477
|
+
"builder-model": e.model
|
|
2462
2478
|
}, [
|
|
2463
|
-
|
|
2479
|
+
e.TARGET !== "reactNative" ? (d(), E(i, {
|
|
2464
2480
|
key: 0,
|
|
2465
|
-
contentId: (
|
|
2466
|
-
cssCode: (
|
|
2467
|
-
customFonts: (
|
|
2468
|
-
}, null, 8, ["contentId", "cssCode", "customFonts"])) :
|
|
2469
|
-
(d(),
|
|
2470
|
-
blocks: (
|
|
2471
|
-
key:
|
|
2481
|
+
contentId: (c = e.useContent) == null ? void 0 : c.id,
|
|
2482
|
+
cssCode: (b = (u = e.useContent) == null ? void 0 : u.data) == null ? void 0 : b.cssCode,
|
|
2483
|
+
customFonts: (y = (g = e.useContent) == null ? void 0 : g.data) == null ? void 0 : y.customFonts
|
|
2484
|
+
}, null, 8, ["contentId", "cssCode", "customFonts"])) : v("", !0),
|
|
2485
|
+
(d(), E(l, {
|
|
2486
|
+
blocks: (N = ($ = e.useContent) == null ? void 0 : $.data) == null ? void 0 : N.blocks,
|
|
2487
|
+
key: e.forceReRenderCount
|
|
2472
2488
|
}, null, 8, ["blocks"]))
|
|
2473
|
-
], 8,
|
|
2489
|
+
], 8, Rn)) : v("", !0);
|
|
2474
2490
|
}
|
|
2475
|
-
const
|
|
2491
|
+
const _n = /* @__PURE__ */ f(Tn, [["render", En]]), An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2476
2492
|
__proto__: null,
|
|
2477
|
-
default:
|
|
2478
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2479
|
-
function
|
|
2480
|
-
if (
|
|
2481
|
-
Object.assign(
|
|
2482
|
-
const
|
|
2493
|
+
default: _n
|
|
2494
|
+
}, Symbol.toStringTag, { value: "Module" })), Z = {};
|
|
2495
|
+
function Fn(e) {
|
|
2496
|
+
if (m()) {
|
|
2497
|
+
Object.assign(Z, e);
|
|
2498
|
+
const t = {
|
|
2483
2499
|
type: "builder.settingsChange",
|
|
2484
|
-
data:
|
|
2500
|
+
data: Z
|
|
2485
2501
|
};
|
|
2486
|
-
parent.postMessage(
|
|
2502
|
+
parent.postMessage(t, "*");
|
|
2487
2503
|
}
|
|
2488
2504
|
}
|
|
2489
2505
|
export {
|
|
2490
|
-
B,
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2506
|
+
P as B,
|
|
2507
|
+
Ie as C,
|
|
2508
|
+
Re as F,
|
|
2509
|
+
Fe as I,
|
|
2510
|
+
Ye as S,
|
|
2511
|
+
_ as T,
|
|
2512
|
+
Vt as V,
|
|
2513
|
+
f as _,
|
|
2514
|
+
Vn as a,
|
|
2515
|
+
ye as b,
|
|
2516
|
+
I as c,
|
|
2517
|
+
_n as d,
|
|
2518
|
+
G as e,
|
|
2519
|
+
L as f,
|
|
2520
|
+
ve as g,
|
|
2521
|
+
Ct as h,
|
|
2522
|
+
Rt as i,
|
|
2523
|
+
k as j,
|
|
2524
|
+
Qt as k,
|
|
2525
|
+
ce as l,
|
|
2526
|
+
Pn as m,
|
|
2527
|
+
Zt as n,
|
|
2528
|
+
bn as o,
|
|
2529
|
+
le as p,
|
|
2530
|
+
yt as q,
|
|
2531
|
+
He as r,
|
|
2532
|
+
Fn as s,
|
|
2517
2533
|
Bn as t,
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2534
|
+
mt as u,
|
|
2535
|
+
ht as v,
|
|
2536
|
+
ft as w,
|
|
2537
|
+
ae as x
|
|
2522
2538
|
};
|