@mineadmin/pro-table
Version:
基于 @mineadmin/table、@mineadmin/search 封装的加强型表格组件
6 lines • 65.7 kB
JavaScript
(function(ee,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],a):a((ee=typeof globalThis<"u"?globalThis:ee||self).MaTable={},ee.Vue,ee.ElementPlus)})(this,function(ee,a,Ye){"use strict";var io=Object.defineProperty;var lo=(ee,a,Ye)=>a in ee?io(ee,a,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):ee[a]=Ye;var Yt=(ee,a,Ye)=>lo(ee,typeof a!="symbol"?a+"":a,Ye);const we=e=>!!(e&&e.constructor&&e.call&&e.apply),qt=(e,t,n=!1)=>e?e.slice().sort(n===!0?(o,r)=>t(r)-t(o):(o,r)=>t(o)-t(r)):[];function xt(e){return typeof e=="function"?e():a.unref(e)}const Sn=typeof window<"u"&&typeof document<"u";function Cn(e,t=!0,n){a.getCurrentInstance()?a.onMounted(e,n):t?e():a.nextTick(e)}typeof WorkerGlobalScope<"u"&&WorkerGlobalScope;const Tn=Sn?window.document:void 0;/**!
* Sortable 1.15.2
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/function $t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$t(Object(n),!0).forEach(function(o){xn(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Et(e){return Et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(e)}function xn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(){return ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ke.apply(this,arguments)}function En(e,t){if(e==null)return{};var n,o,r=function(l,u){if(l==null)return{};var d,v,c={},b=Object.keys(l);for(v=0;v<b.length;v++)d=b[v],u.indexOf(d)>=0||(c[d]=l[d]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pe(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Me=Pe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ze=Pe(/Edge/i),Wt=Pe(/firefox/i),Qe=Pe(/safari/i)&&!Pe(/chrome/i)&&!Pe(/android/i),Gt=Pe(/iP(ad|od|hone)/i),Kt=Pe(/chrome/i)&&Pe(/android/i),Ut={capture:!1,passive:!1};function B(e,t,n){e.addEventListener(t,n,!Me&&Ut)}function P(e,t,n){e.removeEventListener(t,n,!Me&&Ut)}function st(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Nn(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Ce(e,t,n,o){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&st(e,t):st(e,t))||o&&e===n)return e;if(e===n)break}while(e=Nn(e))}return null}var et,Jt=/\s+/g;function pe(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(Jt," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(Jt," ")}}function S(e,t,n){var o=e&&e.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];t in o||t.indexOf("webkit")!==-1||(t="-webkit-"+t),o[t]=n+(typeof n=="string"?"":"px")}}function qe(e,t){var n="";if(typeof e=="string")n=e;else do{var o=S(e,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function Zt(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,i=o.length;if(n)for(;r<i;r++)n(o[r],r);return o}return[]}function _e(){var e=document.scrollingElement;return e||document.documentElement}function W(e,t,n,o,r){if(e.getBoundingClientRect||e===window){var i,l,u,d,v,c,b;if(e!==window&&e.parentNode&&e!==_e()?(l=(i=e.getBoundingClientRect()).top,u=i.left,d=i.bottom,v=i.right,c=i.height,b=i.width):(l=0,u=0,d=window.innerHeight,v=window.innerWidth,c=window.innerHeight,b=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!Me))do if(r&&r.getBoundingClientRect&&(S(r,"transform")!=="none"||n&&S(r,"position")!=="static")){var _=r.getBoundingClientRect();l-=_.top+parseInt(S(r,"border-top-width")),u-=_.left+parseInt(S(r,"border-left-width")),d=l+i.height,v=u+i.width;break}while(r=r.parentNode);if(o&&e!==window){var w=qe(r||e),z=w&&w.a,M=w&&w.d;w&&(d=(l/=M)+(c/=M),v=(u/=z)+(b/=z))}return{top:l,left:u,bottom:d,right:v,width:b,height:c}}}function Qt(e,t,n){for(var o=Ie(e,!0),r=W(e)[t];o;){if(!(r>=W(o)[n]))return o;if(o===_e())break;o=Ie(o,!1)}return!1}function $e(e,t,n,o){for(var r=0,i=0,l=e.children;i<l.length;){if(l[i].style.display!=="none"&&l[i]!==C.ghost&&(o||l[i]!==C.dragged)&&Ce(l[i],n.draggable,e,!1)){if(r===t)return l[i];r++}i++}return null}function Nt(e,t){for(var n=e.lastElementChild;n&&(n===C.ghost||S(n,"display")==="none"||t&&!st(n,t));)n=n.previousElementSibling;return n||null}function ye(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()==="TEMPLATE"||e===C.clone||t&&!st(e,t)||n++;return n}function en(e){var t=0,n=0,o=_e();if(e)do{var r=qe(e),i=r.a,l=r.d;t+=e.scrollLeft*i,n+=e.scrollTop*l}while(e!==o&&(e=e.parentNode));return[t,n]}function Ie(e,t){if(!e||!e.getBoundingClientRect)return _e();var n=e,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=S(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 _e();if(o||t)return n;o=!0}}while(n=n.parentNode);return _e()}function _t(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function tn(e,t){return function(){if(!et){var n=arguments;n.length===1?e.call(this,n[0]):e.apply(this,n),et=setTimeout(function(){et=void 0},t)}}}function nn(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function on(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function rn(e,t,n){var o={};return Array.from(e.children).forEach(function(r){var i,l,u,d;if(Ce(r,t.draggable,e,!1)&&!r.animated&&r!==n){var v=W(r);o.left=Math.min((i=o.left)!==null&&i!==void 0?i:1/0,v.left),o.top=Math.min((l=o.top)!==null&&l!==void 0?l:1/0,v.top),o.right=Math.max((u=o.right)!==null&&u!==void 0?u:-1/0,v.right),o.bottom=Math.max((d=o.bottom)!==null&&d!==void 0?d:-1/0,v.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var fe="Sortable"+new Date().getTime();function _n(){var e,t=[];return{captureAnimationState:function(){t=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(n){if(S(n,"display")!=="none"&&n!==C.ghost){t.push({target:n,rect:W(n)});var o=Ne({},t[t.length-1].rect);if(n.thisAnimationDuration){var r=qe(n,!0);r&&(o.top-=r.f,o.left-=r.e)}n.fromRect=o}})},addAnimationState:function(n){t.push(n)},removeAnimationState:function(n){t.splice(function(o,r){for(var i in o)if(o.hasOwnProperty(i)){for(var l in r)if(r.hasOwnProperty(l)&&r[l]===o[i][l])return Number(i)}return-1}(t,{target:n}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(e),void(typeof n=="function"&&n());var r=!1,i=0;t.forEach(function(l){var u=0,d=l.target,v=d.fromRect,c=W(d),b=d.prevFromRect,_=d.prevToRect,w=l.rect,z=qe(d,!0);z&&(c.top-=z.f,c.left-=z.e),d.toRect=c,d.thisAnimationDuration&&_t(b,c)&&!_t(v,c)&&(w.top-c.top)/(w.left-c.left)==(v.top-c.top)/(v.left-c.left)&&(u=function(M,O,Z,ve){return Math.sqrt(Math.pow(O.top-M.top,2)+Math.pow(O.left-M.left,2))/Math.sqrt(Math.pow(O.top-Z.top,2)+Math.pow(O.left-Z.left,2))*ve.animation}(w,b,_,o.options)),_t(c,v)||(d.prevFromRect=v,d.prevToRect=c,u||(u=o.options.animation),o.animate(d,w,c,u)),u&&(r=!0,i=Math.max(i,u),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},u),d.thisAnimationDuration=u)}),clearTimeout(e),r?e=setTimeout(function(){typeof n=="function"&&n()},i):typeof n=="function"&&n(),t=[]},animate:function(n,o,r,i){if(i){S(n,"transition",""),S(n,"transform","");var l=qe(this.el),u=l&&l.a,d=l&&l.d,v=(o.left-r.left)/(u||1),c=(o.top-r.top)/(d||1);n.animatingX=!!v,n.animatingY=!!c,S(n,"transform","translate3d("+v+"px,"+c+"px,0)"),this.forRepaintDummy=function(b){return b.offsetWidth}(n),S(n,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),S(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){S(n,"transition",""),S(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},i)}}}}var We=[],Dt={initializeByDefault:!0},tt={mount:function(e){for(var t in Dt)Dt.hasOwnProperty(t)&&!(t in e)&&(e[t]=Dt[t]);We.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),We.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=e+"Global";We.forEach(function(i){t[i.pluginName]&&(t[i.pluginName][r]&&t[i.pluginName][r](Ne({sortable:t},n)),t.options[i.pluginName]&&t[i.pluginName][e]&&t[i.pluginName][e](Ne({sortable:t},n)))})},initializePlugins:function(e,t,n,o){for(var r in We.forEach(function(l){var u=l.pluginName;if(e.options[u]||l.initializeByDefault){var d=new l(e,t,e.options);d.sortable=e,d.options=e.options,e[u]=d,ke(n,d.defaults)}}),e.options)if(e.options.hasOwnProperty(r)){var i=this.modifyOption(e,r,e.options[r]);i!==void 0&&(e.options[r]=i)}},getEventProperties:function(e,t){var n={};return We.forEach(function(o){typeof o.eventProperties=="function"&&ke(n,o.eventProperties.call(t[o.pluginName],e))}),n},modifyOption:function(e,t,n){var o;return We.forEach(function(r){e[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[t]=="function"&&(o=r.optionListeners[t].call(e[r.pluginName],n))}),o}},Dn=["evt"],ce=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.evt,r=En(n,Dn);tt.pluginEvent.bind(C)(e,t,Ne({dragEl:f,parentEl:X,ghostEl:x,rootEl:L,nextEl:ze,lastDownEl:ct,cloneEl:Y,cloneHidden:Ae,dragStarted:ot,putSortable:J,activeSortable:C.active,originalEvent:o,oldIndex:Ge,oldDraggableIndex:nt,newIndex:me,newDraggableIndex:Ve,hideGhostForTarget:hn,unhideGhostForTarget:pn,cloneNowHidden:function(){Ae=!0},cloneNowShown:function(){Ae=!1},dispatchSortableEvent:function(i){re({sortable:t,name:i,originalEvent:o})}},r))};function re(e){(function(t){var n=t.sortable,o=t.rootEl,r=t.name,i=t.targetEl,l=t.cloneEl,u=t.toEl,d=t.fromEl,v=t.oldIndex,c=t.newIndex,b=t.oldDraggableIndex,_=t.newDraggableIndex,w=t.originalEvent,z=t.putSortable,M=t.extraEventProperties;if(n=n||o&&o[fe]){var O,Z=n.options,ve="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||Me||Ze?(O=document.createEvent("Event")).initEvent(r,!0,!0):O=new CustomEvent(r,{bubbles:!0,cancelable:!0}),O.to=u||o,O.from=d||o,O.item=i||o,O.clone=l,O.oldIndex=v,O.newIndex=c,O.oldDraggableIndex=b,O.newDraggableIndex=_,O.originalEvent=w,O.pullMode=z?z.lastPutMode:void 0;var ne=Ne(Ne({},M),tt.getEventProperties(r,n));for(var ae in ne)O[ae]=ne[ae];o&&o.dispatchEvent(O),Z[ve]&&Z[ve].call(n,O)}})(Ne({putSortable:J,cloneEl:Y,targetEl:f,rootEl:L,oldIndex:Ge,oldDraggableIndex:nt,newIndex:me,newDraggableIndex:Ve},e))}var f,X,x,L,ze,ct,Y,Ae,Ge,me,nt,Ve,ut,J,Le,Te,Ot,kt,an,ln,ot,Ke,rt,dt,te,Ue=!1,ht=!1,pt=[],at=!1,ft=!1,Pt=[],Mt=!1,mt=[],vt=typeof document<"u",gt=Gt,sn=Ze||Me?"cssFloat":"float",On=vt&&!Kt&&!Gt&&"draggable"in document.createElement("div"),cn=function(){if(vt){if(Me)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),un=function(e,t){var n=S(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=$e(e,0,t),i=$e(e,1,t),l=r&&S(r),u=i&&S(i),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+W(r).width,v=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+W(i).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var c=l.float==="left"?"left":"right";return!i||u.clear!=="both"&&u.clear!==c?"horizontal":"vertical"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=o&&n[sn]==="none"||i&&n[sn]==="none"&&d+v>o)?"vertical":"horizontal"},dn=function(e){function t(r,i){return function(l,u,d,v){var c=l.options.group.name&&u.options.group.name&&l.options.group.name===u.options.group.name;if(r==null&&(i||c))return!0;if(r==null||r===!1)return!1;if(i&&r==="clone")return r;if(typeof r=="function")return t(r(l,u,d,v),i)(l,u,d,v);var b=(i?l:u).options.group.name;return r===!0||typeof r=="string"&&r===b||r.join&&r.indexOf(b)>-1}}var n={},o=e.group;o&&Et(o)=="object"||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},hn=function(){!cn&&x&&S(x,"display","none")},pn=function(){!cn&&x&&S(x,"display","")};vt&&!Kt&&document.addEventListener("click",function(e){if(ht)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ht=!1,!1},!0);var Xe=function(e){if(f){e=e.touches?e.touches[0]:e;var t=(r=e.clientX,i=e.clientY,pt.some(function(u){var d=u[fe].options.emptyInsertThreshold;if(d&&!Nt(u)){var v=W(u),c=r>=v.left-d&&r<=v.right+d,b=i>=v.top-d&&i<=v.bottom+d;return c&&b?l=u:void 0}}),l);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[fe]._onDragOver(n)}}var r,i,l},kn=function(e){f&&f.parentNode[fe]._isOutsideThisEl(e.target)};function C(e,t){if(!e||!e.nodeType||e.nodeType!==1)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=ke({},t),e[fe]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return un(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,l){i.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:C.supportPointer!==!1&&"PointerEvent"in window&&!Qe,emptyInsertThreshold:5};for(var o in tt.initializePlugins(this,e,n),n)!(o in t)&&(t[o]=n[o]);for(var r in dn(t),this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=!t.forceFallback&&On,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?B(e,"pointerdown",this._onTapStart):(B(e,"mousedown",this._onTapStart),B(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(B(e,"dragover",this),B(e,"dragenter",this)),pt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),ke(this,_n())}function bt(e,t,n,o,r,i,l,u){var d,v,c=e[fe],b=c.options.onMove;return!window.CustomEvent||Me||Ze?(d=document.createEvent("Event")).initEvent("move",!0,!0):d=new CustomEvent("move",{bubbles:!0,cancelable:!0}),d.to=t,d.from=e,d.dragged=n,d.draggedRect=o,d.related=r||t,d.relatedRect=i||W(t),d.willInsertAfter=u,d.originalEvent=l,e.dispatchEvent(d),b&&(v=b.call(c,d,l)),v}function Rt(e){e.draggable=!1}function Pn(){Mt=!1}function Mn(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function wt(e){return setTimeout(e,0)}function It(e){return clearTimeout(e)}C.prototype={constructor:C,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(Ke=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,f):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,i=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(l||e).target,d=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,v=o.filter;if(function(c){mt.length=0;for(var b=c.getElementsByTagName("input"),_=b.length;_--;){var w=b[_];w.checked&&mt.push(w)}}(n),!f&&!(/mousedown|pointerdown/.test(i)&&e.button!==0||o.disabled)&&!d.isContentEditable&&(this.nativeDraggable||!Qe||!u||u.tagName.toUpperCase()!=="SELECT")&&!((u=Ce(u,o.draggable,n,!1))&&u.animated||ct===u)){if(Ge=ye(u),nt=ye(u,o.draggable),typeof v=="function"){if(v.call(this,e,u,this))return re({sortable:t,rootEl:d,name:"filter",targetEl:u,toEl:n,fromEl:n}),ce("filter",t,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(v&&(v=v.split(",").some(function(c){if(c=Ce(d,c.trim(),n,!1))return re({sortable:t,rootEl:c,name:"filter",targetEl:u,fromEl:n,toEl:n}),ce("filter",t,{evt:e}),!0})))return void(r&&e.cancelable&&e.preventDefault());o.handle&&!Ce(d,o.handle,n,!1)||this._prepareDragStart(e,l,u)}}},_prepareDragStart:function(e,t,n){var o,r=this,i=r.el,l=r.options,u=i.ownerDocument;if(n&&!f&&n.parentNode===i){var d=W(n);if(L=i,X=(f=n).parentNode,ze=f.nextSibling,ct=n,ut=l.group,C.dragged=f,Le={target:f,clientX:(t||e).clientX,clientY:(t||e).clientY},an=Le.clientX-d.left,ln=Le.clientY-d.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,f.style["will-change"]="all",o=function(){ce("delayEnded",r,{evt:e}),C.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!Wt&&r.nativeDraggable&&(f.draggable=!0),r._triggerDragStart(e,t),re({sortable:r,name:"choose",originalEvent:e}),pe(f,l.chosenClass,!0))},l.ignore.split(",").forEach(function(v){Zt(f,v.trim(),Rt)}),B(u,"dragover",Xe),B(u,"mousemove",Xe),B(u,"touchmove",Xe),B(u,"mouseup",r._onDrop),B(u,"touchend",r._onDrop),B(u,"touchcancel",r._onDrop),Wt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),ce("delayStart",this,{evt:e}),!l.delay||l.delayOnTouchOnly&&!t||this.nativeDraggable&&(Ze||Me))o();else{if(C.eventCanceled)return void this._onDrop();B(u,"mouseup",r._disableDelayedDrag),B(u,"touchend",r._disableDelayedDrag),B(u,"touchcancel",r._disableDelayedDrag),B(u,"mousemove",r._delayedDragTouchMoveHandler),B(u,"touchmove",r._delayedDragTouchMoveHandler),l.supportPointer&&B(u,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,l.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){f&&Rt(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;P(e,"mouseup",this._disableDelayedDrag),P(e,"touchend",this._disableDelayedDrag),P(e,"touchcancel",this._disableDelayedDrag),P(e,"mousemove",this._delayedDragTouchMoveHandler),P(e,"touchmove",this._delayedDragTouchMoveHandler),P(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?B(document,"pointermove",this._onTouchMove):B(document,t?"touchmove":"mousemove",this._onTouchMove):(B(f,"dragend",this),B(L,"dragstart",this._onDragStart));try{document.selection?wt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Ue=!1,L&&f){ce("dragStarted",this,{evt:t}),this.nativeDraggable&&B(document,"dragover",kn);var n=this.options;!e&&pe(f,n.dragClass,!1),pe(f,n.ghostClass,!0),C.active=this,e&&this._appendGhost(),re({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Te){this._lastX=Te.clientX,this._lastY=Te.clientY,hn();for(var e=document.elementFromPoint(Te.clientX,Te.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Te.clientX,Te.clientY))!==t;)t=e;if(f.parentNode[fe]._isOutsideThisEl(e),t)do{if(t[fe]&&t[fe]._onDragOver({clientX:Te.clientX,clientY:Te.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);pn()}},_onTouchMove:function(e){if(Le){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,i=x&&qe(x,!0),l=x&&i&&i.a,u=x&&i&&i.d,d=gt&&te&&en(te),v=(r.clientX-Le.clientX+o.x)/(l||1)+(d?d[0]-Pt[0]:0)/(l||1),c=(r.clientY-Le.clientY+o.y)/(u||1)+(d?d[1]-Pt[1]:0)/(u||1);if(!C.active&&!Ue){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(x){i?(i.e+=v-(Ot||0),i.f+=c-(kt||0)):i={a:1,b:0,c:0,d:1,e:v,f:c};var b="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");S(x,"webkitTransform",b),S(x,"mozTransform",b),S(x,"msTransform",b),S(x,"transform",b),Ot=v,kt=c,Te=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!x){var e=this.options.fallbackOnBody?document.body:L,t=W(f,!0,gt,!0,e),n=this.options;if(gt){for(te=e;S(te,"position")==="static"&&S(te,"transform")==="none"&&te!==document;)te=te.parentNode;te!==document.body&&te!==document.documentElement?(te===document&&(te=_e()),t.top+=te.scrollTop,t.left+=te.scrollLeft):te=_e(),Pt=en(te)}pe(x=f.cloneNode(!0),n.ghostClass,!1),pe(x,n.fallbackClass,!0),pe(x,n.dragClass,!0),S(x,"transition",""),S(x,"transform",""),S(x,"box-sizing","border-box"),S(x,"margin",0),S(x,"top",t.top),S(x,"left",t.left),S(x,"width",t.width),S(x,"height",t.height),S(x,"opacity","0.8"),S(x,"position",gt?"absolute":"fixed"),S(x,"zIndex","100000"),S(x,"pointerEvents","none"),C.ghost=x,e.appendChild(x),S(x,"transform-origin",an/parseInt(x.style.width)*100+"% "+ln/parseInt(x.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,r=n.options;ce("dragStart",this,{evt:e}),C.eventCanceled?this._onDrop():(ce("setupClone",this),C.eventCanceled||((Y=on(f)).removeAttribute("id"),Y.draggable=!1,Y.style["will-change"]="",this._hideClone(),pe(Y,this.options.chosenClass,!1),C.clone=Y),n.cloneId=wt(function(){ce("clone",n),C.eventCanceled||(n.options.removeCloneOnHide||L.insertBefore(Y,f),n._hideClone(),re({sortable:n,name:"clone"}))}),!t&&pe(f,r.dragClass,!0),t?(ht=!0,n._loopId=setInterval(n._emulateDragOver,50)):(P(document,"mouseup",n._onDrop),P(document,"touchend",n._onDrop),P(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,f)),B(document,"drop",n),S(f,"transform","translateZ(0)")),Ue=!0,n._dragStartId=wt(n._dragStarted.bind(n,t,e)),B(document,"selectstart",n),ot=!0,Qe&&S(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,o,r,i=this.el,l=e.target,u=this.options,d=u.group,v=C.active,c=ut===d,b=u.sort,_=J||v,w=this,z=!1;if(!Mt){if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),l=Ce(l,u.draggable,i,!0),be("dragOver"),C.eventCanceled)return z;if(f.contains(e.target)||l.animated&&l.animatingX&&l.animatingY||w._ignoreWhileAnimating===l)return le(!1);if(ht=!1,v&&!u.disabled&&(c?b||(o=X!==L):J===this||(this.lastPutMode=ut.checkPull(this,v,f,e))&&d.checkPut(this,v,f,e))){if(r=this._getDirection(e,l)==="vertical",t=W(f),be("dragOverValid"),C.eventCanceled)return z;if(o)return X=L,xe(),this._hideClone(),be("revert"),C.eventCanceled||(ze?L.insertBefore(f,ze):L.appendChild(f)),le(!0);var M=Nt(i,u.draggable);if(!M||function(I,Q,F){var $=W(Nt(F.el,F.options.draggable)),de=rn(F.el,F.options,x),q=10;return Q?I.clientX>de.right+q||I.clientY>$.bottom&&I.clientX>$.left:I.clientY>de.bottom+q||I.clientX>$.right&&I.clientY>$.top}(e,r,this)&&!M.animated){if(M===f)return le(!1);if(M&&i===e.target&&(l=M),l&&(n=W(l)),bt(L,i,f,t,l,n,e,!!l)!==!1)return xe(),M&&M.nextSibling?i.insertBefore(f,M.nextSibling):i.appendChild(f),X=i,De(),le(!0)}else if(M&&function(I,Q,F){var $=W($e(F.el,0,F.options,!0)),de=rn(F.el,F.options,x),q=10;return Q?I.clientX<de.left-q||I.clientY<$.top&&I.clientX<$.right:I.clientY<de.top-q||I.clientY<$.bottom&&I.clientX<$.left}(e,r,this)){var O=$e(i,0,u,!0);if(O===f)return le(!1);if(n=W(l=O),bt(L,i,f,t,l,n,e,!1)!==!1)return xe(),i.insertBefore(f,O),X=i,De(),le(!0)}else if(l.parentNode===i){n=W(l);var Z,ve,ne,ae=f.parentNode!==i,Re=!function(I,Q,F){var $=F?I.left:I.top,de=F?I.right:I.bottom,q=F?I.width:I.height,He=F?Q.left:Q.top,Je=F?Q.right:Q.bottom,he=F?Q.width:Q.height;return $===He||de===Je||$+q/2===He+he/2}(f.animated&&f.toRect||t,l.animated&&l.toRect||n,r),Fe=r?"top":"left",ie=Qt(l,"top","top")||Qt(f,"top","top"),Se=ie?ie.scrollTop:void 0;if(Ke!==l&&(ve=n[Fe],at=!1,ft=!Re&&u.invertSwap||ae),Z=function(I,Q,F,$,de,q,He,Je){var he=$?I.clientY:I.clientX,Ee=$?F.height:F.width,s=$?F.top:F.left,p=$?F.bottom:F.right,h=!1;if(!He){if(Je&&dt<Ee*de){if(!at&&(rt===1?he>s+Ee*q/2:he<p-Ee*q/2)&&(at=!0),at)h=!0;else if(rt===1?he<s+dt:he>p-dt)return-rt}else if(he>s+Ee*(1-de)/2&&he<p-Ee*(1-de)/2)return function(E){return ye(f)<ye(E)?1:-1}(Q)}return(h=h||He)&&(he<s+Ee*q/2||he>p-Ee*q/2)?he>s+Ee/2?1:-1:0}(e,l,n,r,Re?1:u.swapThreshold,u.invertedSwapThreshold==null?u.swapThreshold:u.invertedSwapThreshold,ft,Ke===l),Z!==0){var K=ye(f);do K-=Z,ne=X.children[K];while(ne&&(S(ne,"display")==="none"||ne===x))}if(Z===0||ne===l)return le(!1);Ke=l,rt=Z;var ge=l.nextElementSibling,H=!1,ue=bt(L,i,f,t,l,n,e,H=Z===1);if(ue!==!1)return ue!==1&&ue!==-1||(H=ue===1),Mt=!0,setTimeout(Pn,30),xe(),H&&!ge?i.appendChild(f):l.parentNode.insertBefore(f,H?ge:l),ie&&nn(ie,0,Se-ie.scrollTop),X=f.parentNode,ve===void 0||ft||(dt=Math.abs(ve-W(l)[Fe])),De(),le(!0)}if(i.contains(f))return le(!1)}return!1}function be(I,Q){ce(I,w,Ne({evt:e,isOwner:c,axis:r?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:b,fromSortable:_,target:l,completed:le,onMove:function(F,$){return bt(L,i,f,t,F,W(F),e,$)},changed:De},Q))}function xe(){be("dragOverAnimationCapture"),w.captureAnimationState(),w!==_&&_.captureAnimationState()}function le(I){return be("dragOverCompleted",{insertion:I}),I&&(c?v._hideClone():v._showClone(w),w!==_&&(pe(f,J?J.options.ghostClass:v.options.ghostClass,!1),pe(f,u.ghostClass,!0)),J!==w&&w!==C.active?J=w:w===C.active&&J&&(J=null),_===w&&(w._ignoreWhileAnimating=l),w.animateAll(function(){be("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==_&&(_.animateAll(),_._ignoreWhileAnimating=null)),(l===f&&!f.animated||l===i&&!l.animated)&&(Ke=null),u.dragoverBubble||e.rootEl||l===document||(f.parentNode[fe]._isOutsideThisEl(e.target),!I&&Xe(e)),!u.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),z=!0}function De(){me=ye(f),Ve=ye(f,u.draggable),re({sortable:w,name:"change",toEl:i,newIndex:me,newDraggableIndex:Ve,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){P(document,"mousemove",this._onTouchMove),P(document,"touchmove",this._onTouchMove),P(document,"pointermove",this._onTouchMove),P(document,"dragover",Xe),P(document,"mousemove",Xe),P(document,"touchmove",Xe)},_offUpEvents:function(){var e=this.el.ownerDocument;P(e,"mouseup",this._onDrop),P(e,"touchend",this._onDrop),P(e,"pointerup",this._onDrop),P(e,"touchcancel",this._onDrop),P(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;me=ye(f),Ve=ye(f,n.draggable),ce("drop",this,{evt:e}),X=f&&f.parentNode,me=ye(f),Ve=ye(f,n.draggable),C.eventCanceled||(Ue=!1,ft=!1,at=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),It(this.cloneId),It(this._dragStartId),this.nativeDraggable&&(P(document,"drop",this),P(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Qe&&S(document.body,"user-select",""),S(f,"transform",""),e&&(ot&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),x&&x.parentNode&&x.parentNode.removeChild(x),(L===X||J&&J.lastPutMode!=="clone")&&Y&&Y.parentNode&&Y.parentNode.removeChild(Y),f&&(this.nativeDraggable&&P(f,"dragend",this),Rt(f),f.style["will-change"]="",ot&&!Ue&&pe(f,J?J.options.ghostClass:this.options.ghostClass,!1),pe(f,this.options.chosenClass,!1),re({sortable:this,name:"unchoose",toEl:X,newIndex:null,newDraggableIndex:null,originalEvent:e}),L!==X?(me>=0&&(re({rootEl:X,name:"add",toEl:X,fromEl:L,originalEvent:e}),re({sortable:this,name:"remove",toEl:X,originalEvent:e}),re({rootEl:X,name:"sort",toEl:X,fromEl:L,originalEvent:e}),re({sortable:this,name:"sort",toEl:X,originalEvent:e})),J&&J.save()):me!==Ge&&me>=0&&(re({sortable:this,name:"update",toEl:X,originalEvent:e}),re({sortable:this,name:"sort",toEl:X,originalEvent:e})),C.active&&(me!=null&&me!==-1||(me=Ge,Ve=nt),re({sortable:this,name:"end",toEl:X,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){ce("nulling",this),L=f=X=x=ze=Y=ct=Ae=Le=Te=ot=me=Ve=Ge=nt=Ke=rt=J=ut=C.dragged=C.ghost=C.clone=C.active=null,mt.forEach(function(e){e.checked=!0}),mt.length=Ot=kt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":f&&(this._onDragOver(e),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,r=n.length,i=this.options;o<r;o++)Ce(e=n[o],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||Mn(e));return t},sort:function(e,t){var n={},o=this.el;this.toArray().forEach(function(r,i){var l=o.children[i];Ce(l,this.options.draggable,o,!1)&&(n[r]=l)},this),t&&this.captureAnimationState(),e.forEach(function(r){n[r]&&(o.removeChild(n[r]),o.appendChild(n[r]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Ce(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var o=tt.modifyOption(this,e,t);n[e]=o!==void 0?o:t,e==="group"&&dn(n)},destroy:function(){ce("destroy",this);var e=this.el;e[fe]=null,P(e,"mousedown",this._onTapStart),P(e,"touchstart",this._onTapStart),P(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(P(e,"dragover",this),P(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),pt.splice(pt.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Ae){if(ce("hideClone",this),C.eventCanceled)return;S(Y,"display","none"),this.options.removeCloneOnHide&&Y.parentNode&&Y.parentNode.removeChild(Y),Ae=!0}},_showClone:function(e){if(e.lastPutMode==="clone"){if(Ae){if(ce("showClone",this),C.eventCanceled)return;f.parentNode!=L||this.options.group.revertClone?ze?L.insertBefore(Y,ze):L.appendChild(Y):L.insertBefore(Y,f),this.options.group.revertClone&&this.animate(f,Y),S(Y,"display",""),Ae=!1}}else this._hideClone()}},vt&&B(document,"touchmove",function(e){(C.active||Ue)&&e.cancelable&&e.preventDefault()}),C.utils={on:B,off:P,css:S,find:Zt,is:function(e,t){return!!Ce(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:tn,closest:Ce,toggleClass:pe,clone:on,index:ye,nextTick:wt,cancelNextTick:It,detectDirection:un,getChild:$e},C.get=function(e){return e[fe]},C.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.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&&(C.utils=Ne(Ne({},C.utils),o.utils)),tt.mount(o)})},C.create=function(e,t){return new C(e,t)},C.version="1.15.2";var it,At,Vt,Bt,yt,lt,G=[],Ft=!1;function St(){G.forEach(function(e){clearInterval(e.pid)}),G=[]}function fn(){clearInterval(lt)}var Ht=tn(function(e,t,n,o){if(t.scroll){var r,i=(e.touches?e.touches[0]:e).clientX,l=(e.touches?e.touches[0]:e).clientY,u=t.scrollSensitivity,d=t.scrollSpeed,v=_e(),c=!1;At!==n&&(At=n,St(),it=t.scroll,r=t.scrollFn,it===!0&&(it=Ie(n,!0)));var b=0,_=it;do{var w=_,z=W(w),M=z.top,O=z.bottom,Z=z.left,ve=z.right,ne=z.width,ae=z.height,Re=void 0,Fe=void 0,ie=w.scrollWidth,Se=w.scrollHeight,K=S(w),ge=w.scrollLeft,H=w.scrollTop;w===v?(Re=ne<ie&&(K.overflowX==="auto"||K.overflowX==="scroll"||K.overflowX==="visible"),Fe=ae<Se&&(K.overflowY==="auto"||K.overflowY==="scroll"||K.overflowY==="visible")):(Re=ne<ie&&(K.overflowX==="auto"||K.overflowX==="scroll"),Fe=ae<Se&&(K.overflowY==="auto"||K.overflowY==="scroll"));var ue=Re&&(Math.abs(ve-i)<=u&&ge+ne<ie)-(Math.abs(Z-i)<=u&&!!ge),be=Fe&&(Math.abs(O-l)<=u&&H+ae<Se)-(Math.abs(M-l)<=u&&!!H);if(!G[b])for(var xe=0;xe<=b;xe++)G[xe]||(G[xe]={});G[b].vx==ue&&G[b].vy==be&&G[b].el===w||(G[b].el=w,G[b].vx=ue,G[b].vy=be,clearInterval(G[b].pid),ue==0&&be==0||(c=!0,G[b].pid=setInterval((function(){o&&this.layer===0&&C.active._onTouchMove(yt);var le=G[this.layer].vy?G[this.layer].vy*d:0,De=G[this.layer].vx?G[this.layer].vx*d:0;typeof r=="function"&&r.call(C.dragged.parentNode[fe],De,le,e,yt,G[this.layer].el)!=="continue"||nn(G[this.layer].el,De,le)}).bind({layer:b}),24))),b++}while(t.bubbleScroll&&_!==v&&(_=Ie(_,!1)));Ft=c}},30),mn=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.activeSortable,i=e.dispatchSortableEvent,l=e.hideGhostForTarget,u=e.unhideGhostForTarget;if(t){var d=n||r;l();var v=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(v.clientX,v.clientY);u(),d&&!d.el.contains(c)&&(i("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function jt(){}function zt(){}function Rn(e,t,n={}){let o;const{document:r=Tn,...i}=n,l={onUpdate:c=>{(function(b,_,w){const z=a.isRef(b),M=z?[...xt(b)]:xt(b);if(w>=0&&w<M.length){const O=M.splice(_,1)[0];a.nextTick(()=>{M.splice(w,0,O),z&&(b.value=M)})}})(t,c.oldIndex,c.newIndex)}},u=()=>{const c=typeof e=="string"?r==null?void 0:r.querySelector(e):function(b){var _;const w=xt(b);return(_=w==null?void 0:w.$el)!=null?_:w}(e);c&&o===void 0&&(o=new C(c,{...l,...i}))},d=()=>{o==null||o.destroy(),o=void 0};var v;return Cn(u),v=d,a.getCurrentScope()&&a.onScopeDispose(v),{stop:d,start:u,option:(c,b)=>{if(b===void 0)return o==null?void 0:o.option(c);o==null||o.option(c,b)}}}function vn(){var n;const e=a.inject("MaProTableOptions"),{renderPlugins:t=[]}=((n=e==null?void 0:e.value)==null?void 0:n.provider)??{renderPlugins:[]};return{getPluginByName:o=>t.find(r=>r.name===o),getPlugins:()=>t,addPlugin:o=>{t.find(r=>r.name===o.name)||t.push(o)},removePlugin:o=>{const r=t.findIndex(i=>i.name===o);r!==-1&&t.splice(r,1)}}}jt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=$e(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:mn},ke(jt,{pluginName:"revertOnSpill"}),zt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:mn},ke(zt,{pluginName:"removeOnSpill"}),C.mount(new function(){function e(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?B(document,"dragover",this._handleAutoScroll):this.options.supportPointer?B(document,"pointermove",this._handleFallbackAutoScroll):n.touches?B(document,"touchmove",this._handleFallbackAutoScroll):B(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;this.options.dragOverBubble||n.rootEl||this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?P(document,"dragover",this._handleAutoScroll):(P(document,"pointermove",this._handleFallbackAutoScroll),P(document,"touchmove",this._handleFallbackAutoScroll),P(document,"mousemove",this._handleFallbackAutoScroll)),fn(),St(),clearTimeout(et),et=void 0},nulling:function(){yt=At=it=Ft=lt=Vt=Bt=null,G.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var o=this,r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,l=document.elementFromPoint(r,i);if(yt=t,n||this.options.forceAutoScrollFallback||Ze||Me||Qe){Ht(t,this.options,l,n);var u=Ie(l,!0);!Ft||lt&&r===Vt&&i===Bt||(lt&&fn(),lt=setInterval(function(){var d=Ie(document.elementFromPoint(r,i),!0);d!==u&&(u=d,St()),Ht(t,o.options,d,n)},10),Vt=r,Bt=i)}else{if(!this.options.bubbleScroll||Ie(l,!0)===_e())return void St();Ht(t,this.options,Ie(l,!1),!1)}}},ke(e,{pluginName:"scroll",initializeByDefault:!0})}),C.mount(zt,jt);const Be=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},In={xmlns:"http://www.w3.org/2000/svg",width:"1.3em",height:"1.3em",viewBox:"0 0 24 24"},An=Be({name:"IcBaselineDragIndicator"},[["render",function(e,t,n,o,r,i){return a.openBlock(),a.createElementBlock("svg",In,t[0]||(t[0]=[a.createElementVNode("path",{fill:"currentColor",d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2s.9-2 2-2s2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2"},null,-1)]))}]]),Vn={xmlns:"http://www.w3.org/2000/svg",width:"1.3em",height:"1.3em",viewBox:"0 0 24 24"},gn=Be({name:"RiMoreLine"},[["render",function(e,t,n,o,r,i){return a.openBlock(),a.createElementBlock("svg",Vn,t[0]||(t[0]=[a.createElementVNode("path",{fill:"currentColor",d:"M4.5 10.5c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S6 12.825 6 12s-.675-1.5-1.5-1.5m15 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S21 12.825 21 12s-.675-1.5-1.5-1.5m-7.5 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5s1.5-.675 1.5-1.5s-.675-1.5-1.5-1.5"},null,-1)]))}]]);function Ct(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const bn=a.defineComponent({name:"MaProTable",props:{options:{type:Object,default:()=>({tableOptions:{},searchOptions:{},searchFormOptions:{}})},schema:{type:Object,default:()=>({searchItems:[],tableColumns:[]})}},emits:["row-drag-sort","search-submit","search-reset"],setup(e,{slots:t,emit:n,expose:o}){var He,Je,he,Ee;const r=a.inject("MaProTableOptions"),i=a.computed(()=>{const s=[];return qt(r.value.provider.toolbars,p=>p.order??0).map(p=>{(we(p.show)?p.show:()=>p.show!==!1)()&&s.push(p)}),s}),l=a.ref([]);a.ref([]);const u=a.ref(!1),d=`_${Math.floor(1e5*Math.random()+2e4*Math.random()+5e3*Math.random())}`,v=a.getCurrentInstance(),c=a.ref(e.options),b=a.ref(e.schema),_=a.ref(((He=b.value)==null?void 0:He.tableColumns)??[]),w=a.ref(((Je=c.value)==null?void 0:Je.requestOptions)??{}),z=a.ref(!0),M=a.ref(((Ee=(he=c.value)==null?void 0:he.requestOptions)==null?void 0:Ee.requestParams)??{}),O=a.shallowRef([]),Z=a.ref(),ve=a.computed(()=>{var s;return((s=w.value)==null?void 0:s.autoRequest)??!0}),ne=async()=>{var E,y,T;const{pageName:s="page",sizeName:p="page_size",size:h=10}=((y=(E=c.value)==null?void 0:E.requestOptions)==null?void 0:y.requestPage)??{};M.value[s]=1,M.value[p]=h,Z.value={pageName:s,sizeName:p,size:h},await a.nextTick(()=>{var D,A;return K(((A=(D=ge())==null?void 0:D.getSearchForm)==null?void 0:A.call(D))??{})}),ve.value&&H().setPagination({defaultPageSize:(T=Z.value)==null?void 0:T.size,onChange:async(D,A)=>{M.value[s]=D,M.value[p]=A,await Se(),Fe()}})},ae=a.ref([]),{actionBtnPosition:Re="auto"}=c.value,Fe=()=>{var E,y,T,D;const{tableOptions:s}=c.value,p=we(s==null?void 0:s.rowKey)?(E=s==null?void 0:s.rowKey)==null?void 0:E.call(s,{}):(s==null?void 0:s.rowKey)??"id",h=(D=(T=(y=H())==null?void 0:y.getElTableRef())==null?void 0:T.store)==null?void 0:D.states;if(l.value.length>0&&h.data.value){const A=l.value.filter(R=>h.data.value.find(k=>R[p]===k[p])),V=H().getElTableRef();A.map(R=>{var k;return(k=V==null?void 0:V.toggleRowSelection)==null?void 0:k.call(V,R,!0)})}},ie=a.computed(()=>(()=>{var h,E;const{header:s,toolbar:p}=c.value;return{headerShowFun:typeof(s==null?void 0:s.show)=="function"?s.show:()=>(s==null?void 0:s.show)!==!1,toolbarShowFun:typeof p=="function"?p:()=>p!==!1,searchIsShow:((E=(h=ge())==null?void 0:h.getShowState)==null?void 0:E.call(h))??!0}})()),Se=async()=>{var s,p,h,E,y,T,D,A;if((((s=w.value)==null?void 0:s.autoRequest)??1)||(w.value.autoRequest=!0,await ne()),(p=w.value)==null?void 0:p.api)if(ve.value){const{response:V,data:R,total:k}=await(async()=>new Promise((se,m)=>{var g;H().setLoadingState(!0),(g=w.value)==null||g.api(M.value).then(N=>{var oe,Oe,je,Tt;const j=N.data[((Oe=(oe=w.value)==null?void 0:oe.response)==null?void 0:Oe.dataKey)??"list"]??[],U=N.data[((Tt=(je=w.value)==null?void 0:je.response)==null?void 0:Tt.totalKey)??"total"]??0;H().setLoadingState(!1),se({response:N.data,data:j,total:U})}).catch(()=>{H().setLoadingState(!1),m({response:null,data:[],total:0})})}))();H().setData(((E=(h=w.value)==null?void 0:h.responseDataHandler)==null?void 0:E.call(h,V))??R),k&&k>0?(H().setOptions({showPagination:!0}),H().setPagination(Object.assign(((T=(y=c.value)==null?void 0:y.tableOptions)==null?void 0:T.pagination)??{},{total:k}))):H().setOptions({showPagination:!1}),O.value=R}else O.value=[];else{const V=((A=(D=c.value)==null?void 0:D.tableOptions)==null?void 0:A.data)??[];H().setData(V),O.value=V}},K=async(s,p=!1)=>{M.value=Object.assign(M.value,s),p&&await Se()},ge=()=>{var s;return(s=v==null?void 0:v.proxy)==null?void 0:s.$refs[`MaSearchRef${d}`]},H=()=>{var s;return(s=v==null?void 0:v.proxy)==null?void 0:s.$refs[`MaTableRef${d}`]},ue=async()=>{var p,h,E,y,T,D,A,V,R,k,se;await a.nextTick();const s=document.querySelector(`.mineadmin-pro-table .mine-ptt${d} .mineadmin-pagination`);if((p=s==null?void 0:s.classList)==null||p.add("no-print"),((E=(h=c.value)==null?void 0:h.tableOptions)==null?void 0:E.adaption)??1){const{headerShowFun:m,toolbarShowFun:g}=ie.value,N=((y=document.querySelector(`.mineadmin-pro-table .ma-pro-table-search${d}`))==null?void 0:y.offsetHeight)??0,j=((T=document.querySelector(`.mineadmin-pro-table .ma-pro-table-header${d}`))==null?void 0:T.offsetHeight)??0,U=((D=document.querySelector(`.mineadmin-pro-table .ma-pro-table-tool${d}`))==null?void 0:D.offsetHeight)??0,oe=(s==null?void 0:s.offsetHeight)??-35;H().setOptions({adaptionOffsetBottom:(((V=(A=b.value)==null?void 0:A.searchItems)==null?void 0:V.length)>0&&ge().getShowState()?N:-12)+(m()?j+30:0)+(g()?U+10:0)+oe+(((R=c==null?void 0:c.value)==null?void 0:R.adaptionOffsetBottom)??0)+16})}document.body.clientWidth<1e3?(k=H())==null||k.setPagination({size:"small",layout:"prev, pager, next, sizes"}):(se=H())==null||se.setPagination({size:"default",layout:void 0})},be=()=>{var s;return a.createVNode("div",null,[(s=t.actions)==null?void 0:s.call(t)])},xe=()=>{var h,E,y;const{header:s}=c.value,{headerShowFun:p}=ie.value;return a.createVNode(a.Fragment,null,[p()&&a.createVNode("div",{className:`mine-card mineadmin-pro-table-header ma-pro-table-header${d}`},[((h=t.tableHeader)==null?void 0:h.call(t))??a.createVNode(a.Fragment,null,[a.createVNode("div",{className:"mineadmin-pro-table-header-title"},[((E=t.headerTitle)==null?void 0:E.call(t))??a.createVNode(a.Fragment,null,[a.createVNode("div",{className:"main-title"},[we(s==null?void 0:s.mainTitle)?s.mainTitle():(s==null?void 0:s.mainTitle)??"表格主标题"]),a.createVNode("div",{className:"secondary-title"},[we(s==null?void 0:s.subTitle)?s.subTitle():(s==null?void 0:s.subTitle)??""])])]),a.createVNode("div",{className:"mineadmin-pro-table-header-actions"},[["auto","header"].includes(Re)&&be(),(y=t.headerRight)==null?void 0:y.call(t)])])])])},le=()=>{var T,D,A,V;const{selection:s,toolStates:p}=c.value,h=a.computed(()=>(we(s==null?void 0:s.selectedText)?s.selectedText():(s==null?void 0:s.selectedText)??"已选择 {number} 项").replace("{number}",l.value.length.toString())),{headerShowFun:E,toolbarShowFun:y}=ie.value;return a.createVNode("div",{className:`mineadmin-pro-table-toolbar ma-pro-table-tool${d}`},[a.createVNode("div",{className:"mineadmin-pro-table-toolbar-content"},[(T=t.toolbarLeft)==null?void 0:T.call(t),(!E()||Re==="table")&&y()&&be(),s&&((s==null?void 0:s.crossPage)??!1)&&a.createVNode("div",{class:"mineadmin-pro-table-selection-all"},[h.value,a.createVNode(a.resolveComponent("el-link"),{underline:"never",type:"primary",onClick:()=>{var R,k,se;(se=(k=(R=H())==null?void 0:R.getElTableRef())==null?void 0:k.clearSelection)==null||se.call(k),l.value=[]}},{default:()=>[we(s==null?void 0:s.clearText)?s.clearText():(s==null?void 0:s.clearText)??"清除选择"]})])]),a.createVNode("div",null,[(D=t.beforeToolbar)==null?void 0:D.call(t),((A=t.toolbar)==null?void 0:A.call(t))??a.createVNode(a.Fragment,null,[i.value.filter(R=>{if(!p)return!0;const k=p[R.name]??void 0;return k===void 0||(typeof k=="function"?k==null?void 0:k():k)}).map(R=>a.h(R.render(),{proxy:q.value}))]),(V=t.afterToolbar)==null?void 0:V.call(t)])])},De=(s,p)=>{s.map((h,E)=>{var T,D,A,V;const y=we(h==null?void 0:h.prop)?h.prop(E):(h==null?void 0:h.prop)??"";if((we(h==null?void 0:h.isRender)?h.isRender():(h==null?void 0:h.isRender)??!0)||s.splice(E,1),((T=h==null?void 0:h.children)==null?void 0:T.length)>0)De(h.children,p);else if(h!=null&&h.cellRenderTo){const R=p(h.cellRenderTo.name);R&&((D=h.cellRenderTo)!=null&&D.props?(V=(A=h.cellRenderTo)==null?void 0:A.props)!=null&&V.prop||(h.cellRenderTo.props.prop=y):h.cellRenderTo.props={prop:y},h.cellRender=k=>R.render(k,h.cellRenderTo.props,q.value))}h.cellRenderPro&&(h.cellRender=R=>h.cellRenderPro(R,q.value)),h.headerRenderPro&&(h.headerRender=R=>h.headerRenderPro(R,q.value))})},I=()=>{const s=_.value.find(y=>(y==null?void 0:y.type)==="sort"),p=_.value.find(y=>(y==null?void 0:y.type)==="operation"),h=_.value.find(y=>(y==null?void 0:y.type)==="selection"),E=_.value.find(y=>(y==null?void 0:y.type)==="index");s&&(s!=null&&s.label||s!=null&&s.headerRender||(s.label="行排序"),s.width=(s==null?void 0:s.width)??"50px",s.showOverflowTooltip=!1,s.cellRender=()=>a.createVNode("div",{className:"mine-cell-flex-center mine-cursor-resize"},[a.createVNode(An,null,null)])),p&&(p!=null&&p.label||p!=null&&p.headerRender||(p.label="操作"),p.showOverflowTooltip=!1,p!=null&&p.cellRender||(p.cellRender=y=>((T,D)=>{const{type:A="auto",fold:V=1}=(D==null?void 0:D.operationConfigure)??{},R=m=>{var g;return a.createVNode(a.Fragment,null,[(m==null?void 0:m.icon)&&((g=r.value.provider)==null?void 0:g.icon)&&a.h(r.value.provider.icon,{style:"margin-right: 2px;",name:we(m.icon)?m.icon(T):m.icon}),we(m.text)?m.text(T):(m==null?void 0:m.text)??"unknown"])},k=(m,g)=>{var j,U;let N;return(((j=m==null?void 0:m.show)==null?void 0:j.call(m,g))??!0)&&a.createVNode(a.resolveComponent("el-link"),a.mergeProps({underline:"never"},m==null?void 0:m.linkProps,{disabled:((U=m==null?void 0:m.disabled)==null?void 0:U.call(m,g))??!1,onClick:oe=>{var Oe;return(Oe=m==null?void 0:m.onClick)==null?void 0:Oe.call(m,g,q.value,oe)}}),Ct(N=R(m))?N:{default:()=>[N]})},se=(m,g)=>{var U;let N;const j=((U=m==null?void 0:m.disabled)==null?void 0:U.call(m,g))??!1;return a.createVNode(a.resolveComponent("el-dropdown-item"),{disabled:j,command:m},{default:()=>[a.createVNode(a.resolveComponent("el-link"),a.mergeProps({underline:"never"},m==null?void 0:m.linkProps,{disabled:j}),Ct(N=R(m))?N:{default:()=>[N]})]})};if(A==="auto"){const m=[];return a.createVNode("div",{className:"mine-operation-scroll"},[ae.value.map((g,N)=>{var j,U;return N+1<=V?((j=g==null?void 0:g.show)==null?void 0:j.call(g,T))??1?k(g,T):null:((((U=g==null?void 0:g.show)==null?void 0:U.call(g,T))??1)&&m.push(g),null)}),m.length>0&&a.createVNode(a.resolveComponent("el-dropdown"),{"hide-on-click":!1,onCommand:g=>{var N;return(N=g.onClick)==null?void 0:N.call(g,T,q.value)}},{default:()=>[a.createVNode(a.resolveComponent("el-link"),{underline:"never"},{default:()=>[a.createVNode(gn,null,null)]})],dropdown:()=>{let g;return a.createVNode(a.resolveComponent("el-dropdown-menu"),null,Ct(g=m.map(N=>{var j;return((j=N==null?void 0:N.show)==null?void 0:j.call(N,T))??1?se(N,T):null}))?g:{default:()=>[g]})}})])}return A==="dropdown"?a.createVNode("div",{className:"mine-operation-scroll"},[a.createVNode(a.resolveComponent("el-dropdown"),{"hide-on-click":!1,onCommand:m=>{var g;return(g=m.onClick)==null?void 0:g.call(m,T,q.value)}},{default:()=>[a.createVNode(a.resolveComponent("el-link"),{underline:"never"},{default:()=>[a.createVNode(gn,null,null)]})],dropdown:()=>{let m;return a.createVNode(a.resolveComponent("el-dropdown-menu"),null,Ct(m=