diff --git a/frontend/package-lock.json b/frontend/package-lock.json index ff99178e..c992b494 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -3785,17 +3785,20 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001260", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001260.tgz", - "integrity": "sha512-Fhjc/k8725ItmrvW5QomzxLeojewxvqiYCKeFcfFEhut28IVLdpHU19dneOmltZQIE5HNbawj1HYD+1f2bM1Dg==", + "version": "1.0.30001319", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz", + "integrity": "sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw==", "dev": true, - "dependencies": { - "nanocolors": "^0.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] }, "node_modules/chalk": { "version": "2.4.2", @@ -15955,13 +15958,10 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001260", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001260.tgz", - "integrity": "sha512-Fhjc/k8725ItmrvW5QomzxLeojewxvqiYCKeFcfFEhut28IVLdpHU19dneOmltZQIE5HNbawj1HYD+1f2bM1Dg==", - "dev": true, - "requires": { - "nanocolors": "^0.1.0" - } + "version": "1.0.30001319", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz", + "integrity": "sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw==", + "dev": true }, "chalk": { "version": "2.4.2", diff --git a/frontend/src/settings.js b/frontend/src/settings.js index 1b52a332..ed6a7cc3 100755 --- a/frontend/src/settings.js +++ b/frontend/src/settings.js @@ -100,7 +100,7 @@ export function initSettings() { settings[0].options.push({text: style.Name, val: style.Filename}); } for(const setting of settings) { - settingsHTML += `
\s*$/g;function Te(e,t){return T(e,"table")&&T(11!==t.nodeType?t:t.firstChild,"tr")&&j(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Se(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ee(e,t){var n,i,r,s;if(1===t.nodeType){if(K.hasData(e)&&(s=K.get(e).events))for(r in K.remove(t,"handle events"),s)for(n=0,i=s[r].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",r=function(e){i.remove(),r=null,e&&t("error"===e.type?404:200,e.type)}),k.head.appendChild(i[0])},abort:function(){r&&r()}}});var Vt,Kt=[],Gt=/(=)\?(?=&|$)|\?\?/;j.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||j.expando+"_"+Tt.guid++;return this[e]=!0,e}}),j.ajaxPrefilter("json jsonp",function(e,t,n){var i,r,s,o=!1!==e.jsonp&&(Gt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gt.test(e.data)&&"data");if(o||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=g(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,o?e[o]=e[o].replace(Gt,"$1"+i):!1!==e.jsonp&&(e.url+=(Dt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return s||j.error(i+" was not called"),s[0]},e.dataTypes[0]="json",r=_[i],_[i]=function(){s=arguments},n.always(function(){void 0===r?j(_).removeProp(i):_[i]=r,e[i]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(i)),s&&g(r)&&r(s[0]),s=r=void 0}),"script"}),b.createHTMLDocument=((Vt=k.implementation.createHTMLDocument("").body).innerHTML="",2===Vt.childNodes.length),j.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(b.createHTMLDocument?((i=(t=k.implementation.createHTMLDocument("")).createElement("base")).href=k.location.href,t.head.appendChild(i)):t=k),i=!n&&[],(n=D.exec(e))?[t.createElement(n[1])]:(n=me([e],t,i),i&&i.length&&j(i).remove(),j.merge([],n.childNodes)));var i},j.fn.load=function(e,t,n){var i,r,s,o=this,a=e.indexOf(" ");return-1").append(j.parseHTML(e)).find(i):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,s||[e.responseText,t,e])})}),this},j.expr.pseudos.animated=function(t){return j.grep(j.timers,function(e){return t===e.elem}).length},j.offset={setOffset:function(e,t,n){var i,r,s,o,a=j.css(e,"position"),l=j(e),c={};"static"===a&&(e.style.position="relative"),s=l.offset(),i=j.css(e,"top"),o=j.css(e,"left"),o=("absolute"===a||"fixed"===a)&&-1<(i+o).indexOf("auto")?(r=(a=l.position()).top,a.left):(r=parseFloat(i)||0,parseFloat(o)||0),null!=(t=g(t)?t.call(e,n,j.extend({},s)):t).top&&(c.top=t.top-s.top+r),null!=t.left&&(c.left=t.left-s.left+o),"using"in t?t.using.call(e,c):l.css(c)}},j.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){j.offset.setOffset(this,t,e)});var e,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),n=n.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===j.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===j.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((r=j(e).offset()).top+=j.css(e,"borderTopWidth",!0),r.left+=j.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-j.css(i,"marginTop",!0),left:t.left-r.left-j.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===j.css(e,"position");)e=e.offsetParent;return e||ne})}}),j.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,r){var s="pageYOffset"===r;j.fn[t]=function(e){return F(this,function(e,t,n){var i;return m(e)?i=e:9===e.nodeType&&(i=e.defaultView),void 0===n?i?i[r]:e[t]:void(i?i.scrollTo(s?i.pageXOffset:n,s?n:i.pageYOffset):e[t]=n)},t,e,arguments.length)}}),j.each(["top","left"],function(e,n){j.cssHooks[n]=Ve(b.pixelPosition,function(e,t){if(t)return t=$e(e,n),qe.test(t)?j(e).position()[n]+"px":t})}),j.each({Height:"height",Width:"width"},function(o,a){j.each({padding:"inner"+o,content:a,"":"outer"+o},function(i,s){j.fn[s]=function(e,t){var n=arguments.length&&(i||"boolean"!=typeof e),r=i||(!0===e||!0===t?"margin":"border");return F(this,function(e,t,n){var i;return m(e)?0===s.indexOf("outer")?e["inner"+o]:e.document.documentElement["client"+o]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+o],i["scroll"+o],e.body["offset"+o],i["offset"+o],i["client"+o])):void 0===n?j.css(e,t,r):j.style(e,t,n,r)},a,n?e:void 0,n)}})}),j.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){j.fn[t]=function(e){return this.on(t,e)}}),j.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),j.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){j.fn[n]=function(e,t){return 0 li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=S(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():S()}},_createIcons:function(){var e=this.options.icons;e&&(S("").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"!==e?("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t))):this._activate(t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var t=S.ui.keyCode,n=this.headers.length,i=this.headers.index(e.target),r=!1;switch(e.keyCode){case t.RIGHT:case t.DOWN:r=this.headers[(i+1)%n];break;case t.LEFT:case t.UP:r=this.headers[(i-1+n)%n];break;case t.SPACE:case t.ENTER:this._eventHandler(e);break;case t.HOME:r=this.headers[0];break;case t.END:r=this.headers[n-1]}r&&(S(e.target).attr("tabIndex",-1),S(r).attr("tabIndex",0),r.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===S.ui.keyCode.UP&&e.ctrlKey&&S(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=S()):!1===e.active?this._activate(0):this.active.length&&!S.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=S()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var n,e=this.options,t=e.heightStyle,i=this.element.parent();this.active=this._findActive(e.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var e=S(this),t=e.uniqueId().attr("id"),n=e.next(),i=n.uniqueId().attr("id");e.attr("aria-controls",i),n.attr("aria-labelledby",t)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(e.event),"fill"===t?(n=i.height(),this.element.siblings(":visible").each(function(){var e=S(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(n-=e.outerHeight(!0))}),this.headers.each(function(){n-=S(this).outerHeight(!0)}),this.headers.next().each(function(){S(this).height(Math.max(0,n-S(this).innerHeight()+S(this).height()))}).css("overflow","auto")):"auto"===t&&(n=0,this.headers.next().each(function(){n=Math.max(n,S(this).css("height","").height())}).height(n))},_activate:function(e){e=this._findActive(e)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:S.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):S()},_setupEvents:function(e){var n={keydown:"_keydown"};e&&S.each(e.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var t=this.options,n=this.active,i=S(e.currentTarget),r=i[0]===n[0],s=r&&t.collapsible,o=s?S():i.next(),a=n.next(),o={oldHeader:n,oldPanel:a,newHeader:s?S():i,newPanel:o};e.preventDefault(),r&&!t.collapsible||!1===this._trigger("beforeActivate",e,o)||(t.active=!s&&this.headers.index(i),this.active=r?S():i,this._toggle(o),n.removeClass("ui-accordion-header-active ui-state-active"),t.icons&&n.children(".ui-accordion-header-icon").removeClass(t.icons.activeHeader).addClass(t.icons.header),r||(i.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),t.icons&&i.children(".ui-accordion-header-icon").removeClass(t.icons.header).addClass(t.icons.activeHeader),i.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var t=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=t,this.prevHide=n,this.options.animate?this._animate(t,n,e):(n.hide(),t.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr("aria-selected","false"),t.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):t.length&&this.headers.filter(function(){return 0===S(this).attr("tabIndex")}).attr("tabIndex",-1),t.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,n,t){var i,r,s,o=this,a=0,l=e.length&&(!n.length||e.index()").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];S(e.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(e){e.target===t.element[0]||e.target===n||S.contains(n,e.target)||t.close()})})},menufocus:function(e,t){var n;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){S(e.target).trigger(e.originalEvent)});n=t.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),(n=t.item.attr("aria-label")||n.value)&&S.trim(n).length&&(this.liveRegion.children().hide(),S("
").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(S(this).offset()).appendTo("body")}),!0))},_mouseStart:function(e){var t=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),S.ui.ddmanager&&(S.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,S.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,t.cursorAt&&this._adjustOffsetFromHelper(t.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),S.ui.ddmanager&&!t.dropBehaviour&&S.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),S.ui.ddmanager&&S.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,t){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!t){t=this._uiHash();if(!1===this._trigger("drag",e,t))return this._mouseUp({}),!1;this.position=t.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",S.ui.ddmanager&&S.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var t=this,n=!1;return S.ui.ddmanager&&!this.options.dropBehaviour&&(n=S.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||S.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?S(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==t._trigger("stop",e)&&t._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return S("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),S.ui.ddmanager&&S.ui.ddmanager.dragStop(this,e),this.element.focus(),S.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!S(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(e){var t=this.options,e=S.isFunction(t.helper)?S(t.helper.apply(this.element[0],[e])):"clone"===t.helper?this.element.clone().removeAttr("id"):this.element;return e.parents("body").length||e.appendTo("parent"===t.appendTo?this.element[0].parentNode:t.appendTo),e[0]===this.element[0]||/(fixed|absolute)/.test(e.css("position"))||e.css("position","absolute"),e},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),"left"in(e=S.isArray(e)?{left:+e[0],top:+e[1]||0}:e)&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),t=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==t&&S.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),{top:(e=this._isRootNode(this.offsetParent[0])?{top:0,left:0}:e).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,t,n,i=this.options,r=this.document[0];this.relativeContainer=null,i.containment?"window"!==i.containment?"document"!==i.containment?i.containment.constructor!==Array?("parent"===i.containment&&(i.containment=this.helper[0].parentNode),(n=(t=S(i.containment))[0])&&(e="hidden"!==t.css("overflow"),this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=t)):this.containment=i.containment:this.containment=[0,0,S(r).width()-this.helperProportions.width-this.margins.left,(S(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[S(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,S(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,S(window).scrollLeft()+S(window).width()-this.helperProportions.width-this.margins.left,S(window).scrollTop()+(S(window).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(e,t){t=t||this.position;var n="absolute"===e?1:-1,e=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:e?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:e?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,i=this.options,r=this._isRootNode(this.scrollParent[0]),s=e.pageX,o=e.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(n=this.relativeContainer?(n=this.relativeContainer.offset(),[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):this.containment,e.pageX-this.offset.click.left