Current section

Files

Jump to
ex_teal priv static teal js 16.b5051b115ec55934a9d7.chunk.js
Raw

priv/static/teal/js/16.b5051b115ec55934a9d7.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{"U/5H":function(t,e,o){var n,i;
/**!
* Sortable
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
/**!
* Sortable
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
!function(r){"use strict";void 0===(i="function"==typeof(n=r)?n.call(e,o,e,t):n)||(t.exports=i)}(function(){"use strict";if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var t,e,o,n,i,r,a,l,s,c,d,h,u,f,p,v,g,m,b,w,_,y,D,T,C,S,E,x,M=[],N=!1,P=!1,k=!1,A=[],X=!1,Y=!1,I=[],O=/\s+/g,H="Sortable"+(new Date).getTime(),B=window,R=B.document,L=B.parseInt,W=B.setTimeout,F=B.jQuery||B.Zepto,z=B.Polymer,U={capture:!1,passive:!1},j=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),V=!!navigator.userAgent.match(/Edge/i),q=!!navigator.userAgent.match(/firefox/i),G=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),J=!!navigator.userAgent.match(/iP(ad|od|hone)/i),K=V||j?"cssFloat":"float",Z="draggable"in R.createElement("div"),Q=function(){if(j)return!1;var t=R.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}(),$=!1,tt=!1,et=Math.abs,ot=Math.min,nt=Math.max,it=[],rt=function(t,e){var o=Ct(t),n=L(o.width)-L(o.paddingLeft)-L(o.paddingRight)-L(o.borderLeftWidth)-L(o.borderRightWidth),i=kt(t,0,e),r=kt(t,1,e),a=i&&Ct(i),l=r&&Ct(r),s=a&&L(a.marginLeft)+L(a.marginRight)+Ft(i).width,c=l&&L(l.marginLeft)+L(l.marginRight)+Ft(r).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&"none"!==a.float){var d="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==d?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=n&&"none"===o[K]||r&&"none"===o[K]&&s+c>n)?"vertical":"horizontal"},at=function(t,e,o,n,i){var r=Ft(o),a="vertical"===n?r.left:r.top,l="vertical"===n?r.right:r.bottom,s="vertical"===n?t:e;return a<s&&s<l},lt=function(t,e){if(!t||!t.getBoundingClientRect)return st();var o=t,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var i=Ct(o);if(o.clientWidth<o.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!o||!o.getBoundingClientRect||o===R.body)return st();if(n||e)return o;n=!0}}}while(o=o.parentNode);return st()},st=function(){return j?R.documentElement:R.scrollingElement},ct=function(t,e,o){t.scrollLeft+=e,t.scrollTop+=o},dt=Ht(function(t,e,o,n){if(e.scroll){var i=o?o[H]:window,r=e.scrollSensitivity,a=e.scrollSpeed,d=t.clientX,h=t.clientY,u=st(),f=!1;s!==o&&(ht(),l=e.scroll,c=e.scrollFn,!0===l&&(l=lt(o,!0),s=l));var p=0,v=l;do{var g,m,b,w,y,D,T,C,S,E=v,x=Ft(E),P=x.top,k=x.bottom,A=x.left,X=x.right,Y=x.width,I=x.height;if(g=E.scrollWidth,m=E.scrollHeight,b=Ct(E),C=E.scrollLeft,S=E.scrollTop,E===u?(D=Y<g&&("auto"===b.overflowX||"scroll"===b.overflowX||"visible"===b.overflowX),T=I<m&&("auto"===b.overflowY||"scroll"===b.overflowY||"visible"===b.overflowY)):(D=Y<g&&("auto"===b.overflowX||"scroll"===b.overflowX),T=I<m&&("auto"===b.overflowY||"scroll"===b.overflowY)),w=D&&(et(X-d)<=r&&C+Y<g)-(et(A-d)<=r&&!!C),y=T&&(et(k-h)<=r&&S+I<m)-(et(P-h)<=r&&!!S),!M[p])for(var O=0;O<=p;O++)M[O]||(M[O]={});M[p].vx==w&&M[p].vy==y&&M[p].el===E||(M[p].el=E,M[p].vx=w,M[p].vy=y,clearInterval(M[p].pid),!E||0==w&&0==y||(f=!0,M[p].pid=setInterval(function(){n&&0===this.layer&&(bt.active._emulateDragOver(!0),bt.active._onTouchMove(_,!0));var e=M[this.layer].vy?M[this.layer].vy*a:0,o=M[this.layer].vx?M[this.layer].vx*a:0;"function"==typeof c&&"continue"!==c.call(i,o,e,t,_,M[this.layer].el)||ct(M[this.layer].el,o,e)}.bind({layer:p}),24))),p++}while(e.bubbleScroll&&v!==u&&(v=lt(v,!1)));N=f}},30),ht=function(){M.forEach(function(t){clearInterval(t.pid)}),M=[]},ut=function(t){function e(t,o){return function(n,i,r,a){var l=n.options.group.name&&i.options.group.name&&n.options.group.name===i.options.group.name;if(null==t&&(o||l))return!0;if(null==t||!1===t)return!1;if(o&&"clone"===t)return t;if("function"==typeof t)return e(t(n,i,r,a),o)(n,i,r,a);var s=(o?n:i).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var o={},n=t.group;n&&"object"==typeof n||(n={name:n}),o.name=n.name,o.checkPull=e(n.pull,!0),o.checkPut=e(n.put),o.revertClone=n.revertClone,t.group=o},ft=function(e){t&&t.parentNode&&t.parentNode[H]&&t.parentNode[H]._computeIsAligned(e)},pt=function(){!Q&&o&&Ct(o,"display","none")},vt=function(){!Q&&o&&Ct(o,"display","")};R.addEventListener("click",function(t){if(k)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),k=!1,!1},!0);var gt,mt=function(e){if(t){var o=function(t,e){for(var o=0;o<A.length;o++)if(!At(A[o])){var n=Ft(A[o]),i=A[o][H].options.emptyInsertThreshold,r=t>=n.left-i&&t<=n.right+i,a=e>=n.top-i&&e<=n.bottom+i;if(i&&r&&a)return A[o]}}((e=e.touches?e.touches[0]:e).clientX,e.clientY);if(o){var n={};for(var i in e)n[i]=e[i];n.target=n.rootEl=o,n.preventDefault=void 0,n.stopPropagation=void 0,o[H]._onDragOver(n)}}};function bt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(t);this.el=t,this.options=e=Bt({},e),t[H]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return rt(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:L(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==bt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var n in o)!(n in e)&&(e[n]=o[n]);for(var i in ut(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Z,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?yt(t,"pointerdown",this._onTapStart):(yt(t,"mousedown",this._onTapStart),yt(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(yt(t,"dragover",this),yt(t,"dragenter",this)),A.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[])}function wt(t,e,o,n){if(t){o=o||R;do{if(null!=e&&(">"===e[0]?t.parentNode===o&&Ot(t,e):Ot(t,e))||n&&t===o)return t;if(t===o)break}while(t=_t(t))}return null}function _t(t){return t.host&&t!==R&&t.host.nodeType?t.host:t.parentNode}function yt(t,e,o){t.addEventListener(e,o,!j&&U)}function Dt(t,e,o){t.removeEventListener(e,o,!j&&U)}function Tt(t,e,o){if(t&&e)if(t.classList)t.classList[o?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(O," ").replace(" "+e+" "," ");t.className=(n+(o?" "+e:"")).replace(O," ")}}function Ct(t,e,o){var n=t&&t.style;if(n){if(void 0===o)return R.defaultView&&R.defaultView.getComputedStyle?o=R.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),void 0===e?o:o[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=o+("string"==typeof o?"":"px")}}function St(t){var e="";do{var o=Ct(t,"transform");o&&"none"!==o&&(e=o+" "+e)}while(t=t.parentNode);return window.DOMMatrix?new DOMMatrix(e):window.WebKitCSSMatrix?new WebKitCSSMatrix(e):window.CSSMatrix?new CSSMatrix(e):void 0}function Et(t,e,o){if(t){var n=t.getElementsByTagName(e),i=0,r=n.length;if(o)for(;i<r;i++)o(n[i],i);return n}return[]}function xt(t,e,o,i,r,a,l,s,c,d,h){var u,f=(t=t||e[H]).options,p="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||j||V?(u=R.createEvent("Event")).initEvent(o,!0,!0):u=new CustomEvent(o,{bubbles:!0,cancelable:!0}),u.to=r||e,u.from=a||e,u.item=i||e,u.clone=n,u.oldIndex=l,u.newIndex=s,u.oldDraggableIndex=c,u.newDraggableIndex=d,u.originalEvent=h,u.pullMode=v?v.lastPutMode:void 0,e&&e.dispatchEvent(u),f[p]&&f[p].call(t,u)}function Mt(t,e,o,n,i,r,a,l){var s,c,d=t[H],h=d.options.onMove;return!window.CustomEvent||j||V?(s=R.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=o,s.draggedRect=n,s.related=i||e,s.relatedRect=r||Ft(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),h&&(c=h.call(d,s,a)),c}function Nt(t){t.draggable=!1}function Pt(){$=!1}function kt(e,n,i){for(var r=0,a=0,l=e.children;a<l.length;){if("none"!==l[a].style.display&&l[a]!==o&&l[a]!==t&&wt(l[a],i.draggable,e,!1)){if(r===n)return l[a];r++}a++}return null}function At(t){for(var e=t.lastElementChild;e&&(e===o||"none"===Ct(e,"display"));)e=e.previousElementSibling;return e||null}function Xt(e){return It(t)<It(e)?1:-1}function Yt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,o=e.length,n=0;o--;)n+=e.charCodeAt(o);return n.toString(36)}function It(t,e){var o=0;if(!t||!t.parentNode)return-1;for(;t&&(t=t.previousElementSibling);)"TEMPLATE"===t.nodeName.toUpperCase()||t===n||e&&!Ot(t,e)||o++;return o}function Ot(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(t){return!1}return!1}}function Ht(t,e){return function(){if(!gt){var o=arguments,n=this;gt=W(function(){1===o.length?t.call(n,o[0]):t.apply(n,o),gt=void 0},e)}}}function Bt(t,e){if(t&&e)for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);return t}function Rt(t){return z&&z.dom?z.dom(t).cloneNode(!0):F?F(t).clone(!0)[0]:t.cloneNode(!0)}function Lt(t){return W(t,0)}function Wt(t){return clearTimeout(t)}function Ft(t,e,o,n){if(t.getBoundingClientRect||t===B){var i,r,a,l,s,c,d;if(t!==B&&t!==st()?(r=(i=t.getBoundingClientRect()).top,a=i.left,l=i.bottom,s=i.right,c=i.height,d=i.width):(r=0,a=0,l=window.innerHeight,s=window.innerWidth,c=window.innerHeight,d=window.innerWidth),n&&t!==B&&(o=o||t.parentNode,!j))do{if(o&&o.getBoundingClientRect&&"none"!==Ct(o,"transform")){var h=o.getBoundingClientRect();r-=h.top+L(Ct(o,"border-top-width")),a-=h.left+L(Ct(o,"border-left-width")),l=r+i.height,s=a+i.width;break}}while(o=o.parentNode);if(e&&t!==B){var u=St(o||t),f=u&&u.a,p=u&&u.d;u&&(l=(r/=p)+(c/=p),s=(a/=f)+(d/=f))}return{top:r,left:a,bottom:l,right:s,width:d,height:c}}}function zt(t,e){for(var o=lt(t,!0),n=Ft(t)[e];o;){var i=Ft(o)[e];if(!("top"===e||"left"===e?n>=i:n<=i))return o;if(o===st())break;o=lt(o,!1)}return!1}function Ut(t){var e=0,o=0,n=st();if(t)do{var i=St(t),r=i.a,a=i.d;e+=t.scrollLeft*r,o+=t.scrollTop*a}while(t!==n&&(t=t.parentNode));return[e,o]}return bt.prototype={constructor:bt,_computeIsAligned:function(e){var n;if(o&&!Q?(pt(),n=R.elementFromPoint(e.clientX,e.clientY),vt()):n=e.target,n=wt(n,this.options.draggable,this.el,!1),!tt&&t&&t.parentNode===this.el){for(var i=this.el.children,r=0;r<i.length;r++)wt(i[r],this.options.draggable,this.el,!1)&&i[r]!==n&&(i[r].sortableMouseAligned=at(e.clientX,e.clientY,i[r],this._getDirection(e,null),this.options));wt(n,this.options.draggable,this.el,!0)||(D=null),tt=!0,W(function(){tt=!1},30)}},_getDirection:function(e,o){return"function"==typeof this.options.direction?this.options.direction.call(this,e,o,t):this.options.direction},_onTapStart:function(e){if(e.cancelable){var o,n,i=this,r=this.el,l=this.options,s=l.preventOnFilter,c=e.type,d=e.touches&&e.touches[0],h=(d||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||h,f=l.filter;if(function(t){it.length=0;var e=t.getElementsByTagName("input"),o=e.length;for(;o--;){var n=e[o];n.checked&&it.push(n)}}(r),!t&&!(/mousedown|pointerdown/.test(c)&&0!==e.button||l.disabled||u.isContentEditable||(h=wt(h,l.draggable,r,!1),a===h))){if(o=It(h),n=It(h,l.draggable),"function"==typeof f){if(f.call(this,e,h,this))return xt(i,u,"filter",h,r,r,o,void 0,n),void(s&&e.cancelable&&e.preventDefault())}else if(f&&(f=f.split(",").some(function(t){if(t=wt(u,t.trim(),r,!1))return xt(i,t,"filter",h,r,r,o,void 0,n),!0})))return void(s&&e.cancelable&&e.preventDefault());l.handle&&!wt(u,l.handle,r,!1)||this._prepareDragStart(e,d,h,o,n)}}},_handleAutoScroll:function(e,o){if(t&&this.options.scroll){var n=e.clientX,i=e.clientY,r=R.elementFromPoint(n,i),a=this;if(o||V||j||G){dt(e,a.options,r,o);var l=lt(r,!0);!N||g&&n===m&&i===b||(g&&clearInterval(g),g=setInterval(function(){if(t){var r=lt(R.elementFromPoint(n,i),!0);r!==l&&(l=r,ht(),dt(e,a.options,l,o))}},10),m=n,b=i)}else{if(!a.options.bubbleScroll||lt(r,!0)===st())return void ht();dt(e,a.options,lt(r,!1),!1)}}},_prepareDragStart:function(o,n,l,s,c){var h,f=this,v=f.el,g=f.options,m=v.ownerDocument;l&&!t&&l.parentNode===v&&(i=v,e=(t=l).parentNode,r=t.nextSibling,a=l,p=g.group,d=s,u=c,w={target:t,clientX:(n||o).clientX,clientY:(n||o).clientY},this._lastX=(n||o).clientX,this._lastY=(n||o).clientY,t.style["will-change"]="all",t.style.transition="",t.style.transform="",h=function(){f._disableDelayedDragEvents(),!q&&f.nativeDraggable&&(t.draggable=!0),f._triggerDragStart(o,n),xt(f,i,"choose",t,i,i,d,void 0,u),Tt(t,g.chosenClass,!0)},g.ignore.split(",").forEach(function(e){Et(t,e.trim(),Nt)}),yt(m,"dragover",mt),yt(m,"mousemove",mt),yt(m,"touchmove",mt),yt(m,"mouseup",f._onDrop),yt(m,"touchend",f._onDrop),yt(m,"touchcancel",f._onDrop),q&&this.nativeDraggable&&(this.options.touchStartThreshold=4,t.draggable=!0),!g.delay||g.delayOnTouchOnly&&!n||this.nativeDraggable&&(V||j)?h():(yt(m,"mouseup",f._disableDelayedDrag),yt(m,"touchend",f._disableDelayedDrag),yt(m,"touchcancel",f._disableDelayedDrag),yt(m,"mousemove",f._delayedDragTouchMoveHandler),yt(m,"touchmove",f._delayedDragTouchMoveHandler),g.supportPointer&&yt(m,"pointermove",f._delayedDragTouchMoveHandler),f._dragStartTimer=W(h,g.delay)))},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;nt(et(e.clientX-this._lastX),et(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){t&&Nt(t),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Dt(t,"mouseup",this._disableDelayedDrag),Dt(t,"touchend",this._disableDelayedDrag),Dt(t,"touchcancel",this._disableDelayedDrag),Dt(t,"mousemove",this._delayedDragTouchMoveHandler),Dt(t,"touchmove",this._delayedDragTouchMoveHandler),Dt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,o){o=o||("touch"==e.pointerType?e:null),!this.nativeDraggable||o?this.options.supportPointer?yt(R,"pointermove",this._onTouchMove):yt(R,o?"touchmove":"mousemove",this._onTouchMove):(yt(t,"dragend",this),yt(i,"dragstart",this._onDragStart));try{R.selection?Lt(function(){R.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(e,o){if(P=!1,i&&t){this.nativeDraggable&&(yt(R,"dragover",this._handleAutoScroll),yt(R,"dragover",ft));var n=this.options;!e&&Tt(t,n.dragClass,!1),Tt(t,n.ghostClass,!0),Ct(t,"transform",""),bt.active=this,e&&this._appendGhost(),xt(this,i,"start",t,i,i,d,void 0,u,void 0,o)}else this._nulling()},_emulateDragOver:function(e){if(_){if(this._lastX===_.clientX&&this._lastY===_.clientY&&!e)return;this._lastX=_.clientX,this._lastY=_.clientY,pt();for(var o=R.elementFromPoint(_.clientX,_.clientY),n=o;o&&o.shadowRoot&&(o=o.shadowRoot.elementFromPoint(_.clientX,_.clientY))!==n;)n=o;if(n)do{if(n[H])if(n[H]._onDragOver({clientX:_.clientX,clientY:_.clientY,target:o,rootEl:n})&&!this.options.dragoverBubble)break;o=n}while(n=n.parentNode);t.parentNode[H]._computeIsAligned(_),vt()}},_onTouchMove:function(t,e){if(w){var n=this.options,i=n.fallbackTolerance,r=n.fallbackOffset,a=t.touches?t.touches[0]:t,l=o&&St(o),s=o&&l&&l.a,c=o&&l&&l.d,d=J&&E&&Ut(E),h=(a.clientX-w.clientX+r.x)/(s||1)+(d?d[0]-I[0]:0)/(s||1),u=(a.clientY-w.clientY+r.y)/(c||1)+(d?d[1]-I[1]:0)/(c||1),f=t.touches?"translate3d("+h+"px,"+u+"px,0)":"translate("+h+"px,"+u+"px)";if(!bt.active&&!P){if(i&&ot(et(a.clientX-this._lastX),et(a.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}!e&&this._handleAutoScroll(a,!0),y=!0,_=a,Ct(o,"webkitTransform",f),Ct(o,"mozTransform",f),Ct(o,"msTransform",f),Ct(o,"transform",f),t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!o){var e=this.options.fallbackOnBody?R.body:i,n=Ft(t,!0,e,!J),r=(Ct(t),this.options);if(J){for(E=e;"static"===Ct(E,"position")&&"none"===Ct(E,"transform")&&E!==R;)E=E.parentNode;if(E!==R){var a=Ft(E,!0);n.top-=a.top,n.left-=a.left}E!==R.body&&E!==R.documentElement?(E===R&&(E=st()),n.top+=E.scrollTop,n.left+=E.scrollLeft):E=st(),I=Ut(E)}Tt(o=t.cloneNode(!0),r.ghostClass,!1),Tt(o,r.fallbackClass,!0),Tt(o,r.dragClass,!0),Ct(o,"box-sizing","border-box"),Ct(o,"margin",0),Ct(o,"top",n.top),Ct(o,"left",n.left),Ct(o,"width",n.width),Ct(o,"height",n.height),Ct(o,"opacity","0.8"),Ct(o,"position",J?"absolute":"fixed"),Ct(o,"zIndex","100000"),Ct(o,"pointerEvents","none"),e.appendChild(o)}},_onDragStart:function(e,o){var r=this,a=e.dataTransfer,l=r.options;(n=Rt(t)).draggable=!1,n.style["will-change"]="",this._hideClone(),Tt(n,r.options.chosenClass,!1),r._cloneId=Lt(function(){r.options.removeCloneOnHide||i.insertBefore(n,t),xt(r,i,"clone",t)}),!o&&Tt(t,l.dragClass,!0),o?(k=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Dt(R,"mouseup",r._onDrop),Dt(R,"touchend",r._onDrop),Dt(R,"touchcancel",r._onDrop),a&&(a.effectAllowed="move",l.setData&&l.setData.call(r,a,t)),yt(R,"drop",r),Ct(t,"transform","translateZ(0)")),P=!0,r._dragStartId=Lt(r._dragStarted.bind(r,o,e)),yt(R,"selectstart",r),G&&Ct(R.body,"user-select","none")},_onDragOver:function(o){var n,a,l,s=this.el,c=o.target,h=this.options,f=h.group,g=bt.active,m=p===f,b=h.sort,w=this;if(!$){if(void 0!==o.preventDefault&&o.cancelable&&o.preventDefault(),y=!0,c=wt(c,h.draggable,s,!0),t.contains(o.target)||c.animated)return U(!1);if(c!==t&&(k=!1),g&&!h.disabled&&(m?b||(l=!i.contains(t)):v===this||(this.lastPutMode=p.checkPull(this,g,t,o))&&f.checkPut(this,g,t,o))){var _=this._getDirection(o,c);if(n=Ft(t),l)return this._hideClone(),e=i,r?i.insertBefore(t,r):i.appendChild(t),U(!0);var E=At(s);if(!E||function(t,e,o){var n=Ft(At(o)),i="vertical"===e?t.clientY:t.clientX,r="vertical"===e?t.clientX:t.clientY,a="vertical"===e?n.bottom:n.right,l="vertical"===e?n.left:n.top,s="vertical"===e?n.right:n.bottom;return"vertical"===e?r>s+10||r<=s&&i>a&&r>=l:i>a&&r>l||i<=a&&r>s+10}(o,_,s)&&!E.animated){if(E&&s===o.target&&(c=E),c&&(a=Ft(c)),m?g._hideClone():g._showClone(this),!1!==Mt(i,s,t,n,c,a,o,!!c))return s.appendChild(t),e=s,x=null,j(),U(!0)}else if(c&&c!==t&&c.parentNode===s){var M,N=0,P=c.sortableMouseAligned,A=t.parentNode!==s,I="vertical"===_?"top":"left",O=zt(c,"top")||zt(t,"top"),B=O?O.scrollTop:void 0;if(D!==c&&(C=null,M=Ft(c)[I],X=!1),function(e,o,n){var i=e===t&&x||Ft(e),r=o===t&&x||Ft(o),a="vertical"===n?i.left:i.top,l="vertical"===n?i.right:i.bottom,s="vertical"===n?i.width:i.height,c="vertical"===n?r.left:r.top,d="vertical"===n?r.right:r.bottom,h="vertical"===n?r.width:r.height;return a===c||l===d||a+s/2===c+h/2}(t,c,_)&&P||A||O||h.invertSwap||"insert"===C||"swap"===C?("swap"!==C&&(Y=h.invertSwap||A),N=function(e,o,n,i,r,a,l){var s=Ft(o),c="vertical"===n?e.clientY:e.clientX,d="vertical"===n?s.height:s.width,h="vertical"===n?s.top:s.left,u="vertical"===n?s.bottom:s.right,f=Ft(t),p=!1;if(!a)if(l&&S<d*i)if(!X&&(1===T?c>h+d*r/2:c<u-d*r/2)&&(X=!0),X)p=!0;else{"vertical"===n?f.top:f.left,"vertical"===n?f.bottom:f.right;if(1===T?c<h+S:c>u-S)return-1*T}else if(c>h+d*(1-i)/2&&c<u-d*(1-i)/2)return Xt(o);if((p=p||a)&&(c<h+d*r/2||c>u-d*r/2))return c>h+d/2?1:-1;return 0}(o,c,_,h.swapThreshold,null==h.invertedSwapThreshold?h.swapThreshold:h.invertedSwapThreshold,Y,D===c),C="swap"):(N=Xt(c),C="insert"),0===N)return U(!1);x=null,D=c,T=N,a=Ft(c);var L=c.nextElementSibling,F=!1,z=Mt(i,s,t,n,c,a,o,F=1===N);if(!1!==z)return 1!==z&&-1!==z||(F=1===z),$=!0,W(Pt,30),m?g._hideClone():g._showClone(this),F&&!L?s.appendChild(t):c.parentNode.insertBefore(t,F?L:c),O&&ct(O,0,B-O.scrollTop),e=t.parentNode,void 0===M||Y||(S=et(M-Ft(c)[I])),j(),U(!0)}if(s.contains(t))return U(!1)}return!1}function U(e){return e&&(m?g._hideClone():g._showClone(w),g&&(Tt(t,v?v.options.ghostClass:g.options.ghostClass,!1),Tt(t,h.ghostClass,!0)),v!==w&&w!==bt.active?v=w:w===bt.active&&(v=null),n&&w._animate(n,t),c&&a&&w._animate(a,c)),(c===t&&!t.animated||c===s&&!c.animated)&&(D=null),h.dragoverBubble||o.rootEl||c===R||(w._handleAutoScroll(o),t.parentNode[H]._computeIsAligned(o),!e&&mt(o)),!h.dragoverBubble&&o.stopPropagation&&o.stopPropagation(),!0}function j(){xt(w,i,"change",c,s,i,d,It(t),u,It(t,h.draggable),o)}},_animate:function(e,o){var n=this.options.animation;if(n){var i=Ft(o);if(o===t&&(x=i),1===e.nodeType&&(e=Ft(e)),e.left+e.width/2!==i.left+i.width/2||e.top+e.height/2!==i.top+i.height/2){var r=St(this.el),a=r&&r.a,l=r&&r.d;Ct(o,"transition","none"),Ct(o,"transform","translate3d("+(e.left-i.left)/(a||1)+"px,"+(e.top-i.top)/(l||1)+"px,0)"),this._repaint(o),Ct(o,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),Ct(o,"transform","translate3d(0,0,0)")}"number"==typeof o.animated&&clearTimeout(o.animated),o.animated=W(function(){Ct(o,"transition",""),Ct(o,"transform",""),o.animated=!1},n)}},_repaint:function(t){return t.offsetWidth},_offMoveEvents:function(){Dt(R,"touchmove",this._onTouchMove),Dt(R,"pointermove",this._onTouchMove),Dt(R,"dragover",mt),Dt(R,"mousemove",mt),Dt(R,"touchmove",mt)},_offUpEvents:function(){var t=this.el.ownerDocument;Dt(t,"mouseup",this._onDrop),Dt(t,"touchend",this._onDrop),Dt(t,"pointerup",this._onDrop),Dt(t,"touchcancel",this._onDrop),Dt(R,"selectstart",this)},_onDrop:function(a){var l=this.el,s=this.options;P=!1,N=!1,Y=!1,X=!1,clearInterval(this._loopId),clearInterval(g),ht(),clearTimeout(gt),gt=void 0,clearTimeout(this._dragStartTimer),Wt(this._cloneId),Wt(this._dragStartId),Dt(R,"mousemove",this._onTouchMove),this.nativeDraggable&&(Dt(R,"drop",this),Dt(l,"dragstart",this._onDragStart),Dt(R,"dragover",this._handleAutoScroll),Dt(R,"dragover",ft)),G&&Ct(R.body,"user-select",""),this._offMoveEvents(),this._offUpEvents(),a&&(y&&(a.cancelable&&a.preventDefault(),!s.dropBubble&&a.stopPropagation()),o&&o.parentNode&&o.parentNode.removeChild(o),(i===e||v&&"clone"!==v.lastPutMode)&&n&&n.parentNode&&n.parentNode.removeChild(n),t&&(this.nativeDraggable&&Dt(t,"dragend",this),Nt(t),t.style["will-change"]="",Tt(t,v?v.options.ghostClass:this.options.ghostClass,!1),Tt(t,this.options.chosenClass,!1),xt(this,i,"unchoose",t,e,i,d,null,u,null,a),i!==e?(h=It(t),f=It(t,s.draggable),h>=0&&(xt(null,e,"add",t,e,i,d,h,u,f,a),xt(this,i,"remove",t,e,i,d,h,u,f,a),xt(null,e,"sort",t,e,i,d,h,u,f,a),xt(this,i,"sort",t,e,i,d,h,u,f,a)),v&&v.save()):t.nextSibling!==r&&(h=It(t),f=It(t,s.draggable),h>=0&&(xt(this,i,"update",t,e,i,d,h,u,f,a),xt(this,i,"sort",t,e,i,d,h,u,f,a))),bt.active&&(null!=h&&-1!==h||(h=d,f=u),xt(this,i,"end",t,e,i,d,h,u,f,a),this.save()))),this._nulling()},_nulling:function(){i=t=e=o=r=n=a=l=s=M.length=g=m=b=w=_=y=h=d=D=T=x=v=p=bt.active=null,it.forEach(function(t){t.checked=!0}),it.length=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":t&&(this._onDragOver(e),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var t,e=[],o=this.el.children,n=0,i=o.length,r=this.options;n<i;n++)wt(t=o[n],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Yt(t));return e},sort:function(t){var e={},o=this.el;this.toArray().forEach(function(t,n){var i=o.children[n];wt(i,this.options.draggable,o,!1)&&(e[t]=i)},this),t.forEach(function(t){e[t]&&(o.removeChild(e[t]),o.appendChild(e[t]))})},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return wt(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var o=this.options;if(void 0===e)return o[t];o[t]=e,"group"===t&&ut(o)},destroy:function(){var t=this.el;t[H]=null,Dt(t,"mousedown",this._onTapStart),Dt(t,"touchstart",this._onTapStart),Dt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Dt(t,"dragover",this),Dt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),A.splice(A.indexOf(this.el),1),this.el=t=null},_hideClone:function(){n.cloneHidden||(Ct(n,"display","none"),n.cloneHidden=!0,n.parentNode&&this.options.removeCloneOnHide&&n.parentNode.removeChild(n))},_showClone:function(e){"clone"===e.lastPutMode?n.cloneHidden&&(i.contains(t)&&!this.options.group.revertClone?i.insertBefore(n,t):r?i.insertBefore(n,r):i.appendChild(n),this.options.group.revertClone&&this._animate(t,n),Ct(n,"display",""),n.cloneHidden=!1):this._hideClone()}},yt(R,"touchmove",function(t){(bt.active||P)&&t.cancelable&&t.preventDefault()}),bt.utils={on:yt,off:Dt,css:Ct,find:Et,is:function(t,e){return!!wt(t,e,t,!1)},extend:Bt,throttle:Ht,closest:wt,toggleClass:Tt,clone:Rt,index:It,nextTick:Lt,cancelNextTick:Wt,detectDirection:rt,getChild:kt},bt.create=function(t,e){return new bt(t,e)},bt.version="1.9.0",bt})}}]);