@builder.io/sdk-vue 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.cacb4849.cjs → block-styles.aaf62526.cjs} +1 -1
- package/packages/_vue2/dist/{block-styles.6a1d7394.js → block-styles.c38fdaef.js} +4 -4
- package/packages/_vue2/dist/{css.49cc4003.js → css.377600fa.js} +2 -2
- package/packages/{_vue3/dist/css.627e21ae.cjs → _vue2/dist/css.4a664d41.cjs} +1 -1
- package/packages/_vue2/dist/{evaluate.6ab6e7cb.js → evaluate.d2d16952.js} +1 -1
- package/packages/_vue2/dist/{evaluate.7d21bb04.cjs → evaluate.d837a845.cjs} +2 -2
- package/packages/_vue2/dist/{index.2473a355.js → index.1074d675.js} +102 -102
- package/packages/_vue2/dist/{index.95d9006f.cjs → index.3d5a7a37.cjs} +6 -6
- package/packages/_vue2/dist/{render-block.22052bd8.js → render-block.1ec27d4d.js} +6 -6
- package/packages/_vue2/dist/{render-block.9342f7b5.cjs → render-block.43f24cc4.cjs} +2 -2
- package/packages/_vue2/dist/{render-component.ec485884.js → render-component.82a8e6f7.js} +3 -3
- package/packages/_vue2/dist/{render-component.f3cccaa9.cjs → render-component.ba549c84.cjs} +1 -1
- package/packages/_vue2/dist/{render-content.d53085e5.cjs → render-content.2c57f5bb.cjs} +1 -1
- package/packages/_vue2/dist/{render-content.a6b17a6c.js → render-content.3afd4a46.js} +5 -5
- package/packages/_vue2/dist/{render-inlined-styles.b322c74a.cjs → render-inlined-styles.1ed1b531.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.2286ef7c.js → render-inlined-styles.f76aba42.js} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.253c96e6.cjs → render-repeated-block.625e26fc.cjs} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.ac4f1559.js → render-repeated-block.d3c2411b.js} +2 -2
- package/packages/_vue2/dist/{render-styles.a148b748.js → render-styles.7b01db22.js} +2 -2
- package/packages/_vue2/dist/{render-styles.0cb949b0.cjs → render-styles.f1413001.cjs} +3 -3
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +1 -1
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +0 -9
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/sdk.cjs +72 -1
- package/packages/_vue3/dist/sdk.js +3251 -22
- package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +0 -9
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/css.c26b7ab4.cjs +0 -6
- package/packages/_vue3/dist/block-styles.5b949efb.cjs +0 -1
- package/packages/_vue3/dist/block-styles.e91165b8.js +0 -72
- package/packages/_vue3/dist/css.41ed2294.js +0 -75
- package/packages/_vue3/dist/evaluate.0662f166.js +0 -63
- package/packages/_vue3/dist/evaluate.da45a33b.cjs +0 -4
- package/packages/_vue3/dist/index.3a561c6a.js +0 -1394
- package/packages/_vue3/dist/index.3e17c057.cjs +0 -32
- package/packages/_vue3/dist/render-block.20c07cb1.cjs +0 -3
- package/packages/_vue3/dist/render-block.e9a2cb71.js +0 -273
- package/packages/_vue3/dist/render-component.20ef18f7.cjs +0 -1
- package/packages/_vue3/dist/render-component.afa60a7b.js +0 -42
- package/packages/_vue3/dist/render-content.20bd0f8d.js +0 -1354
- package/packages/_vue3/dist/render-content.e790eee5.cjs +0 -1
- package/packages/_vue3/dist/render-inlined-styles.0444f4fe.js +0 -16
- package/packages/_vue3/dist/render-inlined-styles.14d9ba36.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.5a245883.js +0 -32
- package/packages/_vue3/dist/render-repeated-block.75230844.cjs +0 -1
- package/packages/_vue3/dist/render-styles.73c7ba5a.js +0 -80
- package/packages/_vue3/dist/render-styles.bd7475f8.cjs +0 -31
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const y=require("vue"),dt=y.defineComponent({name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],methods:{filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});function b(e,t,n,r,o,s,i,u){var a=typeof e=="function"?e.options:e;t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),r&&(a.functional=!0),s&&(a._scopeId="data-v-"+s);var c;if(i?(c=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),o&&o.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(i)},a._ssrRegister=c):o&&(c=u?function(){o.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(a.functional){a._injectStyles=c;var
|
|
1
|
+
"use strict";const y=require("vue"),dt=y.defineComponent({name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],methods:{filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});function b(e,t,n,r,o,s,i,u){var a=typeof e=="function"?e.options:e;t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),r&&(a.functional=!0),s&&(a._scopeId="data-v-"+s);var c;if(i?(c=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),o&&o.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(i)},a._ssrRegister=c):o&&(c=u?function(){o.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(a.functional){a._injectStyles=c;var g=a.render;a.render=function(m,d){return c.call(d),g(m,d)}}else{var f=a.beforeCreate;a.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:a}}var ft=function(){var t=this,n=t._self._c;return t._self._setupProxy,t.link?n("a",t._g(t._b({attrs:{role:"button",href:t.link,target:t.openLinkInNewTab?"_blank":void 0}},"a",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._v(" "+t._s(t.text)+" ")]):n("button",t._g(t._b({class:t._classStringToObject(t.attributes.class+" button-2fnk003dqad")},"button",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._v(" "+t._s(t.text)+" ")])},mt=[],pt=b(dt,ft,mt,!1,null,"7e3d619b",null,null);const ht=pt.exports,R=e=>JSON.parse(JSON.stringify(e)),M={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},bt=(e,t=M)=>`@media (max-width: ${t[e].max}px)`,U=({small:e,medium:t})=>{const n=R(M);if(!e||!t)return n;const r=Math.floor(e/2);n.small={max:e,min:r,default:r+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n},x="vue2",gt=Symbol(),I={Builder:{content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,registeredComponents:{},inheritedStyles:{}},key:gt},_t=()=>Promise.resolve().then(()=>L).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",e),e}),yt=()=>Promise.resolve().then(()=>require("./render-inlined-styles.1ed1b531.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",e),e}),vt=y.defineComponent({name:"builder-columns",components:{RenderInlinedStyles:yt,RenderBlocks:_t},props:["space","columns","stackColumnsAt","reverseColumnsWhenStacked","builderBlock"],data(){return{gutterSize:typeof this.space=="number"?this.space||0:20,cols:this.columns||[],stackAt:this.stackColumnsAt||"tablet",flexDir:this.stackColumnsAt==="never"?"row":this.reverseColumnsWhenStacked?"column-reverse":"column",TARGET:x}},inject:{builderContext:I.key},computed:{columnsCssVars(){return{"--flex-dir":this.flexDir,"--flex-dir-tablet":this.getTabletStyle({stackedStyle:this.flexDir,desktopStyle:"row"})}},columnsStyles(){return`
|
|
2
2
|
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
3
3
|
.${this.builderBlock.id}-breakpoints {
|
|
4
4
|
flex-direction: var(--flex-dir-tablet);
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
`}},methods:{getWidth(e){var t;return((t=this.cols[e])==null?void 0:t.width)||100/this.cols.length},getColumnCssWidth(e){const t=this.gutterSize*(this.cols.length-1)/this.cols.length;return`calc(${this.getWidth(e)}% - ${t}px)`},getTabletStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="tablet"?e:t},getMobileStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="never"?t:e},columnCssVars(e){const t=e===0?0:this.gutterSize,n=this.getColumnCssWidth(e),r=`${t}px`,o="100%",s=0;return{width:n,"margin-left":r,"--column-width-mobile":this.getMobileStyle({stackedStyle:o,desktopStyle:n}),"--column-margin-left-mobile":this.getMobileStyle({stackedStyle:s,desktopStyle:r}),"--column-width-tablet":this.getTabletStyle({stackedStyle:o,desktopStyle:n}),"--column-margin-left-tablet":this.getTabletStyle({stackedStyle:s,desktopStyle:r})}},getWidthForBreakpointSize(e){var n,r;return U(((r=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:r.breakpoints)||{})[e].max},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var St=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{class:t._classStringToObject(`builder-columns ${t.builderBlock.id}-breakpoints div-t9spj7joih`),style:t.columnsCssVars,attrs:{dataSet:{"builder-block-name":"builder-columns"}}},[t.TARGET!=="reactNative"?[n("render-inlined-styles",{attrs:{styles:t.columnsStyles}})]:t._e(),t._l(t.columns,function(r,o){return n("div",{key:o,staticClass:"builder-column div-t9spj7joih-2",style:t.columnCssVars(o),attrs:{dataSet:{"builder-block-name":"builder-column"}}},[n("render-blocks",{attrs:{blocks:r.blocks,path:`component.options.columns.${o}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"}}})],1)})],2)},kt=[],xt=b(vt,St,kt,!1,null,"ea80c645",null,null);const Ct=xt.exports,wt=y.defineComponent({name:"builder-fragment-component",props:[]});var $t=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("span",[t._t("default")],2)},Tt=[],Rt=b(wt,$t,Tt,!1,null,null,null,null);const It=Rt.exports;function O(e){return e.replace(/http(s)?:/,"")}function Et(e="",t,n){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+t+"="+encodeURIComponent(n)}function Pt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return O(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const r=e.split(n[0]),o=n[3],s=t.match("x")?t:`${t}x`;return O(`${r[0]}_${s}${o}`)}return null}function E(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const r=Number(e.split("?width=")[1]);return isNaN(r)||(n=`${n} ${r}w`),t.filter(o=>o!==r).map(o=>`${Et(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Pt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,r])=>`${n} ${r}w`).concat([e]).join(", "):e}const At=y.defineComponent({name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var n;const t=this.image||this.src;if(!t||!(t.match(/builder\.io/)||t.match(/cdn\.shopify\.com/)))return this.srcset;if(this.srcset&&((n=this.image)==null?void 0:n.includes("builder.io/api/v1/image"))){if(!this.srcset.includes(this.image.split("?")[0]))return console.debug("Removed given srcset"),E(t)}else if(this.image&&!this.srcset)return E(t);return E(t)},webpSrcSet(){var e;return((e=this.srcSetToUse)==null?void 0:e.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const e={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?e:void 0}},methods:{_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var Ot=function(){var r,o,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[n("picture",[t.webpSrcSet?[n("source",{attrs:{type:"image/webp",srcset:t.webpSrcSet}})]:t._e(),n("img",{class:t._classStringToObject("builder-image"+(t.className?" "+t.className:"")+" img-1pl23ac79ld"),style:{objectPosition:t.backgroundPosition||"center",objectFit:t.backgroundSize||"cover",...t.aspectRatioCss},attrs:{loading:"lazy",alt:t.altText,role:t.altText?"presentation":void 0,src:t.image,srcset:t.srcSetToUse,sizes:t.sizes}})],2),t.aspectRatio&&!(((o=(r=t.builderBlock)==null?void 0:r.children)==null?void 0:o.length)&&t.fitContent)?[n("div",{staticClass:"builder-image-sizer div-1pl23ac79ld",style:{paddingTop:t.aspectRatio*100+"%"}})]:t._e(),((i=(s=t.builderBlock)==null?void 0:s.children)==null?void 0:i.length)&&t.fitContent?[t._t("default")]:t._e(),!t.fitContent&&t.children?[n("div",{staticClass:"div-1pl23ac79ld-2"},[t._t("default")],2)]:t._e()],2)},Vt=[],Bt=b(At,Ot,Vt,!1,null,"7eca4996",null,null);const jt=Bt.exports;function p(){return typeof window<"u"&&typeof document<"u"}function Nt(){return p()&&window.self!==window.top}function x(){return Nt()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Ft=()=>Promise.resolve().then(()=>require("./block-styles.cacb4849.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",e),e}),Mt=()=>Promise.resolve().then(()=>require("./render-block.9342f7b5.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",e),e}),Ut=y.defineComponent({name:"render-blocks",components:{RenderBlock:Mt,BlockStyles:Ft},props:["blocks","parent","path","styleProp"],inject:{builderContext:I.key},computed:{className(){var e;return"builder-blocks"+((e=this.blocks)!=null&&e.length?"":" no-blocks")}},methods:{onClick(){var e,t;x()&&!((e=this.blocks)!=null&&e.length)&&((t=window.parent)==null||t.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var e,t;x()&&!((e=this.blocks)!=null&&e.length)&&((t=window.parent)==null||t.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var Wt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{class:t._classStringToObject(t.className+" div-21azgz5avex"),style:t.styleProp,attrs:{"builder-path":t.path,"builder-parent-id":t.parent,dataSet:{class:t.className}},on:{click:function(r){return t.onClick()},mouseenter:function(r){return t.onMouseEnter()},keypress:function(r){return t.onClick()}}},[t.blocks?t._l(t.blocks,function(r,o){return n("render-block",{key:"render-block-"+r.id,attrs:{block:r,context:t.builderContext}})}):t._e(),t.blocks?t._l(t.blocks,function(r,o){return n("block-styles",{key:"block-style-"+r.id,attrs:{block:r,context:t.builderContext}})}):t._e()],2)},Lt=[],zt=b(Ut,Wt,Lt,!1,null,"8f1a25fb",null,null);const W=zt.exports,L=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"})),Kt=y.defineComponent({name:"builder-section-component",props:["maxWidth","attributes"],methods:{filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})}}});var Gt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("section",t._g(t._b({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:t.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},"section",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._t("default")],2)},qt=[],Dt=b(Kt,Gt,qt,!1,null,null,null,null);const Ht=Dt.exports,w="[Builder.io]: ",v={log:(...e)=>console.log(w,...e),error:(...e)=>console.error(w,...e),warn:(...e)=>console.warn(w,...e),debug:(...e)=>console.debug(w,...e)},S=e=>e!=null,Jt=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},z=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(r){v.warn("[COOKIE] GET error: ",(r==null?void 0:r.message)||r);return}},K=async e=>z(e),Qt=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(S).join("; "),Xt=[["secure",""],["SameSite","None"]],Yt=({name:e,value:t,expires:n})=>{const o=(p()?location.protocol==="https:":!0)?Xt:[[]],s=n?[["expires",n.toUTCString()]]:[[]],i=[[e,t],...s,["path","/"],["domain",Jt(window.location.hostname)],...o];return Qt(i)},G=async({name:e,value:t,expires:n,canTrack:r})=>{try{if(!r)return;const o=Yt({name:e,value:t,expires:n});document.cookie=o}catch(o){v.warn("[COOKIE] SET error: ",(o==null?void 0:o.message)||o)}},Zt="builder.tests",A=e=>`${Zt}.${e}`,te=({contentId:e})=>K({name:A(e),canTrack:!0}),ee=({contentId:e})=>z({name:A(e),canTrack:!0}),ne=({contentId:e,value:t})=>G({name:A(e),value:t,canTrack:!0}),q=e=>S(e.id)&&S(e.variations)&&Object.keys(e.variations).length>0,re=({id:e,variations:t})=>{var o;let n=0;const r=Math.random();for(const s in t){const i=(o=t[s])==null?void 0:o.testRatio;if(n+=i,r<n)return s}return e},D=e=>{const t=re(e);return ne({contentId:e.id,value:t}).catch(n=>{v.error("could not store A/B test variation: ",n)}),t},H=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},oe=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!q(e))return e;const n=ee({contentId:e.id})||D({variations:e.variations,id:e.id}),r=H({item:e,testGroupId:n});return{...e,...r}},se=async({item:e,canTrack:t})=>{if(!t||!q(e))return e;const r=await te({contentId:e.id})||D({variations:e.variations,id:e.id}),o=H({item:e,testGroupId:r});return{...e,...o}},$=e=>S(e)?e:!0;function ie(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function ae(){const e=ie().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
26
|
-
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const J=ae();function P(e,t=null,n="."){return Object.keys(e).reduce((r,o)=>{const s=e[o],i=[t,o].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...r,...P(s,i,n)}:{...r,[i]:s}},{})}const V="builder.",ce="options.",le=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},Q=e=>{if(!e)return{};const t=X(e),n={};return Object.keys(t).forEach(r=>{if(r.startsWith(V)){const o=r.replace(V,"").replace(ce,"");n[o]=t[r]}}),n},ue=()=>{if(!p())return{};const e=new URLSearchParams(window.location.search);return Q(e)},X=e=>e instanceof URLSearchParams?le(e):e,de="v3",Y=e=>{const{limit:t=30,userAttributes:n,query:r,noTraverse:o=!1,model:s,apiKey:i,includeRefs:u=!0,enrich:a,locale:c,apiVersion:
|
|
27
|
-
`).join("");s.innerHTML=i}}function Ee(e,t,n){if(!navigator.cookieEnabled)return;function r(a){const c=a+"=",
|
|
25
|
+
`}},methods:{getWidth(e){var t;return((t=this.cols[e])==null?void 0:t.width)||100/this.cols.length},getColumnCssWidth(e){const t=this.gutterSize*(this.cols.length-1)/this.cols.length;return`calc(${this.getWidth(e)}% - ${t}px)`},getTabletStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="tablet"?e:t},getMobileStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="never"?t:e},columnCssVars(e){const t=e===0?0:this.gutterSize,n=this.getColumnCssWidth(e),r=`${t}px`,o="100%",s=0;return{width:n,"margin-left":r,"--column-width-mobile":this.getMobileStyle({stackedStyle:o,desktopStyle:n}),"--column-margin-left-mobile":this.getMobileStyle({stackedStyle:s,desktopStyle:r}),"--column-width-tablet":this.getTabletStyle({stackedStyle:o,desktopStyle:n}),"--column-margin-left-tablet":this.getTabletStyle({stackedStyle:s,desktopStyle:r})}},getWidthForBreakpointSize(e){var n,r;return U(((r=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:r.breakpoints)||{})[e].max},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var St=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{class:t._classStringToObject(`builder-columns ${t.builderBlock.id}-breakpoints div-t9spj7joih`),style:t.columnsCssVars,attrs:{dataSet:{"builder-block-name":"builder-columns"}}},[t.TARGET!=="reactNative"?[n("render-inlined-styles",{attrs:{styles:t.columnsStyles}})]:t._e(),t._l(t.columns,function(r,o){return n("div",{key:o,staticClass:"builder-column div-t9spj7joih-2",style:t.columnCssVars(o),attrs:{dataSet:{"builder-block-name":"builder-column"}}},[n("render-blocks",{attrs:{blocks:r.blocks,path:`component.options.columns.${o}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"}}})],1)})],2)},kt=[],xt=b(vt,St,kt,!1,null,"ea80c645",null,null);const Ct=xt.exports,wt=y.defineComponent({name:"builder-fragment-component",props:[]});var $t=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("span",[t._t("default")],2)},Tt=[],Rt=b(wt,$t,Tt,!1,null,null,null,null);const It=Rt.exports;function O(e){return e.replace(/http(s)?:/,"")}function Et(e="",t,n){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+t+"="+encodeURIComponent(n)}function Pt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return O(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const r=e.split(n[0]),o=n[3],s=t.match("x")?t:`${t}x`;return O(`${r[0]}_${s}${o}`)}return null}function E(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const r=Number(e.split("?width=")[1]);return isNaN(r)||(n=`${n} ${r}w`),t.filter(o=>o!==r).map(o=>`${Et(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Pt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,r])=>`${n} ${r}w`).concat([e]).join(", "):e}const At=y.defineComponent({name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var n;const t=this.image||this.src;if(!t||!(t.match(/builder\.io/)||t.match(/cdn\.shopify\.com/)))return this.srcset;if(this.srcset&&((n=this.image)==null?void 0:n.includes("builder.io/api/v1/image"))){if(!this.srcset.includes(this.image.split("?")[0]))return console.debug("Removed given srcset"),E(t)}else if(this.image&&!this.srcset)return E(t);return E(t)},webpSrcSet(){var e;return((e=this.srcSetToUse)==null?void 0:e.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const e={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?e:void 0}},methods:{_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var Ot=function(){var r,o,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[n("picture",[t.webpSrcSet?[n("source",{attrs:{type:"image/webp",srcset:t.webpSrcSet}})]:t._e(),n("img",{class:t._classStringToObject("builder-image"+(t.className?" "+t.className:"")+" img-1pl23ac79ld"),style:{objectPosition:t.backgroundPosition||"center",objectFit:t.backgroundSize||"cover",...t.aspectRatioCss},attrs:{loading:"lazy",alt:t.altText,role:t.altText?"presentation":void 0,src:t.image,srcset:t.srcSetToUse,sizes:t.sizes}})],2),t.aspectRatio&&!(((o=(r=t.builderBlock)==null?void 0:r.children)==null?void 0:o.length)&&t.fitContent)?[n("div",{staticClass:"builder-image-sizer div-1pl23ac79ld",style:{paddingTop:t.aspectRatio*100+"%"}})]:t._e(),((i=(s=t.builderBlock)==null?void 0:s.children)==null?void 0:i.length)&&t.fitContent?[t._t("default")]:t._e(),!t.fitContent&&t.children?[n("div",{staticClass:"div-1pl23ac79ld-2"},[t._t("default")],2)]:t._e()],2)},Vt=[],Bt=b(At,Ot,Vt,!1,null,"7eca4996",null,null);const jt=Bt.exports;function p(){return typeof window<"u"&&typeof document<"u"}function Nt(){return p()&&window.self!==window.top}function C(){return Nt()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Ft=()=>Promise.resolve().then(()=>require("./block-styles.aaf62526.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",e),e}),Mt=()=>Promise.resolve().then(()=>require("./render-block.43f24cc4.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",e),e}),Ut=y.defineComponent({name:"render-blocks",components:{RenderBlock:Mt,BlockStyles:Ft},props:["blocks","parent","path","styleProp"],inject:{builderContext:I.key},computed:{className(){var e;return"builder-blocks"+((e=this.blocks)!=null&&e.length?"":" no-blocks")}},methods:{onClick(){var e,t;C()&&!((e=this.blocks)!=null&&e.length)&&((t=window.parent)==null||t.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var e,t;C()&&!((e=this.blocks)!=null&&e.length)&&((t=window.parent)==null||t.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var Wt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{class:t._classStringToObject(t.className+" div-21azgz5avex"),style:t.styleProp,attrs:{"builder-path":t.path,"builder-parent-id":t.parent,dataSet:{class:t.className}},on:{click:function(r){return t.onClick()},mouseenter:function(r){return t.onMouseEnter()},keypress:function(r){return t.onClick()}}},[t.blocks?t._l(t.blocks,function(r,o){return n("render-block",{key:"render-block-"+r.id,attrs:{block:r,context:t.builderContext}})}):t._e(),t.blocks?t._l(t.blocks,function(r,o){return n("block-styles",{key:"block-style-"+r.id,attrs:{block:r,context:t.builderContext}})}):t._e()],2)},Lt=[],zt=b(Ut,Wt,Lt,!1,null,"8f1a25fb",null,null);const W=zt.exports,L=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"})),Kt=y.defineComponent({name:"builder-section-component",props:["maxWidth","attributes"],methods:{filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})}}});var Gt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("section",t._g(t._b({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:t.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},"section",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._t("default")],2)},qt=[],Dt=b(Kt,Gt,qt,!1,null,null,null,null);const Ht=Dt.exports,w="[Builder.io]: ",v={log:(...e)=>console.log(w,...e),error:(...e)=>console.error(w,...e),warn:(...e)=>console.warn(w,...e),debug:(...e)=>console.debug(w,...e)},S=e=>e!=null,Jt=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},z=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(r){v.warn("[COOKIE] GET error: ",(r==null?void 0:r.message)||r);return}},K=async e=>z(e),Qt=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(S).join("; "),Xt=[["secure",""],["SameSite","None"]],Yt=({name:e,value:t,expires:n})=>{const o=(p()?location.protocol==="https:":!0)?Xt:[[]],s=n?[["expires",n.toUTCString()]]:[[]],i=[[e,t],...s,["path","/"],["domain",Jt(window.location.hostname)],...o];return Qt(i)},G=async({name:e,value:t,expires:n,canTrack:r})=>{try{if(!r)return;const o=Yt({name:e,value:t,expires:n});document.cookie=o}catch(o){v.warn("[COOKIE] SET error: ",(o==null?void 0:o.message)||o)}},Zt="builder.tests",A=e=>`${Zt}.${e}`,te=({contentId:e})=>K({name:A(e),canTrack:!0}),ee=({contentId:e})=>z({name:A(e),canTrack:!0}),ne=({contentId:e,value:t})=>G({name:A(e),value:t,canTrack:!0}),q=e=>S(e.id)&&S(e.variations)&&Object.keys(e.variations).length>0,re=({id:e,variations:t})=>{var o;let n=0;const r=Math.random();for(const s in t){const i=(o=t[s])==null?void 0:o.testRatio;if(n+=i,r<n)return s}return e},D=e=>{const t=re(e);return ne({contentId:e.id,value:t}).catch(n=>{v.error("could not store A/B test variation: ",n)}),t},H=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},oe=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!q(e))return e;const n=ee({contentId:e.id})||D({variations:e.variations,id:e.id}),r=H({item:e,testGroupId:n});return{...e,...r}},se=async({item:e,canTrack:t})=>{if(!t||!q(e))return e;const r=await te({contentId:e.id})||D({variations:e.variations,id:e.id}),o=H({item:e,testGroupId:r});return{...e,...o}},$=e=>S(e)?e:!0;function ie(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function ae(){const e=ie().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
26
|
+
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const J=ae();function P(e,t=null,n="."){return Object.keys(e).reduce((r,o)=>{const s=e[o],i=[t,o].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...r,...P(s,i,n)}:{...r,[i]:s}},{})}const V="builder.",ce="options.",le=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},Q=e=>{if(!e)return{};const t=X(e),n={};return Object.keys(t).forEach(r=>{if(r.startsWith(V)){const o=r.replace(V,"").replace(ce,"");n[o]=t[r]}}),n},ue=()=>{if(!p())return{};const e=new URLSearchParams(window.location.search);return Q(e)},X=e=>e instanceof URLSearchParams?le(e):e,de="v3",Y=e=>{const{limit:t=30,userAttributes:n,query:r,noTraverse:o=!1,model:s,apiKey:i,includeRefs:u=!0,enrich:a,locale:c,apiVersion:g=de}=e;if(!i)throw new Error("Missing API key");if(!["v2","v3"].includes(g))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${g}'`);const f=new URL(`https://cdn.builder.io/api/${g}/content/${s}?apiKey=${i}&limit=${t}&noTraverse=${o}&includeRefs=${u}${c?`&locale=${c}`:""}${a?`&enrich=${a}`:""}`),l={...ue(),...X(e.options||{})},m=P(l);for(const d in m)f.searchParams.set(d,String(m[d]));if(n&&f.searchParams.set("userAttributes",JSON.stringify(n)),r){const d=P({query:r});for(const _ in d)f.searchParams.set(_,JSON.stringify(d[_]))}return f},Z=e=>"results"in e;async function tt(e){const t=await nt({...e,limit:1});return t&&Z(t)&&t.results[0]||null}const fe=async e=>{const t=Y(e);return await(await J(t.href)).json()},et=async(e,t)=>{const n=$(e.canTrack);if(!n||!(p()||x==="reactNative"))return t;try{const r=[];for(const o of t.results)r.push(await se({item:o,canTrack:n}));t.results=r}catch(r){v.error("Could not process A/B tests. ",r)}return t};async function nt(e){try{const t=Y(e),n=await fe(e);return Z(n)?et(e,n):(v.error("Error fetching data. ",{url:t,content:n,options:e}),n)}catch(t){return v.error("Error fetching data. ",t),null}}const me=()=>Promise.resolve().then(()=>require("./render-content.2c57f5bb.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",e),e}),pe=y.defineComponent({name:"builder-symbol",components:{RenderContent:me},props:["attributes","symbol","dynamic"],data(){var e,t,n;return{className:[...Object.keys(this.attributes.class),"builder-symbol",(e=this.symbol)!=null&&e.inline?"builder-inline-symbol":void 0,((t=this.symbol)==null?void 0:t.dynamic)||this.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" "),contentToUse:(n=this.symbol)==null?void 0:n.content}},inject:{builderContext:I.key},mounted(){this.fetchContent()},watch:{onUpdateHook0:{handler(){this.fetchContent()},immediate:!0}},computed:{onUpdateHook0(){return{0:this.symbol}}},methods:{fetchContent(){var e,t;!this.contentToUse&&((e=this.symbol)==null?void 0:e.model)&&((t=this.builderContext)==null?void 0:t.apiKey)&&tt({model:this.symbol.model,apiKey:this.builderContext.apiKey,apiVersion:this.builderContext.apiVersion,query:{id:this.symbol.entry}}).then(n=>{n&&(this.contentToUse=n)}).catch(n=>{v.error("Could not fetch symbol content: ",n)})},filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var he=function(){var r,o,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",t._g(t._b({class:t._classStringToObject(t.className),attrs:{dataSet:{class:t.className}}},"div",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[n("render-content",{attrs:{apiVersion:t.builderContext.apiVersion,apiKey:t.builderContext.apiKey,context:t.builderContext.context,customComponents:Object.values(t.builderContext.registeredComponents),data:{...(r=t.symbol)==null?void 0:r.data,...t.builderContext.localState,...(s=(o=t.contentToUse)==null?void 0:o.data)==null?void 0:s.state},model:(i=t.symbol)==null?void 0:i.model,content:t.contentToUse}})],1)},be=[],ge=b(pe,he,be,!1,null,null,null,null);const _e=ge.exports,ye=y.defineComponent({name:"builder-text",props:["text"]});var ve=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("span",{staticClass:"builder-text",style:{outline:"none"},domProps:{innerHTML:t._s(t.text)}})},Se=[],ke=b(ye,ve,Se,!1,null,null,null,null);const xe=ke.exports,Ce=y.defineComponent({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 we=function(){var r;var t=this,n=t._self._c;return t._self._setupProxy,n("video",t._b({style:{width:"100%",height:"100%",...(r=t.attributes)==null?void 0:r.style,objectFit:t.fit,objectPosition:t.position,borderRadius:1},attrs:{src:t.video||"no-src",poster:t.posterImage}},"video",t.spreadProps,!1))},$e=[],Te=b(Ce,we,$e,!1,null,null,null,null);const Re=Te.exports,T=e=>Object.values((e==null?void 0:e.variations)||{}),B=({canTrack:e,content:t})=>!(!(T(t).length>0)||!e||p());function Ie(e,t,n){function r(){function i(m,d,_){let k="";if(_){const h=new Date;h.setTime(h.getTime()+_*24*60*60*1e3),k="; expires="+h.toUTCString()}document.cookie=m+"="+(d||"")+k+"; path=/; Secure; SameSite=None"}function u(m){const d=m+"=",_=document.cookie.split(";");for(let k=0;k<_.length;k++){let h=_[k];for(;h.charAt(0)===" ";)h=h.substring(1,h.length);if(h.indexOf(d)===0)return h.substring(d.length,h.length)}return null}const a=`builder.tests.${e}`,c=u(a),g=t.map(m=>m.id).concat(e);if(c&&g.includes(c))return c;let f=0;const l=Math.random();for(let m=0;m<t.length;m++){const d=t[m],_=d.testRatio;if(f+=_,l<f)return i(a,d.id),d.id}return i(a,e),e}const o=r(),s=document.getElementById(`variants-styles-${e}`);if(n){s.remove();const i=document.getElementById(`variants-script-${e}`);i==null||i.remove()}else{const i=t.concat({id:e}).filter(u=>u.id!==o).map(u=>`.variant-${u.id} { display: none; }
|
|
27
|
+
`).join("");s.innerHTML=i}}function Ee(e,t,n){if(!navigator.cookieEnabled)return;function r(a){const c=a+"=",g=document.cookie.split(";");for(let f=0;f<g.length;f++){let l=g[f];for(;l.charAt(0)===" ";)l=l.substring(1,l.length);if(l.indexOf(c)===0)return l.substring(c.length,l.length)}return null}const o=`builder.tests.${t}`,s=r(o),i=document.querySelector(`[builder-content-id="${e}"]`),u=e===t;if(s===e){if(u)return;i==null||i.removeAttribute("hidden"),i==null||i.removeAttribute("aria-hidden")}else{u&&(n?i==null||i.remove():(i==null||i.setAttribute("hidden","true"),i==null||i.setAttribute("aria-hidden","true")));return}}const Pe=e=>e==="react"||e==="reactNative"||e==="vue3"||e==="vue2",rt=Pe(x),j="bldrAbTest",ot="bldrCntntScrpt",Ae=(e,t)=>{const n=Ie.toString().replace(/\s+/g," "),r=Ee.toString().replace(/\s+/g," ");return`
|
|
28
28
|
const ${j} = ${n}
|
|
29
29
|
const ${ot} = ${r}
|
|
30
30
|
${j}("${t}", ${JSON.stringify(e)}, ${rt})
|
|
31
|
-
`},
|
|
32
|
-
${ot}("${t}", "${e}", ${rt})`,
|
|
31
|
+
`},Oe=({parentContentId:e,contentId:t})=>`
|
|
32
|
+
${ot}("${t}", "${e}", ${rt})`,Ve=()=>Promise.resolve().then(()=>require("./render-content.2c57f5bb.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContent at ../render-content/render-content.vue",e),e}),Be=()=>Promise.resolve().then(()=>require("./render-inlined-styles.1ed1b531.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}),je=y.defineComponent({name:"render-content-variants",components:{RenderInlinedStyles:Be,RenderContent:Ve},props:["content","canTrack","apiKey","apiVersion","customComponents","model"],data(){var e;return{variantScriptStr:Ae(T(this.content).map(t=>({id:t.id,testRatio:t.testRatio})),((e=this.content)==null?void 0:e.id)||""),shouldRenderVariants:B({canTrack:$(this.canTrack),content:this.content}),hideVariantsStyleString:T(this.content).map(t=>`.variant-${t.id} { display: none; } `).join(""),contentToRender:B({canTrack:$(this.canTrack),content:this.content})?this.content:oe({item:this.content,canTrack:$(this.canTrack)}),getVariants:T}}});var Ne=function(){var r,o,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[t.shouldRenderVariants?[n("render-inlined-styles",{attrs:{id:`variants-styles-${(r=t.content)==null?void 0:r.id}`,styles:t.hideVariantsStyleString}}),n("script",{tag:"component",attrs:{id:`variants-script-${(o=t.content)==null?void 0:o.id}`},domProps:{innerHTML:t._s(t.variantScriptStr)}}),t._l(t.getVariants(t.content),function(u,a){var c;return n("render-content",{key:u.id,attrs:{content:u,apiKey:t.apiKey,apiVersion:t.apiVersion,canTrack:t.canTrack,customComponents:t.customComponents,hideContent:!0,parentContentId:(c=t.content)==null?void 0:c.id,isSsrAbTest:t.shouldRenderVariants}})})]:t._e(),n("render-content",{attrs:{model:t.model,content:t.contentToRender,apiKey:t.apiKey,apiVersion:t.apiVersion,canTrack:t.canTrack,customComponents:t.customComponents,classNameProp:`variant-${(s=t.content)==null?void 0:s.id}`,parentContentId:(i=t.content)==null?void 0:i.id,isSsrAbTest:t.shouldRenderVariants}})],2)},Fe=[],Me=b(je,Ne,Fe,!1,null,null,null,null);const Ue=Me.exports;function We(){return!p()||C()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const st=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},Le=[],ze=({component:e,...t})=>({type:"builder.registerComponent",data:Ge(t)}),Ke=e=>typeof e=="function"?st(e):R(e),Ge=({inputs:e,...t})=>({...R(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((r,[o,s])=>({...r,[o]:Ke(s)}),{}))}),N={};function qe(e,t){let n=N[e];if(n||(n=N[e]=[]),n.push(t),p()){const r={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(r,"*"),parent!==window&&window.postMessage(r,"*")}catch(o){console.debug("Could not postmessage",o)}}}const F={};function De(e){if(p()){Object.assign(F,e);const t={type:"builder.settingsChange",data:F};parent.postMessage(t,"*")}}function He(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function it(){return He().replace(/-/g,"")}const at="builderSessionId",Je=async({canTrack:e})=>{if(!e)return;const t=await K({name:at,canTrack:e});if(S(t))return t;{const n=Qe();return Xe({id:n,canTrack:e}),n}},Qe=()=>it(),Xe=({id:e,canTrack:t})=>G({name:at,value:e,canTrack:t}),ct=()=>p()&&typeof localStorage<"u"?localStorage:void 0,Ye=({key:e,canTrack:t})=>{var n;try{return t?(n=ct())==null?void 0:n.getItem(e):void 0}catch(r){console.debug("[LocalStorage] GET error: ",r);return}},Ze=({key:e,canTrack:t,value:n})=>{var r;try{t&&((r=ct())==null||r.setItem(e,n))}catch(o){console.debug("[LocalStorage] SET error: ",o)}},lt="builderVisitorId",tn=({canTrack:e})=>{if(!e)return;const t=Ye({key:lt,canTrack:e});if(S(t))return t;{const n=en();return nn({id:n,canTrack:e}),n}},en=()=>it(),nn=({id:e,canTrack:t})=>Ze({key:lt,value:e,canTrack:t}),rn=()=>{if(p()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},on=()=>typeof navigator=="object"&&navigator.userAgent||"",sn=()=>{const e=on(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||x==="reactNative"}},n=e.match(/Tablet|iPad/i),r=rn();return{urlPath:r==null?void 0:r.pathname,host:(r==null?void 0:r.host)||(r==null?void 0:r.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},an=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await Je({canTrack:e}),n=tn({canTrack:e});return{sessionId:t,visitorId:n}},cn=async({type:e,canTrack:t,apiKey:n,metadata:r,...o})=>({type:e,data:{...o,metadata:{url:location.href,...r},...await an({canTrack:t}),userAttributes:sn(),ownerId:n}});async function ut(e){if(!e.apiKey){v.error("Missing API key for track call. Please provide your API key.");return}if(!!e.canTrack&&!C()&&!!(p()||x==="reactNative"))return fetch("https://builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await cn(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const ln=e=>ut({...e,canTrack:!0});exports.BuilderContext=I;exports.Button=ht;exports.Columns=Ct;exports.Fragment=It;exports.Image=jt;exports.Section=Ht;exports.Symbol=_e;exports.TARGET=x;exports.Text=xe;exports.Video=Re;exports._track=ut;exports.checkIsDefined=S;exports.components=Le;exports.createRegisterComponentMessage=ze;exports.fastClone=R;exports.fetch=J;exports.getAllContent=nt;exports.getBuilderSearchParams=Q;exports.getContent=tt;exports.getMaxWidthQueryForSize=bt;exports.getRenderContentScriptString=Oe;exports.getSizesForBreakpoints=U;exports.isBrowser=p;exports.isEditing=C;exports.isPreviewing=We;exports.logger=v;exports.normalizeComponent=b;exports.processContentResult=et;exports.register=qe;exports.renderBlocks=W;exports.renderBlocks$1=L;exports.renderContentVariants=Ue;exports.serializeFn=st;exports.setEditorSettings=De;exports.track=ln;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as m } from "vue";
|
|
2
|
-
import { e as l } from "./evaluate.
|
|
3
|
-
import { T as u, n as d } from "./index.
|
|
4
|
-
import { a as h, g as p } from "./css.
|
|
2
|
+
import { e as l } from "./evaluate.d2d16952.js";
|
|
3
|
+
import { T as u, n as d } from "./index.1074d675.js";
|
|
4
|
+
import { a as h, g as p } from "./css.377600fa.js";
|
|
5
5
|
const f = (e) => `v-on:${e.toLowerCase()}`, k = (e, t) => (o) => l({
|
|
6
6
|
code: e,
|
|
7
7
|
context: t.context,
|
|
@@ -135,17 +135,17 @@ const _ = [
|
|
|
135
135
|
},
|
|
136
136
|
block: r
|
|
137
137
|
}));
|
|
138
|
-
}, R = () => import("./block-styles.
|
|
138
|
+
}, R = () => import("./block-styles.c38fdaef.js").then((e) => e.default).catch((e) => {
|
|
139
139
|
throw console.error(
|
|
140
140
|
"Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",
|
|
141
141
|
e
|
|
142
142
|
), e;
|
|
143
|
-
}), P = () => import("./render-repeated-block.
|
|
143
|
+
}), P = () => import("./render-repeated-block.d3c2411b.js").then((e) => e.default).catch((e) => {
|
|
144
144
|
throw console.error(
|
|
145
145
|
"Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",
|
|
146
146
|
e
|
|
147
147
|
), e;
|
|
148
|
-
}), T = () => import("./render-component.
|
|
148
|
+
}), T = () => import("./render-component.82a8e6f7.js").then((e) => e.default).catch((e) => {
|
|
149
149
|
throw console.error(
|
|
150
150
|
"Error while attempting to dynamically import component RenderComponent at ./render-component.vue",
|
|
151
151
|
e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),u=require("./evaluate.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),u=require("./evaluate.d837a845.cjs"),d=require("./index.3d5a7a37.cjs"),s=require("./css.4a664d41.cjs"),m=e=>`v-on:${e.toLowerCase()}`,h=(e,t)=>o=>u.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:o,isExpression:!1});function k(e){var r;const t={},o=(r=e.block.actions)!=null?r:{};for(const n in o){if(!o.hasOwnProperty(n))continue;const c=o[n];t[m(n)]=h(c,e)}return t}function f(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}function S(e){const t={};if(typeof e!="string")return t;const o=e.trim().split(/\\s+/);for(const r of o)t[r]=!0;return t}function b(e){return e.class=S(e.class),e}const v=e=>({href:e.href});function y(e){var o;const t={...v(e),...e.properties,"builder-id":e.id,style:g(e.style),class:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return b(t)}function g(e){if(!!e)switch(d.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return s.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":return e}}const x=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],B=e=>typeof e=="string"&&x.includes(e.toLowerCase()),_=({block:e,context:t})=>{var n;const o=(n=s.getProcessedBlock({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:n.name;if(!o)return null;const r=t.registeredComponents[o];if(r)return r;console.warn(`
|
|
2
2
|
Could not find a registered component named "${o}".
|
|
3
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},C=({block:e,context:t})=>{const{repeat:o,...r}=e;if(!(o!=null&&o.collection))return;const n=u.evaluate({code:o.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(n))return;const c=o.collection.split(".").pop(),a=o.itemName||(c?c+"Item":"item");return n.map((i,l)=>({context:{...t,localState:{...t.localState,$index:l,$item:i,[a]:i,[`$${a}Index`]:l}},block:r}))},w=()=>Promise.resolve().then(()=>require("./block-styles.
|
|
3
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`)},C=({block:e,context:t})=>{const{repeat:o,...r}=e;if(!(o!=null&&o.collection))return;const n=u.evaluate({code:o.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(n))return;const c=o.collection.split(".").pop(),a=o.itemName||(c?c+"Item":"item");return n.map((i,l)=>({context:{...t,localState:{...t.localState,$index:l,$item:i,[a]:i,[`$${a}Index`]:l}},block:r}))},w=()=>Promise.resolve().then(()=>require("./block-styles.aaf62526.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",e),e}),P=()=>Promise.resolve().then(()=>require("./render-repeated-block.625e26fc.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",e),e}),E=()=>Promise.resolve().then(()=>require("./render-component.ba549c84.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderComponent at ./render-component.vue",e),e}),R=p.defineComponent({name:"render-block",components:{RenderComponent:E,RenderRepeatedBlock:P,BlockStyles:w},props:["block","context"],data(){return{component:_({block:this.block,context:this.context}),Tag:this.block.tagName||"div",childrenContext:this.context,isEmptyHtmlElement:B}},computed:{repeatItem(){return C({block:this.block,context:this.context})},useBlock(){return this.repeatItem?this.block:s.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0})},canShowBlock(){return"hide"in this.useBlock?!this.useBlock.hide:"show"in this.useBlock?this.useBlock.show:!0},actions(){return k({block:this.useBlock,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context})},attributes(){return{...y(this.useBlock)}},childrenWithoutParentComponent(){var t,o;return!((t=this.component)!=null&&t.component)&&!this.repeatItem?(o=this.useBlock.children)!=null?o:[]:[]},renderComponentProps(){var e,t,o;return{blockChildren:(e=this.useBlock.children)!=null?e:[],componentRef:(t=this.component)==null?void 0:t.component,componentOptions:{...f(this.useBlock),...(o=this.component)!=null&&o.noWrap?{attributes:{...this.attributes,...this.actions}}:{}},context:this.childrenContext}}},methods:{stripVOn:function(t={}){return Object.keys(t).reduce((o,r)=>({...o,[r.replace("v-on:","")]:t[r]}),{})}}});var T=function(){var r;var t=this,o=t._self._c;return t._self._setupProxy,!Boolean(!((r=t.component)!=null&&r.noWrap))&&t.canShowBlock?o("render-component",t._b({},"render-component",t.renderComponentProps,!1)):t.isEmptyHtmlElement(t.Tag)&&t.canShowBlock?o(t.Tag,t._g(t._b({tag:"component"},"component",t.attributes,!1),t.stripVOn(t.actions))):!t.isEmptyHtmlElement(t.Tag)&&t.repeatItem&&t.canShowBlock?o("div",{staticClass:"vue2-root-element-workaround"},t._l(t.repeatItem,function(n,c){return o("render-repeated-block",{key:c,attrs:{repeatContext:n.context,block:n.block}})}),1):t.canShowBlock?o(t.Tag,t._g(t._b({tag:"component"},"component",t.attributes,!1),t.stripVOn(t.actions)),[o("render-component",t._b({},"render-component",t.renderComponentProps,!1)),t._l(t.childrenWithoutParentComponent,function(n,c){return o("render-block",{key:"render-block-"+n.id,attrs:{block:n,context:t.childrenContext}})}),t._l(t.childrenWithoutParentComponent,function(n,c){return o("block-styles",{key:"block-style-"+n.id,attrs:{block:n,context:t.childrenContext}})})],2):t._e()},j=[],O=d.normalizeComponent(R,T,j,!1,null,null,null,null);const A=O.exports;exports.default=A;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as c } from "vue";
|
|
2
|
-
import { n as l } from "./index.
|
|
3
|
-
const s = () => import("./block-styles.
|
|
2
|
+
import { n as l } from "./index.1074d675.js";
|
|
3
|
+
const s = () => import("./block-styles.c38fdaef.js").then((e) => e.default).catch((e) => {
|
|
4
4
|
throw console.error(
|
|
5
5
|
"Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",
|
|
6
6
|
e
|
|
7
7
|
), e;
|
|
8
|
-
}), m = () => import("./render-block.
|
|
8
|
+
}), m = () => import("./render-block.1ec27d4d.js").then((e) => e.default).catch((e) => {
|
|
9
9
|
throw console.error(
|
|
10
10
|
"Error while attempting to dynamically import component RenderBlock at ./render-block.vue",
|
|
11
11
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),l=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),l=require("./index.3d5a7a37.cjs"),s=()=>Promise.resolve().then(()=>require("./block-styles.aaf62526.cjs")).then(n=>n.default).catch(n=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",n),n}),i=()=>Promise.resolve().then(()=>require("./render-block.43f24cc4.cjs")).then(n=>n.default).catch(n=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block.vue",n),n}),a=c.defineComponent({name:"render-component",components:{RenderBlock:i,BlockStyles:s},props:["componentRef","componentOptions","blockChildren","context"]});var m=function(){var e=this,t=e._self._c;return e._self._setupProxy,e.componentRef?t(e.componentRef,e._b({tag:"component"},"component",e.componentOptions,!1),[e._l(e.blockChildren,function(o,r){return t("render-block",{key:"render-block-"+o.id,attrs:{block:o,context:e.context}})}),e._l(e.blockChildren,function(o,r){return t("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:e.context}})})],2):e._e()},d=[],p=l.normalizeComponent(a,m,d,!1,null,null,null,null);const u=p.exports;exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),o=require("./index.95d9006f.cjs"),g=require("./evaluate.7d21bb04.cjs"),v={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},S={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:o.serializeFn(t=>{function e(){n.forEach(i=>{i.delete("width")})}const n=t.get("columns");Array.isArray(n)&&!!n.find(a=>a.get("width"))&&(!!n.find(r=>!r.get("width"))||n.reduce((d,l)=>d+l.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}]},C={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},k={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%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:o.serializeFn(t=>{t.delete("srcset"),t.delete("noWebp");function n(s,d=6e4){return new Promise((l,u)=>{const c=document.createElement("img");let p=!1;c.onload=()=>{p=!0,l(c)},c.addEventListener("error",m=>{console.warn("Image load failed",m.error),u(m.error)}),c.src=s,setTimeout(()=>{p||u(new Error("Image load timed out"))},d)})}function i(s){return Math.round(s*1e3)/1e3}const a=t.get("image"),r=t.get("aspectRatio");if(fetch(a).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&t.set("noWebp",!0)}),a&&(!r||r===.7041))return n(a).then(s=>{const d=t.get("aspectRatio");t.get("image")===a&&(!d||d===.7041)&&s.width&&s.height&&(t.set("aspectRatio",i(s.height/s.width)),t.set("height",s.height),t.set("width",s.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}]},T={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>"}}}]},w={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"}]},R={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"}},I={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}]},_={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:o.serializeFn(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(i=>i.json()).then(i=>{t.get("url")===e&&(i.html?t.set("content",i.html):t.set("content","Invalid url, please try another"))}).catch(i=>{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}]},E=["text/javascript","application/javascript","application/ecmascript"],F=t=>E.includes(t.type),A=h.defineComponent({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 i=document.createElement("script");i.async=!0,i.src=n.src,document.head.appendChild(i)}else if(F(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(i){console.warn("`Embed`: Error running script:",i)}}}}});var V=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:e._s(e.content)}})},P=[],U=o.normalizeComponent(A,V,P,!1,null,null,null,null);const j=U.exports,H=h.defineComponent({name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:o.isEditing}},methods:{filterAttrs:function(e={},n){const i="v-on:";return Object.keys(e).filter(a=>{if(!e[a])return!1;const r=a.startsWith(i);return n?r:!r}).reduce((a,r)=>({...a,[r.replace(i,"")]:e[r]}),{})}}});var $=function(){var e=this,n=e._self._c;return e._self._setupProxy,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)))},W=[],M=o.normalizeComponent(H,$,W,!1,null,null,null,null);const q=M.exports,L={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","gif","webp"],required:!0}],noWrap:!0,static:!0},B=h.defineComponent({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 i=document.createElement("script");i.async=!0,i.src=n.src,document.head.appendChild(i)}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(i){console.warn("`CustomCode`: Error running script:",i)}}}}},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const i of n)e[i]=!0;return e}}});var N=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{ref:"elem",class:e._classStringToObject("builder-custom-code"+(e.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:e._s(e.code)}})},O=[],z=o.normalizeComponent(B,N,O,!1,null,null,null,null);const K=z.exports,D={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}]},J=()=>[{component:o.Button,...v},{component:o.Columns,...S},{component:K,...D},{component:j,..._},{component:o.Fragment,...C},{component:o.Image,...k},{component:q,...L},{component:o.Section,...T},{component:o.Symbol,...w},{component:o.Text,...R},{component:o.Video,...I}],G="0.4.2",Y=()=>{o.register("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 b=!1;const X=(t={})=>{var e,n;b||(b=!0,o.isBrowser()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:o.TARGET,version:G,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:t}},"*"),window.addEventListener("message",({data:i})=>{var a,r;if(!!(i!=null&&i.type))switch(i.type){case"builder.evaluate":{const s=i.data.text,d=i.data.arguments||[],l=i.data.id,u=new Function(s);let c,p=null;try{c=u.apply(null,d)}catch(m){p=m}p?(a=window.parent)==null||a.postMessage({type:"builder.evaluateError",data:{id:l,error:p.message}},"*"):c&&typeof c.then=="function"?c.then(m=>{var f;(f=window.parent)==null||f.postMessage({type:"builder.evaluateResult",data:{id:l,result:m}},"*")}).catch(console.error):(r=window.parent)==null||r.postMessage({type:"builder.evaluateResult",data:{result:c,id:l}},"*");break}}})))};function x(t){return Math.round(t*1e3)/1e3}const Q=(t,e,n=!0)=>{if(!(t instanceof HTMLElement))return null;let i=n?t:t.parentElement;do{if(!i)return null;if(e(i))return i}while(i=i.parentElement);return null},Z=t=>Q(t,e=>{const n=e.getAttribute("builder-id")||e.id;return Boolean((n==null?void 0:n.indexOf("builder-"))===0)}),y=({event:t,target:e})=>{const n=e.getBoundingClientRect(),i=t.clientX-n.left,a=t.clientY-n.top,r=x(i/n.width),s=x(a/n.height);return{x:r,y:s}},ee=t=>{const e=t.target,n=e&&Z(e),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:e?y({event:t,target:e}):void 0,builderTargetOffset:n?y({event:t,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},te=({content:t,data:e,locale:n})=>{var r,s,d;const i={};(s=(r=t==null?void 0:t.data)==null?void 0:r.inputs)==null||s.forEach(l=>{var u;l.name&&l.defaultValue!==void 0&&((u=t==null?void 0:t.data)==null?void 0:u.state)&&t.data.state[l.name]===void 0&&(i[l.name]=l.defaultValue)});const a={...(d=t==null?void 0:t.data)==null?void 0:d.state,...e,...n?{locale:n}:{}};return{...i,...a}},ne=({content:t,data:e})=>t?{...t,data:{...t==null?void 0:t.data,...e},meta:t==null?void 0:t.meta}:void 0,ie=()=>Promise.resolve().then(()=>require("./index.95d9006f.cjs")).then(t=>t.renderBlocks$1).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",t),t}),ae=()=>Promise.resolve().then(()=>require("./render-styles.0cb949b0.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}),oe=h.defineComponent({name:"render-content",components:{RenderContentStyles:ae,RenderBlocks:ie},props:["canTrack","model","context","apiKey","content","parentContentId","data","locale","apiVersion","customComponents","hideContent","classNameProp","isSsrAbTest","includeRefs","enrich"],data(){var t;return{forceReRenderCount:0,overrideContent:null,update:0,canTrackToUse:o.checkIsDefined(this.canTrack)?this.canTrack:!0,httpReqsData:{},clicked:!1,scriptStr:o.getRenderContentScriptString({contentId:(t=this.content)==null?void 0:t.id,parentContentId:this.parentContentId}),builderContextSignal:{content:ne({content:this.content,data:this.data}),localState:void 0,rootState:te({content:this.content,data:this.data,locale:this.locale}),rootSetState:this.contentSetState,context:this.context||{},apiKey:this.apiKey,apiVersion:this.apiVersion,registeredComponents:[...J(),...o.components,...this.customComponents||[]].reduce((e,{component:n,...i})=>({...e,[i.name]:{component:n,...i}}),{}),inheritedStyles:{}},builderContext:o.BuilderContext,TARGET:o.TARGET}},provide(){const t=this;return{[o.BuilderContext.key]:t.builderContextSignal}},mounted(){var t,e;if(this.apiKey||o.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),o.isBrowser()){if(o.isEditing()&&(this.forceReRenderCount=this.forceReRenderCount+1,Y(),X({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{},...this.enrich?{enrich:this.enrich}:{}}),Object.values(this.builderContextSignal.registeredComponents).forEach(n=>{var a;const i=o.createRegisterComponentMessage(n);(a=window.parent)==null||a.postMessage(i,"*")}),window.addEventListener("message",this.processMessage),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.builderContextSignal.content){const n=(t=this.builderContextSignal.content)==null?void 0:t.testVariationId,i=(e=this.builderContextSignal.content)==null?void 0:e.id;o._track({type:"impression",canTrack:this.canTrackToUse,contentId:i,apiKey:this.apiKey,variationId:n!==i?n:void 0})}if(o.isPreviewing()){const n=new URL(location.href).searchParams,i=n.get("builder.preview"),a=n.get(`builder.preview.${i}`),r=n.get("apiKey")||n.get("builder.space");i===this.model&&r===this.apiKey&&(!this.content||a===this.content.id)&&o.getContent({model:this.model,apiKey:this.apiKey,apiVersion:this.apiVersion}).then(s=>{s&&this.mergeNewContent(s)})}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0:{handler(){this.content&&this.mergeNewContent(this.content)},immediate:!0},onUpdateHook1:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook2:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook3:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){o.isBrowser()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){var t,e;return{0:(e=(t=this.builderContextSignal.content)==null?void 0:t.data)==null?void 0:e.jsCode,1:this.builderContextSignal.rootState}},onUpdateHook2(){var t,e;return{0:(e=(t=this.builderContextSignal.content)==null?void 0:t.data)==null?void 0:e.httpRequests}},onUpdateHook3(){return{0:this.builderContextSignal.rootState}}},methods:{mergeNewContent(t){var e,n,i,a,r;this.builderContextSignal.content={...this.builderContextSignal.content,...t,data:{...(e=this.builderContextSignal.content)==null?void 0:e.data,...t==null?void 0:t.data},meta:{...(n=this.builderContextSignal.content)==null?void 0:n.meta,...t==null?void 0:t.meta,breakpoints:((i=t==null?void 0:t.meta)==null?void 0:i.breakpoints)||((r=(a=this.builderContextSignal.content)==null?void 0:a.meta)==null?void 0:r.breakpoints)}}},setBreakpoints(t){var e;this.builderContextSignal.content={...this.builderContextSignal.content,meta:{...(e=this.builderContextSignal.content)==null?void 0:e.meta,breakpoints:t}}},contentSetState(t){this.builderContextSignal.rootState=t},processMessage(t){var n;const{data:e}=t;if(e)switch(e.type){case"builder.configureSdk":{const i=e.data,{breakpoints:a,contentId:r}=i;if(!r||r!==((n=this.builderContextSignal.content)==null?void 0:n.id))return;a&&this.setBreakpoints(a),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const i=e.data,a=i.key||i.alias||i.entry||i.modelName,r=i.data;a===this.model&&(this.mergeNewContent(r),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var e,n;const t=(n=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:n.jsCode;t&&g.evaluate({code:t,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.contentSetState})},onClick(t){var e,n;if(this.builderContextSignal.content){const i=(e=this.builderContextSignal.content)==null?void 0:e.testVariationId,a=(n=this.builderContextSignal.content)==null?void 0:n.id;o._track({type:"click",canTrack:this.canTrackToUse,contentId:a,apiKey:this.apiKey,variationId:i!==a?i:void 0,...ee(t),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(t){return t.replace(/{{([^}]+)}}/g,(e,n)=>g.evaluate({code:n,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.contentSetState}))},handleRequest({url:t,key:e}){o.fetch(t).then(n=>n.json()).then(n=>{const i={...this.builderContextSignal.rootState,[e]:n};this.contentSetState(i)}).catch(n=>{console.error("error fetching dynamic data",t,n)})},runHttpRequests(){var e,n,i;const t=(i=(n=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:n.httpRequests)!=null?i:{};Object.entries(t).forEach(([a,r])=>{if(r&&(!this.httpReqsData[a]||o.isEditing())){const s=this.evalExpression(r);this.handleRequest({url:s,key:a})}})},emitStateUpdate(){o.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.builderContextSignal.rootState,ref:{name:this.model}}}))},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const i of n)e[i]=!0;return e}}});var re=function(){var i,a,r,s,d,l,u,c;var e=this,n=e._self._c;return e._self._setupProxy,e.builderContextSignal.content?n("div",e._b({ref:"elementRef",class:e._classStringToObject(e.classNameProp),attrs:{"builder-content-id":(i=e.builderContextSignal.content)==null?void 0:i.id,"builder-model":e.model},on:{click:function(p){return e.onClick(p)}}},"div",{...e.TARGET==="reactNative"?{dataSet:{"builder-content-id":""}}:{},...e.hideContent?{hidden:!0,"aria-hidden":!0}:{}},!1),[e.isSsrAbTest?[n("script",{tag:"component",domProps:{innerHTML:e._s(e.scriptStr)}})]:e._e(),e.TARGET!=="reactNative"?[n("render-content-styles",{attrs:{contentId:(a=e.builderContextSignal.content)==null?void 0:a.id,cssCode:(s=(r=e.builderContextSignal.content)==null?void 0:r.data)==null?void 0:s.cssCode,customFonts:(l=(d=e.builderContextSignal.content)==null?void 0:d.data)==null?void 0:l.customFonts}})]:e._e(),n("render-blocks",{key:e.forceReRenderCount,attrs:{blocks:(c=(u=e.builderContextSignal.content)==null?void 0:u.data)==null?void 0:c.blocks}})],2):e._e()},se=[],le=o.normalizeComponent(oe,re,se,!1,null,null,null,null);const de=le.exports;exports.default=de;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),o=require("./index.3d5a7a37.cjs"),g=require("./evaluate.d837a845.cjs"),v={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},S={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:o.serializeFn(t=>{function e(){n.forEach(i=>{i.delete("width")})}const n=t.get("columns");Array.isArray(n)&&!!n.find(a=>a.get("width"))&&(!!n.find(r=>!r.get("width"))||n.reduce((d,l)=>d+l.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}]},C={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},k={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%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:o.serializeFn(t=>{t.delete("srcset"),t.delete("noWebp");function n(s,d=6e4){return new Promise((l,u)=>{const c=document.createElement("img");let p=!1;c.onload=()=>{p=!0,l(c)},c.addEventListener("error",m=>{console.warn("Image load failed",m.error),u(m.error)}),c.src=s,setTimeout(()=>{p||u(new Error("Image load timed out"))},d)})}function i(s){return Math.round(s*1e3)/1e3}const a=t.get("image"),r=t.get("aspectRatio");if(fetch(a).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&t.set("noWebp",!0)}),a&&(!r||r===.7041))return n(a).then(s=>{const d=t.get("aspectRatio");t.get("image")===a&&(!d||d===.7041)&&s.width&&s.height&&(t.set("aspectRatio",i(s.height/s.width)),t.set("height",s.height),t.set("width",s.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}]},T={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>"}}}]},w={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"}]},R={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"}},I={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}]},_={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:o.serializeFn(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(i=>i.json()).then(i=>{t.get("url")===e&&(i.html?t.set("content",i.html):t.set("content","Invalid url, please try another"))}).catch(i=>{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}]},E=["text/javascript","application/javascript","application/ecmascript"],F=t=>E.includes(t.type),A=h.defineComponent({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 i=document.createElement("script");i.async=!0,i.src=n.src,document.head.appendChild(i)}else if(F(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(i){console.warn("`Embed`: Error running script:",i)}}}}});var V=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:e._s(e.content)}})},P=[],U=o.normalizeComponent(A,V,P,!1,null,null,null,null);const j=U.exports,H=h.defineComponent({name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:o.isEditing}},methods:{filterAttrs:function(e={},n){const i="v-on:";return Object.keys(e).filter(a=>{if(!e[a])return!1;const r=a.startsWith(i);return n?r:!r}).reduce((a,r)=>({...a,[r.replace(i,"")]:e[r]}),{})}}});var $=function(){var e=this,n=e._self._c;return e._self._setupProxy,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)))},W=[],M=o.normalizeComponent(H,$,W,!1,null,null,null,null);const q=M.exports,L={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","gif","webp"],required:!0}],noWrap:!0,static:!0},B=h.defineComponent({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 i=document.createElement("script");i.async=!0,i.src=n.src,document.head.appendChild(i)}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(i){console.warn("`CustomCode`: Error running script:",i)}}}}},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const i of n)e[i]=!0;return e}}});var N=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{ref:"elem",class:e._classStringToObject("builder-custom-code"+(e.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:e._s(e.code)}})},O=[],z=o.normalizeComponent(B,N,O,!1,null,null,null,null);const K=z.exports,D={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}]},J=()=>[{component:o.Button,...v},{component:o.Columns,...S},{component:K,...D},{component:j,..._},{component:o.Fragment,...C},{component:o.Image,...k},{component:q,...L},{component:o.Section,...T},{component:o.Symbol,...w},{component:o.Text,...R},{component:o.Video,...I}],G="0.4.3",Y=()=>{o.register("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 b=!1;const X=(t={})=>{var e,n;b||(b=!0,o.isBrowser()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:o.TARGET,version:G,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:t}},"*"),window.addEventListener("message",({data:i})=>{var a,r;if(!!(i!=null&&i.type))switch(i.type){case"builder.evaluate":{const s=i.data.text,d=i.data.arguments||[],l=i.data.id,u=new Function(s);let c,p=null;try{c=u.apply(null,d)}catch(m){p=m}p?(a=window.parent)==null||a.postMessage({type:"builder.evaluateError",data:{id:l,error:p.message}},"*"):c&&typeof c.then=="function"?c.then(m=>{var f;(f=window.parent)==null||f.postMessage({type:"builder.evaluateResult",data:{id:l,result:m}},"*")}).catch(console.error):(r=window.parent)==null||r.postMessage({type:"builder.evaluateResult",data:{result:c,id:l}},"*");break}}})))};function x(t){return Math.round(t*1e3)/1e3}const Q=(t,e,n=!0)=>{if(!(t instanceof HTMLElement))return null;let i=n?t:t.parentElement;do{if(!i)return null;if(e(i))return i}while(i=i.parentElement);return null},Z=t=>Q(t,e=>{const n=e.getAttribute("builder-id")||e.id;return Boolean((n==null?void 0:n.indexOf("builder-"))===0)}),y=({event:t,target:e})=>{const n=e.getBoundingClientRect(),i=t.clientX-n.left,a=t.clientY-n.top,r=x(i/n.width),s=x(a/n.height);return{x:r,y:s}},ee=t=>{const e=t.target,n=e&&Z(e),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:e?y({event:t,target:e}):void 0,builderTargetOffset:n?y({event:t,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},te=({content:t,data:e,locale:n})=>{var r,s,d;const i={};(s=(r=t==null?void 0:t.data)==null?void 0:r.inputs)==null||s.forEach(l=>{var u;l.name&&l.defaultValue!==void 0&&((u=t==null?void 0:t.data)==null?void 0:u.state)&&t.data.state[l.name]===void 0&&(i[l.name]=l.defaultValue)});const a={...(d=t==null?void 0:t.data)==null?void 0:d.state,...e,...n?{locale:n}:{}};return{...i,...a}},ne=({content:t,data:e})=>t?{...t,data:{...t==null?void 0:t.data,...e},meta:t==null?void 0:t.meta}:void 0,ie=()=>Promise.resolve().then(()=>require("./index.3d5a7a37.cjs")).then(t=>t.renderBlocks$1).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",t),t}),ae=()=>Promise.resolve().then(()=>require("./render-styles.f1413001.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}),oe=h.defineComponent({name:"render-content",components:{RenderContentStyles:ae,RenderBlocks:ie},props:["canTrack","model","context","apiKey","content","parentContentId","data","locale","apiVersion","customComponents","hideContent","classNameProp","isSsrAbTest","includeRefs","enrich"],data(){var t;return{forceReRenderCount:0,overrideContent:null,update:0,canTrackToUse:o.checkIsDefined(this.canTrack)?this.canTrack:!0,httpReqsData:{},clicked:!1,scriptStr:o.getRenderContentScriptString({contentId:(t=this.content)==null?void 0:t.id,parentContentId:this.parentContentId}),builderContextSignal:{content:ne({content:this.content,data:this.data}),localState:void 0,rootState:te({content:this.content,data:this.data,locale:this.locale}),rootSetState:this.contentSetState,context:this.context||{},apiKey:this.apiKey,apiVersion:this.apiVersion,registeredComponents:[...J(),...o.components,...this.customComponents||[]].reduce((e,{component:n,...i})=>({...e,[i.name]:{component:n,...i}}),{}),inheritedStyles:{}},builderContext:o.BuilderContext,TARGET:o.TARGET}},provide(){const t=this;return{[o.BuilderContext.key]:t.builderContextSignal}},mounted(){var t,e;if(this.apiKey||o.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),o.isBrowser()){if(o.isEditing()&&(this.forceReRenderCount=this.forceReRenderCount+1,Y(),X({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{},...this.enrich?{enrich:this.enrich}:{}}),Object.values(this.builderContextSignal.registeredComponents).forEach(n=>{var a;const i=o.createRegisterComponentMessage(n);(a=window.parent)==null||a.postMessage(i,"*")}),window.addEventListener("message",this.processMessage),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.builderContextSignal.content){const n=(t=this.builderContextSignal.content)==null?void 0:t.testVariationId,i=(e=this.builderContextSignal.content)==null?void 0:e.id;o._track({type:"impression",canTrack:this.canTrackToUse,contentId:i,apiKey:this.apiKey,variationId:n!==i?n:void 0})}if(o.isPreviewing()){const n=new URL(location.href).searchParams,i=n.get("builder.preview"),a=n.get(`builder.preview.${i}`),r=n.get("apiKey")||n.get("builder.space");i===this.model&&r===this.apiKey&&(!this.content||a===this.content.id)&&o.getContent({model:this.model,apiKey:this.apiKey,apiVersion:this.apiVersion}).then(s=>{s&&this.mergeNewContent(s)})}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0:{handler(){this.content&&this.mergeNewContent(this.content)},immediate:!0},onUpdateHook1:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook2:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook3:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){o.isBrowser()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){var t,e;return{0:(e=(t=this.builderContextSignal.content)==null?void 0:t.data)==null?void 0:e.jsCode,1:this.builderContextSignal.rootState}},onUpdateHook2(){var t,e;return{0:(e=(t=this.builderContextSignal.content)==null?void 0:t.data)==null?void 0:e.httpRequests}},onUpdateHook3(){return{0:this.builderContextSignal.rootState}}},methods:{mergeNewContent(t){var e,n,i,a,r;this.builderContextSignal.content={...this.builderContextSignal.content,...t,data:{...(e=this.builderContextSignal.content)==null?void 0:e.data,...t==null?void 0:t.data},meta:{...(n=this.builderContextSignal.content)==null?void 0:n.meta,...t==null?void 0:t.meta,breakpoints:((i=t==null?void 0:t.meta)==null?void 0:i.breakpoints)||((r=(a=this.builderContextSignal.content)==null?void 0:a.meta)==null?void 0:r.breakpoints)}}},setBreakpoints(t){var e;this.builderContextSignal.content={...this.builderContextSignal.content,meta:{...(e=this.builderContextSignal.content)==null?void 0:e.meta,breakpoints:t}}},contentSetState(t){this.builderContextSignal.rootState=t},processMessage(t){var n;const{data:e}=t;if(e)switch(e.type){case"builder.configureSdk":{const i=e.data,{breakpoints:a,contentId:r}=i;if(!r||r!==((n=this.builderContextSignal.content)==null?void 0:n.id))return;a&&this.setBreakpoints(a),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const i=e.data,a=i.key||i.alias||i.entry||i.modelName,r=i.data;a===this.model&&(this.mergeNewContent(r),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var e,n;const t=(n=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:n.jsCode;t&&g.evaluate({code:t,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.contentSetState})},onClick(t){var e,n;if(this.builderContextSignal.content){const i=(e=this.builderContextSignal.content)==null?void 0:e.testVariationId,a=(n=this.builderContextSignal.content)==null?void 0:n.id;o._track({type:"click",canTrack:this.canTrackToUse,contentId:a,apiKey:this.apiKey,variationId:i!==a?i:void 0,...ee(t),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(t){return t.replace(/{{([^}]+)}}/g,(e,n)=>g.evaluate({code:n,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.contentSetState}))},handleRequest({url:t,key:e}){o.fetch(t).then(n=>n.json()).then(n=>{const i={...this.builderContextSignal.rootState,[e]:n};this.contentSetState(i)}).catch(n=>{console.error("error fetching dynamic data",t,n)})},runHttpRequests(){var e,n,i;const t=(i=(n=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:n.httpRequests)!=null?i:{};Object.entries(t).forEach(([a,r])=>{if(r&&(!this.httpReqsData[a]||o.isEditing())){const s=this.evalExpression(r);this.handleRequest({url:s,key:a})}})},emitStateUpdate(){o.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.builderContextSignal.rootState,ref:{name:this.model}}}))},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const i of n)e[i]=!0;return e}}});var re=function(){var i,a,r,s,d,l,u,c;var e=this,n=e._self._c;return e._self._setupProxy,e.builderContextSignal.content?n("div",e._b({ref:"elementRef",class:e._classStringToObject(e.classNameProp),attrs:{"builder-content-id":(i=e.builderContextSignal.content)==null?void 0:i.id,"builder-model":e.model},on:{click:function(p){return e.onClick(p)}}},"div",{...e.TARGET==="reactNative"?{dataSet:{"builder-content-id":""}}:{},...e.hideContent?{hidden:!0,"aria-hidden":!0}:{}},!1),[e.isSsrAbTest?[n("script",{tag:"component",domProps:{innerHTML:e._s(e.scriptStr)}})]:e._e(),e.TARGET!=="reactNative"?[n("render-content-styles",{attrs:{contentId:(a=e.builderContextSignal.content)==null?void 0:a.id,cssCode:(s=(r=e.builderContextSignal.content)==null?void 0:r.data)==null?void 0:s.cssCode,customFonts:(l=(d=e.builderContextSignal.content)==null?void 0:d.data)==null?void 0:l.customFonts}})]:e._e(),n("render-blocks",{key:e.forceReRenderCount,attrs:{blocks:(c=(u=e.builderContextSignal.content)==null?void 0:u.data)==null?void 0:c.blocks}})],2):e._e()},se=[],le=o.normalizeComponent(oe,re,se,!1,null,null,null,null);const de=le.exports;exports.default=de;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as h } from "vue";
|
|
2
|
-
import { s as b, n as f, i as m, B as I, C as R, F as _, I as E, S as F, d as V, e as A, V as U, r as P, b as g, T as w, c as j, h as H, j as $, k as y, l as W, m as L, _ as v, o as M, p as q, q as B } from "./index.
|
|
3
|
-
import { e as S } from "./evaluate.
|
|
2
|
+
import { s as b, n as f, i as m, B as I, C as R, F as _, I as E, S as F, d as V, e as A, V as U, r as P, b as g, T as w, c as j, h as H, j as $, k as y, l as W, m as L, _ as v, o as M, p as q, q as B } from "./index.1074d675.js";
|
|
3
|
+
import { e as S } from "./evaluate.d2d16952.js";
|
|
4
4
|
const N = {
|
|
5
5
|
name: "Core:Button",
|
|
6
6
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
@@ -854,7 +854,7 @@ const fe = he.exports, ge = {
|
|
|
854
854
|
{ component: V, ...J },
|
|
855
855
|
{ component: A, ...Y },
|
|
856
856
|
{ component: U, ...G }
|
|
857
|
-
], xe = "0.4.
|
|
857
|
+
], xe = "0.4.3", ye = () => {
|
|
858
858
|
P("insertMenu", {
|
|
859
859
|
name: "_default",
|
|
860
860
|
default: !0,
|
|
@@ -995,12 +995,12 @@ const Se = (t, e, n = !0) => {
|
|
|
995
995
|
...e
|
|
996
996
|
},
|
|
997
997
|
meta: t == null ? void 0 : t.meta
|
|
998
|
-
} : void 0, Ie = () => import("./index.
|
|
998
|
+
} : void 0, Ie = () => import("./index.1074d675.js").then((t) => t.A).then((t) => t.default).catch((t) => {
|
|
999
999
|
throw console.error(
|
|
1000
1000
|
"Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
|
|
1001
1001
|
t
|
|
1002
1002
|
), t;
|
|
1003
|
-
}), Re = () => import("./render-styles.
|
|
1003
|
+
}), Re = () => import("./render-styles.7b01db22.js").then((t) => t.default).catch((t) => {
|
|
1004
1004
|
throw console.error(
|
|
1005
1005
|
"Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
|
|
1006
1006
|
t
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),s=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),s=require("./index.3d5a7a37.cjs"),t=r.defineComponent({name:"render-inlined-styles",props:["styles","id"]});var l=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("style",{tag:"component",attrs:{id:e.id},domProps:{innerHTML:e._s(e.styles)}})},o=[],i=s.normalizeComponent(t,l,o,!1,null,null,null,null);const d=i.exports;exports.default=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./index.3d5a7a37.cjs"),c=()=>Promise.resolve().then(()=>require("./render-block.43f24cc4.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block.vue",e),e}),l=o.defineComponent({name:"render-repeated-block",components:{RenderBlock:c},props:["repeatContext","block"],data(){return{store:this.repeatContext}},provide(){const e=this;return{[r.BuilderContext.key]:e.store}}});var s=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("render-block",{attrs:{block:t.block,context:t.store}})},a=[],d=r.normalizeComponent(l,s,a,!1,null,null,null,null);const i=d.exports;exports.default=i;
|
package/packages/_vue2/dist/{render-repeated-block.ac4f1559.js → render-repeated-block.d3c2411b.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as o } from "vue";
|
|
2
|
-
import { k as n, n as c } from "./index.
|
|
3
|
-
const l = () => import("./render-block.
|
|
2
|
+
import { k as n, n as c } from "./index.1074d675.js";
|
|
3
|
+
const l = () => import("./render-block.1ec27d4d.js").then((e) => e.default).catch((e) => {
|
|
4
4
|
throw console.error(
|
|
5
5
|
"Error while attempting to dynamically import component RenderBlock at ./render-block.vue",
|
|
6
6
|
e
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f } from "vue";
|
|
2
|
-
import { n as c } from "./index.
|
|
2
|
+
import { n as c } from "./index.1074d675.js";
|
|
3
3
|
const d = (e) => {
|
|
4
4
|
var o, a;
|
|
5
5
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), r = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (o = e == null ? void 0 : e.files) == null ? void 0 : o.regular;
|
|
@@ -32,7 +32,7 @@ font-weight: ${n};
|
|
|
32
32
|
}, u = ({
|
|
33
33
|
cssCode: e,
|
|
34
34
|
contentId: t
|
|
35
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", p = () => import("./render-inlined-styles.
|
|
35
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", p = () => import("./render-inlined-styles.f76aba42.js").then((e) => e.default).catch((e) => {
|
|
36
36
|
throw console.error(
|
|
37
37
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../render-inlined-styles.vue",
|
|
38
38
|
e
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),d=require("./index.3d5a7a37.cjs"),f=e=>{var o,a;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),r=t.split(",")[0],i=(a=e.fileUrl)!=null?a:(o=e==null?void 0:e.files)==null?void 0:o.regular;let l="";if(i&&t&&r&&(l+=`
|
|
2
2
|
@font-face {
|
|
3
3
|
font-family: "${t}";
|
|
4
4
|
src: local("${r}"), url('${i}') format('woff2');
|
|
@@ -12,7 +12,7 @@ src: url('${s}') format('woff2');
|
|
|
12
12
|
font-display: fallback;
|
|
13
13
|
font-weight: ${n};
|
|
14
14
|
}
|
|
15
|
-
`.trim())}return l},u=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(r=>
|
|
15
|
+
`.trim())}return l},u=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(r=>f(r)))==null?void 0:t.join(" "))||""},m=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",p=()=>Promise.resolve().then(()=>require("./render-inlined-styles.1ed1b531.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}),h=c.defineComponent({name:"render-content-styles",components:{RenderInlinedStyles:p},props:["cssCode","contentId","customFonts"],data(){return{injectedStyles:`
|
|
16
16
|
${m({cssCode:this.cssCode,contentId:this.contentId})}
|
|
17
17
|
${u({customFonts:this.customFonts})}
|
|
18
18
|
|
|
@@ -28,4 +28,4 @@ ${u({customFonts:this.customFonts})}
|
|
|
28
28
|
text-align: inherit;
|
|
29
29
|
font-family: inherit;
|
|
30
30
|
}
|
|
31
|
-
`.trim()}}});var y=function(){var t=this,r=t._self._c;return t._self._setupProxy,r("render-inlined-styles",{attrs:{styles:t.injectedStyles}})},g=[],_=
|
|
31
|
+
`.trim()}}});var y=function(){var t=this,r=t._self._c;return t._self._setupProxy,r("render-inlined-styles",{attrs:{styles:t.injectedStyles}})},g=[],_=d.normalizeComponent(h,y,g,!1,null,null,null,null);const b=_.exports;exports.default=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.3d5a7a37.cjs");require("vue");exports.Button=e.Button;exports.Columns=e.Columns;exports.Fragment=e.Fragment;exports.Image=e.Image;exports.RenderBlocks=e.renderBlocks;exports.RenderContent=e.renderContentVariants;exports.Section=e.Section;exports.Symbol=e.Symbol;exports.Text=e.Text;exports.Video=e.Video;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.processContentResult=e.processContentResult;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.track=e.track;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as a, C as n, F as o, I as r, y as i, z as g, S as m, d, e as l, V as C, m as c, u as p, w as u, p as S, i as B, o as R, v as x, r as k, t as v, x as w } from "./index.
|
|
1
|
+
import { B as a, C as n, F as o, I as r, y as i, z as g, S as m, d, e as l, V as C, m as c, u as p, w as u, p as S, i as B, o as R, v as x, r as k, t as v, x as w } from "./index.1074d675.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
export {
|
|
4
4
|
a as Button,
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* We can't make this a generic `ProvideContext` function because Vue 2 won't support root slots, e.g.
|
|
3
|
-
*
|
|
4
|
-
* ```vue
|
|
5
|
-
* <template>
|
|
6
|
-
* <slot></slot>
|
|
7
|
-
* </template>
|
|
8
|
-
* ```
|
|
9
|
-
*/
|
|
10
1
|
declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
11
2
|
block?: any;
|
|
12
3
|
repeatContext?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.3";
|