Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-draggable-next

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-draggable-next - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

20

dist/vue-draggable-next.d.ts

@@ -80,2 +80,3 @@ import Sortable from 'sortablejs';

component: import("vue").ComponentPublicInstance<Readonly<{
move: Function;
list: unknown[];

@@ -85,3 +86,2 @@ noTransitionOnDrag: boolean;

tag: string;
move: Function;
componentData: Record<string, any>;

@@ -102,3 +102,4 @@ component: string;

realList(): OpenObject[] | OpenObject;
}, any, Record<string, any>, Readonly<{
}, any, string[], Readonly<{
move: Function;
list: unknown[];

@@ -108,3 +109,2 @@ noTransitionOnDrag: boolean;

tag: string;
move: Function;
componentData: Record<string, any>;

@@ -116,2 +116,3 @@ component: string;

}>, {
move: Function;
list: unknown[];

@@ -121,3 +122,2 @@ noTransitionOnDrag: boolean;

tag: string;
move: Function;
componentData: Record<string, any>;

@@ -127,2 +127,3 @@ component: string;

}, false, import("vue").ComponentOptionsBase<Readonly<{
move: Function;
list: unknown[];

@@ -132,3 +133,2 @@ noTransitionOnDrag: boolean;

tag: string;
move: Function;
componentData: Record<string, any>;

@@ -149,3 +149,4 @@ component: string;

realList(): OpenObject[] | OpenObject;
}, any, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
}, any, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, {
move: Function;
list: unknown[];

@@ -155,3 +156,2 @@ noTransitionOnDrag: boolean;

tag: string;
move: Function;
componentData: Record<string, any>;

@@ -165,3 +165,4 @@ component: string;

computeFutureIndex(relatedContext: any, evt: any): any;
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
move: Function;
list: unknown[];

@@ -171,3 +172,2 @@ noTransitionOnDrag: boolean;

tag: string;
move: Function;
componentData: Record<string, any>;

@@ -179,2 +179,3 @@ component: string;

}>, {
move: Function;
list: unknown[];

@@ -184,3 +185,2 @@ noTransitionOnDrag: boolean;

tag: string;
move: Function;
componentData: Record<string, any>;

@@ -187,0 +187,0 @@ component: string;

/*!
* vue-draggable-next v2.0.0
* (c) 2020 Anish George
* (c) 2021 Anish George
* @license MIT
*/
var VueDraggableNext=function(t,e){"use strict";function n(){return(n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function o(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var i=o(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),r=o(/Edge/i),a=o(/firefox/i),l=o(/safari/i)&&!o(/chrome/i)&&!o(/android/i),s=o(/iP(ad|od|hone)/i),c=o(/chrome/i)&&o(/android/i),u={capture:!1,passive:!1};function d(t,e,n){t.addEventListener(e,n,!i&&u)}function h(t,e,n){t.removeEventListener(e,n,!i&&u)}function f(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(t){return!1}return!1}}function p(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function g(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&f(t,e):f(t,e))||o&&t===n)return t;if(t===n)break}while(t=p(t))}return null}var m,v=/\s+/g;function b(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(v," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(v," ")}}function w(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function y(t,e){var n="";if("string"==typeof t)n=t;else do{var o=w(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function E(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function D(){return document.scrollingElement||document.documentElement}function _(t,e,n,o,r){if(t.getBoundingClientRect||t===window){var a,l,s,c,u,d,h;if(t!==window&&t!==D()?(l=(a=t.getBoundingClientRect()).top,s=a.left,c=a.bottom,u=a.right,d=a.height,h=a.width):(l=0,s=0,c=window.innerHeight,u=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(r=r||t.parentNode,!i))do{if(r&&r.getBoundingClientRect&&("none"!==w(r,"transform")||n&&"static"!==w(r,"position"))){var f=r.getBoundingClientRect();l-=f.top+parseInt(w(r,"border-top-width")),s-=f.left+parseInt(w(r,"border-left-width")),c=l+a.height,u=s+a.width;break}}while(r=r.parentNode);if(o&&t!==window){var p=y(r||t),g=p&&p.a,m=p&&p.d;p&&(c=(l/=m)+(d/=m),u=(s/=g)+(h/=g))}return{top:l,left:s,bottom:c,right:u,width:h,height:d}}}function C(t,e,n){for(var o=I(t,!0),i=_(t)[e];o;){var r=_(o)[n];if(!("top"===n||"left"===n?i>=r:i<=r))return o;if(o===D())break;o=I(o,!1)}return!1}function x(t,e,n){for(var o=0,i=0,r=t.children;i<r.length;){if("none"!==r[i].style.display&&r[i]!==kt.ghost&&r[i]!==kt.dragged&&g(r[i],n.draggable,t,!1)){if(o===e)return r[i];o++}i++}return null}function S(t,e){for(var n=t.lastElementChild;n&&(n===kt.ghost||"none"===w(n,"display")||e&&!f(n,e));)n=n.previousElementSibling;return n||null}function T(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===kt.clone||e&&!f(t,e)||n++;return n}function O(t){var e=0,n=0,o=D();if(t)do{var i=y(t);e+=t.scrollLeft*i.a,n+=t.scrollTop*i.d}while(t!==o&&(t=t.parentNode));return[e,n]}function I(t,e){if(!t||!t.getBoundingClientRect)return D();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=w(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return D();if(o||e)return n;o=!0}}}while(n=n.parentNode);return D()}function M(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function N(t,e){return function(){if(!m){var n=arguments,o=this;1===n.length?t.call(o,n[0]):t.apply(o,n),m=setTimeout((function(){m=void 0}),e)}}}function A(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function P(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function k(t,e){w(t,"position","absolute"),w(t,"top",e.top),w(t,"left",e.left),w(t,"width",e.width),w(t,"height",e.height)}function R(t){w(t,"position",""),w(t,"top",""),w(t,"left",""),w(t,"width",""),w(t,"height","")}var X="Sortable"+(new Date).getTime(),Y=[],L={initializeByDefault:!0},B={mount:function(t){for(var e in L)L.hasOwnProperty(e)&&!(e in t)&&(t[e]=L[e]);Y.push(t)},pluginEvent:function(t,e,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var r=t+"Global";Y.forEach((function(i){e[i.pluginName]&&(e[i.pluginName][r]&&e[i.pluginName][r](n({sortable:e},o)),e.options[i.pluginName]&&e[i.pluginName][t]&&e[i.pluginName][t](n({sortable:e},o)))}))},initializePlugins:function(t,e,n,o){for(var i in Y.forEach((function(o){var i=o.pluginName;if(t.options[i]||o.initializeByDefault){var r=new o(t,e,t.options);r.sortable=t,r.options=t.options,t[i]=r,Object.assign(n,r.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var r=this.modifyOption(t,i,t.options[i]);void 0!==r&&(t.options[i]=r)}},getEventProperties:function(t,e){var n={};return Y.forEach((function(o){"function"==typeof o.eventProperties&&Object.assign(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return Y.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};function F(t){var e=t.sortable,o=t.rootEl,a=t.name,l=t.targetEl,s=t.cloneEl,c=t.toEl,u=t.fromEl,d=t.oldIndex,h=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,g=t.originalEvent,m=t.putSortable,v=t.extraEventProperties;if(e=e||o&&o[X]){var b,w=e.options,y="on"+a.charAt(0).toUpperCase()+a.substr(1);!window.CustomEvent||i||r?(b=document.createEvent("Event")).initEvent(a,!0,!0):b=new CustomEvent(a,{bubbles:!0,cancelable:!0}),b.to=c||o,b.from=u||o,b.item=l||o,b.clone=s,b.oldIndex=d,b.newIndex=h,b.oldDraggableIndex=f,b.newDraggableIndex=p,b.originalEvent=g,b.pullMode=m?m.lastPutMode:void 0;var E=n({},v,B.getEventProperties(a,e));for(var D in E)b[D]=E[D];o&&o.dispatchEvent(b),w[y]&&w[y].call(e,b)}}var j=function(t,e,o){var i=void 0===o?{}:o,r=i.evt,a=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)e.indexOf(n=r[o])>=0||(i[n]=t[n]);return i}(i,["evt"]);B.pluginEvent.bind(kt)(t,e,n({dragEl:V,parentEl:$,ghostEl:U,rootEl:K,nextEl:W,lastDownEl:z,cloneEl:G,cloneHidden:q,dragStarted:ct,putSortable:nt,activeSortable:kt.active,originalEvent:r,oldIndex:Z,oldDraggableIndex:J,newIndex:Q,newDraggableIndex:tt,hideGhostForTarget:It,unhideGhostForTarget:Mt,cloneNowHidden:function(){q=!0},cloneNowShown:function(){q=!1},dispatchSortableEvent:function(t){H({sortable:e,name:t,originalEvent:r})}},a))};function H(t){F(n({putSortable:nt,cloneEl:G,targetEl:V,rootEl:K,oldIndex:Z,oldDraggableIndex:J,newIndex:Q,newDraggableIndex:tt},t))}var V,$,U,K,W,z,G,q,Z,Q,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt=!1,gt=!1,mt=[],vt=!1,bt=!1,wt=[],yt=!1,Et=[],Dt="undefined"!=typeof document,_t=s,Ct=r||i?"cssFloat":"float",xt=Dt&&!c&&!s&&"draggable"in document.createElement("div"),St=function(){if(Dt){if(i)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Tt=function(t,e){var n=w(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=x(t,0,e),r=x(t,1,e),a=i&&w(i),l=r&&w(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+_(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+_(r).width;return"flex"===n.display?"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal":"grid"===n.display?n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":i&&a.float&&"none"!==a.float?!r||"both"!==l.clear&&l.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Ct]||r&&"none"===n[Ct]&&s+c>o)?"vertical":"horizontal"},Ot=function(t){function e(t,n){return function(o,i,r,a){if(null==t&&(n||o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==typeof o||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},It=function(){!St&&U&&w(U,"display","none")},Mt=function(){!St&&U&&w(U,"display","")};Dt&&document.addEventListener("click",(function(t){if(gt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),gt=!1,!1}),!0);var Nt,At=function(t){if(V){var e=(i=(t=t.touches?t.touches[0]:t).clientX,r=t.clientY,mt.some((function(t){if(!S(t)){var e=_(t),n=t[X].options.emptyInsertThreshold;return n&&i>=e.left-n&&i<=e.right+n&&r>=e.top-n&&r<=e.bottom+n?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[X]._onDragOver(n)}}var i,r,a},Pt=function(t){V&&V.parentNode[X]._isOutsideThisEl(t.target)};function kt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not "+{}.toString.call(t);this.el=t,this.options=e=Object.assign({},e),t[X]=this;var o,i,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Tt(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:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==kt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var a in B.initializePlugins(this,t,r),r)!(a in e)&&(e[a]=r[a]);for(var l in Ot(e),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!e.forceFallback&&xt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?d(t,"pointerdown",this._onTapStart):(d(t,"mousedown",this._onTapStart),d(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(d(t,"dragover",this),d(t,"dragenter",this)),mt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Object.assign(this,(i=[],{captureAnimationState:function(){i=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==w(t,"display")&&void 0!==t){i.push({target:t,rect:_(t)});var e=n({},i[i.length-1].rect);if(t.thisAnimationDuration){var o=y(t,!0);o&&(e.top-=o.f,e.left-=o.e)}t.fromRect=e}}))},addAnimationState:function(t){i.push(t)},removeAnimationState:function(t){i.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(i,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(o),void("function"==typeof t&&t());var n=!1,r=0;i.forEach((function(t){var o=0,i=t.target,a=i.fromRect,l=_(i),s=i.prevFromRect,c=i.prevToRect,u=t.rect,d=y(i,!0);d&&(l.top-=d.f,l.left-=d.e),i.toRect=l,i.thisAnimationDuration&&M(s,l)&&!M(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(o=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(u,s,c,e.options)),M(l,a)||(i.prevFromRect=a,i.prevToRect=l,o||(o=e.options.animation),e.animate(i,u,l,o)),o&&(n=!0,r=Math.max(r,o),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),o),i.thisAnimationDuration=o)})),clearTimeout(o),n?o=setTimeout((function(){"function"==typeof t&&t()}),r):"function"==typeof t&&t(),i=[]},animate:function(t,e,n,o){if(o){w(t,"transition",""),w(t,"transform","");var i=y(this.el),r=(e.left-n.left)/(i&&i.a||1),a=(e.top-n.top)/(i&&i.d||1);t.animatingX=!!r,t.animatingY=!!a,w(t,"transform","translate3d("+r+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),w(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),w(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){w(t,"transition",""),w(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}))}function Rt(t,e,n,o,a,l,s,c){var u,d,h=t[X],f=h.options.onMove;return!window.CustomEvent||i||r?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=e,u.from=t,u.dragged=n,u.draggedRect=o,u.related=a||e,u.relatedRect=l||_(e),u.willInsertAfter=c,u.originalEvent=s,t.dispatchEvent(u),f&&(d=f.call(h,u,s)),d}function Xt(t){t.draggable=!1}function Yt(){yt=!1}function Lt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Bt(t){return setTimeout(t,0)}function Ft(t){return clearTimeout(t)}kt.prototype={constructor:kt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ut=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,V):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,u=o.filter;if(function(t){Et.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&Et.push(o)}}(n),!V&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!l||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=g(s,o.draggable,n,!1))&&s.animated||z===s)){if(Z=T(s),J=T(s,o.draggable),"function"==typeof u){if(u.call(this,t,s,this))return H({sortable:e,rootEl:c,name:"filter",targetEl:s,toEl:n,fromEl:n}),j("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(o){if(o=g(c,o.trim(),n,!1))return H({sortable:e,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),j("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!g(c,o.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var o,l=this,s=l.el,c=l.options,u=s.ownerDocument;if(n&&!V&&n.parentNode===s){var h=_(n);if(K=s,$=(V=n).parentNode,W=V.nextSibling,z=n,et=c.group,kt.dragged=V,lt=(ot={target:V,clientX:(e||t).clientX,clientY:(e||t).clientY}).clientX-h.left,st=ot.clientY-h.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,V.style["will-change"]="all",o=function(){j("delayEnded",l,{evt:t}),kt.eventCanceled?l._onDrop():(l._disableDelayedDragEvents(),!a&&l.nativeDraggable&&(V.draggable=!0),l._triggerDragStart(t,e),H({sortable:l,name:"choose",originalEvent:t}),b(V,c.chosenClass,!0))},c.ignore.split(",").forEach((function(t){E(V,t.trim(),Xt)})),d(u,"dragover",At),d(u,"mousemove",At),d(u,"touchmove",At),d(u,"mouseup",l._onDrop),d(u,"touchend",l._onDrop),d(u,"touchcancel",l._onDrop),a&&this.nativeDraggable&&(this.options.touchStartThreshold=4,V.draggable=!0),j("delayStart",this,{evt:t}),!c.delay||c.delayOnTouchOnly&&!e||this.nativeDraggable&&(r||i))o();else{if(kt.eventCanceled)return void this._onDrop();d(u,"mouseup",l._disableDelayedDrag),d(u,"touchend",l._disableDelayedDrag),d(u,"touchcancel",l._disableDelayedDrag),d(u,"mousemove",l._delayedDragTouchMoveHandler),d(u,"touchmove",l._delayedDragTouchMoveHandler),c.supportPointer&&d(u,"pointermove",l._delayedDragTouchMoveHandler),l._dragStartTimer=setTimeout(o,c.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){V&&Xt(V),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;h(t,"mouseup",this._disableDelayedDrag),h(t,"touchend",this._disableDelayedDrag),h(t,"touchcancel",this._disableDelayedDrag),h(t,"mousemove",this._delayedDragTouchMoveHandler),h(t,"touchmove",this._delayedDragTouchMoveHandler),h(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?d(document,this.options.supportPointer?"pointermove":e?"touchmove":"mousemove",this._onTouchMove):(d(V,"dragend",this),d(K,"dragstart",this._onDragStart));try{document.selection?Bt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(pt=!1,K&&V){j("dragStarted",this,{evt:e}),this.nativeDraggable&&d(document,"dragover",Pt);var n=this.options;!t&&b(V,n.dragClass,!1),b(V,n.ghostClass,!0),kt.active=this,t&&this._appendGhost(),H({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(it){this._lastX=it.clientX,this._lastY=it.clientY,It();for(var t=document.elementFromPoint(it.clientX,it.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(it.clientX,it.clientY))!==e;)e=t;if(V.parentNode[X]._isOutsideThisEl(t),e)do{if(e[X]&&e[X]._onDragOver({clientX:it.clientX,clientY:it.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);Mt()}},_onTouchMove:function(t){if(ot){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=U&&y(U,!0),a=U&&r&&r.a,l=U&&r&&r.d,s=_t&&ft&&O(ft),c=(i.clientX-ot.clientX+o.x)/(a||1)+(s?s[0]-wt[0]:0)/(a||1),u=(i.clientY-ot.clientY+o.y)/(l||1)+(s?s[1]-wt[1]:0)/(l||1);if(!kt.active&&!pt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(U){r?(r.e+=c-(rt||0),r.f+=u-(at||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix("+r.a+","+r.b+","+r.c+","+r.d+","+r.e+","+r.f+")";w(U,"webkitTransform",d),w(U,"mozTransform",d),w(U,"msTransform",d),w(U,"transform",d),rt=c,at=u,it=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!U){var t=this.options.fallbackOnBody?document.body:K,e=_(V,!0,_t,!0,t),n=this.options;if(_t){for(ft=t;"static"===w(ft,"position")&&"none"===w(ft,"transform")&&ft!==document;)ft=ft.parentNode;ft!==document.body&&ft!==document.documentElement?(ft===document&&(ft=D()),e.top+=ft.scrollTop,e.left+=ft.scrollLeft):ft=D(),wt=O(ft)}b(U=V.cloneNode(!0),n.ghostClass,!1),b(U,n.fallbackClass,!0),b(U,n.dragClass,!0),w(U,"transition",""),w(U,"transform",""),w(U,"box-sizing","border-box"),w(U,"margin",0),w(U,"top",e.top),w(U,"left",e.left),w(U,"width",e.width),w(U,"height",e.height),w(U,"opacity","0.8"),w(U,"position",_t?"absolute":"fixed"),w(U,"zIndex","100000"),w(U,"pointerEvents","none"),kt.ghost=U,t.appendChild(U),w(U,"transform-origin",lt/parseInt(U.style.width)*100+"% "+st/parseInt(U.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;j("dragStart",this,{evt:t}),kt.eventCanceled?this._onDrop():(j("setupClone",this),kt.eventCanceled||((G=P(V)).draggable=!1,G.style["will-change"]="",this._hideClone(),b(G,this.options.chosenClass,!1),kt.clone=G),n.cloneId=Bt((function(){j("clone",n),kt.eventCanceled||(n.options.removeCloneOnHide||K.insertBefore(G,V),n._hideClone(),H({sortable:n,name:"clone"}))})),!e&&b(V,i.dragClass,!0),e?(gt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(h(document,"mouseup",n._onDrop),h(document,"touchend",n._onDrop),h(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,V)),d(document,"drop",n),w(V,"transform","translateZ(0)")),pt=!0,n._dragStartId=Bt(n._dragStarted.bind(n,e,t)),d(document,"selectstart",n),ct=!0,l&&w(document.body,"user-select","none"))},_onDragOver:function(t){var e,o,i,r,a=this.el,l=t.target,s=this.options,c=s.group,u=kt.active,d=et===c,h=s.sort,f=nt||u,p=this,m=!1;if(!yt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),l=g(l,s.draggable,a,!0),L("dragOver"),kt.eventCanceled)return m;if(V.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return F(!1);if(gt=!1,u&&!s.disabled&&(d?h||(i=!K.contains(V)):nt===this||(this.lastPutMode=et.checkPull(this,u,V,t))&&c.checkPut(this,u,V,t))){if(r="vertical"===this._getDirection(t,l),e=_(V),L("dragOverValid"),kt.eventCanceled)return m;if(i)return $=K,B(),this._hideClone(),L("revert"),kt.eventCanceled||(W?K.insertBefore(V,W):K.appendChild(V)),F(!0);var v=S(a,s.draggable);if(!v||function(t,e,n){var o=_(S(n.el,n.options.draggable));return e?t.clientX>o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,r,this)&&!v.animated){if(v===V)return F(!1);if(v&&a===t.target&&(l=v),l&&(o=_(l)),!1!==Rt(K,a,V,e,l,o,t,!!l))return B(),a.appendChild(V),$=a,z(),F(!0)}else if(l.parentNode===a){o=_(l);var y,E,D,x=V.parentNode!==a,O=!function(t,e,n){var o=n?t.left:t.top,i=n?e.left:e.top;return o===i||(n?t.right:t.bottom)===(n?e.right:e.bottom)||o+(n?t.width:t.height)/2===i+(n?e.width:e.height)/2}(V.animated&&V.toRect||e,l.animated&&l.toRect||o,r),I=r?"top":"left",M=C(l,"top","top")||C(V,"top","top"),N=M?M.scrollTop:void 0;if(ut!==l&&(E=o[I],vt=!1,bt=!O&&s.invertSwap||x),0!==(y=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&ht<c*i){if(!vt&&(1===dt?s>u+c*r/2:s<d-c*r/2)&&(vt=!0),vt)h=!0;else if(1===dt?s<u+ht:s>d-ht)return-dt}else if(s>u+c*(1-i)/2&&s<d-c*(1-i)/2)return function(t){return T(V)<T(t)?1:-1}(e);return(h=h||a)&&(s<u+c*r/2||s>d-c*r/2)?s>u+c/2?1:-1:0}(t,l,o,r,O?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,bt,ut===l))){var P=T(V);do{D=$.children[P-=y]}while(D&&("none"===w(D,"display")||D===U))}if(0===y||D===l)return F(!1);ut=l,dt=y;var k=l.nextElementSibling,R=!1,Y=Rt(K,a,V,e,l,o,t,R=1===y);if(!1!==Y)return 1!==Y&&-1!==Y||(R=1===Y),yt=!0,setTimeout(Yt,30),B(),R&&!k?a.appendChild(V):l.parentNode.insertBefore(V,R?k:l),M&&A(M,0,N-M.scrollTop),$=V.parentNode,void 0===E||bt||(ht=Math.abs(E-_(l)[I])),z(),F(!0)}if(a.contains(V))return F(!1)}return!1}function L(s,c){j(s,p,n({evt:t,isOwner:d,axis:r?"vertical":"horizontal",revert:i,dragRect:e,targetRect:o,canSort:h,fromSortable:f,target:l,completed:F,onMove:function(n,o){return Rt(K,a,V,e,n,_(n),t,o)},changed:z},c))}function B(){L("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function F(e){return L("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==f&&(b(V,nt?nt.options.ghostClass:u.options.ghostClass,!1),b(V,s.ghostClass,!0)),nt!==p&&p!==kt.active?nt=p:p===kt.active&&nt&&(nt=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){L("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===V&&!V.animated||l===a&&!l.animated)&&(ut=null),s.dragoverBubble||t.rootEl||l===document||(V.parentNode[X]._isOutsideThisEl(t.target),!e&&At(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function z(){Q=T(V),tt=T(V,s.draggable),H({sortable:p,name:"change",toEl:a,newIndex:Q,newDraggableIndex:tt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){h(document,"mousemove",this._onTouchMove),h(document,"touchmove",this._onTouchMove),h(document,"pointermove",this._onTouchMove),h(document,"dragover",At),h(document,"mousemove",At),h(document,"touchmove",At)},_offUpEvents:function(){var t=this.el.ownerDocument;h(t,"mouseup",this._onDrop),h(t,"touchend",this._onDrop),h(t,"pointerup",this._onDrop),h(t,"touchcancel",this._onDrop),h(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Q=T(V),tt=T(V,n.draggable),j("drop",this,{evt:t}),$=V&&V.parentNode,Q=T(V),tt=T(V,n.draggable),kt.eventCanceled||(pt=!1,bt=!1,vt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ft(this.cloneId),Ft(this._dragStartId),this.nativeDraggable&&(h(document,"drop",this),h(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),l&&w(document.body,"user-select",""),w(V,"transform",""),t&&(ct&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),U&&U.parentNode&&U.parentNode.removeChild(U),(K===$||nt&&"clone"!==nt.lastPutMode)&&G&&G.parentNode&&G.parentNode.removeChild(G),V&&(this.nativeDraggable&&h(V,"dragend",this),Xt(V),V.style["will-change"]="",ct&&!pt&&b(V,nt?nt.options.ghostClass:this.options.ghostClass,!1),b(V,this.options.chosenClass,!1),H({sortable:this,name:"unchoose",toEl:$,newIndex:null,newDraggableIndex:null,originalEvent:t}),K!==$?(Q>=0&&(H({rootEl:$,name:"add",toEl:$,fromEl:K,originalEvent:t}),H({sortable:this,name:"remove",toEl:$,originalEvent:t}),H({rootEl:$,name:"sort",toEl:$,fromEl:K,originalEvent:t}),H({sortable:this,name:"sort",toEl:$,originalEvent:t})),nt&&nt.save()):Q!==Z&&Q>=0&&(H({sortable:this,name:"update",toEl:$,originalEvent:t}),H({sortable:this,name:"sort",toEl:$,originalEvent:t})),kt.active&&(null!=Q&&-1!==Q||(Q=Z,tt=J),H({sortable:this,name:"end",toEl:$,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){j("nulling",this),K=V=$=U=W=G=z=q=ot=it=ct=Q=tt=Z=J=ut=dt=nt=et=kt.dragged=kt.ghost=kt.clone=kt.active=null,Et.forEach((function(t){t.checked=!0})),Et.length=rt=at=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":V&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)g(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Lt(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,o){var i=n.children[o];g(i,this.options.draggable,n,!1)&&(e[t]=i)}),this),t.forEach((function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return g(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=B.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Ot(n)},destroy:function(){j("destroy",this);var t=this.el;t[X]=null,h(t,"mousedown",this._onTapStart),h(t,"touchstart",this._onTapStart),h(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(h(t,"dragover",this),h(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),mt.splice(mt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!q){if(j("hideClone",this),kt.eventCanceled)return;w(G,"display","none"),this.options.removeCloneOnHide&&G.parentNode&&G.parentNode.removeChild(G),q=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(q){if(j("showClone",this),kt.eventCanceled)return;V.parentNode!=K||this.options.group.revertClone?W?K.insertBefore(G,W):K.appendChild(G):K.insertBefore(G,V),this.options.group.revertClone&&this.animate(V,G),w(G,"display",""),q=!1}}else this._hideClone()}},Dt&&d(document,"touchmove",(function(t){(kt.active||pt)&&t.cancelable&&t.preventDefault()})),kt.utils={on:d,off:h,css:w,find:E,is:function(t,e){return!!g(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:N,closest:g,toggleClass:b,clone:P,index:T,nextTick:Bt,cancelNextTick:Ft,detectDirection:Tt,getChild:x},kt.get=function(t){return t[X]},kt.mount=function(){var t=[].slice.call(arguments);t[0].constructor===Array&&(t=t[0]),t.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not "+{}.toString.call(t);t.utils&&(kt.utils=n({},kt.utils,t.utils)),B.mount(t)}))},kt.create=function(t,e){return new kt(t,e)},kt.version="1.12.0";var jt,Ht,Vt,$t,Ut,Kt=[],Wt=[],zt=!1,Gt=!1,qt=!1;function Zt(t,e){Wt.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}function Qt(){Kt.forEach((function(t){t!==Vt&&t.parentNode&&t.parentNode.removeChild(t)}))}var Jt=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.dispatchSortableEvent,r=t.unhideGhostForTarget;if(e){var a=n||t.activeSortable;(0,t.hideGhostForTarget)();var l=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,s=document.elementFromPoint(l.clientX,l.clientY);r(),a&&!a.el.contains(s)&&(i("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function te(){}function ee(){}te.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=x(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Jt},Object.assign(te,{pluginName:"revertOnSpill"}),ee.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Jt},Object.assign(ee,{pluginName:"removeOnSpill"});var ne,oe,ie,re,ae,le,se=[],ce=!1;function ue(){se.forEach((function(t){clearInterval(t.pid)})),se=[]}function de(){clearInterval(le)}var he=N((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=D(),u=!1;oe!==n&&(oe=n,ue(),i=e.scrollFn,!0===(ne=e.scroll)&&(ne=I(n,!0)));var d=0,h=ne;do{var f=h,p=_(f),g=p.top,m=p.bottom,v=p.left,b=p.right,y=p.width,E=p.height,C=void 0,x=void 0,S=f.scrollWidth,T=f.scrollHeight,O=w(f),M=f.scrollLeft,N=f.scrollTop;f===c?(C=y<S&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),x=E<T&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(C=y<S&&("auto"===O.overflowX||"scroll"===O.overflowX),x=E<T&&("auto"===O.overflowY||"scroll"===O.overflowY));var P=C&&(Math.abs(b-r)<=l&&M+y<S)-(Math.abs(v-r)<=l&&!!M),k=x&&(Math.abs(m-a)<=l&&N+E<T)-(Math.abs(g-a)<=l&&!!N);if(!se[d])for(var R=0;R<=d;R++)se[R]||(se[R]={});se[d].vx==P&&se[d].vy==k&&se[d].el===f||(se[d].el=f,se[d].vx=P,se[d].vy=k,clearInterval(se[d].pid),0==P&&0==k||(u=!0,se[d].pid=setInterval(function(){o&&0===this.layer&&kt.active._onTouchMove(ae);var e=se[this.layer].vy?se[this.layer].vy*s:0,n=se[this.layer].vx?se[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(kt.dragged.parentNode[X],n,e,t,ae,se[this.layer].el)||A(se[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==c&&(h=I(h,!1)));ce=u}}),30);kt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?d(document,"dragover",this._handleAutoScroll):d(document,this.options.supportPointer?"pointermove":e.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?h(document,"dragover",this._handleAutoScroll):(h(document,"pointermove",this._handleFallbackAutoScroll),h(document,"touchmove",this._handleFallbackAutoScroll),h(document,"mousemove",this._handleFallbackAutoScroll)),de(),ue(),clearTimeout(m),m=void 0},nulling:function(){ae=oe=ne=ce=le=ie=re=null,se.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(o,a);if(ae=t,e||r||i||l){he(t,this.options,s,e);var c=I(s,!0);!ce||le&&o===ie&&a===re||(le&&de(),le=setInterval((function(){var i=I(document.elementFromPoint(o,a),!0);i!==c&&(c=i,ue()),he(t,n.options,i,e)}),10),ie=o,re=a)}else{if(!this.options.bubbleScroll||I(s,!0)===D())return void ue();he(t,this.options,I(s,!1),!1)}}},Object.assign(t,{pluginName:"scroll",initializeByDefault:!0})}),kt.mount(ee,te),kt.mount(new function(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){Nt=t.dragEl},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.changed,i=t.cancel;if(t.activeSortable.options.swap){var r=this.options;if(n&&n!==this.sortable.el){var a=Nt;!1!==(0,t.onMove)(n)?(b(n,r.swapClass,!0),Nt=n):Nt=null,a&&a!==Nt&&b(a,r.swapClass,!1)}o(),e(!0),i()}},drop:function(t){var e,n,o,i,r,a,l=t.activeSortable,s=t.putSortable,c=t.dragEl,u=s||this.sortable,d=this.options;Nt&&b(Nt,d.swapClass,!1),Nt&&(d.swap||s&&s.options.swap)&&c!==Nt&&(u.captureAnimationState(),u!==l&&l.captureAnimationState(),a=(n=Nt).parentNode,(r=(e=c).parentNode)&&a&&!r.isEqualNode(n)&&!a.isEqualNode(e)&&(o=T(e),i=T(n),r.isEqualNode(a)&&o<i&&i++,r.insertBefore(n,r.children[o]),a.insertBefore(e,a.children[i])),u.animateAll(),u!==l&&l.animateAll())},nulling:function(){Nt=null}},Object.assign(t,{pluginName:"swap",eventProperties:function(){return{swapItem:Nt}}})}),kt.mount(new function(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.supportPointer?d(document,"pointerup",this._deselectMultiDrag):(d(document,"mouseup",this._deselectMultiDrag),d(document,"touchend",this._deselectMultiDrag)),d(document,"keydown",this._checkKeyDown),d(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(e,n){var o="";Kt.length&&Ht===t?Kt.forEach((function(t,e){o+=(e?", ":"")+t.textContent})):o=n.textContent,e.setData("Text",o)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){Vt=t.dragEl},delayEnded:function(){this.isMultiDrag=~Kt.indexOf(Vt)},setupClone:function(t){var e=t.sortable,n=t.cancel;if(this.isMultiDrag){for(var o=0;o<Kt.length;o++)Wt.push(P(Kt[o])),Wt[o].sortableIndex=Kt[o].sortableIndex,Wt[o].draggable=!1,Wt[o].style["will-change"]="",b(Wt[o],this.options.selectedClass,!1),Kt[o]===Vt&&b(Wt[o],this.options.chosenClass,!1);e._hideClone(),n()}},clone:function(t){var e=t.dispatchSortableEvent,n=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||Kt.length&&Ht===t.sortable&&(Zt(!0,t.rootEl),e("clone"),n()))},showClone:function(t){var e=t.cloneNowShown,n=t.cancel;this.isMultiDrag&&(Zt(!1,t.rootEl),Wt.forEach((function(t){w(t,"display","")})),e(),Ut=!1,n())},hideClone:function(t){var e=this,n=t.cloneNowHidden,o=t.cancel;this.isMultiDrag&&(Wt.forEach((function(t){w(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),n(),Ut=!0,o())},dragStartGlobal:function(t){!this.isMultiDrag&&Ht&&Ht.multiDrag._deselectMultiDrag(),Kt.forEach((function(t){t.sortableIndex=T(t)})),Kt=Kt.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),qt=!0},dragStarted:function(t){var e=this,n=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){Kt.forEach((function(t){t!==Vt&&w(t,"position","absolute")}));var o=_(Vt,!1,!0,!0);Kt.forEach((function(t){t!==Vt&&k(t,o)})),Gt=!0,zt=!0}n.animateAll((function(){Gt=!1,zt=!1,e.options.animation&&Kt.forEach((function(t){R(t)})),e.options.sort&&Qt()}))}},dragOver:function(t){var e=t.completed,n=t.cancel;Gt&&~Kt.indexOf(t.target)&&(e(!1),n())},revert:function(t){var e=t.fromSortable,n=t.rootEl,o=t.sortable,i=t.dragRect;Kt.length>1&&(Kt.forEach((function(t){o.addAnimationState({target:t,rect:Gt?_(t):i}),R(t),t.fromRect=i,e.removeAnimationState(t)})),Gt=!1,function(t,e){Kt.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,o=t.activeSortable,i=t.parentEl,r=t.putSortable,a=this.options;if(t.insertion){if(n&&o._hideClone(),zt=!1,a.animation&&Kt.length>1&&(Gt||!n&&!o.options.sort&&!r)){var l=_(Vt,!1,!0,!0);Kt.forEach((function(t){t!==Vt&&(k(t,l),i.appendChild(t))})),Gt=!0}if(!n)if(Gt||Qt(),Kt.length>1){var s=Ut;o._showClone(e),o.options.animation&&!Ut&&s&&Wt.forEach((function(t){o.addAnimationState({target:t,rect:$t}),t.fromRect=$t,t.thisAnimationDuration=null}))}else o._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,o=t.activeSortable;if(Kt.forEach((function(t){t.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){$t=Object.assign({},e);var i=y(Vt,!0);$t.top-=i.f,$t.left-=i.e}},dragOverAnimationComplete:function(){Gt&&(Gt=!1,Qt())},drop:function(t){var e=t.originalEvent,n=t.rootEl,o=t.parentEl,i=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,l=t.putSortable,s=l||this.sortable;if(e){var c=this.options,u=o.children;if(!qt)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),b(Vt,c.selectedClass,!~Kt.indexOf(Vt)),~Kt.indexOf(Vt))Kt.splice(Kt.indexOf(Vt),1),jt=null,F({sortable:i,rootEl:n,name:"deselect",targetEl:Vt,originalEvt:e});else{if(Kt.push(Vt),F({sortable:i,rootEl:n,name:"select",targetEl:Vt,originalEvt:e}),e.shiftKey&&jt&&i.el.contains(jt)){var d,h,f=T(jt),p=T(Vt);if(~f&&~p&&f!==p)for(p>f?(h=f,d=p):(h=p,d=f+1);h<d;h++)~Kt.indexOf(u[h])||(b(u[h],c.selectedClass,!0),Kt.push(u[h]),F({sortable:i,rootEl:n,name:"select",targetEl:u[h],originalEvt:e}))}else jt=Vt;Ht=s}if(qt&&this.isMultiDrag){if((o[X].options.sort||o!==n)&&Kt.length>1){var g=_(Vt),m=T(Vt,":not(."+this.options.selectedClass+")");if(!zt&&c.animation&&(Vt.thisAnimationDuration=null),s.captureAnimationState(),!zt&&(c.animation&&(Vt.fromRect=g,Kt.forEach((function(t){if(t.thisAnimationDuration=null,t!==Vt){var e=Gt?_(t):g;t.fromRect=e,s.addAnimationState({target:t,rect:e})}}))),Qt(),Kt.forEach((function(t){u[m]?o.insertBefore(t,u[m]):o.appendChild(t),m++})),a===T(Vt))){var v=!1;Kt.forEach((function(t){t.sortableIndex===T(t)||(v=!0)})),v&&r("update")}Kt.forEach((function(t){R(t)})),s.animateAll()}Ht=s}(n===o||l&&"clone"!==l.lastPutMode)&&Wt.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=qt=!1,Wt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),h(document,"pointerup",this._deselectMultiDrag),h(document,"mouseup",this._deselectMultiDrag),h(document,"touchend",this._deselectMultiDrag),h(document,"keydown",this._checkKeyDown),h(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==qt&&qt||Ht!==this.sortable||t&&g(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;Kt.length;){var e=Kt[0];b(e,this.options.selectedClass,!1),Kt.shift(),F({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Object.assign(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[X];e&&e.options.multiDrag&&!~Kt.indexOf(t)&&(Ht&&Ht!==e&&(Ht.multiDrag._deselectMultiDrag(),Ht=e),b(t,e.options.selectedClass,!0),Kt.push(t))},deselect:function(t){var e=t.parentNode[X],n=Kt.indexOf(t);e&&e.options.multiDrag&&~n&&(b(t,e.options.selectedClass,!1),Kt.splice(n,1))}},eventProperties:function(){var t=this,e=[],n=[];return Kt.forEach((function(o){var i;e.push({multiDragElement:o,index:o.sortableIndex}),i=Gt&&o!==Vt?-1:Gt?T(o,":not(."+t.options.selectedClass+")"):T(o),n.push({multiDragElement:o,index:i})})),{items:[].concat(Kt),clones:[].concat(Wt),oldIndicies:e,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})});const fe="undefined"!=typeof window?window.console:global.console;const pe=/-(\w)/g,ge=function(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}((t=>t.replace(pe,((t,e)=>e?e.toUpperCase():""))));function me(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function ve(t,e,n){t.insertBefore(e,0===n?t.children[0]:t.children[n-1].nextSibling)}function be(t,e){this.$nextTick((()=>this.$emit(t.toLowerCase(),e)))}function we(t){return e=>{null!==this.realList&&this["onDrag"+t](e),be.call(this,t,e)}}const ye=["Start","Add","Remove","Update","End"],Ee=["Choose","Unchoose","Sort","Filter","Clone"],De=["Move",...ye,...Ee].map((t=>"on"+t));let _e=null;const Ce={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:t=>t},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},xe=e.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,props:Ce,data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}),render(){const t=this.$slots.default?this.$slots.default():null,n=(o=this.$attrs,(i=this.componentData)?{...i.props,...i.attrs}:o);var o,i;return t?(this.transitionMode=function(t){if(!t||1!==t.length)return!1;const[{type:e}]=t;return!!e&&["transition-group","TransitionGroup"].includes(e.name)}(t),e.h(this.getTag(),n,t)):e.h(this.getTag(),n,[])},created(){null!==this.list&&null!==this.modelValue&&fe.error("list props are mutually exclusive! Please set one.")},mounted(){const t={};ye.forEach((e=>{t["on"+e]=we.call(this,e)})),Ee.forEach((e=>{t["on"+e]=be.bind(this,e)}));const e=Object.keys(this.$attrs).reduce(((t,e)=>(t[ge(e)]=this.$attrs[e],t)),{}),n=Object.assign({},e,t,{onMove:(t,e)=>this.onDragMove(t,e)});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new kt(this.$el,n),this.computeIndexes()},beforeUnmount(){try{void 0!==this._sortable&&this._sortable.destroy()}catch(t){}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(t){this.updateOptions(t)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?e.resolveComponent(this.component):this.tag},updateOptions(t){for(var e in t){const n=ge(e);-1===De.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick((()=>{this.visibleIndexes=function(t,e,n,o){if(!t)return[];const i=Object.values(t),r=e.length-o;return[...e].map(((t,e)=>e>=r?i.length:i.indexOf(t)))}(this.getChildrenNodes(),this.$el.children,0,this.footerOffset)}))},getUnderlyingVm(t){const e=function(t,e){return Object.values(t).indexOf(e)}(this.getChildrenNodes()||[],t);if(-1===e)return null;return{index:e,element:this.realList[e]}},emitChanges(t){this.$nextTick((()=>{this.$emit("change",t)}))},alterList(t){if(this.list)return void t(this.list);const e=[...this.modelValue];t(e),this.$emit("update:modelValue",e)},spliceList(){this.alterList((t=>t.splice(...arguments)))},updatePosition(t,e){this.alterList((n=>n.splice(e,0,n.splice(t,1)[0])))},getVmIndex(t){const e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(t){if(!this.noTransitionOnDrag||!this.transitionMode)return;this.getChildrenNodes()[t].data=null;const e=this.getComponent();e.children=[],e.kept=void 0},onDragStart(t){this.context=this.getUnderlyingVm(t.item),this.context&&(t.item._underlying_vm_=this.clone(this.context.element),_e=t.item)},onDragAdd(t){const e=t.item._underlying_vm_;if(void 0===e)return;me(t.item);const n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();this.emitChanges({added:{element:e,newIndex:n}})},onDragRemove(t){if(ve(this.$el,t.item,t.oldIndex),"clone"===t.pullMode)return void me(t.clone);if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})},onDragUpdate(t){me(t.item),ve(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);this.emitChanges({moved:{element:this.context.element,oldIndex:e,newIndex:n}})},updateProperty(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},onDragMove(t,e){const n=this.move;if(!n||!this.realList)return!0;const o=this.getRelatedContextFromMoveEvent(t),i=this.context,r=this.computeFutureIndex(o,t);Object.assign(i,{futureIndex:r});return n(Object.assign({},t,{relatedContext:o,draggedContext:i}),e)},onDragEnd(){this.computeIndexes(),_e=null},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this;if(!n)return{component:n};const o=n.realList,i={list:o,component:n};if(t!==e&&o&&n.getUnderlyingVm){const t=n.getUnderlyingVm(e);if(t)return Object.assign(t,i)}return i},computeFutureIndex(t,e){if(!t.element)return 0;const n=[...e.to.children].filter((t=>"none"!==t.style.display)),o=n.indexOf(e.related),i=t.component.getVmIndex(o);return-1!==n.indexOf(_e)||!e.willInsertAfter?i:i+1}}});return t.VueDraggableNext=xe,Object.defineProperty(t,"__esModule",{value:!0}),t}({},Vue);
var VueDraggableNext=function(t,e){"use strict";
/**!
* Sortable 1.13.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),i.forEach((function(e){o(t,e,n[e])}))}return t}function a(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)e.indexOf(n=r[o])>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)e.indexOf(n=r[o])>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function l(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var s=l(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),c=l(/Edge/i),u=l(/firefox/i),d=l(/safari/i)&&!l(/chrome/i)&&!l(/android/i),h=l(/iP(ad|od|hone)/i),f=l(/chrome/i)&&l(/android/i),p={capture:!1,passive:!1};function g(t,e,n){t.addEventListener(e,n,!s&&p)}function m(t,e,n){t.removeEventListener(e,n,!s&&p)}function v(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(t){return!1}return!1}}function b(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function y(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&v(t,e):v(t,e))||o&&t===n)return t;if(t===n)break}while(t=b(t))}return null}var w,E=/\s+/g;function D(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(E," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(E," ")}}function _(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function S(t,e){var n="";if("string"==typeof t)n=t;else do{var o=_(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function x(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function C(){var t=document.scrollingElement;return t||document.documentElement}function T(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,c,u,d,h;if(t!==window&&t.parentNode&&t!==C()?(a=(r=t.getBoundingClientRect()).top,l=r.left,c=r.bottom,u=r.right,d=r.height,h=r.width):(a=0,l=0,c=window.innerHeight,u=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!s))do{if(i&&i.getBoundingClientRect&&("none"!==_(i,"transform")||n&&"static"!==_(i,"position"))){var f=i.getBoundingClientRect();a-=f.top+parseInt(_(i,"border-top-width")),l-=f.left+parseInt(_(i,"border-left-width")),c=a+r.height,u=l+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=S(i||t),g=p&&p.a,m=p&&p.d;p&&(c=(a/=m)+(d/=m),u=(l/=g)+(h/=g))}return{top:a,left:l,bottom:c,right:u,width:h,height:d}}}function O(t,e,n){for(var o=P(t,!0),i=T(t)[e];o;){var r=T(o)[n];if(!("top"===n||"left"===n?i>=r:i<=r))return o;if(o===C())break;o=P(o,!1)}return!1}function I(t,e,n){for(var o=0,i=0,r=t.children;i<r.length;){if("none"!==r[i].style.display&&r[i]!==Rt.ghost&&r[i]!==Rt.dragged&&y(r[i],n.draggable,t,!1)){if(o===e)return r[i];o++}i++}return null}function M(t,e){for(var n=t.lastElementChild;n&&(n===Rt.ghost||"none"===_(n,"display")||e&&!v(n,e));)n=n.previousElementSibling;return n||null}function N(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Rt.clone||e&&!v(t,e)||n++;return n}function A(t){var e=0,n=0,o=C();if(t)do{var i=S(t);e+=t.scrollLeft*i.a,n+=t.scrollTop*i.d}while(t!==o&&(t=t.parentNode));return[e,n]}function P(t,e){if(!t||!t.getBoundingClientRect)return C();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=_(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return C();if(o||e)return n;o=!0}}}while(n=n.parentNode);return C()}function k(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function R(t,e){return function(){if(!w){var n=arguments,o=this;1===n.length?t.call(o,n[0]):t.apply(o,n),w=setTimeout((function(){w=void 0}),e)}}}function X(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Y(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var L="Sortable"+(new Date).getTime();function F(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==_(t,"display")&&t!==Rt.ghost){e.push({target:t,rect:T(t)});var n=r({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=S(t,!0);o&&(n.top-=o.f,n.left-=o.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var i=!1,r=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,l=T(n),s=n.prevFromRect,c=n.prevToRect,u=t.rect,d=S(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&k(s,l)&&!k(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(u,s,c,o.options)),k(l,a)||(n.prevFromRect=a,n.prevToRect=l,e||(e=o.options.animation),o.animate(n,u,l,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,o){if(o){_(t,"transition",""),_(t,"transform","");var i=S(this.el),r=(e.left-n.left)/(i&&i.a||1),a=(e.top-n.top)/(i&&i.d||1);t.animatingX=!!r,t.animatingY=!!a,_(t,"transform","translate3d("+r+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),_(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),_(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){_(t,"transition",""),_(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var B=[],j={initializeByDefault:!0},V={mount:function(t){for(var e in j)j.hasOwnProperty(e)&&!(e in t)&&(t[e]=j[e]);B.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),B.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=t+"Global";B.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](r({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](r({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var r in B.forEach((function(o){var r=o.pluginName;if(t.options[r]||o.initializeByDefault){var a=new o(t,e,t.options);a.sortable=t,a.options=t.options,t[r]=a,i(n,a.defaults)}})),t.options)if(t.options.hasOwnProperty(r)){var a=this.modifyOption(t,r,t.options[r]);void 0!==a&&(t.options[r]=a)}},getEventProperties:function(t,e){var n={};return B.forEach((function(o){"function"==typeof o.eventProperties&&i(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return B.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};var H=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=a(n,["evt"]);V.pluginEvent.bind(Rt)(t,e,r({dragEl:W,parentEl:U,ghostEl:z,rootEl:G,nextEl:q,lastDownEl:Z,cloneEl:K,cloneHidden:Q,dragStarted:dt,putSortable:it,activeSortable:Rt.active,originalEvent:o,oldIndex:J,oldDraggableIndex:et,newIndex:tt,newDraggableIndex:nt,hideGhostForTarget:Nt,unhideGhostForTarget:At,cloneNowHidden:function(){Q=!0},cloneNowShown:function(){Q=!1},dispatchSortableEvent:function(t){$({sortable:e,name:t,originalEvent:o})}},i))};function $(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,a=t.cloneEl,l=t.toEl,u=t.fromEl,d=t.oldIndex,h=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,g=t.originalEvent,m=t.putSortable,v=t.extraEventProperties;if(e=e||n&&n[L]){var b,y=e.options,w="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||s||c?(b=document.createEvent("Event")).initEvent(o,!0,!0):b=new CustomEvent(o,{bubbles:!0,cancelable:!0}),b.to=l||n,b.from=u||n,b.item=i||n,b.clone=a,b.oldIndex=d,b.newIndex=h,b.oldDraggableIndex=f,b.newDraggableIndex=p,b.originalEvent=g,b.pullMode=m?m.lastPutMode:void 0;var E=r({},v,V.getEventProperties(o,e));for(var D in E)b[D]=E[D];n&&n.dispatchEvent(b),y[w]&&y[w].call(e,b)}}(r({putSortable:it,cloneEl:K,targetEl:W,rootEl:G,oldIndex:J,oldDraggableIndex:et,newIndex:tt,newDraggableIndex:nt},t))}var W,U,z,G,q,Z,K,Q,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,mt=!1,vt=!1,bt=[],yt=!1,wt=!1,Et=[],Dt=!1,_t=[],St="undefined"!=typeof document,xt=h,Ct=c||s?"cssFloat":"float",Tt=St&&!f&&!h&&"draggable"in document.createElement("div"),Ot=function(){if(St){if(s)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),It=function(t,e){var n=_(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=I(t,0,e),r=I(t,1,e),a=i&&_(i),l=r&&_(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+T(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(r).width;return"flex"===n.display?"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal":"grid"===n.display?n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":i&&a.float&&"none"!==a.float?!r||"both"!==l.clear&&l.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Ct]||r&&"none"===n[Ct]&&s+c>o)?"vertical":"horizontal"},Mt=function(t){function e(t,n){return function(o,i,r,a){if(null==t&&(n||o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var o={},i=t.group;i&&"object"==n(i)||(i={name:i}),o.name=i.name,o.checkPull=e(i.pull,!0),o.checkPut=e(i.put),o.revertClone=i.revertClone,t.group=o},Nt=function(){!Ot&&z&&_(z,"display","none")},At=function(){!Ot&&z&&_(z,"display","")};St&&document.addEventListener("click",(function(t){if(vt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),vt=!1,!1}),!0);var Pt=function(t){if(W){var e=(i=(t=t.touches?t.touches[0]:t).clientX,r=t.clientY,bt.some((function(t){if(!M(t)){var e=T(t),n=t[L].options.emptyInsertThreshold;return n&&i>=e.left-n&&i<=e.right+n&&r>=e.top-n&&r<=e.bottom+n?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[L]._onDragOver(n)}}var i,r,a},kt=function(t){W&&W.parentNode[L]._isOutsideThisEl(t.target)};function Rt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=i({},e),t[L]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return It(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:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Rt.supportPointer&&"PointerEvent"in window&&!d,emptyInsertThreshold:5};for(var o in V.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var r in Mt(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&Tt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?g(t,"pointerdown",this._onTapStart):(g(t,"mousedown",this._onTapStart),g(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(g(t,"dragover",this),g(t,"dragenter",this)),bt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),i(this,F())}function Xt(t,e,n,o,i,r,a,l){var u,d,h=t[L],f=h.options.onMove;return!window.CustomEvent||s||c?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=e,u.from=t,u.dragged=n,u.draggedRect=o,u.related=i||e,u.relatedRect=r||T(e),u.willInsertAfter=l,u.originalEvent=a,t.dispatchEvent(u),f&&(d=f.call(h,u,a)),d}function Yt(t){t.draggable=!1}function Lt(){Dt=!1}function Ft(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Bt(t){return setTimeout(t,0)}function jt(t){return clearTimeout(t)}Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ht=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,W):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){_t.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&_t.push(o)}}(n),!W&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!d||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=y(l,o.draggable,n,!1))&&l.animated||Z===l)){if(J=N(l),et=N(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return $({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),H("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=y(s,o.trim(),n,!1))return $({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),H("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!y(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!W&&n.parentNode===r){var d=T(n);if(G=r,U=(W=n).parentNode,q=W.nextSibling,Z=n,ot=a.group,Rt.dragged=W,ct=(rt={target:W,clientX:(e||t).clientX,clientY:(e||t).clientY}).clientX-d.left,ut=rt.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,W.style["will-change"]="all",o=function(){H("delayEnded",i,{evt:t}),Rt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!u&&i.nativeDraggable&&(W.draggable=!0),i._triggerDragStart(t,e),$({sortable:i,name:"choose",originalEvent:t}),D(W,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){x(W,t.trim(),Yt)})),g(l,"dragover",Pt),g(l,"mousemove",Pt),g(l,"touchmove",Pt),g(l,"mouseup",i._onDrop),g(l,"touchend",i._onDrop),g(l,"touchcancel",i._onDrop),u&&this.nativeDraggable&&(this.options.touchStartThreshold=4,W.draggable=!0),H("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(c||s))o();else{if(Rt.eventCanceled)return void this._onDrop();g(l,"mouseup",i._disableDelayedDrag),g(l,"touchend",i._disableDelayedDrag),g(l,"touchcancel",i._disableDelayedDrag),g(l,"mousemove",i._delayedDragTouchMoveHandler),g(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&g(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){W&&Yt(W),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._disableDelayedDrag),m(t,"touchend",this._disableDelayedDrag),m(t,"touchcancel",this._disableDelayedDrag),m(t,"mousemove",this._delayedDragTouchMoveHandler),m(t,"touchmove",this._delayedDragTouchMoveHandler),m(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?g(document,this.options.supportPointer?"pointermove":e?"touchmove":"mousemove",this._onTouchMove):(g(W,"dragend",this),g(G,"dragstart",this._onDragStart));try{document.selection?Bt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(mt=!1,G&&W){H("dragStarted",this,{evt:e}),this.nativeDraggable&&g(document,"dragover",kt);var n=this.options;!t&&D(W,n.dragClass,!1),D(W,n.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),$({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(at){this._lastX=at.clientX,this._lastY=at.clientY,Nt();for(var t=document.elementFromPoint(at.clientX,at.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(at.clientX,at.clientY))!==e;)e=t;if(W.parentNode[L]._isOutsideThisEl(t),e)do{if(e[L]){if(e[L]._onDragOver({clientX:at.clientX,clientY:at.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);At()}},_onTouchMove:function(t){if(rt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=z&&S(z,!0),a=z&&r&&r.a,l=z&&r&&r.d,s=xt&&gt&&A(gt),c=(i.clientX-rt.clientX+o.x)/(a||1)+(s?s[0]-Et[0]:0)/(a||1),u=(i.clientY-rt.clientY+o.y)/(l||1)+(s?s[1]-Et[1]:0)/(l||1);if(!Rt.active&&!mt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(z){r?(r.e+=c-(lt||0),r.f+=u-(st||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");_(z,"webkitTransform",d),_(z,"mozTransform",d),_(z,"msTransform",d),_(z,"transform",d),lt=c,st=u,at=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!z){var t=this.options.fallbackOnBody?document.body:G,e=T(W,!0,xt,!0,t),n=this.options;if(xt){for(gt=t;"static"===_(gt,"position")&&"none"===_(gt,"transform")&&gt!==document;)gt=gt.parentNode;gt!==document.body&&gt!==document.documentElement?(gt===document&&(gt=C()),e.top+=gt.scrollTop,e.left+=gt.scrollLeft):gt=C(),Et=A(gt)}D(z=W.cloneNode(!0),n.ghostClass,!1),D(z,n.fallbackClass,!0),D(z,n.dragClass,!0),_(z,"transition",""),_(z,"transform",""),_(z,"box-sizing","border-box"),_(z,"margin",0),_(z,"top",e.top),_(z,"left",e.left),_(z,"width",e.width),_(z,"height",e.height),_(z,"opacity","0.8"),_(z,"position",xt?"absolute":"fixed"),_(z,"zIndex","100000"),_(z,"pointerEvents","none"),Rt.ghost=z,t.appendChild(z),_(z,"transform-origin",ct/parseInt(z.style.width)*100+"% "+ut/parseInt(z.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;H("dragStart",this,{evt:t}),Rt.eventCanceled?this._onDrop():(H("setupClone",this),Rt.eventCanceled||((K=Y(W)).draggable=!1,K.style["will-change"]="",this._hideClone(),D(K,this.options.chosenClass,!1),Rt.clone=K),n.cloneId=Bt((function(){H("clone",n),Rt.eventCanceled||(n.options.removeCloneOnHide||G.insertBefore(K,W),n._hideClone(),$({sortable:n,name:"clone"}))})),!e&&D(W,i.dragClass,!0),e?(vt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(m(document,"mouseup",n._onDrop),m(document,"touchend",n._onDrop),m(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,W)),g(document,"drop",n),_(W,"transform","translateZ(0)")),mt=!0,n._dragStartId=Bt(n._dragStarted.bind(n,e,t)),g(document,"selectstart",n),dt=!0,d&&_(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,i,a=this.el,l=t.target,s=this.options,c=s.group,u=Rt.active,d=ot===c,h=s.sort,f=it||u,p=this,g=!1;if(!Dt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),l=y(l,s.draggable,a,!0),Y("dragOver"),Rt.eventCanceled)return g;if(W.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return B(!1);if(vt=!1,u&&!s.disabled&&(d?h||(o=!G.contains(W)):it===this||(this.lastPutMode=ot.checkPull(this,u,W,t))&&c.checkPut(this,u,W,t))){if(i="vertical"===this._getDirection(t,l),e=T(W),Y("dragOverValid"),Rt.eventCanceled)return g;if(o)return U=G,F(),this._hideClone(),Y("revert"),Rt.eventCanceled||(q?G.insertBefore(W,q):G.appendChild(W)),B(!0);var m=M(a,s.draggable);if(!m||function(t,e,n){var o=T(M(n.el,n.options.draggable)),i=10;return e?t.clientX>o.right+i||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+i}(t,i,this)&&!m.animated){if(m===W)return B(!1);if(m&&a===t.target&&(l=m),l&&(n=T(l)),!1!==Xt(G,a,W,e,l,n,t,!!l))return F(),a.appendChild(W),U=a,j(),B(!0)}else if(l.parentNode===a){n=T(l);var v,b,w,E=W.parentNode!==a,S=!function(t,e,n){var o=n?t.left:t.top,i=n?e.left:e.top;return o===i||(n?t.right:t.bottom)===(n?e.right:e.bottom)||o+(n?t.width:t.height)/2===i+(n?e.width:e.height)/2}(W.animated&&W.toRect||e,l.animated&&l.toRect||n,i),x=i?"top":"left",C=O(l,"top","top")||O(W,"top","top"),I=C?C.scrollTop:void 0;if(ht!==l&&(b=n[x],yt=!1,wt=!S&&s.invertSwap||E),0!==(v=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&pt<c*i){if(!yt&&(1===ft?s>u+c*r/2:s<d-c*r/2)&&(yt=!0),yt)h=!0;else if(1===ft?s<u+pt:s>d-pt)return-ft}else if(s>u+c*(1-i)/2&&s<d-c*(1-i)/2)return function(t){return N(W)<N(t)?1:-1}(e);if((h=h||a)&&(s<u+c*r/2||s>d-c*r/2))return s>u+c/2?1:-1;return 0}(t,l,n,i,S?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,wt,ht===l))){var A=N(W);do{w=U.children[A-=v]}while(w&&("none"===_(w,"display")||w===z))}if(0===v||w===l)return B(!1);ht=l,ft=v;var P=l.nextElementSibling,k=!1,R=Xt(G,a,W,e,l,n,t,k=1===v);if(!1!==R)return 1!==R&&-1!==R||(k=1===R),Dt=!0,setTimeout(Lt,30),F(),k&&!P?a.appendChild(W):l.parentNode.insertBefore(W,k?P:l),C&&X(C,0,I-C.scrollTop),U=W.parentNode,void 0===b||wt||(pt=Math.abs(b-T(l)[x])),j(),B(!0)}if(a.contains(W))return B(!1)}return!1}function Y(s,c){H(s,p,r({evt:t,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:h,fromSortable:f,target:l,completed:B,onMove:function(n,o){return Xt(G,a,W,e,n,T(n),t,o)},changed:j},c))}function F(){Y("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function B(e){return Y("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==f&&(D(W,it?it.options.ghostClass:u.options.ghostClass,!1),D(W,s.ghostClass,!0)),it!==p&&p!==Rt.active?it=p:p===Rt.active&&it&&(it=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){Y("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===W&&!W.animated||l===a&&!l.animated)&&(ht=null),s.dragoverBubble||t.rootEl||l===document||(W.parentNode[L]._isOutsideThisEl(t.target),!e&&Pt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function j(){tt=N(W),nt=N(W,s.draggable),$({sortable:p,name:"change",toEl:a,newIndex:tt,newDraggableIndex:nt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){m(document,"mousemove",this._onTouchMove),m(document,"touchmove",this._onTouchMove),m(document,"pointermove",this._onTouchMove),m(document,"dragover",Pt),m(document,"mousemove",Pt),m(document,"touchmove",Pt)},_offUpEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._onDrop),m(t,"touchend",this._onDrop),m(t,"pointerup",this._onDrop),m(t,"touchcancel",this._onDrop),m(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;tt=N(W),nt=N(W,n.draggable),H("drop",this,{evt:t}),U=W&&W.parentNode,tt=N(W),nt=N(W,n.draggable),Rt.eventCanceled||(mt=!1,wt=!1,yt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),jt(this.cloneId),jt(this._dragStartId),this.nativeDraggable&&(m(document,"drop",this),m(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),d&&_(document.body,"user-select",""),_(W,"transform",""),t&&(dt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),z&&z.parentNode&&z.parentNode.removeChild(z),(G===U||it&&"clone"!==it.lastPutMode)&&K&&K.parentNode&&K.parentNode.removeChild(K),W&&(this.nativeDraggable&&m(W,"dragend",this),Yt(W),W.style["will-change"]="",dt&&!mt&&D(W,it?it.options.ghostClass:this.options.ghostClass,!1),D(W,this.options.chosenClass,!1),$({sortable:this,name:"unchoose",toEl:U,newIndex:null,newDraggableIndex:null,originalEvent:t}),G!==U?(tt>=0&&($({rootEl:U,name:"add",toEl:U,fromEl:G,originalEvent:t}),$({sortable:this,name:"remove",toEl:U,originalEvent:t}),$({rootEl:U,name:"sort",toEl:U,fromEl:G,originalEvent:t}),$({sortable:this,name:"sort",toEl:U,originalEvent:t})),it&&it.save()):tt!==J&&tt>=0&&($({sortable:this,name:"update",toEl:U,originalEvent:t}),$({sortable:this,name:"sort",toEl:U,originalEvent:t})),Rt.active&&(null!=tt&&-1!==tt||(tt=J,nt=et),$({sortable:this,name:"end",toEl:U,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){H("nulling",this),G=W=U=z=q=K=Z=Q=rt=at=dt=tt=nt=J=et=ht=ft=it=ot=Rt.dragged=Rt.ghost=Rt.clone=Rt.active=null,_t.forEach((function(t){t.checked=!0})),_t.length=lt=st=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":W&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)y(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Ft(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var i=o.children[e];y(i,this.options.draggable,o,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return y(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=V.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Mt(n)},destroy:function(){H("destroy",this);var t=this.el;t[L]=null,m(t,"mousedown",this._onTapStart),m(t,"touchstart",this._onTapStart),m(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(m(t,"dragover",this),m(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),bt.splice(bt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Q){if(H("hideClone",this),Rt.eventCanceled)return;_(K,"display","none"),this.options.removeCloneOnHide&&K.parentNode&&K.parentNode.removeChild(K),Q=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Q){if(H("showClone",this),Rt.eventCanceled)return;W.parentNode!=G||this.options.group.revertClone?q?G.insertBefore(K,q):G.appendChild(K):G.insertBefore(K,W),this.options.group.revertClone&&this.animate(W,K),_(K,"display",""),Q=!1}}else this._hideClone()}},St&&g(document,"touchmove",(function(t){(Rt.active||mt)&&t.cancelable&&t.preventDefault()})),Rt.utils={on:g,off:m,css:_,find:x,is:function(t,e){return!!y(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:R,closest:y,toggleClass:D,clone:Y,index:N,nextTick:Bt,cancelNextTick:jt,detectDirection:It,getChild:I},Rt.get=function(t){return t[L]},Rt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Rt.utils=r({},Rt.utils,t.utils)),V.mount(t)}))},Rt.create=function(t,e){return new Rt(t,e)},Rt.version="1.13.0";var Vt,Ht,$t,Wt,Ut,zt,Gt=[],qt=!1;function Zt(){Gt.forEach((function(t){clearInterval(t.pid)})),Gt=[]}function Kt(){clearInterval(zt)}var Qt=R((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=C(),u=!1;Ht!==n&&(Ht=n,Zt(),i=e.scrollFn,!0===(Vt=e.scroll)&&(Vt=P(n,!0)));var d=0,h=Vt;do{var f=h,p=T(f),g=p.top,m=p.bottom,v=p.left,b=p.right,y=p.width,w=p.height,E=void 0,D=void 0,S=f.scrollWidth,x=f.scrollHeight,O=_(f),I=f.scrollLeft,M=f.scrollTop;f===c?(E=y<S&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),D=w<x&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(E=y<S&&("auto"===O.overflowX||"scroll"===O.overflowX),D=w<x&&("auto"===O.overflowY||"scroll"===O.overflowY));var N=E&&(Math.abs(b-r)<=l&&I+y<S)-(Math.abs(v-r)<=l&&!!I),A=D&&(Math.abs(m-a)<=l&&M+w<x)-(Math.abs(g-a)<=l&&!!M);if(!Gt[d])for(var k=0;k<=d;k++)Gt[k]||(Gt[k]={});Gt[d].vx==N&&Gt[d].vy==A&&Gt[d].el===f||(Gt[d].el=f,Gt[d].vx=N,Gt[d].vy=A,clearInterval(Gt[d].pid),0==N&&0==A||(u=!0,Gt[d].pid=setInterval(function(){o&&0===this.layer&&Rt.active._onTouchMove(Ut);var e=Gt[this.layer].vy?Gt[this.layer].vy*s:0,n=Gt[this.layer].vx?Gt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Rt.dragged.parentNode[L],n,e,t,Ut,Gt[this.layer].el)||X(Gt[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==c&&(h=P(h,!1)));qt=u}}),30),Jt=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.dispatchSortableEvent,r=t.unhideGhostForTarget;if(e){var a=n||t.activeSortable;(0,t.hideGhostForTarget)();var l=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,s=document.elementFromPoint(l.clientX,l.clientY);r(),a&&!a.el.contains(s)&&(i("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function te(){}function ee(){}te.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=I(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Jt},i(te,{pluginName:"revertOnSpill"}),ee.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Jt},i(ee,{pluginName:"removeOnSpill"}),Rt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?g(document,"dragover",this._handleAutoScroll):g(document,this.options.supportPointer?"pointermove":e.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?m(document,"dragover",this._handleAutoScroll):(m(document,"pointermove",this._handleFallbackAutoScroll),m(document,"touchmove",this._handleFallbackAutoScroll),m(document,"mousemove",this._handleFallbackAutoScroll)),Kt(),Zt(),clearTimeout(w),w=void 0},nulling:function(){Ut=Ht=Vt=qt=zt=$t=Wt=null,Gt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(Ut=t,e||c||s||d){Qt(t,this.options,r,e);var a=P(r,!0);!qt||zt&&o===$t&&i===Wt||(zt&&Kt(),zt=setInterval((function(){var r=P(document.elementFromPoint(o,i),!0);r!==a&&(a=r,Zt()),Qt(t,n.options,r,e)}),10),$t=o,Wt=i)}else{if(!this.options.bubbleScroll||P(r,!0)===C())return void Zt();Qt(t,this.options,P(r,!1),!1)}}},i(t,{pluginName:"scroll",initializeByDefault:!0})}),Rt.mount(ee,te);const ne="undefined"!=typeof window?window.console:global.console;const oe=/-(\w)/g,ie=function(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}((t=>t.replace(oe,((t,e)=>e?e.toUpperCase():""))));function re(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function ae(t,e,n){t.insertBefore(e,0===n?t.children[0]:t.children[n-1].nextSibling)}function le(t,e){this.$nextTick((()=>this.$emit(t.toLowerCase(),e)))}function se(t){return e=>{null!==this.realList&&this["onDrag"+t](e),le.call(this,t,e)}}const ce=["Start","Add","Remove","Update","End"],ue=["Choose","Unchoose","Sort","Filter","Clone"],de=["Move",...ce,...ue].map((t=>"on"+t));let he=null;const fe={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:t=>t},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},pe=e.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...ce.map((t=>t.toLowerCase())),...ue.map((t=>t.toLowerCase()))],props:fe,data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}),render(){const t=this.$slots.default?this.$slots.default():null,n=(o=this.$attrs,(i=this.componentData)?{...i.props,...i.attrs}:o);var o,i;return t?(this.transitionMode=function(t){if(!t||1!==t.length)return!1;const[{type:e}]=t;return!!e&&["transition-group","TransitionGroup"].includes(e.name)}(t),e.h(this.getTag(),n,t)):e.h(this.getTag(),n,[])},created(){null!==this.list&&null!==this.modelValue&&ne.error("list props are mutually exclusive! Please set one.")},mounted(){const t={};ce.forEach((e=>{t["on"+e]=se.call(this,e)})),ue.forEach((e=>{t["on"+e]=le.bind(this,e)}));const e=Object.keys(this.$attrs).reduce(((t,e)=>(t[ie(e)]=this.$attrs[e],t)),{}),n=Object.assign({},e,t,{onMove:(t,e)=>this.onDragMove(t,e)});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new Rt(this.$el,n),this.computeIndexes()},beforeUnmount(){try{void 0!==this._sortable&&this._sortable.destroy()}catch(t){}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(t){this.updateOptions(t)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?e.resolveComponent(this.component):this.tag},updateOptions(t){for(var e in t){const n=ie(e);-1===de.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick((()=>{this.visibleIndexes=function(t,e,n,o){if(!t)return[];const i=Object.values(t),r=e.length-o;return[...e].map(((t,e)=>e>=r?i.length:i.indexOf(t)))}(this.getChildrenNodes(),this.$el.children,0,this.footerOffset)}))},getUnderlyingVm(t){const e=function(t,e){return Object.values(t).indexOf(e)}(this.getChildrenNodes()||[],t);if(-1===e)return null;return{index:e,element:this.realList[e]}},emitChanges(t){this.$nextTick((()=>{this.$emit("change",t)}))},alterList(t){if(this.list)return void t(this.list);const e=[...this.modelValue];t(e),this.$emit("update:modelValue",e)},spliceList(){this.alterList((t=>t.splice(...arguments)))},updatePosition(t,e){this.alterList((n=>n.splice(e,0,n.splice(t,1)[0])))},getVmIndex(t){const e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(t){if(!this.noTransitionOnDrag||!this.transitionMode)return;this.getChildrenNodes()[t].data=null;const e=this.getComponent();e.children=[],e.kept=void 0},onDragStart(t){this.context=this.getUnderlyingVm(t.item),this.context&&(t.item._underlying_vm_=this.clone(this.context.element),he=t.item)},onDragAdd(t){const e=t.item._underlying_vm_;if(void 0===e)return;re(t.item);const n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();this.emitChanges({added:{element:e,newIndex:n}})},onDragRemove(t){if(ae(this.$el,t.item,t.oldIndex),"clone"===t.pullMode)return void re(t.clone);if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})},onDragUpdate(t){re(t.item),ae(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);this.emitChanges({moved:{element:this.context.element,oldIndex:e,newIndex:n}})},updateProperty(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},onDragMove(t,e){const n=this.move;if(!n||!this.realList)return!0;const o=this.getRelatedContextFromMoveEvent(t),i=this.context,r=this.computeFutureIndex(o,t);Object.assign(i,{futureIndex:r});return n(Object.assign({},t,{relatedContext:o,draggedContext:i}),e)},onDragEnd(){this.computeIndexes(),he=null},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this;if(!n)return{component:n};const o=n.realList,i={list:o,component:n};if(t!==e&&o&&n.getUnderlyingVm){const t=n.getUnderlyingVm(e);if(t)return Object.assign(t,i)}return i},computeFutureIndex(t,e){if(!t.element)return 0;const n=[...e.to.children].filter((t=>"none"!==t.style.display)),o=n.indexOf(e.related),i=t.component.getVmIndex(o);return-1!==n.indexOf(he)||!e.willInsertAfter?i:i+1}}});return t.VueDraggableNext=pe,Object.defineProperty(t,"__esModule",{value:!0}),t}({},Vue);
{
"name": "vue-draggable-next",
"version": "2.0.0",
"version": "2.0.1",
"description": "Build Draggable component using vue 3",

@@ -58,2 +58,4 @@ "main": "dist/vue-draggable-next.cjs.js",

"@types/sortablejs": "^1.10.6",
"@vitejs/plugin-vue": "^1.0.4",
"@vue/compiler-sfc": "^3.0.5",
"@vue/test-utils": "^2.0.0-beta.8",

@@ -71,9 +73,9 @@ "codecov": "^3.8.1",

"size-limit": "^4.7.0",
"sortablejs": "^1.12.0",
"sortablejs": "^1.13.0",
"tailwindcss": "^1.9.6",
"ts-jest": "^26.4.1",
"typescript": "^4.0.5",
"vite": "^1.0.0-rc.9",
"vue": "^3.0.2",
"vuex": "^4.0.0-rc.1",
"vite": "^2.0.0-beta.15",
"vue": "^3.0.5",
"vuex": "^4.0.0-rc.2",
"yorkie": "^2.0.0"

@@ -99,4 +101,4 @@ },

"peerDependencies": {
"sortablejs": "^1.12.0",
"vue": "^3.0.0"
"sortablejs": "^1.13.0",
"vue": "^3.0.5"
},

@@ -103,0 +105,0 @@ "repository": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc