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

rework-table

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rework-table - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

5

dist/index.umd.js

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

(function(U,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],T):(U=typeof globalThis<"u"?globalThis:U||self,T(U.index={},U.Vue))})(this,function(U,T){"use strict";/**!
(function(K,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],x):(K=typeof globalThis<"u"?globalThis:K||self,x(K.index={},K.Vue))})(this,function(K,x){"use strict";/**!
* Sortable 1.15.0

@@ -6,3 +6,2 @@ * @author RubaXa <trash@rubaxa.org>

* @license MIT
*/function ut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function L(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ut(Object(n),!0).forEach(function(o){Nt(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Pe(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(e){return typeof e}:Pe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(t)}function Nt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function z(){return z=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},z.apply(this,arguments)}function kt(t,e){if(t==null)return{};var n={},o=Object.keys(t),i,r;for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Mt(t,e){if(t==null)return{};var n=kt(t,e),o,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,o)||(n[o]=t[o]))}return n}var Ft="1.15.0";function V(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var J=V(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),me=V(/Edge/i),ct=V(/firefox/i),ve=V(/safari/i)&&!V(/chrome/i)&&!V(/android/i),dt=V(/iP(ad|od|hone)/i),ft=V(/chrome/i)&&V(/android/i),ht={capture:!1,passive:!1};function w(t,e,n){t.addEventListener(e,n,!J&&ht)}function v(t,e,n){t.removeEventListener(e,n,!J&&ht)}function Ne(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{return!1}return!1}}function Rt(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function j(t,e,n,o){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&Ne(t,e):Ne(t,e))||o&&t===n)return t;if(t===n)break}while(t=Rt(t))}return null}var pt=/\s+/g;function k(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(pt," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(pt," ")}}function h(t,e,n){var o=t&&t.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=n+(typeof n=="string"?"":"px")}}function ue(t,e){var n="";if(typeof t=="string")n=t;else do{var o=h(t,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function gt(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 W(){var t=document.scrollingElement;return t||document.documentElement}function O(t,e,n,o,i){if(!(!t.getBoundingClientRect&&t!==window)){var r,l,s,u,a,c,d;if(t!==window&&t.parentNode&&t!==W()?(r=t.getBoundingClientRect(),l=r.top,s=r.left,u=r.bottom,a=r.right,c=r.height,d=r.width):(l=0,s=0,u=window.innerHeight,a=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!J))do if(i&&i.getBoundingClientRect&&(h(i,"transform")!=="none"||n&&h(i,"position")!=="static")){var g=i.getBoundingClientRect();l-=g.top+parseInt(h(i,"border-top-width")),s-=g.left+parseInt(h(i,"border-left-width")),u=l+r.height,a=s+r.width;break}while(i=i.parentNode);if(o&&t!==window){var y=ue(i||t),b=y&&y.a,E=y&&y.d;y&&(l/=E,s/=b,d/=b,c/=E,u=l+c,a=s+d)}return{top:l,left:s,bottom:u,right:a,width:d,height:c}}}function mt(t,e,n){for(var o=Z(t,!0),i=O(t)[e];o;){var r=O(o)[n],l=void 0;if(n==="top"||n==="left"?l=i>=r:l=i<=r,!l)return o;if(o===W())break;o=Z(o,!1)}return!1}function ce(t,e,n,o){for(var i=0,r=0,l=t.children;r<l.length;){if(l[r].style.display!=="none"&&l[r]!==p.ghost&&(o||l[r]!==p.dragged)&&j(l[r],n.draggable,t,!1)){if(i===e)return l[r];i++}r++}return null}function Ve(t,e){for(var n=t.lastElementChild;n&&(n===p.ghost||h(n,"display")==="none"||e&&!Ne(n,e));)n=n.previousElementSibling;return n||null}function Y(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==p.clone&&(!e||Ne(t,e))&&n++;return n}function vt(t){var e=0,n=0,o=W();if(t)do{var i=ue(t),r=i.a,l=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*l}while(t!==o&&(t=t.parentNode));return[e,n]}function Xt(t,e){for(var n in t)if(!!t.hasOwnProperty(n)){for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n)}return-1}function Z(t,e){if(!t||!t.getBoundingClientRect)return W();var n=t,o=!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 W();if(o||e)return n;o=!0}}while(n=n.parentNode);return W()}function Yt(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Je(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)}var be;function bt(t,e){return function(){if(!be){var n=arguments,o=this;n.length===1?t.call(o,n[0]):t.apply(o,n),be=setTimeout(function(){be=void 0},e)}}}function $t(){clearTimeout(be),be=void 0}function yt(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function wt(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 M="Sortable"+new Date().getTime();function Bt(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(i){if(!(h(i,"display")==="none"||i===p.ghost)){t.push({target:i,rect:O(i)});var r=L({},t[t.length-1].rect);if(i.thisAnimationDuration){var l=ue(i,!0);l&&(r.top-=l.f,r.left-=l.e)}i.fromRect=r}})}},addAnimationState:function(o){t.push(o)},removeAnimationState:function(o){t.splice(Xt(t,{target:o}),1)},animateAll:function(o){var i=this;if(!this.options.animation){clearTimeout(e),typeof o=="function"&&o();return}var r=!1,l=0;t.forEach(function(s){var u=0,a=s.target,c=a.fromRect,d=O(a),g=a.prevFromRect,y=a.prevToRect,b=s.rect,E=ue(a,!0);E&&(d.top-=E.f,d.left-=E.e),a.toRect=d,a.thisAnimationDuration&&Je(g,d)&&!Je(c,d)&&(b.top-d.top)/(b.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(u=Lt(b,g,y,i.options)),Je(d,c)||(a.prevFromRect=c,a.prevToRect=d,u||(u=i.options.animation),i.animate(a,b,d,u)),u&&(r=!0,l=Math.max(l,u),clearTimeout(a.animationResetTimer),a.animationResetTimer=setTimeout(function(){a.animationTime=0,a.prevFromRect=null,a.fromRect=null,a.prevToRect=null,a.thisAnimationDuration=null},u),a.thisAnimationDuration=u)}),clearTimeout(e),r?e=setTimeout(function(){typeof o=="function"&&o()},l):typeof o=="function"&&o(),t=[]},animate:function(o,i,r,l){if(l){h(o,"transition",""),h(o,"transform","");var s=ue(this.el),u=s&&s.a,a=s&&s.d,c=(i.left-r.left)/(u||1),d=(i.top-r.top)/(a||1);o.animatingX=!!c,o.animatingY=!!d,h(o,"transform","translate3d("+c+"px,"+d+"px,0)"),this.forRepaintDummy=Ht(o),h(o,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),h(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){h(o,"transition",""),h(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},l)}}}}function Ht(t){return t.offsetWidth}function Lt(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}var de=[],qe={initializeByDefault:!0},ye={mount:function(e){for(var n in qe)qe.hasOwnProperty(n)&&!(n in e)&&(e[n]=qe[n]);de.forEach(function(o){if(o.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),de.push(e)},pluginEvent:function(e,n,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var r=e+"Global";de.forEach(function(l){!n[l.pluginName]||(n[l.pluginName][r]&&n[l.pluginName][r](L({sortable:n},o)),n.options[l.pluginName]&&n[l.pluginName][e]&&n[l.pluginName][e](L({sortable:n},o)))})},initializePlugins:function(e,n,o,i){de.forEach(function(s){var u=s.pluginName;if(!(!e.options[u]&&!s.initializeByDefault)){var a=new s(e,n,e.options);a.sortable=e,a.options=e.options,e[u]=a,z(o,a.defaults)}});for(var r in e.options)if(!!e.options.hasOwnProperty(r)){var l=this.modifyOption(e,r,e.options[r]);typeof l<"u"&&(e.options[r]=l)}},getEventProperties:function(e,n){var o={};return de.forEach(function(i){typeof i.eventProperties=="function"&&z(o,i.eventProperties.call(n[i.pluginName],e))}),o},modifyOption:function(e,n,o){var i;return de.forEach(function(r){!e[r.pluginName]||r.optionListeners&&typeof r.optionListeners[n]=="function"&&(i=r.optionListeners[n].call(e[r.pluginName],o))}),i}};function jt(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,l=t.toEl,s=t.fromEl,u=t.oldIndex,a=t.newIndex,c=t.oldDraggableIndex,d=t.newDraggableIndex,g=t.originalEvent,y=t.putSortable,b=t.extraEventProperties;if(e=e||n&&n[M],!!e){var E,B=e.options,q="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!J&&!me?E=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(E=document.createEvent("Event"),E.initEvent(o,!0,!0)),E.to=l||n,E.from=s||n,E.item=i||n,E.clone=r,E.oldIndex=u,E.newIndex=a,E.oldDraggableIndex=c,E.newDraggableIndex=d,E.originalEvent=g,E.pullMode=y?y.lastPutMode:void 0;var P=L(L({},b),ye.getEventProperties(o,e));for(var H in P)E[H]=P[H];n&&n.dispatchEvent(E),B[q]&&B[q].call(e,E)}}var Wt=["evt"],N=function(e,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,r=Mt(o,Wt);ye.pluginEvent.bind(p)(e,n,L({dragEl:f,parentEl:D,ghostEl:m,rootEl:S,nextEl:oe,lastDownEl:ke,cloneEl:_,cloneHidden:Q,dragStarted:Ee,putSortable:x,activeSortable:p.active,originalEvent:i,oldIndex:fe,oldDraggableIndex:we,newIndex:F,newDraggableIndex:ee,hideGhostForTarget:Ot,unhideGhostForTarget:xt,cloneNowHidden:function(){Q=!0},cloneNowShown:function(){Q=!1},dispatchSortableEvent:function(s){I({sortable:n,name:s,originalEvent:i})}},r))};function I(t){jt(L({putSortable:x,cloneEl:_,targetEl:f,rootEl:S,oldIndex:fe,oldDraggableIndex:we,newIndex:F,newDraggableIndex:ee},t))}var f,D,m,S,oe,ke,_,Q,fe,F,we,ee,Me,x,he=!1,Fe=!1,Re=[],ie,$,Ke,Ue,Et,St,Ee,pe,Se,_e=!1,Xe=!1,Ye,A,Ze=[],Qe=!1,$e=[],Be=typeof document<"u",He=dt,_t=me||J?"cssFloat":"float",Gt=Be&&!ft&&!dt&&"draggable"in document.createElement("div"),Dt=function(){if(!!Be){if(J)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Ct=function(e,n){var o=h(e),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),r=ce(e,0,n),l=ce(e,1,n),s=r&&h(r),u=l&&h(l),a=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+O(r).width,c=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+O(l).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&s.float&&s.float!=="none"){var d=s.float==="left"?"left":"right";return l&&(u.clear==="both"||u.clear===d)?"vertical":"horizontal"}return r&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||a>=i&&o[_t]==="none"||l&&o[_t]==="none"&&a+c>i)?"vertical":"horizontal"},zt=function(e,n,o){var i=o?e.left:e.top,r=o?e.right:e.bottom,l=o?e.width:e.height,s=o?n.left:n.top,u=o?n.right:n.bottom,a=o?n.width:n.height;return i===s||r===u||i+l/2===s+a/2},Vt=function(e,n){var o;return Re.some(function(i){var r=i[M].options.emptyInsertThreshold;if(!(!r||Ve(i))){var l=O(i),s=e>=l.left-r&&e<=l.right+r,u=n>=l.top-r&&n<=l.bottom+r;if(s&&u)return o=i}}),o},Tt=function(e){function n(r,l){return function(s,u,a,c){var d=s.options.group.name&&u.options.group.name&&s.options.group.name===u.options.group.name;if(r==null&&(l||d))return!0;if(r==null||r===!1)return!1;if(l&&r==="clone")return r;if(typeof r=="function")return n(r(s,u,a,c),l)(s,u,a,c);var g=(l?s:u).options.group.name;return r===!0||typeof r=="string"&&r===g||r.join&&r.indexOf(g)>-1}}var o={},i=e.group;(!i||Pe(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=n(i.pull,!0),o.checkPut=n(i.put),o.revertClone=i.revertClone,e.group=o},Ot=function(){!Dt&&m&&h(m,"display","none")},xt=function(){!Dt&&m&&h(m,"display","")};Be&&!ft&&document.addEventListener("click",function(t){if(Fe)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Fe=!1,!1},!0);var re=function(e){if(f){e=e.touches?e.touches[0]:e;var n=Vt(e.clientX,e.clientY);if(n){var o={};for(var i in e)e.hasOwnProperty(i)&&(o[i]=e[i]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[M]._onDragOver(o)}}},Jt=function(e){f&&f.parentNode[M]._isOutsideThisEl(e.target)};function p(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=z({},e),t[M]=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 Ct(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(l,s){l.setData("Text",s.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&&!ve,emptyInsertThreshold:5};ye.initializePlugins(this,t,n);for(var o in n)!(o in e)&&(e[o]=n[o]);Tt(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:Gt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?w(t,"pointerdown",this._onTapStart):(w(t,"mousedown",this._onTapStart),w(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(w(t,"dragover",this),w(t,"dragenter",this)),Re.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),z(this,Bt())}p.prototype={constructor:p,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(pe=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,f):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var n=this,o=this.el,i=this.options,r=i.preventOnFilter,l=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(s||e).target,a=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,c=i.filter;if(nn(o),!f&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||i.disabled)&&!a.isContentEditable&&!(!this.nativeDraggable&&ve&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=j(u,i.draggable,o,!1),!(u&&u.animated)&&ke!==u)){if(fe=Y(u),we=Y(u,i.draggable),typeof c=="function"){if(c.call(this,e,u,this)){I({sortable:n,rootEl:a,name:"filter",targetEl:u,toEl:o,fromEl:o}),N("filter",n,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=j(a,d.trim(),o,!1),d)return I({sortable:n,rootEl:d,name:"filter",targetEl:u,fromEl:o,toEl:o}),N("filter",n,{evt:e}),!0}),c)){r&&e.cancelable&&e.preventDefault();return}i.handle&&!j(a,i.handle,o,!1)||this._prepareDragStart(e,s,u)}}},_prepareDragStart:function(e,n,o){var i=this,r=i.el,l=i.options,s=r.ownerDocument,u;if(o&&!f&&o.parentNode===r){var a=O(o);if(S=r,f=o,D=f.parentNode,oe=f.nextSibling,ke=o,Me=l.group,p.dragged=f,ie={target:f,clientX:(n||e).clientX,clientY:(n||e).clientY},Et=ie.clientX-a.left,St=ie.clientY-a.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,f.style["will-change"]="all",u=function(){if(N("delayEnded",i,{evt:e}),p.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!ct&&i.nativeDraggable&&(f.draggable=!0),i._triggerDragStart(e,n),I({sortable:i,name:"choose",originalEvent:e}),k(f,l.chosenClass,!0)},l.ignore.split(",").forEach(function(c){gt(f,c.trim(),et)}),w(s,"dragover",re),w(s,"mousemove",re),w(s,"touchmove",re),w(s,"mouseup",i._onDrop),w(s,"touchend",i._onDrop),w(s,"touchcancel",i._onDrop),ct&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),N("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(me||J))){if(p.eventCanceled){this._onDrop();return}w(s,"mouseup",i._disableDelayedDrag),w(s,"touchend",i._disableDelayedDrag),w(s,"touchcancel",i._disableDelayedDrag),w(s,"mousemove",i._delayedDragTouchMoveHandler),w(s,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&w(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(u,l.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;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(){f&&et(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;v(e,"mouseup",this._disableDelayedDrag),v(e,"touchend",this._disableDelayedDrag),v(e,"touchcancel",this._disableDelayedDrag),v(e,"mousemove",this._delayedDragTouchMoveHandler),v(e,"touchmove",this._delayedDragTouchMoveHandler),v(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?w(document,"pointermove",this._onTouchMove):n?w(document,"touchmove",this._onTouchMove):w(document,"mousemove",this._onTouchMove):(w(f,"dragend",this),w(S,"dragstart",this._onDragStart));try{document.selection?je(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(he=!1,S&&f){N("dragStarted",this,{evt:n}),this.nativeDraggable&&w(document,"dragover",Jt);var o=this.options;!e&&k(f,o.dragClass,!1),k(f,o.ghostClass,!0),p.active=this,e&&this._appendGhost(),I({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if($){this._lastX=$.clientX,this._lastY=$.clientY,Ot();for(var e=document.elementFromPoint($.clientX,$.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint($.clientX,$.clientY),e!==n);)n=e;if(f.parentNode[M]._isOutsideThisEl(e),n)do{if(n[M]){var o=void 0;if(o=n[M]._onDragOver({clientX:$.clientX,clientY:$.clientY,target:e,rootEl:n}),o&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);xt()}},_onTouchMove:function(e){if(ie){var n=this.options,o=n.fallbackTolerance,i=n.fallbackOffset,r=e.touches?e.touches[0]:e,l=m&&ue(m,!0),s=m&&l&&l.a,u=m&&l&&l.d,a=He&&A&&vt(A),c=(r.clientX-ie.clientX+i.x)/(s||1)+(a?a[0]-Ze[0]:0)/(s||1),d=(r.clientY-ie.clientY+i.y)/(u||1)+(a?a[1]-Ze[1]:0)/(u||1);if(!p.active&&!he){if(o&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(m){l?(l.e+=c-(Ke||0),l.f+=d-(Ue||0)):l={a:1,b:0,c:0,d:1,e:c,f:d};var g="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");h(m,"webkitTransform",g),h(m,"mozTransform",g),h(m,"msTransform",g),h(m,"transform",g),Ke=c,Ue=d,$=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!m){var e=this.options.fallbackOnBody?document.body:S,n=O(f,!0,He,!0,e),o=this.options;if(He){for(A=e;h(A,"position")==="static"&&h(A,"transform")==="none"&&A!==document;)A=A.parentNode;A!==document.body&&A!==document.documentElement?(A===document&&(A=W()),n.top+=A.scrollTop,n.left+=A.scrollLeft):A=W(),Ze=vt(A)}m=f.cloneNode(!0),k(m,o.ghostClass,!1),k(m,o.fallbackClass,!0),k(m,o.dragClass,!0),h(m,"transition",""),h(m,"transform",""),h(m,"box-sizing","border-box"),h(m,"margin",0),h(m,"top",n.top),h(m,"left",n.left),h(m,"width",n.width),h(m,"height",n.height),h(m,"opacity","0.8"),h(m,"position",He?"absolute":"fixed"),h(m,"zIndex","100000"),h(m,"pointerEvents","none"),p.ghost=m,e.appendChild(m),h(m,"transform-origin",Et/parseInt(m.style.width)*100+"% "+St/parseInt(m.style.height)*100+"%")}},_onDragStart:function(e,n){var o=this,i=e.dataTransfer,r=o.options;if(N("dragStart",this,{evt:e}),p.eventCanceled){this._onDrop();return}N("setupClone",this),p.eventCanceled||(_=wt(f),_.removeAttribute("id"),_.draggable=!1,_.style["will-change"]="",this._hideClone(),k(_,this.options.chosenClass,!1),p.clone=_),o.cloneId=je(function(){N("clone",o),!p.eventCanceled&&(o.options.removeCloneOnHide||S.insertBefore(_,f),o._hideClone(),I({sortable:o,name:"clone"}))}),!n&&k(f,r.dragClass,!0),n?(Fe=!0,o._loopId=setInterval(o._emulateDragOver,50)):(v(document,"mouseup",o._onDrop),v(document,"touchend",o._onDrop),v(document,"touchcancel",o._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(o,i,f)),w(document,"drop",o),h(f,"transform","translateZ(0)")),he=!0,o._dragStartId=je(o._dragStarted.bind(o,n,e)),w(document,"selectstart",o),Ee=!0,ve&&h(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,o=e.target,i,r,l,s=this.options,u=s.group,a=p.active,c=Me===u,d=s.sort,g=x||a,y,b=this,E=!1;if(Qe)return;function B(Ie,sn){N(Ie,b,L({evt:e,isOwner:c,axis:y?"vertical":"horizontal",revert:l,dragRect:i,targetRect:r,canSort:d,fromSortable:g,target:o,completed:P,onMove:function(Pt,un){return Le(S,n,f,i,Pt,O(Pt),e,un)},changed:H},sn))}function q(){B("dragOverAnimationCapture"),b.captureAnimationState(),b!==g&&g.captureAnimationState()}function P(Ie){return B("dragOverCompleted",{insertion:Ie}),Ie&&(c?a._hideClone():a._showClone(b),b!==g&&(k(f,x?x.options.ghostClass:a.options.ghostClass,!1),k(f,s.ghostClass,!0)),x!==b&&b!==p.active?x=b:b===p.active&&x&&(x=null),g===b&&(b._ignoreWhileAnimating=o),b.animateAll(function(){B("dragOverAnimationComplete"),b._ignoreWhileAnimating=null}),b!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(o===f&&!f.animated||o===n&&!o.animated)&&(pe=null),!s.dragoverBubble&&!e.rootEl&&o!==document&&(f.parentNode[M]._isOutsideThisEl(e.target),!Ie&&re(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),E=!0}function H(){F=Y(f),ee=Y(f,s.draggable),I({sortable:b,name:"change",toEl:n,newIndex:F,newDraggableIndex:ee,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),o=j(o,s.draggable,n,!0),B("dragOver"),p.eventCanceled)return E;if(f.contains(e.target)||o.animated&&o.animatingX&&o.animatingY||b._ignoreWhileAnimating===o)return P(!1);if(Fe=!1,a&&!s.disabled&&(c?d||(l=D!==S):x===this||(this.lastPutMode=Me.checkPull(this,a,f,e))&&u.checkPut(this,a,f,e))){if(y=this._getDirection(e,o)==="vertical",i=O(f),B("dragOverValid"),p.eventCanceled)return E;if(l)return D=S,q(),this._hideClone(),B("revert"),p.eventCanceled||(oe?S.insertBefore(f,oe):S.appendChild(f)),P(!0);var R=Ve(n,s.draggable);if(!R||Zt(e,y,this)&&!R.animated){if(R===f)return P(!1);if(R&&n===e.target&&(o=R),o&&(r=O(o)),Le(S,n,f,i,o,r,e,!!o)!==!1)return q(),R&&R.nextSibling?n.insertBefore(f,R.nextSibling):n.appendChild(f),D=n,H(),P(!0)}else if(R&&Ut(e,y,this)){var ae=ce(n,0,s,!0);if(ae===f)return P(!1);if(o=ae,r=O(o),Le(S,n,f,i,o,r,e,!1)!==!1)return q(),n.insertBefore(f,ae),D=n,H(),P(!0)}else if(o.parentNode===n){r=O(o);var G=0,le,Te=f.parentNode!==n,X=!zt(f.animated&&f.toRect||i,o.animated&&o.toRect||r,y),Oe=y?"top":"left",te=mt(o,"top","top")||mt(f,"top","top"),xe=te?te.scrollTop:void 0;pe!==o&&(le=r[Oe],_e=!1,Xe=!X&&s.invertSwap||Te),G=Qt(e,o,r,y,X?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Xe,pe===o);var K;if(G!==0){var se=Y(f);do se-=G,K=D.children[se];while(K&&(h(K,"display")==="none"||K===m))}if(G===0||K===o)return P(!1);pe=o,Se=G;var Ae=o.nextElementSibling,ne=!1;ne=G===1;var ze=Le(S,n,f,i,o,r,e,ne);if(ze!==!1)return(ze===1||ze===-1)&&(ne=ze===1),Qe=!0,setTimeout(Kt,30),q(),ne&&!Ae?n.appendChild(f):o.parentNode.insertBefore(f,ne?Ae:o),te&&yt(te,0,xe-te.scrollTop),D=f.parentNode,le!==void 0&&!Xe&&(Ye=Math.abs(le-O(o)[Oe])),H(),P(!0)}if(n.contains(f))return P(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){v(document,"mousemove",this._onTouchMove),v(document,"touchmove",this._onTouchMove),v(document,"pointermove",this._onTouchMove),v(document,"dragover",re),v(document,"mousemove",re),v(document,"touchmove",re)},_offUpEvents:function(){var e=this.el.ownerDocument;v(e,"mouseup",this._onDrop),v(e,"touchend",this._onDrop),v(e,"pointerup",this._onDrop),v(e,"touchcancel",this._onDrop),v(document,"selectstart",this)},_onDrop:function(e){var n=this.el,o=this.options;if(F=Y(f),ee=Y(f,o.draggable),N("drop",this,{evt:e}),D=f&&f.parentNode,F=Y(f),ee=Y(f,o.draggable),p.eventCanceled){this._nulling();return}he=!1,Xe=!1,_e=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),tt(this.cloneId),tt(this._dragStartId),this.nativeDraggable&&(v(document,"drop",this),v(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ve&&h(document.body,"user-select",""),h(f,"transform",""),e&&(Ee&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),m&&m.parentNode&&m.parentNode.removeChild(m),(S===D||x&&x.lastPutMode!=="clone")&&_&&_.parentNode&&_.parentNode.removeChild(_),f&&(this.nativeDraggable&&v(f,"dragend",this),et(f),f.style["will-change"]="",Ee&&!he&&k(f,x?x.options.ghostClass:this.options.ghostClass,!1),k(f,this.options.chosenClass,!1),I({sortable:this,name:"unchoose",toEl:D,newIndex:null,newDraggableIndex:null,originalEvent:e}),S!==D?(F>=0&&(I({rootEl:D,name:"add",toEl:D,fromEl:S,originalEvent:e}),I({sortable:this,name:"remove",toEl:D,originalEvent:e}),I({rootEl:D,name:"sort",toEl:D,fromEl:S,originalEvent:e}),I({sortable:this,name:"sort",toEl:D,originalEvent:e})),x&&x.save()):F!==fe&&F>=0&&(I({sortable:this,name:"update",toEl:D,originalEvent:e}),I({sortable:this,name:"sort",toEl:D,originalEvent:e})),p.active&&((F==null||F===-1)&&(F=fe,ee=we),I({sortable:this,name:"end",toEl:D,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),S=f=D=m=oe=_=ke=Q=ie=$=Ee=F=ee=fe=we=pe=Se=x=Me=p.dragged=p.ghost=p.clone=p.active=null,$e.forEach(function(e){e.checked=!0}),$e.length=Ke=Ue=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":f&&(this._onDragOver(e),qt(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,o=this.el.children,i=0,r=o.length,l=this.options;i<r;i++)n=o[i],j(n,l.draggable,this.el,!1)&&e.push(n.getAttribute(l.dataIdAttr)||tn(n));return e},sort:function(e,n){var o={},i=this.el;this.toArray().forEach(function(r,l){var s=i.children[l];j(s,this.options.draggable,i,!1)&&(o[r]=s)},this),n&&this.captureAnimationState(),e.forEach(function(r){o[r]&&(i.removeChild(o[r]),i.appendChild(o[r]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return j(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var o=this.options;if(n===void 0)return o[e];var i=ye.modifyOption(this,e,n);typeof i<"u"?o[e]=i:o[e]=n,e==="group"&&Tt(o)},destroy:function(){N("destroy",this);var e=this.el;e[M]=null,v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart),v(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Re.splice(Re.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Q){if(N("hideClone",this),p.eventCanceled)return;h(_,"display","none"),this.options.removeCloneOnHide&&_.parentNode&&_.parentNode.removeChild(_),Q=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Q){if(N("showClone",this),p.eventCanceled)return;f.parentNode==S&&!this.options.group.revertClone?S.insertBefore(_,f):oe?S.insertBefore(_,oe):S.appendChild(_),this.options.group.revertClone&&this.animate(f,_),h(_,"display",""),Q=!1}}};function qt(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Le(t,e,n,o,i,r,l,s){var u,a=t[M],c=a.options.onMove,d;return window.CustomEvent&&!J&&!me?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=e,u.from=t,u.dragged=n,u.draggedRect=o,u.related=i||e,u.relatedRect=r||O(e),u.willInsertAfter=s,u.originalEvent=l,t.dispatchEvent(u),c&&(d=c.call(a,u,l)),d}function et(t){t.draggable=!1}function Kt(){Qe=!1}function Ut(t,e,n){var o=O(ce(n.el,0,n.options,!0)),i=10;return e?t.clientX<o.left-i||t.clientY<o.top&&t.clientX<o.right:t.clientY<o.top-i||t.clientY<o.bottom&&t.clientX<o.left}function Zt(t,e,n){var o=O(Ve(n.el,n.options.draggable)),i=10;return e?t.clientX>o.right+i||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+i}function Qt(t,e,n,o,i,r,l,s){var u=o?t.clientY:t.clientX,a=o?n.height:n.width,c=o?n.top:n.left,d=o?n.bottom:n.right,g=!1;if(!l){if(s&&Ye<a*i){if(!_e&&(Se===1?u>c+a*r/2:u<d-a*r/2)&&(_e=!0),_e)g=!0;else if(Se===1?u<c+Ye:u>d-Ye)return-Se}else if(u>c+a*(1-i)/2&&u<d-a*(1-i)/2)return en(e)}return g=g||l,g&&(u<c+a*r/2||u>d-a*r/2)?u>c+a/2?1:-1:0}function en(t){return Y(f)<Y(t)?1:-1}function tn(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 nn(t){$e.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&$e.push(o)}}function je(t){return setTimeout(t,0)}function tt(t){return clearTimeout(t)}Be&&w(document,"touchmove",function(t){(p.active||he)&&t.cancelable&&t.preventDefault()}),p.utils={on:w,off:v,css:h,find:gt,is:function(e,n){return!!j(e,n,e,!1)},extend:Yt,throttle:bt,closest:j,toggleClass:k,clone:wt,index:Y,nextTick:je,cancelNextTick:tt,detectDirection:Ct,getChild:ce},p.get=function(t){return t[M]},p.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(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(p.utils=L(L({},p.utils),o.utils)),ye.mount(o)})},p.create=function(t,e){return new p(t,e)},p.version=Ft;var C=[],De,nt,ot=!1,it,rt,We,Ce;function on(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(n){var o=n.originalEvent;this.sortable.nativeDraggable?w(document,"dragover",this._handleAutoScroll):this.options.supportPointer?w(document,"pointermove",this._handleFallbackAutoScroll):o.touches?w(document,"touchmove",this._handleFallbackAutoScroll):w(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var o=n.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},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)),At(),Ge(),$t()},nulling:function(){We=nt=De=ot=Ce=it=rt=null,C.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,o){var i=this,r=(n.touches?n.touches[0]:n).clientX,l=(n.touches?n.touches[0]:n).clientY,s=document.elementFromPoint(r,l);if(We=n,o||this.options.forceAutoScrollFallback||me||J||ve){at(n,this.options,s,o);var u=Z(s,!0);ot&&(!Ce||r!==it||l!==rt)&&(Ce&&At(),Ce=setInterval(function(){var a=Z(document.elementFromPoint(r,l),!0);a!==u&&(u=a,Ge()),at(n,i.options,a,o)},10),it=r,rt=l)}else{if(!this.options.bubbleScroll||Z(s,!0)===W()){Ge();return}at(n,this.options,Z(s,!1),!1)}}},z(t,{pluginName:"scroll",initializeByDefault:!0})}function Ge(){C.forEach(function(t){clearInterval(t.pid)}),C=[]}function At(){clearInterval(Ce)}var at=bt(function(t,e,n,o){if(!!e.scroll){var i=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,u=W(),a=!1,c;nt!==n&&(nt=n,Ge(),De=e.scroll,c=e.scrollFn,De===!0&&(De=Z(n,!0)));var d=0,g=De;do{var y=g,b=O(y),E=b.top,B=b.bottom,q=b.left,P=b.right,H=b.width,R=b.height,ae=void 0,G=void 0,le=y.scrollWidth,Te=y.scrollHeight,X=h(y),Oe=y.scrollLeft,te=y.scrollTop;y===u?(ae=H<le&&(X.overflowX==="auto"||X.overflowX==="scroll"||X.overflowX==="visible"),G=R<Te&&(X.overflowY==="auto"||X.overflowY==="scroll"||X.overflowY==="visible")):(ae=H<le&&(X.overflowX==="auto"||X.overflowX==="scroll"),G=R<Te&&(X.overflowY==="auto"||X.overflowY==="scroll"));var xe=ae&&(Math.abs(P-i)<=l&&Oe+H<le)-(Math.abs(q-i)<=l&&!!Oe),K=G&&(Math.abs(B-r)<=l&&te+R<Te)-(Math.abs(E-r)<=l&&!!te);if(!C[d])for(var se=0;se<=d;se++)C[se]||(C[se]={});(C[d].vx!=xe||C[d].vy!=K||C[d].el!==y)&&(C[d].el=y,C[d].vx=xe,C[d].vy=K,clearInterval(C[d].pid),(xe!=0||K!=0)&&(a=!0,C[d].pid=setInterval(function(){o&&this.layer===0&&p.active._onTouchMove(We);var Ae=C[this.layer].vy?C[this.layer].vy*s:0,ne=C[this.layer].vx?C[this.layer].vx*s:0;typeof c=="function"&&c.call(p.dragged.parentNode[M],ne,Ae,t,We,C[this.layer].el)!=="continue"||yt(C[this.layer].el,ne,Ae)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&g!==u&&(g=Z(g,!1)));ot=a}},30),It=function(e){var n=e.originalEvent,o=e.putSortable,i=e.dragEl,r=e.activeSortable,l=e.dispatchSortableEvent,s=e.hideGhostForTarget,u=e.unhideGhostForTarget;if(!!n){var a=o||r;s();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(c.clientX,c.clientY);u(),a&&!a.el.contains(d)&&(l("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function lt(){}lt.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var i=ce(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),o&&o.animateAll()},drop:It},z(lt,{pluginName:"revertOnSpill"});function st(){}st.prototype={onSpill:function(e){var n=e.dragEl,o=e.putSortable,i=o||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:It},z(st,{pluginName:"removeOnSpill"}),p.mount(new on),p.mount(st,lt);const ge={name:"CommonTable",props:{columns:{type:Array,default(){return[]},validator:t=>Array.isArray(t),required:!0},config:{type:Object,default(){return{}}},modelValue:{type:Array,default(){return[]},validator:t=>Array.isArray(t)},options:{type:Object,default(){return{}},validator:t=>typeof t=="object"}},emits:["update:modelValue","select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],data(){return{tableKey:1,id:"sortTable"+new Date().getTime()}},methods:{init(){let t=this,e=Object.assign({group:{name:"group",pull:!0,put:!1},sort:!1,delay:0,delayOnTouchOnly:!1,touchStartThreshold:0,disabled:!1,store:null,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",handle:".el-table__row",preventOnFilter:!0,draggable:".el-table__row",dragClass:"el-table__row",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:1,direction:"horizontal",forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,dragoverBubble:!1,removeCloneOnHide:!0,emptyInsertThreshold:5,onEnd:({newIndex:o,oldIndex:i})=>{const r=[...t.modelValue];r.splice(o,0,r.splice(i,1)[0]),o!==i&&(t.tableKey++,t.$emit("update:modelValue",r))}},this.depCopy(this.options,["onEnd","onClone","onChange"]));const n=document.querySelector(`#${this.id} .el-table__body-wrapper tbody`);p.create(n,e)},renderElement(){let t=this.modelValue,{columns:e,config:n,id:o}=this,i={stripe:!1,border:!1,fit:!0,"show-header":!0,"highlight-current-row":!1,"empty-text":"\u6682\u65E0\u6570\u636E","default-expand-all":!1,"default-sort":{order:"ascending"},"show-summary":!1,"sum-text":"\u5408\u8BA1","select-on-indeterminate":!0,indent:16,"tree-props":{hasChildren:"hasChildren",children:"children"},ref:"baseTableJsx"},r=n.slots,l=this.depCopy(n,["slots","ref"]),u={...Object.assign(i,l)};return u.on?T.createVNode("div",{id:o,class:o},[T.createVNode(T.resolveComponent("el-table"),T.mergeProps({data:t},u,{key:tableKey}),{default:()=>[e.map((a,c)=>{let d=this.depCopy(a,["scopedSlots"]),g=a.scopedSlots,y={...d};return T.createVNode(T.resolveComponent("el-table-column"),T.mergeProps(y,{key:c}),g)})],...r})]):T.createVNode("div",{id:o,class:o},[T.createVNode(T.resolveComponent("el-table"),T.mergeProps({data:t,onSelectAll:()=>{this.selectAll()},onSelect:(a,c)=>{this.select(a,c)},onCellMouseEnter:(a,c,d,g)=>{this.cellMouseEnter(a,c,d,g)},onSelectionChange:a=>{this.selectionChange(a)},onCellMouseLeave:(a,c,d,g)=>{this.cellMouseLeave(a,c,d,g)},onCellClick:(a,c,d,g)=>{this.cellClick(a,c,d,g)},onCellDblclick:(a,c,d,g)=>{this.cellDblclick(a,c,d,g)},onRowClick:(a,c,d)=>{this.rowClick(a,c,d)},onRowContextmenu:(a,c,d)=>{this.rowContextmenu(a,c,d)},onRowDblclick:(a,c,d)=>{this.rowDblclick(a,c,d)},onHeaderClick:(a,c)=>{this.headerClick(a,c)},onHeaderContextmenu:(a,c)=>{this.headerContextmenu(a,c)},onSortChange:({column:a,prop:c,order:d})=>{this.sortChange({column:a,prop:c,order:d})},onFilterChange:a=>{this.filterChange(a)},onCurrentChange:(a,c)=>{this.currentChange(a,c)},obHeaderDragend:(a,c,d,g)=>{this.headerDragend(a,c,d,g)},onExpandChange:(a,c)=>{this.expandChange(a,c)}},u,{key:this.tableKey}),{default:()=>[e.map((a,c)=>{let d=this.depCopy(a,["scopedSlots"]),g=a.scopedSlots,y={...d};return T.createVNode(T.resolveComponent("el-table-column"),T.mergeProps(y,{key:c}),g)})],...r})])},depCopy(t,e=[]){Array.isArray(e)||(e=[]);let n={};for(let o in t)e.includes(o)||(n[o]=t[o]);return n},select(t,e){this.$emit("select",t,e)},selectAll(){this.$emit("select-all")},selectionChange(t){this.$emit("selection-change",t)},cellMouseEnter(t,e,n,o){this.$emit("cell-mouse-enter",t,e,n,o)},cellMouseLeave(t,e,n,o){this.$emit("cell-mouse-leave",t,e,n,o)},cellClick(t,e,n,o){this.$emit("cell-click",t,e,n,o)},cellDblclick(t,e,n,o){this.$emit("cell-dblclick",t,e,n,o)},rowClick(t,e,n){this.$emit("row-click",t,e,n)},rowContextmenu(t,e,n){this.$emit("row-contextmenu",t,e,n)},rowDblclick(t,e,n){this.$emit("row-dblclick",t,e,n)},headerClick(t,e){this.$emit("header-click",t,e)},headerContextmenu(t,e){this.$emit("header-contextmenu",t,e)},sortChange({column:t,prop:e,order:n}){this.$emit("sort-change",{column:t,prop:e,order:n})},filterChange(t){this.$emit("filter-change",t)},currentChange(t,e){this.$emit("current-change",t,e)},headerDragend(t,e,n,o){this.$emit("header-dragend",t,e,n,o)},expandChange(t,e){this.$emit("expand-change",t,e)},clearSelection(){this.$refs.baseTableJsx.clearSelection()},toggleRowSelection(t,e){this.$refs.baseTableJsx.toggleRowSelection(t,e)},toggleAllSelection(){this.$refs.baseTableJsx.toggleAllSelection()},toggleRowExpansion(t,e){this.$refs.baseTableJsx.toggleRowExpansion(t,e)},setCurrentRow(t){this.$refs.baseTableJsx.setCurrentRow(t)},clearSort(){this.$refs.baseTableJsx.clearSort()},clearFilter(t){this.$refs.baseTableJsx.clearFilter(t)},doLayout(){this.$refs.baseTableJsx.doLayout()},sort(t,e){this.$refs.baseTableJsx.sort(t,e)}},render(){return T.nextTick(()=>{this.init()}),this.renderElement()}};ge.install=function(t){t.component(ge.name,ge)};const rn=[ge];function an(t){rn.forEach(e=>{t.component(e.name,e)})}const ln={install:an,CommonTable:ge};U.CommonTable=ge,U.default=ln,Object.defineProperties(U,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
//# sourceMappingURL=index.umd.js.map
*/function ut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function L(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ut(Object(n),!0).forEach(function(o){Nt(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Pe(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(e){return typeof e}:Pe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(t)}function Nt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function z(){return z=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},z.apply(this,arguments)}function kt(t,e){if(t==null)return{};var n={},o=Object.keys(t),r,i;for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Mt(t,e){if(t==null)return{};var n=kt(t,e),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)o=i[r],!(e.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,o)||(n[o]=t[o]))}return n}var Ft="1.15.0";function V(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var J=V(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),me=V(/Edge/i),ct=V(/firefox/i),ve=V(/safari/i)&&!V(/chrome/i)&&!V(/android/i),dt=V(/iP(ad|od|hone)/i),ft=V(/chrome/i)&&V(/android/i),ht={capture:!1,passive:!1};function w(t,e,n){t.addEventListener(e,n,!J&&ht)}function b(t,e,n){t.removeEventListener(e,n,!J&&ht)}function Ne(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{return!1}return!1}}function Rt(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function j(t,e,n,o){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&Ne(t,e):Ne(t,e))||o&&t===n)return t;if(t===n)break}while(t=Rt(t))}return null}var pt=/\s+/g;function k(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(pt," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(pt," ")}}function p(t,e,n){var o=t&&t.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=n+(typeof n=="string"?"":"px")}}function ue(t,e){var n="";if(typeof t=="string")n=t;else do{var o=p(t,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function gt(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,i=o.length;if(n)for(;r<i;r++)n(o[r],r);return o}return[]}function W(){var t=document.scrollingElement;return t||document.documentElement}function T(t,e,n,o,r){if(!(!t.getBoundingClientRect&&t!==window)){var i,a,l,s,d,c,u;if(t!==window&&t.parentNode&&t!==W()?(i=t.getBoundingClientRect(),a=i.top,l=i.left,s=i.bottom,d=i.right,c=i.height,u=i.width):(a=0,l=0,s=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(e||n)&&t!==window&&(r=r||t.parentNode,!J))do if(r&&r.getBoundingClientRect&&(p(r,"transform")!=="none"||n&&p(r,"position")!=="static")){var h=r.getBoundingClientRect();a-=h.top+parseInt(p(r,"border-top-width")),l-=h.left+parseInt(p(r,"border-left-width")),s=a+i.height,d=l+i.width;break}while(r=r.parentNode);if(o&&t!==window){var v=ue(r||t),y=v&&v.a,E=v&&v.d;v&&(a/=E,l/=y,u/=y,c/=E,s=a+c,d=l+u)}return{top:a,left:l,bottom:s,right:d,width:u,height:c}}}function mt(t,e,n){for(var o=Z(t,!0),r=T(t)[e];o;){var i=T(o)[n],a=void 0;if(n==="top"||n==="left"?a=r>=i:a=r<=i,!a)return o;if(o===W())break;o=Z(o,!1)}return!1}function ce(t,e,n,o){for(var r=0,i=0,a=t.children;i<a.length;){if(a[i].style.display!=="none"&&a[i]!==g.ghost&&(o||a[i]!==g.dragged)&&j(a[i],n.draggable,t,!1)){if(r===e)return a[i];r++}i++}return null}function Ve(t,e){for(var n=t.lastElementChild;n&&(n===g.ghost||p(n,"display")==="none"||e&&!Ne(n,e));)n=n.previousElementSibling;return n||null}function Y(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==g.clone&&(!e||Ne(t,e))&&n++;return n}function vt(t){var e=0,n=0,o=W();if(t)do{var r=ue(t),i=r.a,a=r.d;e+=t.scrollLeft*i,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function Xt(t,e){for(var n in t)if(!!t.hasOwnProperty(n)){for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n)}return-1}function Z(t,e){if(!t||!t.getBoundingClientRect)return W();var n=t,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=p(n);if(n.clientWidth<n.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return W();if(o||e)return n;o=!0}}while(n=n.parentNode);return W()}function Yt(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Je(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)}var be;function bt(t,e){return function(){if(!be){var n=arguments,o=this;n.length===1?t.call(o,n[0]):t.apply(o,n),be=setTimeout(function(){be=void 0},e)}}}function $t(){clearTimeout(be),be=void 0}function yt(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function wt(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 M="Sortable"+new Date().getTime();function Bt(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(r){if(!(p(r,"display")==="none"||r===g.ghost)){t.push({target:r,rect:T(r)});var i=L({},t[t.length-1].rect);if(r.thisAnimationDuration){var a=ue(r,!0);a&&(i.top-=a.f,i.left-=a.e)}r.fromRect=i}})}},addAnimationState:function(o){t.push(o)},removeAnimationState:function(o){t.splice(Xt(t,{target:o}),1)},animateAll:function(o){var r=this;if(!this.options.animation){clearTimeout(e),typeof o=="function"&&o();return}var i=!1,a=0;t.forEach(function(l){var s=0,d=l.target,c=d.fromRect,u=T(d),h=d.prevFromRect,v=d.prevToRect,y=l.rect,E=ue(d,!0);E&&(u.top-=E.f,u.left-=E.e),d.toRect=u,d.thisAnimationDuration&&Je(h,u)&&!Je(c,u)&&(y.top-u.top)/(y.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(s=Lt(y,h,v,r.options)),Je(u,c)||(d.prevFromRect=c,d.prevToRect=u,s||(s=r.options.animation),r.animate(d,y,u,s)),s&&(i=!0,a=Math.max(a,s),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},s),d.thisAnimationDuration=s)}),clearTimeout(e),i?e=setTimeout(function(){typeof o=="function"&&o()},a):typeof o=="function"&&o(),t=[]},animate:function(o,r,i,a){if(a){p(o,"transition",""),p(o,"transform","");var l=ue(this.el),s=l&&l.a,d=l&&l.d,c=(r.left-i.left)/(s||1),u=(r.top-i.top)/(d||1);o.animatingX=!!c,o.animatingY=!!u,p(o,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=Ht(o),p(o,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),p(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){p(o,"transition",""),p(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},a)}}}}function Ht(t){return t.offsetWidth}function Lt(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}var de=[],qe={initializeByDefault:!0},ye={mount:function(e){for(var n in qe)qe.hasOwnProperty(n)&&!(n in e)&&(e[n]=qe[n]);de.forEach(function(o){if(o.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),de.push(e)},pluginEvent:function(e,n,o){var r=this;this.eventCanceled=!1,o.cancel=function(){r.eventCanceled=!0};var i=e+"Global";de.forEach(function(a){!n[a.pluginName]||(n[a.pluginName][i]&&n[a.pluginName][i](L({sortable:n},o)),n.options[a.pluginName]&&n[a.pluginName][e]&&n[a.pluginName][e](L({sortable:n},o)))})},initializePlugins:function(e,n,o,r){de.forEach(function(l){var s=l.pluginName;if(!(!e.options[s]&&!l.initializeByDefault)){var d=new l(e,n,e.options);d.sortable=e,d.options=e.options,e[s]=d,z(o,d.defaults)}});for(var i in e.options)if(!!e.options.hasOwnProperty(i)){var a=this.modifyOption(e,i,e.options[i]);typeof a<"u"&&(e.options[i]=a)}},getEventProperties:function(e,n){var o={};return de.forEach(function(r){typeof r.eventProperties=="function"&&z(o,r.eventProperties.call(n[r.pluginName],e))}),o},modifyOption:function(e,n,o){var r;return de.forEach(function(i){!e[i.pluginName]||i.optionListeners&&typeof i.optionListeners[n]=="function"&&(r=i.optionListeners[n].call(e[i.pluginName],o))}),r}};function jt(t){var e=t.sortable,n=t.rootEl,o=t.name,r=t.targetEl,i=t.cloneEl,a=t.toEl,l=t.fromEl,s=t.oldIndex,d=t.newIndex,c=t.oldDraggableIndex,u=t.newDraggableIndex,h=t.originalEvent,v=t.putSortable,y=t.extraEventProperties;if(e=e||n&&n[M],!!e){var E,B=e.options,q="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!J&&!me?E=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(E=document.createEvent("Event"),E.initEvent(o,!0,!0)),E.to=a||n,E.from=l||n,E.item=r||n,E.clone=i,E.oldIndex=s,E.newIndex=d,E.oldDraggableIndex=c,E.newDraggableIndex=u,E.originalEvent=h,E.pullMode=v?v.lastPutMode:void 0;var P=L(L({},y),ye.getEventProperties(o,e));for(var H in P)E[H]=P[H];n&&n.dispatchEvent(E),B[q]&&B[q].call(e,E)}}var Wt=["evt"],N=function(e,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=o.evt,i=Mt(o,Wt);ye.pluginEvent.bind(g)(e,n,L({dragEl:f,parentEl:D,ghostEl:m,rootEl:_,nextEl:oe,lastDownEl:ke,cloneEl:S,cloneHidden:Q,dragStarted:Ee,putSortable:O,activeSortable:g.active,originalEvent:r,oldIndex:fe,oldDraggableIndex:we,newIndex:F,newDraggableIndex:ee,hideGhostForTarget:Ot,unhideGhostForTarget:At,cloneNowHidden:function(){Q=!0},cloneNowShown:function(){Q=!1},dispatchSortableEvent:function(l){I({sortable:n,name:l,originalEvent:r})}},i))};function I(t){jt(L({putSortable:O,cloneEl:S,targetEl:f,rootEl:_,oldIndex:fe,oldDraggableIndex:we,newIndex:F,newDraggableIndex:ee},t))}var f,D,m,_,oe,ke,S,Q,fe,F,we,ee,Me,O,he=!1,Fe=!1,Re=[],re,$,Ue,Ke,Et,_t,Ee,pe,_e,Se=!1,Xe=!1,Ye,A,Ze=[],Qe=!1,$e=[],Be=typeof document<"u",He=dt,St=me||J?"cssFloat":"float",Gt=Be&&!ft&&!dt&&"draggable"in document.createElement("div"),Dt=function(){if(!!Be){if(J)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Ct=function(e,n){var o=p(e),r=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),i=ce(e,0,n),a=ce(e,1,n),l=i&&p(i),s=a&&p(a),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(i).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(a).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===u)?"vertical":"horizontal"}return i&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=r&&o[St]==="none"||a&&o[St]==="none"&&d+c>r)?"vertical":"horizontal"},zt=function(e,n,o){var r=o?e.left:e.top,i=o?e.right:e.bottom,a=o?e.width:e.height,l=o?n.left:n.top,s=o?n.right:n.bottom,d=o?n.width:n.height;return r===l||i===s||r+a/2===l+d/2},Vt=function(e,n){var o;return Re.some(function(r){var i=r[M].options.emptyInsertThreshold;if(!(!i||Ve(r))){var a=T(r),l=e>=a.left-i&&e<=a.right+i,s=n>=a.top-i&&n<=a.bottom+i;if(l&&s)return o=r}}),o},Tt=function(e){function n(i,a){return function(l,s,d,c){var u=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(i==null&&(a||u))return!0;if(i==null||i===!1)return!1;if(a&&i==="clone")return i;if(typeof i=="function")return n(i(l,s,d,c),a)(l,s,d,c);var h=(a?l:s).options.group.name;return i===!0||typeof i=="string"&&i===h||i.join&&i.indexOf(h)>-1}}var o={},r=e.group;(!r||Pe(r)!="object")&&(r={name:r}),o.name=r.name,o.checkPull=n(r.pull,!0),o.checkPut=n(r.put),o.revertClone=r.revertClone,e.group=o},Ot=function(){!Dt&&m&&p(m,"display","none")},At=function(){!Dt&&m&&p(m,"display","")};Be&&!ft&&document.addEventListener("click",function(t){if(Fe)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Fe=!1,!1},!0);var ie=function(e){if(f){e=e.touches?e.touches[0]:e;var n=Vt(e.clientX,e.clientY);if(n){var o={};for(var r in e)e.hasOwnProperty(r)&&(o[r]=e[r]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[M]._onDragOver(o)}}},Jt=function(e){f&&f.parentNode[M]._isOutsideThisEl(e.target)};function g(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=z({},e),t[M]=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 Ct(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(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:g.supportPointer!==!1&&"PointerEvent"in window&&!ve,emptyInsertThreshold:5};ye.initializePlugins(this,t,n);for(var o in n)!(o in e)&&(e[o]=n[o]);Tt(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:Gt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?w(t,"pointerdown",this._onTapStart):(w(t,"mousedown",this._onTapStart),w(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(w(t,"dragover",this),w(t,"dragenter",this)),Re.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),z(this,Bt())}g.prototype={constructor:g,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(pe=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,f):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var n=this,o=this.el,r=this.options,i=r.preventOnFilter,a=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(l||e).target,d=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=r.filter;if(nn(o),!f&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||r.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&ve&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=j(s,r.draggable,o,!1),!(s&&s.animated)&&ke!==s)){if(fe=Y(s),we=Y(s,r.draggable),typeof c=="function"){if(c.call(this,e,s,this)){I({sortable:n,rootEl:d,name:"filter",targetEl:s,toEl:o,fromEl:o}),N("filter",n,{evt:e}),i&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=j(d,u.trim(),o,!1),u)return I({sortable:n,rootEl:u,name:"filter",targetEl:s,fromEl:o,toEl:o}),N("filter",n,{evt:e}),!0}),c)){i&&e.cancelable&&e.preventDefault();return}r.handle&&!j(d,r.handle,o,!1)||this._prepareDragStart(e,l,s)}}},_prepareDragStart:function(e,n,o){var r=this,i=r.el,a=r.options,l=i.ownerDocument,s;if(o&&!f&&o.parentNode===i){var d=T(o);if(_=i,f=o,D=f.parentNode,oe=f.nextSibling,ke=o,Me=a.group,g.dragged=f,re={target:f,clientX:(n||e).clientX,clientY:(n||e).clientY},Et=re.clientX-d.left,_t=re.clientY-d.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,f.style["will-change"]="all",s=function(){if(N("delayEnded",r,{evt:e}),g.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!ct&&r.nativeDraggable&&(f.draggable=!0),r._triggerDragStart(e,n),I({sortable:r,name:"choose",originalEvent:e}),k(f,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){gt(f,c.trim(),et)}),w(l,"dragover",ie),w(l,"mousemove",ie),w(l,"touchmove",ie),w(l,"mouseup",r._onDrop),w(l,"touchend",r._onDrop),w(l,"touchcancel",r._onDrop),ct&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),N("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(me||J))){if(g.eventCanceled){this._onDrop();return}w(l,"mouseup",r._disableDelayedDrag),w(l,"touchend",r._disableDelayedDrag),w(l,"touchcancel",r._disableDelayedDrag),w(l,"mousemove",r._delayedDragTouchMoveHandler),w(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&w(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;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(){f&&et(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._disableDelayedDrag),b(e,"touchend",this._disableDelayedDrag),b(e,"touchcancel",this._disableDelayedDrag),b(e,"mousemove",this._delayedDragTouchMoveHandler),b(e,"touchmove",this._delayedDragTouchMoveHandler),b(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?w(document,"pointermove",this._onTouchMove):n?w(document,"touchmove",this._onTouchMove):w(document,"mousemove",this._onTouchMove):(w(f,"dragend",this),w(_,"dragstart",this._onDragStart));try{document.selection?je(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(he=!1,_&&f){N("dragStarted",this,{evt:n}),this.nativeDraggable&&w(document,"dragover",Jt);var o=this.options;!e&&k(f,o.dragClass,!1),k(f,o.ghostClass,!0),g.active=this,e&&this._appendGhost(),I({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if($){this._lastX=$.clientX,this._lastY=$.clientY,Ot();for(var e=document.elementFromPoint($.clientX,$.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint($.clientX,$.clientY),e!==n);)n=e;if(f.parentNode[M]._isOutsideThisEl(e),n)do{if(n[M]){var o=void 0;if(o=n[M]._onDragOver({clientX:$.clientX,clientY:$.clientY,target:e,rootEl:n}),o&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);At()}},_onTouchMove:function(e){if(re){var n=this.options,o=n.fallbackTolerance,r=n.fallbackOffset,i=e.touches?e.touches[0]:e,a=m&&ue(m,!0),l=m&&a&&a.a,s=m&&a&&a.d,d=He&&A&&vt(A),c=(i.clientX-re.clientX+r.x)/(l||1)+(d?d[0]-Ze[0]:0)/(l||1),u=(i.clientY-re.clientY+r.y)/(s||1)+(d?d[1]-Ze[1]:0)/(s||1);if(!g.active&&!he){if(o&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(m){a?(a.e+=c-(Ue||0),a.f+=u-(Ke||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var h="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");p(m,"webkitTransform",h),p(m,"mozTransform",h),p(m,"msTransform",h),p(m,"transform",h),Ue=c,Ke=u,$=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!m){var e=this.options.fallbackOnBody?document.body:_,n=T(f,!0,He,!0,e),o=this.options;if(He){for(A=e;p(A,"position")==="static"&&p(A,"transform")==="none"&&A!==document;)A=A.parentNode;A!==document.body&&A!==document.documentElement?(A===document&&(A=W()),n.top+=A.scrollTop,n.left+=A.scrollLeft):A=W(),Ze=vt(A)}m=f.cloneNode(!0),k(m,o.ghostClass,!1),k(m,o.fallbackClass,!0),k(m,o.dragClass,!0),p(m,"transition",""),p(m,"transform",""),p(m,"box-sizing","border-box"),p(m,"margin",0),p(m,"top",n.top),p(m,"left",n.left),p(m,"width",n.width),p(m,"height",n.height),p(m,"opacity","0.8"),p(m,"position",He?"absolute":"fixed"),p(m,"zIndex","100000"),p(m,"pointerEvents","none"),g.ghost=m,e.appendChild(m),p(m,"transform-origin",Et/parseInt(m.style.width)*100+"% "+_t/parseInt(m.style.height)*100+"%")}},_onDragStart:function(e,n){var o=this,r=e.dataTransfer,i=o.options;if(N("dragStart",this,{evt:e}),g.eventCanceled){this._onDrop();return}N("setupClone",this),g.eventCanceled||(S=wt(f),S.removeAttribute("id"),S.draggable=!1,S.style["will-change"]="",this._hideClone(),k(S,this.options.chosenClass,!1),g.clone=S),o.cloneId=je(function(){N("clone",o),!g.eventCanceled&&(o.options.removeCloneOnHide||_.insertBefore(S,f),o._hideClone(),I({sortable:o,name:"clone"}))}),!n&&k(f,i.dragClass,!0),n?(Fe=!0,o._loopId=setInterval(o._emulateDragOver,50)):(b(document,"mouseup",o._onDrop),b(document,"touchend",o._onDrop),b(document,"touchcancel",o._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(o,r,f)),w(document,"drop",o),p(f,"transform","translateZ(0)")),he=!0,o._dragStartId=je(o._dragStarted.bind(o,n,e)),w(document,"selectstart",o),Ee=!0,ve&&p(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,o=e.target,r,i,a,l=this.options,s=l.group,d=g.active,c=Me===s,u=l.sort,h=O||d,v,y=this,E=!1;if(Qe)return;function B(Ie,sn){N(Ie,y,L({evt:e,isOwner:c,axis:v?"vertical":"horizontal",revert:a,dragRect:r,targetRect:i,canSort:u,fromSortable:h,target:o,completed:P,onMove:function(Pt,un){return Le(_,n,f,r,Pt,T(Pt),e,un)},changed:H},sn))}function q(){B("dragOverAnimationCapture"),y.captureAnimationState(),y!==h&&h.captureAnimationState()}function P(Ie){return B("dragOverCompleted",{insertion:Ie}),Ie&&(c?d._hideClone():d._showClone(y),y!==h&&(k(f,O?O.options.ghostClass:d.options.ghostClass,!1),k(f,l.ghostClass,!0)),O!==y&&y!==g.active?O=y:y===g.active&&O&&(O=null),h===y&&(y._ignoreWhileAnimating=o),y.animateAll(function(){B("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(o===f&&!f.animated||o===n&&!o.animated)&&(pe=null),!l.dragoverBubble&&!e.rootEl&&o!==document&&(f.parentNode[M]._isOutsideThisEl(e.target),!Ie&&ie(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),E=!0}function H(){F=Y(f),ee=Y(f,l.draggable),I({sortable:y,name:"change",toEl:n,newIndex:F,newDraggableIndex:ee,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),o=j(o,l.draggable,n,!0),B("dragOver"),g.eventCanceled)return E;if(f.contains(e.target)||o.animated&&o.animatingX&&o.animatingY||y._ignoreWhileAnimating===o)return P(!1);if(Fe=!1,d&&!l.disabled&&(c?u||(a=D!==_):O===this||(this.lastPutMode=Me.checkPull(this,d,f,e))&&s.checkPut(this,d,f,e))){if(v=this._getDirection(e,o)==="vertical",r=T(f),B("dragOverValid"),g.eventCanceled)return E;if(a)return D=_,q(),this._hideClone(),B("revert"),g.eventCanceled||(oe?_.insertBefore(f,oe):_.appendChild(f)),P(!0);var R=Ve(n,l.draggable);if(!R||Zt(e,v,this)&&!R.animated){if(R===f)return P(!1);if(R&&n===e.target&&(o=R),o&&(i=T(o)),Le(_,n,f,r,o,i,e,!!o)!==!1)return q(),R&&R.nextSibling?n.insertBefore(f,R.nextSibling):n.appendChild(f),D=n,H(),P(!0)}else if(R&&Kt(e,v,this)){var ae=ce(n,0,l,!0);if(ae===f)return P(!1);if(o=ae,i=T(o),Le(_,n,f,r,o,i,e,!1)!==!1)return q(),n.insertBefore(f,ae),D=n,H(),P(!0)}else if(o.parentNode===n){i=T(o);var G=0,le,Te=f.parentNode!==n,X=!zt(f.animated&&f.toRect||r,o.animated&&o.toRect||i,v),Oe=v?"top":"left",te=mt(o,"top","top")||mt(f,"top","top"),Ae=te?te.scrollTop:void 0;pe!==o&&(le=i[Oe],Se=!1,Xe=!X&&l.invertSwap||Te),G=Qt(e,o,i,v,X?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Xe,pe===o);var U;if(G!==0){var se=Y(f);do se-=G,U=D.children[se];while(U&&(p(U,"display")==="none"||U===m))}if(G===0||U===o)return P(!1);pe=o,_e=G;var xe=o.nextElementSibling,ne=!1;ne=G===1;var ze=Le(_,n,f,r,o,i,e,ne);if(ze!==!1)return(ze===1||ze===-1)&&(ne=ze===1),Qe=!0,setTimeout(Ut,30),q(),ne&&!xe?n.appendChild(f):o.parentNode.insertBefore(f,ne?xe:o),te&&yt(te,0,Ae-te.scrollTop),D=f.parentNode,le!==void 0&&!Xe&&(Ye=Math.abs(le-T(o)[Oe])),H(),P(!0)}if(n.contains(f))return P(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",ie),b(document,"mousemove",ie),b(document,"touchmove",ie)},_offUpEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._onDrop),b(e,"touchend",this._onDrop),b(e,"pointerup",this._onDrop),b(e,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(e){var n=this.el,o=this.options;if(F=Y(f),ee=Y(f,o.draggable),N("drop",this,{evt:e}),D=f&&f.parentNode,F=Y(f),ee=Y(f,o.draggable),g.eventCanceled){this._nulling();return}he=!1,Xe=!1,Se=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),tt(this.cloneId),tt(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ve&&p(document.body,"user-select",""),p(f,"transform",""),e&&(Ee&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),m&&m.parentNode&&m.parentNode.removeChild(m),(_===D||O&&O.lastPutMode!=="clone")&&S&&S.parentNode&&S.parentNode.removeChild(S),f&&(this.nativeDraggable&&b(f,"dragend",this),et(f),f.style["will-change"]="",Ee&&!he&&k(f,O?O.options.ghostClass:this.options.ghostClass,!1),k(f,this.options.chosenClass,!1),I({sortable:this,name:"unchoose",toEl:D,newIndex:null,newDraggableIndex:null,originalEvent:e}),_!==D?(F>=0&&(I({rootEl:D,name:"add",toEl:D,fromEl:_,originalEvent:e}),I({sortable:this,name:"remove",toEl:D,originalEvent:e}),I({rootEl:D,name:"sort",toEl:D,fromEl:_,originalEvent:e}),I({sortable:this,name:"sort",toEl:D,originalEvent:e})),O&&O.save()):F!==fe&&F>=0&&(I({sortable:this,name:"update",toEl:D,originalEvent:e}),I({sortable:this,name:"sort",toEl:D,originalEvent:e})),g.active&&((F==null||F===-1)&&(F=fe,ee=we),I({sortable:this,name:"end",toEl:D,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),_=f=D=m=oe=S=ke=Q=re=$=Ee=F=ee=fe=we=pe=_e=O=Me=g.dragged=g.ghost=g.clone=g.active=null,$e.forEach(function(e){e.checked=!0}),$e.length=Ue=Ke=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":f&&(this._onDragOver(e),qt(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,o=this.el.children,r=0,i=o.length,a=this.options;r<i;r++)n=o[r],j(n,a.draggable,this.el,!1)&&e.push(n.getAttribute(a.dataIdAttr)||tn(n));return e},sort:function(e,n){var o={},r=this.el;this.toArray().forEach(function(i,a){var l=r.children[a];j(l,this.options.draggable,r,!1)&&(o[i]=l)},this),n&&this.captureAnimationState(),e.forEach(function(i){o[i]&&(r.removeChild(o[i]),r.appendChild(o[i]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return j(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var o=this.options;if(n===void 0)return o[e];var r=ye.modifyOption(this,e,n);typeof r<"u"?o[e]=r:o[e]=n,e==="group"&&Tt(o)},destroy:function(){N("destroy",this);var e=this.el;e[M]=null,b(e,"mousedown",this._onTapStart),b(e,"touchstart",this._onTapStart),b(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(e,"dragover",this),b(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Re.splice(Re.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Q){if(N("hideClone",this),g.eventCanceled)return;p(S,"display","none"),this.options.removeCloneOnHide&&S.parentNode&&S.parentNode.removeChild(S),Q=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Q){if(N("showClone",this),g.eventCanceled)return;f.parentNode==_&&!this.options.group.revertClone?_.insertBefore(S,f):oe?_.insertBefore(S,oe):_.appendChild(S),this.options.group.revertClone&&this.animate(f,S),p(S,"display",""),Q=!1}}};function qt(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Le(t,e,n,o,r,i,a,l){var s,d=t[M],c=d.options.onMove,u;return window.CustomEvent&&!J&&!me?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=r||e,s.relatedRect=i||T(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),c&&(u=c.call(d,s,a)),u}function et(t){t.draggable=!1}function Ut(){Qe=!1}function Kt(t,e,n){var o=T(ce(n.el,0,n.options,!0)),r=10;return e?t.clientX<o.left-r||t.clientY<o.top&&t.clientX<o.right:t.clientY<o.top-r||t.clientY<o.bottom&&t.clientX<o.left}function Zt(t,e,n){var o=T(Ve(n.el,n.options.draggable)),r=10;return e?t.clientX>o.right+r||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+r}function Qt(t,e,n,o,r,i,a,l){var s=o?t.clientY:t.clientX,d=o?n.height:n.width,c=o?n.top:n.left,u=o?n.bottom:n.right,h=!1;if(!a){if(l&&Ye<d*r){if(!Se&&(_e===1?s>c+d*i/2:s<u-d*i/2)&&(Se=!0),Se)h=!0;else if(_e===1?s<c+Ye:s>u-Ye)return-_e}else if(s>c+d*(1-r)/2&&s<u-d*(1-r)/2)return en(e)}return h=h||a,h&&(s<c+d*i/2||s>u-d*i/2)?s>c+d/2?1:-1:0}function en(t){return Y(f)<Y(t)?1:-1}function tn(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 nn(t){$e.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&$e.push(o)}}function je(t){return setTimeout(t,0)}function tt(t){return clearTimeout(t)}Be&&w(document,"touchmove",function(t){(g.active||he)&&t.cancelable&&t.preventDefault()}),g.utils={on:w,off:b,css:p,find:gt,is:function(e,n){return!!j(e,n,e,!1)},extend:Yt,throttle:bt,closest:j,toggleClass:k,clone:wt,index:Y,nextTick:je,cancelNextTick:tt,detectDirection:Ct,getChild:ce},g.get=function(t){return t[M]},g.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(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(g.utils=L(L({},g.utils),o.utils)),ye.mount(o)})},g.create=function(t,e){return new g(t,e)},g.version=Ft;var C=[],De,nt,ot=!1,rt,it,We,Ce;function on(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(n){var o=n.originalEvent;this.sortable.nativeDraggable?w(document,"dragover",this._handleAutoScroll):this.options.supportPointer?w(document,"pointermove",this._handleFallbackAutoScroll):o.touches?w(document,"touchmove",this._handleFallbackAutoScroll):w(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var o=n.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),xt(),Ge(),$t()},nulling:function(){We=nt=De=ot=Ce=rt=it=null,C.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,o){var r=this,i=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(i,a);if(We=n,o||this.options.forceAutoScrollFallback||me||J||ve){at(n,this.options,l,o);var s=Z(l,!0);ot&&(!Ce||i!==rt||a!==it)&&(Ce&&xt(),Ce=setInterval(function(){var d=Z(document.elementFromPoint(i,a),!0);d!==s&&(s=d,Ge()),at(n,r.options,d,o)},10),rt=i,it=a)}else{if(!this.options.bubbleScroll||Z(l,!0)===W()){Ge();return}at(n,this.options,Z(l,!1),!1)}}},z(t,{pluginName:"scroll",initializeByDefault:!0})}function Ge(){C.forEach(function(t){clearInterval(t.pid)}),C=[]}function xt(){clearInterval(Ce)}var at=bt(function(t,e,n,o){if(!!e.scroll){var r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,s=W(),d=!1,c;nt!==n&&(nt=n,Ge(),De=e.scroll,c=e.scrollFn,De===!0&&(De=Z(n,!0)));var u=0,h=De;do{var v=h,y=T(v),E=y.top,B=y.bottom,q=y.left,P=y.right,H=y.width,R=y.height,ae=void 0,G=void 0,le=v.scrollWidth,Te=v.scrollHeight,X=p(v),Oe=v.scrollLeft,te=v.scrollTop;v===s?(ae=H<le&&(X.overflowX==="auto"||X.overflowX==="scroll"||X.overflowX==="visible"),G=R<Te&&(X.overflowY==="auto"||X.overflowY==="scroll"||X.overflowY==="visible")):(ae=H<le&&(X.overflowX==="auto"||X.overflowX==="scroll"),G=R<Te&&(X.overflowY==="auto"||X.overflowY==="scroll"));var Ae=ae&&(Math.abs(P-r)<=a&&Oe+H<le)-(Math.abs(q-r)<=a&&!!Oe),U=G&&(Math.abs(B-i)<=a&&te+R<Te)-(Math.abs(E-i)<=a&&!!te);if(!C[u])for(var se=0;se<=u;se++)C[se]||(C[se]={});(C[u].vx!=Ae||C[u].vy!=U||C[u].el!==v)&&(C[u].el=v,C[u].vx=Ae,C[u].vy=U,clearInterval(C[u].pid),(Ae!=0||U!=0)&&(d=!0,C[u].pid=setInterval(function(){o&&this.layer===0&&g.active._onTouchMove(We);var xe=C[this.layer].vy?C[this.layer].vy*l:0,ne=C[this.layer].vx?C[this.layer].vx*l:0;typeof c=="function"&&c.call(g.dragged.parentNode[M],ne,xe,t,We,C[this.layer].el)!=="continue"||yt(C[this.layer].el,ne,xe)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&h!==s&&(h=Z(h,!1)));ot=d}},30),It=function(e){var n=e.originalEvent,o=e.putSortable,r=e.dragEl,i=e.activeSortable,a=e.dispatchSortableEvent,l=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(!!n){var d=o||i;l();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,u=document.elementFromPoint(c.clientX,c.clientY);s(),d&&!d.el.contains(u)&&(a("spill"),this.onSpill({dragEl:r,putSortable:o}))}};function lt(){}lt.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var r=ce(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(n,r):this.sortable.el.appendChild(n),this.sortable.animateAll(),o&&o.animateAll()},drop:It},z(lt,{pluginName:"revertOnSpill"});function st(){}st.prototype={onSpill:function(e){var n=e.dragEl,o=e.putSortable,r=o||this.sortable;r.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),r.animateAll()},drop:It},z(st,{pluginName:"removeOnSpill"}),g.mount(new on),g.mount(st,lt);const ge={name:"CommonTable",props:{columns:{type:Array,default(){return[]},validator:t=>Array.isArray(t),required:!0},config:{type:Object,default(){return{}}},modelValue:{type:Array,default(){return[]},validator:t=>Array.isArray(t)},drag:{type:Boolean,default:!1},options:{type:Object,default(){return{}},validator:t=>typeof t=="object"}},emits:["update:modelValue","select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],data(){return{tableKey:1,id:"sortTable"+new Date().getTime()}},methods:{init(){let t=this,e=Object.assign({group:{name:"group",pull:!0,put:!1},sort:this.drag,delay:0,delayOnTouchOnly:!1,touchStartThreshold:0,disabled:this.drag,store:null,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",handle:".el-table__row",preventOnFilter:!0,draggable:".el-table__row",dragClass:"el-table__row",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:1,direction:"horizontal",forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,dragoverBubble:!1,removeCloneOnHide:!0,emptyInsertThreshold:5,onEnd:({newIndex:o,oldIndex:r})=>{const i=[...t.modelValue];i.splice(o,0,i.splice(r,1)[0]),o!==r&&(t.tableKey++,t.$emit("update:modelValue",i))}},this.depCopy(this.options,["onEnd","onClone","onChange"]));const n=document.querySelector(`#${this.id} .el-table__body-wrapper tbody`);g.create(n,e)},renderElement(){let t=this.modelValue,{columns:e,config:n,id:o,tableKey:r}=this,i={stripe:!1,border:!1,fit:!0,"show-header":!0,"highlight-current-row":!1,"empty-text":"\u6682\u65E0\u6570\u636E","default-expand-all":!1,"default-sort":{order:"ascending"},"show-summary":!1,"sum-text":"\u5408\u8BA1","select-on-indeterminate":!0,indent:16,"tree-props":{hasChildren:"hasChildren",children:"children"},ref:"baseTableJsx"},a=n.slots,l=this.depCopy(n,["slots","ref"]),d={...Object.assign(i,l)};return x.createVNode("div",{id:o,class:o},[x.createVNode(x.resolveComponent("el-table"),x.mergeProps({data:t,onSelectAll:()=>{this.selectAll()},onSelect:(c,u)=>{this.select(c,u)},onCellMouseEnter:(c,u,h,v)=>{this.cellMouseEnter(c,u,h,v)},onSelectionChange:c=>{this.selectionChange(c)},onCellMouseLeave:(c,u,h,v)=>{this.cellMouseLeave(c,u,h,v)},onCellClick:(c,u,h,v)=>{this.cellClick(c,u,h,v)},onCellDblclick:(c,u,h,v)=>{this.cellDblclick(c,u,h,v)},onRowClick:(c,u,h)=>{this.rowClick(c,u,h)},onRowContextmenu:(c,u,h)=>{this.rowContextmenu(c,u,h)},onRowDblclick:(c,u,h)=>{this.rowDblclick(c,u,h)},onHeaderClick:(c,u)=>{this.headerClick(c,u)},onHeaderContextmenu:(c,u)=>{this.headerContextmenu(c,u)},onSortChange:({column:c,prop:u,order:h})=>{this.sortChange({column:c,prop:u,order:h})},onFilterChange:c=>{this.filterChange(c)},onCurrentChange:(c,u)=>{this.currentChange(c,u)},obHeaderDragend:(c,u,h,v)=>{this.headerDragend(c,u,h,v)},onExpandChange:(c,u)=>{this.expandChange(c,u)}},d,{key:r}),{default:()=>[e.map((c,u)=>this.recursion(c,u))],...a})])},recursion(t,e){let n=this.depCopy(t,["scopedSlots"]),o=t.scopedSlots,r={...n};return this.isArray(t.children)?x.createVNode(x.resolveComponent("el-table-column"),x.mergeProps(r,{key:e}),{default:()=>[t.children.map((i,a)=>this.recursion(i,a))],...o}):x.createVNode(x.resolveComponent("el-table-column"),x.mergeProps(r,{key:e}),o)},isArray(t){return t&&Array.isArray(t)&&t.length>0},depCopy(t,e=[]){Array.isArray(e)||(e=[]);let n={};for(let o in t)e.includes(o)||(n[o]=t[o]);return n},select(t,e){this.$emit("select",t,e)},selectAll(){this.$emit("select-all")},selectionChange(t){this.$emit("selection-change",t)},cellMouseEnter(t,e,n,o){this.$emit("cell-mouse-enter",t,e,n,o)},cellMouseLeave(t,e,n,o){this.$emit("cell-mouse-leave",t,e,n,o)},cellClick(t,e,n,o){this.$emit("cell-click",t,e,n,o)},cellDblclick(t,e,n,o){this.$emit("cell-dblclick",t,e,n,o)},rowClick(t,e,n){this.$emit("row-click",t,e,n)},rowContextmenu(t,e,n){this.$emit("row-contextmenu",t,e,n)},rowDblclick(t,e,n){this.$emit("row-dblclick",t,e,n)},headerClick(t,e){this.$emit("header-click",t,e)},headerContextmenu(t,e){this.$emit("header-contextmenu",t,e)},sortChange({column:t,prop:e,order:n}){this.$emit("sort-change",{column:t,prop:e,order:n})},filterChange(t){this.$emit("filter-change",t)},currentChange(t,e){this.$emit("current-change",t,e)},headerDragend(t,e,n,o){this.$emit("header-dragend",t,e,n,o)},expandChange(t,e){this.$emit("expand-change",t,e)},clearSelection(){this.$refs.baseTableJsx.clearSelection()},toggleRowSelection(t,e){this.$refs.baseTableJsx.toggleRowSelection(t,e)},toggleAllSelection(){this.$refs.baseTableJsx.toggleAllSelection()},toggleRowExpansion(t,e){this.$refs.baseTableJsx.toggleRowExpansion(t,e)},setCurrentRow(t){this.$refs.baseTableJsx.setCurrentRow(t)},clearSort(){this.$refs.baseTableJsx.clearSort()},clearFilter(t){this.$refs.baseTableJsx.clearFilter(t)},doLayout(){this.$refs.baseTableJsx.doLayout()},sort(t,e){this.$refs.baseTableJsx.sort(t,e)}},render(){return x.nextTick(()=>{this.init()}),this.renderElement()}};ge.install=function(t){t.component(ge.name,ge)};const rn=[ge];function an(t){rn.forEach(e=>{t.component(e.name,e)})}const ln={install:an,CommonTable:ge};K.CommonTable=ge,K.default=ln,Object.defineProperties(K,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});

2

package.json
{
"name": "rework-table",
"version": "2.0.3",
"version": "2.0.4",
"description": "这是对el-table表格的二次封装",

@@ -5,0 +5,0 @@ "keywords": [

# CommonTable
该组件采用jsx写法;对于组件的插槽放在config.slots;及作用域插槽放在scopedSlots中 由于jsx写法;
在vue2.x中通过config.on的方式调用组件传出的事件;不能再在组件上绑定传出的事件;否则会报错
在vue2.x中通过config.on的方式调用组件传出的事件;不能再在组件上绑定传出的事件;否则会报错;
包2.0以上适合vue3.x ;2.0以下适合vue2.x

@@ -16,3 +16,4 @@

|config|table除data外其他的配置|`Object`|`false`|{}|
|options|对拖拽table的配置;具体查看sortablejs的options|`Object`|`false`|{}|
|drag|配置table是否开启拖拽,2.0.4版本以上的才有该属性|`Boolean`|`false`|false|
|options|对拖拽table的详细配置;具体查看sortablejs的options|`Object`|`false`|{}|

@@ -54,3 +55,4 @@ <!-- @vuese:CommonTable:props:end -->

## 例子
* 安装 npm install rework-table sortablejs -D
* 使用
# import CommonTable from "rework-table"

@@ -99,2 +101,3 @@

label:'姓名',
props:'name',
scopedSlots:{

@@ -124,2 +127,14 @@ heander:(props)=>{

}, //表格列作用域插槽写法 距离是该组件有一个header的作用域插槽 vue3.x写法 只在vue3.x生效
children:[
{
label:'性别',
props:'sex',
...
},
{
label:'年龄',
props:'age',
...
}
], //vue3.x中才有该属性,用于多级表头
}

@@ -126,0 +141,0 @@ ],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc