@builder.io/sdk-vue 0.1.7 → 0.1.9
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.d7d7aa69.js +69 -0
- package/packages/_vue2/dist/block-styles.f25ea71f.cjs +1 -0
- package/packages/{_vue3/dist/get-processed-block.d00eccbb.cjs → _vue2/dist/get-processed-block.d3c744f7.cjs} +1 -1
- package/packages/{_vue3/dist/get-processed-block.7f0848a3.js → _vue2/dist/get-processed-block.ef627078.js} +1 -1
- package/packages/_vue2/dist/{index.2d467eb1.cjs → index.bef62fde.cjs} +5 -5
- package/packages/_vue2/dist/{index.055082cd.js → index.ea6d5c33.js} +74 -73
- package/packages/_vue2/dist/{render-block.3d616731.js → render-block.68538b72.js} +34 -31
- package/packages/_vue2/dist/render-block.8a810b21.cjs +3 -0
- package/packages/_vue2/dist/{render-component.69758ebf.js → render-component.d5a06a9f.js} +3 -3
- package/packages/_vue2/dist/{render-component.f92ce0c3.cjs → render-component.fa85c266.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.8d0c5a9b.js → render-inlined-styles.32e2a109.js} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.3d0f9fe7.cjs → render-inlined-styles.c58a27b9.cjs} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.6c0e784a.cjs → render-repeated-block.9563405f.cjs} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.e773db2b.js → render-repeated-block.c577be97.js} +2 -2
- package/packages/_vue2/dist/{render-styles.f5c763be.cjs → render-styles.1c71bf0a.cjs} +2 -2
- package/packages/_vue2/dist/{render-styles.38da6402.js → render-styles.31ad9a17.js} +2 -2
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +3 -3
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +4 -0
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +4 -0
- package/packages/_vue2/dist/src/components/render-block/block-styles.vue.d.ts +1 -0
- package/packages/_vue2/dist/src/components/render-block/render-block.vue.d.ts +3 -0
- package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +3 -0
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +3 -0
- package/packages/_vue2/dist/src/components/render-blocks.vue.d.ts +4 -0
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +4 -0
- package/packages/_vue2/dist/src/types/builder-block.d.ts +8 -0
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/block-styles.8ee7887b.cjs +1 -0
- package/packages/_vue3/dist/block-styles.b74d2b45.js +66 -0
- package/packages/{_vue2/dist/get-processed-block.e426e5c8.js → _vue3/dist/get-processed-block.348e1332.js} +1 -1
- package/packages/{_vue2/dist/get-processed-block.3cf6c3ff.cjs → _vue3/dist/get-processed-block.49919209.cjs} +1 -1
- package/packages/_vue3/dist/{index.59001d0e.cjs → index.4f68e6f8.cjs} +10 -10
- package/packages/_vue3/dist/{index.3d6c5319.js → index.5773f262.js} +37 -36
- package/packages/_vue3/dist/render-block.1021bf96.cjs +3 -0
- package/packages/_vue3/dist/{render-block.9166425b.js → render-block.f48dafa3.js} +76 -71
- package/packages/_vue3/dist/{render-component.bca347e7.js → render-component.2ae850d5.js} +3 -3
- package/packages/_vue3/dist/{render-component.79b00fb5.cjs → render-component.f152b6e4.cjs} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.56c17d2f.cjs → render-inlined-styles.9dd02e33.cjs} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.97f3e330.js → render-inlined-styles.da7419c9.js} +1 -1
- package/packages/_vue3/dist/{render-repeated-block.d0ab60c1.js → render-repeated-block.0c8d0906.js} +2 -2
- package/packages/_vue3/dist/{render-repeated-block.791d2698.cjs → render-repeated-block.58283c8b.cjs} +1 -1
- package/packages/_vue3/dist/{render-styles.86687760.cjs → render-styles.90022a69.cjs} +2 -2
- package/packages/_vue3/dist/{render-styles.e5ee2819.js → render-styles.fc3b8b2e.js} +2 -2
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +3 -3
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +1 -0
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +1 -0
- package/packages/_vue3/dist/src/components/render-block/block-styles.vue.d.ts +1 -0
- package/packages/_vue3/dist/src/components/render-blocks.vue.d.ts +1 -0
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +1 -0
- package/packages/_vue3/dist/src/types/builder-block.d.ts +8 -0
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.39cc91ef.cjs +0 -1
- package/packages/_vue2/dist/block-styles.ed7736cd.js +0 -66
- package/packages/_vue2/dist/render-block.f934b32f.cjs +0 -3
- package/packages/_vue3/dist/block-styles.057be752.cjs +0 -1
- package/packages/_vue3/dist/block-styles.90be320f.js +0 -63
- package/packages/_vue3/dist/render-block.fad21827.cjs +0 -3
package/package.json
CHANGED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { T as k, c as i, g as p, a as o, b as u, n as y } from "./index.ea6d5c33.js";
|
|
2
|
+
import { g as _ } from "./get-processed-block.ef627078.js";
|
|
3
|
+
const S = () => import("./render-inlined-styles.32e2a109.js").then((e) => e.default).catch((e) => {
|
|
4
|
+
throw console.error(
|
|
5
|
+
"Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",
|
|
6
|
+
e
|
|
7
|
+
), e;
|
|
8
|
+
}), f = {
|
|
9
|
+
name: "block-styles",
|
|
10
|
+
components: { RenderInlinedStyles: S },
|
|
11
|
+
props: ["block", "context"],
|
|
12
|
+
data() {
|
|
13
|
+
return { TARGET: k };
|
|
14
|
+
},
|
|
15
|
+
computed: {
|
|
16
|
+
useBlock() {
|
|
17
|
+
return _({
|
|
18
|
+
block: this.block,
|
|
19
|
+
state: this.context.state,
|
|
20
|
+
context: this.context.context,
|
|
21
|
+
shouldEvaluateBindings: !0
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
canShowBlock() {
|
|
25
|
+
return i(this.useBlock.hide) ? !this.useBlock.hide : i(this.useBlock.show) ? this.useBlock.show : !0;
|
|
26
|
+
},
|
|
27
|
+
css() {
|
|
28
|
+
var a;
|
|
29
|
+
const e = this.useBlock.responsiveStyles, s = this.context.content, t = p(
|
|
30
|
+
((a = s == null ? void 0 : s.meta) == null ? void 0 : a.breakpoints) || {}
|
|
31
|
+
), l = e == null ? void 0 : e.large, r = e == null ? void 0 : e.medium, c = e == null ? void 0 : e.small, n = this.useBlock.id, m = l ? o({
|
|
32
|
+
className: n,
|
|
33
|
+
styles: l
|
|
34
|
+
}) : "", d = r ? o({
|
|
35
|
+
className: n,
|
|
36
|
+
styles: r,
|
|
37
|
+
mediaQuery: u(
|
|
38
|
+
"medium",
|
|
39
|
+
t
|
|
40
|
+
)
|
|
41
|
+
}) : "", h = c ? o({
|
|
42
|
+
className: n,
|
|
43
|
+
styles: c,
|
|
44
|
+
mediaQuery: u(
|
|
45
|
+
"small",
|
|
46
|
+
t
|
|
47
|
+
)
|
|
48
|
+
}) : "";
|
|
49
|
+
return [m, d, h].join(" ");
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var B = function() {
|
|
54
|
+
var s = this, t = s._self._c;
|
|
55
|
+
return s.TARGET !== "reactNative" && s.css && s.canShowBlock ? t("render-inlined-styles", { attrs: { styles: s.css } }) : s._e();
|
|
56
|
+
}, g = [], v = /* @__PURE__ */ y(
|
|
57
|
+
f,
|
|
58
|
+
B,
|
|
59
|
+
g,
|
|
60
|
+
!1,
|
|
61
|
+
null,
|
|
62
|
+
null,
|
|
63
|
+
null,
|
|
64
|
+
null
|
|
65
|
+
);
|
|
66
|
+
const w = v.exports;
|
|
67
|
+
export {
|
|
68
|
+
w as default
|
|
69
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index.bef62fde.cjs"),m=require("./get-processed-block.d3c744f7.cjs"),h=()=>Promise.resolve().then(()=>require("./render-inlined-styles.c58a27b9.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}),k={name:"block-styles",components:{RenderInlinedStyles:h},props:["block","context"],data(){return{TARGET:t.TARGET}},computed:{useBlock(){return m.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!0})},canShowBlock(){return t.checkIsDefined(this.useBlock.hide)?!this.useBlock.hide:t.checkIsDefined(this.useBlock.show)?this.useBlock.show:!0},css(){var i;const e=this.useBlock.responsiveStyles,s=this.context.content,n=t.getSizesForBreakpoints(((i=s==null?void 0:s.meta)==null?void 0:i.breakpoints)||{}),c=e==null?void 0:e.large,l=e==null?void 0:e.medium,r=e==null?void 0:e.small,o=this.useBlock.id,a=c?t.createCssClass({className:o,styles:c}):"",d=l?t.createCssClass({className:o,styles:l,mediaQuery:t.getMaxWidthQueryForSize("medium",n)}):"",u=r?t.createCssClass({className:o,styles:r,mediaQuery:t.getMaxWidthQueryForSize("small",n)}):"";return[a,d,u].join(" ")}}};var y=function(){var s=this,n=s._self._c;return s.TARGET!=="reactNative"&&s.css&&s.canShowBlock?n("render-inlined-styles",{attrs:{styles:s.css}}):s._e()},p=[],S=t.normalizeComponent(k,y,p,!1,null,null,null,null);const f=S.exports;exports.default=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./index.
|
|
1
|
+
"use strict";const o=require("./index.bef62fde.cjs"),d=(e,r,i)=>{if(Object(e)!==e)return e;const n=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g);return n.slice(0,-1).reduce((t,s,c)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(Number(n[c+1]))>>0===+n[c+1]?[]:{},e)[n[n.length-1]]=i,e};const a=({block:e,context:r,state:i})=>{if(!e.bindings)return e;const n=o.fastClone(e),t={...n,properties:{...n.properties},actions:{...n.actions}};for(const s in e.bindings){const c=e.bindings[s],u=o.evaluate({code:c,state:i,context:r});d(t,s,u)}return t};function f({block:e,context:r,shouldEvaluateBindings:i,state:n}){const t=e;return i?a({block:t,state:n,context:r}):t}exports.getProcessedBlock=f;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";const y="vue2";function p(){return typeof window<"u"&&typeof document<"u"}const A={};function W(t,e){let n=A[t];if(n||(n=A[t]=[]),n.push(e),p()){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 fe=()=>{W("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 he=(t={})=>{var e,n;F||(F=!0,p()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:y,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,l=o.data.arguments||[],a=o.data.id,c=new Function(i);let
|
|
1
|
+
"use strict";const y="vue2";function p(){return typeof window<"u"&&typeof document<"u"}const A={};function W(t,e){let n=A[t];if(n||(n=A[t]=[]),n.push(e),p()){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 fe=()=>{W("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 he=(t={})=>{var e,n;F||(F=!0,p()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:y,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,l=o.data.arguments||[],a=o.data.id,c=new Function(i);let d,m=null;try{d=c.apply(null,l)}catch(u){m=u}m?(s=window.parent)==null||s.postMessage({type:"builder.evaluateError",data:{id:a,error:m.message}},"*"):d&&typeof d.then=="function"?d.then(u=>{var b;(b=window.parent)==null||b.postMessage({type:"builder.evaluateResult",data:{id:a,result:u}},"*")}).catch(console.error):(r=window.parent)==null||r.postMessage({type:"builder.evaluateResult",data:{result:d,id:a}},"*");break}}})))},ge={name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],methods:{filterAttrs:function(e={},n){const o="v-on:";return Object.keys(e).filter(s=>{const r=s.startsWith(o);return n?r:!r}).reduce((s,r)=>({...s,[r.replace(o,"")]:e[r]}),{})}}};function f(t,e,n,o,s,r,i,l){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 c;if(i?(c=function(u){u=u||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!u&&typeof __VUE_SSR_CONTEXT__<"u"&&(u=__VUE_SSR_CONTEXT__),s&&s.call(this,u),u&&u._registeredComponents&&u._registeredComponents.add(i)},a._ssrRegister=c):s&&(c=l?function(){s.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:s),c)if(a.functional){a._injectStyles=c;var d=a.render;a.render=function(b,E){return c.call(E),d(b,E)}}else{var m=a.beforeCreate;a.beforeCreate=m?[].concat(m,c):[c]}return{exports:t,options:a}}var be=function(){var e=this,n=e._self._c;return e.link?n("a",e._g(e._b({attrs:{role:"button",href:e.link,target:e.openLinkInNewTab?"_blank":void 0}},"a",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)),[e._v(" "+e._s(e.text)+" ")]):n("button",e._g(e._b({staticClass:"button-2fnk003dqad"},"button",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)),[e._v(" "+e._s(e.text)+" ")])},ye=[],ve=f(ge,be,ye,!1,null,"3e6fa42c",null,null);const N=ve.exports,x=t=>JSON.parse(JSON.stringify(t)),M={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},_e=(t,e=M)=>`@media (max-width: ${e[t].max}px)`,L=({small:t,medium:e})=>{const n=x(M);if(!t||!e)return n;const o=Math.floor(t/2);n.small={max:t,min:o,default:o+1};const s=n.small.max+1;n.medium={max:e,min:s,default:s+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n},xe=t=>t.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),g=t=>t!=null,z=t=>Object.entries(t).map(([n,o])=>{if(typeof o=="string")return`${xe(n)}: ${o};`}).filter(g),v=t=>z(t).join(`
|
|
2
2
|
`),ke=({mediaQuery:t,className:e,styles:n})=>{const o=`.${e} {
|
|
3
3
|
${v(n)}
|
|
4
4
|
}`;return t?`${t} {
|
|
5
5
|
${o}
|
|
6
|
-
}`:o},Ce=Symbol(),_={Builder:{content:null,context:{},state:{},setState(){},apiKey:null,registeredComponents:{},inheritedStyles:{}},key:Ce},Se=()=>Promise.resolve().then(()=>G).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",t),t}),we=()=>Promise.resolve().then(()=>require("./render-inlined-styles.
|
|
6
|
+
}`:o},Ce=Symbol(),_={Builder:{content:null,context:{},state:{},setState(){},apiKey:null,registeredComponents:{},inheritedStyles:{}},key:Ce},Se=()=>Promise.resolve().then(()=>G).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",t),t}),we=()=>Promise.resolve().then(()=>require("./render-inlined-styles.c58a27b9.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",t),t}),Re={name:"builder-columns",components:{RenderInlinedStyles:we,RenderBlocks:Se},props:["space","columns","stackColumnsAt","reverseColumnsWhenStacked","builderBlock"],data(){return{TARGET:y}},inject:{builderContext:_.key},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)}},columnStyleObjects(){return{columns:{small:{flexDirection:"var(--flex-dir)",alignItems:"stretch"},medium:{flexDirection:"var(--flex-dir-tablet)",alignItems:"stretch"}},column:{small:{width:"var(--column-width) !important",marginLeft:"var(--column-margin-left) !important"},medium:{width:"var(--column-width-tablet) !important",marginLeft:"var(--column-margin-left-tablet) !important"}}}},columnsStyles(){return`
|
|
7
7
|
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
8
8
|
.${this.builderBlock.id}-breakpoints {
|
|
9
9
|
${v(this.columnStyleObjects.columns.medium)}
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
${v(this.columnStyleObjects.column.small)}
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
`},reactNativeColumnsStyles(){return this.columnStyleObjects.columns.small},reactNativeColumnStyles(){return this.columnStyleObjects.column.small}},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"},getWidthForBreakpointSize(t){var n,o;return L(((o=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:o.breakpoints)||{})[t].max},_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 Te=function(){var e=this,n=e._self._c;return n("div",{class:e._classStringToObject(`builder-columns ${e.builderBlock.id}-breakpoints div-29wpyomtntv`),style:{...e.TARGET==="reactNative"?e.reactNativeColumnsStyles:{},...e.columnsCssVars}},[e.TARGET!=="reactNative"?[n("render-inlined-styles",{attrs:{styles:e.columnsStyles}})]:e._e(),e._l(e.columns,function(o,s){return n("div",{key:s,staticClass:"builder-column div-29wpyomtntv-2",style:{width:e.getColumnCssWidth(s),marginLeft:`${s===0?0:e.getGutterSize()}px`,...e.TARGET==="reactNative"?e.reactNativeColumnStyles:{},...e.columnCssVars}},[n("render-blocks",{attrs:{blocks:o.blocks,path:`component.options.columns.${s}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"}}})],1)})],2)},Ie=[],$e=f(Re,Te,Ie,!1,null,"4dd8606b",null,null);const K=$e.exports,Ee={name:"builder-fragment-component",props:[]};var Ae=function(){var e=this,n=e._self._c;return n("span",[e._t("default")],2)},Fe=[],je=f(Ee,Ae,Fe,!1,null,null,null,null);const D=je.exports;function j(t){return t.replace(/http(s)?:/,"")}function Pe(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 Oe(t,e){if(!t||!(t!=null&&t.match(/cdn\.shopify\.com/))||!e)return t;if(e==="master")return j(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 j(`${o[0]}_${r}${s}`)}return null}function C(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=>`${Pe(t,"width",s)} ${s}w`).concat([n]).join(", ")}return t.match(/cdn\.shopify\.com/)?e.map(n=>[Oe(t,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([t]).join(", "):t}const Be={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"),C(e)}else if(this.image&&!this.srcset)return C(e);return C(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 Ue=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}})],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)},Ve=[],We=f(Be,Ue,Ve,!1,null,"76004f06",null,null);const H=We.exports;function Ne(){return p()&&window.self!==window.top}function h(){return Ne()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Me=()=>Promise.resolve().then(()=>require("./block-styles.39cc91ef.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}),Le=()=>Promise.resolve().then(()=>require("./render-block.f934b32f.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}),ze={name:"render-blocks",components:{RenderBlock:Le,BlockStyles:Me},props:["blocks","parent","path","styleProp"],inject:{builderContext:_.key},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 Ke=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)},De=[],He=f(ze,Ke,De,!1,null,"7c56f14d",null,null);const q=He.exports,G=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),qe={name:"Core:Button",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=t=>{const e=t.toString().trim();return`return (${!e.startsWith("function")&&!e.startsWith("(")?"function ":""}${e}).apply(this, arguments)`},Ge={name:"Columns",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(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((l,a)=>l+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}]},Je={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Xe={name:"Image",static:!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(t=>{t.delete("srcset"),t.delete("noWebp");function n(i,l=6e4){return new Promise((a,c)=>{const u=document.createElement("img");let m=!1;u.onload=()=>{m=!0,a(u)},u.addEventListener("error",d=>{console.warn("Image load failed",d.error),c(d.error)}),u.src=i,setTimeout(()=>{m||c(new Error("Image load timed out"))},l)})}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 l=t.get("aspectRatio");t.get("image")===s&&(!l||l===.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}]},Ye={name:"Core:Section",static:!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>"}}}]},Qe={name:"builder-section-component",props:["maxWidth","attributes"],methods:{filterAttrs:function(e={},n){const o="v-on:";return Object.keys(e).filter(s=>{const r=s.startsWith(o);return n?r:!r}).reduce((s,r)=>({...s,[r.replace(o,"")]:e[r]}),{})}}};var Ze=function(){var e=this,n=e._self._c;return n("section",e._g(e._b({style:{width:"100%",alignSelf:"stretch",flexGrow:"1",boxSizing:"border-box",maxWidth:`${e.maxWidth&&typeof e.maxWidth=="number"?e.maxWidth:1200}px`,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},"section",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)),[e._t("default")],2)},et=[],tt=f(Qe,Ze,et,!1,null,null,null,null);const J=tt.exports,nt={name:"Symbol",noWrap:!0,static:!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"}]};function ot(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function st(){const t=ot().fetch;if(typeof t>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
27
|
-
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return t}const X=st(),rt=t=>{if(t==="localhost"||t==="127.0.0.1")return t;const e=t.split(".");return e.length>2?e.slice(1).join("."):t},Y=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);return}},it=t=>t.map(([e,n])=>n?`${e}=${n}`:e).filter(b).join("; "),at=[["secure",""],["SameSite","None"]],lt=({name:t,value:e,expires:n})=>{const s=(p()?location.protocol==="https:":!0)?at:[[]],r=n?[["expires",n.toUTCString()]]:[[]],i=[[t,e],...r,["path","/"],["domain",rt(window.location.hostname)],...s];return it(i)},Q=async({name:t,value:e,expires:n,canTrack:o})=>{try{if(!o)return;const s=lt({name:t,value:e,expires:n});document.cookie=s}catch(s){console.warn("[COOKIE] SET error: ",s)}},ct="builderio.variations",Z=t=>`${ct}.${t}`,dt=({contentId:t,canTrack:e})=>Y({name:Z(t),canTrack:e}),ut=({contentId:t,canTrack:e,value:n})=>Q({name:Z(t),value:n,canTrack:e}),mt=t=>b(t.id)&&b(t.variations)&&Object.keys(t.variations).length>0,pt=({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},P=({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":"")}},ft=async({item:t,canTrack:e})=>{const n=await dt({canTrack:e,contentId:t.id}),o=n?P({item:t,testGroupId:n}):void 0;if(o)return o;{const s=pt({variations:t.variations,id:t.id});return ut({contentId:t.id,value:s,canTrack:e}).catch(r=>{console.error("could not store A/B test variation: ",r)}),P({item:t,testGroupId:s})}},ht=async({item:t,canTrack:e})=>{if(!mt(t))return;const n=await ft({item:t,canTrack:e});Object.assign(t,n)};function S(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,...S(r,i,n)}:{...o,[i]:r}},{})}const O="builder.",gt="options.",ee=t=>{const e={};return t.forEach((n,o)=>{e[o]=n}),e},te=t=>{if(!t)return{};const e=T(t),n={};return Object.keys(e).forEach(o=>{if(o.startsWith(O)){const s=o.replace(O,"").replace(gt,"");n[s]=e[o]}}),n},ne=()=>{if(!p())return{};const t=new URLSearchParams(window.location.search);return te(t)},T=t=>t instanceof URLSearchParams?ee(t):t,bt=t=>{const{limit:e=30,userAttributes:n,query:o,noTraverse:s=!1,model:r,apiKey:i,includeRefs:l=!0,locale:a}=t;if(!i)throw new Error("Missing API key");const c=new URL(`https://cdn.builder.io/api/v2/content/${r}?apiKey=${i}&limit=${e}&noTraverse=${s}&includeRefs=${l}${a?`&locale=${a}`:""}`),u={...ne(),...T(t.options||{})},m=S(u);for(const d in m)c.searchParams.set(d,String(m[d]));if(n&&c.searchParams.set("userAttributes",JSON.stringify(n)),o){const d=S({query:o});for(const g in d)c.searchParams.set(g,JSON.stringify(d[g]))}return c};async function I(t){return(await oe({...t,limit:1})).results[0]||null}async function oe(t){const e=bt(t),o=await(await X(e.href)).json(),s=t.canTrack!==!1;if(s&&Array.isArray(o.results))for(const r of o.results)await ht({item:r,canTrack:s});return o}const yt=()=>Promise.resolve().then(()=>En).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}),vt={name:"builder-symbol",components:{RenderContent:yt},props:["attributes","symbol","dynamic"],data(){return{fetchedContent:null}},inject:{builderContext:_.key},watch:{onUpdateHook0:{handler(){var e;const t=this.symbol;t&&!t.content&&!this.fetchedContent&&t.model&&((e=this.builderContext)==null?void 0:e.apiKey)&&I({model:t.model,apiKey:this.builderContext.apiKey,query:{id:t.entry}}).then(n=>{this.fetchedContent=n})},immediate:!0}},computed:{className(){var t,e;return[...Object.keys(this.attributes.class),"builder-symbol",(t=this.symbol)!=null&&t.inline?"builder-inline-symbol":void 0,((e=this.symbol)==null?void 0:e.dynamic)||this.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},contentToUse(){var t;return((t=this.symbol)==null?void 0:t.content)||this.fetchedContent},onUpdateHook0(){return{0:this.symbol,1:this.fetchedContent}}},methods:{filterAttrs:function(e={},n){const o="v-on:";return Object.keys(e).filter(s=>{const r=s.startsWith(o);return n?r:!r}).reduce((s,r)=>({...s,[r.replace(o,"")]:e[r]}),{})},_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 _t=function(){var o,s,r,i,l;var e=this,n=e._self._c;return n("div",e._g(e._b({class:e._classStringToObject(e.className),attrs:{dataSet:{class:e.className}}},"div",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)),[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:(l=e.symbol)==null?void 0:l.model,content:e.contentToUse}})],1)},xt=[],kt=f(vt,_t,xt,!1,null,null,null,null);const se=kt.exports,Ct={name:"Text",static:!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"}},St={name:"builder-text",props:["text"]};var wt=function(){var e=this,n=e._self._c;return n("span",{staticClass:"builder-text",domProps:{innerHTML:e._s(e.text)}})},Rt=[],Tt=f(St,wt,Rt,!1,null,null,null,null);const re=Tt.exports,It={name:"Video",canHaveChildren:!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}]},$t={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 Et=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))},At=[],Ft=f($t,Et,At,!1,null,null,null,null);const ie=Ft.exports,jt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:k(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}]},Pt=["text/javascript","application/javascript","application/ecmascript"],Ot=t=>Pt.includes(t.type),Bt={name:"builder-embed",props:["content"],data(){return{scriptsInserted:[],scriptsRun:[],ranInitFn:!1}},watch:{onUpdateHook0:{handler(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())},immediate:!0}},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(Ot(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 Ut=function(){var e=this,n=e._self._c;return n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:e._s(e.content)}})},Vt=[],Wt=f(Bt,Ut,Vt,!1,null,null,null,null);const Nt=Wt.exports,Mt={name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:h}},methods:{filterAttrs:function(e={},n){const o="v-on:";return Object.keys(e).filter(s=>{const r=s.startsWith(o);return n?r:!r}).reduce((s,r)=>({...s,[r.replace(o,"")]:e[r]}),{})}}};var Lt=function(){var e=this,n=e._self._c;return n("img",e._g(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.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)))},zt=[],Kt=f(Mt,Lt,zt,!1,null,null,null,null);const Dt=Kt.exports,Ht={name:"Raw:Img",hideFromInsertMenu:!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},qt={name:"builder-custom-code",props:["replaceNodes","code"],data(){return{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 Gt=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)}})},Jt=[],Xt=f(qt,Gt,Jt,!1,null,null,null,null);const Yt=Xt.exports,Qt={name:"Custom Code",static:!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}]},Zt=()=>[{component:N,...qe},{component:K,...Ge},{component:Yt,...Qt},{component:Nt,...jt},{component:D,...Je},{component:H,...Xe},{component:Dt,...Ht},{component:J,...Ye},{component:se,...nt},{component:re,...Ct},{component:ie,...It}];function w({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:p(),isServer:!p()},l=s&&!(t.includes(";")||t.includes(" return ")||t.trim().startsWith("return "))?`return (${t});`:t;try{return new Function("builder","Builder","state","context","event",l)(r,r,n,e,o)}catch(a){console.warn(`Builder custom code error:
|
|
26
|
+
`},reactNativeColumnsStyles(){return this.columnStyleObjects.columns.small},reactNativeColumnStyles(){return this.columnStyleObjects.column.small}},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"},getWidthForBreakpointSize(t){var n,o;return L(((o=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:o.breakpoints)||{})[t].max},_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 Te=function(){var e=this,n=e._self._c;return n("div",{class:e._classStringToObject(`builder-columns ${e.builderBlock.id}-breakpoints div-2brhoa1k8gd`),style:{...e.TARGET==="reactNative"?e.reactNativeColumnsStyles:{},...e.columnsCssVars}},[e.TARGET!=="reactNative"?[n("render-inlined-styles",{attrs:{styles:e.columnsStyles}})]:e._e(),e._l(e.columns,function(o,s){return n("div",{key:s,staticClass:"builder-column div-2brhoa1k8gd-2",style:{width:e.getColumnCssWidth(s),marginLeft:`${s===0?0:e.getGutterSize()}px`,...e.TARGET==="reactNative"?e.reactNativeColumnStyles:{},...e.columnCssVars}},[n("render-blocks",{attrs:{blocks:o.blocks,path:`component.options.columns.${s}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"}}})],1)})],2)},Ie=[],$e=f(Re,Te,Ie,!1,null,"4e30ecf8",null,null);const K=$e.exports,Ee={name:"builder-fragment-component",props:[]};var Ae=function(){var e=this,n=e._self._c;return n("span",[e._t("default")],2)},Fe=[],je=f(Ee,Ae,Fe,!1,null,null,null,null);const D=je.exports;function j(t){return t.replace(/http(s)?:/,"")}function Pe(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 Oe(t,e){if(!t||!(t!=null&&t.match(/cdn\.shopify\.com/))||!e)return t;if(e==="master")return j(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 j(`${o[0]}_${r}${s}`)}return null}function C(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=>`${Pe(t,"width",s)} ${s}w`).concat([n]).join(", ")}return t.match(/cdn\.shopify\.com/)?e.map(n=>[Oe(t,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([t]).join(", "):t}const Be={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"),C(e)}else if(this.image&&!this.srcset)return C(e);return C(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 Ue=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-20351ewpue7"),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}})],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-20351ewpue7",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-20351ewpue7-2"},[e._t("default")],2)]:e._e()],2)},Ve=[],We=f(Be,Ue,Ve,!1,null,"893a0f79",null,null);const H=We.exports;function Ne(){return p()&&window.self!==window.top}function h(){return Ne()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Me=()=>Promise.resolve().then(()=>require("./block-styles.f25ea71f.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}),Le=()=>Promise.resolve().then(()=>require("./render-block.8a810b21.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}),ze={name:"render-blocks",components:{RenderBlock:Le,BlockStyles:Me},props:["blocks","parent","path","styleProp"],inject:{builderContext:_.key},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 Ke=function(){var e=this,n=e._self._c;return n("div",{class:e._classStringToObject(e.className+" div-21azgz5avex"),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)},De=[],He=f(ze,Ke,De,!1,null,"7d4553c5",null,null);const q=He.exports,G=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),qe={name:"Core:Button",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=t=>{const e=t.toString().trim();return`return (${!e.startsWith("function")&&!e.startsWith("(")?"function ":""}${e}).apply(this, arguments)`},Ge={name:"Columns",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(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((l,a)=>l+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}]},Je={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Xe={name:"Image",static:!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(t=>{t.delete("srcset"),t.delete("noWebp");function n(i,l=6e4){return new Promise((a,c)=>{const d=document.createElement("img");let m=!1;d.onload=()=>{m=!0,a(d)},d.addEventListener("error",u=>{console.warn("Image load failed",u.error),c(u.error)}),d.src=i,setTimeout(()=>{m||c(new Error("Image load timed out"))},l)})}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 l=t.get("aspectRatio");t.get("image")===s&&(!l||l===.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}]},Ye={name:"Core:Section",static:!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>"}}}]},Qe={name:"builder-section-component",props:["maxWidth","attributes"],methods:{filterAttrs:function(e={},n){const o="v-on:";return Object.keys(e).filter(s=>{const r=s.startsWith(o);return n?r:!r}).reduce((s,r)=>({...s,[r.replace(o,"")]:e[r]}),{})}}};var Ze=function(){var e=this,n=e._self._c;return n("section",e._g(e._b({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},"section",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)),[e._t("default")],2)},et=[],tt=f(Qe,Ze,et,!1,null,null,null,null);const J=tt.exports,nt={name:"Symbol",noWrap:!0,static:!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"}]};function ot(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function st(){const t=ot().fetch;if(typeof t>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
27
|
+
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return t}const X=st(),rt=t=>{if(t==="localhost"||t==="127.0.0.1")return t;const e=t.split(".");return e.length>2?e.slice(1).join("."):t},Y=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);return}},it=t=>t.map(([e,n])=>n?`${e}=${n}`:e).filter(g).join("; "),at=[["secure",""],["SameSite","None"]],lt=({name:t,value:e,expires:n})=>{const s=(p()?location.protocol==="https:":!0)?at:[[]],r=n?[["expires",n.toUTCString()]]:[[]],i=[[t,e],...r,["path","/"],["domain",rt(window.location.hostname)],...s];return it(i)},Q=async({name:t,value:e,expires:n,canTrack:o})=>{try{if(!o)return;const s=lt({name:t,value:e,expires:n});document.cookie=s}catch(s){console.warn("[COOKIE] SET error: ",s)}},ct="builderio.variations",Z=t=>`${ct}.${t}`,ut=({contentId:t,canTrack:e})=>Y({name:Z(t),canTrack:e}),dt=({contentId:t,canTrack:e,value:n})=>Q({name:Z(t),value:n,canTrack:e}),mt=t=>g(t.id)&&g(t.variations)&&Object.keys(t.variations).length>0,pt=({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},P=({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":"")}},ft=async({item:t,canTrack:e})=>{const n=await ut({canTrack:e,contentId:t.id}),o=n?P({item:t,testGroupId:n}):void 0;if(o)return o;{const s=pt({variations:t.variations,id:t.id});return dt({contentId:t.id,value:s,canTrack:e}).catch(r=>{console.error("could not store A/B test variation: ",r)}),P({item:t,testGroupId:s})}},ht=async({item:t,canTrack:e})=>{if(!mt(t))return;const n=await ft({item:t,canTrack:e});Object.assign(t,n)};function S(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,...S(r,i,n)}:{...o,[i]:r}},{})}const O="builder.",gt="options.",ee=t=>{const e={};return t.forEach((n,o)=>{e[o]=n}),e},te=t=>{if(!t)return{};const e=T(t),n={};return Object.keys(e).forEach(o=>{if(o.startsWith(O)){const s=o.replace(O,"").replace(gt,"");n[s]=e[o]}}),n},ne=()=>{if(!p())return{};const t=new URLSearchParams(window.location.search);return te(t)},T=t=>t instanceof URLSearchParams?ee(t):t,bt=t=>{const{limit:e=30,userAttributes:n,query:o,noTraverse:s=!1,model:r,apiKey:i,includeRefs:l=!0,locale:a}=t;if(!i)throw new Error("Missing API key");const c=new URL(`https://cdn.builder.io/api/v2/content/${r}?apiKey=${i}&limit=${e}&noTraverse=${s}&includeRefs=${l}${a?`&locale=${a}`:""}`),d={...ne(),...T(t.options||{})},m=S(d);for(const u in m)c.searchParams.set(u,String(m[u]));if(n&&c.searchParams.set("userAttributes",JSON.stringify(n)),o){const u=S({query:o});for(const b in u)c.searchParams.set(b,JSON.stringify(u[b]))}return c};async function I(t){return(await oe({...t,limit:1})).results[0]||null}async function oe(t){const e=bt(t),o=await(await X(e.href)).json(),s=t.canTrack!==!1;if(s&&Array.isArray(o.results))for(const r of o.results)await ht({item:r,canTrack:s});return o}const yt=()=>Promise.resolve().then(()=>En).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}),vt={name:"builder-symbol",components:{RenderContent:yt},props:["attributes","symbol","dynamic"],data(){return{fetchedContent:null}},inject:{builderContext:_.key},watch:{onUpdateHook0:{handler(){var e;const t=this.symbol;t&&!t.content&&!this.fetchedContent&&t.model&&((e=this.builderContext)==null?void 0:e.apiKey)&&I({model:t.model,apiKey:this.builderContext.apiKey,query:{id:t.entry}}).then(n=>{this.fetchedContent=n})},immediate:!0}},computed:{className(){var t,e;return[...Object.keys(this.attributes.class),"builder-symbol",(t=this.symbol)!=null&&t.inline?"builder-inline-symbol":void 0,((e=this.symbol)==null?void 0:e.dynamic)||this.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},contentToUse(){var t;return((t=this.symbol)==null?void 0:t.content)||this.fetchedContent},onUpdateHook0(){return{0:this.symbol,1:this.fetchedContent}}},methods:{filterAttrs:function(e={},n){const o="v-on:";return Object.keys(e).filter(s=>{const r=s.startsWith(o);return n?r:!r}).reduce((s,r)=>({...s,[r.replace(o,"")]:e[r]}),{})},_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 _t=function(){var o,s,r,i,l;var e=this,n=e._self._c;return n("div",e._g(e._b({class:e._classStringToObject(e.className),attrs:{dataSet:{class:e.className}}},"div",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)),[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:(l=e.symbol)==null?void 0:l.model,content:e.contentToUse}})],1)},xt=[],kt=f(vt,_t,xt,!1,null,null,null,null);const se=kt.exports,Ct={name:"Text",static:!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"}},St={name:"builder-text",props:["text"]};var wt=function(){var e=this,n=e._self._c;return n("span",{staticClass:"builder-text",domProps:{innerHTML:e._s(e.text)}})},Rt=[],Tt=f(St,wt,Rt,!1,null,null,null,null);const re=Tt.exports,It={name:"Video",canHaveChildren:!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}]},$t={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 Et=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))},At=[],Ft=f($t,Et,At,!1,null,null,null,null);const ie=Ft.exports,jt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:k(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}]},Pt=["text/javascript","application/javascript","application/ecmascript"],Ot=t=>Pt.includes(t.type),Bt={name:"builder-embed",props:["content"],data(){return{scriptsInserted:[],scriptsRun:[],ranInitFn:!1}},watch:{onUpdateHook0:{handler(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())},immediate:!0}},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(Ot(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 Ut=function(){var e=this,n=e._self._c;return n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:e._s(e.content)}})},Vt=[],Wt=f(Bt,Ut,Vt,!1,null,null,null,null);const Nt=Wt.exports,Mt={name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:h}},methods:{filterAttrs:function(e={},n){const o="v-on:";return Object.keys(e).filter(s=>{const r=s.startsWith(o);return n?r:!r}).reduce((s,r)=>({...s,[r.replace(o,"")]:e[r]}),{})}}};var Lt=function(){var e=this,n=e._self._c;return n("img",e._g(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.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)))},zt=[],Kt=f(Mt,Lt,zt,!1,null,null,null,null);const Dt=Kt.exports,Ht={name:"Raw:Img",hideFromInsertMenu:!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},qt={name:"builder-custom-code",props:["replaceNodes","code"],data(){return{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 Gt=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)}})},Jt=[],Xt=f(qt,Gt,Jt,!1,null,null,null,null);const Yt=Xt.exports,Qt={name:"Custom Code",static:!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}]},Zt=()=>[{component:N,...qe},{component:K,...Ge},{component:Yt,...Qt},{component:Nt,...jt},{component:D,...Je},{component:H,...Xe},{component:Dt,...Ht},{component:J,...Ye},{component:se,...nt},{component:re,...Ct},{component:ie,...It}];function w({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:p(),isServer:!p()},l=s&&!(t.includes(";")||t.includes(" return ")||t.trim().startsWith("return "))?`return (${t});`:t;try{return new Function("builder","Builder","state","context","event",l)(r,r,n,e,o)}catch(a){console.warn(`Builder custom code error:
|
|
28
28
|
While Evaluating:
|
|
29
29
|
`,l,`
|
|
30
|
-
`,a)}}function ae(){return!p()||h()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const $=[];function en(t,e){return $.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 le=({component:t,...e})=>({type:"builder.registerComponent",data:nn(e)}),tn=t=>typeof t=="function"?k(t):x(t),nn=({inputs:t,...e})=>({...x(e),inputs:t==null?void 0:t.map(n=>Object.entries(n).reduce((o,[s,r])=>({...o,[s]:tn(r)}),{}))});function on(){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 ce(){return on().replace(/-/g,"")}const de="builderSessionId",sn=async({canTrack:t})=>{if(!t)return;const e=await Y({name:de,canTrack:t});if(b(e))return e;{const n=rn();return an({id:n,canTrack:t}),n}},rn=()=>ce(),an=({id:t,canTrack:e})=>Q({name:de,value:t,canTrack:e}),ue=()=>p()&&typeof localStorage<"u"?localStorage:void 0,ln=({key:t,canTrack:e})=>{var n;try{return e?(n=ue())==null?void 0:n.getItem(t):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},cn=({key:t,canTrack:e,value:n})=>{var o;try{e&&((o=ue())==null||o.setItem(t,n))}catch(s){console.debug("[LocalStorage] SET error: ",s)}},me="builderVisitorId",dn=({canTrack:t})=>{if(!t)return;const e=ln({key:me,canTrack:t});if(b(e))return e;{const n=un();return mn({id:n,canTrack:t}),n}},un=()=>ce(),mn=({id:t,canTrack:e})=>cn({key:me,value:t,canTrack:e}),pn=()=>{if(p()){const t=new URL(location.href);return t.pathname===""&&(t.pathname="/"),t}else return console.warn("Cannot get location for tracking in non-browser environment"),null},fn=()=>typeof navigator=="object"&&navigator.userAgent||"",hn=()=>{const t=fn(),e={Android(){return t.match(/Android/i)},BlackBerry(){return t.match(/BlackBerry/i)},iOS(){return t.match(/iPhone|iPod/i)},Opera(){return t.match(/Opera Mini/i)},Windows(){return t.match(/IEMobile/i)||t.match(/WPDesktop/i)},any(){return e.Android()||e.BlackBerry()||e.iOS()||e.Opera()||e.Windows()||y==="reactNative"}},n=t.match(/Tablet|iPad/i),o=pn();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":e.any()?"mobile":"desktop"}},gn=async({canTrack:t})=>{if(!t)return{visitorId:void 0,sessionId:void 0};const e=await sn({canTrack:t}),n=dn({canTrack:t});return{sessionId:e,visitorId:n}},bn=async({type:t,canTrack:e,apiKey:n,metadata:o,...s})=>({type:t,data:{...s,metadata:{url:location.href,...o},...await gn({canTrack:e}),userAttributes:hn(),ownerId:n}});async function R(t){if(!t.apiKey){console.error("[Builder.io]: Missing API key for track call. Please provide your API key.");return}if(!!t.canTrack&&!h()&&!!(p()||y==="reactNative"))return fetch("https://builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await bn(t)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(e=>{console.error("Failed to track: ",e)})}const yn=t=>R({...t,canTrack:!0});function B(t){return Math.round(t*1e3)/1e3}const vn=(t,e,n=!0)=>{if(!(t instanceof HTMLElement))return null;let o=n?t:t.parentElement;do{if(!o)return null;if(e(o))return o}while(o=o.parentElement);return null},_n=t=>vn(t,e=>{const n=e.getAttribute("builder-id")||e.id;return Boolean((n==null?void 0:n.indexOf("builder-"))===0)}),U=({event:t,target:e})=>{const n=e.getBoundingClientRect(),o=t.clientX-n.left,s=t.clientY-n.top,r=B(o/n.width),i=B(s/n.height);return{x:r,y:i}},xn=t=>{const e=t.target,n=e&&_n(e),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:e?U({event:t,target:e}):void 0,builderTargetOffset:n?U({event:t,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},kn=({content:t,data:e,locale:n})=>{var r,i,l;const o={};(i=(r=t==null?void 0:t.data)==null?void 0:r.inputs)==null||i.forEach(a=>{var c;a.name&&a.defaultValue!==void 0&&((c=t==null?void 0:t.data)==null?void 0:c.state)&&t.data.state[a.name]===void 0&&(o[a.name]=a.defaultValue)});const s={...(l=t==null?void 0:t.data)==null?void 0:l.state,...e,...n?{locale:n}:{}};return{...o,...s}},Cn=({content:t,data:e})=>t?{...t,data:{...t==null?void 0:t.data,...e},meta:t==null?void 0:t.meta}:void 0,Sn=()=>Promise.resolve().then(()=>G).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",t),t}),wn=()=>Promise.resolve().then(()=>require("./render-styles.f5c763be.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}),Rn={name:"render-content",components:{RenderContentStyles:wn,RenderBlocks:Sn},props:["content","data","canTrack","locale","customComponents","model","context","apiKey","includeRefs"],data(){return{forceReRenderCount:0,overrideContent:null,useContent:Cn({content:this.content,data:this.data}),update:0,canTrackToUse:b(this.canTrack)?this.canTrack:!0,contentState:kn({content:this.content,data:this.data,locale:this.locale}),allRegisteredComponents:[...Zt(),...$,...this.customComponents||[]].reduce((t,e)=>({...t,[e.name]:e}),{}),httpReqsData:{},clicked:!1}},provide(){const t=this;return{[_.key]:{content:t.useContent,state:t.contentState,setState:t.setContextState,context:t.context||{},apiKey:t.apiKey,registeredComponents: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."),p()){if(h()&&(this.forceReRenderCount=this.forceReRenderCount+1,fe(),he({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{}}),Object.values(this.allRegisteredComponents).forEach(n=>{var s;const o=le(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;R({type:"impression",canTrack:this.canTrackToUse,contentId:o,apiKey:this.apiKey,variationId:n!==o?n:void 0})}if(ae()){const n=new URL(location.href).searchParams,o=n.get("builder.preview"),s=n.get("apiKey")||n.get("builder.space");o===this.model&&s===this.apiKey&&I({model:this.model,apiKey:this.apiKey}).then(r=>{r&&this.mergeNewContent(r)})}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook1:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook2:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){p()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{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))&&y!=="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:{mergeNewContent(t){var e,n,o,s,r;this.useContent={...this.useContent,...t,data:{...(e=this.useContent)==null?void 0:e.data,...t==null?void 0:t.data},meta:{...(n=this.useContent)==null?void 0:n.meta,...t==null?void 0:t.meta,breakpoints:((o=t==null?void 0:t.meta)==null?void 0:o.breakpoints)||((r=(s=this.useContent)==null?void 0:s.meta)==null?void 0:r.breakpoints)}}},setBreakpoints(t){var e;this.useContent={...this.useContent,meta:{...(e=this.useContent)==null?void 0:e.meta,breakpoints:t}}},setContextState(t){this.contentState=t},processMessage(t){var n;const{data:e}=t;if(e)switch(e.type){case"builder.configureSdk":{const o=e.data,{breakpoints:s,contentId:r}=o;if(!r||r!==((n=this.useContent)==null?void 0:n.id))return;s&&this.setBreakpoints(s),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const o=e.data,s=o.key||o.alias||o.entry||o.modelName,r=o.data;s===this.model&&(this.mergeNewContent(r),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&&w({code:t,context:this.context||{},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;R({type:"click",canTrack:this.canTrackToUse,contentId:s,apiKey:this.apiKey,variationId:o!==s?o:void 0,...xn(t),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(t){return t.replace(/{{([^}]+)}}/g,(e,n)=>w({code:n,context:this.context||{},state:this.contentState}))},handleRequest({url:t,key:e}){X(t).then(n=>n.json()).then(n=>{const o={...this.contentState,[e]:n};this.setContextState(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 Tn=function(){var o,s,r,i,l,a,c,u;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(m){return e.onClick(m)}}},[e.shouldRenderContentStyles?[n("render-content-styles",{attrs:{contentId:(s=e.useContent)==null?void 0:s.id,cssCode:(i=(r=e.useContent)==null?void 0:r.data)==null?void 0:i.cssCode,customFonts:(a=(l=e.useContent)==null?void 0:l.data)==null?void 0:a.customFonts}})]:e._e(),n("render-blocks",{key:e.forceReRenderCount,attrs:{blocks:(u=(c=e.useContent)==null?void 0:c.data)==null?void 0:u.blocks}})],2):e._e()},In=[],$n=f(Rn,Tn,In,!1,null,null,null,null);const pe=$n.exports,En=Object.freeze(Object.defineProperty({__proto__:null,default:pe},Symbol.toStringTag,{value:"Module"})),V={};function An(t){if(p()){Object.assign(V,t);const e={type:"builder.settingsChange",data:V};parent.postMessage(e,"*")}}exports.BuilderContext=_;exports.Button=N;exports.Columns=K;exports.Fragment=D;exports.Image=H;exports.Section=J;exports.Symbol=se;exports.TARGET=y;exports.Text=re;exports.Video=ie;exports.components=$;exports.convertSearchParamsToQueryObject=ee;exports.convertStyleMapToCSSArray=z;exports.createCssClass=ke;exports.createRegisterComponentMessage=le;exports.evaluate=w;exports.fastClone=x;exports.getAllContent=oe;exports.getBuilderSearchParams=te;exports.getBuilderSearchParamsFromWindow=ne;exports.getContent=I;exports.getMaxWidthQueryForSize=_e;exports.getSizesForBreakpoints=L;exports.isEditing=h;exports.isPreviewing=ae;exports.normalizeComponent=f;exports.normalizeSearchParams=T;exports.register=W;exports.registerComponent=en;exports.renderBlocks=q;exports.renderContent=pe;exports.setEditorSettings=An;exports.track=yn;
|
|
30
|
+
`,a)}}function ae(){return!p()||h()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const $=[];function en(t,e){return $.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 le=({component:t,...e})=>({type:"builder.registerComponent",data:nn(e)}),tn=t=>typeof t=="function"?k(t):x(t),nn=({inputs:t,...e})=>({...x(e),inputs:t==null?void 0:t.map(n=>Object.entries(n).reduce((o,[s,r])=>({...o,[s]:tn(r)}),{}))});function on(){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 ce(){return on().replace(/-/g,"")}const ue="builderSessionId",sn=async({canTrack:t})=>{if(!t)return;const e=await Y({name:ue,canTrack:t});if(g(e))return e;{const n=rn();return an({id:n,canTrack:t}),n}},rn=()=>ce(),an=({id:t,canTrack:e})=>Q({name:ue,value:t,canTrack:e}),de=()=>p()&&typeof localStorage<"u"?localStorage:void 0,ln=({key:t,canTrack:e})=>{var n;try{return e?(n=de())==null?void 0:n.getItem(t):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},cn=({key:t,canTrack:e,value:n})=>{var o;try{e&&((o=de())==null||o.setItem(t,n))}catch(s){console.debug("[LocalStorage] SET error: ",s)}},me="builderVisitorId",un=({canTrack:t})=>{if(!t)return;const e=ln({key:me,canTrack:t});if(g(e))return e;{const n=dn();return mn({id:n,canTrack:t}),n}},dn=()=>ce(),mn=({id:t,canTrack:e})=>cn({key:me,value:t,canTrack:e}),pn=()=>{if(p()){const t=new URL(location.href);return t.pathname===""&&(t.pathname="/"),t}else return console.warn("Cannot get location for tracking in non-browser environment"),null},fn=()=>typeof navigator=="object"&&navigator.userAgent||"",hn=()=>{const t=fn(),e={Android(){return t.match(/Android/i)},BlackBerry(){return t.match(/BlackBerry/i)},iOS(){return t.match(/iPhone|iPod/i)},Opera(){return t.match(/Opera Mini/i)},Windows(){return t.match(/IEMobile/i)||t.match(/WPDesktop/i)},any(){return e.Android()||e.BlackBerry()||e.iOS()||e.Opera()||e.Windows()||y==="reactNative"}},n=t.match(/Tablet|iPad/i),o=pn();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":e.any()?"mobile":"desktop"}},gn=async({canTrack:t})=>{if(!t)return{visitorId:void 0,sessionId:void 0};const e=await sn({canTrack:t}),n=un({canTrack:t});return{sessionId:e,visitorId:n}},bn=async({type:t,canTrack:e,apiKey:n,metadata:o,...s})=>({type:t,data:{...s,metadata:{url:location.href,...o},...await gn({canTrack:e}),userAttributes:hn(),ownerId:n}});async function R(t){if(!t.apiKey){console.error("[Builder.io]: Missing API key for track call. Please provide your API key.");return}if(!!t.canTrack&&!h()&&!!(p()||y==="reactNative"))return fetch("https://builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await bn(t)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(e=>{console.error("Failed to track: ",e)})}const yn=t=>R({...t,canTrack:!0});function B(t){return Math.round(t*1e3)/1e3}const vn=(t,e,n=!0)=>{if(!(t instanceof HTMLElement))return null;let o=n?t:t.parentElement;do{if(!o)return null;if(e(o))return o}while(o=o.parentElement);return null},_n=t=>vn(t,e=>{const n=e.getAttribute("builder-id")||e.id;return Boolean((n==null?void 0:n.indexOf("builder-"))===0)}),U=({event:t,target:e})=>{const n=e.getBoundingClientRect(),o=t.clientX-n.left,s=t.clientY-n.top,r=B(o/n.width),i=B(s/n.height);return{x:r,y:i}},xn=t=>{const e=t.target,n=e&&_n(e),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:e?U({event:t,target:e}):void 0,builderTargetOffset:n?U({event:t,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},kn=({content:t,data:e,locale:n})=>{var r,i,l;const o={};(i=(r=t==null?void 0:t.data)==null?void 0:r.inputs)==null||i.forEach(a=>{var c;a.name&&a.defaultValue!==void 0&&((c=t==null?void 0:t.data)==null?void 0:c.state)&&t.data.state[a.name]===void 0&&(o[a.name]=a.defaultValue)});const s={...(l=t==null?void 0:t.data)==null?void 0:l.state,...e,...n?{locale:n}:{}};return{...o,...s}},Cn=({content:t,data:e})=>t?{...t,data:{...t==null?void 0:t.data,...e},meta:t==null?void 0:t.meta}:void 0,Sn=()=>Promise.resolve().then(()=>G).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",t),t}),wn=()=>Promise.resolve().then(()=>require("./render-styles.1c71bf0a.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}),Rn={name:"render-content",components:{RenderContentStyles:wn,RenderBlocks:Sn},props:["content","data","canTrack","locale","customComponents","model","context","apiKey","includeRefs"],data(){return{forceReRenderCount:0,overrideContent:null,useContent:Cn({content:this.content,data:this.data}),update:0,canTrackToUse:g(this.canTrack)?this.canTrack:!0,contentState:kn({content:this.content,data:this.data,locale:this.locale}),allRegisteredComponents:[...Zt(),...$,...this.customComponents||[]].reduce((t,e)=>({...t,[e.name]:e}),{}),httpReqsData:{},clicked:!1}},provide(){const t=this;return{[_.key]:{content:t.useContent,state:t.contentState,setState:t.setContextState,context:t.context||{},apiKey:t.apiKey,registeredComponents: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."),p()){if(h()&&(this.forceReRenderCount=this.forceReRenderCount+1,fe(),he({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{}}),Object.values(this.allRegisteredComponents).forEach(n=>{var s;const o=le(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;R({type:"impression",canTrack:this.canTrackToUse,contentId:o,apiKey:this.apiKey,variationId:n!==o?n:void 0})}if(ae()){const n=new URL(location.href).searchParams,o=n.get("builder.preview"),s=n.get("apiKey")||n.get("builder.space");o===this.model&&s===this.apiKey&&I({model:this.model,apiKey:this.apiKey}).then(r=>{r&&this.mergeNewContent(r)})}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook1:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook2:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){p()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{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))&&y!=="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:{mergeNewContent(t){var e,n,o,s,r;this.useContent={...this.useContent,...t,data:{...(e=this.useContent)==null?void 0:e.data,...t==null?void 0:t.data},meta:{...(n=this.useContent)==null?void 0:n.meta,...t==null?void 0:t.meta,breakpoints:((o=t==null?void 0:t.meta)==null?void 0:o.breakpoints)||((r=(s=this.useContent)==null?void 0:s.meta)==null?void 0:r.breakpoints)}}},setBreakpoints(t){var e;this.useContent={...this.useContent,meta:{...(e=this.useContent)==null?void 0:e.meta,breakpoints:t}}},setContextState(t){this.contentState=t},processMessage(t){var n;const{data:e}=t;if(e)switch(e.type){case"builder.configureSdk":{const o=e.data,{breakpoints:s,contentId:r}=o;if(!r||r!==((n=this.useContent)==null?void 0:n.id))return;s&&this.setBreakpoints(s),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const o=e.data,s=o.key||o.alias||o.entry||o.modelName,r=o.data;s===this.model&&(this.mergeNewContent(r),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&&w({code:t,context:this.context||{},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;R({type:"click",canTrack:this.canTrackToUse,contentId:s,apiKey:this.apiKey,variationId:o!==s?o:void 0,...xn(t),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(t){return t.replace(/{{([^}]+)}}/g,(e,n)=>w({code:n,context:this.context||{},state:this.contentState}))},handleRequest({url:t,key:e}){X(t).then(n=>n.json()).then(n=>{const o={...this.contentState,[e]:n};this.setContextState(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 Tn=function(){var o,s,r,i,l,a,c,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(m){return e.onClick(m)}}},[e.shouldRenderContentStyles?[n("render-content-styles",{attrs:{contentId:(s=e.useContent)==null?void 0:s.id,cssCode:(i=(r=e.useContent)==null?void 0:r.data)==null?void 0:i.cssCode,customFonts:(a=(l=e.useContent)==null?void 0:l.data)==null?void 0:a.customFonts}})]:e._e(),n("render-blocks",{key:e.forceReRenderCount,attrs:{blocks:(d=(c=e.useContent)==null?void 0:c.data)==null?void 0:d.blocks}})],2):e._e()},In=[],$n=f(Rn,Tn,In,!1,null,null,null,null);const pe=$n.exports,En=Object.freeze(Object.defineProperty({__proto__:null,default:pe},Symbol.toStringTag,{value:"Module"})),V={};function An(t){if(p()){Object.assign(V,t);const e={type:"builder.settingsChange",data:V};parent.postMessage(e,"*")}}exports.BuilderContext=_;exports.Button=N;exports.Columns=K;exports.Fragment=D;exports.Image=H;exports.Section=J;exports.Symbol=se;exports.TARGET=y;exports.Text=re;exports.Video=ie;exports.checkIsDefined=g;exports.components=$;exports.convertSearchParamsToQueryObject=ee;exports.convertStyleMapToCSSArray=z;exports.createCssClass=ke;exports.createRegisterComponentMessage=le;exports.evaluate=w;exports.fastClone=x;exports.getAllContent=oe;exports.getBuilderSearchParams=te;exports.getBuilderSearchParamsFromWindow=ne;exports.getContent=I;exports.getMaxWidthQueryForSize=_e;exports.getSizesForBreakpoints=L;exports.isEditing=h;exports.isPreviewing=ae;exports.normalizeComponent=f;exports.normalizeSearchParams=T;exports.register=W;exports.registerComponent=en;exports.renderBlocks=q;exports.renderContent=pe;exports.setEditorSettings=An;exports.track=yn;
|