mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-07-28 08:55:50 +00:00
1 line
35 KiB
JavaScript
1 line
35 KiB
JavaScript
function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var i=arguments[n]==null?{}:arguments[n];n%2?e(Object(i),!0).forEach(function(e){r(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function o(e,t){if(e==null)return{};var n=a(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=`1.15.6`;function c(e){if(typeof window<`u`&&window.navigator)return!!navigator.userAgent.match(e)}var l=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),u=c(/Edge/i),d=c(/firefox/i),f=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),p=c(/iP(ad|od|hone)/i),m=c(/chrome/i)&&c(/android/i),h={capture:!1,passive:!1};function g(e,t,n){e.addEventListener(t,n,!l&&h)}function _(e,t,n){e.removeEventListener(t,n,!l&&h)}function v(e,t){if(t){if(t[0]===`>`&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function y(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function b(e,t,n,r){if(e){n||=document;do{if(t!=null&&(t[0]===`>`?e.parentNode===n&&v(e,t):v(e,t))||r&&e===n)return e;if(e===n)break}while(e=y(e))}return null}var x=/\s+/g;function S(e,t,n){e&&t&&(e.classList?e.classList[n?`add`:`remove`](t):e.className=((` `+e.className+` `).replace(x,` `).replace(` `+t+` `,` `)+(n?` `+t:``)).replace(x,` `))}function C(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,``):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf(`webkit`)===-1&&(t=`-webkit-`+t),r[t]=n+(typeof n==`string`?``:`px`)}}function w(e,t){var n=``;if(typeof e==`string`)n=e;else do{var r=C(e,`transform`);r&&r!==`none`&&(n=r+` `+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function T(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i<a;i++)n(r[i],i);return r}return[]}function E(){return document.scrollingElement||document.documentElement}function D(e,t,n,r,i){if(!(!e.getBoundingClientRect&&e!==window)){var a,o,s,c,u,d,f;if(e!==window&&e.parentNode&&e!==E()?(a=e.getBoundingClientRect(),o=a.top,s=a.left,c=a.bottom,u=a.right,d=a.height,f=a.width):(o=0,s=0,c=window.innerHeight,u=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(t||n)&&e!==window&&(i||=e.parentNode,!l))do if(i&&i.getBoundingClientRect&&(C(i,`transform`)!==`none`||n&&C(i,`position`)!==`static`)){var p=i.getBoundingClientRect();o-=p.top+parseInt(C(i,`border-top-width`)),s-=p.left+parseInt(C(i,`border-left-width`)),c=o+a.height,u=s+a.width;break}while(i=i.parentNode);if(r&&e!==window){var m=w(i||e),h=m&&m.a,g=m&&m.d;m&&(o/=g,s/=h,f/=h,d/=g,c=o+d,u=s+f)}return{top:o,left:s,bottom:c,right:u,width:f,height:d}}}function O(e,t,n){for(var r=M(e,!0),i=D(e)[t];r;){var a=D(r)[n],o=void 0;if(o=n===`top`||n===`left`?i>=a:i<=a,!o)return r;if(r===E())break;r=M(r,!1)}return!1}function k(e,t,n,r){for(var i=0,a=0,o=e.children;a<o.length;){if(o[a].style.display!==`none`&&o[a]!==Q.ghost&&(r||o[a]!==Q.dragged)&&b(o[a],n.draggable,e,!1)){if(i===t)return o[a];i++}a++}return null}function ee(e,t){for(var n=e.lastElementChild;n&&(n===Q.ghost||C(n,`display`)===`none`||t&&!v(n,t));)n=n.previousElementSibling;return n||null}function A(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!==`TEMPLATE`&&e!==Q.clone&&(!t||v(e,t))&&n++;return n}function te(e){var t=0,n=0,r=E();if(e)do{var i=w(e),a=i.a,o=i.d;t+=e.scrollLeft*a,n+=e.scrollTop*o}while(e!==r&&(e=e.parentNode));return[t,n]}function j(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n)}return-1}function M(e,t){if(!e||!e.getBoundingClientRect)return E();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=C(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX==`auto`||i.overflowX==`scroll`)||n.clientHeight<n.scrollHeight&&(i.overflowY==`auto`||i.overflowY==`scroll`)){if(!n.getBoundingClientRect||n===document.body)return E();if(r||t)return n;r=!0}}while(n=n.parentNode);return E()}function ne(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function re(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var N;function ie(e,t){return function(){if(!N){var n=arguments,r=this;n.length===1?e.call(r,n[0]):e.apply(r,n),N=setTimeout(function(){N=void 0},t)}}}function ae(){clearTimeout(N),N=void 0}function oe(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function P(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function se(e,t,n){var r={};return Array.from(e.children).forEach(function(i){if(!(!b(i,t.draggable,e,!1)||i.animated||i===n)){var a=D(i);r.left=Math.min(r.left??1/0,a.left),r.top=Math.min(r.top??1/0,a.top),r.right=Math.max(r.right??-1/0,a.right),r.bottom=Math.max(r.bottom??-1/0,a.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var F=`Sortable`+new Date().getTime();function ce(){var e=[],n;return{captureAnimationState:function(){e=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(n){if(!(C(n,`display`)===`none`||n===Q.ghost)){e.push({target:n,rect:D(n)});var r=t({},e[e.length-1].rect);if(n.thisAnimationDuration){var i=w(n,!0);i&&(r.top-=i.f,r.left-=i.e)}n.fromRect=r}})},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(j(e,{target:t}),1)},animateAll:function(t){var r=this;if(!this.options.animation){clearTimeout(n),typeof t==`function`&&t();return}var i=!1,a=0;e.forEach(function(e){var t=0,n=e.target,o=n.fromRect,s=D(n),c=n.prevFromRect,l=n.prevToRect,u=e.rect,d=w(n,!0);d&&(s.top-=d.f,s.left-=d.e),n.toRect=s,n.thisAnimationDuration&&re(c,s)&&!re(o,s)&&(u.top-s.top)/(u.left-s.left)===(o.top-s.top)/(o.left-s.left)&&(t=ue(u,c,l,r.options)),re(s,o)||(n.prevFromRect=o,n.prevToRect=s,t||=r.options.animation,r.animate(n,u,s,t)),t&&(i=!0,a=Math.max(a,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},t),n.thisAnimationDuration=t)}),clearTimeout(n),i?n=setTimeout(function(){typeof t==`function`&&t()},a):typeof t==`function`&&t(),e=[]},animate:function(e,t,n,r){if(r){C(e,`transition`,``),C(e,`transform`,``);var i=w(this.el),a=i&&i.a,o=i&&i.d,s=(t.left-n.left)/(a||1),c=(t.top-n.top)/(o||1);e.animatingX=!!s,e.animatingY=!!c,C(e,`transform`,`translate3d(`+s+`px,`+c+`px,0)`),this.forRepaintDummy=le(e),C(e,`transition`,`transform `+r+`ms`+(this.options.easing?` `+this.options.easing:``)),C(e,`transform`,`translate3d(0,0,0)`),typeof e.animated==`number`&&clearTimeout(e.animated),e.animated=setTimeout(function(){C(e,`transition`,``),C(e,`transform`,``),e.animated=!1,e.animatingX=!1,e.animatingY=!1},r)}}}}function le(e){return e.offsetWidth}function ue(e,t,n,r){return Math.sqrt((t.top-e.top)**2+(t.left-e.left)**2)/Math.sqrt((t.top-n.top)**2+(t.left-n.left)**2)*r.animation}var de=[],fe={initializeByDefault:!0},pe={mount:function(e){for(var t in fe)fe.hasOwnProperty(t)&&!(t in e)&&(e[t]=fe[t]);de.forEach(function(t){if(t.pluginName===e.pluginName)throw`Sortable: Cannot mount plugin ${e.pluginName} more than once`}),de.push(e)},pluginEvent:function(e,n,r){var i=this;this.eventCanceled=!1,r.cancel=function(){i.eventCanceled=!0};var a=e+`Global`;de.forEach(function(i){n[i.pluginName]&&(n[i.pluginName][a]&&n[i.pluginName][a](t({sortable:n},r)),n.options[i.pluginName]&&n[i.pluginName][e]&&n[i.pluginName][e](t({sortable:n},r)))})},initializePlugins:function(e,t,n,r){for(var a in de.forEach(function(r){var a=r.pluginName;if(!(!e.options[a]&&!r.initializeByDefault)){var o=new r(e,t,e.options);o.sortable=e,o.options=e.options,e[a]=o,i(n,o.defaults)}}),e.options)if(e.options.hasOwnProperty(a)){var o=this.modifyOption(e,a,e.options[a]);o!==void 0&&(e.options[a]=o)}},getEventProperties:function(e,t){var n={};return de.forEach(function(r){typeof r.eventProperties==`function`&&i(n,r.eventProperties.call(t[r.pluginName],e))}),n},modifyOption:function(e,t,n){var r;return de.forEach(function(i){e[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[t]==`function`&&(r=i.optionListeners[t].call(e[i.pluginName],n))}),r}};function me(e){var n=e.sortable,r=e.rootEl,i=e.name,a=e.targetEl,o=e.cloneEl,s=e.toEl,c=e.fromEl,d=e.oldIndex,f=e.newIndex,p=e.oldDraggableIndex,m=e.newDraggableIndex,h=e.originalEvent,g=e.putSortable,_=e.extraEventProperties;if(n||=r&&r[F],n){var v,y=n.options,b=`on`+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!l&&!u?v=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(v=document.createEvent(`Event`),v.initEvent(i,!0,!0)),v.to=s||r,v.from=c||r,v.item=a||r,v.clone=o,v.oldIndex=d,v.newIndex=f,v.oldDraggableIndex=p,v.newDraggableIndex=m,v.originalEvent=h,v.pullMode=g?g.lastPutMode:void 0;var x=t(t({},_),pe.getEventProperties(i,n));for(var S in x)v[S]=x[S];r&&r.dispatchEvent(v),y[b]&&y[b].call(n,v)}}var he=[`evt`],I=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,a=o(r,he);pe.pluginEvent.bind(Q)(e,n,t({dragEl:R,parentEl:z,ghostEl:B,rootEl:V,nextEl:H,lastDownEl:ge,cloneEl:U,cloneHidden:W,dragStarted:De,putSortable:q,activeSortable:Q.active,originalEvent:i,oldIndex:_e,oldDraggableIndex:ve,newIndex:G,newDraggableIndex:K,hideGhostForTarget:Ge,unhideGhostForTarget:Ke,cloneNowHidden:function(){W=!0},cloneNowShown:function(){W=!1},dispatchSortableEvent:function(e){L({sortable:n,name:e,originalEvent:i})}},a))};function L(e){me(t({putSortable:q,cloneEl:U,targetEl:R,rootEl:V,oldIndex:_e,oldDraggableIndex:ve,newIndex:G,newDraggableIndex:K},e))}var R,z,B,V,H,ge,U,W,_e,G,ve,K,ye,q,be=!1,xe=!1,Se=[],J,Y,Ce,we,Te,Ee,De,Oe,ke,Ae=!1,je=!1,Me,X,Ne=[],Pe=!1,Fe=[],Ie=typeof document<`u`,Le=p,Re=u||l?`cssFloat`:`float`,ze=Ie&&!m&&!p&&`draggable`in document.createElement(`div`),Be=function(){if(Ie){if(l)return!1;var e=document.createElement(`x`);return e.style.cssText=`pointer-events:auto`,e.style.pointerEvents===`auto`}}(),Ve=function(e,t){var n=C(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=k(e,0,t),a=k(e,1,t),o=i&&C(i),s=a&&C(a),c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+D(i).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+D(a).width;if(n.display===`flex`)return n.flexDirection===`column`||n.flexDirection===`column-reverse`?`vertical`:`horizontal`;if(n.display===`grid`)return n.gridTemplateColumns.split(` `).length<=1?`vertical`:`horizontal`;if(i&&o.float&&o.float!==`none`){var u=o.float===`left`?`left`:`right`;return a&&(s.clear===`both`||s.clear===u)?`vertical`:`horizontal`}return i&&(o.display===`block`||o.display===`flex`||o.display===`table`||o.display===`grid`||c>=r&&n[Re]===`none`||a&&n[Re]===`none`&&c+l>r)?`vertical`:`horizontal`},He=function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,a=n?e.width:e.height,o=n?t.left:t.top,s=n?t.right:t.bottom,c=n?t.width:t.height;return r===o||i===s||r+a/2===o+c/2},Ue=function(e,t){var n;return Se.some(function(r){var i=r[F].options.emptyInsertThreshold;if(!(!i||ee(r))){var a=D(r),o=e>=a.left-i&&e<=a.right+i,s=t>=a.top-i&&t<=a.bottom+i;if(o&&s)return n=r}}),n},We=function(e){function t(e,n){return function(r,i,a,o){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(e==null&&(n||s))return!0;if(e==null||e===!1)return!1;if(n&&e===`clone`)return e;if(typeof e==`function`)return t(e(r,i,a,o),n)(r,i,a,o);var c=(n?r:i).options.group.name;return e===!0||typeof e==`string`&&e===c||e.join&&e.indexOf(c)>-1}}var r={},i=e.group;(!i||n(i)!=`object`)&&(i={name:i}),r.name=i.name,r.checkPull=t(i.pull,!0),r.checkPut=t(i.put),r.revertClone=i.revertClone,e.group=r},Ge=function(){!Be&&B&&C(B,`display`,`none`)},Ke=function(){!Be&&B&&C(B,`display`,``)};Ie&&!m&&document.addEventListener(`click`,function(e){if(xe)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),xe=!1,!1},!0);var Z=function(e){if(R){e=e.touches?e.touches[0]:e;var t=Ue(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[F]._onDragOver(n)}}},qe=function(e){R&&R.parentNode[F]._isOutsideThisEl(e.target)};function Q(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw`Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;this.el=e,this.options=t=i({},t),e[F]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?`>li`:`>*`,swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ve(e,this.options)},ghostClass:`sortable-ghost`,chosenClass:`sortable-chosen`,dragClass:`sortable-drag`,ignore:`a, img`,filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData(`Text`,t.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:Q.supportPointer!==!1&&`PointerEvent`in window&&(!f||p),emptyInsertThreshold:5};for(var r in pe.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var a in We(t),this)a.charAt(0)===`_`&&typeof this[a]==`function`&&(this[a]=this[a].bind(this));this.nativeDraggable=!t.forceFallback&&ze,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?g(e,`pointerdown`,this._onTapStart):(g(e,`mousedown`,this._onTapStart),g(e,`touchstart`,this._onTapStart)),this.nativeDraggable&&(g(e,`dragover`,this),g(e,`dragenter`,this)),Se.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),i(this,ce())}Q.prototype={constructor:Q,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Oe=null)},_getDirection:function(e,t){return typeof this.options.direction==`function`?this.options.direction.call(this,e,t,R):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,a=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType===`touch`&&e,s=(o||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,l=r.filter;if(rt(n),!R&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&f&&s&&s.tagName.toUpperCase()===`SELECT`)&&(s=b(s,r.draggable,n,!1),!(s&&s.animated)&&ge!==s)){if(_e=A(s),ve=A(s,r.draggable),typeof l==`function`){if(l.call(this,e,s,this)){L({sortable:t,rootEl:c,name:`filter`,targetEl:s,toEl:n,fromEl:n}),I(`filter`,t,{evt:e}),i&&e.preventDefault();return}}else if(l&&(l=l.split(`,`).some(function(r){if(r=b(c,r.trim(),n,!1),r)return L({sortable:t,rootEl:r,name:`filter`,targetEl:s,fromEl:n,toEl:n}),I(`filter`,t,{evt:e}),!0}),l)){i&&e.preventDefault();return}r.handle&&!b(c,r.handle,n,!1)||this._prepareDragStart(e,o,s)}}},_prepareDragStart:function(e,t,n){var r=this,i=r.el,a=r.options,o=i.ownerDocument,s;if(n&&!R&&n.parentNode===i){var c=D(n);if(V=i,R=n,z=R.parentNode,H=R.nextSibling,ge=n,ye=a.group,Q.dragged=R,J={target:R,clientX:(t||e).clientX,clientY:(t||e).clientY},Te=J.clientX-c.left,Ee=J.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,R.style[`will-change`]=`all`,s=function(){if(I(`delayEnded`,r,{evt:e}),Q.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!d&&r.nativeDraggable&&(R.draggable=!0),r._triggerDragStart(e,t),L({sortable:r,name:`choose`,originalEvent:e}),S(R,a.chosenClass,!0)},a.ignore.split(`,`).forEach(function(e){T(R,e.trim(),Xe)}),g(o,`dragover`,Z),g(o,`mousemove`,Z),g(o,`touchmove`,Z),a.supportPointer?(g(o,`pointerup`,r._onDrop),!this.nativeDraggable&&g(o,`pointercancel`,r._onDrop)):(g(o,`mouseup`,r._onDrop),g(o,`touchend`,r._onDrop),g(o,`touchcancel`,r._onDrop)),d&&this.nativeDraggable&&(this.options.touchStartThreshold=4,R.draggable=!0),I(`delayStart`,this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(u||l))){if(Q.eventCanceled){this._onDrop();return}a.supportPointer?(g(o,`pointerup`,r._disableDelayedDrag),g(o,`pointercancel`,r._disableDelayedDrag)):(g(o,`mouseup`,r._disableDelayedDrag),g(o,`touchend`,r._disableDelayedDrag),g(o,`touchcancel`,r._disableDelayedDrag)),g(o,`mousemove`,r._delayedDragTouchMoveHandler),g(o,`touchmove`,r._delayedDragTouchMoveHandler),a.supportPointer&&g(o,`pointermove`,r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){R&&Xe(R),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;_(e,`mouseup`,this._disableDelayedDrag),_(e,`touchend`,this._disableDelayedDrag),_(e,`touchcancel`,this._disableDelayedDrag),_(e,`pointerup`,this._disableDelayedDrag),_(e,`pointercancel`,this._disableDelayedDrag),_(e,`mousemove`,this._delayedDragTouchMoveHandler),_(e,`touchmove`,this._delayedDragTouchMoveHandler),_(e,`pointermove`,this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t||=e.pointerType==`touch`&&e,!this.nativeDraggable||t?this.options.supportPointer?g(document,`pointermove`,this._onTouchMove):t?g(document,`touchmove`,this._onTouchMove):g(document,`mousemove`,this._onTouchMove):(g(R,`dragend`,this),g(V,`dragstart`,this._onDragStart));try{document.selection?it(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(be=!1,V&&R){I(`dragStarted`,this,{evt:t}),this.nativeDraggable&&g(document,`dragover`,qe);var n=this.options;!e&&S(R,n.dragClass,!1),S(R,n.ghostClass,!0),Q.active=this,e&&this._appendGhost(),L({sortable:this,name:`start`,originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Y){this._lastX=Y.clientX,this._lastY=Y.clientY,Ge();for(var e=document.elementFromPoint(Y.clientX,Y.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Y.clientX,Y.clientY),e!==t);)t=e;if(R.parentNode[F]._isOutsideThisEl(e),t)do{if(t[F]){var n=void 0;if(n=t[F]._onDragOver({clientX:Y.clientX,clientY:Y.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=y(t));Ke()}},_onTouchMove:function(e){if(J){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,a=B&&w(B,!0),o=B&&a&&a.a,s=B&&a&&a.d,c=Le&&X&&te(X),l=(i.clientX-J.clientX+r.x)/(o||1)+(c?c[0]-Ne[0]:0)/(o||1),u=(i.clientY-J.clientY+r.y)/(s||1)+(c?c[1]-Ne[1]:0)/(s||1);if(!Q.active&&!be){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(B){a?(a.e+=l-(Ce||0),a.f+=u-(we||0)):a={a:1,b:0,c:0,d:1,e:l,f:u};var d=`matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;C(B,`webkitTransform`,d),C(B,`mozTransform`,d),C(B,`msTransform`,d),C(B,`transform`,d),Ce=l,we=u,Y=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!B){var e=this.options.fallbackOnBody?document.body:V,t=D(R,!0,Le,!0,e),n=this.options;if(Le){for(X=e;C(X,`position`)===`static`&&C(X,`transform`)===`none`&&X!==document;)X=X.parentNode;X!==document.body&&X!==document.documentElement?(X===document&&(X=E()),t.top+=X.scrollTop,t.left+=X.scrollLeft):X=E(),Ne=te(X)}B=R.cloneNode(!0),S(B,n.ghostClass,!1),S(B,n.fallbackClass,!0),S(B,n.dragClass,!0),C(B,`transition`,``),C(B,`transform`,``),C(B,`box-sizing`,`border-box`),C(B,`margin`,0),C(B,`top`,t.top),C(B,`left`,t.left),C(B,`width`,t.width),C(B,`height`,t.height),C(B,`opacity`,`0.8`),C(B,`position`,Le?`absolute`:`fixed`),C(B,`zIndex`,`100000`),C(B,`pointerEvents`,`none`),Q.ghost=B,e.appendChild(B),C(B,`transform-origin`,Te/parseInt(B.style.width)*100+`% `+Ee/parseInt(B.style.height)*100+`%`)}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,i=n.options;if(I(`dragStart`,this,{evt:e}),Q.eventCanceled){this._onDrop();return}I(`setupClone`,this),Q.eventCanceled||(U=P(R),U.removeAttribute(`id`),U.draggable=!1,U.style[`will-change`]=``,this._hideClone(),S(U,this.options.chosenClass,!1),Q.clone=U),n.cloneId=it(function(){I(`clone`,n),!Q.eventCanceled&&(n.options.removeCloneOnHide||V.insertBefore(U,R),n._hideClone(),L({sortable:n,name:`clone`}))}),!t&&S(R,i.dragClass,!0),t?(xe=!0,n._loopId=setInterval(n._emulateDragOver,50)):(_(document,`mouseup`,n._onDrop),_(document,`touchend`,n._onDrop),_(document,`touchcancel`,n._onDrop),r&&(r.effectAllowed=`move`,i.setData&&i.setData.call(n,r,R)),g(document,`drop`,n),C(R,`transform`,`translateZ(0)`)),be=!0,n._dragStartId=it(n._dragStarted.bind(n,t,e)),g(document,`selectstart`,n),De=!0,window.getSelection().removeAllRanges(),f&&C(document.body,`user-select`,`none`)},_onDragOver:function(e){var n=this.el,r=e.target,i,a,o,s=this.options,c=s.group,l=Q.active,u=ye===c,d=s.sort,f=q||l,p,m=this,h=!1;if(Pe)return;function g(s,c){I(s,m,t({evt:e,isOwner:u,axis:p?`vertical`:`horizontal`,revert:o,dragRect:i,targetRect:a,canSort:d,fromSortable:f,target:r,completed:v,onMove:function(t,r){return Ye(V,n,R,i,t,D(t),e,r)},changed:y},c))}function _(){g(`dragOverAnimationCapture`),m.captureAnimationState(),m!==f&&f.captureAnimationState()}function v(t){return g(`dragOverCompleted`,{insertion:t}),t&&(u?l._hideClone():l._showClone(m),m!==f&&(S(R,q?q.options.ghostClass:l.options.ghostClass,!1),S(R,s.ghostClass,!0)),q!==m&&m!==Q.active?q=m:m===Q.active&&q&&(q=null),f===m&&(m._ignoreWhileAnimating=r),m.animateAll(function(){g(`dragOverAnimationComplete`),m._ignoreWhileAnimating=null}),m!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(r===R&&!R.animated||r===n&&!r.animated)&&(Oe=null),!s.dragoverBubble&&!e.rootEl&&r!==document&&(R.parentNode[F]._isOutsideThisEl(e.target),!t&&Z(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function y(){G=A(R),K=A(R,s.draggable),L({sortable:m,name:`change`,toEl:n,newIndex:G,newDraggableIndex:K,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=b(r,s.draggable,n,!0),g(`dragOver`),Q.eventCanceled)return h;if(R.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||m._ignoreWhileAnimating===r)return v(!1);if(xe=!1,l&&!s.disabled&&(u?d||(o=z!==V):q===this||(this.lastPutMode=ye.checkPull(this,l,R,e))&&c.checkPut(this,l,R,e))){if(p=this._getDirection(e,r)===`vertical`,i=D(R),g(`dragOverValid`),Q.eventCanceled)return h;if(o)return z=V,_(),this._hideClone(),g(`revert`),Q.eventCanceled||(H?V.insertBefore(R,H):V.appendChild(R)),v(!0);var x=ee(n,s.draggable);if(!x||$e(e,p,this)&&!x.animated){if(x===R)return v(!1);if(x&&n===e.target&&(r=x),r&&(a=D(r)),Ye(V,n,R,i,r,a,e,!!r)!==!1)return _(),x&&x.nextSibling?n.insertBefore(R,x.nextSibling):n.appendChild(R),z=n,y(),v(!0)}else if(x&&Qe(e,p,this)){var w=k(n,0,s,!0);if(w===R)return v(!1);if(r=w,a=D(r),Ye(V,n,R,i,r,a,e,!1)!==!1)return _(),n.insertBefore(R,w),z=n,y(),v(!0)}else if(r.parentNode===n){a=D(r);var T=0,E,te=R.parentNode!==n,j=!He(R.animated&&R.toRect||i,r.animated&&r.toRect||a,p),M=p?`top`:`left`,ne=O(r,`top`,`top`)||O(R,`top`,`top`),re=ne?ne.scrollTop:void 0;Oe!==r&&(E=a[M],Ae=!1,je=!j&&s.invertSwap||te),T=et(e,r,a,p,j?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,je,Oe===r);var N;if(T!==0){var ie=A(R);do ie-=T,N=z.children[ie];while(N&&(C(N,`display`)===`none`||N===B))}if(T===0||N===r)return v(!1);Oe=r,ke=T;var ae=r.nextElementSibling,P=!1;P=T===1;var se=Ye(V,n,R,i,r,a,e,P);if(se!==!1)return(se===1||se===-1)&&(P=se===1),Pe=!0,setTimeout(Ze,30),_(),P&&!ae?n.appendChild(R):r.parentNode.insertBefore(R,P?ae:r),ne&&oe(ne,0,re-ne.scrollTop),z=R.parentNode,E!==void 0&&!je&&(Me=Math.abs(E-D(r)[M])),y(),v(!0)}if(n.contains(R))return v(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){_(document,`mousemove`,this._onTouchMove),_(document,`touchmove`,this._onTouchMove),_(document,`pointermove`,this._onTouchMove),_(document,`dragover`,Z),_(document,`mousemove`,Z),_(document,`touchmove`,Z)},_offUpEvents:function(){var e=this.el.ownerDocument;_(e,`mouseup`,this._onDrop),_(e,`touchend`,this._onDrop),_(e,`pointerup`,this._onDrop),_(e,`pointercancel`,this._onDrop),_(e,`touchcancel`,this._onDrop),_(document,`selectstart`,this)},_onDrop:function(e){var t=this.el,n=this.options;if(G=A(R),K=A(R,n.draggable),I(`drop`,this,{evt:e}),z=R&&R.parentNode,G=A(R),K=A(R,n.draggable),Q.eventCanceled){this._nulling();return}be=!1,je=!1,Ae=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),at(this.cloneId),at(this._dragStartId),this.nativeDraggable&&(_(document,`drop`,this),_(t,`dragstart`,this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),f&&C(document.body,`user-select`,``),C(R,`transform`,``),e&&(De&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),B&&B.parentNode&&B.parentNode.removeChild(B),(V===z||q&&q.lastPutMode!==`clone`)&&U&&U.parentNode&&U.parentNode.removeChild(U),R&&(this.nativeDraggable&&_(R,`dragend`,this),Xe(R),R.style[`will-change`]=``,De&&!be&&S(R,q?q.options.ghostClass:this.options.ghostClass,!1),S(R,this.options.chosenClass,!1),L({sortable:this,name:`unchoose`,toEl:z,newIndex:null,newDraggableIndex:null,originalEvent:e}),V===z?G!==_e&&G>=0&&(L({sortable:this,name:`update`,toEl:z,originalEvent:e}),L({sortable:this,name:`sort`,toEl:z,originalEvent:e})):(G>=0&&(L({rootEl:z,name:`add`,toEl:z,fromEl:V,originalEvent:e}),L({sortable:this,name:`remove`,toEl:z,originalEvent:e}),L({rootEl:z,name:`sort`,toEl:z,fromEl:V,originalEvent:e}),L({sortable:this,name:`sort`,toEl:z,originalEvent:e})),q&&q.save()),Q.active&&((G==null||G===-1)&&(G=_e,K=ve),L({sortable:this,name:`end`,toEl:z,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){I(`nulling`,this),V=R=z=B=H=U=ge=W=J=Y=De=G=K=_e=ve=Oe=ke=q=ye=Q.dragged=Q.ghost=Q.clone=Q.active=null,Fe.forEach(function(e){e.checked=!0}),Fe.length=Ce=we=0},handleEvent:function(e){switch(e.type){case`drop`:case`dragend`:this._onDrop(e);break;case`dragenter`:case`dragover`:R&&(this._onDragOver(e),Je(e));break;case`selectstart`:e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,r=0,i=n.length,a=this.options;r<i;r++)t=n[r],b(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||nt(t));return e},sort:function(e,t){var n={},r=this.el;this.toArray().forEach(function(e,t){var i=r.children[t];b(i,this.options.draggable,r,!1)&&(n[e]=i)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return b(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var r=pe.modifyOption(this,e,t);r===void 0?n[e]=t:n[e]=r,e===`group`&&We(n)},destroy:function(){I(`destroy`,this);var e=this.el;e[F]=null,_(e,`mousedown`,this._onTapStart),_(e,`touchstart`,this._onTapStart),_(e,`pointerdown`,this._onTapStart),this.nativeDraggable&&(_(e,`dragover`,this),_(e,`dragenter`,this)),Array.prototype.forEach.call(e.querySelectorAll(`[draggable]`),function(e){e.removeAttribute(`draggable`)}),this._onDrop(),this._disableDelayedDragEvents(),Se.splice(Se.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!W){if(I(`hideClone`,this),Q.eventCanceled)return;C(U,`display`,`none`),this.options.removeCloneOnHide&&U.parentNode&&U.parentNode.removeChild(U),W=!0}},_showClone:function(e){if(e.lastPutMode!==`clone`){this._hideClone();return}if(W){if(I(`showClone`,this),Q.eventCanceled)return;R.parentNode==V&&!this.options.group.revertClone?V.insertBefore(U,R):H?V.insertBefore(U,H):V.appendChild(U),this.options.group.revertClone&&this.animate(R,U),C(U,`display`,``),W=!1}}};function Je(e){e.dataTransfer&&(e.dataTransfer.dropEffect=`move`),e.cancelable&&e.preventDefault()}function Ye(e,t,n,r,i,a,o,s){var c,d=e[F],f=d.options.onMove,p;return window.CustomEvent&&!l&&!u?c=new CustomEvent(`move`,{bubbles:!0,cancelable:!0}):(c=document.createEvent(`Event`),c.initEvent(`move`,!0,!0)),c.to=t,c.from=e,c.dragged=n,c.draggedRect=r,c.related=i||t,c.relatedRect=a||D(t),c.willInsertAfter=s,c.originalEvent=o,e.dispatchEvent(c),f&&(p=f.call(d,c,o)),p}function Xe(e){e.draggable=!1}function Ze(){Pe=!1}function Qe(e,t,n){var r=D(k(n.el,0,n.options,!0)),i=se(n.el,n.options,B),a=10;return t?e.clientX<i.left-a||e.clientY<r.top&&e.clientX<r.right:e.clientY<i.top-a||e.clientY<r.bottom&&e.clientX<r.left}function $e(e,t,n){var r=D(ee(n.el,n.options.draggable)),i=se(n.el,n.options,B),a=10;return t?e.clientX>i.right+a||e.clientY>r.bottom&&e.clientX>r.left:e.clientY>i.bottom+a||e.clientX>r.right&&e.clientY>r.top}function et(e,t,n,r,i,a,o,s){var c=r?e.clientY:e.clientX,l=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,f=!1;if(!o){if(s&&Me<l*i){if(!Ae&&(ke===1?c>u+l*a/2:c<d-l*a/2)&&(Ae=!0),Ae)f=!0;else if(ke===1?c<u+Me:c>d-Me)return-ke}else if(c>u+l*(1-i)/2&&c<d-l*(1-i)/2)return tt(t)}return f||=o,f&&(c<u+l*a/2||c>d-l*a/2)?c>u+l/2?1:-1:0}function tt(e){return A(R)<A(e)?1:-1}function nt(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function rt(e){Fe.length=0;for(var t=e.getElementsByTagName(`input`),n=t.length;n--;){var r=t[n];r.checked&&Fe.push(r)}}function it(e){return setTimeout(e,0)}function at(e){return clearTimeout(e)}Ie&&g(document,`touchmove`,function(e){(Q.active||be)&&e.cancelable&&e.preventDefault()}),Q.utils={on:g,off:_,css:C,find:T,is:function(e,t){return!!b(e,t,e,!1)},extend:ne,throttle:ie,closest:b,toggleClass:S,clone:P,index:A,nextTick:it,cancelNextTick:at,detectDirection:Ve,getChild:k,expando:F},Q.get=function(e){return e[F]},Q.mount=function(){var e=[...arguments];e[0].constructor===Array&&(e=e[0]),e.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw`Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;e.utils&&(Q.utils=t(t({},Q.utils),e.utils)),pe.mount(e)})},Q.create=function(e,t){return new Q(e,t)},Q.version=s;var $=[],ot,st,ct=!1,lt,ut,dt,ft;function pt(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)e.charAt(0)===`_`&&typeof this[e]==`function`&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?g(document,`dragover`,this._handleAutoScroll):this.options.supportPointer?g(document,`pointermove`,this._handleFallbackAutoScroll):t.touches?g(document,`touchmove`,this._handleFallbackAutoScroll):g(document,`mousemove`,this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?_(document,`dragover`,this._handleAutoScroll):(_(document,`pointermove`,this._handleFallbackAutoScroll),_(document,`touchmove`,this._handleFallbackAutoScroll),_(document,`mousemove`,this._handleFallbackAutoScroll)),ht(),mt(),ae()},nulling:function(){dt=st=ot=ct=ft=lt=ut=null,$.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,i);if(dt=e,t||this.options.forceAutoScrollFallback||u||l||f){gt(e,this.options,a,t);var o=M(a,!0);ct&&(!ft||r!==lt||i!==ut)&&(ft&&ht(),ft=setInterval(function(){var a=M(document.elementFromPoint(r,i),!0);a!==o&&(o=a,mt()),gt(e,n.options,a,t)},10),lt=r,ut=i)}else{if(!this.options.bubbleScroll||M(a,!0)===E()){mt();return}gt(e,this.options,M(a,!1),!1)}}},i(e,{pluginName:`scroll`,initializeByDefault:!0})}function mt(){$.forEach(function(e){clearInterval(e.pid)}),$=[]}function ht(){clearInterval(ft)}var gt=ie(function(e,t,n,r){if(t.scroll){var i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,o=t.scrollSensitivity,s=t.scrollSpeed,c=E(),l=!1,u;st!==n&&(st=n,mt(),ot=t.scroll,u=t.scrollFn,ot===!0&&(ot=M(n,!0)));var d=0,f=ot;do{var p=f,m=D(p),h=m.top,g=m.bottom,_=m.left,v=m.right,y=m.width,b=m.height,x=void 0,S=void 0,w=p.scrollWidth,T=p.scrollHeight,O=C(p),k=p.scrollLeft,ee=p.scrollTop;p===c?(x=y<w&&(O.overflowX===`auto`||O.overflowX===`scroll`||O.overflowX===`visible`),S=b<T&&(O.overflowY===`auto`||O.overflowY===`scroll`||O.overflowY===`visible`)):(x=y<w&&(O.overflowX===`auto`||O.overflowX===`scroll`),S=b<T&&(O.overflowY===`auto`||O.overflowY===`scroll`));var A=x&&(Math.abs(v-i)<=o&&k+y<w)-(Math.abs(_-i)<=o&&!!k),te=S&&(Math.abs(g-a)<=o&&ee+b<T)-(Math.abs(h-a)<=o&&!!ee);if(!$[d])for(var j=0;j<=d;j++)$[j]||($[j]={});($[d].vx!=A||$[d].vy!=te||$[d].el!==p)&&($[d].el=p,$[d].vx=A,$[d].vy=te,clearInterval($[d].pid),(A!=0||te!=0)&&(l=!0,$[d].pid=setInterval(function(){r&&this.layer===0&&Q.active._onTouchMove(dt);var t=$[this.layer].vy?$[this.layer].vy*s:0,n=$[this.layer].vx?$[this.layer].vx*s:0;typeof u==`function`&&u.call(Q.dragged.parentNode[F],n,t,e,dt,$[this.layer].el)!==`continue`||oe($[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&f!==c&&(f=M(f,!1)));ct=l}},30),_t=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,i=e.activeSortable,a=e.dispatchSortableEvent,o=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var c=n||i;o();var l=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(l.clientX,l.clientY);s(),c&&!c.el.contains(u)&&(a(`spill`),this.onSpill({dragEl:r,putSortable:n}))}};function vt(){}vt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=k(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:_t},i(vt,{pluginName:`revertOnSpill`});function yt(){}yt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:_t},i(yt,{pluginName:`removeOnSpill`}),Q.mount(new pt),Q.mount(yt,vt);export{Q as Sortable,Q as default}; |