(()=>{var e={532:()=>{},763:(e,t,i)=>{var r=i(532);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),(0,i(346).Z)("9706bef8",r,!1,{})},346:(e,t,i)=>{"use strict";function r(e,t){for(var i=[],r={},s=0;sg});var s="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!s)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},n=s&&(document.head||document.getElementsByTagName("head")[0]),o=null,d=0,l=!1,h=function(){},c=null,p="data-vue-ssr-id",u="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function g(e,t,i,s){l=i,c=s||{};var n=r(e,t);return m(n),function(t){for(var i=[],s=0;si.parts.length&&(r.parts.length=i.parts.length)}else{var n=[];for(s=0;s{"use strict";class r{constructor(e,t){this.features=e,this.callbackMethod=t}getFeatures(){return this.features}getFeature(e){return this.features?.find((t=>t.id===e))}featureSupported(e,t=!1){const i=this.getFeature(e);return!i||!!i.supported||(t||this.callbackMethod(i?.messageUnsupported),!1)}}class s{constructor(e){this.supportedMetadata=null,this.setMetadata(e),this.vue=window.AppKit.getApp()}getMetadata(){return this.metadata}getMetadataById(e){return this.metadata.find((t=>t.id===e))}async getSupportedMetadataById(e){return(await this.getSupportedMetadata()).find((t=>t.id===e))}setMetadata(e){this.metadata=e}getMetadataFormUrl(e,t){return new URL(this.vue.$getSetting("paths.baseBlueprint")+"/metadata/form/"+e+"/"+t).toString()}getSaveMetadataFormUrl(e,t){return new URL(this.vue.$getSetting("paths.baseBlueprint")+"/metadata/form/"+e+"/"+t+"/post").toString()}async getSupportedMetadata(){if(!this.supportedMetadata){const e=await this.vue.$getSetting("paths.baseBlueprint")+"/metadata/supported/";this.supportedMetadata=await this.vue.$get(e)}return this.supportedMetadata}}class a{constructor(e){this.setHeaders(e),this.vue=window.AppKit.getApp()}getHeaders(){return this.headers}setHeaders(e){this.headers=e}getHeadersFormUrl(e,t,i){const r=new URL(this.vue.$getSetting("paths.baseBlueprint")+"/headers/form/"+e+"/"+t);return i&&r.searchParams.append("settings",i),r.toString()}getSaveHeadersFormUrl(e,t){return new URL(this.vue.$getSetting("paths.baseBlueprint")+"/headers/form/"+e+"/"+t+"/post").toString()}async getSupportedHeaders(){const e=await this.vue.$getSetting("paths.baseBlueprint")+"/http-headers/supported";return await this.vue.$get(e)}}class n{constructor(){this.vue=window.AppKit.getApp()}getSkinSettingsFormUrl(e){return new URL(this.vue.$getSetting("paths.baseBlueprint")+"/skin/settings/"+e).toString()}getPreviewUrl(e,t){return new URL(this.vue.$getSetting("paths.baseBlueprint")+"/skin/settings/preview/"+e+"/"+t).toString()}getSaveSkinSettingsUrl(e){return new URL(this.vue.$getSetting("paths.baseBlueprint")+"/skin/settings/"+e+"/post").toString()}}class o{constructor(e,t){this.id=e,this.queryParams=t,this.vue=window.AppKit.getApp(),this.getBreakpoints=this.getBreakpoints.bind(this),this.getBlocks=this.getBlocks.bind(this),this.getBlockTypes=this.getBlockTypes.bind(this),this.getVisibility=this.getVisibility.bind(this),this.getOriginalBreakpoint=this.getOriginalBreakpoint.bind(this),this.fetchBlueprintData=this.fetchBlueprintData.bind(this),this.getMetadataHandler=this.getMetadataHandler.bind(this),this.getHeaderHandler=this.getHeaderHandler.bind(this),this.getSkinSettingsHandler=this.getSkinSettingsHandler.bind(this),this.getTitle=this.getTitle.bind(this),this.getListUrl=this.getListUrl.bind(this),this.fetchInterfaceData=this.fetchInterfaceData.bind(this),this.getEventListeners=this.getEventListeners.bind(this)}getBlocks(){return this.blocks||this.fetchBlueprintData(),this.blocks?this.blocks:[]}getGrid(){return this.grid||this.fetchBlueprintData(),this.grid?this.grid:[]}getTitle(){return this.title||this.fetchBlueprintData(),this.title?this.title:null}getVisibility(){return this.visibility||this.fetchBlueprintData(),this.visibility}async getBlockTypes(){return this.supportedBlocks||this.fetchInterfaceData(),this.supportedBlocks}async getListUrl(){return this.listUrl||await this.fetchInterfaceData(),this.listUrl}getBreakpoints(){return this.breakpoints||this.fetchBlueprintData(),this.breakpoints?this.breakpoints:[]}getOriginalBreakpoint(){return this.getBreakpoints().find((e=>!0===e.isOriginal))}getNewReferenceId(){return Date.now().toString(36)+Math.random().toString(36).substr(2)}getNewBlockByType(e){return{id:null,referenceId:this.getNewReferenceId(),name:e.name,nameDefault:e.nameDefault,type:e.type,minColspan:e.minColspan,colspan:12,offset:0,endOfRow:!1,areChildrenAllowed:e.areChildrenAllowed,requiredParent:e.requiredParent,settings:e.settings,locks:e.locks,conditions:e.conditions,blocks:[]}}getBlockPositioningForNewBlock(e){return{referenceId:e,blockId:null,orderIndex:null,colspan:12,offset:0,hidden:!1,fullWidth:!1,alignment:null}}getFeatures(){return this.features||this.fetchBlueprintData(),this.features}fetchSupportedBreakpoints(){return this.supportedBreakpoints||this.fetchInterfaceData(),this.supportedBreakpoints}fetchConditions(e,t){return[{name:"Is Authenticated as CMS user?",description:"description here",actionForm:{bundleId:"action",definitionId:"form"}},{name:"User has press role",description:"...",actionForm:{bundleId:"action",definitionId:"form"}},{name:"Device is mobile",description:"...",actionForm:{bundleId:"action",definitionId:"form"}}]}async fetchBlueprintData(){const e={...this.queryParams,blueprintId:this.id},t=this.vue.$getSetting("paths.baseBlueprint")+"/blueprint",i=await this.vue.$get(t,e);i&&(this.title=i.title,this.blocks=i.blocks,this.visibility={published:i.published,publishedStart:i.publishedStart,publishedEnd:i.publishedEnd},this.features=i.features,this.grid=i.grid,this.vertical=i.vertical,this.breakpoints=i.breakpoints,this.metadataHandler=new s(i.metadata),this.headerHandler=new a(i.headers))}async fetchInterfaceData(){const e={...this.queryParams},t=this.vue.$getSetting("paths.baseBlueprint")+"/interface",i=await this.vue.$get(t,e);i&&(this.supportedBlocks=i.supportedBlocks,this.supportedBreakpoints=i.supportedBreakpoints,this.listUrl=i.listUrl)}async getPreview(e){return(await this.vue.$get("/../preview-html.html")).html}async save(e,t,i){const r={...this.queryParams,blueprintId:this.id},s=this.vue.$getSetting("paths.baseBlueprint")+"/blueprint/post",a={title:this.title,metadata:this.metadataHandler.getMetadata(),headers:this.headerHandler.getHeaders(),breakpoints:e,blocks:t,published:i.published},n=await this.vue.$post(s,a,r);return this.title=n.blueprint.title,this.blocks=n.blueprint.blocks,this.grid=n.blueprint.grid,this.breakpoints=n.blueprint.breakpoints,this.visibility={published:n.blueprint.published,publishedStart:n.blueprint.publishedStart,publishedEnd:n.blueprint.publishedEnd},this.metadataHandler.setMetadata(n.blueprint.metadata),this.headerHandler.setHeaders(n.blueprint.headers),n}getFeatureHandler(e){return this.featureHandler||(this.featureHandler=new r(this.getFeatures(),e)),this.featureHandler}async getMetadataHandler(){return this.metadataHandler||await this.fetchBlueprintData(),this.metadataHandler}getSkinSettingsHandler(){return this.skinSettingsHandler||(this.skinSettingsHandler=new n),this.skinSettingsHandler}async getHeaderHandler(){return this.headerHandler||await this.fetchBlueprintData(),this.headerHandler}getSettingsFormUrl(e,t,i){const r=new URL(this.vue.$getSetting("paths.baseBlueprint")+"/settings/block/"+e+(i?"/"+i:"/new"));return r.searchParams.append("verticalId",t),r.toString()}getSaveSettingsFormUrl(e,t,i){const r=new URL(this.vue.$getSetting("paths.baseBlueprint")+"/settings/block/"+e+(i?"/"+i:"/new")+"/post");return r.searchParams.append("verticalId",t),r.toString()}getEventListeners(){return{saveButtonClicked:this.saveButtonClicked,propertyChanged:this.propertyChanged,orderChanged:this.orderChanged,activeBreakpointsChanged:this.activeBreakpointsChanged,save:this.save.bind(this)}}saveButtonClicked(e,t){}propertyChanged(e,t){}orderChanged(e,t){}activeBreakpointsChanged(e){}}Vue.blueprintRoutes=[{path:"/blueprint/:blueprintId",name:"blueprint",component:{props:{dataProviderClass:{type:Function,default:o}},template:''},meta:{title:"blueprints"},children:[{path:"condition/:breakpointId",name:"blueprint-condition-form",components:{childView:{props:["dataProvider"],template:''}},children:[{path:":bundle/:definition/:objectId/:relationString?",name:"blueprint-condition-action-form",meta:{title:"blueprints condition form"},components:{conditionChildview:{props:["dataProvider"],template:''}}}]},{path:"blueprint-settings/:activeTab",name:"blueprint-settings",meta:{title:"Blueprints settings"},props:!0,components:{childView:{props:["dataProvider"],template:''}},children:[{path:"select-meta-data",name:"metadata-selection",meta:{title:"Blueprints metadata selection"},components:{childView:{props:["metadataHandler"],template:''}},children:[{path:":id/:relationString?",name:"metadata-selection-form",meta:{title:"Blueprints metadata form",dataProvider:o},components:{childView:{props:["metadataHandler"],template:''}}}]},{path:"select-headers",name:"headers-selection",meta:{title:"Blueprints headers selection"},components:{childView:{props:["headerHandler"],template:''}}},{path:":id/:relationString?",name:"metadata-form",meta:{title:"Blueprints meta data form"},components:{childView:{props:["metadataHandler"],template:''}}}]},{path:"form/:bundle/:definition/:objectId/:relationString?",name:"blueprint-skin-settings-form",meta:{title:"Blueprints skin settings form"},components:{childView:{template:''}}},{path:":blockType/:referenceId/:hashId?/:relationString?",name:"blueprint-form",meta:{title:"Blueprints form",dataProvider:o},props:!0,components:{childView:{props:["dataProvider"],template:''}}}]},{path:"/skin-settings/:blueprintId/:verticalId",name:"blueprint-skin-settings",meta:{title:"Blueprints skin settings",dataProvider:o},props:!0,component:{template:''}}];class d{constructor(e,t){this.breakpoints=e,this.blocks=t,this.getBlocksForBreakpoint=this.getBlocksForBreakpoint.bind(this),this.translateBlocks=this.translateBlocks.bind(this),this.translateBlock=this.translateBlock.bind(this),this.translate=this.translate.bind(this)}getBlocksForBreakpoint(e){return this.translateBlocks(this.blocks,e)}translateBlocks(e,t){let i=[];return e.forEach((e=>{const r=t.blockPositioning.find((t=>t.referenceId===e.referenceId));r&&null!=r.orderIndex&&(void 0!==i[r.orderIndex]?i.splice(r.orderIndex,0,this.translateBlock(e,t,r)):i[r.orderIndex]=this.translateBlock(e,t,r))})),i}translateBlock(e,t,i){let r={id:e.id,referenceId:e.referenceId,name:e.name,nameDefault:e.nameDefault,type:e.type,locks:e.locks,requiredParent:e.requiredParent,orderIndex:i.orderIndex,minColspan:e.minColspan,areChildrenAllowed:e.areChildrenAllowed,colspan:i.colspan,offset:i.offset,fullWidth:i.fullWidth,endOfRow:e.endOfRow,hidden:i.hidden,settings:e.settings,alignment:i.alignment};return e.blocks&&e.blocks.length&&(r.blocks=this.translateBlocks(e.blocks,t)),r}translate(){let e=[];return this.breakpoints.forEach(((t,i)=>{e.push({...t,blocks:this.getBlocksForBreakpoint(t)}),delete e[i].blockPositioning})),e}}class l{static getBreakpointWidth(e){return e.mediaQuery.mediaQuerySubList.find((e=>e.mediaTypes.includes("screen"))).features.find((e=>"max-width"===e.name)).value}}class h{static isInt(e){return e===+e&&e===(0|e)}static isFloat(e){return e===+e&&e!==(0|e)}}class c{constructor(e,t,i=4,r=2){this.blocks=e,this.maxCols=t,this.maxPerRow=i,this.greedy=r,this.getRows=this.getRows.bind(this),this.getColspans=this.getColspans.bind(this)}getColspans(){const e=this.getRows();let t={};return e.forEach((e=>{this.calculateColspansForRow(e,t)})),t}getRows(){let e=0,t=0;const i=[[]];return this.blocks.forEach((r=>{const s=r.minColspan?r.minColspan:0;t+s+this.greedy>this.maxCols&&(i.push([]),e++,t=0),t+=s;const a=i[e];a.push(r),a.length>=this.maxPerRow&&(i.push([]),e++,t=0)})),i}calculateColspansForRow(e,t){let i=0;const r=e.filter((e=>e.minColspan)),s=e.filter((e=>!e.minColspan));let a,n;r.forEach((e=>i+=e.minColspan));const o=this.maxCols-i;s.length&&(a=o/s.length),h.isFloat(a)&&(a=Math.floor(a),n=o-a*s.length),s.length&&s.forEach((e=>{t[e.referenceId]=a}));let d=0;!s.length&&o>1&&(d=o/r.length,h.isFloat(d)&&(d=Math.floor(d),n=1)),r.forEach(((e,i)=>{t[e.referenceId]=0===i&&n?e.minColspan+n+d:e.minColspan+d}))}}class p{static getBlock(e,t){let i=null;return e.forEach((e=>{if(e.referenceId===t&&(i=e),e.blocks.length){let r=this.getBlock(e.blocks,t);r&&(i=r)}})),i}static getParentBlock(e,t){let i=null;return e.blocks.forEach((r=>{if(r.referenceId===t&&(i=e),r.blocks.length){let e=this.getParentBlock(r,t);e&&(i=e)}})),i}static spaceTakenForItemsUntil(e,t,i){const r=e.indexOf(t);let s=0;return e.slice(0,r+1).forEach((e=>{const t=e.colspan+e.offset;s+t>i&&(s=0),s+=t})),s}static divideChildrenEqually(e,t,i=4,r=2){return new c(e,t,i,r).getColspans()}}Vue.asyncComponent("bp-blueprint",{data:()=>({loading:!0,dataProvider:null,grid:null,breakpoints:[],blocks:[],visibility:null,originalBreakpoint:null,activeBreakpointId:null,dragActive:!1,activeBlock:null,activeDropzone:null,showBreakpointDropdown:!1,showDropdownBlockTypes:!1,previewMode:!1,showGuides:null,showHiddenElements:!1,tempParentBlock:null,featureModalOpen:!1,featureMessage:null,blueprintDataStartState:null}),props:{viewMode:{type:String},blueprintId:{type:String|Number},queryParams:{type:Object},dataProviderClass:{type:Function}},watch:{activeBlock(){this.activeBlock||(this.tempParentBlock=null,this.activeDropzone=null)}},computed:{breakpointThreeStructure(){return new d(this.breakpoints,this.blocks).translate()},activeBreakpoint(){return this.breakpoints.find((e=>e.id===this.activeBreakpointId))},blueprintData(){return{title:this.dataProvider.title,breakpoints:this.breakpoints,blocks:this.blocks,metadata:this.dataProvider.metadataHandler.getMetadata(),headers:this.dataProvider.headerHandler.getHeaders()}},verticalId(){return this.queryParams.verticalId}},methods:{addBreakpoint(e,t){e.blockPositioning=this.originalBreakpoint.blockPositioning,this.breakpoints.splice(t,0,e)},removeBreakpoint(e){const t=this.breakpoints.findIndex((t=>t.id===e.id));this.breakpoints.splice(t,1)},setActiveDropzone(e){this.activeDropzone=e},activeBlockTypeChanged(e){e||(this.showDropdownBlockTypes=!1),this.activeBlock=e},addNewBlock(e){this.blocks.push(e),this.breakpoints.forEach((t=>{t.blockPositioning.push(this.dataProvider.getBlockPositioningForNewBlock(e.referenceId))}))},deleteBlock(e,t,i=!1){for(let i=0;i{const i=t.blockPositioning.findIndex((t=>t.referenceId===e));t.blockPositioning.splice(i,1)}))},updateOrderIndexes(e){this.breakpoints.forEach((t=>{this.getBlocksSortedByBlockPosition(e,t.id).forEach(((e,i)=>{this.setOrderIndexForBlock(i,e,t)}))}))},async blockParentChanged({parentReferenceId:e,orderIndex:t,referenceId:i},r){const s=this.breakpoints.find((e=>e.id===r));if(!s.isOriginal&&!this.featureHandler.featureSupported("breakpoints-specific-order"))return;const a={...p.getBlock(this.blocks,i)};let n=this;if(void 0!==e&&(n=p.getBlock(this.blocks,e)),("block-area"===a.type||"block-legacy-area"===a.type)&&this.checkInArea(n)&&!this.featureHandler.featureSupported("block-area-nesting"))return;if(a.requiredParent&&n.type===a.requiredParent&&this.tempParentBlock&&n!==this.tempParentBlock&&(this.deleteBlock(this.blocks,this.tempParentBlock.referenceId),this.tempParentBlock=null),a.requiredParent&&(n===this||n.type!==a.requiredParent)&&!this.tempParentBlock){const e=await this.getRequiredParentBlock(a.requiredParent);this.tempParentBlock=e,this.addNewBlock(e)}if(a.requiredParent&&(n===this||n.type!==a.requiredParent)&&this.tempParentBlock){this.deleteBlock(this.blocks,this.tempParentBlock.referenceId);const e=this.getBlocksSortedByBlockPosition(n.blocks,r);e.splice(t,0,this.tempParentBlock),n.blocks.splice(t,0,this.tempParentBlock),e.forEach(((e,t)=>{this.setOrderIndexForBlock(t,e,s)})),t=0,n=this.tempParentBlock}this.deleteBlock(this.blocks,i);const o=this.getBlocksSortedByBlockPosition(n.blocks,r);o.splice(t,0,a),n.blocks.splice(t,0,a),o.forEach(((e,t)=>{this.setOrderIndexForBlock(t,e,s)}))},getBlocksSortedByBlockPosition(e,t){const i=[...e];return i.sort(((e,i)=>{const r=this.getBlockPositioning(e.referenceId,t),s=this.getBlockPositioning(i.referenceId,t);return r.orderIndexs.orderIndex?1:0})),i},async getRequiredParentBlock(e){const t=(await this.dataProvider.getBlockTypes()).find((t=>t.type===e));return this.dataProvider.getNewBlockByType(t)},setOrderIndexForBlock(e,t,i){const r=i.blockPositioning.find((e=>e.referenceId===t.referenceId));(i.isOriginal||null===r.orderIndex)&&this.breakpoints.forEach((i=>{i.blockPositioning.find((e=>e.referenceId===t.referenceId)).orderIndex=e})),r.orderIndex=e,this.triggerDataProviderEvent("orderChanged"),this.triggerDataProviderEvent("propertyChanged")},blockPropertyChanged(e,t){const i=e.referenceId,r=p.getBlock(this.blocks,i);delete e.referenceId,Object.keys(e).forEach((t=>{r[t]=e[t]})),this.triggerDataProviderEvent("propertyChanged")},blockPositioningChanged(e,t){const i=this.breakpoints.find((e=>e.id===t)),r=e.referenceId;if(delete e.referenceId,(!e.offset||this.featureHandler.featureSupported("breakpoints-specific-offset"))&&(!Object.hasOwn(e,"fullWidth")||e.allBreakpoints||i.isOriginal||this.featureHandler.featureSupported("breakpoints-specific-full-width"))&&(!Object.hasOwn(e,"hidden")||this.featureHandler.featureSupported("breakpoints-specific-visibility")))return e.allBreakpoints?(delete e.allBreakpoints,void this.breakpoints.forEach((t=>{this.setBlockPositioningProperty(r,e,t.id)}))):void this.setBlockPositioningProperty(r,e,t)},setBlockPositioningProperty(e,t,i){const r=this.breakpoints.find((e=>e.id===i)).blockPositioning.find((t=>t.referenceId===e));Object.keys(t).forEach((e=>{r[e]=t[e]})),this.triggerDataProviderEvent("propertyChanged")},async triggerDataProviderEvent(e){const t=this.dataProvider.getEventListeners()[e];if(t)return await t(this.breakpoints,this.blocks,this.visibility)},showConditionsForBreakpoint(e){this.$router.push({name:"blueprint-condition-form",params:{breakpointId:e.id}})},async saveBlueprint(){this.loading=!0;const e=await this.triggerDataProviderEvent("save");this.breakpoints=this.dataProvider.getBreakpoints(),this.blocks=this.dataProvider.getBlocks(),this.grid=this.dataProvider.getGrid(),this.visibility=this.dataProvider.getVisibility(),this.blueprintDataStartState=JSON.parse(JSON.stringify(this.blueprintData)),this.$actionHandler.handle(e.todos,this),this.loading=!1},setPreviewMode(e){this.previewMode=e},toggleGuides(){this.showGuides=!this.showGuides},toggleHiddenElements(){this.showHiddenElements=!this.showHiddenElements},getBlockPositioning(e,t){return this.breakpoints.find((e=>e.id===t)).blockPositioning.find((t=>t?.referenceId===e))},duplicateBlock(e){const t=p.getBlock(this.blocks,e),i=p.getParentBlock(this,e),r={...t};r.id=null,r.name=null,r.blocks=[],r.referenceId=this.dataProvider.getNewReferenceId(),i.blocks.push(r),this.duplicateBlockPositions(t,r,!0),this.duplicateBlockChildren(t,r)},duplicateBlockChildren(e,t){let i=[];e.blocks.forEach(((e,r)=>{let s={...e};s.id=null,s.name=null,t.blocks=[],s.referenceId=this.dataProvider.getNewReferenceId(),i.push(s),this.duplicateBlockPositions(e,s),this.duplicateBlockChildren(e,s)})),t.blocks=i},duplicateBlockPositions(e,t,i){this.breakpoints.forEach((r=>{let s=this.getBlockPositioning(e.referenceId,r.id),a={...s};a.blockId=null,a.referenceId=t.referenceId,i&&(a.orderIndex=s.orderIndex+1),r.blockPositioning.push(a)}))},saveSettings(e){let t=p.getBlock(this.blocks,e.referenceId);this.$set(t,"settings",e.settings)},showFeatureMessage(e){this.featureModalOpen=!0,this.featureMessage=e||this.$t("Deze feature wordt niet ondersteund")},closeFeatureModal(){this.featureModalOpen=!1,this.featureMessage=null},async saveDataObject(e){this.loading=!0,await this.fetchData(),this.loading=!1},async checkShowConfirm(e,t,i){return!this.$deepEqual(this.blueprintDataStartState,this.blueprintData)&&!e.matched.some((e=>"blueprint"===e.name))},checkInArea(e){if("block-area"===e.type||"block-legacy-area"===e.type)return!0;const t=p.getParentBlock(e);return!!t&&this.checkInArea(t)},getBreakpointWidth:e=>l.getBreakpointWidth(e),async fetchData(){this.loading=!0,await this.dataProvider.fetchBlueprintData(),await this.dataProvider.fetchInterfaceData(),this.loading=!1,this.breakpoints=this.dataProvider.getBreakpoints(),this.blocks=this.dataProvider.getBlocks(),this.visibility=this.dataProvider.getVisibility(),this.featureHandler=this.dataProvider.getFeatureHandler(this.showFeatureMessage),this.grid=this.dataProvider.getGrid(),this.originalBreakpoint=this.dataProvider.getOriginalBreakpoint()}},async created(){this.dataProvider=new this.dataProviderClass(this.blueprintId,this.queryParams),await this.fetchData(),this.activeBreakpointId=this.originalBreakpoint.id,this.blueprintDataStartState=JSON.parse(JSON.stringify(this.blueprintData)),this.$confirmUnsavedChangesHandler.setShowConfirmCallback(this.checkShowConfirm),this.$confirmUnsavedChangesHandler.setConfirmMessage(this.$t("Ben je zeker dat je verder wilt gaan zonder te bewaren? De wijzigingen die je hebt gedaan, zullen verloren gaan."))}},"blueprints/bp-blueprint.html"),i(139),Vue.asyncComponent("bp-skin-settings",{data:()=>({previewScale:1,loading:!1,dataProvider:null,breakpoints:[],activeBreakpointId:null,previewIframe:null,settings:[],settingsForm:null,settingValues:{},iframeLoaded:!1}),props:{blueprintId:{type:String|Number},verticalId:{type:String|Number},queryParams:{type:Object},dataProviderClass:{type:Function}},computed:{iframeOrigin(){return new URL(this.$refs.iframe[0].src).origin},previewUrl(){return this.dataProvider.getSkinSettingsHandler().getPreviewUrl(this.verticalId,this.blueprintId)}},methods:{setSettingsForIframe(e){if(!this.iframeLoaded)return;this.settings=e;const t={previewUrl:this.previewUrl,settings:this.settings};this.$refs.iframe[0].contentWindow.postMessage(t,this.iframeOrigin)},async saveSettings(){this.loading=!0;const e=this.dataProvider.getSkinSettingsHandler().getSaveSkinSettingsUrl(this.verticalId),t={formValues:{...this.settings}},i=await this.$post(e,t);this.loading=!1,i.success&&this.$actionHandler.handle(i.todos,this)},setIframeLoaded(e){this.iframeLoaded=e},childIframeListener(e){this.iframeLoaded&&e.origin===this.iframeOrigin&&e.data&&void 0!==e.data.loading&&(this.loading=e.data.loading)},getBreakpointWidth:e=>l.getBreakpointWidth(e)},mounted(){window.addEventListener("message",this.childIframeListener,!1)},beforeUnmount(){window.removeEventListener("message",this.childIframeListener,!1)},async created(){this.dataProvider=new this.dataProviderClass(this.blueprintId,{verticalId:this.verticalId}),await this.dataProvider.fetchInterfaceData(),this.breakpoints=this.dataProvider.fetchSupportedBreakpoints(),this.activeBreakpointId=this.breakpoints.find((e=>e.isOriginal)).id}},"blueprints/bp-skin-settings.html"),Vue.asyncComponent("bp-settings-form",{props:{dataProvider:{type:Object,required:!0}},data:()=>({showConfirm:!1,confirmCallback:null,alertUnsaved:null,unsavedChangesMessage:!1,loading:!1,formData:!1,blockToEdit:null}),computed:{showForm(){return this.blockToEdit?.settings?.hasForm},formUrl(){return this.dataProvider.getSettingsFormUrl(this.$route.params.blockType,this.$route.query.verticalId,this.$route.params.hashId)},saveFormUrl(){return this.dataProvider.getSaveSettingsFormUrl(this.$route.params.blockType,this.$route.query.verticalId,this.$route.params.hashId)},relationString(){return this.$route.params.relationString}},methods:{saveSettings(e){this.$emit("saveSettings",{...e,referenceId:this.$route.params.referenceId}),this.close()},confirmDialog(){this.showConfirm=!1,this.confirmCallback()},alertUnsavedChanges({showAlert:e,message:t}){this.alertUnsaved=e,this.unsavedChangesMessage=t},attemptClose(e){this.alertUnsaved?(this.showConfirm=!0,this.confirmCallback=e):e()},close(){this.$router.back()},getBlock(e,t){let i=null;return e.forEach((e=>{if(e.id===t&&(i=e),e.blocks.length){let r=this.getBlock(e.blocks,t);r&&(i=r)}})),i},async getFormData(){let e={locale:this.$localeHandler.getActiveLocale()};this.loading=!0;try{const t={formValues:this.blockToEdit.settings?.values};this.formData=await this.$post(this.formUrl,t,e),this.loading=!1}catch(e){console.log(e)}}},created(){this.blockToEdit=p.getBlock(this.dataProvider.getBlocks(),this.$route.params.referenceId),this.showForm&&this.getFormData()}},"blueprints/form/bp-settings-form.html"),i(973),i(38),i(327),i(348),i(4);const u={data:()=>({activeBlockLocal:null}),model:{prop:"activeBlock",event:"setActiveBlock"},props:{activeBlock:{required:!1}},watch:{activeBlock:function(e,t){this.activeBlockLocal=e},activeBlockLocal:function(e,t){this.$emit("setActiveBlock",e)}},methods:{setActiveBlock(e){this.activeBlockLocal=e,null===e&&this.stopDragging()},getActiveBlock(){return this.activeBlockLocal},stopDragging(){this.$emit("stopDragging")}},created(){this.activeBlockLocal=this.activeBlock}},g={data:()=>({activeDropzoneLocal:null}),props:{activeDropzone:{required:!1}},watch:{activeDropzone:function(e,t){this.activeDropzoneLocal!==e&&(this.activeDropzoneLocal=e)},activeDropzoneLocal:function(e,t){this.$emit("setActiveDropzone",e)}},methods:{setActiveDropzone(e){this.activeDropzoneLocal=e,this.$emit("setActiveDropzone",e)},getActiveDropzone(){return this.activeDropzoneLocal}},created(){this.activeDropzoneLocal=this.activeDropzone}},m={methods:{blockParentChanged(e){this.$emit("blockParentChanged",e)},blockDimensionsChanged(e){this.$emit("blockDimensionsChanged",e)},blockPropertyChanged(e){this.$emit("blockPropertyChanged",e)},blockPositioningChanged(e){this.$emit("blockPositioningChanged",e)},duplicate(e){this.$emit("duplicate",e)}}},f={props:{previewIframe:{type:HTMLIFrameElement}},methods:{getBlockElementById(e){return this.previewIframe.contentWindow.document.querySelector(`[data-block-id="${e}"]`)}}};Vue.asyncComponent("bp-dropzone",{mixins:[u,g,m,f],data:()=>({resizeReferenceId:null,hoverResize:null,hoverResizeColspan:null,maxCols:12}),props:{id:{required:!0},previewMode:{type:Boolean,required:!1,default:!1},parentBlockId:{type:String,required:!1},blocks:{type:Array,required:!0},grid:{type:Object,required:!0},forceGuides:{type:Boolean,default:!1},showHiddenElements:{type:Boolean,required:!1,default:!1},dataProvider:{type:Object,required:!0},activeBreakpointId:{type:String,required:!0}},computed:{dropzoneActive(){return this.getActiveDropzone()===this.id},activeResizingColspan(){const e=this.blocks.find((e=>e?.referenceId===this.resizeReferenceId));return e?p.spaceTakenForItemsUntil(this.blocks,e,this.maxCols):null}},methods:{onDrop(e){this.setActiveBlock(null),this.resetActiveDropzone()},onDragEnter(e){let t=this.activeBlock;if(this.enterdCurrentDropzone(e)&&t){const i=this.getOrderIndexForItem(e);this.blockParentChanged({parentReferenceId:this.parentBlockId,orderIndex:i,referenceId:t.referenceId})}},onDragOver(e){this.enterdCurrentDropzone(e)&&this.setCurrentDropzoneActive()},startResizeChildBlock(e){this.resizeReferenceId=e,this.setCurrentDropzoneActive()},stopResizeChildBlock(){this.resizeReferenceId=null,this.resetActiveDropzone()},hoverResizeChildBlock(e,t){this.hoverResize=e,this.hoverResizeColspan=null,e&&(this.hoverResizeColspan=p.spaceTakenForItemsUntil(this.blocks,t,this.maxCols))},setCurrentDropzoneActive(){this.setActiveDropzone(this.id)},resetActiveDropzone(){this.$emit("stopResize"),this.setActiveDropzone(null)},enterdCurrentDropzone(e){return(e.path||e.composedPath&&e.composedPath()).find((e=>e.dataset&&"dropzone"in e.dataset))===this.$refs.dropzone},getOrderIndexForItem(e){if(!this.blocks)return 0;const t=this.blocks.filter((e=>e.referenceId!==this.activeBlock.referenceId));for(let i=0;ia-5&&e.clientYn-5&&e.clientXa)return i;if(e.clientYe?.referenceId===i));if(!r)return void this.$emit("blockDimensionsChanged",{colspan:e,offset:t,referenceId:i});let s=0;this.blocks.slice(0,this.blocks.indexOf(r)).forEach((e=>{s+=e.colspan+e.offset}));const a=s%12;a+r.colspan+r.offset<=12&&(t=t-a>0?t-a:0),this.$emit("blockDimensionsChanged",{colspan:e,offset:t,referenceId:i})},blockParentChanged(e){this.$emit("blockParentChanged",e)}}},"blueprints/editor/bp-dropzone.html"),Vue.asyncComponent("bp-block",{mixins:[u,g,m,f],data:function(){return{maxCols:12,showOptions:!1,showGuides:!1,style:{"--offset":this.offset,"--colspan":this.colspan}}},props:{name:{type:String},nameDefault:{type:String,required:!0},id:{required:!0},type:{type:String,required:!0},referenceId:{type:Number|String,required:!0},locks:{type:Array,required:!1,default:()=>[]},blocks:{type:Array,required:!1,default:()=>[]},areChildrenAllowed:{type:Boolean},colspan:{type:Number,required:!0},offset:{type:Number,required:!1},minColspan:{type:Number},hidden:{type:Boolean,required:!1,default:!1},endOfRow:{type:Boolean,required:!1,default:!1},fullWidth:{type:Boolean,required:!1,default:!1},alignment:{type:String,required:!1},previewMode:{type:Boolean,required:!1,default:!1},settings:{type:Object},showHiddenElements:{type:Boolean,required:!1,default:!1},grid:{type:Object,required:!0},showAlignmentOptions:{type:Boolean,required:!1,default:!1},dataProvider:{type:Object,required:!0},activeBreakpointId:{type:String,required:!0}},computed:{isActive(){return this.activeBlockLocal&&this.referenceId===this.activeBlockLocal.referenceId},dropzoneActive(){return this.getActiveDropzone()===this.referenceId},canChangeLayout(){return 0===this.getLockByAction("layout").length},canEdit(){return 0===this.getLockByAction("edit").length},canDelete(){return 0===this.getLockByAction("delete").length},showBlock(){return!this.hidden||this.hidden&&this.showHiddenElements},canDivideChildrenEqually(){return this.blocks.length>1},blockWrapperClasses(){return{"bp-block-wrapper--has-children":this.areChildrenAllowed,"bp-block-wrapper--preview":this.previewMode,"bp-block-wrapper--offset":this.offset,"bp-block-wrapper--full-width":this.fullWidth}},blockClasses(){return{"bp-block--preview":this.previewMode,"bp-block--no-hover":this.previewMode&&this.activeBlock,"bp-block--dragging":this.isActive,"bp-block--full-width":this.fullWidth,"bp-block--hidden":this.hidden,"bp-block--has-children":this.areChildrenAllowed,"bp-block--guides":this.showGuides||this.dropzoneActive,"bp-block--active":this.dropzoneActive}},blockHeaderClasses(){return{"bp-block__header--preview":this.previewMode,"bp-block__header--has-children":this.areChildrenAllowed}},widgetEventUrl(){return this.dataProvider.getSettingsFormUrl(this.type,this.$route.query.verticalId,this.id)}},methods:{startDrag(e){e.target===this.$refs.draggable&&(e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",this.setActiveBlock(this.blockData()),this.$emit("dragstart",this.blockData()))},endDrag(){this.setActiveBlock(null),this.$emit("dragend",this.blockData())},currentBlockDimensionsChanged(e){this.blockDimensionsChanged({...e,referenceId:this.referenceId})},blockDimensionsChanged(e){this.$emit("blockDimensionsChanged",e)},blockData(){return{id:this.id,referenceId:this.referenceId,name:this.name,offset:this.offset,colspan:this.colspan,blocks:this.blocks,areChildrenAllowed:this.areChildrenAllowed}},setDimensionsForPreviewMode(){const e=this.getBlockElementById(this.referenceId);this.style={"--block-height":e.getBoundingClientRect().height+"px","--block-width":e.getBoundingClientRect().width+"px"},this.$nextTick((()=>{void 0!==e.dataset.blockOffset&&(this.style={"--block-offset-left":this.previewIframe.getBoundingClientRect().left+(e.getBoundingClientRect().left-this.$el.getBoundingClientRect().left)+"px",...this.style})}))},deleteBlock(){this.canDelete&&this.$emit("deleteBlock",this.referenceId)},edit(){this.canEdit&&this.$router.push({name:"blueprint-form",params:{blockType:this.type,verticalId:this.$route.query.verticalId,hashId:this.id,referenceId:this.referenceId},query:{verticalId:this.$route.query.verticalId}})},toggleFullWidth(){this.blockDimensionsChanged({offset:0,colspan:12,referenceId:this.referenceId}),this.blockPositioningChanged({referenceId:this.referenceId,fullWidth:!this.fullWidth})},toggleFullWidthAllBreakpoints(){this.blockDimensionsChanged({offset:0,colspan:12,referenceId:this.referenceId,allBreakpoints:!0}),this.blockPositioningChanged({referenceId:this.referenceId,fullWidth:!this.fullWidth,allBreakpoints:!0})},toggleHide(){this.blockPositioningChanged({referenceId:this.referenceId,hidden:!this.hidden})},toggleEndOfRow(){this.blockPropertyChanged({referenceId:this.referenceId,endOfRow:!this.endOfRow})},setNewName(e){this.$emit("blockPropertyChanged",{referenceId:this.referenceId,name:e})},toggleGuides(){this.showGuides=!this.showGuides},changeAlignment(e){switch(e){case"left":this.blockDimensionsChanged({offset:0,colspan:this.colspan,referenceId:this.referenceId});break;case"center":this.blockDimensionsChanged({offset:Math.ceil((this.grid.numberOfColumns-this.colspan)/2),colspan:this.colspan,referenceId:this.referenceId});break;case"right":this.blockDimensionsChanged({offset:this.grid.numberOfColumns-this.colspan,colspan:this.colspan,referenceId:this.referenceId})}},getLockByAction(e){return this.locks.filter((t=>t.isLocked&&(t.action.includes(e)||t.action.includes("all"))))},divideChildrenEqually(){const e=p.divideChildrenEqually(this.blocks,this.maxCols);Object.entries(e).forEach((([e,t])=>{this.blockDimensionsChanged({offset:0,colspan:t,referenceId:e})}))},editPublication(e){this.$router.push({name:"blueprint-skin-settings-form",params:{blueprintId:this.$route.params.blueprintId,bundle:e.bundleId,definition:e.definitionId,objectId:e.objectId},query:{verticalId:this.$route.query.verticalId}})}},mounted(){this.previewMode&&(this.previewIframe.contentWindow.addEventListener("resize",this.setDimensionsForPreviewMode,{capture:!0}),this.previewIframe.addEventListener("load",this.setDimensionsForPreviewMode,{capture:!0}))}},"blueprints/editor/bp-block.html"),i(840),i(834),i(645),i(31),i(309),i(313),i(306),i(45),Vue.asyncComponent("bp-preview",{mixins:[u,g,m],data:()=>({previewIframe:null}),props:{blocks:{type:Array,required:!0},breakpoint:{type:Object,required:!0},dataProvider:{type:Object,required:!0},forceGuides:{type:Boolean,required:!1,default:!1},grid:{type:Object,required:!0},activeBreakpointId:{type:String,required:!0}},methods:{setIframeHeight(){this.$refs.iframe.height!==this.$refs.iframe.contentWindow.document.body.scrollHeight+"px"&&(this.$refs.iframe.height=0,this.$refs.iframe.height=this.$refs.iframe.contentWindow.document.body.scrollHeight+1+"px")},refresh(e,t){e&&t&&t(e),this.$refs.iframe.contentWindow.location.reload()}},mounted(){this.previewIframe=this.$refs.iframe,document.addEventListener("resize",this.setIframeHeight)}},"blueprints/editor/preview/bp-preview.html"),Vue.asyncComponent("bp-preview-editor",{mixins:[u,g,m,f],data:()=>({contentTopOffset:null,contentBottomOffset:null}),props:{breakpoint:{type:Object,required:!0},blocks:{type:Array,required:!0},dataProvider:{type:Object,required:!0},forceGuides:{type:Boolean,required:!1,default:!1},grid:{type:Object,required:!0},activeBreakpointId:{type:String,required:!0}},watch:{previewIframe(){this.previewIframe.contentWindow.addEventListener("resize",this.setContentHeight)}},methods:{setContentHeight(){const e=this.previewIframe.contentWindow.document.querySelector("[data-content-wrapper]");this.contentTopOffset=e.getBoundingClientRect().y+"px",this.contentBottomOffset=this.previewIframe.contentWindow.document.body.scrollHeight-(e.getBoundingClientRect().y+e.getBoundingClientRect().height)+"px"}},mounted(){this.previewIframe&&(this.previewIframe.contentWindow.addEventListener("resize",this.setContentHeight),this.previewIframe.addEventListener("load",this.setContentHeight))}},"blueprints/editor/preview/bp-preview-editor.html"),i(563),i(621),i(301),i(921),i(73),i(326),i(342),i(199),i(566),i(421)},139:()=>{Vue.asyncComponent("bp-blueprint-top-bar",{data:()=>({featureHandler:null}),props:{blueprintId:{type:String,required:!0},verticalId:{type:String,required:!0},previewMode:{type:Boolean,required:!1},showPreviewToggle:{type:Boolean,default:!1},visibility:{type:Object},dataProvider:{type:Object,default:!1}},computed:{localPreviewMode:{get(){return this.previewMode},set(e){return this.$emit("changePreviewMode",e)}},showPageSettings(){return!this.$slots.left&&(this.showBlueprintCopy||this.showBlueprintShareLink||this.featureHandler.featureSupported("blueprint-header",!0)||this.featureHandler.featureSupported("blueprint-metadata",!0))},showBlueprintCopy(){return this.featureHandler.featureSupported("blueprint-copy",!0)},showBlueprintShareLink(){return this.featureHandler.featureSupported("blueprint-share-link",!0)},blueprintTitle(){return this.dataProvider.getTitle()}},methods:{setPreviewScale(e){this.openPreviewScaleOptions=!1,this.$emit("changePreviewScale",e)},showCopyToVertical(){console.log("@todo: show copy to vertical modal")},showSettings(){this.$router.push({name:"blueprint-settings",query:this.$route.query,params:{activeTab:"metadata"}})},async goToList(){const e=await this.dataProvider.getListUrl();this.$actionHandler.handleRoute({route:e,target:this.target})}},created(){this.featureHandler=this.dataProvider.getFeatureHandler()}},"blueprints/bp-blueprint-top-bar.html")},45:()=>{Vue.asyncComponent("bp-block-actions",{data:()=>({menuOpen:!1,fullWidthModalVisible:!1,messageModalOpen:!1,message:null}),props:{hidden:{type:Boolean,required:!1,default:!1},endOfRow:{type:Boolean,required:!1,default:!1},fullWidth:{type:Boolean,required:!1,default:!1},previewMode:{type:Boolean,required:!1,default:!1},areChildrenAllowed:{type:Boolean,required:!1,default:!1},showGuides:{type:Boolean,required:!1,default:!1},showDivideChildrenEqually:{type:Boolean,required:!1,default:!1},showAlignmentOptions:{type:Boolean,required:!1,default:!1},locks:{type:Array,required:!1,default:()=>[]},canEdit:{type:Boolean,required:!1,default:!0},canDelete:{type:Boolean,required:!1,default:!0},canChangeLayout:{type:Boolean,required:!1,default:!0}},computed:{canChangeLayoutMessage(){return this.this.getLockByAction("layout")?.message},canEditMessage(){return this.this.getLockByAction("edit")?.message},canDeleteMessage(){return this.getLockByAction("delete")?.message}},methods:{closeMenuAndEmit(e,t){this.fullWidthModalVisible=!1,this.menuOpen=!1,this.$emit(e,t)},showMessage(e){e&&(this.messageModalOpen=!0,this.message=e)},closeMessage(){this.messageModalOpen=!1,this.message=null},getLockByAction(e){return this.locks.find((t=>t.isLocked&&(t.action.includes(e)||t.action.includes("all"))))},showFullWidthModal(){this.fullWidthModalVisible=!0}}},"blueprints/editor/bp-block-actions.html")},840:()=>{Vue.asyncComponent("bp-block-name",{data:function(){return{editTitle:!1,nameLocal:this.name?this.name:this.nameDefault}},props:{name:{type:String},nameDefault:{type:String,required:!0},areChildrenAllowed:{type:Boolean}},computed:{currentName(){return this.name?this.name:this.nameDefault}},methods:{startEditTitle(){this.editTitle=!0,this.$nextTick((()=>{this.$refs.nameField.focus()}))},setNewName(){this.editTitle=!1,this.$emit("changed",this.nameLocal)}}},"blueprints/editor/bp-block-name.html")},645:()=>{Vue.asyncComponent("bp-block-type",{data:()=>({isActive:!1}),props:{name:{type:String,required:!0},description:{type:String},type:{type:String,required:!0},preview:{type:String,required:!1},areChildrenAllowed:{type:Boolean,required:!0}},methods:{startDrag(e){this.isActive=!0,e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",this.$emit("dragstart")},endDrag(){this.isActive=!1,this.$emit("dragend")}}},"blueprints/editor/bp-block-type.html")},834:()=>{Vue.asyncComponent("bp-block-type-list",{data:function(){return{q:null,blockTypes:[]}},props:{dataProvider:{type:Object,required:!0}},computed:{activeBlockTypes(){return this.q?this.blockTypes.filter((e=>e.name.toLowerCase().includes(this.q.toLowerCase()))):this.blockTypes}},methods:{setActiveBlockType(e){this.$emit("activeBlockTypeChanged",e)},addNewBlock(e){const t=this.dataProvider.getNewBlockByType(e);this.$emit("addNewBlock",t),this.setActiveBlockType(t)},childDragStart(e){this.addNewBlock(e)},childDragStop(){this.setActiveBlockType(null)}},async created(){this.loading=!0,this.blockTypes=await this.dataProvider.getBlockTypes(),this.loading=!1}},"blueprints/editor/bp-block-type-list.html")},4:()=>{Vue.asyncComponent("bp-blueprint-editor-side-bar",{props:{showGuides:{type:Boolean},dataProvider:{type:Object,required:!0},showHiddenElements:{type:Boolean},breakpoint:{type:Object}},computed:{amountOfHiddenElements(){return this.breakpoint?this.breakpoint.blockPositioning.filter((e=>e.hidden)).length:null}}},"blueprints/editor/bp-blueprint-editor-side-bar.html")},306:()=>{Vue.asyncComponent("bp-breakpoint-list",{data:()=>({activeBreakpointIds:[],breakpointOptions:[]}),props:{breakpoints:{type:Array,required:!0},originalBreakpoint:{type:Object,required:!0},dataProvider:{type:Object,required:!0}},methods:{activeBreakpointsChanged(e,t){this.activeBreakpointIds.includes(t.id)?this.$emit("addBreakpoint",t,this.breakpointOptions.indexOf(t)):this.$emit("removeBreakpoint",t)}},created(){this.breakpointOptions=this.dataProvider.fetchSupportedBreakpoints(),this.activeBreakpointIds=this.breakpoints.map((e=>e.id))}},"blueprints/editor/bp-breakpoint-list.html")},313:()=>{Vue.asyncComponent("bp-conditions",{data:()=>({loading:!1,conditions:[],breakpoint:null,activeConditions:[]}),props:{breakpointId:{type:String,required:!0},block:{type:Object},dataProvider:{type:Object,required:!0}},methods:{hideForm(){this.$router.push({name:"blueprint"})},submit(){console.log("submit")},addAction(e){this.$router.push({name:"blueprint-condition-action-form",params:{breakpointId:this.breakpointId,bundle:e.actionForm.bundleId,definition:e.actionForm.definitionId,objectId:"new"}})}},created(){this.conditions=this.dataProvider.fetchConditions(this.breakpoint,this.block),this.breakpoint=this.dataProvider.getBreakpoints().find((e=>e.id===this.breakpointId))}},"blueprints/editor/bp-conditions.html")},309:()=>{Vue.asyncComponent("bp-hidden-block-list",{props:{blocks:{type:Array}},methods:{showBlock(e){this.$emit("blockPropertyChanged",{blockId:e.id,hidden:!e.hidden})}}},"blueprints/editor/bp-hidden-block-list.html")},31:()=>{Vue.asyncComponent("bp-hidden-blocks-dropdown",{data:function(){return{showDropdownHidden:!1}},props:{breakpoint:{type:Object}},computed:{hiddenBlocks(){return this.getHiddenBlocks(this.breakpoint.blocks)}},methods:{getHiddenBlocks(e){let t=[];return e.forEach((e=>{e.hidden&&t.push(e),e.blocks&&e.blocks.length&&(t=[...t,...this.getHiddenBlocks(e.blocks)])})),t},blockPropertyChanged(e){this.$emit("blockPropertyChanged",e)}}},"blueprints/editor/bp-hidden-blocks-dropdown.html")},563:()=>{Vue.asyncComponent("bp-blocks-wrapper",{props:{parentBlockId:{type:String,required:!1},blocks:{type:Array,required:!0},previewMode:{type:Boolean,required:!1,default:!1},previewIframe:{type:HTMLIFrameElement}},computed:{containers(){if(void 0!==this.parentBlockId)return[];let e=[{rows:[[]],fullWidth:!1}],t=0,i=0;return this.blocks.forEach((r=>{r.fullWidth&&1===e[t].rows.length&&0===e[t].rows[i].length?(e[t].fullWidth=!0,e[t].rows[i].push(r),e.push({rows:[[]],fullWidth:!1}),t++,i=0):r.fullWidth&&(e[t].rows.length>1||e[t].rows[i].length>0)?(e.push({rows:[[]],fullWidth:!1}),t++,i=0,e[t].fullWidth=!0,e[t].rows[i].push(r),e.push({rows:[[]],fullWidth:!1}),i=0,t++):e[t].rows[i].push(r),r.endOfRow&&(e[t].rows.push([]),i++)})),e},blockRows(){if(void 0===this.parentBlockId)return[];let e=[[]],t=0;return this.blocks.forEach((i=>{e[t].push(i),i.endOfRow&&(e.push([]),t++)})),e}}},"blueprints/editor/grid/bp-blocks-wrapper.html")},621:()=>{Vue.asyncComponent("bp-grid-container",{data:()=>({style:{}}),props:{id:{type:Number,required:!0},fullWidth:{type:Boolean,required:!1,default:!1},previewMode:{type:Boolean,required:!1,default:!1},previewIframe:{type:HTMLIFrameElement}},methods:{setDimensionsForPreviewMode(){const e=this.previewIframe.contentWindow.document.querySelector(`[data-block-container="${this.id}"]`);this.style={height:e.getBoundingClientRect().height+"px",width:e.getBoundingClientRect().width+"px"}}},created(){this.previewMode&&this.previewIframe.contentWindow.addEventListener("resize",this.setDimensionsForPreviewMode,{capture:!0})}},"blueprints/editor/grid/bp-grid-container.html")},301:()=>{Vue.asyncComponent("bp-grid-row",{props:{previewMode:{type:Boolean,required:!1,default:!1}}},"blueprints/editor/grid/bp-grid-row.html")},973:()=>{Vue.asyncComponent("bp-editor-form",{computed:{bundle(){return this.$route.params.bundle},definition(){return this.$route.params.definition},objectId(){return this.$route.params.objectId},relationString(){return this.$route.params.relationString}},methods:{goToEditor(){this.$router.push({name:"blueprint",params:{blueprintId:this.$route.params.blueprintId},query:{verticalId:this.$route.query.verticalId}})},close(){this.$router.back()}}},"blueprints/form/bp-editor-form.html")},566:()=>{Vue.asyncComponent("bp-active-headers",{props:{dataProvider:{type:Object,required:!0}},data:()=>({headerHandler:null,headers:[],loading:!1}),computed:{blueprintId(){return this.$route.params.blueprintId}},methods:{async getHeaders(){this.loading=!0,this.headerHandler=await this.dataProvider.getHeaderHandler(),this.headers=this.headerHandler.getHeaders(),this.loading=!1},selectHeaders(){this.dataProvider.getFeatureHandler().featureSupported("blueprint-headers")&&this.$router.push({name:"headers-selection",query:this.$route.query})},updateHeaders(e){this.headerHandler.setHeaders(e),this.getHeaders()},removeHeaderItem(e){if(!this.dataProvider.getFeatureHandler().featureSupported("blueprint-headers"))return;const t=this.headers.findIndex((t=>t.id===e.id));this.headers.splice(t,1),this.headerHandler.setHeaders(this.headers)}},created(){this.getHeaders()}},"blueprints/headers/bp-active-headers.html")},421:()=>{Vue.asyncComponent("bp-headers-selection",{props:{headerHandler:{type:Object,required:!0}},data:()=>({supportedHeaders:[],selectedHeaderIds:[],loading:!1}),computed:{blueprintId(){return this.$route.params.blueprintId}},methods:{async getSupportedHeaders(){this.loading=!0,this.supportedHeaders=await this.headerHandler.getSupportedHeaders(),this.loading=!1},isSelected(e){return this.selectedHeaderIds.includes(e.id)},apply(){const e=this.supportedHeaders.filter((e=>this.selectedHeaderIds.includes(e.id)));this.$emit("updateHeaders",e)},close(){this.$router.push({name:"blueprint-settings",query:this.$route.query})}},async created(){this.getSupportedHeaders();const e=await this.headerHandler.getHeaders();this.selectedHeaderIds=e.map((e=>e.id))}},"blueprints/headers/bp-headers-selection.html")},326:()=>{Vue.asyncComponent("bp-active-metadata",{props:{dataProvider:{type:Object,required:!0}},data:()=>({metadataHandler:null,metadata:[],loading:!1}),computed:{blueprintId(){return this.$route.params.blueprintId}},methods:{async getMetadata(){this.loading=!0,this.metadataHandler=await this.dataProvider.getMetadataHandler(),this.metadata=this.metadataHandler.getMetadata(),this.loading=!1},selectMetadata(){this.dataProvider.getFeatureHandler().featureSupported("blueprint-metadata")&&this.$router.push({name:"metadata-selection",query:this.$route.query})},goToMetadataForm(e){this.dataProvider.getFeatureHandler().featureSupported("blueprint-metadata")&&this.$router.push({name:"metadata-form",params:{id:e.id},query:{verticalId:this.$route.query.verticalId}})},updateMetadata(e){this.metadataHandler.setMetadata(e),this.getMetadata()},removeMetadataItem(e){if(!this.dataProvider.getFeatureHandler().featureSupported("blueprint-headers"))return;const t=this.metadata.findIndex((t=>t.id===e.id));this.metadata.splice(t,1),this.metadataHandler.setMetadata(this.metadata)},updateMetadataItem({id:e,settings:t}){this.metadata.find((t=>t.id===e)).settings=t,this.updateMetadata(this.metadata)}},created(){this.getMetadata()}},"blueprints/meta/bp-active-metadata.html")},199:()=>{Vue.asyncComponent("bp-metadata-form",{props:{metadataHandler:{type:Object,required:!0}},data:()=>({loading:!1,metadata:null,formData:null}),computed:{blueprintId(){return this.$route.params.blueprintId},metadataId(){return this.$route.params.id},formUrl(){return this.metadataHandler.getMetadataFormUrl(this.metadataId,this.blueprintId)},saveFormUrl(){return this.metadataHandler.getSaveMetadataFormUrl(this.metadataId,this.blueprintId)},relationString(){return this.$route.params.relationString}},methods:{save(e){this.$emit("saved",{id:this.metadataId,settings:e.settings})},close(){const e="metadata-selection-form"===this.$route.name?"metadata-selection":"blueprint-settings";this.$router.push({name:e,query:{verticalId:this.$route.query.verticalId}})},async getFormData(){let e={locale:this.$localeHandler.getActiveLocale()};this.loading=!0;try{const t={formValues:this.activeMetaData?.settings?.values};this.formData=await this.$post(this.formUrl,t,e),this.loading=!1}catch(e){console.log(e)}}},async created(){this.loading=!0,this.activeMetaData=await this.metadataHandler.getMetadataById(this.metadataId),this.loading=!1,this.getFormData()}},"blueprints/meta/bp-metadata-form.html")},342:()=>{Vue.asyncComponent("bp-metadata-selection",{props:{metadataHandler:{type:Object,required:!0}},data:()=>({supportedMetadata:[],currentSelectedMetaData:[],loading:!1}),computed:{blueprintId(){return this.$route.params.blueprintId},selectedMetadataIds(){return this.currentSelectedMetaData.map((e=>e.id))}},methods:{async getSupportedMetadata(){this.loading=!0,this.supportedMetadata=await this.metadataHandler.getSupportedMetadata(),this.loading=!1},goToMetadataForm(e){this.$router.push({name:"metadata-selection-form",params:{id:e.id},query:{verticalId:this.$route.query.verticalId}})},isSelected(e){return this.selectedMetadataIds.includes(e.id)},removeFromSelectedmetadata(e){const t=this.currentSelectedMetaData.findIndex((t=>t.id===e.id));this.currentSelectedMetaData.splice(t,1)},addMetadataToSelection({id:e,settings:t}){const i=this.supportedMetadata.find((t=>t.id===e));i.settings=t,this.currentSelectedMetaData.push(i)},toggleMetadata(e){this.isSelected(e)?this.removeFromSelectedmetadata(e):this.goToMetadataForm(e)},apply(){this.$emit("updateMetaData",this.currentSelectedMetaData)},close(){this.$router.push({name:"blueprint-settings",query:this.$route.query})}},async created(){this.getSupportedMetadata();const e=await this.metadataHandler.getMetadata();this.currentSelectedMetaData=[...e]}},"blueprints/meta/bp-metadata-selection.html")},73:()=>{Vue.asyncComponent("bp-blueprint-settings",{props:{dataProvider:{type:Object,required:!0}},computed:{activeTab(){return this.$route.params.activeTab}},methods:{setActiveTab(e){this.$router.push({name:"blueprint-settings",query:this.$route.query,params:{activeTab:e}})},close(){this.$router.push({name:"blueprint",params:{blueprintId:this.$route.params.blueprintId},query:this.$route.query})}}},"blueprints/settings/bp-blueprint-settings.html")},921:()=>{Vue.asyncComponent("bp-skin-settings-side-bar",{data:()=>({loading:!1,settings:{}}),model:{prop:"settingValues",event:"change"},props:{dataProvider:{type:Object,default:!1},blueprintId:{type:String|Number},verticalId:{type:String|Number},settingValues:{type:Object,default:()=>{}}},computed:{relationString(){return this.$route.params.relationString},formUrl(){return this.dataProvider.getSkinSettingsHandler().getSkinSettingsFormUrl(this.verticalId)}},methods:{updateSettingValues(e){this.settings=e,this.$emit("change",this.settings)},doApply(){this.$emit("apply",this.settings)}}},"blueprints/settings/bp-skin-settings-side-bar.html")},327:()=>{Vue.asyncComponent("bp-colspan-resizable",{data:()=>({parentElement:null}),props:{colspan:{type:Number,required:!0},offset:{type:Number,required:!1},maxCols:{type:Number,required:!1},minColspan:{type:Number,default:1,required:!1},previewMode:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{resize({width:e,offsetLeft:t,offsetRight:i}){const r=e/this.parentWidth(),s=t/this.parentWidth(),a=i/this.parentWidth();let n=this.calculateColspan(r),o=this.calculateOffset(s);const d=this.calculateOffset(a);n+o+d>this.maxCols&&(n-=o+n+d-this.maxCols),n+o+d=this.maxCols&&(t=this.maxCols-1),t},removeOffset(){this.$emit("changeDimensions",{colspan:this.colspan+this.offset,offset:0})},parentWidth(){return this.parentElement.offsetWidth-24}},mounted(){this.parentElement=this.$el.parentElement}},"blueprints/utils/resize/bp-colspan-resizable.html")},38:function(){Vue.asyncComponent("bp-resizable",{props:{referenceElement:{default:()=>{this.$el.parentElement}},disabled:{type:Boolean,default:!1}},data:()=>({resizing:!1,startX:null,startLeft:null,startRight:null,startWidth:null}),methods:{startResize(e){this.$emit("startResize"),this.resizing=!0,this.startX=e.clientX,this.startWidth=parseInt(this.$refs.resizable.offsetWidth,10);const t=this.$refs.resizable.getBoundingClientRect(),i=this.referenceElement.getBoundingClientRect();this.startLeft=Math.round(t.x-i.x),this.startRight=Math.round(i.x+i.width-(t.x+t.width))},startResizeRight(e){this.startResize(e),document.addEventListener("mousemove",this.resizeFromRight),document.addEventListener("mouseup",this.stopResizeFromRight)},startResizeLeft(e){this.startResize(e),document.addEventListener("mousemove",this.resizeFromLeft),document.addEventListener("mouseup",this.stopResizeFromLeft)},resizeFromRight(e){const t=this.startWidth+e.clientX-this.startX,i=this.startRight+(this.startX-e.clientX);this.$emit("resize",{width:t,offsetLeft:this.startLeft,offsetRight:i})},resizeFromLeft(e){let t=this.startLeft+(e.clientX-this.startX);const i=this.startWidth-e.clientX+this.startX;this.$emit("resize",{width:i,offsetLeft:t,offsetRight:this.startRight})},stopResizeFromRight(){this.resizing=!1,this.$emit("stopResize"),document.removeEventListener("mousemove",this.resizeFromRight)},stopResizeFromLeft(){this.resizing=!1,this.$emit("stopResize"),document.removeEventListener("mousemove",this.resizeFromLeft)},hoverResize(e){this.$emit("hoverResize",e)}}},"blueprints/utils/resize/bp-resizable.html")},348:()=>{Vue.asyncComponent("bp-scale-control",{data:()=>({scaleOptions:[{label:"Previewing at 200%",value:2},{label:"Previewing at 150%",value:1.5},{label:"Previewing at 100%",value:1},{label:"Previewing at 50%",value:.5}],openPreviewScaleOptions:!1}),props:{previewScale:{type:Number,required:!1,default:1}},computed:{localPreviewScaleLabel:{get(){return this.scaleOptions.find((e=>e.value===this.previewScale))?.label},set(e){return this.$emit("changePreviewScale",e)}}},methods:{setPreviewScale(e){this.openPreviewScaleOptions=!1,this.$emit("changePreviewScale",e)}}},"blueprints/utils/scale/bp-scale-control.html")}},t={};function i(r){var s=t[r];if(void 0!==s)return s.exports;var a=t[r]={id:r,exports:{}};return e[r].call(a.exports,a,a.exports,i),a.exports}i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i(336),i(763)})(); //# sourceMappingURL=blueprints.js.map