(function(b){function j(h){if(typeof h.data==="string"){var f=h.handler,c=h.data.toLowerCase().split(" ");h.handler=function(e){if(!(this!==e.target&&(/textarea|select/i.test(e.target.nodeName)||e.target.type==="text"))){var k=e.type!=="keypress"&&b.hotkeys.specialKeys[e.which],n=String.fromCharCode(e.which).toLowerCase(),o="",q={};if(e.altKey&&k!=="alt")o+="alt+";if(e.ctrlKey&&k!=="ctrl")o+="ctrl+";if(e.metaKey&&!e.ctrlKey&&k!=="meta")o+="meta+";if(e.shiftKey&&k!=="shift")o+="shift+";if(k)q[o+k]=
true;else{q[o+n]=true;q[o+b.hotkeys.shiftNums[n]]=true;if(o==="shift+")q[b.hotkeys.shiftNums[n]]=true}k=0;for(n=c.length;k<n;k++)if(q[c[k]])return f.apply(this,arguments)}}}}b.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",
106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}};b.each(["keydown","keyup","keypress"],function(){b.event.special[this]={add:j}})})(jQuery);
(function(b){function j(f){var c=f||window.event,e=[].slice.call(arguments,1),k=0,n=0,o=0;f=b.event.fix(c);f.type="mousewheel";if(f.wheelDelta)k=f.wheelDelta/120;if(f.detail)k=-f.detail/3;o=k;if(c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS){o=0;n=-1*k}if(c.wheelDeltaY!==undefined)o=c.wheelDeltaY/120;if(c.wheelDeltaX!==undefined)n=-1*c.wheelDeltaX/120;e.unshift(f,k,n,o);return b.event.handle.apply(this,e)}var h=["DOMMouseScroll","mousewheel"];b.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var f=
h.length;f;)this.addEventListener(h[--f],j,false);else this.onmousewheel=j},teardown:function(){if(this.removeEventListener)for(var f=h.length;f;)this.removeEventListener(h[--f],j,false);else this.onmousewheel=null}};b.fn.extend({mousewheel:function(f){return f?this.bind("mousewheel",f):this.trigger("mousewheel")},unmousewheel:function(f){return this.unbind("mousewheel",f)}})})(jQuery);var uid1="D"+ +new Date,uid2="D"+(+new Date+1),uid3="D"+(+new Date+2),uid4="D"+(+new Date+3);
jQuery.event.special.scrollstart={setup:function(){var b,j=function(h){var f=arguments;if(b)clearTimeout(b);else{h.type="scrollstart";jQuery.event.handle.apply(this,f)}b=setTimeout(function(){b=null},jQuery.event.special.scrollstop.latency)};jQuery(this).bind("scroll",j).data(uid1,j)},teardown:function(){jQuery(this).unbind("scroll",jQuery(this).data(uid1))}};
jQuery.event.special.scrollstop={latency:300,setup:function(){var b,j=function(h){var f=this,c=arguments;b&&clearTimeout(b);b=setTimeout(function(){b=null;h.type="scrollstop";jQuery.event.handle.apply(f,c)},jQuery.event.special.scrollstop.latency)};jQuery(this).bind("scroll",j).data(uid2,j)},teardown:function(){jQuery(this).unbind("scroll",jQuery(this).data(uid2))}};
jQuery.event.special.scrollreachtop={setup:function(){jQuery(this).bind("scroll",jQuery.event.special.scrollreachtop.handler).data(uid3,jQuery.event.special.scrollreachtop.handler)},teardown:function(){jQuery(this).unbind("scroll",jQuery(this).data(uid3))},handler:function(b){b.type="scrollreachtop";parseInt(jQuery(this).scrollTop())==0&&jQuery.event.handle.apply(this,arguments)}};
jQuery.event.special.scrollreachbottom={setup:function(){jQuery(this).bind("scroll",jQuery.event.special.scrollreachbottom.handler).data(uid4,jQuery.event.special.scrollreachbottom.handler)},teardown:function(){jQuery(this).unbind("scroll",jQuery(this).data(uid4))},handler:function(b){b.type="scrollreachbottom";var j=parseInt(jQuery(this).attr("scrollHeight"))-parseInt(jQuery(this).innerHeight())-1;parseInt(jQuery(this).scrollTop())>=j&&jQuery.event.handle.apply(this,arguments)}};
(function(b,j){function h(c,e){var k=c.nodeName.toLowerCase();if("area"===k){e=c.parentNode;k=e.name;if(!c.href||!k||e.nodeName.toLowerCase()!=="map")return false;c=b("img[usemap=#"+k+"]")[0];return!!c&&f(c)}return(/input|select|textarea|button|object/.test(k)?!c.disabled:"a"==k?c.href||e:e)&&f(c)}function f(c){return!b(c).parents().andSelf().filter(function(){return b.curCSS(this,"visibility")==="hidden"||b.expr.filters.hidden(this)}).length}b.ui=b.ui||{};if(!b.ui.version){b.extend(b.ui,{version:"1.8.16",
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});b.fn.extend({propAttr:b.fn.prop||b.fn.attr,_focus:b.fn.focus,focus:function(c,e){return typeof c==="number"?this.each(function(){var k=
this;setTimeout(function(){b(k).focus();e&&e.call(k)},c)}):this._focus.apply(this,arguments)},scrollParent:function(){var c;c=b.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(b.curCSS(this,"position",1))&&/(auto|scroll)/.test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(b.curCSS(this,
"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?b(document):c},zIndex:function(c){if(c!==j)return this.css("zIndex",c);if(this.length){c=b(this[0]);for(var e;c.length&&c[0]!==document;){e=c.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){e=parseInt(c.css("zIndex"),10);if(!isNaN(e)&&e!==0)return e}c=c.parent()}}return 0},disableSelection:function(){return this.bind((b.support.selectstart?"selectstart":
"mousedown")+".ui-disableSelection",function(c){c.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});b.each(["Width","Height"],function(c,e){function k(r,t,v,x){b.each(n,function(){t-=parseFloat(b.curCSS(r,"padding"+this,true))||0;if(v)t-=parseFloat(b.curCSS(r,"border"+this+"Width",true))||0;if(x)t-=parseFloat(b.curCSS(r,"margin"+this,true))||0});return t}var n=e==="Width"?["Left","Right"]:["Top","Bottom"],o=e.toLowerCase(),q={innerWidth:b.fn.innerWidth,innerHeight:b.fn.innerHeight,
outerWidth:b.fn.outerWidth,outerHeight:b.fn.outerHeight};b.fn["inner"+e]=function(r){if(r===j)return q["inner"+e].call(this);return this.each(function(){b(this).css(o,k(this,r)+"px")})};b.fn["outer"+e]=function(r,t){if(typeof r!=="number")return q["outer"+e].call(this,r);return this.each(function(){b(this).css(o,k(this,r,true,t)+"px")})}});b.extend(b.expr[":"],{data:function(c,e,k){return!!b.data(c,k[3])},focusable:function(c){return h(c,!isNaN(b.attr(c,"tabindex")))},tabbable:function(c){var e=b.attr(c,
"tabindex"),k=isNaN(e);return(k||e>=0)&&h(c,!k)}});b(function(){var c=document.body,e=c.appendChild(e=document.createElement("div"));b.extend(e.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});b.support.minHeight=e.offsetHeight===100;b.support.selectstart="onselectstart"in e;c.removeChild(e).style.display="none"});b.extend(b.ui,{plugin:{add:function(c,e,k){c=b.ui[c].prototype;for(var n in k){c.plugins[n]=c.plugins[n]||[];c.plugins[n].push([e,k[n]])}},call:function(c,e,k){if((e=c.plugins[e])&&
c.element[0].parentNode)for(var n=0;n<e.length;n++)c.options[e[n][0]]&&e[n][1].apply(c.element,k)}},contains:function(c,e){return document.compareDocumentPosition?c.compareDocumentPosition(e)&16:c!==e&&c.contains(e)},hasScroll:function(c,e){if(b(c).css("overflow")==="hidden")return false;e=e&&e==="left"?"scrollLeft":"scrollTop";var k=false;if(c[e]>0)return true;c[e]=1;k=c[e]>0;c[e]=0;return k},isOverAxis:function(c,e,k){return c>e&&c<e+k},isOver:function(c,e,k,n,o,q){return b.ui.isOverAxis(c,k,o)&&
b.ui.isOverAxis(e,n,q)}})}})(jQuery);
(function(b,j){if(b.cleanData){var h=b.cleanData;b.cleanData=function(c){for(var e=0,k;(k=c[e])!=null;e++)try{b(k).triggerHandler("remove")}catch(n){}h(c)}}else{var f=b.fn.remove;b.fn.remove=function(c,e){return this.each(function(){if(!e)if(!c||b.filter(c,[this]).length)b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(k){}});return f.call(b(this),c,e)})}}b.widget=function(c,e,k){var n=c.split(".")[0],o;c=c.split(".")[1];o=n+"-"+c;if(!k){k=e;e=b.Widget}b.expr[":"][o]=
function(q){return!!b.data(q,c)};b[n]=b[n]||{};b[n][c]=function(q,r){arguments.length&&this._createWidget(q,r)};e=new e;e.options=b.extend(true,{},e.options);b[n][c].prototype=b.extend(true,e,{namespace:n,widgetName:c,widgetEventPrefix:b[n][c].prototype.widgetEventPrefix||c,widgetBaseClass:o},k);b.widget.bridge(c,b[n][c])};b.widget.bridge=function(c,e){b.fn[c]=function(k){var n=typeof k==="string",o=Array.prototype.slice.call(arguments,1),q=this;k=!n&&o.length?b.extend.apply(null,[true,k].concat(o)):
k;if(n&&k.charAt(0)==="_")return q;n?this.each(function(){var r=b.data(this,c),t=r&&b.isFunction(r[k])?r[k].apply(r,o):r;if(t!==r&&t!==j){q=t;return false}}):this.each(function(){var r=b.data(this,c);r?r.option(k||{})._init():b.data(this,c,new e(k,this))});return q}};b.Widget=function(c,e){arguments.length&&this._createWidget(c,e)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(c,e){b.data(e,this.widgetName,this);this.element=b(e);this.options=
b.extend(true,{},this.options,this._getCreateOptions(),c);var k=this;this.element.bind("remove."+this.widgetName,function(){k.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+
"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(c,e){var k=c;if(arguments.length===0)return b.extend({},this.options);if(typeof c==="string"){if(e===j)return this.options[c];k={};k[c]=e}this._setOptions(k);return this},_setOptions:function(c){var e=this;b.each(c,function(k,n){e._setOption(k,n)});return this},_setOption:function(c,e){this.options[c]=e;if(c==="disabled")this.widget()[e?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",
e);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(c,e,k){var n=this.options[c];e=b.Event(e);e.type=(c===this.widgetEventPrefix?c:this.widgetEventPrefix+c).toLowerCase();k=k||{};if(e.originalEvent){c=b.event.props.length;for(var o;c;){o=b.event.props[--c];e[o]=e.originalEvent[o]}}this.element.trigger(e,k);return!(b.isFunction(n)&&n.call(this.element[0],e,k)===false||e.isDefaultPrevented())}}})(jQuery);
(function(b){var j=false;b(document).mouseup(function(){j=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var h=this;this.element.bind("mousedown."+this.widgetName,function(f){return h._mouseDown(f)}).bind("click."+this.widgetName,function(f){if(true===b.data(f.target,h.widgetName+".preventClickEvent")){b.removeData(f.target,h.widgetName+".preventClickEvent");f.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+
this.widgetName)},_mouseDown:function(h){if(!j){this._mouseStarted&&this._mouseUp(h);this._mouseDownEvent=h;var f=this,c=h.which==1,e=typeof this.options.cancel=="string"&&h.target.nodeName?b(h.target).closest(this.options.cancel).length:false;if(!c||e||!this._mouseCapture(h))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){f.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(h)&&this._mouseDelayMet(h)){this._mouseStarted=
this._mouseStart(h)!==false;if(!this._mouseStarted){h.preventDefault();return true}}true===b.data(h.target,this.widgetName+".preventClickEvent")&&b.removeData(h.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(k){return f._mouseMove(k)};this._mouseUpDelegate=function(k){return f._mouseUp(k)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);h.preventDefault();return j=true}},_mouseMove:function(h){if(b.browser.msie&&
!(document.documentMode>=9)&&!h.button)return this._mouseUp(h);if(this._mouseStarted){this._mouseDrag(h);return h.preventDefault()}if(this._mouseDistanceMet(h)&&this._mouseDelayMet(h))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,h)!==false)?this._mouseDrag(h):this._mouseUp(h);return!this._mouseStarted},_mouseUp:function(h){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=
false;h.target==this._mouseDownEvent.target&&b.data(h.target,this.widgetName+".preventClickEvent",true);this._mouseStop(h)}return false},_mouseDistanceMet:function(h){return Math.max(Math.abs(this._mouseDownEvent.pageX-h.pageX),Math.abs(this._mouseDownEvent.pageY-h.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
(function(b){b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var j=this,h=this.options,f=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),c=h.values&&h.values.length||1,e=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+
this.orientation+" ui-widget ui-widget-content ui-corner-all"+(h.disabled?" ui-slider-disabled ui-disabled":""));this.range=b([]);if(h.range){if(h.range===true){if(!h.values)h.values=[this._valueMin(),this._valueMin()];if(h.values.length&&h.values.length!==2)h.values=[h.values[0],h.values[0]]}this.range=b("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(h.range==="min"||h.range==="max"?" ui-slider-range-"+h.range:""))}for(var k=f.length;k<c;k+=1)e.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
this.handles=f.add(b(e.join("")).appendTo(j.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(n){n.preventDefault()}).hover(function(){h.disabled||b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(h.disabled)b(this).blur();else{b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(n){b(this).data("index.ui-slider-handle",
n)});this.handles.keydown(function(n){var o=true,q=b(this).data("index.ui-slider-handle"),r,t,v;if(!j.options.disabled){switch(n.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:o=false;if(!j._keySliding){j._keySliding=true;b(this).addClass("ui-state-active");r=j._start(n,q);if(r===false)return}break}v=j.options.step;r=j.options.values&&j.options.values.length?
(t=j.values(q)):(t=j.value());switch(n.keyCode){case b.ui.keyCode.HOME:t=j._valueMin();break;case b.ui.keyCode.END:t=j._valueMax();break;case b.ui.keyCode.PAGE_UP:t=j._trimAlignValue(r+(j._valueMax()-j._valueMin())/5);break;case b.ui.keyCode.PAGE_DOWN:t=j._trimAlignValue(r-(j._valueMax()-j._valueMin())/5);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(r===j._valueMax())return;t=j._trimAlignValue(r+v);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(r===j._valueMin())return;t=j._trimAlignValue(r-
v);break}j._slide(n,q,t);return o}}).keyup(function(n){var o=b(this).data("index.ui-slider-handle");if(j._keySliding){j._keySliding=false;j._stop(n,o);j._change(n,o);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();
return this},_mouseCapture:function(j){var h=this.options,f,c,e,k,n;if(h.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();f=this._normValueFromMouse({x:j.pageX,y:j.pageY});c=this._valueMax()-this._valueMin()+1;k=this;this.handles.each(function(o){var q=Math.abs(f-k.values(o));if(c>q){c=q;e=b(this);n=o}});if(h.range===true&&this.values(1)===h.min){n+=1;e=b(this.handles[n])}if(this._start(j,n)===false)return false;
this._mouseSliding=true;k._handleIndex=n;e.addClass("ui-state-active").focus();h=e.offset();this._clickOffset=!b(j.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:j.pageX-h.left-e.width()/2,top:j.pageY-h.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(j,n,f);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(j){var h=
this._normValueFromMouse({x:j.pageX,y:j.pageY});this._slide(j,this._handleIndex,h);return false},_mouseStop:function(j){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(j,this._handleIndex);this._change(j,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(j){var h;if(this.orientation==="horizontal"){h=
this.elementSize.width;j=j.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{h=this.elementSize.height;j=j.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}h=j/h;if(h>1)h=1;if(h<0)h=0;if(this.orientation==="vertical")h=1-h;j=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+h*j)},_start:function(j,h){var f={handle:this.handles[h],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(h);
f.values=this.values()}return this._trigger("start",j,f)},_slide:function(j,h,f){var c;if(this.options.values&&this.options.values.length){c=this.values(h?0:1);if(this.options.values.length===2&&this.options.range===true&&(h===0&&f>c||h===1&&f<c))f=c;if(f!==this.values(h)){c=this.values();c[h]=f;j=this._trigger("slide",j,{handle:this.handles[h],value:f,values:c});this.values(h?0:1);j!==false&&this.values(h,f,true)}}else if(f!==this.value()){j=this._trigger("slide",j,{handle:this.handles[h],value:f});
j!==false&&this.value(f)}},_stop:function(j,h){var f={handle:this.handles[h],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(h);f.values=this.values()}this._trigger("stop",j,f)},_change:function(j,h){if(!this._keySliding&&!this._mouseSliding){var f={handle:this.handles[h],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(h);f.values=this.values()}this._trigger("change",j,f)}},value:function(j){if(arguments.length){this.options.value=
this._trimAlignValue(j);this._refreshValue();this._change(null,0)}else return this._value()},values:function(j,h){var f,c,e;if(arguments.length>1){this.options.values[j]=this._trimAlignValue(h);this._refreshValue();this._change(null,j)}else if(arguments.length)if(b.isArray(arguments[0])){f=this.options.values;c=arguments[0];for(e=0;e<f.length;e+=1){f[e]=this._trimAlignValue(c[e]);this._change(null,e)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(j):
this.value();else return this._values()},_setOption:function(j,h){var f,c=0;if(b.isArray(this.options.values))c=this.options.values.length;b.Widget.prototype._setOption.apply(this,arguments);switch(j){case "disabled":if(h){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.propAttr("disabled",true);this.element.addClass("ui-disabled")}else{this.handles.propAttr("disabled",false);this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(f=0;f<c;f+=1)this._change(null,f);this._animateOff=false;break}},_value:function(){var j=this.options.value;return j=this._trimAlignValue(j)},_values:function(j){var h,f;if(arguments.length){h=this.options.values[j];
return h=this._trimAlignValue(h)}else{h=this.options.values.slice();for(f=0;f<h.length;f+=1)h[f]=this._trimAlignValue(h[f]);return h}},_trimAlignValue:function(j){if(j<=this._valueMin())return this._valueMin();if(j>=this._valueMax())return this._valueMax();var h=this.options.step>0?this.options.step:1,f=(j-this._valueMin())%h;j=j-f;if(Math.abs(f)*2>=h)j+=f>0?h:-h;return parseFloat(j.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var j=
this.options.range,h=this.options,f=this,c=!this._animateOff?h.animate:false,e,k={},n,o,q,r;if(this.options.values&&this.options.values.length)this.handles.each(function(t){e=(f.values(t)-f._valueMin())/(f._valueMax()-f._valueMin())*100;k[f.orientation==="horizontal"?"left":"bottom"]=e+"%";b(this).stop(1,1)[c?"animate":"css"](k,h.animate);if(f.options.range===true)if(f.orientation==="horizontal"){if(t===0)f.range.stop(1,1)[c?"animate":"css"]({left:e+"%"},h.animate);if(t===1)f.range[c?"animate":"css"]({width:e-
n+"%"},{queue:false,duration:h.animate})}else{if(t===0)f.range.stop(1,1)[c?"animate":"css"]({bottom:e+"%"},h.animate);if(t===1)f.range[c?"animate":"css"]({height:e-n+"%"},{queue:false,duration:h.animate})}n=e});else{o=this.value();q=this._valueMin();r=this._valueMax();e=r!==q?(o-q)/(r-q)*100:0;k[f.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](k,h.animate);if(j==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},
h.animate);if(j==="max"&&this.orientation==="horizontal")this.range[c?"animate":"css"]({width:100-e+"%"},{queue:false,duration:h.animate});if(j==="min"&&this.orientation==="vertical")this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},h.animate);if(j==="max"&&this.orientation==="vertical")this.range[c?"animate":"css"]({height:100-e+"%"},{queue:false,duration:h.animate})}}});b.extend(b.ui.slider,{version:"1.8.16"})})(jQuery);
(function(b){function j(f,c){return typeof f=="function"?f.call(c):f}function h(f,c){this.$element=b(f);this.options=c;this.enabled=true;this.fixTitle()}h.prototype={show:function(){var f=this.getTitle();if(f&&this.enabled){var c=this.tip();c.find(".tipsy-inner")[this.options.html?"html":"text"](f);c[0].className="tipsy";c.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);f=b.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});
var e=c[0].offsetWidth,k=c[0].offsetHeight,n=j(this.options.gravity,this.$element[0]),o;switch(n.charAt(0)){case "n":o={top:f.top+f.height+this.options.offset,left:f.left+f.width/2-e/2};break;case "s":o={top:f.top-k-this.options.offset,left:f.left+f.width/2-e/2};break;case "e":o={top:f.top+f.height/2-k/2,left:f.left-e-this.options.offset};break;case "w":o={top:f.top+f.height/2-k/2,left:f.left+f.width+this.options.offset};break}if(n.length==2)o.left=n.charAt(1)=="w"?f.left+f.width/2-15:f.left+f.width/
2-e+15;c.css(o).addClass("tipsy-"+n);c.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+n.charAt(0);this.options.className&&c.addClass(j(this.options.className,this.$element[0]));this.options.fade?c.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):c.css({visibility:"visible",opacity:this.options.opacity})}},hide:function(){this.options.fade?this.tip().stop().fadeOut(function(){b(this).remove()}):this.tip().remove()},fixTitle:function(){var f=
this.$element;if(f.attr("title")||typeof f.attr("original-title")!="string")f.attr("original-title",f.attr("title")||"").removeAttr("title")},getTitle:function(){var f,c=this.$element,e=this.options;this.fixTitle();e=this.options;if(typeof e.title=="string")f=c.attr(e.title=="title"?"original-title":e.title);else if(typeof e.title=="function")f=e.title.call(c[0]);return(f=(""+f).replace(/(^\s*|\s*$)/,""))||e.fallback},tip:function(){if(!this.$tip)this.$tip=b('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>');
return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();this.options=this.$element=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};b.fn.tipsy=function(f){function c(q){var r=b.data(q,"tipsy");if(!r){r=new h(q,b.fn.tipsy.elementOptions(q,f));b.data(q,"tipsy",r)}return r}function e(){var q=c(this);q.hoverState="in";if(f.delayIn==0)q.show();else{q.fixTitle();setTimeout(function(){q.hoverState==
"in"&&q.show()},f.delayIn)}}function k(){var q=c(this);q.hoverState="out";f.delayOut==0?q.hide():setTimeout(function(){q.hoverState=="out"&&q.hide()},f.delayOut)}if(f===true)return this.data("tipsy");else if(typeof f=="string"){var n=this.data("tipsy");n&&n[f]();return this}f=b.extend({},b.fn.tipsy.defaults,f);f.live||this.each(function(){c(this)});if(f.trigger!="manual"){n=f.live?"live":"bind";var o=f.trigger=="hover"?"mouseleave":"blur";this[n](f.trigger=="hover"?"mouseenter":"focus",e)[n](o,k)}return this};
b.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:false,fallback:"",gravity:"n",html:false,live:false,offset:0,opacity:0.8,title:"title",trigger:"hover"};b.fn.tipsy.elementOptions=function(f,c){return b.metadata?b.extend({},c,b(f).metadata()):c};b.fn.tipsy.autoNS=function(){return b(this).offset().top>b(document).scrollTop()+b(window).height()/2?"s":"n"};b.fn.tipsy.autoWE=function(){return b(this).offset().left>b(document).scrollLeft()+b(window).width()/2?"e":"w"};b.fn.tipsy.autoBounds=
function(f,c){return function(){var e={ns:c[0],ew:c.length>1?c[1]:false},k=b(document).scrollTop()+f,n=b(document).scrollLeft()+f,o=b(this);if(o.offset().top<k)e.ns="n";if(o.offset().left<n)e.ew="w";if(b(window).width()+b(document).scrollLeft()-o.offset().left<f)e.ew="e";if(b(window).height()+b(document).scrollTop()-o.offset().top<f)e.ns="s";return e.ns+(e.ew?e.ew:"")}}})(jQuery);
(function(){function b(a,d,i){if(a===d)return a!==0||1/a==1/d;if(a==null||d==null)return a===d;if(a._chain)a=a._wrapped;if(d._chain)d=d._wrapped;if(a.isEqual&&g.isFunction(a.isEqual))return a.isEqual(d);if(d.isEqual&&g.isFunction(d.isEqual))return d.isEqual(a);var l=q.call(a);if(l!=q.call(d))return false;switch(l){case "[object String]":return a==String(d);case "[object Number]":return a!=+a?d!=+d:a==0?1/a==1/d:a==+d;case "[object Date]":case "[object Boolean]":return+a==+d;case "[object RegExp]":return a.source==
d.source&&a.global==d.global&&a.multiline==d.multiline&&a.ignoreCase==d.ignoreCase}if(typeof a!="object"||typeof d!="object")return false;for(var m=i.length;m--;)if(i[m]==a)return true;i.push(a);m=0;var p=true;if(l=="[object Array]"){m=a.length;if(p=m==d.length)for(;m--;)if(!(p=m in a==m in d&&b(a[m],d[m],i)))break}else{if("constructor"in a!="constructor"in d||a.constructor!=d.constructor)return false;for(var s in a)if(r.call(a,s)){m++;if(!(p=r.call(d,s)&&b(a[s],d[s],i)))break}if(p){for(s in d)if(r.call(d,
s)&&!m--)break;p=!m}}i.pop();return p}var j=this,h=j._,f={},c=Array.prototype,e=Object.prototype,k=c.slice,n=c.concat,o=c.unshift,q=e.toString,r=e.hasOwnProperty,t=c.forEach,v=c.map,x=c.reduce,C=c.reduceRight,D=c.filter,E=c.every,F=c.some,y=c.indexOf,G=c.lastIndexOf;e=Array.isArray;var J=Object.keys,A=Function.prototype.bind,g=function(a){return new w(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=g;exports._=g}else if(typeof define==="function"&&
define.amd)define("underscore",function(){return g});else j._=g;g.VERSION="1.2.3";var u=g.each=g.forEach=function(a,d,i){if(a!=null)if(t&&a.forEach===t)a.forEach(d,i);else if(a.length===+a.length)for(var l=0,m=a.length;l<m;l++){if(l in a&&d.call(i,a[l],l,a)===f)return}else for(l in a)if(r.call(a,l))if(d.call(i,a[l],l,a)===f)return};g.map=function(a,d,i){var l=[];if(a==null)return l;if(v&&a.map===v)return a.map(d,i);u(a,function(m,p,s){l[l.length]=d.call(i,m,p,s)});return l};g.reduce=g.foldl=g.inject=
function(a,d,i,l){var m=arguments.length>2;if(a==null)a=[];if(x&&a.reduce===x){if(l)d=g.bind(d,l);return m?a.reduce(d,i):a.reduce(d)}u(a,function(p,s,z){if(m)i=d.call(l,i,p,s,z);else{i=p;m=true}});if(!m)throw new TypeError("Reduce of empty array with no initial value");return i};g.reduceRight=g.foldr=function(a,d,i,l){var m=arguments.length>2;if(a==null)a=[];if(C&&a.reduceRight===C){if(l)d=g.bind(d,l);return m?a.reduceRight(d,i):a.reduceRight(d)}var p=g.toArray(a).reverse();if(l&&!m)d=g.bind(d,l);
return m?g.reduce(p,d,i,l):g.reduce(p,d)};g.find=g.detect=function(a,d,i){var l;H(a,function(m,p,s){if(d.call(i,m,p,s)){l=m;return true}});return l};g.filter=g.select=function(a,d,i){var l=[];if(a==null)return l;if(D&&a.filter===D)return a.filter(d,i);u(a,function(m,p,s){if(d.call(i,m,p,s))l[l.length]=m});return l};g.reject=function(a,d,i){var l=[];if(a==null)return l;u(a,function(m,p,s){d.call(i,m,p,s)||(l[l.length]=m)});return l};g.every=g.all=function(a,d,i){var l=true;if(a==null)return l;if(E&&
a.every===E)return a.every(d,i);u(a,function(m,p,s){if(!(l=l&&d.call(i,m,p,s)))return f});return l};var H=g.some=g.any=function(a,d,i){d||(d=g.identity);var l=false;if(a==null)return l;if(F&&a.some===F)return a.some(d,i);u(a,function(m,p,s){if(l||(l=d.call(i,m,p,s)))return f});return!!l};g.include=g.contains=function(a,d){var i=false;if(a==null)return i;if(y&&a.indexOf===y)return a.indexOf(d)!=-1;return i=H(a,function(l){return l===d})};g.invoke=function(a,d){var i=k.call(arguments,2);return g.map(a,
function(l){return(d.call?d||l:l[d]).apply(l,i)})};g.pluck=function(a,d){return g.map(a,function(i){return i[d]})};g.max=function(a,d,i){if(!d&&g.isArray(a))return Math.max.apply(Math,a);if(!d&&g.isEmpty(a))return-Infinity;var l={computed:-Infinity};u(a,function(m,p,s){p=d?d.call(i,m,p,s):m;p>=l.computed&&(l={value:m,computed:p})});return l.value};g.min=function(a,d,i){if(!d&&g.isArray(a))return Math.min.apply(Math,a);if(!d&&g.isEmpty(a))return Infinity;var l={computed:Infinity};u(a,function(m,p,
s){p=d?d.call(i,m,p,s):m;p<l.computed&&(l={value:m,computed:p})});return l.value};g.shuffle=function(a){var d=[],i;u(a,function(l,m){if(m==0)d[0]=l;else{i=Math.floor(Math.random()*(m+1));d[m]=d[i];d[i]=l}});return d};g.sortBy=function(a,d,i){return g.pluck(g.map(a,function(l,m,p){return{value:l,criteria:d.call(i,l,m,p)}}).sort(function(l,m){l=l.criteria;m=m.criteria;return l<m?-1:l>m?1:0}),"value")};g.groupBy=function(a,d){var i={},l=g.isFunction(d)?d:function(m){return m[d]};u(a,function(m,p){p=
l(m,p);(i[p]||(i[p]=[])).push(m)});return i};g.sortedIndex=function(a,d,i){i||(i=g.identity);for(var l=0,m=a.length;l<m;){var p=l+m>>1;i(a[p])<i(d)?(l=p+1):(m=p)}return l};g.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(g.isArray(a))return k.call(a);if(g.isArguments(a))return k.call(a);return g.values(a)};g.size=function(a){return g.toArray(a).length};g.first=g.head=function(a,d,i){return d!=null&&!i?k.call(a,0,d):a[0]};g.initial=function(a,d,i){return k.call(a,0,a.length-
(d==null||i?1:d))};g.last=function(a,d,i){return d!=null&&!i?k.call(a,Math.max(a.length-d,0)):a[a.length-1]};g.rest=g.tail=function(a,d,i){return k.call(a,d==null||i?1:d)};g.compact=function(a){return g.filter(a,function(d){return!!d})};g.flatten=function(a,d){return g.reduce(a,function(i,l){if(g.isArray(l))return i.concat(d?l:g.flatten(l));i[i.length]=l;return i},[])};g.without=function(a){return g.difference(a,k.call(arguments,1))};g.uniq=g.unique=function(a,d,i){i=i?g.map(a,i):a;var l=[];g.reduce(i,
function(m,p,s){if(0==s||(d===true?g.last(m)!=p:!g.include(m,p))){m[m.length]=p;l[l.length]=a[s]}return m},[]);return l};g.union=function(){return g.uniq(g.flatten(arguments,true))};g.intersection=g.intersect=function(a){var d=k.call(arguments,1);return g.filter(g.uniq(a),function(i){return g.every(d,function(l){return g.indexOf(l,i)>=0})})};g.difference=function(a){var d=g.flatten(k.call(arguments,1));return g.filter(a,function(i){return!g.include(d,i)})};g.zip=function(){for(var a=k.call(arguments),
d=g.max(g.pluck(a,"length")),i=new Array(d),l=0;l<d;l++)i[l]=g.pluck(a,""+l);return i};g.indexOf=function(a,d,i){if(a==null)return-1;var l;if(i){i=g.sortedIndex(a,d);return a[i]===d?i:-1}if(y&&a.indexOf===y)return a.indexOf(d);i=0;for(l=a.length;i<l;i++)if(i in a&&a[i]===d)return i;return-1};g.lastIndexOf=function(a,d){if(a==null)return-1;if(G&&a.lastIndexOf===G)return a.lastIndexOf(d);for(var i=a.length;i--;)if(i in a&&a[i]===d)return i;return-1};g.range=function(a,d,i){if(arguments.length<=1){d=
a||0;a=0}i=arguments[2]||1;for(var l=Math.max(Math.ceil((d-a)/i),0),m=0,p=new Array(l);m<l;){p[m++]=a;a+=i}return p};var I=function(){};g.bind=function(a,d){var i,l;if(a.bind===A&&A)return A.apply(a,k.call(arguments,1));if(!g.isFunction(a))throw new TypeError;l=k.call(arguments,2);return i=function(){if(!(this instanceof i))return a.apply(d,l.concat(k.call(arguments)));I.prototype=a.prototype;var m=new I,p=a.apply(m,l.concat(k.call(arguments)));if(Object(p)===p)return p;return m}};g.bindAll=function(a){var d=
k.call(arguments,1);if(d.length==0)d=g.functions(a);u(d,function(i){a[i]=g.bind(a[i],a)});return a};g.memoize=function(a,d){var i={};d||(d=g.identity);return function(){var l=d.apply(this,arguments);return r.call(i,l)?i[l]:(i[l]=a.apply(this,arguments))}};g.delay=function(a,d){var i=k.call(arguments,2);return setTimeout(function(){return a.apply(a,i)},d)};g.defer=function(a){return g.delay.apply(g,[a,1].concat(k.call(arguments,1)))};g.throttle=function(a,d){var i,l,m,p,s,z=g.debounce(function(){s=
p=false},d);return function(){i=this;l=arguments;var K=function(){m=null;s&&a.apply(i,l);z()};m||(m=setTimeout(K,d));if(p)s=true;else a.apply(i,l);z();p=true}};g.debounce=function(a,d){var i;return function(){var l=this,m=arguments;clearTimeout(i);i=setTimeout(function(){i=null;a.apply(l,m)},d)}};g.once=function(a){var d=false,i;return function(){if(d)return i;d=true;return i=a.apply(this,arguments)}};g.wrap=function(a,d){return function(){var i=n.apply([a],arguments);return d.apply(this,i)}};g.compose=
function(){var a=arguments;return function(){for(var d=arguments,i=a.length-1;i>=0;i--)d=[a[i].apply(this,d)];return d[0]}};g.after=function(a,d){if(a<=0)return d();return function(){if(--a<1)return d.apply(this,arguments)}};g.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var d=[];for(var i in a)if(r.call(a,i))d[d.length]=i;return d};g.values=function(a){return g.map(a,g.identity)};g.functions=g.methods=function(a){var d=[];for(var i in a)g.isFunction(a[i])&&d.push(i);
return d.sort()};g.extend=function(a){u(k.call(arguments,1),function(d){for(var i in d)if(d[i]!==void 0)a[i]=d[i]});return a};g.defaults=function(a){u(k.call(arguments,1),function(d){for(var i in d)if(a[i]==null)a[i]=d[i]});return a};g.clone=function(a){if(!g.isObject(a))return a;return g.isArray(a)?a.slice():g.extend({},a)};g.tap=function(a,d){d(a);return a};g.isEqual=function(a,d){return b(a,d,[])};g.isEmpty=function(a){if(g.isArray(a)||g.isString(a))return a.length===0;for(var d in a)if(r.call(a,
d))return false;return true};g.isElement=function(a){return!!(a&&a.nodeType==1)};g.isArray=e||function(a){return q.call(a)=="[object Array]"};g.isObject=function(a){return a===Object(a)};g.isArguments=function(a){return q.call(a)=="[object Arguments]"};if(!g.isArguments(arguments))g.isArguments=function(a){return!!(a&&r.call(a,"callee"))};g.isFunction=function(a){return q.call(a)=="[object Function]"};g.isString=function(a){return q.call(a)=="[object String]"};g.isNumber=function(a){return q.call(a)==
"[object Number]"};g.isNaN=function(a){return a!==a};g.isBoolean=function(a){return a===true||a===false||q.call(a)=="[object Boolean]"};g.isDate=function(a){return q.call(a)=="[object Date]"};g.isRegExp=function(a){return q.call(a)=="[object RegExp]"};g.isNull=function(a){return a===null};g.isUndefined=function(a){return a===void 0};g.noConflict=function(){j._=h;return this};g.identity=function(a){return a};g.times=function(a,d,i){for(var l=0;l<a;l++)d.call(i,l)};g.escape=function(a){return(""+a).replace(/&/g,
"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};g.mixin=function(a){u(g.functions(a),function(d){L(d,g[d]=a[d])})};var M=0;g.uniqueId=function(a){var d=M++;return a?a+d:d};g.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};g.template=function(a,d){var i=g.templateSettings;a="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,
"\\\\").replace(/'/g,"\\'").replace(i.escape,function(m,p){return"',_.escape("+p.replace(/\\'/g,"'")+"),'"}).replace(i.interpolate,function(m,p){return"',"+p.replace(/\\'/g,"'")+",'"}).replace(i.evaluate||null,function(m,p){return"');"+p.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";var l=new Function("obj","_",a);if(d)return l(d,g);return function(m){return l.call(this,m,g)}};var w=function(a){this._wrapped=
a};g.prototype=w.prototype;var B=function(a,d){return d?g(a).chain():a},L=function(a,d){w.prototype[a]=function(){var i=k.call(arguments);o.call(i,this._wrapped);return B(d.apply(g,i),this._chain)}};g.mixin(g);u(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var d=c[a];w.prototype[a]=function(){d.apply(this._wrapped,arguments);return B(this._wrapped,this._chain)}});u(["concat","join","slice"],function(a){var d=c[a];w.prototype[a]=function(){return B(d.apply(this._wrapped,arguments),
this._chain)}});w.prototype.chain=function(){this._chain=true;return this};w.prototype.value=function(){return this._wrapped}}).call(this);var Base=function(){};
Base.extend=function(b,j){var h=Base.prototype.extend;Base._prototyping=true;var f=new this;h.call(f,b);f.base=function(){};delete Base._prototyping;var c=f.constructor,e=f.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==e){this._constructing=true;c.apply(this,arguments);delete this._constructing}else if(arguments[0]!=null)return(arguments[0].extend||h).call(arguments[0],f)};e.ancestor=this;e.extend=this.extend;e.forEach=this.forEach;e.implement=this.implement;
e.prototype=f;e.toString=this.toString;e.valueOf=function(k){return k=="object"?e:c.valueOf()};h.call(e,j);typeof e.init=="function"&&e.init();return e};
Base.prototype={extend:function(b,j){if(arguments.length>1){var h=this[b];if(h&&typeof j=="function"&&(!h.valueOf||h.valueOf()!=j.valueOf())&&/\bbase\b/.test(j)){var f=j.valueOf();j=function(){var q=this.base||Base.prototype.base;this.base=h;var r=f.apply(this,arguments);this.base=q;return r};j.valueOf=function(q){return q=="object"?j:f};j.toString=Base.toString}this[b]=j}else if(b){var c=Base.prototype.extend;if(!Base._prototyping&&typeof this!="function")c=this.extend||c;for(var e={toSource:null},
k=["constructor","toString","valueOf"],n=Base._prototyping?0:1;o=k[n++];)b[o]!=e[o]&&c.call(this,o,b[o]);for(var o in b)e[o]||c.call(this,o,b[o])}return this}};
Base=Base.extend({constructor:function(b){this.extend(b)}},{ancestor:Object,version:"1.1",forEach:function(b,j,h){for(var f in b)this.prototype[f]===undefined&&j.call(h,b[f],f,b)},implement:function(){for(var b=0;b<arguments.length;b++)typeof arguments[b]=="function"?arguments[b](this.prototype):this.prototype.extend(arguments[b]);return this},toString:function(){return String(this.valueOf())}});if(typeof exports!=="undefined")exports.Base=Base;
function printStackTrace(b){b=b&&b.e?b.e:null;return(new printStackTrace.implementation).run(b)}printStackTrace.implementation=function(){};
printStackTrace.implementation.prototype={run:function(b){b=b||function(){try{this.undef();return null}catch(h){return h}}();var j=this._mode||this.mode(b);return j==="other"?this.other(arguments.callee):this[j](b)},mode:function(b){if(b.arguments)return this._mode="chrome";else if(typeof window!=="undefined"&&window.opera&&b.stacktrace)return this._mode="opera10";else if(b.stack)return this._mode="firefox";else if(typeof window!=="undefined"&&window.opera&&!("stacktrace"in b))return this._mode="opera";
return this._mode="other"},chrome:function(b){return b.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@").split("\n")},firefox:function(b){return b.stack.replace(/(?:\n@:0)?\s+$/m,"").replace(/^\(/gm,"{anonymous}(").split("\n")},opera10:function(){return[]},opera:function(){return[]},other:function(){return[]}};
var Queue=Base.extend({constructor:function(){this.queue=[];this.queueSpace=0},getSize:function(){return this.queue.length-this.queueSpace},isEmpty:function(){return this.queue.length===0},enqueue:function(b){this.queue.push(b)},dequeue:function(){var b=undefined;if(this.queue.length){b=this.queue[this.queueSpace];if(++this.queueSpace*2>=this.queue.length){this.queue=this.queue.slice(this.queueSpace);this.queueSpace=0}return b}},getOldestElement:function(){var b=undefined;if(this.queue.length)b=this.queue[this.queueSpace];
return b}});

