UNPKG

dygraphs

Version:

dygraphs is a fast, flexible open source JavaScript charting library.

1 lines 310 kB
!function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):factory(jQuery)}(function($){$.ui=$.ui||{};$.ui.version="1.12.1";var orig,widgetUuid=0,widgetSlice=Array.prototype.slice;$.cleanData=(orig=$.cleanData,function(elems){for(var events,elem,i=0;null!=(elem=elems[i]);i++)try{(events=$._data(elem,"events"))&&events.remove&&$(elem).triggerHandler("remove")}catch(e){}orig(elems)}),$.widget=function(name,base,prototype){var existingConstructor,constructor,basePrototype,proxiedPrototype={},namespace=name.split(".")[0],fullName=namespace+"-"+(name=name.split(".")[1]);return prototype||(prototype=base,base=$.Widget),$.isArray(prototype)&&(prototype=$.extend.apply(null,[{}].concat(prototype))),$.expr[":"][fullName.toLowerCase()]=function(elem){return!!$.data(elem,fullName)},$[namespace]=$[namespace]||{},existingConstructor=$[namespace][name],constructor=$[namespace][name]=function(options,element){if(!this._createWidget)return new constructor(options,element);arguments.length&&this._createWidget(options,element)},$.extend(constructor,existingConstructor,{version:prototype.version,_proto:$.extend({},prototype),_childConstructors:[]}),(basePrototype=new base).options=$.widget.extend({},basePrototype.options),$.each(prototype,function(prop,value){function _super(){return base.prototype[prop].apply(this,arguments)}function _superApply(args){return base.prototype[prop].apply(this,args)}$.isFunction(value)?proxiedPrototype[prop]=function(){var returnValue,__super=this._super,__superApply=this._superApply;return this._super=_super,this._superApply=_superApply,returnValue=value.apply(this,arguments),this._super=__super,this._superApply=__superApply,returnValue}:proxiedPrototype[prop]=value}),constructor.prototype=$.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor&&basePrototype.widgetEventPrefix||name},proxiedPrototype,{constructor:constructor,namespace:namespace,widgetName:name,widgetFullName:fullName}),existingConstructor?($.each(existingConstructor._childConstructors,function(i,child){var childPrototype=child.prototype;$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,child._proto)}),delete existingConstructor._childConstructors):base._childConstructors.push(constructor),$.widget.bridge(name,constructor),constructor},$.widget.extend=function(target){for(var key,value,input=widgetSlice.call(arguments,1),inputIndex=0,inputLength=input.length;inputIndex<inputLength;inputIndex++)for(key in input[inputIndex])value=input[inputIndex][key],input[inputIndex].hasOwnProperty(key)&&void 0!==value&&($.isPlainObject(value)?target[key]=$.isPlainObject(target[key])?$.widget.extend({},target[key],value):$.widget.extend({},value):target[key]=value);return target},$.widget.bridge=function(name,object){var fullName=object.prototype.widgetFullName||name;$.fn[name]=function(options){var isMethodCall="string"==typeof options,args=widgetSlice.call(arguments,1),returnValue=this;return isMethodCall?this.length||"instance"!==options?this.each(function(){var methodValue,instance=$.data(this,fullName);return"instance"===options?(returnValue=instance,!1):instance?$.isFunction(instance[options])&&"_"!==options.charAt(0)?(methodValue=instance[options].apply(instance,args))!==instance&&void 0!==methodValue?(returnValue=methodValue&&methodValue.jquery?returnValue.pushStack(methodValue.get()):methodValue,!1):void 0:$.error("no such method '"+options+"' for "+name+" widget instance"):$.error("cannot call methods on "+name+" prior to initialization; attempted to call method '"+options+"'")}):returnValue=void 0:(args.length&&(options=$.widget.extend.apply(null,[options].concat(args))),this.each(function(){var instance=$.data(this,fullName);instance?(instance.option(options||{}),instance._init&&instance._init()):$.data(this,fullName,new object(options,this))})),returnValue}},$.Widget=function(){},$.Widget._childConstructors=[],$.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(options,element){element=$(element||this.defaultElement||this)[0],this.element=$(element),this.uuid=widgetUuid++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=$(),this.hoverable=$(),this.focusable=$(),this.classesElementLookup={},element!==this&&($.data(element,this.widgetFullName,this),this._on(!0,this.element,{remove:function(event){event.target===element&&this.destroy()}}),this.document=$(element.style?element.ownerDocument:element.document||element),this.window=$(this.document[0].defaultView||this.document[0].parentWindow)),this.options=$.widget.extend({},this.options,this._getCreateOptions(),options),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){var that=this;this._destroy(),$.each(this.classesElementLookup,function(key,value){that._removeClass(value,key)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:$.noop,widget:function(){return this.element},option:function(key,value){var parts,curOption,i,options=key;if(0===arguments.length)return $.widget.extend({},this.options);if("string"==typeof key)if(options={},key=(parts=key.split(".")).shift(),parts.length){for(curOption=options[key]=$.widget.extend({},this.options[key]),i=0;i<parts.length-1;i++)curOption[parts[i]]=curOption[parts[i]]||{},curOption=curOption[parts[i]];if(key=parts.pop(),1===arguments.length)return void 0===curOption[key]?null:curOption[key];curOption[key]=value}else{if(1===arguments.length)return void 0===this.options[key]?null:this.options[key];options[key]=value}return this._setOptions(options),this},_setOptions:function(options){for(var key in options)this._setOption(key,options[key]);return this},_setOption:function(key,value){return"classes"===key&&this._setOptionClasses(value),this.options[key]=value,"disabled"===key&&this._setOptionDisabled(value),this},_setOptionClasses:function(value){var classKey,elements,currentElements;for(classKey in value)currentElements=this.classesElementLookup[classKey],value[classKey]!==this.options.classes[classKey]&&currentElements&&currentElements.length&&(elements=$(currentElements.get()),this._removeClass(currentElements,classKey),elements.addClass(this._classes({element:elements,keys:classKey,classes:value,add:!0})))},_setOptionDisabled:function(value){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!value),value&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(options){var full=[],that=this;function processClassString(classes,checkOption){for(var current,i=0;i<classes.length;i++)current=that.classesElementLookup[classes[i]]||$(),current=options.add?$($.unique(current.get().concat(options.element.get()))):$(current.not(options.element).get()),that.classesElementLookup[classes[i]]=current,full.push(classes[i]),checkOption&&options.classes[classes[i]]&&full.push(options.classes[classes[i]])}return options=$.extend({element:this.element,classes:this.options.classes||{}},options),this._on(options.element,{remove:"_untrackClassesElement"}),options.keys&&processClassString(options.keys.match(/\S+/g)||[],!0),options.extra&&processClassString(options.extra.match(/\S+/g)||[]),full.join(" ")},_untrackClassesElement:function(event){var that=this;$.each(that.classesElementLookup,function(key,value){-1!==$.inArray(event.target,value)&&(that.classesElementLookup[key]=$(value.not(event.target).get()))})},_removeClass:function(element,keys,extra){return this._toggleClass(element,keys,extra,!1)},_addClass:function(element,keys,extra){return this._toggleClass(element,keys,extra,!0)},_toggleClass:function(options,keys,extra,add){add="boolean"==typeof add?add:extra;var shift="string"==typeof options||null===options,options={extra:shift?keys:extra,keys:shift?options:keys,element:shift?this.element:options,add:add};return options.element.toggleClass(this._classes(options),add),this},_on:function(suppressDisabledCheck,element,handlers){var delegateElement,instance=this;"boolean"!=typeof suppressDisabledCheck&&(handlers=element,element=suppressDisabledCheck,suppressDisabledCheck=!1),handlers?(element=delegateElement=$(element),this.bindings=this.bindings.add(element)):(handlers=element,element=this.element,delegateElement=this.widget()),$.each(handlers,function(eventName,handler){function handlerProxy(){if(suppressDisabledCheck||!0!==instance.options.disabled&&!$(this).hasClass("ui-state-disabled"))return("string"==typeof handler?instance[handler]:handler).apply(instance,arguments)}"string"!=typeof handler&&(handlerProxy.guid=handler.guid=handler.guid||handlerProxy.guid||$.guid++);var selector=eventName.match(/^([\w:-]*)\s*(.*)$/),eventName=selector[1]+instance.eventNamespace,selector=selector[2];selector?delegateElement.on(eventName,selector,handlerProxy):element.on(eventName,handlerProxy)})},_off:function(element,eventName){eventName=(eventName||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,element.off(eventName).off(eventName),this.bindings=$(this.bindings.not(element).get()),this.focusable=$(this.focusable.not(element).get()),this.hoverable=$(this.hoverable.not(element).get())},_delay:function(handler,delay){var instance=this;return setTimeout(function(){return("string"==typeof handler?instance[handler]:handler).apply(instance,arguments)},delay||0)},_hoverable:function(element){this.hoverable=this.hoverable.add(element),this._on(element,{mouseenter:function(event){this._addClass($(event.currentTarget),null,"ui-state-hover")},mouseleave:function(event){this._removeClass($(event.currentTarget),null,"ui-state-hover")}})},_focusable:function(element){this.focusable=this.focusable.add(element),this._on(element,{focusin:function(event){this._addClass($(event.currentTarget),null,"ui-state-focus")},focusout:function(event){this._removeClass($(event.currentTarget),null,"ui-state-focus")}})},_trigger:function(type,event,data){var prop,orig,callback=this.options[type];if(data=data||{},(event=$.Event(event)).type=(type===this.widgetEventPrefix?type:this.widgetEventPrefix+type).toLowerCase(),event.target=this.element[0],orig=event.originalEvent)for(prop in orig)prop in event||(event[prop]=orig[prop]);return this.element.trigger(event,data),!($.isFunction(callback)&&!1===callback.apply(this.element[0],[event].concat(data))||event.isDefaultPrevented())}},$.each({show:"fadeIn",hide:"fadeOut"},function(method,defaultEffect){$.Widget.prototype["_"+method]=function(element,options,callback){var hasOptions,effectName=(options="string"==typeof options?{effect:options}:options)?!0!==options&&"number"!=typeof options&&options.effect||defaultEffect:method;"number"==typeof(options=options||{})&&(options={duration:options}),hasOptions=!$.isEmptyObject(options),options.complete=callback,options.delay&&element.delay(options.delay),hasOptions&&$.effects&&$.effects.effect[effectName]?element[method](options):effectName!==method&&element[effectName]?element[effectName](options.duration,options.easing,callback):element.queue(function(next){$(this)[method](),callback&&callback.call(element[0]),next()})}});var cachedScrollbarWidth,max,abs,rhorizontal,rvertical,roffset,rposition,rpercent,_position;$.widget;function getOffsets(offsets,width,height){return[parseFloat(offsets[0])*(rpercent.test(offsets[0])?width/100:1),parseFloat(offsets[1])*(rpercent.test(offsets[1])?height/100:1)]}function parseCss(element,property){return parseInt($.css(element,property),10)||0}max=Math.max,abs=Math.abs,rhorizontal=/left|center|right/,rvertical=/top|center|bottom/,roffset=/[\+\-]\d+(\.[\d]+)?%?/,rposition=/^\w+/,rpercent=/%$/,_position=$.fn.position,$.position={scrollbarWidth:function(){if(void 0!==cachedScrollbarWidth)return cachedScrollbarWidth;var w1,div=$("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),w2=div.children()[0];return $("body").append(div),w1=w2.offsetWidth,div.css("overflow","scroll"),w1===(w2=w2.offsetWidth)&&(w2=div[0].clientWidth),div.remove(),cachedScrollbarWidth=w1-w2},getScrollInfo:function(within){var hasOverflowX=within.isWindow||within.isDocument?"":within.element.css("overflow-x"),overflowY=within.isWindow||within.isDocument?"":within.element.css("overflow-y"),hasOverflowX="scroll"===hasOverflowX||"auto"===hasOverflowX&&within.width<within.element[0].scrollWidth;return{width:"scroll"===overflowY||"auto"===overflowY&&within.height<within.element[0].scrollHeight?$.position.scrollbarWidth():0,height:hasOverflowX?$.position.scrollbarWidth():0}},getWithinInfo:function(element){var withinElement=$(element||window),isWindow=$.isWindow(withinElement[0]),isDocument=!!withinElement[0]&&9===withinElement[0].nodeType;return{element:withinElement,isWindow:isWindow,isDocument:isDocument,offset:!isWindow&&!isDocument?$(element).offset():{left:0,top:0},scrollLeft:withinElement.scrollLeft(),scrollTop:withinElement.scrollTop(),width:withinElement.outerWidth(),height:withinElement.outerHeight()}}},$.fn.position=function(options){if(!options||!options.of)return _position.apply(this,arguments);var atOffset,targetWidth,targetHeight,targetOffset,basePosition,raw,target="string"==typeof(options=$.extend({},options)).of?$(document).find(options.of):$(options.of),within=$.position.getWithinInfo(options.within),scrollInfo=$.position.getScrollInfo(within),collision=(options.collision||"flip").split(" "),offsets={},dimensions=9===(raw=(dimensions=target)[0]).nodeType?{width:dimensions.width(),height:dimensions.height(),offset:{top:0,left:0}}:$.isWindow(raw)?{width:dimensions.width(),height:dimensions.height(),offset:{top:dimensions.scrollTop(),left:dimensions.scrollLeft()}}:raw.preventDefault?{width:0,height:0,offset:{top:raw.pageY,left:raw.pageX}}:{width:dimensions.outerWidth(),height:dimensions.outerHeight(),offset:dimensions.offset()};return target[0].preventDefault&&(options.at="left top"),targetWidth=dimensions.width,targetHeight=dimensions.height,targetOffset=dimensions.offset,basePosition=$.extend({},targetOffset),$.each(["my","at"],function(){var horizontalOffset,verticalOffset,pos=(options[this]||"").split(" ");(pos=1===pos.length?rhorizontal.test(pos[0])?pos.concat(["center"]):rvertical.test(pos[0])?["center"].concat(pos):["center","center"]:pos)[0]=rhorizontal.test(pos[0])?pos[0]:"center",pos[1]=rvertical.test(pos[1])?pos[1]:"center",horizontalOffset=roffset.exec(pos[0]),verticalOffset=roffset.exec(pos[1]),offsets[this]=[horizontalOffset?horizontalOffset[0]:0,verticalOffset?verticalOffset[0]:0],options[this]=[rposition.exec(pos[0])[0],rposition.exec(pos[1])[0]]}),1===collision.length&&(collision[1]=collision[0]),"right"===options.at[0]?basePosition.left+=targetWidth:"center"===options.at[0]&&(basePosition.left+=targetWidth/2),"bottom"===options.at[1]?basePosition.top+=targetHeight:"center"===options.at[1]&&(basePosition.top+=targetHeight/2),atOffset=getOffsets(offsets.at,targetWidth,targetHeight),basePosition.left+=atOffset[0],basePosition.top+=atOffset[1],this.each(function(){var collisionPosition,using,elem=$(this),elemWidth=elem.outerWidth(),elemHeight=elem.outerHeight(),marginLeft=parseCss(this,"marginLeft"),marginTop=parseCss(this,"marginTop"),collisionWidth=elemWidth+marginLeft+parseCss(this,"marginRight")+scrollInfo.width,collisionHeight=elemHeight+marginTop+parseCss(this,"marginBottom")+scrollInfo.height,position=$.extend({},basePosition),myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());"right"===options.my[0]?position.left-=elemWidth:"center"===options.my[0]&&(position.left-=elemWidth/2),"bottom"===options.my[1]?position.top-=elemHeight:"center"===options.my[1]&&(position.top-=elemHeight/2),position.left+=myOffset[0],position.top+=myOffset[1],collisionPosition={marginLeft:marginLeft,marginTop:marginTop},$.each(["left","top"],function(i,dir){$.ui.position[collision[i]]&&$.ui.position[collision[i]][dir](position,{targetWidth:targetWidth,targetHeight:targetHeight,elemWidth:elemWidth,elemHeight:elemHeight,collisionPosition:collisionPosition,collisionWidth:collisionWidth,collisionHeight:collisionHeight,offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],my:options.my,at:options.at,within:within,elem:elem})}),options.using&&(using=function(props){var left=targetOffset.left-position.left,right=left+targetWidth-elemWidth,top=targetOffset.top-position.top,bottom=top+targetHeight-elemHeight,feedback={target:{element:target,left:targetOffset.left,top:targetOffset.top,width:targetWidth,height:targetHeight},element:{element:elem,left:position.left,top:position.top,width:elemWidth,height:elemHeight},horizontal:right<0?"left":0<left?"right":"center",vertical:bottom<0?"top":0<top?"bottom":"middle"};targetWidth<elemWidth&&abs(left+right)<targetWidth&&(feedback.horizontal="center"),targetHeight<elemHeight&&abs(top+bottom)<targetHeight&&(feedback.vertical="middle"),max(abs(left),abs(right))>max(abs(top),abs(bottom))?feedback.important="horizontal":feedback.important="vertical",options.using.call(this,props,feedback)}),elem.offset($.extend(position,{using:using}))})},$.ui.position={fit:{left:function(position,data){var newOverRight=data.within,withinOffset=newOverRight.isWindow?newOverRight.scrollLeft:newOverRight.offset.left,outerWidth=newOverRight.width,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=withinOffset-collisionPosLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset;data.collisionWidth>outerWidth?0<overLeft&&overRight<=0?(newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset,position.left+=overLeft-newOverRight):position.left=!(0<overRight&&overLeft<=0)&&overRight<overLeft?withinOffset+outerWidth-data.collisionWidth:withinOffset:0<overLeft?position.left+=overLeft:0<overRight?position.left-=overRight:position.left=max(position.left-collisionPosLeft,position.left)},top:function(position,data){var newOverBottom=data.within,withinOffset=newOverBottom.isWindow?newOverBottom.scrollTop:newOverBottom.offset.top,outerHeight=data.within.height,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=withinOffset-collisionPosTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset;data.collisionHeight>outerHeight?0<overTop&&overBottom<=0?(newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset,position.top+=overTop-newOverBottom):position.top=!(0<overBottom&&overTop<=0)&&overBottom<overTop?withinOffset+outerHeight-data.collisionHeight:withinOffset:0<overTop?position.top+=overTop:0<overBottom?position.top-=overBottom:position.top=max(position.top-collisionPosTop,position.top)}},flip:{left:function(position,data){var atOffset=data.within,newOverRight=atOffset.offset.left+atOffset.scrollLeft,outerWidth=atOffset.width,newOverLeft=atOffset.isWindow?atOffset.scrollLeft:atOffset.offset.left,offset=position.left-data.collisionPosition.marginLeft,overLeft=offset-newOverLeft,overRight=offset+data.collisionWidth-outerWidth-newOverLeft,myOffset="left"===data.my[0]?-data.elemWidth:"right"===data.my[0]?data.elemWidth:0,atOffset="left"===data.at[0]?data.targetWidth:"right"===data.at[0]?-data.targetWidth:0,offset=-2*data.offset[0];overLeft<0?((newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-outerWidth-newOverRight)<0||newOverRight<abs(overLeft))&&(position.left+=myOffset+atOffset+offset):0<overRight&&(0<(newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-newOverLeft)||abs(newOverLeft)<overRight)&&(position.left+=myOffset+atOffset+offset)},top:function(position,data){var atOffset=data.within,newOverBottom=atOffset.offset.top+atOffset.scrollTop,outerHeight=atOffset.height,newOverTop=atOffset.isWindow?atOffset.scrollTop:atOffset.offset.top,offset=position.top-data.collisionPosition.marginTop,overTop=offset-newOverTop,overBottom=offset+data.collisionHeight-outerHeight-newOverTop,myOffset="top"===data.my[1]?-data.elemHeight:"bottom"===data.my[1]?data.elemHeight:0,atOffset="top"===data.at[1]?data.targetHeight:"bottom"===data.at[1]?-data.targetHeight:0,offset=-2*data.offset[1];overTop<0?((newOverBottom=position.top+myOffset+atOffset+offset+data.collisionHeight-outerHeight-newOverBottom)<0||newOverBottom<abs(overTop))&&(position.top+=myOffset+atOffset+offset):0<overBottom&&(0<(newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-newOverTop)||abs(newOverTop)<overBottom)&&(position.top+=myOffset+atOffset+offset)}},flipfit:{left:function(){$.ui.position.flip.left.apply(this,arguments),$.ui.position.fit.left.apply(this,arguments)},top:function(){$.ui.position.flip.top.apply(this,arguments),$.ui.position.fit.top.apply(this,arguments)}}};$.ui.position,$.extend($.expr[":"],{data:$.expr.createPseudo?$.expr.createPseudo(function(dataName){return function(elem){return!!$.data(elem,dataName)}}):function(elem,i,match){return!!$.data(elem,match[3])}}),$.fn.extend({disableSelection:(eventType="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(eventType+".ui-disableSelection",function(event){event.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var eventType,baseEasings,jQuery=$;$.effects={effect:{}},function(jQuery){var colors,rplusequals=/^([\-+])=\s*(\d+\.?\d*)/,stringParsers=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1],execResult[2],execResult[3],execResult[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[2.55*execResult[1],2.55*execResult[2],2.55*execResult[3],execResult[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(execResult){return[parseInt(execResult[1],16),parseInt(execResult[2],16),parseInt(execResult[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(execResult){return[parseInt(execResult[1]+execResult[1],16),parseInt(execResult[2]+execResult[2],16),parseInt(execResult[3]+execResult[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(execResult){return[execResult[1],execResult[2]/100,execResult[3]/100,execResult[4]]}}],color=jQuery.Color=function(color,green,blue,alpha){return new jQuery.Color.fn.parse(color,green,blue,alpha)},spaces={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},propTypes={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},support=color.support={},supportElem=jQuery("<p>")[0],each=jQuery.each;function clamp(value,prop,allowEmpty){var type=propTypes[prop.type]||{};return null==value?allowEmpty||!prop.def?null:prop.def:(value=type.floor?~~value:parseFloat(value),isNaN(value)?prop.def:type.mod?(value+type.mod)%type.mod:value<0?0:type.max<value?type.max:value)}function stringParse(string){var inst=color(),rgba=inst._rgba=[];return string=string.toLowerCase(),each(stringParsers,function(i,spaceName){var parsed=spaceName.re.exec(string),parsed=parsed&&spaceName.parse(parsed),spaceName=spaceName.space||"rgba";if(parsed)return parsed=inst[spaceName](parsed),inst[spaces[spaceName].cache]=parsed[spaces[spaceName].cache],rgba=inst._rgba=parsed._rgba,!1}),rgba.length?("0,0,0,0"===rgba.join()&&jQuery.extend(rgba,colors.transparent),inst):colors[string]}function hue2rgb(p,q,h){return 6*(h=(h+1)%1)<1?p+(q-p)*h*6:2*h<1?q:3*h<2?p+(q-p)*(2/3-h)*6:p}supportElem.style.cssText="background-color:rgba(1,1,1,.5)",support.rgba=-1<supportElem.style.backgroundColor.indexOf("rgba"),each(spaces,function(spaceName,space){space.cache="_"+spaceName,space.props.alpha={idx:3,type:"percent",def:1}}),color.fn=jQuery.extend(color.prototype,{parse:function(red,green,blue,alpha){if(void 0===red)return this._rgba=[null,null,null,null],this;(red.jquery||red.nodeType)&&(red=jQuery(red).css(green),green=void 0);var inst=this,type=jQuery.type(red),rgba=this._rgba=[];return void 0!==green&&(red=[red,green,blue,alpha],type="array"),"string"===type?this.parse(stringParse(red)||colors._default):"array"===type?(each(spaces.rgba.props,function(key,prop){rgba[prop.idx]=clamp(red[prop.idx],prop)}),this):"object"===type?(each(spaces,red instanceof color?function(spaceName,space){red[space.cache]&&(inst[space.cache]=red[space.cache].slice())}:function(spaceName,space){var cache=space.cache;each(space.props,function(key,prop){if(!inst[cache]&&space.to){if("alpha"===key||null==red[key])return;inst[cache]=space.to(inst._rgba)}inst[cache][prop.idx]=clamp(red[key],prop,!0)}),inst[cache]&&jQuery.inArray(null,inst[cache].slice(0,3))<0&&(inst[cache][3]=1,space.from&&(inst._rgba=space.from(inst[cache])))}),this):void 0},is:function(compare){var is=color(compare),same=!0,inst=this;return each(spaces,function(_,space){var localCache,isCache=is[space.cache];return isCache&&(localCache=inst[space.cache]||space.to&&space.to(inst._rgba)||[],each(space.props,function(_,prop){if(null!=isCache[prop.idx])return same=isCache[prop.idx]===localCache[prop.idx]})),same}),same},_space:function(){var used=[],inst=this;return each(spaces,function(spaceName,space){inst[space.cache]&&used.push(spaceName)}),used.pop()},transition:function(startColor,distance){var spaceName=(end=color(startColor))._space(),space=spaces[spaceName],startColor=0===this.alpha()?color("transparent"):this,start=startColor[space.cache]||space.to(startColor._rgba),result=start.slice(),end=end[space.cache];return each(space.props,function(key,prop){var index=prop.idx,startValue=start[index],endValue=end[index],type=propTypes[prop.type]||{};null!==endValue&&(null===startValue?result[index]=endValue:(type.mod&&(type.mod/2<endValue-startValue?startValue+=type.mod:type.mod/2<startValue-endValue&&(startValue-=type.mod)),result[index]=clamp((endValue-startValue)*distance+startValue,prop)))}),this[spaceName](result)},blend:function(opaque){if(1===this._rgba[3])return this;var rgb=this._rgba.slice(),a=rgb.pop(),blend=color(opaque)._rgba;return color(jQuery.map(rgb,function(v,i){return(1-a)*blend[i]+a*v}))},toRgbaString:function(){var prefix="rgba(",rgba=jQuery.map(this._rgba,function(v,i){return null==v?2<i?1:0:v});return 1===rgba[3]&&(rgba.pop(),prefix="rgb("),prefix+rgba.join()+")"},toHslaString:function(){var prefix="hsla(",hsla=jQuery.map(this.hsla(),function(v,i){return null==v&&(v=2<i?1:0),v=i&&i<3?Math.round(100*v)+"%":v});return 1===hsla[3]&&(hsla.pop(),prefix="hsl("),prefix+hsla.join()+")"},toHexString:function(includeAlpha){var rgba=this._rgba.slice(),alpha=rgba.pop();return includeAlpha&&rgba.push(~~(255*alpha)),"#"+jQuery.map(rgba,function(v){return 1===(v=(v||0).toString(16)).length?"0"+v:v}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),color.fn.parse.prototype=color.fn,spaces.hsla.to=function(l){if(null==l[0]||null==l[1]||null==l[2])return[null,null,null,l[3]];var r=l[0]/255,h=l[1]/255,b=l[2]/255,a=l[3],max=Math.max(r,h,b),min=Math.min(r,h,b),diff=max-min,s=max+min,l=.5*s,h=min===max?0:r===max?60*(h-b)/diff+360:h===max?60*(b-r)/diff+120:60*(r-h)/diff+240,s=0==diff?0:l<=.5?diff/s:diff/(2-s);return[Math.round(h)%360,s,l,null==a?1:a]},spaces.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var h=a[0]/360,q=a[1],p=a[2],a=a[3],q=p<=.5?p*(1+q):p+q-p*q,p=2*p-q;return[Math.round(255*hue2rgb(p,q,h+1/3)),Math.round(255*hue2rgb(p,q,h)),Math.round(255*hue2rgb(p,q,h-1/3)),a]},each(spaces,function(spaceName,space){var props=space.props,cache=space.cache,to=space.to,from=space.from;color.fn[spaceName]=function(value){if(to&&!this[cache]&&(this[cache]=to(this._rgba)),void 0===value)return this[cache].slice();var ret,type=jQuery.type(value),arr="array"===type||"object"===type?value:arguments,local=this[cache].slice();return each(props,function(val,prop){val=arr["object"===type?val:prop.idx];null==val&&(val=local[prop.idx]),local[prop.idx]=clamp(val,prop)}),from?((ret=color(from(local)))[cache]=local,ret):color(local)},each(props,function(key,prop){color.fn[key]||(color.fn[key]=function(value){var match,vtype=jQuery.type(value),fn="alpha"===key?this._hsla?"hsla":"rgba":spaceName,local=this[fn](),cur=local[prop.idx];return"undefined"===vtype?cur:("function"===vtype&&(value=value.call(this,cur),vtype=jQuery.type(value)),null==value&&prop.empty?this:("string"===vtype&&(match=rplusequals.exec(value))&&(value=cur+parseFloat(match[2])*("+"===match[1]?1:-1)),local[prop.idx]=value,this[fn](local)))})})}),color.hook=function(hooks){hooks=hooks.split(" ");each(hooks,function(i,hook){jQuery.cssHooks[hook]={set:function(elem,value){var parsed,curElem,backgroundColor="";if("transparent"!==value&&("string"!==jQuery.type(value)||(parsed=stringParse(value)))){if(value=color(parsed||value),!support.rgba&&1!==value._rgba[3]){for(curElem="backgroundColor"===hook?elem.parentNode:elem;(""===backgroundColor||"transparent"===backgroundColor)&&curElem&&curElem.style;)try{backgroundColor=jQuery.css(curElem,"backgroundColor"),curElem=curElem.parentNode}catch(e){}value=value.blend(backgroundColor&&"transparent"!==backgroundColor?backgroundColor:"_default")}value=value.toRgbaString()}try{elem.style[hook]=value}catch(e){}}},jQuery.fx.step[hook]=function(fx){fx.colorInit||(fx.start=color(fx.elem,hook),fx.end=color(fx.end),fx.colorInit=!0),jQuery.cssHooks[hook].set(fx.elem,fx.start.transition(fx.end,fx.pos))}})},color.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),jQuery.cssHooks.borderColor={expand:function(value){var expanded={};return each(["Top","Right","Bottom","Left"],function(i,part){expanded["border"+part+"Color"]=value}),expanded}},colors=jQuery.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"}}(jQuery),function(){var orig,classAnimationActions=["add","remove","toggle"],shorthandStyles={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function getElementStyles(elem){var key,len,style=elem.ownerDocument.defaultView?elem.ownerDocument.defaultView.getComputedStyle(elem,null):elem.currentStyle,styles={};if(style&&style.length&&style[0]&&style[style[0]])for(len=style.length;len--;)"string"==typeof style[key=style[len]]&&(styles[$.camelCase(key)]=style[key]);else for(key in style)"string"==typeof style[key]&&(styles[key]=style[key]);return styles}$.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(_,prop){$.fx.step[prop]=function(fx){("none"!==fx.end&&!fx.setAttr||1===fx.pos&&!fx.setAttr)&&(jQuery.style(fx.elem,prop,fx.end),fx.setAttr=!0)}}),$.fn.addBack||($.fn.addBack=function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}),$.effects.animateClass=function(value,duration,easing,callback){var o=$.speed(duration,easing,callback);return this.queue(function(){var animated=$(this),baseClass=animated.attr("class")||"",allAnimations=(allAnimations=o.children?animated.find("*").addBack():animated).map(function(){return{el:$(this),start:getElementStyles(this)}}),applyClassChange=function(){$.each(classAnimationActions,function(i,action){value[action]&&animated[action+"Class"](value[action])})};applyClassChange(),allAnimations=allAnimations.map(function(){return this.end=getElementStyles(this.el[0]),this.diff=function(oldStyle,newStyle){var name,value,diff={};for(name in newStyle)value=newStyle[name],oldStyle[name]!==value&&(shorthandStyles[name]||!$.fx.step[name]&&isNaN(parseFloat(value))||(diff[name]=value));return diff}(this.start,this.end),this}),animated.attr("class",baseClass),allAnimations=allAnimations.map(function(){var styleInfo=this,dfd=$.Deferred(),opts=$.extend({},o,{queue:!1,complete:function(){dfd.resolve(styleInfo)}});return this.el.animate(this.diff,opts),dfd.promise()}),$.when.apply($,allAnimations.get()).done(function(){applyClassChange(),$.each(arguments,function(){var el=this.el;$.each(this.diff,function(key){el.css(key,"")})}),o.complete.call(animated[0])})})},$.fn.extend({addClass:(orig=$.fn.addClass,function(classNames,speed,easing,callback){return speed?$.effects.animateClass.call(this,{add:classNames},speed,easing,callback):orig.apply(this,arguments)}),removeClass:function(orig){return function(classNames,speed,easing,callback){return 1<arguments.length?$.effects.animateClass.call(this,{remove:classNames},speed,easing,callback):orig.apply(this,arguments)}}($.fn.removeClass),toggleClass:function(orig){return function(classNames,force,speed,easing,callback){return"boolean"==typeof force||void 0===force?speed?$.effects.animateClass.call(this,force?{add:classNames}:{remove:classNames},speed,easing,callback):orig.apply(this,arguments):$.effects.animateClass.call(this,{toggle:classNames},force,speed,easing)}}($.fn.toggleClass),switchClass:function(remove,add,speed,easing,callback){return $.effects.animateClass.call(this,{add:add,remove:remove},speed,easing,callback)}})}(),function(){var orig;function _normalizeArguments(effect,options,speed,callback){return effect={effect:effect=$.isPlainObject(effect)?(options=effect).effect:effect},null==options&&(options={}),$.isFunction(options)&&(callback=options,speed=null,options={}),"number"!=typeof options&&!$.fx.speeds[options]||(callback=speed,speed=options,options={}),$.isFunction(speed)&&(callback=speed,speed=null),options&&$.extend(effect,options),speed=speed||options.duration,effect.duration=$.fx.off?0:"number"==typeof speed?speed:speed in $.fx.speeds?$.fx.speeds[speed]:$.fx.speeds._default,effect.complete=callback||options.complete,effect}function standardAnimationOption(option){return!option||"number"==typeof option||$.fx.speeds[option]||("string"==typeof option&&!$.effects.effect[option]||($.isFunction(option)||"object"==typeof option&&!option.effect))}function parseClip(values,outerHeight){var outerWidth=outerHeight.outerWidth(),outerHeight=outerHeight.outerHeight(),values=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(values)||["",0,outerWidth,outerHeight,0];return{top:parseFloat(values[1])||0,right:"auto"===values[2]?outerWidth:parseFloat(values[2]),bottom:"auto"===values[3]?outerHeight:parseFloat(values[3]),left:parseFloat(values[4])||0}}$.expr&&$.expr.filters&&$.expr.filters.animated&&($.expr.filters.animated=(orig=$.expr.filters.animated,function(elem){return!!$(elem).data("ui-effects-animated")||orig(elem)})),!1!==$.uiBackCompat&&$.extend($.effects,{save:function(element,set){for(var i=0,length=set.length;i<length;i++)null!==set[i]&&element.data("ui-effects-"+set[i],element[0].style[set[i]])},restore:function(element,set){for(var val,i=0,length=set.length;i<length;i++)null!==set[i]&&(val=element.data("ui-effects-"+set[i]),element.css(set[i],val))},setMode:function(el,mode){return mode="toggle"===mode?el.is(":hidden")?"show":"hide":mode},createWrapper:function(element){if(element.parent().is(".ui-effects-wrapper"))return element.parent();var props={width:element.outerWidth(!0),height:element.outerHeight(!0),float:element.css("float")},wrapper=$("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),size={width:element.width(),height:element.height()},active=document.activeElement;try{active.id}catch(e){active=document.body}return element.wrap(wrapper),element[0]!==active&&!$.contains(element[0],active)||$(active).trigger("focus"),wrapper=element.parent(),"static"===element.css("position")?(wrapper.css({position:"relative"}),element.css({position:"relative"})):($.extend(props,{position:element.css("position"),zIndex:element.css("z-index")}),$.each(["top","left","bottom","right"],function(i,pos){props[pos]=element.css(pos),isNaN(parseInt(props[pos],10))&&(props[pos]="auto")}),element.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),element.css(size),wrapper.css(props).show()},removeWrapper:function(element){var active=document.activeElement;return element.parent().is(".ui-effects-wrapper")&&(element.parent().replaceWith(element),element[0]!==active&&!$.contains(element[0],active)||$(active).trigger("focus")),element}}),$.extend($.effects,{version:"1.12.1",define:function(name,mode,effect){return effect||(effect=mode,mode="effect"),$.effects.effect[name]=effect,$.effects.effect[name].mode=mode,effect},scaledDimensions:function(element,y,direction){if(0===y)return{height:0,width:0,outerHeight:0,outerWidth:0};var x="horizontal"!==direction?(y||100)/100:1,y="vertical"!==direction?(y||100)/100:1;return{height:element.height()*y,width:element.width()*x,outerHeight:element.outerHeight()*y,outerWidth:element.outerWidth()*x}},clipToBox:function(animation){return{width:animation.clip.right-animation.clip.left,height:animation.clip.bottom-animation.clip.top,left:animation.clip.left,top:animation.clip.top}},unshift:function(element,queueLength,count){var queue=element.queue();1<queueLength&&queue.splice.apply(queue,[1,0].concat(queue.splice(queueLength,count))),element.dequeue()},saveStyle:function(element){element.data("ui-effects-style",element[0].style.cssText)},restoreStyle:function(element){element[0].style.cssText=element.data("ui-effects-style")||"",element.removeData("ui-effects-style")},mode:function(hidden,mode){hidden=hidden.is(":hidden");return"toggle"===mode&&(mode=hidden?"show":"hide"),mode=(hidden?"hide"===mode:"show"===mode)?"none":mode},getBaseline:function(origin,original){var y,x;switch(origin[0]){case"top":y=0;break;case"middle":y=.5;break;case"bottom":y=1;break;default:y=origin[0]/original.height}switch(origin[1]){case"left":x=0;break;case"center":x=.5;break;case"right":x=1;break;default:x=origin[1]/original.width}return{x:x,y:y}},createPlaceholder:function(element){var placeholder,cssPosition=element.css("position"),position=element.position();return element.css({marginTop:element.css("marginTop"),marginBottom:element.css("marginBottom"),marginLeft:element.css("marginLeft"),marginRight:element.css("marginRight")}).outerWidth(element.outerWidth()).outerHeight(element.outerHeight()),/^(static|relative)/.test(cssPosition)&&(cssPosition="absolute",placeholder=$("<"+element[0].nodeName+">").insertAfter(element).css({display:/^(inline|ruby)/.test(element.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:element.css("marginTop"),marginBottom:element.css("marginBottom"),marginLeft:element.css("marginLeft"),marginRight:element.css("marginRight"),float:element.css("float")}).outerWidth(element.outerWidth()).outerHeight(element.outerHeight()).addClass("ui-effects-placeholder"),element.data("ui-effects-placeholder",placeholder)),element.css({position:cssPosition,left:position.left,top:position.top}),placeholder},removePlaceholder:function(element){var dataKey="ui-effects-placeholder",placeholder=element.data(dataKey);placeholder&&(placeholder.remove(),element.removeData(dataKey))},cleanUp:function(element){$.effects.restoreStyle(element),$.effects.removePlaceholder(element)},setTransition:function(element,list,factor,value){return value=value||{},$.each(list,function(i,x){var unit=element.cssUnit(x);0<unit[0]&&(value[x]=unit[0]*factor+unit[1])}),value}}),$.fn.extend({effect:function(){function prefilter(next){var el=$(this),normalizedMode=$.effects.mode(el,mode)||defaultMode;el.data("ui-effects-animated",!0),modes.push(normalizedMode),defaultMode&&("show"===normalizedMode||normalizedMode===defaultMode&&"hide"===normalizedMode)&&el.show(),defaultMode&&"none"===normalizedMode||$.effects.saveStyle(el),$.isFunction(next)&&next()}var args=_normalizeArguments.apply(this,arguments),effectMethod=$.effects.effect[args.effect],defaultMode=effectMethod.mode,queue=args.queue,queueName=queue||"fx",complete=args.complete,mode=args.mode,modes=[];return $.fx.off||!effectMethod?mode?this[mode](args.duration,complete):this.each(function(){complete&&complete.call(this)}):!1===queue?this.each(prefilter).each(run):this.queue(queueName,prefilter).queue(queueName,run);function run(next){var elem=$(this);function done(){$.isFunction(complete)&&complete.call(elem[0]),$.isFunction(next)&&next()}args.mode=modes.shift(),!1===$.uiBackCompat||defaultMode?"none"===args.mode?(elem[mode](),done()):effectMethod.call(elem[0],args,function(){elem.removeData("ui-effects-animated"),$.effects.cleanUp(elem),"hide"===args.mode&&elem.hide(),done()}):(elem.is(":hidden")?"hide"===mode:"show"===mode)?(elem[mode](),done()):effectMethod.call(elem[0],args,done)}},show:function(orig){return function(option){if(standardAnimationOption(option))return orig.apply(this,arguments);var args=_normalizeArguments.apply(this,arguments);return args.mode="show",this.effect.call(this,args)}}($.fn.show),hide:function(orig){return function(option){if(standardAnimationOption(option))return orig.apply(this,arguments);var args=_normalizeArguments.apply(this,arguments);return args.mode="hide",this.effect.call(this,args)}}($.fn.hide),toggle:function(orig){return function(option){if(standardAnimationOption(option)||"boolean"==typeof option)return orig.apply(this,arguments);var args=_normalizeArguments.apply(this,arguments);return args.mode="toggle",this.effect.call(this,args)}}($.fn.toggle),cssUnit:function(key){var style=this.css(key),val=[];return $.each(["em","px","%","pt"],function(i,unit){0<style.indexOf(unit)&&(val=[parseFloat(style),unit])}),val},cssClip:function(clipObj){return clipObj?this.css("clip","rect("+clipObj.top+"px "+clipObj.right+"px "+clipObj.bottom+"px "+clipObj.left+"px)"):parseClip(this.css("clip"),this)},transfer:function(options,done){var element=$(this),startPosition=$(options.to),targetFixed="fixed"===startPosition.css("position"),animation=$("body"),fixTop=targetFixed?animation.scrollTop():0,fixLeft=targetFixed?animation.scrollLeft():0,animation=startPosition.offset(),animation={top:animation.top-fixTop,left:animation.left-fixLeft,height:startPosition.innerHeight(),width:startPosition.innerWidth()},startPosition=element.offset(),transfer=$("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(options.className).css({top:startPosition.top-fixTop,left:startPosition.left-fixLeft,height:element.innerHeight(),width:element.innerWidth(),position:targetFixed?"fixed":"absolute"}).animate(animation,options.duration,options.easing,function(){transfer.remove(),$.isFunction(done)&&done()})}}),$.fx.step.clip=function(fx){fx.clipInit||(fx.start=$(fx.elem).cssClip(),"string"==typeof fx.end&&(fx.end=parseClip(fx.end,fx.elem)),fx.clipInit=!0),$(fx.elem).cssClip({top:fx.pos*(fx.end.top-fx.start.top)+fx.start.top,right:fx.pos*(fx.end.right-fx.start.right)+fx.start.right,bottom:fx.pos*(fx.end.bottom-fx.start.bottom)+fx.start.bottom,left:fx.pos*(fx.end.left-fx.start.left)+fx.start.left})}}(),baseEasings={},$.each(["Quad","Cubic","Quart","Quint","Expo"],function(i,name){baseEasings[name]=function(p){return Math.pow(p,i+2)}}),$.extend(baseEasings,{Sine:function(p){return 1-Math.cos(p*Math.PI/2)},Circ:function(p){return 1-Math.sqrt(1-p*p)},Elastic:function(p){return 0===p||1===p?p:-Math.pow(2,8*(p-1))*Math.sin((80*(p-1)-7.5)*Math.PI/15)},Back:function(p){return p*p*(3*p-2)},Bounce:function(p){for(var pow2,bounce=4;p<((pow2=Math.pow(2,--bounce))-1)/11;);return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((3*pow2-2)/22-p,2)}}),$.each(baseEasings,function(name,easeIn){$.easing["easeIn"+name]=easeIn,$.easing["easeOut"+name]=function(p){return 1-easeIn(1-p)},$.easing["easeInOut"+name]=function(p){return p<.5?easeIn(2*p)/2:1-easeIn(-2*p+2)/2}});var effect=$.effects;$.effects.define("blind","hide",function(options,done){var map={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},element=$(this),direction=options.direction||"up",start=element.cssClip(),animate={clip:$.extend({},start)},placeholder=$.effects.createPlaceholder(element);animate.clip[map[direction][0]]=animate.clip[map[direction][1]],"show"===options.mode&&(element.cssClip(animate.clip),placeholder&&placeholder.css($.effects.clipToBox(animate)),animate.clip=start),placeholder&&placeholder.animate($.effects.clipToBox(animate),options.duration,options.easing),element.animate(animate,{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define("bounce",function(queuelen,done){var upAnim,downAnim,element=$(this),anims=queuelen.mode,hide="hide"===anims,show="show"===anims,refValue=queuelen.direction||"up",distance=queuelen.distance,times=queuelen.times||5,anims=2*times+(show||hide?1:0),speed=queuelen.duration/anims,easing=queuelen.easing,ref="up"===refValue||"down"===refValue?"top":"left",motion="up"===refValue||"left"===refValue,i=0,queuelen=element.queue().length;for($.effects.createPlaceholder(element),refValue=element.css(ref),distance=distance||element["top"==ref?"outerHeight":"outerWidth"]()/3,show&&((downAnim={opacity:1})[ref]=refValue,element.css("opacity",0).css(ref,motion?2*-distance:2*distance).animate(downAnim,speed,easing)),hide&&(distance/=Math.pow(2,times-1)),(downAnim={})[ref]=refValue;i<times;i++)(upAnim={})[ref]=(motion?"-=":"+=")+distance,element.animate(upAnim,speed,easing).animate(downAnim,speed,easing),distance=hide?2*distance:distance/2;hide&&((upAnim={opacity:0})[ref]=(motion?"-=":"+=")+distance,element.animate(upAnim,speed,easing)),element.queue(done),$.effects.unshift(element,queuelen,1+anims)}),$.effects.define("clip","hide",function(options,done){var animate={},element=$(this),start=options.direction||"vertical",vertical="both"===start,horizontal=vertical||"horizontal"===start,vertical=vertical||"vertical"===start,start=element.cssClip();animate.clip={top:vertical?(start.bottom-start.top)/2:start.top,right:horizontal?(start.right-start.left)/2:start.right,bottom:vertical?(start.bottom-start.top)/2:start.bottom,left:horizontal?(start.right-start.left)/2:start.left},$.effects.createPlaceholder(element),"show"===options.mode&&(element.cssClip(animate.clip),animate.clip=start),element.animate(animate,{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define("drop","hide",function(options,done){var element=$(this),show="show"===options.mode,distance=options.direction||"left",ref="up"===distance||"down"===distance?"top":"left",motion="up"===distance||"left"===distance?"-=":"+=",oppositeMotion="+="==motion?"-=":"+=",animation={opacity:0};$.effects.createPlaceholder(element),distance=options.distance||element["top"==ref?"outerHeight":"outerWidth"](!0)/2,animation[ref]=motion+distance,show&&(element.css(animation),animation[ref]=oppositeMotion+distance,animation.opacity=1),element.animate(animation,{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define("explode","hide",function(options,done){var i,j,left,top,mx,my,rows=options.pieces?Math.round(Math.sqrt(options.pieces)):3,cells=rows,element=$(this),show="show"===options.mode,offset=element.show().css("visibility","hidden").offset(),width=Math.ceil(element.outerWidth()/cells),height=Math.ceil(element.outerHeight()/rows),pieces=[];function childComplete(){pieces.push(this),pieces.length===rows*cells&&(element.css({visibility:"visible"}),$(pieces).remove(),done())}for(i=0;i<rows;i++)for(top=offset.top+i*height,my=i-(rows-1)/2,j=0;j<cells;j++)left=offset.left+j*width,mx=j-(cells-1)/2,element.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*width,top:-i*height}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:width,height:height,left:left+(show?mx*width:0),top:top+(show?my*height:0),opacity:show?0:1}).animate({left:left+(show?0:mx*width),top:top+(show?0:my*height),opacity:show?1:0},options.duration||500,options.easing,childComplete)}),$.effects.define("fade","toggle",function(options,done){var show="show"===options.mode;$(this).css("opacity",show?0:1).animate({opacity:show?1:0},{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define("fold","hide",function(options,done){var element=$(this),queuelen=options.mode,show="show"===queuelen,hide="hide"===queuelen,size=options.size||15,percent=/([0-9]+)%/.exec(size),ref=!!options.horizFirst?["right","bottom"]:["bottom","right"],duration=options.duration/2,placeholder=$.effects.createPlaceholder(element),start=element.cssClip(),animation1={clip:$.extend({},start)},animation2={clip:$.extend({},start)},distance=[start[ref[0]],start[ref[1]]],queuelen=element.queue().length;percent&&(size=parseInt(percent[1],10)/100*distance[hide?0:1]),animation1.clip[ref[0]]=size,animation2.clip[ref[0]]=size,animation2.clip[ref[1]]=0,show&&(element.cssClip(animation2.clip),placeholder&&placeholder.css($.effects.clipToBox(animation2)),animation2.clip=start),element.queue(function(next){placeholder&&placeholder.animate($.effects.clipToBox(animation1),duration,options.easing).animate($.effects.clipToBox(animation2),duration,options.easing),next()}).animate(animation1