10&&o<11,t.innerHTML="",n.removeChild(t)}()}();e.ui.position;e.widget("ui.draggable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var n=this.options;return this._blurActiveElement(t),!(this.helper||n.disabled||e(t.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blockFrames(!0===n.iframeFix?"iframe":n.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var n=this.document[0];if(this.handleElement.is(t.target))try{n.activeElement&&"body"!==n.activeElement.nodeName.toLowerCase()&&e(n.activeElement).blur()}catch(e){}},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,n){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp({}),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=this,i=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(i=e.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==n._trigger("stop",t)&&n._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!e(t.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(t){var n=this.options,i=e.isFunction(n.helper),o=i?e(n.helper.apply(this.element[0],[t])):"clone"===n.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===n.appendTo?this.element[0].parentNode:n.appendTo),i&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),n=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==n&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.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 t,n,i,o=this.options,r=this.document[0];this.relativeContainer=null,o.containment?"window"!==o.containment?"document"!==o.containment?o.containment.constructor!==Array?("parent"===o.containment&&(o.containment=this.helper[0].parentNode),(i=(n=e(o.containment))[0])&&(t=/(scroll|auto)/.test(n.css("overflow")),this.containment=[(parseInt(n.css("borderLeftWidth"),10)||0)+(parseInt(n.css("paddingLeft"),10)||0),(parseInt(n.css("borderTopWidth"),10)||0)+(parseInt(n.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=n)):this.containment=o.containment:this.containment=[0,0,e(r).width()-this.helperProportions.width-this.margins.left,(e(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(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,i=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:i?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:i?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,i,o,r,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=e.pageX,u=e.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,e.pageX-this.offset.click.leftn[2]&&(l=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(u=n[3]+this.offset.click.top)),s.grid&&(o=s.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,u=n?o-this.offset.click.top>=n[1]||o-this.offset.click.top>n[3]?o:o-this.offset.click.top>=n[1]?o-s.grid[1]:o+s.grid[1]:o,r=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=n?r-this.offset.click.left>=n[0]||r-this.offset.click.left>n[2]?r:r-this.offset.click.left>=n[0]?r-s.grid[0]:r+s.grid[0]:r),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(u=this.originalPageY)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,n,i){return i=i||this._uiHash(),e.ui.plugin.call(this,t,[n,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,n,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n,i){var o=e.extend({},n,{item:i.element});i.sortables=[],e(i.options.connectToSortable).each(function(){var n=e(this).sortable("instance");n&&!n.options.disabled&&(i.sortables.push(n),n.refreshPositions(),n._trigger("activate",t,o))})},stop:function(t,n,i){var o=e.extend({},n,{item:i.element});i.cancelHelperRemoval=!1,e.each(i.sortables,function(){var e=this;e.isOver?(e.isOver=0,i.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,o))})},drag:function(t,n,i){e.each(i.sortables,function(){var o=!1,r=this;r.positionAbs=i.positionAbs,r.helperProportions=i.helperProportions,r.offset.click=i.offset.click,r._intersectsWith(r.containerCache)&&(o=!0,e.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==r&&this._intersectsWith(this.containerCache)&&e.contains(r.element[0],this.element[0])&&(o=!1),o})),o?(r.isOver||(r.isOver=1,i._parent=n.helper.parent(),r.currentItem=n.helper.appendTo(r.element).data("ui-sortable-item",!0),r.options._helper=r.options.helper,r.options.helper=function(){return n.helper[0]},t.target=r.currentItem[0],r._mouseCapture(t,!0),r._mouseStart(t,!0,!0),r.offset.click.top=i.offset.click.top,r.offset.click.left=i.offset.click.left,r.offset.parent.left-=i.offset.parent.left-r.offset.parent.left,r.offset.parent.top-=i.offset.parent.top-r.offset.parent.top,i._trigger("toSortable",t),i.dropped=r.element,e.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,r.fromOutside=i),r.currentItem&&(r._mouseDrag(t),n.position=r.position)):r.isOver&&(r.isOver=0,r.cancelHelperRemoval=!0,r.options._revert=r.options.revert,r.options.revert=!1,r._trigger("out",t,r._uiHash(r)),r._mouseStop(t,!0),r.options.revert=r.options._revert,r.options.helper=r.options._helper,r.placeholder&&r.placeholder.remove(),n.helper.appendTo(i._parent),i._refreshOffsets(t),n.position=i._generatePosition(t,!0),i._trigger("fromSortable",t),i.dropped=!1,e.each(i.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n,i){var o=e("body"),r=i.options;o.css("cursor")&&(r._cursor=o.css("cursor")),o.css("cursor",r.cursor)},stop:function(t,n,i){var o=i.options;o._cursor&&e("body").css("cursor",o._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n,i){var o=e(n.helper),r=i.options;o.css("opacity")&&(r._opacity=o.css("opacity")),o.css("opacity",r.opacity)},stop:function(t,n,i){var o=i.options;o._opacity&&e(n.helper).css("opacity",o._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(t,n,i){var o=i.options,r=!1,s=i.scrollParentNotHidden[0],a=i.document[0];s!==a&&"HTML"!==s.tagName?(o.axis&&"x"===o.axis||(i.overflowOffset.top+s.offsetHeight-t.pageY=0;p--)u=(l=i.snapElements[p].left-i.margins.left)+i.snapElements[p].width,f=(c=i.snapElements[p].top-i.margins.top)+i.snapElements[p].height,vu+g||bf+g||!e.contains(i.snapElements[p].item.ownerDocument,i.snapElements[p].item)?(i.snapElements[p].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[p].item})),i.snapElements[p].snapping=!1):("inner"!==h.snapMode&&(o=Math.abs(c-b)<=g,r=Math.abs(f-y)<=g,s=Math.abs(l-v)<=g,a=Math.abs(u-m)<=g,o&&(n.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),r&&(n.position.top=i._convertPositionTo("relative",{top:f,left:0}).top),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:u}).left)),d=o||r||s||a,"outer"!==h.snapMode&&(o=Math.abs(c-y)<=g,r=Math.abs(f-b)<=g,s=Math.abs(l-m)<=g,a=Math.abs(u-v)<=g,o&&(n.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),r&&(n.position.top=i._convertPositionTo("relative",{top:f-i.helperProportions.height,left:0}).top),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:u-i.helperProportions.width}).left)),!i.snapElements[p].snapping&&(o||r||s||a||d)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[p].item})),i.snapElements[p].snapping=o||r||s||a||d)}}),e.ui.plugin.add("draggable","stack",{start:function(t,n,i){var o,r=i.options,s=e.makeArray(e(r.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});s.length&&(o=parseInt(e(s[0]).css("zIndex"),10)||0,e(s).each(function(t){e(this).css("zIndex",o+t)}),this.css("zIndex",o+s.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n,i){var o=e(n.helper),r=i.options;o.css("zIndex")&&(r._zIndex=o.css("zIndex")),o.css("zIndex",r.zIndex)},stop:function(t,n,i){var o=i.options;o._zIndex&&e(n.helper).css("zIndex",o._zIndex)}});e.ui.draggable;var s=e;e.effects={effect:{}},function(e,t){function n(e,t,n){var i=c[t.type]||{};return null==e?n||!t.def?null:t.def:(e=i.floor?~~e:parseFloat(e),isNaN(e)?t.def:i.mod?(e+i.mod)%i.mod:0>e?0:i.max")[0],d=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",f.rgba=p.style.backgroundColor.indexOf("rgba")>-1,d(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=e.extend(l.prototype,{parse:function(t,o,s,a){if(void 0===t)return this._rgba=[null,null,null,null],this;(t.jquery||t.nodeType)&&(t=e(t).css(o),o=void 0);var c=this,f=e.type(t),p=this._rgba=[];return void 0!==o&&(t=[t,o,s,a],f="array"),"string"===f?this.parse(i(t)||r._default):"array"===f?(d(u.rgba.props,function(e,i){p[i.idx]=n(t[i.idx],i)}),this):"object"===f?(t instanceof l?d(u,function(e,n){t[n.cache]&&(c[n.cache]=t[n.cache].slice())}):d(u,function(i,o){var r=o.cache;d(o.props,function(e,i){if(!c[r]&&o.to){if("alpha"===e||null==t[e])return;c[r]=o.to(c._rgba)}c[r][i.idx]=n(t[e],i,!0)}),c[r]&&e.inArray(null,c[r].slice(0,3))<0&&(c[r][3]=1,o.from&&(c._rgba=o.from(c[r])))}),this):void 0},is:function(e){var t=l(e),n=!0,i=this;return d(u,function(e,o){var r,s=t[o.cache];return s&&(r=i[o.cache]||o.to&&o.to(i._rgba)||[],d(o.props,function(e,t){if(null!=s[t.idx])return n=s[t.idx]===r[t.idx]})),n}),n},_space:function(){var e=[],t=this;return d(u,function(n,i){t[i.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var i=l(e),o=i._space(),r=u[o],s=0===this.alpha()?l("transparent"):this,a=s[r.cache]||r.to(s._rgba),f=a.slice();return i=i[r.cache],d(r.props,function(e,o){var r=o.idx,s=a[r],l=i[r],u=c[o.type]||{};null!==l&&(null===s?f[r]=l:(u.mod&&(l-s>u.mod/2?s+=u.mod:s-l>u.mod/2&&(s-=u.mod)),f[r]=n((l-s)*t+s,o)))}),this[o](f)},blend:function(t){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),o=l(t)._rgba;return l(e.map(n,function(e,t){return(1-i)*o[t]+i*e}))},toRgbaString:function(){var t="rgba(",n=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===n[3]&&(n.pop(),t="rgb("),t+n.join()+")"},toHslaString:function(){var t="hsla(",n=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&t<3&&(e=Math.round(100*e)+"%"),e});return 1===n[3]&&(n.pop(),t="hsl("),t+n.join()+")"},toHexString:function(t){var n=this._rgba.slice(),i=n.pop();return t&&n.push(~~(255*i)),"#"+e.map(n,function(e){return 1===(e=(e||0).toString(16)).length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,n,i=e[0]/255,o=e[1]/255,r=e[2]/255,s=e[3],a=Math.max(i,o,r),l=Math.min(i,o,r),u=a-l,c=a+l,f=.5*c;return t=l===a?0:i===a?60*(o-r)/u+360:o===a?60*(r-i)/u+120:60*(i-o)/u+240,n=0===u?0:f<=.5?u/c:u/(2-c),[Math.round(t)%360,n,f,null==s?1:s]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,n=e[1],i=e[2],r=e[3],s=i<=.5?i*(1+n):i+n-i*n,a=2*i-s;return[Math.round(255*o(a,s,t+1/3)),Math.round(255*o(a,s,t)),Math.round(255*o(a,s,t-1/3)),r]},d(u,function(t,i){var o=i.props,r=i.cache,a=i.to,u=i.from;l.fn[t]=function(t){if(a&&!this[r]&&(this[r]=a(this._rgba)),void 0===t)return this[r].slice();var i,s=e.type(t),c="array"===s||"object"===s?t:arguments,f=this[r].slice();return d(o,function(e,t){var i=c["object"===s?e:t.idx];null==i&&(i=f[t.idx]),f[t.idx]=n(i,t)}),u?(i=l(u(f)),i[r]=f,i):l(f)},d(o,function(n,i){l.fn[n]||(l.fn[n]=function(o){var r,a=e.type(o),l="alpha"===n?this._hsla?"hsla":"rgba":t,u=this[l](),c=u[i.idx];return"undefined"===a?c:("function"===a&&(o=o.call(this,c),a=e.type(o)),null==o&&i.empty?this:("string"===a&&(r=s.exec(o))&&(o=c+parseFloat(r[2])*("+"===r[1]?1:-1)),u[i.idx]=o,this[l](u)))})})}),l.hook=function(t){var n=t.split(" ");d(n,function(t,n){e.cssHooks[n]={set:function(t,o){var r,s,a="";if("transparent"!==o&&("string"!==e.type(o)||(r=i(o)))){if(o=l(r||o),!f.rgba&&1!==o._rgba[3]){for(s="backgroundColor"===n?t.parentNode:t;(""===a||"transparent"===a)&&s&&s.style;)try{a=e.css(s,"backgroundColor"),s=s.parentNode}catch(e){}o=o.blend(a&&"transparent"!==a?a:"_default")}o=o.toRgbaString()}try{t.style[n]=o}catch(e){}}},e.fx.step[n]=function(t){t.colorInit||(t.start=l(t.elem,n),t.end=l(t.end),t.colorInit=!0),e.cssHooks[n].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),e.cssHooks.borderColor={expand:function(e){var t={};return d(["Top","Right","Bottom","Left"],function(n,i){t["border"+i+"Color"]=e}),t}},r=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(s),function(){function t(t){var n,i,o=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,r={};if(o&&o.length&&o[0]&&o[o[0]])for(i=o.length;i--;)"string"==typeof o[n=o[i]]&&(r[e.camelCase(n)]=o[n]);else for(n in o)"string"==typeof o[n]&&(r[n]=o[n]);return r}function n(t,n){var i,r,s={};for(i in n)r=n[i],t[i]!==r&&(o[i]||!e.fx.step[i]&&isNaN(parseFloat(r))||(s[i]=r));return s}var i=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(s.style(e.elem,n,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(o,r,s,a){var l=e.speed(r,s,a);return this.queue(function(){var r,s=e(this),a=s.attr("class")||"",u=l.children?s.find("*").addBack():s;u=u.map(function(){return{el:e(this),start:t(this)}}),(r=function(){e.each(i,function(e,t){o[t]&&s[t+"Class"](o[t])})})(),u=u.map(function(){return this.end=t(this.el[0]),this.diff=n(this.start,this.end),this}),s.attr("class",a),u=u.map(function(){var t=this,n=e.Deferred(),i=e.extend({},l,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,i),n.promise()}),e.when.apply(e,u.get()).done(function(){r(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),l.complete.call(s[0])})})},e.fn.extend({addClass:function(t){return function(n,i,o,r){return i?e.effects.animateClass.call(this,{add:n},i,o,r):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(n,i,o,r){return arguments.length>1?e.effects.animateClass.call(this,{remove:n},i,o,r):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(n,i,o,r,s){return"boolean"==typeof i||void 0===i?o?e.effects.animateClass.call(this,i?{add:n}:{remove:n},o,r,s):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:n},i,o,r)}}(e.fn.toggleClass),switchClass:function(t,n,i,o,r){return e.effects.animateClass.call(this,{add:n,remove:t},i,o,r)}})}(),function(){function t(t,n,i,o){return e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},null==n&&(n={}),e.isFunction(n)&&(o=n,i=null,n={}),("number"==typeof n||e.fx.speeds[n])&&(o=i,i=n,n={}),e.isFunction(i)&&(o=i,i=null),n&&e.extend(t,n),i=i||n.duration,t.duration=e.fx.off?0:"number"==typeof i?i:i in e.fx.speeds?e.fx.speeds[i]:e.fx.speeds._default,t.complete=o||n.complete,t}function n(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||("string"==typeof t&&!e.effects.effect[t]||(!!e.isFunction(t)||"object"==typeof t&&!t.effect))}e.extend(e.effects,{version:"1.11.4",save:function(e,t){for(var n=0;n
").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:t.width(),height:t.height()},r=document.activeElement;try{r.id}catch(e){r=document.body}return t.wrap(i),(t[0]===r||e.contains(t[0],r))&&e(r).focus(),i=t.parent(),"static"===t.css("position")?(i.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,i){n[i]=t.css(i),isNaN(parseInt(n[i],10))&&(n[i]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(o),i.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).focus()),t},setTransition:function(t,n,i,o){return o=o||{},e.each(n,function(e,n){var r=t.cssUnit(n);r[0]>0&&(o[n]=r[0]*i+r[1])}),o}}),e.fn.extend({effect:function(){function n(t){function n(){e.isFunction(r)&&r.call(o[0]),e.isFunction(t)&&t()}var o=e(this),r=i.complete,a=i.mode;(o.is(":hidden")?"hide"===a:"show"===a)?(o[a](),n()):s.call(o[0],i,n)}var i=t.apply(this,arguments),o=i.mode,r=i.queue,s=e.effects.effect[i.effect];return e.fx.off||!s?o?this[o](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):!1===r?this.each(n):this.queue(r||"fx",n)},show:function(e){return function(i){if(n(i))return e.apply(this,arguments);var o=t.apply(this,arguments);return o.mode="show",this.effect.call(this,o)}}(e.fn.show),hide:function(e){return function(i){if(n(i))return e.apply(this,arguments);var o=t.apply(this,arguments);return o.mode="hide",this.effect.call(this,o)}}(e.fn.hide),toggle:function(e){return function(i){if(n(i)||"boolean"==typeof i)return e.apply(this,arguments);var o=t.apply(this,arguments);return o.mode="toggle",this.effect.call(this,o)}}(e.fn.toggle),cssUnit:function(t){var n=this.css(t),i=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(i=[parseFloat(n),t])}),i}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?n(2*e)/2:1-n(-2*e+2)/2}})}();e.effects}),jQuery.fn.extend({everyTime:function(e,t,n,i){return this.each(function(){jQuery.timer.add(this,e,t,n,i)})},oneTime:function(e,t,n){return this.each(function(){jQuery.timer.add(this,e,t,n,1)})},stopTime:function(e,t){return this.each(function(){jQuery.timer.remove(this,e,t)})}}),jQuery.extend({timer:{global:[],guid:1,dataKey:"jQuery.timer",regex:/^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,powers:{ms:1,cs:10,ds:100,s:1e3,das:1e4,hs:1e5,ks:1e6},timeParse:function(e){if(void 0==e||null==e)return null;var t=this.regex.exec(jQuery.trim(e.toString()));return t[2]?parseFloat(t[1])*(this.powers[t[2]]||1):e},add:function(e,t,n,i,o){var r=0;if(jQuery.isFunction(n)&&(o||(o=i),i=n,n=t),!("number"!=typeof(t=jQuery.timer.timeParse(t))||isNaN(t)||t<0)){("number"!=typeof o||isNaN(o)||o<0)&&(o=0),o=o||0;var s=jQuery.data(e,this.dataKey)||jQuery.data(e,this.dataKey,{});s[n]||(s[n]={}),i.timerID=i.timerID||this.guid++;var a=function(){(++r>o&&0!==o||!1===i.call(e,r))&&jQuery.timer.remove(e,n,i)};a.timerID=i.timerID,s[n][i.timerID]||(s[n][i.timerID]=window.setInterval(a,t)),this.global.push(e)}},remove:function(e,t,n){var i,o=jQuery.data(e,this.dataKey);if(o){if(t){if(o[t]){if(n)n.timerID&&(window.clearInterval(o[t][n.timerID]),delete o[t][n.timerID]);else for(var n in o[t])window.clearInterval(o[t][n]),delete o[t][n];for(i in o[t])break;i||(i=null,delete o[t])}}else for(t in o)this.remove(e,t,n);for(i in o)break;i||jQuery.removeData(e,this.dataKey)}}}}),jQuery(window).bind("unload",function(){jQuery.each(jQuery.timer.global,function(e,t){jQuery.timer.remove(t)})}),function(){"use strict";function e(){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},t=/&(?!#?\w+;)|<|>|"|'|\//g;return function(){return this?this.replace(t,function(t){return e[t]||t}):this}}function t(e,n,i){return("string"==typeof n?n:n.toString()).replace(e.define||r,function(t,n,o,r){return 0===n.indexOf("def.")&&(n=n.substring(4)),n in i||(":"===o?(e.defineParams&&r.replace(e.defineParams,function(e,t,o){i[n]={arg:t,text:o}}),n in i||(i[n]=r)):new Function("def","def['"+n+"']="+r)(i)),""}).replace(e.use||r,function(n,o){e.useParams&&(o=o.replace(e.useParams,function(e,t,n,o){if(i[n]&&i[n].arg&&o){var r=(n+":"+o).replace(/'|\\/g,"_");return i.__exp=i.__exp||{},i.__exp[r]=i[n].text.replace(new RegExp("(^|[^\\w$])"+i[n].arg+"([^\\w$])","g"),"$1"+o+"$2"),t+"def.__exp['"+r+"']"}}));var r=new Function("def","return "+o)(i);return r?t(e,r,i):r})}function n(e){return e.replace(/\\('|\\)/g,"$1").replace(/[\r\t\n]/g," ")}var i={version:"1.0.1-nanoui",templateSettings:{evaluate:/\{\{([\s\S]+?)\}\}/g,interpolate:/\{\{:([\s\S]+?)\}\}/g,encode:/\{\{>([\s\S]+?)\}\}/g,use:/\{\{#([\s\S]+?)\}\}/g,define:/\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,conditional:/\{\{\/?if\s*([\s\S]*?)\s*\}\}/g,conditionalElse:/\{\{else\s*([\s\S]*?)\s*\}\}/g,iterate:/\{\{\/?for\s*(?:\}\}|([\s\S]+?)\s*(?:\:\s*([\w$]+))?\s*(?:\:\s*([\w$]+))?\s*\}\})/g,props:/\{\{\/?props\s*(?:\}\}|([\s\S]+?)\s*(?:\:\s*([\w$]+))?\s*(?:\:\s*([\w$]+))?\s*\}\})/g,empty:/\{\{empty\}\}/g,varname:"data, config, helper",strip:!0,append:!0,selfcontained:!1},template:void 0,compile:void 0};"undefined"!=typeof module&&module.exports?module.exports=i:"function"==typeof define&&define.amd?define(function(){return i}):(function(){return this||(0,eval)("this")}()).doT=i,String.prototype.encodeHTML=e();var o={append:{start:"'+(",end:")+'",endencode:"||'').toString().encodeHTML()+'"},split:{start:"';out+=(",end:");out+='",endencode:"||'').toString().encodeHTML();out+='"}},r=/$^/;i.template=function(s,a,l){var u,c=(a=a||i.templateSettings).append?o.append:o.split,f=0,p=a.use||a.define?t(a,s,l||{}):s;p=("var out='"+(a.strip?p.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""):p).replace(/'|\\/g,"\\$&").replace(a.interpolate||r,function(e,t){return c.start+n(t)+c.end}).replace(a.encode||r,function(e,t){return u=!0,c.start+n(t)+c.endencode}).replace(a.conditional||r,function(e,t){return t?"';if("+n(t)+"){out+='":"';}out+='"}).replace(a.conditionalElse||r,function(e,t){return t?"';}else if("+n(t)+"){out+='":"';}else{out+='"}).replace(a.iterate||r,function(e,t,i,o){if(!t)return"';} } out+='";f+=1,i=i||"value",o=o||"index",t=n(t);var r="arr"+f;return"';var "+r+"="+t+";if("+r+" && "+r+".length > 0){var "+i+","+o+"=-1,l"+f+"="+r+".length-1;while("+o+" 0){var "+i+";for( var "+o+" in "+r+"){ if (!"+r+".hasOwnProperty("+o+")) continue; "+i+"="+r+"["+o+"];out+='"}).replace(a.empty||r,function(e){return"';}}else{if(true){out+='"}).replace(a.evaluate||r,function(e,t){return"';"+n(t)+"out+='"})+"';return out;").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/(\s|;|\}|^|\{)out\+='';/g,"$1").replace(/\+''/g,"").replace(/(\s|;|\}|^|\{)out\+=''\+/g,"$1out+="),u&&a.selfcontained&&(p="String.prototype.encodeHTML=("+e.toString()+"());"+p);try{return new Function(a.varname,p)}catch(e){throw"undefined"!=typeof console&&console.log("Could not create a template function: "+p),e}},i.compile=function(e,t){return i.template(e,null,t)}}(),function(e){"use strict";function t(e){var t={path:!0,query:!0,hash:!0};return e?(/^[a-z]+:/.test(e)&&(t.protocol=!0,t.host=!0,/[-a-z0-9]+(\.[-a-z0-9])*:\d+/i.test(e)&&(t.port=!0),/\/\/(.*?)(?::(.*?))?@/.test(e)&&(t.user=!0,t.pass=!0)),t):t}function n(e,n,i){var f,p,d,h=a?"file://"+(process.platform.match(/^win/i)?"/":"")+l("fs").realpathSync("."):document.location.href;n||(n=h),a?f=l("url").parse(n):(f=document.createElement("a"),f.href=n);var g=t(n);d=n.match(/\/\/(.*?)(?::(.*?))?@/)||[];for(p in u)e[p]=g[p]?f[u[p]]||"":"";if(e.protocol=e.protocol.replace(/:$/,""),e.query=e.query.replace(/^\?/,""),e.hash=o(e.hash.replace(/^#/,"")),e.user=o(d[1]||""),e.pass=o(d[2]||""),e.port=c[e.protocol]==e.port||0==e.port?"":e.port,!g.protocol&&/[^\/#?]/.test(n.charAt(0))&&(e.path=n.split("?")[0].split("#")[0]),!g.protocol&&i){var m=new s(h.match(/(.*\/)/)[0]),v=m.path.split("/"),y=e.path.split("/"),b=["protocol","user","pass","host","port"],x=b.length;for(v.pop(),p=0;x>p;p++)e[b[p]]=m[b[p]];for(;".."===y[0];)v.pop(),y.shift();e.path=("/"!==n.charAt(0)?v.join("/"):"")+"/"+y.join("/")}e.path=e.path.replace(/^\/{2,}/,"/"),e.paths(("/"===e.path.charAt(0)?e.path.slice(1):e.path).split("/")),e.query=new r(e.query)}function i(e){return encodeURIComponent(e).replace(/'/g,"%27")}function o(e){return e=e.replace(/\+/g," "),e=e.replace(/%([ef][0-9a-f])%([89ab][0-9a-f])%([89ab][0-9a-f])/gi,function(e,t,n,i){var o=parseInt(t,16)-224,r=parseInt(n,16)-128;if(0===o&&32>r)return e;var s=(o<<12)+(r<<6)+(parseInt(i,16)-128);return s>65535?e:String.fromCharCode(s)}),(e=e.replace(/%([cd][0-9a-f])%([89ab][0-9a-f])/gi,function(e,t,n){var i=parseInt(t,16)-192;if(2>i)return e;var o=parseInt(n,16)-128;return String.fromCharCode((i<<6)+o)})).replace(/%([0-7][0-9a-f])/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})}function r(e){for(var t,n=/([^=&]+)(=([^&]*))?/g;t=n.exec(e);){var i=decodeURIComponent(t[1].replace(/\+/g," ")),r=t[3]?o(t[3]):"";void 0!==this[i]&&null!==this[i]?(this[i]instanceof Array||(this[i]=[this[i]]),this[i].push(r)):this[i]=r}}function s(e,t){n(this,e,!t)}var a="undefined"==typeof window&&"undefined"!=typeof global&&"function"==typeof require,l=a?e.require:null,u={protocol:"protocol",host:"hostname",port:"port",path:"pathname",query:"search",hash:"hash"},c={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};r.prototype.toString=function(){var e,t,n="",o=i;for(e in this)if(!(this[e]instanceof Function||null===this[e]))if(this[e]instanceof Array){var r=this[e].length;if(r)for(t=0;r>t;t++)n+=n?"&":"",n+=o(e)+"="+o(this[e][t]);else n+=(n?"&":"")+o(e)+"="}else n+=n?"&":"",n+=o(e)+"="+o(this[e]);return n},s.prototype.clearQuery=function(){for(var e in this.query)this.query[e]instanceof Function||delete this.query[e];return this},s.prototype.queryLength=function(){var e,t=0;for(e in this)this[e]instanceof Function||t++;return t},s.prototype.isEmptyQuery=function(){return 0===this.queryLength()},s.prototype.paths=function(e){var t,n="",r=0;if(e&&e.length&&e+""!==e){for(this.isAbsolute()&&(n="/"),t=e.length;t>r;r++)e[r]=!r&&e[r].match(/^\w:$/)?e[r]:i(e[r]);this.path=n+e.join("/")}for(r=0,t=(e=("/"===this.path.charAt(0)?this.path.slice(1):this.path).split("/")).length;t>r;r++)e[r]=o(e[r]);return e},s.prototype.encode=i,s.prototype.decode=o,s.prototype.isAbsolute=function(){return this.protocol||"/"===this.path.charAt(0)},s.prototype.toString=function(){return(this.protocol&&this.protocol+"://")+(this.user&&i(this.user)+(this.pass&&":"+i(this.pass))+"@")+(this.host&&this.host)+(this.port&&":"+this.port)+(this.path&&this.path)+(this.query.toString()&&"?"+this.query)+(this.hash&&"#"+i(this.hash))},e[e.exports?"exports":"Url"]=s}("undefined"!=typeof module&&module.exports?module:window);
\ No newline at end of file
diff --git a/nano/assets/nano.js b/nano/assets/nano.js
index 6cce62efd26..265ea215d38 100644
--- a/nano/assets/nano.js
+++ b/nano/assets/nano.js
@@ -1 +1 @@
-function NanoStateDefaultClass(){this.key="default",this.key=this.key.toLowerCase(),NanoStateManager.addState(this)}function NanoStatePDAClass(){this.key="pda",this.key=this.key.toLowerCase(),this.current_template="",NanoStateManager.addState(this)}function NanoStateClass(){}var NanoUtility=function(){var e={};return{init:function(){var t=$("body");e=t.data("urlParameters")},generateHref:function(t){var n="?";for(var a in e)e.hasOwnProperty(a)&&("?"!==n&&(n+=";"),n+=a+"="+e[a]);for(var a in t)t.hasOwnProperty(a)&&("?"!==n&&(n+=";"),n+=a+"="+t[a]);return n},winset:function(e,t,n){var a,r;return null==n&&(n=NanoStateManager.getData().config.window.ref),a={},a[n+"."+e]=t,r=a,location.href=NanoUtility.href("winset",r)},extend:function(e,t){return Object.keys(t).forEach(function(n){var a;return a=t[n],a&&"[object Object]"===Object.prototype.toString.call(a)?(e[n]=e[n]||{},NanoUtility.extend(e[n],a)):e[n]=a}),e},href:function(e,t){return null==e&&(e=""),null==t&&(t={}),e=new Url("byond://"+e),NanoUtility.extend(e.query,t),e},close:function(){var t;return t={command:"nanoclose "+e.src},this.winset("is-visible","false"),location.href=NanoUtility.href("winset",t)}}}();"undefined"==typeof jQuery&&reportError("ERROR: Javascript library failed to load!"),"undefined"==typeof doT&&reportError("ERROR: Template engine failed to load!");var reportError=function(e){window.location="byond://?nano_err="+encodeURIComponent(e),alert(e)};$(document).ready(function(){NanoUtility.init(),NanoStateManager.init(),NanoTemplate.init(),NanoWindow.init()}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var t=this.length,n=Number(arguments[1])||0;for(n=n<0?Math.ceil(n):Math.floor(n),n<0&&(n+=t);n=0?e[a]:a===-1?"{":a===-2?"}":""})},String.prototype.format.regex=new RegExp("{-?[0-9]+}","g")),Object.size=function(e){var t,n=0;for(var t in e)e.hasOwnProperty(t)&&n++;return n},window.console||(window.console={log:function(e){return!1}}),String.prototype.toTitleCase=function(){var e=/^(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|vs?\.?|via)$/i;return this.replace(/([^\W_]+[^\s-]*) */g,function(t,n,a,r){return a>0&&a+n.length!==r.length&&n.search(e)>-1&&":"!==r.charAt(a-2)&&r.charAt(a-1).search(/[^\s-]/)<0?t.toLowerCase():n.substr(1).search(/[A-Z]|\../)>-1?t:t.charAt(0).toUpperCase()+t.substr(1)})},$.ajaxSetup({cache:!1}),Function.prototype.inheritsFrom=function(e){return this.prototype=new e,this.prototype.constructor=this,this.prototype.parent=e.prototype,this},String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.ckey||(String.prototype.ckey=function(){return this.replace(/\W/g,"").toLowerCase()}),NanoStateManager=function(){var e=!1,t=null,n={},a={},r={},o=null,i=function(){t=$("body").data("initialData"),null!=t&&t.hasOwnProperty("config")&&t.hasOwnProperty("data")||reportError("Error: Initial data did not load correctly."+JSON.stringify(t));var n="default";t.config.hasOwnProperty("stateKey")&&t.config.stateKey&&(n=t.config.stateKey.toLowerCase()),NanoStateManager.setCurrentState(n),$(document).on("templatesLoaded",function(){s(t),e=!0})},l=function(n){var a;try{a=jQuery.parseJSON(n)}catch(r){return void reportError("recieveUpdateData failed.
Error name: "+r.name+"
Error Message: "+r.message)}a.hasOwnProperty("data")||(t&&t.hasOwnProperty("data")?a.data=t.data:a.data={}),e?s(a):t=a},s=function(e){if(null!=o){if(e=o.onBeforeUpdate(e),e===!1)return void reportError("data is false, return");t=e,o.onUpdate(t),o.onAfterUpdate(t)}},c=function(e,t){for(var n in e)e.hasOwnProperty(n)&&jQuery.isFunction(e[n])&&(t=e[n].call(this,t));return t};return{init:function(){i()},receiveUpdateData:function(e){l(e)},addBeforeUpdateCallback:function(e,t){n[e]=t},addBeforeUpdateCallbacks:function(e){for(var t in e)e.hasOwnProperty(t)&&NanoStateManager.addBeforeUpdateCallback(t,e[t])},removeBeforeUpdateCallback:function(e){n.hasOwnProperty(e)&&delete n[e]},executeBeforeUpdateCallbacks:function(e){return c(n,e)},addAfterUpdateCallback:function(e,t){a[e]=t},addAfterUpdateCallbacks:function(e){for(var t in e)e.hasOwnProperty(t)&&NanoStateManager.addAfterUpdateCallback(t,e[t])},removeAfterUpdateCallback:function(e){a.hasOwnProperty(e)&&delete a[e]},executeAfterUpdateCallbacks:function(e){return c(a,e)},addState:function(e){return e instanceof NanoStateClass?e.key?void(r[e.key]=e):void reportError("ERROR: Attempted to add a state with an invalid stateKey"):void reportError("ERROR: Attempted to add a state which is not instanceof NanoStateClass")},setCurrentState:function(e){if("undefined"==typeof e||!e)return reportError("ERROR: No state key was passed!"),!1;if(!r.hasOwnProperty(e))return reportError("ERROR: Attempted to set a current state which does not exist: "+e),!1;var t=o;return o=r[e],null!=t&&t.onRemove(o),o.onAdd(t),!0},getCurrentState:function(){return o},getData:function(){return t}}}(),NanoBaseCallbacks=function(){var e=!0,t={},n={status:function(t){var n;return 2==t.config.status?(n="good",$(".linkActive").removeClass("inactive")):1==t.config.status?(n="average",$(".linkActive").addClass("inactive")):(n="bad",$(".linkActive").addClass("inactive")),$(".statusicon").removeClass("good bad average").addClass(n),$(".linkActive").stopTime("linkPending"),$(".linkActive").removeClass("linkPending"),$(".linkActive").off("click").on("click",function(n){n.preventDefault();var a=$(this).data("href");null!=a&&e&&(e=!1,$("body").oneTime(300,"enableClick",function(){e=!0}),2==t.config.status&&$(this).oneTime(300,"linkPending",function(){$(this).addClass("linkPending")}),window.location.href=a)}),t},nanomap:function(e){return $(".mapIcon").off("mouseenter mouseleave").on("mouseenter",function(e){$("#uiMapTooltip").html($(this).children(".tooltip").html()).show().stopTime().oneTime(5e3,"hideTooltip",function(){$(this).fadeOut(500)})}),$(".zoomLink").off("click").on("click",function(e){e.preventDefault();var t=$(this).data("zoomLevel"),n=$("#uiMap"),a=n.width()*t,r=n.height()*t;n.css({zoom:t,left:"50%",top:"50%",marginLeft:"-"+Math.floor(a/2)+"px",marginTop:"-"+Math.floor(r/2)+"px"})}),$("#uiMapImage").attr("src",e.config.map+"_nanomap_z"+e.config.mapZLevel+".png"),e}};return{addCallbacks:function(){NanoStateManager.addBeforeUpdateCallbacks(t),NanoStateManager.addAfterUpdateCallbacks(n)},removeCallbacks:function(){for(var e in t)t.hasOwnProperty(e)&&NanoStateManager.removeBeforeUpdateCallback(e);for(var e in n)n.hasOwnProperty(e)&&NanoStateManager.removeAfterUpdateCallback(e)}}}(),NanoBaseHelpers=function(){var e={syndicateMode:function(){return $("body").css("background-color","#8f1414"),$("body").css("background-image","url('uiBackground-Syndicate.png')"),$("body").css("background-position","50% 0"),$("body").css("background-repeat","repeat-x"),$("#uiTitleFluff").css("background-image","url('uiTitleFluff-Syndicate.png')"),$("#uiTitleFluff").css("background-position","50% 50%"),$("#uiTitleFluff").css("background-repeat","no-repeat"),""},combine:function(e,t){return e&&t?e.concat(t):e||t},dump:function(e){return JSON.stringify(e)},link:function(e,t,n,a,r,o){var i="",l="noIcon";"undefined"!=typeof t&&t&&(i='',l="hasIcon"),"undefined"!=typeof r&&r||(r="link");var s="";"undefined"!=typeof o&&o&&(s='id="'+o+'"');var c=NanoTransition.allocID(s+"_"+e.toString().replace(/[^a-z0-9_]/gi,"_")+"_"+t);return"undefined"!=typeof a&&a?'"+i+e+'
':'"+i+e+'
'},xor:function(e,t){return e^t},precisionRound:function(e,t){if(0==t)return Math.round(number);var n=Math.pow(10,t);return Math.round(e*n)/n},round:function(e){return Math.round(e)},fixed:function(e){return Math.round(10*e)/10},floor:function(e){return Math.floor(e)},ceil:function(e){return Math.ceil(e)},string:function(){if(0==arguments.length)return"";if(1==arguments.length)return arguments[0];if(arguments.length>1){stringArgs=[];for(var e=1;en&&(e=n):e>t?e=t:e'+r+'