@scenetechnology/cj_iview_table 0.0.64 → 0.0.65

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.
@@ -19,5 +19,5 @@ t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e
19
19
  * @author owenm <owen23355@gmail.com>
20
20
  * @license MIT
21
21
  */
22
- function Mr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Fr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mr(Object(n),!0).forEach((function(e){zr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Pr(t){return Pr="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pr(t)}function zr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ur(){return Ur=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ur.apply(this,arguments)}function Vr(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function Wr(t,e){if(null==t)return{};var n,r,i=Vr(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var Hr="1.15.6";function Gr(t){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Qr=Gr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Yr=Gr(/Edge/i),$r=Gr(/firefox/i),Jr=Gr(/safari/i)&&!Gr(/chrome/i)&&!Gr(/android/i),qr=Gr(/iP(ad|od|hone)/i),Xr=Gr(/chrome/i)&&Gr(/android/i),Kr={capture:!1,passive:!1};function Zr(t,e,n){t.addEventListener(e,n,!Qr&&Kr)}function ti(t,e,n){t.removeEventListener(e,n,!Qr&&Kr)}function ei(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function ni(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function ri(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&ei(t,e):ei(t,e))||r&&t===n)return t;if(t===n)break}while(t=ni(t))}return null}var ii,oi=/\s+/g;function si(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(oi," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(oi," ")}}function ai(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"===typeof n?"":"px")}}function li(t,e){var n="";if("string"===typeof t)n=t;else do{var r=ai(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function ui(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function ci(){var t=document.scrollingElement;return t||document.documentElement}function hi(t,e,n,r,i){if(t.getBoundingClientRect||t===window){var o,s,a,l,u,c,h;if(t!==window&&t.parentNode&&t!==ci()?(o=t.getBoundingClientRect(),s=o.top,a=o.left,l=o.bottom,u=o.right,c=o.height,h=o.width):(s=0,a=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!Qr))do{if(i&&i.getBoundingClientRect&&("none"!==ai(i,"transform")||n&&"static"!==ai(i,"position"))){var f=i.getBoundingClientRect();s-=f.top+parseInt(ai(i,"border-top-width")),a-=f.left+parseInt(ai(i,"border-left-width")),l=s+o.height,u=a+o.width;break}}while(i=i.parentNode);if(r&&t!==window){var d=li(i||t),p=d&&d.a,g=d&&d.d;d&&(s/=g,a/=p,h/=p,c/=g,l=s+c,u=a+h)}return{top:s,left:a,bottom:l,right:u,width:h,height:c}}}function fi(t,e,n){var r=yi(t,!0),i=hi(t)[e];while(r){var o=hi(r)[n],s=void 0;if(s="top"===n||"left"===n?i>=o:i<=o,!s)return r;if(r===ci())break;r=yi(r,!1)}return!1}function di(t,e,n,r){var i=0,o=0,s=t.children;while(o<s.length){if("none"!==s[o].style.display&&s[o]!==Do.ghost&&(r||s[o]!==Do.dragged)&&ri(s[o],n.draggable,t,!1)){if(i===e)return s[o];i++}o++}return null}function pi(t,e){var n=t.lastElementChild;while(n&&(n===Do.ghost||"none"===ai(n,"display")||e&&!ei(n,e)))n=n.previousElementSibling;return n||null}function gi(t,e){var n=0;if(!t||!t.parentNode)return-1;while(t=t.previousElementSibling)"TEMPLATE"===t.nodeName.toUpperCase()||t===Do.clone||e&&!ei(t,e)||n++;return n}function vi(t){var e=0,n=0,r=ci();if(t)do{var i=li(t),o=i.a,s=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*s}while(t!==r&&(t=t.parentNode));return[e,n]}function mi(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}function yi(t,e){if(!t||!t.getBoundingClientRect)return ci();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=ai(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return ci();if(r||e)return n;r=!0}}}while(n=n.parentNode);return ci()}function bi(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function wi(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function Si(t,e){return function(){if(!ii){var n=arguments,r=this;1===n.length?t.call(r,n[0]):t.apply(r,n),ii=setTimeout((function(){ii=void 0}),e)}}}function Ai(){clearTimeout(ii),ii=void 0}function _i(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function xi(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function Oi(t,e,n){var r={};return Array.from(t.children).forEach((function(i){var o,s,a,l;if(ri(i,e.draggable,t,!1)&&!i.animated&&i!==n){var u=hi(i);r.left=Math.min(null!==(o=r.left)&&void 0!==o?o:1/0,u.left),r.top=Math.min(null!==(s=r.top)&&void 0!==s?s:1/0,u.top),r.right=Math.max(null!==(a=r.right)&&void 0!==a?a:-1/0,u.right),r.bottom=Math.max(null!==(l=r.bottom)&&void 0!==l?l:-1/0,u.bottom)}})),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var Ei="Sortable"+(new Date).getTime();function Ci(){var t,e=[];return{captureAnimationState:function(){if(e=[],this.options.animation){var t=[].slice.call(this.el.children);t.forEach((function(t){if("none"!==ai(t,"display")&&t!==Do.ghost){e.push({target:t,rect:hi(t)});var n=Fr({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=li(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}}))}},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(mi(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(t),void("function"===typeof n&&n());var i=!1,o=0;e.forEach((function(t){var e=0,n=t.target,s=n.fromRect,a=hi(n),l=n.prevFromRect,u=n.prevToRect,c=t.rect,h=li(n,!0);h&&(a.top-=h.f,a.left-=h.e),n.toRect=a,n.thisAnimationDuration&&wi(l,a)&&!wi(s,a)&&(c.top-a.top)/(c.left-a.left)===(s.top-a.top)/(s.left-a.left)&&(e=Ii(c,l,u,r.options)),wi(a,s)||(n.prevFromRect=s,n.prevToRect=a,e||(e=r.options.animation),r.animate(n,c,a,e)),e&&(i=!0,o=Math.max(o,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"===typeof n&&n()}),o):"function"===typeof n&&n(),e=[]},animate:function(t,e,n,r){if(r){ai(t,"transition",""),ai(t,"transform","");var i=li(this.el),o=i&&i.a,s=i&&i.d,a=(e.left-n.left)/(o||1),l=(e.top-n.top)/(s||1);t.animatingX=!!a,t.animatingY=!!l,ai(t,"transform","translate3d("+a+"px,"+l+"px,0)"),this.forRepaintDummy=ki(t),ai(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),ai(t,"transform","translate3d(0,0,0)"),"number"===typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){ai(t,"transition",""),ai(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}}function ki(t){return t.offsetWidth}function Ii(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var Di=[],Ni={initializeByDefault:!0},Ri={mount:function(t){for(var e in Ni)Ni.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ni[e]);Di.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),Di.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=t+"Global";Di.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][i]&&e[r.pluginName][i](Fr({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](Fr({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var i in Di.forEach((function(r){var i=r.pluginName;if(t.options[i]||r.initializeByDefault){var o=new r(t,e,t.options);o.sortable=t,o.options=t.options,t[i]=o,Ur(n,o.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);"undefined"!==typeof o&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return Di.forEach((function(r){"function"===typeof r.eventProperties&&Ur(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return Di.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"===typeof i.optionListeners[e]&&(r=i.optionListeners[e].call(t[i.pluginName],n))})),r}};function Ti(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,o=t.cloneEl,s=t.toEl,a=t.fromEl,l=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,h=t.newDraggableIndex,f=t.originalEvent,d=t.putSortable,p=t.extraEventProperties;if(e=e||n&&n[Ei],e){var g,v=e.options,m="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||Qr||Yr?(g=document.createEvent("Event"),g.initEvent(r,!0,!0)):g=new CustomEvent(r,{bubbles:!0,cancelable:!0}),g.to=s||n,g.from=a||n,g.item=i||n,g.clone=o,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=c,g.newDraggableIndex=h,g.originalEvent=f,g.pullMode=d?d.lastPutMode:void 0;var y=Fr(Fr({},p),Ri.getEventProperties(r,e));for(var b in y)g[b]=y[b];n&&n.dispatchEvent(g),v[m]&&v[m].call(e,g)}}var ji=["evt"],Bi=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=Wr(n,ji);Ri.pluginEvent.bind(Do)(t,e,Fr({dragEl:Mi,parentEl:Fi,ghostEl:Pi,rootEl:zi,nextEl:Ui,lastDownEl:Vi,cloneEl:Wi,cloneHidden:Hi,dragStarted:ro,putSortable:qi,activeSortable:Do.active,originalEvent:r,oldIndex:Gi,oldDraggableIndex:Yi,newIndex:Qi,newDraggableIndex:$i,hideGhostForTarget:Eo,unhideGhostForTarget:Co,cloneNowHidden:function(){Hi=!0},cloneNowShown:function(){Hi=!1},dispatchSortableEvent:function(t){Li({sortable:e,name:t,originalEvent:r})}},i))};function Li(t){Ti(Fr({putSortable:qi,cloneEl:Wi,targetEl:Mi,rootEl:zi,oldIndex:Gi,oldDraggableIndex:Yi,newIndex:Qi,newDraggableIndex:$i},t))}var Mi,Fi,Pi,zi,Ui,Vi,Wi,Hi,Gi,Qi,Yi,$i,Ji,qi,Xi,Ki,Zi,to,eo,no,ro,io,oo,so,ao,lo=!1,uo=!1,co=[],ho=!1,fo=!1,po=[],go=!1,vo=[],mo="undefined"!==typeof document,yo=qr,bo=Yr||Qr?"cssFloat":"float",wo=mo&&!Xr&&!qr&&"draggable"in document.createElement("div"),So=function(){if(mo){if(Qr)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ao=function(t,e){var n=ai(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=di(t,0,e),o=di(t,1,e),s=i&&ai(i),a=o&&ai(o),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+hi(i).width,u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+hi(o).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(i&&s["float"]&&"none"!==s["float"]){var c="left"===s["float"]?"left":"right";return!o||"both"!==a.clear&&a.clear!==c?"horizontal":"vertical"}return i&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=r&&"none"===n[bo]||o&&"none"===n[bo]&&l+u>r)?"vertical":"horizontal"},_o=function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,s=n?e.left:e.top,a=n?e.right:e.bottom,l=n?e.width:e.height;return r===s||i===a||r+o/2===s+l/2},xo=function(t,e){var n;return co.some((function(r){var i=r[Ei].options.emptyInsertThreshold;if(i&&!pi(r)){var o=hi(r),s=t>=o.left-i&&t<=o.right+i,a=e>=o.top-i&&e<=o.bottom+i;return s&&a?n=r:void 0}})),n},Oo=function(t){function e(t,n){return function(r,i,o,s){var a=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==t&&(n||a))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"===typeof t)return e(t(r,i,o,s),n)(r,i,o,s);var l=(n?r:i).options.group.name;return!0===t||"string"===typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},r=t.group;r&&"object"==Pr(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Eo=function(){!So&&Pi&&ai(Pi,"display","none")},Co=function(){!So&&Pi&&ai(Pi,"display","")};mo&&!Xr&&document.addEventListener("click",(function(t){if(uo)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),uo=!1,!1}),!0);var ko=function(t){if(Mi){t=t.touches?t.touches[0]:t;var e=xo(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Ei]._onDragOver(n)}}},Io=function(t){Mi&&Mi.parentNode[Ei]._isOutsideThisEl(t.target)};function Do(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Ur({},e),t[Ei]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ao(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Do.supportPointer&&"PointerEvent"in window&&(!Jr||qr),emptyInsertThreshold:5};for(var r in Ri.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var i in Oo(e),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&wo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Zr(t,"pointerdown",this._onTapStart):(Zr(t,"mousedown",this._onTapStart),Zr(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Zr(t,"dragover",this),Zr(t,"dragenter",this)),co.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ur(this,Ci())}function No(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Ro(t,e,n,r,i,o,s,a){var l,u,c=t[Ei],h=c.options.onMove;return!window.CustomEvent||Qr||Yr?(l=document.createEvent("Event"),l.initEvent("move",!0,!0)):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=i||e,l.relatedRect=o||hi(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),h&&(u=h.call(c,l,s)),u}function To(t){t.draggable=!1}function jo(){go=!1}function Bo(t,e,n){var r=hi(di(n.el,0,n.options,!0)),i=Oi(n.el,n.options,Pi),o=10;return e?t.clientX<i.left-o||t.clientY<r.top&&t.clientX<r.right:t.clientY<i.top-o||t.clientY<r.bottom&&t.clientX<r.left}function Lo(t,e,n){var r=hi(pi(n.el,n.options.draggable)),i=Oi(n.el,n.options,Pi),o=10;return e?t.clientX>i.right+o||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>i.bottom+o||t.clientX>r.right&&t.clientY>r.top}function Mo(t,e,n,r,i,o,s,a){var l=r?t.clientY:t.clientX,u=r?n.height:n.width,c=r?n.top:n.left,h=r?n.bottom:n.right,f=!1;if(!s)if(a&&so<u*i){if(!ho&&(1===oo?l>c+u*o/2:l<h-u*o/2)&&(ho=!0),ho)f=!0;else if(1===oo?l<c+so:l>h-so)return-oo}else if(l>c+u*(1-i)/2&&l<h-u*(1-i)/2)return Fo(e);return f=f||s,f&&(l<c+u*o/2||l>h-u*o/2)?l>c+u/2?1:-1:0}function Fo(t){return gi(Mi)<gi(t)?1:-1}function Po(t){var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;while(n--)r+=e.charCodeAt(n);return r.toString(36)}function zo(t){vo.length=0;var e=t.getElementsByTagName("input"),n=e.length;while(n--){var r=e[n];r.checked&&vo.push(r)}}function Uo(t){return setTimeout(t,0)}function Vo(t){return clearTimeout(t)}Do.prototype={constructor:Do,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(io=null)},_getDirection:function(t,e){return"function"===typeof this.options.direction?this.options.direction.call(this,t,e,Mi):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=t.type,s=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,u=r.filter;if(zo(n),!Mi&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Jr||!a||"SELECT"!==a.tagName.toUpperCase())&&(a=ri(a,r.draggable,n,!1),(!a||!a.animated)&&Vi!==a)){if(Gi=gi(a),Yi=gi(a,r.draggable),"function"===typeof u){if(u.call(this,t,a,this))return Li({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),Bi("filter",e,{evt:t}),void(i&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(r){if(r=ri(l,r.trim(),n,!1),r)return Li({sortable:e,rootEl:r,name:"filter",targetEl:a,fromEl:n,toEl:n}),Bi("filter",e,{evt:t}),!0})),u))return void(i&&t.preventDefault());r.handle&&!ri(l,r.handle,n,!1)||this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,n){var r,i=this,o=i.el,s=i.options,a=o.ownerDocument;if(n&&!Mi&&n.parentNode===o){var l=hi(n);if(zi=o,Mi=n,Fi=Mi.parentNode,Ui=Mi.nextSibling,Vi=n,Ji=s.group,Do.dragged=Mi,Xi={target:Mi,clientX:(e||t).clientX,clientY:(e||t).clientY},eo=Xi.clientX-l.left,no=Xi.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Mi.style["will-change"]="all",r=function(){Bi("delayEnded",i,{evt:t}),Do.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!$r&&i.nativeDraggable&&(Mi.draggable=!0),i._triggerDragStart(t,e),Li({sortable:i,name:"choose",originalEvent:t}),si(Mi,s.chosenClass,!0))},s.ignore.split(",").forEach((function(t){ui(Mi,t.trim(),To)})),Zr(a,"dragover",ko),Zr(a,"mousemove",ko),Zr(a,"touchmove",ko),s.supportPointer?(Zr(a,"pointerup",i._onDrop),!this.nativeDraggable&&Zr(a,"pointercancel",i._onDrop)):(Zr(a,"mouseup",i._onDrop),Zr(a,"touchend",i._onDrop),Zr(a,"touchcancel",i._onDrop)),$r&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Mi.draggable=!0),Bi("delayStart",this,{evt:t}),!s.delay||s.delayOnTouchOnly&&!e||this.nativeDraggable&&(Yr||Qr))r();else{if(Do.eventCanceled)return void this._onDrop();s.supportPointer?(Zr(a,"pointerup",i._disableDelayedDrag),Zr(a,"pointercancel",i._disableDelayedDrag)):(Zr(a,"mouseup",i._disableDelayedDrag),Zr(a,"touchend",i._disableDelayedDrag),Zr(a,"touchcancel",i._disableDelayedDrag)),Zr(a,"mousemove",i._delayedDragTouchMoveHandler),Zr(a,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&Zr(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,s.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Mi&&To(Mi),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ti(t,"mouseup",this._disableDelayedDrag),ti(t,"touchend",this._disableDelayedDrag),ti(t,"touchcancel",this._disableDelayedDrag),ti(t,"pointerup",this._disableDelayedDrag),ti(t,"pointercancel",this._disableDelayedDrag),ti(t,"mousemove",this._delayedDragTouchMoveHandler),ti(t,"touchmove",this._delayedDragTouchMoveHandler),ti(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?Zr(document,"pointermove",this._onTouchMove):Zr(document,e?"touchmove":"mousemove",this._onTouchMove):(Zr(Mi,"dragend",this),Zr(zi,"dragstart",this._onDragStart));try{document.selection?Uo((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(lo=!1,zi&&Mi){Bi("dragStarted",this,{evt:e}),this.nativeDraggable&&Zr(document,"dragover",Io);var n=this.options;!t&&si(Mi,n.dragClass,!1),si(Mi,n.ghostClass,!0),Do.active=this,t&&this._appendGhost(),Li({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ki){this._lastX=Ki.clientX,this._lastY=Ki.clientY,Eo();var t=document.elementFromPoint(Ki.clientX,Ki.clientY),e=t;while(t&&t.shadowRoot){if(t=t.shadowRoot.elementFromPoint(Ki.clientX,Ki.clientY),t===e)break;e=t}if(Mi.parentNode[Ei]._isOutsideThisEl(t),e)do{if(e[Ei]){var n=void 0;if(n=e[Ei]._onDragOver({clientX:Ki.clientX,clientY:Ki.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=ni(e));Co()}},_onTouchMove:function(t){if(Xi){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=Pi&&li(Pi,!0),s=Pi&&o&&o.a,a=Pi&&o&&o.d,l=yo&&ao&&vi(ao),u=(i.clientX-Xi.clientX+r.x)/(s||1)+(l?l[0]-po[0]:0)/(s||1),c=(i.clientY-Xi.clientY+r.y)/(a||1)+(l?l[1]-po[1]:0)/(a||1);if(!Do.active&&!lo){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Pi){o?(o.e+=u-(Zi||0),o.f+=c-(to||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var h="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");ai(Pi,"webkitTransform",h),ai(Pi,"mozTransform",h),ai(Pi,"msTransform",h),ai(Pi,"transform",h),Zi=u,to=c,Ki=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Pi){var t=this.options.fallbackOnBody?document.body:zi,e=hi(Mi,!0,yo,!0,t),n=this.options;if(yo){ao=t;while("static"===ai(ao,"position")&&"none"===ai(ao,"transform")&&ao!==document)ao=ao.parentNode;ao!==document.body&&ao!==document.documentElement?(ao===document&&(ao=ci()),e.top+=ao.scrollTop,e.left+=ao.scrollLeft):ao=ci(),po=vi(ao)}Pi=Mi.cloneNode(!0),si(Pi,n.ghostClass,!1),si(Pi,n.fallbackClass,!0),si(Pi,n.dragClass,!0),ai(Pi,"transition",""),ai(Pi,"transform",""),ai(Pi,"box-sizing","border-box"),ai(Pi,"margin",0),ai(Pi,"top",e.top),ai(Pi,"left",e.left),ai(Pi,"width",e.width),ai(Pi,"height",e.height),ai(Pi,"opacity","0.8"),ai(Pi,"position",yo?"absolute":"fixed"),ai(Pi,"zIndex","100000"),ai(Pi,"pointerEvents","none"),Do.ghost=Pi,t.appendChild(Pi),ai(Pi,"transform-origin",eo/parseInt(Pi.style.width)*100+"% "+no/parseInt(Pi.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,i=n.options;Bi("dragStart",this,{evt:t}),Do.eventCanceled?this._onDrop():(Bi("setupClone",this),Do.eventCanceled||(Wi=xi(Mi),Wi.removeAttribute("id"),Wi.draggable=!1,Wi.style["will-change"]="",this._hideClone(),si(Wi,this.options.chosenClass,!1),Do.clone=Wi),n.cloneId=Uo((function(){Bi("clone",n),Do.eventCanceled||(n.options.removeCloneOnHide||zi.insertBefore(Wi,Mi),n._hideClone(),Li({sortable:n,name:"clone"}))})),!e&&si(Mi,i.dragClass,!0),e?(uo=!0,n._loopId=setInterval(n._emulateDragOver,50)):(ti(document,"mouseup",n._onDrop),ti(document,"touchend",n._onDrop),ti(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,Mi)),Zr(document,"drop",n),ai(Mi,"transform","translateZ(0)")),lo=!0,n._dragStartId=Uo(n._dragStarted.bind(n,e,t)),Zr(document,"selectstart",n),ro=!0,window.getSelection().removeAllRanges(),Jr&&ai(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,i,o=this.el,s=t.target,a=this.options,l=a.group,u=Do.active,c=Ji===l,h=a.sort,f=qi||u,d=this,p=!1;if(!go){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=ri(s,a.draggable,o,!0),I("dragOver"),Do.eventCanceled)return p;if(Mi.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||d._ignoreWhileAnimating===s)return N(!1);if(uo=!1,u&&!a.disabled&&(c?h||(r=Fi!==zi):qi===this||(this.lastPutMode=Ji.checkPull(this,u,Mi,t))&&l.checkPut(this,u,Mi,t))){if(i="vertical"===this._getDirection(t,s),e=hi(Mi),I("dragOverValid"),Do.eventCanceled)return p;if(r)return Fi=zi,D(),this._hideClone(),I("revert"),Do.eventCanceled||(Ui?zi.insertBefore(Mi,Ui):zi.appendChild(Mi)),N(!0);var g=pi(o,a.draggable);if(!g||Lo(t,i,this)&&!g.animated){if(g===Mi)return N(!1);if(g&&o===t.target&&(s=g),s&&(n=hi(s)),!1!==Ro(zi,o,Mi,e,s,n,t,!!s))return D(),g&&g.nextSibling?o.insertBefore(Mi,g.nextSibling):o.appendChild(Mi),Fi=o,R(),N(!0)}else if(g&&Bo(t,i,this)){var v=di(o,0,a,!0);if(v===Mi)return N(!1);if(s=v,n=hi(s),!1!==Ro(zi,o,Mi,e,s,n,t,!1))return D(),o.insertBefore(Mi,v),Fi=o,R(),N(!0)}else if(s.parentNode===o){n=hi(s);var m,y,b=0,w=Mi.parentNode!==o,S=!_o(Mi.animated&&Mi.toRect||e,s.animated&&s.toRect||n,i),A=i?"top":"left",_=fi(s,"top","top")||fi(Mi,"top","top"),x=_?_.scrollTop:void 0;if(io!==s&&(m=n[A],ho=!1,fo=!S&&a.invertSwap||w),b=Mo(t,s,n,i,S?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,fo,io===s),0!==b){var O=gi(Mi);do{O-=b,y=Fi.children[O]}while(y&&("none"===ai(y,"display")||y===Pi))}if(0===b||y===s)return N(!1);io=s,oo=b;var E=s.nextElementSibling,C=!1;C=1===b;var k=Ro(zi,o,Mi,e,s,n,t,C);if(!1!==k)return 1!==k&&-1!==k||(C=1===k),go=!0,setTimeout(jo,30),D(),C&&!E?o.appendChild(Mi):s.parentNode.insertBefore(Mi,C?E:s),_&&_i(_,0,x-_.scrollTop),Fi=Mi.parentNode,void 0===m||fo||(so=Math.abs(m-hi(s)[A])),R(),N(!0)}if(o.contains(Mi))return N(!1)}return!1}function I(a,l){Bi(a,d,Fr({evt:t,isOwner:c,axis:i?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:h,fromSortable:f,target:s,completed:N,onMove:function(n,r){return Ro(zi,o,Mi,e,n,hi(n),t,r)},changed:R},l))}function D(){I("dragOverAnimationCapture"),d.captureAnimationState(),d!==f&&f.captureAnimationState()}function N(e){return I("dragOverCompleted",{insertion:e}),e&&(c?u._hideClone():u._showClone(d),d!==f&&(si(Mi,qi?qi.options.ghostClass:u.options.ghostClass,!1),si(Mi,a.ghostClass,!0)),qi!==d&&d!==Do.active?qi=d:d===Do.active&&qi&&(qi=null),f===d&&(d._ignoreWhileAnimating=s),d.animateAll((function(){I("dragOverAnimationComplete"),d._ignoreWhileAnimating=null})),d!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(s===Mi&&!Mi.animated||s===o&&!s.animated)&&(io=null),a.dragoverBubble||t.rootEl||s===document||(Mi.parentNode[Ei]._isOutsideThisEl(t.target),!e&&ko(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),p=!0}function R(){Qi=gi(Mi),$i=gi(Mi,a.draggable),Li({sortable:d,name:"change",toEl:o,newIndex:Qi,newDraggableIndex:$i,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){ti(document,"mousemove",this._onTouchMove),ti(document,"touchmove",this._onTouchMove),ti(document,"pointermove",this._onTouchMove),ti(document,"dragover",ko),ti(document,"mousemove",ko),ti(document,"touchmove",ko)},_offUpEvents:function(){var t=this.el.ownerDocument;ti(t,"mouseup",this._onDrop),ti(t,"touchend",this._onDrop),ti(t,"pointerup",this._onDrop),ti(t,"pointercancel",this._onDrop),ti(t,"touchcancel",this._onDrop),ti(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Qi=gi(Mi),$i=gi(Mi,n.draggable),Bi("drop",this,{evt:t}),Fi=Mi&&Mi.parentNode,Qi=gi(Mi),$i=gi(Mi,n.draggable),Do.eventCanceled||(lo=!1,fo=!1,ho=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vo(this.cloneId),Vo(this._dragStartId),this.nativeDraggable&&(ti(document,"drop",this),ti(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Jr&&ai(document.body,"user-select",""),ai(Mi,"transform",""),t&&(ro&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Pi&&Pi.parentNode&&Pi.parentNode.removeChild(Pi),(zi===Fi||qi&&"clone"!==qi.lastPutMode)&&Wi&&Wi.parentNode&&Wi.parentNode.removeChild(Wi),Mi&&(this.nativeDraggable&&ti(Mi,"dragend",this),To(Mi),Mi.style["will-change"]="",ro&&!lo&&si(Mi,qi?qi.options.ghostClass:this.options.ghostClass,!1),si(Mi,this.options.chosenClass,!1),Li({sortable:this,name:"unchoose",toEl:Fi,newIndex:null,newDraggableIndex:null,originalEvent:t}),zi!==Fi?(Qi>=0&&(Li({rootEl:Fi,name:"add",toEl:Fi,fromEl:zi,originalEvent:t}),Li({sortable:this,name:"remove",toEl:Fi,originalEvent:t}),Li({rootEl:Fi,name:"sort",toEl:Fi,fromEl:zi,originalEvent:t}),Li({sortable:this,name:"sort",toEl:Fi,originalEvent:t})),qi&&qi.save()):Qi!==Gi&&Qi>=0&&(Li({sortable:this,name:"update",toEl:Fi,originalEvent:t}),Li({sortable:this,name:"sort",toEl:Fi,originalEvent:t})),Do.active&&(null!=Qi&&-1!==Qi||(Qi=Gi,$i=Yi),Li({sortable:this,name:"end",toEl:Fi,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Bi("nulling",this),zi=Mi=Fi=Pi=Ui=Wi=Vi=Hi=Xi=Ki=ro=Qi=$i=Gi=Yi=io=oo=qi=Ji=Do.dragged=Do.ghost=Do.clone=Do.active=null,vo.forEach((function(t){t.checked=!0})),vo.length=Zi=to=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Mi&&(this._onDragOver(t),No(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)t=n[r],ri(t,o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Po(t));return e},sort:function(t,e){var n={},r=this.el;this.toArray().forEach((function(t,e){var i=r.children[e];ri(i,this.options.draggable,r,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(r.removeChild(n[t]),r.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return ri(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=Ri.modifyOption(this,t,e);n[t]="undefined"!==typeof r?r:e,"group"===t&&Oo(n)},destroy:function(){Bi("destroy",this);var t=this.el;t[Ei]=null,ti(t,"mousedown",this._onTapStart),ti(t,"touchstart",this._onTapStart),ti(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(ti(t,"dragover",this),ti(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),co.splice(co.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Hi){if(Bi("hideClone",this),Do.eventCanceled)return;ai(Wi,"display","none"),this.options.removeCloneOnHide&&Wi.parentNode&&Wi.parentNode.removeChild(Wi),Hi=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Hi){if(Bi("showClone",this),Do.eventCanceled)return;Mi.parentNode!=zi||this.options.group.revertClone?Ui?zi.insertBefore(Wi,Ui):zi.appendChild(Wi):zi.insertBefore(Wi,Mi),this.options.group.revertClone&&this.animate(Mi,Wi),ai(Wi,"display",""),Hi=!1}}else this._hideClone()}},mo&&Zr(document,"touchmove",(function(t){(Do.active||lo)&&t.cancelable&&t.preventDefault()})),Do.utils={on:Zr,off:ti,css:ai,find:ui,is:function(t,e){return!!ri(t,e,t,!1)},extend:bi,throttle:Si,closest:ri,toggleClass:si,clone:xi,index:gi,nextTick:Uo,cancelNextTick:Vo,detectDirection:Ao,getChild:di,expando:Ei},Do.get=function(t){return t[Ei]},Do.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Do.utils=Fr(Fr({},Do.utils),t.utils)),Ri.mount(t)}))},Do.create=function(t,e){return new Do(t,e)},Do.version=Hr;var Wo,Ho,Go,Qo,Yo,$o,Jo=[],qo=!1;function Xo(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"===typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?Zr(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Zr(document,"pointermove",this._handleFallbackAutoScroll):e.touches?Zr(document,"touchmove",this._handleFallbackAutoScroll):Zr(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?ti(document,"dragover",this._handleAutoScroll):(ti(document,"pointermove",this._handleFallbackAutoScroll),ti(document,"touchmove",this._handleFallbackAutoScroll),ti(document,"mousemove",this._handleFallbackAutoScroll)),Zo(),Ko(),Ai()},nulling:function(){Yo=Ho=Wo=qo=$o=Go=Qo=null,Jo.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(r,i);if(Yo=t,e||this.options.forceAutoScrollFallback||Yr||Qr||Jr){ts(t,this.options,o,e);var s=yi(o,!0);!qo||$o&&r===Go&&i===Qo||($o&&Zo(),$o=setInterval((function(){var o=yi(document.elementFromPoint(r,i),!0);o!==s&&(s=o,Ko()),ts(t,n.options,o,e)}),10),Go=r,Qo=i)}else{if(!this.options.bubbleScroll||yi(o,!0)===ci())return void Ko();ts(t,this.options,yi(o,!1),!1)}}},Ur(t,{pluginName:"scroll",initializeByDefault:!0})}function Ko(){Jo.forEach((function(t){clearInterval(t.pid)})),Jo=[]}function Zo(){clearInterval($o)}var ts=Si((function(t,e,n,r){if(e.scroll){var i,o=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,u=ci(),c=!1;Ho!==n&&(Ho=n,Ko(),Wo=e.scroll,i=e.scrollFn,!0===Wo&&(Wo=yi(n,!0)));var h=0,f=Wo;do{var d=f,p=hi(d),g=p.top,v=p.bottom,m=p.left,y=p.right,b=p.width,w=p.height,S=void 0,A=void 0,_=d.scrollWidth,x=d.scrollHeight,O=ai(d),E=d.scrollLeft,C=d.scrollTop;d===u?(S=b<_&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),A=w<x&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(S=b<_&&("auto"===O.overflowX||"scroll"===O.overflowX),A=w<x&&("auto"===O.overflowY||"scroll"===O.overflowY));var k=S&&(Math.abs(y-o)<=a&&E+b<_)-(Math.abs(m-o)<=a&&!!E),I=A&&(Math.abs(v-s)<=a&&C+w<x)-(Math.abs(g-s)<=a&&!!C);if(!Jo[h])for(var D=0;D<=h;D++)Jo[D]||(Jo[D]={});Jo[h].vx==k&&Jo[h].vy==I&&Jo[h].el===d||(Jo[h].el=d,Jo[h].vx=k,Jo[h].vy=I,clearInterval(Jo[h].pid),0==k&&0==I||(c=!0,Jo[h].pid=setInterval(function(){r&&0===this.layer&&Do.active._onTouchMove(Yo);var e=Jo[this.layer].vy?Jo[this.layer].vy*l:0,n=Jo[this.layer].vx?Jo[this.layer].vx*l:0;"function"===typeof i&&"continue"!==i.call(Do.dragged.parentNode[Ei],n,e,t,Yo,Jo[this.layer].el)||_i(Jo[this.layer].el,n,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&f!==u&&(f=yi(f,!1)));qo=c}}),30),es=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=n||i;s();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(u.clientX,u.clientY);a(),l&&!l.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function ns(){}function rs(){}ns.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=di(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:es},Ur(ns,{pluginName:"revertOnSpill"}),rs.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,r=n||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:es},Ur(rs,{pluginName:"removeOnSpill"});Do.mount(new Xo),Do.mount(rs,ns);var is=Do,os=r(9123),ss=r.n(os),as={name:"cj_iview_table",components:{tableSetting:ar,saveViewModal:mr,viewEdit:_r,OrgPicker:Lr,Treeselect:ss()},props:{customPath:{type:String,default:""},routePath:{type:String,default:""},filterGridSpan:{type:Number,default:6},filterLabelWidth:{type:Number,default:80},border:{type:Boolean,default:!1},resizable:{type:Boolean,default:!0},height:{type:String,default:""},maxHeight:{type:String,default:""},size:{type:String,default:"default"},loading:{type:Boolean,required:!1},isShowtoolBarRight:{type:Boolean,required:!1,default:!0},columns:{type:Array,required:!0},toolBar:{type:[Array,Boolean],default:!0},defaultSize:{type:Number,default:10},params:{type:Object,default:()=>({})},pagination:{type:Object,default:()=>({})},data:{type:Object,required:!1},request:{type:Function,required:!1}},data(){return{person_icon:xr,viewSaveIcon:lr,viewSettingIcon:ur,table_no_flod:Un,table_flod:Vn,filterForm:{},filtersupplementnNum:0,tableData:[],tableLoading:!1,isClickFilterBtn:!1,isClickResetBtn:!1,filterFold:!1,columnSettingObj:"",columnSettingId:"",columnsList:hr().cloneDeep(this.columns),defaultColumnsList:hr().cloneDeep(this.columns),viewList:[],viewListP:[],filterViewValue:"",filterCount:0,selectionItems:[],defToolBar:[{text:"新增",type:"primary"}],init_status:!0,page:{current:1,pageSize:10,total:0},personList:[],initShow:!0,all_names:[],personObj:{},person_ids:[],currentFilterItem:null,sortableInstance:null}},computed:{tableColumns(){return this.columnsList.filter((t=>!t.hideInTable)).map((t=>{const e=t.render,n={...t,resizable:this.resizable&&!1!==t.resizable,width:t.width||t.minWidth||150,render:(n,r)=>{if(t.slot){const e=this.$scopedSlots[t.slot]?this.$scopedSlots[t.slot]({row:r.row}):n("span",r.row[t.key]),i=!1!==t.showTooltip;return i?n("Tooltip",{props:{content:"",maxWidth:800,theme:"light",transfer:!0,placement:r.row._index>=this.dataSource.length-1?"top":r.row._index<5?"bottom":"top"},style:{width:"100%"},scopedSlots:{default:()=>[n("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"0",cursor:"pointer",width:"100%"}},[e])],content:()=>{const e=r.row[t.key],i=this.$scopedSlots[t.slot]?this.$scopedSlots[t.slot]({row:r.row}):n("span",r.row[t.key]);return this.isJsonString(e)?n("json-viewer",{props:{value:JSON.parse(e),expandDepth:999,copyable:!0,sort:!0,boxed:!0,theme:"light",collapsed:!0},style:{overflowY:"auto",padding:"8px",boxSizing:"border-box",width:"800px",minWidth:"800px",maxHeight:"300px"},class:"custom-json-viewer"}):n("div",[i])}}}):n("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"0",width:"100%"}},[e])}if("操作"===t.title)return e?e(n,r):n("span",r.row[t.key]);const i=r.row[t.key],o=r.column.width||r.column.minWidth,s=.85*o;let a;a=e?e(n,r):n("span",{style:{display:"inline-block",maxWidth:`${s}px`,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%"}},i);const l=!1!==t.showTooltip;return l?n("Tooltip",{props:{content:"",maxWidth:800,theme:"light",transfer:!0,placement:r.row._index>=this.dataSource.length-1?"top":r.row._index<5?"bottom":"top"},style:{width:"100%"},scopedSlots:{default:()=>[n("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"0",cursor:"pointer",width:"100%"}},[a])],content:()=>{const t=i;return this.isJsonString(t)?n("json-viewer",{props:{value:JSON.parse(t),expandDepth:999,expanded:!0,copyable:!0,sort:!0,boxed:!0,theme:"light",collapsed:!0},style:{overflowY:"auto",padding:"8px",boxSizing:"border-box",width:"800px",minWidth:"800px",maxHeight:"300px"},class:"custom-json-viewer"}):n("div",[a])}}}):n("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"0",width:"100%"}},[a])}};return t.headerConfig&&(n.renderHeader=(e,n)=>e("div",{class:"custom-header"},[e("Poptip",{props:{trigger:"click",transfer:!0,placement:"bottom-start",style:{maxHeight:"300px"}},class:"header-poptip",on:{"on-popper-show":()=>{this.$nextTick((()=>{this.$emit("on-header-click",t);const e=document.querySelectorAll(".header-options");e.forEach((t=>{this.initSortable(t)}))}))}}},[e("div",{class:"header-title"},[e("span",{style:{cursor:"pointer"}},t.title),e("Icon",{props:{type:"ios-cog-outline",size:18},class:"header-icon",style:{cursor:"pointer",color:(t.as||t.key)==this.filterForm.sort?"#2d8cf0":""},on:{click:()=>{this.filterForm.sort!=(t.as||t.key)&&setTimeout((()=>{this.filterForm.sort=t.as||t.key,this.$set(t.headerConfig,"options",[...t.headerConfig.options]);let e=[];t.headerConfig.options.forEach((t=>{e.push(t.value)})),this.filterForm.sortOrder=e.join(","),this.reload()}),0)}}})]),e("div",{slot:"content",class:"header-content",style:{maxHeight:"300px",overflowY:"auto"}},[e("div",{class:"header-options",style:{padding:"2px 0"}},[...(t.headerConfig.options||[]).map((n=>e("div",{class:"header-option",attrs:{"data-key":t.as||t.key,"data-id":(t.as||t.key)+n.value,"data-value":n.value},style:{padding:"5px 0px",display:"flex",alignItems:"center",fontSize:"14px"},on:{click:()=>this.handleHeaderSelect(n,t)}},[e("img",{attrs:{src:$n},class:"drag-handle",style:{cursor:"move",marginRight:"8px",width:"8px",height:"15px",touchAction:"none",verticalAlign:"middle"}}),e("span",{style:{fontSize:"14px !important;"}},n.label)])))])])])])),n}))},setcolumnsList(){return this.columns.filter((t=>t.title&&"操作"!=t.title))},exportcolumnsList(){return this.columnsList.filter((t=>t.title&&"操作"!=t.title&&"selection"!=t.type))},filterItems(){let t=this.columns.filter((t=>t.filter)).sort(((t,e)=>t.filterSort-e.filterSort));this.filterCount=t.length;const e=24/this.filterGridSpan;this.calculateSupplementNum(t.length,e);return this.filterFold||(t=t.slice(0,t.length<e-1?t.length:e-1)),t},toolBarList(){return Array.isArray(this.toolBar)?this.toolBar:!0===this.toolBar?this.defToolBar:[]},tableSlot(){return this.columns.filter((t=>t.slot))},requestParams(){const{page:t,params:e,defaultSize:n}=this,r=e.pageSize?e.pageSize:t.pageSize;return{current:t.current,...e,pageSize:r||n}},dataSource(){return this.data&&this.data.data?Array.isArray(this.data.data)?this.data.data:[]:this.tableData},formKey(){return t=>t.as?t.as:t.key}},watch:{filterFold(t,e){},filterForm:{immediate:!1,deep:!0,handler(){this.isClickResetBtn||this.init_status&&(this.filterItems.map((t=>{for(let e in this.filterForm)t.as&&t.key===e&&this.$set(this.filterForm,t.as,this.filterForm[e])})),this.init_status=!1)}},loading:{immediate:!0,handler(t){void 0!=t&&(this.tableLoading=t)}},"data.total":{handler(t){this.page.total=t}},requestParams(){this.reload()}},methods:{isJsonString(t){if("string"!==typeof t)return!1;try{const e=JSON.parse(t);return"object"===typeof e&&null!==e}catch(e){return!1}},calculateSupplementNum(t,e){let n=0;return n=t%e===0?e-1:e-(t%e+1),this.filtersupplementnNum=n,n},filterViewList(){this.viewList=this.viewListP.filter((t=>{if(~t.name.indexOf(this.filterViewValue))return t}))},clickFlod(){this.filterFold=!this.filterFold},clickSetting(){this.$refs.tableSetting.exportModal=!0},clickItem(t){if("viewSave"==t)this.$refs.saveViewModal.title="保存视图",this.$refs.saveViewModal.exportModal=!0;else if("viewSetting"==t)this.$refs.viewEdit.exportModal=!0;else if(t.content){let n=JSON.parse(t.content);if(this.filterForm={...n.filterForm},n.filterForm&&(n.filterForm.sort?this.columnsList.forEach((t=>{t.sortable&&t.key==n.filterForm.sort?t.sortType=n.filterForm.sortOrder:t.sortType=""})):this.columnsList.forEach((t=>{t.sortable&&(t.sortType=n.filterForm.sortOrder)}))),this.$refs.selection&&this.$refs.selection.handleSort)try{this.$refs.selection.handleSort({column:void 0,key:"",order:"normal"})}catch(e){}this.page.current=n.current,this.page.pageSize=n.pageSize,this.reload()}},updateView(t){this.$refs.saveViewModal.exportBtnLoading=!0,Rn(t).then((t=>{let e=t.data;200==e.code&&(this.$refs.saveViewModal.exportModal=!1,this.handleGetUserQueryView())})).finally((()=>{this.$refs.saveViewModal.exportBtnLoading=!1}))},saveView(t){let e="";if(sessionStorage.getItem("user"))e="string"==typeof sessionStorage.getItem("user")&&"undefined"!=sessionStorage.getItem("user")?JSON.parse(sessionStorage.getItem("user")):sessionStorage.getItem("user");else if(1==t.type)return void this.$Message.warning("请先前往账号管理,绑定人员");let n="";(this.routePath||this.customPath||this.$route&&this.$route.path)&&(n=(this.routePath||this.customPath||this.$route.path).replace(/^\/?/,""));let r={current:this.page.current,pageSize:this.page.pageSize,filterForm:this.delValueEmptyProperty(this.filterForm)},i={tag:n+"tableSetView",name:t.name,type:t.type,user_id:e.id,content:JSON.stringify(r),project_id:JSON.parse(localStorage.getItem("selectedProject")).id,simp_token:a()};this.$refs.saveViewModal.exportBtnLoading=!0,Nn(i).then((t=>{let e=t.data;200==e.code&&(this.$refs.saveViewModal.exportModal=!1,this.handleGetUserQueryView())})).finally((()=>{this.$refs.saveViewModal.exportBtnLoading=!1}))},getStringValue(t){let e=t.value||t.id||t.month||"";return"number"===typeof t.value?e=String(t.value):"number"===typeof t.id?e=String(t.id):"number"===typeof t.month&&(e=String(t.month)),e},init(){let t={};this.columns.forEach((e=>{if(e.filter)if(["typelist"].includes(e.valueType),["daterange","datetimerange"].includes(e.valueType)&&e.defaultValue)if("daterange"==e.valueType){if(e.vs){var n=new Date(e.defaultValue[0]),r=new Date(e.defaultValue[1]),i=[];while(n<=r){var o=n.toISOString().split("T")[0];i.push(o),n.setDate(n.getDate()+1)}t["day"]=i,e.newkey&&2===e.newkey.length?(t[e.newkey[0]]=e.defaultValue[0],t[e.newkey[1]]=e.defaultValue[1]):(t["start"]=e.defaultValue[0],t["end"]=e.defaultValue[1])}else e.newkey&&2===e.newkey.length?(t[e.newkey[0]]=e.defaultValue[0]+" 00:00:00",t[e.newkey[1]]=e.defaultValue[1]+" 23:59:59"):(t["start"]=e.defaultValue[0]+" 00:00:00",t["end"]=e.defaultValue[1]+" 23:59:59"),t[this.formKey(e)]=[e.defaultValue[0]+" 00:00:00",e.defaultValue[1]+" 23:59:59"];t[this.formKey(e)]=[e.defaultValue[0],e.defaultValue[1]]}else e.newkey&&2===e.newkey.length?(t[e.newkey[0]]=e.defaultValue[0],t[e.newkey[1]]=e.defaultValue[1]):(t["start"]=e.defaultValue[0],t["end"]=e.defaultValue[1]),t[this.formKey(e)]=[e.defaultValue[0],e.defaultValue[1]];else["timerange"].includes(e.valueType)&&e.defaultValue?t["hour"]=e.defaultValue:t[e.key]=e.defaultValue})),this.filterForm=Object.assign({},t)},async getDataSource(t=this.requestParams){if(this.request){this.tableLoading=!0;const e=this.delValueEmptyProperty(this.filterForm),n=await this.request(t,e);this.isClickResetBtn=!1,this.tableData=n.data||[],this.page.total=n.total||0,this.tableLoading=!1}},delValueEmptyProperty(t){for(const e in t)Object.hasOwnProperty.call(t,e)&&(t[e]||delete t[e]);return t},reset(){if(this.page.current=1,this.isClickResetBtn=!0,this.columnsList.forEach((t=>{if(t.sortable&&(t.sortType=""),t.headerConfig&&t.headerConfig.options){const e=this.defaultColumnsList.find((e=>e.key===t.key));e&&e.headerConfig&&(t.headerConfig.options=[...e.headerConfig.options])}})),this.$nextTick((()=>{const t=document.querySelectorAll(".header-options");t.forEach((t=>{t&&this.initSortable(t)}))})),this.$refs.selection&&this.$refs.selection.handleSort)try{this.$refs.selection.handleSort({column:void 0,key:"",order:"normal"})}catch(t){}for(const e in this.filterForm)Object.hasOwnProperty.call(this.filterForm,e)&&(Array.isArray(this.filterForm[e])?this.filterForm[e]=[]:this.filterForm[e]="",this.$refs.element&&this.$refs.element.forEach(((t,e)=>{const n=t.$el||t;"typelist"===n.id?this.$refs.element[e].clearSelect():this.$refs.element[e].handleClear()})));delete this.filterForm.sort,delete this.filterForm.sortOrder,this.page.current=1,this.getDataSource({current:this.page.current,pageSize:this.page.pageSize})},onSelectionChange(t){this.selectionItems=t,this.$emit("on-selection-change",t)},onSelect(t,e){this.$emit("on-select",t,e)},onSelectCancel(t,e){this.$emit("on-select-cancel",t,e)},onSelectAll(t){this.$emit("on-select-all",t)},onSelectAllCancel(t){this.$emit("on-select-all-cancel",t)},onSortChange({column:t,key:e,order:n}){let r="";r=t.ns?t.ns:e,this.filterForm=Object.assign({},this.filterForm,{sort:"normal"!=n?r:"",sortOrder:"normal"!=n?n:""}),this.reload()},onToolBar(t){const e=this.columns.some((t=>"selection"===t.type));if(!e)return this.$emit("onToolBar",t);this.$emit("onToolBar",t,this.selectionItems)},isEmptyFilterForm(){let t=!0;for(const e of Object.values(this.filterForm))if(e){t=!1;break}return t},onFilter(){const t=this.$listeners.onFilter;if(t)return this.$emit("onFilter",this.filterForm);this.page.current=1,this.getDataSource({current:this.page.current,pageSize:this.page.pageSize})},onPageChange(t){this.page.current=t;const{onChange:e}=this.pagination;e&&"function"===typeof e&&e(t)},onPageSizeChange(t){this.page.pageSize=t;const{onChange:e}=this.pagination;e&&"function"===typeof e&&e(this.page.current)},setSelectionItem(t){this.$refs.selection.selectAll(t)},reload(){this.selectionItems.length>0&&(this.selectionItems.length=0),this.getDataSource()},changeDatePicker(t,e,n={}){this.isClickResetBtn||this.$nextTick((()=>{if("datetimerange"==n.valueType||"daterange"==n.valueType)if("daterange"==n.valueType)if(n.vs)if(t[0]&&t[1]){var r=new Date(t[0]),i=new Date(t[1]),o=[];while(r<=i){var s=r.toISOString().split("T")[0];o.push(s),r.setDate(r.getDate()+1)}1==o.length&&o.push(o[0]);const e=n.newkey&&n.newkey[0]?n.newkey[0]:"start",a=n.newkey&&n.newkey[1]?n.newkey[1]:"end";this.filterForm=Object.assign({},this.filterForm,{day:o,[e]:t[0],[a]:t[1],[this.formKey(n)]:[t[0],t[1]]})}else delete this.filterForm.hour,this.filterForm=Object.assign({},this.filterForm,{day:["",""],start:"",end:"",[this.formKey(n)]:[t[0],t[1]]});else{const e=n.newkey&&n.newkey[0]?n.newkey[0]:"start",r=n.newkey&&n.newkey[1]?n.newkey[1]:"end";this.filterForm=Object.assign({},this.filterForm,{[e]:t[0]?t[0]+" 00:00:00":"",[r]:t[1]?t[1]+" 23:59:59":""}),this.filterForm[this.formKey(n)]=[t[0]?t[0]+" 00:00:00":"",t[1]?t[1]+" 23:59:59":""]}else{const e=n.newkey&&n.newkey[0]?n.newkey[0]:"start",r=n.newkey&&n.newkey[1]?n.newkey[1]:"end";this.filterForm=Object.assign({},this.filterForm,{[e]:t[0],[r]:t[1],[this.formKey(n)]:[t[0],t[1]]})}else this.$set(this.filterForm,e,t)}))},changeTimePicker(t,e,n={}){this.isClickResetBtn||this.$nextTick((()=>{t[0]&&t[1]?"timerange"==n.valueType?this.filterForm=Object.assign({},this.filterForm,{hour:[t[0],t[1]]}):this.$set(this.filterForm,e,t):delete this.filterForm.hour}))},changeInput(t,e,n={}){this.$set(this.filterForm,e,t)},changeSelect(t,e,n={}){this.isClickResetBtn||this.$nextTick((()=>{n.jl?this.$parent.doJlMsg(n,t):this.$set(this.filterForm,e,t)}))},sortAndFilterColumns(t,e,n=!0){const r=t.filter((t=>e.includes(t.title)||n&&"操作"===t.title||n&&"selection"===t.type)),i=r.filter((t=>"selection"===t.type)),o=e.map((t=>r.find((e=>e.title===t)))).filter((t=>t&&"selection"!==t.type));if(n){const t=r.find((t=>"操作"===t.title));t&&o.push(t)}const s=[...i,...o];return s},handleGetUserQueryView(){let t="";(this.routePath||this.customPath||this.$route&&this.$route.path)&&(t=(this.routePath||this.customPath||this.$route.path).replace(/^\/?/,""));const e=localStorage.getItem("selectedProject");if(!e)return;let n=null;try{n=JSON.parse(e)}catch(i){return}if(!n||!n.id)return;let r={tag:t+"tableSetView",project_id:n.id,simp_token:a()};Tn(r).then((t=>{let e=t.data;200==e.code?(this.viewList=e.data,this.viewListP=hr().cloneDeep(this.viewList)):this.$Message.error(e.msg)})).catch((()=>{}))},getPerson(){const t=localStorage.getItem("selectedProject");if(!t)return;let e=null;try{e=JSON.parse(t)}catch(r){return}if(!e||!e.id)return;let n={project_id:e.id,simp_token:a(),rows:1e4,page:1,work:1};Ln(n).then((t=>{let e=t.data;200==e.code?this.personList=e.data.rows:this.$Message.error(e.msg)})).catch((()=>{}))},handleGetUserQuery(){let t="";(this.routePath||this.customPath||this.$route&&this.$route.path)&&(t=(this.routePath||this.customPath||this.$route.path).replace(/^\/?/,""));const e=localStorage.getItem("selectedProject");if(!e)return void this.reload();let n=null;try{n=JSON.parse(e)}catch(i){return void this.reload()}if(!n||!n.id)return void this.reload();let r={tag:t+"tableSet",project_id:n.id,simp_token:a()};this.tableLoading=!0,Tn(r).then((t=>{let e=t.data;if(200==e.code){let t="";if(t=Array.isArray(e.data)&&e.data.length>0?e.data[0]:"",t){t.content=JSON.parse(t.content);let{checkColumnData:e,freeze:n,columnWidths:r}=t.content;this.columnSettingId=t.id,this.columnSettingObj=t.content;let i=this.sortAndFilterColumns(hr().cloneDeep(this.columns),e),o=i[0]&&"selection"==i[0].type?n+1:n;i.forEach(((t,e)=>{"操作"==t.title?t.fixed="right":e<o?t.fixed="left":delete t.fixed,r&&r[t.key]&&(t.width=r[t.key])})),this.columnsList=i}}else this.$Message.error(e.msg)})).catch((()=>{this.tableLoading=!1})).finally((()=>{this.reload()}))},changeTypelist(t,e,n={}){t=t[t.length-1],this.isClickResetBtn||this.$nextTick((()=>{n.jl?this.$parent.doJlMsg(n,t):this.$set(this.filterForm,e,t)}))},choosePerson(t){this.filterForm[this.formKey(t)]||this.$set(this.filterForm,this.formKey(t),[]),this.all_names||(this.all_names=[]);const e=new Set(this.filterForm[this.formKey(t)]||[]),n=this.all_names.filter((t=>e.has(t.id)));this.all_names=n;const r=new Set(this.all_names.map((t=>t.id))),i=(this.filterForm[this.formKey(t)]||[]).filter((t=>!r.has(t)));i.length>0&&i.forEach(((t,e)=>{this.personList.forEach(((e,n)=>{if(e.id==t){let n={id:t,name:e.name,app_avatar:e.app_avatar,type:"user",avatar:e.avatar,count:0,selected:!0};this.all_names.push(n)}}))})),this.initShow=!0,this.currentFilterItem=t,this.$nextTick((()=>{this.$refs.orgPicker.initShow=!0,this.$refs.orgPicker.show()}))},selected(t){this.person_ids=[],this.personObj=[];let e=[],n=[];if(t.length>0&&t.forEach((t=>{this.person_ids.push(t.id),e.push(t.name)})),this.names=e.join("、"),this.all_names=t,this.currentFilterItem&&(this.filterForm[this.formKey(this.currentFilterItem)]=this.person_ids),e.length>0){let t={departName:"人员",names:e};this.personObj.push(t)}if(n.length>0){let t={departName:"部门",names:n};this.personObj.push(t)}},handleHeaderSelect(t,e){this.$emit("on-header-select",{option:t,column:e})},onColumnWidthResize(t,e,n,r){const i=n.key,o=this.columnsList.findIndex((t=>t.key===i));-1!==o&&(this.$set(this.columnsList[o],"width",t),this.saveColumnWidths()),this.$emit("on-column-width-resize",{newWidth:t,oldWidth:e,column:n,event:r})},saveColumnWidths:hr().debounce((function(){const t={};this.columnsList.forEach((e=>{e.key&&e.width&&(t[e.key]=e.width)}));let e="";(this.routePath||this.customPath||this.$route&&this.$route.path)&&(e=(this.routePath||this.customPath||this.$route.path).replace(/^\/?/,""));const n=localStorage.getItem("selectedProject");if(!n)return;let r=null;try{r=JSON.parse(n)}catch(s){return}if(!r||!r.id)return;let i={checkColumnData:this.columnSettingObj?this.columnSettingObj.checkColumnData:[],freeze:this.columnSettingObj?this.columnSettingObj.freeze:"",columnWidths:t},o={tag:e+"tableSet",name:e,content:JSON.stringify(i),project_id:r.id,simp_token:a()};this.columnSettingId?Rn({...o,id:this.columnSettingId}).then((t=>{let e=t.data;200===e.code&&(this.columnSettingObj=i)})):Nn(o).then((t=>{let e=t.data;200===e.code&&(this.columnSettingId=e.data.id,this.columnSettingObj=i)}))}),500),initSortable(t){t&&(t._sortable&&t._sortable.destroy(),t._sortable=new is(t,{animation:150,handle:".drag-handle",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",forceFallback:!0,fallbackClass:"sortable-fallback",onEnd:e=>{const{oldIndex:n,newIndex:r}=e,i=Array.from(t.children).map((t=>({value:t.getAttribute("data-value"),label:t.textContent.trim(),keyValue:t.getAttribute("data-key")}))),o=this.columnsList.find((t=>t.headerConfig&&t.as==i[0].keyValue||t.headerConfig&&t.key==i[0].keyValue));if(o){const t=[...i];this.$set(o.headerConfig,"options",[]),this.$nextTick((()=>{this.$set(o.headerConfig,"options",t)}))}let s=[];i.forEach((t=>{s.push(t.value)})),this.filterForm.sortOrder=s.join(","),this.reload(),this.$emit("on-header-sort",{oldIndex:n,newIndex:r,options:i,column:o})}}))}},created(){this.init()},mounted(){this.handleGetUserQueryView(),this.handleGetUserQuery(),this.getPerson(),window.$wujie&&window.$wujie.bus.$on("window-resize",(()=>{this.$nextTick((()=>{this.$refs.selection&&this.$refs.selection.handleResize()}))}))}},ls=as,us=tr(ls,o,s,!1,null,"2bd81707",null),cs=us.exports;const hs=[cs],fs=function(t){hs.forEach((e=>{t.component(e.name,e)}))};"undefined"!==typeof window&&window.Vue&&fs(window.Vue);var ds={install:fs},ps=ds}(),i}()}));
22
+ function Mr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Fr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mr(Object(n),!0).forEach((function(e){zr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Pr(t){return Pr="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pr(t)}function zr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ur(){return Ur=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ur.apply(this,arguments)}function Vr(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function Wr(t,e){if(null==t)return{};var n,r,i=Vr(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var Hr="1.15.6";function Gr(t){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Qr=Gr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Yr=Gr(/Edge/i),$r=Gr(/firefox/i),Jr=Gr(/safari/i)&&!Gr(/chrome/i)&&!Gr(/android/i),qr=Gr(/iP(ad|od|hone)/i),Xr=Gr(/chrome/i)&&Gr(/android/i),Kr={capture:!1,passive:!1};function Zr(t,e,n){t.addEventListener(e,n,!Qr&&Kr)}function ti(t,e,n){t.removeEventListener(e,n,!Qr&&Kr)}function ei(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function ni(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function ri(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&ei(t,e):ei(t,e))||r&&t===n)return t;if(t===n)break}while(t=ni(t))}return null}var ii,oi=/\s+/g;function si(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(oi," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(oi," ")}}function ai(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"===typeof n?"":"px")}}function li(t,e){var n="";if("string"===typeof t)n=t;else do{var r=ai(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function ui(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function ci(){var t=document.scrollingElement;return t||document.documentElement}function hi(t,e,n,r,i){if(t.getBoundingClientRect||t===window){var o,s,a,l,u,c,h;if(t!==window&&t.parentNode&&t!==ci()?(o=t.getBoundingClientRect(),s=o.top,a=o.left,l=o.bottom,u=o.right,c=o.height,h=o.width):(s=0,a=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!Qr))do{if(i&&i.getBoundingClientRect&&("none"!==ai(i,"transform")||n&&"static"!==ai(i,"position"))){var f=i.getBoundingClientRect();s-=f.top+parseInt(ai(i,"border-top-width")),a-=f.left+parseInt(ai(i,"border-left-width")),l=s+o.height,u=a+o.width;break}}while(i=i.parentNode);if(r&&t!==window){var d=li(i||t),p=d&&d.a,g=d&&d.d;d&&(s/=g,a/=p,h/=p,c/=g,l=s+c,u=a+h)}return{top:s,left:a,bottom:l,right:u,width:h,height:c}}}function fi(t,e,n){var r=yi(t,!0),i=hi(t)[e];while(r){var o=hi(r)[n],s=void 0;if(s="top"===n||"left"===n?i>=o:i<=o,!s)return r;if(r===ci())break;r=yi(r,!1)}return!1}function di(t,e,n,r){var i=0,o=0,s=t.children;while(o<s.length){if("none"!==s[o].style.display&&s[o]!==Do.ghost&&(r||s[o]!==Do.dragged)&&ri(s[o],n.draggable,t,!1)){if(i===e)return s[o];i++}o++}return null}function pi(t,e){var n=t.lastElementChild;while(n&&(n===Do.ghost||"none"===ai(n,"display")||e&&!ei(n,e)))n=n.previousElementSibling;return n||null}function gi(t,e){var n=0;if(!t||!t.parentNode)return-1;while(t=t.previousElementSibling)"TEMPLATE"===t.nodeName.toUpperCase()||t===Do.clone||e&&!ei(t,e)||n++;return n}function vi(t){var e=0,n=0,r=ci();if(t)do{var i=li(t),o=i.a,s=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*s}while(t!==r&&(t=t.parentNode));return[e,n]}function mi(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}function yi(t,e){if(!t||!t.getBoundingClientRect)return ci();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=ai(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return ci();if(r||e)return n;r=!0}}}while(n=n.parentNode);return ci()}function bi(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function wi(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function Si(t,e){return function(){if(!ii){var n=arguments,r=this;1===n.length?t.call(r,n[0]):t.apply(r,n),ii=setTimeout((function(){ii=void 0}),e)}}}function Ai(){clearTimeout(ii),ii=void 0}function _i(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function xi(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function Oi(t,e,n){var r={};return Array.from(t.children).forEach((function(i){var o,s,a,l;if(ri(i,e.draggable,t,!1)&&!i.animated&&i!==n){var u=hi(i);r.left=Math.min(null!==(o=r.left)&&void 0!==o?o:1/0,u.left),r.top=Math.min(null!==(s=r.top)&&void 0!==s?s:1/0,u.top),r.right=Math.max(null!==(a=r.right)&&void 0!==a?a:-1/0,u.right),r.bottom=Math.max(null!==(l=r.bottom)&&void 0!==l?l:-1/0,u.bottom)}})),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var Ei="Sortable"+(new Date).getTime();function Ci(){var t,e=[];return{captureAnimationState:function(){if(e=[],this.options.animation){var t=[].slice.call(this.el.children);t.forEach((function(t){if("none"!==ai(t,"display")&&t!==Do.ghost){e.push({target:t,rect:hi(t)});var n=Fr({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=li(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}}))}},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(mi(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(t),void("function"===typeof n&&n());var i=!1,o=0;e.forEach((function(t){var e=0,n=t.target,s=n.fromRect,a=hi(n),l=n.prevFromRect,u=n.prevToRect,c=t.rect,h=li(n,!0);h&&(a.top-=h.f,a.left-=h.e),n.toRect=a,n.thisAnimationDuration&&wi(l,a)&&!wi(s,a)&&(c.top-a.top)/(c.left-a.left)===(s.top-a.top)/(s.left-a.left)&&(e=Ii(c,l,u,r.options)),wi(a,s)||(n.prevFromRect=s,n.prevToRect=a,e||(e=r.options.animation),r.animate(n,c,a,e)),e&&(i=!0,o=Math.max(o,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"===typeof n&&n()}),o):"function"===typeof n&&n(),e=[]},animate:function(t,e,n,r){if(r){ai(t,"transition",""),ai(t,"transform","");var i=li(this.el),o=i&&i.a,s=i&&i.d,a=(e.left-n.left)/(o||1),l=(e.top-n.top)/(s||1);t.animatingX=!!a,t.animatingY=!!l,ai(t,"transform","translate3d("+a+"px,"+l+"px,0)"),this.forRepaintDummy=ki(t),ai(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),ai(t,"transform","translate3d(0,0,0)"),"number"===typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){ai(t,"transition",""),ai(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}}function ki(t){return t.offsetWidth}function Ii(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var Di=[],Ni={initializeByDefault:!0},Ri={mount:function(t){for(var e in Ni)Ni.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ni[e]);Di.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),Di.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=t+"Global";Di.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][i]&&e[r.pluginName][i](Fr({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](Fr({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var i in Di.forEach((function(r){var i=r.pluginName;if(t.options[i]||r.initializeByDefault){var o=new r(t,e,t.options);o.sortable=t,o.options=t.options,t[i]=o,Ur(n,o.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);"undefined"!==typeof o&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return Di.forEach((function(r){"function"===typeof r.eventProperties&&Ur(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return Di.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"===typeof i.optionListeners[e]&&(r=i.optionListeners[e].call(t[i.pluginName],n))})),r}};function Ti(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,o=t.cloneEl,s=t.toEl,a=t.fromEl,l=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,h=t.newDraggableIndex,f=t.originalEvent,d=t.putSortable,p=t.extraEventProperties;if(e=e||n&&n[Ei],e){var g,v=e.options,m="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||Qr||Yr?(g=document.createEvent("Event"),g.initEvent(r,!0,!0)):g=new CustomEvent(r,{bubbles:!0,cancelable:!0}),g.to=s||n,g.from=a||n,g.item=i||n,g.clone=o,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=c,g.newDraggableIndex=h,g.originalEvent=f,g.pullMode=d?d.lastPutMode:void 0;var y=Fr(Fr({},p),Ri.getEventProperties(r,e));for(var b in y)g[b]=y[b];n&&n.dispatchEvent(g),v[m]&&v[m].call(e,g)}}var ji=["evt"],Bi=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=Wr(n,ji);Ri.pluginEvent.bind(Do)(t,e,Fr({dragEl:Mi,parentEl:Fi,ghostEl:Pi,rootEl:zi,nextEl:Ui,lastDownEl:Vi,cloneEl:Wi,cloneHidden:Hi,dragStarted:ro,putSortable:qi,activeSortable:Do.active,originalEvent:r,oldIndex:Gi,oldDraggableIndex:Yi,newIndex:Qi,newDraggableIndex:$i,hideGhostForTarget:Eo,unhideGhostForTarget:Co,cloneNowHidden:function(){Hi=!0},cloneNowShown:function(){Hi=!1},dispatchSortableEvent:function(t){Li({sortable:e,name:t,originalEvent:r})}},i))};function Li(t){Ti(Fr({putSortable:qi,cloneEl:Wi,targetEl:Mi,rootEl:zi,oldIndex:Gi,oldDraggableIndex:Yi,newIndex:Qi,newDraggableIndex:$i},t))}var Mi,Fi,Pi,zi,Ui,Vi,Wi,Hi,Gi,Qi,Yi,$i,Ji,qi,Xi,Ki,Zi,to,eo,no,ro,io,oo,so,ao,lo=!1,uo=!1,co=[],ho=!1,fo=!1,po=[],go=!1,vo=[],mo="undefined"!==typeof document,yo=qr,bo=Yr||Qr?"cssFloat":"float",wo=mo&&!Xr&&!qr&&"draggable"in document.createElement("div"),So=function(){if(mo){if(Qr)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ao=function(t,e){var n=ai(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=di(t,0,e),o=di(t,1,e),s=i&&ai(i),a=o&&ai(o),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+hi(i).width,u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+hi(o).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(i&&s["float"]&&"none"!==s["float"]){var c="left"===s["float"]?"left":"right";return!o||"both"!==a.clear&&a.clear!==c?"horizontal":"vertical"}return i&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=r&&"none"===n[bo]||o&&"none"===n[bo]&&l+u>r)?"vertical":"horizontal"},_o=function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,s=n?e.left:e.top,a=n?e.right:e.bottom,l=n?e.width:e.height;return r===s||i===a||r+o/2===s+l/2},xo=function(t,e){var n;return co.some((function(r){var i=r[Ei].options.emptyInsertThreshold;if(i&&!pi(r)){var o=hi(r),s=t>=o.left-i&&t<=o.right+i,a=e>=o.top-i&&e<=o.bottom+i;return s&&a?n=r:void 0}})),n},Oo=function(t){function e(t,n){return function(r,i,o,s){var a=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==t&&(n||a))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"===typeof t)return e(t(r,i,o,s),n)(r,i,o,s);var l=(n?r:i).options.group.name;return!0===t||"string"===typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},r=t.group;r&&"object"==Pr(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Eo=function(){!So&&Pi&&ai(Pi,"display","none")},Co=function(){!So&&Pi&&ai(Pi,"display","")};mo&&!Xr&&document.addEventListener("click",(function(t){if(uo)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),uo=!1,!1}),!0);var ko=function(t){if(Mi){t=t.touches?t.touches[0]:t;var e=xo(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Ei]._onDragOver(n)}}},Io=function(t){Mi&&Mi.parentNode[Ei]._isOutsideThisEl(t.target)};function Do(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Ur({},e),t[Ei]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ao(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Do.supportPointer&&"PointerEvent"in window&&(!Jr||qr),emptyInsertThreshold:5};for(var r in Ri.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var i in Oo(e),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&wo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Zr(t,"pointerdown",this._onTapStart):(Zr(t,"mousedown",this._onTapStart),Zr(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Zr(t,"dragover",this),Zr(t,"dragenter",this)),co.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ur(this,Ci())}function No(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Ro(t,e,n,r,i,o,s,a){var l,u,c=t[Ei],h=c.options.onMove;return!window.CustomEvent||Qr||Yr?(l=document.createEvent("Event"),l.initEvent("move",!0,!0)):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=i||e,l.relatedRect=o||hi(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),h&&(u=h.call(c,l,s)),u}function To(t){t.draggable=!1}function jo(){go=!1}function Bo(t,e,n){var r=hi(di(n.el,0,n.options,!0)),i=Oi(n.el,n.options,Pi),o=10;return e?t.clientX<i.left-o||t.clientY<r.top&&t.clientX<r.right:t.clientY<i.top-o||t.clientY<r.bottom&&t.clientX<r.left}function Lo(t,e,n){var r=hi(pi(n.el,n.options.draggable)),i=Oi(n.el,n.options,Pi),o=10;return e?t.clientX>i.right+o||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>i.bottom+o||t.clientX>r.right&&t.clientY>r.top}function Mo(t,e,n,r,i,o,s,a){var l=r?t.clientY:t.clientX,u=r?n.height:n.width,c=r?n.top:n.left,h=r?n.bottom:n.right,f=!1;if(!s)if(a&&so<u*i){if(!ho&&(1===oo?l>c+u*o/2:l<h-u*o/2)&&(ho=!0),ho)f=!0;else if(1===oo?l<c+so:l>h-so)return-oo}else if(l>c+u*(1-i)/2&&l<h-u*(1-i)/2)return Fo(e);return f=f||s,f&&(l<c+u*o/2||l>h-u*o/2)?l>c+u/2?1:-1:0}function Fo(t){return gi(Mi)<gi(t)?1:-1}function Po(t){var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;while(n--)r+=e.charCodeAt(n);return r.toString(36)}function zo(t){vo.length=0;var e=t.getElementsByTagName("input"),n=e.length;while(n--){var r=e[n];r.checked&&vo.push(r)}}function Uo(t){return setTimeout(t,0)}function Vo(t){return clearTimeout(t)}Do.prototype={constructor:Do,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(io=null)},_getDirection:function(t,e){return"function"===typeof this.options.direction?this.options.direction.call(this,t,e,Mi):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=t.type,s=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,u=r.filter;if(zo(n),!Mi&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Jr||!a||"SELECT"!==a.tagName.toUpperCase())&&(a=ri(a,r.draggable,n,!1),(!a||!a.animated)&&Vi!==a)){if(Gi=gi(a),Yi=gi(a,r.draggable),"function"===typeof u){if(u.call(this,t,a,this))return Li({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),Bi("filter",e,{evt:t}),void(i&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(r){if(r=ri(l,r.trim(),n,!1),r)return Li({sortable:e,rootEl:r,name:"filter",targetEl:a,fromEl:n,toEl:n}),Bi("filter",e,{evt:t}),!0})),u))return void(i&&t.preventDefault());r.handle&&!ri(l,r.handle,n,!1)||this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,n){var r,i=this,o=i.el,s=i.options,a=o.ownerDocument;if(n&&!Mi&&n.parentNode===o){var l=hi(n);if(zi=o,Mi=n,Fi=Mi.parentNode,Ui=Mi.nextSibling,Vi=n,Ji=s.group,Do.dragged=Mi,Xi={target:Mi,clientX:(e||t).clientX,clientY:(e||t).clientY},eo=Xi.clientX-l.left,no=Xi.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Mi.style["will-change"]="all",r=function(){Bi("delayEnded",i,{evt:t}),Do.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!$r&&i.nativeDraggable&&(Mi.draggable=!0),i._triggerDragStart(t,e),Li({sortable:i,name:"choose",originalEvent:t}),si(Mi,s.chosenClass,!0))},s.ignore.split(",").forEach((function(t){ui(Mi,t.trim(),To)})),Zr(a,"dragover",ko),Zr(a,"mousemove",ko),Zr(a,"touchmove",ko),s.supportPointer?(Zr(a,"pointerup",i._onDrop),!this.nativeDraggable&&Zr(a,"pointercancel",i._onDrop)):(Zr(a,"mouseup",i._onDrop),Zr(a,"touchend",i._onDrop),Zr(a,"touchcancel",i._onDrop)),$r&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Mi.draggable=!0),Bi("delayStart",this,{evt:t}),!s.delay||s.delayOnTouchOnly&&!e||this.nativeDraggable&&(Yr||Qr))r();else{if(Do.eventCanceled)return void this._onDrop();s.supportPointer?(Zr(a,"pointerup",i._disableDelayedDrag),Zr(a,"pointercancel",i._disableDelayedDrag)):(Zr(a,"mouseup",i._disableDelayedDrag),Zr(a,"touchend",i._disableDelayedDrag),Zr(a,"touchcancel",i._disableDelayedDrag)),Zr(a,"mousemove",i._delayedDragTouchMoveHandler),Zr(a,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&Zr(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,s.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Mi&&To(Mi),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ti(t,"mouseup",this._disableDelayedDrag),ti(t,"touchend",this._disableDelayedDrag),ti(t,"touchcancel",this._disableDelayedDrag),ti(t,"pointerup",this._disableDelayedDrag),ti(t,"pointercancel",this._disableDelayedDrag),ti(t,"mousemove",this._delayedDragTouchMoveHandler),ti(t,"touchmove",this._delayedDragTouchMoveHandler),ti(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?Zr(document,"pointermove",this._onTouchMove):Zr(document,e?"touchmove":"mousemove",this._onTouchMove):(Zr(Mi,"dragend",this),Zr(zi,"dragstart",this._onDragStart));try{document.selection?Uo((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(lo=!1,zi&&Mi){Bi("dragStarted",this,{evt:e}),this.nativeDraggable&&Zr(document,"dragover",Io);var n=this.options;!t&&si(Mi,n.dragClass,!1),si(Mi,n.ghostClass,!0),Do.active=this,t&&this._appendGhost(),Li({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ki){this._lastX=Ki.clientX,this._lastY=Ki.clientY,Eo();var t=document.elementFromPoint(Ki.clientX,Ki.clientY),e=t;while(t&&t.shadowRoot){if(t=t.shadowRoot.elementFromPoint(Ki.clientX,Ki.clientY),t===e)break;e=t}if(Mi.parentNode[Ei]._isOutsideThisEl(t),e)do{if(e[Ei]){var n=void 0;if(n=e[Ei]._onDragOver({clientX:Ki.clientX,clientY:Ki.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=ni(e));Co()}},_onTouchMove:function(t){if(Xi){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=Pi&&li(Pi,!0),s=Pi&&o&&o.a,a=Pi&&o&&o.d,l=yo&&ao&&vi(ao),u=(i.clientX-Xi.clientX+r.x)/(s||1)+(l?l[0]-po[0]:0)/(s||1),c=(i.clientY-Xi.clientY+r.y)/(a||1)+(l?l[1]-po[1]:0)/(a||1);if(!Do.active&&!lo){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Pi){o?(o.e+=u-(Zi||0),o.f+=c-(to||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var h="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");ai(Pi,"webkitTransform",h),ai(Pi,"mozTransform",h),ai(Pi,"msTransform",h),ai(Pi,"transform",h),Zi=u,to=c,Ki=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Pi){var t=this.options.fallbackOnBody?document.body:zi,e=hi(Mi,!0,yo,!0,t),n=this.options;if(yo){ao=t;while("static"===ai(ao,"position")&&"none"===ai(ao,"transform")&&ao!==document)ao=ao.parentNode;ao!==document.body&&ao!==document.documentElement?(ao===document&&(ao=ci()),e.top+=ao.scrollTop,e.left+=ao.scrollLeft):ao=ci(),po=vi(ao)}Pi=Mi.cloneNode(!0),si(Pi,n.ghostClass,!1),si(Pi,n.fallbackClass,!0),si(Pi,n.dragClass,!0),ai(Pi,"transition",""),ai(Pi,"transform",""),ai(Pi,"box-sizing","border-box"),ai(Pi,"margin",0),ai(Pi,"top",e.top),ai(Pi,"left",e.left),ai(Pi,"width",e.width),ai(Pi,"height",e.height),ai(Pi,"opacity","0.8"),ai(Pi,"position",yo?"absolute":"fixed"),ai(Pi,"zIndex","100000"),ai(Pi,"pointerEvents","none"),Do.ghost=Pi,t.appendChild(Pi),ai(Pi,"transform-origin",eo/parseInt(Pi.style.width)*100+"% "+no/parseInt(Pi.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,i=n.options;Bi("dragStart",this,{evt:t}),Do.eventCanceled?this._onDrop():(Bi("setupClone",this),Do.eventCanceled||(Wi=xi(Mi),Wi.removeAttribute("id"),Wi.draggable=!1,Wi.style["will-change"]="",this._hideClone(),si(Wi,this.options.chosenClass,!1),Do.clone=Wi),n.cloneId=Uo((function(){Bi("clone",n),Do.eventCanceled||(n.options.removeCloneOnHide||zi.insertBefore(Wi,Mi),n._hideClone(),Li({sortable:n,name:"clone"}))})),!e&&si(Mi,i.dragClass,!0),e?(uo=!0,n._loopId=setInterval(n._emulateDragOver,50)):(ti(document,"mouseup",n._onDrop),ti(document,"touchend",n._onDrop),ti(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,Mi)),Zr(document,"drop",n),ai(Mi,"transform","translateZ(0)")),lo=!0,n._dragStartId=Uo(n._dragStarted.bind(n,e,t)),Zr(document,"selectstart",n),ro=!0,window.getSelection().removeAllRanges(),Jr&&ai(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,i,o=this.el,s=t.target,a=this.options,l=a.group,u=Do.active,c=Ji===l,h=a.sort,f=qi||u,d=this,p=!1;if(!go){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=ri(s,a.draggable,o,!0),I("dragOver"),Do.eventCanceled)return p;if(Mi.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||d._ignoreWhileAnimating===s)return N(!1);if(uo=!1,u&&!a.disabled&&(c?h||(r=Fi!==zi):qi===this||(this.lastPutMode=Ji.checkPull(this,u,Mi,t))&&l.checkPut(this,u,Mi,t))){if(i="vertical"===this._getDirection(t,s),e=hi(Mi),I("dragOverValid"),Do.eventCanceled)return p;if(r)return Fi=zi,D(),this._hideClone(),I("revert"),Do.eventCanceled||(Ui?zi.insertBefore(Mi,Ui):zi.appendChild(Mi)),N(!0);var g=pi(o,a.draggable);if(!g||Lo(t,i,this)&&!g.animated){if(g===Mi)return N(!1);if(g&&o===t.target&&(s=g),s&&(n=hi(s)),!1!==Ro(zi,o,Mi,e,s,n,t,!!s))return D(),g&&g.nextSibling?o.insertBefore(Mi,g.nextSibling):o.appendChild(Mi),Fi=o,R(),N(!0)}else if(g&&Bo(t,i,this)){var v=di(o,0,a,!0);if(v===Mi)return N(!1);if(s=v,n=hi(s),!1!==Ro(zi,o,Mi,e,s,n,t,!1))return D(),o.insertBefore(Mi,v),Fi=o,R(),N(!0)}else if(s.parentNode===o){n=hi(s);var m,y,b=0,w=Mi.parentNode!==o,S=!_o(Mi.animated&&Mi.toRect||e,s.animated&&s.toRect||n,i),A=i?"top":"left",_=fi(s,"top","top")||fi(Mi,"top","top"),x=_?_.scrollTop:void 0;if(io!==s&&(m=n[A],ho=!1,fo=!S&&a.invertSwap||w),b=Mo(t,s,n,i,S?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,fo,io===s),0!==b){var O=gi(Mi);do{O-=b,y=Fi.children[O]}while(y&&("none"===ai(y,"display")||y===Pi))}if(0===b||y===s)return N(!1);io=s,oo=b;var E=s.nextElementSibling,C=!1;C=1===b;var k=Ro(zi,o,Mi,e,s,n,t,C);if(!1!==k)return 1!==k&&-1!==k||(C=1===k),go=!0,setTimeout(jo,30),D(),C&&!E?o.appendChild(Mi):s.parentNode.insertBefore(Mi,C?E:s),_&&_i(_,0,x-_.scrollTop),Fi=Mi.parentNode,void 0===m||fo||(so=Math.abs(m-hi(s)[A])),R(),N(!0)}if(o.contains(Mi))return N(!1)}return!1}function I(a,l){Bi(a,d,Fr({evt:t,isOwner:c,axis:i?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:h,fromSortable:f,target:s,completed:N,onMove:function(n,r){return Ro(zi,o,Mi,e,n,hi(n),t,r)},changed:R},l))}function D(){I("dragOverAnimationCapture"),d.captureAnimationState(),d!==f&&f.captureAnimationState()}function N(e){return I("dragOverCompleted",{insertion:e}),e&&(c?u._hideClone():u._showClone(d),d!==f&&(si(Mi,qi?qi.options.ghostClass:u.options.ghostClass,!1),si(Mi,a.ghostClass,!0)),qi!==d&&d!==Do.active?qi=d:d===Do.active&&qi&&(qi=null),f===d&&(d._ignoreWhileAnimating=s),d.animateAll((function(){I("dragOverAnimationComplete"),d._ignoreWhileAnimating=null})),d!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(s===Mi&&!Mi.animated||s===o&&!s.animated)&&(io=null),a.dragoverBubble||t.rootEl||s===document||(Mi.parentNode[Ei]._isOutsideThisEl(t.target),!e&&ko(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),p=!0}function R(){Qi=gi(Mi),$i=gi(Mi,a.draggable),Li({sortable:d,name:"change",toEl:o,newIndex:Qi,newDraggableIndex:$i,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){ti(document,"mousemove",this._onTouchMove),ti(document,"touchmove",this._onTouchMove),ti(document,"pointermove",this._onTouchMove),ti(document,"dragover",ko),ti(document,"mousemove",ko),ti(document,"touchmove",ko)},_offUpEvents:function(){var t=this.el.ownerDocument;ti(t,"mouseup",this._onDrop),ti(t,"touchend",this._onDrop),ti(t,"pointerup",this._onDrop),ti(t,"pointercancel",this._onDrop),ti(t,"touchcancel",this._onDrop),ti(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Qi=gi(Mi),$i=gi(Mi,n.draggable),Bi("drop",this,{evt:t}),Fi=Mi&&Mi.parentNode,Qi=gi(Mi),$i=gi(Mi,n.draggable),Do.eventCanceled||(lo=!1,fo=!1,ho=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vo(this.cloneId),Vo(this._dragStartId),this.nativeDraggable&&(ti(document,"drop",this),ti(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Jr&&ai(document.body,"user-select",""),ai(Mi,"transform",""),t&&(ro&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Pi&&Pi.parentNode&&Pi.parentNode.removeChild(Pi),(zi===Fi||qi&&"clone"!==qi.lastPutMode)&&Wi&&Wi.parentNode&&Wi.parentNode.removeChild(Wi),Mi&&(this.nativeDraggable&&ti(Mi,"dragend",this),To(Mi),Mi.style["will-change"]="",ro&&!lo&&si(Mi,qi?qi.options.ghostClass:this.options.ghostClass,!1),si(Mi,this.options.chosenClass,!1),Li({sortable:this,name:"unchoose",toEl:Fi,newIndex:null,newDraggableIndex:null,originalEvent:t}),zi!==Fi?(Qi>=0&&(Li({rootEl:Fi,name:"add",toEl:Fi,fromEl:zi,originalEvent:t}),Li({sortable:this,name:"remove",toEl:Fi,originalEvent:t}),Li({rootEl:Fi,name:"sort",toEl:Fi,fromEl:zi,originalEvent:t}),Li({sortable:this,name:"sort",toEl:Fi,originalEvent:t})),qi&&qi.save()):Qi!==Gi&&Qi>=0&&(Li({sortable:this,name:"update",toEl:Fi,originalEvent:t}),Li({sortable:this,name:"sort",toEl:Fi,originalEvent:t})),Do.active&&(null!=Qi&&-1!==Qi||(Qi=Gi,$i=Yi),Li({sortable:this,name:"end",toEl:Fi,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Bi("nulling",this),zi=Mi=Fi=Pi=Ui=Wi=Vi=Hi=Xi=Ki=ro=Qi=$i=Gi=Yi=io=oo=qi=Ji=Do.dragged=Do.ghost=Do.clone=Do.active=null,vo.forEach((function(t){t.checked=!0})),vo.length=Zi=to=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Mi&&(this._onDragOver(t),No(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)t=n[r],ri(t,o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Po(t));return e},sort:function(t,e){var n={},r=this.el;this.toArray().forEach((function(t,e){var i=r.children[e];ri(i,this.options.draggable,r,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(r.removeChild(n[t]),r.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return ri(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=Ri.modifyOption(this,t,e);n[t]="undefined"!==typeof r?r:e,"group"===t&&Oo(n)},destroy:function(){Bi("destroy",this);var t=this.el;t[Ei]=null,ti(t,"mousedown",this._onTapStart),ti(t,"touchstart",this._onTapStart),ti(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(ti(t,"dragover",this),ti(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),co.splice(co.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Hi){if(Bi("hideClone",this),Do.eventCanceled)return;ai(Wi,"display","none"),this.options.removeCloneOnHide&&Wi.parentNode&&Wi.parentNode.removeChild(Wi),Hi=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Hi){if(Bi("showClone",this),Do.eventCanceled)return;Mi.parentNode!=zi||this.options.group.revertClone?Ui?zi.insertBefore(Wi,Ui):zi.appendChild(Wi):zi.insertBefore(Wi,Mi),this.options.group.revertClone&&this.animate(Mi,Wi),ai(Wi,"display",""),Hi=!1}}else this._hideClone()}},mo&&Zr(document,"touchmove",(function(t){(Do.active||lo)&&t.cancelable&&t.preventDefault()})),Do.utils={on:Zr,off:ti,css:ai,find:ui,is:function(t,e){return!!ri(t,e,t,!1)},extend:bi,throttle:Si,closest:ri,toggleClass:si,clone:xi,index:gi,nextTick:Uo,cancelNextTick:Vo,detectDirection:Ao,getChild:di,expando:Ei},Do.get=function(t){return t[Ei]},Do.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Do.utils=Fr(Fr({},Do.utils),t.utils)),Ri.mount(t)}))},Do.create=function(t,e){return new Do(t,e)},Do.version=Hr;var Wo,Ho,Go,Qo,Yo,$o,Jo=[],qo=!1;function Xo(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"===typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?Zr(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Zr(document,"pointermove",this._handleFallbackAutoScroll):e.touches?Zr(document,"touchmove",this._handleFallbackAutoScroll):Zr(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?ti(document,"dragover",this._handleAutoScroll):(ti(document,"pointermove",this._handleFallbackAutoScroll),ti(document,"touchmove",this._handleFallbackAutoScroll),ti(document,"mousemove",this._handleFallbackAutoScroll)),Zo(),Ko(),Ai()},nulling:function(){Yo=Ho=Wo=qo=$o=Go=Qo=null,Jo.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(r,i);if(Yo=t,e||this.options.forceAutoScrollFallback||Yr||Qr||Jr){ts(t,this.options,o,e);var s=yi(o,!0);!qo||$o&&r===Go&&i===Qo||($o&&Zo(),$o=setInterval((function(){var o=yi(document.elementFromPoint(r,i),!0);o!==s&&(s=o,Ko()),ts(t,n.options,o,e)}),10),Go=r,Qo=i)}else{if(!this.options.bubbleScroll||yi(o,!0)===ci())return void Ko();ts(t,this.options,yi(o,!1),!1)}}},Ur(t,{pluginName:"scroll",initializeByDefault:!0})}function Ko(){Jo.forEach((function(t){clearInterval(t.pid)})),Jo=[]}function Zo(){clearInterval($o)}var ts=Si((function(t,e,n,r){if(e.scroll){var i,o=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,u=ci(),c=!1;Ho!==n&&(Ho=n,Ko(),Wo=e.scroll,i=e.scrollFn,!0===Wo&&(Wo=yi(n,!0)));var h=0,f=Wo;do{var d=f,p=hi(d),g=p.top,v=p.bottom,m=p.left,y=p.right,b=p.width,w=p.height,S=void 0,A=void 0,_=d.scrollWidth,x=d.scrollHeight,O=ai(d),E=d.scrollLeft,C=d.scrollTop;d===u?(S=b<_&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),A=w<x&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(S=b<_&&("auto"===O.overflowX||"scroll"===O.overflowX),A=w<x&&("auto"===O.overflowY||"scroll"===O.overflowY));var k=S&&(Math.abs(y-o)<=a&&E+b<_)-(Math.abs(m-o)<=a&&!!E),I=A&&(Math.abs(v-s)<=a&&C+w<x)-(Math.abs(g-s)<=a&&!!C);if(!Jo[h])for(var D=0;D<=h;D++)Jo[D]||(Jo[D]={});Jo[h].vx==k&&Jo[h].vy==I&&Jo[h].el===d||(Jo[h].el=d,Jo[h].vx=k,Jo[h].vy=I,clearInterval(Jo[h].pid),0==k&&0==I||(c=!0,Jo[h].pid=setInterval(function(){r&&0===this.layer&&Do.active._onTouchMove(Yo);var e=Jo[this.layer].vy?Jo[this.layer].vy*l:0,n=Jo[this.layer].vx?Jo[this.layer].vx*l:0;"function"===typeof i&&"continue"!==i.call(Do.dragged.parentNode[Ei],n,e,t,Yo,Jo[this.layer].el)||_i(Jo[this.layer].el,n,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&f!==u&&(f=yi(f,!1)));qo=c}}),30),es=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=n||i;s();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(u.clientX,u.clientY);a(),l&&!l.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function ns(){}function rs(){}ns.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=di(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:es},Ur(ns,{pluginName:"revertOnSpill"}),rs.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,r=n||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:es},Ur(rs,{pluginName:"removeOnSpill"});Do.mount(new Xo),Do.mount(rs,ns);var is=Do,os=r(9123),ss=r.n(os),as={name:"cj_iview_table",components:{tableSetting:ar,saveViewModal:mr,viewEdit:_r,OrgPicker:Lr,Treeselect:ss()},props:{customPath:{type:String,default:""},routePath:{type:String,default:""},filterGridSpan:{type:Number,default:6},filterLabelWidth:{type:Number,default:80},border:{type:Boolean,default:!1},resizable:{type:Boolean,default:!0},height:{type:String,default:""},maxHeight:{type:String,default:""},size:{type:String,default:"default"},loading:{type:Boolean,required:!1},isShowtoolBarRight:{type:Boolean,required:!1,default:!0},columns:{type:Array,required:!0},toolBar:{type:[Array,Boolean],default:!0},defaultSize:{type:Number,default:10},params:{type:Object,default:()=>({})},pagination:{type:Object,default:()=>({})},data:{type:Object,required:!1},request:{type:Function,required:!1}},data(){return{person_icon:xr,viewSaveIcon:lr,viewSettingIcon:ur,table_no_flod:Un,table_flod:Vn,filterForm:{},filtersupplementnNum:0,tableData:[],tableLoading:!1,isClickFilterBtn:!1,isClickResetBtn:!1,filterFold:!1,columnSettingObj:"",columnSettingId:"",columnsList:hr().cloneDeep(this.columns),defaultColumnsList:hr().cloneDeep(this.columns),viewList:[],viewListP:[],filterViewValue:"",filterCount:0,selectionItems:[],defToolBar:[{text:"新增",type:"primary"}],init_status:!0,page:{current:1,pageSize:10,total:0},personList:[],initShow:!0,all_names:[],personObj:{},person_ids:[],currentFilterItem:null,sortableInstance:null}},computed:{tableColumns(){return this.columnsList.filter((t=>!t.hideInTable)).map((t=>{const e=t.render,n={...t,resizable:this.resizable&&!1!==t.resizable,width:t.width||t.minWidth||150,render:(n,r)=>{if(t.slot){const e=this.$scopedSlots[t.slot]?this.$scopedSlots[t.slot]({row:r.row}):n("span",r.row[t.key]),i=!1!==t.showTooltip;return i?n("Tooltip",{props:{content:"",maxWidth:800,theme:"light",transfer:!0,placement:r.row._index>=this.dataSource.length-1?"top":r.row._index<5?"bottom":"top"},style:{width:"100%"},scopedSlots:{default:()=>[n("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"0",cursor:"pointer",width:"100%"}},[e])],content:()=>{const e=r.row[t.key],i=this.$scopedSlots[t.slot]?this.$scopedSlots[t.slot]({row:r.row}):n("span",r.row[t.key]);return this.isJsonString(e)?n("json-viewer",{props:{value:JSON.parse(e),expandDepth:999,copyable:!0,sort:!0,boxed:!0,theme:"light",collapsed:!0},style:{overflowY:"auto",padding:"8px",boxSizing:"border-box",width:"800px",minWidth:"800px",maxHeight:"300px"},class:"custom-json-viewer"}):n("div",[i])}}}):n("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"0",width:"100%"}},[e])}if("操作"===t.title)return e?e(n,r):n("span",r.row[t.key]);const i=r.row[t.key],o=r.column.width||r.column.minWidth,s=.85*o;let a;a=e?e(n,r):n("span",{style:{display:"inline-block",maxWidth:`${s}px`,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%"}},i);const l=!1!==t.showTooltip;return l?n("Tooltip",{props:{content:"",maxWidth:800,theme:"light",transfer:!0,placement:r.row._index>=this.dataSource.length-1?"top":r.row._index<5?"bottom":"top"},style:{width:"100%"},scopedSlots:{default:()=>[n("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"0",cursor:"pointer",width:"100%"}},[a])],content:()=>{const t=i;return this.isJsonString(t)?n("json-viewer",{props:{value:JSON.parse(t),expandDepth:999,expanded:!0,copyable:!0,sort:!0,boxed:!0,theme:"light",collapsed:!0},style:{overflowY:"auto",padding:"8px",boxSizing:"border-box",width:"800px",minWidth:"800px",maxHeight:"300px"},class:"custom-json-viewer"}):n("div",[a])}}}):n("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"0",width:"100%"}},[a])}};return t.headerConfig&&(n.renderHeader=(e,n)=>e("div",{class:"custom-header"},[e("Poptip",{props:{trigger:"click",transfer:!0,placement:"bottom-start",style:{maxHeight:"300px"}},class:"header-poptip",on:{"on-popper-show":()=>{this.$nextTick((()=>{this.$emit("on-header-click",t);const e=document.querySelectorAll(".header-options");e.forEach((t=>{this.initSortable(t)}))}))}}},[e("div",{class:"header-title"},[e("span",{style:{cursor:"pointer"}},t.title),e("Icon",{props:{type:"ios-cog-outline",size:18},class:"header-icon",style:{cursor:"pointer",color:(t.as||t.key)==this.filterForm.sort?"#2d8cf0":""},on:{click:()=>{this.filterForm.sort!=(t.as||t.key)&&setTimeout((()=>{this.filterForm.sort=t.as||t.key,this.$set(t.headerConfig,"options",[...t.headerConfig.options]);let e=[];t.headerConfig.options.forEach((t=>{e.push(t.value)})),this.filterForm.sortOrder=e.join(","),this.reload()}),0)}}})]),e("div",{slot:"content",class:"header-content",style:{maxHeight:"300px",overflowY:"auto"}},[e("div",{class:"header-options",style:{padding:"2px 0"}},[...(t.headerConfig.options||[]).map((n=>e("div",{class:"header-option",attrs:{"data-key":t.as||t.key,"data-id":(t.as||t.key)+n.value,"data-value":n.value},style:{padding:"5px 0px",display:"flex",alignItems:"center",fontSize:"14px"},on:{click:()=>this.handleHeaderSelect(n,t)}},[e("img",{attrs:{src:$n},class:"drag-handle",style:{cursor:"move",marginRight:"8px",width:"8px",height:"15px",touchAction:"none",verticalAlign:"middle"}}),e("span",{style:{fontSize:"14px !important;"}},n.label)])))])])])])),n}))},setcolumnsList(){return this.columns.filter((t=>t.title&&"操作"!=t.title))},exportcolumnsList(){return this.columnsList.filter((t=>t.title&&"操作"!=t.title&&"selection"!=t.type))},filterItems(){let t=this.columns.filter((t=>t.filter)).sort(((t,e)=>t.filterSort-e.filterSort));this.filterCount=t.length;const e=24/this.filterGridSpan;this.calculateSupplementNum(t.length,e);return this.filterFold||(t=t.slice(0,t.length<e-1?t.length:e-1)),t},toolBarList(){return Array.isArray(this.toolBar)?this.toolBar:!0===this.toolBar?this.defToolBar:[]},tableSlot(){return this.columns.filter((t=>t.slot))},requestParams(){const{page:t,params:e,defaultSize:n}=this,r=e.pageSize?e.pageSize:t.pageSize;return{current:t.current,...e,pageSize:r||n}},dataSource(){return this.data&&this.data.data?Array.isArray(this.data.data)?this.data.data:[]:this.tableData},formKey(){return t=>t.as?t.as:t.key}},watch:{filterFold(t,e){},filterForm:{immediate:!1,deep:!0,handler(){this.isClickResetBtn||this.init_status&&(this.filterItems.map((t=>{for(let e in this.filterForm)t.as&&t.key===e&&this.$set(this.filterForm,t.as,this.filterForm[e])})),this.init_status=!1)}},loading:{immediate:!0,handler(t){void 0!=t&&(this.tableLoading=t)}},"data.total":{handler(t){this.page.total=t}},requestParams(){this.reload()}},methods:{isJsonString(t){if("string"!==typeof t)return!1;try{const e=JSON.parse(t);return"object"===typeof e&&null!==e}catch(e){return!1}},calculateSupplementNum(t,e){let n=0;return n=t%e===0?e-1:e-(t%e+1),this.filtersupplementnNum=n,n},filterViewList(){this.viewList=this.viewListP.filter((t=>{if(~t.name.indexOf(this.filterViewValue))return t}))},clickFlod(){this.filterFold=!this.filterFold},clickSetting(){this.$refs.tableSetting.exportModal=!0},clickItem(t){if("viewSave"==t)this.$refs.saveViewModal.title="保存视图",this.$refs.saveViewModal.exportModal=!0;else if("viewSetting"==t)this.$refs.viewEdit.exportModal=!0;else if(t.content){let n=JSON.parse(t.content);if(this.filterForm={...n.filterForm},n.filterForm&&(n.filterForm.sort?this.columnsList.forEach((t=>{t.sortable&&t.key==n.filterForm.sort?t.sortType=n.filterForm.sortOrder:t.sortType=""})):this.columnsList.forEach((t=>{t.sortable&&(t.sortType=n.filterForm.sortOrder)}))),this.$refs.selection&&this.$refs.selection.handleSort)try{this.$refs.selection.handleSort({column:void 0,key:"",order:"normal"})}catch(e){}this.page.current=n.current,this.page.pageSize=n.pageSize,this.reload()}},updateView(t){this.$refs.saveViewModal.exportBtnLoading=!0,Rn(t).then((t=>{let e=t.data;200==e.code&&(this.$refs.saveViewModal.exportModal=!1,this.handleGetUserQueryView())})).finally((()=>{this.$refs.saveViewModal.exportBtnLoading=!1}))},saveView(t){let e="";if(sessionStorage.getItem("user"))e="string"==typeof sessionStorage.getItem("user")&&"undefined"!=sessionStorage.getItem("user")?JSON.parse(sessionStorage.getItem("user")):sessionStorage.getItem("user");else if(1==t.type)return void this.$Message.warning("请先前往账号管理,绑定人员");let n="";(this.routePath||this.customPath||this.$route&&this.$route.path)&&(n=(this.routePath||this.customPath||this.$route.path).replace(/^\/?/,""));let r={current:this.page.current,pageSize:this.page.pageSize,filterForm:this.delValueEmptyProperty(this.filterForm)},i={tag:n+"tableSetView",name:t.name,type:t.type,user_id:e.id,content:JSON.stringify(r),project_id:JSON.parse(localStorage.getItem("selectedProject")).id,simp_token:a()};this.$refs.saveViewModal.exportBtnLoading=!0,Nn(i).then((t=>{let e=t.data;200==e.code&&(this.$refs.saveViewModal.exportModal=!1,this.handleGetUserQueryView())})).finally((()=>{this.$refs.saveViewModal.exportBtnLoading=!1}))},getStringValue(t){let e=t.value||t.id||t.month||"";return"number"===typeof t.value?e=String(t.value):"number"===typeof t.id?e=String(t.id):"number"===typeof t.month&&(e=String(t.month)),e},init(){let t={};this.columns.forEach((e=>{if(e.filter)if(["typelist"].includes(e.valueType),["daterange","datetimerange"].includes(e.valueType)&&e.defaultValue)if("daterange"==e.valueType){if(e.vs){var n=new Date(e.defaultValue[0]),r=new Date(e.defaultValue[1]),i=[];while(n<=r){var o=n.toISOString().split("T")[0];i.push(o),n.setDate(n.getDate()+1)}t["day"]=i,e.newkey&&2===e.newkey.length?(t[e.newkey[0]]=e.defaultValue[0],t[e.newkey[1]]=e.defaultValue[1]):(t["start"]=e.defaultValue[0],t["end"]=e.defaultValue[1])}else e.newkey&&2===e.newkey.length?(t[e.newkey[0]]=e.defaultValue[0]+" 00:00:00",t[e.newkey[1]]=e.defaultValue[1]+" 23:59:59"):(t["start"]=e.defaultValue[0]+" 00:00:00",t["end"]=e.defaultValue[1]+" 23:59:59"),t[this.formKey(e)]=[e.defaultValue[0]+" 00:00:00",e.defaultValue[1]+" 23:59:59"];t[this.formKey(e)]=[e.defaultValue[0],e.defaultValue[1]]}else e.newkey&&2===e.newkey.length?(t[e.newkey[0]]=e.defaultValue[0],t[e.newkey[1]]=e.defaultValue[1]):(t["start"]=e.defaultValue[0],t["end"]=e.defaultValue[1]),t[this.formKey(e)]=[e.defaultValue[0],e.defaultValue[1]];else["timerange"].includes(e.valueType)&&e.defaultValue?t["hour"]=e.defaultValue:t[e.key]=e.defaultValue})),this.filterForm=Object.assign({},t)},async getDataSource(t=this.requestParams){if(this.request){this.tableLoading=!0;const e=this.delValueEmptyProperty(this.filterForm),n=await this.request(t,e);this.isClickResetBtn=!1,this.tableData=n.data||[],this.page.total=n.total||0,this.tableLoading=!1}},delValueEmptyProperty(t){for(const e in t)Object.hasOwnProperty.call(t,e)&&(t[e]||delete t[e]);return t},reset(){if(this.page.current=1,this.isClickResetBtn=!0,this.columnsList.forEach((t=>{if(t.sortable&&(t.sortType=""),t.headerConfig&&t.headerConfig.options){const e=this.defaultColumnsList.find((e=>e.key===t.key));e&&e.headerConfig&&(t.headerConfig.options=[...e.headerConfig.options])}})),this.$nextTick((()=>{const t=document.querySelectorAll(".header-options");t.forEach((t=>{t&&this.initSortable(t)}))})),this.$refs.selection&&this.$refs.selection.handleSort)try{this.$refs.selection.handleSort({column:void 0,key:"",order:"normal"})}catch(t){}for(const e in this.filterForm)Object.hasOwnProperty.call(this.filterForm,e)&&(Array.isArray(this.filterForm[e])?this.filterForm[e]=[]:this.filterForm[e]="",this.$refs.element&&this.$refs.element.forEach(((t,e)=>{const n=t.$el||t;"typelist"===n.id?this.$refs.element[e].clearSelect():this.$refs.element[e].handleClear()})));delete this.filterForm.sort,delete this.filterForm.sortOrder,this.page.current=1,this.getDataSource({current:this.page.current,pageSize:this.page.pageSize})},onSelectionChange(t){this.selectionItems=t,this.$emit("on-selection-change",t)},onSelect(t,e){this.$emit("on-select",t,e)},onSelectCancel(t,e){this.$emit("on-select-cancel",t,e)},onSelectAll(t){this.$emit("on-select-all",t)},onSelectAllCancel(t){this.$emit("on-select-all-cancel",t)},onSortChange({column:t,key:e,order:n}){let r="";r=t.ns?t.ns:e,this.filterForm=Object.assign({},this.filterForm,{sort:"normal"!=n?r:"",sortOrder:"normal"!=n?n:""}),this.reload()},onToolBar(t){const e=this.columns.some((t=>"selection"===t.type));if(!e)return this.$emit("onToolBar",t);this.$emit("onToolBar",t,this.selectionItems)},isEmptyFilterForm(){let t=!0;for(const e of Object.values(this.filterForm))if(e){t=!1;break}return t},onFilter(){const t=this.$listeners.onFilter;if(t)return this.$emit("onFilter",this.filterForm);this.page.current=1,this.getDataSource({current:this.page.current,pageSize:this.page.pageSize})},onPageChange(t){this.page.current=t;const{onChange:e}=this.pagination;e&&"function"===typeof e&&e(t)},onPageSizeChange(t){this.page.pageSize=t;const{onChange:e}=this.pagination;e&&"function"===typeof e&&e(this.page.current)},setSelectionItem(t){this.$refs.selection.selectAll(t)},reload(){this.selectionItems.length>0&&(this.selectionItems.length=0),this.getDataSource()},changeDatePicker(t,e,n={}){this.isClickResetBtn||this.$nextTick((()=>{if("datetimerange"==n.valueType||"daterange"==n.valueType)if("daterange"==n.valueType)if(n.vs)if(t[0]&&t[1]){var r=new Date(t[0]),i=new Date(t[1]),o=[];while(r<=i){var s=r.toISOString().split("T")[0];o.push(s),r.setDate(r.getDate()+1)}1==o.length&&o.push(o[0]);const e=n.newkey&&n.newkey[0]?n.newkey[0]:"start",a=n.newkey&&n.newkey[1]?n.newkey[1]:"end";this.filterForm=Object.assign({},this.filterForm,{day:o,[e]:t[0],[a]:t[1],[this.formKey(n)]:[t[0],t[1]]})}else delete this.filterForm.hour,this.filterForm=Object.assign({},this.filterForm,{day:["",""],start:"",end:"",[this.formKey(n)]:[t[0],t[1]]});else{const e=n.newkey&&n.newkey[0]?n.newkey[0]:"start",r=n.newkey&&n.newkey[1]?n.newkey[1]:"end";this.filterForm=Object.assign({},this.filterForm,{[e]:t[0]?t[0]+" 00:00:00":"",[r]:t[1]?t[1]+" 23:59:59":""}),this.filterForm[this.formKey(n)]=[t[0]?t[0]+" 00:00:00":"",t[1]?t[1]+" 23:59:59":""]}else{const e=n.newkey&&n.newkey[0]?n.newkey[0]:"start",r=n.newkey&&n.newkey[1]?n.newkey[1]:"end";this.filterForm=Object.assign({},this.filterForm,{[e]:t[0],[r]:t[1],[this.formKey(n)]:[t[0],t[1]]})}else this.$set(this.filterForm,e,t)}))},changeTimePicker(t,e,n={}){this.isClickResetBtn||this.$nextTick((()=>{t[0]&&t[1]?"timerange"==n.valueType?this.filterForm=Object.assign({},this.filterForm,{hour:[t[0],t[1]]}):this.$set(this.filterForm,e,t):delete this.filterForm.hour}))},changeInput(t,e,n={}){this.$set(this.filterForm,e,t)},changeSelect(t,e,n={}){this.isClickResetBtn||this.$nextTick((()=>{n.jl?this.$parent.doJlMsg(n,t):this.$set(this.filterForm,e,t)}))},sortAndFilterColumns(t,e,n=!0){const r=t.filter((t=>e.includes(t.title)||n&&"操作"===t.title||n&&"selection"===t.type)),i=r.filter((t=>"selection"===t.type)),o=e.map((t=>r.find((e=>e.title===t)))).filter((t=>t&&"selection"!==t.type));if(n){const t=r.find((t=>"操作"===t.title));t&&o.push(t)}const s=[...i,...o];return s},handleGetUserQueryView(){let t="";(this.routePath||this.customPath||this.$route&&this.$route.path)&&(t=(this.routePath||this.customPath||this.$route.path).replace(/^\/?/,""));const e=localStorage.getItem("selectedProject");if(!e)return;let n=null;try{n=JSON.parse(e)}catch(i){return}if(!n||!n.id)return;let r={tag:t+"tableSetView",project_id:n.id,simp_token:a()};Tn(r).then((t=>{let e=t.data;200==e.code?(this.viewList=e.data,this.viewListP=hr().cloneDeep(this.viewList)):this.$Message.error(e.msg)})).catch((()=>{}))},getPerson(){const t=localStorage.getItem("selectedProject");if(!t)return;let e=null;try{e=JSON.parse(t)}catch(r){return}if(!e||!e.id)return;let n={project_id:e.id,simp_token:a(),rows:1e4,page:1,work:1};Ln(n).then((t=>{let e=t.data;200==e.code?this.personList=e.data.rows:this.$Message.error(e.msg)})).catch((()=>{}))},handleGetUserQuery(){let t="";(this.routePath||this.customPath||this.$route&&this.$route.path)&&(t=(this.routePath||this.customPath||this.$route.path).replace(/^\/?/,""));const e=localStorage.getItem("selectedProject");if(!e)return void this.reload();let n=null;try{n=JSON.parse(e)}catch(i){return void this.reload()}if(!n||!n.id)return void this.reload();let r={tag:t+"tableSet",project_id:n.id,simp_token:a()};this.tableLoading=!0,Tn(r).then((t=>{let e=t.data;if(200==e.code){let t="";if(t=Array.isArray(e.data)&&e.data.length>0?e.data[0]:"",t){t.content=JSON.parse(t.content);let{checkColumnData:e,freeze:n,columnWidths:r}=t.content;this.columnSettingId=t.id,this.columnSettingObj=t.content;let i=this.sortAndFilterColumns(hr().cloneDeep(this.columns),e),o=i[0]&&"selection"==i[0].type?n+1:n;i.forEach(((t,e)=>{"操作"==t.title?t.fixed="right":e<o?t.fixed="left":delete t.fixed,r&&r[t.key]&&(t.width=r[t.key])})),this.columnsList=i}}else this.$Message.error(e.msg)})).catch((()=>{this.tableLoading=!1})).finally((()=>{this.reload()}))},changeTypelist(t,e,n={}){t=t[t.length-1],this.isClickResetBtn||this.$nextTick((()=>{n.jl?this.$parent.doJlMsg(n,t):this.$set(this.filterForm,e,t)}))},choosePerson(t){this.filterForm[this.formKey(t)]||this.$set(this.filterForm,this.formKey(t),[]),this.all_names||(this.all_names=[]);const e=new Set(this.filterForm[this.formKey(t)]||[]),n=this.all_names.filter((t=>e.has(t.id)));this.all_names=n;const r=new Set(this.all_names.map((t=>t.id))),i=(this.filterForm[this.formKey(t)]||[]).filter((t=>!r.has(t)));i.length>0&&i.forEach(((t,e)=>{this.personList.forEach(((e,n)=>{if(e.id==t){let n={id:t,name:e.name,app_avatar:e.app_avatar,type:"user",avatar:e.avatar,count:0,selected:!0};this.all_names.push(n)}}))})),this.initShow=!0,this.currentFilterItem=t,this.$nextTick((()=>{this.$refs.orgPicker.initShow=!0,this.$refs.orgPicker.show()}))},selected(t){this.person_ids=[],this.personObj=[];let e=[],n=[];if(t.length>0&&t.forEach((t=>{this.person_ids.push(t.id),e.push(t.name)})),this.names=e.join("、"),this.all_names=t,this.currentFilterItem&&(this.filterForm[this.formKey(this.currentFilterItem)]=this.person_ids),e.length>0){let t={departName:"人员",names:e};this.personObj.push(t)}if(n.length>0){let t={departName:"部门",names:n};this.personObj.push(t)}},handleHeaderSelect(t,e){this.$emit("on-header-select",{option:t,column:e})},onColumnWidthResize(t,e,n,r){const i=n.key,o=this.columnsList.findIndex((t=>t.key===i));-1!==o&&(this.$set(this.columnsList[o],"width",t),this.saveColumnWidths()),this.$emit("on-column-width-resize",{newWidth:t,oldWidth:e,column:n,event:r})},saveColumnWidths:hr().debounce((function(){const t={};this.columnsList.forEach((e=>{e.key&&e.width&&(t[e.key]=e.width)}));let e="";(this.routePath||this.customPath||this.$route&&this.$route.path)&&(e=(this.routePath||this.customPath||this.$route.path).replace(/^\/?/,""));const n=localStorage.getItem("selectedProject");if(!n)return;let r=null;try{r=JSON.parse(n)}catch(s){return}if(!r||!r.id)return;let i={checkColumnData:this.columnSettingObj?this.columnSettingObj.checkColumnData:[],freeze:this.columnSettingObj?this.columnSettingObj.freeze:"",columnWidths:t},o={tag:e+"tableSet",name:e,content:JSON.stringify(i),project_id:r.id,simp_token:a()};this.columnSettingId?Rn({...o,id:this.columnSettingId}).then((t=>{let e=t.data;200===e.code&&(this.columnSettingObj=i)})):Nn(o).then((t=>{let e=t.data;200===e.code&&(this.columnSettingId=e.data.id,this.columnSettingObj=i)}))}),500),initSortable(t){t&&(t._sortable&&t._sortable.destroy(),t._sortable=new is(t,{animation:150,handle:".drag-handle",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",forceFallback:!0,fallbackClass:"sortable-fallback",onEnd:e=>{const{oldIndex:n,newIndex:r}=e,i=Array.from(t.children).map((t=>({value:t.getAttribute("data-value"),label:t.textContent.trim(),keyValue:t.getAttribute("data-key")}))),o=this.columnsList.find((t=>t.headerConfig&&t.as==i[0].keyValue||t.headerConfig&&t.key==i[0].keyValue));if(o){const t=[...i];this.$set(o.headerConfig,"options",[]),this.$nextTick((()=>{this.$set(o.headerConfig,"options",t)}))}let s=[];i.forEach((t=>{s.push(t.value)})),this.filterForm.sortOrder=s.join(","),this.reload(),this.$emit("on-header-sort",{oldIndex:n,newIndex:r,options:i,column:o})}}))}},created(){this.init()},mounted(){this.handleGetUserQueryView(),this.handleGetUserQuery(),this.getPerson(),console.log("flysheep__065"),window.$wujie&&window.$wujie.bus.$on("window-resize",(()=>{this.$nextTick((()=>{this.$refs.selection&&this.$refs.selection.handleResize()}))}))}},ls=as,us=tr(ls,o,s,!1,null,"3dad171e",null),cs=us.exports;const hs=[cs],fs=function(t){hs.forEach((e=>{t.component(e.name,e)}))};"undefined"!==typeof window&&window.Vue&&fs(window.Vue);var ds={install:fs},ps=ds}(),i}()}));
23
23
  //# sourceMappingURL=cj_iview_table.umd.min.js.map