You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
44 KiB
8 lines
44 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d212b99"],{aa47:function(t,e,n){"use strict";
|
|
/**!
|
|
* Sortable 1.15.0
|
|
* @author RubaXa <trash@rubaxa.org>
|
|
* @author owenm <owen23355@gmail.com>
|
|
* @license MIT
|
|
*/
|
|
function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(t){return r="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},r(t)}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(){return l=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},l.apply(this,arguments)}function s(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}function c(t,e){if(null==t)return{};var n,o,i=s(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function u(t){return d(t)||h(t)||f(t)||g()}function d(t){if(Array.isArray(t))return p(t)}function h(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function f(t,e){if(t){if("string"===typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,e):void 0}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function g(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.r(e),n.d(e,"MultiDrag",(function(){return Ke})),n.d(e,"Sortable",(function(){return ne})),n.d(e,"Swap",(function(){return Ne}));var v="1.15.0";function m(t){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var b=m(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),w=m(/Edge/i),y=m(/firefox/i),E=m(/safari/i)&&!m(/chrome/i)&&!m(/android/i),D=m(/iP(ad|od|hone)/i),S=m(/chrome/i)&&m(/android/i),_={capture:!1,passive:!1};function C(t,e,n){t.addEventListener(e,n,!b&&_)}function T(t,e,n){t.removeEventListener(e,n,!b&&_)}function x(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(n){return!1}return!1}}function O(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function M(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&x(t,e):x(t,e))||o&&t===n)return t;if(t===n)break}while(t=O(t))}return null}var A,N=/\s+/g;function I(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(N," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(N," ")}}function P(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 k(t,e){var n="";if("string"===typeof t)n=t;else do{var o=P(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 R(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 X(){var t=document.scrollingElement;return t||document.documentElement}function Y(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,s,c,u,d;if(t!==window&&t.parentNode&&t!==X()?(r=t.getBoundingClientRect(),a=r.top,l=r.left,s=r.bottom,c=r.right,u=r.height,d=r.width):(a=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!b))do{if(i&&i.getBoundingClientRect&&("none"!==P(i,"transform")||n&&"static"!==P(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(P(i,"border-top-width")),l-=h.left+parseInt(P(i,"border-left-width")),s=a+r.height,c=l+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var f=k(i||t),p=f&&f.a,g=f&&f.d;f&&(a/=g,l/=p,d/=p,u/=g,s=a+u,c=l+d)}return{top:a,left:l,bottom:s,right:c,width:d,height:u}}}function B(t,e,n){var o=W(t,!0),i=Y(t)[e];while(o){var r=Y(o)[n],a=void 0;if(a="top"===n||"left"===n?i>=r:i<=r,!a)return o;if(o===X())break;o=W(o,!1)}return!1}function F(t,e,n,o){var i=0,r=0,a=t.children;while(r<a.length){if("none"!==a[r].style.display&&a[r]!==ne.ghost&&(o||a[r]!==ne.dragged)&&M(a[r],n.draggable,t,!1)){if(i===e)return a[r];i++}r++}return null}function j(t,e){var n=t.lastElementChild;while(n&&(n===ne.ghost||"none"===P(n,"display")||e&&!x(n,e)))n=n.previousElementSibling;return n||null}function H(t,e){var n=0;if(!t||!t.parentNode)return-1;while(t=t.previousElementSibling)"TEMPLATE"===t.nodeName.toUpperCase()||t===ne.clone||e&&!x(t,e)||n++;return n}function L(t){var e=0,n=0,o=X();if(t)do{var i=k(t),r=i.a,a=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function K(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}function W(t,e){if(!t||!t.getBoundingClientRect)return X();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=P(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 X();if(o||e)return n;o=!0}}}while(n=n.parentNode);return X()}function z(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function G(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 U(t,e){return function(){if(!A){var n=arguments,o=this;1===n.length?t.call(o,n[0]):t.apply(o,n),A=setTimeout((function(){A=void 0}),e)}}}function q(){clearTimeout(A),A=void 0}function V(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function J(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 Z(t,e){P(t,"position","absolute"),P(t,"top",e.top),P(t,"left",e.left),P(t,"width",e.width),P(t,"height",e.height)}function $(t){P(t,"position",""),P(t,"top",""),P(t,"left",""),P(t,"width",""),P(t,"height","")}var Q="Sortable"+(new Date).getTime();function tt(){var t,e=[];return{captureAnimationState:function(){if(e=[],this.options.animation){var t=[].slice.call(this.el.children);t.forEach((function(t){if("none"!==P(t,"display")&&t!==ne.ghost){e.push({target:t,rect:Y(t)});var n=i({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=k(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(K(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=Y(n),s=n.prevFromRect,c=n.prevToRect,u=t.rect,d=k(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&G(s,l)&&!G(a,l)&&(u.top-l.top)/(u.left-l.left)===(a.top-l.top)/(a.left-l.left)&&(e=nt(u,s,c,o.options)),G(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){P(t,"transition",""),P(t,"transform","");var i=k(this.el),r=i&&i.a,a=i&&i.d,l=(e.left-n.left)/(r||1),s=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!s,P(t,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=et(t),P(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),P(t,"transform","translate3d(0,0,0)"),"number"===typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){P(t,"transition",""),P(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}function et(t){return t.offsetWidth}function nt(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}var ot=[],it={initializeByDefault:!0},rt={mount:function(t){for(var e in it)it.hasOwnProperty(e)&&!(e in t)&&(t[e]=it[e]);ot.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),ot.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=t+"Global";ot.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][r]&&e[o.pluginName][r](i({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](i({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var i in ot.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,l(n,r.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var r=this.modifyOption(t,i,t.options[i]);"undefined"!==typeof r&&(t.options[i]=r)}},getEventProperties:function(t,e){var n={};return ot.forEach((function(o){"function"===typeof o.eventProperties&&l(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return ot.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"===typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};function at(t){var e=t.sortable,n=t.rootEl,o=t.name,r=t.targetEl,a=t.cloneEl,l=t.toEl,s=t.fromEl,c=t.oldIndex,u=t.newIndex,d=t.oldDraggableIndex,h=t.newDraggableIndex,f=t.originalEvent,p=t.putSortable,g=t.extraEventProperties;if(e=e||n&&n[Q],e){var v,m=e.options,y="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||b||w?(v=document.createEvent("Event"),v.initEvent(o,!0,!0)):v=new CustomEvent(o,{bubbles:!0,cancelable:!0}),v.to=l||n,v.from=s||n,v.item=r||n,v.clone=a,v.oldIndex=c,v.newIndex=u,v.oldDraggableIndex=d,v.newDraggableIndex=h,v.originalEvent=f,v.pullMode=p?p.lastPutMode:void 0;var E=i(i({},g),rt.getEventProperties(o,e));for(var D in E)v[D]=E[D];n&&n.dispatchEvent(v),m[y]&&m[y].call(e,v)}}var lt=["evt"],st=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=c(n,lt);rt.pluginEvent.bind(ne)(t,e,i({dragEl:ut,parentEl:dt,ghostEl:ht,rootEl:ft,nextEl:pt,lastDownEl:gt,cloneEl:vt,cloneHidden:mt,dragStarted:At,putSortable:St,activeSortable:ne.active,originalEvent:o,oldIndex:bt,oldDraggableIndex:yt,newIndex:wt,newDraggableIndex:Et,hideGhostForTarget:$t,unhideGhostForTarget:Qt,cloneNowHidden:function(){mt=!0},cloneNowShown:function(){mt=!1},dispatchSortableEvent:function(t){ct({sortable:e,name:t,originalEvent:o})}},r))};function ct(t){at(i({putSortable:St,cloneEl:vt,targetEl:ut,rootEl:ft,oldIndex:bt,oldDraggableIndex:yt,newIndex:wt,newDraggableIndex:Et},t))}var ut,dt,ht,ft,pt,gt,vt,mt,bt,wt,yt,Et,Dt,St,_t,Ct,Tt,xt,Ot,Mt,At,Nt,It,Pt,kt,Rt=!1,Xt=!1,Yt=[],Bt=!1,Ft=!1,jt=[],Ht=!1,Lt=[],Kt="undefined"!==typeof document,Wt=D,zt=w||b?"cssFloat":"float",Gt=Kt&&!S&&!D&&"draggable"in document.createElement("div"),Ut=function(){if(Kt){if(b)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),qt=function(t,e){var n=P(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=F(t,0,e),r=F(t,1,e),a=i&&P(i),l=r&&P(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Y(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Y(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a["float"]&&"none"!==a["float"]){var u="left"===a["float"]?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[zt]||r&&"none"===n[zt]&&s+c>o)?"vertical":"horizontal"},Vt=function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return o===a||i===l||o+r/2===a+s/2},Jt=function(t,e){var n;return Yt.some((function(o){var i=o[Q].options.emptyInsertThreshold;if(i&&!j(o)){var r=Y(o),a=t>=r.left-i&&t<=r.right+i,l=e>=r.top-i&&e<=r.bottom+i;return a&&l?n=o:void 0}})),n},Zt=function(t){function e(t,n){return function(o,i,r,a){var l=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||l))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 s=(n?o:i).options.group.name;return!0===t||"string"===typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var n={},o=t.group;o&&"object"==r(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},$t=function(){!Ut&&ht&&P(ht,"display","none")},Qt=function(){!Ut&&ht&&P(ht,"display","")};Kt&&!S&&document.addEventListener("click",(function(t){if(Xt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Xt=!1,!1}),!0);var te=function(t){if(ut){t=t.touches?t.touches[0]:t;var e=Jt(t.clientX,t.clientY);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[Q]._onDragOver(n)}}},ee=function(t){ut&&ut.parentNode[Q]._isOutsideThisEl(t.target)};function ne(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=l({},e),t[Q]=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 qt(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!==ne.supportPointer&&"PointerEvent"in window&&!E,emptyInsertThreshold:5};for(var o in rt.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in Zt(e),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Gt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?C(t,"pointerdown",this._onTapStart):(C(t,"mousedown",this._onTapStart),C(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(C(t,"dragover",this),C(t,"dragenter",this)),Yt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),l(this,tt())}function oe(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function ie(t,e,n,o,i,r,a,l){var s,c,u=t[Q],d=u.options.onMove;return!window.CustomEvent||b||w?(s=document.createEvent("Event"),s.initEvent("move",!0,!0)):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||Y(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function re(t){t.draggable=!1}function ae(){Ht=!1}function le(t,e,n){var o=Y(F(n.el,0,n.options,!0)),i=10;return e?t.clientX<o.left-i||t.clientY<o.top&&t.clientX<o.right:t.clientY<o.top-i||t.clientY<o.bottom&&t.clientX<o.left}function se(t,e,n){var o=Y(j(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}function ce(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(!Bt&&(1===It?s>u+c*r/2:s<d-c*r/2)&&(Bt=!0),Bt)h=!0;else if(1===It?s<u+Pt:s>d-Pt)return-It}else if(s>u+c*(1-i)/2&&s<d-c*(1-i)/2)return ue(e);return h=h||a,h&&(s<u+c*r/2||s>d-c*r/2)?s>u+c/2?1:-1:0}function ue(t){return H(ut)<H(t)?1:-1}function de(t){var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;while(n--)o+=e.charCodeAt(n);return o.toString(36)}function he(t){Lt.length=0;var e=t.getElementsByTagName("input"),n=e.length;while(n--){var o=e[n];o.checked&&Lt.push(o)}}function fe(t){return setTimeout(t,0)}function pe(t){return clearTimeout(t)}ne.prototype={constructor:ne,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Nt=null)},_getDirection:function(t,e){return"function"===typeof this.options.direction?this.options.direction.call(this,t,e,ut):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(he(n),!ut&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!E||!l||"SELECT"!==l.tagName.toUpperCase())&&(l=M(l,o.draggable,n,!1),(!l||!l.animated)&>!==l)){if(bt=H(l),yt=H(l,o.draggable),"function"===typeof c){if(c.call(this,t,l,this))return ct({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),st("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=M(s,o.trim(),n,!1),o)return ct({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),st("filter",e,{evt:t}),!0})),c))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!M(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&&!ut&&n.parentNode===r){var s=Y(n);if(ft=r,ut=n,dt=ut.parentNode,pt=ut.nextSibling,gt=n,Dt=a.group,ne.dragged=ut,_t={target:ut,clientX:(e||t).clientX,clientY:(e||t).clientY},Ot=_t.clientX-s.left,Mt=_t.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,ut.style["will-change"]="all",o=function(){st("delayEnded",i,{evt:t}),ne.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!y&&i.nativeDraggable&&(ut.draggable=!0),i._triggerDragStart(t,e),ct({sortable:i,name:"choose",originalEvent:t}),I(ut,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){R(ut,t.trim(),re)})),C(l,"dragover",te),C(l,"mousemove",te),C(l,"touchmove",te),C(l,"mouseup",i._onDrop),C(l,"touchend",i._onDrop),C(l,"touchcancel",i._onDrop),y&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ut.draggable=!0),st("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(w||b))o();else{if(ne.eventCanceled)return void this._onDrop();C(l,"mouseup",i._disableDelayedDrag),C(l,"touchend",i._disableDelayedDrag),C(l,"touchcancel",i._disableDelayedDrag),C(l,"mousemove",i._delayedDragTouchMoveHandler),C(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&C(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(){ut&&re(ut),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;T(t,"mouseup",this._disableDelayedDrag),T(t,"touchend",this._disableDelayedDrag),T(t,"touchcancel",this._disableDelayedDrag),T(t,"mousemove",this._delayedDragTouchMoveHandler),T(t,"touchmove",this._delayedDragTouchMoveHandler),T(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?C(document,"pointermove",this._onTouchMove):C(document,e?"touchmove":"mousemove",this._onTouchMove):(C(ut,"dragend",this),C(ft,"dragstart",this._onDragStart));try{document.selection?fe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(Rt=!1,ft&&ut){st("dragStarted",this,{evt:e}),this.nativeDraggable&&C(document,"dragover",ee);var n=this.options;!t&&I(ut,n.dragClass,!1),I(ut,n.ghostClass,!0),ne.active=this,t&&this._appendGhost(),ct({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ct){this._lastX=Ct.clientX,this._lastY=Ct.clientY,$t();var t=document.elementFromPoint(Ct.clientX,Ct.clientY),e=t;while(t&&t.shadowRoot){if(t=t.shadowRoot.elementFromPoint(Ct.clientX,Ct.clientY),t===e)break;e=t}if(ut.parentNode[Q]._isOutsideThisEl(t),e)do{if(e[Q]){var n=void 0;if(n=e[Q]._onDragOver({clientX:Ct.clientX,clientY:Ct.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Qt()}},_onTouchMove:function(t){if(_t){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=ht&&k(ht,!0),a=ht&&r&&r.a,l=ht&&r&&r.d,s=Wt&&kt&&L(kt),c=(i.clientX-_t.clientX+o.x)/(a||1)+(s?s[0]-jt[0]:0)/(a||1),u=(i.clientY-_t.clientY+o.y)/(l||1)+(s?s[1]-jt[1]:0)/(l||1);if(!ne.active&&!Rt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(ht){r?(r.e+=c-(Tt||0),r.f+=u-(xt||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,")");P(ht,"webkitTransform",d),P(ht,"mozTransform",d),P(ht,"msTransform",d),P(ht,"transform",d),Tt=c,xt=u,Ct=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!ht){var t=this.options.fallbackOnBody?document.body:ft,e=Y(ut,!0,Wt,!0,t),n=this.options;if(Wt){kt=t;while("static"===P(kt,"position")&&"none"===P(kt,"transform")&&kt!==document)kt=kt.parentNode;kt!==document.body&&kt!==document.documentElement?(kt===document&&(kt=X()),e.top+=kt.scrollTop,e.left+=kt.scrollLeft):kt=X(),jt=L(kt)}ht=ut.cloneNode(!0),I(ht,n.ghostClass,!1),I(ht,n.fallbackClass,!0),I(ht,n.dragClass,!0),P(ht,"transition",""),P(ht,"transform",""),P(ht,"box-sizing","border-box"),P(ht,"margin",0),P(ht,"top",e.top),P(ht,"left",e.left),P(ht,"width",e.width),P(ht,"height",e.height),P(ht,"opacity","0.8"),P(ht,"position",Wt?"absolute":"fixed"),P(ht,"zIndex","100000"),P(ht,"pointerEvents","none"),ne.ghost=ht,t.appendChild(ht),P(ht,"transform-origin",Ot/parseInt(ht.style.width)*100+"% "+Mt/parseInt(ht.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;st("dragStart",this,{evt:t}),ne.eventCanceled?this._onDrop():(st("setupClone",this),ne.eventCanceled||(vt=J(ut),vt.removeAttribute("id"),vt.draggable=!1,vt.style["will-change"]="",this._hideClone(),I(vt,this.options.chosenClass,!1),ne.clone=vt),n.cloneId=fe((function(){st("clone",n),ne.eventCanceled||(n.options.removeCloneOnHide||ft.insertBefore(vt,ut),n._hideClone(),ct({sortable:n,name:"clone"}))})),!e&&I(ut,i.dragClass,!0),e?(Xt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(T(document,"mouseup",n._onDrop),T(document,"touchend",n._onDrop),T(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,ut)),C(document,"drop",n),P(ut,"transform","translateZ(0)")),Rt=!0,n._dragStartId=fe(n._dragStarted.bind(n,e,t)),C(document,"selectstart",n),At=!0,E&&P(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,r,a=this.el,l=t.target,s=this.options,c=s.group,u=ne.active,d=Dt===c,h=s.sort,f=St||u,p=this,g=!1;if(!Ht){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),l=M(l,s.draggable,a,!0),N("dragOver"),ne.eventCanceled)return g;if(ut.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return R(!1);if(Xt=!1,u&&!s.disabled&&(d?h||(o=dt!==ft):St===this||(this.lastPutMode=Dt.checkPull(this,u,ut,t))&&c.checkPut(this,u,ut,t))){if(r="vertical"===this._getDirection(t,l),e=Y(ut),N("dragOverValid"),ne.eventCanceled)return g;if(o)return dt=ft,k(),this._hideClone(),N("revert"),ne.eventCanceled||(pt?ft.insertBefore(ut,pt):ft.appendChild(ut)),R(!0);var v=j(a,s.draggable);if(!v||se(t,r,this)&&!v.animated){if(v===ut)return R(!1);if(v&&a===t.target&&(l=v),l&&(n=Y(l)),!1!==ie(ft,a,ut,e,l,n,t,!!l))return k(),v&&v.nextSibling?a.insertBefore(ut,v.nextSibling):a.appendChild(ut),dt=a,X(),R(!0)}else if(v&&le(t,r,this)){var m=F(a,0,s,!0);if(m===ut)return R(!1);if(l=m,n=Y(l),!1!==ie(ft,a,ut,e,l,n,t,!1))return k(),a.insertBefore(ut,m),dt=a,X(),R(!0)}else if(l.parentNode===a){n=Y(l);var b,w,y=0,E=ut.parentNode!==a,D=!Vt(ut.animated&&ut.toRect||e,l.animated&&l.toRect||n,r),S=r?"top":"left",_=B(l,"top","top")||B(ut,"top","top"),C=_?_.scrollTop:void 0;if(Nt!==l&&(b=n[S],Bt=!1,Ft=!D&&s.invertSwap||E),y=ce(t,l,n,r,D?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Ft,Nt===l),0!==y){var T=H(ut);do{T-=y,w=dt.children[T]}while(w&&("none"===P(w,"display")||w===ht))}if(0===y||w===l)return R(!1);Nt=l,It=y;var x=l.nextElementSibling,O=!1;O=1===y;var A=ie(ft,a,ut,e,l,n,t,O);if(!1!==A)return 1!==A&&-1!==A||(O=1===A),Ht=!0,setTimeout(ae,30),k(),O&&!x?a.appendChild(ut):l.parentNode.insertBefore(ut,O?x:l),_&&V(_,0,C-_.scrollTop),dt=ut.parentNode,void 0===b||Ft||(Pt=Math.abs(b-Y(l)[S])),X(),R(!0)}if(a.contains(ut))return R(!1)}return!1}function N(s,c){st(s,p,i({evt:t,isOwner:d,axis:r?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:h,fromSortable:f,target:l,completed:R,onMove:function(n,o){return ie(ft,a,ut,e,n,Y(n),t,o)},changed:X},c))}function k(){N("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function R(e){return N("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==f&&(I(ut,St?St.options.ghostClass:u.options.ghostClass,!1),I(ut,s.ghostClass,!0)),St!==p&&p!==ne.active?St=p:p===ne.active&&St&&(St=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){N("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===ut&&!ut.animated||l===a&&!l.animated)&&(Nt=null),s.dragoverBubble||t.rootEl||l===document||(ut.parentNode[Q]._isOutsideThisEl(t.target),!e&&te(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function X(){wt=H(ut),Et=H(ut,s.draggable),ct({sortable:p,name:"change",toEl:a,newIndex:wt,newDraggableIndex:Et,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){T(document,"mousemove",this._onTouchMove),T(document,"touchmove",this._onTouchMove),T(document,"pointermove",this._onTouchMove),T(document,"dragover",te),T(document,"mousemove",te),T(document,"touchmove",te)},_offUpEvents:function(){var t=this.el.ownerDocument;T(t,"mouseup",this._onDrop),T(t,"touchend",this._onDrop),T(t,"pointerup",this._onDrop),T(t,"touchcancel",this._onDrop),T(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;wt=H(ut),Et=H(ut,n.draggable),st("drop",this,{evt:t}),dt=ut&&ut.parentNode,wt=H(ut),Et=H(ut,n.draggable),ne.eventCanceled||(Rt=!1,Ft=!1,Bt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),pe(this.cloneId),pe(this._dragStartId),this.nativeDraggable&&(T(document,"drop",this),T(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),E&&P(document.body,"user-select",""),P(ut,"transform",""),t&&(At&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),ht&&ht.parentNode&&ht.parentNode.removeChild(ht),(ft===dt||St&&"clone"!==St.lastPutMode)&&vt&&vt.parentNode&&vt.parentNode.removeChild(vt),ut&&(this.nativeDraggable&&T(ut,"dragend",this),re(ut),ut.style["will-change"]="",At&&!Rt&&I(ut,St?St.options.ghostClass:this.options.ghostClass,!1),I(ut,this.options.chosenClass,!1),ct({sortable:this,name:"unchoose",toEl:dt,newIndex:null,newDraggableIndex:null,originalEvent:t}),ft!==dt?(wt>=0&&(ct({rootEl:dt,name:"add",toEl:dt,fromEl:ft,originalEvent:t}),ct({sortable:this,name:"remove",toEl:dt,originalEvent:t}),ct({rootEl:dt,name:"sort",toEl:dt,fromEl:ft,originalEvent:t}),ct({sortable:this,name:"sort",toEl:dt,originalEvent:t})),St&&St.save()):wt!==bt&&wt>=0&&(ct({sortable:this,name:"update",toEl:dt,originalEvent:t}),ct({sortable:this,name:"sort",toEl:dt,originalEvent:t})),ne.active&&(null!=wt&&-1!==wt||(wt=bt,Et=yt),ct({sortable:this,name:"end",toEl:dt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){st("nulling",this),ft=ut=dt=ht=pt=vt=gt=mt=_t=Ct=At=wt=Et=bt=yt=Nt=It=St=Dt=ne.dragged=ne.ghost=ne.clone=ne.active=null,Lt.forEach((function(t){t.checked=!0})),Lt.length=Tt=xt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ut&&(this._onDragOver(t),oe(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)t=n[o],M(t,r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||de(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var i=o.children[e];M(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 M(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=rt.modifyOption(this,t,e);n[t]="undefined"!==typeof o?o:e,"group"===t&&Zt(n)},destroy:function(){st("destroy",this);var t=this.el;t[Q]=null,T(t,"mousedown",this._onTapStart),T(t,"touchstart",this._onTapStart),T(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(T(t,"dragover",this),T(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Yt.splice(Yt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!mt){if(st("hideClone",this),ne.eventCanceled)return;P(vt,"display","none"),this.options.removeCloneOnHide&&vt.parentNode&&vt.parentNode.removeChild(vt),mt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(mt){if(st("showClone",this),ne.eventCanceled)return;ut.parentNode!=ft||this.options.group.revertClone?pt?ft.insertBefore(vt,pt):ft.appendChild(vt):ft.insertBefore(vt,ut),this.options.group.revertClone&&this.animate(ut,vt),P(vt,"display",""),mt=!1}}else this._hideClone()}},Kt&&C(document,"touchmove",(function(t){(ne.active||Rt)&&t.cancelable&&t.preventDefault()})),ne.utils={on:C,off:T,css:P,find:R,is:function(t,e){return!!M(t,e,t,!1)},extend:z,throttle:U,closest:M,toggleClass:I,clone:J,index:H,nextTick:fe,cancelNextTick:pe,detectDirection:qt,getChild:F},ne.get=function(t){return t[Q]},ne.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&&(ne.utils=i(i({},ne.utils),t.utils)),rt.mount(t)}))},ne.create=function(t,e){return new ne(t,e)},ne.version=v;var ge,ve,me,be,we,ye,Ee=[],De=!1;function Se(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,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?C(document,"dragover",this._handleAutoScroll):this.options.supportPointer?C(document,"pointermove",this._handleFallbackAutoScroll):e.touches?C(document,"touchmove",this._handleFallbackAutoScroll):C(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?T(document,"dragover",this._handleAutoScroll):(T(document,"pointermove",this._handleFallbackAutoScroll),T(document,"touchmove",this._handleFallbackAutoScroll),T(document,"mousemove",this._handleFallbackAutoScroll)),Ce(),_e(),q()},nulling:function(){we=ve=ge=De=ye=me=be=null,Ee.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(we=t,e||this.options.forceAutoScrollFallback||w||b||E){xe(t,this.options,r,e);var a=W(r,!0);!De||ye&&o===me&&i===be||(ye&&Ce(),ye=setInterval((function(){var r=W(document.elementFromPoint(o,i),!0);r!==a&&(a=r,_e()),xe(t,n.options,r,e)}),10),me=o,be=i)}else{if(!this.options.bubbleScroll||W(r,!0)===X())return void _e();xe(t,this.options,W(r,!1),!1)}}},l(t,{pluginName:"scroll",initializeByDefault:!0})}function _e(){Ee.forEach((function(t){clearInterval(t.pid)})),Ee=[]}function Ce(){clearInterval(ye)}var Te,xe=U((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=X(),u=!1;ve!==n&&(ve=n,_e(),ge=e.scroll,i=e.scrollFn,!0===ge&&(ge=W(n,!0)));var d=0,h=ge;do{var f=h,p=Y(f),g=p.top,v=p.bottom,m=p.left,b=p.right,w=p.width,y=p.height,E=void 0,D=void 0,S=f.scrollWidth,_=f.scrollHeight,C=P(f),T=f.scrollLeft,x=f.scrollTop;f===c?(E=w<S&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),D=y<_&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(E=w<S&&("auto"===C.overflowX||"scroll"===C.overflowX),D=y<_&&("auto"===C.overflowY||"scroll"===C.overflowY));var O=E&&(Math.abs(b-r)<=l&&T+w<S)-(Math.abs(m-r)<=l&&!!T),M=D&&(Math.abs(v-a)<=l&&x+y<_)-(Math.abs(g-a)<=l&&!!x);if(!Ee[d])for(var A=0;A<=d;A++)Ee[A]||(Ee[A]={});Ee[d].vx==O&&Ee[d].vy==M&&Ee[d].el===f||(Ee[d].el=f,Ee[d].vx=O,Ee[d].vy=M,clearInterval(Ee[d].pid),0==O&&0==M||(u=!0,Ee[d].pid=setInterval(function(){o&&0===this.layer&&ne.active._onTouchMove(we);var e=Ee[this.layer].vy?Ee[this.layer].vy*s:0,n=Ee[this.layer].vx?Ee[this.layer].vx*s:0;"function"===typeof i&&"continue"!==i.call(ne.dragged.parentNode[Q],n,e,t,we,Ee[this.layer].el)||V(Ee[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==c&&(h=W(h,!1)));De=u}}),30),Oe=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||i;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function Me(){}function Ae(){}function Ne(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;Te=e},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.onMove,i=t.activeSortable,r=t.changed,a=t.cancel;if(i.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=Te;!1!==o(n)?(I(n,s.swapClass,!0),Te=n):Te=null,c&&c!==Te&&I(c,s.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,n=t.putSortable,o=t.dragEl,i=n||this.sortable,r=this.options;Te&&I(Te,r.swapClass,!1),Te&&(r.swap||n&&n.options.swap)&&o!==Te&&(i.captureAnimationState(),i!==e&&e.captureAnimationState(),Ie(o,Te),i.animateAll(),i!==e&&e.animateAll())},nulling:function(){Te=null}},l(t,{pluginName:"swap",eventProperties:function(){return{swapItem:Te}}})}function Ie(t,e){var n,o,i=t.parentNode,r=e.parentNode;i&&r&&!i.isEqualNode(e)&&!r.isEqualNode(t)&&(n=H(t),o=H(e),i.isEqualNode(r)&&n<o&&o++,i.insertBefore(e,i.children[n]),r.insertBefore(t,r.children[o]))}Me.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=F(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:Oe},l(Me,{pluginName:"revertOnSpill"}),Ae.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,o=n||this.sortable;o.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),o.animateAll()},drop:Oe},l(Ae,{pluginName:"removeOnSpill"});var Pe,ke,Re,Xe,Ye,Be=[],Fe=[],je=!1,He=!1,Le=!1;function Ke(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"===typeof this[e]&&(this[e]=this[e].bind(this));t.options.avoidImplicitDeselect||(t.options.supportPointer?C(document,"pointerup",this._deselectMultiDrag):(C(document,"mouseup",this._deselectMultiDrag),C(document,"touchend",this._deselectMultiDrag))),C(document,"keydown",this._checkKeyDown),C(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(e,n){var o="";Be.length&&ke===t?Be.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){var e=t.dragEl;Re=e},delayEnded:function(){this.isMultiDrag=~Be.indexOf(Re)},setupClone:function(t){var e=t.sortable,n=t.cancel;if(this.isMultiDrag){for(var o=0;o<Be.length;o++)Fe.push(J(Be[o])),Fe[o].sortableIndex=Be[o].sortableIndex,Fe[o].draggable=!1,Fe[o].style["will-change"]="",I(Fe[o],this.options.selectedClass,!1),Be[o]===Re&&I(Fe[o],this.options.chosenClass,!1);e._hideClone(),n()}},clone:function(t){var e=t.sortable,n=t.rootEl,o=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||Be.length&&ke===e&&(ze(!0,n),o("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,o=t.cancel;this.isMultiDrag&&(ze(!1,n),Fe.forEach((function(t){P(t,"display","")})),e(),Ye=!1,o())},hideClone:function(t){var e=this,n=(t.sortable,t.cloneNowHidden),o=t.cancel;this.isMultiDrag&&(Fe.forEach((function(t){P(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),n(),Ye=!0,o())},dragStartGlobal:function(t){t.sortable;!this.isMultiDrag&&ke&&ke.multiDrag._deselectMultiDrag(),Be.forEach((function(t){t.sortableIndex=H(t)})),Be=Be.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),Le=!0},dragStarted:function(t){var e=this,n=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){Be.forEach((function(t){t!==Re&&P(t,"position","absolute")}));var o=Y(Re,!1,!0,!0);Be.forEach((function(t){t!==Re&&Z(t,o)})),He=!0,je=!0}n.animateAll((function(){He=!1,je=!1,e.options.animation&&Be.forEach((function(t){$(t)})),e.options.sort&&Ge()}))}},dragOver:function(t){var e=t.target,n=t.completed,o=t.cancel;He&&~Be.indexOf(e)&&(n(!1),o())},revert:function(t){var e=t.fromSortable,n=t.rootEl,o=t.sortable,i=t.dragRect;Be.length>1&&(Be.forEach((function(t){o.addAnimationState({target:t,rect:He?Y(t):i}),$(t),t.fromRect=i,e.removeAnimationState(t)})),He=!1,We(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,o=t.insertion,i=t.activeSortable,r=t.parentEl,a=t.putSortable,l=this.options;if(o){if(n&&i._hideClone(),je=!1,l.animation&&Be.length>1&&(He||!n&&!i.options.sort&&!a)){var s=Y(Re,!1,!0,!0);Be.forEach((function(t){t!==Re&&(Z(t,s),r.appendChild(t))})),He=!0}if(!n)if(He||Ge(),Be.length>1){var c=Ye;i._showClone(e),i.options.animation&&!Ye&&c&&Fe.forEach((function(t){i.addAnimationState({target:t,rect:Xe}),t.fromRect=Xe,t.thisAnimationDuration=null}))}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,o=t.activeSortable;if(Be.forEach((function(t){t.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){Xe=l({},e);var i=k(Re,!0);Xe.top-=i.f,Xe.left-=i.e}},dragOverAnimationComplete:function(){He&&(He=!1,Ge())},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(!Le)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),I(Re,c.selectedClass,!~Be.indexOf(Re)),~Be.indexOf(Re))Be.splice(Be.indexOf(Re),1),Pe=null,at({sortable:i,rootEl:n,name:"deselect",targetEl:Re,originalEvent:e});else{if(Be.push(Re),at({sortable:i,rootEl:n,name:"select",targetEl:Re,originalEvent:e}),e.shiftKey&&Pe&&i.el.contains(Pe)){var d,h,f=H(Pe),p=H(Re);if(~f&&~p&&f!==p)for(p>f?(h=f,d=p):(h=p,d=f+1);h<d;h++)~Be.indexOf(u[h])||(I(u[h],c.selectedClass,!0),Be.push(u[h]),at({sortable:i,rootEl:n,name:"select",targetEl:u[h],originalEvent:e}))}else Pe=Re;ke=s}if(Le&&this.isMultiDrag){if(He=!1,(o[Q].options.sort||o!==n)&&Be.length>1){var g=Y(Re),v=H(Re,":not(."+this.options.selectedClass+")");if(!je&&c.animation&&(Re.thisAnimationDuration=null),s.captureAnimationState(),!je&&(c.animation&&(Re.fromRect=g,Be.forEach((function(t){if(t.thisAnimationDuration=null,t!==Re){var e=He?Y(t):g;t.fromRect=e,s.addAnimationState({target:t,rect:e})}}))),Ge(),Be.forEach((function(t){u[v]?o.insertBefore(t,u[v]):o.appendChild(t),v++})),a===H(Re))){var m=!1;Be.forEach((function(t){t.sortableIndex===H(t)||(m=!0)})),m&&r("update")}Be.forEach((function(t){$(t)})),s.animateAll()}ke=s}(n===o||l&&"clone"!==l.lastPutMode)&&Fe.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=Le=!1,Fe.length=0},destroyGlobal:function(){this._deselectMultiDrag(),T(document,"pointerup",this._deselectMultiDrag),T(document,"mouseup",this._deselectMultiDrag),T(document,"touchend",this._deselectMultiDrag),T(document,"keydown",this._checkKeyDown),T(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(("undefined"===typeof Le||!Le)&&ke===this.sortable&&(!t||!M(t.target,this.options.draggable,this.sortable.el,!1))&&(!t||0===t.button))while(Be.length){var e=Be[0];I(e,this.options.selectedClass,!1),Be.shift(),at({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},l(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[Q];e&&e.options.multiDrag&&!~Be.indexOf(t)&&(ke&&ke!==e&&(ke.multiDrag._deselectMultiDrag(),ke=e),I(t,e.options.selectedClass,!0),Be.push(t))},deselect:function(t){var e=t.parentNode[Q],n=Be.indexOf(t);e&&e.options.multiDrag&&~n&&(I(t,e.options.selectedClass,!1),Be.splice(n,1))}},eventProperties:function(){var t=this,e=[],n=[];return Be.forEach((function(o){var i;e.push({multiDragElement:o,index:o.sortableIndex}),i=He&&o!==Re?-1:He?H(o,":not(."+t.options.selectedClass+")"):H(o),n.push({multiDragElement:o,index:i})})),{items:u(Be),clones:[].concat(Fe),oldIndicies:e,newIndicies:n}},optionListeners:{multiDragKey:function(t){return t=t.toLowerCase(),"ctrl"===t?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function We(t,e){Be.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}function ze(t,e){Fe.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}function Ge(){Be.forEach((function(t){t!==Re&&t.parentNode&&t.parentNode.removeChild(t)}))}ne.mount(new Se),ne.mount(Ae,Me),e["default"]=ne}}]); |