//>>built
/*
 Sortable 1.8.4 - MIT | git://github.com/SortableJS/Sortable.git */
!function(y){"function"==typeof define&&define.amd?define(y):"undefined"!=typeof module&&void 0!==module.exports?module.exports=y():window.Sortable=y()}(function(){function y(a,b){if(!a||!a.nodeType||1!==a.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(a);this.el=a;this.options=b=Ta({},b);a[G]=this;var c={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(a.nodeName)?"\x3eli":"\x3e*",
swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return nb(a,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(f,h){f.setData("Text",h.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,touchStartThreshold:S(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",
fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==y.supportPointer&&("PointerEvent"in window||window.navigator&&"msPointerEnabled"in window.navigator),emptyInsertThreshold:5},e;for(e in c)e in b||(b[e]=c[e]);for(var d in ob(b),this)"_"===d.charAt(0)&&"function"==typeof this[d]&&(this[d]=this[d].bind(this));(this.nativeDraggable=!b.forceFallback&&Kb)&&(this.options.touchStartThreshold=1);b.supportPointer?u(a,"pointerdown",this._onTapStart):(u(a,"mousedown",this._onTapStart),
u(a,"touchstart",this._onTapStart));this.nativeDraggable&&(u(a,"dragover",this),u(a,"dragenter",this));ia.push(this.el);b.store&&b.store.get&&this.sort(b.store.get(this)||[])}function L(a,b,c,e){if(a){c=c||m;do{if(null!=b&&("\x3e"===b[0]&&a.parentNode===c&&pb(a,b.substring(1))||pb(a,b))||e&&a===c)return a;if(a===c)break}while(a=(d=a).host&&d!==m&&d.host.nodeType?d.host:d.parentNode)}var d;return null}function u(a,b,c){a.addEventListener(b,c,qb)}function v(a,b,c){a.removeEventListener(b,c,qb)}function Q(a,
b,c){if(a&&b)if(a.classList)a.classList[c?"add":"remove"](b);else{var e=(" "+a.className+" ").replace(rb," ").replace(" "+b+" "," ");a.className=(e+(c?" "+b:"")).replace(rb," ")}}function p(a,b,c){var e=a&&a.style;if(e){if(void 0===c)return m.defaultView&&m.defaultView.getComputedStyle?c=m.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in e||-1!==b.indexOf("webkit")||(b="-webkit-"+b);e[b]=c+("string"==typeof c?"":"px")}}function Fa(a){var b="";do{var c=p(a,
"transform");c&&"none"!==c&&(b=c+" "+b)}while(a=a.parentNode);return window.DOMMatrix?new DOMMatrix(b):window.WebKitCSSMatrix?new WebKitCSSMatrix(b):window.CSSMatrix?new CSSMatrix(b):void 0}function sb(a,b,c){if(a){a=a.getElementsByTagName(b);b=0;var e=a.length;if(c)for(;b<e;b++)c(a[b],b);return a}return[]}function M(a,b,c,e,d,f,h,k,l){var n,t=(a=a||b[G]).options,w="on"+c.charAt(0).toUpperCase()+c.substr(1);!window.CustomEvent||T||xa?(n=m.createEvent("Event")).initEvent(c,!0,!0):n=new CustomEvent(c,
{bubbles:!0,cancelable:!0});n.to=d||b;n.from=f||b;n.item=e||b;n.clone=x;n.oldIndex=h;n.newIndex=k;n.originalEvent=l;n.pullMode=K?K.lastPutMode:void 0;b&&b.dispatchEvent(n);t[w]&&t[w].call(a,n)}function tb(a,b,c,e,d,f,h,k){var l,n,t=a[G],w=t.options.onMove;return!window.CustomEvent||T||xa?(l=m.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=b,l.from=a,l.dragged=c,l.draggedRect=e,l.related=d||b,l.relatedRect=f||z(b),l.willInsertAfter=k,l.originalEvent=
h,a.dispatchEvent(l),w&&(n=w.call(t,l,h)),n}function Ua(a){a.draggable=!1}function Lb(){Va=!1}function Wa(a,b,c){for(var e=0,d=0,f=a.children;d<f.length;){if("none"!==f[d].style.display&&f[d]!==r&&f[d]!==g&&L(f[d],c.draggable,a,!1)){if(e===b)return f[d];e++}d++}return null}function Xa(a){for(a=a.lastElementChild;a&&(a===r||"none"===a.style.display);)a=a.previousElementSibling;return a||null}function ub(a){return na(g)<na(a)?1:-1}function Mb(a){a=a.tagName+a.className+a.src+a.href+a.textContent;for(var b=
a.length,c=0;b--;)c+=a.charCodeAt(b);return c.toString(36)}function na(a,b){b=0;if(!a||!a.parentNode)return-1;for(;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&a!==x&&b++;return b}function pb(a,b){if(a)try{if(a.matches)return a.matches(b);if(a.msMatchesSelector)return a.msMatchesSelector(b);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(b)}catch(c){}return!1}function vb(a,b){return function(){if(!ya){var c=arguments,e=this;ya=qa(function(){1===c.length?a.call(e,
c[0]):a.apply(e,c);ya=void 0},b)}}}function Ta(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function wb(a){return Ya&&Ya.dom?Ya.dom(a).cloneNode(!0):xb?xb(a).clone(!0)[0]:a.cloneNode(!0)}function Ga(a){return qa(a,0)}function z(a,b,c,e){if(a.getBoundingClientRect||a===Z){var d,f,h,k,l,n,t;if(t=a!==Z&&a!==ba()?(f=(d=a.getBoundingClientRect()).top,h=d.left,k=d.bottom,l=d.right,n=d.height,d.width):(h=f=0,k=window.innerHeight,l=window.innerWidth,n=window.innerHeight,window.innerWidth),
e&&a!==Z&&(c=c||a.parentNode,!T)){do if(c&&c.getBoundingClientRect&&"none"!==p(c,"transform")){k=c.getBoundingClientRect();f-=k.top+S(p(c,"border-top-width"));h-=k.left+S(p(c,"border-left-width"));k=f+d.height;l=h+d.width;break}while(c=c.parentNode)}b&&a!==Z&&(b=(a=Fa(c||a))&&a.a,c=a&&a.d,a&&(k=(f/=c)+(n/=c),l=(h/=b)+(t/=b)));return{top:f,left:h,bottom:k,right:l,width:t,height:n}}}function yb(a,b){var c=ja(a,!0);for(a=z(a)[b];c;){var e=z(c)[b];if(!("top"===b||"left"===b?e<=a:a<=e))return c;if(c===
ba())break;c=ja(c,!1)}return!1}function zb(a){var b=0,c=0,e=ba();if(a){do{var d=Fa(a),f=d.d;b+=a.scrollLeft*d.a;c+=a.scrollTop*f}while(a!==e&&(a=a.parentNode))}return[b,c]}if("undefined"==typeof window||!window.document)return function(){throw Error("Sortable.js requires a window with a document");};var g,D,r,x,q,oa,Za,ra,$a,ab,N,R,Ha,K,sa,bb,cb,za,H,Ia,ta,Aa,Ba,Ja,B,ua,A=[],db=!1,Ca=!1,Ka=!1,ia=[],Da=!1,La=!1,eb=[],rb=/\s+/g,G="Sortable"+(new Date).getTime(),Z=window,m=Z.document,S=Z.parseInt,qa=
Z.setTimeout,xb=Z.jQuery||Z.Zepto,Ya=Z.Polymer,qb={capture:!1,passive:!1},T=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),xa=!!navigator.userAgent.match(/Edge/i),Ab=!!navigator.userAgent.match(/firefox/i),fb=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),Ma=!!navigator.userAgent.match(/iP(ad|od|hone)/i),Bb=xa||T?"cssFloat":"float",Kb="draggable"in m.createElement("div"),gb=function(){if(T)return!1;var a=
m.createElement("x");return a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents}(),Va=!1,hb=!1,ca=Math.abs,Nb=Math.min,Ob=Math.max,Na=[],nb=function(a,b){var c=p(a),e=S(c.width)-S(c.paddingLeft)-S(c.paddingRight)-S(c.borderLeftWidth)-S(c.borderRightWidth),d=Wa(a,0,b);a=Wa(a,1,b);var f=d&&p(d);b=a&&p(a);var h=f&&S(f.marginLeft)+S(f.marginRight)+z(d).width,k=b&&S(b.marginLeft)+S(b.marginRight)+z(a).width;return"flex"===c.display?"column"===c.flexDirection||"column-reverse"===c.flexDirection?
"vertical":"horizontal":"grid"===c.display?1>=c.gridTemplateColumns.split(" ").length?"vertical":"horizontal":d&&"none"!==f.float?(c="left"===f.float?"left":"right",!a||"both"!==b.clear&&b.clear!==c?"horizontal":"vertical"):d&&("block"===f.display||"flex"===f.display||"table"===f.display||"grid"===f.display||e<=h&&"none"===c[Bb]||a&&"none"===c[Bb]&&e<h+k)?"vertical":"horizontal"},ja=function(a,b){if(!a||!a.getBoundingClientRect)return ba();var c=!1;do if(a.clientWidth<a.scrollWidth||a.clientHeight<
a.scrollHeight){var e=p(a);if(a.clientWidth<a.scrollWidth&&("auto"==e.overflowX||"scroll"==e.overflowX)||a.clientHeight<a.scrollHeight&&("auto"==e.overflowY||"scroll"==e.overflowY)){if(!a||!a.getBoundingClientRect||a===m.body)break;if(c||b)return a;c=!0}}while(a=a.parentNode);return ba()},ba=function(){return T?m.documentElement:m.scrollingElement},Cb=function(a,b,c){a.scrollLeft+=b;a.scrollTop+=c},ib=vb(function(a,b,c,e){if(b.scroll){var d=c?c[G]:window,f=b.scrollSensitivity,h=b.scrollSpeed,k=a.clientX,
l=a.clientY,n=ba(),t=!1;$a!==c&&(Oa(),ra=b.scroll,ab=b.scrollFn,!0===ra&&(ra=ja(c,!0),$a=ra));c=0;var w=ra;do{var E,U,F,da,V,I,W,C=w,O=z(C);var ka=O.top;var ea=O.bottom;var fa=O.left;var Pa=O.right,va=O.width;O=O.height;if(E=C.scrollWidth,U=C.scrollHeight,F=p(C),I=C.scrollLeft,W=C.scrollTop,V=C===n?(da=va<E&&("auto"===F.overflowX||"scroll"===F.overflowX||"visible"===F.overflowX),O<U&&("auto"===F.overflowY||"scroll"===F.overflowY||"visible"===F.overflowY)):(da=va<E&&("auto"===F.overflowX||"scroll"===
F.overflowX),O<U&&("auto"===F.overflowY||"scroll"===F.overflowY)),fa=da&&(ca(Pa-k)<=f&&I+va<E)-(ca(fa-k)<=f&&!!I),ka=V&&(ca(ea-l)<=f&&W+O<U)-(ca(ka-l)<=f&&!!W),!A[c])for(ea=0;ea<=c;ea++)A[ea]||(A[ea]={});A[c].vx==fa&&A[c].vy==ka&&A[c].el===C||(A[c].el=C,A[c].vx=fa,A[c].vy=ka,clearInterval(A[c].pid),!C||0==fa&&0==ka||(t=!0,A[c].pid=setInterval(function(){e&&0===this.layer&&(y.active._emulateDragOver(!0),y.active._onTouchMove(H,!0));var X=A[this.layer].vy?A[this.layer].vy*h:0,J=A[this.layer].vx?A[this.layer].vx*
h:0;"function"==typeof ab&&"continue"!==ab.call(d,J,X,a,H,A[this.layer].el)||Cb(A[this.layer].el,J,X)}.bind({layer:c}),24)));c++}while(b.bubbleScroll&&w!==n&&(w=ja(w,!1)));db=t}},30),Oa=function(){A.forEach(function(a){clearInterval(a.pid)});A=[]},ob=function(a){function b(d,f){return function(h,k,l,n){var t=h.options.group.name&&k.options.group.name&&h.options.group.name===k.options.group.name;if(null==d&&(f||t))return!0;if(null==d||!1===d)return!1;if(f&&"clone"===d)return d;if("function"==typeof d)return b(d(h,
k,l,n),f)(h,k,l,n);h=(f?h:k).options.group.name;return!0===d||"string"==typeof d&&d===h||d.join&&-1<d.indexOf(h)}}var c={},e=a.group;e&&"object"==typeof e||(e={name:e});c.name=e.name;c.checkPull=b(e.pull,!0);c.checkPut=b(e.put);c.revertClone=e.revertClone;a.group=c},Db=function(a){g&&g.parentNode&&g.parentNode[G]&&g.parentNode[G]._computeIsAligned(a)},Eb=function(a,b){for(;!b[G];)b=b.parentNode;return a===b},Fb=function(a,b,c){for(a=a.parentNode;a&&!a[G];)a=a.parentNode;a&&a[G][c](Ta(b,{artificialBubble:!0}))},
Gb=function(){!gb&&r&&p(r,"display","none")},Hb=function(){!gb&&r&&p(r,"display","")};m.addEventListener("click",function(a){if(Ka)return a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.stopImmediatePropagation&&a.stopImmediatePropagation(),Ka=!1},!0);var ya,jb=function(a){if(a=a.touches?a.touches[0]:a,g){a:{var b=a.clientX;for(var c=a.clientY,e=0;e<ia.length;e++)if(!Xa(ia[e])){var d=z(ia[e]),f=ia[e][G].options.emptyInsertThreshold,h=c>=d.top-f&&c<=d.bottom+f;if(b>=d.left-f&&b<=d.right+
f&&h){b=ia[e];break a}}b=void 0}b&&b[G]._onDragOver({clientX:a.clientX,clientY:a.clientY,target:b,rootEl:b})}};return u(m,"dragover",jb),u(m,"mousemove",jb),u(m,"touchmove",jb),y.prototype={constructor:y,_computeIsAligned:function(a){var b;if(r&&!gb?(Gb(),b=m.elementFromPoint(a.clientX,a.clientY),Hb()):b=a.target,b=L(b,this.options.draggable,this.el,!1),!hb&&g&&g.parentNode===this.el){for(var c,e,d,f,h,k,l,n,t=this.el.children,w=0;w<t.length;w++)L(t[w],this.options.draggable,this.el,!1)&&t[w]!==b&&
(t[w].sortableMouseAligned=(c=a.clientX,e=a.clientY,d=t[w],f=this._getDirection(a,null),this.options,void 0,h=z(d),k="vertical"===f?h.left:h.top,l="vertical"===f?h.right:h.bottom,k<(n="vertical"===f?c:e)&&n<l));L(b,this.options.draggable,this.el,!0)||(ta=null);hb=!0;qa(function(){hb=!1},30)}},_getDirection:function(a,b){return"function"==typeof this.options.direction?this.options.direction.call(this,a,b,g):this.options.direction},_onTapStart:function(a){if(a.cancelable){var b,c=this,e=this.el,d=this.options,
f=d.preventOnFilter,h=a.type,k=a.touches&&a.touches[0],l=(k||a).target,n=a.target.shadowRoot&&(a.path&&a.path[0]||a.composedPath&&a.composedPath()[0])||l,t=d.filter;if(function(w){Na.length=0;w=w.getElementsByTagName("input");for(var E=w.length;E--;){var U=w[E];U.checked&&Na.push(U)}}(e),!(T&&!a.artificialBubble&&!Eb(e,l)||g||/mousedown|pointerdown/.test(h)&&0!==a.button||d.disabled||n.isContentEditable))if(l=L(l,d.draggable,e,!1)){if(Za!==l){if(b=na(l,d.draggable),"function"==typeof t){if(t.call(this,
a,l,this))return M(c,n,"filter",l,e,e,b),void(f&&a.cancelable&&a.preventDefault())}else if(t&&(t=t.split(",").some(function(w){if(w=L(n,w.trim(),e,!1))return M(c,w,"filter",l,e,e,b),!0})))return void(f&&a.cancelable&&a.preventDefault());d.handle&&!L(n,d.handle,e,!1)||this._prepareDragStart(a,k,l,b)}}else T&&Fb(e,a,"_onTapStart")}},_handleAutoScroll:function(a,b){if(g&&this.options.scroll){var c=a.clientX,e=a.clientY,d=m.elementFromPoint(c,e),f=this;if(b||xa||T||fb){ib(a,f.options,d,b);var h=ja(d,
!0);!db||sa&&c===bb&&e===cb||(sa&&clearInterval(sa),sa=setInterval(function(){if(g){var k=ja(m.elementFromPoint(c,e),!0);k!==h&&(h=k,Oa(),ib(a,f.options,h,b))}},10),bb=c,cb=e)}else{if(!f.options.bubbleScroll||ja(d,!0)===ba())return void Oa();ib(a,f.options,ja(d,!1),!1)}}},_prepareDragStart:function(a,b,c,e){var d,f=this,h=f.el,k=f.options,l=h.ownerDocument;c&&!g&&c.parentNode===h&&(q=h,D=(g=c).parentNode,oa=g.nextSibling,Za=c,Ha=k.group,N=e,za={target:g,clientX:(b||a).clientX,clientY:(b||a).clientY},
this._lastX=(b||a).clientX,this._lastY=(b||a).clientY,g.style["will-change"]="all",g.style.transition="",g.style.transform="",d=function(){f._disableDelayedDragEvents();!Ab&&f.nativeDraggable&&(g.draggable=!0);f._triggerDragStart(a,b);M(f,q,"choose",g,q,q,N);Q(g,k.chosenClass,!0)},k.ignore.split(",").forEach(function(n){sb(g,n.trim(),Ua)}),k.supportPointer?u(l,"pointerup",f._onDrop):(u(l,"mouseup",f._onDrop),u(l,"touchend",f._onDrop),u(l,"touchcancel",f._onDrop)),Ab&&this.nativeDraggable&&(this.options.touchStartThreshold=
4,g.draggable=!0),!k.delay||this.nativeDraggable&&(xa||T)?d():(u(l,"mouseup",f._disableDelayedDrag),u(l,"touchend",f._disableDelayedDrag),u(l,"touchcancel",f._disableDelayedDrag),u(l,"mousemove",f._delayedDragTouchMoveHandler),u(l,"touchmove",f._delayedDragTouchMoveHandler),k.supportPointer&&u(l,"pointermove",f._delayedDragTouchMoveHandler),f._dragStartTimer=qa(d,k.delay)))},_delayedDragTouchMoveHandler:function(a){a=a.touches?a.touches[0]:a;Ob(ca(a.clientX-this._lastX),ca(a.clientY-this._lastY))>=
Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){g&&Ua(g);clearTimeout(this._dragStartTimer);this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var a=this.el.ownerDocument;v(a,"mouseup",this._disableDelayedDrag);v(a,"touchend",this._disableDelayedDrag);v(a,"touchcancel",this._disableDelayedDrag);v(a,"mousemove",this._delayedDragTouchMoveHandler);v(a,"touchmove",this._delayedDragTouchMoveHandler);
v(a,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(a,b){b=b||("touch"==a.pointerType?a:null);!this.nativeDraggable||b?this.options.supportPointer?u(m,"pointermove",this._onTouchMove):u(m,b?"touchmove":"mousemove",this._onTouchMove):(u(g,"dragend",this),u(q,"dragstart",this._onDragStart));try{m.selection?Ga(function(){m.selection.empty()}):window.getSelection().removeAllRanges()}catch(c){}},_dragStarted:function(a,b){if(Ca=!1,q&&g){this.nativeDraggable&&(u(m,"dragover",
this._handleAutoScroll),u(m,"dragover",Db));var c=this.options;!a&&Q(g,c.dragClass,!1);Q(g,c.ghostClass,!0);p(g,"transform","");y.active=this;a&&this._appendGhost();M(this,q,"start",g,q,q,N,void 0,b)}else this._nulling()},_emulateDragOver:function(a){if(H&&(this._lastX!==H.clientX||this._lastY!==H.clientY||a)){this._lastX=H.clientX;this._lastY=H.clientY;Gb();for(var b=a=m.elementFromPoint(H.clientX,H.clientY);a&&a.shadowRoot;)b=a=a.shadowRoot.elementFromPoint(H.clientX,H.clientY);if(b){do{if(b[G]&&
b[G]._onDragOver({clientX:H.clientX,clientY:H.clientY,target:a,rootEl:b})&&!this.options.dragoverBubble)break;a=b}while(b=b.parentNode)}g.parentNode[G]._computeIsAligned(H);Hb()}},_onTouchMove:function(a,b){if(za){var c=this.options,e=c.fallbackTolerance,d=c.fallbackOffset;c=a.touches?a.touches[0]:a;var f=r&&Fa(r),h=r&&f&&f.a;f=r&&f&&f.d;var k=Ma&&B&&zb(B);h=(c.clientX-za.clientX+d.x)/(h||1)+(k?k[0]-eb[0]:0)/(h||1);d=(c.clientY-za.clientY+d.y)/(f||1)+(k?k[1]-eb[1]:0)/(f||1);d=a.touches?"translate3d("+
h+"px,"+d+"px,0)":"translate("+h+"px,"+d+"px)";if(!y.active&&!Ca){if(e&&Nb(ca(c.clientX-this._lastX),ca(c.clientY-this._lastY))<e)return;this._onDragStart(a,!0)}!b&&this._handleAutoScroll(c,!0);Ia=!0;H=c;p(r,"webkitTransform",d);p(r,"mozTransform",d);p(r,"msTransform",d);p(r,"transform",d);a.cancelable&&a.preventDefault()}},_appendGhost:function(){if(!r){var a=this.options.fallbackOnBody?m.body:q,b=z(g,!0,a,!Ma),c=(p(g),this.options);if(Ma){for(B=a;"static"===p(B,"position")&&"none"===p(B,"transform")&&
B!==m;)B=B.parentNode;if(B!==m){var e=z(B,!0);b.top-=e.top;b.left-=e.left}B!==m.body&&B!==m.documentElement?(B===m&&(B=ba()),b.top+=B.scrollTop,b.left+=B.scrollLeft):B=ba();eb=zb(B)}Q(r=g.cloneNode(!0),c.ghostClass,!1);Q(r,c.fallbackClass,!0);Q(r,c.dragClass,!0);p(r,"box-sizing","border-box");p(r,"margin",0);p(r,"top",b.top);p(r,"left",b.left);p(r,"width",b.width);p(r,"height",b.height);p(r,"opacity","0.8");p(r,"position",Ma?"absolute":"fixed");p(r,"zIndex","100000");p(r,"pointerEvents","none");a.appendChild(r)}},
_onDragStart:function(a,b){var c=this,e=a.dataTransfer,d=c.options;(x=wb(g)).draggable=!1;x.style["will-change"]="";this._hideClone();Q(x,c.options.chosenClass,!1);c._cloneId=Ga(function(){c.options.removeCloneOnHide||q.insertBefore(x,g);M(c,q,"clone",g)});!b&&Q(g,d.dragClass,!0);b?(Ka=!0,c._loopId=setInterval(c._emulateDragOver,50)):(v(m,"mouseup",c._onDrop),v(m,"touchend",c._onDrop),v(m,"touchcancel",c._onDrop),e&&(e.effectAllowed="move",d.setData&&d.setData.call(c,e,g)),u(m,"drop",c),p(g,"transform",
"translateZ(0)"));Ca=!0;c._dragStartId=Ga(c._dragStarted.bind(c,b,a));u(m,"selectstart",c);fb&&p(m.body,"user-select","none")},_onDragOver:function(a){function b(P){return P&&(t?n._hideClone():n._showClone(E),n&&(Q(g,K?K.options.ghostClass:n.options.ghostClass,!1),Q(g,k.ghostClass,!0)),K!==E&&E!==y.active?K=E:E===y.active&&(K=null),e&&E._animate(e,g),h&&F&&E._animate(F,h)),(h===g&&!g.animated||h===f&&!h.animated)&&(ta=null),k.dragoverBubble||a.rootEl||h===m||(E._handleAutoScroll(a),g.parentNode[G]._computeIsAligned(a)),
!k.dragoverBubble&&a.stopPropagation&&a.stopPropagation(),!0}function c(){M(E,q,"change",h,f,q,N,na(g,k.draggable),a)}var e,d,f=this.el,h=a.target,k=this.options,l=k.group,n=y.active,t=Ha===l,w=k.sort,E=this;if(!Va&&(!T||a.rootEl||a.artificialBubble||Eb(f,h))){if(void 0!==a.preventDefault&&a.cancelable&&a.preventDefault(),Ia=!0,h=L(h,k.draggable,f,!0),L(a.target,null,g,!0)||h.animated)return b(!1);if(h!==g&&(Ka=!1),n&&!k.disabled&&(t?w||(d=!q.contains(g)):K===this||(this.lastPutMode=Ha.checkPull(this,
n,g,a))&&l.checkPut(this,n,g,a))){l=this._getDirection(a,h);if(e=z(g),d)return this._hideClone(),D=q,oa?q.insertBefore(g,oa):q.appendChild(g),b(!0);if((d=Xa(f))&&(X=a,J=l,ha=z(Xa(f)),aa="vertical"===J?X.clientY:X.clientX,la="vertical"===J?X.clientX:X.clientY,pa="vertical"===J?ha.bottom:ha.right,kb="vertical"===J?ha.left:ha.top,Qa="vertical"===J?ha.right:ha.bottom,!("vertical"===J?Qa+10<la||la<=Qa&&pa<aa&&kb<=la:pa<aa&&kb<la||aa<=pa&&Qa+10<la)||d.animated)){if(h&&h!==g&&h.parentNode===f){var U;aa=
0;la=h.sortableMouseAligned;pa=g.parentNode!==f;X="vertical"===l?"top":"left";ha=(J=yb(h,"top")||yb(g,"top"))?J.scrollTop:void 0;if(ta!==h&&(Ba=null,U=z(h)[X],Da=!1),V=h,I=l,W=(da=g)===g&&ua||z(da),C=V===g&&ua||z(V),O="vertical"===I?W.left:W.top,ka="vertical"===I?W.right:W.bottom,ea="vertical"===I?W.width:W.height,fa="vertical"===I?C.left:C.top,Pa="vertical"===I?C.right:C.bottom,va="vertical"===I?C.width:C.height,Ba=(O===fa||ka===Pa||O+ea/2===fa+va/2)&&la||pa||J||k.invertSwap||"insert"===Ba||"swap"===
Ba?("swap"!==Ba&&(La=k.invertSwap||pa),aa=function(P,Ib,wa,lb,Ra,Jb,Pb){var Y=z(Ib);P="vertical"===wa?P.clientY:P.clientX;var ma="vertical"===wa?Y.height:Y.width,Ea="vertical"===wa?Y.top:Y.left;Y="vertical"===wa?Y.bottom:Y.right;var Sa=z(g),mb=!1;if(!Jb)if(Pb&&Ja<ma*lb)if(!Da&&(1===Aa?Ea+ma*Ra/2<P:P<Y-ma*Ra/2)&&(Da=!0),Da)mb=!0;else{if("vertical"===wa?Sa.top:Sa.left,"vertical"===wa?Sa.bottom:Sa.right,1===Aa?P<Ea+Ja:Y-Ja<P)return-1*Aa}else if(Ea+ma*(1-lb)/2<P&&P<Y-ma*(1-lb)/2)return ub(Ib);return(mb=
mb||Jb)&&(P<Ea+ma*Ra/2||Y-ma*Ra/2<P)?Ea+ma/2<P?1:-1:0}(a,h,l,k.swapThreshold,null==k.invertedSwapThreshold?k.swapThreshold:k.invertedSwapThreshold,La,ta===h),"swap"):(aa=ub(h),"insert"),0===aa)return b(!1);ua=null;Aa=aa;var F=z(ta=h);da=h.nextElementSibling;V=!1;I=tb(q,f,g,e,h,F,a,V=1===aa);if(!1!==I)return 1!==I&&-1!==I||(V=1===I),Va=!0,qa(Lb,30),t?n._hideClone():n._showClone(this),V&&!da?f.appendChild(g):h.parentNode.insertBefore(g,V?da:h),J&&Cb(J,0,ha-J.scrollTop),D=g.parentNode,void 0===U||La||
(Ja=ca(U-z(h)[X])),c(),b(!0)}}else if(d&&f===a.target&&(h=d),h&&(F=z(h)),t?n._hideClone():n._showClone(this),!1!==tb(q,f,g,e,h,F,a,!!h))return f.appendChild(g),D=f,ua=null,c(),b(!0);if(f.contains(g))return b(!1)}var da,V,I,W,C,O,ka,ea,fa,Pa,va,X,J,ha,aa,la,pa,kb,Qa;return T&&!a.rootEl&&Fb(f,a,"_onDragOver"),!1}},_animate:function(a,b){var c=this.options.animation;if(c){var e=z(b);if(b===g&&(ua=e),1===a.nodeType&&(a=z(a)),a.left+a.width/2!==e.left+e.width/2||a.top+a.height/2!==e.top+e.height/2){var d=
Fa(this.el),f=d&&d.a;d=d&&d.d;p(b,"transition","none");p(b,"transform","translate3d("+(a.left-e.left)/(f||1)+"px,"+(a.top-e.top)/(d||1)+"px,0)");b.offsetWidth;p(b,"transition","transform "+c+"ms"+(this.options.easing?" "+this.options.easing:""));p(b,"transform","translate3d(0,0,0)")}"number"==typeof b.animated&&clearTimeout(b.animated);b.animated=qa(function(){p(b,"transition","");p(b,"transform","");b.animated=!1},c)}},_offUpEvents:function(){var a=this.el.ownerDocument;v(m,"touchmove",this._onTouchMove);
v(m,"pointermove",this._onTouchMove);v(a,"mouseup",this._onDrop);v(a,"touchend",this._onDrop);v(a,"pointerup",this._onDrop);v(a,"touchcancel",this._onDrop);v(m,"selectstart",this)},_onDrop:function(a){var b=this.el,c=this.options;Da=La=db=Ca=!1;clearInterval(this._loopId);clearInterval(sa);Oa();clearTimeout(ya);ya=void 0;clearTimeout(this._dragStartTimer);clearTimeout(this._cloneId);clearTimeout(this._dragStartId);v(m,"mousemove",this._onTouchMove);this.nativeDraggable&&(v(m,"drop",this),v(b,"dragstart",
this._onDragStart),v(m,"dragover",this._handleAutoScroll),v(m,"dragover",Db));fb&&p(m.body,"user-select","");this._offUpEvents();a&&(Ia&&(a.cancelable&&a.preventDefault(),!c.dropBubble&&a.stopPropagation()),r&&r.parentNode&&r.parentNode.removeChild(r),(q===D||K&&"clone"!==K.lastPutMode)&&x&&x.parentNode&&x.parentNode.removeChild(x),g&&(this.nativeDraggable&&v(g,"dragend",this),Ua(g),g.style["will-change"]="",Q(g,K?K.options.ghostClass:this.options.ghostClass,!1),Q(g,this.options.chosenClass,!1),M(this,
q,"unchoose",g,D,q,N,null,a),q!==D?(0<=(R=na(g,c.draggable))&&(M(null,D,"add",g,D,q,N,R,a),M(this,q,"remove",g,D,q,N,R,a),M(null,D,"sort",g,D,q,N,R,a),M(this,q,"sort",g,D,q,N,R,a)),K&&K.save()):g.nextSibling!==oa&&0<=(R=na(g,c.draggable))&&(M(this,q,"update",g,D,q,N,R,a),M(this,q,"sort",g,D,q,N,R,a)),y.active&&(null!=R&&-1!==R||(R=N),M(this,q,"end",g,D,q,N,R,a),this.save())));this._nulling()},_nulling:function(){q=g=D=r=oa=x=Za=ra=$a=A.length=sa=bb=cb=za=H=Ia=R=N=ta=Aa=ua=K=Ha=y.active=null;Na.forEach(function(a){a.checked=
!0});Na.length=0},handleEvent:function(a){switch(a.type){case "drop":case "dragend":this._onDrop(a);break;case "dragenter":case "dragover":g&&(this._onDragOver(a),a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.cancelable&&a.preventDefault());break;case "selectstart":a.preventDefault()}},toArray:function(){for(var a,b=[],c=this.el.children,e=0,d=c.length,f=this.options;e<d;e++)L(a=c[e],f.draggable,this.el,!1)&&b.push(a.getAttribute(f.dataIdAttr)||Mb(a));return b},sort:function(a){var b={},c=
this.el;this.toArray().forEach(function(e,d){d=c.children[d];L(d,this.options.draggable,c,!1)&&(b[e]=d)},this);a.forEach(function(e){b[e]&&(c.removeChild(b[e]),c.appendChild(b[e]))})},save:function(){var a=this.options.store;a&&a.set&&a.set(this)},closest:function(a,b){return L(a,b||this.options.draggable,this.el,!1)},option:function(a,b){var c=this.options;if(void 0===b)return c[a];c[a]=b;"group"===a&&ob(c)},destroy:function(){var a=this.el;a[G]=null;v(a,"mousedown",this._onTapStart);v(a,"touchstart",
this._onTapStart);v(a,"pointerdown",this._onTapStart);this.nativeDraggable&&(v(a,"dragover",this),v(a,"dragenter",this));Array.prototype.forEach.call(a.querySelectorAll("[draggable]"),function(b){b.removeAttribute("draggable")});this._onDrop();ia.splice(ia.indexOf(this.el),1);this.el=a=null},_hideClone:function(){x.cloneHidden||(p(x,"display","none"),x.cloneHidden=!0,x.parentNode&&this.options.removeCloneOnHide&&x.parentNode.removeChild(x))},_showClone:function(a){"clone"===a.lastPutMode?x.cloneHidden&&
(q.contains(g)&&!this.options.group.revertClone?q.insertBefore(x,g):oa?q.insertBefore(x,oa):q.appendChild(x),this.options.group.revertClone&&this._animate(g,x),p(x,"display",""),x.cloneHidden=!1):this._hideClone()}},u(m,"touchmove",function(a){(y.active||Ca)&&a.cancelable&&a.preventDefault()}),y.utils={on:u,off:v,css:p,find:sb,is:function(a,b){return!!L(a,b,a,!1)},extend:Ta,throttle:vb,closest:L,toggleClass:Q,clone:wb,index:na,nextTick:Ga,cancelNextTick:function(a){return clearTimeout(a)},detectDirection:nb,
getChild:Wa},y.create=function(a,b){return new y(a,b)},y.version="1.8.4",y});