useTable-XLZI32X2.js 56 KB

12345678
  1. var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,i=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,l=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&i(e,n,t[n]);if(o)for(var n of o(t))a.call(t,n)&&i(e,n,t[n]);return e},s=(e,o)=>t(e,n(o)),c=(e,t,n)=>i(e,"symbol"!=typeof t?t+"":t,n),u=(e,t,n)=>new Promise(((o,r)=>{var a=e=>{try{l(n.next(e))}catch(t){r(t)}},i=e=>{try{l(n.throw(e))}catch(t){r(t)}},l=e=>e.done?o(e.value):Promise.resolve(e.value).then(a,i);l((n=n.apply(e,t)).next())}));import{j as d,c as h,O as f,u as p,r as m,N as v,k as g,e as b,w as y,d as w,n as E,m as C,i as _,aS as S,aT as D,s as T,Q as A,G as O,S as x,V as k,W as N,D as I,H as P,v as M,$ as R,F as L,a0 as j,a1 as z,U as B,X as F,Y as X,a2 as Y,a5 as U,aQ as V,b as H}from"./vendor-C0fQtjEp.js";import{T as $,u as W}from"./index-Md1NzLn1.js";import{u as K,$ as G}from"./index-D4_ZPgdu.js";import{_ as q}from"./_plugin-vue_export-helper-BCo6x5W8.js";import{b as J}from"./index-NrZLk1ug.js";var Z=Object.defineProperty,Q=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ne=(e,t,n)=>t in e?Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t)=>{for(var n in t||(t={}))ee.call(t,n)&&ne(e,n,t[n]);if(Q)for(var n of Q(t))te.call(t,n)&&ne(e,n,t[n]);return e},re=(e,t)=>{var n={};for(var o in e)ee.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&Q)for(var o of Q(e))t.indexOf(o)<0&&te.call(e,o)&&(n[o]=e[o]);return n};function ae(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function ie(e,t){return Array.isArray(e)&&e.splice(t,1),e}function le(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function se(e,t,n){const o=e.children[n];e.insertBefore(t,o)}function ce(e){e.parentNode&&e.parentNode.removeChild(e)}function ue(e,t){Object.keys(e).forEach((n=>{t(n,e[n])}))}const de=Object.assign;
  2. /**!
  3. * Sortable 1.15.2
  4. * @author RubaXa <trash@rubaxa.org>
  5. * @author owenm <owen23355@gmail.com>
  6. * @license MIT
  7. */function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ve(){return ve=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},ve.apply(this,arguments)}function ge(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function be(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var ye=be(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),we=be(/Edge/i),Ee=be(/firefox/i),Ce=be(/safari/i)&&!be(/chrome/i)&&!be(/android/i),_e=be(/iP(ad|od|hone)/i),Se=be(/chrome/i)&&be(/android/i),De={capture:!1,passive:!1};function Te(e,t,n){e.addEventListener(t,n,!ye&&De)}function Ae(e,t,n){e.removeEventListener(t,n,!ye&&De)}function Oe(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(n){return!1}return!1}}function xe(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ke(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&Oe(e,t):Oe(e,t))||o&&e===n)return e;if(e===n)break}while(e=xe(e))}return null}var Ne,Ie=/\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(Ie," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(Ie," ")}}function Me(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];!(t in o)&&-1===t.indexOf("webkit")&&(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function Re(e,t){var n="";if("string"==typeof e)n=e;else do{var o=Me(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function Le(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,a=o.length;if(n)for(;r<a;r++)n(o[r],r);return o}return[]}function je(){return document.scrollingElement||document.documentElement}function ze(e,t,n,o,r){if(e.getBoundingClientRect||e===window){var a,i,l,s,c,u,d;if(e!==window&&e.parentNode&&e!==je()?(i=(a=e.getBoundingClientRect()).top,l=a.left,s=a.bottom,c=a.right,u=a.height,d=a.width):(i=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!ye))do{if(r&&r.getBoundingClientRect&&("none"!==Me(r,"transform")||n&&"static"!==Me(r,"position"))){var h=r.getBoundingClientRect();i-=h.top+parseInt(Me(r,"border-top-width")),l-=h.left+parseInt(Me(r,"border-left-width")),s=i+a.height,c=l+a.width;break}}while(r=r.parentNode);if(o&&e!==window){var f=Re(r||e),p=f&&f.a,m=f&&f.d;f&&(s=(i/=m)+(u/=m),c=(l/=p)+(d/=p))}return{top:i,left:l,bottom:s,right:c,width:d,height:u}}}function Be(e,t,n){for(var o=Ve(e,!0),r=ze(e)[t];o;){if(!(r>=ze(o)[n]))return o;if(o===je())break;o=Ve(o,!1)}return!1}function Fe(e,t,n,o){for(var r=0,a=0,i=e.children;a<i.length;){if("none"!==i[a].style.display&&i[a]!==Kt.ghost&&(o||i[a]!==Kt.dragged)&&ke(i[a],n.draggable,e,!1)){if(r===t)return i[a];r++}a++}return null}function Xe(e,t){for(var n=e.lastElementChild;n&&(n===Kt.ghost||"none"===Me(n,"display")||t&&!Oe(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;)"TEMPLATE"!==e.nodeName.toUpperCase()&&e!==Kt.clone&&(!t||Oe(e,t))&&n++;return n}function Ue(e){var t=0,n=0,o=je();if(e)do{var r=Re(e),a=r.a,i=r.d;t+=e.scrollLeft*a,n+=e.scrollTop*i}while(e!==o&&(e=e.parentNode));return[t,n]}function Ve(e,t){if(!e||!e.getBoundingClientRect)return je();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=Me(n);if(n.clientWidth<n.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!n.getBoundingClientRect||n===document.body)return je();if(o||t)return n;o=!0}}}while(n=n.parentNode);return je()}function He(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 $e(e,t){return function(){if(!Ne){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),Ne=setTimeout((function(){Ne=void 0}),t)}}}function We(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Ke(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 Ge(e,t,n){var o={};return Array.from(e.children).forEach((function(r){var a,i,l,s;if(ke(r,t.draggable,e,!1)&&!r.animated&&r!==n){var c=ze(r);o.left=Math.min(null!==(a=o.left)&&void 0!==a?a:1/0,c.left),o.top=Math.min(null!==(i=o.top)&&void 0!==i?i:1/0,c.top),o.right=Math.max(null!==(l=o.right)&&void 0!==l?l:-1/0,c.right),o.bottom=Math.max(null!==(s=o.bottom)&&void 0!==s?s:-1/0,c.bottom)}})),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var qe="Sortable"+(new Date).getTime();function Je(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(e){if("none"!==Me(e,"display")&&e!==Kt.ghost){t.push({target:e,rect:ze(e)});var n=fe({},t[t.length-1].rect);if(e.thisAnimationDuration){var o=Re(e,!0);o&&(n.top-=o.f,n.left-=o.e)}e.fromRect=n}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}(t,{target:e}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var r=!1,a=0;t.forEach((function(e){var t=0,n=e.target,i=n.fromRect,l=ze(n),s=n.prevFromRect,c=n.prevToRect,u=e.rect,d=Re(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&He(s,l)&&!He(i,l)&&(u.top-l.top)/(u.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(t=function(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}(u,s,c,o.options)),He(l,i)||(n.prevFromRect=i,n.prevToRect=l,t||(t=o.options.animation),o.animate(n,u,l,t)),t&&(r=!0,a=Math.max(a,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),t),n.thisAnimationDuration=t)})),clearTimeout(e),r?e=setTimeout((function(){"function"==typeof n&&n()}),a):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,o){if(o){Me(e,"transition",""),Me(e,"transform","");var r=Re(this.el),a=r&&r.a,i=r&&r.d,l=(t.left-n.left)/(a||1),s=(t.top-n.top)/(i||1);e.animatingX=!!l,e.animatingY=!!s,Me(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),Me(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),Me(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){Me(e,"transition",""),Me(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),o)}}}}var Ze=[],Qe={initializeByDefault:!0},et={mount:function(e){for(var t in Qe)Qe.hasOwnProperty(t)&&!(t in e)&&(e[t]=Qe[t]);Ze.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),Ze.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=e+"Global";Ze.forEach((function(o){t[o.pluginName]&&(t[o.pluginName][r]&&t[o.pluginName][r](fe({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](fe({sortable:t},n)))}))},initializePlugins:function(e,t,n,o){for(var r in Ze.forEach((function(o){var r=o.pluginName;if(e.options[r]||o.initializeByDefault){var a=new o(e,t,e.options);a.sortable=e,a.options=e.options,e[r]=a,ve(n,a.defaults)}})),e.options)if(e.options.hasOwnProperty(r)){var a=this.modifyOption(e,r,e.options[r]);void 0!==a&&(e.options[r]=a)}},getEventProperties:function(e,t){var n={};return Ze.forEach((function(o){"function"==typeof o.eventProperties&&ve(n,o.eventProperties.call(t[o.pluginName],e))})),n},modifyOption:function(e,t,n){var o;return Ze.forEach((function(r){e[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[t]&&(o=r.optionListeners[t].call(e[r.pluginName],n))})),o}};var tt=["evt"],nt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=ge(n,tt);et.pluginEvent.bind(Kt)(e,t,fe({dragEl:rt,parentEl:at,ghostEl:it,rootEl:lt,nextEl:st,lastDownEl:ct,cloneEl:ut,cloneHidden:dt,dragStarted:St,putSortable:gt,activeSortable:Kt.active,originalEvent:o,oldIndex:ht,oldDraggableIndex:pt,newIndex:ft,newDraggableIndex:mt,hideGhostForTarget:Vt,unhideGhostForTarget:Ht,cloneNowHidden:function(){dt=!0},cloneNowShown:function(){dt=!1},dispatchSortableEvent:function(e){ot({sortable:t,name:e,originalEvent:o})}},r))};function ot(e){!function(e){var t=e.sortable,n=e.rootEl,o=e.name,r=e.targetEl,a=e.cloneEl,i=e.toEl,l=e.fromEl,s=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,p=e.extraEventProperties;if(t=t||n&&n[qe]){var m,v=t.options,g="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||ye||we?(m=document.createEvent("Event")).initEvent(o,!0,!0):m=new CustomEvent(o,{bubbles:!0,cancelable:!0}),m.to=i||n,m.from=l||n,m.item=r||n,m.clone=a,m.oldIndex=s,m.newIndex=c,m.oldDraggableIndex=u,m.newDraggableIndex=d,m.originalEvent=h,m.pullMode=f?f.lastPutMode:void 0;var b=fe(fe({},p),et.getEventProperties(o,t));for(var y in b)m[y]=b[y];n&&n.dispatchEvent(m),v[g]&&v[g].call(t,m)}}(fe({putSortable:gt,cloneEl:ut,targetEl:rt,rootEl:lt,oldIndex:ht,oldDraggableIndex:pt,newIndex:ft,newDraggableIndex:mt},e))}var rt,at,it,lt,st,ct,ut,dt,ht,ft,pt,mt,vt,gt,bt,yt,wt,Et,Ct,_t,St,Dt,Tt,At,Ot,xt=!1,kt=!1,Nt=[],It=!1,Pt=!1,Mt=[],Rt=!1,Lt=[],jt="undefined"!=typeof document,zt=_e,Bt=we||ye?"cssFloat":"float",Ft=jt&&!Se&&!_e&&"draggable"in document.createElement("div"),Xt=function(){if(jt){if(ye)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Yt=function(e,t){var n=Me(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=Fe(e,0,t),a=Fe(e,1,t),i=r&&Me(r),l=a&&Me(a),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+ze(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+ze(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!a||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return r&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=o&&"none"===n[Bt]||a&&"none"===n[Bt]&&s+c>o)?"vertical":"horizontal"},Ut=function(e){function t(e,n){return function(o,r,a,i){var l=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,r,a,i),n)(o,r,a,i);var s=(n?o:r).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},o=e.group;(!o||"object"!=pe(o))&&(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},Vt=function(){!Xt&&it&&Me(it,"display","none")},Ht=function(){!Xt&&it&&Me(it,"display","")};jt&&!Se&&document.addEventListener("click",(function(e){if(kt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),kt=!1,!1}),!0);var $t=function(e){if(rt){var t=function(e,t){var n;return Nt.some((function(o){var r=o[qe].options.emptyInsertThreshold;if(r&&!Xe(o)){var a=ze(o),i=e>=a.left-r&&e<=a.right+r,l=t>=a.top-r&&t<=a.bottom+r;if(i&&l)return n=o}})),n}((e=e.touches?e.touches[0]:e).clientX,e.clientY);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[qe]._onDragOver(n)}}},Wt=function(e){rt&&rt.parentNode[qe]._isOutsideThisEl(e.target)};function Kt(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=ve({},t),e[qe]=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 Yt(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Kt.supportPointer&&"PointerEvent"in window&&!Ce,emptyInsertThreshold:5};for(var o in et.initializePlugins(this,e,n),n)!(o in t)&&(t[o]=n[o]);for(var r in Ut(t),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!t.forceFallback&&Ft,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Te(e,"pointerdown",this._onTapStart):(Te(e,"mousedown",this._onTapStart),Te(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Te(e,"dragover",this),Te(e,"dragenter",this)),Nt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),ve(this,Je())}function Gt(e,t,n,o,r,a,i,l){var s,c,u=e[qe],d=u.options.onMove;return!window.CustomEvent||ye||we?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=o,s.related=r||t,s.relatedRect=a||ze(t),s.willInsertAfter=l,s.originalEvent=i,e.dispatchEvent(s),d&&(c=d.call(u,s,i)),c}function qt(e){e.draggable=!1}function Jt(){Rt=!1}function Zt(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 Qt(e){return setTimeout(e,0)}function en(e){return clearTimeout(e)}Kt.prototype={constructor:Kt,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Dt=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,rt):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,a=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(i||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=o.filter;if(function(e){Lt.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&Lt.push(o)}}(n),!rt&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!Ce||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=ke(l,o.draggable,n,!1))&&l.animated||ct===l)){if(ht=Ye(l),pt=Ye(l,o.draggable),"function"==typeof c){if(c.call(this,e,l,this))return ot({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),nt("filter",t,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=ke(s,o.trim(),n,!1))return ot({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),nt("filter",t,{evt:e}),!0}))))return void(r&&e.cancelable&&e.preventDefault());o.handle&&!ke(s,o.handle,n,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,n){var o,r=this,a=r.el,i=r.options,l=a.ownerDocument;if(n&&!rt&&n.parentNode===a){var s=ze(n);if(lt=a,at=(rt=n).parentNode,st=rt.nextSibling,ct=n,vt=i.group,Kt.dragged=rt,bt={target:rt,clientX:(t||e).clientX,clientY:(t||e).clientY},Ct=bt.clientX-s.left,_t=bt.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,rt.style["will-change"]="all",o=function(){nt("delayEnded",r,{evt:e}),Kt.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!Ee&&r.nativeDraggable&&(rt.draggable=!0),r._triggerDragStart(e,t),ot({sortable:r,name:"choose",originalEvent:e}),Pe(rt,i.chosenClass,!0))},i.ignore.split(",").forEach((function(e){Le(rt,e.trim(),qt)})),Te(l,"dragover",$t),Te(l,"mousemove",$t),Te(l,"touchmove",$t),Te(l,"mouseup",r._onDrop),Te(l,"touchend",r._onDrop),Te(l,"touchcancel",r._onDrop),Ee&&this.nativeDraggable&&(this.options.touchStartThreshold=4,rt.draggable=!0),nt("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(we||ye))o();else{if(Kt.eventCanceled)return void this._onDrop();Te(l,"mouseup",r._disableDelayedDrag),Te(l,"touchend",r._disableDelayedDrag),Te(l,"touchcancel",r._disableDelayedDrag),Te(l,"mousemove",r._delayedDragTouchMoveHandler),Te(l,"touchmove",r._delayedDragTouchMoveHandler),i.supportPointer&&Te(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,i.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(){rt&&qt(rt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ae(e,"mouseup",this._disableDelayedDrag),Ae(e,"touchend",this._disableDelayedDrag),Ae(e,"touchcancel",this._disableDelayedDrag),Ae(e,"mousemove",this._delayedDragTouchMoveHandler),Ae(e,"touchmove",this._delayedDragTouchMoveHandler),Ae(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?Te(document,"pointermove",this._onTouchMove):Te(document,t?"touchmove":"mousemove",this._onTouchMove):(Te(rt,"dragend",this),Te(lt,"dragstart",this._onDragStart));try{document.selection?Qt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(xt=!1,lt&&rt){nt("dragStarted",this,{evt:t}),this.nativeDraggable&&Te(document,"dragover",Wt);var n=this.options;!e&&Pe(rt,n.dragClass,!1),Pe(rt,n.ghostClass,!0),Kt.active=this,e&&this._appendGhost(),ot({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(yt){this._lastX=yt.clientX,this._lastY=yt.clientY,Vt();for(var e=document.elementFromPoint(yt.clientX,yt.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(yt.clientX,yt.clientY))!==t;)t=e;if(rt.parentNode[qe]._isOutsideThisEl(e),t)do{if(t[qe]){if(t[qe]._onDragOver({clientX:yt.clientX,clientY:yt.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Ht()}},_onTouchMove:function(e){if(bt){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,a=it&&Re(it,!0),i=it&&a&&a.a,l=it&&a&&a.d,s=zt&&Ot&&Ue(Ot),c=(r.clientX-bt.clientX+o.x)/(i||1)+(s?s[0]-Mt[0]:0)/(i||1),u=(r.clientY-bt.clientY+o.y)/(l||1)+(s?s[1]-Mt[1]:0)/(l||1);if(!Kt.active&&!xt){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(it){a?(a.e+=c-(wt||0),a.f+=u-(Et||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");Me(it,"webkitTransform",d),Me(it,"mozTransform",d),Me(it,"msTransform",d),Me(it,"transform",d),wt=c,Et=u,yt=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!it){var e=this.options.fallbackOnBody?document.body:lt,t=ze(rt,!0,zt,!0,e),n=this.options;if(zt){for(Ot=e;"static"===Me(Ot,"position")&&"none"===Me(Ot,"transform")&&Ot!==document;)Ot=Ot.parentNode;Ot!==document.body&&Ot!==document.documentElement?(Ot===document&&(Ot=je()),t.top+=Ot.scrollTop,t.left+=Ot.scrollLeft):Ot=je(),Mt=Ue(Ot)}Pe(it=rt.cloneNode(!0),n.ghostClass,!1),Pe(it,n.fallbackClass,!0),Pe(it,n.dragClass,!0),Me(it,"transition",""),Me(it,"transform",""),Me(it,"box-sizing","border-box"),Me(it,"margin",0),Me(it,"top",t.top),Me(it,"left",t.left),Me(it,"width",t.width),Me(it,"height",t.height),Me(it,"opacity","0.8"),Me(it,"position",zt?"absolute":"fixed"),Me(it,"zIndex","100000"),Me(it,"pointerEvents","none"),Kt.ghost=it,e.appendChild(it),Me(it,"transform-origin",Ct/parseInt(it.style.width)*100+"% "+_t/parseInt(it.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,r=n.options;nt("dragStart",this,{evt:e}),Kt.eventCanceled?this._onDrop():(nt("setupClone",this),Kt.eventCanceled||((ut=Ke(rt)).removeAttribute("id"),ut.draggable=!1,ut.style["will-change"]="",this._hideClone(),Pe(ut,this.options.chosenClass,!1),Kt.clone=ut),n.cloneId=Qt((function(){nt("clone",n),!Kt.eventCanceled&&(n.options.removeCloneOnHide||lt.insertBefore(ut,rt),n._hideClone(),ot({sortable:n,name:"clone"}))})),!t&&Pe(rt,r.dragClass,!0),t?(kt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ae(document,"mouseup",n._onDrop),Ae(document,"touchend",n._onDrop),Ae(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,rt)),Te(document,"drop",n),Me(rt,"transform","translateZ(0)")),xt=!0,n._dragStartId=Qt(n._dragStarted.bind(n,t,e)),Te(document,"selectstart",n),St=!0,Ce&&Me(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,o,r,a=this.el,i=e.target,l=this.options,s=l.group,c=Kt.active,u=vt===s,d=l.sort,h=gt||c,f=this,p=!1;if(!Rt){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),i=ke(i,l.draggable,a,!0),x("dragOver"),Kt.eventCanceled)return p;if(rt.contains(e.target)||i.animated&&i.animatingX&&i.animatingY||f._ignoreWhileAnimating===i)return N(!1);if(kt=!1,c&&!l.disabled&&(u?d||(o=at!==lt):gt===this||(this.lastPutMode=vt.checkPull(this,c,rt,e))&&s.checkPut(this,c,rt,e))){if(r="vertical"===this._getDirection(e,i),t=ze(rt),x("dragOverValid"),Kt.eventCanceled)return p;if(o)return at=lt,k(),this._hideClone(),x("revert"),Kt.eventCanceled||(st?lt.insertBefore(rt,st):lt.appendChild(rt)),N(!0);var m=Xe(a,l.draggable);if(!m||function(e,t,n){var o=ze(Xe(n.el,n.options.draggable)),r=Ge(n.el,n.options,it),a=10;return t?e.clientX>r.right+a||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>r.bottom+a||e.clientX>o.right&&e.clientY>o.top}(e,r,this)&&!m.animated){if(m===rt)return N(!1);if(m&&a===e.target&&(i=m),i&&(n=ze(i)),!1!==Gt(lt,a,rt,t,i,n,e,!!i))return k(),m&&m.nextSibling?a.insertBefore(rt,m.nextSibling):a.appendChild(rt),at=a,I(),N(!0)}else if(m&&function(e,t,n){var o=ze(Fe(n.el,0,n.options,!0)),r=Ge(n.el,n.options,it),a=10;return t?e.clientX<r.left-a||e.clientY<o.top&&e.clientX<o.right:e.clientY<r.top-a||e.clientY<o.bottom&&e.clientX<o.left}(e,r,this)){var v=Fe(a,0,l,!0);if(v===rt)return N(!1);if(n=ze(i=v),!1!==Gt(lt,a,rt,t,i,n,e,!1))return k(),a.insertBefore(rt,v),at=a,I(),N(!0)}else if(i.parentNode===a){n=ze(i);var g,b,y,w=rt.parentNode!==a,E=!function(e,t,n){var o=n?e.left:e.top,r=n?e.right:e.bottom,a=n?e.width:e.height,i=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return o===i||r===l||o+a/2===i+s/2}(rt.animated&&rt.toRect||t,i.animated&&i.toRect||n,r),C=r?"top":"left",_=Be(i,"top","top")||Be(rt,"top","top"),S=_?_.scrollTop:void 0;if(Dt!==i&&(b=n[C],It=!1,Pt=!E&&l.invertSwap||w),g=function(e,t,n,o,r,a,i,l){var s=o?e.clientY:e.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!i)if(l&&At<c*r){if(!It&&(1===Tt?s>u+c*a/2:s<d-c*a/2)&&(It=!0),It)h=!0;else if(1===Tt?s<u+At:s>d-At)return-Tt}else if(s>u+c*(1-r)/2&&s<d-c*(1-r)/2)return function(e){return Ye(rt)<Ye(e)?1:-1}(t);return h=h||i,h&&(s<u+c*a/2||s>d-c*a/2)?s>u+c/2?1:-1:0}(e,i,n,r,E?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Pt,Dt===i),0!==g){var D=Ye(rt);do{D-=g,y=at.children[D]}while(y&&("none"===Me(y,"display")||y===it))}if(0===g||y===i)return N(!1);Dt=i,Tt=g;var T=i.nextElementSibling,A=!1,O=Gt(lt,a,rt,t,i,n,e,A=1===g);if(!1!==O)return(1===O||-1===O)&&(A=1===O),Rt=!0,setTimeout(Jt,30),k(),A&&!T?a.appendChild(rt):i.parentNode.insertBefore(rt,A?T:i),_&&We(_,0,S-_.scrollTop),at=rt.parentNode,void 0!==b&&!Pt&&(At=Math.abs(b-ze(i)[C])),I(),N(!0)}if(a.contains(rt))return N(!1)}return!1}function x(l,s){nt(l,f,fe({evt:e,isOwner:u,axis:r?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:d,fromSortable:h,target:i,completed:N,onMove:function(n,o){return Gt(lt,a,rt,t,n,ze(n),e,o)},changed:I},s))}function k(){x("dragOverAnimationCapture"),f.captureAnimationState(),f!==h&&h.captureAnimationState()}function N(t){return x("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(f),f!==h&&(Pe(rt,gt?gt.options.ghostClass:c.options.ghostClass,!1),Pe(rt,l.ghostClass,!0)),gt!==f&&f!==Kt.active?gt=f:f===Kt.active&&gt&&(gt=null),h===f&&(f._ignoreWhileAnimating=i),f.animateAll((function(){x("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(i===rt&&!rt.animated||i===a&&!i.animated)&&(Dt=null),!l.dragoverBubble&&!e.rootEl&&i!==document&&(rt.parentNode[qe]._isOutsideThisEl(e.target),!t&&$t(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),p=!0}function I(){ft=Ye(rt),mt=Ye(rt,l.draggable),ot({sortable:f,name:"change",toEl:a,newIndex:ft,newDraggableIndex:mt,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ae(document,"mousemove",this._onTouchMove),Ae(document,"touchmove",this._onTouchMove),Ae(document,"pointermove",this._onTouchMove),Ae(document,"dragover",$t),Ae(document,"mousemove",$t),Ae(document,"touchmove",$t)},_offUpEvents:function(){var e=this.el.ownerDocument;Ae(e,"mouseup",this._onDrop),Ae(e,"touchend",this._onDrop),Ae(e,"pointerup",this._onDrop),Ae(e,"touchcancel",this._onDrop),Ae(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ft=Ye(rt),mt=Ye(rt,n.draggable),nt("drop",this,{evt:e}),at=rt&&rt.parentNode,ft=Ye(rt),mt=Ye(rt,n.draggable),Kt.eventCanceled||(xt=!1,Pt=!1,It=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),en(this.cloneId),en(this._dragStartId),this.nativeDraggable&&(Ae(document,"drop",this),Ae(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ce&&Me(document.body,"user-select",""),Me(rt,"transform",""),e&&(St&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),it&&it.parentNode&&it.parentNode.removeChild(it),(lt===at||gt&&"clone"!==gt.lastPutMode)&&ut&&ut.parentNode&&ut.parentNode.removeChild(ut),rt&&(this.nativeDraggable&&Ae(rt,"dragend",this),qt(rt),rt.style["will-change"]="",St&&!xt&&Pe(rt,gt?gt.options.ghostClass:this.options.ghostClass,!1),Pe(rt,this.options.chosenClass,!1),ot({sortable:this,name:"unchoose",toEl:at,newIndex:null,newDraggableIndex:null,originalEvent:e}),lt!==at?(ft>=0&&(ot({rootEl:at,name:"add",toEl:at,fromEl:lt,originalEvent:e}),ot({sortable:this,name:"remove",toEl:at,originalEvent:e}),ot({rootEl:at,name:"sort",toEl:at,fromEl:lt,originalEvent:e}),ot({sortable:this,name:"sort",toEl:at,originalEvent:e})),gt&&gt.save()):ft!==ht&&ft>=0&&(ot({sortable:this,name:"update",toEl:at,originalEvent:e}),ot({sortable:this,name:"sort",toEl:at,originalEvent:e})),Kt.active&&((null==ft||-1===ft)&&(ft=ht,mt=pt),ot({sortable:this,name:"end",toEl:at,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){nt("nulling",this),lt=rt=at=it=st=ut=ct=dt=bt=yt=St=ft=mt=ht=pt=Dt=Tt=gt=vt=Kt.dragged=Kt.ghost=Kt.clone=Kt.active=null,Lt.forEach((function(e){e.checked=!0})),Lt.length=wt=Et=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":rt&&(this._onDragOver(e),(t=e).dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault());break;case"selectstart":e.preventDefault()}var t},toArray:function(){for(var e,t=[],n=this.el.children,o=0,r=n.length,a=this.options;o<r;o++)ke(e=n[o],a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||Zt(e));return t},sort:function(e,t){var n={},o=this.el;this.toArray().forEach((function(e,t){var r=o.children[t];ke(r,this.options.draggable,o,!1)&&(n[e]=r)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(o.removeChild(n[e]),o.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return ke(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var o=et.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&Ut(n)},destroy:function(){nt("destroy",this);var e=this.el;e[qe]=null,Ae(e,"mousedown",this._onTapStart),Ae(e,"touchstart",this._onTapStart),Ae(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ae(e,"dragover",this),Ae(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Nt.splice(Nt.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!dt){if(nt("hideClone",this),Kt.eventCanceled)return;Me(ut,"display","none"),this.options.removeCloneOnHide&&ut.parentNode&&ut.parentNode.removeChild(ut),dt=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(dt){if(nt("showClone",this),Kt.eventCanceled)return;rt.parentNode!=lt||this.options.group.revertClone?st?lt.insertBefore(ut,st):lt.appendChild(ut):lt.insertBefore(ut,rt),this.options.group.revertClone&&this.animate(rt,ut),Me(ut,"display",""),dt=!1}}else this._hideClone()}},jt&&Te(document,"touchmove",(function(e){(Kt.active||xt)&&e.cancelable&&e.preventDefault()})),Kt.utils={on:Te,off:Ae,css:Me,find:Le,is:function(e,t){return!!ke(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:$e,closest:ke,toggleClass:Pe,clone:Ke,index:Ye,nextTick:Qt,cancelNextTick:en,detectDirection:Yt,getChild:Fe},Kt.get=function(e){return e[qe]},Kt.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(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Kt.utils=fe(fe({},Kt.utils),e.utils)),et.mount(e)}))},Kt.create=function(e,t){return new Kt(e,t)},Kt.version="1.15.2";var tn,nn,on,rn,an,ln,sn=[],cn=!1;function un(){sn.forEach((function(e){clearInterval(e.pid)})),sn=[]}function dn(){clearInterval(ln)}var hn=$e((function(e,t,n,o){if(t.scroll){var r,a=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=je(),u=!1;nn!==n&&(nn=n,un(),tn=t.scroll,r=t.scrollFn,!0===tn&&(tn=Ve(n,!0)));var d=0,h=tn;do{var f=h,p=ze(f),m=p.top,v=p.bottom,g=p.left,b=p.right,y=p.width,w=p.height,E=void 0,C=void 0,_=f.scrollWidth,S=f.scrollHeight,D=Me(f),T=f.scrollLeft,A=f.scrollTop;f===c?(E=y<_&&("auto"===D.overflowX||"scroll"===D.overflowX||"visible"===D.overflowX),C=w<S&&("auto"===D.overflowY||"scroll"===D.overflowY||"visible"===D.overflowY)):(E=y<_&&("auto"===D.overflowX||"scroll"===D.overflowX),C=w<S&&("auto"===D.overflowY||"scroll"===D.overflowY));var O=E&&(Math.abs(b-a)<=l&&T+y<_)-(Math.abs(g-a)<=l&&!!T),x=C&&(Math.abs(v-i)<=l&&A+w<S)-(Math.abs(m-i)<=l&&!!A);if(!sn[d])for(var k=0;k<=d;k++)sn[k]||(sn[k]={});(sn[d].vx!=O||sn[d].vy!=x||sn[d].el!==f)&&(sn[d].el=f,sn[d].vx=O,sn[d].vy=x,clearInterval(sn[d].pid),(0!=O||0!=x)&&(u=!0,sn[d].pid=setInterval(function(){o&&0===this.layer&&Kt.active._onTouchMove(an);var t=sn[this.layer].vy?sn[this.layer].vy*s:0,n=sn[this.layer].vx?sn[this.layer].vx*s:0;"function"==typeof r&&"continue"!==r.call(Kt.dragged.parentNode[qe],n,t,e,an,sn[this.layer].el)||We(sn[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==c&&(h=Ve(h,!1)));cn=u}}),30),fn=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.activeSortable,a=e.dispatchSortableEvent,i=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||r;i();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(a("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function pn(){}function mn(){}function vn(e){return null==e?e:JSON.parse(JSON.stringify(e))}pn.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=Fe(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:fn},ve(pn,{pluginName:"revertOnSpill"}),mn.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:fn},ve(mn,{pluginName:"removeOnSpill"}),Kt.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?Te(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Te(document,"pointermove",this._handleFallbackAutoScroll):t.touches?Te(document,"touchmove",this._handleFallbackAutoScroll):Te(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?Ae(document,"dragover",this._handleAutoScroll):(Ae(document,"pointermove",this._handleFallbackAutoScroll),Ae(document,"touchmove",this._handleFallbackAutoScroll),Ae(document,"mousemove",this._handleFallbackAutoScroll)),dn(),un(),clearTimeout(Ne),Ne=void 0},nulling:function(){an=nn=tn=cn=ln=on=rn=null,sn.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(o,r);if(an=e,t||this.options.forceAutoScrollFallback||we||ye||Ce){hn(e,this.options,a,t);var i=Ve(a,!0);cn&&(!ln||o!==on||r!==rn)&&(ln&&dn(),ln=setInterval((function(){var a=Ve(document.elementFromPoint(o,r),!0);a!==i&&(i=a,un()),hn(e,n.options,a,t)}),10),on=o,rn=r)}else{if(!this.options.bubbleScroll||Ve(a,!0)===je())return void un();hn(e,this.options,Ve(a,!1),!1)}}},ve(e,{pluginName:"scroll",initializeByDefault:!0})}),Kt.mount(mn,pn);let gn=null,bn=null;function yn(e=null,t=null){gn=e,bn=t}const wn=Symbol("cloneElement");function En(...e){var t,n;const o=null==(t=b())?void 0:t.proxy;let r=null;const a=e[0];let[,i,l]=e;Array.isArray(p(i))||(l=i,i=null);let s=null;const{immediate:c=!0,clone:u=vn,customUpdate:d}=null!=(n=p(l))?n:{};const h={onUpdate:function(e){if(d)return void d(e);const{from:t,item:n,oldIndex:o,oldDraggableIndex:r,newDraggableIndex:a}=e;if(ce(n),se(t,n,o),_(i)){const e=[...p(i)];i.value=ae(e,r,a)}else ae(p(i),r,a)},onStart:function(e){var t;const{from:n,oldIndex:o,item:a}=e;r=Array.from(n.childNodes);const l=p(null==(t=p(i))?void 0:t[o]),s=u(l);yn(l,s),a[wn]=s},onAdd:function(e){const t=e.item[wn];if(!function(e){return void 0===e}(t)){if(ce(e.item),_(i)){const n=[...p(i)];return void(i.value=le(n,e.newDraggableIndex,t))}le(p(i),e.newDraggableIndex,t)}},onRemove:function(e){const{from:t,item:n,oldIndex:o,oldDraggableIndex:r,pullMode:a,clone:l}=e;if(se(t,n,o),"clone"!==a)if(_(i)){const e=[...p(i)];i.value=ie(e,r)}else ie(p(i),r);else ce(l)},onEnd:function(e){const{newIndex:t,oldIndex:n,from:o,to:a}=e;let i=null;const l=t===n&&o===a;try{if(l){let e=null;null==r||r.some(((t,n)=>{if(e&&(null==r?void 0:r.length)!==a.childNodes.length)return o.insertBefore(e,t.nextSibling),!0;const i=a.childNodes[n];e=null==a?void 0:a.replaceChild(t,i)}))}}catch(s){i=s}finally{r=null}E((()=>{if(yn(),i)throw i}))}};function f(e){const t=p(a);return e||(e=function(e){return"string"==typeof e}(t)?function(e,t=document){var n;let o=null;return o="function"==typeof(null==t?void 0:t.querySelector)?null==(n=null==t?void 0:t.querySelector)?void 0:n.call(t,e):document.querySelector(e),o}(t,null==o?void 0:o.$el):t),e&&!function(e){return e instanceof HTMLElement}(e)&&(e=e.$el),e}function m(){var e;const t=null!=(e=p(l))?e:{},{immediate:n,clone:o}=t,r=re(t,["immediate","clone"]);return ue(r,((e,t)=>{(function(e){return 111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)})(e)&&(r[e]=(e,...n)=>(de(e,{data:gn,clonedData:bn}),t(e,...n)))})),function(e,t){const n=oe({},e);return Object.keys(t).forEach((o=>{n[o]?n[o]=function(e,t,n=null){return function(...o){return e.apply(n,o),t.apply(n,o)}}(e[o],t[o]):n[o]=t[o]})),n}(null===i?{}:h,r)}const v=e=>{e=f(e),s&&g.destroy(),s=new Kt(e,m())};y((()=>l),(()=>{s&&ue(m(),((e,t)=>{null==s||s.option(e,t)}))}),{deep:!0});const g={option:(e,t)=>null==s?void 0:s.option(e,t),destroy:()=>{null==s||s.destroy(),s=null},save:()=>null==s?void 0:s.save(),toArray:()=>null==s?void 0:s.toArray(),closest:(...e)=>null==s?void 0:s.closest(...e)};return function(e){b()?w(e):E(e)}((()=>{c&&v()})),function(e){b()&&C(e)}(g.destroy),oe({start:v,pause:()=>null==g?void 0:g.option("disabled",!0),resume:()=>null==g?void 0:g.option("disabled",!1)},g)}const Cn=["update","start","add","remove","choose","unchoose","end","sort","filter","clone","move","change"],_n=d({name:"VueDraggable",model:{prop:"modelValue",event:"update:modelValue"},props:["clone","animation","ghostClass","group","sort","disabled","store","handle","draggable","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","chosenClass","dragClass","ignore","filter","preventOnFilter","easing","setData","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","emptyInsertThreshold","scroll","forceAutoScrollFallback","scrollSensitivity","scrollSpeed","bubbleScroll","modelValue","tag","target","customUpdate",...Cn.map((e=>`on${e.replace(/^\S/,(e=>e.toUpperCase()))}`))],emits:["update:modelValue",...Cn],setup(e,{slots:t,emit:n,expose:o,attrs:r}){const a=Cn.reduce(((e,t)=>(e[`on${t.replace(/^\S/,(e=>e.toUpperCase()))}`]=(...e)=>n(t,...e),e)),{}),i=h((()=>{const t=f(e),{modelValue:n}=t,o=re(t,["modelValue"]),i=Object.entries(o).reduce(((e,[t,n])=>{const o=p(n);return void 0!==o&&(e[t]=o),e}),{});return oe(oe({},a),function(e){return Object.keys(e).reduce(((t,n)=>(void 0!==e[n]&&(t[function(e){return e.replace(/-(\w)/g,((e,t)=>t?t.toUpperCase():""))}(n)]=e[n]),t)),{})}(oe(oe({},r),i)))})),l=h({get:()=>e.modelValue,set:e=>n("update:modelValue",e)}),s=m(),c=v(En(e.target||s,l,i));return o(c),()=>{var n;return g(e.tag||"div",{ref:s},null==(n=null==t?void 0:t.default)?void 0:n.call(t,c))}}}),Sn={class:"table-header"},Dn={class:"left"},Tn={class:"right"},An={class:"iconfont-sys"},On=q(d(s(l({},{name:"ArtTableHeader"}),{__name:"index",props:S({showZebra:{type:Boolean,default:!0},showBorder:{type:Boolean,default:!0},showHeaderBackground:{type:Boolean,default:!0},fullClass:{default:"art-page-view"},layout:{default:"refresh,size,fullscreen,columns,settings"}},{columns:{required:!1,default:()=>[]},columnsModifiers:{}}),emits:S(["refresh"],["update:columns"]),setup(e,{emit:t}){const{t:n}=K(),o=e,r=D(e,"columns"),a=t,i=[{value:$.SMALL,label:n("table.sizeOptions.small")},{value:$.DEFAULT,label:n("table.sizeOptions.default")},{value:$.LARGE,label:n("table.sizeOptions.large")}],l=W(),{tableSize:s,isZebra:c,isBorder:u,isHeaderBackground:d}=T(l),f=h((()=>o.layout.split(",").map((e=>e.trim())))),v=e=>f.value.includes(e),g=()=>{a("refresh")},b=e=>{W().setTableSize(e)},y=m(!1),E=m(""),S=()=>{const e=document.querySelector(`.${o.fullClass}`);e&&(y.value=!y.value,y.value?(E.value=document.body.style.overflow,document.body.style.overflow="hidden",e.classList.add("el-full-screen"),l.setIsFullScreen(!0)):(document.body.style.overflow=E.value,e.classList.remove("el-full-screen"),l.setIsFullScreen(!1)))},H=e=>{"Escape"===e.key&&y.value&&S()};return w((()=>{document.addEventListener("keydown",H)})),C((()=>{if(document.removeEventListener("keydown",H),y.value){document.body.style.overflow=E.value;const e=document.querySelector(`.${o.fullClass}`);e&&e.classList.remove("el-full-screen")}})),(e,t)=>(O(),A("div",Sn,[x("div",Dn,[k(e.$slots,"left",{},void 0,!0)]),x("div",Tn,[v("refresh")?(O(),A("div",{key:0,class:"btn",onClick:g},t[4]||(t[4]=[x("i",{class:"iconfont-sys"},"",-1)]))):N("",!0),v("size")?(O(),I(p(Y),{key:1,onCommand:b},{dropdown:P((()=>[M(p(R),null,{default:P((()=>[(O(),A(L,null,j(i,(e=>x("div",{key:e.value,class:"table-size-btn-item"},[(O(),I(p(z),{key:e.value,command:e.value,class:B({"is-selected":p(s)===e.value})},{default:P((()=>[F(X(e.label),1)])),_:2},1032,["command","class"]))]))),64))])),_:1})])),default:P((()=>[t[5]||(t[5]=x("div",{class:"btn"},[x("i",{class:"iconfont-sys"},"")],-1))])),_:1,__:[5]})):N("",!0),v("fullscreen")?(O(),A("div",{key:2,class:"btn",onClick:S},[x("i",An,X(y.value?"":""),1)])):N("",!0),v("columns")?(O(),I(p(V),{key:3,placement:"bottom",trigger:"click"},{reference:P((()=>t[6]||(t[6]=[x("div",{class:"btn"},[x("i",{class:"iconfont-sys"},"")],-1)]))),default:P((()=>[x("div",null,[M(p(_n),{modelValue:r.value,"onUpdate:modelValue":t[0]||(t[0]=e=>r.value=e)},{default:P((()=>[(O(!0),A(L,null,j(r.value,(e=>(O(),A("div",{key:e.prop||e.type,class:"column-option"},[t[7]||(t[7]=x("div",{class:"drag-icon"},[x("i",{class:"iconfont-sys"},"")],-1)),M(p(U),{modelValue:e.checked,"onUpdate:modelValue":t=>e.checked=t,disabled:e.disabled},{default:P((()=>[F(X(e.label||("selection"===e.type?p(n)("table.selection"):"")),1)])),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])])))),128))])),_:1},8,["modelValue"])])])),_:1})):N("",!0),v("settings")?(O(),I(p(V),{key:4,placement:"bottom",trigger:"click"},{reference:P((()=>t[8]||(t[8]=[x("div",{class:"btn"},[x("i",{class:"iconfont-sys",style:{"font-size":"17px"}},"")],-1)]))),default:P((()=>[x("div",null,[e.showZebra?(O(),I(p(U),{key:0,modelValue:p(c),"onUpdate:modelValue":t[1]||(t[1]=e=>_(c)?c.value=e:null),value:!0},{default:P((()=>[F(X(p(n)("table.zebra")),1)])),_:1},8,["modelValue"])):N("",!0),e.showBorder?(O(),I(p(U),{key:1,modelValue:p(u),"onUpdate:modelValue":t[2]||(t[2]=e=>_(u)?u.value=e:null),value:!0},{default:P((()=>[F(X(p(n)("table.border")),1)])),_:1},8,["modelValue"])):N("",!0),e.showHeaderBackground?(O(),I(p(U),{key:2,modelValue:p(d),"onUpdate:modelValue":t[3]||(t[3]=e=>_(d)?d.value=e:null),value:!0},{default:P((()=>[F(X(p(n)("table.headerBackground")),1)])),_:1},8,["modelValue"])):N("",!0)])])),_:1})):N("",!0),k(e.$slots,"right",{},void 0,!0)])]))}})),[["__scopeId","data-v-4b7f3133"]]),xn={selection:{prop:"__selection__",label:G("table.column.selection")},expand:{prop:"__expand__",label:G("table.column.expand")},index:{prop:"__index__",label:G("table.column.index")}},kn=e=>{var t,n;return null!=(n=null==(t=xn[e.type])?void 0:t.prop)?n:e.prop},Nn=e=>e.map((e=>{var t;const n=e.type&&xn[e.type];return s(l({},e),n?{prop:n.prop,label:n.label,checked:!0}:{checked:null==(t=e.checked)||t})}));var In=(e=>(e.CLEAR_ALL="clear_all",e.CLEAR_CURRENT="clear_current",e.CLEAR_PAGINATION="clear_pagination",e.KEEP_ALL="keep_all",e))(In||{});class Pn{constructor(e=3e5,t=50,n=!1){c(this,"cache",new Map),c(this,"cacheTime"),c(this,"maxSize"),c(this,"enableLog"),this.cacheTime=e,this.maxSize=t,this.enableLog=n}log(e,...t){this.enableLog}generateKey(e){if(!e||"object"!=typeof e)return JSON.stringify(e);const t=this.sortObjectKeys(e);return JSON.stringify(t)}sortObjectKeys(e){const t={},n=Object.keys(e).sort();for(const o of n){const n=e[o];n&&"object"==typeof n&&!Array.isArray(n)?t[o]=this.sortObjectKeys(n):t[o]=n}return t}generateTags(e){const t=new Set,n=Object.keys(e).filter((t=>!["current","size","total"].includes(t)&&void 0!==e[t]&&""!==e[t]&&null!==e[t]));if(n.length>0){const o=n.map((t=>`${t}:${String(e[t])}`)).join("|");t.add(`search:${o}`)}else t.add("search:default");return t.add(`pagination:${e.size||10}`),t.add("pagination"),t}evictLRU(){if(this.cache.size<=this.maxSize)return;let e="",t=1/0,n=1/0;for(const[o,r]of this.cache.entries())(r.accessCount<t||r.accessCount===t&&r.lastAccessTime<n)&&(e=o,t=r.accessCount,n=r.lastAccessTime);e&&(this.cache.delete(e),this.log(`LRU 清理缓存: ${e}`))}set(e,t,n){const o=this.generateKey(e),r=this.generateTags(e),a=Date.now();this.evictLRU(),this.cache.set(o,{data:t,response:n,timestamp:a,params:o,tags:r,accessCount:1,lastAccessTime:a})}get(e){const t=this.generateKey(e),n=this.cache.get(t);return n?Date.now()-n.timestamp>this.cacheTime?(this.cache.delete(t),null):(n.accessCount++,n.lastAccessTime=Date.now(),n):null}clearByTags(e){let t=0;for(const[n,o]of this.cache.entries()){e.some((e=>Array.from(o.tags).some((t=>t.includes(e)))))&&(this.cache.delete(n),t++)}return t}clearCurrentSearch(e){const t=this.generateKey(e);return this.cache.delete(t)?1:0}clearPagination(){return this.clearByTags(["pagination"])}clear(){this.cache.clear()}getStats(){const e=this.cache.size;let t=0,n=0;for(const o of this.cache.values())t+=JSON.stringify(o.data).length,n+=o.accessCount;return{total:e,size:`${(t/1024).toFixed(2)}KB`,hitRate:`${e>0?(n/e).toFixed(1):"0"} avg hits`}}cleanupExpired(){let e=0;const t=Date.now();for(const[n,o]of this.cache.entries())t-o.timestamp>this.cacheTime&&(this.cache.delete(n),e++);return e}}function Mn(e,t){for(const n of t)if(n in e&&Array.isArray(e[n]))return e[n];return[]}function Rn(e,t,n){for(const o of n)if(o in e&&"number"==typeof e[o])return e[o];return t.length}function Ln(e,t){const n={},o=[e,null!=t?t:{}],r=["current","page","pageNum"];for(const i of o){for(const e of r)if(e in i&&"number"==typeof i[e]){n.current=i[e];break}if(void 0!==n.current)break}const a=["size","pageSize","limit"];for(const i of o){for(const e of a)if(e in i&&"number"==typeof i[e]){n.size=i[e];break}if(void 0!==n.size)break}if(void 0!==n.current||void 0!==n.size)return n}const jn=e=>{if(!e)return{records:[],total:0};if(Array.isArray(e))return{records:e,total:e.length};if("object"!=typeof e)return{records:[],total:0};const t=e;let n,o=[],r=0;if(o=Mn(t,["records","data","list","items","result"]),r=Rn(t,o,["total","count"]),n=Ln(t),0===o.length&&"data"in t&&"object"==typeof t.data){const e=t.data;o=Mn(e,["records","list","items"]),r=Rn(e,o,["total","count"]),n=Ln(t,e),Array.isArray(t.data)&&(o=t.data,r=o.length)}if(0===o.length)return{records:[],total:0};const a={records:o,total:r};return n&&Object.assign(a,n),a},zn=(e,t)=>{var n,o;e.total=null!=(o=null!=(n=t.total)?n:e.total)?o:0,void 0!==t.current&&(e.current=t.current),void 0!==t.size&&(e.size=t.size);const r=Math.max(1,Math.ceil(e.total/(e.size||1)));e.current>r&&(e.current=r)};function Bn(e){const{core:{apiFn:t,apiParams:n={},excludeParams:o=[],immediate:r=!0,columnsFactory:a,paginationKey:i={current:"current",size:"size"}},transform:{dataTransformer:c,responseAdapter:d=jn}={},performance:{enableCache:f=!1,cacheTime:p=3e5,debounceTime:g=300,maxCacheSize:b=50}={},hooks:{onSuccess:_,onError:S,onCacheHit:D,resetFormCallback:T}={},debug:{enableLog:A=!1}={}}=e,O=(null==i?void 0:i.current)||"current",x=(null==i?void 0:i.size)||"size",k=m(0),N=(e,...t)=>{},I=f?new Pn(p,b,A):null,P=m(!1),M=m(null),R=m([]);let L=null,j=null;const z=v(Object.assign({[O]:1,[x]:10},n||{})),B=v({current:z[O]||1,size:z[x]||10,total:0}),{width:F}=J(),X=h((()=>s(l({},B),{small:F.value<768}))),Y=a?function(e){const t=m(e()),n=m(Nn(t.value));y(t,(e=>{const t=new Map(n.value.map((e=>{var t;return[kn(e),null==(t=e.checked)||t]}))),o=Nn(e).map((e=>s(l({},e),{checked:t.has(kn(e))?t.get(kn(e)):e.checked})));n.value=o}),{deep:!0});const o=h((()=>{const e=new Map(t.value.map((e=>[kn(e),e])));return n.value.filter((e=>e.checked)).map((t=>e.get(kn(t)))).filter(Boolean)})),r=e=>{const n=[...t.value],o=e(n);t.value=Array.isArray(o)?o:n};return{columns:o,columnChecks:n,addColumn:(e,t)=>r((n=>{const o=[...n];return"number"==typeof t&&t>=0&&t<=o.length?o.splice(t,0,e):o.push(e),o})),removeColumn:e=>r((t=>t.filter((t=>kn(t)!==e)))),updateColumn:(e,t)=>r((n=>n.map((n=>kn(n)===e?l(l({},n),t):n)))),toggleColumn:(e,t)=>{const o=n.value.findIndex((t=>kn(t)===e));if(o>-1){const e=[...n.value];e[o]=s(l({},e[o]),{checked:null!=t?t:!e[o].checked}),n.value=e}},resetColumns:()=>{t.value=e()},batchUpdateColumns:e=>r((t=>{const n=new Map(e.map((e=>[e.prop,e.updates])));return t.map((e=>{const t=kn(e),o=n.get(t);return o?l(l({},e),o):e}))})),reorderColumns:(e,t)=>r((n=>{if(e<0||e>=n.length||t<0||t>=n.length||e===t)return n;const o=[...n],[r]=o.splice(e,1);return o.splice(t,0,r),o})),getColumnConfig:e=>t.value.find((t=>kn(t)===e)),getAllColumns:()=>[...t.value]}}(a):null,U=null==Y?void 0:Y.columns,V=null==Y?void 0:Y.columnChecks,$=h((()=>R.value.length>0)),W=h((()=>(k.value,I?I.getStats():{total:0,size:"0KB",hitRate:"0 avg hits"}))),K=(e=>{const t=(e,...t)=>{};return(n,o)=>{const r={code:"UNKNOWN_ERROR",message:"未知错误",details:n};return n instanceof Error?(r.message=n.message,r.code=n.name):"string"==typeof n&&(r.message=n),t(`${o}:`,n),null==e||e(r),r}})(S,A),G=(e,t)=>{if(!I)return;let n=0;switch(e){case In.CLEAR_ALL:I.clear(),N(`清空所有缓存 - ${t||""}`);break;case In.CLEAR_CURRENT:n=I.clearCurrentSearch(z),N(`清空当前搜索缓存 ${n} 条 - ${t||""}`);break;case In.CLEAR_PAGINATION:n=I.clearPagination(),N(`清空分页缓存 ${n} 条 - ${t||""}`);break;case In.KEEP_ALL:default:N(`保持缓存不变 - ${t||""}`)}k.value++},q=(e,...n)=>u(this,[e,...n],(function*(e,n=f){L&&L.abort();const r=new AbortController;L=r,P.value=!0,M.value=null;try{let a=Object.assign({},z,{[O]:B.current,[x]:B.size},e||{});if(o.length>0){const e=l({},a);o.forEach((t=>{delete e[t]})),a=e}if(n&&I){const e=I.get(a);if(e)return R.value=e.data,zn(B,e.response),z[O]!==B.current&&(z[O]=B.current),z[x]!==B.size&&(z[x]=B.size),P.value=!1,D&&D(e.data,e.response),N("缓存命中"),e.response}const i=yield t(a);if(r.signal.aborted)throw new Error("请求已取消");const s=d(i);let u=(e=>{const t=e.records||e.data||[];return Array.isArray(t)?t:[]})(s);return c&&(u=c(u)),R.value=u,zn(B,s),z[O]!==B.current&&(z[O]=B.current),z[x]!==B.size&&(z[x]=B.size),n&&I&&(I.set(a,u,s),k.value++,N("数据已缓存")),_&&_(u,s),s}catch(a){if(a instanceof Error&&"请求已取消"===a.message)return{records:[],total:0,current:1,size:20};R.value=[];throw K(a,"获取表格数据失败")}finally{P.value=!1,L===r&&(L=null)}})),Z=e=>u(this,null,(function*(){try{return yield q(e)}catch(t){return Promise.resolve()}})),Q=e=>u(this,null,(function*(){B.current=1,z[O]=1,G(In.CLEAR_CURRENT,"搜索数据");try{return yield q(e,!1)}catch(t){return Promise.resolve()}})),ee=((e,t)=>{let n=null,o=null,r=null,a=null;const i=(...i)=>new Promise(((l,s)=>{n&&clearTimeout(n),o=i,r=l,a=s,n=setTimeout((()=>u(void 0,null,(function*(){try{const t=yield e(...i);l(t)}catch(M){s(M)}finally{n=null,o=null,r=null,a=null}}))),t)}));return i.cancel=()=>{n&&clearTimeout(n),n=null,o=null,r=null,a=null},i.flush=()=>u(void 0,null,(function*(){if(n&&o&&r&&a){clearTimeout(n),n=null;const t=o,i=r,l=a;o=null,r=null,a=null;try{const n=yield e(...t);return i(n),n}catch(M){throw l(M),M}}return Promise.resolve()})),i})(Q,g);let te=!1;const ne=()=>{L&&L.abort(),ee.cancel()};return f&&I&&(j=setInterval((()=>{const e=I.cleanupExpired();e>0&&(N(`自动清理 ${e} 条过期缓存`),k.value++)}),p/2)),r&&w((()=>u(this,null,(function*(){yield Z()})))),C((()=>{ne(),I&&I.clear(),j&&clearInterval(j)})),l({data:R,loading:H(P),error:H(M),isEmpty:h((()=>0===R.value.length)),hasData:$,pagination:H(B),paginationMobile:X,handleSizeChange:e=>u(this,null,(function*(){e<=0||(ee.cancel(),B.size=e,B.current=1,z[x]=e,z[O]=1,G(In.CLEAR_CURRENT,"分页大小变化"),yield Z())})),handleCurrentChange:e=>u(this,null,(function*(){if(!(e<=0||te))if(B.current!==e)try{te=!0,B.current=e,z[O]!==e&&(z[O]=e),yield Z()}finally{te=!1}else N("分页页码未变化,跳过请求")})),searchParams:z,resetSearchParams:()=>u(this,null,(function*(){ee.cancel();const e={[O]:1,[x]:z[x]||10};Object.keys(z).forEach((e=>{delete z[e]})),Object.assign(z,n||{},e),B.current=1,B.size=e[x],M.value=null,G(In.CLEAR_ALL,"重置搜索"),yield Z(),T&&(yield E(),T())})),fetchData:Z,getData:Q,getDataDebounced:ee,clearData:()=>{R.value=[],M.value=null,G(In.CLEAR_ALL,"清空数据")},refreshData:()=>u(this,null,(function*(){ee.cancel(),G(In.CLEAR_ALL,"手动刷新"),yield Z()})),refreshSoft:()=>u(this,null,(function*(){G(In.CLEAR_CURRENT,"软刷新"),yield Z()})),refreshCreate:()=>u(this,null,(function*(){ee.cancel(),B.current=1,z[O]=1,G(In.CLEAR_PAGINATION,"新增数据"),yield Z()})),refreshUpdate:()=>u(this,null,(function*(){G(In.CLEAR_CURRENT,"编辑数据"),yield Z()})),refreshRemove:()=>u(this,null,(function*(){const{total:e,size:t,current:n}=B,o=n===Math.max(1,Math.ceil(e/t)),r=1===R.value.length,a=o&&0===R.value.length;(r&&n>1||a)&&(B.current-=1,z[O]=B.current),G(In.CLEAR_CURRENT,"删除数据"),yield Z()})),cacheInfo:W,clearCache:G,clearExpiredCache:()=>{if(!I)return 0;const e=I.cleanupExpired();return e>0&&k.value++,e},cancelRequest:ne},Y&&{columns:U,columnChecks:V,addColumn:Y.addColumn,removeColumn:Y.removeColumn,toggleColumn:Y.toggleColumn,updateColumn:Y.updateColumn,batchUpdateColumns:Y.batchUpdateColumns,reorderColumns:Y.reorderColumns,getColumnConfig:Y.getColumnConfig,getAllColumns:Y.getAllColumns,resetColumns:Y.resetColumns})}export{On as _,Bn as u};