@builder.io/sdk-vue 0.0.6 → 0.0.7
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.14e01ebb.cjs +1 -0
- package/packages/_vue2/dist/block-styles.4a6d4454.js +64 -0
- package/packages/_vue2/dist/{get-processed-block.4223e014.cjs → get-processed-block.60a0851d.cjs} +1 -1
- package/packages/{_vue3/dist/get-processed-block.7e239fa3.js → _vue2/dist/get-processed-block.a1509eaa.js} +1 -1
- package/packages/_vue2/dist/{index.53f5b352.js → index.12321644.js} +518 -346
- package/packages/_vue2/dist/index.2202f0aa.cjs +29 -0
- package/packages/_vue2/dist/{render-block.678a49f8.js → render-block.478d4b37.js} +55 -37
- package/packages/_vue2/dist/render-block.51134fca.cjs +3 -0
- package/packages/_vue2/dist/{render-component-with-context.8748d30c.js → render-component-with-context.4a307a33.js} +2 -2
- package/packages/_vue2/dist/{render-component-with-context.861efce7.cjs → render-component-with-context.e823d5d7.cjs} +1 -1
- package/packages/_vue2/dist/{render-component.58bf4a92.js → render-component.1c886638.js} +3 -3
- package/packages/_vue2/dist/{render-component.bad35496.cjs → render-component.fe614b72.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.46673ba6.js → render-inlined-styles.976a3c9e.js} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.8e95d025.cjs → render-inlined-styles.e5b335e1.cjs} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.e52f9726.cjs → render-repeated-block.b11f76de.cjs} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.84bef64c.js → render-repeated-block.c2bc657c.js} +2 -2
- package/packages/_vue2/dist/{render-styles.6854b22c.cjs → render-styles.a0f5973e.cjs} +1 -1
- package/packages/_vue2/dist/{render-styles.230dc75f.js → render-styles.c1e07776.js} +2 -2
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +10 -10
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +43 -0
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +2 -1
- package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +2 -0
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +1 -0
- package/packages/_vue2/dist/src/functions/get-block-properties.d.ts +1 -4
- package/packages/_vue2/dist/src/functions/get-react-native-block-styles.d.ts +2 -1
- package/packages/_vue2/dist/src/functions/transform-block-properties.d.ts +2 -0
- package/packages/_vue2/dist/src/helpers/css.d.ts +2 -0
- package/packages/_vue2/dist/src/types/builder-block.d.ts +1 -0
- package/packages/_vue2/dist/src/types/builder-content.d.ts +6 -4
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/block-styles.3f38d23f.cjs +1 -0
- package/packages/_vue3/dist/block-styles.9c18985e.js +61 -0
- package/packages/_vue3/dist/{get-processed-block.a58dcd2a.cjs → get-processed-block.00348c25.cjs} +1 -1
- package/packages/{_vue2/dist/get-processed-block.6408e235.js → _vue3/dist/get-processed-block.391579db.js} +1 -1
- package/packages/_vue3/dist/index.4580bfec.cjs +29 -0
- package/packages/_vue3/dist/{index.0555f850.js → index.8f01d2e4.js} +606 -428
- package/packages/_vue3/dist/{render-block.ff327bfe.js → render-block.66d690e4.js} +70 -52
- package/packages/_vue3/dist/render-block.f390e85d.cjs +3 -0
- package/packages/_vue3/dist/{render-component-with-context.e2af488c.js → render-component-with-context.3e80acf8.js} +2 -2
- package/packages/_vue3/dist/{render-component-with-context.fa9ac131.cjs → render-component-with-context.fb32b5d3.cjs} +1 -1
- package/packages/_vue3/dist/{render-component.afe8b68d.cjs → render-component.1b155226.cjs} +1 -1
- package/packages/_vue3/dist/{render-component.91b2554d.js → render-component.68197847.js} +3 -3
- package/packages/_vue3/dist/{render-inlined-styles.dc872311.cjs → render-inlined-styles.74308f98.cjs} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.5f9ef611.js → render-inlined-styles.fdbe3458.js} +1 -1
- package/packages/_vue3/dist/{render-repeated-block.34c4784f.js → render-repeated-block.b17a78c3.js} +2 -2
- package/packages/_vue3/dist/{render-repeated-block.f087a519.cjs → render-repeated-block.c53825f5.cjs} +1 -1
- package/packages/_vue3/dist/{render-styles.ce553bd8.js → render-styles.05b9373e.js} +2 -2
- package/packages/_vue3/dist/{render-styles.52fba546.cjs → render-styles.b2290f3c.cjs} +1 -1
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +9 -9
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +43 -0
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +2 -1
- package/packages/_vue3/dist/src/components/render-block/render-component.vue.d.ts +2 -0
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +1 -0
- package/packages/_vue3/dist/src/functions/get-block-properties.d.ts +1 -4
- package/packages/_vue3/dist/src/functions/get-react-native-block-styles.d.ts +2 -1
- package/packages/_vue3/dist/src/functions/transform-block-properties.d.ts +2 -0
- package/packages/_vue3/dist/src/helpers/css.d.ts +2 -0
- package/packages/_vue3/dist/src/types/builder-block.d.ts +1 -0
- package/packages/_vue3/dist/src/types/builder-content.d.ts +6 -4
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.446ece03.js +0 -117
- package/packages/_vue2/dist/block-styles.5646ff86.cjs +0 -6
- package/packages/_vue2/dist/index.a1d3ffcd.cjs +0 -4
- package/packages/_vue2/dist/render-block.5d72c0ee.cjs +0 -3
- package/packages/_vue3/dist/block-styles.bfb6bf01.js +0 -114
- package/packages/_vue3/dist/block-styles.c34bd502.cjs +0 -6
- package/packages/_vue3/dist/index.2e65c08f.cjs +0 -4
- package/packages/_vue3/dist/render-block.c7f89c03.cjs +0 -3
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { f, T as x, n as y } from "./index.53f5b352.js";
|
|
2
|
-
import { g as S } from "./get-processed-block.6408e235.js";
|
|
3
|
-
const m = {
|
|
4
|
-
small: {
|
|
5
|
-
min: 320,
|
|
6
|
-
default: 321,
|
|
7
|
-
max: 640
|
|
8
|
-
},
|
|
9
|
-
medium: {
|
|
10
|
-
min: 641,
|
|
11
|
-
default: 642,
|
|
12
|
-
max: 991
|
|
13
|
-
},
|
|
14
|
-
large: {
|
|
15
|
-
min: 990,
|
|
16
|
-
default: 991,
|
|
17
|
-
max: 1200
|
|
18
|
-
}
|
|
19
|
-
}, i = (e, t = m) => `@media (max-width: ${t[e].max}px)`, h = ({ small: e, medium: t }) => {
|
|
20
|
-
const s = f(m);
|
|
21
|
-
if (!e || !t)
|
|
22
|
-
return s;
|
|
23
|
-
const n = Math.floor(e / 2);
|
|
24
|
-
s.small = {
|
|
25
|
-
max: e,
|
|
26
|
-
min: n,
|
|
27
|
-
default: n + 1
|
|
28
|
-
};
|
|
29
|
-
const o = s.small.max + 1;
|
|
30
|
-
s.medium = {
|
|
31
|
-
max: t,
|
|
32
|
-
min: o,
|
|
33
|
-
default: o + 1
|
|
34
|
-
};
|
|
35
|
-
const a = s.medium.max + 1;
|
|
36
|
-
return s.large = {
|
|
37
|
-
max: 2e3,
|
|
38
|
-
min: a,
|
|
39
|
-
default: a + 1
|
|
40
|
-
}, s;
|
|
41
|
-
}, _ = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), g = (e) => Object.entries(e).map(([s, n]) => {
|
|
42
|
-
if (typeof n == "string")
|
|
43
|
-
return `${_(s)}: ${n};`;
|
|
44
|
-
}).join(`
|
|
45
|
-
`), r = ({
|
|
46
|
-
mediaQuery: e,
|
|
47
|
-
className: t,
|
|
48
|
-
styles: s
|
|
49
|
-
}) => {
|
|
50
|
-
const n = `.${t} {
|
|
51
|
-
${g(s)}
|
|
52
|
-
}`;
|
|
53
|
-
return e ? `${e} {
|
|
54
|
-
${n}
|
|
55
|
-
}` : n;
|
|
56
|
-
}, k = () => import("./render-inlined-styles.46673ba6.js").then((e) => e.default).catch((e) => {
|
|
57
|
-
throw console.error(
|
|
58
|
-
"Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",
|
|
59
|
-
e
|
|
60
|
-
), e;
|
|
61
|
-
}), C = {
|
|
62
|
-
name: "block-styles",
|
|
63
|
-
components: { RenderInlinedStyles: k },
|
|
64
|
-
props: ["block", "context"],
|
|
65
|
-
data: () => ({ TARGET: x }),
|
|
66
|
-
computed: {
|
|
67
|
-
useBlock() {
|
|
68
|
-
return S({
|
|
69
|
-
block: this.block,
|
|
70
|
-
state: this.context.state,
|
|
71
|
-
context: this.context.context,
|
|
72
|
-
shouldEvaluateBindings: !0
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
css() {
|
|
76
|
-
var c;
|
|
77
|
-
const e = this.useBlock.responsiveStyles, t = this.context.content, s = h(
|
|
78
|
-
((c = t == null ? void 0 : t.meta) == null ? void 0 : c.breakpoints) || {}
|
|
79
|
-
), n = e == null ? void 0 : e.large, o = e == null ? void 0 : e.medium, a = e == null ? void 0 : e.small, l = this.useBlock.id, d = n ? r({
|
|
80
|
-
className: l,
|
|
81
|
-
styles: n
|
|
82
|
-
}) : "", u = o ? r({
|
|
83
|
-
className: l,
|
|
84
|
-
styles: o,
|
|
85
|
-
mediaQuery: i(
|
|
86
|
-
"medium",
|
|
87
|
-
s
|
|
88
|
-
)
|
|
89
|
-
}) : "", p = a ? r({
|
|
90
|
-
className: l,
|
|
91
|
-
styles: a,
|
|
92
|
-
mediaQuery: i(
|
|
93
|
-
"small",
|
|
94
|
-
s
|
|
95
|
-
)
|
|
96
|
-
}) : "";
|
|
97
|
-
return [d, u, p].join(" ");
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
var b = function() {
|
|
102
|
-
var t = this, s = t._self._c;
|
|
103
|
-
return t.TARGET !== "reactNative" && t.css ? s("render-inlined-styles", { attrs: { styles: t.css } }) : t._e();
|
|
104
|
-
}, v = [], $ = /* @__PURE__ */ y(
|
|
105
|
-
C,
|
|
106
|
-
b,
|
|
107
|
-
v,
|
|
108
|
-
!1,
|
|
109
|
-
null,
|
|
110
|
-
null,
|
|
111
|
-
null,
|
|
112
|
-
null
|
|
113
|
-
);
|
|
114
|
-
const M = $.exports;
|
|
115
|
-
export {
|
|
116
|
-
M as default
|
|
117
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index.a1d3ffcd.cjs"),x=require("./get-processed-block.4223e014.cjs"),d={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},m=(e,t=d)=>`@media (max-width: ${t[e].max}px)`,y=({small:e,medium:t})=>{const s=c.fastClone(d);if(!e||!t)return s;const n=Math.floor(e/2);s.small={max:e,min:n,default:n+1};const o=s.small.max+1;s.medium={max:t,min:o,default:o+1};const l=s.medium.max+1;return s.large={max:2e3,min:l,default:l+1},s},S=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),g=e=>Object.entries(e).map(([s,n])=>{if(typeof n=="string")return`${S(s)}: ${n};`}).join(`
|
|
2
|
-
`),a=({mediaQuery:e,className:t,styles:s})=>{const n=`.${t} {
|
|
3
|
-
${g(s)}
|
|
4
|
-
}`;return e?`${e} {
|
|
5
|
-
${n}
|
|
6
|
-
}`:n},h=()=>Promise.resolve().then(()=>require("./render-inlined-styles.8e95d025.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",e),e}),_={name:"block-styles",components:{RenderInlinedStyles:h},props:["block","context"],data:()=>({TARGET:c.TARGET}),computed:{useBlock(){return x.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!0})},css(){var i;const e=this.useBlock.responsiveStyles,t=this.context.content,s=y(((i=t==null?void 0:t.meta)==null?void 0:i.breakpoints)||{}),n=e==null?void 0:e.large,o=e==null?void 0:e.medium,l=e==null?void 0:e.small,r=this.useBlock.id,u=n?a({className:r,styles:n}):"",p=o?a({className:r,styles:o,mediaQuery:m("medium",s)}):"",f=l?a({className:r,styles:l,mediaQuery:m("small",s)}):"";return[u,p,f].join(" ")}}};var k=function(){var t=this,s=t._self._c;return t.TARGET!=="reactNative"&&t.css?s("render-inlined-styles",{attrs:{styles:t.css}}):t._e()},b=[],v=c.normalizeComponent(_,k,b,!1,null,null,null,null);const C=v.exports;exports.default=C;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";function ce(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const v="vue2";function m(){return typeof window<"u"&&typeof document<"u"}const $={};function A(t,e){let n=$[t];if(n||(n=$[t]=[]),n.push(e),m()){const o={type:"builder.register",data:{type:t,info:e}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(s){console.debug("Could not postmessage",s)}}}const le=()=>{A("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let E=!1;const de=(t={})=>{var e,n;E||(E=!0,m()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:v,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:t}},"*"),window.addEventListener("message",({data:o})=>{var s,r;if(!!(o!=null&&o.type))switch(o.type){case"builder.evaluate":{const i=o.data.text,c=o.data.arguments||[],a=o.data.id,d=new Function(i);let u,f=null;try{u=d.apply(null,c)}catch(l){f=l}f?(s=window.parent)==null||s.postMessage({type:"builder.evaluateError",data:{id:a,error:f.message}},"*"):u&&typeof u.then=="function"?u.then(l=>{var g;(g=window.parent)==null||g.postMessage({type:"builder.evaluateResult",data:{id:a,result:l}},"*")}).catch(console.error):(r=window.parent)==null||r.postMessage({type:"builder.evaluateResult",data:{result:u,id:a}},"*");break}}})))},ue=()=>Promise.resolve().then(()=>ae).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",t),t}),pe={name:"builder-columns",components:{RenderBlocks:ue},props:["space","columns","stackColumnsAt","reverseColumnsWhenStacked","builderBlock"],computed:{columnsCssVars(){const t=this.stackColumnsAt==="never"?"inherit":this.reverseColumnsWhenStacked?"column-reverse":"column";return{"--flex-dir":t,"--flex-dir-tablet":this.maybeApplyForTablet(t)}},columnCssVars(){const t="100%",e="0";return{"--column-width":t,"--column-margin-left":e,"--column-width-tablet":this.maybeApplyForTablet(t),"--column-margin-left-tablet":this.maybeApplyForTablet(e)}}},methods:{getGutterSize(){return typeof this.space=="number"?this.space||0:20},getColumns(){return this.columns||[]},getWidth(t){var n;const e=this.getColumns();return((n=e[t])==null?void 0:n.width)||100/e.length},getColumnCssWidth(t){const e=this.getColumns(),o=this.getGutterSize()*(e.length-1)/e.length;return`calc(${this.getWidth(t)}% - ${o}px)`},maybeApplyForTablet(t){return(this.stackColumnsAt||"tablet")==="tablet"?t:"inherit"}}};function p(t,e,n,o,s,r,i,c){var a=typeof t=="function"?t.options:t;e&&(a.render=e,a.staticRenderFns=n,a._compiled=!0),o&&(a.functional=!0),r&&(a._scopeId="data-v-"+r);var d;if(i?(d=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),s&&s.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(i)},a._ssrRegister=d):s&&(d=c?function(){s.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:s),d)if(a.functional){a._injectStyles=d;var u=a.render;a.render=function(g,T){return d.call(T),u(g,T)}}else{var f=a.beforeCreate;a.beforeCreate=f?[].concat(f,d):[d]}return{exports:t,options:a}}var me=function(){var e=this,n=e._self._c;return n("div",{staticClass:"builder-columns div-2flfunvabst",style:e.columnsCssVars},e._l(e.columns,function(o,s){return n("div",{key:s,staticClass:"builder-column div-2flfunvabst-2",style:{width:e.getColumnCssWidth(s),marginLeft:`${s===0?0:e.getGutterSize()}px`,...e.columnCssVars}},[n("render-blocks",{attrs:{blocks:o.blocks,path:`component.options.columns.${s}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"}}})],1)}),0)},fe=[],he=p(pe,me,fe,!1,null,"badfc4c5",null,null);const O=he.exports;function F(t){return t.replace(/http(s)?:/,"")}function ge(t="",e,n){const o=new RegExp("([?&])"+e+"=.*?(&|$)","i"),s=t.indexOf("?")!==-1?"&":"?";return t.match(o)?t.replace(o,"$1"+e+"="+encodeURIComponent(n)+"$2"):t+s+e+"="+encodeURIComponent(n)}function be(t,e){if(!t||!(t!=null&&t.match(/cdn\.shopify\.com/))||!e)return t;if(e==="master")return F(t);const n=t.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=t.split(n[0]),s=n[3],r=e.match("x")?e:`${e}x`;return F(`${o[0]}_${r}${s}`)}return null}function _(t){if(!t)return t;const e=[100,200,400,800,1200,1600,2e3];if(t.match(/builder\.io/)){let n=t;const o=Number(t.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),e.filter(s=>s!==o).map(s=>`${ge(t,"width",s)} ${s}w`).concat([n]).join(", ")}return t.match(/cdn\.shopify\.com/)?e.map(n=>[be(t,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([t]).join(", "):t}const ve={name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var n;const e=this.image||this.src;if(!e||!(e.match(/builder\.io/)||e.match(/cdn\.shopify\.com/)))return this.srcset;if(this.srcset&&((n=this.image)==null?void 0:n.includes("builder.io/api/v1/image"))){if(!this.srcset.includes(this.image.split("?")[0]))return console.debug("Removed given srcset"),_(e)}else if(this.image&&!this.srcset)return _(e);return _(e)},webpSrcSet(){var t;return((t=this.srcSetToUse)==null?void 0:t.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const t={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?t:void 0}},methods:{_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}};var ye=function(){var o,s,r,i;var e=this,n=e._self._c;return n("div",[n("picture",[e.webpSrcSet?[n("source",{attrs:{type:"image/webp",srcset:e.webpSrcSet}})]:e._e(),n("img",{class:e._classStringToObject("builder-image"+(e.className?" "+e.className:"")+" img-1j57pcfa436"),style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...e.aspectRatioCss},attrs:{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,src:e.image,srcset:e.srcSetToUse,sizes:e.sizes}}),n("source",{attrs:{srcset:e.srcSetToUse}})],2),e.aspectRatio&&!(((s=(o=e.builderBlock)==null?void 0:o.children)==null?void 0:s.length)&&e.fitContent)?[n("div",{staticClass:"builder-image-sizer div-1j57pcfa436",style:{paddingTop:e.aspectRatio*100+"%"}})]:e._e(),((i=(r=e.builderBlock)==null?void 0:r.children)==null?void 0:i.length)&&e.fitContent?[e._t("default")]:e._e(),!e.fitContent&&e.children?[n("div",{staticClass:"div-1j57pcfa436-2"},[e._t("default")],2)]:e._e()],2)},_e=[],xe=p(ve,ye,_e,!1,null,"1e1c2091",null,null);const V=xe.exports,Ce={name:"builder-text",props:["text"]};var we=function(){var e=this,n=e._self._c;return n("span",{staticClass:"builder-text",domProps:{innerHTML:e._s(e.text)}})},ke=[],Se=p(Ce,we,ke,!1,null,null,null,null);const B=Se.exports,Ie={name:"builder-video",props:["autoPlay","muted","controls","loop","playsInline","attributes","fit","position","video","posterImage"],computed:{videoProps(){return{...this.autoPlay===!0?{autoPlay:!0}:{},...this.muted===!0?{muted:!0}:{},...this.controls===!0?{controls:!0}:{},...this.loop===!0?{loop:!0}:{},...this.playsInline===!0?{playsInline:!0}:{}}},spreadProps(){return{...this.attributes,...this.videoProps}}}};var Re=function(){var o;var e=this,n=e._self._c;return n("video",e._b({style:{width:"100%",height:"100%",...(o=e.attributes)==null?void 0:o.style,objectFit:e.fit,objectPosition:e.position,borderRadius:1},attrs:{src:e.video||"no-src",poster:e.posterImage}},"video",e.spreadProps,!1))},Te=[],$e=p(Ie,Re,Te,!1,null,null,null,null);const W=$e.exports;function x(t,e=null,n="."){return Object.keys(t).reduce((o,s)=>{const r=t[s],i=[e,s].filter(Boolean).join(n);return[typeof r=="object",r!==null,!(Array.isArray(r)&&r.length===0)].every(Boolean)?{...o,...x(r,i,n)}:{...o,[i]:r}},{})}const P="builder.",Ee="options.",L=t=>{const e={};return t.forEach((n,o)=>{e[o]=n}),e},N=t=>{if(!t)return{};const e=k(t),n={};return Object.keys(e).forEach(o=>{if(o.startsWith(P)){const s=o.replace(P,"").replace(Ee,"");n[s]=e[o]}}),n},M=()=>{if(!m())return{};const t=new URLSearchParams(window.location.search);return N(t)},k=t=>t instanceof URLSearchParams?L(t):t;function Fe(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:null}async function H(){const t=Fe().fetch;if(typeof t>"u"&&typeof global<"u"){const e=Promise.resolve().then(()=>ce(require("node-fetch"))).then(n=>n.default);return e.default||e}return t.default||t}const Pe=t=>{const e=t.split(".");return e.length>2?e.slice(1).join("."):t},K=async({name:t,canTrack:e})=>{var n;try{return e?(n=document.cookie.split("; ").find(o=>o.startsWith(`${t}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){console.debug("[COOKIE] GET error: ",o)}},je=t=>t.map(([e,n])=>n?`${e}=${n}`:e).join("; "),Ue=[["secure",""],["SameSite","None"]],Ae=({name:t,value:e,expires:n})=>{const s=(m()?location.protocol==="https:":!0)?Ue:[[]],r=n?[["expires",n.toUTCString()]]:[[]],i=[[t,e],...r,["path","/"],["domain",Pe(window.location.hostname)],...s];return je(i)},q=async({name:t,value:e,expires:n,canTrack:o})=>{try{if(!o)return;const s=Ae({name:t,value:e,expires:n});document.cookie=s}catch(s){console.warn("[COOKIE] SET error: ",s)}},Oe="builderio.variations",z=t=>`${Oe}.${t}`,Ve=({contentId:t,canTrack:e})=>K({name:z(t),canTrack:e}),Be=({contentId:t,canTrack:e,value:n})=>q({name:z(t),value:n,canTrack:e}),b=t=>t!=null,We=t=>b(t.id)&&b(t.variations)&&Object.keys(t.variations).length>0,Le=({id:t,variations:e})=>{var s;let n=0;const o=Math.random();for(const r in e)if(n+=(s=e[r])==null?void 0:s.testRatio,o<n)return r;return t},j=({item:t,testGroupId:e})=>{const n=t.variations[e];return e===t.id||!n?{testVariationId:t.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===t.id?"Default":"")}},Ne=async({item:t,canTrack:e})=>{const n=await Ve({canTrack:e,contentId:t.id}),o=n?j({item:t,testGroupId:n}):void 0;if(o)return o;{const s=Le({variations:t.variations,id:t.id});return Be({contentId:t.id,value:s,canTrack:e}).catch(r=>{console.error("could not store A/B test variation: ",r)}),j({item:t,testGroupId:s})}},Me=async({item:t,canTrack:e})=>{if(!We(t))return;const n=await Ne({item:t,canTrack:e});Object.assign(t,n)};async function S(t){return(await G({...t,limit:1})).results[0]||null}const D=t=>{const{limit:e=30,userAttributes:n,query:o,noTraverse:s=!1,model:r,apiKey:i,includeRefs:c=!0,locale:a}=t;if(!i)throw new Error("Missing API key");const d=new URL(`https://cdn.builder.io/api/v2/content/${r}?apiKey=${i}&limit=${e}&noTraverse=${s}&includeRefs=${c}${a?`&locale=${a}`:""}`),u={...M(),...k(t.options||{})},f=x(u);for(const l in f)d.searchParams.set(l,String(f[l]));if(n&&d.searchParams.set("userAttributes",JSON.stringify(n)),o){const l=x({query:o});for(const g in l)d.searchParams.set(g,JSON.stringify(l[g]))}return d};async function G(t){const e=D(t),o=await(await H())(e.href).then(r=>r.json()),s=t.canTrack!==!1;if(s&&Array.isArray(o.results))for(const r of o.results)await Me({item:r,canTrack:s});return o}const He=()=>Promise.resolve().then(()=>on).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",t),t}),Ke={name:"builder-symbol",components:{RenderContent:He},props:["symbol","attributes"],data:()=>({className:"builder-symbol",fetchedContent:null}),inject:{builderContext:"BuilderContext"},watch:{onUpdateHook0(){const t=this.symbol;t&&!t.content&&!this.fetchedContent&&t.model&&S({model:t.model,apiKey:this.builderContext.apiKey,query:{id:t.entry}}).then(e=>{this.fetchedContent=e})}},computed:{contentToUse(){var t;return((t=this.symbol)==null?void 0:t.content)||this.fetchedContent},onUpdateHook0(){return{0:this.symbol,1:this.fetchedContent}}},methods:{_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}};var qe=function(){var o,s,r,i,c;var e=this,n=e._self._c;return n("div",e._b({class:e._classStringToObject(e.className),attrs:{dataSet:{class:e.className}}},"div",e.attributes,!1),[n("render-content",{attrs:{apiKey:e.builderContext.apiKey,context:e.builderContext.context,customComponents:Object.values(e.builderContext.registeredComponents),data:{...(o=e.symbol)==null?void 0:o.data,...e.builderContext.state,...(i=(r=(s=e.symbol)==null?void 0:s.content)==null?void 0:r.data)==null?void 0:i.state},model:(c=e.symbol)==null?void 0:c.model,content:e.contentToUse}})],1)},ze=[],De=p(Ke,qe,ze,!1,null,null,null,null);const J=De.exports,Ge={name:"builder-button",props:["attributes","text","link","openLinkInNewTab"]};var Je=function(){var e=this,n=e._self._c;return e.link?n("a",e._b({attrs:{role:"button",href:e.link,target:e.openLinkInNewTab?"_blank":void 0}},"a",e.attributes,!1),[e._v(" "+e._s(e.text)+" ")]):n("button",e._b({staticClass:"button-2brhoa1k8gd"},"button",e.attributes,!1),[e._v(" "+e._s(e.text)+" ")])},Xe=[],Ye=p(Ge,Je,Xe,!1,null,"1a3d5b35",null,null);const X=Ye.exports,Qe={name:"builder-section-component",props:["attributes","maxWidth"]};var Ze=function(){var e=this,n=e._self._c;return n("section",e._b({style:e.maxWidth&&typeof e.maxWidth=="number"?{maxWidth:e.maxWidth}:void 0},"section",e.attributes,!1),[e._t("default")],2)},et=[],tt=p(Qe,Ze,et,!1,null,null,null,null);const Y=tt.exports,nt={name:"builder-fragment-component",props:[]};var ot=function(){var e=this,n=e._self._c;return n("span",[e._t("default")],2)},st=[],rt=p(nt,ot,st,!1,null,null,null,null);const Q=rt.exports,it={name:"Core:Button",builtIn:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},y=t=>{const e=t.toString().trim();return`return (${!e.startsWith("function")&&!e.startsWith("(")?"function ":""}${e}).apply(this, arguments)`},at={name:"Columns",builtIn:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:y(t=>{function e(){n.forEach(o=>{o.delete("width")})}const n=t.get("columns");Array.isArray(n)&&!!n.find(s=>s.get("width"))&&(!!n.find(r=>!r.get("width"))||n.reduce((c,a)=>c+a.get("width"),0)!==100)&&e()})},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},ct={name:"Fragment",static:!0,hidden:!0,builtIn:!0,canHaveChildren:!0,noWrap:!0},lt={name:"Image",static:!0,builtIn:!0,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",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",onChange:y(t=>{t.delete("srcset"),t.delete("noWebp");function n(i,c=6e4){return new Promise((a,d)=>{const u=document.createElement("img");let f=!1;u.onload=()=>{f=!0,a(u)},u.addEventListener("error",l=>{console.warn("Image load failed",l.error),d(l.error)}),u.src=i,setTimeout(()=>{f||d(new Error("Image load timed out"))},c)})}function o(i){return Math.round(i*1e3)/1e3}const s=t.get("image"),r=t.get("aspectRatio");if(fetch(s).then(i=>i.blob()).then(i=>{i.type.includes("svg")&&t.set("noWebp",!0)}),s&&(!r||r===.7041))return n(s).then(i=>{const c=t.get("aspectRatio");t.get("image")===s&&(!c||c===.7041)&&i.width&&i.height&&(t.set("aspectRatio",o(i.height/i.width)),t.set("height",i.height),t.set("width",i.width))})})},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},dt={name:"Core:Section",static:!0,builtIn:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},ut={name:"Symbol",noWrap:!0,static:!0,builtIn:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},pt={name:"Text",static:!0,builtIn:!0,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",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}},mt={name:"Video",canHaveChildren:!0,builtIn:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},ft={name:"Embed",static:!0,builtIn:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:y(t=>{const e=t.get("url");if(e)return t.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${e}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{t.get("url")===e&&(o.html?t.set("content",o.html):t.set("content","Invalid url, please try another"))}).catch(o=>{t.set("content","There was an error embedding this URL, please try again or another URL")});t.delete("content")})},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},ht=["text/javascript","application/javascript","application/ecmascript"],gt=t=>ht.includes(t.type),bt={name:"builder-embed",props:["content"],data:()=>({scriptsInserted:[],scriptsRun:[],ranInitFn:!1}),watch:{onUpdateHook0(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())}},computed:{onUpdateHook0(){return{0:this.$refs.elem,1:this.ranInitFn}}},methods:{findAndRunScripts(){if(!this.$refs.elem||!this.$refs.elem.getElementsByTagName)return;const t=this.$refs.elem.getElementsByTagName("script");for(let e=0;e<t.length;e++){const n=t[e];if(n.src&&!this.scriptsInserted.includes(n.src)){this.scriptsInserted.push(n.src);const o=document.createElement("script");o.async=!0,o.src=n.src,document.head.appendChild(o)}else if(gt(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(o){console.warn("`Embed`: Error running script:",o)}}}}};var vt=function(){var e=this,n=e._self._c;return n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:e._s(e.content)}})},yt=[],_t=p(bt,vt,yt,!1,null,null,null,null);const xt=_t.exports;function Ct(){return m()&&window.self!==window.top}function h(){return Ct()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const wt={name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data:()=>({isEditing:h})};var kt=function(){var e=this,n=e._self._c;return n("img",e._b({key:e.isEditing()&&e.imgSrc||"default-key",style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},attrs:{alt:e.altText,src:e.imgSrc||e.image}},"img",e.attributes,!1))},St=[],It=p(wt,kt,St,!1,null,null,null,null);const Rt=It.exports,Tt={name:"Raw:Img",hideFromInsertMenu:!0,builtIn:!0,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",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg"],required:!0}],noWrap:!0,static:!0},$t={name:"builder-custom-code",props:["replaceNodes","code"],data:()=>({scriptsInserted:[],scriptsRun:[]}),mounted(){this.findAndRunScripts()},methods:{findAndRunScripts(){if(this.$refs.elem&&this.$refs.elem.getElementsByTagName&&typeof window<"u"){const t=this.$refs.elem.getElementsByTagName("script");for(let e=0;e<t.length;e++){const n=t[e];if(n.src){if(this.scriptsInserted.includes(n.src))continue;this.scriptsInserted.push(n.src);const o=document.createElement("script");o.async=!0,o.src=n.src,document.head.appendChild(o)}else if(!n.type||["text/javascript","application/javascript","application/ecmascript"].includes(n.type)){if(this.scriptsRun.includes(n.innerText))continue;try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(o){console.warn("`CustomCode`: Error running script:",o)}}}}},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}};var Et=function(){var e=this,n=e._self._c;return n("div",{ref:"elem",class:e._classStringToObject("builder-custom-code"+(e.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:e._s(e.code)}})},Ft=[],Pt=p($t,Et,Ft,!1,null,null,null,null);const jt=Pt.exports,Ut={name:"Custom Code",static:!0,builtIn:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},At=()=>[{component:O,...at},{component:V,...lt},{component:Rt,...Tt},{component:B,...pt},{component:W,...mt},{component:J,...ut},{component:X,...it},{component:Y,...dt},{component:Q,...ct},{component:xt,...ft},{component:jt,...Ut}];function C({code:t,context:e,state:n,event:o,isExpression:s=!0}){if(t===""){console.warn("Skipping evaluation of empty code block.");return}const r={isEditing:h(),isBrowser:m(),isServer:!m()},c=s&&!(t.includes(";")||t.includes(" return ")||t.trim().startsWith("return "))?`return (${t});`:t;try{return new Function("builder","Builder","state","context","event",c)(r,r,n,e,o)}catch(a){console.warn(`Builder custom code error:
|
|
2
|
-
While Evaluating:
|
|
3
|
-
`,c,`
|
|
4
|
-
`,a)}}function Z(){return!m()||h()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const I=t=>JSON.parse(JSON.stringify(t)),R=[];function Ot(t,e){return R.push({component:t,...e}),console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."),t}const ee=({component:t,...e})=>({type:"builder.registerComponent",data:Bt(e)}),Vt=t=>typeof t=="function"?y(t):I(t),Bt=({inputs:t,...e})=>({...I(e),inputs:t==null?void 0:t.map(n=>Object.entries(n).reduce((o,[s,r])=>({...o,[s]:Vt(r)}),{}))});function Wt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}function te(){return Wt().replace(/-/g,"")}const ne="builderSessionId",Lt=async({canTrack:t})=>{if(!t)return;const e=await K({name:ne,canTrack:t});if(b(e))return e;{const n=Nt();Mt({id:n,canTrack:t})}},Nt=()=>te(),Mt=({id:t,canTrack:e})=>q({name:ne,value:t,canTrack:e}),oe=()=>m()&&typeof localStorage<"u"?localStorage:void 0,Ht=({key:t,canTrack:e})=>{var n;try{return e?(n=oe())==null?void 0:n.getItem(t):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o)}},Kt=({key:t,canTrack:e,value:n})=>{var o;try{e&&((o=oe())==null||o.setItem(t,n))}catch(s){console.debug("[LocalStorage] SET error: ",s)}},se="builderVisitorId",qt=({canTrack:t})=>{if(!t)return;const e=Ht({key:se,canTrack:t});if(b(e))return e;{const n=zt();Dt({id:n,canTrack:t})}},zt=()=>te(),Dt=({id:t,canTrack:e})=>Kt({key:se,value:t,canTrack:e}),Gt=async({canTrack:t})=>{if(!t)return{visitorId:void 0,sessionId:void 0};const e=await Lt({canTrack:t}),n=qt({canTrack:t});return{sessionId:e,visitorId:n}},Jt=async({type:t,canTrack:e,apiKey:n,metadata:o,...s})=>({type:t,data:{...s,metadata:JSON.stringify(o),...await Gt({canTrack:e}),ownerId:n}});async function w(t){if(!t.apiKey){console.error("[Builder.io]: Missing API key for track call. Please provide your API key.");return}if(!!t.canTrack&&!h()&&!!(m()||v==="reactNative"))return fetch("https://builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await Jt(t)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(e=>{console.error("Failed to track: ",e)})}const Xt=t=>w({...t,canTrack:!0}),Yt=()=>Promise.resolve().then(()=>ae).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",t),t}),Qt=()=>Promise.resolve().then(()=>require("./render-styles.6854b22c.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",t),t}),Zt={name:"render-content",components:{RenderContentStyles:Qt,RenderBlocks:Yt},props:["content","data","canTrack","locale","context","customComponents","model","apiKey","includeRefs"],data:()=>({forceReRenderCount:0,overrideContent:null,update:0,overrideState:{}}),provide(){const t=this;return{BuilderContext:{get content(){return t.useContent},get state(){return t.contentState},get context(){return t.contextContext},get apiKey(){return t.apiKey},get registeredComponents(){return t.allRegisteredComponents}}}},mounted(){var t,e;if(this.apiKey||console.error("[Builder.io]: No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),m()){if(h()&&(this.forceReRenderCount=this.forceReRenderCount+1,le(),de({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{}}),Object.values(this.allRegisteredComponents).forEach(n=>{var s;const o=ee(n);(s=window.parent)==null||s.postMessage(o,"*")}),window.addEventListener("message",this.processMessage),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.useContent){const n=(t=this.useContent)==null?void 0:t.testVariationId,o=(e=this.useContent)==null?void 0:e.id;w({type:"impression",canTrack:this.canTrackToUse,contentId:o,apiKey:this.apiKey,variationId:n!==o?n:void 0})}if(Z()){const n=new URL(location.href).searchParams;if(this.model&&n.get("builder.preview")===this.model){const o=n.get("apiKey")||n.get("builder.space");o&&S({model:this.model,apiKey:o}).then(s=>{s&&(this.overrideContent=s)})}}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0(){this.evaluateJsCode()},onUpdateHook1(){this.runHttpRequests()},onUpdateHook2(){this.emitStateUpdate()}},unmounted(){m()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{useContent(){var e,n;return!this.content&&!this.overrideContent?void 0:{...this.content,...this.overrideContent,data:{...(e=this.content)==null?void 0:e.data,...this.data,...(n=this.overrideContent)==null?void 0:n.data}}},canTrackToUse(){return this.canTrack||!0},contentState(){var t,e;return{...(e=(t=this.content)==null?void 0:t.data)==null?void 0:e.state,...this.data,...this.locale?{locale:this.locale}:{},...this.overrideState}},contextContext(){return this.context||{}},allRegisteredComponents(){return[...At(),...R,...this.customComponents||[]].reduce((n,o)=>({...n,[o.name]:o}),{})},httpReqsData(){return{}},shouldRenderContentStyles(){var t,e,n,o,s;return Boolean((((e=(t=this.useContent)==null?void 0:t.data)==null?void 0:e.cssCode)||((s=(o=(n=this.useContent)==null?void 0:n.data)==null?void 0:o.customFonts)==null?void 0:s.length))&&v!=="reactNative")},onUpdateHook0(){var t,e;return{0:(e=(t=this.useContent)==null?void 0:t.data)==null?void 0:e.jsCode,1:this.contentState}},onUpdateHook1(){var t,e;return{0:(e=(t=this.useContent)==null?void 0:t.data)==null?void 0:e.httpRequests}},onUpdateHook2(){return{0:this.contentState}}},methods:{processMessage(t){const{data:e}=t;if(e)switch(e.type){case"builder.contentUpdate":{const n=e.data,o=n.key||n.alias||n.entry||n.modelName,s=n.data;o===this.model&&(this.overrideContent=s,this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var e,n;const t=(n=(e=this.useContent)==null?void 0:e.data)==null?void 0:n.jsCode;t&&C({code:t,context:this.contextContext,state:this.contentState})},onClick(t){var e,n;if(this.useContent){const o=(e=this.useContent)==null?void 0:e.testVariationId,s=(n=this.useContent)==null?void 0:n.id;w({type:"click",canTrack:this.canTrackToUse,contentId:s,apiKey:this.apiKey,variationId:o!==s?o:void 0})}},evalExpression(t){return t.replace(/{{([^}]+)}}/g,(e,n)=>C({code:n,context:this.contextContext,state:this.contentState}))},handleRequest({url:t,key:e}){H().then(n=>n(t)).then(n=>n.json()).then(n=>{const o={...this.overrideState,[e]:n};this.overrideState=o}).catch(n=>{console.log("error fetching dynamic data",t,n)})},runHttpRequests(){var e,n,o;const t=(o=(n=(e=this.useContent)==null?void 0:e.data)==null?void 0:n.httpRequests)!=null?o:{};Object.entries(t).forEach(([s,r])=>{if(r&&(!this.httpReqsData[s]||h())){const i=this.evalExpression(r);this.handleRequest({url:i,key:s})}})},emitStateUpdate(){h()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.contentState,ref:{name:this.model}}}))}}};var en=function(){var o,s,r,i,c,a,d;var e=this,n=e._self._c;return e.useContent?n("div",{ref:"elementRef",attrs:{"builder-content-id":(o=e.useContent)==null?void 0:o.id,"builder-model":e.model},on:{click:function(u){return e.onClick(u)}}},[e.shouldRenderContentStyles?[n("render-content-styles",{attrs:{cssCode:(r=(s=e.useContent)==null?void 0:s.data)==null?void 0:r.cssCode,customFonts:(c=(i=e.useContent)==null?void 0:i.data)==null?void 0:c.customFonts}})]:e._e(),n("render-blocks",{key:e.forceReRenderCount,attrs:{blocks:(d=(a=e.useContent)==null?void 0:a.data)==null?void 0:d.blocks}})],2):e._e()},tn=[],nn=p(Zt,en,tn,!1,null,null,null,null);const re=nn.exports,on=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"})),sn=()=>Promise.resolve().then(()=>require("./block-styles.5646ff86.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",t),t}),rn=()=>Promise.resolve().then(()=>require("./render-block.5d72c0ee.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",t),t}),an={name:"render-blocks",components:{RenderBlock:rn,BlockStyles:sn},props:["blocks","parent","path","styleProp"],inject:{builderContext:"BuilderContext"},computed:{className(){var t;return"builder-blocks"+((t=this.blocks)!=null&&t.length?"":" no-blocks")}},methods:{onClick(){var t,e;h()&&!((t=this.blocks)!=null&&t.length)&&((e=window.parent)==null||e.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var t,e;h()&&!((t=this.blocks)!=null&&t.length)&&((e=window.parent)==null||e.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}};var cn=function(){var e=this,n=e._self._c;return n("div",{class:e._classStringToObject(e.className+" div-23e8fqt91nf"),style:e.styleProp,attrs:{"builder-path":e.path,"builder-parent-id":e.parent,dataSet:{class:e.className}},on:{click:function(o){return e.onClick()},mouseenter:function(o){return e.onMouseEnter()}}},[e.blocks?e._l(e.blocks,function(o,s){return n("render-block",{key:"render-block-"+o.id,attrs:{block:o,context:e.builderContext}})}):e._e(),e.blocks?e._l(e.blocks,function(o,s){return n("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:e.builderContext}})}):e._e()],2)},ln=[],dn=p(an,cn,ln,!1,null,"713efc9e",null,null);const ie=dn.exports,ae=Object.freeze(Object.defineProperty({__proto__:null,default:ie},Symbol.toStringTag,{value:"Module"})),U={};function un(t){if(m()){Object.assign(U,t);const e={type:"builder.settingsChange",data:U};parent.postMessage(e,"*")}}exports.Button=X;exports.Columns=O;exports.Fragment=Q;exports.Image=V;exports.Section=Y;exports.Symbol=J;exports.TARGET=v;exports.Text=B;exports.Video=W;exports.components=R;exports.convertSearchParamsToQueryObject=L;exports.createRegisterComponentMessage=ee;exports.evaluate=C;exports.fastClone=I;exports.generateContentUrl=D;exports.getAllContent=G;exports.getBuilderSearchParams=N;exports.getBuilderSearchParamsFromWindow=M;exports.getContent=S;exports.isEditing=h;exports.isPreviewing=Z;exports.normalizeComponent=p;exports.normalizeSearchParams=k;exports.register=A;exports.registerComponent=Ot;exports.renderBlocks=ie;exports.renderContent=re;exports.setEditorSettings=un;exports.track=Xt;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.a1d3ffcd.cjs"),l=require("./get-processed-block.4223e014.cjs"),p=t=>`v-on:${t.toLowerCase()}`,m=(t,e)=>n=>s.evaluate({code:t,context:e.context,state:e.state,event:n,isExpression:!1});function u(t){var o;const e={},n=(o=t.block.actions)!=null?o:{};for(const r in n){if(!n.hasOwnProperty(r))continue;const c=n[r];e[p(r)]=m(c,t)}return e}function h(t){var e;return{...(e=t.component)==null?void 0:e.options,...t.options,builderBlock:t}}function f(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\\s+/);for(const o of n)e[o]=!0;return e}function x(t){var e;return{...t.properties,"builder-id":t.id,class:f([t.id,"builder-block",t.class,(e=t.properties)==null?void 0:e.class].filter(Boolean).join(" "))}}function k(t){return t.tagName||"div"}const b=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],g=t=>typeof t=="string"&&b.includes(t.toLowerCase()),y=()=>Promise.resolve().then(()=>require("./block-styles.5646ff86.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",t),t}),C=()=>Promise.resolve().then(()=>require("./render-repeated-block.e52f9726.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",t),t}),v=()=>Promise.resolve().then(()=>require("./render-component-with-context.861efce7.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderComponentWithContext at ./render-component-with-context.vue",t),t}),d=()=>Promise.resolve().then(()=>require("./render-component.bad35496.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderComponent at ./render-component.vue",t),t}),B={name:"render-block",components:{RenderRepeatedBlock:C,BlockStyles:y,RenderComponentWithContext:v,RenderComponent:d},props:["block","context"],data:()=>({isEmptyHtmlElement:g}),computed:{component(){var n;const t=(n=l.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!1}).component)==null?void 0:n.name;if(!t)return null;const e=this.context.registeredComponents[t];if(e)return e;console.warn(`
|
|
2
|
-
Could not find a registered component named "${t}".
|
|
3
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},tag(){return k(this.useBlock)},useBlock(){return this.repeatItemData?this.block:l.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!0})},actions(){return u({block:this.useBlock,state:this.context.state,context:this.context.context})},attributes(){return{...x(this.useBlock)}},shouldWrap(){var t;return!((t=this.component)!=null&&t.noWrap)},renderComponentProps(){var t;return{blockChildren:this.useChildren,componentRef:(t=this.component)==null?void 0:t.component,componentOptions:{...h(this.useBlock),...this.shouldWrap?{}:{attributes:{...this.attributes,...this.actions}}},context:this.childrenContext}},useChildren(){var t;return(t=this.useBlock.children)!=null?t:[]},childrenWithoutParentComponent(){var e;return!((e=this.component)!=null&&e.component)&&!this.repeatItemData?this.useChildren:[]},repeatItemData(){const{repeat:t,...e}=this.block;if(!(t!=null&&t.collection))return;const n=s.evaluate({code:t.collection,state:this.context.state,context:this.context.context});if(!Array.isArray(n))return;const o=t.collection.split(".").pop(),r=t.itemName||(o?o+"Item":"item");return n.map((i,a)=>({context:{...this.context,state:{...this.context.state,$index:a,$item:i,[r]:i,[`$${r}Index`]:a}},block:e}))},inheritedTextStyles(){return{}},childrenContext(){return{apiKey:this.context.apiKey,state:this.context.state,content:this.context.content,context:this.context.context,registeredComponents:this.context.registeredComponents,inheritedStyles:this.inheritedTextStyles}},renderComponentTag(){return d}}};var _=function(){var e=this,n=e._self._c;return Boolean(e.shouldWrap)?e.isEmptyHtmlElement(e.tag)?n(e.tag,e._b({tag:"component"},"component",{...e.attributes,...e.actions},!1)):!e.isEmptyHtmlElement(e.tag)&&e.repeatItemData?n("div",{staticClass:"vue2-root-element-workaround"},e._l(e.repeatItemData,function(o,r){return n("render-repeated-block",{key:r,attrs:{repeatContext:o.context,block:o.block}})}),1):n(e.tag,e._b({tag:"component"},"component",{...e.attributes,...e.actions},!1),[n(e.renderComponentTag,e._b({tag:"component"},"component",e.renderComponentProps,!1)),e._l(e.childrenWithoutParentComponent,function(o,r){return n("render-block",{key:"render-block-"+o.id,attrs:{block:o,context:e.childrenContext}})}),e._l(e.childrenWithoutParentComponent,function(o,r){return n("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:e.childrenContext}})})],2):n(e.renderComponentTag,e._b({tag:"component"},"component",e.renderComponentProps,!1))},E=[],P=s.normalizeComponent(B,_,E,!1,null,null,null,null);const w=P.exports;exports.default=w;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as f, resolveComponent as y, openBlock as x, createBlock as S, createCommentVNode as h } from "vue";
|
|
2
|
-
import { f as k, T as g, _ as C } from "./index.0555f850.js";
|
|
3
|
-
import { g as _ } from "./get-processed-block.7e239fa3.js";
|
|
4
|
-
const m = {
|
|
5
|
-
small: {
|
|
6
|
-
min: 320,
|
|
7
|
-
default: 321,
|
|
8
|
-
max: 640
|
|
9
|
-
},
|
|
10
|
-
medium: {
|
|
11
|
-
min: 641,
|
|
12
|
-
default: 642,
|
|
13
|
-
max: 991
|
|
14
|
-
},
|
|
15
|
-
large: {
|
|
16
|
-
min: 990,
|
|
17
|
-
default: 991,
|
|
18
|
-
max: 1200
|
|
19
|
-
}
|
|
20
|
-
}, i = (e, s = m) => `@media (max-width: ${s[e].max}px)`, $ = ({ small: e, medium: s }) => {
|
|
21
|
-
const t = k(m);
|
|
22
|
-
if (!e || !s)
|
|
23
|
-
return t;
|
|
24
|
-
const n = Math.floor(e / 2);
|
|
25
|
-
t.small = {
|
|
26
|
-
max: e,
|
|
27
|
-
min: n,
|
|
28
|
-
default: n + 1
|
|
29
|
-
};
|
|
30
|
-
const a = t.small.max + 1;
|
|
31
|
-
t.medium = {
|
|
32
|
-
max: s,
|
|
33
|
-
min: a,
|
|
34
|
-
default: a + 1
|
|
35
|
-
};
|
|
36
|
-
const o = t.medium.max + 1;
|
|
37
|
-
return t.large = {
|
|
38
|
-
max: 2e3,
|
|
39
|
-
min: o,
|
|
40
|
-
default: o + 1
|
|
41
|
-
}, t;
|
|
42
|
-
}, b = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), B = (e) => Object.entries(e).map(([t, n]) => {
|
|
43
|
-
if (typeof n == "string")
|
|
44
|
-
return `${b(t)}: ${n};`;
|
|
45
|
-
}).join(`
|
|
46
|
-
`), r = ({
|
|
47
|
-
mediaQuery: e,
|
|
48
|
-
className: s,
|
|
49
|
-
styles: t
|
|
50
|
-
}) => {
|
|
51
|
-
const n = `.${s} {
|
|
52
|
-
${B(t)}
|
|
53
|
-
}`;
|
|
54
|
-
return e ? `${e} {
|
|
55
|
-
${n}
|
|
56
|
-
}` : n;
|
|
57
|
-
}, M = () => import("./render-inlined-styles.5f9ef611.js").then((e) => e.default).catch((e) => {
|
|
58
|
-
throw console.error(
|
|
59
|
-
"Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",
|
|
60
|
-
e
|
|
61
|
-
), e;
|
|
62
|
-
}), T = {
|
|
63
|
-
name: "block-styles",
|
|
64
|
-
components: {
|
|
65
|
-
RenderInlinedStyles: f(M)
|
|
66
|
-
},
|
|
67
|
-
props: ["block", "context"],
|
|
68
|
-
data: () => ({ TARGET: g }),
|
|
69
|
-
computed: {
|
|
70
|
-
useBlock() {
|
|
71
|
-
return _({
|
|
72
|
-
block: this.block,
|
|
73
|
-
state: this.context.state,
|
|
74
|
-
context: this.context.context,
|
|
75
|
-
shouldEvaluateBindings: !0
|
|
76
|
-
});
|
|
77
|
-
},
|
|
78
|
-
css() {
|
|
79
|
-
var c;
|
|
80
|
-
const e = this.useBlock.responsiveStyles, s = this.context.content, t = $(
|
|
81
|
-
((c = s == null ? void 0 : s.meta) == null ? void 0 : c.breakpoints) || {}
|
|
82
|
-
), n = e == null ? void 0 : e.large, a = e == null ? void 0 : e.medium, o = e == null ? void 0 : e.small, l = this.useBlock.id, d = n ? r({
|
|
83
|
-
className: l,
|
|
84
|
-
styles: n
|
|
85
|
-
}) : "", u = a ? r({
|
|
86
|
-
className: l,
|
|
87
|
-
styles: a,
|
|
88
|
-
mediaQuery: i(
|
|
89
|
-
"medium",
|
|
90
|
-
t
|
|
91
|
-
)
|
|
92
|
-
}) : "", p = o ? r({
|
|
93
|
-
className: l,
|
|
94
|
-
styles: o,
|
|
95
|
-
mediaQuery: i(
|
|
96
|
-
"small",
|
|
97
|
-
t
|
|
98
|
-
)
|
|
99
|
-
}) : "";
|
|
100
|
-
return [d, u, p].join(" ");
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
function v(e, s, t, n, a, o) {
|
|
105
|
-
const l = y("render-inlined-styles");
|
|
106
|
-
return e.TARGET !== "reactNative" && o.css ? (x(), S(l, {
|
|
107
|
-
key: 0,
|
|
108
|
-
styles: o.css
|
|
109
|
-
}, null, 8, ["styles"])) : h("", !0);
|
|
110
|
-
}
|
|
111
|
-
const E = /* @__PURE__ */ C(T, [["render", v]]);
|
|
112
|
-
export {
|
|
113
|
-
E as default
|
|
114
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),i=require("./index.2e65c08f.cjs"),x=require("./get-processed-block.a58dcd2a.cjs"),u={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},d=(e,s=u)=>`@media (max-width: ${s[e].max}px)`,S=({small:e,medium:s})=>{const t=i.fastClone(u);if(!e||!s)return t;const n=Math.floor(e/2);t.small={max:e,min:n,default:n+1};const c=t.small.max+1;t.medium={max:s,min:c,default:c+1};const o=t.medium.max+1;return t.large={max:2e3,min:o,default:o+1},t},g=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),h=e=>Object.entries(e).map(([t,n])=>{if(typeof n=="string")return`${g(t)}: ${n};`}).join(`
|
|
2
|
-
`),a=({mediaQuery:e,className:s,styles:t})=>{const n=`.${s} {
|
|
3
|
-
${h(t)}
|
|
4
|
-
}`;return e?`${e} {
|
|
5
|
-
${n}
|
|
6
|
-
}`:n},k=()=>Promise.resolve().then(()=>require("./render-inlined-styles.dc872311.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",e),e}),C={name:"block-styles",components:{RenderInlinedStyles:l.defineAsyncComponent(k)},props:["block","context"],data:()=>({TARGET:i.TARGET}),computed:{useBlock(){return x.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!0})},css(){var m;const e=this.useBlock.responsiveStyles,s=this.context.content,t=S(((m=s==null?void 0:s.meta)==null?void 0:m.breakpoints)||{}),n=e==null?void 0:e.large,c=e==null?void 0:e.medium,o=e==null?void 0:e.small,r=this.useBlock.id,p=n?a({className:r,styles:n}):"",y=c?a({className:r,styles:c,mediaQuery:d("medium",t)}):"",f=o?a({className:r,styles:o,mediaQuery:d("small",t)}):"";return[p,y,f].join(" ")}}};function b(e,s,t,n,c,o){const r=l.resolveComponent("render-inlined-styles");return e.TARGET!=="reactNative"&&o.css?(l.openBlock(),l.createBlock(r,{key:0,styles:o.css},null,8,["styles"])):l.createCommentVNode("",!0)}const _=i._export_sfc(C,[["render",b]]);exports.default=_;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("vue");function de(e){if(e&&e.__esModule)return e;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const v="vue3";function f(){return typeof window<"u"&&typeof document<"u"}const B={};function U(e,n){let t=B[e];if(t||(t=B[e]=[]),t.push(n),f()){const o={type:"builder.register",data:{type:e,info:n}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(s){console.debug("Could not postmessage",s)}}}const ue=()=>{U("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let F=!1;const me=(e={})=>{var n,t;F||(F=!0,f()&&((n=window.parent)==null||n.postMessage({type:"builder.sdkInfo",data:{target:v,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(t=window.parent)==null||t.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",({data:o})=>{var s,i;if(!!(o!=null&&o.type))switch(o.type){case"builder.evaluate":{const a=o.data.text,l=o.data.arguments||[],c=o.data.id,d=new Function(a);let u,m=null;try{u=d.apply(null,l)}catch(p){m=p}m?(s=window.parent)==null||s.postMessage({type:"builder.evaluateError",data:{id:c,error:m.message}},"*"):u&&typeof u.then=="function"?u.then(p=>{var b;(b=window.parent)==null||b.postMessage({type:"builder.evaluateResult",data:{id:c,result:p}},"*")}).catch(console.error):(i=window.parent)==null||i.postMessage({type:"builder.evaluateResult",data:{result:u,id:c}},"*");break}}})))},pe=()=>Promise.resolve().then(()=>ce).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",e),e}),he={name:"builder-columns",components:{RenderBlocks:r.defineAsyncComponent(pe)},props:["space","columns","stackColumnsAt","reverseColumnsWhenStacked","builderBlock"],computed:{columnsCssVars(){const e=this.stackColumnsAt==="never"?"inherit":this.reverseColumnsWhenStacked?"column-reverse":"column";return{"--flex-dir":e,"--flex-dir-tablet":this.maybeApplyForTablet(e)}},columnCssVars(){const e="100%",n="0";return{"--column-width":e,"--column-margin-left":n,"--column-width-tablet":this.maybeApplyForTablet(e),"--column-margin-left-tablet":this.maybeApplyForTablet(n)}}},methods:{getGutterSize(){return typeof this.space=="number"?this.space||0:20},getColumns(){return this.columns||[]},getWidth(e){var t;const n=this.getColumns();return((t=n[e])==null?void 0:t.width)||100/n.length},getColumnCssWidth(e){const n=this.getColumns(),o=this.getGutterSize()*(n.length-1)/n.length;return`calc(${this.getWidth(e)}% - ${o}px)`},maybeApplyForTablet(e){return(this.stackColumnsAt||"tablet")==="tablet"?e:"inherit"}}};const h=(e,n)=>{const t=e.__vccOpts||e;for(const[o,s]of n)t[o]=s;return t};function fe(e,n,t,o,s,i){const a=r.resolveComponent("render-blocks");return r.openBlock(),r.createElementBlock("div",{class:"builder-columns div-4uae37x75le",style:r.normalizeStyle(i.columnsCssVars)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.columns,(l,c)=>(r.openBlock(),r.createElementBlock("div",{key:c,class:"builder-column div-4uae37x75le-2",style:r.normalizeStyle({width:i.getColumnCssWidth(c),marginLeft:`${c===0?0:i.getGutterSize()}px`,...i.columnCssVars})},[r.createVNode(a,{blocks:l.blocks,path:`component.options.columns.${c}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"}},null,8,["blocks","path","parent"])],4))),128))],4)}const O=h(he,[["render",fe],["__scopeId","data-v-11562ef4"]]);function P(e){return e.replace(/http(s)?:/,"")}function ge(e="",n,t){const o=new RegExp("([?&])"+n+"=.*?(&|$)","i"),s=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+n+"="+encodeURIComponent(t)+"$2"):e+s+n+"="+encodeURIComponent(t)}function be(e,n){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!n)return e;if(n==="master")return P(e);const t=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(t){const o=e.split(t[0]),s=t[3],i=n.match("x")?n:`${n}x`;return P(`${o[0]}_${i}${s}`)}return null}function x(e){if(!e)return e;const n=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let t=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(t=`${t} ${o}w`),n.filter(s=>s!==o).map(s=>`${ge(e,"width",s)} ${s}w`).concat([t]).join(", ")}return e.match(/cdn\.shopify\.com/)?n.map(t=>[be(e,`${t}x${t}`),t]).filter(([t])=>!!t).map(([t,o])=>`${t} ${o}w`).concat([e]).join(", "):e}const ye={name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var t;const n=this.image||this.src;if(!n||!(n.match(/builder\.io/)||n.match(/cdn\.shopify\.com/)))return this.srcset;if(this.srcset&&((t=this.image)==null?void 0:t.includes("builder.io/api/v1/image"))){if(!this.srcset.includes(this.image.split("?")[0]))return console.debug("Removed given srcset"),x(n)}else if(this.image&&!this.srcset)return x(n);return x(n)},webpSrcSet(){var e;return((e=this.srcSetToUse)==null?void 0:e.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const e={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?e:void 0}},methods:{_classStringToObject(e){const n={};if(typeof e!="string")return n;const t=e.trim().split(/\s+/);for(const o of t)n[o]=!0;return n}}};const ve=["srcset"],ke=["alt","role","src","srcset","sizes"],xe=["srcset"],Ce={key:2,class:"div-bmtecjgqz8g-2"};function _e(e,n,t,o,s,i){var a,l,c,d;return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("picture",null,[i.webpSrcSet?(r.openBlock(),r.createElementBlock("source",{key:0,type:"image/webp",srcset:i.webpSrcSet},null,8,ve)):r.createCommentVNode("",!0),r.createElementVNode("img",{loading:"lazy",alt:t.altText,role:t.altText?"presentation":void 0,style:r.normalizeStyle({objectPosition:t.backgroundPosition||"center",objectFit:t.backgroundSize||"cover",...i.aspectRatioCss}),class:r.normalizeClass(i._classStringToObject("builder-image"+(t.className?" "+t.className:"")+" img-bmtecjgqz8g")),src:t.image,srcset:i.srcSetToUse,sizes:t.sizes},null,14,ke),r.createElementVNode("source",{srcset:i.srcSetToUse},null,8,xe)]),t.aspectRatio&&!(((l=(a=t.builderBlock)==null?void 0:a.children)==null?void 0:l.length)&&t.fitContent)?(r.openBlock(),r.createElementBlock("div",{key:0,class:"builder-image-sizer div-bmtecjgqz8g",style:r.normalizeStyle({paddingTop:t.aspectRatio*100+"%"})},null,4)):r.createCommentVNode("",!0),((d=(c=t.builderBlock)==null?void 0:c.children)==null?void 0:d.length)&&t.fitContent?r.renderSlot(e.$slots,"default",{key:1},void 0,!0):r.createCommentVNode("",!0),!t.fitContent&&e.children?(r.openBlock(),r.createElementBlock("div",Ce,[r.renderSlot(e.$slots,"default",{},void 0,!0)])):r.createCommentVNode("",!0)],64)}const N=h(ye,[["render",_e],["__scopeId","data-v-d9473cba"]]),Se={name:"builder-text",props:["text"]},we=["innerHTML"];function Ie(e,n,t,o,s,i){return r.openBlock(),r.createElementBlock("span",{class:"builder-text",innerHTML:t.text},null,8,we)}const $=h(Se,[["render",Ie]]),Te={name:"builder-video",props:["autoPlay","muted","controls","loop","playsInline","attributes","fit","position","video","posterImage"],computed:{videoProps(){return{...this.autoPlay===!0?{autoPlay:!0}:{},...this.muted===!0?{muted:!0}:{},...this.controls===!0?{controls:!0}:{},...this.loop===!0?{loop:!0}:{},...this.playsInline===!0?{playsInline:!0}:{}}},spreadProps(){return{...this.attributes,...this.videoProps}}}},Re=["src","poster"];function Ee(e,n,t,o,s,i){var a;return r.openBlock(),r.createElementBlock("video",r.mergeProps({style:{width:"100%",height:"100%",...(a=t.attributes)==null?void 0:a.style,objectFit:t.fit,objectPosition:t.position,borderRadius:1},src:t.video||"no-src",poster:t.posterImage},i.spreadProps),null,16,Re)}const L=h(Te,[["render",Ee]]);function C(e,n=null,t="."){return Object.keys(e).reduce((o,s)=>{const i=e[s],a=[n,s].filter(Boolean).join(t);return[typeof i=="object",i!==null,!(Array.isArray(i)&&i.length===0)].every(Boolean)?{...o,...C(i,a,t)}:{...o,[a]:i}},{})}const j="builder.",Be="options.",W=e=>{const n={};return e.forEach((t,o)=>{n[o]=t}),n},M=e=>{if(!e)return{};const n=w(e),t={};return Object.keys(n).forEach(o=>{if(o.startsWith(j)){const s=o.replace(j,"").replace(Be,"");t[s]=n[o]}}),t},z=()=>{if(!f())return{};const e=new URLSearchParams(window.location.search);return M(e)},w=e=>e instanceof URLSearchParams?W(e):e;function Fe(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:null}async function H(){const e=Fe().fetch;if(typeof e>"u"&&typeof global<"u"){const n=Promise.resolve().then(()=>de(require("node-fetch"))).then(t=>t.default);return n.default||n}return e.default||e}const Pe=e=>{const n=e.split(".");return n.length>2?n.slice(1).join("."):e},q=async({name:e,canTrack:n})=>{var t;try{return n?(t=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:t.split("=")[1]:void 0}catch(o){console.debug("[COOKIE] GET error: ",o)}},je=e=>e.map(([n,t])=>t?`${n}=${t}`:n).join("; "),Ae=[["secure",""],["SameSite","None"]],Ve=({name:e,value:n,expires:t})=>{const s=(f()?location.protocol==="https:":!0)?Ae:[[]],i=t?[["expires",t.toUTCString()]]:[[]],a=[[e,n],...i,["path","/"],["domain",Pe(window.location.hostname)],...s];return je(a)},K=async({name:e,value:n,expires:t,canTrack:o})=>{try{if(!o)return;const s=Ve({name:e,value:n,expires:t});document.cookie=s}catch(s){console.warn("[COOKIE] SET error: ",s)}},Ue="builderio.variations",D=e=>`${Ue}.${e}`,Oe=({contentId:e,canTrack:n})=>q({name:D(e),canTrack:n}),Ne=({contentId:e,canTrack:n,value:t})=>K({name:D(e),value:t,canTrack:n}),y=e=>e!=null,$e=e=>y(e.id)&&y(e.variations)&&Object.keys(e.variations).length>0,Le=({id:e,variations:n})=>{var s;let t=0;const o=Math.random();for(const i in n)if(t+=(s=n[i])==null?void 0:s.testRatio,o<t)return i;return e},A=({item:e,testGroupId:n})=>{const t=e.variations[n];return n===e.id||!t?{testVariationId:e.id,testVariationName:"Default"}:{data:t.data,testVariationId:t.id,testVariationName:t.name||(t.id===e.id?"Default":"")}},We=async({item:e,canTrack:n})=>{const t=await Oe({canTrack:n,contentId:e.id}),o=t?A({item:e,testGroupId:t}):void 0;if(o)return o;{const s=Le({variations:e.variations,id:e.id});return Ne({contentId:e.id,value:s,canTrack:n}).catch(i=>{console.error("could not store A/B test variation: ",i)}),A({item:e,testGroupId:s})}},Me=async({item:e,canTrack:n})=>{if(!$e(e))return;const t=await We({item:e,canTrack:n});Object.assign(e,t)};async function I(e){return(await J({...e,limit:1})).results[0]||null}const G=e=>{const{limit:n=30,userAttributes:t,query:o,noTraverse:s=!1,model:i,apiKey:a,includeRefs:l=!0,locale:c}=e;if(!a)throw new Error("Missing API key");const d=new URL(`https://cdn.builder.io/api/v2/content/${i}?apiKey=${a}&limit=${n}&noTraverse=${s}&includeRefs=${l}${c?`&locale=${c}`:""}`),u={...z(),...w(e.options||{})},m=C(u);for(const p in m)d.searchParams.set(p,String(m[p]));if(t&&d.searchParams.set("userAttributes",JSON.stringify(t)),o){const p=C({query:o});for(const b in p)d.searchParams.set(b,JSON.stringify(p[b]))}return d};async function J(e){const n=G(e),o=await(await H())(n.href).then(i=>i.json()),s=e.canTrack!==!1;if(s&&Array.isArray(o.results))for(const i of o.results)await Me({item:i,canTrack:s});return o}const ze=()=>Promise.resolve().then(()=>Dt).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",e),e}),He={name:"builder-symbol",components:{RenderContent:r.defineAsyncComponent(ze)},props:["symbol","attributes"],data:()=>({className:"builder-symbol",fetchedContent:null}),inject:{builderContext:"BuilderContext"},watch:{onUpdateHook0(){const e=this.symbol;e&&!e.content&&!this.fetchedContent&&e.model&&I({model:e.model,apiKey:this.builderContext.apiKey,query:{id:e.entry}}).then(n=>{this.fetchedContent=n})}},computed:{contentToUse(){var e;return((e=this.symbol)==null?void 0:e.content)||this.fetchedContent},onUpdateHook0(){return{0:this.symbol,1:this.fetchedContent}}},methods:{_classStringToObject(e){const n={};if(typeof e!="string")return n;const t=e.trim().split(/\s+/);for(const o of t)n[o]=!0;return n}}},qe=["dataSet"];function Ke(e,n,t,o,s,i){var l,c,d,u,m;const a=r.resolveComponent("render-content");return r.openBlock(),r.createElementBlock("div",r.mergeProps({dataSet:{class:e.className},class:i._classStringToObject(e.className)},t.attributes),[r.createVNode(a,{apiKey:i.builderContext.apiKey,context:i.builderContext.context,customComponents:Object.values(i.builderContext.registeredComponents),data:{...(l=t.symbol)==null?void 0:l.data,...i.builderContext.state,...(u=(d=(c=t.symbol)==null?void 0:c.content)==null?void 0:d.data)==null?void 0:u.state},model:(m=t.symbol)==null?void 0:m.model,content:i.contentToUse},null,8,["apiKey","context","customComponents","data","model","content"])],16,qe)}const X=h(He,[["render",Ke]]),De={name:"builder-button",props:["attributes","text","link","openLinkInNewTab"]};const Ge=["href","target"];function Je(e,n,t,o,s,i){return t.link?(r.openBlock(),r.createElementBlock("a",r.mergeProps({key:0,role:"button",href:t.link,target:t.openLinkInNewTab?"_blank":void 0},t.attributes),r.toDisplayString(t.text),17,Ge)):(r.openBlock(),r.createElementBlock("button",r.mergeProps({key:1,class:"button-2btisl9m7v3"},t.attributes),r.toDisplayString(t.text),17))}const Y=h(De,[["render",Je],["__scopeId","data-v-db085cd5"]]),Xe={name:"builder-section-component",props:["attributes","maxWidth"]};function Ye(e,n,t,o,s,i){return r.openBlock(),r.createElementBlock("section",r.mergeProps({style:t.maxWidth&&typeof t.maxWidth=="number"?{maxWidth:t.maxWidth}:void 0},t.attributes),[r.renderSlot(e.$slots,"default")],16)}const Q=h(Xe,[["render",Ye]]),Qe={name:"builder-fragment-component",props:[]};function Ze(e,n,t,o,s,i){return r.openBlock(),r.createElementBlock("span",null,[r.renderSlot(e.$slots,"default")])}const Z=h(Qe,[["render",Ze]]),et={name:"Core:Button",builtIn:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},k=e=>{const n=e.toString().trim();return`return (${!n.startsWith("function")&&!n.startsWith("(")?"function ":""}${n}).apply(this, arguments)`},tt={name:"Columns",builtIn:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:k(e=>{function n(){t.forEach(o=>{o.delete("width")})}const t=e.get("columns");Array.isArray(t)&&!!t.find(s=>s.get("width"))&&(!!t.find(i=>!i.get("width"))||t.reduce((l,c)=>l+c.get("width"),0)!==100)&&n()})},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},nt={name:"Fragment",static:!0,hidden:!0,builtIn:!0,canHaveChildren:!0,noWrap:!0},ot={name:"Image",static:!0,builtIn:!0,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",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",onChange:k(e=>{e.delete("srcset"),e.delete("noWebp");function t(a,l=6e4){return new Promise((c,d)=>{const u=document.createElement("img");let m=!1;u.onload=()=>{m=!0,c(u)},u.addEventListener("error",p=>{console.warn("Image load failed",p.error),d(p.error)}),u.src=a,setTimeout(()=>{m||d(new Error("Image load timed out"))},l)})}function o(a){return Math.round(a*1e3)/1e3}const s=e.get("image"),i=e.get("aspectRatio");if(fetch(s).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),s&&(!i||i===.7041))return t(s).then(a=>{const l=e.get("aspectRatio");e.get("image")===s&&(!l||l===.7041)&&a.width&&a.height&&(e.set("aspectRatio",o(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})})},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},rt={name:"Core:Section",static:!0,builtIn:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},st={name:"Symbol",noWrap:!0,static:!0,builtIn:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},it={name:"Text",static:!0,builtIn:!0,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",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}},at={name:"Video",canHaveChildren:!0,builtIn:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},ct={name:"Embed",static:!0,builtIn:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:k(e=>{const n=e.get("url");if(n)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${n}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{e.get("url")===n&&(o.html?e.set("content",o.html):e.set("content","Invalid url, please try another"))}).catch(o=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")})},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},lt=["text/javascript","application/javascript","application/ecmascript"],dt=e=>lt.includes(e.type),ut={name:"builder-embed",props:["content"],data:()=>({scriptsInserted:[],scriptsRun:[],ranInitFn:!1}),watch:{onUpdateHook0(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())}},computed:{onUpdateHook0(){return{0:this.$refs.elem,1:this.ranInitFn}}},methods:{findAndRunScripts(){if(!this.$refs.elem||!this.$refs.elem.getElementsByTagName)return;const e=this.$refs.elem.getElementsByTagName("script");for(let n=0;n<e.length;n++){const t=e[n];if(t.src&&!this.scriptsInserted.includes(t.src)){this.scriptsInserted.push(t.src);const o=document.createElement("script");o.async=!0,o.src=t.src,document.head.appendChild(o)}else if(dt(t)&&!this.scriptsRun.includes(t.innerText))try{this.scriptsRun.push(t.innerText),new Function(t.innerText)()}catch(o){console.warn("`Embed`: Error running script:",o)}}}}},mt=["innerHTML"];function pt(e,n,t,o,s,i){return r.openBlock(),r.createElementBlock("div",{class:"builder-embed",ref:"elem",innerHTML:t.content},null,8,mt)}const ht=h(ut,[["render",pt]]);function ft(){return f()&&window.self!==window.top}function g(){return ft()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const gt={name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data:()=>({isEditing:g})},bt=["alt","src"];function yt(e,n,t,o,s,i){return r.openBlock(),r.createElementBlock("img",r.mergeProps({style:{objectFit:t.backgroundSize||"cover",objectPosition:t.backgroundPosition||"center"},key:e.isEditing()&&t.imgSrc||"default-key",alt:t.altText,src:t.imgSrc||t.image},t.attributes),null,16,bt)}const vt=h(gt,[["render",yt]]),kt={name:"Raw:Img",hideFromInsertMenu:!0,builtIn:!0,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",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg"],required:!0}],noWrap:!0,static:!0},xt={name:"builder-custom-code",props:["replaceNodes","code"],data:()=>({scriptsInserted:[],scriptsRun:[]}),mounted(){this.findAndRunScripts()},methods:{findAndRunScripts(){if(this.$refs.elem&&this.$refs.elem.getElementsByTagName&&typeof window<"u"){const e=this.$refs.elem.getElementsByTagName("script");for(let n=0;n<e.length;n++){const t=e[n];if(t.src){if(this.scriptsInserted.includes(t.src))continue;this.scriptsInserted.push(t.src);const o=document.createElement("script");o.async=!0,o.src=t.src,document.head.appendChild(o)}else if(!t.type||["text/javascript","application/javascript","application/ecmascript"].includes(t.type)){if(this.scriptsRun.includes(t.innerText))continue;try{this.scriptsRun.push(t.innerText),new Function(t.innerText)()}catch(o){console.warn("`CustomCode`: Error running script:",o)}}}}},_classStringToObject(e){const n={};if(typeof e!="string")return n;const t=e.trim().split(/\s+/);for(const o of t)n[o]=!0;return n}}},Ct=["innerHTML"];function _t(e,n,t,o,s,i){return r.openBlock(),r.createElementBlock("div",{ref:"elem",class:r.normalizeClass(i._classStringToObject("builder-custom-code"+(t.replaceNodes?" replace-nodes":""))),innerHTML:t.code},null,10,Ct)}const St=h(xt,[["render",_t]]),wt={name:"Custom Code",static:!0,builtIn:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},It=()=>[{component:O,...tt},{component:N,...ot},{component:vt,...kt},{component:$,...it},{component:L,...at},{component:X,...st},{component:Y,...et},{component:Q,...rt},{component:Z,...nt},{component:ht,...ct},{component:St,...wt}];function _({code:e,context:n,state:t,event:o,isExpression:s=!0}){if(e===""){console.warn("Skipping evaluation of empty code block.");return}const i={isEditing:g(),isBrowser:f(),isServer:!f()},l=s&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;try{return new Function("builder","Builder","state","context","event",l)(i,i,t,n,o)}catch(c){console.warn(`Builder custom code error:
|
|
2
|
-
While Evaluating:
|
|
3
|
-
`,l,`
|
|
4
|
-
`,c)}}function ee(){return!f()||g()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const T=e=>JSON.parse(JSON.stringify(e)),R=[];function Tt(e,n){return R.push({component:e,...n}),console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."),e}const te=({component:e,...n})=>({type:"builder.registerComponent",data:Et(n)}),Rt=e=>typeof e=="function"?k(e):T(e),Et=({inputs:e,...n})=>({...T(n),inputs:e==null?void 0:e.map(t=>Object.entries(t).reduce((o,[s,i])=>({...o,[s]:Rt(i)}),{}))});function Bt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const n=Math.random()*16|0;return(e=="x"?n:n&3|8).toString(16)})}function ne(){return Bt().replace(/-/g,"")}const oe="builderSessionId",Ft=async({canTrack:e})=>{if(!e)return;const n=await q({name:oe,canTrack:e});if(y(n))return n;{const t=Pt();jt({id:t,canTrack:e})}},Pt=()=>ne(),jt=({id:e,canTrack:n})=>K({name:oe,value:e,canTrack:n}),re=()=>f()&&typeof localStorage<"u"?localStorage:void 0,At=({key:e,canTrack:n})=>{var t;try{return n?(t=re())==null?void 0:t.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o)}},Vt=({key:e,canTrack:n,value:t})=>{var o;try{n&&((o=re())==null||o.setItem(e,t))}catch(s){console.debug("[LocalStorage] SET error: ",s)}},se="builderVisitorId",Ut=({canTrack:e})=>{if(!e)return;const n=At({key:se,canTrack:e});if(y(n))return n;{const t=Ot();Nt({id:t,canTrack:e})}},Ot=()=>ne(),Nt=({id:e,canTrack:n})=>Vt({key:se,value:e,canTrack:n}),$t=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const n=await Ft({canTrack:e}),t=Ut({canTrack:e});return{sessionId:n,visitorId:t}},Lt=async({type:e,canTrack:n,apiKey:t,metadata:o,...s})=>({type:e,data:{...s,metadata:JSON.stringify(o),...await $t({canTrack:n}),ownerId:t}});async function S(e){if(!e.apiKey){console.error("[Builder.io]: Missing API key for track call. Please provide your API key.");return}if(!!e.canTrack&&!g()&&!!(f()||v==="reactNative"))return fetch("https://builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await Lt(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(n=>{console.error("Failed to track: ",n)})}const Wt=e=>S({...e,canTrack:!0}),Mt=()=>Promise.resolve().then(()=>ce).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",e),e}),zt=()=>Promise.resolve().then(()=>require("./render-styles.52fba546.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",e),e}),Ht={name:"render-content",components:{RenderContentStyles:r.defineAsyncComponent(zt),RenderBlocks:r.defineAsyncComponent(Mt)},props:["content","data","canTrack","locale","context","customComponents","model","apiKey","includeRefs"],data:()=>({forceReRenderCount:0,overrideContent:null,update:0,overrideState:{}}),provide(){const e=this;return{BuilderContext:{get content(){return e.useContent},get state(){return e.contentState},get context(){return e.contextContext},get apiKey(){return e.apiKey},get registeredComponents(){return e.allRegisteredComponents}}}},mounted(){var e,n;if(this.apiKey||console.error("[Builder.io]: No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),f()){if(g()&&(this.forceReRenderCount=this.forceReRenderCount+1,ue(),me({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{}}),Object.values(this.allRegisteredComponents).forEach(t=>{var s;const o=te(t);(s=window.parent)==null||s.postMessage(o,"*")}),window.addEventListener("message",this.processMessage),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.useContent){const t=(e=this.useContent)==null?void 0:e.testVariationId,o=(n=this.useContent)==null?void 0:n.id;S({type:"impression",canTrack:this.canTrackToUse,contentId:o,apiKey:this.apiKey,variationId:t!==o?t:void 0})}if(ee()){const t=new URL(location.href).searchParams;if(this.model&&t.get("builder.preview")===this.model){const o=t.get("apiKey")||t.get("builder.space");o&&I({model:this.model,apiKey:o}).then(s=>{s&&(this.overrideContent=s)})}}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0(){this.evaluateJsCode()},onUpdateHook1(){this.runHttpRequests()},onUpdateHook2(){this.emitStateUpdate()}},unmounted(){f()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{useContent(){var n,t;return!this.content&&!this.overrideContent?void 0:{...this.content,...this.overrideContent,data:{...(n=this.content)==null?void 0:n.data,...this.data,...(t=this.overrideContent)==null?void 0:t.data}}},canTrackToUse(){return this.canTrack||!0},contentState(){var e,n;return{...(n=(e=this.content)==null?void 0:e.data)==null?void 0:n.state,...this.data,...this.locale?{locale:this.locale}:{},...this.overrideState}},contextContext(){return this.context||{}},allRegisteredComponents(){return[...It(),...R,...this.customComponents||[]].reduce((t,o)=>({...t,[o.name]:o}),{})},httpReqsData(){return{}},shouldRenderContentStyles(){var e,n,t,o,s;return Boolean((((n=(e=this.useContent)==null?void 0:e.data)==null?void 0:n.cssCode)||((s=(o=(t=this.useContent)==null?void 0:t.data)==null?void 0:o.customFonts)==null?void 0:s.length))&&v!=="reactNative")},onUpdateHook0(){var e,n;return{0:(n=(e=this.useContent)==null?void 0:e.data)==null?void 0:n.jsCode,1:this.contentState}},onUpdateHook1(){var e,n;return{0:(n=(e=this.useContent)==null?void 0:e.data)==null?void 0:n.httpRequests}},onUpdateHook2(){return{0:this.contentState}}},methods:{processMessage(e){const{data:n}=e;if(n)switch(n.type){case"builder.contentUpdate":{const t=n.data,o=t.key||t.alias||t.entry||t.modelName,s=t.data;o===this.model&&(this.overrideContent=s,this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var n,t;const e=(t=(n=this.useContent)==null?void 0:n.data)==null?void 0:t.jsCode;e&&_({code:e,context:this.contextContext,state:this.contentState})},onClick(e){var n,t;if(this.useContent){const o=(n=this.useContent)==null?void 0:n.testVariationId,s=(t=this.useContent)==null?void 0:t.id;S({type:"click",canTrack:this.canTrackToUse,contentId:s,apiKey:this.apiKey,variationId:o!==s?o:void 0})}},evalExpression(e){return e.replace(/{{([^}]+)}}/g,(n,t)=>_({code:t,context:this.contextContext,state:this.contentState}))},handleRequest({url:e,key:n}){H().then(t=>t(e)).then(t=>t.json()).then(t=>{const o={...this.overrideState,[n]:t};this.overrideState=o}).catch(t=>{console.log("error fetching dynamic data",e,t)})},runHttpRequests(){var n,t,o;const e=(o=(t=(n=this.useContent)==null?void 0:n.data)==null?void 0:t.httpRequests)!=null?o:{};Object.entries(e).forEach(([s,i])=>{if(i&&(!this.httpReqsData[s]||g())){const a=this.evalExpression(i);this.handleRequest({url:a,key:s})}})},emitStateUpdate(){g()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.contentState,ref:{name:this.model}}}))}}},qt=["builder-content-id","builder-model"];function Kt(e,n,t,o,s,i){var c,d,u,m,p,b,E;const a=r.resolveComponent("render-content-styles"),l=r.resolveComponent("render-blocks");return i.useContent?(r.openBlock(),r.createElementBlock("div",{key:0,ref:"elementRef",onClick:n[0]||(n[0]=le=>i.onClick(le)),"builder-content-id":(c=i.useContent)==null?void 0:c.id,"builder-model":t.model},[i.shouldRenderContentStyles?(r.openBlock(),r.createBlock(a,{key:0,cssCode:(u=(d=i.useContent)==null?void 0:d.data)==null?void 0:u.cssCode,customFonts:(p=(m=i.useContent)==null?void 0:m.data)==null?void 0:p.customFonts},null,8,["cssCode","customFonts"])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(l,{blocks:(E=(b=i.useContent)==null?void 0:b.data)==null?void 0:E.blocks,key:e.forceReRenderCount},null,8,["blocks"]))],8,qt)):r.createCommentVNode("",!0)}const ie=h(Ht,[["render",Kt]]),Dt=Object.freeze(Object.defineProperty({__proto__:null,default:ie},Symbol.toStringTag,{value:"Module"})),Gt=()=>Promise.resolve().then(()=>require("./block-styles.c34bd502.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",e),e}),Jt=()=>Promise.resolve().then(()=>require("./render-block.c7f89c03.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",e),e}),Xt={name:"render-blocks",components:{RenderBlock:r.defineAsyncComponent(Jt),BlockStyles:r.defineAsyncComponent(Gt)},props:["blocks","parent","path","styleProp"],inject:{builderContext:"BuilderContext"},computed:{className(){var e;return"builder-blocks"+((e=this.blocks)!=null&&e.length?"":" no-blocks")}},methods:{onClick(){var e,n;g()&&!((e=this.blocks)!=null&&e.length)&&((n=window.parent)==null||n.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var e,n;g()&&!((e=this.blocks)!=null&&e.length)&&((n=window.parent)==null||n.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(e){const n={};if(typeof e!="string")return n;const t=e.trim().split(/\s+/);for(const o of t)n[o]=!0;return n}}};const Yt=["builder-path","builder-parent-id","dataSet"];function Qt(e,n,t,o,s,i){const a=r.resolveComponent("render-block"),l=r.resolveComponent("block-styles");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(i._classStringToObject(i.className+" div-7fq9d0i380")),"builder-path":t.path,"builder-parent-id":t.parent,dataSet:{class:i.className},style:r.normalizeStyle(t.styleProp),onClick:n[0]||(n[0]=c=>i.onClick()),onMouseenter:n[1]||(n[1]=c=>i.onMouseEnter())},[t.blocks?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(t.blocks,(c,d)=>(r.openBlock(),r.createBlock(a,{key:"render-block-"+c.id,block:c,context:i.builderContext},null,8,["block","context"]))),128)):r.createCommentVNode("",!0),t.blocks?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(t.blocks,(c,d)=>(r.openBlock(),r.createBlock(l,{key:"block-style-"+c.id,block:c,context:i.builderContext},null,8,["block","context"]))),128)):r.createCommentVNode("",!0)],46,Yt)}const ae=h(Xt,[["render",Qt],["__scopeId","data-v-4f5f0a37"]]),ce=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"})),V={};function Zt(e){if(f()){Object.assign(V,e);const n={type:"builder.settingsChange",data:V};parent.postMessage(n,"*")}}exports.Button=Y;exports.Columns=O;exports.Fragment=Z;exports.Image=N;exports.Section=Q;exports.Symbol=X;exports.TARGET=v;exports.Text=$;exports.Video=L;exports._export_sfc=h;exports.components=R;exports.convertSearchParamsToQueryObject=W;exports.createRegisterComponentMessage=te;exports.evaluate=_;exports.fastClone=T;exports.generateContentUrl=G;exports.getAllContent=J;exports.getBuilderSearchParams=M;exports.getBuilderSearchParamsFromWindow=z;exports.getContent=I;exports.isEditing=g;exports.isPreviewing=ee;exports.normalizeSearchParams=w;exports.register=U;exports.registerComponent=Tt;exports.renderBlocks=ae;exports.renderContent=ie;exports.setEditorSettings=Zt;exports.track=Wt;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),d=require("./index.2e65c08f.cjs"),p=require("./get-processed-block.a58dcd2a.cjs"),h=e=>`v-on:${e.toLowerCase()}`,k=(e,n)=>r=>d.evaluate({code:e,context:n.context,state:n.state,event:r,isExpression:!1});function x(e){var c;const n={},r=(c=e.block.actions)!=null?c:{};for(const l in r){if(!r.hasOwnProperty(l))continue;const o=r[l];n[h(l)]=k(o,e)}return n}function y(e){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,builderBlock:e}}function C(e){const n={};if(typeof e!="string")return n;const r=e.trim().split(/\\s+/);for(const c of r)n[c]=!0;return n}function b(e){var n;return{...e.properties,"builder-id":e.id,class:C([e.id,"builder-block",e.class,(n=e.properties)==null?void 0:n.class].filter(Boolean).join(" "))}}function f(e){return e.tagName||"div"}const g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],B=e=>typeof e=="string"&&g.includes(e.toLowerCase()),v=()=>Promise.resolve().then(()=>require("./block-styles.c34bd502.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",e),e}),E=()=>Promise.resolve().then(()=>require("./render-repeated-block.f087a519.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",e),e}),P=()=>Promise.resolve().then(()=>require("./render-component-with-context.fa9ac131.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderComponentWithContext at ./render-component-with-context.vue",e),e}),R=()=>Promise.resolve().then(()=>require("./render-component.afe8b68d.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderComponent at ./render-component.vue",e),e}),_={name:"render-block",components:{RenderRepeatedBlock:t.defineAsyncComponent(E),BlockStyles:t.defineAsyncComponent(v),RenderComponentWithContext:t.defineAsyncComponent(P),RenderComponent:t.defineAsyncComponent(R)},props:["block","context"],data:()=>({isEmptyHtmlElement:B}),computed:{component(){var r;const e=(r=p.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!e)return null;const n=this.context.registeredComponents[e];if(n)return n;console.warn(`
|
|
2
|
-
Could not find a registered component named "${e}".
|
|
3
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},tag(){return f(this.useBlock)},useBlock(){return this.repeatItemData?this.block:p.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!0})},actions(){return x({block:this.useBlock,state:this.context.state,context:this.context.context})},attributes(){return{...b(this.useBlock)}},shouldWrap(){var e;return!((e=this.component)!=null&&e.noWrap)},renderComponentProps(){var e;return{blockChildren:this.useChildren,componentRef:(e=this.component)==null?void 0:e.component,componentOptions:{...y(this.useBlock),...this.shouldWrap?{}:{attributes:{...this.attributes,...this.actions}}},context:this.childrenContext}},useChildren(){var e;return(e=this.useBlock.children)!=null?e:[]},childrenWithoutParentComponent(){var n;return!((n=this.component)!=null&&n.component)&&!this.repeatItemData?this.useChildren:[]},repeatItemData(){const{repeat:e,...n}=this.block;if(!(e!=null&&e.collection))return;const r=d.evaluate({code:e.collection,state:this.context.state,context:this.context.context});if(!Array.isArray(r))return;const c=e.collection.split(".").pop(),l=e.itemName||(c?c+"Item":"item");return r.map((i,a)=>({context:{...this.context,state:{...this.context.state,$index:a,$item:i,[l]:i,[`$${l}Index`]:a}},block:n}))},inheritedTextStyles(){return{}},childrenContext(){return{apiKey:this.context.apiKey,state:this.context.state,content:this.context.content,context:this.context.context,registeredComponents:this.context.registeredComponents,inheritedStyles:this.inheritedTextStyles}},renderComponentTag(){return"RenderComponent"}}};function w(e,n,r,c,l,o){const i=t.resolveComponent("render-repeated-block"),a=t.resolveComponent("render-block",!0),u=t.resolveComponent("block-styles");return o.shouldWrap?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.isEmptyHtmlElement(o.tag)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),t.normalizeProps(t.mergeProps({key:0},{...o.attributes,...o.actions})),null,16)):t.createCommentVNode("",!0),!e.isEmptyHtmlElement(o.tag)&&o.repeatItemData?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(o.repeatItemData,(s,m)=>(t.openBlock(),t.createBlock(i,{key:m,repeatContext:s.context,block:s.block},null,8,["repeatContext","block"]))),128)):t.createCommentVNode("",!0),!e.isEmptyHtmlElement(o.tag)&&!o.repeatItemData?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),t.normalizeProps(t.mergeProps({key:2},{...o.attributes,...o.actions})),{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.renderComponentTag),t.normalizeProps(t.guardReactiveProps(o.renderComponentProps)),null,16)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.childrenWithoutParentComponent,(s,m)=>(t.openBlock(),t.createBlock(a,{key:"render-block-"+s.id,block:s,context:o.childrenContext},null,8,["block","context"]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.childrenWithoutParentComponent,(s,m)=>(t.openBlock(),t.createBlock(u,{key:"block-style-"+s.id,block:s,context:o.childrenContext},null,8,["block","context"]))),128))]),_:1},16)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.renderComponentTag),t.normalizeProps(t.mergeProps({key:1},o.renderComponentProps)),null,16))}const T=d._export_sfc(_,[["render",w]]);exports.default=T;
|