/
main-form.99e58c43.js
1 lines (1 loc) · 114 KB
/
main-form.99e58c43.js
1
(function(e){function t(t){for(var i,a,s=t[0],c=t[1],l=t[2],d=0,p=[];d<s.length;d++)a=s[d],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&p.push(o[a][0]),o[a]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);u&&u(t);while(p.length)p.shift()();return r.push.apply(r,l||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],i=!0,s=1;s<n.length;s++){var c=n[s];0!==o[c]&&(i=!1)}i&&(r.splice(t--,1),e=a(a.s=n[0]))}return e}var i={},o={"main-form":0},r=[];function a(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=i,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)a.d(n,i,function(t){return e[t]}.bind(null,i));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/";var s=window["webpackJsonp"]=window["webpackJsonp"]||[],c=s.push.bind(s);s.push=t,s=s.slice();for(var l=0;l<s.length;l++)t(s[l]);var u=c;r.push([2,"chunk-vendors","chunk-common"]),n()})({"109f":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"block__body"},[n("a17-wysiwyg-tiptap",{attrs:{name:e.fieldName("html"),label:"Body",options:{modules:{toolbar:["table"],syntax:!1}},placeholder:"Insert your table",editSource:"true",inStore:"value"}})],1)},o=[],r=n("f0f8"),a={name:"A17Bodytable",mixins:[r["a"]]},s=a,c=n("2877"),l=Object(c["a"])(s,i,o,!1,null,null,null);t["default"]=l.exports},1451:function(e,t,n){"use strict";n("8120")},1591:function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="1591"},"1f0f":function(e,t,n){},"1ffb":function(e,t,n){},2:function(e,t,n){e.exports=n("f618")},"21ad":function(e,t,n){"use strict";n("cff7")},"22d0":function(e,t,n){"use strict";n.r(t);var i=n("2f62"),o=n("0429"),r=n("f1af");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t["default"]={props:{editorName:{type:String,required:!0}},computed:s(s({availableBlocks:function(){return this.getAvailableBlocks(this.editorName)},savedBlocks:function(){return this.blocks(this.editorName)},allSavedBlocks:function(){var e=this;return this.used&&Object.keys(this.used).reduce((function(t,n){return t.concat(e.used[n])}),[])},hasBlockActive:function(){return Object.keys(this.activeBlock).length>0}},Object(i["c"])({activeBlock:function(e){return e.blocks.active},used:function(e){return e.blocks.blocks},editorNames:function(e){return e.blocks.editorNames}})),Object(i["b"])({getAvailableBlocks:"availableBlocks",blocks:"blocks"})),methods:{reorderBlocks:function(e){this.$store.commit(o["b"].REORDER_BLOCKS,{editorName:this.editorName,value:e})},addBlock:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.$store.commit(o["b"].ADD_BLOCK,{editorName:t,block:s(s({},e),{},{type:e.type||e.component}),index:n})},moveBlock:function(e){var t=e.oldIndex,n=e.newIndex;this.$store.commit(o["b"].MOVE_BLOCK,{editorName:this.editorName,oldIndex:t,newIndex:n})},moveBlockToEditor:function(e,t,n,i){this.$store.dispatch(r["a"].MOVE_BLOCK_TO_EDITOR,{block:e,editorName:t,index:n,futureIndex:i,id:Date.now()})},cloneBlock:function(e){var t=e.block,n=e.index;this.$store.dispatch(r["a"].DUPLICATE_BLOCK,{editorName:this.editorName,futureIndex:n,block:t,id:Date.now()})}},render:function(){return this.$scopedSlots.default({availableBlocks:this.availableBlocks,savedBlocks:this.savedBlocks,reorderBlocks:this.reorderBlocks,moveBlock:this.moveBlock,editorNames:this.editorNames,hasBlockActive:this.hasBlockActive,allSavedBlocks:this.allSavedBlocks,activeBlock:this.activeBlock,addBlock:this.addBlock,moveBlockToEditor:this.moveBlockToEditor,cloneBlock:this.cloneBlock})}}},"25ba":function(e,t,n){},2741:function(e,t,n){},2774:function(e,t,n){"use strict";n("e689")},"33d8":function(e,t,n){"use strict";n("5886")},"368d":function(e,t,n){},"3a97":function(e,t,n){},"4ae0":function(e,t,n){"use strict";n("1ffb")},"4c21":function(e,t,n){},5110:function(e,t,n){"use strict";n("fb16")},5445:function(e,t,n){"use strict";n("cbde")},"548b":function(e,t,n){},"56de":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-blocks-list",{attrs:{"editor-name":e.editorName},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.savedBlocks,o=t.availableBlocks,r=t.moveBlock,a=t.moveBlockToEditor,s=t.cloneBlock;return[n("div",{staticClass:"blocks"},[n("draggable",{staticClass:"blocks__container",attrs:{value:i,group:"blocks",move:e.handleOnMove,options:e.dragOptions},on:{end:function(t){return e.handleOnEnd(r,a)}}},[n("transition-group",{attrs:{name:"draggable_list",tag:"div"}},e._l(i,(function(t){return n("div",{key:t.id,staticClass:"blocks__item"},[n("a17-blockeditor-model",{attrs:{"editor-name":e.editorName,block:t},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.block,a=t.blockIndex,c=t.add,l=t.edit,u=t.move,d=t.remove,p=t.duplicate;return[o.length?n("a17-blockeditor-item",{ref:"blockList",refInFor:!0,attrs:{block:r,index:a,opened:e.opened},on:{expand:e.setOpened}},[e._l(o,(function(t){return[n("button",{key:t.component,staticClass:"blocks__addButton",attrs:{slot:"dropdown-add",type:"button"},on:{click:function(n){return e.handleBlockAdd(c,t,a+1)}},slot:"dropdown-add"},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],staticClass:"blocks__icon",attrs:{symbol:t.icon}}),n("span",{staticClass:"blocks__title"},[e._v(e._s(t.title))])])]})),n("div",{attrs:{slot:"dropdown-action"},slot:"dropdown-action"},[e.opened?n("button",{attrs:{type:"button"},on:{click:function(t){return e.collapseAllBlocks()}}},[e._v(" "+e._s(e.$trans("fields.block-editor.collapse-all","Collapse all"))+" ")]):n("button",{attrs:{type:"button"},on:{click:function(t){return e.expandAllBlocks()}}},[e._v(" "+e._s(e.$trans("fields.block-editor.expand-all","Expand all"))+" ")]),e.editor?n("button",{attrs:{type:"button"},on:{click:function(t){return e.openInEditor(l,a,e.editorName)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.open-in-editor","Open in editor"))+" ")]):e._e(),n("button",{attrs:{type:"button"},on:{click:function(t){return e.handleClone(s,a,r)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.clone-block","Clone block"))+" ")]),n("button",{attrs:{type:"button"},on:{click:function(t){return e.handleDuplicateBlock(p)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.create-another","Create another"))+" ")]),n("button",{attrs:{type:"button"},on:{click:function(t){return e.handleDeleteBlock(d)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.delete","Delete"))+" ")])]),e._l(i.length,(function(t){return n("button",{key:t,attrs:{slot:"dropdown-numbers",type:"button"},on:{click:function(e){return u(t-1)}},slot:"dropdown-numbers"},[e._v(e._s(t)+" ")])}))],2):e._e()]}}],null,!0)})],1)})),0)],1),n("div",{staticClass:"blocks__actions"},[o.length?n("a17-dropdown",{ref:"blocksDropdown",attrs:{position:"top-center",arrow:!0,offset:10,maxHeight:430}},[n("a17-button",{attrs:{size:"small",variant:"action"},on:{click:function(t){return e.$refs.blocksDropdown.toggle()}}},[e._v(e._s(e.trigger)+" ")]),n("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e._l(o,(function(t){return[n("a17-blockeditor-model",{key:t.component,attrs:{"editor-name":e.editorName,block:t},scopedSlots:e._u([{key:"default",fn:function(i){var o=i.add,r=i.block;return[n("button",{key:t.component,staticClass:"blocks__addButton",attrs:{type:"button"},on:{click:function(t){return e.handleBlockAdd(o,r)}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],staticClass:"blocks__icon",attrs:{symbol:t.icon}}),n("span",{staticClass:"blocks__title"},[e._v(e._s(t.title))])])]}}],null,!0)})]}))],2)],1):e._e(),n("div",{staticClass:"blocks__secondaryActions"},[e.editor?n("a",{staticClass:"f--link f--link-underlined--o",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.openEditor(-1,e.editorName)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.open-in-editor","Open in editor"))+" ")]):e._e()])],1)],1)]}}])})},o=[],r=n("2f62"),a=n("3417"),s=n("1980"),c=n.n(s),l=n("5d15"),u=n("22d0"),d=n("a08c");function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v={name:"A17Blocks",components:{"a17-blockeditor-item":l["default"],"a17-blockeditor-model":d["default"],"a17-blocks-list":u["default"],draggable:c.a},mixins:[a["e"],a["f"]],props:{trigger:{type:String,default:""},title:{type:String,default:""},editorName:{type:String,required:!0}},data:function(){return{opened:!0,handle:".block__handle"}},computed:f(f({},Object(r["c"])({editor:function(e){return e.blocks.editor},editorNames:function(e){return e.blocks.editorNames}})),Object(r["b"])(["blocks","fieldsByBlockId","availableBlocks"])),methods:{setOpened:function(){var e=this.$refs.blockList&&this.$refs.blockList.every((function(e){return!e.visible}));e&&(this.opened=!1)},collapseAllBlocks:function(){this.opened=!1},expandAllBlocks:function(){this.opened=!0},checkExpandBlocks:function(){this.allBlocksExpands=this.$refs.blockList.every((function(e){return e.visible}))},handleOnMove:function(e){var t=e.draggedContext,n=e.relatedContext,i=t.index,o=t.element,r=t.futureIndex,a=n.element;this.nextMove={block:o,editorName:a.name,newIndex:r,index:i}},handleOnEnd:function(e,t){var n=this.nextMove,i=n.block,o=n.editorName,r=n.newIndex,a=n.index;i.name!==o?this.checkIfBlockTypeIsAvailable(o,i.type)&&t&&t(i,o,a,r):e&&e({oldIndex:a,newIndex:r})},handleClone:function(e,t,n){e&&e({block:n,index:t+1})},handleBlockAdd:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;e(t,i),this.$nextTick((function(){n.checkExpandBlocks()}))},handleDuplicateBlock:function(e,t){var n=this;e(t),this.$nextTick((function(){n.checkExpandBlocks()}))},handleDeleteBlock:function(e,t){var n=this;this.$root.$refs.warningContentEditor?this.$root.$refs.warningContentEditor.open((function(){e(t),n.$nextTick((function(){n.checkExpandBlocks()}))})):(e(t),this.$nextTick((function(){n.checkExpandBlocks()})))},checkIfBlockTypeIsAvailable:function(e,t){var n=JSON.parse(JSON.stringify(this.availableBlocks(e))),i=n.map((function(e){return e.component}));return-1!==i.indexOf(t)},openInEditor:function(e,t,n){e(),this.openEditor(t,n)}},mounted:function(){this.$nextTick((function(){this.blocks(this.editorName)&&this.blocks(this.editorName).length>3&&this.collapseAllBlocks()}))}},m=v,h=(n("9c0c"),n("2877")),_=Object(h["a"])(m,i,o,!1,null,"7c4ec278",null);t["default"]=_.exports},5886:function(e,t,n){},"5a2f":function(e,t,n){},"5d15":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"block",class:e.blockClasses},[n("div",{staticClass:"block__header",on:{dblclick:function(t){return t.preventDefault(),e.toggleExpand()}}},[n("span",{staticClass:"block__handle"}),n("div",{staticClass:"block__toggle"},[e.withMoveDropdown?n("a17-dropdown",{ref:e.moveDropdown,staticClass:"f--small",attrs:{position:"bottom-left",maxHeight:270}},[n("span",{staticClass:"block__counter f--tiny",on:{click:function(t){return e.$refs[e.moveDropdown].toggle()}}},[e._v(e._s(e.index+1))]),n("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e._t("dropdown-numbers")],2)]):n("span",{staticClass:"block__counter f--tiny"},[e._v(e._s(e.index+1))]),n("span",{staticClass:"block__title"},[e._v(e._s(e.blockTitle))])],1),n("div",{staticClass:"block__actions"},[e._t("block-actions"),e.withAddDropdown?n("a17-dropdown",{ref:e.addDropdown,attrs:{position:"bottom-right"},on:{open:function(t){e.hover=!0},close:function(t){e.hover=!1}}},[n("a17-button",{attrs:{variant:"icon","data-action":""},on:{click:function(t){return e.$refs[e.addDropdown].toggle()}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"add"}})]),n("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e._t("dropdown-add")],2)],1):e._e(),n("a17-button",{attrs:{variant:"icon","data-action":"","aria-expanded":e.visible?"true":"false"},on:{click:function(t){return e.toggleExpand()}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"expand"}})]),n("a17-dropdown",{ref:e.actionsDropdown,attrs:{position:"bottom-right"},on:{open:function(t){e.hover=!0},close:function(t){e.hover=!1}}},[n("a17-button",{attrs:{variant:"icon"},on:{click:function(t){return e.$refs[e.actionsDropdown].toggle()}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"more-dots"}})]),n("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e._t("dropdown-action")],2)],1)],2)]),n("div",{staticClass:"block__content",attrs:{"aria-hidden":!e.visible||null}},[n(""+e.block.type,e._b({key:"form_"+e.block.type+"_"+e.block.id,tag:"component",attrs:{name:e.componentName(e.block.id)}},"component",e.block.attributes,!1)),n("a17-inputframe",{attrs:{size:"small",label:"",name:"block."+e.block.id}})],1)])},o=[],r=n("2f62"),a=n("4e53");function s(e){return s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d={name:"A17BlockEditorItem",props:{index:{type:Number,default:0},opened:{type:Boolean,default:!0},size:{type:String,default:""},block:{type:Object,default:function(){}}},data:function(){return{visible:!0,hover:!1,withMoveDropdown:!0,withAddDropdown:!0}},filters:a["a"],computed:l(l({titleFieldValue:function(){var e=this.blockFieldValue(this.block.titleField);return e?"object"===s(e)?e[this.currentLocale.value]:e:null},blockTitle:function(){var e=this.block.title||"",t=this.titleFieldValue||"",n=e&&t?" — ":"";return this.block.hideTitlePrefix?"".concat(t):"".concat(e).concat(n).concat(t)},blockClasses:function(){return[this.visible?"block--open":"",this.hover?"block--focus":"",this.size?"block--".concat(this.size):""]},moveDropdown:function(){return"moveBlock".concat(this.index,"Dropdown")},actionsDropdown:function(){return"action".concat(this.block.id,"Dropdown")},addDropdown:function(){return"add".concat(this.block.id,"Dropdown")}},Object(r["c"])({currentLocale:function(e){return e.language.active}})),Object(r["b"])(["fieldValueByName"])),watch:{opened:function(){this.visible=this.opened}},methods:{toggleExpand:function(){this.visible=!this.visible,this.$emit("expand",this.visible)},componentName:function(e){return"blocks["+e+"]"},blockFieldName:function(e){return e?"blocks[".concat(this.block.id,"][").concat(e,"]"):""},blockFieldValue:function(e){if(!e)return null;var t=this.blockFieldName(e);return this.fieldValueByName(t)}},beforeMount:function(){this.$slots["dropdown-numbers"]||(this.withMoveDropdown=!1),this.$slots["dropdown-add"]||(this.withAddDropdown=!1)}},p=d,f=(n("75ad"),n("c682"),n("2877")),b=Object(f["a"])(p,i,o,!1,null,"2216ad94",null);t["default"]=b.exports},"62c8":function(e,t,n){"use strict";n("a8c7")},"69a6":function(e,t,n){"use strict";n("1f0f")},"6b23":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"block__body"},[n("a17-locale",{attrs:{type:"a17-textfield",attributes:{label:"Title",name:e.fieldName("text"),type:"text",maxlength:250,inStore:"value"}}})],1)},o=[],r=n("f0f8"),a={name:"A17Title",mixins:[r["a"]]},s=a,c=n("2877"),l=Object(c["a"])(s,i,o,!1,null,null,null);t["default"]=l.exports},"6b9b":function(e,t,n){"use strict";n("c830")},"6eb7":function(e,t,n){"use strict";n("4c21")},7138:function(e,t,n){"use strict";n("ea76")},"75ad":function(e,t,n){"use strict";n("c47a")},"7ebf":function(e,t,n){"use strict";n("faa7")},"80d1":function(e,t,n){},8120:function(e,t,n){},"912f":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"block__body"},[n("a17-wysiwyg",{attrs:{name:e.fieldName("html"),inStore:"value"}})],1)},o=[],r=n("f0f8"),a={name:"A17Bodytext",mixins:[r["a"]]},s=a,c=n("2877"),l=Object(c["a"])(s,i,o,!1,null,null,null);t["default"]=l.exports},9259:function(e,t,n){},9488:function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="9488"},"98a8":function(e,t,n){},9922:function(e,t,n){"use strict";n("98a8")},"99b4":function(e,t,n){"use strict";n("9259")},"9c0c":function(e,t,n){"use strict";n("d712")},a08c:function(e,t,n){"use strict";n.r(t);var i=n("0429"),o=n("2f62");function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t["default"]={props:{block:{type:Object},editorName:{type:String,required:!0}},computed:a(a({blockIndex:function(){return this.block?this.getBlockIndex(this.block,this.editorName):0},isActive:function(){return!!(this.block&&Object.keys(this.activeBlock).length>0)&&this.block.id===this.activeBlock.id}},Object(o["c"])({activeBlock:function(e){return e.blocks.active}})),Object(o["b"])({getBlockIndex:"blockIndex"})),methods:{add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;this.$store.commit(i["b"].ADD_BLOCK,{editorName:this.editorName,block:{id:this.setBlockID(),title:e.title,type:e.component,icon:e.icon,attributes:e.attributes},index:t})},edit:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.blockIndex;this.$store.commit(i["b"].ACTIVATE_BLOCK,{editorName:this.editorName,index:e})},unEdit:function(){this.$store.commit(i["b"].ACTIVATE_BLOCK,{editorName:this.editorName,index:-1})},move:function(e){this.blockIndex!==e&&this.$store.commit(i["b"].MOVE_BLOCK,{editorName:this.editorName,oldIndex:this.blockIndex,newIndex:e})},duplicate:function(){var e=Object.assign({},this.block);this.$store.commit(i["b"].DUPLICATE_BLOCK,{editorName:this.editorName,index:this.blockIndex,block:e,id:this.setBlockID()})},remove:function(){this.unEdit(),this.$store.commit(i["b"].DELETE_BLOCK,{editorName:this.editorName,index:this.blockIndex})},setBlockID:function(){return Date.now()}},render:function(){return this.$scopedSlots.default({block:this.block,blockIndex:this.blockIndex,add:this.add,edit:this.edit,unEdit:this.unEdit,isActive:this.isActive,remove:this.remove,move:this.move,duplicate:this.duplicate})}}},a70b:function(e,t,n){"use strict";n("548b")},a8c7:function(e,t,n){},aa3e:function(e,t,n){"use strict";n("368d")},ac09:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"block__body"},[n("a17-inputframe",{attrs:{label:"Image",name:"medias.image"}},[n("a17-mediafield",{attrs:{name:e.fieldName("image"),"crop-context":"image"}})],1)],1)},o=[],r=n("f0f8"),a={name:"A17Image",mixins:[r["a"]]},s=a,c=n("2877"),l=Object(c["a"])(s,i,o,!1,null,null,null);t["default"]=l.exports},b0c8:function(e,t,n){"use strict";n("80d1")},ba98:function(e,t,n){},bef0:function(e,t,n){var i={"./BlockEditorItem.vue":"5d15","./BlockEditorModel.js":"a08c","./BlockImage.vue":"ac09","./BlockTable.vue":"109f","./BlockTitle.vue":"6b23","./BlockWysiwyg.vue":"912f","./Blocks.vue":"56de","./BlocksList.js":"22d0"};function o(e){var t=r(e);return n(t)}function r(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}o.keys=function(){return Object.keys(i)},o.resolve=r,e.exports=o,o.id="bef0"},c47a:function(e,t,n){},c682:function(e,t,n){"use strict";n("5a2f")},c830:function(e,t,n){},cbde:function(e,t,n){},ccb6:function(e,t,n){},cff7:function(e,t,n){},d712:function(e,t,n){},ddc0:function(e,t,n){"use strict";n("ccb6")},e005:function(e,t,n){"use strict";n("3a97")},e431:function(e,t,n){"use strict";n("ba98")},e689:function(e,t,n){},e8f1:function(e,t,n){"use strict";n("25ba")},ea76:function(e,t,n){},f618:function(e,t,n){"use strict";n.r(t);var i=n("a026"),o=n("2f62"),r=n("1539"),a=n("0429"),s=n("f1af"),c=n("f99e"),l=n("b171"),u=(n("878a"),n("16f9")),d=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"stickyNav"},[n("div",{staticClass:"container"},[n("div",{staticClass:"stickyNav__nav"},[e.navItems.length>1?n("div",{staticClass:"stickyNav__links"},e._l(e.navItems,(function(t,i){return n("a",{key:t.fieldset,class:{"s--on":t.active},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.scrollToFieldset(i)}}},[e._v(e._s(t.label))])})),0):e._e(),e._t("title")],2),n("div",{staticClass:"stickyNav__actions"},[e._t("actions")],2)])])},p=[],f=n("b047"),b=n.n(f),v=n("2c83"),m={name:"A17StickyNav",props:{items:{type:Array,default:function(){return[]}}},data:function(){return{lastScrollPos:0,topOffset:70,ticking:!1,navItems:this.items,clickedFieldset:-1,fieldset:[]}},methods:{getFieldsetPosition:function(){var e=this;this.lastScrollPos=window.pageYOffset,this.navItems.forEach((function(t,n){var o=e.fieldset[n],r=o?o.getBoundingClientRect().top+e.lastScrollPos:0;i["a"].set(t,"position",r)}))},setActiveItems:function(){var e=this,t=0;this.navItems.forEach((function(n,o){var r=n.position-e.topOffset<e.lastScrollPos;i["a"].set(n,"active",!1),r&&o>0&&(t=o)})),this.clickedFieldset>=0?i["a"].set(e.navItems[e.clickedFieldset],"active",!0):i["a"].set(e.navItems[t],"active",!0)},refresh:function(){var e=this;e.clickedFieldset=-1,this.getFieldsetPosition(),this.setActiveItems(),e.ticking=!1},_resize:b()((function(){this.lastScrollPos=window.pageYOffset,this.refresh()}),200),_scroll:function(){var e=this;this.lastScrollPos=window.pageYOffset,e.ticking||window.requestAnimationFrame((function(){e.refresh(),e.ticking=!1})),e.ticking=!0},scrollToFieldset:function(e){var t=this,n=this.navItems[e].position-this.topOffset+1;this.dispose(),this.clickedFieldset=e,this.getFieldsetPosition(),this.setActiveItems(),Object(v["a"])({offset:n,easing:"easeOut",onComplete:function(){t.init()}})},init:function(){window.addEventListener("scroll",this._scroll),window.addEventListener("resize",this._resize)},dispose:function(){window.removeEventListener("scroll",this._scroll),window.removeEventListener("resize",this._resize)}},mounted:function(){var e=this;this.navItems.forEach((function(t,n){var i=document.querySelector("#"+t.fieldset);i?e.fieldset.push(i):e.fieldset.push(null)})),this.refresh(),this.init()},beforeDestroy:function(){this.dispose()}},h=m,_=(n("7ebf"),n("2877")),g=Object(_["a"])(h,d,p,!1,null,"1a811cfe",null),w=g.exports,y=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"titleEditor",class:e.titleEditorClasses},[n("div",{staticClass:"titleEditor__preview"},[n("h2",{staticClass:"titleEditor__title",class:{"titleEditor__title-only":!e.permalink}},[e.editableTitle?n("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.$refs.editModal.open()}}},[n("span",{staticClass:"f--underlined--o"},[e._v(e._s(e.title))]),e._v(" "),n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"edit"}})]):n("span",[e._v(e._s(e.customTitle?e.customTitle:e.title))])]),!e.permalink&&!e.customPermalink||e.showModal?e._e():n("a",{staticClass:"titleEditor__permalink f--small",attrs:{href:e.fullUrl,target:"_blank"}},[n("span",{staticClass:"f--note f--external f--underlined--o"},[e._v(e._s(e._f("prettierUrl")(e.visibleUrl)))])]),e.showModal?n("span",{staticClass:"titleEditor__permalink f--small f--note f--external f--underlined--o"},[e._v(e._s(e._f("prettierUrl")(e.visibleUrl)))]):e._e(),n("a17-modal",{ref:"editModal",staticClass:"modal--form",attrs:{title:e.modalTitle,forceLock:e.disabled}},[n("a17-langmanager"),n("form",{ref:"modalForm",attrs:{action:"#"},on:{submit:function(t){return t.preventDefault(),e.update(t)}}},[e._t("modal-form"),n("a17-modal-validation",{attrs:{mode:e.mode},on:{disable:e.lockModal}})],2)],1)],1),e._t("default")],2)},k=[],O=n("4e53"),P=n("3b37"),E=n("6d94"),C=n("f03e"),j=n("7d9f");function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var B={name:"A17TitleEditor",mixins:[C["a"],j["a"]],components:{"a17-modal-validation":E["a"],"a17-langmanager":P["a"]},props:{modalTitle:{type:String,default:function(){return this.$trans("modal.update.title")}},warningMessage:{type:String,default:"Missing title"},showModal:{type:Boolean,default:!1},name:{default:"title"},editableTitle:{type:Boolean,default:!0},customTitle:{type:String,default:""},customPermalink:{type:String,default:""}},data:function(){return{disabled:!1}},mounted:function(){this.showModal&&this.$refs.editModal.open()},computed:D(D({titleEditorClasses:function(){return{"titleEditor--error":this.error||this.title===this.warningMessage}},mode:function(){return this.showModal?"done":this.title.length>0?"update":"create"},fullUrl:function(){return this.customPermalink||this.baseUrl.replace("{language}",this.currentLocale.value).replace("{preview}/",this.published?"":"admin-preview/")+this.permalink},visibleUrl:function(){return this.customPermalink||this.baseUrl.replace("{language}",this.currentLocale.value).replace("{preview}/","")+this.permalink},title:function(){var e=this.fieldValueByName(this.name)?this.fieldValueByName(this.name):"",t="string"===typeof e?e:e[this.currentLocale.value];return t||this.warningMessage},permalink:function(){return this.fieldValueByName("slug")[this.currentLocale.value]}},Object(o["c"])({baseUrl:function(e){return e.form.baseUrl},currentLocale:function(e){return e.language.active},languages:function(e){return e.language.all},fields:function(e){return e.form.fields},published:function(e){return e.publication.published}})),Object(o["b"])(["fieldValueByName"])),filters:O["a"],methods:{update:function(){this.$refs.editModal.hide()},lockModal:function(e){this.disabled=e}}},L=B,T=(n("33d8"),Object(_["a"])(L,y,k,!1,null,"4e050f8e",null)),A=T.exports,$=n("4168"),I=n("75fb"),N=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"publisher__wrapper"},[e.withPublicationToggle?n("a17-switcher",{attrs:{title:e.$trans("publisher.switcher-title","Status"),name:"publish_state",textEnabled:e.textEnabled,textDisabled:e.textDisabled}}):e._e(),e._t("default"),e.reviewProcess&&e.reviewProcess.length?n("a17-reviewaccordion",{attrs:{options:e.reviewProcess,name:"review_process",value:e.reviewProcessCompleteValues,open:e.openStates["A17Reviewaccordion"]},on:{open:e.openCloseAccordion}},[e._v(e._s(e.$trans("publisher.review-status")))]):e._e(),e.visibility&&e.visibilityOptions&&e.visibilityOptions.length?n("a17-radioaccordion",{attrs:{radios:e.visibilityOptions,name:"visibility",value:e.visibility,open:e.openStates["A17Radioaccordion"]},on:{open:e.openCloseAccordion,change:e.updateVisibility}},[e._v(e._s(e.$trans("publisher.visibility")))]):e._e(),e.languages&&e.showLanguages&&e.languages.length>1?n("a17-checkboxaccordion",{attrs:{options:e.languages,name:"active_languages",value:e.publishedLanguagesValues,open:e.openStates["A17Checkboxaccordion"]},on:{open:e.openCloseAccordion}},[e._v(e._s(e.$trans("publisher.languages")))]):e._e(),e.withPublicationTimeframe?n("a17-pubaccordion",{attrs:{"date-display-format":e.dateDisplayFormat,"date-format":e.dateFormat,date_24h:e.date_24h,open:e.openStates["A17Pubaccordion"]},on:{open:e.openCloseAccordion}},[e._v(e._s(e.$trans("publisher.published-on")))]):e._e(),e.revisions.length?n("a17-revaccordion",{attrs:{open:e.openStates["A17Revisions"],revisions:e.revisions},on:{open:e.openCloseAccordion}},[e._v(e._s(e.$trans("publisher.revisions")))]):e._e(),e.parents.length?n("a17-parentaccordion",{attrs:{open:e.openStates["A17Parents"],parents:e.parents,value:e.parentId},on:{open:e.openCloseAccordion}},[e._v(e._s(e.$trans("publisher.parent-page")))]):e._e(),e.revisions.length?n("div",{staticClass:"publisher__item"},[n("a",{staticClass:"publisher__link",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.openPreview(t)}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"preview"}}),n("span",{staticClass:"f--link-underlined--o"},[e._v(e._s(e.$trans("publisher.preview")))])])]):e._e(),n("div",{staticClass:"publisher__item publisher__item--btns"},[n("a17-multibutton",{attrs:{options:e.submitOptions,type:"submit",message:e.submitDisableMessage},on:{"button-clicked":e.buttonClicked}})],1)],2)},R=[],M=n("2569"),V=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"switcher",class:e.switcherClasses},[n("h4",{staticClass:"switcher__title"},[e._v(e._s(e.title))]),n("label",{staticClass:"switcher__button",attrs:{for:e.name+"_live"}},[e.isChecked?n("span",{staticClass:"switcher__label"},[e._v(e._s(e.formatTextEnabled))]):e._e(),e.isChecked?e._e():n("span",{staticClass:"switcher__label"},[e._v(e._s(e.formatTextDisabled))]),n("input",{directives:[{name:"model",rawName:"v-model",value:e.checkedValue,expression:"checkedValue"}],attrs:{type:"checkbox",disabled:e.disabled,name:e.name,id:e.name+"_live",value:"live"},domProps:{checked:Array.isArray(e.checkedValue)?e._i(e.checkedValue,"live")>-1:e.checkedValue},on:{change:function(t){var n=e.checkedValue,i=t.target,o=!!i.checked;if(Array.isArray(n)){var r="live",a=e._i(n,r);i.checked?a<0&&(e.checkedValue=n.concat([r])):a>-1&&(e.checkedValue=n.slice(0,a).concat(n.slice(a+1)))}else e.checkedValue=o}}}),n("span",{staticClass:"switcher__switcher"})])])},F=[],U=n("0d3e"),z=n.n(U);function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q={name:"A17Toggle",props:{name:{type:String,default:""},title:{default:"Status"},disabled:{type:Boolean,default:!1},textEnabled:{type:String,default:"Live"},textDisabled:{type:String,default:"Draft"},textExpired:{type:String,default:"Expired"},textScheduled:{type:String,default:"Scheduled"}},filters:O["a"],computed:K({switcherClasses:function(){return[this.isChecked?"switcher--active":"",this.formatTextEnabled?"switcher--".concat(this.$options.filters.lowercase(this.formatTextEnabled)):""]},isChecked:function(){return this.published},formatTextEnabled:function(){var e=z()(this.startDate,new Date),t=z()(this.endDate,new Date);return this.endDate&&t<0?this.textExpired:this.startDate&&e>0?this.textScheduled:this.textEnabled},formatTextDisabled:function(){return this.textDisabled},checkedValue:{get:function(){return this.published},set:function(e){this.$store.commit(a["m"].UPDATE_PUBLISH_STATE,e),this.$emit("change",e)}}},Object(o["c"])({startDate:function(e){return e.publication.startDate},endDate:function(e){return e.publication.endDate},published:function(e){return e.publication.published}}))},G=q,Y=(n("9922"),Object(_["a"])(G,V,F,!1,null,"2e81738b",null)),J=Y.exports,Z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-accordion",{attrs:{open:e.open},on:{toggleVisibility:e.notifyOpen}},[n("span",{attrs:{slot:"accordion__title"},slot:"accordion__title"},[e._t("default")],2),n("div",{attrs:{slot:"accordion__value"},slot:"accordion__value"},[e._v(e._s(e.currentLabel))]),n("a17-radiogroup",{attrs:{name:e.name,radios:e.radios,initialValue:e.currentValue},on:{change:e.changeValue}})],1)},X=[],Q=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"accordion",class:e.visibilityClasses},[n("button",{staticClass:"accordion__trigger",attrs:{type:"button","aria-expanded":e.visible?"true":"false"},on:{click:e.onClickVisibility}},[e._t("accordion__title"),n("span",{staticClass:"accordion__value"},[e._t("accordion__value")],2),n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"dropdown_module"}})],2),n("transition",{attrs:{css:!1,duration:275},on:{"before-enter":e.beforeEnter,"before-leave":e.beforeLeave,enter:e.enter,leave:e.leave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"accordion__dropdown",attrs:{"aria-hidden":!e.visible}},[n("div",{staticClass:"accordion__list"},[e._t("default")],2)])])],1)},ee=[],te=n("5a57"),ne={name:"A17Accordion",mixins:[te["a"]],watch:{open:function(){this.visible!==this.open&&(this.visible=this.open)}},methods:{getMaxHeight:function(){return Math.min(250,this.$el.querySelector(".accordion__list").clientHeight+1)},beforeEnter:function(e){e.style.maxHeight="0px"},enter:function(e,t){e.style.maxHeight=this.getMaxHeight()+"px"},beforeLeave:function(e,t){e.style.maxHeight=this.getMaxHeight()+"px"},leave:function(e,t){e.style.maxHeight="0px"}}},ie=ne,oe=(n("e005"),n("62c8"),Object(_["a"])(ie,Q,ee,!1,null,"0dd10376",null)),re=oe.exports,ae={name:"A17Radioaccordion",components:{"a17-accordion":re},mixins:[te["a"]],props:{value:{default:""},title:{default:""},name:{default:""},radios:{default:function(){return[]}}},data:function(){return{currentValue:this.value}},computed:{currentLabel:function(){var e=this.radios.filter(this.isSameValue);return e.length?e[0].label:""}},methods:{isSameValue:function(e){return e.value===this.currentValue},changeValue:function(e){this.currentValue=e,this.$emit("change",e)},notifyOpen:function(e){this.$emit("open",e,this.$options.name)}}},se=ae,ce=Object(_["a"])(se,Z,X,!1,null,null,null),le=ce.exports,ue=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-accordion",{attrs:{open:e.open},on:{toggleVisibility:e.notifyOpen}},[n("span",{attrs:{slot:"accordion__title"},slot:"accordion__title"},[e._t("default")],2),n("div",{attrs:{slot:"accordion__value"},slot:"accordion__value"},[e._v(e._s(e.currentLabel))]),n("a17-checkboxgroup",{attrs:{name:e.name,options:e.currentOptions,selected:e.currentValue},on:{change:e.changeValue}})],1)},de=[],pe={name:"A17Reviewaccordion",components:{"a17-accordion":re},mixins:[te["a"]],props:{value:{default:function(){return[]}},title:{type:String,default:""},name:{type:String,default:""},options:{default:function(){return[]}}},data:function(){return{currentOptions:this.options,currentValue:this.value}},computed:{currentLabel:function(){var e="Pending approval",t=this.currentValue[this.currentValue.length-1];return this.currentValue.length&&this.options.forEach((function(n){n.value===t&&(e=n.display)})),e}},methods:{changeValue:function(e){this.currentValue=e,this.$store.commit(a["m"].UPDATE_REVIEW_PROCESS,e)},notifyOpen:function(e){this.$emit("open",e,this.$options.name)}}},fe=pe,be=Object(_["a"])(fe,ue,de,!1,null,null,null),ve=be.exports,me=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-accordion",{attrs:{open:e.open},on:{toggleVisibility:e.notifyOpen}},[n("span",{attrs:{slot:"accordion__title"},slot:"accordion__title"},[e._t("default")],2),n("div",{attrs:{slot:"accordion__value"},slot:"accordion__value"},[e._v(e._s(e.currentLabel))]),n("a17-checkboxgroup",{attrs:{name:e.name,options:e.options,selected:e.currentValue,min:1},on:{change:e.changeValue}})],1)},he=[],_e={name:"A17Checkboxaccordion",components:{"a17-accordion":re},mixins:[te["a"]],props:{value:{default:function(){return[]}},title:{type:String,default:""},name:{type:String,default:""},options:{default:function(){return[]}}},data:function(){return{currentValue:this.value}},watch:{value:function(e){this.currentValue=e}},computed:{currentLabel:function(){return this.currentValue.length+" "+this.$trans("publisher.languages-published")}},methods:{changeValue:function(e){this.currentValue=e,this.$store.commit(a["g"].PUBLISH_LANG,e)},notifyOpen:function(e){this.$emit("open",e,this.$options.name)}}},ge=_e,we=Object(_["a"])(ge,me,he,!1,null,null,null),ye=we.exports,ke=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-accordion",{attrs:{open:e.open},on:{toggleVisibility:e.notifyOpen}},[n("span",{attrs:{slot:"accordion__title"},slot:"accordion__title"},[e._t("default"),e._v(" "),n("span",{staticClass:"f--small f--note"},[e._v("("+e._s(e.revisions.length)+")")])],2),n("div",{attrs:{slot:"accordion__value"},slot:"accordion__value"},[e._v(e._s(e.$trans("publisher.last-edit"))+" "),n("timeago",{attrs:{"auto-update":1,datetime:new Date(e.revisions[0].datetime)}})],1),n("div",{staticClass:"revaccordion__scroller"},[n("ul",{staticClass:"revaccordion__list"},e._l(e.revisions,(function(t,i){return n("li",{key:t.id,staticClass:"revaccordion__item"},[n("a",{attrs:{href:"#"},on:{click:function(n){return n.preventDefault(),e.openPreview(t.id)}}},[n("span",{staticClass:"revaccordion__author"},[e._v(e._s(t.author))]),n("span",{staticClass:"revaccordion__datetime"},[0===i?n("span",{staticClass:"tag"},[e._v(e._s(e.$trans("publisher.current")))]):e._e(),e._v(" "+e._s(e._f("formatDate")(t.datetime)))])])])})),0)])])},Oe=[],Pe={name:"A17Revisions",components:{"a17-accordion":re},mixins:[te["a"]],props:{revisions:{default:function(){return[]}}},filters:O["a"],methods:{notifyOpen:function(e){this.$emit("open",e,this.$options.name)},openPreview:function(e){this.$root.$refs.preview&&this.$root.$refs.preview.open(parseInt(e))}}},Ee=Pe,Ce=(n("6b9b"),Object(_["a"])(Ee,ke,Oe,!1,null,"042fcdcb",null)),je=Ce.exports,Se=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-accordion",{attrs:{open:e.open},on:{toggleVisibility:e.notifyOpen}},[n("span",{attrs:{slot:"accordion__title"},slot:"accordion__title"},[e._t("default")],2),n("div",{attrs:{slot:"accordion__value"},slot:"accordion__value"},[e.startDate?[e._v(" "+e._s(e._f("formatDateWithFormat")(e.startDate,e.dateDisplayFormat))+" ")]:[e._v(" "+e._s(e.defaultStartDate)+" ")]],2),n("div",{staticClass:"accordion__fields"},[n("a17-datepicker",{attrs:{name:"publish_date","place-holder":e.$trans("publisher.start-date"),time_24hr:e.date_24h,altFormat:e.dateFormat,initialValue:e.startDate,maxDate:e.endDate,enableTime:!0,allowInput:!0,staticMode:!0,clear:!0},on:{open:e.openStartCalendar,close:e.closeCalendar,input:e.updateStartDate}}),n("a17-datepicker",{attrs:{name:"end_date","place-holder":e.$trans("publisher.end-date"),time_24hr:e.date_24h,altFormat:e.dateFormat,initialValue:e.endDate,minDate:e.startDate,enableTime:!0,allowInput:!0,staticMode:!0,clear:!0},on:{open:e.openEndCalendar,close:e.closeCalendar,input:e.updateEndDate}})],1)])},De=[];function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach((function(t){Le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Te={name:"A17Pubaccordion",components:{"a17-accordion":re},mixins:[te["a"]],props:{defaultStartDate:{type:String,default:function(){return this.$trans("publisher.immediate")}},defaultEndDate:{type:String,default:""},dateDisplayFormat:{type:String,default:"MMM, DD, YYYY, "+Object(M["b"])()},dateFormat:{type:String,default:null},date_24h:{type:Boolean,default:Object(M["c"])()}},filters:O["a"],computed:Be({},Object(o["c"])({startDate:function(e){return e.publication.startDate},endDate:function(e){return e.publication.endDate}})),methods:{updateStartDate:function(e){this.$store.commit(a["m"].UPDATE_PUBLISH_START_DATE,e)},updateEndDate:function(e){this.$store.commit(a["m"].UPDATE_PUBLISH_END_DATE,e)},notifyOpen:function(e){this.$emit("open",e,this.$options.name)},openCalendar:function(){setTimeout((function(){var e=document.querySelectorAll(".accordion.s--open, .accordion.s--open .accordion__dropdown");e.forEach((function(e){e.style.overflow="visible"}))}),10)},openStartCalendar:function(){this.openCalendar()},openEndCalendar:function(){this.openCalendar()},closeCalendar:function(){var e=document.querySelectorAll(".accordion.s--open, .accordion.s--open .accordion__dropdown");e.forEach((function(e){e.style.overflow=""}))}}},Ae=Te,$e=Object(_["a"])(Ae,Se,De,!1,null,null,null),Ie=$e.exports,Ne=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-accordion",{attrs:{open:e.open},on:{toggleVisibility:e.notifyOpen}},[n("span",{attrs:{slot:"accordion__title"},slot:"accordion__title"},[e._t("default")],2),n("div",{attrs:{slot:"accordion__value"},domProps:{innerHTML:e._s(e.currentLabel)},slot:"accordion__value"}),n("div",{staticClass:"accordion__fields"},[n("a17-select",{attrs:{name:"parent_id",options:e.options,selected:e.currentValue,size:"small"},on:{change:e.updateSelected}})],1)])},Re=[],Me=function(e,t){var n=[];function i(e){return Array(e+1).join(t)+" "}function o(e,t){e.forEach((function(e){var r={};if(r.value=e.id,e.edit&&(r.edit=e.edit),r.label=i(t)+e.name,n.push(r),e.children&&e.children.length){var a=t+1;o(e.children,a)}}))}return o(e,0),n};function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){Ue(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ze={name:"A17Parents",components:{"a17-accordion":re},mixins:[te["a"]],props:{value:{default:0},parents:{default:function(){return[]}}},computed:Fe({currentLabel:function(){var e=this.options.filter(this.isSameValue);return e.length?e[0].label:""},options:function(){var e=Me(this.parents," "),t={value:0,label:"(No parent)"};return e.unshift(t),e}},Object(o["c"])({currentValue:function(e){return e.parents.active}})),methods:{isSameValue:function(e){return e.value===this.currentValue},updateSelected:function(e){this.$store.commit(a["k"].UPDATE_PARENT,e)},notifyOpen:function(e){this.$emit("open",e,this.$options.name)}}},We=ze,Ke=(n("2774"),Object(_["a"])(We,Ne,Re,!1,null,"5a88e420",null)),He=Ke.exports,qe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"multibutton"},[n("a17-dropdown",{ref:"submitDown",attrs:{position:"bottom-right",width:"full",offset:0}},[e.isDisabled(e.options[0])?n("a17-button",{attrs:{type:"button",variant:"validate",disabled:!0}},[e._v(e._s(e.options[0].text))]):n("a17-button",{attrs:{type:e.type,name:e.options[0].name,variant:"validate"},on:{click:function(t){return e.buttonClicked(e.options[0].name)}}},[e._v(e._s(e.options[0].text))]),e.hasValidOptions?n("button",{staticClass:"multibutton__trigger",attrs:{type:"button"},on:{click:function(t){return e.$refs.submitDown.toggle()}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"dropdown_module"}})]):e._e(),e.otherOptions.length?n("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[n("ul",e._l(e.otherOptions,(function(t){return n("li",{key:t.name},[e.isDisabled(t)?n("button",{attrs:{type:"button",disabled:""}},[e._v(e._s(t.text))]):n("button",{attrs:{type:e.type,name:t.name},on:{click:function(n){return e.buttonClicked(t.name)}}},[e._v(e._s(t.text))])])})),0)]):e._e()],1)],1)},Ge=[],Ye={name:"A17Multibutton",props:{type:{default:"button"},message:{type:String,default:""},options:{default:function(){return[]}}},data:function(){return{}},computed:{otherOptions:function(){return this.options.length?this.options.slice(1):[]},hasValidOptions:function(){var e=this.options.filter((function(e){return!e.hasOwnProperty("disabled")||!1===e.disabled})),t=Boolean(e.length>0);return!t&&this.message&&this.$store.commit(a["j"].SET_NOTIF,{message:this.message,variant:"success"}),t}},methods:{isDisabled:function(e){return!!e.hasOwnProperty("disabled")&&!0===e.disabled},buttonClicked:function(e){this.$emit("button-clicked",e)}}},Je=Ye,Ze=(n("b0c8"),Object(_["a"])(Je,qe,Ge,!1,null,"40868c5c",null)),Xe=Ze.exports;function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach((function(t){tt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nt={name:"A17Publisher",components:{"a17-switcher":J,"a17-radioaccordion":le,"a17-checkboxaccordion":ye,"a17-reviewaccordion":ve,"a17-revaccordion":je,"a17-parentaccordion":He,"a17-pubaccordion":Ie,"a17-multibutton":Xe},props:{showLanguages:{type:Boolean,default:!0},dateFormat:{type:String,default:null},dateDisplayFormat:{type:String,default:"MMM, DD, YYYY, "+Object(M["b"])()},date_24h:{type:Boolean,default:Object(M["c"])()}},data:function(){return{singleOpen:!0,openStates:{A17Reviewaccordion:!1,A17Radioaccordion:!1,A17Checkboxaccordion:!1,A17Revisions:!1,A17Pubaccordion:!1,A17Parents:!1}}},filters:O["a"],computed:et(et({reviewProcessCompleteValues:function(){var e=[];return this.reviewProcessComplete.length&&this.reviewProcessComplete.forEach((function(t){e.push(t.value)})),e},submitOptions:function(){return this.$store.getters.getSubmitOptions},publishedLanguagesValues:function(){var e=[];return this.publishedLanguages.length&&this.publishedLanguages.forEach((function(t){e.push(t.value)})),e}},Object(o["c"])({languages:function(e){return e.language.all},revisions:function(e){return e.revision.all},parentId:function(e){return e.parents.active},parents:function(e){return e.parents.all},published:function(e){return e.publication.published},publishSubmit:function(e){return e.publication.publishSubmit},textEnabled:function(e){return e.publication.publishedLabel},textDisabled:function(e){return e.publication.draftLabel},withPublicationToggle:function(e){return e.publication.withPublicationToggle},withPublicationTimeframe:function(e){return e.publication.withPublicationTimeframe},visibility:function(e){return e.publication.visibility},visibilityOptions:function(e){return e.publication.visibilityOptions},reviewProcess:function(e){return e.publication.reviewProcess},submitDisableMessage:function(e){return e.publication.submitDisableMessage}})),Object(o["b"])(["publishedLanguages","reviewProcessComplete"])),methods:{buttonClicked:function(e){this.$store.commit(a["m"].UPDATE_SAVE_TYPE,e)},openCloseAccordion:function(e,t){if(this.singleOpen)if(e)for(var n in this.openStates)this.openStates[n]=n===t;else this.openStates[t]=!1},openPreview:function(){this.$root.$refs.preview&&this.$root.$refs.preview.open(0)},updateVisibility:function(e){this.$store.commit(a["m"].UPDATE_PUBLISH_VISIBILITY,e)},openMoveToTrashModal:function(){this.$parent.$refs.moveToTrashModal.open()}}},it=nt,ot=(n("e8f1"),Object(_["a"])(it,N,R,!1,null,"6d7750c6",null)),rt=ot.exports,at=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.parents.length||e.hasUrl?n("div",{staticClass:"pagenav"},[e.parents.length?n("div",{staticClass:"pagenav__form"},[n("a17-vselect",{attrs:{name:"parents_sources",placeholder:e.placeholder,size:"large",searchable:!0,options:e.options},on:{change:e.gotoUrl}})],1):e._e(),e.hasUrl?n("nav",{staticClass:"pagenav__nav"},[e.previousUrl?n("a",{staticClass:"pagenav__btn",attrs:{href:e.previousUrl}},[e._v("← "+e._s(e.previousLabel))]):n("span",{staticClass:"pagenav__btn"},[e._v("← "+e._s(e.previousLabel))]),e.nextUrl?n("a",{staticClass:"pagenav__btn",attrs:{href:e.nextUrl}},[e._v(e._s(e.nextLabel)+" →")]):n("span",{staticClass:"pagenav__btn"},[e._v(e._s(e.nextLabel)+" →")])]):e._e()]):e._e()},st=[];function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){ut(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dt={name:"A17PageNav",props:{previousLabel:{type:String,default:"Previous page"},nextLabel:{type:String,default:"Next page"},previousUrl:{type:String,default:""},nextUrl:{type:String,default:""},placeholder:{type:String,default:""}},data:function(){return{}},computed:lt({hasUrl:function(){return this.previousUrl||this.nextUrl},options:function(){return Me(this.parents,"–")}},Object(o["c"])({parents:function(e){return e.parents.all}})),methods:{gotoUrl:function(e){e.edit&&(window.location.href=e.edit)}},beforeMount:function(){}},pt=dt,ft=(n("ffdb"),Object(_["a"])(pt,at,st,!1,null,"761dbeaa",null)),bt=ft.exports,vt=n("56de"),mt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"content"},[n("draggable",{staticClass:"content__content",attrs:{options:e.dragOptions},model:{value:e.blocks,callback:function(t){e.blocks=t},expression:"blocks"}},[n("transition-group",{attrs:{name:"draggable_list",tag:"div"}},e._l(e.blocks,(function(t,i){return n("div",{key:t.id,staticClass:"content__item"},[n("a17-blockeditor-item",{attrs:{block:t,index:i,size:e.blockSize,opened:e.opened},on:{open:e.setOpened}},[e.hasRemainingBlocks?n("a17-button",{attrs:{slot:"block-actions",variant:"icon","data-action":""},on:{click:function(t){return e.duplicateBlock(i)}},slot:"block-actions"},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"add"}})]):e._e(),n("div",{attrs:{slot:"dropdown-action"},slot:"dropdown-action"},[n("button",{attrs:{type:"button"},on:{click:function(t){return e.collapseAllBlocks()}}},[e._v("Collapse All")]),n("button",{attrs:{type:"button"},on:{click:function(t){return e.deleteBlock(i)}}},[e._v("Delete")]),e.hasRemainingBlocks?n("button",{attrs:{type:"button"},on:{click:function(t){return e.duplicateBlock(i)}}},[e._v("Duplicate")]):e._e()])],1)],1)})),0)],1),n("div",{staticClass:"content__trigger"},[e.hasRemainingBlocks&&e.blockType.trigger?n("a17-button",{class:e.triggerClass,attrs:{variant:e.triggerVariant},on:{click:function(t){return e.addBlock()}}},[e._v(e._s(e.blockType.trigger))]):e._e(),n("div",{staticClass:"content__note f--note f--small"},[e._t("default")],2)],1)],1)},ht=[],_t=n("1980"),gt=n.n(_t),wt=n("5420"),yt=n("5d15");function kt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kt(Object(n),!0).forEach((function(t){Pt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Et={name:"A17Repeater",components:{"a17-blockeditor-item":yt["default"],draggable:gt.a},mixins:[wt["a"]],props:{type:{type:String,required:!0},name:{type:String,required:!0},buttonAsLink:{type:Boolean,default:!1}},data:function(){return{opened:!0,handle:".block__handle"}},computed:Ot({triggerVariant:function(){return this.buttonAsLink?"aslink":this.inContentEditor?"outline":"action"},triggerClass:function(){return this.inContentEditor?"content__button":""},blockSize:function(){return this.inContentEditor?"small":""},inContentEditor:function(){return"undefined"!==typeof this.$parent.repeaterName},hasRemainingBlocks:function(){return!this.blockType.hasOwnProperty("max")||this.blockType.max>this.blocks.length},blockType:function(){return this.availableBlocks[this.type]?this.availableBlocks[this.type]:{}},blocks:{get:function(){return this.savedBlocks.hasOwnProperty(this.name)&&this.savedBlocks[this.name]||[]},set:function(e){this.$store.commit(a["f"].REORDER_FORM_BLOCKS,{type:this.type,name:this.name,blocks:e})}}},Object(o["c"])({savedBlocks:function(e){return e.repeaters.repeaters},availableBlocks:function(e){return e.repeaters.availableRepeaters}})),methods:{setOpened:function(e){this.opened=e},addBlock:function(){this.opened=!0,this.$store.commit(a["f"].ADD_FORM_BLOCK,{type:this.type,name:this.name})},duplicateBlock:function(e){this.opened=!0,this.$store.commit(a["f"].DUPLICATE_FORM_BLOCK,{type:this.type,name:this.name,index:e})},deleteBlock:function(e){this.$store.commit(a["f"].DELETE_FORM_BLOCK,{type:this.type,name:this.name,index:e})},collapseAllBlocks:function(){this.opened=!1}},mounted:function(){var e=this;this.$nextTick((function(){e.savedBlocks.length>0&&e.collapseAllBlocks()}))}},Ct=Et,jt=(n("4ae0"),Object(_["a"])(Ct,mt,ht,!1,null,"5de9fd8e",null)),St=jt.exports,Dt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-inputframe",{attrs:{error:e.error,note:e.note,locale:e.locale,label:e.label,name:e.name,required:e.required},on:{localize:e.updateLocale}},[n("div",{staticClass:"form__field",class:e.textfieldClasses},[n("input",{attrs:{type:"search",placeholder:e.placeholder,name:e.name,id:e.name,disabled:e.disabled,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete},domProps:{value:e.address},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}),e.showMap?n("div",{staticClass:"form__field--showMap"},[n("a",{attrs:{href:"#",type:"button"},on:{click:function(t){return t.preventDefault(),e.toggleMap(t)}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"location"}}),n("span",{domProps:{innerHTML:e._s(e.mapMessage)}})])]):e._e(),n("input",{attrs:{type:"hidden",name:e.name+"__lat"},domProps:{value:e.lat}}),n("input",{attrs:{type:"hidden",name:e.name+"__lng"},domProps:{value:e.lng}})]),e.showMap?n("div",{directives:[{name:"show",rawName:"v-show",value:e.isMapOpen,expression:"isMapOpen"}],staticClass:"form__mapContainer"}):e._e()])},xt=[],Bt=n("63ea"),Lt=n.n(Bt),Tt=n("da6f"),At=n("67ff"),$t=n("7a77"),It={show:window.$trans("fields.map.show"),hide:window.$trans("fields.map.hide")},Nt="https://maps.googleapis.com/maps/api/js?libraries=places&key=",Rt=window["TWILL"].hasOwnProperty("APIKEYS")&&window["TWILL"].APIKEYS.hasOwnProperty("googleMapApi")?window["TWILL"].APIKEYS.googleMapApi:null,Mt={name:"A17Locationfield",mixins:[Tt["a"],C["a"],j["a"],At["a"]],props:{type:{type:String,default:"text"},zoom:{type:Number,default:15},showMap:{type:Boolean,default:!0},openMap:{type:Boolean,default:!1},saveExtendedData:{type:Boolean,default:!1},initialLat:{type:Number,default:null},initialLng:{type:Number,default:null}},data:function(){return{map:null,autocompletePlace:null,markers:[],address:"",boundingBox:[],types:[],beforeFocusAddress:"",lat:this.initialLat,lng:this.initialLng,focused:!1,isMapOpen:this.openMap,mapMessage:this.openMap?It.hide:It.show}},computed:{value:{get:function(){var e={latlng:this.lat+"|"+this.lng,address:this.address};return this.saveExtendedData&&(e.boundingBox=this.boundingBox,e.types=this.types),e},set:function(e){var t=e.latlng.split("|");this.lat=parseFloat(t[0]),this.lng=parseFloat(t[t.length-1]),this.address=e.address,this.saveExtendedData&&(this.boundingBox=e.boundingBox,this.types=e.types)}},textfieldClasses:function(){return{"s--focus":this.focused,"s--disabled":this.disabled}}},methods:{updateFromStore:function(e){if(!Lt()(e,this.value)&&(this.value=e,this.clearMarkers(),""===this.address&&(this.lat=this.initialLat,this.lng=this.initialLng),this.lat&&this.lng&&this.map)){var t={lat:this.lat,lng:this.lng};this.addMarker(t),this.map.panTo(t)}},onFocus:function(e){this.focused=!0,this.beforeFocusAddress=this.address,this.$emit("focus")},onBlur:function(e){this.focused=!1,""===this.address&&(this.clearMarkers(),this.lat=this.initialLat,this.lng=this.initialLng),this.beforeFocusAddress!==this.address&&this.saveIntoStore(),this.$emit("blur")},onInput:function(e){var t=e.target.value;this.address=t,this.$emit("change",t)},onPlaceChanged:function(){var e=this.autocompletePlace.getPlace();if(this.clearMarkers(),this.clearLatLng(),e.geometry){var t=e.geometry.location;this.address=e.formatted_address,this.setLatLng(t),this.saveExtendedData&&(this.boundingBox=e.geometry.viewport,this.types=e.types),this.map&&(this.addMarker(t),this.map.panTo(t),this.map.setZoom(this.zoom))}this.beforeFocusAddress=this.address,this.saveIntoStore()},onClick:function(e){var t=e.latLng;this.clearMarkers(),this.clearLatLng(),this.address=[t.lat(),t.lng()].join(","),this.setLatLng(t),this.map&&this.addMarker(t),this.saveIntoStore()},clearMarkers:function(){for(var e=0;e<this.markers.length;e++)this.markers[e]&&this.markers[e].setMap(null);this.markers=[]},clearLatLng:function(){this.lat=0,this.lng=0},addMarker:function(e){var t=new google.maps.Marker({position:e,map:this.map});this.markers.push(t)},setLatLng:function(e){this.lat=e.lat(),this.lng=e.lng()},toggleMap:function(){this.isMapOpen=!this.isMapOpen,this.mapMessage=this.isMapOpen?It.hide:It.show,this.map||"undefined"===typeof google||this.$nextTick((function(){this.initMap()}))},initMap:function(){var e=this.lat+this.lng,t={zoom:e?this.zoom:1,center:new google.maps.LatLng(this.lat,this.lng),mapTypeControl:!1,panControl:!1,zoomControl:!1,streetViewControl:!1},n=document.createElement("div");n.className="form__map",this.$el.querySelector(".form__mapContainer").appendChild(n),this.map=new google.maps.Map(n,t),e&&this.addMarker(new google.maps.LatLng(this.lat,this.lng)),this.map.addListener("click",this.onClick)},initGeocoder:function(){var e=this;if(this.autocompletePlace=new google.maps.places.Autocomplete(this.$el.querySelector('input[type="search"]')),google.maps.event.addListener(this.autocompletePlace,"place_changed",this.onPlaceChanged),""===this.address&&this.lat&&this.lng){var t=new google.maps.Geocoder,n={lat:this.lat,lng:this.lng};t.geocode({location:n},(function(t,n){"OK"===n?t[1]?e.address=t[1].formatted_address:console.error("Geocoding - No results found"):console.error("Geocoding - Geocoder failed due to: "+n)}))}},initGoogleApi:function(){this.initGeocoder(),this.showMap&&this.isMapOpen&&this.initMap()}},mounted:function(){var e=this;if("undefined"!==typeof google)this.initGoogleApi();else{var t="google-map-api-script",n=Nt+Rt;Object($t["a"])(t,n,"text/javascript").then((function(){e.initGoogleApi()}))}},beforeDestroy:function(){"undefined"!==typeof google&&google.maps.event.clearListeners(this.autocompletePlace,"place_changed",this.onPlaceChanged)}},Vt=Mt,Ft=(n("21ad"),Object(_["a"])(Vt,Dt,xt,!1,null,"00d48fb3",null)),Ut=Ft.exports,zt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.keepAlive?[n("div",{directives:[{name:"show",rawName:"v-show",value:e.open,expression:"open"}]},[e._t("default")],2)]:[e.open?n("div",[e._t("default")],2):e._e()]],2)},Wt=[],Kt=n("b8ce"),Ht=n.n(Kt);function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach((function(t){Yt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jt={name:"A17ConnectorField",props:{fieldName:{type:String,required:!0},requiredFieldValues:{default:""},inModal:{type:Boolean,default:!1},keepAlive:{type:Boolean,default:!1},isValueEqual:{type:Boolean,default:!0}},computed:Gt(Gt({storedValue:function(){return this.inModal?this.modalFieldValueByName(this.fieldName):this.fieldValueByName(this.fieldName)}},Object(o["b"])(["fieldValueByName","modalFieldValueByName"])),Object(o["c"])({fields:function(e){return e.form.fields},modalFields:function(e){return e.form.modalFields}})),data:function(){return{open:!1}},watch:{storedValue:function(e){this.toggleVisibility(e)}},methods:{toggleVisibility:function(e){var t=Ht()(e),n=Ht()(this.requiredFieldValues);Array.isArray(n)&&n.sort(),Array.isArray(t)&&t.sort(),this.isValueEqual?this.open=Array.isArray(n)?-1!==n.indexOf(t):Lt()(t,n):this.open=Array.isArray(n)?-1===n.indexOf(t):!Lt()(t,n)}},mounted:function(){var e=this;this.$nextTick((function(){e.toggleVisibility(this.storedValue)}))}},Zt=Jt,Xt=Object(_["a"])(Zt,zt,Wt,!1,null,null,null),Qt=Xt.exports,en=n("f389"),tn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overlay",class:e.overlayClasses},[n("div",{staticClass:"overlay__window"},[n("header",{staticClass:"overlay__header"},[e.overlayTitle?n("span",[e._v(e._s(e.overlayTitle))]):e._e(),e.$slots["overlay__header"]?n("span",{staticClass:"overlay__header-slot"},[e._t("overlay__header")],2):e._e(),n("button",{staticClass:"overlay__close",attrs:{type:"button"},on:{click:e.hide}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"close_modal"}}),n("span",{staticClass:"overlay__closeLabel"},[e._v(e._s(e.$trans("overlay.close")))])])]),e.active?n("div",{directives:[{name:"show",rawName:"v-show",value:!e.hidden,expression:"!hidden"}],staticClass:"overlay__content"},[e._t("default")],2):e._e()])])},nn=[],on=n("0a8f");function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rn(Object(n),!0).forEach((function(t){sn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cn=document.documentElement,ln=on["a"].overlay,un=on["a"].modal,dn={name:"A17Overlay",props:{title:{type:String,default:""},revisionTitle:{type:String,default:function(){return this.$trans("previewer.revision-history")}},forceClose:{type:Boolean,default:!1},forceLock:{type:Boolean,default:!1},mode:{type:String,default:""},customClasses:{type:[String,Array],default:function(){return[]}}},data:function(){return{active:!1,hidden:!0,locked:!1}},computed:an({toggleClasses:function(){var e="string"===typeof this.customClasses?[this.customClasses]:this.customClasses;return[ln].concat(e)},activeRevision:function(){return Object.keys(this.currentRevision).length},overlayTitle:function(){return this.activeRevision?this.revisionTitle:this.title},overlayClasses:function(){return{"overlay--active":this.active,"overlay--hidden":this.hidden}}},Object(o["c"])({currentRevision:function(e){return e.revision.active}})),methods:{open:function(){this.active&&!this.hidden||(this.active=!0,this.hidden=!1,this.toggleClasses.forEach((function(e){return cn.classList.add(e)})),window.addEventListener("keyup",this.keyPressed),this.$emit("open"))},mask:function(){this.toggleClasses.forEach((function(e){return cn.classList.remove(e)})),window.removeEventListener("keyup",this.keyPressed),this.$emit("close")},hide:function(){this.active&&(this.locked||(this.forceClose?this.close():(this.hidden=!0,this.mask())))},close:function(e){this.active&&(this.locked||(this.active=!1,this.mask()))},keyPressed:function(e){if(27===e.which||27===e.keyCode){if(cn.classList.contains(un))return;this.hide(),this.$emit("esc-key")}}},beforeDestroy:function(){this.$el.parentNode&&(this.active&&window.removeEventListener("keyup",this.keyPressed),this.$el.parentNode.removeChild(this.$el))}},pn=dn,fn=(n("1451"),Object(_["a"])(pn,tn,nn,!1,null,"6267b2a0",null)),bn=fn.exports,vn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-overlay",{ref:"overlay",attrs:{title:e.$trans("previewer.title")}},[e.revisions.length?n("div",{staticClass:"previewer",class:{"previewer--loading":e.loading}},[e.activeRevision?n("a17-button",{staticClass:"previewer__restore",attrs:{variant:"warning",size:"small"},on:{click:e.restoreRevision}},[e._v(e._s(e.$trans("previewer.restore")))]):e._e(),!e.activeRevision&&e.editor?n("a17-button",{staticClass:"previewer__restore",attrs:{variant:"editor",size:"small"},on:{click:e.openEditor}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],staticClass:"hide--xsmall",attrs:{symbol:"editor"}}),e._v(e._s(e.$trans("previewer.editor")))]):e._e(),n("div",{staticClass:"previewer__frame"},[n("div",{staticClass:"previewer__inner"},[n("div",{staticClass:"previewer__nav"},[n("div",{staticClass:"previewer__revisions"},[e.slipScreen?n("span",{staticClass:"tag tag--revision"},[e._v(e._s(e.$trans("previewer.past-revision")))]):e._e(),n("a17-dropdown",{ref:"previewRevisionsDropdown",attrs:{position:"bottom-left",maxWidth:400,maxHeight:300}},[n("a17-button",{staticClass:"previewer__trigger",on:{click:function(t){return e.$refs.previewRevisionsDropdown.toggle()}}},[e.activeRevision?[e._v(" "+e._s(e._f("formatDate")(e.currentRevision.datetime))+" ("+e._s(e.currentRevision.author)+") "),n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"dropdown_module"}})]:[e._v(" "+e._s(e.$trans("previewer.last-edit"))+" "),n("timeago",{attrs:{"auto-update":1,datetime:new Date(e.revisions[0].datetime)}}),e._v(" "),n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"dropdown_module"}})]],2),n("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},e._l(e.revisions,(function(t,i){return n("button",{key:t.id,staticClass:"previewerRevision",class:{"previewerRevision--active":e.currentRevision.id===t.id},attrs:{type:"button"},on:{click:function(n){return e.toggleRevision(t.id)}}},[n("span",{staticClass:"previewerRevision__author"},[e._v(e._s(t.author))]),n("span",{staticClass:"previewerRevision__datetime"},[0===i?n("span",{staticClass:"tag"},[e._v(e._s(e.$trans("previewer.current-revision")))]):e._e(),e._v(" "+e._s(e._f("formatDate")(t.datetime)))])])})),0)],1)],1),e.slipScreen?e._e():n("ul",{staticClass:"previewer__breakpoints"},e._l(e.breakpoints,(function(t){return n("li",{key:t.size,staticClass:"previewer__breakpoint",class:{"s--active":e.activeBreakpoint===t.size}},[n("a",{attrs:{href:"#"},on:{click:function(n){return n.preventDefault(),e.resizePreview(t.size)}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:t.name}})])])})),0),e.activeRevision?n("div",{staticClass:"previewer__compare"},[e.slipScreen?n("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.singleView(t)}}},[n("span",{staticClass:"previewer__compareLabel"},[e._v(e._s(e.$trans("previewer.single-view")))]),e._v(" "),n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"revision-single"}})]):n("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.compareView(t)}}},[n("span",{staticClass:"previewer__compareLabel"},[e._v(e._s(e.$trans("previewer.compare-view")))]),e._v(" "),n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"revision-compare"}})])]):e._e()]),n("div",{staticClass:"previewer__content"},[n("div",{staticClass:"previewer__iframe"},[n("a17-iframe",{attrs:{content:e.activeRevision?e.activeContent:e.currentContent,size:e.activeBreakpoint,scrollPosition:e.scrollPosition},on:{scrollDoc:e.setIframeScroll}})],1),e.slipScreen?n("div",{staticClass:"previewer__iframe"},[n("div",{staticClass:"previewer__iframeInfos"},[n("span",{staticClass:"tag tag--revision"},[e._v(e._s(e.$trans("previewer.current-revision")))]),e._v(e._s(e.$trans("previewer.unsaved")))]),n("a17-iframe",{attrs:{content:e.currentContent,scrollPosition:e.scrollPosition},on:{scrollDoc:e.setIframeScroll}})],1):e._e()])])])],1):e._e()])},mn=[],hn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("iframe",{staticClass:"previewerframe",style:{width:e.size>0?e.size+"px":""},attrs:{srcdoc:e.content,frameborder:"0"},on:{load:e.loadPreview}})},_n=[],gn={name:"A17previewerFrame",props:{size:{type:Number,default:0},content:{type:String,default:""},scrollPosition:{type:Number,default:0}},data:function(){return{currentScroll:this.scrollPosition}},watch:{scrollPosition:function(e){this.$el.contentWindow.scrollTo(0,e)}},methods:{loadPreview:function(e){for(var t=this,n=e.target,i=n.contentDocument.querySelectorAll("a:not(.sf-dump-toggle),button"),o=0;o<i.length;o++)i[o].setAttribute("disabled","disabled"),i[o].style.pointerEvents="none",i[o].onclick=function(){return!1};n.contentDocument.addEventListener("scroll",(function(e){var i=n.contentWindow.pageYOffset;i!==t.currentScroll&&(t.$emit("scrollDoc",i),t.currentScroll=i)})),this.$el.contentWindow.scrollTo(0,this.currentScroll)}}},wn=gn,yn=(n("a70b"),Object(_["a"])(wn,hn,_n,!1,null,"7b1f8f6c",null)),kn=yn.exports;function On(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Pn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?On(Object(n),!0).forEach((function(t){En(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):On(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function En(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cn={name:"A17Previewer",components:{"a17-iframe":kn},data:function(){return{loadedCurrent:!1,slipScreen:!1,activeBreakpoint:1280,lastActiveBreakpoint:1280,scrollPosition:0,breakpoints:[{size:1280,name:"preview-desktop"},{size:1024,name:"preview-tablet-h"},{size:768,name:"preview-tablet-v"},{size:320,name:"preview-mobile"}]}},filters:O["a"],computed:Pn({activeRevision:function(){return Object.keys(this.currentRevision).length}},Object(o["c"])({editor:function(e){return e.blocks.editor},loading:function(e){return e.revision.loading},currentRevision:function(e){return e.revision.active},activeContent:function(e){return e.revision.activeContent},currentContent:function(e){return e.revision.currentContent},revisions:function(e){return e.revision.all},restoreRevisionUrl:function(e){return e.form.restoreUrl}})),methods:{open:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this;function n(){t.$refs.overlay&&t.$refs.overlay.open(),t.singleView()}this.loadedCurrent=!1,this.activeBreakpoint=1280,this.lastActiveBreakpoint=1280,e?this.previewRevision(e,(function(){n()})):this.previewCurrent((function(){n()}))},close:function(){this.$refs.overlay.close()},openEditor:function(){var e=this.$root.$refs;e.preview&&e.preview.close(),e.editor&&e.editor.open()},restoreRevision:function(){window.location.href=this.restoreRevisionUrl+"?revisionId="+this.currentRevision.id},resizePreview:function(e){this.activeBreakpoint=parseInt(e),this.lastActiveBreakpoint=parseInt(e)},previewCurrent:function(e){this.$store.commit(a["n"].UPDATE_REV,0),this.loadCurrent(e)},loadCurrent:function(e){var t=this;this.loadedCurrent?e&&"function"===typeof e&&e():(this.loadedCurrent=!0,this.$store.dispatch(s["a"].GET_CURRENT).then((function(){e&&"function"===typeof e&&e()}),(function(e){t.$store.commit(a["f"].SET_FORM_ERRORS,e.response.data),t.$store.commit(a["j"].SET_NOTIF,{message:"Your submission could not be validated, please fix and retry",variant:"error"})})))},toggleRevision:function(e){if(this.activeRevision&&this.currentRevision.id===e)return this.singleView(),void this.previewCurrent();this.previewRevision(e)},previewRevision:function(e,t){var n=this;this.$store.commit(a["n"].UPDATE_REV,e),this.$store.dispatch(s["a"].GET_REVISION).then((function(){t&&"function"===typeof t&&t()}),(function(e){n.$store.commit(a["j"].SET_NOTIF,{message:"Invalid revision.",variant:"error"})}))},compareView:function(){this.activeBreakpoint=0,this.slipScreen=!0,this.activeRevision&&this.loadCurrent()},singleView:function(){this.activeBreakpoint=this.lastActiveBreakpoint,this.slipScreen=!1},setIframeScroll:function(e){this.scrollPosition=e}}},jn=Cn,Sn=(n("5110"),Object(_["a"])(jn,vn,mn,!1,null,"34ee74eb",null)),Dn=Sn.exports,xn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-overlay",{ref:"overlay",attrs:{title:e.$trans("editor.title"),customClasses:e.htmlEditorClass},on:{close:e.close},scopedSlots:e._u([e.editorNames.length>1?{key:"overlay__header",fn:function(){return[n("a17-dropdown",{ref:"editorDropdown",attrs:{position:"bottom-left",maxWidth:400,maxHeight:300}},[n("a17-button",{staticClass:"editorDropdown__trigger",on:{click:function(t){return e.$refs.editorDropdown.toggle()}}},[e._v(" "+e._s(e.currentEditorLabel)+" "),n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"dropdown_module"}})]),n("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},e._l(e.editorNames,(function(t){return n("button",{key:t.value,staticClass:"editorDropdown",attrs:{type:"button"},on:{click:function(n){return e.updateEditorName(t.value)}}},[e._v(" "+e._s(t.label)+" ")])})),0)],1)]},proxy:!0}:null],null,!0)},[n("a17-blocks-list",{attrs:{"editor-name":e.editorName},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.availableBlocks,o=t.hasBlockActive,r=t.savedBlocks,a=t.editorNames,s=(t.reorderBlocks,t.moveBlock);return[n("div",{staticClass:"editor"},[e.revisions.length?n("a17-button",{staticClass:"editor__leave",attrs:{variant:"editor",size:"small"},on:{click:e.openPreview}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],staticClass:"hide--xsmall",attrs:{symbol:"preview"}}),e._v(e._s(e.$trans("fields.block-editor.preview","Preview"))+" ")]):e._e(),n("div",{staticClass:"editor__frame"},[n("div",{staticClass:"editor__inner"},[n("div",{ref:"sidebar",staticClass:"editor__sidebar"},[n("a17-editorsidebar",{attrs:{"editor-name":e.editorName,hasBlockActive:o,editorNames:a,blocks:i},on:{"editorName:update":e.updateEditorName}},[e._v(" "+e._s(e.$trans("fields.block-editor.add-content","Add content"))+" ")])],1),n("div",{staticClass:"editor__resizer",on:{mousedown:e.resize}},[n("span")]),n("div",{staticClass:"editor__preview"},[e.editorOpen?n("a17-editorpreview",{ref:"previews",attrs:{"editor-name":e.editorName,blocks:r,hasBlockActive:o,sandbox:e.previewSandbox,bgColor:e.bgColor},on:{"blocks:move":s}}):e._e()],1)])])],1)]}}])})],1)},Bn=[],Ln=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"editorSidebar"},[[n("a17-blocks-list",{attrs:{"editor-name":e.editorName},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.allSavedBlocks;return[n("div",{staticClass:"editorSidebar__edit-list"},e._l(i,(function(t){return n("a17-blockeditor-model",{key:t.id,attrs:{block:t,"editor-name":e.editorName},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.block,r=t.isActive,a=t.blockIndex,s=t.move,c=t.remove,l=t.unEdit;return[n("div",{staticClass:"editorSidebar__edit-block"},[n("a17-sidebar-block-item",{directives:[{name:"show",rawName:"v-show",value:r,expression:"isActive"}],attrs:{block:o,blockIndex:a,blocksLength:i.length},on:{"block:move":s,"block:delete":function(t){return e.deleteBlock(c)}}}),n("div",{staticClass:"editorSidebar__actions"},[n("a17-button",{attrs:{variant:"action"},on:{click:function(t){return e.saveBlock(l,a)}}},[e._v(" "+e._s(e.$trans("editor.done"))+" ")]),n("a17-button",{attrs:{variant:"secondary"},on:{click:function(t){return e.cancelBlock(l,a)}}},[e._v(" "+e._s(e.$trans("editor.cancel"))+" ")])],1)],1)]}}],null,!0)})})),1)]}}])})],e.hasBlockActive?e._e():[n("div",{staticClass:"editorSidebar__list"},[n("a17-sidebar-block-list",{attrs:{blocks:e.blocks}})],1),n("div",{staticClass:"editorSidebar__actions"},[e.isSubmitDisabled(e.submitOptions[0])?n("a17-button",{attrs:{variant:"validate",disabled:!0}},[e._v(e._s(e.submitOptions[0].text))]):n("a17-button",{attrs:{name:e.submitOptions[0].name,variant:"validate"},on:{click:function(t){return e.saveForm(e.submitOptions[0].name)}}},[e._v(e._s(e.submitOptions[0].text))])],1)]],2)},Tn=[],An=n("3417"),$n=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"editorSidebar__item"},[n("div",{staticClass:"editorSidebar__title"},[n("div",{staticClass:"editorSidebar__blockTitle"},[n("a17-dropdown",{ref:"blockDropdown",staticClass:"f--small",attrs:{position:"bottom-left",maxHeight:270}},[n("span",{staticClass:"editorSidebar__counter f--tiny",on:{click:e.toggleBlockDropdown}},[e._v(e._s(e.blockIndex+1))]),n("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},e._l(e.blocksLength,(function(t){return n("button",{key:t,attrs:{type:"button"},on:{click:function(n){return e.moveBlock(t-1)}}},[e._v(" "+e._s(t)+" ")])})),0)]),e._v(" "+e._s(e.block.title)+" ")],1),n("span",[n("a",{staticClass:"f--small f--note f--underlined",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.deleteBlock(t)}}},[e._v(e._s(e.$trans("editor.delete")))])])]),n("div",{staticClass:"editorSidebar__body"},[n("a17-inputframe",{attrs:{label:"",name:"block."+e.block.id}}),[n(""+e.block.type,e._b({key:"`editor_${block.type}_${block.id}`",tag:"component",attrs:{name:"blocks["+e.block.id+"]"}},"component",e.setBlockAttributes(e.block.attributes),!1))]],2)])},In=[];function Nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nn(Object(n),!0).forEach((function(t){Mn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vn={name:"A17EditorSidebarBlockItem",mixins:[An["a"]],methods:{setBlockAttributes:function(e){return Rn({keepAlive:!0},e)}}},Fn=Vn,Un=(n("7138"),Object(_["a"])(Fn,$n,In,!1,null,"1275ea0e",null)),zn=Un.exports,Wn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"editorSidebar__listItems"},[n("draggable",{staticClass:"editorSidebar__blocks",class:e.editorSidebarClasses,attrs:{options:{group:{name:"editorBlocks",pull:"clone",put:!1},handle:".editorSidebar__button"}},model:{value:e.blocks,callback:function(t){e.blocks=t},expression:"blocks"}},e._l(e.blocks,(function(t){return n("div",{key:t.component,staticClass:"editorSidebar__button",attrs:{"data-title":t.title,"data-icon":t.icon,"data-component":t.component}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:e.iconSymbol(t.icon)}}),n("span",{staticClass:"editorSidebar__buttonLabel"},[e._v(e._s(t.title))])])})),0)],1)},Kn=[],Hn={name:"A17EditorSidebarBlockList",props:{blocks:{type:Array,default:function(){return[]}},inFieldset:{type:Boolean,default:!1}},mixins:[An["e"]],components:{draggable:gt.a},computed:{editorSidebarClasses:function(){return{"editorSidebar__blocks--in-fieldset":this.inFieldset}}},methods:{iconSymbol:function(e){return this.hasLgIconVariation(e)?"".concat(e,"-lg"):e},hasLgIconVariation:function(e){return Boolean(document.querySelector("#icon--".concat(e,"-lg")))}}},qn=Hn,Gn=(n("ddc0"),Object(_["a"])(qn,Wn,Kn,!1,null,"284d5f79",null)),Yn=Gn.exports,Jn=n("22d0"),Zn=n("a08c"),Xn={name:"A17editorsidebar",props:{hasBlockActive:{type:Boolean,default:!1},activeBlock:{type:Object,default:function(){}},editorName:{type:String,required:!0},editorNames:{type:Array,default:function(){return[]}}},components:{"a17-sidebar-block-item":zn,"a17-sidebar-block-list":Yn,"a17-blocks-list":Jn["default"],"a17-blockeditor-model":Zn["default"]},mixins:[An["b"]],computed:{submitOptions:function(){return this.$store.getters.getSubmitOptions}},methods:{isSubmitDisabled:function(e){return!!e.hasOwnProperty("disabled")&&!0===e.disabled},saveForm:function(e){this.$store.commit(a["m"].UPDATE_SAVE_TYPE,e),this.$root.submitForm&&this.$root.submitForm()}}},Qn=Xn,ei=(n("6eb7"),n("e431"),Object(_["a"])(Qn,Ln,Tn,!1,null,"1363e4e6",null)),ti=ei.exports,ni=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-blockeditor-model",{attrs:{"editor-name":e.editorName},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.add,o=t.edit,r=t.unEdit;return[n("div",{staticClass:"editorPreview",class:e.previewClass,style:e.previewStyle,on:{mousedown:function(t){return e._unselectBlock(r)}}},[e.blocks.length?e._e():n("div",{staticClass:"editorPreview__empty"},[n("b",[e._v(e._s(e.$trans("previewer.drag-and-drop","Drag and drop content from the left navigation")))])]),n("draggable",{ref:"previewContent",staticClass:"editorPreview__content",attrs:{value:e.blocks,options:{group:"editorBlocks",handle:e.handle}},on:{add:function(t){return e.onAdd(i,o,t)},update:e.onUpdate}},[e._l(e.blocks,(function(t){return[n("a17-blockeditor-model",{key:t.id,attrs:{block:t,"editor-name":e.editorName},scopedSlots:e._u([{key:"default",fn:function(i){var o=i.block,r=i.isActive,a=i.blockIndex,s=i.move,c=i.remove,l=i.edit,u=i.unEdit;return[n("a17-editor-block-preview",{key:t.id,ref:o.id,refInFor:!0,attrs:{block:o,blockIndex:a,blocksLength:e.blocks.length,isBlockActive:r},on:{"block:select":function(t){return e._selectBlock(l,a)},"block:unselect":function(t){return e._unselectBlock(u,a)},"block:move":s,"block:delete":function(t){return e.deleteBlock(c)},"scroll-to":e.scrollToActive}})]}}],null,!0)})]}))],2),e.loading?n("a17-spinner",{attrs:{visible:!0}},[e._v(e._s(e.$trans("fields.block-editor.loading","Loading"))+"… ")]):e._e()],1)]}}])})},ii=[],oi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"editorPreview__item",class:e.previewBlockItemClasses,on:{mousedown:function(e){e.stopPropagation()}}},[n("div",{staticClass:"editorPreview__frame"},[n("a17-editor-iframe",{ref:"blockIframe",attrs:{block:e.block},on:{loaded:e.iframeLoaded}})],1),n("div",{staticClass:"editorPreview__protector editorPreview__dragger",on:{click:function(t){return t.preventDefault(),e.handleBlockPreviewClick(t)}}}),n("div",{staticClass:"editorPreview__header"},[n("a17-buttonbar",{attrs:{variant:"visible"}},[e.blocksLength>1?n("a17-dropdown",{ref:"blockDropdown",staticClass:"f--small",attrs:{position:"bottom-left",maxHeight:270},on:{open:e.handleDropDownOpen,close:e.handleDropDownClose}},[n("button",{attrs:{type:"button"},on:{click:function(t){return e.toggleBlockDropdown(e.blockIndex)}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"drag"}})]),n("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},e._l(e.blocksLength,(function(t){return n("button",{key:t,attrs:{type:"button"},on:{click:function(n){return e.moveBlock(t-1)}}},[e._v(" "+e._s(t)+" ")])})),0)]):e._e(),n("button",{attrs:{type:"button"},on:{click:e.deleteBlock}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"trash"}})])],1)],1)])},ri=[],ai=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"editorIframe"},[""===e.preview?n("div",{staticClass:"editorIframe__empty"},[e._v(" "+e._s(e.title)+" ")]):[e.sandbox?n("iframe",{ref:"frame",attrs:{srcdoc:e.preview,sandbox:e.sandboxOptions,scrolling:"no"},on:{load:e.loadedPreview}}):n("iframe",{ref:"frame",attrs:{srcdoc:e.preview,scrolling:"no"},on:{load:e.loadedPreview}})]],2)},si=[];function ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function li(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ci(Object(n),!0).forEach((function(t){ui(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ui(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var di={name:"A17editoriframe",props:{block:{type:Object,default:function(){return{}}}},computed:li({preview:function(){return this.previewsById(this.block.id)||""},title:function(){return this.block.title||""},sandboxOptions:function(){return"boolean"===typeof this.sandbox?"allow-same-origin allow-top-navigation allow-scripts":this.sandbox.join(" ")}},Object(o["b"])(["previewsById"])),inject:["sandbox"],methods:{loadedPreview:function(){this.$refs.frame&&this.$refs.frame.srcdoc&&(this.$emit("loaded",this.$refs.frame),this.resize())},resize:function(){var e=this;if(this.$refs.frame){var t=this.$refs.frame.contentWindow.document.body;t.style.overflow="hidden";var n=window.getComputedStyle(t),i=n.getPropertyValue("margin-top"),o=n.getPropertyValue("margin-bottom"),r=t.scrollHeight+parseInt(i)+parseInt(o);window.requestAnimationFrame((function(){e.$refs.frame.height=r+"px"}))}}},mounted:function(){window.addEventListener("resize",this.resize)},beforeDestroy:function(){window.removeEventListener("resize",this.resize)}},pi=di,fi=(n("aa3e"),Object(_["a"])(pi,ai,si,!1,null,"12cea9ea",null)),bi=fi.exports,vi={name:"A17EditorPreviewBlockItem",props:{isBlockActive:{type:Boolean,default:!1}},mixins:[An["a"]],components:{"a17-editor-iframe":bi},data:function(){return{dropdownOpen:!1}},computed:{previewBlockItemClasses:function(){return{"editorPreview__item--active":this.isBlockActive,"editorPreview__item--dropdown-open":this.dropdownOpen}}},methods:{handleBlockPreviewClick:function(){this.isBlockActive?this.unselectBlock():this.selectBlock()},handleDropDownOpen:function(){this.dropdownOpen=!0},handleDropDownClose:function(){this.dropdownOpen=!1},iframeLoaded:function(){var e=this;this.isBlockActive&&this.$nextTick((function(){e.$emit("scroll-to",e.$el.offsetTop)}))}},beforeDestroy:function(){this.unselectBlock()}},mi=vi,hi=(n("5445"),Object(_["a"])(mi,oi,ri,!1,null,"a952f232",null)),_i=hi.exports,gi=n("64e5"),wi=n("66cb"),yi=n.n(wi),ki={name:"A17editorpreview",props:{bgColor:{type:String,default:"#FFFFFF"},hasBlockActive:{props:{type:Boolean,default:!1}}},mixins:[An["e"],An["b"]],components:{draggable:gt.a,"a17-editor-block-preview":_i,"a17-blockeditor-model":Zn["default"],"a17-spinner":gi["a"]},data:function(){return{loading:!1,blockSelectIndex:-1,unSubscribe:function(){return null},handle:".editorPreview__dragger"}},computed:{previewClass:function(){var e=yi()(this.bgColor);return{"editorPreview--dark":e.getBrightness()<180,"editorPreview--loading":this.loading}},previewStyle:function(){return{"background-color":this.bgColor}}},methods:{onAdd:function(e,t,n){var i=n.item,o={};o.title=i.getAttribute("data-title"),o.component=i.getAttribute("data-component"),o.icon=i.getAttribute("data-icon");var r=Math.max(0,n.newIndex);this.addAndEditBlock(e,t,{block:o,index:r}),this._selectBlock(null,r)},onUpdate:function(e){var t=e.oldIndex,n=e.newIndex;this.$emit("blocks:move",{oldIndex:t,newIndex:n})},_selectBlock:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;t&&this.selectBlock(t,n),this.blockSelectIndex!==n&&(this.blockSelectIndex=n,this.unSubscribe=this.$store.subscribe((function(t){a["l"].REFRESH_BLOCK_PREVIEW.includes(t.type)&&(a["l"].REFRESH_BLOCK_PREVIEW_ALL.includes(t.type)?e.getAllPreviews():e.getPreview(n))})))},_unselectBlock:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.blockSelectIndex;this.getPreview(t),this.unselectBlock(e,t),this.blockSelectIndex=-1,this.unSubscribe()},getAllPreviews:function(){var e=this;this.loading=!0,this.$store.dispatch(s["a"].GET_ALL_PREVIEWS,{editorName:this.editorName}).then((function(){e.$nextTick((function(){e.loading=!1}))}))},getPreview:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this.loading=!0,this.$store.dispatch(s["a"].GET_PREVIEW,{editorName:this.editorName,index:t}).then((function(){e.$nextTick((function(){e.loading=!1}))}))},scrollToActive:function(e){this.$refs.previewContent.$el.scrollTop=Math.max(0,e-20)},resizeAllIframes:function(){this.$refs.blockPreview&&this.$refs.blockPreview.forEach((function(e){e.$refs.blockIframe.resize()}))},_resize:b()((function(){this.resizeAllIframes()}),200),init:function(){window.addEventListener("resize",this._resize)},dispose:function(){window.removeEventListener("resize",this._resize)}},mounted:function(){var e=this;this.init(),this.$nextTick((function(){e.getAllPreviews()}))},beforeDestroy:function(){this.dispose()},watch:{editorName:function(){this.unSubscribe(),this.getAllPreviews()},hasBlockActive:function(e){e||(this.unSubscribe(),this.blockSelectIndex=-1)}}},Oi=ki,Pi=(n("69a6"),Object(_["a"])(Oi,ni,ii,!1,null,"794fa49d",null)),Ei=Pi.exports;function Ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ji(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ci(Object(n),!0).forEach((function(t){Si(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ci(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Si(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Di,xi={name:"A17Editor",components:{"a17-editorsidebar":ti,"a17-editorpreview":Ei,"a17-blocks-list":Jn["default"]},props:{bgColor:{type:String,default:"#FFFFFF"},previewSandbox:{type:[Boolean,Array],default:!0}},data:function(){return{editorName:null,editorOpen:!1,htmlEditorClass:on["a"].editor}},computed:ji(ji({currentEditorLabel:function(){var e=this,t=this.editorNames&&this.editorNames.find((function(t){return t.value===e.editorName}));return t&&t.label}},Object(o["c"])({revisions:function(e){return e.revision.all},editorNames:function(e){return e.blocks.editorNames}})),Object(o["b"])(["blocks"])),provide:function(){return{sandbox:this.previewSandbox}},methods:{initEditorName:function(){if(!this.editorName){var e=this.editorNames[0]&&this.editorNames[0].value;this.updateEditorName(e)}},updateEditorName:function(e){this.editorName!==e&&(this.editorName=e)},open:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&this.updateEditorName(t),this.editorOpen=!0,this.$refs.overlay.open()},close:function(){this.editorOpen=!1},resize:function(){window.addEventListener("mousemove",this.resizeSidebar,!1),window.addEventListener("mouseup",this.stopResizeSidebar,!1)},resizeSidebar:function(e){var t=this.$refs.sidebar,n=window.innerWidth;t&&(t.style.width=(e.clientX-t.offsetLeft)/n*100+"%")},stopResizeSidebar:function(){window.removeEventListener("mousemove",this.resizeSidebar,!1),window.removeEventListener("mouseup",this.stopResizeSidebar,!1),this.$refs.previews.resizeAllIframes()},openPreview:function(){this.$root.$refs.preview&&this.$root.$refs.preview.open()}},created:function(){this.initEditorName()}},Bi=xi,Li=(n("99b4"),Object(_["a"])(Bi,xn,Bn,!1,null,"d485b306",null)),Ti=Li.exports,Ai=n("2e01"),$i=n("54d3"),Ii=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-modal",{ref:"modal",staticClass:"modal--form",attrs:{title:e.modalTitle,forceClose:!0}},[n("form",{attrs:{action:e.formCreate},on:{submit:function(t){return t.preventDefault(),e.submit(t)}}},[e._t("default"),n("a17-modal-validation",{attrs:{"is-disable":!0}})],2)])},Ni=[],Ri=n("94af"),Mi={name:"A17ModalAdd",mixins:[Ri["a"]],props:{name:{type:String,default:""},modalTitle:{type:String,default:"Add new"},formCreate:{type:String,default:"#"}},components:{"a17-modal-validation":E["a"]},methods:{open:function(){this.$refs.modal&&this.$refs.modal.open()},submit:function(){if(this.isSubmitPrevented)this.shouldRetrySubmitWhenAllowed=!0;else if(!this._isSubmitting){this._isSubmitting=!0;var e=this;this.$store.commit(a["f"].UPDATE_FORM_LOADING,!0);var t=document.activeElement.name;this.$nextTick((function(){this.$store.dispatch(s["a"].CREATE_FORM_IN_MODAL,{name:this.name,endpoint:this.formCreate,method:"post"}).then((function(){e.$refs.modal&&e.$refs.modal.close(),e.$nextTick((function(){e.$store.commit(a["j"].SET_NOTIF,{message:"Your content has been added",variant:"success"}),"create-another"===t&&e.$refs.modal&&e.$refs.modal.open()}))}),(function(t){e.$store.commit(a["j"].SET_NOTIF,{message:"Your content can not be added, please retry",variant:"error"})}))}))}}}},Vi=Mi,Fi=Object(_["a"])(Vi,Ii,Ni,!1,null,null,null),Ui=Fi.exports,zi=n("ce72");function Wi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ki,Hi,qi={withPublicationToggle:window["TWILL"].STORE.publication.withPublicationToggle||!1,published:window["TWILL"].STORE.publication.published||!1,publishSubmit:window["TWILL"].STORE.publication.published||!window["TWILL"].STORE.publication.withPublicationToggle?"update":"live",publishedLabel:window["TWILL"].STORE.publication.publishedLabel||"Live",draftLabel:window["TWILL"].STORE.publication.draftLabel||"Draft",withPublicationTimeframe:window["TWILL"].STORE.publication.withPublicationTimeframe||!1,startDate:window["TWILL"].STORE.publication.startDate||null,endDate:window["TWILL"].STORE.publication.endDate||null,visibility:window["TWILL"].STORE.publication.visibility||!1,reviewProcess:window["TWILL"].STORE.publication.reviewProcess||[],createWithoutModal:window["TWILL"].STORE.publication.createWithoutModal||!1,saveType:void 0,visibilityOptions:[{value:"public",label:"Public"},{value:"private",label:"Private"}],submitDisableMessage:window["TWILL"].STORE.publication.submitDisableMessage||"",submitOptions:window["TWILL"].STORE.publication.submitOptions||{draft:[{name:"save",text:window.$trans("publisher.save","Save as draft"),disabled:!1},{name:"save-close",text:window.$trans("publisher.save-close","Save as draft and close"),disabled:!1},{name:"save-new",text:window.$trans("publisher.save-new","Save as draft and create new"),disabled:!1},{name:"cancel",text:window.$trans("publisher.cancel","Cancel"),disabled:!1}],live:[{name:"publish",text:window.$trans("publisher.publish","Publish"),disabled:!1},{name:"publish-close",text:window.$trans("publisher.publish-close","Publish and close"),disabled:!1},{name:"publish-new",text:window.$trans("publisher.publish-new","Publish and create new"),disabled:!1},{name:"cancel",text:window.$trans("publisher.cancel","Cancel"),disabled:!1}],update:[{name:"update",text:window.$trans("publisher.update","Update"),disabled:!1},{name:"update-close",text:window.$trans("publisher.update-close","Update and close"),disabled:!1},{name:"update-new",text:window.$trans("publisher.update-new","Update and create new"),disabled:!1},{name:"cancel",text:window.$trans("publisher.cancel","Cancel"),disabled:!1}]}},Gi={reviewProcessComplete:function(e){return e.reviewProcess.filter((function(e){return e.checked}))},getSubmitOptions:function(e){return e.createWithoutModal?e.submitOptions.draft:e.published||!e.withPublicationToggle?e.submitOptions[e.publishSubmit]:e.submitOptions.draft},isEnabledSubmitOption:function(e,t){return function(e){var n=!0,i={},o=t.getSubmitOptions.filter((function(t){return t.name===e}));return o.length&&(i=o[0]),i.hasOwnProperty("disabled")&&(n=!i.disabled),n}},getSaveType:function(e,t){return e.saveType||t.getSubmitOptions[0].name}},Yi=(Di={},Wi(Di,a["m"].UPDATE_PUBLISH_START_DATE,(function(e,t){e.startDate=t})),Wi(Di,a["m"].UPDATE_PUBLISH_END_DATE,(function(e,t){e.endDate=t})),Wi(Di,a["m"].UPDATE_PUBLISH_STATE,(function(e,t){e.published=t})),Wi(Di,a["m"].UPDATE_PUBLISH_SUBMIT,(function(e){e.publishSubmit=e.published||!e.withPublicationToggle?"update":"live"})),Wi(Di,a["m"].UPDATE_PUBLISH_VISIBILITY,(function(e,t){e.visibility=t})),Wi(Di,a["m"].UPDATE_REVIEW_PROCESS,(function(e,t){var n="",i=-1;t.length&&(n=t[t.length-1],e.reviewProcess.forEach((function(e,t){e.value===n&&(i=t)}))),e.reviewProcess.forEach((function(e,t){e.checked=t<=i,e.disabled=!(t===i||t===i+1)}))})),Wi(Di,a["m"].UPDATE_SAVE_TYPE,(function(e,t){e.saveType=t})),Di),Ji={state:qi,getters:Gi,mutations:Yi},Zi=n("a34a"),Xi=n.n(Zi),Qi=n("bc3a"),eo=n.n(Qi),to=n("727d"),no={getBlockPreview:function(e,t,n,i){eo.a.post(e,t).then((function(e){n&&"function"===typeof n&&n(e.data)}),(function(e){var t={message:"Block preview request error.",value:e};Object(to["a"])("CONTENT",t),i&&"function"===typeof i&&i(e)}))}},io=n("9170");function oo(e,t,n,i,o,r,a){try{var s=e[r](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(i,o)}function ro(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var r=e.apply(t,n);function a(e){oo(r,i,o,a,s,"next",e)}function s(e){oo(r,i,o,a,s,"throw",e)}a(void 0)}))}}function ao(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function so(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ao(Object(n),!0).forEach((function(t){co(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ao(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function co(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lo,uo,po={loading:!1,editor:window["TWILL"].STORE.form.editor||!1,editorNames:window["TWILL"].STORE.form.editorNames||[],available:window["TWILL"].STORE.form.availableBlocks||{},blocks:window["TWILL"].STORE.form.blocks||{},previews:window["TWILL"].STORE.form.previews||{},active:{}},fo={previewsById:function(e){return function(t){return e.previews[t]?e.previews[t]:""}},blocks:function(e){return function(t){return e.blocks[t]||[]}},availableBlocks:function(e){return function(t){return e.available[t]||[]}},blockIndex:function(e,t){return function(e,n){return t.blocks(n).findIndex((function(t){return t.id===e.id}))}}},bo=function(){return Date.now()},vo=(Ki={},co(Ki,a["b"].ADD_BLOCK,(function(e,t){var n=t.block,o=t.index,r=t.editorName,a=e.blocks[r]||[],s=so(so({},n),{},{id:bo(),name:r});o>-1?a.splice(o,0,s):a.push(s),i["a"].set(e.blocks,r,a)})),co(Ki,a["b"].MOVE_BLOCK,(function(e,t){var n=t.editorName,o=t.newIndex,r=t.oldIndex,a=e.blocks[n]||[];if(o>=a.length){var s=o-a.length;while(1+s--)a.push(void 0)}a.splice(o,0,a.splice(r,1)[0]),i["a"].set(e.blocks,n,a)})),co(Ki,a["b"].DELETE_BLOCK,(function(e,t){var n=t.editorName,o=t.index,r=e.blocks[n][o].id,a=e.blocks[n]||[];r&&i["a"].delete(e.previews,r),a.splice(o,1),i["a"].set(e.blocks,n,a)})),co(Ki,a["b"].DUPLICATE_BLOCK,(function(e,t){var n=t.editorName,o=t.index,r=t.block,a=t.id,s=e.blocks[n]||[];s.splice(o,0,so(so({},r),{},{id:a,name:n})),i["a"].set(e.blocks,n,s)})),co(Ki,a["b"].REORDER_BLOCKS,(function(e,t){var n=t.editorName,o=t.value;i["a"].set(e.blocks,n,o)})),co(Ki,a["b"].ACTIVATE_BLOCK,(function(e,t){var n=t.editorName,i=t.index;e.blocks[n]&&e.blocks[n][i]?e.active=so({},e.blocks[n][i]):e.active={}})),co(Ki,a["b"].ADD_BLOCK_PREVIEW,(function(e,t){i["a"].set(e.previews,t.id,t.html)})),co(Ki,a["b"].UPDATE_PREVIEW_LOADING,(function(e,t){e.loading=!e.loading})),Ki),mo=function(e,t,n,i){if(e&&e.hasOwnProperty("id")){var o=Object(io["a"])(e,n);n.language.all.length>1&&(o.activeLanguage=n.language.active.value),Object(io["e"])(o)?(t(a["b"].ADD_BLOCK_PREVIEW,{id:e.id,html:""}),i&&"function"===typeof i&&i()):no.getBlockPreview(n.form.blockPreviewUrl,o,(function(n){t(a["b"].ADD_BLOCK_PREVIEW,{id:e.id,html:n}),i&&"function"===typeof i&&i()}),(function(e){}))}},ho=(Hi={},co(Hi,s["a"].GET_PREVIEW,(function(e,t){var n=e.commit,i=e.state,o=e.rootState,r=t.editorName,a=t.index,s=void 0===a?-1:a,c=i.blocks[r]&&s>=0?so({},i.blocks[r][s]):{};i.active&&i.active.hasOwnProperty("id")&&-1===s&&(c=so({},i.active)),mo(c,n,o)})),co(Hi,s["a"].GET_ALL_PREVIEWS,(function(e,t){var n=e.commit,i=e.state,o=e.rootState,r=t.editorName;if(i.blocks[r]&&i.blocks[r].length>0&&!i.loading){n(a["b"].UPDATE_PREVIEW_LOADING,!0);var s=0,c=i.blocks[r].length;Object.values(i.blocks[r]).forEach((function(e){mo(e,n,o,(function(){s++,s===c&&n(a["b"].UPDATE_PREVIEW_LOADING,!0)}))}))}})),co(Hi,s["a"].DUPLICATE_BLOCK,(function(e,t){return ro(Xi.a.mark((function n(){var i,o,r,s,c;return Xi.a.wrap((function(n){while(1)switch(n.prev=n.next){case 0:i=e.commit,e.state,e.rootState,o=t.editorName,r=t.futureIndex,s=t.block,c=t.id,i(a["b"].DUPLICATE_BLOCK,{editorName:o,index:r,block:s,id:c});case 3:case"end":return n.stop()}}),n)})))()})),co(Hi,s["a"].MOVE_BLOCK_TO_EDITOR,(function(e,t){return ro(Xi.a.mark((function n(){var i,o,r,c,l,u,d;return Xi.a.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=e.commit,o=e.dispatch,r=t.editorName,c=t.index,l=t.block,u=t.futureIndex,d=t.id,n.next=4,o(s["a"].DUPLICATE_BLOCK,{editorName:r,futureIndex:u,block:l,id:d});case 4:i(a["b"].DELETE_BLOCK,{editorName:l.name,index:c});case 5:case"end":return n.stop()}}),n)})))()})),Hi),_o={state:po,getters:fo,mutations:vo,actions:ho},go=n("c5ec"),wo={getRevisionContent:function(e,t,n,i){eo.a.put(e,t).then((function(e){n&&"function"===typeof n&&n(e.data)}),(function(e){var t={message:"Preview request error.",value:e};Object(to["a"])("REVISION",t),i&&"function"===typeof i&&i(e)}))}};function yo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ko,Oo={loading:!1,active:{},activeContent:"",currentContent:"",all:window["TWILL"].STORE.revisions||[]},Po={},Eo=(lo={},yo(lo,a["n"].LOADING_REV,(function(e){e.loading=!0})),yo(lo,a["n"].UPDATE_REV,(function(e,t){function n(e){return e.id===t}var i=e.all.findIndex(n);e.active=-1!==i?e.all[i]:{}})),yo(lo,a["n"].UPDATE_REV_CONTENT,(function(e,t){e.loading=!1,e.activeContent=t})),yo(lo,a["n"].UPDATE_REV_CURRENT_CONTENT,(function(e,t){e.loading=!1,e.currentContent=t})),yo(lo,a["n"].UPDATE_REV_ALL,(function(e,t){e.all=t})),lo),Co=(uo={},yo(uo,s["a"].GET_CURRENT,(function(e){var t=e.commit,n=e.rootState;return new Promise((function(e,i){t(a["n"].LOADING_REV);var o=Object(io["b"])(n);n.language.all.length>1&&(o.activeLanguage=n.language.active.value),wo.getRevisionContent(n.form.previewUrl,o,(function(n){t(a["n"].UPDATE_REV_CURRENT_CONTENT,n),e()}),(function(e){i(e)}))}))})),yo(uo,s["a"].GET_REVISION,(function(e){var t=e.commit,n=e.state,i=e.rootState;return new Promise((function(e,o){t(a["n"].LOADING_REV);var r=0;r=0===Object.keys(n.active).length?n.all[0].id:n.active.id;var s={revisionId:r};i.language.all.length>1&&(s.activeLanguage=i.language.active.value),wo.getRevisionContent(i.form.previewUrl,s,(function(n){t(a["n"].UPDATE_REV_CONTENT,n),e()}),(function(e){o(e)}))}))})),uo),jo={state:Oo,getters:Po,actions:Co,mutations:Eo},So=n("38c2");function Do(e){return To(e)||Lo(e)||Bo(e)||xo()}function xo(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Bo(e,t){if(e){if("string"===typeof e)return Ao(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ao(e,t):void 0}}function Lo(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function To(e){if(Array.isArray(e))return Ao(e)}function Ao(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function $o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Io(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$o(Object(n),!0).forEach((function(t){Mo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function No(e,t,n,i,o,r,a){try{var s=e[r](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(i,o)}function Ro(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var r=e.apply(t,n);function a(e){No(r,i,o,a,s,"next",e)}function s(e){No(r,i,o,a,s,"throw",e)}a(void 0)}))}}function Mo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vo={repeaters:window["TWILL"].STORE.form.repeaters||{},availableRepeaters:window["TWILL"].STORE.form.availableRepeaters||{}},Fo={repeatersByBlockId:function(e){return function(t){var n=Object.keys(e.repeaters).filter((function(e){return e.startsWith("blocks-".concat(t))})),i={};return n.forEach((function(t){return i[t]=e.repeaters[t]})),i}}};function Uo(){return Date.now()}var zo=(ko={},Mo(ko,a["f"].ADD_FORM_BLOCK,(function(e,t){var n=t.name,i=t.type,o={},r=e.availableRepeaters[i],a=!e.repeaters[n];if(r)if(o.id=Uo(),o.type=r.component,o.title=r.title,a){var s={};s[n]=[],s[n].push(o),e.repeaters=Object.assign({},e.repeaters,s)}else e.repeaters[n].push(o)})),Mo(ko,a["f"].DELETE_FORM_BLOCK,(function(e,t){e.repeaters[t.name].splice(t.index,1)})),Mo(ko,a["f"].DUPLICATE_FORM_BLOCK,(function(e,t){var n=Object.assign({},e.repeaters[t.name][t.index]);n.id=Uo(),e.repeaters[t.name].splice(t.index+1,0,n)})),Mo(ko,a["f"].REORDER_FORM_BLOCKS,(function(e,t){var n={};n[t.name]=t.blocks,e.repeaters=Object.assign({},e.repeaters,n)})),Mo(ko,a["f"].ADD_REPEATERS,(function(e,t){var n=t.repeaters;e.repeaters=Object.assign({},e.repeaters,n)})),ko),Wo=Mo({},s["a"].DUPLICATE_BLOCK,(function(e,t){return Ro(Xi.a.mark((function n(){var i,o,r,s,c,l,u,d;return Xi.a.wrap((function(n){while(1)switch(n.prev=n.next){case 0:i=e.commit,o=e.getters,r=t.block,s=t.id,c=Io({},o.repeatersByBlockId(r.id)),l=Object.keys(c),u={},l.forEach((function(e){return u[e.replace(r.id,s)]=Do(c[e])})),d=[],Object.keys(u).forEach((function(e){u[e].forEach((function(t,n){var i=Date.now(),r=Do(o.fieldsByBlockId(t.id));u[e][n]=Io(Io({},u[e][n]),{},{id:i}),r.forEach((function(e){d.push({name:e.name.replace(t.id,i),value:e.value})}))}))})),i(a["f"].ADD_REPEATERS,{repeaters:u}),i(a["f"].ADD_FORM_FIELDS,d);case 10:case"end":return n.stop()}}),n)})))()})),Ko={state:Vo,getters:Fo,mutations:zo,actions:Wo};function Ho(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qo={active:window["TWILL"].STORE.parentId||0,all:window["TWILL"].STORE.parents||[]},Go={},Yo=Ho({},a["k"].UPDATE_PARENT,(function(e,t){e.active=t||0})),Jo={state:qo,getters:Go,mutations:Yo},Zo=n("f451"),Xo=n("4868"),Qo=n("159c"),er=n("f0f8");function tr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function nr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tr(Object(n),!0).forEach((function(t){ir(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ir(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}i["a"].use(Ai["a"]),i["a"].use($i["a"]),r["a"].registerModule("form",zi["a"]),r["a"].registerModule("publication",Ji),r["a"].registerModule("blocks",_o),r["a"].registerModule("language",go["a"]),r["a"].registerModule("revision",jo),r["a"].registerModule("browser",So["a"]),r["a"].registerModule("repeaters",Ko),r["a"].registerModule("parents",Jo),r["a"].registerModule("attributes",Zo["a"]),i["a"].component("a17-fieldset",I["a"]),i["a"].component("a17-publisher",rt),i["a"].component("a17-title-editor",A),i["a"].component("a17-blocks",vt["default"]),i["a"].component("a17-page-nav",bt),i["a"].component("a17-langswitcher",$["a"]),i["a"].component("a17-sticky-nav",w),i["a"].component("a17-spinner",gi["a"]),i["a"].component("a17-repeater",St),i["a"].component("a17-browser",en["a"]),i["a"].component("a17-connectorfield",Qt),i["a"].component("a17-locationfield",Ut),i["a"].component("a17-overlay",bn),i["a"].component("a17-previewer",Dn),i["a"].component("a17-editor",Ti),i["a"].component("a17-modal-add",Ui);var or=function(e,t){return!i["a"].options.components[e]&&i["a"].component(e,t)};"undefined"!==typeof window["TWILL"].TWILL_BLOCKS_COMPONENTS&&window["TWILL"].TWILL_BLOCKS_COMPONENTS.map((function(e){return or(e,{template:"#"+e,mixins:[er["a"]]})}));var rr=function(e){return"a17-".concat(e.match(/\w+/)[0].replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase())},ar=n("9488");ar.keys().map((function(e){var t=rr(e.replace(/customs\//,""));return or(t,ar(e).default)}));var sr=n("bef0");sr.keys().map((function(e){var t=rr(e);return or(t,sr(e).default)}));var cr=n("1591");cr.keys().map((function(e){var t=rr(e);return i["a"].component(t,cr(e).default)})),window["TWILL"].vm=window.vm=new i["a"]({store:r["a"],el:"#app",mixins:[Xo["a"],Qo["a"],Ri["a"]],data:function(){return{unSubscribe:function(){return null},isFormUpdated:!1}},computed:nr(nr({},Object(o["c"])({loading:function(e){return e.form.loading},editor:function(e){return e.blocks.editor},isCustom:function(e){return e.form.isCustom}})),Object(o["b"])(["getSaveType","isEnabledSubmitOption"])),methods:{submitForm:function(){var e=this;this.isSubmitPrevented?this.shouldRetrySubmitWhenAllowed=!0:this.loading||(this.isFormUpdated=!1,this.$store.commit(a["f"].UPDATE_FORM_LOADING,!0),this.unSubscribe(),this.$nextTick((function(){var t=e.getSaveType||document.activeElement.name;e.isEnabledSubmitOption(t)?e.$store.dispatch(s["a"].SAVE_FORM,t).then((function(){e.mutationsSubscribe()})):(e.$store.commit(a["f"].UPDATE_FORM_LOADING,!1),e.mutationsSubscribe())})))},confirmExit:function(e){if(this.isFormUpdated&&!this.isCustom)return"message";void 0!==window.event?window.event.cancelBubble=!0:e.cancelBubble=!0},mutationsSubscribe:function(){var e=this;this.unSubscribe=this.$store.subscribe((function(t,n){c["a"].includes(t.type)&&(e.isFormUpdated=!0,e.unSubscribe())}))}},mounted:function(){var e=this;this.$nextTick((function(){window.onbeforeunload=e.confirmExit,e.mutationsSubscribe()}))},beforeDestroy:function(){this.unSubscribe()},created:function(){Object(u["a"])()}}),document.addEventListener("DOMContentLoaded",l["a"])},faa7:function(e,t,n){},fb16:function(e,t,n){},ffdb:function(e,t,n){"use strict";n("2741")}});