You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
32 KiB
Plaintext
60 lines
32 KiB
Plaintext
11 months ago
|
/*! jQuery UI - v1.12.1 - 2017-11-15
|
||
|
* http://jqueryui.com
|
||
|
* Includes: widget.js, data.js, disable-selection.js, scroll-parent.js, widgets/draggable.js, widgets/mouse.js
|
||
|
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
||
|
(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(e){e.ui=e.ui||{};var i=e.ui.version="1.12.1";
|
||
|
/*!
|
||
|
* jQuery UI Widget 1.12.1
|
||
|
* http://jqueryui.com
|
||
|
*
|
||
|
* Copyright jQuery Foundation and other contributors
|
||
|
* Released under the MIT license.
|
||
|
* http://jquery.org/license
|
||
|
*/
|
||
|
var d=0;var j=Array.prototype.slice;e.cleanData=(function(p){return function(q){var s,t,r;for(r=0;(t=q[r])!=null;r++){try{s=e._data(t,"events");if(s&&s.remove){e(t).triggerHandler("remove")}}catch(u){}}p(q)}})(e.cleanData);e.widget=function(p,q,x){var v,s,w;var r={};var u=p.split(".")[0];p=p.split(".")[1];var t=u+"-"+p;if(!x){x=q;q=e.Widget}if(e.isArray(x)){x=e.extend.apply(null,[{}].concat(x))}e.expr[":"][t.toLowerCase()]=function(y){return !!e.data(y,t)};e[u]=e[u]||{};v=e[u][p];s=e[u][p]=function(y,z){if(!this._createWidget){return new s(y,z)}if(arguments.length){this._createWidget(y,z)}};e.extend(s,v,{version:x.version,_proto:e.extend({},x),_childConstructors:[]});w=new q();w.options=e.widget.extend({},w.options);e.each(x,function(z,y){if(!e.isFunction(y)){r[z]=y;return}r[z]=(function(){function A(){return q.prototype[z].apply(this,arguments)}function B(C){return q.prototype[z].apply(this,C)}return function(){var E=this._super;var C=this._superApply;var D;this._super=A;this._superApply=B;D=y.apply(this,arguments);this._super=E;this._superApply=C;return D}})()});s.prototype=e.widget.extend(w,{widgetEventPrefix:v?(w.widgetEventPrefix||p):p},r,{constructor:s,namespace:u,widgetName:p,widgetFullName:t});if(v){e.each(v._childConstructors,function(z,A){var y=A.prototype;e.widget(y.namespace+"."+y.widgetName,s,A._proto)});delete v._childConstructors}else{q._childConstructors.push(s)}e.widget.bridge(p,s);return s};e.widget.extend=function(u){var q=j.call(arguments,1);var t=0;var p=q.length;var r;var s;for(;t<p;t++){for(r in q[t]){s=q[t][r];if(q[t].hasOwnProperty(r)&&s!==undefined){if(e.isPlainObject(s)){u[r]=e.isPlainObject(u[r])?e.widget.extend({},u[r],s):e.widget.extend({},s)}else{u[r]=s}}}}return u};e.widget.bridge=function(q,p){var r=p.prototype.widgetFullName||q;e.fn[q]=function(u){var s=typeof u==="string";var t=j.call(arguments,1);var v=this;if(s){if(!this.length&&u==="instance"){v=undefined}else{this.each(function(){var x;var w=e.data(this,r);if(u==="instance"){v=w;return false}if(!w){return e.error("cannot call methods on "+q+" prior to initialization; attempted to call method '"+u+"'")}if(!e.isFunction(w[u])||u.charAt(0)==="_"){return e.error("no such method '"+u+"' for "+q+" widget instance")}x=w[u].apply(w,t);if(x!==w&&x!==undefined){v=x&&x.jquery?v.pushStack(x.get()):x;return false}})}}else{if(t.length){u=e.widget.extend.apply(null,[u].concat(t))}this.each(function(){var w=e.data(this,r);if(w){w.option(u||{});if(w._init){w._init()}}else{e.data(this,r,new p(u,this))}})}return v}};e.Widget=function(){};e.Widget._childConstructors=[];e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:false,create:null},_createWidget:function(p,q){q=e(q||this.defaultElement||this)[0];this.element=e(q);this.uuid=d++;this.eventNamespace="."+this.widgetName+this.uuid;this.bindings=e();this.hoverable=e();this.focusable=e();this.classesElementLookup={};if(q!==this){e.data(q,this.widgetFullName,this);this._on(true,this.element,{remove:function(r){if(r.target===q){this.destroy()}}});this.document=e(q.style?q.ownerDocument:q.document||q);this.window=e(this.document[0].defaultView||this.document[0].parentWindow)}this.options=e.widget.extend({},this.options,this._getCreateOptions(),p);this._create();if(this.options.disabled){this._setOptionDisabled(this.options.disabled)}this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var p=this;this._destroy();e.each(this.classesElementLookup,function(q,r){p._removeClass(r,q)});this.element.off(this.eventNamespace).removeData(this.widgetFullName);this.widget().off(this.eventNamespace).removeAttr("aria-disabled");this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(s,t){var p=s;var u;var r;var q;if(arguments.length===0){return e.widget.extend({},this.options)}if(typeof s==="string"){p={};u=s.split(".");s=u.shift();if(u.length){r=p[s]=e.widget.extend({},this.op
|
||
|
/*!
|
||
|
* jQuery UI :data 1.12.1
|
||
|
* http://jqueryui.com
|
||
|
*
|
||
|
* Copyright jQuery Foundation and other contributors
|
||
|
* Released under the MIT license.
|
||
|
* http://jquery.org/license
|
||
|
*/
|
||
|
var f=e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(p){return function(q){return !!e.data(q,p)}}):function(r,q,p){return !!e.data(r,p[3])}});
|
||
|
/*!
|
||
|
* jQuery UI Disable Selection 1.12.1
|
||
|
* http://jqueryui.com
|
||
|
*
|
||
|
* Copyright jQuery Foundation and other contributors
|
||
|
* Released under the MIT license.
|
||
|
* http://jquery.org/license
|
||
|
*/
|
||
|
var b=e.fn.extend({disableSelection:(function(){var p="onselectstart" in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(p+".ui-disableSelection",function(q){q.preventDefault()})}})(),enableSelection:function(){return this.off(".ui-disableSelection")}});
|
||
|
/*!
|
||
|
* jQuery UI Scroll Parent 1.12.1
|
||
|
* http://jqueryui.com
|
||
|
*
|
||
|
* Copyright jQuery Foundation and other contributors
|
||
|
* Released under the MIT license.
|
||
|
* http://jquery.org/license
|
||
|
*/
|
||
|
var l=e.fn.scrollParent=function(r){var q=this.css("position"),p=q==="absolute",s=r?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var u=e(this);if(p&&u.css("position")==="static"){return false}return s.test(u.css("overflow")+u.css("overflow-y")+u.css("overflow-x"))}).eq(0);return q==="fixed"||!t.length?e(this[0].ownerDocument||document):t};var a=e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());
|
||
|
/*!
|
||
|
* jQuery UI Mouse 1.12.1
|
||
|
* http://jqueryui.com
|
||
|
*
|
||
|
* Copyright jQuery Foundation and other contributors
|
||
|
* Released under the MIT license.
|
||
|
* http://jquery.org/license
|
||
|
*/
|
||
|
var c=false;e(document).on("mouseup",function(){c=false});var k=e.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var p=this;this.element.on("mousedown."+this.widgetName,function(q){return p._mouseDown(q)}).on("click."+this.widgetName,function(q){if(true===e.data(q.target,p.widgetName+".preventClickEvent")){e.removeData(q.target,p.widgetName+".preventClickEvent");q.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.off("."+this.widgetName);if(this._mouseMoveDelegate){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)}},_mouseDown:function(r){if(c){return}this._mouseMoved=false;(this._mouseStarted&&this._mouseUp(r));this._mouseDownEvent=r;var q=this,s=(r.which===1),p=(typeof this.options.cancel==="string"&&r.target.nodeName?e(r.target).closest(this.options.cancel).length:false);if(!s||p||!this._mouseCapture(r)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){q.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(r)&&this._mouseDelayMet(r)){this._mouseStarted=(this._mouseStart(r)!==false);if(!this._mouseStarted){r.preventDefault();return true}}if(true===e.data(r.target,this.widgetName+".preventClickEvent")){e.removeData(r.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(t){return q._mouseMove(t)};this._mouseUpDelegate=function(t){return q._mouseUp(t)};this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate);r.preventDefault();c=true;return true},_mouseMove:function(p){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!p.button){return this._mouseUp(p)}else{if(!p.which){if(p.originalEvent.altKey||p.originalEvent.ctrlKey||p.originalEvent.metaKey||p.originalEvent.shiftKey){this.ignoreMissingWhich=true}else{if(!this.ignoreMissingWhich){return this._mouseUp(p)}}}}}if(p.which||p.button){this._mouseMoved=true}if(this._mouseStarted){this._mouseDrag(p);return p.preventDefault()}if(this._mouseDistanceMet(p)&&this._mouseDelayMet(p)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,p)!==false);(this._mouseStarted?this._mouseDrag(p):this._mouseUp(p))}return !this._mouseStarted},_mouseUp:function(p){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(p.target===this._mouseDownEvent.target){e.data(p.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(p)}if(this._mouseDelayTimer){clearTimeout(this._mouseDelayTimer);delete this._mouseDelayTimer}this.ignoreMissingWhich=false;c=false;p.preventDefault()},_mouseDistanceMet:function(p){return(Math.max(Math.abs(this._mouseDownEvent.pageX-p.pageX),Math.abs(this._mouseDownEvent.pageY-p.pageY))>=this.options.distance)},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}});var h=e.ui.plugin={add:function(q,r,t){var p,s=e.ui[q].prototype;for(p in t){s.plugins[p]=s.plugins[p]||[];s.plugins[p].push([r,t[p]])}},call:function(p,s,r,q){var t,u=p.plugins[s];if(!u){return}if(!q&&(!p.element[0].parentNode||p.element[0].parentNode.nodeType===11)){return}for(t=0;t<u.length;t++){if(p.options[u[t][0]]){u[t][1].apply(p.element,r)}}}};var m=e.ui.safeActiveElement=function(p){var r;try{r=p.activeElement}catch(q){r=p.body}if(!r){r=p.body}if(!r.nodeName){r=p.body}return r};var o=e.ui.safeBlur=function(p){if(p&&p.nodeName.toLowerCase()!=="body"){e(p).trigger("blur")}};
|
||
|
/*!
|
||
|
* jQuery UI Draggable 1.12.1
|
||
|
* http://jqueryui.com
|
||
|
*
|
||
|
* Copyright jQuery Foundation and other contributors
|
||
|
* Released under the MIT license.
|
||
|
* http://jquery.org/license
|
||
|
*/
|
||
|
e.widget("ui.draggable",e.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false,drag:null,start:null,stop:null},_create:function(){if(this.options.helper==="original"){this._setPositionRelative()}if(this.options.addClasses){this._addClass("ui-draggable")}this._setHandleClassName();this._mouseInit()},_setOption:function(p,q){this._super(p,q);if(p==="handle"){this._removeHandleClassName();this._setHandleClassName()}},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging")){this.destroyOnClear=true;return}this._removeHandleClassName();this._mouseDestroy()},_mouseCapture:function(p){var q=this.options;if(this.helper||q.disabled||e(p.target).closest(".ui-resizable-handle").length>0){return false}this.handle=this._getHandle(p);if(!this.handle){return false}this._blurActiveElement(p);this._blockFrames(q.iframeFix===true?"iframe":q.iframeFix);return true},_blockFrames:function(p){this.iframeBlocks=this.document.find(p).map(function(){var q=e(this);return e("<div>").css("position","absolute").appendTo(q.parent()).outerWidth(q.outerWidth()).outerHeight(q.outerHeight()).offset(q.offset())[0]})},_unblockFrames:function(){if(this.iframeBlocks){this.iframeBlocks.remove();delete this.iframeBlocks}},_blurActiveElement:function(q){var p=e.ui.safeActiveElement(this.document[0]),r=e(q.target);if(r.closest(p).length){return}e.ui.safeBlur(p)},_mouseStart:function(p){var q=this.options;this.helper=this._createHelper(p);this._addClass(this.helper,"ui-draggable-dragging");this._cacheHelperProportions();if(e.ui.ddmanager){e.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent(true);this.offsetParent=this.helper.offsetParent();this.hasFixedAncestor=this.helper.parents().filter(function(){return e(this).css("position")==="fixed"}).length>0;this.positionAbs=this.element.offset();this._refreshOffsets(p);this.originalPosition=this.position=this._generatePosition(p,false);this.originalPageX=p.pageX;this.originalPageY=p.pageY;(q.cursorAt&&this._adjustOffsetFromHelper(q.cursorAt));this._setContainment();if(this._trigger("start",p)===false){this._clear();return false}this._cacheHelperProportions();if(e.ui.ddmanager&&!q.dropBehaviour){e.ui.ddmanager.prepareOffsets(this,p)}this._mouseDrag(p,true);if(e.ui.ddmanager){e.ui.ddmanager.dragStart(this,p)}return true},_refreshOffsets:function(p){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:false,parent:this._getParentOffset(),relative:this._getRelativeOffset()};this.offset.click={left:p.pageX-this.offset.left,top:p.pageY-this.offset.top}},_mouseDrag:function(p,r){if(this.hasFixedAncestor){this.offset.parent=this._getParentOffset()}this.position=this._generatePosition(p,true);this.positionAbs=this._convertPositionTo("absolute");if(!r){var q=this._uiHash();if(this._trigger("drag",p,q)===false){this._mouseUp(new e.Event("mouseup",p));return false}this.position=q.position}this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";if(e.ui.ddmanager){e.ui.ddmanager.drag(this,p)}return false},_mouseStop:function(q){var p=this,r=false;if(e.ui.ddmanager&&!this.options.dropBehaviour){r=e.ui.ddmanager.drop(this,q)}if(this.dropped){r=this.dropped;this.dropped=false}if((this.options.revert==="invalid"&&!r)||(this.options.revert==="valid"&&r)||this.options.revert===true||(e.isFunction(this.options.revert)&&this.options.revert.call(this.element,r))){e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(p._trigger("stop",q)!==false){p._clear()}})}else{if(this._trigger("stop",q)!==false){this._clear()}}ret
|
||
|
}else{if(e(window).height()-(s.pageY-e(p).scrollTop())<u.scrollSensitivity){q=e(p).scrollTop(e(p).scrollTop()+u.scrollSpeed)}}}if(!u.axis||u.axis!=="y"){if(s.pageX-e(p).scrollLeft()<u.scrollSensitivity){q=e(p).scrollLeft(e(p).scrollLeft()-u.scrollSpeed)}else{if(e(window).width()-(s.pageX-e(p).scrollLeft())<u.scrollSensitivity){q=e(p).scrollLeft(e(p).scrollLeft()+u.scrollSpeed)}}}}if(q!==false&&e.ui.ddmanager&&!u.dropBehaviour){e.ui.ddmanager.prepareOffsets(r,s)}}});e.ui.plugin.add("draggable","snap",{start:function(q,r,p){var s=p.options;p.snapElements=[];e(s.snap.constructor!==String?(s.snap.items||":data(ui-draggable)"):s.snap).each(function(){var u=e(this),t=u.offset();if(this!==p.element[0]){p.snapElements.push({item:this,width:u.outerWidth(),height:u.outerHeight(),top:t.top,left:t.left})}})},drag:function(D,A,u){var p,I,w,x,C,z,y,J,E,v,B=u.options,H=B.snapTolerance,G=A.offset.left,F=G+u.helperProportions.width,s=A.offset.top,q=s+u.helperProportions.height;for(E=u.snapElements.length-1;E>=0;E--){C=u.snapElements[E].left-u.margins.left;z=C+u.snapElements[E].width;y=u.snapElements[E].top-u.margins.top;J=y+u.snapElements[E].height;if(F<C-H||G>z+H||q<y-H||s>J+H||!e.contains(u.snapElements[E].item.ownerDocument,u.snapElements[E].item)){if(u.snapElements[E].snapping){(u.options.snap.release&&u.options.snap.release.call(u.element,D,e.extend(u._uiHash(),{snapItem:u.snapElements[E].item})))}u.snapElements[E].snapping=false;continue}if(B.snapMode!=="inner"){p=Math.abs(y-q)<=H;I=Math.abs(J-s)<=H;w=Math.abs(C-F)<=H;x=Math.abs(z-G)<=H;if(p){A.position.top=u._convertPositionTo("relative",{top:y-u.helperProportions.height,left:0}).top}if(I){A.position.top=u._convertPositionTo("relative",{top:J,left:0}).top}if(w){A.position.left=u._convertPositionTo("relative",{top:0,left:C-u.helperProportions.width}).left}if(x){A.position.left=u._convertPositionTo("relative",{top:0,left:z}).left}}v=(p||I||w||x);if(B.snapMode!=="outer"){p=Math.abs(y-s)<=H;I=Math.abs(J-q)<=H;w=Math.abs(C-G)<=H;x=Math.abs(z-F)<=H;if(p){A.position.top=u._convertPositionTo("relative",{top:y,left:0}).top}if(I){A.position.top=u._convertPositionTo("relative",{top:J-u.helperProportions.height,left:0}).top}if(w){A.position.left=u._convertPositionTo("relative",{top:0,left:C}).left}if(x){A.position.left=u._convertPositionTo("relative",{top:0,left:z-u.helperProportions.width}).left}}if(!u.snapElements[E].snapping&&(p||I||w||x||v)){(u.options.snap.snap&&u.options.snap.snap.call(u.element,D,e.extend(u._uiHash(),{snapItem:u.snapElements[E].item})))}u.snapElements[E].snapping=(p||I||w||x||v)}}});e.ui.plugin.add("draggable","stack",{start:function(r,s,p){var q,u=p.options,t=e.makeArray(e(u.stack)).sort(function(w,v){return(parseInt(e(w).css("zIndex"),10)||0)-(parseInt(e(v).css("zIndex"),10)||0)});if(!t.length){return}q=parseInt(e(t[0]).css("zIndex"),10)||0;e(t).each(function(v){e(this).css("zIndex",q+v)});this.css("zIndex",(q+t.length))}});e.ui.plugin.add("draggable","zIndex",{start:function(r,s,p){var q=e(s.helper),u=p.options;if(q.css("zIndex")){u._zIndex=q.css("zIndex")}q.css("zIndex",u.zIndex)},stop:function(q,r,p){var s=p.options;if(s._zIndex){e(r.helper).css("zIndex",s._zIndex)}}});var n=e.ui.draggable}));
|