geekin-devtoys 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/GDialog/index.js +1 -1
- package/lib/GDialog/index.mjs +1 -1
- package/lib/GPercent/index.js +1 -1
- package/lib/GPercent/index.mjs +27 -27
- package/lib/GPercent/style.css +1 -1
- package/lib/GPluginVideo/index.js +14 -0
- package/lib/GPluginVideo/index.mjs +2490 -0
- package/lib/GTable/index.js +1 -1
- package/lib/GTable/index.mjs +1472 -72
- package/lib/GTable/style.css +1 -1
- package/lib/GVideo/index.js +1 -1
- package/lib/GVideo/index.mjs +1 -1
- package/lib/GVideo/style.css +1 -1
- package/lib/{index-BOura9rV.js → index-B86xv9Xx.js} +1 -1
- package/lib/{index-BPwO5l8J.mjs → index-DSzb017c.mjs} +35 -20
- package/package.json +12 -5
package/lib/GTable/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("../index-BOura9rV.js"),w=require("../_plugin-vue_export-helper-BHFhmbuH.js"),b={class:"g-table"},v={key:1},k={class:"g-dropdown-link"},y=e.defineComponent({name:"CmTable",inheritAttrs:!1,__name:"index",props:{data:{default:()=>[]},loading:{type:Boolean,default:!1},pagination:{type:Boolean,default:!1},total:{default:0},operationLabel:{default:"操作"},isExpandAll:{type:Boolean,default:!1},currentPage:{default:1},pageSize:{default:10},operaWidth:{default:150}},emits:["update:currentPage","update:pageSize","size-change","current-change"],setup(l,{emit:d}){const r=l,n=d,i=t=>{n("update:pageSize",t),n("size-change",t)},p=t=>{n("update:currentPage",t),n("current-change",t)},u=e.useSlots();return e.computed(()=>u.moreOperations?150:100),(t,s)=>{const c=e.resolveComponent("el-icon"),m=e.resolveComponent("el-dropdown-menu"),g=e.resolveComponent("el-dropdown"),_=e.resolveComponent("el-table-column"),f=e.resolveComponent("el-table"),h=e.resolveComponent("el-pagination");return e.openBlock(),e.createElementBlock("div",b,[e.createElementVNode("div",null,[e.renderSlot(t.$slots,"operate",{},void 0,!0)]),e.createVNode(f,e.mergeProps({data:t.data||[]},t.$attrs,{loading:t.loading||!1,stripe:""}),{empty:e.withCtx(()=>[t.$slots.empty?e.renderSlot(t.$slots,"empty",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock("span",v,"暂无数据"))]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0),t.$slots.operations?(e.openBlock(),e.createBlock(_,{key:0,fixed:"right",label:t.operationLabel||"操作",width:t.operaWidth},{default:e.withCtx(a=>[e.renderSlot(t.$slots,"operations",{row:a.row,index:a.$index},void 0,!0),t.$slots.moreOperations?(e.openBlock(),e.createBlock(g,{key:0,size:"small",style:{"vertical-align":"baseline"}},{dropdown:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[e.renderSlot(t.$slots,"moreOperations",{row:a.row,index:a.$index},void 0,!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createElementVNode("span",k,[s[0]||(s[0]=e.createTextVNode(" 更多 ")),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(e.unref(C.arrow_down_default))]),_:1})])]),_:2},1024)):e.createCommentVNode("",!0)]),_:3},8,["label","width"])):e.createCommentVNode("",!0)]),_:3},16,["data","loading"]),t.pagination?(e.openBlock(),e.createBlock(h,e.mergeProps({key:0,class:"g-pagination-contianer"},t.$attrs,{"current-page":r.currentPage,"page-size":r.pageSize,"page-sizes":[10,20,50,100],total:r.total||0,layout:"total, sizes, prev, pager, next",onSizeChange:i,onCurrentChange:p}),null,16,["current-page","page-size","total"])):e.createCommentVNode("",!0)])}}}),o=w._export_sfc(y,[["__scopeId","data-v-6bd5b10b"]]);o.install=l=>{l.component(o.name,o)};exports.GTable=o;exports.default=o;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("vue"),dt=require("../index-B86xv9Xx.js"),Bt=require("../_plugin-vue_export-helper-BHFhmbuH.js");function ct(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function j(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ct(Object(t),!0).forEach(function(n){Rt(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ct(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function Fe(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fe=function(e){return typeof e}:Fe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fe(o)}function Rt(o,e,t){return e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function K(){return K=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(o[n]=t[n])}return o},K.apply(this,arguments)}function Xt(o,e){if(o==null)return{};var t={},n=Object.keys(o),r,i;for(i=0;i<n.length;i++)r=n[i],!(e.indexOf(r)>=0)&&(t[r]=o[r]);return t}function Yt(o,e){if(o==null)return{};var t=Xt(o,e),n,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);for(r=0;r<i.length;r++)n=i[r],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(o,n)&&(t[n]=o[n])}return t}var zt="1.15.6";function U(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var Z=U(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ie=U(/Edge/i),ft=U(/firefox/i),Ee=U(/safari/i)&&!U(/chrome/i)&&!U(/android/i),it=U(/iP(ad|od|hone)/i),wt=U(/chrome/i)&&U(/android/i),_t={capture:!1,passive:!1};function E(o,e,t){o.addEventListener(e,t,!Z&&_t)}function _(o,e,t){o.removeEventListener(e,t,!Z&&_t)}function ze(o,e){if(e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function Et(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function $(o,e,t,n){if(o){t=t||document;do{if(e!=null&&(e[0]===">"?o.parentNode===t&&ze(o,e):ze(o,e))||n&&o===t)return o;if(o===t)break}while(o=Et(o))}return null}var ht=/\s+/g;function H(o,e,t){if(o&&e)if(o.classList)o.classList[t?"add":"remove"](e);else{var n=(" "+o.className+" ").replace(ht," ").replace(" "+e+" "," ");o.className=(n+(t?" "+e:"")).replace(ht," ")}}function g(o,e,t){var n=o&&o.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(t=o.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function fe(o,e){var t="";if(typeof o=="string")t=o;else do{var n=g(o,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(o=o.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function St(o,e,t){if(o){var n=o.getElementsByTagName(e),r=0,i=n.length;if(t)for(;r<i;r++)t(n[r],r);return n}return[]}function V(){var o=document.scrollingElement;return o||document.documentElement}function I(o,e,t,n,r){if(!(!o.getBoundingClientRect&&o!==window)){var i,a,l,s,u,f,c;if(o!==window&&o.parentNode&&o!==V()?(i=o.getBoundingClientRect(),a=i.top,l=i.left,s=i.bottom,u=i.right,f=i.height,c=i.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,f=window.innerHeight,c=window.innerWidth),(e||t)&&o!==window&&(r=r||o.parentNode,!Z))do if(r&&r.getBoundingClientRect&&(g(r,"transform")!=="none"||t&&g(r,"position")!=="static")){var w=r.getBoundingClientRect();a-=w.top+parseInt(g(r,"border-top-width")),l-=w.left+parseInt(g(r,"border-left-width")),s=a+i.height,u=l+i.width;break}while(r=r.parentNode);if(n&&o!==window){var p=fe(r||o),b=p&&p.a,y=p&&p.d;p&&(a/=y,l/=b,c/=b,f/=y,s=a+f,u=l+c)}return{top:a,left:l,bottom:s,right:u,width:c,height:f}}}function pt(o,e,t){for(var n=ne(o,!0),r=I(o)[e];n;){var i=I(n)[t],a=void 0;if(a=r>=i,!a)return n;if(n===V())break;n=ne(n,!1)}return!1}function he(o,e,t,n){for(var r=0,i=0,a=o.children;i<a.length;){if(a[i].style.display!=="none"&&a[i]!==m.ghost&&(n||a[i]!==m.dragged)&&$(a[i],t.draggable,o,!1)){if(r===e)return a[i];r++}i++}return null}function at(o,e){for(var t=o.lastElementChild;t&&(t===m.ghost||g(t,"display")==="none"||e&&!ze(t,e));)t=t.previousElementSibling;return t||null}function L(o,e){var t=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==m.clone&&(!e||ze(o,e))&&t++;return t}function gt(o){var e=0,t=0,n=V();if(o)do{var r=fe(o),i=r.a,a=r.d;e+=o.scrollLeft*i,t+=o.scrollTop*a}while(o!==n&&(o=o.parentNode));return[e,t]}function Ht(o,e){for(var t in o)if(o.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===o[t][n])return Number(t)}return-1}function ne(o,e){if(!o||!o.getBoundingClientRect)return V();var t=o,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=g(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return V();if(n||e)return t;n=!0}}while(t=t.parentNode);return V()}function Gt(o,e){if(o&&e)for(var t in e)e.hasOwnProperty(t)&&(o[t]=e[t]);return o}function Ve(o,e){return Math.round(o.top)===Math.round(e.top)&&Math.round(o.left)===Math.round(e.left)&&Math.round(o.height)===Math.round(e.height)&&Math.round(o.width)===Math.round(e.width)}var Se;function Dt(o,e){return function(){if(!Se){var t=arguments,n=this;t.length===1?o.call(n,t[0]):o.apply(n,t),Se=setTimeout(function(){Se=void 0},e)}}}function Lt(){clearTimeout(Se),Se=void 0}function Ct(o,e,t){o.scrollLeft+=e,o.scrollTop+=t}function Tt(o){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(o).cloneNode(!0):t?t(o).clone(!0)[0]:o.cloneNode(!0)}function Ot(o,e,t){var n={};return Array.from(o.children).forEach(function(r){var i,a,l,s;if(!(!$(r,e.draggable,o,!1)||r.animated||r===t)){var u=I(r);n.left=Math.min((i=n.left)!==null&&i!==void 0?i:1/0,u.left),n.top=Math.min((a=n.top)!==null&&a!==void 0?a:1/0,u.top),n.right=Math.max((l=n.right)!==null&&l!==void 0?l:-1/0,u.right),n.bottom=Math.max((s=n.bottom)!==null&&s!==void 0?s:-1/0,u.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var X="Sortable"+new Date().getTime();function Wt(){var o=[],e;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(r){if(!(g(r,"display")==="none"||r===m.ghost)){o.push({target:r,rect:I(r)});var i=j({},o[o.length-1].rect);if(r.thisAnimationDuration){var a=fe(r,!0);a&&(i.top-=a.f,i.left-=a.e)}r.fromRect=i}})}},addAnimationState:function(n){o.push(n)},removeAnimationState:function(n){o.splice(Ht(o,{target:n}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var i=!1,a=0;o.forEach(function(l){var s=0,u=l.target,f=u.fromRect,c=I(u),w=u.prevFromRect,p=u.prevToRect,b=l.rect,y=fe(u,!0);y&&(c.top-=y.f,c.left-=y.e),u.toRect=c,u.thisAnimationDuration&&Ve(w,c)&&!Ve(f,c)&&(b.top-c.top)/(b.left-c.left)===(f.top-c.top)/(f.left-c.left)&&(s=Vt(b,w,p,r.options)),Ve(c,f)||(u.prevFromRect=f,u.prevToRect=c,s||(s=r.options.animation),r.animate(u,b,c,s)),s&&(i=!0,a=Math.max(a,s),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},s),u.thisAnimationDuration=s)}),clearTimeout(e),i?e=setTimeout(function(){typeof n=="function"&&n()},a):typeof n=="function"&&n(),o=[]},animate:function(n,r,i,a){if(a){g(n,"transition",""),g(n,"transform","");var l=fe(this.el),s=l&&l.a,u=l&&l.d,f=(r.left-i.left)/(s||1),c=(r.top-i.top)/(u||1);n.animatingX=!!f,n.animatingY=!!c,g(n,"transform","translate3d("+f+"px,"+c+"px,0)"),this.forRepaintDummy=$t(n),g(n,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),g(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){g(n,"transition",""),g(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},a)}}}}function $t(o){return o.offsetWidth}function Vt(o,e,t,n){return Math.sqrt(Math.pow(e.top-o.top,2)+Math.pow(e.left-o.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var se=[],je={initializeByDefault:!0},Pe={mount:function(e){for(var t in je)je.hasOwnProperty(t)&&!(t in e)&&(e[t]=je[t]);se.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),se.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=e+"Global";se.forEach(function(a){t[a.pluginName]&&(t[a.pluginName][i]&&t[a.pluginName][i](j({sortable:t},n)),t.options[a.pluginName]&&t[a.pluginName][e]&&t[a.pluginName][e](j({sortable:t},n)))})},initializePlugins:function(e,t,n,r){se.forEach(function(l){var s=l.pluginName;if(!(!e.options[s]&&!l.initializeByDefault)){var u=new l(e,t,e.options);u.sortable=e,u.options=e.options,e[s]=u,K(n,u.defaults)}});for(var i in e.options)if(e.options.hasOwnProperty(i)){var a=this.modifyOption(e,i,e.options[i]);typeof a<"u"&&(e.options[i]=a)}},getEventProperties:function(e,t){var n={};return se.forEach(function(r){typeof r.eventProperties=="function"&&K(n,r.eventProperties.call(t[r.pluginName],e))}),n},modifyOption:function(e,t,n){var r;return se.forEach(function(i){e[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[t]=="function"&&(r=i.optionListeners[t].call(e[i.pluginName],n))}),r}};function jt(o){var e=o.sortable,t=o.rootEl,n=o.name,r=o.targetEl,i=o.cloneEl,a=o.toEl,l=o.fromEl,s=o.oldIndex,u=o.newIndex,f=o.oldDraggableIndex,c=o.newDraggableIndex,w=o.originalEvent,p=o.putSortable,b=o.extraEventProperties;if(e=e||t&&t[X],!!e){var y,C=e.options,N="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Z&&!Ie?y=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(n,!0,!0)),y.to=a||t,y.from=l||t,y.item=r||t,y.clone=i,y.oldIndex=s,y.newIndex=u,y.oldDraggableIndex=f,y.newDraggableIndex=c,y.originalEvent=w,y.pullMode=p?p.lastPutMode:void 0;var P=j(j({},b),Pe.getEventProperties(n,e));for(var F in P)y[F]=P[F];t&&t.dispatchEvent(y),C[N]&&C[N].call(e,y)}}var qt=["evt"],R=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,i=Yt(n,qt);Pe.pluginEvent.bind(m)(e,t,j({dragEl:d,parentEl:T,ghostEl:v,rootEl:S,nextEl:le,lastDownEl:Be,cloneEl:D,cloneHidden:te,dragStarted:ye,putSortable:M,activeSortable:m.active,originalEvent:r,oldIndex:ce,oldDraggableIndex:De,newIndex:G,newDraggableIndex:ee,hideGhostForTarget:xt,unhideGhostForTarget:At,cloneNowHidden:function(){te=!0},cloneNowShown:function(){te=!1},dispatchSortableEvent:function(l){B({sortable:t,name:l,originalEvent:r})}},i))};function B(o){jt(j({putSortable:M,cloneEl:D,targetEl:d,rootEl:S,oldIndex:ce,oldDraggableIndex:De,newIndex:G,newDraggableIndex:ee},o))}var d,T,v,S,le,Be,D,te,ce,G,De,ee,xe,M,de=!1,He=!1,Ge=[],ie,W,qe,Ue,mt,vt,ye,ue,Ce,Te=!1,Ae=!1,Re,k,Ke=[],tt=!1,Le=[],$e=typeof document<"u",Me=it,bt=Ie||Z?"cssFloat":"float",Ut=$e&&!wt&&!it&&"draggable"in document.createElement("div"),It=(function(){if($e){if(Z)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}})(),Pt=function(e,t){var n=g(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=he(e,0,t),a=he(e,1,t),l=i&&g(i),s=a&&g(a),u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+I(i).width,f=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+I(a).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(i&&l.float&&l.float!=="none"){var c=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===c)?"vertical":"horizontal"}return i&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||u>=r&&n[bt]==="none"||a&&n[bt]==="none"&&u+f>r)?"vertical":"horizontal"},Kt=function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,a=n?e.width:e.height,l=n?t.left:t.top,s=n?t.right:t.bottom,u=n?t.width:t.height;return r===l||i===s||r+a/2===l+u/2},Zt=function(e,t){var n;return Ge.some(function(r){var i=r[X].options.emptyInsertThreshold;if(!(!i||at(r))){var a=I(r),l=e>=a.left-i&&e<=a.right+i,s=t>=a.top-i&&t<=a.bottom+i;if(l&&s)return n=r}}),n},Nt=function(e){function t(i,a){return function(l,s,u,f){var c=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(i==null&&(a||c))return!0;if(i==null||i===!1)return!1;if(a&&i==="clone")return i;if(typeof i=="function")return t(i(l,s,u,f),a)(l,s,u,f);var w=(a?l:s).options.group.name;return i===!0||typeof i=="string"&&i===w||i.join&&i.indexOf(w)>-1}}var n={},r=e.group;(!r||Fe(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},xt=function(){!It&&v&&g(v,"display","none")},At=function(){!It&&v&&g(v,"display","")};$e&&!wt&&document.addEventListener("click",function(o){if(He)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),He=!1,!1},!0);var ae=function(e){if(d){e=e.touches?e.touches[0]:e;var t=Zt(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[X]._onDragOver(n)}}},Qt=function(e){d&&d.parentNode[X]._isOutsideThisEl(e.target)};function m(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=K({},e),o[X]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pt(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:m.supportPointer!==!1&&"PointerEvent"in window&&(!Ee||it),emptyInsertThreshold:5};Pe.initializePlugins(this,o,t);for(var n in t)!(n in e)&&(e[n]=t[n]);Nt(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:Ut,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?E(o,"pointerdown",this._onTapStart):(E(o,"mousedown",this._onTapStart),E(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(E(o,"dragover",this),E(o,"dragenter",this)),Ge.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),K(this,Wt())}m.prototype={constructor:m,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(ue=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,d):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,a=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(l||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,f=r.filter;if(ln(n),!d&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||r.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Ee&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=$(s,r.draggable,n,!1),!(s&&s.animated)&&Be!==s)){if(ce=L(s),De=L(s,r.draggable),typeof f=="function"){if(f.call(this,e,s,this)){B({sortable:t,rootEl:u,name:"filter",targetEl:s,toEl:n,fromEl:n}),R("filter",t,{evt:e}),i&&e.preventDefault();return}}else if(f&&(f=f.split(",").some(function(c){if(c=$(u,c.trim(),n,!1),c)return B({sortable:t,rootEl:c,name:"filter",targetEl:s,fromEl:n,toEl:n}),R("filter",t,{evt:e}),!0}),f)){i&&e.preventDefault();return}r.handle&&!$(u,r.handle,n,!1)||this._prepareDragStart(e,l,s)}}},_prepareDragStart:function(e,t,n){var r=this,i=r.el,a=r.options,l=i.ownerDocument,s;if(n&&!d&&n.parentNode===i){var u=I(n);if(S=i,d=n,T=d.parentNode,le=d.nextSibling,Be=n,xe=a.group,m.dragged=d,ie={target:d,clientX:(t||e).clientX,clientY:(t||e).clientY},mt=ie.clientX-u.left,vt=ie.clientY-u.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,d.style["will-change"]="all",s=function(){if(R("delayEnded",r,{evt:e}),m.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!ft&&r.nativeDraggable&&(d.draggable=!0),r._triggerDragStart(e,t),B({sortable:r,name:"choose",originalEvent:e}),H(d,a.chosenClass,!0)},a.ignore.split(",").forEach(function(f){St(d,f.trim(),Ze)}),E(l,"dragover",ae),E(l,"mousemove",ae),E(l,"touchmove",ae),a.supportPointer?(E(l,"pointerup",r._onDrop),!this.nativeDraggable&&E(l,"pointercancel",r._onDrop)):(E(l,"mouseup",r._onDrop),E(l,"touchend",r._onDrop),E(l,"touchcancel",r._onDrop)),ft&&this.nativeDraggable&&(this.options.touchStartThreshold=4,d.draggable=!0),R("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Ie||Z))){if(m.eventCanceled){this._onDrop();return}a.supportPointer?(E(l,"pointerup",r._disableDelayedDrag),E(l,"pointercancel",r._disableDelayedDrag)):(E(l,"mouseup",r._disableDelayedDrag),E(l,"touchend",r._disableDelayedDrag),E(l,"touchcancel",r._disableDelayedDrag)),E(l,"mousemove",r._delayedDragTouchMoveHandler),E(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&E(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_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(){d&&Ze(d),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;_(e,"mouseup",this._disableDelayedDrag),_(e,"touchend",this._disableDelayedDrag),_(e,"touchcancel",this._disableDelayedDrag),_(e,"pointerup",this._disableDelayedDrag),_(e,"pointercancel",this._disableDelayedDrag),_(e,"mousemove",this._delayedDragTouchMoveHandler),_(e,"touchmove",this._delayedDragTouchMoveHandler),_(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?E(document,"pointermove",this._onTouchMove):t?E(document,"touchmove",this._onTouchMove):E(document,"mousemove",this._onTouchMove):(E(d,"dragend",this),E(S,"dragstart",this._onDragStart));try{document.selection?Xe(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(de=!1,S&&d){R("dragStarted",this,{evt:t}),this.nativeDraggable&&E(document,"dragover",Qt);var n=this.options;!e&&H(d,n.dragClass,!1),H(d,n.ghostClass,!0),m.active=this,e&&this._appendGhost(),B({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(W){this._lastX=W.clientX,this._lastY=W.clientY,xt();for(var e=document.elementFromPoint(W.clientX,W.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(W.clientX,W.clientY),e!==t);)t=e;if(d.parentNode[X]._isOutsideThisEl(e),t)do{if(t[X]){var n=void 0;if(n=t[X]._onDragOver({clientX:W.clientX,clientY:W.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=Et(t));At()}},_onTouchMove:function(e){if(ie){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,a=v&&fe(v,!0),l=v&&a&&a.a,s=v&&a&&a.d,u=Me&&k&>(k),f=(i.clientX-ie.clientX+r.x)/(l||1)+(u?u[0]-Ke[0]:0)/(l||1),c=(i.clientY-ie.clientY+r.y)/(s||1)+(u?u[1]-Ke[1]:0)/(s||1);if(!m.active&&!de){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(v){a?(a.e+=f-(qe||0),a.f+=c-(Ue||0)):a={a:1,b:0,c:0,d:1,e:f,f:c};var w="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");g(v,"webkitTransform",w),g(v,"mozTransform",w),g(v,"msTransform",w),g(v,"transform",w),qe=f,Ue=c,W=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!v){var e=this.options.fallbackOnBody?document.body:S,t=I(d,!0,Me,!0,e),n=this.options;if(Me){for(k=e;g(k,"position")==="static"&&g(k,"transform")==="none"&&k!==document;)k=k.parentNode;k!==document.body&&k!==document.documentElement?(k===document&&(k=V()),t.top+=k.scrollTop,t.left+=k.scrollLeft):k=V(),Ke=gt(k)}v=d.cloneNode(!0),H(v,n.ghostClass,!1),H(v,n.fallbackClass,!0),H(v,n.dragClass,!0),g(v,"transition",""),g(v,"transform",""),g(v,"box-sizing","border-box"),g(v,"margin",0),g(v,"top",t.top),g(v,"left",t.left),g(v,"width",t.width),g(v,"height",t.height),g(v,"opacity","0.8"),g(v,"position",Me?"absolute":"fixed"),g(v,"zIndex","100000"),g(v,"pointerEvents","none"),m.ghost=v,e.appendChild(v),g(v,"transform-origin",mt/parseInt(v.style.width)*100+"% "+vt/parseInt(v.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,i=n.options;if(R("dragStart",this,{evt:e}),m.eventCanceled){this._onDrop();return}R("setupClone",this),m.eventCanceled||(D=Tt(d),D.removeAttribute("id"),D.draggable=!1,D.style["will-change"]="",this._hideClone(),H(D,this.options.chosenClass,!1),m.clone=D),n.cloneId=Xe(function(){R("clone",n),!m.eventCanceled&&(n.options.removeCloneOnHide||S.insertBefore(D,d),n._hideClone(),B({sortable:n,name:"clone"}))}),!t&&H(d,i.dragClass,!0),t?(He=!0,n._loopId=setInterval(n._emulateDragOver,50)):(_(document,"mouseup",n._onDrop),_(document,"touchend",n._onDrop),_(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,d)),E(document,"drop",n),g(d,"transform","translateZ(0)")),de=!0,n._dragStartId=Xe(n._dragStarted.bind(n,t,e)),E(document,"selectstart",n),ye=!0,window.getSelection().removeAllRanges(),Ee&&g(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,r,i,a,l=this.options,s=l.group,u=m.active,f=xe===s,c=l.sort,w=M||u,p,b=this,y=!1;if(tt)return;function C(be,kt){R(be,b,j({evt:e,isOwner:f,axis:p?"vertical":"horizontal",revert:a,dragRect:r,targetRect:i,canSort:c,fromSortable:w,target:n,completed:P,onMove:function(ut,Ft){return ke(S,t,d,r,ut,I(ut),e,Ft)},changed:F},kt))}function N(){C("dragOverAnimationCapture"),b.captureAnimationState(),b!==w&&w.captureAnimationState()}function P(be){return C("dragOverCompleted",{insertion:be}),be&&(f?u._hideClone():u._showClone(b),b!==w&&(H(d,M?M.options.ghostClass:u.options.ghostClass,!1),H(d,l.ghostClass,!0)),M!==b&&b!==m.active?M=b:b===m.active&&M&&(M=null),w===b&&(b._ignoreWhileAnimating=n),b.animateAll(function(){C("dragOverAnimationComplete"),b._ignoreWhileAnimating=null}),b!==w&&(w.animateAll(),w._ignoreWhileAnimating=null)),(n===d&&!d.animated||n===t&&!n.animated)&&(ue=null),!l.dragoverBubble&&!e.rootEl&&n!==document&&(d.parentNode[X]._isOutsideThisEl(e.target),!be&&ae(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),y=!0}function F(){G=L(d),ee=L(d,l.draggable),B({sortable:b,name:"change",toEl:t,newIndex:G,newDraggableIndex:ee,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=$(n,l.draggable,t,!0),C("dragOver"),m.eventCanceled)return y;if(d.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||b._ignoreWhileAnimating===n)return P(!1);if(He=!1,u&&!l.disabled&&(f?c||(a=T!==S):M===this||(this.lastPutMode=xe.checkPull(this,u,d,e))&&s.checkPut(this,u,d,e))){if(p=this._getDirection(e,n)==="vertical",r=I(d),C("dragOverValid"),m.eventCanceled)return y;if(a)return T=S,N(),this._hideClone(),C("revert"),m.eventCanceled||(le?S.insertBefore(d,le):S.appendChild(d)),P(!0);var x=at(t,l.draggable);if(!x||nn(e,p,this)&&!x.animated){if(x===d)return P(!1);if(x&&t===e.target&&(n=x),n&&(i=I(n)),ke(S,t,d,r,n,i,e,!!n)!==!1)return N(),x&&x.nextSibling?t.insertBefore(d,x.nextSibling):t.appendChild(d),T=t,F(),P(!0)}else if(x&&tn(e,p,this)){var A=he(t,0,l,!0);if(A===d)return P(!1);if(n=A,i=I(n),ke(S,t,d,r,n,i,e,!1)!==!1)return N(),t.insertBefore(d,A),T=t,F(),P(!0)}else if(n.parentNode===t){i=I(n);var Y=0,oe,pe=d.parentNode!==t,z=!Kt(d.animated&&d.toRect||r,n.animated&&n.toRect||i,p),ge=p?"top":"left",Q=pt(n,"top","top")||pt(d,"top","top"),me=Q?Q.scrollTop:void 0;ue!==n&&(oe=i[ge],Te=!1,Ae=!z&&l.invertSwap||pe),Y=on(e,n,i,p,z?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Ae,ue===n);var q;if(Y!==0){var re=L(d);do re-=Y,q=T.children[re];while(q&&(g(q,"display")==="none"||q===v))}if(Y===0||q===n)return P(!1);ue=n,Ce=Y;var ve=n.nextElementSibling,J=!1;J=Y===1;var Ne=ke(S,t,d,r,n,i,e,J);if(Ne!==!1)return(Ne===1||Ne===-1)&&(J=Ne===1),tt=!0,setTimeout(en,30),N(),J&&!ve?t.appendChild(d):n.parentNode.insertBefore(d,J?ve:n),Q&&Ct(Q,0,me-Q.scrollTop),T=d.parentNode,oe!==void 0&&!Ae&&(Re=Math.abs(oe-I(n)[ge])),F(),P(!0)}if(t.contains(d))return P(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){_(document,"mousemove",this._onTouchMove),_(document,"touchmove",this._onTouchMove),_(document,"pointermove",this._onTouchMove),_(document,"dragover",ae),_(document,"mousemove",ae),_(document,"touchmove",ae)},_offUpEvents:function(){var e=this.el.ownerDocument;_(e,"mouseup",this._onDrop),_(e,"touchend",this._onDrop),_(e,"pointerup",this._onDrop),_(e,"pointercancel",this._onDrop),_(e,"touchcancel",this._onDrop),_(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(G=L(d),ee=L(d,n.draggable),R("drop",this,{evt:e}),T=d&&d.parentNode,G=L(d),ee=L(d,n.draggable),m.eventCanceled){this._nulling();return}de=!1,Ae=!1,Te=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),nt(this.cloneId),nt(this._dragStartId),this.nativeDraggable&&(_(document,"drop",this),_(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ee&&g(document.body,"user-select",""),g(d,"transform",""),e&&(ye&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),v&&v.parentNode&&v.parentNode.removeChild(v),(S===T||M&&M.lastPutMode!=="clone")&&D&&D.parentNode&&D.parentNode.removeChild(D),d&&(this.nativeDraggable&&_(d,"dragend",this),Ze(d),d.style["will-change"]="",ye&&!de&&H(d,M?M.options.ghostClass:this.options.ghostClass,!1),H(d,this.options.chosenClass,!1),B({sortable:this,name:"unchoose",toEl:T,newIndex:null,newDraggableIndex:null,originalEvent:e}),S!==T?(G>=0&&(B({rootEl:T,name:"add",toEl:T,fromEl:S,originalEvent:e}),B({sortable:this,name:"remove",toEl:T,originalEvent:e}),B({rootEl:T,name:"sort",toEl:T,fromEl:S,originalEvent:e}),B({sortable:this,name:"sort",toEl:T,originalEvent:e})),M&&M.save()):G!==ce&&G>=0&&(B({sortable:this,name:"update",toEl:T,originalEvent:e}),B({sortable:this,name:"sort",toEl:T,originalEvent:e})),m.active&&((G==null||G===-1)&&(G=ce,ee=De),B({sortable:this,name:"end",toEl:T,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){R("nulling",this),S=d=T=v=le=D=Be=te=ie=W=ye=G=ee=ce=De=ue=Ce=M=xe=m.dragged=m.ghost=m.clone=m.active=null,Le.forEach(function(e){e.checked=!0}),Le.length=qe=Ue=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":d&&(this._onDragOver(e),Jt(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,r=0,i=n.length,a=this.options;r<i;r++)t=n[r],$(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||an(t));return e},sort:function(e,t){var n={},r=this.el;this.toArray().forEach(function(i,a){var l=r.children[a];$(l,this.options.draggable,r,!1)&&(n[i]=l)},this),t&&this.captureAnimationState(),e.forEach(function(i){n[i]&&(r.removeChild(n[i]),r.appendChild(n[i]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return $(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var r=Pe.modifyOption(this,e,t);typeof r<"u"?n[e]=r:n[e]=t,e==="group"&&Nt(n)},destroy:function(){R("destroy",this);var e=this.el;e[X]=null,_(e,"mousedown",this._onTapStart),_(e,"touchstart",this._onTapStart),_(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(_(e,"dragover",this),_(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ge.splice(Ge.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!te){if(R("hideClone",this),m.eventCanceled)return;g(D,"display","none"),this.options.removeCloneOnHide&&D.parentNode&&D.parentNode.removeChild(D),te=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(te){if(R("showClone",this),m.eventCanceled)return;d.parentNode==S&&!this.options.group.revertClone?S.insertBefore(D,d):le?S.insertBefore(D,le):S.appendChild(D),this.options.group.revertClone&&this.animate(d,D),g(D,"display",""),te=!1}}};function Jt(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function ke(o,e,t,n,r,i,a,l){var s,u=o[X],f=u.options.onMove,c;return window.CustomEvent&&!Z&&!Ie?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=e,s.from=o,s.dragged=t,s.draggedRect=n,s.related=r||e,s.relatedRect=i||I(e),s.willInsertAfter=l,s.originalEvent=a,o.dispatchEvent(s),f&&(c=f.call(u,s,a)),c}function Ze(o){o.draggable=!1}function en(){tt=!1}function tn(o,e,t){var n=I(he(t.el,0,t.options,!0)),r=Ot(t.el,t.options,v),i=10;return e?o.clientX<r.left-i||o.clientY<n.top&&o.clientX<n.right:o.clientY<r.top-i||o.clientY<n.bottom&&o.clientX<n.left}function nn(o,e,t){var n=I(at(t.el,t.options.draggable)),r=Ot(t.el,t.options,v),i=10;return e?o.clientX>r.right+i||o.clientY>n.bottom&&o.clientX>n.left:o.clientY>r.bottom+i||o.clientX>n.right&&o.clientY>n.top}function on(o,e,t,n,r,i,a,l){var s=n?o.clientY:o.clientX,u=n?t.height:t.width,f=n?t.top:t.left,c=n?t.bottom:t.right,w=!1;if(!a){if(l&&Re<u*r){if(!Te&&(Ce===1?s>f+u*i/2:s<c-u*i/2)&&(Te=!0),Te)w=!0;else if(Ce===1?s<f+Re:s>c-Re)return-Ce}else if(s>f+u*(1-r)/2&&s<c-u*(1-r)/2)return rn(e)}return w=w||a,w&&(s<f+u*i/2||s>c-u*i/2)?s>f+u/2?1:-1:0}function rn(o){return L(d)<L(o)?1:-1}function an(o){for(var e=o.tagName+o.className+o.src+o.href+o.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function ln(o){Le.length=0;for(var e=o.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&Le.push(n)}}function Xe(o){return setTimeout(o,0)}function nt(o){return clearTimeout(o)}$e&&E(document,"touchmove",function(o){(m.active||de)&&o.cancelable&&o.preventDefault()});m.utils={on:E,off:_,css:g,find:St,is:function(e,t){return!!$(e,t,e,!1)},extend:Gt,throttle:Dt,closest:$,toggleClass:H,clone:Tt,index:L,nextTick:Xe,cancelNextTick:nt,detectDirection:Pt,getChild:he,expando:X};m.get=function(o){return o[X]};m.mount=function(){for(var o=arguments.length,e=new Array(o),t=0;t<o;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(m.utils=j(j({},m.utils),n.utils)),Pe.mount(n)})};m.create=function(o,e){return new m(o,e)};m.version=zt;var O=[],we,ot,rt=!1,Qe,Je,We,_e;function sn(){function o(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return o.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):this.options.supportPointer?E(document,"pointermove",this._handleFallbackAutoScroll):n.touches?E(document,"touchmove",this._handleFallbackAutoScroll):E(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?_(document,"dragover",this._handleAutoScroll):(_(document,"pointermove",this._handleFallbackAutoScroll),_(document,"touchmove",this._handleFallbackAutoScroll),_(document,"mousemove",this._handleFallbackAutoScroll)),yt(),Ye(),Lt()},nulling:function(){We=ot=we=rt=_e=Qe=Je=null,O.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var r=this,i=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=document.elementFromPoint(i,a);if(We=t,n||this.options.forceAutoScrollFallback||Ie||Z||Ee){et(t,this.options,l,n);var s=ne(l,!0);rt&&(!_e||i!==Qe||a!==Je)&&(_e&&yt(),_e=setInterval(function(){var u=ne(document.elementFromPoint(i,a),!0);u!==s&&(s=u,Ye()),et(t,r.options,u,n)},10),Qe=i,Je=a)}else{if(!this.options.bubbleScroll||ne(l,!0)===V()){Ye();return}et(t,this.options,ne(l,!1),!1)}}},K(o,{pluginName:"scroll",initializeByDefault:!0})}function Ye(){O.forEach(function(o){clearInterval(o.pid)}),O=[]}function yt(){clearInterval(_e)}var et=Dt(function(o,e,t,n){if(e.scroll){var r=(o.touches?o.touches[0]:o).clientX,i=(o.touches?o.touches[0]:o).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,s=V(),u=!1,f;ot!==t&&(ot=t,Ye(),we=e.scroll,f=e.scrollFn,we===!0&&(we=ne(t,!0)));var c=0,w=we;do{var p=w,b=I(p),y=b.top,C=b.bottom,N=b.left,P=b.right,F=b.width,x=b.height,A=void 0,Y=void 0,oe=p.scrollWidth,pe=p.scrollHeight,z=g(p),ge=p.scrollLeft,Q=p.scrollTop;p===s?(A=F<oe&&(z.overflowX==="auto"||z.overflowX==="scroll"||z.overflowX==="visible"),Y=x<pe&&(z.overflowY==="auto"||z.overflowY==="scroll"||z.overflowY==="visible")):(A=F<oe&&(z.overflowX==="auto"||z.overflowX==="scroll"),Y=x<pe&&(z.overflowY==="auto"||z.overflowY==="scroll"));var me=A&&(Math.abs(P-r)<=a&&ge+F<oe)-(Math.abs(N-r)<=a&&!!ge),q=Y&&(Math.abs(C-i)<=a&&Q+x<pe)-(Math.abs(y-i)<=a&&!!Q);if(!O[c])for(var re=0;re<=c;re++)O[re]||(O[re]={});(O[c].vx!=me||O[c].vy!=q||O[c].el!==p)&&(O[c].el=p,O[c].vx=me,O[c].vy=q,clearInterval(O[c].pid),(me!=0||q!=0)&&(u=!0,O[c].pid=setInterval((function(){n&&this.layer===0&&m.active._onTouchMove(We);var ve=O[this.layer].vy?O[this.layer].vy*l:0,J=O[this.layer].vx?O[this.layer].vx*l:0;typeof f=="function"&&f.call(m.dragged.parentNode[X],J,ve,o,We,O[this.layer].el)!=="continue"||Ct(O[this.layer].el,J,ve)}).bind({layer:c}),24))),c++}while(e.bubbleScroll&&w!==s&&(w=ne(w,!1)));rt=u}},30),Mt=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,i=e.activeSortable,a=e.dispatchSortableEvent,l=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var u=n||i;l();var f=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(f.clientX,f.clientY);s(),u&&!u.el.contains(c)&&(a("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function lt(){}lt.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 r=he(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Mt};K(lt,{pluginName:"revertOnSpill"});function st(){}st.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,r=n||this.sortable;r.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),r.animateAll()},drop:Mt};K(st,{pluginName:"removeOnSpill"});m.mount(new sn);m.mount(st,lt);const un={class:"g-table"},dn={key:1},cn={class:"g-dropdown-link"},fn=h.defineComponent({name:"GTable",inheritAttrs:!1,__name:"index",props:{data:{type:Array,default:()=>[]},pagination:{type:Boolean,default:()=>!1},operationLabel:{type:String,default:()=>"操作"},operaWidth:{type:Number,default:()=>150},dragSort:{type:Boolean,default:()=>!1},dragSortProps:{type:Array,default:()=>[]}},emits:{"update:currentPage":o=>!0,"update:pageSize":o=>!0,"sorted:data":o=>!0},setup(o,{emit:e}){const t=o,n=e,r=p=>{n("update:pageSize",p)},i=p=>{n("update:currentPage",p)},a=h.useSlots(),l=p=>!!a[p],s=h.useAttrs(),u=p=>{const b=!!s["page-size"],y=!!s["current-page"];if(b&&y){const C=Number(s["page-size"]||10),N=Number(s["current-page"]||1);return p+1+C*(N-1)}return p},f=h.ref(null);let c=h.ref(null);const w=()=>{if(f.value)try{const p=f.value.$el.querySelectorAll("tbody");let b=null;for(let y=0;y<p.length;y++){const C=p[y];if(C.querySelectorAll("tr").length>0){b=C;break}}if(!b){console.error("未找到包含数据行的 tbody 元素");return}c.value&&c.value?.destroy?.(),c.value=new m(b,{draggable:"tr",handle:".g-drag-icon",animation:200,ghostClass:"g-sortable-ghost",forceFallback:!0,onStart:function(y){y.item.classList.add("dragging")},onEnd:async function(y){y.item.classList.remove("dragging");const{oldIndex:C,newIndex:N}=y;if(C===void 0||N===void 0){console.error("无效的索引值");return}const[P]=t.data.splice(C,1);if(t.data.splice(N,0,P),t.dragSortProps.length===0){n("sorted:data",t.data);return}if(t.dragSortProps.length>0){const F=t.data.map(x=>{const A={};return t.dragSortProps.forEach(Y=>{A[Y]=x[Y]}),A});n("sorted:data",F)}}})}catch(p){console.error("初始化拖拽排序失败:",p)}};return h.onMounted(()=>{t.dragSort&&setTimeout(()=>{w()},2e3)}),(p,b)=>{const y=h.resolveComponent("el-icon"),C=h.resolveComponent("el-table-column"),N=h.resolveComponent("el-dropdown-menu"),P=h.resolveComponent("el-dropdown"),F=h.resolveComponent("el-table"),x=h.resolveComponent("el-pagination");return h.openBlock(),h.createElementBlock("div",un,[h.createElementVNode("div",null,[h.renderSlot(p.$slots,"action",{},void 0,!0)]),h.createVNode(F,h.mergeProps({data:o.data||[]},p.$attrs,{stripe:"",ref_key:"tableRef",ref:f}),{empty:h.withCtx(()=>[p.$slots.empty?h.renderSlot(p.$slots,"empty",{key:0},void 0,!0):(h.openBlock(),h.createElementBlock("span",dn,"暂无数据"))]),default:h.withCtx(()=>[o.dragSort?(h.openBlock(),h.createBlock(C,{key:0,label:"序号",width:"65"},{default:h.withCtx(A=>[h.createElementVNode("div",null,[h.createTextVNode(h.toDisplayString(u(A.$index))+" ",1),h.createVNode(y,{class:"g-drag-icon"},{default:h.withCtx(()=>[h.createVNode(h.unref(dt.operation_default))]),_:1})])]),_:1})):h.createCommentVNode("",!0),h.renderSlot(p.$slots,"default",{},void 0,!0),l("operations")?(h.openBlock(),h.createBlock(C,{key:1,fixed:"right",label:o.operationLabel||"操作",width:o.operaWidth},{default:h.withCtx(A=>[h.renderSlot(p.$slots,"operations",{row:A.row,index:A.$index},void 0,!0),l("more")?(h.openBlock(),h.createBlock(P,{key:0,size:"small",style:{"vertical-align":"baseline"}},{dropdown:h.withCtx(()=>[h.createVNode(N,null,{default:h.withCtx(()=>[h.renderSlot(p.$slots,"more",{row:A.row,index:A.$index},void 0,!0)]),_:2},1024)]),default:h.withCtx(()=>[h.createElementVNode("span",cn,[b[0]||(b[0]=h.createTextVNode(" 更多 ")),h.createVNode(y,null,{default:h.withCtx(()=>[h.createVNode(h.unref(dt.arrow_down_default))]),_:1})])]),_:2},1024)):h.createCommentVNode("",!0)]),_:3},8,["label","width"])):h.createCommentVNode("",!0)]),_:3},16,["data"]),o.pagination?(h.openBlock(),h.createBlock(x,h.mergeProps({key:0,class:"g-pagination-contianer"},p.$attrs,{"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next",onSizeChange:r,onCurrentChange:i}),null,16)):h.createCommentVNode("",!0)])}}}),Oe=Bt._export_sfc(fn,[["__scopeId","data-v-ddc979a1"]]);Oe.install=o=>{o.component(Oe.name,Oe)};exports.GTable=Oe;exports.default=Oe;
|