This repository has been archived by the owner on Jul 5, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 51
/
index.js
executable file
·1 lines (1 loc) · 83.4 KB
/
index.js
1
(function () {function m(a){return a&&a.__esModule?{d:a.default}:{d:a}}function k(e){return(k="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})(e)}function b(e,t){return p(e)||o(e,t)||n()}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function o(e,t){var i=[],r=!0,a=!1,n=void 0;try{for(var l,o=e[Symbol.iterator]();!(r=(l=o.next()).done)&&(i.push(l.value),!t||i.length!==t);r=!0);}catch(s){a=!0,n=s}finally{try{r||null==o.return||o.return()}finally{if(a)throw n}}return i}function p(e){if(Array.isArray(e))return e}var c={data:function(){return{previewFrameWindow:{},previewFrameDocument:{},previewHeight:0}},props:{markup:{type:String},styles:{type:String},script:{type:String},cssContent:{type:String},index:{type:Number}},mounted:function(){this.$root.$on("blockMoved",this.updateFrameIfEmpty),this.previewFrameWindow=this.$refs.previewFrame.contentWindow,this.previewFrameDocument=this.previewFrameWindow.document,this.updateContent();var e=document.createElement("script");if(e.type="text/javascript",e.innerHTML="\n sendResizeEvent = function () {\n if (window.frameElement) {\n window.frameElement.dispatchEvent(new CustomEvent('sizechange', { detail: { height: document.documentElement.offsetHeight } }))\n }\n }\n sendResizedEvent = function () {\n console.log('on resize')\n }\n ",this.previewFrameDocument.getElementsByTagName("body")[0].appendChild(e),this.updateContent(),this.script){var t=document.createElement("script");t.type="text/javascript",t.innerHTML=this.script,this.previewFrameDocument.getElementsByTagName("body")[0].appendChild(t)}},methods:{updateContent:function(){var e=this;this.$nextTick().then(function(){e.$refs.previewFrame&&(e.previewFrameWindow=e.$refs.previewFrame.contentWindow,e.previewFrameDocument=e.previewFrameWindow.document,e.previewFrameDocument.open(),e.previewFrameDocument.write(e.$refs.previewFrameContent.innerHTML),e.previewFrameDocument.close(),e.resize())})},updateFrameIfEmpty:function(){var e=this;this.$nextTick().then(function(){e.$refs.previewFrame&&null===e.$refs.previewFrame.contentWindow.document.getElementById("kirby-builder-content")&&e.updateContent()})},onResize:function(e){this.resize()},resize:function(){if(this.previewFrameDocument.getElementById){var e=this.previewFrameDocument.getElementById("kirby-builder-body").scrollHeight;e>0&&(this.previewHeight=e)}},onFrameLoad:function(){this.resize()}},watch:{markup:function(e){this.updateContent()},styles:function(e){this.updateContent()},index:function(e){this.updateFrameIfEmpty()}}};if(typeof c==="function"){c=c.options}Object.assign(c,function(){var render=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"kBuilderPreview"},[_c("iframe",{ref:"previewFrame",staticClass:"kBuilderPreview__frame",style:{height:_vm.previewHeight+"px"},on:{"load":_vm.onFrameLoad,"sizechange":_vm.onResize}}),_vm._v(" "),_c("script",{ref:"previewFrameContent",attrs:{"type":"text/template"}},[_vm._v("\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n <title>Kirby Builder Preview</title>\n <style>\n html,body{margin: 0;padding: 0;}\n "+_vm._s(_vm.styles)+"\n </style>\n </head>\n <body id=\"kirby-builder-body\">\n <div id=\"kirby-builder-content\">\n "+_vm._s(_vm.markup)+"\n </div>\n </body>\n </html>\n ")])])};var staticRenderFns=[];return{render:render,staticRenderFns:staticRenderFns,_compiled:true,_scopeId:"data-v-e13338",functional:undefined}}());var g,a={},r=arguments[0];!function(e,t){"object"==typeof a&&a&&"string"!=typeof a.nodeName?t(a):"function"==typeof g&&g.amd?g(["exports"],t):(e.Mustache={},t(e.Mustache))}(a,function(e){var t=Object.prototype.toString,r=Array.isArray||function(e){return"[object Array]"===t.call(e)};function n(e){return"function"==typeof e}function o(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function i(e,t){return null!=e&&"object"==typeof e&&t in e}var s=RegExp.prototype.test;var a=/\S/;function u(e){return!function(e,t){return s.call(e,t)}(a,e)}var p={"&":"&","<":"<",">":">","\"":""","'":"'","/":"/","`":"`","=":"="};var c=/\s*/,l=/\s+/,h=/\s*=/,f=/\s*\}/,g=/#|\^|\/|>|\{|&|=|!/;function v(e){this.string=e,this.tail=e,this.pos=0}function d(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function w(){this.cache={}}v.prototype.eos=function(){return""===this.tail},v.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var r=t[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r},v.prototype.scanUntil=function(e){var t,r=this.tail.search(e);switch(r){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,r),this.tail=this.tail.substring(r);}return this.pos+=t.length,t},d.prototype.push=function(e){return new d(e,this)},d.prototype.lookup=function(e){var t,r,o,s=this.cache;if(s.hasOwnProperty(e))t=s[e];else{for(var a,u,p,c=this,l=!1;c;){if(e.indexOf(".")>0)for(a=c.view,u=e.split("."),p=0;null!=a&&p<u.length;)p===u.length-1&&(l=i(a,u[p])||(r=a,o=u[p],null!=r&&"object"!=typeof r&&r.hasOwnProperty&&r.hasOwnProperty(o))),a=a[u[p++]];else a=c.view[e],l=i(c.view,e);if(l){t=a;break}c=c.parent}s[e]=t}return n(t)&&(t=t.call(this.view)),t},w.prototype.clearCache=function(){this.cache={}},w.prototype.parse=function(t,n){var i=this.cache,s=t+":"+(n||e.tags).join(":"),a=i[s];return null==a&&(a=i[s]=function(t,n){if(!t)return[];var i,s,a,p=[],d=[],w=[],y=!1,$=!1;function U(){if(y&&!$)for(;w.length;)delete d[w.pop()];else w=[];y=!1,$=!1}function x(e){if("string"==typeof e&&(e=e.split(l,2)),!r(e)||2!==e.length)throw new Error("Invalid tags: "+e);i=new RegExp(o(e[0])+"\\s*"),s=new RegExp("\\s*"+o(e[1])),a=new RegExp("\\s*"+o("}"+e[1]))}x(n||e.tags);for(var b,k,m,E,Z,T,j=new v(t);!j.eos();){if(b=j.pos,m=j.scanUntil(i))for(var S=0,V=m.length;S<V;++S)u(E=m.charAt(S))?w.push(d.length):$=!0,d.push(["text",E,b,b+1]),b+=1,"\n"===E&&U();if(!j.scan(i))break;if(y=!0,k=j.scan(g)||"name",j.scan(c),"="===k?(m=j.scanUntil(h),j.scan(h),j.scanUntil(s)):"{"===k?(m=j.scanUntil(a),j.scan(f),j.scanUntil(s),k="&"):m=j.scanUntil(s),!j.scan(s))throw new Error("Unclosed tag at "+j.pos);if(Z=[k,m,b,j.pos],d.push(Z),"#"===k||"^"===k)p.push(Z);else if("/"===k){if(!(T=p.pop()))throw new Error("Unopened section \""+m+"\" at "+b);if(T[1]!==m)throw new Error("Unclosed section \""+T[1]+"\" at "+b)}else"name"===k||"{"===k||"&"===k?$=!0:"="===k&&x(m)}if(T=p.pop())throw new Error("Unclosed section \""+T[1]+"\" at "+j.pos);return function(e){for(var t,r=[],n=r,o=[],i=0,s=e.length;i<s;++i)switch((t=e[i])[0]){case"#":case"^":n.push(t),o.push(t),n=t[4]=[];break;case"/":o.pop()[5]=t[2],n=o.length>0?o[o.length-1][4]:r;break;default:n.push(t);}return r}(function(e){for(var t,r,n=[],o=0,i=e.length;o<i;++o)(t=e[o])&&("text"===t[0]&&r&&"text"===r[0]?(r[1]+=t[1],r[3]=t[3]):(n.push(t),r=t));return n}(d))}(t,n)),a},w.prototype.render=function(e,t,r,n){var o=this.parse(e,n),i=t instanceof d?t:new d(t);return this.renderTokens(o,i,r,e,n)},w.prototype.renderTokens=function(e,t,r,n,o){for(var i,s,a,u="",p=0,c=e.length;p<c;++p)a=void 0,"#"===(s=(i=e[p])[0])?a=this.renderSection(i,t,r,n):"^"===s?a=this.renderInverted(i,t,r,n):">"===s?a=this.renderPartial(i,t,r,o):"&"===s?a=this.unescapedValue(i,t):"name"===s?a=this.escapedValue(i,t):"text"===s&&(a=this.rawValue(i)),void 0!==a&&(u+=a);return u},w.prototype.renderSection=function(e,t,o,i){var s=this,a="",u=t.lookup(e[1]);if(u){if(r(u))for(var p=0,c=u.length;p<c;++p)a+=this.renderTokens(e[4],t.push(u[p]),o,i);else if("object"==typeof u||"string"==typeof u||"number"==typeof u)a+=this.renderTokens(e[4],t.push(u),o,i);else if(n(u)){if("string"!=typeof i)throw new Error("Cannot use higher-order sections without the original template");null!=(u=u.call(t.view,i.slice(e[3],e[5]),function(e){return s.render(e,t,o)}))&&(a+=u)}else a+=this.renderTokens(e[4],t,o,i);return a}},w.prototype.renderInverted=function(e,t,n,o){var i=t.lookup(e[1]);if(!i||r(i)&&0===i.length)return this.renderTokens(e[4],t,n,o)},w.prototype.renderPartial=function(e,t,r,o){if(r){var i=n(r)?r(e[1]):r[e[1]];return null!=i?this.renderTokens(this.parse(i,o),t,r,i):void 0}},w.prototype.unescapedValue=function(e,t){var r=t.lookup(e[1]);if(null!=r)return r},w.prototype.escapedValue=function(t,r){var n=r.lookup(t[1]);if(null!=n)return e.escape(n)},w.prototype.rawValue=function(e){return e[1]},e.name="mustache.js",e.version="3.0.1",e.tags=["{{","}}"];var y=new w;return e.clearCache=function(){return y.clearCache()},e.parse=function(e,t){return y.parse(e,t)},e.render=function(e,t,n,o){if("string"!=typeof e)throw new TypeError("Invalid template! Template should be a \"string\" but \""+(r(i=e)?"array":typeof i)+"\" was given as the first argument for mustache#render(template, view, partials)");var i;return y.render(e,t,n,o)},e.to_html=function(t,r,o,i){var s=e.render(t,r,o);if(!n(i))return s;i(s)},e.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,function(e){return p[e]})},e.Scanner=v,e.Context=d,e.Writer=w,e});var d={props:{endpoints:Object,value:Object,blockConfig:Object,fieldGroup:Object,readyFieldGroup:Object,index:Number,label:String,columnsCount:Number,pageUid:String,pageId:String,encodedPageId:String,script:String,parentPath:String,canDuplicate:Boolean,cssContent:String},data:function(){return{pending:!0,activeTab:null,expanded:!0,isNew:!1,previewFrameContent:null,previewHeight:0,previewStored:!1,previewMarkup:"",showPreview:!1,fieldGroup:{},styles:null}},components:{BuilderPreview:c},mounted:function(){this.value._uid||(this.value._uid=this.value._key+"_"+new Date().valueOf()+"_"+this._uid),null!=this.blockConfig.expandedInitially&&(this.expanded=this.blockConfig.expandedInitially,delete this.blockConfig.expandedInitially),this.blockConfig.showPreviewInitially&&(this.showPreview=this.blockConfig.showPreviewInitially,delete this.blockConfig.showPreviewInitially);var e=JSON.parse(localStorage.getItem(this.localUiStateKey));e&&null!==e.expanded&&(this.expanded=e.expanded),this.initFieldGroup()},computed:{localUiStateKey:function(){return"kBuilder.uiState.".concat(this.value._uid)},localFormGroupKey:function(){return"kBuilder.formGroup.".concat(this.blueprint)},extendedUid:function(){return this.pageId.replace("/","-")+"-"+this._uid},blockPath:function(){return this.parentPath+"+"+this.value._key},fieldSets:function(){var e=[];if(this.fieldGroup.tabs)for(var t=0,i=Object.entries(this.fieldGroup.tabs);t<i.length;t++){var r=b(i[t],2),a=r[0],n=r[1];e.push(this.newFieldSet(n,a,this.value))}else this.fieldGroup.fields&&e.push(this.newFieldSet(this.fieldGroup,"content",this.value,"edit",this.$t("edit")));return e}},methods:{title:function(e){var $gZU7$$interop$default=m(a);return $gZU7$$interop$default.d.render(this.label,e)},initFieldGroup:function(){var e=this,t=JSON.parse(localStorage.getItem(this.localUiStateKey));Object.keys(this.value).length<=2&&(this.fieldGroup.fields&&Object.entries(this.fieldGroup.fields).forEach(function(t){var i=b(t,2),r=i[0],a=i[1];e.$set(e.value,r,a.default)}),this.fieldGroup.tabs&&Object.entries(this.fieldGroup.tabs).forEach(function(t){var i=b(t,2),r=(i[0],i[1]);Object.entries(r.fields).forEach(function(t){var i=b(t,2),r=i[0],a=i[1];e.$set(e.value,r,a.default)})})),this.activeTab||(this.activeTab=this.fieldSets[0].key),this.fieldGroup.defaultView&&"default"!=this.fieldGroup.defaultView&&!this.isNew?"preview"==this.fieldGroup.defaultView?this.showPreview=!0:this.activeTab=this.fieldGroup.defaultView:t?(this.showPreview=t.showPreview,this.activeTab=t.activeTab):this.storeLocalUiState(),this.fieldGroup.preview&&this.showPreview&&this.expanded&&this.displayPreview(this.fieldGroup.preview)},onBlockInput:function(e){this.$emit("input",this.value)},displayPreview:function(){var e=this;this.showPreview=!0,this.expanded=!0;var t={preview:this.fieldGroup.preview,blockContent:this.value,block:this.fieldGroup,blockUid:this.extendedUid,pageid:this.pageId};this.$api.post("kirby-builder/rendered-preview",t).then(function(t){e.previewMarkup=t.preview,e.activeTab=null,e.$refs.preview.resize()}),this.storeLocalUiState()},displayFieldSet:function(e){this.showPreview=!1,this.activeTab=e,this.previewHeight=0,this.storeLocalUiState()},toggleExpand:function(e){this.expanded="boolean"==typeof e?e:!this.expanded,this.expanded&&this.showPreview&&this.displayPreview(),this.storeLocalUiState()},newFieldSet:function(e,t,i,r,a){var n=this;Object.keys(e.fields).forEach(function(t){var i=n.endpoints.model;e.fields[t].endpoints={field:"kirby-builder/".concat(i,"/fields/").concat(n.blockPath,"+").concat(e.fields[t].name),model:i,section:n.endpoints.section},e.fields[t].parentPath=n.blockPath});var l={fields:e.fields,key:t,model:i,icon:r||e.icon||null,label:a||e.label||null};return l},objectToGetParams:function(e){return Object.keys(e).map(function(t){return t+"="+e[t]}).join("&")},storeLocalUiState:function(){var e={expanded:this.expanded,showPreview:this.showPreview,activeTab:this.activeTab};localStorage.setItem(this.localUiStateKey,JSON.stringify(e))},tabIcon:function(e){return e?e.indexOf("/")>-1&&e.indexOf(".")>-1?null:e:null},tabImage:function(e){return e&&e.indexOf("/")>-1&&e.indexOf(".")>-1?e:null}}};if(typeof d==="function"){d=d.options}Object.assign(d,function(){var render=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{class:["kBuilderBlock","kBuilderBlock--col-"+_vm.columnsCount,"kBuilderBlock--type-"+_vm.value._key,{"kBuilderBlock--previewMode":_vm.showPreview&&_vm.expanded},{"kBuilderBlock--expanded":_vm.expanded},{"kBuilderBlock--pending":_vm.isNew},{"kBuilderBlock--collapsed":!_vm.expanded},{"kBuilderBlock--editMode":!_vm.showPreview&&_vm.expanded}]},[_c("div",{class:"kBuilderBlock__header kBuilderBlock__header--col-"+_vm.columnsCount},[_c("k-icon",{class:"kBuilder__dragDropHandle kBuilder__dragDropHandle--col-"+_vm.columnsCount,attrs:{"type":"sort"}}),_vm._v(" "),_c("span",{staticClass:"kBuilderBlock__label",on:{"click":_vm.toggleExpand}},[_c("k-icon",{staticClass:"kBuilderBlock__expandedIcon",class:{"kBuilderBlock__expandedIcon--expanded":_vm.expanded},attrs:{"type":"angle-down"}}),_vm._v(" "),_c("span",{domProps:{"innerHTML":_vm._s(_vm.title(_vm.value))}})],1),_vm._v(" "),_c("div",{staticClass:"kBuilderBlock__actions"},[_c("k-button-group",{staticClass:"kBuilderBlock__actionsGroup"},[_vm._l(_vm.fieldSets,function(fieldSet){return _vm.fieldSets.length>1||_vm.fieldGroup.preview?_c("k-button",{key:"showFierldSetButton-"+_vm._uid+fieldSet.key,staticClass:"kBuilderBlock__actionsButton",class:[{"kBuilderBlock__actionsButton--active":_vm.activeTab==fieldSet.key&&_vm.expanded},"kBuilderBlock__actionsButton--type-"+fieldSet.key],attrs:{"icon":_vm.tabIcon(fieldSet.icon),"image":_vm.tabImage(fieldSet.icon)},on:{"click":function($event){_vm.displayFieldSet(fieldSet.key);_vm.toggleExpand(true)}}},[_vm._v(_vm._s(fieldSet.label))]):_vm._e()}),_vm._v(" "),_vm.fieldGroup.preview?_c("k-button",{staticClass:"kBuilderBlock__actionsButton kBuilderBlock__actionsButton--preview",class:{"kBuilderBlock__actionsButton--active":_vm.showPreview&&_vm.expanded},attrs:{"icon":"preview"},on:{"click":function($event){_vm.displayPreview()}}},[_vm._v(_vm._s(_vm.$t("builder.preview")))]):_vm._e()],2),_vm._v(" "),_c("div",{staticClass:"kBuilderBlock__control"},[_c("k-dropdown",{staticClass:"kBuilderBlock__actionsDropDown"},[_c("k-button",{staticClass:"kBuilderBlock__actionsButton",attrs:{"icon":"dots"},on:{"click":function($event){_vm.$refs["blockActions"].toggle()}}}),_vm._v(" "),_c("k-dropdown-content",{ref:"blockActions",staticClass:"kBuilderBlock__actionsDropDownContent",attrs:{"align":"right"}},[_vm.canDuplicate?_c("k-dropdown-item",{attrs:{"icon":"copy"},on:{"click":function($event){_vm.$emit("clone",_vm.index,_vm.showPreview,_vm.expanded,_vm.activeTab)}}},[_vm._v(_vm._s(_vm.$t("builder.clone")))]):_vm._e(),_vm._v(" "),_c("k-dropdown-item",{attrs:{"icon":"trash"},on:{"click":function($event){_vm.$emit("delete",_vm.index)}}},[_vm._v(_vm._s(_vm.$t("delete")))])],1)],1)],1)],1)],1),_vm._v(" "),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.expanded,expression:"expanded"}],staticClass:"kBuilderBlock__content"},[_vm.fieldGroup.preview?_c("builder-preview",{directives:[{name:"show",rawName:"v-show",value:_vm.showPreview,expression:"showPreview"}],ref:"preview",attrs:{"markup":_vm.previewMarkup,"styles":_vm.cssContent,"index":_vm.index,"script":_vm.script}}):_vm._e(),_vm._v(" "),_vm._l(_vm.fieldSets,function(fieldSet){return _vm.activeTab===fieldSet.key?_c("k-fieldset",_vm._g({directives:[{name:"show",rawName:"v-show",value:!_vm.showPreview,expression:"!showPreview"}],key:fieldSet.key+_vm._uid,staticClass:"kBuilderBlock__form",attrs:{"value":{},"fields":fieldSet.fields,"validate":false},model:{value:fieldSet.model,callback:function($$v){_vm.$set(fieldSet,"model",$$v)},expression:"fieldSet.model"}},_vm.$listeners)):_vm._e()})],2)])};var staticRenderFns=[];return{render:render,staticRenderFns:staticRenderFns,_compiled:true,_scopeId:null,functional:undefined}}());var h,f={};var i,j,q=false;function l(){if(q)return;q=true;j={};!function(t){"function"==typeof i&&i.amd?i(t):void 0!==j?j=t():window.Sortable=t()}(function(){if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var t,e,o,n,i,r,a,l,s,c,d,h,u,f,p,v,g,m,b,w,_,y,D,T,S,C,E,x,M=[],N=!1,P=!1,A=!1,X=[],Y=!1,k=!1,I=[],H=/\s+/g,O="Sortable"+new Date().getTime(),B=window,R=B.document,$=B.parseInt,L=B.setTimeout,W=B.jQuery||B.Zepto,F=B.Polymer,Z={capture:!1,passive:!1},z=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),j=!!navigator.userAgent.match(/Edge/i),U=!!navigator.userAgent.match(/firefox/i),V=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),q=!!navigator.userAgent.match(/iP(ad|od|hone)/i),G=j||z?"cssFloat":"float",K="draggable"in R.createElement("div"),Q=function(){if(z)return!1;var t=R.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}(),J=!1,tt=!1,et=Math.abs,ot=Math.min,nt=Math.max,it=[],rt=function(t,e){var o=Tt(t),n=$(o.width)-$(o.paddingLeft)-$(o.paddingRight)-$(o.borderLeftWidth)-$(o.borderRightWidth),i=Pt(t,0,e),r=Pt(t,1,e),a=i&&Tt(i),l=r&&Tt(r),s=a&&$(a.marginLeft)+$(a.marginRight)+Lt(i).width,c=l&&$(l.marginLeft)+$(l.marginRight)+Lt(r).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&"none"!==a.float){var d="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==d?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=n&&"none"===o[G]||r&&"none"===o[G]&&s+c>n)?"vertical":"horizontal"},at=function(t,e){if(!t||!t.getBoundingClientRect)return lt();var o=t,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var i=Tt(o);if(o.clientWidth<o.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!o||!o.getBoundingClientRect||o===R.body)return lt();if(n||e)return o;n=!0}}}while(o=o.parentNode);return lt()},lt=function(){return z?R.documentElement:R.scrollingElement},st=function(t,e,o){t.scrollLeft+=e,t.scrollTop+=o},ct=Ht(function(t,e,o,n){if(e.scroll){var i=o?o[O]:window,r=e.scrollSensitivity,a=e.scrollSpeed,d=t.clientX,h=t.clientY,u=lt(),f=!1;s!==o&&(dt(),l=e.scroll,c=e.scrollFn,!0===l&&(l=at(o,!0),s=l));var p=0,v=l;do{var g,m,b,w,y,D,T,S,C,E=v,x=Lt(E),P=x.top,A=x.bottom,X=x.left,Y=x.right,k=x.width,I=x.height;if(g=E.scrollWidth,m=E.scrollHeight,b=Tt(E),S=E.scrollLeft,C=E.scrollTop,E===u?(D=k<g&&("auto"===b.overflowX||"scroll"===b.overflowX||"visible"===b.overflowX),T=I<m&&("auto"===b.overflowY||"scroll"===b.overflowY||"visible"===b.overflowY)):(D=k<g&&("auto"===b.overflowX||"scroll"===b.overflowX),T=I<m&&("auto"===b.overflowY||"scroll"===b.overflowY)),w=D&&(et(Y-d)<=r&&S+k<g)-(et(X-d)<=r&&!!S),y=T&&(et(A-h)<=r&&C+I<m)-(et(P-h)<=r&&!!C),!M[p])for(var H=0;H<=p;H++)M[H]||(M[H]={});M[p].vx==w&&M[p].vy==y&&M[p].el===E||(M[p].el=E,M[p].vx=w,M[p].vy=y,clearInterval(M[p].pid),!E||0==w&&0==y||(f=!0,M[p].pid=setInterval(function(){n&&0===this.layer&&(mt.active._emulateDragOver(!0),mt.active._onTouchMove(_,!0));var e=M[this.layer].vy?M[this.layer].vy*a:0,o=M[this.layer].vx?M[this.layer].vx*a:0;"function"==typeof c&&"continue"!==c.call(i,o,e,t,_,M[this.layer].el)||st(M[this.layer].el,o,e)}.bind({layer:p}),24))),p++}while(e.bubbleScroll&&v!==u&&(v=at(v,!1)));N=f}},30),dt=function(){M.forEach(function(t){clearInterval(t.pid)}),M=[]},ht=function(t){function e(t,o){return function(n,i,r,a){var l=n.options.group.name&&i.options.group.name&&n.options.group.name===i.options.group.name;if(null==t&&(o||l))return!0;if(null==t||!1===t)return!1;if(o&&"clone"===t)return t;if("function"==typeof t)return e(t(n,i,r,a),o)(n,i,r,a);var s=(o?n:i).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var o={},n=t.group;n&&"object"==typeof n||(n={name:n}),o.name=n.name,o.checkPull=e(n.pull,!0),o.checkPut=e(n.put),o.revertClone=n.revertClone,t.group=o},ut=function(e){t&&t.parentNode&&t.parentNode[O]&&t.parentNode[O]._computeIsAligned(e)},ft=function(){!Q&&o&&Tt(o,"display","none")},pt=function(){!Q&&o&&Tt(o,"display","")};R.addEventListener("click",function(t){if(A)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),A=!1,!1},!0);var vt,gt=function(e){if(t){var o=function(t,e){for(var o=0;o<X.length;o++)if(!At(X[o])){var n=Lt(X[o]),i=X[o][O].options.emptyInsertThreshold,r=t>=n.left-i&&t<=n.right+i,a=e>=n.top-i&&e<=n.bottom+i;if(i&&r&&a)return X[o]}}((e=e.touches?e.touches[0]:e).clientX,e.clientY);if(o){var n={};for(var i in e)n[i]=e[i];n.target=n.rootEl=o,n.preventDefault=void 0,n.stopPropagation=void 0,o[O]._onDragOver(n)}}};function mt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(t);this.el=t,this.options=e=Ot({},e),t[O]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return rt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:$(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==mt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var n in o)!(n in e)&&(e[n]=o[n]);for(var i in ht(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&K,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?_t(t,"pointerdown",this._onTapStart):(_t(t,"mousedown",this._onTapStart),_t(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(_t(t,"dragover",this),_t(t,"dragenter",this)),X.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[])}function bt(t,e,o,n){if(t){o=o||R;do{if(null!=e&&(">"===e[0]?t.parentNode===o&&It(t,e):It(t,e))||n&&t===o)return t;if(t===o)break}while(t=wt(t))}return null}function wt(t){return t.host&&t!==R&&t.host.nodeType?t.host:t.parentNode}function _t(t,e,o){t.addEventListener(e,o,!z&&Z)}function yt(t,e,o){t.removeEventListener(e,o,!z&&Z)}function Dt(t,e,o){if(t&&e)if(t.classList)t.classList[o?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(H," ").replace(" "+e+" "," ");t.className=(n+(o?" "+e:"")).replace(H," ")}}function Tt(t,e,o){var n=t&&t.style;if(n){if(void 0===o)return R.defaultView&&R.defaultView.getComputedStyle?o=R.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),void 0===e?o:o[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=o+("string"==typeof o?"":"px")}}function St(t){var e="";do{var o=Tt(t,"transform");o&&"none"!==o&&(e=o+" "+e)}while(t=t.parentNode);return window.DOMMatrix?new DOMMatrix(e):window.WebKitCSSMatrix?new WebKitCSSMatrix(e):window.CSSMatrix?new CSSMatrix(e):void 0}function Ct(t,e,o){if(t){var n=t.getElementsByTagName(e),i=0,r=n.length;if(o)for(;i<r;i++)o(n[i],i);return n}return[]}function Et(t,e,o,i,r,a,l,s,c,d,h){var u,f=(t=t||e[O]).options,p="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||z||j?(u=R.createEvent("Event")).initEvent(o,!0,!0):u=new CustomEvent(o,{bubbles:!0,cancelable:!0}),u.to=r||e,u.from=a||e,u.item=i||e,u.clone=n,u.oldIndex=l,u.newIndex=s,u.oldDraggableIndex=c,u.newDraggableIndex=d,u.originalEvent=h,u.pullMode=v?v.lastPutMode:void 0,e&&e.dispatchEvent(u),f[p]&&f[p].call(t,u)}function xt(t,e,o,n,i,r,a,l){var s,c,d=t[O],h=d.options.onMove;return!window.CustomEvent||z||j?(s=R.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=o,s.draggedRect=n,s.related=i||e,s.relatedRect=r||Lt(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),h&&(c=h.call(d,s,a)),c}function Mt(t){t.draggable=!1}function Nt(){J=!1}function Pt(e,n,i){for(var r=0,a=0,l=e.children;a<l.length;){if("none"!==l[a].style.display&&l[a]!==o&&l[a]!==t&&bt(l[a],i.draggable,e,!1)){if(r===n)return l[a];r++}a++}return null}function At(t){for(var e=t.lastElementChild;e&&(e===o||"none"===Tt(e,"display"));)e=e.previousElementSibling;return e||null}function Xt(e){return kt(t)<kt(e)?1:-1}function Yt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,o=e.length,n=0;o--;)n+=e.charCodeAt(o);return n.toString(36)}function kt(t,e){var o=0;if(!t||!t.parentNode)return-1;for(;t&&(t=t.previousElementSibling);)"TEMPLATE"===t.nodeName.toUpperCase()||t===n||e&&!It(t,e)||o++;return o}function It(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(o){return!1}return!1}}function Ht(t,e){return function(){if(!vt){var o=arguments,n=this;vt=L(function(){1===o.length?t.call(n,o[0]):t.apply(n,o),vt=void 0},e)}}}function Ot(t,e){if(t&&e)for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);return t}function Bt(t){return F&&F.dom?F.dom(t).cloneNode(!0):W?W(t).clone(!0)[0]:t.cloneNode(!0)}function Rt(t){return L(t,0)}function $t(t){return clearTimeout(t)}function Lt(t,e,o,n){if(t.getBoundingClientRect||t===B){var i,r,a,l,s,c,d;if(t!==B&&t!==lt()?(r=(i=t.getBoundingClientRect()).top,a=i.left,l=i.bottom,s=i.right,c=i.height,d=i.width):(r=0,a=0,l=window.innerHeight,s=window.innerWidth,c=window.innerHeight,d=window.innerWidth),n&&t!==B&&(o=o||t.parentNode,!z))do{if(o&&o.getBoundingClientRect&&"none"!==Tt(o,"transform")){var h=o.getBoundingClientRect();r-=h.top+$(Tt(o,"border-top-width")),a-=h.left+$(Tt(o,"border-left-width")),l=r+i.height,s=a+i.width;break}}while(o=o.parentNode);if(e&&t!==B){var u=St(o||t),f=u&&u.a,p=u&&u.d;u&&(l=(r/=p)+(c/=p),s=(a/=f)+(d/=f))}return{top:r,left:a,bottom:l,right:s,width:d,height:c}}}function Wt(t,e){for(var o=at(t,!0),n=Lt(t)[e];o;){var i=Lt(o)[e];if(!("top"===e||"left"===e?n>=i:n<=i))return o;if(o===lt())break;o=at(o,!1)}return!1}function Ft(t){var e=0,o=0,n=lt();if(t)do{var i=St(t),r=i.a,a=i.d;e+=t.scrollLeft*r,o+=t.scrollTop*a}while(t!==n&&(t=t.parentNode));return[e,o]}return mt.prototype={constructor:mt,_computeIsAligned:function(e){var n;if(o&&!Q?(ft(),n=R.elementFromPoint(e.clientX,e.clientY),pt()):n=e.target,n=bt(n,this.options.draggable,this.el,!1),!tt&&t&&t.parentNode===this.el){for(var i,r,a,l,s,c,d,h,u=this.el.children,f=0;f<u.length;f++)bt(u[f],this.options.draggable,this.el,!1)&&u[f]!==n&&(u[f].sortableMouseAligned=(i=e.clientX,r=e.clientY,a=u[f],l=this._getDirection(e,null),this.options,s=void 0,c=void 0,d=void 0,h=void 0,s=Lt(a),c="vertical"===l?s.left:s.top,d="vertical"===l?s.right:s.bottom,c<(h="vertical"===l?i:r)&&h<d));bt(n,this.options.draggable,this.el,!0)||(D=null),tt=!0,L(function(){tt=!1},30)}},_getDirection:function(e,o){return"function"==typeof this.options.direction?this.options.direction.call(this,e,o,t):this.options.direction},_onTapStart:function(e){if(e.cancelable){var o,n,i=this,r=this.el,l=this.options,s=l.preventOnFilter,c=e.type,d=e.touches&&e.touches[0],h=(d||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||h,f=l.filter;if(function(t){it.length=0;var e=t.getElementsByTagName("input"),o=e.length;for(;o--;){var n=e[o];n.checked&&it.push(n)}}(r),!t&&!(/mousedown|pointerdown/.test(c)&&0!==e.button||l.disabled||u.isContentEditable||(h=bt(h,l.draggable,r,!1),a===h))){if(o=kt(h),n=kt(h,l.draggable),"function"==typeof f){if(f.call(this,e,h,this))return Et(i,u,"filter",h,r,r,o,void 0,n),void(s&&e.cancelable&&e.preventDefault())}else if(f&&(f=f.split(",").some(function(t){if(t=bt(u,t.trim(),r,!1))return Et(i,t,"filter",h,r,r,o,void 0,n),!0})))return void(s&&e.cancelable&&e.preventDefault());l.handle&&!bt(u,l.handle,r,!1)||this._prepareDragStart(e,d,h,o,n)}}},_handleAutoScroll:function(e,o){if(t&&this.options.scroll){var n=e.clientX,i=e.clientY,r=R.elementFromPoint(n,i),a=this;if(o||j||z||V){ct(e,a.options,r,o);var l=at(r,!0);!N||g&&n===m&&i===b||(g&&clearInterval(g),g=setInterval(function(){if(t){var r=at(R.elementFromPoint(n,i),!0);r!==l&&(l=r,dt(),ct(e,a.options,l,o))}},10),m=n,b=i)}else{if(!a.options.bubbleScroll||at(r,!0)===lt())return void dt();ct(e,a.options,at(r,!1),!1)}}},_prepareDragStart:function(o,n,l,s,c){var h,f=this,v=f.el,g=f.options,m=v.ownerDocument;l&&!t&&l.parentNode===v&&(i=v,e=(t=l).parentNode,r=t.nextSibling,a=l,p=g.group,d=s,u=c,w={target:t,clientX:(n||o).clientX,clientY:(n||o).clientY},this._lastX=(n||o).clientX,this._lastY=(n||o).clientY,t.style["will-change"]="all",t.style.transition="",t.style.transform="",h=function(){f._disableDelayedDragEvents(),!U&&f.nativeDraggable&&(t.draggable=!0),f._triggerDragStart(o,n),Et(f,i,"choose",t,i,i,d,void 0,u),Dt(t,g.chosenClass,!0)},g.ignore.split(",").forEach(function(e){Ct(t,e.trim(),Mt)}),_t(m,"dragover",gt),_t(m,"mousemove",gt),_t(m,"touchmove",gt),_t(m,"mouseup",f._onDrop),_t(m,"touchend",f._onDrop),_t(m,"touchcancel",f._onDrop),U&&this.nativeDraggable&&(this.options.touchStartThreshold=4,t.draggable=!0),!g.delay||g.delayOnTouchOnly&&!n||this.nativeDraggable&&(j||z)?h():(_t(m,"mouseup",f._disableDelayedDrag),_t(m,"touchend",f._disableDelayedDrag),_t(m,"touchcancel",f._disableDelayedDrag),_t(m,"mousemove",f._delayedDragTouchMoveHandler),_t(m,"touchmove",f._delayedDragTouchMoveHandler),g.supportPointer&&_t(m,"pointermove",f._delayedDragTouchMoveHandler),f._dragStartTimer=L(h,g.delay)))},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;nt(et(e.clientX-this._lastX),et(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){t&&Mt(t),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;yt(t,"mouseup",this._disableDelayedDrag),yt(t,"touchend",this._disableDelayedDrag),yt(t,"touchcancel",this._disableDelayedDrag),yt(t,"mousemove",this._delayedDragTouchMoveHandler),yt(t,"touchmove",this._delayedDragTouchMoveHandler),yt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,o){o=o||("touch"==e.pointerType?e:null),!this.nativeDraggable||o?this.options.supportPointer?_t(R,"pointermove",this._onTouchMove):_t(R,o?"touchmove":"mousemove",this._onTouchMove):(_t(t,"dragend",this),_t(i,"dragstart",this._onDragStart));try{R.selection?Rt(function(){R.selection.empty()}):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,o){if(P=!1,i&&t){this.nativeDraggable&&(_t(R,"dragover",this._handleAutoScroll),_t(R,"dragover",ut));var n=this.options;!e&&Dt(t,n.dragClass,!1),Dt(t,n.ghostClass,!0),Tt(t,"transform",""),mt.active=this,e&&this._appendGhost(),Et(this,i,"start",t,i,i,d,void 0,u,void 0,o)}else this._nulling()},_emulateDragOver:function(e){if(_){if(this._lastX===_.clientX&&this._lastY===_.clientY&&!e)return;this._lastX=_.clientX,this._lastY=_.clientY,ft();for(var o=R.elementFromPoint(_.clientX,_.clientY),n=o;o&&o.shadowRoot&&(o=o.shadowRoot.elementFromPoint(_.clientX,_.clientY))!==n;)n=o;if(n)do{if(n[O])if(n[O]._onDragOver({clientX:_.clientX,clientY:_.clientY,target:o,rootEl:n})&&!this.options.dragoverBubble)break;o=n}while(n=n.parentNode);t.parentNode[O]._computeIsAligned(_),pt()}},_onTouchMove:function(t,e){if(w){var n=this.options,i=n.fallbackTolerance,r=n.fallbackOffset,a=t.touches?t.touches[0]:t,l=o&&St(o),s=o&&l&&l.a,c=o&&l&&l.d,d=q&&E&&Ft(E),h=(a.clientX-w.clientX+r.x)/(s||1)+(d?d[0]-I[0]:0)/(s||1),u=(a.clientY-w.clientY+r.y)/(c||1)+(d?d[1]-I[1]:0)/(c||1),f=t.touches?"translate3d("+h+"px,"+u+"px,0)":"translate("+h+"px,"+u+"px)";if(!mt.active&&!P){if(i&&ot(et(a.clientX-this._lastX),et(a.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}!e&&this._handleAutoScroll(a,!0),y=!0,_=a,Tt(o,"webkitTransform",f),Tt(o,"mozTransform",f),Tt(o,"msTransform",f),Tt(o,"transform",f),t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!o){var e=this.options.fallbackOnBody?R.body:i,n=Lt(t,!0,e,!q),r=(Tt(t),this.options);if(q){for(E=e;"static"===Tt(E,"position")&&"none"===Tt(E,"transform")&&E!==R;)E=E.parentNode;if(E!==R){var a=Lt(E,!0);n.top-=a.top,n.left-=a.left}E!==R.body&&E!==R.documentElement?(E===R&&(E=lt()),n.top+=E.scrollTop,n.left+=E.scrollLeft):E=lt(),I=Ft(E)}Dt(o=t.cloneNode(!0),r.ghostClass,!1),Dt(o,r.fallbackClass,!0),Dt(o,r.dragClass,!0),Tt(o,"box-sizing","border-box"),Tt(o,"margin",0),Tt(o,"top",n.top),Tt(o,"left",n.left),Tt(o,"width",n.width),Tt(o,"height",n.height),Tt(o,"opacity","0.8"),Tt(o,"position",q?"absolute":"fixed"),Tt(o,"zIndex","100000"),Tt(o,"pointerEvents","none"),e.appendChild(o)}},_onDragStart:function(e,o){var r=this,a=e.dataTransfer,l=r.options;(n=Bt(t)).draggable=!1,n.style["will-change"]="",this._hideClone(),Dt(n,r.options.chosenClass,!1),r._cloneId=Rt(function(){r.options.removeCloneOnHide||i.insertBefore(n,t),Et(r,i,"clone",t)}),!o&&Dt(t,l.dragClass,!0),o?(A=!0,r._loopId=setInterval(r._emulateDragOver,50)):(yt(R,"mouseup",r._onDrop),yt(R,"touchend",r._onDrop),yt(R,"touchcancel",r._onDrop),a&&(a.effectAllowed="move",l.setData&&l.setData.call(r,a,t)),_t(R,"drop",r),Tt(t,"transform","translateZ(0)")),P=!0,r._dragStartId=Rt(r._dragStarted.bind(r,o,e)),_t(R,"selectstart",r),V&&Tt(R.body,"user-select","none")},_onDragOver:function(o){var n,a,l,s=this.el,c=o.target,h=this.options,f=h.group,g=mt.active,m=p===f,b=h.sort,w=this;if(!J){if(void 0!==o.preventDefault&&o.cancelable&&o.preventDefault(),y=!0,c=bt(c,h.draggable,s,!0),t.contains(o.target)||c.animated)return Z(!1);if(c!==t&&(A=!1),g&&!h.disabled&&(m?b||(l=!i.contains(t)):v===this||(this.lastPutMode=p.checkPull(this,g,t,o))&&f.checkPut(this,g,t,o))){var _=this._getDirection(o,c);if(n=Lt(t),l)return this._hideClone(),e=i,r?i.insertBefore(t,r):i.appendChild(t),Z(!0);var E=At(s);if(!E||function(t,e,o){var n=Lt(At(o)),i="vertical"===e?t.clientY:t.clientX,r="vertical"===e?t.clientX:t.clientY,a="vertical"===e?n.bottom:n.right,l="vertical"===e?n.left:n.top,s="vertical"===e?n.right:n.bottom;return"vertical"===e?r>s+10||r<=s&&i>a&&r>=l:i>a&&r>l||i<=a&&r>s+10}(o,_,s)&&!E.animated){if(E&&s===o.target&&(c=E),c&&(a=Lt(c)),m?g._hideClone():g._showClone(this),!1!==xt(i,s,t,n,c,a,o,!!c))return s.appendChild(t),e=s,x=null,z(),Z(!0)}else if(c&&c!==t&&c.parentNode===s){var M,N=0,P=c.sortableMouseAligned,X=t.parentNode!==s,I="vertical"===_?"top":"left",H=Wt(c,"top")||Wt(t,"top"),B=H?H.scrollTop:void 0;if(D!==c&&(S=null,M=Lt(c)[I],Y=!1),function(e,o,n){var i=e===t&&x||Lt(e),r=o===t&&x||Lt(o),a="vertical"===n?i.left:i.top,l="vertical"===n?i.right:i.bottom,s="vertical"===n?i.width:i.height,c="vertical"===n?r.left:r.top,d="vertical"===n?r.right:r.bottom,h="vertical"===n?r.width:r.height;return a===c||l===d||a+s/2===c+h/2}(t,c,_)&&P||X||H||h.invertSwap||"insert"===S||"swap"===S?("swap"!==S&&(k=h.invertSwap||X),N=function(e,o,n,i,r,a,l){var s=Lt(o),c="vertical"===n?e.clientY:e.clientX,d="vertical"===n?s.height:s.width,h="vertical"===n?s.top:s.left,u="vertical"===n?s.bottom:s.right,f=Lt(t),p=!1;if(!a)if(l&&C<d*i){if(!Y&&(1===T?c>h+d*r/2:c<u-d*r/2)&&(Y=!0),Y)p=!0;else{"vertical"===n?f.top:f.left,"vertical"===n?f.bottom:f.right;if(1===T?c<h+C:c>u-C)return-1*T}}else if(c>h+d*(1-i)/2&&c<u-d*(1-i)/2)return Xt(o);if((p=p||a)&&(c<h+d*r/2||c>u-d*r/2))return c>h+d/2?1:-1;return 0}(o,c,_,h.swapThreshold,null==h.invertedSwapThreshold?h.swapThreshold:h.invertedSwapThreshold,k,D===c),S="swap"):(N=Xt(c),S="insert"),0===N)return Z(!1);x=null,D=c,T=N,a=Lt(c);var $=c.nextElementSibling,W=!1,F=xt(i,s,t,n,c,a,o,W=1===N);if(!1!==F)return 1!==F&&-1!==F||(W=1===F),J=!0,L(Nt,30),m?g._hideClone():g._showClone(this),W&&!$?s.appendChild(t):c.parentNode.insertBefore(t,W?$:c),H&&st(H,0,B-H.scrollTop),e=t.parentNode,void 0===M||k||(C=et(M-Lt(c)[I])),z(),Z(!0)}if(s.contains(t))return Z(!1)}return!1}function Z(e){return e&&(m?g._hideClone():g._showClone(w),g&&(Dt(t,v?v.options.ghostClass:g.options.ghostClass,!1),Dt(t,h.ghostClass,!0)),v!==w&&w!==mt.active?v=w:w===mt.active&&(v=null),n&&w._animate(n,t),c&&a&&w._animate(a,c)),(c===t&&!t.animated||c===s&&!c.animated)&&(D=null),h.dragoverBubble||o.rootEl||c===R||(w._handleAutoScroll(o),t.parentNode[O]._computeIsAligned(o),!e&>(o)),!h.dragoverBubble&&o.stopPropagation&&o.stopPropagation(),!0}function z(){Et(w,i,"change",c,s,i,d,kt(t),u,kt(t,h.draggable),o)}},_animate:function(e,o){var n=this.options.animation;if(n){var i=Lt(o);if(o===t&&(x=i),1===e.nodeType&&(e=Lt(e)),e.left+e.width/2!==i.left+i.width/2||e.top+e.height/2!==i.top+i.height/2){var r=St(this.el),a=r&&r.a,l=r&&r.d;Tt(o,"transition","none"),Tt(o,"transform","translate3d("+(e.left-i.left)/(a||1)+"px,"+(e.top-i.top)/(l||1)+"px,0)"),this._repaint(o),Tt(o,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),Tt(o,"transform","translate3d(0,0,0)")}"number"==typeof o.animated&&clearTimeout(o.animated),o.animated=L(function(){Tt(o,"transition",""),Tt(o,"transform",""),o.animated=!1},n)}},_repaint:function(t){return t.offsetWidth},_offMoveEvents:function(){yt(R,"touchmove",this._onTouchMove),yt(R,"pointermove",this._onTouchMove),yt(R,"dragover",gt),yt(R,"mousemove",gt),yt(R,"touchmove",gt)},_offUpEvents:function(){var t=this.el.ownerDocument;yt(t,"mouseup",this._onDrop),yt(t,"touchend",this._onDrop),yt(t,"pointerup",this._onDrop),yt(t,"touchcancel",this._onDrop),yt(R,"selectstart",this)},_onDrop:function(a){var l=this.el,s=this.options;P=!1,N=!1,k=!1,Y=!1,clearInterval(this._loopId),clearInterval(g),dt(),clearTimeout(vt),vt=void 0,clearTimeout(this._dragStartTimer),$t(this._cloneId),$t(this._dragStartId),yt(R,"mousemove",this._onTouchMove),this.nativeDraggable&&(yt(R,"drop",this),yt(l,"dragstart",this._onDragStart),yt(R,"dragover",this._handleAutoScroll),yt(R,"dragover",ut)),V&&Tt(R.body,"user-select",""),this._offMoveEvents(),this._offUpEvents(),a&&(y&&(a.cancelable&&a.preventDefault(),!s.dropBubble&&a.stopPropagation()),o&&o.parentNode&&o.parentNode.removeChild(o),(i===e||v&&"clone"!==v.lastPutMode)&&n&&n.parentNode&&n.parentNode.removeChild(n),t&&(this.nativeDraggable&&yt(t,"dragend",this),Mt(t),t.style["will-change"]="",Dt(t,v?v.options.ghostClass:this.options.ghostClass,!1),Dt(t,this.options.chosenClass,!1),Et(this,i,"unchoose",t,e,i,d,null,u,null,a),i!==e?(h=kt(t),f=kt(t,s.draggable),h>=0&&(Et(null,e,"add",t,e,i,d,h,u,f,a),Et(this,i,"remove",t,e,i,d,h,u,f,a),Et(null,e,"sort",t,e,i,d,h,u,f,a),Et(this,i,"sort",t,e,i,d,h,u,f,a)),v&&v.save()):t.nextSibling!==r&&(h=kt(t),f=kt(t,s.draggable),h>=0&&(Et(this,i,"update",t,e,i,d,h,u,f,a),Et(this,i,"sort",t,e,i,d,h,u,f,a))),mt.active&&(null!=h&&-1!==h||(h=d,f=u),Et(this,i,"end",t,e,i,d,h,u,f,a),this.save()))),this._nulling()},_nulling:function(){i=t=e=o=r=n=a=l=s=M.length=g=m=b=w=_=y=h=d=D=T=x=v=p=mt.active=null,it.forEach(function(t){t.checked=!0}),it.length=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":t&&(this._onDragOver(e),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(e));break;case"selectstart":e.preventDefault();}},toArray:function(){for(var t,e=[],o=this.el.children,n=0,i=o.length,r=this.options;n<i;n++)bt(t=o[n],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Yt(t));return e},sort:function(t){var e={},o=this.el;this.toArray().forEach(function(t,n){var i=o.children[n];bt(i,this.options.draggable,o,!1)&&(e[t]=i)},this),t.forEach(function(t){e[t]&&(o.removeChild(e[t]),o.appendChild(e[t]))})},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return bt(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var o=this.options;if(void 0===e)return o[t];o[t]=e,"group"===t&&ht(o)},destroy:function(){var t=this.el;t[O]=null,yt(t,"mousedown",this._onTapStart),yt(t,"touchstart",this._onTapStart),yt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(yt(t,"dragover",this),yt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),X.splice(X.indexOf(this.el),1),this.el=t=null},_hideClone:function(){n.cloneHidden||(Tt(n,"display","none"),n.cloneHidden=!0,n.parentNode&&this.options.removeCloneOnHide&&n.parentNode.removeChild(n))},_showClone:function(e){"clone"===e.lastPutMode?n.cloneHidden&&(i.contains(t)&&!this.options.group.revertClone?i.insertBefore(n,t):r?i.insertBefore(n,r):i.appendChild(n),this.options.group.revertClone&&this._animate(t,n),Tt(n,"display",""),n.cloneHidden=!1):this._hideClone()}},_t(R,"touchmove",function(t){(mt.active||P)&&t.cancelable&&t.preventDefault()}),mt.utils={on:_t,off:yt,css:Tt,find:Ct,is:function(t,e){return!!bt(t,e,t,!1)},extend:Ot,throttle:Ht,closest:bt,toggleClass:Dt,clone:Bt,index:kt,nextTick:Rt,cancelNextTick:$t,detectDirection:rt,getChild:Pt},mt.create=function(t,e){return new mt(t,e)},mt.version="1.9.0",mt})}!function(t,n){var e;"object"==typeof f?f=n((l(),j)):"function"==typeof h&&h.amd?h(["sortablejs"],n):"object"==typeof f?(e=n((l(),j)),f.vuedraggable=e):t.vuedraggable=n(t.Sortable)}("undefined"!=typeof self?self:f,function(t){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s="fb15")}({"02f4":function(t,n,e){var r=e("4588"),o=e("be13");t.exports=function(t){return function(n,e){var i,u,c=String(o(n)),a=r(e),f=c.length;return a<0||a>=f?t?"":void 0:(i=c.charCodeAt(a))<55296||i>56319||a+1===f||(u=c.charCodeAt(a+1))<56320||u>57343?t?c.charAt(a):i:t?c.slice(a,a+2):u-56320+(i-55296<<10)+65536}}},"0390":function(t,n,e){var r=e("02f4")(!0);t.exports=function(t,n,e){return n+(e?r(t,n).length:1)}},"07e3":function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},"0bfb":function(t,n,e){var r=e("cb7c");t.exports=function(){var t=r(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},"0fc9":function(t,n,e){var r=e("3a38"),o=Math.max,i=Math.min;t.exports=function(t,n){return(t=r(t))<0?o(t+n,0):i(t,n)}},1654:function(t,n,e){var r=e("71c1")(!0);e("30f1")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})})},1691:function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"1af6":function(t,n,e){var r=e("63b6");r(r.S,"Array",{isArray:e("9003")})},"1bc3":function(t,n,e){var r=e("f772");t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"1ec9":function(t,n,e){var r=e("f772"),o=e("e53d").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"20fd":function(t,n,e){var r=e("d9f6"),o=e("aebd");t.exports=function(t,n,e){n in t?r.f(t,n,o(0,e)):t[n]=e}},"214f":function(t,n,e){e("b0c5");var r=e("2aba"),o=e("32e9"),i=e("79e5"),u=e("be13"),c=e("2b4c"),a=e("520a"),f=c("species"),s=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),l=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var e="ab".split(t);return 2===e.length&&"a"===e[0]&&"b"===e[1]}();t.exports=function(t,n,e){var p=c(t),d=!i(function(){var n={};return n[p]=function(){return 7},7!=""[t](n)}),v=d?!i(function(){var n=!1,e=/a/;return e.exec=function(){return n=!0,null},"split"===t&&(e.constructor={},e.constructor[f]=function(){return e}),e[p](""),!n}):void 0;if(!d||!v||"replace"===t&&!s||"split"===t&&!l){var h=/./[p],b=e(u,p,""[t],function(t,n,e,r,o){return n.exec===a?d&&!o?{done:!0,value:h.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}}),g=b[0],y=b[1];r(String.prototype,t,g),o(RegExp.prototype,p,2==n?function(t,n){return y.call(t,this,n)}:function(t){return y.call(t,this)})}}},"230e":function(t,n,e){var r=e("d3f4"),o=e("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"23c6":function(t,n,e){var r=e("2d95"),o=e("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var n,e,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(e){}}(n=Object(t),o))?e:i?r(n):"Object"==(u=r(n))&&"function"==typeof n.callee?"Arguments":u}},"241e":function(t,n,e){var r=e("25eb");t.exports=function(t){return Object(r(t))}},"25eb":function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},"294c":function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},"2aba":function(t,n,e){var r=e("7726"),o=e("32e9"),i=e("69a8"),u=e("ca5a")("src"),c=e("fa5b"),a="toString",f=(""+c).split(a);e("8378").inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,e,c){var a="function"==typeof e;a&&(i(e,"name")||o(e,"name",n)),t[n]!==e&&(a&&(i(e,u)||o(e,u,t[n]?""+t[n]:f.join(String(n)))),t===r?t[n]=e:c?t[n]?t[n]=e:o(t,n,e):(delete t[n],o(t,n,e)))})(Function.prototype,a,function(){return"function"==typeof this&&this[u]||c.call(this)})},"2b4c":function(t,n,e){var r=e("5537")("wks"),o=e("ca5a"),i=e("7726").Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},"2d00":function(t,n){t.exports=!1},"2d95":function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},"2fdb":function(t,n,e){var r=e("5ca1"),o=e("d2c8"),i="includes";r(r.P+r.F*e("5147")(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"30f1":function(t,n,e){var r=e("b8e3"),o=e("63b6"),i=e("9138"),u=e("35e8"),c=e("481b"),a=e("8f60"),f=e("45f2"),s=e("53e2"),l=e("5168")("iterator"),p=!([].keys&&"next"in[].keys()),d="keys",v="values",h=function(){return this};t.exports=function(t,n,e,b,g,y,x){a(e,n,b);var m,O,w,S=function(t){if(!p&&t in M)return M[t];switch(t){case d:case v:return function(){return new e(this,t)};}return function(){return new e(this,t)}},j=n+" Iterator",_=g==v,$=!1,M=t.prototype,T=M[l]||M["@@iterator"]||g&&M[g],C=T||S(g),E=g?_?S("entries"):C:void 0,A="Array"==n&&M.entries||T;if(A&&(w=s(A.call(new t)))!==Object.prototype&&w.next&&(f(w,j,!0),r||"function"==typeof w[l]||u(w,l,h)),_&&T&&T.name!==v&&($=!0,C=function(){return T.call(this)}),r&&!x||!p&&!$&&M[l]||u(M,l,C),c[n]=C,c[j]=h,g)if(m={values:_?C:S(v),keys:y?C:S(d),entries:E},x)for(O in m)O in M||i(M,O,m[O]);else o(o.P+o.F*(p||$),n,m);return m}},"32a6":function(t,n,e){var r=e("241e"),o=e("c3a1");e("ce7e")("keys",function(){return function(t){return o(r(t))}})},"32e9":function(t,n,e){var r=e("86cc"),o=e("4630");t.exports=e("9e1e")?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},"32fc":function(t,n,e){var r=e("e53d").document;t.exports=r&&r.documentElement},"335c":function(t,n,e){var r=e("6b4c");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"355d":function(t,n){n.f={}.propertyIsEnumerable},"35e8":function(t,n,e){var r=e("d9f6"),o=e("aebd");t.exports=e("8e60")?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},"36c3":function(t,n,e){var r=e("335c"),o=e("25eb");t.exports=function(t){return r(o(t))}},3702:function(t,n,e){var r=e("481b"),o=e("5168")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},"3a38":function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},"40c3":function(t,n,e){var r=e("6b4c"),o=e("5168")("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var n,e,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(e){}}(n=Object(t),o))?e:i?r(n):"Object"==(u=r(n))&&"function"==typeof n.callee?"Arguments":u}},4588:function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},"45f2":function(t,n,e){var r=e("d9f6").f,o=e("07e3"),i=e("5168")("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},4630:function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},"469f":function(t,n,e){e("6c1c"),e("1654"),t.exports=e("7d7b")},"481b":function(t,n){t.exports={}},"4aa6":function(t,n,e){t.exports=e("dc62")},"4bf8":function(t,n,e){var r=e("be13");t.exports=function(t){return Object(r(t))}},"4ee1":function(t,n,e){var r=e("5168")("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(u){}t.exports=function(t,n){if(!n&&!o)return!1;var e=!1;try{var i=[7],c=i[r]();c.next=function(){return{done:e=!0}},i[r]=function(){return c},t(i)}catch(u){}return e}},"50ed":function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},5147:function(t,n,e){var r=e("2b4c")("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,!"/./"[t](n)}catch(o){}}return!0}},5168:function(t,n,e){var r=e("dbdb")("wks"),o=e("62a0"),i=e("e53d").Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},5176:function(t,n,e){t.exports=e("51b6")},"51b6":function(t,n,e){e("a3c3"),t.exports=e("584a").Object.assign},"520a":function(t,n,e){var r=e("0bfb"),o=RegExp.prototype.exec,i=String.prototype.replace,u=o,c="lastIndex",a=function(){var t=/a/,n=/b*/g;return o.call(t,"a"),o.call(n,"a"),0!==t[c]||0!==n[c]}(),f=void 0!==/()??/.exec("")[1];(a||f)&&(u=function(t){var n,e,u,s,l=this;return f&&(e=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),a&&(n=l[c]),u=o.call(l,t),a&&u&&(l[c]=l.global?u.index+u[0].length:n),f&&u&&u.length>1&&i.call(u[0],e,function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(u[s]=void 0)}),u}),t.exports=u},"53e2":function(t,n,e){var r=e("07e3"),o=e("241e"),i=e("5559")("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},"549b":function(t,n,e){var r=e("d864"),o=e("63b6"),i=e("241e"),u=e("b0dc"),c=e("3702"),a=e("b447"),f=e("20fd"),s=e("7cd6");o(o.S+o.F*!e("4ee1")(function(t){Array.from(t)}),"Array",{from:function(t){var n,e,o,l,p=i(t),d="function"==typeof this?this:Array,v=arguments.length,h=v>1?arguments[1]:void 0,b=void 0!==h,g=0,y=s(p);if(b&&(h=r(h,v>2?arguments[2]:void 0,2)),null==y||d==Array&&c(y))for(e=new d(n=a(p.length));n>g;g++)f(e,g,b?h(p[g],g):p[g]);else for(l=y.call(p),e=new d;!(o=l.next()).done;g++)f(e,g,b?u(l,h,[o.value,g],!0):o.value);return e.length=g,e}})},"54a1":function(t,n,e){e("6c1c"),e("1654"),t.exports=e("95d5")},5537:function(t,n,e){var r=e("8378"),o=e("7726"),i="__core-js_shared__",u=o[i]||(o[i]={});(t.exports=function(t,n){return u[t]||(u[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e("2d00")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(t,n,e){var r=e("dbdb")("keys"),o=e("62a0");t.exports=function(t){return r[t]||(r[t]=o(t))}},"584a":function(t,n){var e=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=e)},"5b4e":function(t,n,e){var r=e("36c3"),o=e("b447"),i=e("0fc9");t.exports=function(t){return function(n,e,u){var c,a=r(n),f=o(a.length),s=i(u,f);if(t&&e!=e){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((t||s in a)&&a[s]===e)return t||s||0;return!t&&-1}}},"5ca1":function(t,n,e){var r=e("7726"),o=e("8378"),i=e("32e9"),u=e("2aba"),c=e("9b43"),a="prototype",f=function(t,n,e){var s,l,p,d,v=t&f.F,h=t&f.G,b=t&f.S,g=t&f.P,y=t&f.B,x=h?r:b?r[n]||(r[n]={}):(r[n]||{})[a],m=h?o:o[n]||(o[n]={}),O=m[a]||(m[a]={});for(s in h&&(e=n),e)p=((l=!v&&x&&void 0!==x[s])?x:e)[s],d=y&&l?c(p,r):g&&"function"==typeof p?c(Function.call,p):p,x&&u(x,s,p,t&f.U),m[s]!=p&&i(m,s,d),g&&O[s]!=p&&(O[s]=p)};r.core=o,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},"5d73":function(t,n,e){t.exports=e("469f")},"5f1b":function(t,n,e){var r=e("23c6"),o=RegExp.prototype.exec;t.exports=function(t,n){var e=t.exec;if("function"==typeof e){var i=e.call(t,n);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,n)}},"626a":function(t,n,e){var r=e("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"62a0":function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},"63b6":function(t,n,e){var r=e("e53d"),o=e("584a"),i=e("d864"),u=e("35e8"),c=e("07e3"),a="prototype",f=function(t,n,e){var s,l,p,d=t&f.F,v=t&f.G,h=t&f.S,b=t&f.P,g=t&f.B,y=t&f.W,x=v?o:o[n]||(o[n]={}),m=x[a],O=v?r:h?r[n]:(r[n]||{})[a];for(s in v&&(e=n),e)(l=!d&&O&&void 0!==O[s])&&c(x,s)||(p=l?O[s]:e[s],x[s]=v&&"function"!=typeof O[s]?e[s]:g&&l?i(p,r):y&&O[s]==p?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e);}return new t(n,e,r)}return t.apply(this,arguments)};return n[a]=t[a],n}(p):b&&"function"==typeof p?i(Function.call,p):p,b&&((x.virtual||(x.virtual={}))[s]=p,t&f.R&&m&&!m[s]&&u(m,s,p)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},6762:function(t,n,e){var r=e("5ca1"),o=e("c366")(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),e("9c6c")("includes")},6821:function(t,n,e){var r=e("626a"),o=e("be13");t.exports=function(t){return r(o(t))}},"69a8":function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},"6a99":function(t,n,e){var r=e("d3f4");t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"6b4c":function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},"6c1c":function(t,n,e){e("c367");for(var r=e("e53d"),o=e("35e8"),i=e("481b"),u=e("5168")("toStringTag"),c="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),a=0;a<c.length;a++){var f=c[a],s=r[f],l=s&&s.prototype;l&&!l[u]&&o(l,u,f),i[f]=i.Array}},"71c1":function(t,n,e){var r=e("3a38"),o=e("25eb");t.exports=function(t){return function(n,e){var i,u,c=String(o(n)),a=r(e),f=c.length;return a<0||a>=f?t?"":void 0:(i=c.charCodeAt(a))<55296||i>56319||a+1===f||(u=c.charCodeAt(a+1))<56320||u>57343?t?c.charAt(a):i:t?c.slice(a,a+2):u-56320+(i-55296<<10)+65536}}},7726:function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},"774e":function(t,n,e){t.exports=e("d2d5")},"77f1":function(t,n,e){var r=e("4588"),o=Math.max,i=Math.min;t.exports=function(t,n){return(t=r(t))<0?o(t+n,0):i(t,n)}},"794b":function(t,n,e){t.exports=!e("8e60")&&!e("294c")(function(){return 7!=Object.defineProperty(e("1ec9")("div"),"a",{get:function(){return 7}}).a})},"79aa":function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"79e5":function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},"7cd6":function(t,n,e){var r=e("40c3"),o=e("5168")("iterator"),i=e("481b");t.exports=e("584a").getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},"7d7b":function(t,n,e){var r=e("e4ae"),o=e("7cd6");t.exports=e("584a").getIterator=function(t){var n=o(t);if("function"!=typeof n)throw TypeError(t+" is not iterable!");return r(n.call(t))}},"7e90":function(t,n,e){var r=e("d9f6"),o=e("e4ae"),i=e("c3a1");t.exports=e("8e60")?Object.defineProperties:function(t,n){o(t);for(var e,u=i(n),c=u.length,a=0;c>a;)r.f(t,e=u[a++],n[e]);return t}},8378:function(t,n){var e=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=e)},8436:function(t,n){t.exports=function(){}},"86cc":function(t,n,e){var r=e("cb7c"),o=e("c69a"),i=e("6a99"),u=Object.defineProperty;n.f=e("9e1e")?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return u(t,n,e)}catch(c){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},"8aae":function(t,n,e){e("32a6"),t.exports=e("584a").Object.keys},"8e60":function(t,n,e){t.exports=!e("294c")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"8f60":function(t,n,e){var r=e("a159"),o=e("aebd"),i=e("45f2"),u={};e("35e8")(u,e("5168")("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r(u,{next:o(1,e)}),i(t,n+" Iterator")}},9003:function(t,n,e){var r=e("6b4c");t.exports=Array.isArray||function(t){return"Array"==r(t)}},9138:function(t,n,e){t.exports=e("35e8")},9306:function(t,n,e){var r=e("c3a1"),o=e("9aa9"),i=e("355d"),u=e("241e"),c=e("335c"),a=Object.assign;t.exports=!a||e("294c")(function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach(function(t){n[t]=t}),7!=a({},t)[e]||Object.keys(a({},n)).join("")!=r})?function(t,n){for(var e=u(t),a=arguments.length,f=1,s=o.f,l=i.f;a>f;)for(var p,d=c(arguments[f++]),v=s?r(d).concat(s(d)):r(d),h=v.length,b=0;h>b;)l.call(d,p=v[b++])&&(e[p]=d[p]);return e}:a},9427:function(t,n,e){var r=e("63b6");r(r.S,"Object",{create:e("a159")})},"95d5":function(t,n,e){var r=e("40c3"),o=e("5168")("iterator"),i=e("481b");t.exports=e("584a").isIterable=function(t){var n=Object(t);return void 0!==n[o]||"@@iterator"in n||i.hasOwnProperty(r(n))}},"9aa9":function(t,n){n.f=Object.getOwnPropertySymbols},"9b43":function(t,n,e){var r=e("d8e8");t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)};}return function(){return t.apply(n,arguments)}}},"9c6c":function(t,n,e){var r=e("2b4c")("unscopables"),o=Array.prototype;null==o[r]&&e("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9def":function(t,n,e){var r=e("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,n,e){t.exports=!e("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},a159:function(t,n,e){var r=e("e4ae"),o=e("7e90"),i=e("1691"),u=e("5559")("IE_PROTO"),c=function(){},a="prototype",f=function(){var t,n=e("1ec9")("iframe"),r=i.length;for(n.style.display="none",e("32fc").appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("<script>document.F=Object</script>"),t.close(),f=t.F;r--;)delete f[a][i[r]];return f()};t.exports=Object.create||function(t,n){var e;return null!==t?(c[a]=r(t),e=new c,c[a]=null,e[u]=t):e=f(),void 0===n?e:o(e,n)}},a352:function(n,e){n.exports=t},a3c3:function(t,n,e){var r=e("63b6");r(r.S+r.F,"Object",{assign:e("9306")})},a481:function(t,n,e){var r=e("cb7c"),o=e("4bf8"),i=e("9def"),u=e("4588"),c=e("0390"),a=e("5f1b"),f=Math.max,s=Math.min,l=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g,v=function(t){return void 0===t?t:String(t)};e("214f")("replace",2,function(t,n,e,h){return[function(r,o){var i=t(this),u=null==r?void 0:r[n];return void 0!==u?u.call(r,i,o):e.call(String(i),r,o)},function(t,n){var o=h(e,t,this,n);if(o.done)return o.value;var l=r(t),p=String(this),d="function"==typeof n;d||(n=String(n));var g=l.global;if(g){var y=l.unicode;l.lastIndex=0}for(var x=[];;){var m=a(l,p);if(null===m)break;if(x.push(m),!g)break;""===String(m[0])&&(l.lastIndex=c(p,i(l.lastIndex),y))}for(var O="",w=0,S=0;S<x.length;S++){m=x[S];for(var j=String(m[0]),_=f(s(u(m.index),p.length),0),$=[],M=1;M<m.length;M++)$.push(v(m[M]));var T=m.groups;if(d){var C=[j].concat($,_,p);void 0!==T&&C.push(T);var E=String(n.apply(void 0,C))}else E=b(j,p,_,$,T,n);_>=w&&(O+=p.slice(w,_)+E,w=_+j.length)}return O+p.slice(w)}];function b(t,n,r,i,u,c){var a=r+t.length,f=i.length,s=d;return void 0!==u&&(u=o(u),s=p),e.call(c,s,function(e,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(a);case"<":c=u[o.slice(1,-1)];break;default:var s=+o;if(0===s)return e;if(s>f){var p=l(s/10);return 0===p?e:p<=f?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):e}c=i[s-1];}return void 0===c?"":c})}})},a4bb:function(t,n,e){t.exports=e("8aae")},a745:function(t,n,e){t.exports=e("f410")},aae3:function(t,n,e){var r=e("d3f4"),o=e("2d95"),i=e("2b4c")("match");t.exports=function(t){var n;return r(t)&&(void 0!==(n=t[i])?!!n:"RegExp"==o(t))}},aebd:function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},b0c5:function(t,n,e){var r=e("520a");e("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},b0dc:function(t,n,e){var r=e("e4ae");t.exports=function(t,n,e,o){try{return o?n(r(e)[0],e[1]):n(e)}catch(u){var i=t.return;throw void 0!==i&&r(i.call(t)),u}}},b447:function(t,n,e){var r=e("3a38"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},b8e3:function(t,n){t.exports=!0},be13:function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},c366:function(t,n,e){var r=e("6821"),o=e("9def"),i=e("77f1");t.exports=function(t){return function(n,e,u){var c,a=r(n),f=o(a.length),s=i(u,f);if(t&&e!=e){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((t||s in a)&&a[s]===e)return t||s||0;return!t&&-1}}},c367:function(t,n,e){var r=e("8436"),o=e("50ed"),i=e("481b"),u=e("36c3");t.exports=e("30f1")(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,o(1)):o(0,"keys"==n?e:"values"==n?t[e]:[e,t[e]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},c3a1:function(t,n,e){var r=e("e6f3"),o=e("1691");t.exports=Object.keys||function(t){return r(t,o)}},c649:function(t,n,e){(function(t){e.d(n,"c",function(){return f}),e.d(n,"a",function(){return c}),e.d(n,"b",function(){return i}),e.d(n,"d",function(){return a}),e("a481");var r=e("4aa6"),o=e.n(r);var i="undefined"!=typeof window?window.console:t.console;var u=/-(\w)/g,c=function(t){var n=o()(null);return function(e){return n[e]||(n[e]=t(e))}}(function(t){return t.replace(u,function(t,n){return n?n.toUpperCase():""})});function a(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function f(t,n,e){var r=0===e?t.children[0]:t.children[e-1].nextSibling;t.insertBefore(n,r)}}).call(this,e("c8ba"))},c69a:function(t,n,e){t.exports=!e("9e1e")&&!e("79e5")(function(){return 7!=Object.defineProperty(e("230e")("div"),"a",{get:function(){return 7}}).a})},c8ba:function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(r){"object"==typeof window&&(e=window)}t.exports=e},c8bb:function(t,n,e){t.exports=e("54a1")},ca5a:function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},cb7c:function(t,n,e){var r=e("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ce7e:function(t,n,e){var r=e("63b6"),o=e("584a"),i=e("294c");t.exports=function(t,n){var e=(o.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*i(function(){e(1)}),"Object",u)}},d2c8:function(t,n,e){var r=e("aae3"),o=e("be13");t.exports=function(t,n,e){if(r(n))throw TypeError("String#"+e+" doesn't accept regex!");return String(o(t))}},d2d5:function(t,n,e){e("1654"),e("549b"),t.exports=e("584a").Array.from},d3f4:function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},d864:function(t,n,e){var r=e("79aa");t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)};}return function(){return t.apply(n,arguments)}}},d8e8:function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},d9f6:function(t,n,e){var r=e("e4ae"),o=e("794b"),i=e("1bc3"),u=Object.defineProperty;n.f=e("8e60")?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return u(t,n,e)}catch(c){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},dbdb:function(t,n,e){var r=e("584a"),o=e("e53d"),i="__core-js_shared__",u=o[i]||(o[i]={});(t.exports=function(t,n){return u[t]||(u[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e("b8e3")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},dc62:function(t,n,e){e("9427");var r=e("584a").Object;t.exports=function(t,n){return r.create(t,n)}},e4ae:function(t,n,e){var r=e("f772");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},e53d:function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},e6f3:function(t,n,e){var r=e("07e3"),o=e("36c3"),i=e("5b4e")(!1),u=e("5559")("IE_PROTO");t.exports=function(t,n){var e,c=o(t),a=0,f=[];for(e in c)e!=u&&r(c,e)&&f.push(e);for(;n.length>a;)r(c,e=n[a++])&&(~i(f,e)||f.push(e));return f}},f410:function(t,n,e){e("1af6"),t.exports=e("584a").Array.isArray},f559:function(t,n,e){var r=e("5ca1"),o=e("9def"),i=e("d2c8"),u="startsWith",c=""[u];r(r.P+r.F*e("5147")(u),"String",{startsWith:function(t){var n=i(this,t,u),e=o(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),r=String(t);return c?c.call(n,r,e):n.slice(e,e+r.length)===r}})},f772:function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},fa5b:function(t,n,e){t.exports=e("5537")("native-function-to-string",Function.toString)},fb15:function(t,n,e){var r;e.r(n),"undefined"!=typeof window&&(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^\/]+\.js(\?.*)?$/))&&(e.p=r[1]);var o=e("5176"),i=e.n(o),u=(e("f559"),e("a4bb")),c=e.n(u),a=(e("6762"),e("2fdb"),e("a745")),f=e.n(a);var s=e("5d73"),l=e.n(s);function p(t,n){return function(t){if(f()(t))return t}(t)||function(t,n){var e=[],r=!0,o=!1,i=void 0;try{for(var u,c=l()(t);!(r=(u=c.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(a){o=!0,i=a}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var d=e("774e"),v=e.n(d),h=e("c8bb"),b=e.n(h);function g(t){return function(t){if(f()(t)){for(var n=0,e=new Array(t.length);n<t.length;n++)e[n]=t[n];return e}}(t)||function(t){if(b()(Object(t))||"[object Arguments]"===Object.prototype.toString.call(t))return v()(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var y=e("a352"),x=e.n(y),m=e("c649");function O(t,n){var e=this;this.$nextTick(function(){return e.$emit(t.toLowerCase(),n)})}function w(t,n){var e=null,r=function(t,n){e=function(t,n,e){return void 0===e?t:((t=t||{})[n]=e,t)}(e,t,n)};if(r("attrs",c()(t).filter(function(t){return"id"===t||t.startsWith("data-")}).reduce(function(n,e){return n[e]=t[e],n},{})),!n)return e;var o=n.on,u=n.props,a=n.attrs;return r("on",o),r("props",u),i()(e.attrs,a),e}var S=["Start","Add","Remove","Update","End"],j=["Choose","Sort","Filter","Clone"],_=["Move"].concat(S,j).map(function(t){return"on"+t}),$=null,M={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(t){return t}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1,init:!1}},render:function(t){var n=this.$slots.default;this.transitionMode=function(t){if(!t||1!==t.length)return!1;var n=p(t,1)[0].componentOptions;return!!n&&["transition-group","TransitionGroup"].includes(n.tag)}(n);var e=function(t,n){var e=n.header,r=n.footer,o=0,i=0;return e&&(o=e.length,t=t?[].concat(g(e),g(t)):g(e)),r&&(i=r.length,t=t?[].concat(g(t),g(r)):g(r)),{children:t,headerOffset:o,footerOffset:i}}(n,this.$slots),r=e.children,o=e.headerOffset,i=e.footerOffset;this.headerOffset=o,this.footerOffset=i;var u=w(this.$attrs,this.componentData);return t(this.getTag(),u,r)},created:function(){null!==this.list&&null!==this.value&&m.b.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&m.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&m.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var t=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var n={};S.forEach(function(e){n["on"+e]=function(t){var n=this;return function(e){null!==n.realList&&n["onDrag"+t](e),O.call(n,t,e)}}.call(t,e)}),j.forEach(function(e){n["on"+e]=O.bind(t,e)});var e=c()(this.$attrs).reduce(function(n,e){return n[Object(m.a)(e)]=t.$attrs[e],n},{}),r=i()({},this.options,e,n,{onMove:function(n,e){return t.onDragMove(n,e)}});!("draggable"in r)&&(r.draggable=">*"),this._sortable=new x.a(this.rootContainer,r),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(t){this.updateOptions(t)},deep:!0},$attrs:{handler:function(t){this.updateOptions(t)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getTag:function(){return this.tag||this.element},updateOptions:function(t){for(var n in t){var e=Object(m.a)(n);-1===_.indexOf(e)&&this._sortable.option(e,t[n])}},getChildrenNodes:function(){if(this.init||(this.noneFunctionalComponentMode=this.noneFunctionalComponentMode&&1===this.$children.length,this.init=!0),this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var t=this.$slots.default;return this.transitionMode?t[0].child.$slots.default:t},computeIndexes:function(){var t=this;this.$nextTick(function(){t.visibleIndexes=function(t,n,e,r){if(!t)return[];var o=t.map(function(t){return t.elm}),i=n.length-r,u=g(n).map(function(t,n){return n>=i?o.length:o.indexOf(t)});return e?u.filter(function(t){return-1!==t}):u}(t.getChildrenNodes(),t.rootContainer.children,t.transitionMode,t.footerOffset)})},getUnderlyingVm:function(t){var n=function(t,n){return t.map(function(t){return t.elm}).indexOf(n)}(this.getChildrenNodes()||[],t);return-1===n?null:{index:n,element:this.realList[n]}},getUnderlyingPotencialDraggableComponent:function(t){var n=t.__vue__;return n&&n.$options&&"transition-group"===n.$options._componentTag?n.$parent:n},emitChanges:function(t){var n=this;this.$nextTick(function(){n.$emit("change",t)})},alterList:function(t){if(this.list)t(this.list);else{var n=g(this.value);t(n),this.$emit("input",n)}},spliceList:function(){var t=arguments;this.alterList(function(n){return n.splice.apply(n,g(t))})},updatePosition:function(t,n){this.alterList(function(e){return e.splice(n,0,e.splice(t,1)[0])})},getRelatedContextFromMoveEvent:function(t){var n=t.to,e=t.related,r=this.getUnderlyingPotencialDraggableComponent(n);if(!r)return{component:r};var o=r.realList,u={list:o,component:r};if(n!==e&&o&&r.getUnderlyingVm){var c=r.getUnderlyingVm(e);if(c)return i()(c,u)}return u},getVmIndex:function(t){var n=this.visibleIndexes,e=n.length;return t>e-1?e:n[t]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(t){if(this.noTransitionOnDrag&&this.transitionMode){this.getChildrenNodes()[t].data=null;var n=this.getComponent();n.children=[],n.kept=void 0}},onDragStart:function(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),$=t.item},onDragAdd:function(t){var n=t.item._underlying_vm_;if(void 0!==n){Object(m.d)(t.item);var e=this.getVmIndex(t.newIndex);this.spliceList(e,0,n),this.computeIndexes();var r={element:n,newIndex:e};this.emitChanges({added:r})}},onDragRemove:function(t){if(Object(m.c)(this.rootContainer,t.item,t.oldIndex),"clone"!==t.pullMode){var n=this.context.index;this.spliceList(n,1);var e={element:this.context.element,oldIndex:n};this.resetTransitionData(n),this.emitChanges({removed:e})}else Object(m.d)(t.clone)},onDragUpdate:function(t){Object(m.d)(t.item),Object(m.c)(t.from,t.item,t.oldIndex);var n=this.context.index,e=this.getVmIndex(t.newIndex);this.updatePosition(n,e);var r={element:this.context.element,oldIndex:n,newIndex:e};this.emitChanges({moved:r})},updateProperty:function(t,n){t.hasOwnProperty(n)&&(t[n]+=this.headerOffset)},computeFutureIndex:function(t,n){if(!t.element)return 0;var e=g(n.to.children).filter(function(t){return"none"!==t.style.display}),r=e.indexOf(n.related),o=t.component.getVmIndex(r);return-1!==e.indexOf($)||!n.willInsertAfter?o:o+1},onDragMove:function(t,n){var e=this.move;if(!e||!this.realList)return!0;var r=this.getRelatedContextFromMoveEvent(t),o=this.context,u=this.computeFutureIndex(r,t);return i()(o,{futureIndex:u}),e(i()({},t,{relatedContext:r,draggedContext:o}),n)},onDragEnd:function(){this.computeIndexes(),$=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",M);var T=M;n.default=T}}).default});var e={props:{counter:[Boolean,Object],disabled:Boolean,endpoints:Object,input:[String,Number],name:[String,Number],required:Boolean,type:String,value:{type:Array,default:[]},blockConfigs:Object,fieldsets:Object,columns:Number,max:Number,label:String,pageId:String,pageUid:String,encodedPageId:String,parentPath:String,pending:Boolean},data:function(){return{dragging:!1,targetPosition:null,lastUniqueKey:0,cssContents:{},jsContents:{},dialogOpen:!1,extendedBlockConfigs:{}}},components:{BuilderBlock:d},mounted:function(){var e=this;this.pending?this.$api.post("kirby-builder/pages/".concat(this.pageId,"/builderconfig"),{fieldsets:this.fieldsets,value:this.value}).then(function(t){e.extendedBlockConfigs=t.fieldsets,e.value=t.value,e.loadBlockPreviewStyles()}):(this.extendedBlockConfigs=this.fieldsets,null==this.value&&(this.value=Array()),this.loadBlockPreviewStyles())},computed:{classObject:function(){var e={};return e["kBuilder--col-"+this.columnsCount]=!0,e["kBuilder--dragging"]=this.dragging,e},path:function(){return this.parentPath?"".concat(this.parentPath,"+").concat(this.name):this.name},columnsCount:function(){return this.columns?this.columns:"1"},columnWidth:function(){return this.columns?"1/"+this.columns:"1/1"},draggableOptions:function(){return{group:this._uid,handle:".kBuilder__dragDropHandle",forceFallback:!0,fallbackClass:"sortable-fallback",fallbackOnBody:!0,scroll:document.querySelector(".k-panel-view")}},blockCount:function(){return this.value.length},fieldsetCount:function(){return Object.keys(this.extendedBlockConfigs).length},fieldsetKeys:function(){return Object.keys(this.extendedBlockConfigs)},addBlockButtonLabel:function(){return this.$t("add")}},methods:{updateValue:function(e,t){this.$set(this.value,e,t)},loadBlockFormsByConfig:function(e){return"string"==typeof e&&(e={extends:e}),this.$api.post("kirby-builder/pages/".concat(this.pageId,"/blockformbyconfig"),e)},loadBlockPreviewStyles:function(){var e=this;Object.values(this.extendedBlockConfigs).forEach(function(t){if(t.preview&&t.preview.css){var n=t.preview.css;if(!e.cssContents[n])return e.$set(e.cssContents,n,{}),fetch("/"+n.replace(/^\/+/g,"")).then(function(e){return e.text()}).then(function(t){e.$set(e.cssContents,n,t)})}})},onBlockInput:function(e){this.$emit("input",this.value)},onBlockMoved:function(e){this.$emit("input",this.value)},onBlockAdded:function(e){this.$emit("input",this.value)},onBlockRemoved:function(e){this.$emit("input",this.value)},onDragEnd:function(e){this.dragging=!1},onMove:function(e){return this.$root.$emit("blockMoved"),e.relatedContext.index!=this.value.length+1},onStartDrag:function(e){this.dragging=!0;var t=e.item.getElementsByClassName("kBuilderPreview__frame")[0];if(t){var n=t.contentWindow.document,i=document.getElementsByClassName("sortable-drag")[0].getElementsByClassName("kBuilderPreview__frame")[0].contentWindow.document;i.open(),i.write(n.documentElement.innerHTML),i.close()}},onClickAddBlock:function(e){this.targetPosition=e,1==this.fieldsetCount?this.addBlock(this.fieldsetKeys[0]):this.$refs.dialog.open()},onOpenDialog:function(){this.dialogOpen=!0},onCloseDialog:function(){this.dialogOpen=!1},addBlock:function(e){null==this.value&&(this.value=[]);var t=null==this.targetPosition?this.value.length:this.targetPosition,n=this.extendedBlockConfigs[e];this.value.splice(t,0,this.getBlankContent(e,n)),this.targetPosition=null,this.dialogOpen&&this.$refs.dialog.close(),this.$emit("input",this.value)},cloneBlock:function(e,t,n,i){var o=JSON.parse(JSON.stringify(this.value[e]));this.deepRemoveProperty(o,"_uid"),this.value.splice(e+1,0,o);var l=this.value[e+1];l.uniqueKey=this.lastUniqueKey++,null!=t&&(l.showPreviewInitially=t),null!=n&&(l.expandedInitially=n),i&&(l.activeFieldSetInitially=i),this.$emit("input",this.value)},deleteBlock:function(e){this.clearLocalUiStates(this.value[e]),this.value.splice(e,1),this.$emit("input",this.value)},getBlankContent:function(e,t){return{_key:e,_uid:e+"_"+new Date().valueOf()+"_"+this._uid}},deepRemoveProperty:function(e,t){var n=this;Object.keys(e).forEach(function(i){i===t?delete e[i]:e[i]&&"object"===k(e[i])&&n.deepRemoveProperty(e[i],t)})},clearLocalUiStates:function(e){for(var t in e)if(e.hasOwnProperty(t)){e[t];"_uid"===t?localStorage.removeItem("kBuilder.uiState.".concat(e[t])):"object"===k(e[t])&&this.clearLocalUiStates(e[t])}}}};if(typeof e==="function"){e=e.options}Object.assign(e,function(){var render=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("k-field",{staticClass:"kBuilder",class:_vm.classObject,attrs:{"label":_vm.label}},[_c("k-draggable",{staticClass:"kBuilder__blocks k-grid",attrs:{"move":_vm.onMove,"list":_vm.value,"options":_vm.draggableOptions},on:{"update":_vm.onBlockMoved,"add":_vm.onBlockAdded,"remove":_vm.onBlockRemoved,"end":_vm.onDragEnd}},[_vm._l(_vm.value,function(blockValue,index){return _vm.extendedBlockConfigs[blockValue._key]?_c("k-column",{key:blockValue._uid,staticClass:"kBuilder__column",attrs:{"width":_vm.columnWidth}},[!_vm.max||_vm.blockCount<_vm.max?_c("div",{staticClass:"kBuilder__inlineAddButton",class:{"kBuilder__inlineAddButton--horizontal":_vm.columnsCount==1,"kBuilder__inlineAddButton--vertical":_vm.columnsCount>1},on:{"click":function($event){_vm.onClickAddBlock(index)}}}):_vm._e(),_vm._v(" "),_c("builder-block",{attrs:{"page-id":_vm.pageId,"page-uid":_vm.pageUid,"encoded-page-id":_vm.encodedPageId,"endpoints":_vm.endpoints,"value":blockValue,"label":_vm.extendedBlockConfigs[blockValue._key].label||_vm.extendedBlockConfigs[blockValue._key].name,"blockConfig":_vm.extendedBlockConfigs[blockValue._key],"fieldGroup":_vm.extendedBlockConfigs[blockValue._key],"index":index,"columns-count":_vm.columnsCount,"styles":_vm.cssContents[blockValue._key],"script":_vm.jsContents[blockValue._key],"parentPath":_vm.path,"canDuplicate":!_vm.max||_vm.blockCount<_vm.max,"cssContent":_vm.extendedBlockConfigs[blockValue._key].preview&&_vm.cssContents[_vm.extendedBlockConfigs[blockValue._key].preview.css]?_vm.cssContents[_vm.extendedBlockConfigs[blockValue._key].preview.css]:"","cssContents":_vm.cssContents},on:{"input":_vm.onBlockInput,"clone":_vm.cloneBlock,"delete":_vm.deleteBlock,"transformed":function($event){_vm.updateValue(index,$event)}}}),_vm._v(" "),_vm.columnsCount%index==0&&_vm.columnsCount>1&&(!_vm.max||_vm.blockCount<_vm.max)?_c("div",{staticClass:"kBuilder__inlineAddButton kBuilder__inlineAddButton--vertical kBuilder__inlineAddButton--after",on:{"click":function($event){_vm.onClickAddBlock(index+1)}}}):_vm._e()],1):_vm._e()}),_vm._v(" "),!_vm.max||_vm.blockCount<_vm.max?_c("k-column",{attrs:{"width":_vm.columnWidth}},[_c("k-button",{staticClass:"kBuilder__addButton",attrs:{"icon":"add"},on:{"click":function($event){_vm.onClickAddBlock()}}},[_vm._v(_vm._s(_vm.addBlockButtonLabel))])],1):_vm._e()],2),_vm._v(" "),_c("k-dialog",{ref:"dialog",staticClass:"kBuilder__dialog",on:{"open":_vm.onOpenDialog,"close":_vm.onCloseDialog}},[_c("k-list",_vm._l(_vm.extendedBlockConfigs,function(value,key){return _c("k-list-item",{key:key,class:["kBuilder__addBlockButton","kBuilder__addBlockButton--"+key],attrs:{"text":value.name||value.label},on:{"click":function($event){_vm.addBlock(key)}}},[_c("template",{slot:"options"},[_c("k-icon",{staticClass:"kBuilder__addBlockButtonIcon",attrs:{"type":"add"}})],1)],2)}),1)],1)],1)};var staticRenderFns=[];return{render:render,staticRenderFns:staticRenderFns,_compiled:true,_scopeId:null,functional:undefined}}());panel.plugin("timoetting/k-builder",{fields:{builder:e}});})();