webpackJsonp([20],{DAYN:function(t,e,i){"use strict";varn=Object.assign||function(t){for(vare=1;e<arguments.length;e++){vari=arguments[e];for(varnini)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}returnt};functions(t){if(Array.isArray(t)){for(vare=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];returni}returnArray.from(t)}!function(){functione(t){functione(t){t.parentElement.removeChild(t)}functioni(t,e,i){varn=0===i?t.children[0]:t.children[i-1].nextSibling;t.insertBefore(e,n)}functiono(t,e){vari=this;this.$nextTick(function(){returni.$emit(t.toLowerCase(),e)})}vara=["Start","Add","Remove","Update","End"],l=["Choose","Sort","Filter","Clone"],d=["Move"].concat(a,l).map(function(t){return"on"+t}),r=null;return{name:"draggable",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){returnt}},element:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1,init:!1}},render:function(t){vare=this.$slots.default;if(e&&1===e.length){vari=e[0];i.componentOptions&&"transition-group"===i.componentOptions.tag&&(this.transitionMode=!0)}varn=e,o=this.$slots.footer;o&&(n=e?[].concat(s(e),s(o)):[].concat(s(o)));vara=null,l=function(t,e){a=function(t,e,i){returnvoid0==i?t:((t=null==t?{}:t)[e]=i,t)}(a,t,e)};if(l("attrs",this.$attrs),this.componentData){vard=this.componentData,r=d.on,c=d.props;l("on",r),l("props",c)}returnt(this.element,a,n)},mounted:function(){vare=this;if(this.noneFunctionalComponentMode=this.element.toLowerCase()!==this.$el.nodeName.toLowerCase(),this.noneFunctionalComponentMode&&this.transitionMode)thrownewError("Transition-group inside component is not supported. Please alter element value or remove transition-group. Current element value: "+this.element);vari={};a.forEach(function(t){i["on"+t]=function(t){vare=this;returnfunction(i){null!==e.realList&&e["onDrag"+t](i),o.call(e,t,i)}}.call(e,t)}),l.forEach(function(t){i["on"+t]=o.bind(e,t)});vars=n({},this.options,i,{onMove:function(t,i){returne.onDragMove(t,i)}});!("draggable"ins)&&(s.draggable=">*"),this._sortable=newt(this.rootContainer,s),this.computeIndexes()},beforeDestroy:function(){this._sortable.destroy()},computed:{rootContainer:function(){returnthis.transitionMode?this.$el.children[0]:this.$el},isCloning:function(){return!!this.options&&!!this.options.group&&"clone"===this.options.group.pull},realList:function(){returnthis.list?this.list:this.value}},watch:{options:{handler:function(t){for(vareint)-1==d.indexOf(e)&&this._sortable.option(e,t[e])},deep:!0},realList:function(){this.computeIndexes()}},methods:{getChildrenNodes:function(){if(this.init||(this.noneFunctionalComponentMode=this.noneFunctionalComponentMode&&1==this.$children.length,this.init=!0),this.noneFunctionalComponentMode)returnthis.$children[0].$slots.default;vart=this.$slots.default;returnthis.transitionMode?t[0].child.$slots.default:t},computeIndexes:function(){vart=this;this.$nextTick(function(){t.visibleIndexes=function(t,e,i){if(!t)return[];varn=t.map(function(t){returnt.elm}),o=[].concat(s(e)).map(function(t){returnn.indexOf(t)});returni?o.filter(function(t){return-1!==t}):o}(t.getChildrenNodes(),t.rootContainer.children,t.transitionMode)})},getUnderlyingVm:function(t){vare=function(t,e){returnt.map(function(t){returnt.elm}).indexOf(e)}(this.getChildrenNodes()||[],t);return-1===e?null:{index:e,element:this.realList[e]}},getUnderlyingPotencialDraggableComponent:function(t){vare=t.__vue__;returne&&e.$options&&"transition-group"===e.$options._componentTag?e.$parent:e},emitChanges:function(t){vare=this;this.$nextTick(function(){e.$emit("change",t)})},alterList:function(t){if(this.list)t(this.list);else{vare=[].concat(s(this.value));t(e),this.$emit("input",e)}},spliceList:function(){vart=arguments,e=function(e){returne.splice.apply(e,t)};this.alterList(e)},updatePosition:function(t,e){vari=function(i){returni.splice(e,0,i.splice(t,1)[0])};this.alterList(i)},getRelatedContextFromMoveEvent:function(t){vare=t.to,i=t.related,s=this.getUnderlyingPotencialDraggableComponent(e);if(!s)return{component:s};varo=s.realList,a={list:o,component:s};if(e!==i&&o&&s.getUnderlyingVm){varl=s.getUnderlyingVm(i);if(l)returnn(l,a)}returna},getVmIndex:function(t){vare=this.visibleIndexes,i=e.length;returnt>i-1?i:e[t]},getComponent:function(){returnthis.$slots.default[0].componentInstance},resetTransitionData:function(t){if(this.noTransitionOnDrag&&this.transitionMode){this.getChildrenNodes()[t].data=null;vare=this.getComponent();e.children=[],e.kept=void0}},onDragStart:function(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),r=t.item},onDragAdd:function(t){vari=t.item._underlying_vm_;if(void0!==i){e(t.item);varn=this.getVmIndex(t.newIndex);this.spliceList(n,0,i),this.computeIndexes();vars={element:i,newIndex:n};this.emitChanges({added:s})}},onDragRemove:function(t){if(i(this.rootContainer,t.item,t.oldIndex),this.isCloning)e(t.clone);else{varn=this.context.index;this.spliceList(n,1);vars={element:this.context.element,oldIndex:n};this.resetTransitionData(n),this.emitChanges({removed:s})}},onDragUpdate:function(t){e(t.item),i(t.from,t.item,t.oldIndex);varn=this.context.index,s=this.getVmIndex(t.newIndex);this.updatePosition(n,s);varo={element:this.context.element,oldIndex:n,newIndex:s};this.emitChanges({moved:o})},computeFutureIndex:function(t,e){if(!t.element)return0;vari=[].concat(s(e.to.children)).filter(function(t){return"none"!==t.style.display}),n=i.indexOf(e.related),o=t.component.getVmIndex(n);return-1!=i.indexOf(r)||!e.willInsertAfter?o:o+1},onDragMove:function(t,e){vari=this.move;if(!i||!this.realList)return!0;vars=this.getRelatedContextFromMoveEvent(t),o=this.context,a=this.computeFutureIndex(s,t);returnn(o,{futureIndex:a}),n(t,{relatedContext:s,draggedContext:o}),i(t,e)},onDragEnd:function(t){this.computeIndexes(),r=null}}}}Array.from||(Array.from=function(t){return[].slice.call(t)});varo=i("Lokx");t.exports=e(o)}()},Lokx:function(t,e,i){varn,s;