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

sortable-dnd

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sortable-dnd - npm Package Compare versions

Comparing version 0.4.7 to 0.4.8

4

dist/sortable.js
/*!
* sortable-dnd v0.4.7
* sortable-dnd v0.4.8
* open source under the MIT license

@@ -217,3 +217,3 @@ * https://github.com/mfuu/sortable-dnd#readme

var touch = evt.touches && evt.touches[0] || evt.changedTouches && evt.changedTouches[0] || evt.pointerType && evt.pointerType === 'touch' && evt;
var target = touch ? document.elementFromPoint(e.clientX, e.clientY) : evt.target;
var target = touch ? document.elementFromPoint(touch.clientX, touch.clientY) : evt.target;
if (touch) {

@@ -220,0 +220,0 @@ event.clientX = touch.clientX;

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function F(e,t){var o,n=Object.keys(e);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(e),t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)),n}function c(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?F(Object(i),!0).forEach(function(t){var e,o;e=n,o=i[t=t],(t=function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0===o)return("string"===e?String:Number)(t);o=o.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):F(Object(i)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(i,t))})}return n}function H(t){return(H="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 I(t){return function(t){if(Array.isArray(t))return L(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){var o;if(t)return"string"==typeof t?L(t,e):"Map"===(o="Object"===(o=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:o)||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?L(t,e):void 0}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=new Array(e);o<e;o++)n[o]=t[o];return n}var R={capture:!1,passive:!1},k=/\s+/g,o={start:["pointerdown","touchstart","mousedown"],move:["pointermove","touchmove","mousemove"],end:["pointerup","pointercancel","touchend","touchcancel","mouseup"]};function t(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var W,f=t(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),z=t(/Edge/i),l=t(/safari/i)&&!t(/chrome/i)&&!t(/android/i),q=(W=!1,document.addEventListener("checkIfSupportPassive",null,{get passive(){return W=!0}}),W),U="undefined"==typeof window||"undefined"==typeof document?"":(i=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],"ms"!==(i=(Array.prototype.slice.call(i).join("").match(/-(moz|webkit|ms)-/)||""===i.OLink&&["","o"])[1])?i&&i.length?i[0].toUpperCase()+i.substr(1):"":"ms");function u(t,e){t.style["".concat(U,"Transition")]=e?"none"===e?"none":"".concat(e):""}function h(t,e){t.style["".concat(U,"Transform")]=e?"".concat(e):""}function p(t,e,o){window.addEventListener?t.addEventListener(e,o,!(!q&&f)&&R):window.attachEvent&&t.attachEvent("on"+e,o)}function n(t,e,o){window.removeEventListener?t.removeEventListener(e,o,!(!q&&f)&&R):window.detachEvent&&t.detachEvent("on"+e,o)}function V(t){var o=t,n=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t.pointerType&&"touch"===t.pointerType&&t,t=n?document.elementFromPoint(e.clientX,e.clientY):t.target;return n&&(o.clientX=n.clientX,o.clientY=n.clientY,o.pageX=n.pageX,o.pageY=n.pageY,o.screenX=n.screenX,o.screenY=n.screenY),{touch:n,event:o,target:t}}function a(t){for(var e={top:0,left:0,height:t.offsetHeight,width:t.offsetWidth},o=d();e.top+=t.offsetTop,e.left+=t.offsetLeft,t!==o&&(t=t.offsetParent););return e}function d(){var t=document.scrollingElement;return!t||t.contains(document.body)?document:t}function m(t){var e,o,n,i,r,s,a,l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=2<arguments.length?arguments[2]:void 0;if(t.getBoundingClientRect||t===window){if(t!==window&&t.parentNode&&t!==d()){if(o=(e=t.getBoundingClientRect()).top,n=e.left,i=e.bottom,r=e.right,s=e.height,a=e.width,l.parent&&t.parentNode!==t.ownerDocument.body)for(var u,h=t.parentNode;h&&h.getBoundingClientRect&&h!==t.ownerDocument.body;){if((u=h.getBoundingClientRect()).height<s)return o=u.top,n=u.left,i=u.bottom,r=u.right,s=u.height,{top:o,left:n,bottom:i,right:r,width:a=u.width,height:s};h=h.parentNode}}else n=o=0,i=window.innerHeight,r=window.innerWidth,s=window.innerHeight,a=window.innerWidth;if((l.block||l.relative)&&t!==window&&(c=c||t.parentNode,!f))do{if(c&&c.getBoundingClientRect&&("none"!==y(c,"transform")||l.relative&&"static"!==y(c,"position"))){var p=c.getBoundingClientRect();o-=p.top+parseInt(y(c,"border-top-width")),n-=p.left+parseInt(y(c,"border-left-width")),i=o+e.height,r=n+e.width;break}}while(c=c.parentNode);return{top:o,left:n,bottom:i,right:r,width:a,height:s}}}function Z(t,e,o,n){if(t){o=o||document;do{if(null==e){var i=I(Array.from(o.children)),r=i.indexOf(t);if(-1<r)return i[r];for(var s=0;s<i.length;s++)if($(t,i[s]))return i[s]}else if(">"===e[0]?t.parentNode===o&&v(t,e):v(t,e)||n&&t===o)return t}while(t=t.parentNode)}return null}function $(t,e){if(e.compareDocumentPosition)return e===t||16&e.compareDocumentPosition(t);if(e.contains&&1===t.nodeType)return e.contains(t)&&e!==t;for(;t=t.parentNode;)if(t===e)return 1}function g(t,e,o){var n;t&&e&&(t.classList?t.classList[o?"add":"remove"](e):(n=(" "+t.className+" ").replace(k," ").replace(" "+e+" "," "),t.className=(n+(o?" "+e:"")).replace(k," ")))}function v(t,e){if(e&&(">"===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}}function G(t,e){return t.top!==e.top||t.left!==e.left}function y(t,e,o){var n=t&&t.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),void 0===e?o:o[e];n[e=e in n||-1!==e.indexOf("webkit")?e:"-webkit-"+e]=o+("string"==typeof o?"":"px")}}var b="Sortable"+Date.now(),i={sortable:null,nodes:[]},s=c({},i),w=c({},i),_={};function J(t){this.options=t||{},this.groupName=t.group.name}function K(){this.autoScrollAnimationFrame=null,this.speed={x:10,y:10}}function Q(){this.animations=[]}function tt(){this.helper=null}J.prototype={allowDrag:function(t){return this.options.multiple&&_[this.groupName]&&_[this.groupName].length&&-1<_[this.groupName].indexOf(t)},getHelper:function(){var o=document.createElement("div");return _[this.groupName].forEach(function(t,e){t=t.cloneNode(!0);t.style="\n opacity: ".concat(0===e?1:.5,";\n position: absolute;\n z-index: ").concat(e,";\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n "),o.appendChild(t)}),o},select:function(t,e,o){var n,i=this;e&&(_[this.groupName]||(_[this.groupName]=[]),n=_[this.groupName].indexOf(e),g(e,this.options.selectedClass,n<0),t=c(c({},o),{},{event:t}),n<0?(_[this.groupName].push(e),o.sortable._dispatchEvent("onSelect",t)):(_[this.groupName].splice(n,1),o.sortable._dispatchEvent("onDeselect",t)),_[this.groupName].sort(function(t,e){return i._sortByOffset(a(t),a(e))}))},onDrag:function(t){s.sortable=t,s.nodes=_[this.groupName].map(function(t){return{node:t,rect:m(t),offset:a(t)}}),w.sortable=t},onTrulyStarted:function(e,t){t.animator.collect(e,e,e.parentNode),_[this.groupName].forEach(function(t){t!=e&&t.parentNode.removeChild(t)}),t.animator.animate(t.options.animation)},onChange:function(t,e){var o=m(t),n=a(t);w.sortable=e,w.nodes=_[this.groupName].map(function(t){return{node:t,rect:o,offset:n}})},onDrop:function(t,o,e,n){var i=this,r=(w.sortable.animator.collect(o,o,o.parentNode),_[this.groupName].indexOf(o)),e=(_[this.groupName].forEach(function(t,e){e<r?o.parentNode.insertBefore(t,o):(e=0<e?_[i.groupName][e-1]:o,o.parentNode.insertBefore(t,e.nextSibling))}),s.sortable=e.sortable,w.nodes=_[this.groupName].map(function(t){return{node:t,rect:m(t),offset:a(t)}}),this._offsetChanged(s.nodes,w.nodes)),n=c(c({},n()),{},{changed:e,event:t});w.sortable.el!=s.sortable.el&&s.sortable._dispatchEvent("onDrop",n),w.sortable._dispatchEvent("onDrop",n),w.sortable.animator.animate(w.sortable.options.animation)},_sortByOffset:function(t,e){return t.top==e.top?t.left>e.left:t.top>e.top},_offsetChanged:function(t,o){return!!t.find(function(e){return G(o.find(function(t){return t.node===e.node}).offset,e.offset)})}},window.requestAnimationFrame||(window.requestAnimationFrame=function(t){return setTimeout(t,17)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)}),K.prototype={clear:function(){null!=this.autoScrollAnimationFrame&&(cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=null)},update:function(s,a,l,c){var u=this;cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=requestAnimationFrame(function(){var t=m(s),e=t.top,o=t.right,n=t.bottom,t=t.left,i=c.clientX,r=c.clientY;r<e||n<r||i<t||o<i||(l&&c&&u.autoScroll(s,a,c),u.update(s,a,l,c))})},autoScroll:function(t,e,o){var n,i,r,s,a,l,c,u,h,p,f,d;t&&(n=o.clientX,o=o.clientY,void 0!==n)&&void 0!==o&&(h=m(t))&&(f=t.scrollTop,i=t.scrollLeft,r=t.scrollHeight,p=t.scrollWidth,s=h.top,a=h.right,l=h.bottom,c=h.left,d=h.height,u=0<f&&s<=o&&o<=s+e,h=i+h.width<p&&n<=a&&a-e<=n,p=f+d<r&&o<=l&&l-e<=o,f=(d=f=0)<i&&c<=n&&n<=c+e?Math.floor(Math.max(-1,(n-c)/e-1)*this.speed.x):h?Math.ceil(Math.min(1,(n-a)/e+1)*this.speed.x):0,(d=u?Math.floor(Math.max(-1,(o-s)/e-1)*this.speed.y):p?Math.ceil(Math.min(1,(o-l)/e+1)*this.speed.y):0)&&(t.scrollTop+=d),f)&&(t.scrollLeft+=f)}},Q.prototype={collect:function(t,e,o,n){var i,r,s,a=this;o&&(i=I(Array.from(o.children)),r=(s=this._getRange(i,t,e,n)).start,s=s.end,this.animations.length=0,t=(t||e).offsetHeight,e=Math.floor(o.scrollHeight/t),o=Math.min(i.length-1,e),r<0&&(r=s,s=o),i.slice(r,(s=s<0?o:s)+1).forEach(function(t){t!==n&&a.animations.push({node:t,rect:m(t)})}))},animate:function(o){var n=this;this.animations.forEach(function(t){var e=t.node,t=t.rect;n._excute(e,t,o)})},_excute:function(t,e){var o=e.left,e=e.top,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:150,i=m(t),e=e-i.top,o=o-i.left;u(t,"none"),h(t,"translate3d(".concat(o,"px, ").concat(e,"px, 0)")),t.offsetWidth,u(t,"".concat(n,"ms")),h(t,"translate3d(0px, 0px, 0px)"),clearTimeout(t.animated),t.animated=setTimeout(function(){u(t,""),h(t,""),t.animated=null},n)},_getRange:function(t,e,o){e=t.indexOf(e),t=t.indexOf(o);return t<e&&(e=(o=[t,e])[0],t=o[1]),{start:e,end:t}}},tt.prototype={get node(){return this.helper},destroy:function(){this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.helper=null},move:function(t,e){h(this.helper,"translate3d(".concat(t,"px, ").concat(e,"px, 0)"))},init:function(t,e,o,n,i){if(!this.helper){var r,s=n.fallbackOnBody,a=n.ghostClass,n=n.ghostStyle,n=void 0===n?{}:n,s=s?document.body:o,l=(this.helper=e.cloneNode(!0),g(this.helper,a,!0),c({"box-sizing":"border-box",top:t.top,left:t.left,width:t.width,height:t.height,position:"fixed",opacity:"0.8","z-index":1e5,"pointer-events":"none"},n));for(r in l)y(this.helper,r,l[r]);u(this.helper,"none"),h(this.helper,"translate3d(0px, 0px, 0px)"),s.appendChild(this.helper);o=i.x/parseInt(this.helper.style.width)*100,e=i.y/parseInt(this.helper.style.height)*100;y(this.helper,"transform-origin","".concat(o,"% ").concat(e,"%")),y(this.helper,"transform","translateZ(0)")}}};function et(t){var e;D&&(e=t.touches?t.touches[0]:t,e=ot(e.clientX,e.clientY))&&(S=e)!==N.sortable.el&&e[b]._onMove(t)}function ot(i,r){var s;return A.some(function(t){var e,o,n=t[b].options.emptyInsertThreshold;if(n)return o=m(t,{parent:!0}),e=i>=o.left-n&&i<=o.right+n,o=r>=o.top-n&&r<=o.bottom+n,e&&o?s=t:void 0}),s}function r(){var t,e={from:c({},j),to:c({},B)};return C&&(t={from:c({},s),to:c({},w)},e.from=c(c({},t.from),e.from),e.to=c(c({},t.to),e.to)),e}var S,D,E,N,x,O,C,T,M,nt={sortable:null,group:null,node:null,rect:{},offset:{}},A=[],P=new tt,j=c({},nt),B=c({},nt),it={x:0,y:0},X={x:0,y:0};function Y(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));(t[b]=this).el=t,this.ownerDocument=t.ownerDocument,this.options=e=Object.assign({},e);var o,n,i,r={group:"",animation:150,multiple:!1,draggable:null,handle:null,onDrag:null,onMove:null,onDrop:null,onChange:null,autoScroll:!0,scrollThreshold:25,delay:0,delayOnTouchOnly:!1,disabled:!1,ghostClass:"",ghostStyle:{},chosenClass:"",selectedClass:"",fallbackOnBody:!1,stopPropagation:!1,supportPointer:"onpointerdown"in window&&!l,supportTouch:"ontouchstart"in window,emptyInsertThreshold:5};for(o in r)o in this.options||(this.options[o]=r[o]);for(i in e=e,s="group_"+Number(Math.random().toString().slice(-3)+Date.now()).toString(32),n={},(a=e.group)&&"object"==H(a)||(a={name:a,pull:!0,put:!0}),n.name=a.name||s,n.pull=a.pull,n.put=a.put,e.group=n,this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));var s=this.options,a=s.supportPointer,e=s.supportTouch;p(t,a?"pointerdown":e?"touchstart":"mousedown",this._onDrag),A.push(t),this.multiplayer=new J(this.options),this.animator=new Q,T=new K}return(Y.prototype={constructor:Y,get helper(){return P.node},destroy:function(){this._dispatchEvent("destroy",this),this.el[b]=null;for(var t=0;t<o.start.length;t++)n(this.el,o.start[t],this._onDrag);this._clearState(),A.splice(A.indexOf(this.el),1),0==A.length&&(T=null),this.el=null},_onDrag:function(t){var e=this;if(!D&&!this.options.disabled&&this.options.group.pull&&(!/mousedown|pointerdown/.test(t.type)||0===t.button)){var o=V(t),n=o.touch,i=o.event,o=o.target;if(!(l&&o&&"SELECT"===o.tagName.toUpperCase()||o===this.el)){var r=this.options,s=r.draggable,r=r.handle;if(("function"!=typeof r||r(t))&&("string"!=typeof r||v(o,r))){if("function"==typeof s){r=s(t);if(!r)return;!function(e){if(e){var t=document.createElement("div");try{return t.appendChild(e.cloneNode(!0)),1==e.nodeType}catch(t){return e==window||e==document}}}(r)||(D=r)}else D=Z(o,s,this.el,!1);D&&!D.animated&&(n&&(D.style["touch-action"]="none"),t=D.parentNode,O=n,(N=i).sortable=this,N.group=t,(C=this.options.multiple&&this.multiplayer.allowDrag(D))&&this.multiplayer.onDrag(this),r=m(D),o=a(D),j={sortable:this,group:t,node:D,rect:r,offset:o},B.group=t,B.sortable=this,it={x:i.clientX-r.left,y:i.clientY-r.top},this.options.supportPointer?p(this.ownerDocument,"pointermove",et):p(this.ownerDocument,n?"touchmove":"mousemove",et),o=(s=this.options).delay,t=s.delayOnTouchOnly,!o||t&&!n||z||f?this._onStart():(clearTimeout(M),M=setTimeout(function(){return e._onStart()},o)))}}}},_onStart:function(){S=this.el,this.options.supportPointer?(p(this.ownerDocument,"pointermove",this._onMove),p(this.ownerDocument,"pointerup",this._onDrop),p(this.ownerDocument,"pointercancel",this._onDrop)):O?(p(this.ownerDocument,"touchmove",this._onMove),p(this.ownerDocument,"touchend",this._onDrop),p(this.ownerDocument,"touchcancel",this._onDrop)):(p(this.ownerDocument,"mousemove",this._onMove),p(this.ownerDocument,"mouseup",this._onDrop));try{document.selection?setTimeout(function(){document.selection.empty()},0):window.getSelection().removeAllRanges()}catch(t){}},_onTrulyStarted:function(){var t;x||(this._dispatchEvent("onDrag",c(c({},r()),{},{event:N})),C&&this.multiplayer.onTrulyStarted(D,this),t=C?this.multiplayer.getHelper():D,P.init(j.rect,t,this.el,this.options,it),g(D,this.options.chosenClass,!0),D.style["will-change"]="transform",l&&y(document.body,"user-select","none"))},_onMove:function(t){var e,o,n,i;this._preventEvent(t),N&&D&&(i=(e=t).clientX,e=e.clientY,o=i-X.x,n=e-X.y,X.x=i,X.y=e,void 0!==i&&void 0!==e&&Math.abs(o)<=0&&Math.abs(n)<=0||(e=(i=V(t)).event,o=i.target,this._onTrulyStarted(),x=e,n=t.clientX-N.clientX,i=t.clientY-N.clientY,P.move(n,i),this._dispatchEvent("onMove",c(c({},r()),{},{event:e})),this.scrollEl||(this.scrollEl=function(t,e){if(t&&t.getBoundingClientRect){var o=t,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var i=y(o);if(o.clientWidth<o.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!o.getBoundingClientRect||o===document.body)return d();if(n||e)return o;n=!0}}}while(o=o.parentNode)}return d()}(this.el,!0)),n=(t=this.options).autoScroll,i=t.scrollThreshold,n&&T.update(this.scrollEl,i,N,x),!this._allowPut())||(E=Z(o,this.options.draggable,S,!1))===D||E&&E.animated||E&&$(E,D)||(S!==j.sortable.el?o!==S&&function(t,e,o){for(var n=t.lastElementChild;n&&(n===e||"none"===y(n,"display")||o&&!v(n,o));)n=n.previousElementSibling;return n}(S,P.node)?E&&this._onInsert(e,!1):this._onInsert(e,!0):E&&this._onChange(e)))},_allowPut:function(){var t,e;return N.group===this.el||!!this.options.group.put&&(t=this.options.group.name,(e=N.sortable.options.group).name)&&t&&e.name===t},_onInsert:function(t,e){var o=e?D:E,n=e?S:E.parentNode;j.sortable.animator.collect(D,null,D.parentNode,D),this.animator.collect(null,o,n,D),C&&this.multiplayer.onChange(D,this),B={sortable:this,group:n,node:o,rect:m(D),offset:a(D)},j.sortable._dispatchEvent("onRemove",c(c({},r()),{},{event:t})),e?n.appendChild(D):n.insertBefore(D,o),this._dispatchEvent("onAdd",c(c({},r()),{},{event:t})),j.sortable.animator.animate(),this.animator.animate(),j.group=n,j.sortable=this},_onChange:function(t){var e=E.parentNode,t=(this.animator.collect(D,E,e),C&&this.multiplayer.onChange(D,this),B={sortable:this,group:e,node:E,rect:m(E),offset:a(E)},this._dispatchEvent("onChange",c(c({},r()),{},{event:t})),a(D));t.top<B.offset.top||t.left<B.offset.left?e.insertBefore(D,E.nextSibling):e.insertBefore(D,E),this.animator.animate(),j.group=e,j.sortable=this},_onDrop:function(t){var e;this._unbindMoveEvents(),this._unbindDropEvents(),this._preventEvent(t),T.clear(),clearTimeout(M),D&&(g(D,this.options.chosenClass,!1),O&&(D.style["touch-action"]=""),D.style["will-change"]=""),D&&N&&x?(j.group=N.group,j.sortable=N.sortable,C?this.multiplayer.onDrop(t,D,N,r):(B.rect=m(D),B.offset=a(D),e=G(j.offset,B.offset),e=c(c({},r()),{},{changed:e,event:t}),B.sortable.el!==j.sortable.el&&j.sortable._dispatchEvent("onDrop",e),B.sortable._dispatchEvent("onDrop",e)),l&&y(document.body,"user-select","")):this.options.multiple&&this.multiplayer.select(t,D,c({},j)),this._clearState()},_preventEvent:function(t){void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation&&t.stopPropagation()},_dispatchEvent:function(t,e){t=this.options[t];"function"==typeof t&&t(e)},_clearState:function(){D=E=N=x=O=C=M=Y.ghost=null,it=X={x:0,y:0},j=B=c({},nt),P.destroy()},_unbindMoveEvents:function(){for(var t=0;t<o.move.length;t++)n(this.ownerDocument,o.move[t],this._onMove),n(this.ownerDocument,o.move[t],et)},_unbindDropEvents:function(){for(var t=0;t<o.end.length;t++)n(this.ownerDocument,o.end[t],this._onDrop)}}).utils={getRect:m,getOffset:a},Y});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function Y(e,t){var o,n=Object.keys(e);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(e),t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)),n}function c(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(i),!0).forEach(function(t){var e,o;e=n,o=i[t=t],(t=function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0===o)return("string"===e?String:Number)(t);o=o.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Y(Object(i)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(i,t))})}return n}function F(t){return(F="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 H(t){return function(t){if(Array.isArray(t))return I(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){var o;if(t)return"string"==typeof t?I(t,e):"Map"===(o="Object"===(o=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:o)||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?I(t,e):void 0}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=new Array(e);o<e;o++)n[o]=t[o];return n}var L={capture:!1,passive:!1},R=/\s+/g,e={start:["pointerdown","touchstart","mousedown"],move:["pointermove","touchmove","mousemove"],end:["pointerup","pointercancel","touchend","touchcancel","mouseup"]};function t(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var k,f=t(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),W=t(/Edge/i),l=t(/safari/i)&&!t(/chrome/i)&&!t(/android/i),z=(k=!1,document.addEventListener("checkIfSupportPassive",null,{get passive(){return k=!0}}),k),q="undefined"==typeof window||"undefined"==typeof document?"":(n=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],"ms"!==(n=(Array.prototype.slice.call(n).join("").match(/-(moz|webkit|ms)-/)||""===n.OLink&&["","o"])[1])?n&&n.length?n[0].toUpperCase()+n.substr(1):"":"ms");function u(t,e){t.style["".concat(q,"Transition")]=e?"none"===e?"none":"".concat(e):""}function h(t,e){t.style["".concat(q,"Transform")]=e?"".concat(e):""}function p(t,e,o){window.addEventListener?t.addEventListener(e,o,!(!z&&f)&&L):window.attachEvent&&t.attachEvent("on"+e,o)}function o(t,e,o){window.removeEventListener?t.removeEventListener(e,o,!(!z&&f)&&L):window.detachEvent&&t.detachEvent("on"+e,o)}function U(t){var e=t,o=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t.pointerType&&"touch"===t.pointerType&&t,t=o?document.elementFromPoint(o.clientX,o.clientY):t.target;return o&&(e.clientX=o.clientX,e.clientY=o.clientY,e.pageX=o.pageX,e.pageY=o.pageY,e.screenX=o.screenX,e.screenY=o.screenY),{touch:o,event:e,target:t}}function a(t){for(var e={top:0,left:0,height:t.offsetHeight,width:t.offsetWidth},o=d();e.top+=t.offsetTop,e.left+=t.offsetLeft,t!==o&&(t=t.offsetParent););return e}function d(){var t=document.scrollingElement;return!t||t.contains(document.body)?document:t}function m(t){var e,o,n,i,r,s,a,l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=2<arguments.length?arguments[2]:void 0;if(t.getBoundingClientRect||t===window){if(t!==window&&t.parentNode&&t!==d()){if(o=(e=t.getBoundingClientRect()).top,n=e.left,i=e.bottom,r=e.right,s=e.height,a=e.width,l.parent&&t.parentNode!==t.ownerDocument.body)for(var u,h=t.parentNode;h&&h.getBoundingClientRect&&h!==t.ownerDocument.body;){if((u=h.getBoundingClientRect()).height<s)return o=u.top,n=u.left,i=u.bottom,r=u.right,s=u.height,{top:o,left:n,bottom:i,right:r,width:a=u.width,height:s};h=h.parentNode}}else n=o=0,i=window.innerHeight,r=window.innerWidth,s=window.innerHeight,a=window.innerWidth;if((l.block||l.relative)&&t!==window&&(c=c||t.parentNode,!f))do{if(c&&c.getBoundingClientRect&&("none"!==y(c,"transform")||l.relative&&"static"!==y(c,"position"))){var p=c.getBoundingClientRect();o-=p.top+parseInt(y(c,"border-top-width")),n-=p.left+parseInt(y(c,"border-left-width")),i=o+e.height,r=n+e.width;break}}while(c=c.parentNode);return{top:o,left:n,bottom:i,right:r,width:a,height:s}}}function V(t,e,o,n){if(t){o=o||document;do{if(null==e){var i=H(Array.from(o.children)),r=i.indexOf(t);if(-1<r)return i[r];for(var s=0;s<i.length;s++)if(Z(t,i[s]))return i[s]}else if(">"===e[0]?t.parentNode===o&&v(t,e):v(t,e)||n&&t===o)return t}while(t=t.parentNode)}return null}function Z(t,e){if(e.compareDocumentPosition)return e===t||16&e.compareDocumentPosition(t);if(e.contains&&1===t.nodeType)return e.contains(t)&&e!==t;for(;t=t.parentNode;)if(t===e)return 1}function g(t,e,o){var n;t&&e&&(t.classList?t.classList[o?"add":"remove"](e):(n=(" "+t.className+" ").replace(R," ").replace(" "+e+" "," "),t.className=(n+(o?" "+e:"")).replace(R," ")))}function v(t,e){if(e&&(">"===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}}function $(t,e){return t.top!==e.top||t.left!==e.left}function y(t,e,o){var n=t&&t.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),void 0===e?o:o[e];n[e=e in n||-1!==e.indexOf("webkit")?e:"-webkit-"+e]=o+("string"==typeof o?"":"px")}}var b="Sortable"+Date.now(),n={sortable:null,nodes:[]},s=c({},n),w=c({},n),_={};function G(t){this.options=t||{},this.groupName=t.group.name}function J(){this.autoScrollAnimationFrame=null,this.speed={x:10,y:10}}function K(){this.animations=[]}function Q(){this.helper=null}G.prototype={allowDrag:function(t){return this.options.multiple&&_[this.groupName]&&_[this.groupName].length&&-1<_[this.groupName].indexOf(t)},getHelper:function(){var o=document.createElement("div");return _[this.groupName].forEach(function(t,e){t=t.cloneNode(!0);t.style="\n opacity: ".concat(0===e?1:.5,";\n position: absolute;\n z-index: ").concat(e,";\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n "),o.appendChild(t)}),o},select:function(t,e,o){var n,i=this;e&&(_[this.groupName]||(_[this.groupName]=[]),n=_[this.groupName].indexOf(e),g(e,this.options.selectedClass,n<0),t=c(c({},o),{},{event:t}),n<0?(_[this.groupName].push(e),o.sortable._dispatchEvent("onSelect",t)):(_[this.groupName].splice(n,1),o.sortable._dispatchEvent("onDeselect",t)),_[this.groupName].sort(function(t,e){return i._sortByOffset(a(t),a(e))}))},onDrag:function(t){s.sortable=t,s.nodes=_[this.groupName].map(function(t){return{node:t,rect:m(t),offset:a(t)}}),w.sortable=t},onTrulyStarted:function(e,t){t.animator.collect(e,e,e.parentNode),_[this.groupName].forEach(function(t){t!=e&&t.parentNode.removeChild(t)}),t.animator.animate(t.options.animation)},onChange:function(t,e){var o=m(t),n=a(t);w.sortable=e,w.nodes=_[this.groupName].map(function(t){return{node:t,rect:o,offset:n}})},onDrop:function(t,o,e,n){var i=this,r=(w.sortable.animator.collect(o,o,o.parentNode),_[this.groupName].indexOf(o)),e=(_[this.groupName].forEach(function(t,e){e<r?o.parentNode.insertBefore(t,o):(e=0<e?_[i.groupName][e-1]:o,o.parentNode.insertBefore(t,e.nextSibling))}),s.sortable=e.sortable,w.nodes=_[this.groupName].map(function(t){return{node:t,rect:m(t),offset:a(t)}}),this._offsetChanged(s.nodes,w.nodes)),n=c(c({},n()),{},{changed:e,event:t});w.sortable.el!=s.sortable.el&&s.sortable._dispatchEvent("onDrop",n),w.sortable._dispatchEvent("onDrop",n),w.sortable.animator.animate(w.sortable.options.animation)},_sortByOffset:function(t,e){return t.top==e.top?t.left>e.left:t.top>e.top},_offsetChanged:function(t,o){return!!t.find(function(e){return $(o.find(function(t){return t.node===e.node}).offset,e.offset)})}},window.requestAnimationFrame||(window.requestAnimationFrame=function(t){return setTimeout(t,17)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)}),J.prototype={clear:function(){null!=this.autoScrollAnimationFrame&&(cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=null)},update:function(s,a,l,c){var u=this;cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=requestAnimationFrame(function(){var t=m(s),e=t.top,o=t.right,n=t.bottom,t=t.left,i=c.clientX,r=c.clientY;r<e||n<r||i<t||o<i||(l&&c&&u.autoScroll(s,a,c),u.update(s,a,l,c))})},autoScroll:function(t,e,o){var n,i,r,s,a,l,c,u,h,p,f,d;t&&(n=o.clientX,o=o.clientY,void 0!==n)&&void 0!==o&&(h=m(t))&&(f=t.scrollTop,i=t.scrollLeft,r=t.scrollHeight,p=t.scrollWidth,s=h.top,a=h.right,l=h.bottom,c=h.left,d=h.height,u=0<f&&s<=o&&o<=s+e,h=i+h.width<p&&n<=a&&a-e<=n,p=f+d<r&&o<=l&&l-e<=o,f=(d=f=0)<i&&c<=n&&n<=c+e?Math.floor(Math.max(-1,(n-c)/e-1)*this.speed.x):h?Math.ceil(Math.min(1,(n-a)/e+1)*this.speed.x):0,(d=u?Math.floor(Math.max(-1,(o-s)/e-1)*this.speed.y):p?Math.ceil(Math.min(1,(o-l)/e+1)*this.speed.y):0)&&(t.scrollTop+=d),f)&&(t.scrollLeft+=f)}},K.prototype={collect:function(t,e,o,n){var i,r,s,a=this;o&&(i=H(Array.from(o.children)),r=(s=this._getRange(i,t,e,n)).start,s=s.end,this.animations.length=0,t=(t||e).offsetHeight,e=Math.floor(o.scrollHeight/t),o=Math.min(i.length-1,e),r<0&&(r=s,s=o),i.slice(r,(s=s<0?o:s)+1).forEach(function(t){t!==n&&a.animations.push({node:t,rect:m(t)})}))},animate:function(o){var n=this;this.animations.forEach(function(t){var e=t.node,t=t.rect;n._excute(e,t,o)})},_excute:function(t,e){var o=e.left,e=e.top,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:150,i=m(t),e=e-i.top,o=o-i.left;u(t,"none"),h(t,"translate3d(".concat(o,"px, ").concat(e,"px, 0)")),t.offsetWidth,u(t,"".concat(n,"ms")),h(t,"translate3d(0px, 0px, 0px)"),clearTimeout(t.animated),t.animated=setTimeout(function(){u(t,""),h(t,""),t.animated=null},n)},_getRange:function(t,e,o){e=t.indexOf(e),t=t.indexOf(o);return t<e&&(e=(o=[t,e])[0],t=o[1]),{start:e,end:t}}},Q.prototype={get node(){return this.helper},destroy:function(){this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.helper=null},move:function(t,e){h(this.helper,"translate3d(".concat(t,"px, ").concat(e,"px, 0)"))},init:function(t,e,o,n,i){if(!this.helper){var r,s=n.fallbackOnBody,a=n.ghostClass,n=n.ghostStyle,n=void 0===n?{}:n,s=s?document.body:o,l=(this.helper=e.cloneNode(!0),g(this.helper,a,!0),c({"box-sizing":"border-box",top:t.top,left:t.left,width:t.width,height:t.height,position:"fixed",opacity:"0.8","z-index":1e5,"pointer-events":"none"},n));for(r in l)y(this.helper,r,l[r]);u(this.helper,"none"),h(this.helper,"translate3d(0px, 0px, 0px)"),s.appendChild(this.helper);o=i.x/parseInt(this.helper.style.width)*100,e=i.y/parseInt(this.helper.style.height)*100;y(this.helper,"transform-origin","".concat(o,"% ").concat(e,"%")),y(this.helper,"transform","translateZ(0)")}}};function tt(t){var e;D&&(e=t.touches?t.touches[0]:t,e=et(e.clientX,e.clientY))&&(S=e)!==N.sortable.el&&e[b]._onMove(t)}function et(i,r){var s;return A.some(function(t){var e,o,n=t[b].options.emptyInsertThreshold;if(n)return o=m(t,{parent:!0}),e=i>=o.left-n&&i<=o.right+n,o=r>=o.top-n&&r<=o.bottom+n,e&&o?s=t:void 0}),s}function r(){var t,e={from:c({},j),to:c({},B)};return C&&(t={from:c({},s),to:c({},w)},e.from=c(c({},t.from),e.from),e.to=c(c({},t.to),e.to)),e}var S,D,E,N,x,O,C,T,M,ot={sortable:null,group:null,node:null,rect:{},offset:{}},A=[],P=new Q,j=c({},ot),B=c({},ot),nt={x:0,y:0},X={x:0,y:0};function i(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));(t[b]=this).el=t,this.ownerDocument=t.ownerDocument,this.options=e=Object.assign({},e);var o,n,i,r={group:"",animation:150,multiple:!1,draggable:null,handle:null,onDrag:null,onMove:null,onDrop:null,onChange:null,autoScroll:!0,scrollThreshold:25,delay:0,delayOnTouchOnly:!1,disabled:!1,ghostClass:"",ghostStyle:{},chosenClass:"",selectedClass:"",fallbackOnBody:!1,stopPropagation:!1,supportPointer:"onpointerdown"in window&&!l,supportTouch:"ontouchstart"in window,emptyInsertThreshold:5};for(o in r)o in this.options||(this.options[o]=r[o]);for(i in e=e,s="group_"+Number(Math.random().toString().slice(-3)+Date.now()).toString(32),n={},(a=e.group)&&"object"==F(a)||(a={name:a,pull:!0,put:!0}),n.name=a.name||s,n.pull=a.pull,n.put=a.put,e.group=n,this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));var s=this.options,a=s.supportPointer,e=s.supportTouch;p(t,a?"pointerdown":e?"touchstart":"mousedown",this._onDrag),A.push(t),this.multiplayer=new G(this.options),this.animator=new K,T=new J}return(i.prototype={constructor:i,get helper(){return P.node},destroy:function(){this._dispatchEvent("destroy",this),this.el[b]=null;for(var t=0;t<e.start.length;t++)o(this.el,e.start[t],this._onDrag);this._clearState(),A.splice(A.indexOf(this.el),1),0==A.length&&(T=null),this.el=null},_onDrag:function(t){var e=this;if(!D&&!this.options.disabled&&this.options.group.pull&&(!/mousedown|pointerdown/.test(t.type)||0===t.button)){var o=U(t),n=o.touch,i=o.event,o=o.target;if(!(l&&o&&"SELECT"===o.tagName.toUpperCase()||o===this.el)){var r=this.options,s=r.draggable,r=r.handle;if(("function"!=typeof r||r(t))&&("string"!=typeof r||v(o,r))){if("function"==typeof s){r=s(t);if(!r)return;!function(e){if(e){var t=document.createElement("div");try{return t.appendChild(e.cloneNode(!0)),1==e.nodeType}catch(t){return e==window||e==document}}}(r)||(D=r)}else D=V(o,s,this.el,!1);D&&!D.animated&&(n&&(D.style["touch-action"]="none"),t=D.parentNode,O=n,(N=i).sortable=this,N.group=t,(C=this.options.multiple&&this.multiplayer.allowDrag(D))&&this.multiplayer.onDrag(this),r=m(D),o=a(D),j={sortable:this,group:t,node:D,rect:r,offset:o},B.group=t,B.sortable=this,nt={x:i.clientX-r.left,y:i.clientY-r.top},this.options.supportPointer?p(this.ownerDocument,"pointermove",tt):p(this.ownerDocument,n?"touchmove":"mousemove",tt),o=(s=this.options).delay,t=s.delayOnTouchOnly,!o||t&&!n||W||f?this._onStart():(clearTimeout(M),M=setTimeout(function(){return e._onStart()},o)))}}}},_onStart:function(){S=this.el,this.options.supportPointer?(p(this.ownerDocument,"pointermove",this._onMove),p(this.ownerDocument,"pointerup",this._onDrop),p(this.ownerDocument,"pointercancel",this._onDrop)):O?(p(this.ownerDocument,"touchmove",this._onMove),p(this.ownerDocument,"touchend",this._onDrop),p(this.ownerDocument,"touchcancel",this._onDrop)):(p(this.ownerDocument,"mousemove",this._onMove),p(this.ownerDocument,"mouseup",this._onDrop));try{document.selection?setTimeout(function(){document.selection.empty()},0):window.getSelection().removeAllRanges()}catch(t){}},_onTrulyStarted:function(){var t;x||(this._dispatchEvent("onDrag",c(c({},r()),{},{event:N})),C&&this.multiplayer.onTrulyStarted(D,this),t=C?this.multiplayer.getHelper():D,P.init(j.rect,t,this.el,this.options,nt),g(D,this.options.chosenClass,!0),D.style["will-change"]="transform",l&&y(document.body,"user-select","none"))},_onMove:function(t){var e,o,n,i;this._preventEvent(t),N&&D&&(i=(e=t).clientX,e=e.clientY,o=i-X.x,n=e-X.y,X.x=i,X.y=e,void 0!==i&&void 0!==e&&Math.abs(o)<=0&&Math.abs(n)<=0||(e=(i=U(t)).event,o=i.target,this._onTrulyStarted(),x=e,n=t.clientX-N.clientX,i=t.clientY-N.clientY,P.move(n,i),this._dispatchEvent("onMove",c(c({},r()),{},{event:e})),this.scrollEl||(this.scrollEl=function(t,e){if(t&&t.getBoundingClientRect){var o=t,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var i=y(o);if(o.clientWidth<o.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!o.getBoundingClientRect||o===document.body)return d();if(n||e)return o;n=!0}}}while(o=o.parentNode)}return d()}(this.el,!0)),n=(t=this.options).autoScroll,i=t.scrollThreshold,n&&T.update(this.scrollEl,i,N,x),!this._allowPut())||(E=V(o,this.options.draggable,S,!1))===D||E&&E.animated||E&&Z(E,D)||(S!==j.sortable.el?o!==S&&function(t,e,o){for(var n=t.lastElementChild;n&&(n===e||"none"===y(n,"display")||o&&!v(n,o));)n=n.previousElementSibling;return n}(S,P.node)?E&&this._onInsert(e,!1):this._onInsert(e,!0):E&&this._onChange(e)))},_allowPut:function(){var t,e;return N.group===this.el||!!this.options.group.put&&(t=this.options.group.name,(e=N.sortable.options.group).name)&&t&&e.name===t},_onInsert:function(t,e){var o=e?D:E,n=e?S:E.parentNode;j.sortable.animator.collect(D,null,D.parentNode,D),this.animator.collect(null,o,n,D),C&&this.multiplayer.onChange(D,this),B={sortable:this,group:n,node:o,rect:m(D),offset:a(D)},j.sortable._dispatchEvent("onRemove",c(c({},r()),{},{event:t})),e?n.appendChild(D):n.insertBefore(D,o),this._dispatchEvent("onAdd",c(c({},r()),{},{event:t})),j.sortable.animator.animate(),this.animator.animate(),j.group=n,j.sortable=this},_onChange:function(t){var e=E.parentNode,t=(this.animator.collect(D,E,e),C&&this.multiplayer.onChange(D,this),B={sortable:this,group:e,node:E,rect:m(E),offset:a(E)},this._dispatchEvent("onChange",c(c({},r()),{},{event:t})),a(D));t.top<B.offset.top||t.left<B.offset.left?e.insertBefore(D,E.nextSibling):e.insertBefore(D,E),this.animator.animate(),j.group=e,j.sortable=this},_onDrop:function(t){var e;this._unbindMoveEvents(),this._unbindDropEvents(),this._preventEvent(t),T.clear(),clearTimeout(M),D&&(g(D,this.options.chosenClass,!1),O&&(D.style["touch-action"]=""),D.style["will-change"]=""),D&&N&&x?(j.group=N.group,j.sortable=N.sortable,C?this.multiplayer.onDrop(t,D,N,r):(B.rect=m(D),B.offset=a(D),e=$(j.offset,B.offset),e=c(c({},r()),{},{changed:e,event:t}),B.sortable.el!==j.sortable.el&&j.sortable._dispatchEvent("onDrop",e),B.sortable._dispatchEvent("onDrop",e)),l&&y(document.body,"user-select","")):this.options.multiple&&this.multiplayer.select(t,D,c({},j)),this._clearState()},_preventEvent:function(t){void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation&&t.stopPropagation()},_dispatchEvent:function(t,e){t=this.options[t];"function"==typeof t&&t(e)},_clearState:function(){D=E=N=x=O=C=M=i.ghost=null,nt=X={x:0,y:0},j=B=c({},ot),P.destroy()},_unbindMoveEvents:function(){for(var t=0;t<e.move.length;t++)o(this.ownerDocument,e.move[t],this._onMove),o(this.ownerDocument,e.move[t],tt)},_unbindDropEvents:function(){for(var t=0;t<e.end.length;t++)o(this.ownerDocument,e.end[t],this._onDrop)}}).utils={getRect:m,getOffset:a},i});
{
"name": "sortable-dnd",
"version": "0.4.7",
"version": "0.4.8",
"description": "JS library for drag-and-drop lists, supports sortable and draggable",

@@ -5,0 +5,0 @@ "main": "dist/sortable.js",

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