@builder.io/sdk-vue 0.5.2 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/package.json +10 -2
- package/packages/_vue2/dist/{block-styles.59ab7031.js → block-styles.551cd02d.js} +15 -14
- package/packages/_vue2/dist/block-styles.a0d753a9.cjs +1 -0
- package/packages/_vue2/dist/{block-wrapper.9745ba6c.cjs → block-wrapper.1275badd.cjs} +1 -1
- package/packages/_vue2/dist/{block-wrapper.cce236ce.js → block-wrapper.e10d56cd.js} +5 -5
- package/packages/_vue2/dist/{block.63da4044.js → block.4281b61f.js} +10 -9
- package/packages/_vue2/dist/{block.01a27eab.cjs → block.b03a0eae.cjs} +2 -2
- package/packages/_vue2/dist/{blocks-wrapper.2b797dc9.js → blocks-wrapper.77411b55.js} +1 -1
- package/packages/_vue2/dist/{blocks-wrapper.ba2cd603.cjs → blocks-wrapper.ab7aade5.cjs} +1 -1
- package/packages/_vue2/dist/{component-ref.4f7cf332.js → component-ref.10096695.js} +6 -6
- package/packages/_vue2/dist/{component-ref.2f39178c.cjs → component-ref.9d208992.cjs} +1 -1
- package/packages/_vue2/dist/{content.7c8b076b.cjs → content.6d11463c.cjs} +1 -1
- package/packages/_vue2/dist/{content.6382aeb4.js → content.ecfd43b5.js} +5 -5
- package/packages/_vue2/dist/{css.8dff19fe.js → css.0bf8202b.js} +1 -1
- package/packages/_vue2/dist/{css.2e7fbfd1.cjs → css.cd48304d.cjs} +1 -1
- package/packages/_vue2/dist/enable-editor.4e78f6ed.cjs +1 -0
- package/packages/_vue2/dist/{enable-editor.e9efcd2b.js → enable-editor.e568289e.js} +13 -13
- package/packages/_vue2/dist/evaluate.7dcb5aad.cjs +4 -0
- package/packages/_vue2/dist/evaluate.f8bc6419.js +79 -0
- package/packages/_vue2/dist/{get-block-actions.19a0ecef.js → get-block-actions.26e982e0.js} +2 -2
- package/packages/_vue2/dist/get-block-actions.413b41fb.cjs +1 -0
- package/packages/_vue2/dist/{get-block-properties.d589f252.js → get-block-properties.18d4c9b3.js} +2 -2
- package/packages/_vue2/dist/{get-block-properties.88fdcf9e.cjs → get-block-properties.48e54355.cjs} +1 -1
- package/packages/_vue2/dist/get-processed-block.a838cbff.cjs +1 -0
- package/packages/_vue2/dist/{get-processed-block.23166082.js → get-processed-block.d6b8a3e9.js} +21 -20
- package/packages/_vue2/dist/{index.e6fc80c7.js → index.3df15bff.js} +63 -58
- package/packages/_vue2/dist/{index.d33db46c.cjs → index.9cfd3074.cjs} +4 -4
- package/packages/_vue2/dist/{inlined-script.ed4af994.js → inlined-script.43151e3b.js} +1 -1
- package/packages/_vue2/dist/{inlined-script.b449adc4.cjs → inlined-script.76b5aff1.cjs} +1 -1
- package/packages/_vue2/dist/{inlined-styles.e3020f6b.js → inlined-styles.52264f08.js} +1 -1
- package/packages/_vue2/dist/{inlined-styles.73a58431.cjs → inlined-styles.fc33e3c1.cjs} +1 -1
- package/packages/_vue2/dist/{interactive-element.165bdd65.cjs → interactive-element.5d4dffa8.cjs} +1 -1
- package/packages/_vue2/dist/{interactive-element.6bd49ec9.js → interactive-element.f4f189d5.js} +5 -5
- package/packages/_vue2/dist/non-node-runtime.59649ad7.cjs +21 -0
- package/packages/_vue2/dist/non-node-runtime.ea934f1b.js +2477 -0
- package/packages/_vue2/dist/{repeated-block.0f2faa8d.js → repeated-block.7ab5044a.js} +2 -2
- package/packages/_vue2/dist/{repeated-block.1c865156.cjs → repeated-block.c74eee80.cjs} +1 -1
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +1 -1
- package/packages/_vue2/dist/set.87eb0329.cjs +1 -0
- package/packages/_vue2/dist/set.b219ab0e.js +9 -0
- package/packages/_vue2/dist/src/components/content-variants/content-variants.vue.d.ts +1 -4
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/evaluate/non-node-runtime/index.d.ts +6 -0
- package/packages/_vue2/dist/src/functions/evaluate/{non-node-runtime.d.ts → non-node-runtime/non-node-runtime.d.ts} +1 -1
- package/packages/_vue2/dist/src/functions/evaluate/types.d.ts +1 -0
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/get.d.ts +2 -1
- package/packages/_vue2/dist/{styles.06e1be5f.js → styles.2f94fa2c.js} +2 -2
- package/packages/_vue2/dist/{styles.ab30731d.cjs → styles.4af0e072.cjs} +2 -2
- package/packages/_vue3/dist/{block-wrapper.fa25d8d3.js → block-wrapper.d098d5ab.js} +2 -2
- package/packages/_vue3/dist/{block-wrapper.8543e3fe.cjs → block-wrapper.e41532b2.cjs} +1 -1
- package/packages/_vue3/dist/{component-ref.448dc8fb.cjs → component-ref.33e78959.cjs} +1 -1
- package/packages/_vue3/dist/{component-ref.72eb813f.js → component-ref.c6b3162f.js} +2 -2
- package/packages/_vue3/dist/{get-block-actions.f8f272df.cjs → get-block-actions.b792830e.cjs} +1 -1
- package/packages/_vue3/dist/{get-block-actions.27d7ef56.js → get-block-actions.fb7173e7.js} +1 -1
- package/packages/_vue3/dist/index.3d2e7780.js +3217 -0
- package/packages/_vue3/dist/index.d92378a5.cjs +72 -0
- package/packages/_vue3/dist/non-node-runtime.52df390c.cjs +21 -0
- package/packages/_vue3/dist/non-node-runtime.d120625e.js +2476 -0
- package/packages/_vue3/dist/{repeated-block.f55959d7.cjs → repeated-block.af26c825.cjs} +1 -1
- package/packages/_vue3/dist/{repeated-block.11b2de7c.js → repeated-block.b2f15408.js} +2 -2
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +5 -5
- package/packages/_vue3/dist/src/blocks/button/button.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/custom-code/custom-code.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/embed/embed.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/fragment/fragment.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/image/image.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/img/img.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/section/section.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/text/text.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/video/video.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/block/components/block-styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/block/components/block-wrapper.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/block/components/interactive-element.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/block/components/repeated-block.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/blocks/blocks-wrapper.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/blocks/blocks.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/content/components/enable-editor.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/content/components/styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/content/content.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/content-variants/content-variants.vue.d.ts +2 -5
- package/packages/_vue3/dist/src/components/inlined-script.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/inlined-styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/evaluate/non-node-runtime/index.d.ts +6 -0
- package/packages/_vue3/dist/src/functions/evaluate/{non-node-runtime.d.ts → non-node-runtime/non-node-runtime.d.ts} +1 -1
- package/packages/_vue3/dist/src/functions/evaluate/types.d.ts +1 -0
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/get.d.ts +2 -1
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.e65d44f5.cjs +0 -1
- package/packages/_vue2/dist/enable-editor.23d6d28b.cjs +0 -1
- package/packages/_vue2/dist/evaluate.df5fb75e.js +0 -4970
- package/packages/_vue2/dist/evaluate.f450642c.cjs +0 -31
- package/packages/_vue2/dist/get-block-actions.6ca6c225.cjs +0 -1
- package/packages/_vue2/dist/get-processed-block.5831b148.cjs +0 -1
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/helpers.d.ts +0 -1
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/init.d.ts +0 -6
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/types.d.ts +0 -12
- package/packages/_vue3/dist/index.4a0c8828.js +0 -8094
- package/packages/_vue3/dist/index.95dacfa2.cjs +0 -99
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/helpers.d.ts +0 -1
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/init.d.ts +0 -6
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/types.d.ts +0 -12
- /package/packages/_vue2/dist/src/functions/evaluate/{interpreter.d.ts → acorn-interpreter.d.ts} +0 -0
- /package/packages/_vue3/dist/src/functions/evaluate/{interpreter.d.ts → acorn-interpreter.d.ts} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { i as u, l as o, b as w } from "./index.3df15bff.js";
|
|
2
|
+
function g() {
|
|
3
|
+
const r = () => {
|
|
4
|
+
var e;
|
|
5
|
+
return typeof process < "u" && ((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
6
|
+
};
|
|
7
|
+
return !u() && !r();
|
|
8
|
+
}
|
|
9
|
+
let f;
|
|
10
|
+
g() && import("./non-node-runtime.ea934f1b.js").then((r) => {
|
|
11
|
+
f = r.runInNonNode;
|
|
12
|
+
}).catch((r) => {
|
|
13
|
+
const e = "Error importing JS interpreter for non-Node.js runtimes. Make sure `js-interpreter` is installed.\n Read more here: https://github.com/BuilderIO/builder/tree/main/packages/sdks/README.md#non-nodejs-runtimes-edge-serverless\n ";
|
|
14
|
+
o.error(e, r), f = (...s) => {
|
|
15
|
+
o.error(e);
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
function p({
|
|
19
|
+
code: r,
|
|
20
|
+
context: e,
|
|
21
|
+
localState: s,
|
|
22
|
+
rootState: i,
|
|
23
|
+
rootSetState: n,
|
|
24
|
+
event: t,
|
|
25
|
+
isExpression: d = !0
|
|
26
|
+
}) {
|
|
27
|
+
if (r === "") {
|
|
28
|
+
o.warn("Skipping evaluation of empty code block.");
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const c = {
|
|
32
|
+
isEditing: w(),
|
|
33
|
+
isBrowser: u(),
|
|
34
|
+
isServer: !u()
|
|
35
|
+
}, a = {
|
|
36
|
+
useCode: d && !(r.includes(";") || r.includes(" return ") || r.trim().startsWith("return ")) ? `return (${r});` : r,
|
|
37
|
+
builder: c,
|
|
38
|
+
context: e,
|
|
39
|
+
event: t,
|
|
40
|
+
rootSetState: n,
|
|
41
|
+
rootState: i,
|
|
42
|
+
localState: s
|
|
43
|
+
};
|
|
44
|
+
return u() ? m(a) : g() ? f(a) : h(a);
|
|
45
|
+
}
|
|
46
|
+
const m = ({
|
|
47
|
+
useCode: r,
|
|
48
|
+
builder: e,
|
|
49
|
+
context: s,
|
|
50
|
+
event: i,
|
|
51
|
+
localState: n,
|
|
52
|
+
rootSetState: t,
|
|
53
|
+
rootState: d
|
|
54
|
+
}) => {
|
|
55
|
+
const c = E(d, n, t);
|
|
56
|
+
try {
|
|
57
|
+
return new Function("builder", "Builder", "state", "context", "event", r)(e, e, c, s, i);
|
|
58
|
+
} catch (l) {
|
|
59
|
+
o.warn(`Builder custom code error:
|
|
60
|
+
While Evaluating:
|
|
61
|
+
`, r, `
|
|
62
|
+
`, l);
|
|
63
|
+
}
|
|
64
|
+
}, h = (r) => m(r);
|
|
65
|
+
function E(r, e, s) {
|
|
66
|
+
if (r === e)
|
|
67
|
+
throw new Error("rootState === localState");
|
|
68
|
+
return new Proxy(r, {
|
|
69
|
+
get: (i, n) => e && n in e ? e[n] : r[n],
|
|
70
|
+
set: (i, n, t) => {
|
|
71
|
+
if (e && n in e)
|
|
72
|
+
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
73
|
+
return r[n] = t, s == null || s(r), !0;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
p as e
|
|
79
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as s } from "./index.
|
|
2
|
-
import { e as l } from "./evaluate.
|
|
1
|
+
import { T as s } from "./index.3df15bff.js";
|
|
2
|
+
import { e as l } from "./evaluate.f8bc6419.js";
|
|
3
3
|
const i = (e) => `v-on:${e.toLowerCase()}`, v = (e, t) => (o) => l({
|
|
4
4
|
code: e,
|
|
5
5
|
context: t.context,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./index.9cfd3074.cjs"),l=require("./evaluate.7dcb5aad.cjs"),i=e=>`v-on:${e.toLowerCase()}`,u=(e,t)=>a=>l.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:a,isExpression:!1});function v(e){var n;const t={},a=(n=e.block.actions)!=null?n:{};for(const o in a){if(!a.hasOwnProperty(o))continue;const r=a[o];let c=i(o);if(e.stripPrefix)switch(s.TARGET){case"vue2":case"vue3":c=c.replace("v-on:","");break;case"svelte":c=c.replace("on:","");break}t[c]=u(r,e)}return t}exports.getBlockActions=v;
|
package/packages/_vue2/dist/{get-block-properties.88fdcf9e.cjs → get-block-properties.48e54355.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("./index.
|
|
1
|
+
"use strict";const c=require("./index.9cfd3074.cjs"),n=require("./css.cd48304d.cjs");function i(e){const t={};if(typeof e!="string")return t;const r=e.trim().split(/\\s+/);for(const s of r)t[s]=!0;return t}function o(e){return e.class=i(e.class),e}const a=e=>({href:e.href});function u({block:e,context:t}){var s;const r={...a(e),...e.properties,"builder-id":e.id,style:e.style?l(e.style):void 0,class:[e.id,"builder-block",e.class,(s=e.properties)==null?void 0:s.class].filter(Boolean).join(" ")};return o(r)}function l(e){switch(c.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return n.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}exports.getBlockProperties=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const d=require("./evaluate.7dcb5aad.cjs"),f=require("./index.9cfd3074.cjs"),l=require("./set.87eb0329.cjs");const g=({block:e,context:t,localState:r,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const n=f.fastClone(e),s={...n,properties:{...n.properties},actions:{...n.actions}};for(const c in e.bindings){const a=e.bindings[c],u=d.evaluate({code:a,localState:r,rootState:i,rootSetState:o,context:t});l.set(s,c,u)}return s};function p({block:e,context:t,shouldEvaluateBindings:r,localState:i,rootState:o,rootSetState:n}){const s=e;return r?g({block:s,localState:i,rootState:o,rootSetState:n,context:t}):s}exports.getProcessedBlock=p;
|
package/packages/_vue2/dist/{get-processed-block.23166082.js → get-processed-block.d6b8a3e9.js}
RENAMED
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
import { e as p
|
|
2
|
-
import { f as
|
|
3
|
-
|
|
1
|
+
import { e as p } from "./evaluate.f8bc6419.js";
|
|
2
|
+
import { f as u } from "./index.3df15bff.js";
|
|
3
|
+
import { s as d } from "./set.b219ab0e.js";
|
|
4
|
+
const m = ({
|
|
4
5
|
block: n,
|
|
5
6
|
context: t,
|
|
6
|
-
localState:
|
|
7
|
+
localState: e,
|
|
7
8
|
rootState: r,
|
|
8
9
|
rootSetState: i
|
|
9
10
|
}) => {
|
|
10
11
|
if (!n.bindings)
|
|
11
12
|
return n;
|
|
12
|
-
const
|
|
13
|
-
...
|
|
13
|
+
const o = u(n), s = {
|
|
14
|
+
...o,
|
|
14
15
|
properties: {
|
|
15
|
-
...
|
|
16
|
+
...o.properties
|
|
16
17
|
},
|
|
17
18
|
actions: {
|
|
18
|
-
...
|
|
19
|
+
...o.actions
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
22
|
for (const c in n.bindings) {
|
|
22
23
|
const a = n.bindings[c], f = p({
|
|
23
24
|
code: a,
|
|
24
|
-
localState:
|
|
25
|
+
localState: e,
|
|
25
26
|
rootState: r,
|
|
26
27
|
rootSetState: i,
|
|
27
28
|
context: t
|
|
28
29
|
});
|
|
29
|
-
|
|
30
|
+
d(s, c, f);
|
|
30
31
|
}
|
|
31
|
-
return
|
|
32
|
+
return s;
|
|
32
33
|
};
|
|
33
|
-
function
|
|
34
|
+
function v({
|
|
34
35
|
block: n,
|
|
35
36
|
context: t,
|
|
36
|
-
shouldEvaluateBindings:
|
|
37
|
+
shouldEvaluateBindings: e,
|
|
37
38
|
localState: r,
|
|
38
39
|
rootState: i,
|
|
39
|
-
rootSetState:
|
|
40
|
+
rootSetState: o
|
|
40
41
|
}) {
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
block:
|
|
42
|
+
const s = n;
|
|
43
|
+
return e ? m({
|
|
44
|
+
block: s,
|
|
44
45
|
localState: r,
|
|
45
46
|
rootState: i,
|
|
46
|
-
rootSetState:
|
|
47
|
+
rootSetState: o,
|
|
47
48
|
context: t
|
|
48
|
-
}) :
|
|
49
|
+
}) : s;
|
|
49
50
|
}
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
+
v as g
|
|
52
53
|
};
|
|
@@ -41,9 +41,9 @@ function b(e, t, n, o, r, s, i, u) {
|
|
|
41
41
|
} : r), d)
|
|
42
42
|
if (a.functional) {
|
|
43
43
|
a._injectStyles = d;
|
|
44
|
-
var
|
|
45
|
-
a.render = function(
|
|
46
|
-
return d.call(l), f
|
|
44
|
+
var m = a.render;
|
|
45
|
+
a.render = function(f, l) {
|
|
46
|
+
return d.call(l), m(f, l);
|
|
47
47
|
};
|
|
48
48
|
} else {
|
|
49
49
|
var p = a.beforeCreate;
|
|
@@ -113,7 +113,7 @@ const nn = ot.exports, A = (e) => JSON.parse(JSON.stringify(e)), F = {
|
|
|
113
113
|
"Error while attempting to dynamically import component Blocks at ../../components/blocks/blocks.vue",
|
|
114
114
|
e
|
|
115
115
|
), e;
|
|
116
|
-
}), it = () => import("./inlined-styles.
|
|
116
|
+
}), it = () => import("./inlined-styles.52264f08.js").then((e) => e.default).catch((e) => {
|
|
117
117
|
throw console.error(
|
|
118
118
|
"Error while attempting to dynamically import component InlinedStyles at ../../components/inlined-styles.vue",
|
|
119
119
|
e
|
|
@@ -262,13 +262,13 @@ const rn = ut.exports, dt = g({
|
|
|
262
262
|
name: "builder-fragment-component",
|
|
263
263
|
props: []
|
|
264
264
|
});
|
|
265
|
-
var
|
|
265
|
+
var ft = function() {
|
|
266
266
|
var t = this, n = t._self._c;
|
|
267
267
|
return t._self._setupProxy, n("span", [t._t("default")], 2);
|
|
268
|
-
},
|
|
268
|
+
}, mt = [], pt = /* @__PURE__ */ b(
|
|
269
269
|
dt,
|
|
270
|
-
mt,
|
|
271
270
|
ft,
|
|
271
|
+
mt,
|
|
272
272
|
!1,
|
|
273
273
|
null,
|
|
274
274
|
null,
|
|
@@ -401,17 +401,17 @@ const an = vt.exports, St = Symbol(), kt = {
|
|
|
401
401
|
}, xt = Symbol(), wt = {
|
|
402
402
|
Components: { registeredComponents: {} },
|
|
403
403
|
key: xt
|
|
404
|
-
}, Ct = () => import("./block-styles.
|
|
404
|
+
}, Ct = () => import("./block-styles.551cd02d.js").then((e) => e.default).catch((e) => {
|
|
405
405
|
throw console.error(
|
|
406
406
|
"Error while attempting to dynamically import component BlockStyles at ../block/components/block-styles.vue",
|
|
407
407
|
e
|
|
408
408
|
), e;
|
|
409
|
-
}), $t = () => import("./block.
|
|
409
|
+
}), $t = () => import("./block.4281b61f.js").then((e) => e.default).catch((e) => {
|
|
410
410
|
throw console.error(
|
|
411
411
|
"Error while attempting to dynamically import component Block at ../block/block.vue",
|
|
412
412
|
e
|
|
413
413
|
), e;
|
|
414
|
-
}), Tt = () => import("./blocks-wrapper.
|
|
414
|
+
}), Tt = () => import("./blocks-wrapper.77411b55.js").then((e) => e.default).catch((e) => {
|
|
415
415
|
throw console.error(
|
|
416
416
|
"Error while attempting to dynamically import component BlocksWrapper at ./blocks-wrapper.vue",
|
|
417
417
|
e
|
|
@@ -547,14 +547,14 @@ const C = "[Builder.io]: ", v = {
|
|
|
547
547
|
}) => U({
|
|
548
548
|
name: O(e),
|
|
549
549
|
canTrack: !0
|
|
550
|
-
}),
|
|
550
|
+
}), Gt = ({
|
|
551
551
|
contentId: e,
|
|
552
552
|
value: t
|
|
553
553
|
}) => W({
|
|
554
554
|
name: O(e),
|
|
555
555
|
value: t,
|
|
556
556
|
canTrack: !0
|
|
557
|
-
}), L = (e) => x(e.id) && x(e.variations) && Object.keys(e.variations).length > 0,
|
|
557
|
+
}), L = (e) => x(e.id) && x(e.variations) && Object.keys(e.variations).length > 0, Dt = ({
|
|
558
558
|
id: e,
|
|
559
559
|
variations: t
|
|
560
560
|
}) => {
|
|
@@ -568,8 +568,8 @@ const C = "[Builder.io]: ", v = {
|
|
|
568
568
|
}
|
|
569
569
|
return e;
|
|
570
570
|
}, K = (e) => {
|
|
571
|
-
const t =
|
|
572
|
-
return
|
|
571
|
+
const t = Dt(e);
|
|
572
|
+
return Gt({
|
|
573
573
|
contentId: e.id,
|
|
574
574
|
value: t
|
|
575
575
|
}).catch((n) => {
|
|
@@ -662,7 +662,7 @@ const j = "builder.", Yt = "options.", Zt = (e) => {
|
|
|
662
662
|
}, te = (e) => {
|
|
663
663
|
if (!e)
|
|
664
664
|
return {};
|
|
665
|
-
const t =
|
|
665
|
+
const t = G(e), n = {};
|
|
666
666
|
return Object.keys(t).forEach((o) => {
|
|
667
667
|
if (o.startsWith(j)) {
|
|
668
668
|
const r = o.replace(j, "").replace(Yt, "");
|
|
@@ -674,7 +674,7 @@ const j = "builder.", Yt = "options.", Zt = (e) => {
|
|
|
674
674
|
return {};
|
|
675
675
|
const e = new URLSearchParams(window.location.search);
|
|
676
676
|
return te(e);
|
|
677
|
-
},
|
|
677
|
+
}, G = (e) => e instanceof URLSearchParams ? Zt(e) : e, ne = "v3", E = (e) => {
|
|
678
678
|
const {
|
|
679
679
|
limit: t = 30,
|
|
680
680
|
userAttributes: n,
|
|
@@ -685,18 +685,18 @@ const j = "builder.", Yt = "options.", Zt = (e) => {
|
|
|
685
685
|
includeRefs: u = !0,
|
|
686
686
|
enrich: a,
|
|
687
687
|
locale: d,
|
|
688
|
-
apiVersion:
|
|
688
|
+
apiVersion: m = ne
|
|
689
689
|
} = e;
|
|
690
690
|
if (!i)
|
|
691
691
|
throw new Error("Missing API key");
|
|
692
|
-
if (!["v2", "v3"].includes(
|
|
693
|
-
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${
|
|
694
|
-
const p = new URL(`https://cdn.builder.io/api/${
|
|
692
|
+
if (!["v2", "v3"].includes(m))
|
|
693
|
+
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${m}'`);
|
|
694
|
+
const p = new URL(`https://cdn.builder.io/api/${m}/content/${s}?apiKey=${i}&limit=${t}&noTraverse=${r}&includeRefs=${u}${d ? `&locale=${d}` : ""}${a ? `&enrich=${a}` : ""}`), c = {
|
|
695
695
|
...ee(),
|
|
696
|
-
...
|
|
697
|
-
},
|
|
698
|
-
for (const l in
|
|
699
|
-
p.searchParams.set(l, String(
|
|
696
|
+
...G(e.options || {})
|
|
697
|
+
}, f = R(c);
|
|
698
|
+
for (const l in f)
|
|
699
|
+
p.searchParams.set(l, String(f[l]));
|
|
700
700
|
if (n && p.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
701
701
|
const l = R({
|
|
702
702
|
query: o
|
|
@@ -837,26 +837,26 @@ var de = function() {
|
|
|
837
837
|
...t.builderContext.localState,
|
|
838
838
|
...(s = (r = t.contentToUse) == null ? void 0 : r.data) == null ? void 0 : s.state
|
|
839
839
|
}, model: (i = t.symbol) == null ? void 0 : i.model, content: t.contentToUse } })], 1);
|
|
840
|
-
},
|
|
840
|
+
}, fe = [], me = /* @__PURE__ */ b(
|
|
841
841
|
ue,
|
|
842
842
|
de,
|
|
843
|
-
|
|
843
|
+
fe,
|
|
844
844
|
!1,
|
|
845
845
|
null,
|
|
846
846
|
null,
|
|
847
847
|
null,
|
|
848
848
|
null
|
|
849
849
|
);
|
|
850
|
-
const ln =
|
|
850
|
+
const ln = me.exports, pe = g({
|
|
851
851
|
name: "builder-text",
|
|
852
852
|
props: ["text"]
|
|
853
853
|
});
|
|
854
854
|
var he = function() {
|
|
855
855
|
var o;
|
|
856
856
|
var t = this, n = t._self._c;
|
|
857
|
-
return t._self._setupProxy, n("span", { staticClass: "builder-text", style: {
|
|
857
|
+
return t._self._setupProxy, n("span", t._b({ staticClass: "builder-text", style: {
|
|
858
858
|
outline: "none"
|
|
859
|
-
}, domProps: { innerHTML: t._s(((o = t.text) == null ? void 0 : o.toString()) || "") } });
|
|
859
|
+
}, domProps: { innerHTML: t._s(((o = t.text) == null ? void 0 : o.toString()) || "") } }, "span", {}, !1));
|
|
860
860
|
}, _e = [], ge = /* @__PURE__ */ b(
|
|
861
861
|
pe,
|
|
862
862
|
he,
|
|
@@ -961,14 +961,14 @@ function xe(e, t, n) {
|
|
|
961
961
|
}
|
|
962
962
|
return null;
|
|
963
963
|
}
|
|
964
|
-
const d = `builder.tests.${e}`,
|
|
965
|
-
if (
|
|
966
|
-
return
|
|
964
|
+
const d = `builder.tests.${e}`, m = a(d), p = t.map((l) => l.id).concat(e);
|
|
965
|
+
if (m && p.includes(m))
|
|
966
|
+
return m;
|
|
967
967
|
let c = 0;
|
|
968
|
-
const
|
|
968
|
+
const f = Math.random();
|
|
969
969
|
for (let l = 0; l < t.length; l++) {
|
|
970
970
|
const h = t[l], S = h.testRatio;
|
|
971
|
-
if (c += S,
|
|
971
|
+
if (c += S, f < c)
|
|
972
972
|
return u(d, h.id), h.id;
|
|
973
973
|
}
|
|
974
974
|
return u(d, e), e;
|
|
@@ -991,13 +991,13 @@ function we(e, t, n) {
|
|
|
991
991
|
if (!navigator.cookieEnabled)
|
|
992
992
|
return;
|
|
993
993
|
function o(d) {
|
|
994
|
-
const
|
|
994
|
+
const m = d + "=", p = document.cookie.split(";");
|
|
995
995
|
for (let c = 0; c < p.length; c++) {
|
|
996
|
-
let
|
|
997
|
-
for (;
|
|
998
|
-
|
|
999
|
-
if (
|
|
1000
|
-
return
|
|
996
|
+
let f = p[c];
|
|
997
|
+
for (; f.charAt(0) === " "; )
|
|
998
|
+
f = f.substring(1, f.length);
|
|
999
|
+
if (f.indexOf(m) === 0)
|
|
1000
|
+
return f.substring(m.length, f.length);
|
|
1001
1001
|
}
|
|
1002
1002
|
return null;
|
|
1003
1003
|
}
|
|
@@ -1011,28 +1011,28 @@ function we(e, t, n) {
|
|
|
1011
1011
|
return;
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
1014
|
-
const Ce = (e) => e === "react" || e === "reactNative",
|
|
1014
|
+
const Ce = (e) => e === "react" || e === "reactNative", D = Ce(w), H = "builderIoAbTest", J = "builderIoRenderContent", $e = () => {
|
|
1015
1015
|
const e = xe.toString().replace(/\s+/g, " "), t = we.toString().replace(/\s+/g, " ");
|
|
1016
1016
|
return `
|
|
1017
1017
|
window.${H} = ${e}
|
|
1018
1018
|
window.${J} = ${t}
|
|
1019
1019
|
`;
|
|
1020
1020
|
}, Te = (e, t) => `
|
|
1021
|
-
window.${H}("${t}",${JSON.stringify(e)}, ${
|
|
1021
|
+
window.${H}("${t}",${JSON.stringify(e)}, ${D})`, fn = ({
|
|
1022
1022
|
contentId: e,
|
|
1023
1023
|
variationId: t
|
|
1024
1024
|
}) => `
|
|
1025
|
-
window.${J}("${t}", "${e}", ${
|
|
1025
|
+
window.${J}("${t}", "${e}", ${D})`, Ie = () => import("./content.ecfd43b5.js").then((e) => e.default).catch((e) => {
|
|
1026
1026
|
throw console.error(
|
|
1027
1027
|
"Error while attempting to dynamically import component ContentComponent at ../content/content.vue",
|
|
1028
1028
|
e
|
|
1029
1029
|
), e;
|
|
1030
|
-
}), Re = () => import("./inlined-styles.
|
|
1030
|
+
}), Re = () => import("./inlined-styles.52264f08.js").then((e) => e.default).catch((e) => {
|
|
1031
1031
|
throw console.error(
|
|
1032
1032
|
"Error while attempting to dynamically import component InlinedStyles at ../inlined-styles.vue",
|
|
1033
1033
|
e
|
|
1034
1034
|
), e;
|
|
1035
|
-
}), Ve = () => import("./inlined-script.
|
|
1035
|
+
}), Ve = () => import("./inlined-script.43151e3b.js").then((e) => e.default).catch((e) => {
|
|
1036
1036
|
throw console.error(
|
|
1037
1037
|
"Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",
|
|
1038
1038
|
e
|
|
@@ -1066,8 +1066,6 @@ const Ce = (e) => e === "react" || e === "reactNative", G = Ce(w), H = "builderI
|
|
|
1066
1066
|
}),
|
|
1067
1067
|
getScriptString: $e,
|
|
1068
1068
|
getVariants: $,
|
|
1069
|
-
getDefaultCanTrack: I,
|
|
1070
|
-
handleABTestingSync: Ht,
|
|
1071
1069
|
TARGET: w
|
|
1072
1070
|
};
|
|
1073
1071
|
},
|
|
@@ -1087,6 +1085,16 @@ const Ce = (e) => e === "react" || e === "reactNative", G = Ce(w), H = "builderI
|
|
|
1087
1085
|
},
|
|
1088
1086
|
hideVariantsStyleString() {
|
|
1089
1087
|
return $(this.content).map((e) => `.variant-${e.testVariationId} { display: none; } `).join("");
|
|
1088
|
+
},
|
|
1089
|
+
defaultContent() {
|
|
1090
|
+
var e;
|
|
1091
|
+
return this.shouldRenderVariants ? {
|
|
1092
|
+
...this.content,
|
|
1093
|
+
testVariationId: (e = this.content) == null ? void 0 : e.id
|
|
1094
|
+
} : Ht({
|
|
1095
|
+
item: this.content,
|
|
1096
|
+
canTrack: I(this.canTrack)
|
|
1097
|
+
});
|
|
1090
1098
|
}
|
|
1091
1099
|
}
|
|
1092
1100
|
});
|
|
@@ -1095,10 +1103,7 @@ var Oe = function() {
|
|
|
1095
1103
|
var t = this, n = t._self._c;
|
|
1096
1104
|
return t._self._setupProxy, n("div", [!t.__isNestedRender && t.TARGET !== "reactNative" ? [n("inlined-script", { attrs: { scriptStr: t.getScriptString() } })] : t._e(), t.shouldRenderVariants ? [n("inlined-styles", { attrs: { id: `variants-styles-${(o = t.content) == null ? void 0 : o.id}`, styles: t.hideVariantsStyleString } }), n("inlined-script", { attrs: { scriptStr: t.variantScriptStr } }), t._l(t.getVariants(t.content), function(s, i) {
|
|
1097
1105
|
return n("content-component", { key: s.testVariationId, attrs: { content: s, showContent: !1, classNameProp: void 0, model: t.model, data: t.data, context: t.context, apiKey: t.apiKey, apiVersion: t.apiVersion, customComponents: t.customComponents, canTrack: t.canTrack, locale: t.locale, includeRefs: t.includeRefs, enrich: t.enrich, isSsrAbTest: t.shouldRenderVariants } });
|
|
1098
|
-
})] : t._e(), n("content-component", t._b({ attrs: { content: t.
|
|
1099
|
-
item: t.content,
|
|
1100
|
-
canTrack: t.getDefaultCanTrack(t.canTrack)
|
|
1101
|
-
}), classNameProp: `variant-${(r = t.content) == null ? void 0 : r.id}`, showContent: !0, model: t.model, data: t.data, context: t.context, apiKey: t.apiKey, apiVersion: t.apiVersion, customComponents: t.customComponents, canTrack: t.canTrack, locale: t.locale, includeRefs: t.includeRefs, enrich: t.enrich, isSsrAbTest: t.shouldRenderVariants } }, "content-component", {
|
|
1106
|
+
})] : t._e(), n("content-component", t._b({ attrs: { content: t.defaultContent, classNameProp: `variant-${(r = t.content) == null ? void 0 : r.id}`, showContent: !0, model: t.model, data: t.data, context: t.context, apiKey: t.apiKey, apiVersion: t.apiVersion, customComponents: t.customComponents, canTrack: t.canTrack, locale: t.locale, includeRefs: t.includeRefs, enrich: t.enrich, isSsrAbTest: t.shouldRenderVariants } }, "content-component", {
|
|
1102
1107
|
key: t.shouldRenderVariants.toString()
|
|
1103
1108
|
}, !1))], 2);
|
|
1104
1109
|
}, Ee = [], Pe = /* @__PURE__ */ b(
|
|
@@ -1121,7 +1126,7 @@ function Ne() {
|
|
|
1121
1126
|
function X() {
|
|
1122
1127
|
return Ne() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
1123
1128
|
}
|
|
1124
|
-
function
|
|
1129
|
+
function mn() {
|
|
1125
1130
|
return !y() || X() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1126
1131
|
}
|
|
1127
1132
|
const pn = [], hn = (e) => ({
|
|
@@ -1213,7 +1218,7 @@ const Q = "builderSessionId", We = async ({
|
|
|
1213
1218
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1214
1219
|
return;
|
|
1215
1220
|
}
|
|
1216
|
-
},
|
|
1221
|
+
}, Ge = ({
|
|
1217
1222
|
key: e,
|
|
1218
1223
|
canTrack: t,
|
|
1219
1224
|
value: n
|
|
@@ -1224,7 +1229,7 @@ const Q = "builderSessionId", We = async ({
|
|
|
1224
1229
|
} catch (r) {
|
|
1225
1230
|
console.debug("[LocalStorage] SET error: ", r);
|
|
1226
1231
|
}
|
|
1227
|
-
}, Z = "builderVisitorId",
|
|
1232
|
+
}, Z = "builderVisitorId", De = ({
|
|
1228
1233
|
canTrack: e
|
|
1229
1234
|
}) => {
|
|
1230
1235
|
if (!e)
|
|
@@ -1245,7 +1250,7 @@ const Q = "builderSessionId", We = async ({
|
|
|
1245
1250
|
}, He = () => q(), Je = ({
|
|
1246
1251
|
id: e,
|
|
1247
1252
|
canTrack: t
|
|
1248
|
-
}) =>
|
|
1253
|
+
}) => Ge({
|
|
1249
1254
|
key: Z,
|
|
1250
1255
|
value: e,
|
|
1251
1256
|
canTrack: t
|
|
@@ -1291,7 +1296,7 @@ const Q = "builderSessionId", We = async ({
|
|
|
1291
1296
|
};
|
|
1292
1297
|
const t = await We({
|
|
1293
1298
|
canTrack: e
|
|
1294
|
-
}), n =
|
|
1299
|
+
}), n = De({
|
|
1295
1300
|
canTrack: e
|
|
1296
1301
|
});
|
|
1297
1302
|
return {
|
|
@@ -1363,13 +1368,13 @@ export {
|
|
|
1363
1368
|
rt as g,
|
|
1364
1369
|
un as h,
|
|
1365
1370
|
y as i,
|
|
1366
|
-
|
|
1371
|
+
fn as j,
|
|
1367
1372
|
pn as k,
|
|
1368
1373
|
v as l,
|
|
1369
1374
|
wt as m,
|
|
1370
1375
|
b as n,
|
|
1371
1376
|
kt as o,
|
|
1372
|
-
|
|
1377
|
+
mn as p,
|
|
1373
1378
|
re as q,
|
|
1374
1379
|
gn as r,
|
|
1375
1380
|
_n as s,
|