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