Files
wt cf25e28c28
Rust verification / test (push) Successful in 4m10s
initial commit
2026-10-28 15:59:54 +07:00

2 lines
37 KiB
JavaScript

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