@builder.io/sdk-vue 0.4.1 → 0.4.2

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.
Files changed (64) hide show
  1. package/package.json +1 -1
  2. package/packages/_vue2/dist/{block-styles.69ca115c.js → block-styles.6a1d7394.js} +4 -4
  3. package/packages/_vue2/dist/{block-styles.18ca317b.cjs → block-styles.cacb4849.cjs} +1 -1
  4. package/packages/{_vue3/dist/css.7fe37cb4.js → _vue2/dist/css.49cc4003.js} +2 -2
  5. package/packages/{_vue3/dist/css.5cacc3c3.cjs → _vue2/dist/css.c26b7ab4.cjs} +1 -1
  6. package/packages/_vue2/dist/{evaluate.8238dbc9.js → evaluate.6ab6e7cb.js} +1 -1
  7. package/packages/_vue2/dist/{evaluate.cff086ca.cjs → evaluate.7d21bb04.cjs} +1 -1
  8. package/packages/_vue2/dist/{index.e2db82e0.js → index.2473a355.js} +39 -37
  9. package/packages/_vue2/dist/{index.c16f4cca.cjs → index.95d9006f.cjs} +4 -4
  10. package/packages/_vue2/dist/{render-block.0f23cd7e.js → render-block.22052bd8.js} +20 -33
  11. package/packages/_vue2/dist/render-block.9342f7b5.cjs +3 -0
  12. package/packages/_vue2/dist/{render-component.74280c04.js → render-component.ec485884.js} +3 -3
  13. package/packages/_vue2/dist/{render-component.e8047ef5.cjs → render-component.f3cccaa9.cjs} +1 -1
  14. package/packages/_vue2/dist/{render-content.672eabd9.js → render-content.a6b17a6c.js} +270 -271
  15. package/packages/_vue2/dist/render-content.d53085e5.cjs +1 -0
  16. package/packages/_vue2/dist/{render-inlined-styles.ac06208e.js → render-inlined-styles.2286ef7c.js} +1 -1
  17. package/packages/_vue2/dist/{render-inlined-styles.2c0cf85b.cjs → render-inlined-styles.b322c74a.cjs} +1 -1
  18. package/packages/_vue2/dist/render-repeated-block.253c96e6.cjs +1 -0
  19. package/packages/_vue2/dist/render-repeated-block.ac4f1559.js +38 -0
  20. package/packages/_vue2/dist/{render-styles.e6e62ba1.cjs → render-styles.0cb949b0.cjs} +2 -2
  21. package/packages/_vue2/dist/{render-styles.af4e2d5a.js → render-styles.a148b748.js} +2 -2
  22. package/packages/_vue2/dist/sdk.cjs +1 -1
  23. package/packages/_vue2/dist/sdk.js +1 -1
  24. package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +3 -1
  25. package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +27 -5
  26. package/packages/_vue2/dist/src/components/render-content-variants/render-content-variants.vue.d.ts +3 -3
  27. package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
  28. package/packages/_vue2/dist/style.css +1 -1
  29. package/packages/_vue3/dist/{block-styles.e3f09eb7.cjs → block-styles.5b949efb.cjs} +1 -1
  30. package/packages/_vue3/dist/{block-styles.7969d695.js → block-styles.e91165b8.js} +4 -4
  31. package/packages/{_vue2/dist/css.ce776b44.js → _vue3/dist/css.41ed2294.js} +2 -2
  32. package/packages/{_vue2/dist/css.24c082d4.cjs → _vue3/dist/css.627e21ae.cjs} +1 -1
  33. package/packages/_vue3/dist/{evaluate.975fa4d3.js → evaluate.0662f166.js} +1 -1
  34. package/packages/_vue3/dist/{evaluate.9a614eea.cjs → evaluate.da45a33b.cjs} +1 -1
  35. package/packages/_vue3/dist/{index.cdd37dcf.js → index.3a561c6a.js} +39 -38
  36. package/packages/_vue3/dist/{index.3f716812.cjs → index.3e17c057.cjs} +4 -4
  37. package/packages/_vue3/dist/render-block.20c07cb1.cjs +3 -0
  38. package/packages/_vue3/dist/render-block.e9a2cb71.js +273 -0
  39. package/packages/_vue3/dist/{render-component.788543b4.cjs → render-component.20ef18f7.cjs} +1 -1
  40. package/packages/_vue3/dist/{render-component.9bd5c435.js → render-component.afa60a7b.js} +3 -3
  41. package/packages/_vue3/dist/{render-content.0423df8b.js → render-content.20bd0f8d.js} +185 -186
  42. package/packages/_vue3/dist/render-content.e790eee5.cjs +1 -0
  43. package/packages/_vue3/dist/{render-inlined-styles.49a121f8.js → render-inlined-styles.0444f4fe.js} +1 -1
  44. package/packages/_vue3/dist/{render-inlined-styles.528fb5cd.cjs → render-inlined-styles.14d9ba36.cjs} +1 -1
  45. package/packages/_vue3/dist/render-repeated-block.5a245883.js +32 -0
  46. package/packages/_vue3/dist/render-repeated-block.75230844.cjs +1 -0
  47. package/packages/_vue3/dist/{render-styles.3411b577.js → render-styles.73c7ba5a.js} +2 -2
  48. package/packages/_vue3/dist/{render-styles.b4509dd3.cjs → render-styles.bd7475f8.cjs} +2 -2
  49. package/packages/_vue3/dist/sdk.cjs +1 -1
  50. package/packages/_vue3/dist/sdk.js +1 -1
  51. package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +3 -1
  52. package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +36 -14
  53. package/packages/_vue3/dist/src/components/render-content-variants/render-content-variants.vue.d.ts +3 -3
  54. package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
  55. package/packages/_vue3/dist/style.css +1 -1
  56. package/packages/_vue2/dist/render-block.954cc390.cjs +0 -3
  57. package/packages/_vue2/dist/render-content.702f0387.cjs +0 -1
  58. package/packages/_vue2/dist/render-repeated-block.5740965b.cjs +0 -1
  59. package/packages/_vue2/dist/render-repeated-block.c40e7c25.js +0 -45
  60. package/packages/_vue3/dist/render-block.348e561a.js +0 -286
  61. package/packages/_vue3/dist/render-block.d1c4ccaa.cjs +0 -3
  62. package/packages/_vue3/dist/render-content.17e9b187.cjs +0 -1
  63. package/packages/_vue3/dist/render-repeated-block.04301799.cjs +0 -1
  64. package/packages/_vue3/dist/render-repeated-block.35a0d813.js +0 -39
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),a=require("./index.3e17c057.cjs"),y=require("./evaluate.da45a33b.cjs"),k={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},T={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:a.serializeFn(e=>{function n(){t.forEach(o=>{o.delete("width")})}const t=e.get("columns");Array.isArray(t)&&!!t.find(i=>i.get("width"))&&(!!t.find(r=>!r.get("width"))||t.reduce((c,d)=>c+d.get("width"),0)!==100)&&n()})},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},w={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},R={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:a.serializeFn(e=>{e.delete("srcset"),e.delete("noWebp");function t(l,c=6e4){return new Promise((d,p)=>{const u=document.createElement("img");let m=!1;u.onload=()=>{m=!0,d(u)},u.addEventListener("error",h=>{console.warn("Image load failed",h.error),p(h.error)}),u.src=l,setTimeout(()=>{m||p(new Error("Image load timed out"))},c)})}function o(l){return Math.round(l*1e3)/1e3}const i=e.get("image"),r=e.get("aspectRatio");if(fetch(i).then(l=>l.blob()).then(l=>{l.type.includes("svg")&&e.set("noWebp",!0)}),i&&(!r||r===.7041))return t(i).then(l=>{const c=e.get("aspectRatio");e.get("image")===i&&(!c||c===.7041)&&l.width&&l.height&&(e.set("aspectRatio",o(l.height/l.width)),e.set("height",l.height),e.set("width",l.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}]},I={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>"}}}]},E={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"}]},F={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"}},A={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}]},V={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:a.serializeFn(e=>{const n=e.get("url");if(n)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${n}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{e.get("url")===n&&(o.html?e.set("content",o.html):e.set("content","Invalid url, please try another"))}).catch(o=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")})},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},U=["text/javascript","application/javascript","application/ecmascript"],$=e=>U.includes(e.type),B=s.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 e=this.$refs.elem.getElementsByTagName("script");for(let n=0;n<e.length;n++){const t=e[n];if(t.src&&!this.scriptsInserted.includes(t.src)){this.scriptsInserted.push(t.src);const o=document.createElement("script");o.async=!0,o.src=t.src,document.head.appendChild(o)}else if($(t)&&!this.scriptsRun.includes(t.innerText))try{this.scriptsRun.push(t.innerText),new Function(t.innerText)()}catch(o){console.warn("`Embed`: Error running script:",o)}}}}}),P=["innerHTML"];function j(e,n,t,o,i,r){return s.openBlock(),s.createElementBlock("div",{class:"builder-embed",ref:"elem",innerHTML:e.content},null,8,P)}const H=a._export_sfc(B,[["render",j]]),_=s.defineComponent({name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:a.isEditing}},methods:{filterAttrs:function(n={},t){const o="v-on:";return Object.keys(n).filter(i=>{if(!n[i])return!1;const r=i.startsWith(o);return t?r:!r}).reduce((i,r)=>({...i,[r.replace(o,"")]:n[r]}),{})}}}),M=["alt","src"];function L(e,n,t,o,i,r){return s.openBlock(),s.createElementBlock("img",s.mergeProps({style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},key:e.isEditing()&&e.imgSrc||"default-key",alt:e.altText,src:e.imgSrc||e.image},e.filterAttrs(e.attributes,!1),s.toHandlers(e.filterAttrs(e.attributes,!0),!0)),null,16,M)}const W=a._export_sfc(_,[["render",L]]),q={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},N=s.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 e=this.$refs.elem.getElementsByTagName("script");for(let n=0;n<e.length;n++){const t=e[n];if(t.src){if(this.scriptsInserted.includes(t.src))continue;this.scriptsInserted.push(t.src);const o=document.createElement("script");o.async=!0,o.src=t.src,document.head.appendChild(o)}else if(!t.type||["text/javascript","application/javascript","application/ecmascript"].includes(t.type)){if(this.scriptsRun.includes(t.innerText))continue;try{this.scriptsRun.push(t.innerText),new Function(t.innerText)()}catch(o){console.warn("`CustomCode`: Error running script:",o)}}}}},_classStringToObject(e){const n={};if(typeof e!="string")return n;const t=e.trim().split(/\s+/);for(const o of t)n[o]=!0;return n}}}),O=["innerHTML"];function D(e,n,t,o,i,r){return s.openBlock(),s.createElementBlock("div",{ref:"elem",class:s.normalizeClass(e._classStringToObject("builder-custom-code"+(e.replaceNodes?" replace-nodes":""))),innerHTML:e.code},null,10,O)}const K=a._export_sfc(N,[["render",D]]),z={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:a.Button,...k},{component:a.Columns,...T},{component:K,...z},{component:H,...V},{component:a.Fragment,...w},{component:a.Image,...R},{component:W,...q},{component:a.Section,...I},{component:a.Symbol,...E},{component:a.Text,...F},{component:a.Video,...A}],G="0.4.2",Y=()=>{a.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 v=!1;const X=(e={})=>{var n,t;v||(v=!0,a.isBrowser()&&((n=window.parent)==null||n.postMessage({type:"builder.sdkInfo",data:{target:a.TARGET,version:G,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(t=window.parent)==null||t.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",({data:o})=>{var i,r;if(!!(o!=null&&o.type))switch(o.type){case"builder.evaluate":{const l=o.data.text,c=o.data.arguments||[],d=o.data.id,p=new Function(l);let u,m=null;try{u=p.apply(null,c)}catch(h){m=h}m?(i=window.parent)==null||i.postMessage({type:"builder.evaluateError",data:{id:d,error:m.message}},"*"):u&&typeof u.then=="function"?u.then(h=>{var f;(f=window.parent)==null||f.postMessage({type:"builder.evaluateResult",data:{id:d,result:h}},"*")}).catch(console.error):(r=window.parent)==null||r.postMessage({type:"builder.evaluateResult",data:{result:u,id:d}},"*");break}}})))};function x(e){return Math.round(e*1e3)/1e3}const Q=(e,n,t=!0)=>{if(!(e instanceof HTMLElement))return null;let o=t?e:e.parentElement;do{if(!o)return null;if(n(o))return o}while(o=o.parentElement);return null},Z=e=>Q(e,n=>{const t=n.getAttribute("builder-id")||n.id;return Boolean((t==null?void 0:t.indexOf("builder-"))===0)}),S=({event:e,target:n})=>{const t=n.getBoundingClientRect(),o=e.clientX-t.left,i=e.clientY-t.top,r=x(o/t.width),l=x(i/t.height);return{x:r,y:l}},ee=e=>{const n=e.target,t=n&&Z(n),o=(t==null?void 0:t.getAttribute("builder-id"))||(t==null?void 0:t.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:n?S({event:e,target:n}):void 0,builderTargetOffset:t?S({event:e,target:t}):void 0,builderElementIndex:t&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(t):void 0}}},te=({content:e,data:n,locale:t})=>{var r,l,c;const o={};(l=(r=e==null?void 0:e.data)==null?void 0:r.inputs)==null||l.forEach(d=>{var p;d.name&&d.defaultValue!==void 0&&((p=e==null?void 0:e.data)==null?void 0:p.state)&&e.data.state[d.name]===void 0&&(o[d.name]=d.defaultValue)});const i={...(c=e==null?void 0:e.data)==null?void 0:c.state,...n,...t?{locale:t}:{}};return{...o,...i}},ne=({content:e,data:n})=>e?{...e,data:{...e==null?void 0:e.data,...n},meta:e==null?void 0:e.meta}:void 0,oe=s.markRaw,ie=()=>Promise.resolve().then(()=>require("./index.3e17c057.cjs")).then(e=>e.renderBlocks$1).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",e),e}),ae=()=>Promise.resolve().then(()=>require("./render-styles.bd7475f8.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",e),e}),re=s.defineComponent({name:"render-content",components:{RenderContentStyles:s.defineAsyncComponent(ae),RenderBlocks:s.defineAsyncComponent(ie)},props:["canTrack","model","context","apiKey","content","parentContentId","data","locale","apiVersion","customComponents","hideContent","classNameProp","isSsrAbTest","includeRefs","enrich"],data(){var e;return{forceReRenderCount:0,overrideContent:null,update:0,canTrackToUse:a.checkIsDefined(this.canTrack)?this.canTrack:!0,httpReqsData:{},clicked:!1,scriptStr:a.getRenderContentScriptString({contentId:(e=this.content)==null?void 0:e.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(),...a.components,...this.customComponents||[]].reduce((n,{component:t,...o})=>({...n,[o.name]:{component:oe(t),...o}}),{}),inheritedStyles:{}},builderContext:a.BuilderContext,TARGET:a.TARGET}},provide(){const e=this;return{[a.BuilderContext.key]:e.builderContextSignal}},mounted(){var e,n;if(this.apiKey||a.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),a.isBrowser()){if(a.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(t=>{var i;const o=a.createRegisterComponentMessage(t);(i=window.parent)==null||i.postMessage(o,"*")}),window.addEventListener("message",this.processMessage),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.builderContextSignal.content){const t=(e=this.builderContextSignal.content)==null?void 0:e.testVariationId,o=(n=this.builderContextSignal.content)==null?void 0:n.id;a._track({type:"impression",canTrack:this.canTrackToUse,contentId:o,apiKey:this.apiKey,variationId:t!==o?t:void 0})}if(a.isPreviewing()){const t=new URL(location.href).searchParams,o=t.get("builder.preview"),i=t.get(`builder.preview.${o}`),r=t.get("apiKey")||t.get("builder.space");o===this.model&&r===this.apiKey&&(!this.content||i===this.content.id)&&a.getContent({model:this.model,apiKey:this.apiKey,apiVersion:this.apiVersion}).then(l=>{l&&this.mergeNewContent(l)})}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(){a.isBrowser()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){var e,n;return{0:(n=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:n.jsCode,1:this.builderContextSignal.rootState}},onUpdateHook2(){var e,n;return{0:(n=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:n.httpRequests}},onUpdateHook3(){return{0:this.builderContextSignal.rootState}}},methods:{mergeNewContent(e){var n,t,o,i,r;this.builderContextSignal.content={...this.builderContextSignal.content,...e,data:{...(n=this.builderContextSignal.content)==null?void 0:n.data,...e==null?void 0:e.data},meta:{...(t=this.builderContextSignal.content)==null?void 0:t.meta,...e==null?void 0:e.meta,breakpoints:((o=e==null?void 0:e.meta)==null?void 0:o.breakpoints)||((r=(i=this.builderContextSignal.content)==null?void 0:i.meta)==null?void 0:r.breakpoints)}}},setBreakpoints(e){var n;this.builderContextSignal.content={...this.builderContextSignal.content,meta:{...(n=this.builderContextSignal.content)==null?void 0:n.meta,breakpoints:e}}},contentSetState(e){this.builderContextSignal.rootState=e},processMessage(e){var t;const{data:n}=e;if(n)switch(n.type){case"builder.configureSdk":{const o=n.data,{breakpoints:i,contentId:r}=o;if(!r||r!==((t=this.builderContextSignal.content)==null?void 0:t.id))return;i&&this.setBreakpoints(i),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const o=n.data,i=o.key||o.alias||o.entry||o.modelName,r=o.data;i===this.model&&(this.mergeNewContent(r),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var n,t;const e=(t=(n=this.builderContextSignal.content)==null?void 0:n.data)==null?void 0:t.jsCode;e&&y.evaluate({code:e,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.contentSetState})},onClick(e){var n,t;if(this.builderContextSignal.content){const o=(n=this.builderContextSignal.content)==null?void 0:n.testVariationId,i=(t=this.builderContextSignal.content)==null?void 0:t.id;a._track({type:"click",canTrack:this.canTrackToUse,contentId:i,apiKey:this.apiKey,variationId:o!==i?o:void 0,...ee(e),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(e){return e.replace(/{{([^}]+)}}/g,(n,t)=>y.evaluate({code:t,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.contentSetState}))},handleRequest({url:e,key:n}){a.fetch(e).then(t=>t.json()).then(t=>{const o={...this.builderContextSignal.rootState,[n]:t};this.contentSetState(o)}).catch(t=>{console.error("error fetching dynamic data",e,t)})},runHttpRequests(){var n,t,o;const e=(o=(t=(n=this.builderContextSignal.content)==null?void 0:n.data)==null?void 0:t.httpRequests)!=null?o:{};Object.entries(e).forEach(([i,r])=>{if(r&&(!this.httpReqsData[i]||a.isEditing())){const l=this.evalExpression(r);this.handleRequest({url:l,key:i})}})},emitStateUpdate(){a.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.builderContextSignal.rootState,ref:{name:this.model}}}))},_classStringToObject(e){const n={};if(typeof e!="string")return n;const t=e.trim().split(/\s+/);for(const o of t)n[o]=!0;return n}}}),se=["builder-content-id","builder-model"];function le(e,n,t,o,i,r){var d,p,u,m,h,f,g,b;const l=s.resolveComponent("render-content-styles"),c=s.resolveComponent("render-blocks");return e.builderContextSignal.content?(s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0,ref:"elementRef",onClick:n[0]||(n[0]=C=>e.onClick(C)),"builder-content-id":(d=e.builderContextSignal.content)==null?void 0:d.id,"builder-model":e.model,class:e._classStringToObject(e.classNameProp)},{...e.TARGET==="reactNative"?{dataSet:{"builder-content-id":""}}:{},...e.hideContent?{hidden:!0,"aria-hidden":!0}:{}}),[e.isSsrAbTest?(s.openBlock(),s.createBlock(s.resolveDynamicComponent("script"),{key:0,innerHTML:e.scriptStr},null,8,["innerHTML"])):s.createCommentVNode("",!0),e.TARGET!=="reactNative"?(s.openBlock(),s.createBlock(l,{key:1,contentId:(p=e.builderContextSignal.content)==null?void 0:p.id,cssCode:(m=(u=e.builderContextSignal.content)==null?void 0:u.data)==null?void 0:m.cssCode,customFonts:(f=(h=e.builderContextSignal.content)==null?void 0:h.data)==null?void 0:f.customFonts},null,8,["contentId","cssCode","customFonts"])):s.createCommentVNode("",!0),(s.openBlock(),s.createBlock(c,{blocks:(b=(g=e.builderContextSignal.content)==null?void 0:g.data)==null?void 0:b.blocks,key:e.forceReRenderCount},null,8,["blocks"]))],16,se)):s.createCommentVNode("",!0)}const de=a._export_sfc(re,[["render",le]]);exports.default=de;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as n, openBlock as r, createBlock as o, resolveDynamicComponent as s } from "vue";
2
- import { _ as t } from "./index.cdd37dcf.js";
2
+ import { _ as t } from "./index.3a561c6a.js";
3
3
  const i = n({
4
4
  name: "render-inlined-styles",
5
5
  props: ["styles", "id"]
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index.3f716812.cjs"),t=e.defineComponent({name:"render-inlined-styles",props:["styles","id"]});function s(n,i,d,c,l,u){return e.openBlock(),e.createBlock(e.resolveDynamicComponent("style"),{innerHTML:n.styles,id:n.id},null,8,["innerHTML","id"])}const o=r._export_sfc(t,[["render",s]]);exports.default=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index.3e17c057.cjs"),t=e.defineComponent({name:"render-inlined-styles",props:["styles","id"]});function s(n,i,c,d,l,u){return e.openBlock(),e.createBlock(e.resolveDynamicComponent("style"),{innerHTML:n.styles,id:n.id},null,8,["innerHTML","id"])}const o=r._export_sfc(t,[["render",s]]);exports.default=o;
@@ -0,0 +1,32 @@
1
+ import { defineComponent as t, defineAsyncComponent as n, resolveComponent as r, openBlock as c, createBlock as p } from "vue";
2
+ import { k as s, _ as l } from "./index.3a561c6a.js";
3
+ const a = () => import("./render-block.e9a2cb71.js").then((e) => e.default).catch((e) => {
4
+ throw console.error(
5
+ "Error while attempting to dynamically import component RenderBlock at ./render-block.vue",
6
+ e
7
+ ), e;
8
+ }), d = t({
9
+ name: "render-repeated-block",
10
+ components: { RenderBlock: n(a) },
11
+ props: ["repeatContext", "block"],
12
+ data() {
13
+ return { store: this.repeatContext };
14
+ },
15
+ provide() {
16
+ const e = this;
17
+ return {
18
+ [s.key]: e.store
19
+ };
20
+ }
21
+ });
22
+ function i(e, k, m, _, f, u) {
23
+ const o = r("render-block");
24
+ return c(), p(o, {
25
+ block: e.block,
26
+ context: e.store
27
+ }, null, 8, ["block", "context"]);
28
+ }
29
+ const B = /* @__PURE__ */ l(d, [["render", i]]);
30
+ export {
31
+ B as default
32
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./index.3e17c057.cjs"),r=()=>Promise.resolve().then(()=>require("./render-block.20c07cb1.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block.vue",e),e}),c=o.defineComponent({name:"render-repeated-block",components:{RenderBlock:o.defineAsyncComponent(r)},props:["repeatContext","block"],data(){return{store:this.repeatContext}},provide(){const e=this;return{[t.BuilderContext.key]:e.store}}});function s(e,d,i,p,a,u){const n=o.resolveComponent("render-block");return o.openBlock(),o.createBlock(n,{block:e.block,context:e.store},null,8,["block","context"])}const l=t._export_sfc(c,[["render",s]]);exports.default=l;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as c, defineAsyncComponent as f, resolveComponent as d, openBlock as p, createBlock as m } from "vue";
2
- import { _ as u } from "./index.cdd37dcf.js";
2
+ import { _ as u } from "./index.3a561c6a.js";
3
3
  const h = (e) => {
4
4
  var o, l;
5
5
  const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (l = e.fileUrl) != null ? l : (o = e == null ? void 0 : e.files) == null ? void 0 : o.regular;
@@ -32,7 +32,7 @@ font-weight: ${s};
32
32
  }, g = ({
33
33
  cssCode: e,
34
34
  contentId: t
35
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", $ = () => import("./render-inlined-styles.49a121f8.js").then((e) => e.default).catch((e) => {
35
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", $ = () => import("./render-inlined-styles.0444f4fe.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 i=require("vue"),d=require("./index.3f716812.cjs"),f=e=>{var c,s;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],r=(s=e.fileUrl)!=null?s:(c=e==null?void 0:e.files)==null?void 0:c.regular;let l="";if(r&&t&&n&&(l+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),d=require("./index.3e17c057.cjs"),f=e=>{var c,s;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],r=(s=e.fileUrl)!=null?s:(c=e==null?void 0:e.files)==null?void 0:c.regular;let l="";if(r&&t&&n&&(l+=`
2
2
  @font-face {
3
3
  font-family: "${t}";
4
4
  src: local("${n}"), url('${r}') format('woff2');
@@ -12,7 +12,7 @@ src: url('${a}') format('woff2');
12
12
  font-display: fallback;
13
13
  font-weight: ${o};
14
14
  }
15
- `.trim())}return l},u=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>f(n)))==null?void 0:t.join(" "))||""},p=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",m=()=>Promise.resolve().then(()=>require("./render-inlined-styles.528fb5cd.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}),y=i.defineComponent({name:"render-content-styles",components:{RenderInlinedStyles:i.defineAsyncComponent(m)},props:["cssCode","contentId","customFonts"],data(){return{injectedStyles:`
15
+ `.trim())}return l},u=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>f(n)))==null?void 0:t.join(" "))||""},p=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",m=()=>Promise.resolve().then(()=>require("./render-inlined-styles.14d9ba36.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}),y=i.defineComponent({name:"render-content-styles",components:{RenderInlinedStyles:i.defineAsyncComponent(m)},props:["cssCode","contentId","customFonts"],data(){return{injectedStyles:`
16
16
  ${p({cssCode:this.cssCode,contentId:this.contentId})}
17
17
  ${u({customFonts:this.customFonts})}
18
18
 
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.3f716812.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
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.3e17c057.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.cdd37dcf.js";
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.3a561c6a.js";
2
2
  import "vue";
3
3
  export {
4
4
  a as Button,
@@ -10,7 +10,9 @@
10
10
  declare const _sfc_main: import("vue").DefineComponent<Readonly<{
11
11
  block?: any;
12
12
  repeatContext?: any;
13
- }>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
13
+ }>, unknown, {
14
+ store: any;
15
+ }, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
14
16
  block?: any;
15
17
  repeatContext?: any;
16
18
  }>>>, {
@@ -6,30 +6,52 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
6
6
  data?: any;
7
7
  content?: any;
8
8
  canTrack?: any;
9
- locale?: any;
10
- customComponents?: any;
11
9
  model?: any;
12
10
  apiKey?: any;
13
11
  parentContentId?: any;
12
+ locale?: any;
13
+ apiVersion?: any;
14
+ customComponents?: any;
14
15
  hideContent?: any;
15
16
  classNameProp?: any;
16
17
  isSsrAbTest?: any;
17
18
  includeRefs?: any;
18
19
  enrich?: any;
19
- apiVersion?: any;
20
20
  }>, unknown, {
21
21
  forceReRenderCount: number;
22
22
  overrideContent: null;
23
- useContent: Nullable<BuilderContent>;
24
23
  update: number;
25
24
  canTrackToUse: any;
26
- contentState: {
27
- [x: string]: unknown;
28
- };
29
- allRegisteredComponents: any;
30
25
  httpReqsData: {};
31
26
  clicked: boolean;
32
27
  scriptStr: string;
28
+ builderContextSignal: {
29
+ content: Nullable<BuilderContent>;
30
+ localState: undefined;
31
+ rootState: {
32
+ [x: string]: unknown;
33
+ };
34
+ rootSetState: Function;
35
+ context: any;
36
+ apiKey: any;
37
+ apiVersion: any;
38
+ registeredComponents: any;
39
+ inheritedStyles: {};
40
+ };
41
+ builderContext: {
42
+ Builder: {
43
+ content: null;
44
+ context: {};
45
+ localState: undefined;
46
+ rootSetState(): void;
47
+ rootState: {};
48
+ apiKey: null;
49
+ apiVersion: undefined;
50
+ registeredComponents: {};
51
+ inheritedStyles: {};
52
+ };
53
+ key: symbol;
54
+ };
33
55
  TARGET: string;
34
56
  }, {
35
57
  onUpdateHook0(): {
@@ -71,32 +93,32 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
71
93
  data?: any;
72
94
  content?: any;
73
95
  canTrack?: any;
74
- locale?: any;
75
- customComponents?: any;
76
96
  model?: any;
77
97
  apiKey?: any;
78
98
  parentContentId?: any;
99
+ locale?: any;
100
+ apiVersion?: any;
101
+ customComponents?: any;
79
102
  hideContent?: any;
80
103
  classNameProp?: any;
81
104
  isSsrAbTest?: any;
82
105
  includeRefs?: any;
83
106
  enrich?: any;
84
- apiVersion?: any;
85
107
  }>>>, {
86
108
  readonly context?: any;
87
109
  readonly data?: any;
88
110
  readonly content?: any;
89
111
  readonly canTrack?: any;
90
- readonly locale?: any;
91
- readonly customComponents?: any;
92
112
  readonly model?: any;
93
113
  readonly apiKey?: any;
94
114
  readonly parentContentId?: any;
115
+ readonly locale?: any;
116
+ readonly apiVersion?: any;
117
+ readonly customComponents?: any;
95
118
  readonly hideContent?: any;
96
119
  readonly classNameProp?: any;
97
120
  readonly isSsrAbTest?: any;
98
121
  readonly includeRefs?: any;
99
122
  readonly enrich?: any;
100
- readonly apiVersion?: any;
101
123
  }>;
102
124
  export default _sfc_main;
@@ -1,10 +1,10 @@
1
1
  declare const _sfc_main: import("vue").DefineComponent<Readonly<{
2
2
  content?: any;
3
3
  canTrack?: any;
4
- customComponents?: any;
5
4
  model?: any;
6
5
  apiKey?: any;
7
6
  apiVersion?: any;
7
+ customComponents?: any;
8
8
  }>, unknown, {
9
9
  variantScriptStr: string;
10
10
  shouldRenderVariants: boolean;
@@ -14,16 +14,16 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
14
14
  }, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
15
15
  content?: any;
16
16
  canTrack?: any;
17
- customComponents?: any;
18
17
  model?: any;
19
18
  apiKey?: any;
20
19
  apiVersion?: any;
20
+ customComponents?: any;
21
21
  }>>>, {
22
22
  readonly content?: any;
23
23
  readonly canTrack?: any;
24
- readonly customComponents?: any;
25
24
  readonly model?: any;
26
25
  readonly apiKey?: any;
27
26
  readonly apiVersion?: any;
27
+ readonly customComponents?: any;
28
28
  }>;
29
29
  export default _sfc_main;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.4.1";
1
+ export declare const SDK_VERSION = "0.4.2";
@@ -1 +1 @@
1
- .button-361b1o6wv2k[data-v-a4481d84]{all:unset}.div-1eih9th5ow6[data-v-cc8d4c1f]{display:flex;line-height:normal}.div-1eih9th5ow6-2[data-v-cc8d4c1f]{display:flex;flex-direction:column;align-items:stretch}.img-256wrwn33ry[data-v-15a2d98b]{opacity:1;transition:opacity .2s ease-in-out}.div-256wrwn33ry[data-v-15a2d98b]{width:100%;pointer-events:none;font-size:0}.div-256wrwn33ry-2[data-v-15a2d98b]{display:flex;flex-direction:column;align-items:stretch;position:absolute;top:0;left:0;width:100%;height:100%}.div-4o9pb21oca6[data-v-8ed03d66]{display:flex;flex-direction:column;align-items:stretch}
1
+ .button-361b1o6wv2k[data-v-a4481d84]{all:unset}.div-1eih9th5ow6[data-v-cc8d4c1f]{display:flex;line-height:normal}.div-1eih9th5ow6-2[data-v-cc8d4c1f]{display:flex;flex-direction:column;align-items:stretch}.img-256wrwn33ry[data-v-15a2d98b]{opacity:1;transition:opacity .2s ease-in-out}.div-256wrwn33ry[data-v-15a2d98b]{width:100%;pointer-events:none;font-size:0}.div-256wrwn33ry-2[data-v-15a2d98b]{display:flex;flex-direction:column;align-items:stretch;position:absolute;top:0;left:0;width:100%;height:100%}.div-4o9pb21oca6[data-v-07645c8e]{display:flex;flex-direction:column;align-items:stretch}
@@ -1,3 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),u=require("./evaluate.cff086ca.cjs"),d=require("./index.c16f4cca.cjs"),s=require("./css.24c082d4.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 S(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 k(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}function f(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=f(e.class),e}const x=e=>({href:e.href});function y(e){var o;const t={...x(e),...e.properties,"builder-id":e.id,style:v(e.style),class:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return b(t)}function v(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 g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],B=e=>typeof e=="string"&&g.includes(e.toLowerCase()),C=({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
- 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?`)},_=({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.18ca317b.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.5740965b.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.e8047ef5.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:C({block:this.block,context:this.context}),Tag:this.block.tagName||"div",isEmptyHtmlElement:B}},computed:{repeatItem(){return _({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 S({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:[]:[]},childrenContext(){const e=()=>({});return{apiKey:this.context.apiKey,apiVersion:this.context.apiVersion,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,content:this.context.content,context:this.context.context,registeredComponents:this.context.registeredComponents,inheritedStyles:e()}},renderComponentProps(){var e,t,o;return{blockChildren:(e=this.useBlock.children)!=null?e:[],componentRef:(t=this.component)==null?void 0:t.component,componentOptions:{...k(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 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),o=require("./index.c16f4cca.cjs"),g=require("./evaluate.cff086ca.cjs"),x={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},C={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(e=>{function t(){n.forEach(a=>{a.delete("width")})}const n=e.get("columns");Array.isArray(n)&&!!n.find(i=>i.get("width"))&&(!!n.find(s=>!s.get("width"))||n.reduce((d,l)=>d+l.get("width"),0)!==100)&&t()})},{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}]},S={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(e=>{e.delete("srcset"),e.delete("noWebp");function n(r,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=r,setTimeout(()=>{p||u(new Error("Image load timed out"))},d)})}function a(r){return Math.round(r*1e3)/1e3}const i=e.get("image"),s=e.get("aspectRatio");if(fetch(i).then(r=>r.blob()).then(r=>{r.type.includes("svg")&&e.set("noWebp",!0)}),i&&(!s||s===.7041))return n(i).then(r=>{const d=e.get("aspectRatio");e.get("image")===i&&(!d||d===.7041)&&r.width&&r.height&&(e.set("aspectRatio",a(r.height/r.width)),e.set("height",r.height),e.set("width",r.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>"}}}]},R={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"}]},w={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(e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(a=>a.json()).then(a=>{e.get("url")===t&&(a.html?e.set("content",a.html):e.set("content","Invalid url, please try another"))}).catch(a=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")})},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},E=["text/javascript","application/javascript","application/ecmascript"],F=e=>E.includes(e.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 e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src&&!this.scriptsInserted.includes(n.src)){this.scriptsInserted.push(n.src);const a=document.createElement("script");a.async=!0,a.src=n.src,document.head.appendChild(a)}else if(F(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(a){console.warn("`Embed`: Error running script:",a)}}}}});var V=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:t._s(t.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(t={},n){const a="v-on:";return Object.keys(t).filter(i=>{if(!t[i])return!1;const s=i.startsWith(a);return n?s:!s}).reduce((i,s)=>({...i,[s.replace(a,"")]:t[s]}),{})}}});var $=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("img",t._g(t._b({key:t.isEditing()&&t.imgSrc||"default-key",style:{objectFit:t.backgroundSize||"cover",objectPosition:t.backgroundPosition||"center"},attrs:{alt:t.altText,src:t.imgSrc||t.image}},"img",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.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"],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 e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src){if(this.scriptsInserted.includes(n.src))continue;this.scriptsInserted.push(n.src);const a=document.createElement("script");a.async=!0,a.src=n.src,document.head.appendChild(a)}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(a){console.warn("`CustomCode`: Error running script:",a)}}}}},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const a of n)t[a]=!0;return t}}});var N=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"elem",class:t._classStringToObject("builder-custom-code"+(t.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:t._s(t.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,...x},{component:o.Columns,...C},{component:K,...D},{component:j,..._},{component:o.Fragment,...S},{component:o.Image,...k},{component:q,...L},{component:o.Section,...T},{component:o.Symbol,...R},{component:o.Text,...w},{component:o.Video,...I}],G="0.4.1",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=(e={})=>{var t,n;b||(b=!0,o.isBrowser()&&((t=window.parent)==null||t.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:e}},"*"),window.addEventListener("message",({data:a})=>{var i,s;if(!!(a!=null&&a.type))switch(a.type){case"builder.evaluate":{const r=a.data.text,d=a.data.arguments||[],l=a.data.id,u=new Function(r);let c,p=null;try{c=u.apply(null,d)}catch(m){p=m}p?(i=window.parent)==null||i.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):(s=window.parent)==null||s.postMessage({type:"builder.evaluateResult",data:{result:c,id:l}},"*");break}}})))};function y(e){return Math.round(e*1e3)/1e3}const Q=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let a=n?e:e.parentElement;do{if(!a)return null;if(t(a))return a}while(a=a.parentElement);return null},Z=e=>Q(e,t=>{const n=t.getAttribute("builder-id")||t.id;return Boolean((n==null?void 0:n.indexOf("builder-"))===0)}),v=({event:e,target:t})=>{const n=t.getBoundingClientRect(),a=e.clientX-n.left,i=e.clientY-n.top,s=y(a/n.width),r=y(i/n.height);return{x:s,y:r}},ee=e=>{const t=e.target,n=t&&Z(t),a=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:a||void 0,metadata:{targetOffset:t?v({event:e,target:t}):void 0,builderTargetOffset:n?v({event:e,target:n}):void 0,builderElementIndex:n&&a?[].slice.call(document.getElementsByClassName(a)).indexOf(n):void 0}}},te=({content:e,data:t,locale:n})=>{var s,r,d;const a={};(r=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||r.forEach(l=>{var u;l.name&&l.defaultValue!==void 0&&((u=e==null?void 0:e.data)==null?void 0:u.state)&&e.data.state[l.name]===void 0&&(a[l.name]=l.defaultValue)});const i={...(d=e==null?void 0:e.data)==null?void 0:d.state,...t,...n?{locale:n}:{}};return{...a,...i}},ne=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0,ae=()=>Promise.resolve().then(()=>require("./index.c16f4cca.cjs")).then(e=>e.renderBlocks$1).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",e),e}),ie=()=>Promise.resolve().then(()=>require("./render-styles.e6e62ba1.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",e),e}),oe=h.defineComponent({name:"render-content",components:{RenderContentStyles:ie,RenderBlocks:ae},props:["content","data","canTrack","locale","customComponents","model","context","apiKey","parentContentId","hideContent","classNameProp","isSsrAbTest","includeRefs","enrich","apiVersion"],data(){var e;return{forceReRenderCount:0,overrideContent:null,useContent:ne({content:this.content,data:this.data}),update:0,canTrackToUse:o.checkIsDefined(this.canTrack)?this.canTrack:!0,contentState:te({content:this.content,data:this.data,locale:this.locale}),allRegisteredComponents:[...J(),...o.components,...this.customComponents||[]].reduce((t,{component:n,...a})=>({...t,[a.name]:{component:n,...a}}),{}),httpReqsData:{},clicked:!1,scriptStr:o.getRenderContentScriptString({contentId:(e=this.content)==null?void 0:e.id,parentContentId:this.parentContentId}),TARGET:o.TARGET}},provide(){const e=this;return{[o.BuilderContext.key]:{content:e.useContent,localState:void 0,rootState:e.contentState,rootSetState:e.contentSetState,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,registeredComponents:e.allRegisteredComponents,inheritedStyles:{}}}},mounted(){var e,t;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.allRegisteredComponents).forEach(n=>{var i;const a=o.createRegisterComponentMessage(n);(i=window.parent)==null||i.postMessage(a,"*")}),window.addEventListener("message",this.processMessage),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.useContent){const n=(e=this.useContent)==null?void 0:e.testVariationId,a=(t=this.useContent)==null?void 0:t.id;o._track({type:"impression",canTrack:this.canTrackToUse,contentId:a,apiKey:this.apiKey,variationId:n!==a?n:void 0})}if(o.isPreviewing()){const n=new URL(location.href).searchParams,a=n.get("builder.preview"),i=n.get(`builder.preview.${a}`),s=n.get("apiKey")||n.get("builder.space");a===this.model&&s===this.apiKey&&(!this.content||i===this.content.id)&&o.getContent({model:this.model,apiKey:this.apiKey,apiVersion:this.apiVersion}).then(r=>{r&&this.mergeNewContent(r)})}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 e,t;return{0:(t=(e=this.useContent)==null?void 0:e.data)==null?void 0:t.jsCode,1:this.contentState}},onUpdateHook2(){var e,t;return{0:(t=(e=this.useContent)==null?void 0:e.data)==null?void 0:t.httpRequests}},onUpdateHook3(){return{0:this.contentState}}},methods:{mergeNewContent(e){var t,n,a,i,s;this.useContent={...this.useContent,...e,data:{...(t=this.useContent)==null?void 0:t.data,...e==null?void 0:e.data},meta:{...(n=this.useContent)==null?void 0:n.meta,...e==null?void 0:e.meta,breakpoints:((a=e==null?void 0:e.meta)==null?void 0:a.breakpoints)||((s=(i=this.useContent)==null?void 0:i.meta)==null?void 0:s.breakpoints)}}},setBreakpoints(e){var t;this.useContent={...this.useContent,meta:{...(t=this.useContent)==null?void 0:t.meta,breakpoints:e}}},contentSetState(e){this.contentState=e},processMessage(e){var n;const{data:t}=e;if(t)switch(t.type){case"builder.configureSdk":{const a=t.data,{breakpoints:i,contentId:s}=a;if(!s||s!==((n=this.useContent)==null?void 0:n.id))return;i&&this.setBreakpoints(i),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const a=t.data,i=a.key||a.alias||a.entry||a.modelName,s=a.data;i===this.model&&(this.mergeNewContent(s),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var t,n;const e=(n=(t=this.useContent)==null?void 0:t.data)==null?void 0:n.jsCode;e&&g.evaluate({code:e,context:this.context||{},localState:void 0,rootState:this.contentState,rootSetState:this.contentSetState})},onClick(e){var t,n;if(this.useContent){const a=(t=this.useContent)==null?void 0:t.testVariationId,i=(n=this.useContent)==null?void 0:n.id;o._track({type:"click",canTrack:this.canTrackToUse,contentId:i,apiKey:this.apiKey,variationId:a!==i?a:void 0,...ee(e),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(e){return e.replace(/{{([^}]+)}}/g,(t,n)=>g.evaluate({code:n,context:this.context||{},localState:void 0,rootState:this.contentState,rootSetState:this.contentSetState}))},handleRequest({url:e,key:t}){o.fetch(e).then(n=>n.json()).then(n=>{const a={...this.contentState,[t]:n};this.contentSetState(a)}).catch(n=>{console.error("error fetching dynamic data",e,n)})},runHttpRequests(){var t,n,a;const e=(a=(n=(t=this.useContent)==null?void 0:t.data)==null?void 0:n.httpRequests)!=null?a:{};Object.entries(e).forEach(([i,s])=>{if(s&&(!this.httpReqsData[i]||o.isEditing())){const r=this.evalExpression(s);this.handleRequest({url:r,key:i})}})},emitStateUpdate(){o.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.contentState,ref:{name:this.model}}}))},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const a of n)t[a]=!0;return t}}});var se=function(){var a,i,s,r,d,l,u,c;var t=this,n=t._self._c;return t._self._setupProxy,t.useContent?n("div",t._b({ref:"elementRef",class:t._classStringToObject(t.classNameProp),attrs:{"builder-content-id":(a=t.useContent)==null?void 0:a.id,"builder-model":t.model},on:{click:function(p){return t.onClick(p)}}},"div",{...t.TARGET==="reactNative"?{dataSet:{"builder-content-id":""}}:{},...t.hideContent?{hidden:!0,"aria-hidden":!0}:{}},!1),[t.isSsrAbTest?[n("script",{tag:"component",domProps:{innerHTML:t._s(t.scriptStr)}})]:t._e(),t.TARGET!=="reactNative"?[n("render-content-styles",{attrs:{contentId:(i=t.useContent)==null?void 0:i.id,cssCode:(r=(s=t.useContent)==null?void 0:s.data)==null?void 0:r.cssCode,customFonts:(l=(d=t.useContent)==null?void 0:d.data)==null?void 0:l.customFonts}})]:t._e(),n("render-blocks",{key:t.forceReRenderCount,attrs:{blocks:(c=(u=t.useContent)==null?void 0:u.data)==null?void 0:c.blocks}})],2):t._e()},re=[],le=o.normalizeComponent(oe,se,re,!1,null,null,null,null);const de=le.exports;exports.default=de;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),o=require("./index.c16f4cca.cjs"),c=()=>Promise.resolve().then(()=>require("./render-block.954cc390.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block.vue",e),e}),a=r.defineComponent({name:"render-repeated-block",components:{RenderBlock:c},props:["block","repeatContext"],provide(){const e=this;return{[o.BuilderContext.key]:{content:e.repeatContext.content,localState:e.repeatContext.localState,rootState:e.repeatContext.rootState,rootSetState:e.repeatContext.rootSetState,context:e.repeatContext.context,apiKey:e.repeatContext.apiKey,registeredComponents:e.repeatContext.registeredComponents,inheritedStyles:e.repeatContext.inheritedStyles,apiVersion:e.repeatContext.apiVersion}}}});var l=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("render-block",{attrs:{block:t.block,context:t.repeatContext}})},s=[],i=o.normalizeComponent(a,l,s,!1,null,null,null,null);const p=i.exports;exports.default=p;
@@ -1,45 +0,0 @@
1
- import { defineComponent as n } from "vue";
2
- import { k as r, n as a } from "./index.e2db82e0.js";
3
- const p = () => import("./render-block.0f23cd7e.js").then((e) => e.default).catch((e) => {
4
- throw console.error(
5
- "Error while attempting to dynamically import component RenderBlock at ./render-block.vue",
6
- e
7
- ), e;
8
- }), c = n({
9
- name: "render-repeated-block",
10
- components: { RenderBlock: p },
11
- props: ["block", "repeatContext"],
12
- provide() {
13
- const e = this;
14
- return {
15
- [r.key]: {
16
- content: e.repeatContext.content,
17
- localState: e.repeatContext.localState,
18
- rootState: e.repeatContext.rootState,
19
- rootSetState: e.repeatContext.rootSetState,
20
- context: e.repeatContext.context,
21
- apiKey: e.repeatContext.apiKey,
22
- registeredComponents: e.repeatContext.registeredComponents,
23
- inheritedStyles: e.repeatContext.inheritedStyles,
24
- apiVersion: e.repeatContext.apiVersion
25
- }
26
- };
27
- }
28
- });
29
- var l = function() {
30
- var t = this, o = t._self._c;
31
- return t._self._setupProxy, o("render-block", { attrs: { block: t.block, context: t.repeatContext } });
32
- }, s = [], i = /* @__PURE__ */ a(
33
- c,
34
- l,
35
- s,
36
- !1,
37
- null,
38
- null,
39
- null,
40
- null
41
- );
42
- const x = i.exports;
43
- export {
44
- x as default
45
- };